Merge "Import sources from xalan-tests xalan-j_2_7_3-rc10" am: 52bcda7324 am: 4ff52b81bf am: 9ac7a37dc9 am: 3e36dad3c7 am: 9025f8d04a

Original change: https://android-review.googlesource.com/c/platform/external/apache-xml/+/2643660

Change-Id: I9807b90e64b45f0d6855eb6400d2df39197ddc58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/test/java/src/org/apache/qetest/CharTables.java b/test/java/src/org/apache/qetest/CharTables.java
new file mode 100644
index 0000000..89d4f74
--- /dev/null
+++ b/test/java/src/org/apache/qetest/CharTables.java
@@ -0,0 +1,408 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+
+
+/**
+ * Simple utility for writing XML documents from character tables.  
+ *  
+ * @author scott_boag@lotus.com
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class CharTables
+{
+
+    /**
+     * Write a chars table to a file.  
+     *
+     * Simply uses new OutputStreamWriter(..., fileencoding).  
+     *
+     * @param chars array of Objects, Integer char code and 
+     * String description thereof (only including applicable codes)
+     * @param includeUnencoded, or simply don't write them out at all
+     * @param xmlencoding the XML name used in encoding= attr
+     * @param fileencoding the encoding to output to
+     * @param filename to write to
+     * @throws any underlying exceptions
+     */
+    public static void writeCharTableFile(Object[][] chars, boolean includeUnencoded, 
+            String xmlencoding, String fileencoding, String filename)
+            throws Exception
+    {
+        File f = new File(filename);
+        FileOutputStream fos = new FileOutputStream(f);
+        PrintWriter writer = new PrintWriter(new OutputStreamWriter(fos, fileencoding));
+
+        writer.println("<?xml version=\"1.0\" encoding=\"" + xmlencoding + "\"?>");
+        writer.println("<chartables fileencoding=\"" + fileencoding + "\">");
+        CharTables.writeCharTable(chars, includeUnencoded, xmlencoding, writer);
+        writer.println("</chartables>");
+        writer.close();
+    }
+
+    /**
+     * Write a chars table to a stream.
+     *
+     * @param chars array of Objects, Integer char code and 
+     * String description thereof (only including applicable codes)
+     * @param includeUnencoded, or simply don't write them out at all
+     * @param encoding the encoding to output to
+     * @param writer where to write to
+     * @throws any underlying exceptions
+     */
+    public static void writeCharTable(Object[][] chars, boolean includeUnencoded, 
+            String encoding, PrintWriter writer)
+            throws Exception
+    {
+        writer.println(CHARS_HEADER + encoding + "\" includeUnencoded=\"" + includeUnencoded + "\">");
+        int numChars = chars.length;
+
+        for ( int x = 0x20; x <= 0x03CE+4/* 0xD7FF */; x++ )
+        {
+            int i;
+            for ( i = 0; i < numChars; i++ )
+            {
+                final int code = ((Integer)(chars[i][0])).intValue(); 
+                
+                if ( code == x )
+                {     
+                    writer.print(CHAR_HEADER + code + CHAR_HEADER2 + chars[i][1] + "\">");
+                    switch ( code )
+                    {
+                    case '&': 
+                        writer.print(C_HEADER); 
+                        writer.print("&amp;"); 
+                        writer.print(C_ENDER); 
+                        break;
+                    case '<': 
+                        writer.print(C_HEADER); 
+                        writer.print("&lt;"); 
+                        writer.print(C_ENDER); 
+                        break;
+                    default:
+                        writer.print(C_HEADER); 
+                        writer.print(((char)code));
+                        writer.print(C_ENDER); 
+                    }
+                    writer.print(E_HEADER); 
+                    writer.print("&#x"); 
+                    writer.print(Integer.toHexString(code)); 
+                    writer.print(";"); 
+                    writer.print(E_ENDER);
+                    writer.println(CHAR_ENDER);
+                    break; // from for...
+                }
+            } // of for(i...
+            // This character is not provided in the specified encoding
+            if ( includeUnencoded && ( i == numChars ))
+            {
+                writer.print(CHAR_HEADER + x + CHAR_HEADER2 + "not encoded" + "\">");
+                // Since this character isn't in this encoding, 
+                //  don't bother writing out the ELEM_C
+                writer.print(E_HEADER); 
+                writer.print("&#x"); 
+                writer.print(Integer.toHexString(x)); 
+                writer.print(";"); 
+                writer.print(E_ENDER);
+                writer.println(CHAR_ENDER);
+            }
+
+        }// of for(x...
+        
+        writer.println(CHARS_ENDER);
+        writer.flush();
+    } // of writeCharTable
+ 
+
+    /** chars elem - the whole table.  */
+    public static final String ELEM_CHARS = "chars";
+
+    /** chars elem, enc attr - encoding of these chars.  */
+    public static final String ATTR_ENC = "enc";
+
+    /** Convenience precalculated string.  */
+    public static String CHARS_HEADER = "<" + ELEM_CHARS + " " + ATTR_ENC + "=\"";
+    
+    /** Convenience precalculated string.  */
+    public static String CHARS_ENDER = "</" + ELEM_CHARS + ">";
+
+    /** char elem - a single character.  */
+    public static final String ELEM_CHAR = "char";
+
+    /** char elem, dec attr - decimal char code.  */
+    public static final String ATTR_DEC = "dec";
+
+    /** char elem, desc attr - description.  */
+    public static final String ATTR_DESC = "desc";
+
+    /** Convenience precalculated string.  */
+    public static String CHAR_HEADER = "<" + ELEM_CHAR + " " + ATTR_DEC + "=\"";
+    
+    /** Convenience precalculated string.  */
+    public static String CHAR_HEADER2 = "\" " + ATTR_DESC + "=\"";
+
+    /** Convenience precalculated string.  */
+    public static String CHAR_ENDER = "</" + ELEM_CHAR + ">";
+
+
+    /** c elem - just the character in the encoding.  */
+    public static final String ELEM_C = "c";
+
+    /** Convenience precalculated string.  */
+    public static String C_HEADER = "<" + ELEM_C + ">";
+    
+    /** Convenience precalculated string.  */
+    public static String C_ENDER = "</" + ELEM_C + ">";
+
+
+    /** e elem - the entity reference to the character.  */
+    public static final String ELEM_E = "e";
+
+    /** Convenience precalculated string.  */
+    public static String E_HEADER = "<" + ELEM_E + ">";
+    
+    /** Convenience precalculated string.  */
+    public static String E_ENDER = "</" + ELEM_E + ">";
+
+
+    /**
+     * Main method to run from the command line; sample usage.
+     * @param args cmd line arguments
+     */
+    public static void main(String[] args)
+    {
+        String filename = "chartable.xml";
+        if (args.length >= 1)
+        {
+            filename = args[0];
+        }
+        String xmlencoding = "ISO-8859-7";
+        String fileencoding = "ISO8859_7";
+        try
+        {
+            // Sample usage with greek table, below
+            CharTables.writeCharTableFile(greek, false, xmlencoding, fileencoding, filename);
+            System.out.println("Wrote " + filename + " output in encodings " + xmlencoding + "/" + fileencoding);
+        } 
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+    }
+
+
+    /** Sample data: greek/ISO-8859-7/ISO8859_7 .  */
+    public static final Object greek[][] = 
+    {  
+        {new Integer(0x0020),	"SPACE"}
+        , {new Integer(0x0021),	"EXCLAMATION MARK"}
+        , {new Integer(0x0022),	"QUOTATION MARK"}
+        , {new Integer(0x0023),	"NUMBER SIGN"}
+        , {new Integer(0x0024),	"DOLLAR SIGN"}
+        , {new Integer(0x0025),	"PERCENT SIGN"}
+        , {new Integer(0x0026),	"AMPERSAND"}
+        , {new Integer(0x0027),	"APOSTROPHE"}
+        , {new Integer(0x0028),	"LEFT PARENTHESIS"}
+        , {new Integer(0x0029),	"RIGHT PARENTHESIS"}
+        , {new Integer(0x002A),	"ASTERISK"}
+        , {new Integer(0x002B),	"PLUS SIGN"}
+        , {new Integer(0x002C),	"COMMA"}
+        , {new Integer(0x002D),	"HYPHEN-MINUS"}
+        , {new Integer(0x002E),	"FULL STOP"}
+        , {new Integer(0x002F),	"SOLIDUS"}
+        , {new Integer(0x0030),	"DIGIT ZERO"}
+        , {new Integer(0x0031),	"DIGIT ONE"}
+        , {new Integer(0x0032),	"DIGIT TWO"}
+        , {new Integer(0x0033),	"DIGIT THREE"}
+        , {new Integer(0x0034),	"DIGIT FOUR"}
+        , {new Integer(0x0035),	"DIGIT FIVE"}
+        , {new Integer(0x0036),	"DIGIT SIX"}
+        , {new Integer(0x0037),	"DIGIT SEVEN"}
+        , {new Integer(0x0038),	"DIGIT EIGHT"}
+        , {new Integer(0x0039),	"DIGIT NINE"}
+        , {new Integer(0x003A),	"COLON"}
+        , {new Integer(0x003B),	"SEMICOLON"}
+        , {new Integer(0x003C),	"LESS-THAN SIGN"}
+        , {new Integer(0x003D),	"EQUALS SIGN"}
+        , {new Integer(0x003E),	"GREATER-THAN SIGN"}
+        , {new Integer(0x003F),	"QUESTION MARK"}
+        , {new Integer(0x0040),	"COMMERCIAL AT"}
+        , {new Integer(0x0041),	"LATIN CAPITAL LETTER A"}
+        , {new Integer(0x0042),	"LATIN CAPITAL LETTER B"}
+        , {new Integer(0x0043),	"LATIN CAPITAL LETTER C"}
+        , {new Integer(0x0044),	"LATIN CAPITAL LETTER D"}
+        , {new Integer(0x0045),	"LATIN CAPITAL LETTER E"}
+        , {new Integer(0x0046),	"LATIN CAPITAL LETTER F"}
+        , {new Integer(0x0047),	"LATIN CAPITAL LETTER G"}
+        , {new Integer(0x0048),	"LATIN CAPITAL LETTER H"}
+        , {new Integer(0x0049),	"LATIN CAPITAL LETTER I"}
+        , {new Integer(0x004A),	"LATIN CAPITAL LETTER J"}
+        , {new Integer(0x004B),	"LATIN CAPITAL LETTER K"}
+        , {new Integer(0x004C),	"LATIN CAPITAL LETTER L"}
+        , {new Integer(0x004D),	"LATIN CAPITAL LETTER M"}
+        , {new Integer(0x004E),	"LATIN CAPITAL LETTER N"}
+        , {new Integer(0x004F),	"LATIN CAPITAL LETTER O"}
+        , {new Integer(0x0050),	"LATIN CAPITAL LETTER P"}
+        , {new Integer(0x0051),	"LATIN CAPITAL LETTER Q"}
+        , {new Integer(0x0052),	"LATIN CAPITAL LETTER R"}
+        , {new Integer(0x0053),	"LATIN CAPITAL LETTER S"}
+        , {new Integer(0x0054),	"LATIN CAPITAL LETTER T"}
+        , {new Integer(0x0055),	"LATIN CAPITAL LETTER U"}
+        , {new Integer(0x0056),	"LATIN CAPITAL LETTER V"}
+        , {new Integer(0x0057),	"LATIN CAPITAL LETTER W"}
+        , {new Integer(0x0058),	"LATIN CAPITAL LETTER X"}
+        , {new Integer(0x0059),	"LATIN CAPITAL LETTER Y"}
+        , {new Integer(0x005A),	"LATIN CAPITAL LETTER Z"}
+        , {new Integer(0x005B),	"LEFT SQUARE BRACKET"}
+        , {new Integer(0x005C),	"REVERSE SOLIDUS"}
+        , {new Integer(0x005D),	"RIGHT SQUARE BRACKET"}
+        , {new Integer(0x005E),	"CIRCUMFLEX ACCENT"}
+        , {new Integer(0x005F),	"LOW LINE"}
+        , {new Integer(0x0060),	"GRAVE ACCENT"}
+        , {new Integer(0x0061),	"LATIN SMALL LETTER A"}
+        , {new Integer(0x0062),	"LATIN SMALL LETTER B"}
+        , {new Integer(0x0063),	"LATIN SMALL LETTER C"}
+        , {new Integer(0x0064),	"LATIN SMALL LETTER D"}
+        , {new Integer(0x0065),	"LATIN SMALL LETTER E"}
+        , {new Integer(0x0066),	"LATIN SMALL LETTER F"}
+        , {new Integer(0x0067),	"LATIN SMALL LETTER G"}
+        , {new Integer(0x0068),	"LATIN SMALL LETTER H"}
+        , {new Integer(0x0069),	"LATIN SMALL LETTER I"}
+        , {new Integer(0x006A),	"LATIN SMALL LETTER J"}
+        , {new Integer(0x006B),	"LATIN SMALL LETTER K"}
+        , {new Integer(0x006C),	"LATIN SMALL LETTER L"}
+        , {new Integer(0x006D),	"LATIN SMALL LETTER M"}
+        , {new Integer(0x006E),	"LATIN SMALL LETTER N"}
+        , {new Integer(0x006F),	"LATIN SMALL LETTER O"}
+        , {new Integer(0x0070),	"LATIN SMALL LETTER P"}
+        , {new Integer(0x0071),	"LATIN SMALL LETTER Q"}
+        , {new Integer(0x0072),	"LATIN SMALL LETTER R"}
+        , {new Integer(0x0073),	"LATIN SMALL LETTER S"}
+        , {new Integer(0x0074),	"LATIN SMALL LETTER T"}
+        , {new Integer(0x0075),	"LATIN SMALL LETTER U"}
+        , {new Integer(0x0076),	"LATIN SMALL LETTER V"}
+        , {new Integer(0x0077),	"LATIN SMALL LETTER W"}
+        , {new Integer(0x0078),	"LATIN SMALL LETTER X"}
+        , {new Integer(0x0079),	"LATIN SMALL LETTER Y"}
+        , {new Integer(0x007A),	"LATIN SMALL LETTER Z"}
+        , {new Integer(0x007B),	"LEFT CURLY BRACKET"}
+        , {new Integer(0x007C),	"VERTICAL LINE"}
+        , {new Integer(0x007D),	"RIGHT CURLY BRACKET"}
+        , {new Integer(0x007E),	"TILDE"}
+        , {new Integer(0x00A0),	"NO-BREAK SPACE"}
+        , {new Integer(0x02BD),	"MODIFIER LETTER REVERSED COMMA"}
+        , {new Integer(0x02BC),	"MODIFIER LETTER APOSTROPHE"}
+        , {new Integer(0x00A3),	"POUND SIGN"}
+        , {new Integer(0x00A6),	"BROKEN BAR"}
+        , {new Integer(0x00A7),	"SECTION SIGN"}
+        , {new Integer(0x00A8),	"DIAERESIS"}
+        , {new Integer(0x00A9),	"COPYRIGHT SIGN"}
+        , {new Integer(0x00AB),	"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"}
+        , {new Integer(0x00AC),	"NOT SIGN"}
+        , {new Integer(0x00AD),	"SOFT HYPHEN"}
+        , {new Integer(0x2015),	"HORIZONTAL BAR"}
+        , {new Integer(0x00B0),	"DEGREE SIGN"}
+        , {new Integer(0x00B1),	"PLUS-MINUS SIGN"}
+        , {new Integer(0x00B2),	"SUPERSCRIPT TWO"}
+        , {new Integer(0x00B3),	"SUPERSCRIPT THREE"}
+        , {new Integer(0x0384),	"GREEK TONOS"}
+        , {new Integer(0x0385),	"GREEK DIALYTIKA TONOS"}
+        , {new Integer(0x0386),	"GREEK CAPITAL LETTER ALPHA WITH TONOS"}
+        , {new Integer(0x00B7),	"MIDDLE DOT"}
+        , {new Integer(0x0388),	"GREEK CAPITAL LETTER EPSILON WITH TONOS"}
+        , {new Integer(0x0389),	"GREEK CAPITAL LETTER ETA WITH TONOS"}
+        , {new Integer(0x038A),	"GREEK CAPITAL LETTER IOTA WITH TONOS"}
+        , {new Integer(0x00BB),	"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"}
+        , {new Integer(0x038C),	"GREEK CAPITAL LETTER OMICRON WITH TONOS"}
+        , {new Integer(0x00BD),	"VULGAR FRACTION ONE HALF"}
+        , {new Integer(0x038E),	"GREEK CAPITAL LETTER UPSILON WITH TONOS"}
+        , {new Integer(0x038F),	"GREEK CAPITAL LETTER OMEGA WITH TONOS"}
+        , {new Integer(0x0390),	"GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS"}
+        , {new Integer(0x0391),	"GREEK CAPITAL LETTER ALPHA"}
+        , {new Integer(0x0392),	"GREEK CAPITAL LETTER BETA"}
+        , {new Integer(0x0393),	"GREEK CAPITAL LETTER GAMMA"}
+        , {new Integer(0x0394),	"GREEK CAPITAL LETTER DELTA"}
+        , {new Integer(0x0395),	"GREEK CAPITAL LETTER EPSILON"}
+        , {new Integer(0x0396),	"GREEK CAPITAL LETTER ZETA"}
+        , {new Integer(0x0397),	"GREEK CAPITAL LETTER ETA"}
+        , {new Integer(0x0398),	"GREEK CAPITAL LETTER THETA"}
+        , {new Integer(0x0399),	"GREEK CAPITAL LETTER IOTA"}
+        , {new Integer(0x039A),	"GREEK CAPITAL LETTER KAPPA"}
+        , {new Integer(0x039B),	"GREEK CAPITAL LETTER LAMDA"}
+        , {new Integer(0x039C),	"GREEK CAPITAL LETTER MU"}
+        , {new Integer(0x039D),	"GREEK CAPITAL LETTER NU"}
+        , {new Integer(0x039E),	"GREEK CAPITAL LETTER XI"}
+        , {new Integer(0x039F),	"GREEK CAPITAL LETTER OMICRON"}
+        , {new Integer(0x03A0),	"GREEK CAPITAL LETTER PI"}
+        , {new Integer(0x03A1),	"GREEK CAPITAL LETTER RHO"}
+        , {new Integer(0x03A3),	"GREEK CAPITAL LETTER SIGMA"}
+        , {new Integer(0x03A4),	"GREEK CAPITAL LETTER TAU"}
+        , {new Integer(0x03A5),	"GREEK CAPITAL LETTER UPSILON"}
+        , {new Integer(0x03A6),	"GREEK CAPITAL LETTER PHI"}
+        , {new Integer(0x03A7),	"GREEK CAPITAL LETTER CHI"}
+        , {new Integer(0x03A8),	"GREEK CAPITAL LETTER PSI"}
+        , {new Integer(0x03A9),	"GREEK CAPITAL LETTER OMEGA"}
+        , {new Integer(0x03AA),	"GREEK CAPITAL LETTER IOTA WITH DIALYTIKA"}
+        , {new Integer(0x03AB),	"GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA"}
+        , {new Integer(0x03AC),	"GREEK SMALL LETTER ALPHA WITH TONOS"}
+        , {new Integer(0x03AD),	"GREEK SMALL LETTER EPSILON WITH TONOS"}
+        , {new Integer(0x03AE),	"GREEK SMALL LETTER ETA WITH TONOS"}
+        , {new Integer(0x03AF),	"GREEK SMALL LETTER IOTA WITH TONOS"}
+        , {new Integer(0x03B0),	"GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS"}
+        , {new Integer(0x03B1),	"GREEK SMALL LETTER ALPHA"}
+        , {new Integer(0x03B2),	"GREEK SMALL LETTER BETA"}
+        , {new Integer(0x03B3),	"GREEK SMALL LETTER GAMMA"}
+        , {new Integer(0x03B4),	"GREEK SMALL LETTER DELTA"}
+        , {new Integer(0x03B5),	"GREEK SMALL LETTER EPSILON"}
+        , {new Integer(0x03B6),	"GREEK SMALL LETTER ZETA"}
+        , {new Integer(0x03B7),	"GREEK SMALL LETTER ETA"}
+        , {new Integer(0x03B8),	"GREEK SMALL LETTER THETA"}
+        , {new Integer(0x03B9),	"GREEK SMALL LETTER IOTA"}
+        , {new Integer(0x03BA),	"GREEK SMALL LETTER KAPPA"}
+        , {new Integer(0x03BB),	"GREEK SMALL LETTER LAMDA"}
+        , {new Integer(0x03BC),	"GREEK SMALL LETTER MU"}
+        , {new Integer(0x03BD),	"GREEK SMALL LETTER NU"}
+        , {new Integer(0x03BE),	"GREEK SMALL LETTER XI"}
+        , {new Integer(0x03BF),	"GREEK SMALL LETTER OMICRON"}
+        , {new Integer(0x03C0),	"GREEK SMALL LETTER PI"}
+        , {new Integer(0x03C1),	"GREEK SMALL LETTER RHO"}
+        , {new Integer(0x03C2),	"GREEK SMALL LETTER FINAL SIGMA"}
+        , {new Integer(0x03C3),	"GREEK SMALL LETTER SIGMA"}
+        , {new Integer(0x03C4),	"GREEK SMALL LETTER TAU"}
+        , {new Integer(0x03C5),	"GREEK SMALL LETTER UPSILON"}
+        , {new Integer(0x03C6),	"GREEK SMALL LETTER PHI"}
+        , {new Integer(0x03C7),	"GREEK SMALL LETTER CHI"}
+        , {new Integer(0x03C8),	"GREEK SMALL LETTER PSI"}
+        , {new Integer(0x03C9),	"GREEK SMALL LETTER OMEGA"}
+        , {new Integer(0x03CA),	"GREEK SMALL LETTER IOTA WITH DIALYTIKA"}
+        , {new Integer(0x03CB),	"GREEK SMALL LETTER UPSILON WITH DIALYTIKA"}
+        , {new Integer(0x03CC),	"GREEK SMALL LETTER OMICRON WITH TONOS"}
+        , {new Integer(0x03CD),	"GREEK SMALL LETTER UPSILON WITH TONOS"}
+        , {new Integer(0x03CE),	"GREEK SMALL LETTER OMEGA WITH TONOS"}
+    };
+
+}
diff --git a/test/java/src/org/apache/qetest/CheckService.java b/test/java/src/org/apache/qetest/CheckService.java
new file mode 100644
index 0000000..4514cd7
--- /dev/null
+++ b/test/java/src/org/apache/qetest/CheckService.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+/**
+ * Interface for 'check'ing (validating) equivalence of two items.
+ *
+ * Implementers provide their own algorithims for determining
+ * equivalence, including custom algorithims for complex objects. 
+ * CheckServices should log out both any pertinent information about 
+ * the checking they've performed, then log out a checkPass or 
+ * checkFail (or Ambg, etc.) record, as well as returning the 
+ * appropriate result constant to the caller.
+ *
+ * The Configurable interface also allows callers to attempt to 
+ * set attributes on either the CheckService or on any 
+ * underlying validation algorithims.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public interface CheckService extends Configurable
+{
+
+    /**
+     * Compare two objects for equivalence, and return appropriate result.
+     * Implementers should provide the details of their "equals"
+     * algorithim in getDescription().  They must also call the 
+     * appropriate checkPass()/checkFail()/etc. method on the 
+     * supplied Logger.
+     * 
+     * Note that the order of actual, reference is usually 
+     * important in determining the result.
+     * <li>Typically:
+     * <ul>any unexpected Exceptions thrown -> ERRR_RESULT</ul>
+     * <ul>actual does not exist -> FAIL_RESULT</ul>
+     * <ul>reference does not exist -> AMBG_RESULT</ul>
+     * <ul>actual is equivalent to reference -> PASS_RESULT</ul>
+     * <ul>actual is not equivalent to reference -> FAIL_RESULT</ul>
+     * </li>
+     *
+     * @param logger to dump any output messages to
+     * @param actual (current) Object to check
+     * @param reference (gold, or expected) Object to check against
+     * @param description of what you're checking
+     * @param msg comment to log out with this test point
+     * @return Logger.*_RESULT code denoting status; each method may 
+     * define it's own meanings for pass, fail, ambiguous, etc.
+     */
+    public int check(Logger logger, Object actual,
+                     Object reference, String msg);
+
+    /**
+     * Compare two objects for equivalence, and return appropriate result.
+     *
+     * @param logger to dump any output messages to
+     * @param actual (current) Object to check
+     * @param reference (gold, or expected) Object to check against
+     * @param description of what you're checking
+     * @param msg comment to log out with this test point
+     * @param id ID tag to log out with this test point
+     * @return Logger.*_RESULT code denoting status; each method may 
+     * define it's own meanings for pass, fail, ambiguous, etc.
+     */
+    public int check(Logger logger, Object actual,
+                     Object reference, String msg, String id);
+
+    /**
+     * Gets extended information about the last check call.
+     * 
+     * This is somewhat optional, and may be removed.  CheckServices 
+     * should probably log out any additional info themselves to 
+     * their logger before calling checkPass, etc., thus removing 
+     * the need for callers to explicitly ask for this info.
+     *
+     * @return String describing any additional info about the last
+     * two Objects that were checked, or null if none available
+     */
+    public String getExtendedInfo();
+
+}  // end of class CheckService
+
diff --git a/test/java/src/org/apache/qetest/Configurable.java b/test/java/src/org/apache/qetest/Configurable.java
new file mode 100644
index 0000000..ccb087a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/Configurable.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+import java.util.Properties;
+
+/**
+ * Interface with basic configuration API's.  
+ *
+ * A simple interface allowing configuration of testing utilities; 
+ * generally by passing generic information to the testing 
+ * utility and having it pass it to any underlying objects.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public interface Configurable
+{
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * This method may or may not throw an IllegalArgumentException 
+     * if an attribute that it does not recognize is passed in.  
+     * This decision is up to the individual testing utility, and 
+     * may include deciding to either trap underlying product 
+     * exceptions for unknown attributes, or may re-throw them as 
+     * IllegalArgumentExceptions.
+     * 
+     * Modeled after JAXP's various setAttribute()/setFeature() 
+     * methods.
+     * 
+     * @param name The name of the attribute.
+     * @param value The value of the attribute.
+     * @throws IllegalArgumentException thrown if the underlying
+     * implementation doesn't recognize the attribute and wants to 
+     * inform the user of this fact.
+     */
+    public void setAttribute(String name, Object value)
+        throws IllegalArgumentException;
+
+
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * This method should attempt to set any applicable attributes 
+     * found in the given attrs onto itself, and will ignore any and 
+     * all attributes it does not recognize.  It should never 
+     * throw exceptions.  This method may overwrite any previous 
+     * attributes that were set.  Currently since this takes a 
+     * Properties block you may only be able to set objects that 
+     * are Strings, although individual implementations may 
+     * attempt to use Hashtable.get() on only the local part.
+     * 
+     * @param attrs Props of various name, value attrs.
+     */
+    public void applyAttributes(Properties attrs);
+
+
+    /**
+     * Allows the user to retrieve specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     *
+     * @param name The name of the attribute.
+     * @return value The value of the attribute.
+     * @throws IllegalArgumentException thrown if the underlying
+     * implementation doesn't recognize the attribute and wants to 
+     * inform the user of this fact.
+     */
+    public Object getAttribute(String name)
+        throws IllegalArgumentException;
+
+
+    /**
+     * Description of what this testing utility does.  
+     * 
+     * @return String description of extension
+     */
+    public String getDescription();
+
+}  // end of class Configurable
+
diff --git a/test/java/src/org/apache/qetest/ConsoleLogger.java b/test/java/src/org/apache/qetest/ConsoleLogger.java
new file mode 100644
index 0000000..e3feaf3
--- /dev/null
+++ b/test/java/src/org/apache/qetest/ConsoleLogger.java
@@ -0,0 +1,626 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ConsoleLogger.java
+ *
+ */
+package org.apache.qetest;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * Logger that prints human-readable output to System.out.
+ * As an experiment, the ConsoleLogger supports an independent
+ * loggingLevel that can be more restrictive than a loggingLevel 
+ * set in any enclosing Reporter.  
+ * Note this isn't quite as well architected as I would like, 
+ * but it does address what seems to be the 
+ * most common usage case: where you're running tests automatically, 
+ * and likely will be using some file-based output for results 
+ * analysis.  This allows you to set loggingLevel for your Reporter
+ * high, so that most/all output is sent to the file, but set this 
+ * ConsoleLogger's loggingLevel low, so only critical problems 
+ * are displayed on the screen (since most of the time users will 
+ * never be watching the console in this situation).
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class ConsoleLogger implements Logger
+{
+
+    //-----------------------------------------------------
+    //-------- Class members --------
+    //-----------------------------------------------------
+
+    /** Our output stream - currently hard-coded to System.out. */
+    protected PrintStream outStream = System.out;
+
+    /** If we're ready to start outputting yet. */
+    protected boolean ready = false;
+
+    /** If we should indent sub-results or not. */
+    protected boolean indent = true;
+
+    /** Level (number of spaces?) to indent sub-results. */
+    protected StringBuffer sIndent = new StringBuffer();
+
+    /** Generic properties for this Logger; sort-of replaces instance variables. */
+    protected Properties loggerProps = null;
+
+    /** 
+    * Special LoggingLevel for just this instance.  
+    * May be set from "ConsoleLogger.loggingLevel" property;
+    * defaults to 100 which should be larger than any other 
+    * loggingLevels in use currently.
+    * Note that different levels here will even restrict output 
+    * from control messages like testCaseInit; see individual 
+    * javadocs for what controls what.  This may affect the level 
+    * of indenting you see as well; I traded off a little speed
+    * (don't calc indent if not using that message) for prettiness.
+    */
+    protected int consoleLoggingLevel = 100;
+    
+    //-----------------------------------------------------
+    //-------- Control and utility routines --------
+    //-----------------------------------------------------
+
+    /** Simple constructor, does not perform initialization. */
+    public ConsoleLogger()
+    { /* no-op */
+    }
+
+    /**
+     * Constructor calls initialize(p).
+     * @param p Properties block to initialize us with.
+     */
+    public ConsoleLogger(Properties p)
+    {
+        ready = initialize(p);
+    }
+
+    /**
+     * Return a description of what this Logger does.
+     * @return "reports results to System.out".
+     */
+    public String getDescription()
+    {
+        return ("org.apache.qetest.ConsoleLogger - reports results to System.out.");
+    }
+
+    /**
+     * Returns information about the Property name=value pairs that
+     * are understood by this Logger/Reporter.
+     * @return same as {@link java.applet.Applet.getParameterInfo}.
+     */
+    public String[][] getParameterInfo()
+    {
+
+        String pinfo[][] =
+        {
+            { OPT_INDENT, "boolean", "If reporter should indent sub-results" },
+            { "ConsoleLogger.loggingLevel", "String", "loggingLevel for just ConsoleLogger; only if more restrictive than other loggingLevels" }
+        };
+
+        return pinfo;
+    }
+
+    /**
+     * Accessor methods for our properties block.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public Properties getProperties()
+    {
+        return loggerProps;
+    }
+
+    /**
+     * Accessor methods for our properties block.
+     * @param p Properties to set (is cloned).
+     */
+    public void setProperties(Properties p)
+    {
+
+        if (p != null)
+        {
+            loggerProps = (Properties) p.clone();
+        }
+    }
+
+    /**
+     * Call once to initialize this Logger/Reporter from Properties.
+     * @param Properties block to initialize from.
+     * @param status, true if OK, false if an error occoured.
+     *
+     * @param p Properties block to initialize from
+     * @return true if OK; currently always returns true
+     */
+    public boolean initialize(Properties p)
+    {
+
+        setProperties(p);
+
+        String i = loggerProps.getProperty(OPT_INDENT);
+
+        if (i != null)
+        {
+            if (i.toLowerCase().equals("no")
+                    || i.toLowerCase().equals("false"))
+                indent = false;
+            else if (i.toLowerCase().equals("yes")
+                     || i.toLowerCase().equals("true"))
+                indent = true;
+        }
+
+        // Grab our specific loggingLevel and set if needed
+        String logLvl = loggerProps.getProperty("ConsoleLogger.loggingLevel");
+        if (logLvl != null)
+        {
+            // Note: if present, we'll attempt to set it
+            // It doesn't really make much sense to set it if 
+            //  this value is larger than an enclosing Reporter's 
+            //  loggingLevel, but it won't hurt either
+            try
+            {
+                consoleLoggingLevel = Integer.parseInt(logLvl);
+            }
+            catch (NumberFormatException numEx)
+            { /* no-op */
+            }
+        }
+
+        ready = true;
+
+        return true;
+    }
+
+    /**
+     * Is this Logger/Reporter ready to log results?
+     * @return status - true if it's ready to report, false otherwise
+     */
+    public boolean isReady()
+    {
+        return ready;
+    }
+
+    /**
+     * Flush this Logger/Reporter - no-op for ConsoleLogger.
+     */
+    public void flush()
+    { /* no-op */
+    }
+
+    /**
+     * Close this Logger/Reporter - essentially no-op for ConsoleLogger.
+     */
+    public void close()
+    {
+
+        flush();
+
+        ready = false;
+    }
+
+    /** Simplistic indenting - two spaces. */
+    protected void indent()
+    {
+        if (indent)
+            sIndent.append("  ");
+    }
+
+    /** Simplistic outdenting - two spaces. */
+    protected void outdent()
+    {
+        if ((indent) && (sIndent.length() >= 2))
+            sIndent.setLength(sIndent.length() - 2);
+    }
+
+    //-----------------------------------------------------
+    //-------- Testfile / Testcase start and stop routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Report that a testfile has started.
+     * Output only when ConsoleLogger.loggingLevel >= ERRORMSG
+     *
+     * @param name file name or tag specifying the test.
+     * @param comment comment about the test.
+     */
+    public void testFileInit(String name, String comment)
+    {
+        if (consoleLoggingLevel < ERRORMSG)
+            return;
+            
+        outStream.println(sIndent + "TestFileInit " + name + ":" + comment);
+        indent();
+    }
+
+    /**
+     * Report that a testfile has finished, and report it's result.
+     * Output only when ConsoleLogger.loggingLevel >= ERRORMSG
+     *
+     * @param msg message or name of test to log out
+     * @param result result of testfile
+     */
+    public void testFileClose(String msg, String result)
+    {
+        if (consoleLoggingLevel < ERRORMSG)
+            return;
+            
+        outdent();
+        outStream.println(sIndent + "TestFileClose(" + result + ") " + msg);
+    }
+
+    /**
+     * Report that a testcase has started.
+     * Output only when ConsoleLogger.loggingLevel >= WARNINGMSG
+     *
+     * @param comment short description of this test case's objective.
+     */
+    public void testCaseInit(String comment)
+    {
+        if (consoleLoggingLevel < WARNINGMSG)
+            return;
+            
+        outStream.println(sIndent + "TestCaseInit " + comment);
+        indent();
+    }
+
+    /**
+     * Report that a testcase has finished, and report it's result.
+     * Output only when ConsoleLogger.loggingLevel >= WARNINGMSG
+     *
+     * @param msg message of name of test case to log out
+     * @param result result of testfile
+     */
+    public void testCaseClose(String msg, String result)
+    {
+        if (consoleLoggingLevel < WARNINGMSG)
+            return;
+            
+        outdent();
+        outStream.println(sIndent + "TestCaseClose(" + result + ") " + msg);
+    }
+
+    //-----------------------------------------------------
+    //-------- Test results logging routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Report a comment to result file with specified severity.
+     * Output only when ConsoleLogger.loggingLevel >= level
+     *
+     * @param level severity or class of message.
+     * @param msg comment to log out.
+     */
+    public void logMsg(int level, String msg)
+    {
+        if (consoleLoggingLevel < level)
+            return;
+            
+        outStream.println(sIndent + msg);
+    }
+
+    /**
+     * Report an arbitrary String to result file with specified severity.
+     * Log out the String provided exactly as-is.
+     * Output only when ConsoleLogger.loggingLevel >= level
+     *
+     * @param level severity or class of message.
+     * @param msg arbitrary String to log out.
+     */
+    public void logArbitrary(int level, String msg)
+    {
+        if (consoleLoggingLevel < level)
+            return;
+            
+        outStream.println(msg);
+    }
+
+    /**
+     * Logs out statistics to result file with specified severity.
+     * Output only when ConsoleLogger.loggingLevel >= level
+     *
+     * @param level severity of message.
+     * @param lVal statistic in long format.
+     * @param dVal statistic in double format.
+     * @param msg comment to log out.
+     */
+    public void logStatistic(int level, long lVal, double dVal, String msg)
+    {
+        if (consoleLoggingLevel < level)
+            return;
+            
+        outStream.println(sIndent + msg + " l: " + lVal + " d: " + dVal);
+    }
+
+    /**
+     * Logs out Throwable.toString() and a stack trace of the 
+     * Throwable with the specified severity.
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message.
+     * @param throwable throwable/exception to log out.
+     * @param msg description of the throwable.
+     */
+    public void logThrowable(int level, Throwable throwable, String msg)
+    {
+        if (consoleLoggingLevel < level)
+            return;
+
+        StringWriter sWriter = new StringWriter();
+
+        sWriter.write(msg + "\n");
+        sWriter.write(throwable.toString() + "\n");
+
+        PrintWriter pWriter = new PrintWriter(sWriter);
+        throwable.printStackTrace(pWriter);
+
+        outStream.println(sWriter.toString());
+    }
+
+    /**
+     * Logs out a element to results with specified severity.
+     * Simply indents and dumps output as string like so:
+     * <pre>
+     *    element
+     *    attr1=value1
+     *    ...
+     *    msg.toString()
+     * </pre>
+     * Output only when ConsoleLogger.loggingLevel >= level
+     *
+     * @param level severity of message.
+     * @param element name of enclosing element
+     * @param attrs hash of name=value attributes
+     * @param msg Object to log out; up to reporters to handle
+     * processing of this; usually logs just .toString().
+     */
+    public void logElement(int level, String element, Hashtable attrs,
+                           Object msg)
+    {
+        if (consoleLoggingLevel < level)
+            return;
+            
+        if ((element == null)
+           || (attrs == null))
+        {
+            // Bail if either element name or attr list is null
+            // Note: we should really handle this case more elegantly
+            return;
+        }
+
+        indent();
+        outStream.println(sIndent + element);
+        indent();
+
+        for (Enumeration keys = attrs.keys();
+                keys.hasMoreElements(); /* no increment portion */ )
+        {
+            Object key = keys.nextElement();
+
+            outStream.println(sIndent + key.toString() + "="
+                              + attrs.get(key).toString());
+        }
+
+        outdent();
+        if (msg != null)
+            outStream.println(sIndent + msg.toString());
+        outdent();
+    }
+
+    /**
+     * Logs out contents of a Hashtable with specified severity.
+     * Output only when ConsoleLogger.loggingLevel >= level
+     *
+     * @param level severity or class of message.
+     * @param hash Hashtable to log the contents of.
+     * @param msg decription of the Hashtable.
+     */
+    public void logHashtable(int level, Hashtable hash, String msg)
+    {
+        if (consoleLoggingLevel < level)
+            return;
+            
+        indent();
+        outStream.println(sIndent + "HASHTABLE: " + msg);
+        indent();
+
+        if (hash == null)
+        {
+            outStream.println(sIndent + "hash == null, no data");
+        }
+        else
+        {
+            try
+            {
+
+                // Fake the Properties-like output
+                for (Enumeration keys = hash.keys();
+                        keys.hasMoreElements(); /* no increment portion */ )
+                {
+                    Object key = keys.nextElement();
+
+                    outStream.println(sIndent + key.toString() + "="
+                                      + hash.get(key).toString());
+                }
+            }
+            catch (Exception e)
+            {
+
+                // No-op: should ensure we have clean output
+            }
+        }
+
+        outdent();
+        outdent();
+    }
+
+    //-----------------------------------------------------
+    //-------- Test results reporting check* routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Writes out a Pass record with comment.
+     * Output only when ConsoleLogger.loggingLevel > FAILSONLY
+     * 
+     * @param comment comment to log with the pass record.
+     */
+    public void checkPass(String comment)
+    {
+        // Note <=, since FAILSONLY is a special level
+        if (consoleLoggingLevel <= FAILSONLY)
+            return;
+            
+        outStream.println(sIndent + "PASS!  " + comment);
+    }
+
+    /**
+     * Writes out an ambiguous record with comment.
+     * Output only when ConsoleLogger.loggingLevel > FAILSONLY
+     *
+     * @param comment comment to log with the ambg record.
+     */
+    public void checkAmbiguous(String comment)
+    {
+        // Note <=, since FAILSONLY is a special level
+        if (consoleLoggingLevel <= FAILSONLY)
+            return;
+
+        outStream.println(sIndent + "AMBG   " + comment);
+    }
+
+    /**
+     * Writes out a Fail record with comment.
+     * Output only when ConsoleLogger.loggingLevel >= FAILSONLY
+     *
+     * @param comment comment to log with the fail record.
+     */
+    public void checkFail(String comment)
+    {
+        if (consoleLoggingLevel < FAILSONLY)
+            return;
+
+        outStream.println(sIndent + "FAIL   " + comment);
+    }
+
+    /**
+     * Writes out a Error record with comment.
+     * Output only when ConsoleLogger.loggingLevel >= ERRORMSG
+     *
+     * @param comment comment to log with the error record.
+     */
+    public void checkErr(String comment)
+    {
+        if (consoleLoggingLevel < ERRORMSG)
+            return;
+
+        outStream.println(sIndent + "ERROR  " + comment);
+    }
+
+    /* EXPERIMENTAL: have duplicate set of check*() methods 
+       that all output some form of ID as well as comment. 
+       Leave the non-ID taking forms for both simplicity to the 
+       end user who doesn't care about IDs as well as for 
+       backwards compatibility.
+    */
+
+    /**
+     * Writes out a Pass record with comment and ID.
+     * Output only when ConsoleLogger.loggingLevel > FAILSONLY
+     * 
+     * @param comment comment to log with the pass record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkPass(String comment, String id)
+    {
+        // Note <=, since FAILSONLY is a special level
+        if (consoleLoggingLevel <= FAILSONLY)
+            return;
+            
+        if (id != null)
+            outStream.println(sIndent + "PASS!  (" + id + ") " + comment);
+        else
+            outStream.println(sIndent + "PASS!  " + comment);
+    }
+
+    /**
+     * Writes out an ambiguous record with comment and ID.
+     * Output only when ConsoleLogger.loggingLevel > FAILSONLY
+     * 
+     * @param comment to log with the ambg record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkAmbiguous(String comment, String id)
+    {
+        // Note <=, since FAILSONLY is a special level
+        if (consoleLoggingLevel <= FAILSONLY)
+            return;
+            
+        if (id != null)
+            outStream.println(sIndent + "AMBG   (" + id + ") " + comment);
+        else
+            outStream.println(sIndent + "AMBG   " + comment);
+    }
+
+    /**
+     * Writes out a Fail record with comment and ID.
+     * Output only when ConsoleLogger.loggingLevel >= FAILSONLY
+     * 
+     * @param comment comment to log with the fail record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkFail(String comment, String id)
+    {
+        if (consoleLoggingLevel < FAILSONLY)
+            return;
+
+        if (id != null)
+            outStream.println(sIndent + "FAIL!  (" + id + ") " + comment);
+        else
+            outStream.println(sIndent + "FAIL!  " + comment);
+    }
+
+    /**
+     * Writes out an Error record with comment and ID.
+     * Output only when ConsoleLogger.loggingLevel >= ERRORMSG
+     * 
+     * @param comment comment to log with the error record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkErr(String comment, String id)
+    {
+        if (consoleLoggingLevel < ERRORMSG)
+            return;
+
+        if (id != null)
+            outStream.println(sIndent + "ERROR  (" + id + ") " + comment);
+        else
+            outStream.println(sIndent + "ERROR  " + comment);
+    }
+}  // end of class ConsoleLogger
+
diff --git a/test/java/src/org/apache/qetest/Datalet.java b/test/java/src/org/apache/qetest/Datalet.java
new file mode 100644
index 0000000..495c3e1
--- /dev/null
+++ b/test/java/src/org/apache/qetest/Datalet.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * Datalet.java
+ *
+ */
+package org.apache.qetest;
+
+import java.util.Hashtable;
+
+/**
+ * Minimal interface defining a datalet, a single set of data 
+ * for a simple test case.
+ * <p>A Datalet defines a single group of data that a matching 
+ * Testlet needs to execute it's simple test case.  Normally,
+ * Testlets and Datalets are matched.</p>
+ *
+ * <p>This makes creating data-driven tests simpler, by separating 
+ * the test algorithm from the definition of the test data.  Note 
+ * that logging what happened during the test is already separated 
+ * out into the Logger interface.</p>
+ *
+ * <p>Normally Datalets will simply be collections of public members
+ * that can be written or read by anyone.  An enclosing test can 
+ * simply create or load a number of Datalets and then pass them 
+ * to a Testlet to execute the whole bunch of them.</p>
+ *
+ * <p>One way to look at a Datalet is basically an intelligent 
+ * Properties / Hashtable / InputSource, designed for a 
+ * specific set of data.  They can be loaded from a variety of 
+ * inputs and will intelligently create the right kind of data 
+ * that their corresponding Testlet is expecting.
+ * For example, and DOM-based InputSource Datalet might be 
+ * loaded from a number of Strings denoting filenames or URLs.
+ * The Datalet would then know how to parse each of the files 
+ * into a DOM, which a Testlet could then use directly.</p>
+ *
+ * <p>//@todo what metaphor is best? I.e. Should Datalets break OO
+ * paradigms and just have public members, or should they work more 
+ * like a Hashtable with some Properties-like features thrown in?
+ * Or: what are the most important 
+ * things to optimize: syntactic sugar-like simplicity for callers; 
+ * more functionality for different datatypes; ease of use by 
+ * inexperienced coders (perhaps testers who are just learning Java);
+ * ease of use by experienced coders?</p>
+ * 
+ *
+ * <p>//@todo Should we add a getParameterInfo() method?</p>
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public interface Datalet
+{
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @return String describing the specific set of data 
+     * this Datalet contains (can often be used as the description
+     * of any check() calls made from the Testlet).
+     */
+    public abstract String getDescription();
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     * Datalets must have this as a read/write property, since many 
+     * users will programmatically construct Datalets.
+     *
+     * @param s description to use for this Datalet.
+     */
+    public abstract void setDescription(String s);
+
+
+    /**
+     * Load fields of this Datalet from a Hashtable.
+     * Note many datalets might take in a Properties block 
+     * instead for simple String-valued data.
+     *
+     * @param Hashtable to load; Datalet should attempt to fill 
+     * in as many member variables as possible from this, leaving 
+     * any non-specified variables null or some default; behavior 
+     * if null is passed is undefined
+     */
+    public abstract void load(Hashtable h);
+
+
+    /**
+     * Load fields of this Datalet from an array.
+     * This allows most Datalets to be initialized from a main()
+     * command line or the like.  For any String-valued types, or 
+     * types that can easily be derived from a String, this makes 
+     * running ad-hoc tests very easy.
+     *
+     * @param args array of Strings, as if from the command line;
+     * Datalet should attempt to fill in as many member variables 
+     * as possible from this, defining the order itself, leaving 
+     * any non-specified variables null or some default; behavior 
+     * if null is passed is undefined
+     */
+    public abstract void load(String[] args);
+
+}  // end of class Datalet
+
diff --git a/test/java/src/org/apache/qetest/DirFilter.java b/test/java/src/org/apache/qetest/DirFilter.java
new file mode 100644
index 0000000..124d09d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/DirFilter.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest;
+
+import java.io.File;
+
+/**
+ * FilenameFilter supporting includes/excludes returning directories.
+ *
+ * <p>Returns directories that match our includes/excludes.</p>
+ *
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class DirFilter extends IncludeExcludeFilter
+{
+
+    /** Initialize for defaults (not using inclusion list).  */
+    public DirFilter()
+    {
+        // Default is to not use includes; just get all dirs
+        setUseIncludesOnly(false);
+    }
+
+    /**
+     * Initialize with some include(s)/exclude(s).  
+     *
+     * @param inc semicolon-delimited string of inclusion name(s)
+     * @param exc semicolon-delimited string of exclusion name(s)
+     */
+    public DirFilter(String inc, String exc)
+    {
+        setIncludes(inc);
+        setExcludes(exc);
+        // Only use includes only if they're set
+        //refactor: logic might better be put in IncludeExcludeFilter
+        if ((null != inc) && (inc.length() > 0))
+            setUseIncludesOnly(true);
+        else
+            setUseIncludesOnly(false);
+    }
+
+    /**
+     * Return only directories.
+     *
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name should be included in the file list; 
+     * <code>false</code> otherwise.
+     * @since JDK1.0
+     */
+    public boolean acceptOverride(File dir, String name)
+    {
+        // Only return directories
+        if ((new File(dir, name)).isDirectory())
+            return true;
+        else
+            return false;
+    }
+}
diff --git a/test/java/src/org/apache/qetest/ExecTestlet.java b/test/java/src/org/apache/qetest/ExecTestlet.java
new file mode 100644
index 0000000..728e7dd
--- /dev/null
+++ b/test/java/src/org/apache/qetest/ExecTestlet.java
@@ -0,0 +1,365 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+
+/**
+ * Base class for testing commandline driven products.  
+ *
+ * This class provides a default algorithim for testing any
+ * command line based tool.  Subclasses define the 
+ * exact command line args, etc. used for different products.
+ * Subclasses can also either shell an external process or can 
+ * just construct a class and call main().
+ *
+ * @author Shane_Curcuru@us.ibm.com
+ * @version $Id$
+ */
+public abstract class ExecTestlet extends FileTestlet
+{
+    /**
+     * Parameter: Actual name of external program to call.  
+     */
+    public static final String OPT_PROGNAME = "progName";
+
+    /**
+     * Timing data: how long process takes to exec.  
+     * Default is -1 to represent a bogus number.  
+     */
+    protected long timeExec = -1;
+
+    /**
+     * Default path/name of external program to call, OR 
+     * actual name of class to call.  
+     * @return foo, must be overridden.
+     */
+    public abstract String getProgram();
+
+    /**
+     * If the program should be shelled out or if it is a Java 
+     * class to call main on.  
+     * @return foo, must be overridden.
+     */
+    public abstract boolean isExternal();
+
+    /**
+     * Worker method to get list of arguments specific to this program.  
+     * 
+     * <p>Should construct whole list of arguments needed to call 
+     * this program, including any options and args needed to 
+     * process the files in the datalet.  Must be overriden.</p>
+     *
+     * <p>If isExternal is true, this should presumably put the 
+     * name of the program first, since we just shell that as a 
+     * command line.  If isExternal is false, this should <b>not</b> 
+     * include the Java classname.</p>
+     * 
+     * @param datalet that defined the test data
+     * @return String array of arguments suitable to pass to 
+     * Runtime.exec() or main()
+     */
+    public abstract String[] getArguments(FileDatalet datalet);
+
+    /** 
+     * Worker method to actually perform the test; 
+     * overriden to use command line processing.  
+     *
+     * Logs out applicable info; attempts to perform transformation.
+     *
+     * @param datalet to test with
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void testDatalet(FileDatalet datalet)
+            throws Exception
+    {
+        String[] args = getArguments(datalet);
+    
+        StringBuffer argBuf = new StringBuffer();
+        for (int i = 0; i < args.length; i++)
+        {
+            argBuf.append(args[i]);
+            argBuf.append(" ");
+        }
+        logger.logMsg(Logger.TRACEMSG, "testDatalet executing: " + argBuf.toString());
+
+        // Use one of two worker methods to execute the process, either
+        //  by shelling an external process, or by constructing the 
+        //  Java object and then calling main() 
+        if (isExternal())
+            execProcess(datalet, args);
+        else
+            execMain(datalet, args);
+    }
+
+    /**
+     * Worker method to call a Java class' main() method.  
+     * 
+     * <p>Simply calls a no-arg constructor and then passes the 
+     * args to the main() method.  May be overridden.</p>
+     * 
+     * @param datalet that defined the test data
+     * @param cmdline actual command line to run, including program name
+     * @param environment passed as-is to Process.run
+     * @return return value from program
+     * @exception Exception may be thrown by Runtime.exec
+     */
+    public void execMain(FileDatalet datalet, String[] cmdline)
+            throws Exception
+    {
+        // Default implementation; may be overriden
+        Class clazz = Class.forName(getProgram());
+        if (null == clazz)
+        {
+            logger.checkErr("Can't find classname: " + getProgram());
+            return;
+        }
+
+        try
+        {
+            // ...find the main() method...
+            Class[] parameterTypes = new Class[1];
+            parameterTypes[0] = java.lang.String[].class;
+            Method main = clazz.getMethod("main", parameterTypes);
+            
+            // ...and execute the method!
+            Object[] mainArgs = new Object[1];
+            mainArgs[0] = cmdline;
+            final long startTime = System.currentTimeMillis();
+            main.invoke(null, mainArgs);
+            timeExec = System.currentTimeMillis() - startTime;
+
+            // Also log out a perf element by default
+            Hashtable attrs = new Hashtable();
+            attrs.put("program", getProgram());
+            attrs.put("isExternal", "false");
+            attrs.put("timeExec", new Long(timeExec));
+            logPerf(datalet, attrs);
+            attrs = null;
+        }
+        catch (Throwable t)
+        {
+            logger.logThrowable(Logger.ERRORMSG, t, "Javaclass.main() threw");
+            logger.checkErr(getProgram() + ".main() threw: " + t.toString());
+        }        
+    }
+
+    /**
+     * Worker method to shell out an external process.  
+     * 
+     * <p>Does a simple capturing of the out and err streams from
+     * the process and logs them out.  Inherits the same environment 
+     * that the current JVM is in.  No need to override</p>
+     * 
+     * @param datalet that defined the test data
+     * @param cmdline actual command line to run, including program name
+     * @param environment passed as-is to Process.run
+     * @return return value from program
+     * @exception Exception may be thrown by Runtime.exec
+     */
+    public void execProcess(FileDatalet datalet, String[] cmdline)
+            throws Exception
+    {
+        if ((cmdline == null) || (cmdline.length < 1))
+        {
+            logger.checkFail("execProcess called with null/blank arguments!");
+            return;
+        }
+
+        int bufSize = 2048; // Arbitrary bufSize seems to work well
+        ThreadedStreamReader outReader = new ThreadedStreamReader();
+        ThreadedStreamReader errReader = new ThreadedStreamReader();
+        Runtime r = Runtime.getRuntime();
+        java.lang.Process proc = null;
+
+        // Actually begin executing the program
+        logger.logMsg(Logger.TRACEMSG, "execProcess starting " + cmdline[0]);
+
+        //@todo Note: we should really provide a way for the datalet
+        //  to specify any additional environment needed for the 
+        //  second arg to exec();
+        String[] environment = null;
+        final long startTime = System.currentTimeMillis();
+        proc = r.exec(cmdline, environment);
+
+        // Immediately begin capturing any output therefrom
+        outReader.setInputStream(
+            new BufferedReader(
+                new InputStreamReader(proc.getInputStream()), bufSize));
+        errReader.setInputStream(
+            new BufferedReader(
+                new InputStreamReader(proc.getErrorStream()), bufSize));
+
+        // Start two threads off on reading the System.out and System.err from proc
+        outReader.start();
+        errReader.start();
+        int processReturnVal = -2; // HACK the default
+        try
+        {
+            // Wait for the process to exit normally
+            processReturnVal = proc.waitFor();
+            // Record time we finally rejoin, i.e. when the process is done
+            timeExec = System.currentTimeMillis() - startTime;
+        }
+        catch (InterruptedException ie1)
+        {
+            logger.logThrowable(Logger.ERRORMSG, ie1, 
+                                  "execProcess proc.waitFor() threw");
+        }
+
+        // Now that we're done, presumably the Readers are also done
+        StringBuffer sysOut = null;
+        StringBuffer sysErr = null;
+        try
+        {
+            outReader.join();
+            sysOut = outReader.getBuffer();
+        }
+        catch (InterruptedException ie2)
+        {
+            logger.logThrowable(Logger.ERRORMSG, ie2, "Joining outReader threw");
+        }
+
+        try
+        {
+            errReader.join();
+            sysErr = errReader.getBuffer();
+        }
+        catch (InterruptedException ie3)
+        {
+            logger.logThrowable(Logger.ERRORMSG, ie3, "Joining errReader threw");
+        }
+
+        logAndCheckStreams(datalet, cmdline, sysOut, sysErr, processReturnVal);
+    }
+
+
+    /** 
+     * Worker method to evaluate the System.out/.err streams of 
+     * a particular processor. 
+     *
+     * Logs out the streams if available, then calls a worker method 
+     * to actually call check() if specific validation needed. 
+     *
+     * @param datalet that defined the test data
+     * @param cmdline that was used for execProcess
+     * @param outBuf buffer from execProcess' System.out
+     * @param errBuf buffer from execProcess' System.err
+     * @param processReturnVal from execProcess
+     */
+    protected void logAndCheckStreams(FileDatalet datalet, String[] cmdline, 
+            StringBuffer outBuf, StringBuffer errBuf, int processReturnVal)
+    {
+        Hashtable attrs = new Hashtable();
+        attrs.put("program", cmdline[0]);
+        attrs.put("returnVal", String.valueOf(processReturnVal));
+
+        StringBuffer buf = new StringBuffer();
+        if ((null != errBuf) && (errBuf.length() > 0))
+        {
+            buf.append("<system-err>");
+            buf.append(errBuf);
+            buf.append("</system-err>\n");
+        }
+        if ((null != outBuf) && (outBuf.length() > 0))
+        {
+            buf.append("<system-out>");
+            buf.append(outBuf);
+            buf.append("</system-out>\n");
+        }
+        logger.logElement(Logger.INFOMSG, "checkOutputStreams", attrs, buf.toString());
+        buf = null;
+
+        // Also log out a perf element by default
+        attrs = new Hashtable();
+        attrs.put("program", cmdline[0]);
+        attrs.put("isExternal", "true");
+        attrs.put("timeExec", new Long(timeExec));
+        logPerf(datalet, attrs);
+        attrs = null;
+
+        // Also call worker method to allow subclasses to 
+        //  override checking of the output streams, as available
+        checkStreams(datalet, cmdline, outBuf, errBuf, processReturnVal);
+    }
+
+
+    /** 
+     * Worker method to validate the System.out/.err streams.  
+     * 
+     * Default implementation does nothing; override if you wish 
+     * to actually validate the specific streams. 
+     *
+     * @param datalet that defined the test data
+     * @param cmdline that was used for execProcess
+     * @param outBuf buffer from execProcess' System.out
+     * @param errBuf buffer from execProcess' System.err
+     * @param processReturnVal from execProcess
+     */
+    protected void checkStreams(FileDatalet datalet, String[] cmdline, 
+            StringBuffer outBuf, StringBuffer errBuf, int processReturnVal)
+    {
+        // Default impl is no-op
+        return;
+    }
+
+
+    /** 
+     * Worker method to write performance data in standard format.  
+     *
+     * Writes out a perf elem with standardized idref, testlet, 
+     * input/output, and fileSize params.
+     *
+     * @param datalet to use for idref, etc.  
+     * @param hash of extra attributes to log.  
+     */
+    protected void logPerf(FileDatalet datalet, Hashtable hash)
+    {
+        if (null == hash)
+            hash = new Hashtable();
+
+        File f = new File(datalet.getInput());
+            
+        hash.put("idref", f.getName());
+        hash.put("input", datalet.getInput());
+        hash.put("output", datalet.getOutput());
+        hash.put("testlet", thisClassName);
+        try
+        {
+            // Attempt to store size of input file, since overall 
+            //  amount of data affects performance
+            hash.put("fileSize", new Long(f.length()));
+        } 
+        catch (Exception e)
+        {
+            hash.put("fileSize", "threw: " + e.toString());
+        }
+
+        logger.logElement(Logger.STATUSMSG, "perf", hash, getCheckDescription(datalet));
+    }
+
+}  // end of class ExecTestlet
+
diff --git a/test/java/src/org/apache/qetest/FileBasedTest.java b/test/java/src/org/apache/qetest/FileBasedTest.java
new file mode 100644
index 0000000..8c4d911
--- /dev/null
+++ b/test/java/src/org/apache/qetest/FileBasedTest.java
@@ -0,0 +1,850 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * FileBasedTest.java
+ *
+ */
+package org.apache.qetest;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Enumeration;
+import java.util.Properties;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Base class for file-based tests.
+ * Many tests will need to operate on files external to a product
+ * under test.  This class provides useful, generic functionality
+ * in these cases.
+ * <p>FileBasedTest defines a number of common fields that many
+ * tests that operate on data files may use.</p>
+ * <ul>These are each pre-initialized for you from the command line or property file.
+ * <li>inputDir (string representing dir where input files come from)</li>
+ * <li>outputDir (string representing dir where output, working, temp files go)</li>
+ * <li>goldDir  (string representing dir where known good reference files are)</li>
+ * <li>debug (generic boolean flag for debugging)</li>
+ * <li>(stored in testProps) loggers (FQCN;of;Loggers to add to our Reporter)</li>
+ * <li>(stored in testProps) loggingLevel (passed to Reporters)</li>
+ * <li>(stored in testProps) logFile (string filename for any file-based Reporter)</li>
+ * <li>fileChecker</li>
+ * <li>(stored in testProps) excludes</li>
+ * <li>(stored in testProps) category</li>
+ * </ul>
+ * @author Shane_Curcuru@lotus.com
+ * @version 3.0
+ */
+public class FileBasedTest extends TestImpl
+{
+
+    /**
+     * Convenience method to print out usage information.
+     * @author Shane Curcuru
+     * <p>Should be overridden by subclasses, although they are free
+     * to call super.usage() to get the common options string.</p>
+     *
+     * @return String denoting usage of this class
+     */
+    public String usage()
+    {
+
+        return ("Common options supported by FileBasedTest:\n" + "    -"
+                + OPT_LOAD
+                + " <file.props>  (read in a .properties file,\n"
+                + "                         that can set any/all of the other opts)\n"
+                + "    -" + OPT_INPUTDIR 
+                + "    <path to input files>\n"
+                + "    -" + OPT_OUTPUTDIR
+                + "   <path to output area - where all output is sent>\n"
+                + "    -" + OPT_GOLDDIR
+                + "     <path to gold reference output>\n"
+                + "    -" + OPT_CATEGORY
+                + "    <names;of;categories of tests to run>\n"
+                + "    -" + OPT_EXCLUDES
+                + "    <list;of;specific file.ext tests to skip>\n" 
+                + "    -" + OPT_FILECHECKER
+                + " <FQCN of a non-standard FileCheckService>\n"
+                + "    -" + Reporter.OPT_LOGGERS
+                + "     <FQCN;of;Loggers to use>\n"
+                + "    -" + Logger.OPT_LOGFILE
+                + "     <resultsFileName> (sends test results to XML file)\n"
+                + "    -" + Reporter.OPT_LOGGINGLEVEL 
+                + " <int> (level of msgs to log out; 0=few, 99=lots)\n" 
+                + "    -" + Reporter.OPT_DEBUG
+                + " (prints extra debugging info)\n");
+    }
+
+    //-----------------------------------------------------
+    //-------- Constants for common input params --------
+    //-----------------------------------------------------
+
+    /**
+     * Parameter: Load properties file for options
+     * <p>Will load named file as a Properties block, setting any
+     * applicable options. Command line takes precedence.
+     * Format: <code>-load FileName.prop</code></p>
+     */
+    public static final String OPT_LOAD = "load";
+
+    /**
+     * Parameter: Where are test input files?
+     * <p>Default: .\inputs.
+     * Format: <code>-inputDir path\to\dir</code></p>
+     */
+    public static final String OPT_INPUTDIR = "inputDir";
+
+    /** Field inputDir:holds String denoting local path for inputs.  */
+    protected String inputDir = "." + File.separator + "inputs";
+
+    /**
+     * Parameter: Where should we place output files (or temp files, etc.)?
+     * <p>Default: .\outputs.
+     * Format: <code>-outputDir path\to\dir</code></p>
+     */
+    public static final String OPT_OUTPUTDIR = "outputDir";
+
+    /** Field outputDir:holds String denoting local path for outputs.  */
+    protected String outputDir = "." + File.separator + "outputs";
+
+    /**
+     * Parameter: Where should get "gold" pre-validated XML files?
+     * <p>Default: .\golds.
+     * Format: <code>-goldDir path\to\dir</code></p>
+     */
+    public static final String OPT_GOLDDIR = "goldDir";
+
+    /** Field goldDir:holds String denoting local path for golds.  */
+    protected String goldDir = "." + File.separator + "golds";
+
+    /**
+     * Parameter: Only run a single subcategory of the tests.
+     * <p>Default: blank, runs all tests - supply the directory name
+     * of a subcategory to run just that set.  Set into testProps 
+     * and used from there.</p>
+     */
+    public static final String OPT_CATEGORY = "category";
+
+    /**
+     * Parameter: Should we exclude any specific test files?
+     * <p>Default: null (no excludes; otherwise specify 
+     * semicolon delimited list of bare filenames something like 
+     * 'axes01.xsl;bool99.xsl').  Set into testProps and used 
+     * from there</p>
+     */
+    public static final String OPT_EXCLUDES = "excludes";
+
+    /**
+     * Parameter: Which CheckService should we use for XML output Files?
+     * <p>Default: org.apache.qetest.XHTFileCheckService.</p>
+     */
+    public static final String OPT_FILECHECKER = "fileChecker";
+
+    /**
+     * Parameter-Default value: org.apache.qetest.XHTFileCheckService.  
+     */
+    public static final String OPT_FILECHECKER_DEFAULT = "org.apache.qetest.xsl.XHTFileCheckService";
+
+    /** FileChecker instance for use by subclasses; created in preTestFileInit()  */
+    protected CheckService fileChecker = null;
+
+    /**
+     * Parameter: if Reporters should log performance data, true/false.
+     */
+    protected boolean perfLogging = false;
+
+    /**
+     * Parameter: general purpose debugging flag.
+     */
+    protected boolean debug = false;
+
+    //-----------------------------------------------------
+    //-------- Class members and accessors --------
+    //-----------------------------------------------------
+
+    /**
+     * Total Number of test case methods defined in this test.
+     * <p>Tests must either set this variable or override runTestCases().</p>
+     * <p>Unless you override runTestCases(), test cases must be named like so:.</p>
+     * <p>Tests must either set this variable or override runTestCases().</p>
+     * <p>&nbsp;&nbsp;testCase<I>N</I>, where <I>N</I> is a consecutively
+     * numbered whole integer (1, 2, 3,....</p>
+     * @see #runTestCases
+     */
+    public int numTestCases = 0;
+
+    /**
+     * Generic Properties block for storing initialization info.
+     * All startup options get stored in here for later use, both by
+     * the test itself and by any Reporters we use.
+     */
+    protected Properties testProps = new Properties();
+
+    /**
+     * Accessor method for our Properties block, for use by harnesses.
+     *
+     * @param p if (p != null) testProps = (Properties) p.clone(); 
+     */
+    public void setProperties(Properties p)
+    {
+
+        // Don't allow setting to null!
+        if (p != null)
+        {
+            testProps = (Properties) p.clone();
+        }
+    }
+
+    /**
+     * Accessor method for our Properties block, for use by harnesses.
+     *
+     * @return our Properties block itself
+     */
+    public Properties getProperties()
+    {
+        return testProps;
+    }
+
+    /**
+     * Default constructor - initialize testName, Comment.
+     */
+    public FileBasedTest()
+    {
+
+        // Only set them if they're not set
+        if (testName == null)
+            testName = "FileBasedTest.defaultName";
+
+        if (testComment == null)
+            testComment = "FileBasedTest.defaultComment";
+    }
+
+    //-----------------------------------------------------
+    //-------- Implement Test/TestImpl methods --------
+    //-----------------------------------------------------
+
+    /**
+     * Initialize this test - called once before running testcases.
+     * <p>Use the loggers field to create some loggers in a Reporter.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @see TestImpl#testFileInit(java.util.Properties)
+     *
+     * @param p Properties to initialize from 
+     *
+     * @return false if we should abort; true otherwise
+     */
+    public boolean preTestFileInit(Properties p)
+    {
+
+        // Pass our properties block directly to the reporter
+        //  so it can use the same values in initialization
+        // A Reporter will auto-initialize from the values
+        //  in the properties block
+        setReporter(QetestFactory.newReporter(p));
+        reporter.testFileInit(testName, testComment);
+
+        // Create a file-based CheckService for later use
+        if (null == fileChecker)
+        {
+            String tmpName = testProps.getProperty(OPT_FILECHECKER);
+            if ((null != tmpName) && (tmpName.length() > 0))
+            {
+                // Use the user's specified class; if not available 
+                //  will return null which gets covered below
+                fileChecker = QetestFactory.newCheckService(reporter, tmpName);
+            }
+            
+            if (null == fileChecker)
+            {
+                // If that didn't work, then ask for default one that does files
+                fileChecker = QetestFactory.newCheckService(reporter, QetestFactory.TYPE_FILES);
+            }
+            // If we're creating a new one, also applyAttributes
+            // (Assume that if we already had one, it already had this done)
+            fileChecker.applyAttributes(p);
+        }
+
+        return true;
+    }
+
+    /**
+     * Initialize this test - called once before running testcases.
+     * <p>Subclasses <b>must</b> override this to do whatever specific
+     * processing they need to initialize their product under test.</p>
+     * <p>If for any reason the test should not continue, it <b>must</b>
+     * return false from this method.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @see TestImpl#testFileInit(java.util.Properties)
+     *
+     * @param p Properties to initialize from 
+     *
+     * @return false if we should abort; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        /* no-op; feel free to override */
+        return true;
+    }
+
+    /**
+     * Override mostly blank routine to dump environment info.
+     * <p>Log out information about our environment in a structured 
+     * way: mainly by calling logTestProps() here.</p>
+     * 
+     * @param p Properties to initialize from 
+     *
+     * @return false if we should abort; true otherwise
+     */
+    public boolean postTestFileInit(Properties p)
+    {
+        logTestProps();
+        return true;
+    }
+
+    /**
+     * Run all of our testcases.
+     * <p>use nifty FileBasedTestReporter.executeTests().  May be overridden
+     * by subclasses to do their own processing.  If you do not override,
+     * you must set numTestCases properly!</p>
+     * @author Shane Curcuru
+     *
+     * @param p Properties to initialize from 
+     *
+     * @return false if we should abort; true otherwise
+     */
+    public boolean runTestCases(Properties p)
+    {
+
+        // Properties may be currently unused
+        reporter.executeTests(this, numTestCases, p);
+
+        return true;
+    }
+
+    /**
+     * Cleanup this test - called once after running testcases.
+     * @author Shane Curcuru
+     * <p>Tests should override if they need to do any cleanup.</p>
+     *
+     * @param p Properties to initialize from 
+     *
+     * @return false if we should abort; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        /* no-op; feel free to override */
+        return true;
+    }
+
+    // Use default implementations of preTestFileClose()
+
+    /**
+     * Mark the test complete - called once after running testcases.
+     * <p>Currently logs a summary of our test status and then tells 
+     * our reporter to log the testFileClose. This will calculate 
+     * final results, and complete logging for any structured 
+     * output logs (like XML files).</p>
+     *<p>We also call reporter.writeResultsStatus(true) to 
+     * write out a pass/fail marker file.  (This last part is 
+     * actually optional, but it's useful and quick, so I'll 
+     * do it by default for now.)</p>
+     *
+     * @param p Unused; passed through to super
+     *
+     * @return true if OK, false otherwise
+     */
+    protected boolean postTestFileClose(Properties p)
+    {
+        // Log out a special summary status, with marker file
+        reporter.writeResultsStatus(true);
+
+        // Ask our superclass to handle this as well
+        return super.postTestFileClose(p);
+    }
+
+    //-----------------------------------------------------
+    //-------- Initialize our common input params --------
+    //-----------------------------------------------------
+
+    /**
+     * Set our instance variables from a Properties file.
+     * <p>Must <b>not</b> use reporter.</p>
+     * @author Shane Curcuru
+     * @param Properties block to set name=value pairs from
+     *
+     * NEEDSDOC @param props
+     * @return status - true if OK, false if error.
+     * @todo improve error checking, if needed
+     */
+    public boolean initializeFromProperties(Properties props)
+    {
+        // Copy over all properties into our local block
+        //  this is a little unusual, but it does allow users 
+        //  to set any new sort of properties via the properties 
+        //  file, and we'll pick it up - that way this class doesn't
+        //  have to get updated when we have new properties
+        // Note that this may result in duplicates since we
+        //  re-set many of the things from bleow
+        for (Enumeration names = props.propertyNames();
+                names.hasMoreElements(); /* no increment portion */ )
+        {
+            Object key = names.nextElement();
+
+            testProps.put(key, props.get(key));
+        }
+
+
+        // Parse out any values that match our internal convenience variables
+        // default all values to our current values
+        // String values are simply getProperty()'d
+        inputDir = props.getProperty(OPT_INPUTDIR, inputDir);
+        if (inputDir != null)
+            testProps.put(OPT_INPUTDIR, inputDir);
+
+        outputDir = props.getProperty(OPT_OUTPUTDIR, outputDir);
+        if (outputDir != null)
+            testProps.put(OPT_OUTPUTDIR, outputDir);
+
+        goldDir = props.getProperty(OPT_GOLDDIR, goldDir);
+        if (goldDir != null)
+            testProps.put(OPT_GOLDDIR, goldDir);
+
+        // The actual fileChecker object is created in preTestFileInit()
+
+        // Use a temp string for those properties we only set 
+        //  in our testProps, but don't bother to save ourselves
+        String temp = null;
+
+        temp = props.getProperty(OPT_FILECHECKER);
+        if (temp != null)
+            testProps.put(OPT_FILECHECKER, temp);
+
+        temp = props.getProperty(OPT_CATEGORY);
+        if (temp != null)
+            testProps.put(OPT_CATEGORY, temp);
+
+        temp = props.getProperty(OPT_EXCLUDES);
+        if (temp != null)
+            testProps.put(OPT_EXCLUDES, temp);
+
+        temp = props.getProperty(Reporter.OPT_LOGGERS);
+        if (temp != null)
+            testProps.put(Reporter.OPT_LOGGERS, temp);
+
+        temp = props.getProperty(Logger.OPT_LOGFILE);
+        if (temp != null)
+            testProps.put(Logger.OPT_LOGFILE, temp);
+
+        // boolean values just check for the non-default value
+        String dbg = props.getProperty(Reporter.OPT_DEBUG);
+
+        if ((dbg != null) && dbg.equalsIgnoreCase("true"))
+        {
+            debug = true;
+
+            testProps.put(Reporter.OPT_DEBUG, "true");
+        }
+
+        String pLog = props.getProperty(Reporter.OPT_PERFLOGGING);
+
+        if ((pLog != null) && pLog.equalsIgnoreCase("true"))
+        {
+            perfLogging = true;
+
+            testProps.put(Reporter.OPT_PERFLOGGING, "true");
+        }
+
+        temp = props.getProperty(Reporter.OPT_LOGGINGLEVEL);
+
+        if (temp != null)
+            testProps.put(Reporter.OPT_LOGGINGLEVEL, temp);
+
+        return true;
+    }
+
+    /**
+     * Sets the provided fields with data from an array, presumably
+     * from the command line.
+     * <p>May be overridden by subclasses, although you should probably
+     * read the code to see what default options this handles. Must
+     * not use reporter. Calls initializeFromProperties(). After that,
+     * sets any internal variables that match items in the array like:
+     * <code> -param1 value1 -paramNoValue -param2 value2 </code>
+     * Any params that do not match internal variables are simply set
+     * into our properties block for later use.  This allows subclasses
+     * to simply get their initialization data from the testProps
+     * without having to make code changes here.</p>
+     * <p>Assumes all params begin with "-" dash, and that all values
+     * do <b>not</b> start with a dash.</p>
+     * @author Shane Curcuru
+     * @param String[] array of arguments
+     *
+     * @param args array of command line arguments
+     * @param flag: are we being called from a subclass?
+     * @return status - true if OK, false if error.
+     */
+    public boolean initializeFromArray(String[] args, boolean flag)
+    {
+
+        // Read in command line args and setup internal variables
+        String optPrefix = "-";
+        int nArgs = args.length;
+
+        // We don't require any arguments: but subclasses might 
+        //  want to require certain ones
+        // Must read in properties file first, so cmdline can 
+        //  override values from properties file
+        boolean propsOK = true;
+
+        // IF we are being called the first time on this 
+        //  array of arguments, go ahead and process unknown ones
+        //  otherwise, don't bother
+        if (flag)
+        {
+            for (int k = 0; k < nArgs; k++)
+            {
+                if (args[k].equalsIgnoreCase(optPrefix + OPT_LOAD))
+                {
+                    if (++k >= nArgs)
+                    {
+                        System.err.println(
+                            "ERROR: must supply properties filename for: "
+                            + optPrefix + OPT_LOAD);
+
+                        return false;
+                    }
+
+                    String loadPropsName = args[k];
+
+                    try
+                    {
+
+                        // Load named file into our properties block
+                        FileInputStream fIS = new FileInputStream(loadPropsName);
+                        Properties p = new Properties();
+
+                        p.load(fIS);
+                        p.put(OPT_LOAD, loadPropsName); // Pass along with properties
+
+                        propsOK &= initializeFromProperties(p);
+                    }
+                    catch (Exception e)
+                    {
+                        System.err.println(
+                            "ERROR: loading properties file failed: " + loadPropsName);
+                        e.printStackTrace();
+
+                        return false;
+                    }
+
+                    break;
+                }
+            }  // end of for(...)
+        }  // end of if ((flag))
+
+        // Now read in the rest of the command line
+        // @todo cleanup loop to be more table-driven
+        for (int i = 0; i < nArgs; i++)
+        {
+
+            // Set any String args and place them in testProps
+            if (args[i].equalsIgnoreCase(optPrefix + OPT_INPUTDIR))
+            {
+                if (++i >= nArgs)
+                {
+                    System.err.println("ERROR: must supply arg for: "
+                                       + optPrefix + OPT_INPUTDIR);
+
+                    return false;
+                }
+
+                inputDir = args[i];
+
+                testProps.put(OPT_INPUTDIR, inputDir);
+
+                continue;
+            }
+
+            if (args[i].equalsIgnoreCase(optPrefix + OPT_OUTPUTDIR))
+            {
+                if (++i >= nArgs)
+                {
+                    System.err.println("ERROR: must supply arg for: "
+                                       + optPrefix + OPT_OUTPUTDIR);
+
+                    return false;
+                }
+
+                outputDir = args[i];
+
+                testProps.put(OPT_OUTPUTDIR, outputDir);
+
+                continue;
+            }
+
+            if (args[i].equalsIgnoreCase(optPrefix + OPT_GOLDDIR))
+            {
+                if (++i >= nArgs)
+                {
+                    System.err.println("ERROR: must supply arg for: "
+                                       + optPrefix + OPT_GOLDDIR);
+
+                    return false;
+                }
+
+                goldDir = args[i];
+
+                testProps.put(OPT_GOLDDIR, goldDir);
+
+                continue;
+            }
+
+            if (args[i].equalsIgnoreCase(optPrefix + OPT_CATEGORY))
+            {
+                if (++i >= nArgs)
+                {
+                    System.err.println("ERROR: must supply arg for: "
+                                       + optPrefix + OPT_CATEGORY);
+
+                    return false;
+                }
+
+                testProps.put(OPT_CATEGORY, args[i]);
+
+                continue;
+            }
+
+            if (args[i].equalsIgnoreCase(optPrefix + OPT_EXCLUDES))
+            {
+                if (++i >= nArgs)
+                {
+                    System.err.println("ERROR: must supply arg for: "
+                                       + optPrefix + OPT_EXCLUDES);
+
+                    return false;
+                }
+
+                testProps.put(OPT_EXCLUDES, args[i]);
+
+                continue;
+            }
+
+            if (args[i].equalsIgnoreCase(optPrefix + Reporter.OPT_LOGGERS))
+            {
+                if (++i >= nArgs)
+                {
+                    System.err.println("ERROR: must supply arg for: "
+                                       + optPrefix + Reporter.OPT_LOGGERS);
+
+                    return false;
+                }
+
+                testProps.put(Reporter.OPT_LOGGERS, args[i]);
+
+                continue;
+            }
+
+            if (args[i].equalsIgnoreCase(optPrefix + Logger.OPT_LOGFILE))
+            {
+                if (++i >= nArgs)
+                {
+                    System.err.println("ERROR: must supply arg for: "
+                                       + optPrefix + Logger.OPT_LOGFILE);
+
+                    return false;
+                }
+
+                testProps.put(Logger.OPT_LOGFILE, args[i]);
+
+                continue;
+            }
+
+            if (args[i].equalsIgnoreCase(optPrefix + OPT_FILECHECKER))
+            {
+                if (++i >= nArgs)
+                {
+                    System.out.println("ERROR: must supply arg for: "
+                                       + optPrefix + OPT_FILECHECKER);
+
+                    return false;
+                }
+
+                testProps.put(OPT_FILECHECKER, args[i]);
+
+                continue;
+            }
+
+            // Boolean values are simple flags to switch from defaults only
+            if (args[i].equalsIgnoreCase(optPrefix + Reporter.OPT_DEBUG))
+            {
+                debug = true;
+
+                testProps.put(Reporter.OPT_DEBUG, "true");
+
+                continue;
+            }
+
+            if (args[i].equalsIgnoreCase(optPrefix
+                                         + Reporter.OPT_PERFLOGGING))
+            {
+                testProps.put(Reporter.OPT_PERFLOGGING, "true");
+
+                continue;
+            }
+
+            // Parse out the integer value
+            //  This isn't strictly necessary since the catch-all 
+            //  below should take care of it, but better safe than sorry
+            if (args[i].equalsIgnoreCase(optPrefix
+                                         + Reporter.OPT_LOGGINGLEVEL))
+            {
+                if (++i >= nArgs)
+                {
+                    System.err.println("ERROR: must supply arg for: "
+                                       + optPrefix
+                                       + Reporter.OPT_LOGGINGLEVEL);
+
+                    return false;
+                }
+
+                try
+                {
+                    testProps.put(Reporter.OPT_LOGGINGLEVEL, args[i]);
+                }
+                catch (NumberFormatException numEx)
+                { /* no-op */
+                }
+
+                continue;
+            }
+
+            // IF we are being called the first time on this 
+            //  array of arguments, go ahead and process unknown ones
+            //  otherwise, don't bother
+            if (flag)
+            {
+
+                // Found an arg that we don't know how to process,
+                //  so store it for any subclass' use as a catch-all
+                // If it starts with - dash, and another non-dash arg follows,
+                //  set as a name=value pair in the property block
+                if ((args[i].startsWith(optPrefix)) && (i + 1 < nArgs)
+                        && (!args[i + 1].startsWith(optPrefix)))
+                {
+
+                    // Scrub off the "-" prefix before setting the name
+                    testProps.put(args[i].substring(1), args[i + 1]);
+
+                    i++;  // Increment counter to skip next arg
+                }
+
+                // Otherwise, just set as name="" in the property block
+                else
+                {
+
+                    // Scrub off the "-" prefix before setting the name
+                    testProps.put(args[i].substring(1), "");
+                }
+            }
+        }  // end of for() loop
+
+        // If we got here, we set the array params OK, so simply return 
+        //  the value the initializeFromProperties method returned
+        return propsOK;
+    }
+
+    //-----------------------------------------------------
+    //-------- Other useful and utility methods --------
+    //-----------------------------------------------------
+
+    /**
+     * Log out any System or common version info.
+     * <p>Logs System.getProperties(), and our the testProps block, etc..</p>
+     */
+    public void logTestProps()
+    {
+        reporter.logHashtable(reporter.CRITICALMSG, System.getProperties(),
+                              "System.getProperties");
+        reporter.logHashtable(reporter.CRITICALMSG, testProps, "testProps");
+        reporter.logHashtable(reporter.CRITICALMSG, QetestUtils.getEnvironmentHash(), "getEnvironmentHash");
+    }
+
+
+    /**
+     * Main worker method to run test from the command line.
+     * Test subclasses generally need not override.
+     * <p>This is primarily provided to make subclasses implementations
+     * of the main method as simple as possible: in general, they
+     * should simply do:
+     * <code>
+     *   public static void main (String[] args)
+     *   {
+     *       TestSubClass app = new TestSubClass();
+     *       app.doMain(args);
+     *   }
+     * </code>
+     *
+     * @param args command line arguments
+     */
+    public void doMain(String[] args)
+    {
+        // Initialize any instance variables from the command line 
+        //  OR specified properties block
+        if (!initializeFromArray(args, true))
+        {
+            System.err.println("ERROR in usage:");
+            System.err.println(usage());
+
+            // Don't use System.exit, since that will blow away any containing harnesses
+            return;
+        }
+
+        // Also pass along the command line, in case someone has 
+        //  specific code that's counting on this
+        StringBuffer buf = new StringBuffer();
+        for (int i = 0; i < args.length; i++)
+        {
+            buf.append(args[i]);
+            buf.append(" ");
+        }
+        testProps.put(MAIN_CMDLINE, buf.toString());
+
+        // Actually go and execute the test
+        runTest(testProps);
+    }
+
+    /**
+     * Main method to run test from the command line.
+     * @author Shane Curcuru
+     * <p>Test subclasses <b>must</b> override, obviously.
+     * Only provided here for debugging.</p>
+     *
+     * @param args command line arguments
+     */
+    public static void main(String[] args)
+    {
+        FileBasedTest app = new FileBasedTest();
+        app.doMain(args);
+    }
+}  // end of class FileBasedTest
+
diff --git a/test/java/src/org/apache/qetest/FileDatalet.java b/test/java/src/org/apache/qetest/FileDatalet.java
new file mode 100644
index 0000000..0d14155
--- /dev/null
+++ b/test/java/src/org/apache/qetest/FileDatalet.java
@@ -0,0 +1,394 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+/**
+ * Datalet representing set of paths to files: input, output, gold.
+ * 
+ * <p>This is a fairly simplistic Datalet implementation that's 
+ * useful for the many programs where the test requires reading 
+ * an input file, performing an operation with the program, and 
+ * then verifying an output file.</p>
+ *
+ * <p>We normally operate on local path/filenames, since the Java 
+ * SDK's implementation of URLs and File objects is so poor at 
+ * handling proper URI/URL's according to the RFCs.  A potential 
+ * future improvement is to add convenience accessor methods, like 
+ * getInputName() (just the bare filename) etc. but I'm not quite 
+ * convinced we need them yet.</p>
+ * 
+ * @see FileTestlet
+ * @see FileTestletDriver
+ * @see FileDataletManager
+ * @author Shane_Curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class FileDatalet implements Datalet
+{
+    /** Path of the location to get input resources from.  */
+    protected String input = "tests/defaultInput";
+
+    /** Accessor method for input; never null.  */
+    public String getInput() { return input; }
+
+    /** Path to put actual output resources into.  */
+    protected String output = "output/defaultOutput";
+
+    /** Accessor method for output; never null.  */
+    public String getOutput() { return output; }
+
+    /** Path of the location to get gold or reference resources from.  */
+    protected String gold = "gold/defaultGold";
+
+    /** Accessor method for gold; never null.  */
+    public String getGold() { return gold; }
+
+
+    /** 
+     * Worker method to validate the files/dirs we represent.  
+     * 
+     * <p>By default, ensures that the input already exists in some 
+     * format; and attempts to create the output.  If asked to be 
+     * strict, then we will fail if the output cannot be created, 
+     * and we additionally will attempt to create the gold and 
+     * will fail if it can't be created.</p>
+     *
+     * <p>Note that we only attempt to create the gold if asked to 
+     * be strict, since users may simply want to run a 'crash test' 
+     * and get all {@link org.apache.qetest.Logger#AMBG_RESULT AMBG}
+     * results when prototyping new tests.</p>
+     *
+     * @param strict if true, requires that output and gold must 
+     * be created; otherwise they're optional
+     * @return false if input doesn't already exist; true otherwise
+     */
+    public boolean validate(boolean strict)
+    {
+        File f = new File(getInput());
+        if (!f.exists())
+            return false;
+
+        f = new File(getOutput());
+        if (!f.exists())
+        {
+            if (!f.mkdirs())
+            {
+                // Only fail if asked to be strict
+                if (strict)
+                    return false;
+            }
+        }        
+
+        f = new File(getGold());
+        if (!f.exists())
+        {
+            // For gold, only attempt to mkdirs if asked...
+            if (strict)
+            {
+                // ...Only fail here if we can't
+                if (!f.mkdirs())
+                    return false;
+            }
+        }        
+        // If we get here, we're happy either way
+        return true;
+    }
+
+
+    /** 
+     * Generic placeholder for any additional options.  
+     * 
+     * <p>This allows FileDatalets to support additional kinds 
+     * of tests, like performance tests, without having to change 
+     * this data model.  These options can serve as a catch-all 
+     * for any new properties or options or what-not that new 
+     * tests need, without having to change how the most basic 
+     * member variables here work.</p>
+     * <p>Note that while this needs to be a Properties object to 
+     * take advantage of the parent/default behavior in 
+     * getProperty(), this doesn't necessarily mean they can only 
+     * store Strings; however only String-valued items can make 
+     * use of the default properties mechanisim.</p>
+     *
+     * <p>Default is a null object; note that getOptions() will 
+     * never return null, but will create a blank Properties 
+     * block if needed.</p>
+     */
+    protected Properties options = null;
+
+    /** 
+     * Accessor method for optional properties.  
+     * 
+     * Should never return null; if it has no options then 
+     * it will create a blank Properties block to return. 
+     */
+    public Properties getOptions() 
+    { 
+        if (null == options)
+            options = new Properties();
+
+        return options;
+    }
+
+    /** 
+     * Accessor method for optional properties; settable.  
+     * <p>Note this method creates a new Properties that simply 
+     * defaults to the passed in properties instead of cloning it.</p>
+     * <p>This used to simply assign this variable to the passed 
+     * in variable, but that leads to problems when errant 
+     * Testlets mutate their Datalet's Options, which can result 
+     * in the master test's testProps getting changed.</p>
+     *
+     * @param p Properties to set as our defaults; if null, we 
+     * do not change anything
+     */
+    public void setOptions(Properties p) 
+    { 
+        if (null != p)
+            options = new Properties(p);
+    }
+
+
+    /** 
+     * Accessor method for optional properties that are ints.  
+     * Convenience method to take care of parse/cast to int. 
+     *
+     * @param name of property to try to get
+     * @param defValue value if property not available
+     * @return integer value of property, or the default
+     */
+    public int getIntOption(String name, int defValue)
+    {
+        if (null == options)
+            return defValue;
+            
+        try
+        {
+            return Integer.parseInt(options.getProperty(name));
+        }
+        catch (Exception e) 
+        {
+            return defValue;
+        }
+    }
+
+
+    /** Description of what this Datalet tests.  */
+    protected String description = "FileDatalet: default description";
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @return String describing the specific set of data 
+     * this Datalet contains (can often be used as the description
+     * of any check() calls made from the Testlet).
+     */
+    public String getDescription()
+    {
+        return description;
+    }
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @param s description to use for this Datalet.
+     */
+    public void setDescription(String s)
+    {
+        description = s;
+    }
+
+
+    /**
+     * Worker method to auto-set the description of this Datalet.  
+     * Conglomeration of input, output, gold values.
+     */
+    protected void setDescription()
+    {
+        setDescription("input=" + input 
+                       + " output=" + output 
+                       + " gold=" + gold); 
+    }
+
+
+    /**
+     * No argument constructor is a no-op; not very useful.  
+     */
+    public FileDatalet() { /* no-op */ }
+
+
+    /**
+     * Initialize this datalet from another FileDatalet which 
+     * serves as a 'base' location, and a filename.  
+     * 
+     * <p>We set each of our input, output, gold to be concatenations 
+     * of the base + File.separator + fileName, and also copy 
+     * over the options from the base.  Note we always attempt to 
+     * deal with local path/filename conventions.</p>
+     *
+     * @param base FileDatalet object to serve as base directories
+     * @param fileName to concatenate for each of input/output/gold
+     */
+    public FileDatalet(FileDatalet base, String fileName)
+    {
+        if ((null == base) || (null == fileName))
+            throw new IllegalArgumentException("FileDatalet(base, fileName) called with null base!");
+
+        StringBuffer buf = new StringBuffer(File.separator + fileName);
+        input = base.getInput() + buf;
+        output = base.getOutput() + buf;
+        gold = base.getGold() + buf;
+        setOptions(base.getOptions());
+        
+        setDescription(); 
+    }
+
+
+    /**
+     * Initialize this datalet from a list of paths.
+     *
+     * <p>Our options are not initialized, and left as null.<p>
+     * 
+     * @param i path for input
+     * @param o path for output
+     * @param g path for gold
+     */
+    public FileDatalet(String i, String o, String g)
+    {
+        input = i;
+        output = o;
+        gold = g;
+        
+        setDescription(); 
+    }
+
+
+    /**
+     * Initialize this datalet from a string and defaults.
+     *
+     * <p>Our options are created as a new Properties block that 
+     * defaults to the existing one passed in, then 
+     * we parse the string for input, output, gold, and 
+     * optionally add additional args to the options.</p>
+     * 
+     * @param args command line to initialize from
+     * @param defaults for our options
+     */
+    public FileDatalet(String args, Properties defaults)
+    {
+        options = new Properties(defaults);
+
+        StringTokenizer st = new StringTokenizer(args);
+
+        // Fill in as many items as we can; leave as default otherwise
+        // Note that order is important!
+        if (st.hasMoreTokens())
+        {
+            input = st.nextToken();
+            if (st.hasMoreTokens())
+            {
+                output = st.nextToken();
+                if (st.hasMoreTokens())
+                {
+                    gold = st.nextToken();
+                }
+            }
+        }
+        // EXPERIMENTAL add extra name value pairs to our options
+        while (st.hasMoreTokens())
+        {
+            String name = st.nextToken();
+            if (st.hasMoreTokens())
+            {
+                options.put(name, st.nextToken());
+            }
+            else
+            {
+                // Just put it as 'true' for boolean options
+                options.put(name, "true");
+            }
+        }
+    }
+
+
+    /**
+     * Load fields of this Datalet from a Hashtable.  
+     * Caller must provide data for all of our fields.
+     * Additionally, we set all values from the hash into 
+     * our options block.
+     * 
+     * @param Hashtable to load
+     */
+    public void load(Hashtable h)
+    {
+        if (null == h)
+            return; //@todo should this have a return val or exception?
+
+        input = (String)h.get("input");
+        output = (String)h.get("output");
+        gold = (String)h.get("gold");
+
+        // Also copy over all items in hash to options
+        options = new Properties();
+        for (Enumeration keys = h.keys(); 
+             keys.hasMoreElements(); 
+             /* no increment portion */)
+        {
+            String key = (String)keys.nextElement();
+            options.put(key, h.get(key));
+        }
+    }
+
+
+    /**
+     * Load fields of this Datalet from an array.  
+     * Order: input, output, gold.  Options are left null.
+     * If too few args, then fields at end of list are left at default value.
+     * @param args array of Strings
+     */
+    public void load(String[] args)
+    {
+        if (null == args)
+            return; //@todo should this have a return val or exception?
+
+        try
+        {
+            input = args[0];
+            output = args[1];
+            gold = args[2];
+        }
+        catch (ArrayIndexOutOfBoundsException  aioobe)
+        {
+            // No-op, leave remaining items as default
+        }
+    }
+
+}  // end of class FileDatalet
+
diff --git a/test/java/src/org/apache/qetest/FileDataletManager.java b/test/java/src/org/apache/qetest/FileDataletManager.java
new file mode 100644
index 0000000..514534e
--- /dev/null
+++ b/test/java/src/org/apache/qetest/FileDataletManager.java
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Vector;
+
+/**
+ * Simple services for getting lists of FileDatalets.
+ * 
+ * <p>Provides static worker methods for reading 
+ * {@link FileTestletDriver#OPT_FILELIST -fileList} lists 
+ * of input/output/gold files and creating lists of 
+ * corresponding FileDatalets from them.  We provide the logic 
+ * for reading the actual fileList line-by-line; the 
+ * {@link FileDatalet} class provides the logic for initializing 
+ * itself from a line of text.</p>
+ *
+ * @see FileTestletDriver
+ * @see FileDatalet
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public abstract class FileDataletManager // provide static services only
+{
+
+    /** '#' character, comment char in qetest fileList.  */
+    public static final String QETEST_COMMENT_CHAR = "#";
+
+
+    /**
+     * Read in a file specifying a list of files to test.  
+     *
+     * <p>File format is fixed to be a qetest-style fileList; 
+     * optional worker methods may allow other formats.  
+     * Essentially we simply read the file line-by-line and 
+     * create a FileDatalet from each line.</p>
+     *
+     * @param logger to report problems to
+     * @param fileName String; name of the file
+     * @param desc description; caller's copy changed
+     * @param defaults default properties to potentially add to each datalet
+     * @return Vector of FileDatalets; null if error
+     */
+    public static Vector readFileList(Logger logger, String fileName, 
+            String desc, Properties defaults)
+    {
+        // Verify the file is there
+        File f = new File(fileName);
+        if (!f.exists())
+        {
+            logger.logMsg(Logger.ERRORMSG, "readFileList: " + fileName  
+                          + " does not exist!");
+            return null;
+        }
+
+        BufferedReader br = null;
+        String line = null;
+        try
+        {
+            br = new BufferedReader(new FileReader(f));
+            line = br.readLine(); // read just first line
+        }
+        catch (IOException ioe)
+        {
+            logger.logMsg(Logger.ERRORMSG, "readFileList: " + fileName 
+                          + " threw: " + ioe.toString());
+            return null;
+        }
+
+        // Verify the first line
+        if (line == null)
+        {
+            logger.logMsg(Logger.ERRORMSG, "readFileList: " + fileName
+                          + " appears to be blank!");
+            return null;
+        }
+
+        // Determine which kind of fileList this is
+        Vector vec = null;
+        if (line.startsWith(QETEST_COMMENT_CHAR))
+        {
+            // This is a native qetest style file
+            vec = readQetestFileList(logger, br, line, fileName, desc, defaults);
+        }
+        else
+        {
+            //@todo: add a worker method that allows users to plug 
+            //  in their own fileList reader that creates Datalets
+            logger.logMsg(Logger.WARNINGMSG, "readFileList: " + fileName
+                          + " could not determine file type; assuming qetest!");
+            vec = readQetestFileList(logger, br, line, fileName, desc, defaults);
+        }
+
+        if ((null == vec) 
+            || (vec.size() == 0))
+        {
+            logger.logMsg(Logger.ERRORMSG, "readFileList: " + fileName
+                          + " did not have any non-comment lines!");
+            // Explicitly return null so caller knows we had error
+            return null;
+        }
+        return vec;
+    }
+    
+
+    /**
+     * Read in a qetest fileList specifying a list of files to test.
+     *
+     * <p>File format is pretty simple:</p>
+     * <ul>
+     * <li># first line of comments is copied into desc</li>
+     * <li># beginning a line is a comment</li>
+     * <li># rest of lines are whitespace delimited filenames and options</li>
+     * <li>inputName outName goldName [options...]</li>
+     * <li><b>Note:</b> see {@link FileDatalet} for
+     * details on how the file lines are parsed!</li>
+     * </ul>
+     *
+     * @param logger to report problems to
+     * @param br BufferedReader to read from
+     * @param firstLine already read from br
+     * @param fileName String; name of the file
+     * @param desc to use of this file
+     * @param defaults default properties to potentially add to each datalet
+     * @return Vector of FileDatalets, or null if error
+     */
+    protected static Vector readQetestFileList(Logger logger, BufferedReader br, 
+                                               String firstLine, String fileName, 
+                                               String desc, Properties defaults)
+    {
+        final String ABSOLUTE = "absolute";
+        final String RELATIVE = "relative";
+
+        Vector vec = new Vector();
+        String line = firstLine;
+        // Check if the first line is a comment 
+        if (line.startsWith(QETEST_COMMENT_CHAR))
+        {
+            // Save it as the description
+            desc = line;
+            // Parse the next line
+            try
+            {
+                line = br.readLine();
+            } 
+            catch (IOException ioe)
+            {
+                logger.logMsg(Logger.ERRORMSG, "readQetestFileList-desc: " 
+                              + fileName + " threw: " + ioe.toString());
+                return null;
+            }
+        }
+
+        // Load each line into a FileDatalet
+        for (;;)
+        {
+            // Skip any lines beginning with # comment char or that are blank
+            if ((!line.startsWith(QETEST_COMMENT_CHAR)) && (line.length() > 0))
+            {
+                // Create a Datalet and initialize with the line's 
+                //  contents and default properties
+                FileDatalet d = new FileDatalet(line, defaults);
+
+                // Also pass over the global runId, if set
+                //@todo this should be standardized and removed; 
+                //  or at least have global constants for it
+                d.getOptions().put("runId", defaults.getProperty("runId"));
+
+                // Add it to our vector
+                vec.addElement(d);
+            }
+
+            // Read next line and loop
+            try
+            {
+                line = br.readLine();
+            }
+            catch (IOException ioe2)
+            {
+                // Just force us out of the loop; if we've already 
+                //  read part of the file, fine
+                logger.logMsg(Logger.WARNINGMSG, "readQetestFileList-body: " 
+                              + fileName + " threw: " + ioe2.toString());
+                break;
+            }
+
+            if (line == null)
+                break;
+        } // end of for (;;)
+
+        // Return our Vector of created datalets
+        return vec;
+    }
+
+}
diff --git a/test/java/src/org/apache/qetest/FilePatternFilter.java b/test/java/src/org/apache/qetest/FilePatternFilter.java
new file mode 100644
index 0000000..d674ec3
--- /dev/null
+++ b/test/java/src/org/apache/qetest/FilePatternFilter.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest;
+
+import java.io.File;
+
+/**
+ * FilenameFilter supporting includes/excludes returning files
+ * that match a specified pattern.
+ *
+ * <p>Returns files of *ext that match our includes/excludes.</p>
+ *
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class FilePatternFilter extends IncludeExcludeFilter
+{
+
+    /**
+     * Initialize with some include(s)/exclude(s) and a pattern.  
+     *
+     * @param inc semicolon-delimited string of inclusion name(s)
+     * @param exc semicolon-delimited string of exclusion name(s)
+     * @param glob simple pattern to look for
+     */
+    public FilePatternFilter(String inc, String exc, String glob)
+    {
+        setIncludes(inc);
+        setExcludes(exc);
+        setPattern(glob);
+        setUseIncludesOnly(false);
+    }
+
+    /**
+     * Simple globbing char for pattern is "*".  
+     */
+    public static final String GLOB_CHAR = "*";
+
+    /**
+     * Simple starting pattern to include.  
+     */
+    private String startPattern = "";
+
+    /**
+     * Simple ending pattern to include.  
+     */
+    private String endPattern = "";
+
+    /**
+     * Accessor method to set file pattern we're looking for.  
+     *
+     * @param glob file pattern we're looking for; if null, we 
+     * set it to a blank string
+     */
+    public void setPattern(String glob)
+    {
+        if (null != glob)
+        {
+            int idx = glob.indexOf(GLOB_CHAR);
+            if (idx > -1)
+            {
+                startPattern = glob.substring(0, idx);
+                endPattern = glob.substring(idx + 1, glob.length());
+            }
+            else
+            {
+                // Derivitave case: no glob char, so exact match 
+                //  only - you might as well use includes
+                startPattern = glob;
+                endPattern = null; //special case
+            }
+        }
+        else
+        {
+            // A blank string matches either
+            startPattern = "";
+            endPattern = "";
+        }
+    }
+
+    /**
+     * Return files that match our pattern.
+     *
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if it's a file that has our pattern.
+    */
+    public boolean acceptOverride(File dir, String name)
+    {
+        // Only return files...
+        if (!(new File(dir, name)).isFile())
+            return false;
+
+        if (null != endPattern)
+        {
+            return name.startsWith(startPattern)
+                   && name.endsWith(endPattern);
+        }
+        else
+        {
+            // Derivitave case: no glob char, so exact match 
+            //  only - you might as well use includes
+            return name.equals(startPattern);
+        }
+    }
+}
diff --git a/test/java/src/org/apache/qetest/FileTestlet.java b/test/java/src/org/apache/qetest/FileTestlet.java
new file mode 100644
index 0000000..0441b36
--- /dev/null
+++ b/test/java/src/org/apache/qetest/FileTestlet.java
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.File;
+
+/**
+ * Testlet superclass for testing URI or file based resources.
+ *
+ * This class is broken up into common worker methods to make 
+ * subclassing easier for alternate testing algoritims.  
+ * Individual subclasses may be implemented to test various 
+ * programs that somehow can be tested by taking an input file 
+ * and processing it, creating an output file, and then comparing 
+ * the output to a known good gold file.
+ *
+ * @author Shane_Curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class FileTestlet extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.FileTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new FileDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String describing what this FileTestlet does.
+     */
+    public String getDescription()
+    {
+        return "FileTestlet";
+    }
+
+
+    /**
+     * Run this FileTestlet: execute it's test and return.
+     *
+     * Calls various worker methods to perform the basic steps of:
+     * initDatalet, testDatalet, checkDatalet;  
+     * catch... {handleException}
+     *
+     * @param Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Ensure we have the correct kind of datalet
+        FileDatalet datalet = null;
+        try
+        {
+            datalet = (FileDatalet)d;
+        }
+        catch (ClassCastException e)
+        {
+            logger.checkErr("Datalet provided is not a FileDatalet; cannot continue with " + d);
+            return;
+        }
+
+        // Perform any general setup needed...
+        if (!initDatalet(datalet))
+            return;
+            
+        try
+        {
+            // Perform the operation on the product under test..
+            testDatalet(datalet);
+
+            // ...and compare with gold data
+            checkDatalet(datalet);
+        }
+        // Handle any exceptions from the testing
+        catch (Throwable t)
+        {
+            handleException(datalet, t);
+            return;
+        }
+	}
+
+
+    /** 
+     * Worker method to perform any initialization needed.  
+     *
+     * Subclasses might pre-verify the existence of the input and 
+     * gold files or delete any pre-existing outputs in the 
+     * datalet before testing.
+     *
+     * @param datalet to test with
+     * @return true if OK, false if test should be aborted; if 
+     * false, this method must log a fail or error
+     */
+    protected boolean initDatalet(FileDatalet datalet)
+    {
+        //@todo validate our Datalet - ensure it has valid 
+        //  and/or existing files available.
+
+        // Cleanup outName only if asked to - delete the file on disk
+        // Optimization: this takes extra time and often is not 
+        //  needed, so only do this if the option is set
+        if ("true".equalsIgnoreCase(datalet.getOptions().getProperty("deleteOutFile")))
+        {
+            String output = datalet.getOutput();
+            try
+            {
+                boolean btmp = (new File(output)).delete();
+                logger.logMsg(logger.TRACEMSG, "initDatalet delete: " + output
+                                     + " status: " + btmp);
+            }
+            catch (SecurityException se)
+            {
+                logger.logMsg(logger.WARNINGMSG, "initDatalet delete: " + output
+                                       + " threw: " + se.toString());
+            }
+        }
+        return true;
+    }
+
+
+    /** 
+     * Worker method to actually perform the test operation.  
+     *
+     * Subclasses must (obviously) override this.  They should 
+     * perform whatever actions are needed to process the input 
+     * into an output, logging any status along the way.  
+     * Note that validation of the output file is handled later 
+     * in checkDatalet.
+     *
+     * @param datalet to test with
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void testDatalet(FileDatalet datalet)
+            throws Exception
+    {
+        logger.logMsg(Logger.TRACEMSG, getCheckDescription(datalet));
+
+        // Perform the test operation here - you must subclass this!
+    }
+
+
+    /** 
+     * Worker method to validate output resource with gold.  
+     *
+     * Logs out applicable info while validating output file.  
+     * Attempts to use datalet.getOptions.get("fileCheckerImpl")
+     * or datalet.getOptions.getProperty("fileChecker") to get 
+     * a CheckService for the output; if that fails, it uses a 
+     * default QetestFactory.newCheckService().
+     *
+     * @param datalet to test with
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void checkDatalet(FileDatalet datalet)
+            throws Exception
+    {
+        // See if the datalet already has a fileChecker to use...
+        CheckService fileChecker = (CheckService)datalet.getOptions().get("fileCheckerImpl");
+        // ...if not, look for a default classname to use...
+        if (null == fileChecker)
+        {
+            String clazzName = datalet.getOptions().getProperty("fileChecker");
+            if (null != clazzName)
+            {
+                // ...find and create a class of the default classname given
+                Class fClazz = QetestUtils.testClassForName(clazzName, QetestUtils.defaultPackages, null);
+                fileChecker = (CheckService)fClazz.newInstance();
+            }
+            else
+            {
+                //...If all else failed, simply get a default one from the factory
+                fileChecker = QetestFactory.newCheckService(logger, QetestFactory.TYPE_FILES);
+            }
+            // Apply any testing options to the fileChecker
+            fileChecker.applyAttributes(datalet.getOptions());
+            // Note assumption that if we got the fileCheckerImpl 
+            //  directly from the datalet that we do not need to 
+            //  set the Attributes here again
+        }
+
+        int result = fileChecker.check(logger,
+                                 new File(datalet.getOutput()), 
+                                 new File(datalet.getGold()), 
+                                 getCheckDescription(datalet));
+
+        //@todo if needed, we can put additional processing here 
+        //  to output special logging in case of results that are fail                                 
+    }
+
+
+    /** 
+     * Worker method to validate or log exceptions thrown by testDatalet.  
+     *
+     * Provided so subclassing is simpler; our implementation merely 
+     * calls checkErr and logs the exception.
+     *
+     * @param datalet to test with
+     * @param e Throwable that was thrown
+     */
+    protected void handleException(FileDatalet datalet, Throwable t)
+    {
+        // Put the logThrowable first, so it appears before 
+        //  the Fail record, and gets color-coded
+        logger.logThrowable(Logger.ERRORMSG, t, getCheckDescription(datalet) + " threw");
+        logger.checkErr(getCheckDescription(datalet) 
+                         + " threw: " + t.toString());
+    }
+
+
+    /** 
+     * Worker method to construct a description.  
+     *
+     * Simply concatenates useful info to override getDescription().
+     *
+     * @param datalet to test with
+     * @return simple concatenation of our desc and datalet's desc
+     */
+    protected String getCheckDescription(FileDatalet datalet)
+    {
+        return getDescription() 
+                + ": "
+                + datalet.getDescription();
+    }
+}  // end of class FileTestlet
+
diff --git a/test/java/src/org/apache/qetest/FileTestletDriver.java b/test/java/src/org/apache/qetest/FileTestletDriver.java
new file mode 100644
index 0000000..6274a4c
--- /dev/null
+++ b/test/java/src/org/apache/qetest/FileTestletDriver.java
@@ -0,0 +1,758 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.lang.reflect.Constructor;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.Vector;
+
+/**
+ * Generic Test driver for FileTestlets.
+ * 
+ * <p>This driver provides basic services for iterating over a tree 
+ * of test files and executing a specified testlet on each test that 
+ * is selected by a set of specified filters.  It automatically handles 
+ * iteration and optional recursion down the tree, and by default 
+ * assumes there are three 'matching' trees for inputs, golds, and 
+ * creates a tree for outputs.</p>
+ *
+ * <p>Key methods are separated into worker methods so subclasses can 
+ * override just the parts of the algorithm they need to change.</p>
+ *
+ * <p>//@todo move and refactor XSLProcessorTestBase to 
+ * be more generic and reduce dependencies; also reduce dependency 
+ * on internal variables and instead always use lookups into 
+ * our testProps object.</p>
+ * 
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class FileTestletDriver extends FileBasedTest /// extends XSLProcessorTestBase
+{
+
+    //-----------------------------------------------------
+    //-------- Constants for common input params --------
+    //-----------------------------------------------------
+
+    /**
+     * Parameter: Run a specific list of files, instead of 
+     * iterating over directories.  
+     * <p>Default: null, do normal iteration.</p>
+     */
+    public static final String OPT_FILELIST = "fileList";
+
+    /**
+     * Parameter: FQCN or simple classname of Testlet to use.  
+     * <p>User may pass in either a FQCN or just a base classname, 
+     * and we will attempt to look it up in any of the most common 
+     * Xalan-testing packages.  See QetestUtils.testClassForName().</p>
+     * <p>Default: null, use StylesheetTestlet.</p>
+     */
+    public static final String OPT_TESTLET = "testlet";
+
+    /** Classname of Testlet to use.   */
+    protected String testlet = null;
+
+    /**
+     * Parameter: FQCN or simple classname of FilenameFilter for 
+     * directories under testDir we will process.  
+     * If fileList is not set, we simply go to our inputDir, and 
+     * then use this filter to iterate through directories returned.
+     * <p>Default: null, use ConformanceDirRules.</p>
+     */
+    public static final String OPT_DIRFILTER = "dirFilter";
+
+    /** Classname of FilenameFilter to use for dirs.  */
+    protected String dirFilter = null;
+
+    /**
+     * Parameter: FQCN or simple classname of FilenameFilter for 
+     * files within subdirs we will process.  
+     * If fileList is not set, we simply go through all directories 
+     * specified by directoryFilter, and then use this filter to 
+     * find all stylesheet test files in that directory to test.
+     * Note that this does <b>not</b> handle embedded tests, where 
+     * the XML document has an xml-stylesheet PI that defines the 
+     * stylesheet to use to process it.
+     * <p>Default: null, use ConformanceFileRules.</p>
+     */
+    public static final String OPT_FILEFILTER = "fileFilter";
+
+    /** Classname of FilenameFilter to use for files.  */
+    protected String fileFilter = null;
+
+    /** Unique runId for each specific invocation of this test driver.  */
+    protected String runId = null;
+
+    /** Convenience constant: .gold extension for gold files.  */
+    public static final String GLD_EXTENSION = ".gld";
+
+    /** Convenience constant: .out extension for output result file.  */
+    public static final String OUT_EXTENSION = ".out";
+
+
+    /** Just initialize test name, comment; numTestCases is not used. */
+    public FileTestletDriver()
+    {
+        testName = "FileTestletDriver";
+        testComment = "Test driver for File-based Testlets";
+    }
+
+
+    /**
+     * Initialize this test - fill in parameters.
+     * Simply fills in convenience variables from user parameters.
+     *
+     * @param p unused
+     * @return true
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Copy any of our parameters from testProps to 
+        //  our local convenience variables
+        testlet = testProps.getProperty(OPT_TESTLET, testlet);
+        dirFilter = testProps.getProperty(OPT_DIRFILTER, dirFilter);
+        fileFilter = testProps.getProperty(OPT_FILEFILTER, fileFilter);
+
+        // Grab a unique runid for logging out with our tests 
+        //  Used in results reporting stylesheets to differentiate 
+        //  between different test runs
+        runId = QetestUtils.createRunId(testProps.getProperty("runId"));
+        testProps.put("runId", runId);  // put back in the properties 
+                                        // for later use
+        return true;
+    }
+
+
+    /**
+     * Run through the directory given to us and run tests found
+     * in subdirs; or run through our fileList.
+     *
+     * This method logs some basic runtime data (like the actual 
+     * testlet and ProcessorWrapper implementations used) and 
+     * then decides to either run a user-specified fileList or to 
+     * use our dirFilter to iterate over the inputDir.
+     *
+     * @param p Properties block of options to use - unused
+     * @return true if OK, false if we should abort
+     */
+    public boolean runTestCases(Properties p)
+    {
+        // First log out any other runtime information, like the 
+        //  actual current testlet and filters
+        try
+        {
+            // Note that each of these calls actually force the 
+            //  creation of an actual object of each type: this is 
+            //  required since we may default the types or our call 
+            //  to QetestUtils.testClassForName() may return a 
+            //  different classname than the user actually specified
+            // Care should be taken that the construction of objects 
+            //  here does not affect our testing later on
+            Properties runtimeProps = new Properties();
+            // ... and add a few extra things ourselves
+            runtimeProps.put("actual.testlet", getTestlet());
+            runtimeProps.put("actual.dirFilter", getDirFilter());
+            runtimeProps.put("actual.fileFilter", getFileFilter());
+            reporter.logHashtable(Logger.CRITICALMSG, runtimeProps, 
+                                  "actual.runtime information");
+        }
+        catch (Exception e)
+        {
+            // This is not necessarily an error
+            reporter.logThrowable(Logger.WARNINGMSG, e, "Logging actual.runtime threw");
+        }
+
+        // Now either run a list of specific tests the user specified, 
+        //  or do the default of iterating over a set of directories
+        String fileList = testProps.getProperty(OPT_FILELIST);
+        if (null != fileList)
+        {
+            // Process the specific list of tests the user supplied
+            String desc = "User-supplied fileList: " + fileList; // provide default value
+            // Use static worker class to process the list
+            Vector datalets = FileDataletManager.readFileList(reporter, fileList, desc, testProps);
+
+            // Actually process the specified files in a testCase
+            processFileList(datalets, desc);
+        }
+        else
+        {
+            // Do the default, which is to iterate over the inputDir
+            // Note that this calls the testCaseInit/testCaseClose
+            //  logging methods itself
+            processInputDir();
+        }
+        return true;
+    }
+
+
+    /**
+     * Do the default: test all files found in subdirs
+     * of our inputDir, using FilenameFilters for dirs and files.
+     * Parameters: none, uses our internal members inputDir, 
+     * outputDir, goldDir, etc.  Will attempt to use a default 
+     * inputDir if the specified one doesn't exist.
+     *
+     * This is a special case of recurseSubDir, since we report 
+     * differently from the top level.
+     */
+    public void processInputDir()
+    {
+        // Ensure the inputDir is there - we must have a valid location for input files
+        File topInputDir = new File(inputDir);
+
+        if (!topInputDir.exists())
+        {
+            // Try a default inputDir
+            String oldInputDir = inputDir; // cache for potential error message
+            topInputDir = new File((inputDir = getDefaultInputDir()));
+            if (!topInputDir.exists())
+            {
+                // No inputDir, can't do any tests!
+                // Note we put this in a fake testCase, since this
+                //  is likely the only thing our test reports
+                reporter.testCaseInit("processInputDir - mock testcase");
+                reporter.checkErr("topInputDir(" + oldInputDir
+                                  + ", or " + inputDir + ") does not exist, aborting!");
+                reporter.testCaseClose();
+                return;
+            }
+        }
+
+        FileDatalet topDirs = new FileDatalet(topInputDir.getPath(), outputDir, goldDir);
+
+        // Optionally process this topDirs, and always recurse at 
+        //  least one level below it
+        recurseSubDir(topDirs, getProcessTopDir(), true);
+    }
+
+
+    /**
+     * Optionally process all the files in this dir and optionally 
+     * recurse downwards using our dirFilter.
+     * 
+     * This is a pre-order traversal; we process files in this 
+     * dir first and then optionally recurse.
+     *
+     * @param base FileDatalet representing the input, output, 
+     * gold directory triplet we should use
+     * @param process if we should call processSubDir on this dir
+     * @param recurse if we should recurse below this directory, 
+     * or just stop here after processSubDir()
+     */
+    public void recurseSubDir(FileDatalet base, boolean process, boolean recurse)
+    {
+        // Process this directory first: pre-order traversal
+        if (process)
+            processSubDir(base);
+
+        if (!recurse)
+            return;
+
+        // If we should recurse, do so now
+        File inputDir = new File(base.getInput());
+        FilenameFilter filter = getDirFilter();
+        reporter.logTraceMsg("recurseSubDir(" + inputDir.getPath()
+                            + ") looking for subdirs with: " + filter);
+
+        // Use our filter to get a list of directories to process
+        String subdirs[] = inputDir.list(filter);
+
+        // Validate that we have some valid directories to process
+        if ((null == subdirs) || (subdirs.length <= 0))
+        {
+            reporter.logWarningMsg("recurseSubDir(" + inputDir.getPath()
+                               + ") no valid subdirs found!");
+            return;
+        }
+
+        // For every subdirectory, check if we should run tests in it
+        for (int i = 0; i < subdirs.length; i++)
+        {
+            File subTestDir = new File(inputDir, subdirs[i]);
+
+            if ((null == subTestDir) || (!subTestDir.exists()))
+            {
+                // Just log it and continue; presumably we'll find 
+                //  other directories to test
+                reporter.logWarningMsg("subTestDir(" + subTestDir.getPath() 
+                                       + ") does not exist, skipping!");
+                continue;
+            }
+            FileDatalet subdir = new FileDatalet(base, subdirs[i]);
+
+            // Process each other directory, and optionally continue 
+            //  to recurse downwards
+            recurseSubDir(subdir, true, getRecurseDirs());
+        } // end of for...
+    }
+
+
+    /**
+     * Process a single subdirectory and run our testlet over 
+     * every file found by our fileFilter therein.
+     *
+     * @param base FileDatalet representing the input, output, 
+     * gold directory triplet we should use
+     */
+    public void processSubDir(FileDatalet base)
+    {
+        // Validate that each of the specified dirs exists
+        // Ask it to be strict in ensuring output, gold are created
+        if (!base.validate(true))
+        {
+            // Just log it and continue; presumably we'll find 
+            //  other directories to test
+            reporter.logWarningMsg("processSubDir(" + base.getInput() 
+                                   + ", " + base.getOutput()
+                                   + ", " + base.getGold()
+                                   + ") some dir does not exist, skipping!");
+            return;
+        }
+
+        File subInputDir = new File(base.getInput());
+        // Call worker method to process the individual directory
+        //  and get a list of .xsl files to test
+        Vector files = getFilesFromDir(subInputDir, getFileFilter());
+
+        if ((null == files) || (0 == files.size()))
+        {
+            reporter.logStatusMsg("processSubDir(" + base.getInput() 
+                                   + ") no files found(1), skipping!");
+            return;
+        }
+
+        // 'Transform' the list of individual test files into a 
+        //  list of Datalets with all fields filled in
+        //@todo should getFilesFromDir and buildDatalets be combined?
+        Vector datalets = buildDatalets(files, base);
+
+        if ((null == datalets) || (0 == datalets.size()))
+        {
+            reporter.logWarningMsg("processSubDir(" + base.getInput() 
+                                   + ") no tests found(2), skipping!");
+            return;
+        }
+
+        // Now process the list of files found in this dir
+        processFileList(datalets, "Testing subdir: " + base.getInput());
+    }
+
+
+    /**
+     * Run a list of stylesheet tests through a Testlet.
+     * The file names are assumed to be fully specified, and we assume
+     * the corresponding directories exist.
+     * Each fileList is turned into a testcase.
+     *
+     * @param vector of Datalet objects to pass in
+     * @param desc String to use as testCase description
+     */
+    public void processFileList(Vector datalets, String desc)
+    {
+        // Validate arguments
+        if ((null == datalets) || (0 == datalets.size()))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.checkErr("processFileList: Testlet or datalets are null/blank, nothing to test!");
+            return;
+        }
+
+        // Put each fileList into a testCase
+        reporter.testCaseInit(desc);
+
+        // Now just go through the list and process each set
+        int numDatalets = datalets.size();
+        reporter.logInfoMsg("processFileList() with " + numDatalets
+                            + " potential tests");
+        // Iterate over every datalet and test it
+        for (int ctr = 0; ctr < numDatalets; ctr++)
+        {
+            try
+            {
+                // Create a Testlet to execute a test with this 
+                //  next datalet - the Testlet will log all info 
+                //  about the test, including calling check*()
+                getTestlet().execute((Datalet)datalets.elementAt(ctr));
+            } 
+            catch (Throwable t)
+            {
+                // Log any exceptions as fails and keep going
+                reporter.logThrowable(Logger.ERRORMSG, t, "Datalet threw");
+                reporter.checkErr("Datalet num " + ctr + " threw: " + t.toString());
+            }
+        }  // of while...
+        reporter.testCaseClose();
+    }
+
+
+    /**
+     * Use the supplied filter on given directory to return a list 
+     * of tests to be run.
+     * 
+     * The real logic is in the filter, which can be specified as 
+     * an option or by overriding getDefaultFileFilter().
+     *
+     * @param dir directory to scan
+     * @param filter to use on this directory; if null, uses default
+     * @return Vector of local path\filenames of tests to run;
+     * the tests themselves will exist; null if error
+     */
+    public Vector getFilesFromDir(File dir, FilenameFilter filter)
+    {
+        // Validate arguments
+        if ((null == dir) || (!dir.exists()))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.logWarningMsg("getFilesFromDir(" + dir.toString() + ") dir null or does not exist");
+            return null;
+        }
+        // Get the list of 'normal' test files
+        String[] files = dir.list(filter);
+        Vector v = new Vector(files.length);
+        for (int i = 0; i < files.length; i++)
+        {
+            v.addElement(files[i]);
+        }
+        reporter.logTraceMsg("getFilesFromDir(" + dir.toString() + ") found " + v.size() + " total files to test");
+        return v;
+    }
+
+
+    /**
+     * Transform a vector of individual test names into a Vector 
+     * of filled-in datalets to be tested
+     *
+     * This basically just calculates local path\filenames across 
+     * the three presumably-parallel directory trees of  
+     * inputDir, outputDir and goldDir.  
+     * It then stuffs each of these values plus some 
+     * generic info like our testProps into each datalet it creates.
+     * 
+     * @param files Vector of local path\filenames to be tested
+     * @param base FileDatalet denoting directories 
+     * input, output, gold
+     * @return Vector of FileDatalets that are fully filled in,
+     * i.e. output, gold, etc are filled in respectively 
+     * to input
+     */
+    public Vector buildDatalets(Vector files, FileDatalet base)
+    {
+        // Validate arguments
+        if ((null == files) || (files.size() < 1))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.logWarningMsg("buildDatalets null or empty file vector");
+            return null;
+        }
+        Vector v = new Vector(files.size());
+
+        // For every file in the vector, construct the matching 
+        //  out, gold, and xml/xsl files
+        for (Enumeration elements = files.elements();
+                elements.hasMoreElements(); /* no increment portion */ )
+        {
+            String file = null;
+            try
+            {
+                file = (String)elements.nextElement();
+            }
+            catch (ClassCastException cce)
+            {
+                // Just skip this entry
+                reporter.logWarningMsg("Bad file element found, skipping: " + cce.toString());
+                continue;
+            }
+            v.addElement(buildDatalet(base, file));
+        }
+        return v;
+    }
+
+    /**
+     * Construct a FileDatalet with corresponding output, gold files.  
+     *
+     * This basically just calls worker methods to construct and 
+     * set options on a datalet to return.
+     *
+     * @param base FileDatalet denoting directories 
+     * input, output, gold
+     * @param name bare name of the input file
+     * @return FileDatalet that is fully filled in,
+     * i.e. output, gold, etc are filled in respectively 
+     * to input and any options are set
+     */
+    protected FileDatalet buildDatalet(FileDatalet base, String name)
+    {
+        // Worker method to construct paths
+        FileDatalet d = buildDataletPaths(base, name);
+        // Worker method to set any other options, etc.
+        setDataletOptions(d);
+        return d;
+    }
+
+    /**
+     * Construct a FileDatalet with corresponding output, gold files.  
+     *
+     * This worker method just has the logic to construct the 
+     * corresponding output and gold filenames; feel free to subclass.
+     *
+     * This class simply appends .out and .gld to the end of the 
+     * existing names: foo.xml: foo.xml.out, foo.xml.gld.
+     *
+     * @param base FileDatalet denoting directories 
+     * input, output, gold
+     * @param name bare name of the input file
+     * @return FileDatalet that is fully filled in,
+     * i.e. output, gold, etc are filled in respectively 
+     * to input
+     */
+    protected FileDatalet buildDataletPaths(FileDatalet base, String name)
+    {
+        return new FileDatalet(base.getInput() + File.separator + name, 
+                base.getOutput() + File.separator + name + OUT_EXTENSION,
+                base.getGold() + File.separator + name + GLD_EXTENSION);
+    }
+
+    /**
+     * Fillin FileDatalet.setOptions and any other processing.  
+     *
+     * This is designed to be overriden so subclasses can put any 
+     * special items in the datalet's options or do other 
+     * preprocessing of the datalet.
+     *
+     * @param base FileDatalet to apply options, etc. to
+     */
+    protected void setDataletOptions(FileDatalet base)
+    {
+        base.setDescription(base.getInput());
+        // Optimization: put in a copy of our fileChecker, so 
+        //  that each testlet doesn't have to create it's own
+        //  fileCheckers should not store state, so this 
+        //  shouldn't affect the testing at all
+        base.setOptions(testProps);
+        // Note: set our options in the datalet first, then 
+        //  put the fileChecker directly into their options
+        base.getOptions().put("fileCheckerImpl", fileChecker);
+    }
+
+    /** If we should process the top level directory (default:false).   */
+    protected boolean getProcessTopDir()
+    { return false; }
+
+    /** If we should always recurse lower level directories (default:false).   */
+    protected boolean getRecurseDirs()
+    { return false; }
+
+    /** Default FilenameFilter FQCN for directories.   */
+    protected String getDefaultDirFilter()
+    { return "org.apache.qetest.DirFilter"; }
+
+    /** Default FilenameFilter FQCN for files.   */
+    protected String getDefaultFileFilter()
+    { return "org.apache.qetest.FilePatternFilter"; }
+
+    /** Default Testlet FQCN for executing stylesheet tests.   */
+    protected String getDefaultTestlet()
+    { return "org.apache.qetest.FileTestlet"; }
+
+    /** Default list of packages to search for classes.   */
+    protected String[] getDefaultPackages()
+    { return QetestUtils.defaultPackages; }
+
+    /** Cached Testlet Class; used for life of this test.   */
+    protected Class cachedTestletClazz = null;
+
+    /**
+     * Convenience method to get a Testlet to use.  
+     * Attempts to return one as specified by our testlet parameter, 
+     * otherwise returns a default StylesheetTestlet.
+     * 
+     * @return Testlet for use in this test; null if error
+     */
+    public Testlet getTestlet()
+    {
+        // Find a Testlet class to use if we haven't already
+        if (null == cachedTestletClazz)
+        {
+            cachedTestletClazz = QetestUtils.testClassForName(testlet, 
+                                                              getDefaultPackages(),
+                                                              getDefaultTestlet());
+        }
+        try
+        {
+            // Create it and set our reporter into it
+            Testlet t = (Testlet)cachedTestletClazz.newInstance();
+            t.setLogger((Logger)reporter);
+            return (Testlet)t;
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found! This should be very rare, since 
+            //  we know the defaultTestlet should be found
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to get a default filter for directories.  
+     * Uses category member variable if set.
+     * 
+     * @return FilenameFilter using DirFilter(category, null).
+     */
+    public FilenameFilter getDirFilter()
+    {
+        // Find a FilenameFilter class to use
+        Class clazz = QetestUtils.testClassForName(dirFilter, 
+                                                   getDefaultPackages(),
+                                                   getDefaultDirFilter());
+        try
+        {
+            // Create it, optionally with a category
+            String category = testProps.getProperty(OPT_CATEGORY);
+            if ((null != category) && (category.length() > 1))  // Arbitrary check for non-null, non-blank string
+            {
+                Class[] parameterTypes = 
+                { 
+                    java.lang.String.class, 
+                    java.lang.String.class 
+                };
+                Constructor ctor = clazz.getConstructor(parameterTypes);
+
+                Object[] ctorArgs = 
+                {
+                    category, 
+                    null
+                };
+                return (FilenameFilter)ctor.newInstance(ctorArgs);
+            }
+            else
+            {
+                return (FilenameFilter)clazz.newInstance();
+            }
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found!
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to get a default filter for files.  
+     * Uses excludes member variable if set.
+     * 
+     * @return FilenameFilter using FileExtensionFilter(null, excludes).
+     */
+    public FilenameFilter getFileFilter()
+    {
+        // Find a FilenameFilter class to use
+        Class clazz = QetestUtils.testClassForName(fileFilter, 
+                                                   getDefaultPackages(),
+                                                   getDefaultFileFilter());
+        try
+        {
+            // Create it, optionally with excludes
+            String excludes = testProps.getProperty(OPT_EXCLUDES);
+            if ((null != excludes) && (excludes.length() > 1))  // Arbitrary check for non-null, non-blank string
+            {
+                Class[] parameterTypes = 
+                { 
+                    java.lang.String.class, 
+                    java.lang.String.class 
+                };
+                Constructor ctor = clazz.getConstructor(parameterTypes);
+
+                Object[] ctorArgs = 
+                {
+                    null, 
+                    excludes
+                };
+                return (FilenameFilter)ctor.newInstance(ctorArgs);
+            }
+            else
+            {
+                return (FilenameFilter)clazz.newInstance();
+            }
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found!
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to get a default inputDir when none or
+     * a bad one was given.  
+     * @return String pathname of default inputDir "tests\conf".
+     */
+    public String getDefaultInputDir()
+    {
+        return "tests" + File.separator + "conf";
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Additional options supported by FileTestletDriver:\n"
+                + "    -" + OPT_FILELIST
+                + "   <name of listfile of tests to run>\n"
+                + "    -" + OPT_DIRFILTER
+                + "  <classname of FilenameFilter for dirs>\n"
+                + "    -" + OPT_FILEFILTER
+                + " <classname of FilenameFilter for files>\n"
+                + "    -" + OPT_TESTLET
+                + "    <classname of Testlet to execute tests with>\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        FileTestletDriver app = new FileTestletDriver();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/IncludeExcludeFilter.java b/test/java/src/org/apache/qetest/IncludeExcludeFilter.java
new file mode 100644
index 0000000..5f83bb7
--- /dev/null
+++ b/test/java/src/org/apache/qetest/IncludeExcludeFilter.java
@@ -0,0 +1,288 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+
+/**
+ * Generic FilenameFilter supporting includes/excludes.
+ *
+ * <p>The default behavior is to accept all files, except: 
+ * any name on our excludes list is never accepted; any 
+ * name on our includes list is accepted as long as any subclass 
+ * will accept it as well; and some 
+ * default excludes are never accepted (like "CVS").</p>
+ *
+ * <p>Subclasses can provide custom functionality by overriding 
+ * the acceptOverride(dir, name) method; we call that at the 
+ * appropriate time in handling the includes/excludes.</p>
+ * 
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class IncludeExcludeFilter implements FilenameFilter
+{
+
+    /** Initialize for defaults (not using inclusion list) no-op. */
+    public IncludeExcludeFilter(){}
+
+
+    /**
+     * Initialize with some include(s)/exclude(s).  
+     *
+     * @param inc semicolon-delimited string of inclusion name(s)
+     * @param exc semicolon-delimited string of inclusion name(s)
+     * @param only use inclusion list only: if it's not on the list, 
+     * then don't return it
+     */
+    public IncludeExcludeFilter(String inc, String exc)
+    {
+        setIncludes(inc);
+        setExcludes(exc);
+    }
+
+    /**
+     * If we should only accept files on the includes list, 
+     * or if they should be additional to any acceptOverride().  
+     *
+     * <p>If true, we first exclude any set excludes, then 
+     * we simply return names that match includes.  If false, 
+     * We will return names that match inlcudes <b>or</b> names 
+     * that match acceptOverride()</p>
+     */
+    protected boolean useIncludesOnly = true;
+
+    /**
+     * @return useIncludesOnly value
+     */
+    public boolean getUseIncludesOnly()
+    {
+        return useIncludesOnly;
+    }
+        
+    /**
+     * @param useIncludesOnly value
+     */
+    public void setUseIncludesOnly(boolean use)
+    {
+        useIncludesOnly = use;
+    }
+
+    /**
+     * Hash of base names to include.  
+     *
+     * <p>Keys are names, values in hash are ignored. Note that
+     * names are case-sensitive, and are compared to just the name 
+     * of the file, ignoring parent directories.</p>
+     */
+    protected Hashtable includes = null;
+
+    /**
+     * Hash of base names to exclude.  
+     *
+     * <p>Keys are names, values in hash are ignored. Note that
+     * names are case-sensitive, and are compared to just the name 
+     * of the file, ignoring parent directories.</p>
+     */
+    protected Hashtable excludes = null;
+
+    /** Exclude CVS repository dirs always. */
+    public static final String DEFAULT_EXCLUDES_CVS = "CVS";
+
+    /**
+     * Accessor methods for case-sensitive Hash of name(s) to include.  
+     *
+     * @return clone of our hash of inclusion name(s); null if not set
+     */
+    public Hashtable getIncludes()
+    {
+        if (null != includes)
+        {
+            return (Hashtable) includes.clone();
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    /**
+     * Accessor method to set a list of name(s) to include.  
+     *
+     * @param inc semicolon-delimited string of inclusion names(s); 
+     * if null or blank, unsets any of our includes
+     */
+    public void setIncludes(String inc)
+    {
+        if ((null != inc) && ("" != inc))
+        {
+            includes = new Hashtable();
+
+            StringTokenizer st = new StringTokenizer(inc, ";");
+            while (st.hasMoreTokens())
+            {
+                // Value in hash is ignored
+                includes.put(st.nextToken(), Boolean.TRUE);
+            }
+        }
+        else
+        {
+            includes = null;
+        }
+    }
+
+    /**
+     * Accessor methods for case-sensitive Hash of name(s) to exclude.  
+     *
+     * @return clone of our hash of exclusion name(s); null if not set
+     */
+    public Hashtable getExcludes()
+    {
+        if (null != excludes)
+        {
+            return (Hashtable) excludes.clone();
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    /**
+     * Accessor method to set a list of name(s) to exclude.  
+     *
+     * @param inc semicolon-delimited string of exclusion name(s); 
+     * if null or blank, unsets any of our excludes
+     */
+    public void setExcludes(String exc)
+    {
+        if ((null != exc) && ("" != exc))
+        {
+            excludes = new Hashtable();
+
+            StringTokenizer st = new StringTokenizer(exc, ";");
+            while (st.hasMoreTokens())
+            {
+                // Value in hash is ignored
+                excludes.put(st.nextToken(), Boolean.TRUE);
+            }
+        }
+        else
+        {
+            excludes = null;
+        }
+    }
+
+    /**
+     * Tests if a specified file is on our inclusion list.  
+     * 
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name is on our include list; 
+     * <code>false</code> otherwise.
+     */
+    public boolean isInclude(File dir, String name)
+    {
+        // If we have an inclusion list, check there
+        if ((includes != null) && includes.containsKey(name))
+            return true;
+        // Otherwise, our default behavior is to ignore it
+        else
+            return false;
+    }
+
+    /**
+     * Tests if a specified file is on our exclusion list.  
+     * 
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name is on our exclude list; 
+     * <code>false</code> otherwise.
+     */
+    public boolean isExclude(File dir, String name)
+    {
+        // Always exclude defaults
+        if (DEFAULT_EXCLUDES_CVS.equals(name))
+            return true;
+
+        // If we have an exclusion list, check there
+        if ((excludes != null) && excludes.containsKey(name))
+            return true;
+        // Otherwise, our default behavior is to ignore it
+        else
+            return false;
+    }
+
+    /**
+     * Overridden method: this default implementation simply 
+     * returns true.  
+     * 
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> always; should be overridden.
+     */
+    public boolean acceptOverride(File dir, String name)
+    {
+        return true;
+    }
+
+    /**
+     * Tests if a specified file should be included in a file list.  
+     * 
+     * Uses our includes and excludes lists by calling out to 
+     * worker methods.  Subclasses can merely override acceptOverride() 
+     * to get the proper behavior.
+     *
+     * We never return names on our exclusion list; we then always 
+     * return names on our inclusion list; then we simply return
+     * the value of acceptOverride(...).
+     *
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name should be included in the file list; 
+     * <code>false</code> otherwise.
+     * @since JDK1.0
+     */
+    public boolean accept(File dir, String name)
+    {
+        // Never return excluded files
+        if (isExclude(dir, name))
+            return false;
+
+        boolean included = isInclude(dir, name);
+
+        // If we should be exclusive, then only return included 
+        //  files immaterial of acceptOverride()
+        if (getUseIncludesOnly())
+        {
+            return included;
+        }
+        // Otherwise, return files either in the inclusion list 
+        //  or that are selected by acceptOverride()
+        else
+        {
+            return (included || acceptOverride(dir, name));
+        }
+    }
+}
diff --git a/test/java/src/org/apache/qetest/LinebyLineCheckService.java b/test/java/src/org/apache/qetest/LinebyLineCheckService.java
new file mode 100644
index 0000000..0d99406
--- /dev/null
+++ b/test/java/src/org/apache/qetest/LinebyLineCheckService.java
@@ -0,0 +1,223 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+/**
+ * Simply does .readLine of each file into string buffers and then String.equals().
+ * @author Paul_Dick@us.ibm.com
+ * @version $Id$
+ */
+public class LinebyLineCheckService implements CheckService
+{
+
+    /**
+     * Compare two objects for equivalence, and return appropriate result.
+     *
+     * @param logger to dump any output messages to
+     * @param actual (current) File to check
+     * @param reference (gold, or expected) File to check against
+     * @param description of what you're checking
+     * @param msg comment to log out with this test point
+     * @param id ID tag to log out with this test point
+     * @return Logger.*_RESULT code denoting status; each method may 
+     * define it's own meanings for pass, fail, ambiguous, etc.
+     */
+    public int check(Logger logger, Object actual, Object expected,
+                     String msg, String id)
+    {	
+        if (!((actual instanceof File) & (expected instanceof File)))
+        {
+            // Must have File objects to continue
+            logger.checkErr(msg + " :check() objects were not Files", id);
+            return Logger.ERRR_RESULT;
+        }
+
+		if (doCompare(logger, (File) actual, (File) expected))
+        {
+            logger.checkPass(msg, id);
+            return Logger.PASS_RESULT;
+        }
+        else
+        {
+            logger.checkFail(msg, id);
+            return Logger.FAIL_RESULT;
+        }
+    }
+
+    /**
+     * Compare two objects for equivalence, and return appropriate result.
+     *
+     * @param logger to dump any output messages to
+     * @param actual (current) File to check
+     * @param reference (gold, or expected) File to check against
+     * @param description of what you're checking
+     * @param msg comment to log out with this test point
+     * @return Logger.*_RESULT code denoting status; each method may 
+     * define it's own meanings for pass, fail, ambiguous, etc.
+     */
+    public int check(Logger logger, Object actual, Object reference,
+                     String msg)
+    {	
+        return check(logger, actual, reference, msg, null);
+    }
+
+    /**
+     * Read text files line-by-line and do comparison
+     * @param logger to dump any messages to
+     * @param act File object to read
+     * @param exp File object to read
+     * @return True or False based on comparison
+     */
+    private boolean doCompare(Logger logger, File act, File exp)
+    {
+        StringBuffer sb_act = new StringBuffer();
+		StringBuffer sb_exp = new StringBuffer();
+
+        try
+        {
+            FileInputStream in_act = new FileInputStream(act);
+            FileInputStream in_exp = new FileInputStream(exp);
+			// Create necessary I/O objects
+            InputStreamReader fra = new InputStreamReader(in_act, "UTF-8");
+                       InputStreamReader fre = new InputStreamReader(in_exp, "UTF-8");
+
+            BufferedReader bra = new BufferedReader(fra);
+			BufferedReader bre = new BufferedReader(fre);
+
+			int line = 0;	// Line number to report in case of failure
+            for (;;)
+            {
+				String inbufe = bre.readLine();	 // read files, line by line
+				String inbufa = bra.readLine();
+				line += 1;						 // Keep track of line number
+
+				if (inbufe == null)		// Is expected done?
+				{
+					if (inbufa == null)	// If so, is actual done?
+					{ 
+						break;			// If so, we're done!!
+					}
+					else				// If not report error
+					{
+						logger.logArbitrary(logger.FAILSONLY, "Actual("+line+"): " + inbufa);
+						logger.logArbitrary(logger.FAILSONLY, "Expect("+line+"): " + inbufe);
+						return false;
+					}
+				}
+				else
+				{						// Still data to compare 
+				    if ( !(inbufa.equals(inbufe)) )
+				    {
+						logger.logArbitrary(logger.FAILSONLY, "Actual("+line+"): " + inbufa);
+						logger.logArbitrary(logger.FAILSONLY, "Expect("+line+"): " + inbufe);
+						return false;
+				    }
+				}
+            }
+        }
+        catch (Exception e)				//  Report any file I/O exceptions
+        {
+            if (logger != null)
+            {
+                logger.logMsg(Logger.ERRORMSG, "LinebyLineCheckService() threw:" + 
+                				e.toString());
+            }
+            else
+                System.err.println("LinebyLineCheckService() threw:" + e.toString());
+
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Gets extended information about the last checkFiles call: NONE AVAILABLE.
+     * @return null, since we don't support this
+     */
+    public String getExtendedInfo()
+    {
+        return null;
+    }
+
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * No-op; this class does not have any supported attributes.
+     * 
+     * @param name The name of the attribute.
+     * @param value The value of the attribute.
+     * @throws IllegalArgumentException thrown if the underlying
+     * implementation doesn't recognize the attribute and wants to 
+     * inform the user of this fact.
+     */
+    public void setAttribute(String name, Object value)
+        throws IllegalArgumentException
+    {
+        /* no-op */        
+    }
+
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * No-op; this class does not have any supported attributes.
+     * 
+     * @param attrs Props of various name, value attrs.
+     */
+    public void applyAttributes(Properties attrs)
+    {
+        /* no-op */        
+    }
+
+    /**
+     * Allows the user to retrieve specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     *
+     * @param name The name of the attribute.
+     * @return null, no attributes supported.
+     * @throws IllegalArgumentException thrown if the underlying
+     * implementation doesn't recognize the attribute and wants to 
+     * inform the user of this fact.
+     */
+    public Object getAttribute(String name)
+        throws IllegalArgumentException
+    {
+        return null;
+    }
+
+    /**
+     * Description of what this testing utility does.  
+     * @return String description of extension
+     */
+    public String getDescription()
+    {
+        return ("Reads in text files line-by-line as strings (ignoring newlines) and does String.equals()");
+    }
+
+}  // end of class LinebyLineCheckService
diff --git a/test/java/src/org/apache/qetest/Logger.java b/test/java/src/org/apache/qetest/Logger.java
new file mode 100644
index 0000000..d9aa39a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/Logger.java
@@ -0,0 +1,616 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * Logger.java
+ *
+ */
+package org.apache.qetest;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * Interface defining a utility that can log out test results.
+ * This interface defnines a standalone utility that can be used
+ * to report the results of a test.  It would commonly be used by a
+ * testing utility library to produce actual output from the run
+ * of a test file.
+ * <p>The Logger defines a minimal interface for expressing the result
+ * of a test in a generic manner.  Different Loggers can be written
+ * to both express the results in different places (on a live console,
+ * in a persistent file, over a network) and in different formats -
+ * perhaps an XMLTestLogger would express the results in an
+ * XML file or object.</p>
+ * <p>In many cases, tests will actually call a Reporter, which
+ * acts as a composite for Logger objects, and includes numerous
+ * useful utility and convenience methods.</p>
+ * <ul>Loggers explicitly have a restricted set of logging calls for
+ * two main reasons:
+ * <li>To help keep tests structured</li>
+ * <li>To make it easier to generate 'reports' based on test output
+ * (i.e. number of tests passed/failed, graphs of results, etc.)</li>
+ * </ul>
+ * <p>While there are a number of very good general purpose logging 
+ * utilities out there, I prefer to use this Logger or a similar 
+ * class to report the results of tests because this class 
+ * specifically constrains the format and manner that a test reports 
+ * results.  This should help to keep tests more structured and 
+ * easier for other users to understand.  Specific Logger 
+ * implementations may of course choose to store or log out their 
+ * results in any manner they like; in fact I plan on implementing 
+ * a <a href="http://jakarta.apache.org/log4j/docs/index.html">
+ * Log4JLogger</a> class in the future.</p>
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public interface Logger
+{
+
+    //-----------------------------------------------------
+    //-------- Constants for common input params --------
+    //-----------------------------------------------------
+
+    /**
+     * Parameter: FQCN of Logger(s) to use.
+     * <p>Default: usually none, but implementers may choose to call
+     * setupDefaultLogger(). Will accept multiple classnames separated
+     * by ";" semicolon. Format:
+     * <code>-reporters org.apache.qetest.ConsoleLogger;org.apache.qetest.SomeOtherLogger</code></p>
+     */
+    public static final String OPT_LOGGERS = "loggers";
+
+    /** Constant ';' semicolon for delimiter in OPT_LOGGERS field.   */
+    public static final String LOGGER_SEPARATOR = ";";
+
+    /**
+     * A default Logger classname - ConsoleLogger.
+     * //@todo have a factory creation service for this so that any 
+     * test or testlet that wishes a default logger at startup 
+     * can simply ask a common place for one.
+     */
+    public static final String DEFAULT_LOGGER =
+        "org.apache.qetest.ConsoleLogger";
+
+    /**
+     * Parameter: level of output to log, int 0-99.
+     * {@link #CRITICALMSG CRITICALMSG = 0}, only very important 
+     * messages are output from the test or shown in a report, to
+     * {@link #TRACEMSG TRACEMSG}, where all messages are output
+     * or shown in the result.  
+     * {@link #CRITICALMSG See CRITICALMSG for a chart of levels.}
+     */
+    public static final String OPT_LOGGINGLEVEL = "loggingLevel";
+
+    /**
+     * Parameter: if we should log performance data, true/false.
+     */
+    public static final String OPT_PERFLOGGING = "perfLogging";
+
+    /**
+     * Parameter: if we should dump debugging info to System.err.
+     * <p>This is primarily for debugging the test framework itself, 
+     * not necessarily for debugging the application under test.</p>
+     */
+    public static final String OPT_DEBUG = "debug";
+
+    /**
+     * Parameter: Name of test results file for file-based Loggers.
+     * <p>File-based loggers should use this key as an initializer
+     * for the name of their output file.</p>
+     * <p>Commandline Format: <code>-logFile path\to\ResultsFileName.ext</code></p>
+     * <p>Properties file Format: <code>logFile=path\\to\\ResultsFileName.ext</code></p>
+     * //@todo Need more doc about platform separator differences
+     */
+    public static final String OPT_LOGFILE = "logFile";
+
+    /**
+     * Parameter: Indent depth for console or HTML/XML loggers.
+     * <p>Loggers may use this as an integer number of spaces to
+     * indent, as applicable to their situation.</p>
+     * <p>Commandline Format: <code>-indent <i>nn</i></code></p>
+     * <p>Properties file Format: <code>indent=<i>nn</i></code></p>
+     */
+    public static final String OPT_INDENT = "indent";
+
+    //-----------------------------------------------------
+    //-------- Constants for Logger and Reporter interactions --------
+    //-----------------------------------------------------
+
+    /**
+     * This determines the amount of data actually logged out to results.
+     * <p>Loggers merely use these constants in their output formats.
+     * Reporters will only call contained Loggers to report messages
+     * at the current logging level and higher.
+     * For example, if you <code>setLoggingLevel(ERRORMSG)</code>
+     * (currently found in the {@link Reporter Reporter} subclass) then INFOMSGs
+     * will not be reported, presumably speeding execution time and saving
+     * output log space.  These levels are also coded into most Logger output,
+     * allowing for easy reporting of various levels of results.</p>
+     * <ul>Allowable values are:
+     * <li>CRITICALMSG - Must-be-printed messages; may print only selected
+     * fails (and skip printing most passes).</li>
+     * <li>ERRORMSG - Logs an error and (optionally) a fail.</li>
+     * <li>FAILSONLY - Skips logging out most pass messages (still
+     * reports testFileResults) but prints out all fails.</li>
+     * <li>WARNINGMSG - Used for non-fail warnings - the test will
+     * continue, hopefully sucessfully.</li>
+     * <li>STATUSMSG - Reports on basic status of the test, when you
+     * want to include more detail than in a check() call</li>
+     * <li>INFOMSG - For more basic test debugging messages.</li>
+     * <li>TRACEMSG - Tracing all operations, detailed debugging information.</li>
+     * </ul>
+     * <p>Note that Logger implementations should also generally 
+     * put the actual level that each call is logged at into any  
+     * persistent outputs.  This will enable you to use results \
+     * analysis tools later on against the results and screen 
+     * against loggingLevel then as well.</p>
+     * <p>A common technique is to run a set of tests with a very 
+     * high loggingLevel, so most or all output is stored by Loggers, 
+     * and then analyze the results with a low logging level.  If 
+     * those results show some problems, you can always re-analyze 
+     * the results with a higher logging level without having to 
+     * re-run the test.</p>
+     * @see #logMsg(int, java.lang.String)
+     */
+    // Levels are separated in actual values in case you wish to add your own levels in between
+    public static final int CRITICALMSG = 0;  // Lowest possible loggingLevel
+
+    /** 
+     * ERRORMSG - Logs an error and (optionally) a fail.  
+     * {@link #CRITICALMSG See CRITICALMSG for a chart.}
+     */
+    public static final int ERRORMSG = 10;
+
+    /** 
+     * FAILSONLY - Skips logging out most pass messages.  
+     * {@link #CRITICALMSG See CRITICALMSG for a chart.}
+     */
+    public static final int FAILSONLY = 20;
+
+    /** 
+     * WARNINGMSG - Used for non-fail warnings.  
+     * {@link #CRITICALMSG See CRITICALMSG for a chart.}
+     */
+    public static final int WARNINGMSG = 30;
+
+    /** 
+     * STATUSMSG - Reports on basic status of the test.  
+     * {@link #CRITICALMSG See CRITICALMSG for a chart.}
+     */
+    public static final int STATUSMSG = 40;
+
+    /** 
+     * INFOMSG - For more basic test debugging messages.  
+     * {@link #CRITICALMSG See CRITICALMSG for a chart.}
+     */
+    public static final int INFOMSG = 50;
+
+    /** 
+     * TRACEMSG - Tracing all operations.  
+     * {@link #CRITICALMSG See CRITICALMSG for a chart.}
+     */
+    public static final int TRACEMSG = 60;  // Highest possible loggingLevel
+
+    /** Default level is {@link #STATUSMSG STATUSMSG}.   */
+    public static final int DEFAULT_LOGGINGLEVEL = STATUSMSG;
+
+    /**
+     * Constants for tracking results by testcase or testfile.
+     * <p>Testfiles default to an incomplete or INCP_RESULT.  If a
+     * test never successfully calls a check* method, it's result
+     * will be incomplete.</p>
+     * <p>Note that a test cannot explicitly reset it's result to be INCP.</p>
+     */
+
+    // Note: implementations should never rely on the actual values
+    //       of these constants, except possibly to ensure that 
+    //       overriding values are > greater than other values
+    public static final int INCP_RESULT = 0;
+
+    // Note: string representations are explicitly set to all be 
+    //       4 characters long to make it simpler to parse results
+
+    /** 
+     * Constant "Incp" for result files.   
+     * @see #INCP_RESULT
+     */
+    public static final String INCP = "Incp";
+
+    /**
+     * Constants for tracking results by testcase or testfile.
+     * <p>A PASS_RESULT signifies that a specific test point (or a testcase,
+     * or testfile) has perfomed an operation correctly and has been verified.</p>
+     * <p>A pass overrides an incomplete.</p>
+     * @see #checkPass(java.lang.String)
+     */
+    public static final int PASS_RESULT = 2;
+
+    /** 
+     * Constant "Pass" for result files.   
+     * @see #PASS_RESULT
+     */
+    public static final String PASS = "Pass";
+
+    /**
+     * Constants for tracking results by testcase or testfile.
+     * <p>An AMBG_RESULT or ambiguous result signifies that a specific test
+     * point (or a testcase, or testfile) has perfomed an operation but
+     * that it has not been verified.</p>
+     * <p>Ambiguous results can be used when the test may not have access
+     * to baseline, or verified 'gold' result data.  It may also be used
+     * during test file creation when the tester has not yet specified the
+     * expected behavior of a test.</p>
+     * <p>Ambiguous overrides both pass and incomplete.</p>
+     * @see #checkAmbiguous(java.lang.String)
+     */
+    public static final int AMBG_RESULT = 5;
+
+    /** 
+     * Constant "Ambg" for result files.   
+     * @see #AMBG_RESULT
+     */
+    public static final String AMBG = "Ambg";
+
+    /**
+     * Constants for tracking results by testcase or testfile.
+     * <p>A FAIL_RESULT signifies that a specific test point (or a testcase,
+     * or testfile) has perfomed an operation incorrectly.</p>
+     * <p>A fail in one test point does not necessarily mean that other test
+     * points are invalid - well written tests should be able to continue
+     * and produce valid results for the rest of the test file.</p>
+     * <p>A fail overrides any of incomplete, pass or ambiguous.</p>
+     * @see #checkFail(java.lang.String)
+     */
+    public static final int FAIL_RESULT = 8;
+
+    /** 
+     * Constant "Fail" for result files.   
+     * @see #FAIL_RESULT
+     */
+    public static final String FAIL = "Fail";
+
+    /**
+     * Constants for tracking results by testcase or testfile.
+     * <p>An ERRR_RESULT signifies that some part of the testfile
+     * has caused an unexpected error, exception, or other Really Bad Thing.</p>
+     * <p>Errors signify that something unexpected happened and that the test
+     * may not produce valid results.  It would most commonly be used for
+     * problems relating to setting up test data or errors with other software
+     * being used (i.e. not problems with the actual software code that the
+     * test is attempting to verify).</p>
+     * <p>An error overrides <B>any</B> other result.</p>
+     * @see #checkErr(java.lang.String)
+     */
+    public static final int ERRR_RESULT = 9;
+
+    /** 
+     * Constant "Errr" for result files.   
+     * Note all constant strings for results are 4 chars long
+     * to make fixed-length record file-based results simpler.
+     * @see #ERRR_RESULT
+     */
+    public static final String ERRR = "Errr";
+
+    /**
+     * Testfiles and testcases should default to incomplete.
+     */
+    public final int DEFAULT_RESULT = INCP_RESULT;
+
+    //-----------------------------------------------------
+    //-------- Control and utility routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Return a description of what this Logger/Reporter does.
+     * @author Shane_Curcuru@lotus.com
+     * @return description of how this Logger outputs results, OR
+     * how this Reporter uses Loggers, etc..
+     */
+    public abstract String getDescription();
+
+    /**
+     * Returns information about the Property name=value pairs that
+     * are understood by this Logger/Reporter.
+     * @author Shane_Curcuru@lotus.com
+     * @return same as {@link java.applet.Applet#getParameterInfo()}.
+     */
+    public abstract String[][] getParameterInfo();
+
+    /**
+     * Accessor methods for a properties block.
+     * @return our Properties block.
+     */
+    public abstract Properties getProperties();
+
+    /**
+     * Accessor methods for a properties block.
+     * Always having a Properties block allows users to pass common
+     * options to a Logger/Reporter without having to know the specific
+     * 'properties' on the object.
+     * <p>Much like in Applets, users can call getParameterInfo() to
+     * find out what kind of properties are available.  Callers more
+     * commonly simply call initialize(p) instead of setProperties(p)</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param p Properties to set (should be cloned).
+     */
+    public abstract void setProperties(Properties p);
+
+    /**
+     * Call once to initialize this Logger/Reporter from Properties.
+     * <p>Simple hook to allow Logger/Reporters with special output
+     * items to initialize themselves.</p>
+     *
+     * @author Shane_Curcuru@lotus.com
+     * @param p Properties block to initialize from.
+     * @return status, true if OK, false if an error occoured.
+     */
+    public abstract boolean initialize(Properties p);
+
+    /**
+     * Is this Logger/Reporter ready to log results?
+     * Obviously the meaning of 'ready' may be slightly different 
+     * between different kinds of Loggers.  A ConsoleLogger may 
+     * simply always be ready, since it probably just sends it's 
+     * output to System.out.  File-based Loggers may not be ready 
+     * until they've opened their file, and if IO errors happen, 
+     * may have to report not ready later on as well.
+     * @author Shane_Curcuru@lotus.com
+     * @return status - true if it's ready to report, false otherwise
+     */
+    public abstract boolean isReady();
+
+    /**
+     * Flush this Logger/Reporter - should ensure all output is flushed.
+     * Note that the flush operation is not necessarily pertinent to
+     * all types of Logger/Reporter - console-type Loggers no-op this.
+     * @author Shane_Curcuru@lotus.com
+     */
+    public abstract void flush();
+
+    /**
+     * Close this Logger/Reporter - should include closing any OutputStreams, etc.
+     * Logger/Reporters should return {@link #isReady()} = false 
+     * after being closed; presumably they will not actually log 
+     * out any further data.
+     * @author Shane_Curcuru@lotus.com
+     */
+    public abstract void close();
+
+    //-----------------------------------------------------
+    //-------- Testfile / Testcase start and stop routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Report that a testfile has started.
+     * Implementing Loggers must output/store/report a message
+     * that the test file has started.
+     * @author Shane_Curcuru@lotus.com
+     * @param name file name or tag specifying the test.
+     * @param comment comment about the test.
+     */
+    public abstract void testFileInit(String name, String comment);
+
+    /**
+     * Report that a testfile has finished, and report it's result.
+     * Implementing Loggers must output a message that the test is
+     * finished, and print the results.
+     * @author Shane_Curcuru@lotus.com
+     * @param msg message to log out
+     * @param result result of testfile
+     */
+    public abstract void testFileClose(String msg, String result);
+
+    /**
+     * Report that a testcase has started.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment short description of this test case's objective.
+     */
+    public abstract void testCaseInit(String comment);
+
+    /**
+     * Report that a testcase has finished, and report it's result.
+     * Implementing classes must output a message that a testcase is
+     * finished, and print the results.
+     * @author Shane_Curcuru@lotus.com
+     * @param msg message of name of test case to log out
+     * @param result result of testfile
+     */
+    public abstract void testCaseClose(String msg, String result);
+
+    //-----------------------------------------------------
+    //-------- Test results logging routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Report a comment to result file with specified severity.
+     * Print out the message, optionally along with the level (depends
+     * on your storage mechanisim: console output probably doesn't need
+     * the level, but a file output probably would want it.)
+     * <p>Note that some Loggers may limit the comment string,
+     * either in overall length or by stripping any linefeeds, etc.
+     * This is to allow for optimization of file or database-type
+     * reporters with fixed fields.  Users who need to log out
+     * special string data should use logArbitrary() instead.</p>
+     * <p>Remember, use {@link #checkPass(String)}, or
+     * {@link #checkFail(String)}, etc. to report the actual
+     * results of your tests.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message; from {@link #CRITICALMSG} 
+     * to {@link #TRACEMSG}
+     * @param msg comment to log out.
+     */
+    public abstract void logMsg(int level, String msg);
+
+    /**
+     * Report an arbitrary String to result file with specified severity.
+     * Log out the String provided exactly as-is.
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message; from {@link #CRITICALMSG} 
+     * to {@link #TRACEMSG}
+     * @param msg arbitrary String to log out.
+     */
+    public abstract void logArbitrary(int level, String msg);
+
+    /**
+     * Logs out statistics to result file with specified severity.
+     * This is a general-purpose way to log out numeric statistics.  We accept
+     * both a long and a double to allow users to save whatever kind of numbers
+     * they need to, with the simplest API.  The actual meanings of the numbers
+     * are dependent on the implementer.
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message; from {@link #CRITICALMSG} 
+     * to {@link #TRACEMSG}
+     * @param lVal statistic in long format, if available.
+     * @param dVal statistic in double format, if available.
+     * @param msg comment to log out.
+     */
+    public abstract void logStatistic(int level, long lVal, double dVal,
+                                      String msg);
+
+    /**
+     * Logs out Throwable.toString() and a stack trace of the 
+     * Throwable with the specified severity.
+     * <p>Works in conjunction with {@link Reporter#setLoggingLevel(int) setLoggingLevel}; 
+     * only outputs messages that are more severe than the current 
+     * logging level.  Different Logger or Reporter implementations 
+     * may implement loggingLevels in different ways currently.</p>
+     * <p>This uses logArbitrary to log out your msg - message, 
+     * a newline, throwable.toString(), a newline,
+     * and then throwable.printStackTrace().</p>
+     * <p>Note that this does not imply a failure or problem in 
+     * a test in any way: many tests may want to verify that 
+     * certain exceptions are thrown, etc.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message.
+     * @param throwable throwable/exception to log out.
+     * @param msg description of the throwable.
+     */
+    public abstract void logThrowable(int level, Throwable throwable, String msg);
+
+    /**
+     * Logs out a element to results with specified severity.
+     * This method is primarily for Loggers that output to fixed
+     * structures, like files, XML data, or databases.
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message; from {@link #CRITICALMSG} 
+     * to {@link #TRACEMSG}
+     * @param element name of enclosing element
+     * @param attrs hash of name=value attributes
+     * @param msg Object to log out; up to Loggers to handle
+     * processing of this; usually logs just .toString().
+     */
+    public abstract void logElement(int level, String element,
+                                    Hashtable attrs, Object msg);
+
+    /**
+     * Logs out contents of a Hashtable with specified severity.
+     * <p>Loggers should store or log the full contents of the hashtable.</p>
+     * @param level severity of message; from {@link #CRITICALMSG} 
+     * to {@link #TRACEMSG}
+     * @param hash Hashtable to log the contents of.
+     * @param msg decription of the Hashtable.
+     */
+    public abstract void logHashtable(int level, Hashtable hash, String msg);
+
+    //-----------------------------------------------------
+    //-------- Test results reporting check* routines --------
+    //-----------------------------------------------------
+    // There is no public void checkIncp(String comment) method
+
+    /**
+     * Writes out a Pass record with comment.  
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the pass record.
+     * @see #PASS_RESULT
+     */
+    public abstract void checkPass(String comment);
+
+    /**
+     * Writes out an ambiguous record with comment.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment to log with the ambg record.
+     * @see #AMBG_RESULT
+     */
+    public abstract void checkAmbiguous(String comment);
+
+    /**
+     * Writes out a Fail record with comment.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the fail record.
+     * @see #FAIL_RESULT
+     */
+    public abstract void checkFail(String comment);
+
+    /**
+     * Writes out an Error record with comment.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the error record.
+     * @see #ERRR_RESULT
+     */
+    public abstract void checkErr(String comment);
+
+
+    /* EXPERIMENTAL: have duplicate set of check*() methods 
+       that all output some form of ID as well as comment. 
+       Leave the non-ID taking forms for both simplicity to the 
+       end user who doesn't care about IDs as well as for 
+       backwards compatibility.
+    */
+    
+    /**
+     * Writes out a Pass record with comment and ID.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the pass record.
+     * @param ID token to log with the pass record.
+     * @see #PASS_RESULT
+     */
+    public abstract void checkPass(String comment, String id);
+
+    /**
+     * Writes out an ambiguous record with comment and ID.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment to log with the ambg record.
+     * @param ID token to log with the pass record.
+     * @see #AMBG_RESULT
+     */
+    public abstract void checkAmbiguous(String comment, String id);
+
+    /**
+     * Writes out a Fail record with comment and ID.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the fail record.
+     * @param ID token to log with the pass record.
+     * @see #FAIL_RESULT
+     */
+    public abstract void checkFail(String comment, String id);
+
+    /**
+     * Writes out an Error record with comment and ID.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the error record.
+     * @param ID token to log with the pass record.
+     * @see #ERRR_RESULT
+     */
+    public abstract void checkErr(String comment, String id);
+}  // end of class Logger
+
diff --git a/test/java/src/org/apache/qetest/LoggingHandler.java b/test/java/src/org/apache/qetest/LoggingHandler.java
new file mode 100644
index 0000000..0d32349
--- /dev/null
+++ b/test/java/src/org/apache/qetest/LoggingHandler.java
@@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingHandler.java
+ *
+ */
+package org.apache.qetest;
+
+
+/**
+ * Base class defining common functionality of logging handlers.  
+ * <p>Common functionality used for testing when implementing 
+ * various Handlers and Listeners.  Provides common ways to set 
+ * Loggers and levels, reset, and set expected errors or the 
+ * like.  Likely used to implement testing wrapper classes for 
+ * things like javax.xml.transform.ErrorListener and 
+ * org.xml.sax.ErrorHandler</p>
+ * <p>The best description for this class can be seen in an 
+ * example; see trax.LoggingErrorHandler.java for one.</p>
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingHandler
+{
+
+    /**
+     * Set a default handler for us to wrapper.
+     * Often you may want to keep the default handler for some 
+     * operation while you're logging.  For subclasses that support 
+     * this call, they will log every operation, and then simply 
+     * call-through to this default handler.
+     *
+     * Subclasses should implement this and verify that the default 
+     * is of an appropriate type to use.
+     *
+     * @param default Object of the correct type to pass-through to;
+     * throws IllegalArgumentException if null or incorrect type
+     */
+    public void setDefaultHandler(Object defaultHandler)
+    {
+        throw new java.lang.IllegalArgumentException("LoggingHandler.setDefaultHandler() is unimplemented!");
+    }
+
+
+    /**
+     * Accessor method for our default handler; here returns null.
+     *
+     * @return default (Object) our default handler; null if unset
+     */
+    public Object getDefaultHandler()
+    {
+        return null;
+    }
+
+
+    /**
+     * Get a list of counters of all items we've logged.
+     * LoggingHandlers each will have various kinds or types of 
+     * things they handle (errors, warnings, messages, URIs, etc.).
+     * They should keep a running tally of how many of each kind of 
+     * item they've 'handled'.  
+     *
+     * @return array of int counters for each item we log; 
+     * subclasses should define constants for what each slot is
+     */
+    public int[] getCounters()
+    {
+        return NOTHING_HANDLED_CTR;
+    }
+
+
+    /**
+     * Get a string representation of last item we logged.  
+     * For every item that we handle, subclasses should store a 
+     * String representation and return it here if asked.  Normally 
+     * this will only be a copy of the very last item we logged - 
+     * not necessarily what users might want, but the simplest to 
+     * implement everywhere.
+     *
+     * @return String of the last item handled
+     */
+    public String getLast()
+    {
+        return NOTHING_HANDLED;
+    }
+
+
+    /**
+     * Reset any items or counters we've handled.  
+     * Resets any data about what we've handled or logged so far, 
+     * like getLast() and getCounters() data, as well as any 
+     * expected items from setExpected().  Does not change our 
+     * Logger or loggingLevel.
+     */
+    public void reset()
+    {
+        /* no-op */;
+    }
+
+
+    /**
+     * Ask us to report checkPass/Fail for certain events we handle.
+     * Since we may have to handle many events between when a test 
+     * will be able to call us, testers can set this to have us 
+     * automatically call checkPass when we see an item that matches, 
+     * or to call checkFail when we get an unexpected item.
+     * Generally, we only call check* methods when:
+     * <ul>
+     * <li>containsString is not set, reset, or is ITEM_DONT_CARE, 
+     * we do nothing (i.e. never call check* for this item)</li>
+     * <li>containsString is ITEM_CHECKFAIL, we will always call 
+     * checkFail with the contents of any item if it occours</li>
+     * <li>containsString is anything else, we will grab a String 
+     * representation of every item of that type that comes along, 
+     * and if the containsString is found, case-sensitive, within 
+     * the handled item's string, call checkPass, otherwise 
+     * call checkFail</li>
+     * <ul>
+     * Note that most implementations will only validate the first 
+     * event of a specific type, and then will reset validation for 
+     * that event type.  This is because many events may be raised
+     * in between the time that a calling Test class could tell us 
+     * of the 'next' expected event.
+     * //@todo improve this paradigm to allow users to specify an 
+     * expected sequence of events.
+     *
+     * @param itemType which of the various types of items we might 
+     * handle; should be defined as a constant by subclasses
+     * @param containsString a string to look for within whatever 
+     * item we handle - usually checked for by seeing if the actual 
+     * item we handle contains the containsString
+     */
+    public void setExpected(int itemType, String containsString)
+    {
+        /* no-op */;
+    }
+
+
+    /**
+     * Accesor method for a brief description of this service.  
+     * Subclasses should obviously override to provide useful info.
+     *
+     * @return String "LoggingHandler: default implementation, does nothing"
+     */
+    public String getDescription()
+    {
+        return "LoggingHandler: default implementation, does nothing";
+    }
+
+
+    /**
+     * Accesor methods for our Logger.
+     *
+     * @param l the Logger to have this test use for logging 
+     * results; or null to use a default logger
+     */
+    public void setLogger(Logger l)
+	{
+        // if null, set a default one
+        if (null == l)
+            logger = getDefaultLogger();
+        else
+            logger = l;
+	}
+
+
+    /**
+     * Accesor methods for our Logger.  
+     *
+     * @return Logger we tell all our secrets to.
+     */
+    public Logger getLogger()
+	{
+        return logger;
+	}
+
+
+    /**
+     * Get a default Logger for use with this Handler.  
+     * Gets a default ConsoleLogger (only if a Logger isn't 
+     * currently set!).  
+     *
+     * @return current logger; if null, then creates a 
+     * Logger.DEFAULT_LOGGER and returns that; if it cannot
+     * create one, throws a RuntimeException
+     */
+    public Logger getDefaultLogger()
+    {
+        if (logger != null)
+            return logger;
+
+        try
+        {
+            Class rClass = Class.forName(Logger.DEFAULT_LOGGER);
+            return (Logger)rClass.newInstance();
+        } 
+        catch (Exception e)
+        {
+            // Must re-throw the exception, since returning 
+            //  null or the like could lead to recursion
+            e.printStackTrace();
+            throw new RuntimeException(e.toString());
+        }
+    }
+
+
+    /**
+     * Accesor methods for our loggingLevel.  
+     *
+     * @param l what level we should call logger.logMsg()
+     */
+    public void setLoggingLevel(int l)
+    {
+        level = l;
+    }
+
+
+    /**
+     * Accesor methods for our loggingLevel.  
+     *
+     * @return what level we call logger.logMsg()
+     */
+    public int getLoggingLevel()
+    {
+        return level;
+    }
+
+    //-----------------------------------------------------------
+    //---- Instance Variables and Constants
+    //-----------------------------------------------------------
+
+    /** Our Logger, who we tell all our secrets to. */
+    protected Logger logger = null;
+
+    /** What loggingLevel to use for reporter.logMsg(). */
+    protected int level = Logger.DEFAULT_LOGGINGLEVEL;
+
+    /** Default return value from getCounters() after a reset(). */
+    public static final int[] NOTHING_HANDLED_CTR = { 0 };
+
+    /** Default return value from getLast() after a reset(). */
+    public static final String NOTHING_HANDLED = "NOTHING_HANDLED";
+
+    /** Token for setExpected that we don't care (default value) about the event. */
+    public static final String ITEM_DONT_CARE = "ITEM_DONT_CARE";
+
+    /** Token for setExpected that we should call checkFail if we get the event. */
+    public static final String ITEM_CHECKFAIL = "ITEM_CHECKFAIL";
+}
diff --git a/test/java/src/org/apache/qetest/NullDatalet.java b/test/java/src/org/apache/qetest/NullDatalet.java
new file mode 100644
index 0000000..6312132
--- /dev/null
+++ b/test/java/src/org/apache/qetest/NullDatalet.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * NullDatalet.java
+ *
+ */
+package org.apache.qetest;
+
+import java.util.Hashtable;
+
+/**
+ * A default implementation of a Datalet with no data points.  
+ * "Conversation... is the art of never appearing a bore, of 
+ * knowing how to say everything interestingly, to entertain with 
+ * no matter what, to be charming with nothing at all."  
+ * -- Guy de Maupassant, <u>Sur l'Eau</u>
+ * 
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class NullDatalet implements Datalet
+{
+
+    /**
+     * Default no-arg, no-op constructor.  
+     */
+    public NullDatalet() { } // no-op
+
+
+    /**
+     * Accesor method for a brief description of this NullDatalet.  
+     *
+     * @return String "NullDatalet: no data contained".
+     */
+    public String getDescription()
+    {
+        return "NullDatalet: no data contained";
+    }
+
+
+    /**
+     * Accesor method for a brief description of this NullDatalet.  
+     *
+     * @param s unused, you cannot set our description
+     */
+    public void setDescription(String s) { } // no-op
+
+
+    /**
+     * Load fields of this NullDatalet from a Hashtable.
+     *
+     * @param Hashtable unused, you cannot set our fields
+     */
+    public void load(Hashtable h) { } // no-op
+
+
+    /**
+     * Load fields of this NullDatalet from an array.
+     *
+     * @param args unused, you cannot set our fields
+     */
+    public void load(String[] args) { } // no-op
+
+
+}  // end of class NullDatalet
+
diff --git a/test/java/src/org/apache/qetest/OutputNameManager.java b/test/java/src/org/apache/qetest/OutputNameManager.java
new file mode 100644
index 0000000..ceff806
--- /dev/null
+++ b/test/java/src/org/apache/qetest/OutputNameManager.java
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * OutputNameManager.java
+ *
+ */
+package org.apache.qetest;
+
+/**
+ * Simple utility class to manage tests with multiple output names.
+ * <p>Starts with a base name and extension, and returns
+ * nextName()s like:<pre>
+ * baseName_<i>1</i>.ext
+ * baseName_<i>2</i>.ext
+ * baseName_<i>3</i>.ext
+ * ...<pre>
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class OutputNameManager
+{
+
+    // defaults are provided for everything for the terminally lazy
+
+    /** NEEDSDOC Field extension          */
+    protected String extension = ".out";
+
+    /** NEEDSDOC Field baseName          */
+    protected String baseName = "OutputFile";
+
+    /** NEEDSDOC Field currentName          */
+    protected String currentName = "currentUnset";
+
+    /** NEEDSDOC Field previousName          */
+    protected String previousName = "previousUnset";
+
+    /** NEEDSDOC Field counter          */
+    protected int counter = 0;
+
+    /** NEEDSDOC Field SEPARATOR          */
+    public static final String SEPARATOR = "_";
+
+    /**
+     * Construct with just a basename.  
+     *
+     * @param base basename of file; defaults counter, extension
+     */
+    public OutputNameManager(String base)
+    {
+        baseName = base;
+    }
+
+    /**
+     * Construct with a basename and extension.  
+     *
+     * @param base basename of file; defaults counter
+     * @param ext extension to use instead of .out
+     */
+    public OutputNameManager(String base, String ext)
+    {
+        baseName = base;
+        extension = ext;
+    }
+
+    /**
+     * Construct with a basename, extension, and set the counter.  
+     *
+     * @param base basename of file; defaults counter
+     * @param ext extension to use instead of .out
+     * @param ctr number to start output counting from
+     */
+    public OutputNameManager(String base, String ext, int ctr)
+    {
+
+        baseName = base;
+        extension = ext;
+
+        setCounter(ctr);
+    }
+
+    /** Reset the counter to zero and update current, previous names. */
+    public void reset()
+    {
+
+        previousName = currentName;
+        currentName = null;
+        counter = 0;  // Set to 0 since we always call nextOutName() first
+    }
+
+    /**
+     * Increment counter and get next name.  
+     *
+     * @return the next name in the series
+     */
+    public String nextName()
+    {
+
+        setCounter(counter + 1);  // Updates names
+
+        return currentName();
+    }
+
+    /**
+     * Just get the current name.  
+     *
+     * @return our current output name
+     */
+    public String currentName()
+    {
+        return currentName;
+    }
+
+    /**
+     * Get the previous name, even past a reset().  
+     *
+     * @return last name we calculated
+     */
+    public String previousName()
+    {
+        return previousName;
+    }
+
+    /**
+     * Get the current counter number.  
+     *
+     * @return counter
+     */
+    public int currentCounter()
+    {
+        return counter;
+    }
+
+    /**
+     * Set the current counter number, including names.  
+     *
+     * @param ctr new counter number to set
+     */
+    public void setCounter(int ctr)
+    {
+        counter = ctr;
+        previousName = currentName;
+        currentName = baseName + SEPARATOR + counter + extension;
+    }
+}  // end of class OutputNameManager
+
diff --git a/test/java/src/org/apache/qetest/QetestFactory.java b/test/java/src/org/apache/qetest/QetestFactory.java
new file mode 100644
index 0000000..f70671a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/QetestFactory.java
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.util.Properties;
+
+/**
+ * Factory constructor for various qetest-related objects.  
+ *
+ * Currently only supports finding an appropriate instance 
+ * of a file-based CheckService.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public abstract class QetestFactory
+{
+
+    /** Constant denoting a default CheckService for Files.  */
+    public static final String TYPE_FILES = "QetestFactory.FILECHECK";
+
+    /** Default TYPE_FILES implementation class.  */
+    public static final String DEFAULT_TYPE_FILES = "org.apache.qetest.xsl.XHTFileCheckService";
+
+    /**
+     * Get a new CheckService of a specified type.
+     * 
+     * Currently only supports the TYPE_FILES or your own FQCN.  
+     *
+     * @param type FQCN or constant type of CheckService needed
+     * @return CheckService of the appropriate type; or a fallback 
+     * type if not found and a fallback is available.
+     */
+    public static CheckService newCheckService(Logger logger, String type)
+    {
+        CheckService service = null;
+        if (null == type)
+        {
+            logger.logMsg(Logger.ERRORMSG, "Warning: no type specified for newCheckService!");
+            return null;
+        }
+        else if (TYPE_FILES.equals(type))
+        {
+            // Return our default impl
+            Class fClazz = QetestUtils.testClassForName(DEFAULT_TYPE_FILES, null, null);
+            if (null == fClazz)
+            {
+                logger.logMsg(Logger.ERRORMSG, "Warning: no default fileChecker is available: " + DEFAULT_TYPE_FILES);
+                return null; //@todo should we throw exception instead?
+            }
+
+            try
+            {
+                service = (CheckService)fClazz.newInstance();
+                //logger.logMsg(Logger.TRACEMSG, TYPE_FILES + " is " + service);
+            } 
+            catch (Exception e)
+            {
+                logger.logThrowable(Logger.ERRORMSG, e, "newCheckService(" + TYPE_FILES + ") threw");
+            }
+            return service;
+        }
+        else // Assume a classname of your impl
+        {
+            // Return our default impl
+            Class fClazz = QetestUtils.testClassForName(type, QetestUtils.defaultPackages, null);
+            if (null == fClazz)
+            {
+                logger.logMsg(Logger.ERRORMSG, "Warning: no fileChecker is available of type: " + type);
+                return null; //@todo should we throw exception instead?
+            }
+
+            try
+            {
+                service = (CheckService)fClazz.newInstance();
+                logger.logMsg(Logger.TRACEMSG, TYPE_FILES + " is " + service);
+            } 
+            catch (Exception e)
+            {
+                logger.logThrowable(Logger.ERRORMSG, e, "newCheckService(" + TYPE_FILES + ") threw");
+            }
+            return service;
+        }
+    }
+
+
+    /**
+     * Get a new Reporter with some defaults.
+     * 
+     * Will attempt to initialize the appropriate Reporter
+     * depending on the options passed in; if all else fails, will 
+     * return at least a ConsoleLogger.  
+     *
+     * @param options to create Reporter from
+     * @return appropriate Reporter instance, or a default one.
+     */
+    public static Reporter newReporter(Properties options)
+    {
+        Reporter reporter = null;
+        if (null == options)
+        {
+            // Return a default Reporter
+            reporter = new Reporter(null);
+            reporter.addDefaultLogger();  // add default logger automatically
+            return reporter;
+        }
+
+        // Setup appropriate defaults for the Reporter
+        // Ensure we have an XMLFileLogger if we have a logName
+        String logF = options.getProperty(Logger.OPT_LOGFILE);
+
+        if ((logF != null) && (!logF.equals("")))
+        {
+
+            // We should ensure there's an XMLFileReporter
+            String r = options.getProperty(Reporter.OPT_LOGGERS);
+
+            if (r == null)
+            {
+                // Create the property if needed...
+                options.put(Reporter.OPT_LOGGERS,
+                              "org.apache.qetest.XMLFileLogger");
+            }
+            else if (r.indexOf("XMLFileLogger") <= 0)
+            {
+                // ...otherwise append to existing list
+                options.put(Reporter.OPT_LOGGERS,
+                              r + Reporter.LOGGER_SEPARATOR
+                              + "org.apache.qetest.XMLFileLogger");
+            }
+        }
+
+        // Ensure we have a ConsoleLogger unless asked not to
+        // @todo improve and document this feature
+        String noDefault = options.getProperty("noDefaultReporter");
+
+        if (noDefault == null)
+        {
+
+            // We should ensure there's an XMLFileReporter
+            String r = options.getProperty(Reporter.OPT_LOGGERS);
+
+            if (r == null)
+            {
+                options.put(Reporter.OPT_LOGGERS,
+                              "org.apache.qetest.ConsoleLogger");
+            }
+            else if (r.indexOf("ConsoleLogger") <= 0)
+            {
+                options.put(Reporter.OPT_LOGGERS,
+                              r + Reporter.LOGGER_SEPARATOR
+                              + "org.apache.qetest.ConsoleLogger");
+            }
+        }
+
+        // Pass our options directly to the reporter
+        //  so it can use the same values in initialization
+        // A Reporter will auto-initialize from the values
+        //  in the properties block
+        reporter = new Reporter(options);
+        return reporter;
+    }
+
+
+    /**
+     * Get a new Logger with some defaults.
+     * 
+     * Currently a redirect to call (Logger)newReporter(options).  
+     *
+     * @param options to create Logger from
+     * @return appropriate Logger instance, or a default one.
+     */
+    public static Logger newLogger(Properties options)
+    {
+        return (Logger)newReporter(options);
+    }
+
+
+    /** Prevent instantiation - private constructor.  */
+    private QetestFactory() { /* no-op */ }
+
+}  // end of class CheckService
+
diff --git a/test/java/src/org/apache/qetest/QetestUtils.java b/test/java/src/org/apache/qetest/QetestUtils.java
new file mode 100644
index 0000000..cf42e22
--- /dev/null
+++ b/test/java/src/org/apache/qetest/QetestUtils.java
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+
+/**
+ * Static utility class for both general-purpose testing methods 
+ * and a few XML-specific methods.  
+ * Also provides a simplistic Test/Testlet launching helper 
+ * functionality.  Simply execute this class from the command 
+ * line with a full or partial classname (in the org.apache.qetest 
+ * area, obviously) and we'll load and execute that class instead.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public abstract class QetestUtils
+{
+    // abstract class cannot be instantiated
+
+    /**
+     * Utility method to translate a String filename to URL.  
+     *
+     * Note: This method is not necessarily proven to get the 
+     * correct URL for every possible kind of filename; it should 
+     * be improved.  It handles the most common cases that we've 
+     * encountered when running Conformance tests on Xalan.
+     * Also note, this method does not handle other non-file:
+     * flavors of URLs at all.
+     *
+     * If the name is null, return null.
+     * If the name starts with a common URI scheme (namely the ones 
+     * found in the examples of RFC2396), then simply return the 
+     * name as-is (the assumption is that it's already a URL)
+     * Otherwise we attempt (cheaply) to convert to a file:/// URL.
+     * 
+     * @param String local path\filename of a file
+     * @return a file:/// URL, the same string if it appears to 
+     * already be a URL, or null if error
+     */
+    public static String filenameToURL(String filename)
+    {
+        // null begets null - something like the commutative property
+        if (null == filename)
+            return null;
+
+        // Don't translate a string that already looks like a URL
+        if (isCommonURL(filename))
+            return filename;
+
+        File f = new File(filename);
+        String tmp = null;
+        try
+        {
+            // This normally gives a better path
+            tmp = f.getCanonicalPath();
+        }
+        catch (IOException ioe)
+        {
+            // But this can be used as a backup, for cases 
+            //  where the file does not exist, etc.
+            tmp = f.getAbsolutePath();
+        }
+
+        // URLs must explicitly use only forward slashes
+        if (File.separatorChar == '\\') {
+            tmp = tmp.replace('\\', '/');
+        }
+        // Note the presumption that it's a file reference
+        // Ensure we have the correct number of slashes at the 
+        //  start: we always want 3 /// if it's absolute
+        //  (which we should have forced above)
+        if (tmp.startsWith("/"))
+            return "file://" + tmp;
+        else
+            return "file:///" + tmp;
+
+    }
+
+
+    /**
+     * Utility method to find a relative path.  
+     *
+     * <p>Attempt to find a relative path based from the current 
+     * directory (usually user.dir property).</p>
+     *
+     * <p>If the name is null, return null.  If the name starts 
+     * with a common URI scheme (namely the ones 
+     * found in the examples of RFC2396), then simply return 
+     * the name itself (future work could attempt to detect 
+     * file: protocols if needed).</p>
+     * 
+     * @param String local path\filename of a file
+     * @return a local path\file that is relative; if we can't 
+     * find one, we return the original name
+     */
+    public static String filenameToRelative(String filename)
+    {
+        // null begets null - something like the commutative property
+        if (null == filename)
+            return null;
+
+        // Don't translate a string that already looks like a URL
+        if (isCommonURL(filename))
+            return filename;
+
+        String base = null;
+        try
+        {
+            File userdir = new File(System.getProperty("user.dir"));
+            // Note: use CanonicalPath, since this ensures casing
+            //  will be identical between the two files
+            base = userdir.getCanonicalPath();
+        } 
+        catch (Exception e)
+        {
+            // If we can't detect this, we can't determine 
+            //  relativeness, so just return the name
+            return filename;
+        }
+        File f = new File(filename);
+        String tmp = null;
+        try
+        {
+            tmp = f.getCanonicalPath();
+        }
+        catch (IOException ioe)
+        {
+            tmp = f.getAbsolutePath();
+        }
+
+        // If it's not relative to the base, just return as-is
+        //  (note: this may not be the answer you expect)
+        if (!tmp.startsWith(base))
+            return tmp;
+
+        // Strip off the base
+        tmp = tmp.substring(base.length());
+        // Also strip off any beginning file separator, since we 
+        //  don't want it to be mistaken for an absolute path
+        if (tmp.startsWith(File.separator))
+            return tmp.substring(1);
+        else
+            return tmp;
+    }
+
+
+    /**
+     * Worker method to detect common absolute URLs.  
+     * 
+     * @param s String path\filename or URL (or any, really)
+     * @return true if s starts with a common URI scheme (namely 
+     * the ones found in the examples of RFC2396); false otherwise
+     */
+    protected static boolean isCommonURL(String s)
+    {
+        if (null == s)
+            return false;
+            
+        if (s.startsWith("file:")
+            || s.startsWith("http:")
+            || s.startsWith("ftp:")
+            || s.startsWith("gopher:")
+            || s.startsWith("mailto:")
+            || s.startsWith("news:")
+            || s.startsWith("telnet:")
+           )
+            return true;
+        else
+            return false;
+    }            
+
+
+    /**
+     * Utility method to get a testing Class object.  
+     * This is mainly a bit of syntactic sugar to allow users 
+     * to specify only the end parts of a package.classname 
+     * and still have it loaded.  It basically does a 
+     * Class.forName() search, starting with the provided 
+     * classname, and if not found, searching through a list 
+     * of root packages to try to find the class.
+     *
+     * Note the inherent danger when there are same-named 
+     * classes in different packages, where the behavior will 
+     * depend on the order of searchPackages.
+     *
+     * Commonly called like: 
+     * <code>testClassForName("PerformanceTestlet", 
+     * new String[] {"org.apache.qetest", "org.apache.qetest.xsl" },
+     * "org.apache.qetest.StylesheetTestlet");</code>
+     * 
+     * @param String classname FQCN or partially specified classname
+     * that you wish to load
+     * @param String[] rootPackages a list of packages to search 
+     * for the classname specified in array order; if null then 
+     * we don't search any additional packages
+     * @param String defaultClassname a default known-good FQCN to 
+     * return if the classname was not found
+     *
+     * @return Class object asked for if one found by combining 
+     * clazz with one of the rootPackages; if none, a Class of 
+     * defaultClassname; or null if an error occoured
+     */
+    public static Class testClassForName(String classname, 
+                                         String[] rootPackages,
+                                         String defaultClassname)
+    {
+        // Ensure we have a valid classname, and try it
+        if ((null != classname) && (classname.length() > 0))
+        {
+            // Try just the specified classname, in case it's a FQCN
+            try
+            {
+                return Class.forName(classname);
+            }
+            catch (Exception e)
+            {
+                /* no-op, fall through */
+            }
+
+            // Now combine each of the rootPackages with the classname
+            //  and see if one of them gets loaded
+            if (null != rootPackages)
+            {
+                for (int i = 0; i < rootPackages.length; i++)
+                {
+                    try
+                    {
+                        return Class.forName(rootPackages[i] + "." + classname);
+                    }
+                    catch (Exception e)
+                    {
+                        /* no-op, continue */
+                    }
+                } // end for
+            } // end if rootPackages...
+        } // end if classname...
+
+        // If we fell out here, try the defaultClassname
+        try
+        {
+            return Class.forName(defaultClassname);
+        }
+        catch (Exception e)
+        {
+            // You can't always get you what you want
+            return null;
+        }
+    }
+
+
+    /**
+     * Utility method to get a class name of a test.  
+     * This is mainly a bit of syntactic sugar built on 
+     * top of testClassForName.
+     *
+     * @param String classname FQCN or partially specified classname
+     * that you wish to load
+     * @param String[] rootPackages a list of packages to search 
+     * for the classname specified in array order; if null then 
+     * we don't search any additional packages
+     * @param String defaultClassname a default known-good FQCN to 
+     * return if the classname was not found
+     *
+     * @return name of class that testClassForName returns; 
+     * or null if an error occoured
+     */
+    public static String testClassnameForName(String classname, 
+                                         String[] rootPackages,
+                                         String defaultClassname)
+    {
+        Class clazz = testClassForName(classname, rootPackages, defaultClassname);
+        if (null == clazz)
+            return null;
+        else
+            return clazz.getName();
+    }
+
+
+    /**
+     * Utility method to create a unique runId.  
+     * 
+     * This is used to construct a theoretically unique Id for 
+     * each run of a test script.  It is used later in some results 
+     * analysis stylesheets to create comparative charts showing 
+     * differences in results and timing data from one run of 
+     * a test to another.
+     *
+     * Current format: MMddHHmm[;baseId]
+     * where baseId is not used if null.
+     * 
+     * @param String Id base to start with
+     * 
+     * @return String Id to use; will include a timestamp
+     */
+    public static String createRunId(String baseId)
+    {
+        java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat ("MMddHHmm");
+        if (null != baseId)
+            //return formatter.format(new java.util.Date())+ ";" + baseId;
+            return baseId + ":" + formatter.format(new java.util.Date());
+        else
+            return formatter.format(new java.util.Date());
+    }
+
+
+    /**
+     * Utility method to get info about the environment.  
+     * 
+     * This is a simple way to get a Hashtable about the current 
+     * JVM's environment from either Xalan's EnvironmentCheck 
+     * utility or from org.apache.env.Which.
+     *
+     * @return Hashtable with info about the environment
+     */
+    public static Hashtable getEnvironmentHash()
+    {
+        Hashtable hash = new Hashtable();
+        // Attempt to use Which, which will be better supported
+        Class clazz = testClassForName("org.apache.env.Which", null, null);
+
+        try
+        {
+            if (null != clazz)
+            {
+                // Call Which's method to fill hash
+                final Class whichSignature[] = 
+                        { Hashtable.class, String.class, String.class };
+                Method which = clazz.getMethod("which", whichSignature);
+                String projects = "";
+                String options = "";
+                Object whichArgs[] = { hash, projects, options };
+                which.invoke(null, whichArgs);
+            }
+            else
+            {
+                // Use Xalan's EnvironmentCheck
+                clazz = testClassForName("org.apache.xalan.xslt.EnvironmentCheck", null, null);
+                if (null != clazz)
+                {
+                    Object envCheck = clazz.newInstance();
+                    final Class getSignature[] = { };
+                    Method getHash = clazz.getMethod("getEnvironmentHash", getSignature);
+
+                    Object getArgs[] = { }; // empty
+                    hash = (Hashtable)getHash.invoke(envCheck, getArgs);
+                }
+            }
+        } 
+        catch (Throwable t)
+        {
+            hash.put("FATAL-ERROR", "QetestUtils.getEnvironmentHash no services available; " + t.toString());
+            t.printStackTrace();
+        }
+        return hash;
+    }
+
+
+    /**
+     * Main method to run from the command line - this acts 
+     * as a cheap launching mechanisim for Xalan tests.  
+     * 
+     * Simply finds the class specified in the first argument, 
+     * instantiates one, and passes it any remaining command 
+     * line arguments we were given.  
+     * The primary motivation here is to provide a simpler 
+     * command line for inexperienced  users.  You can either 
+     * pass the FQCN, or just the classname and it will still 
+     * get run.  Note the one danger is the order of package 
+     * lookups and the potential for the wrong class to run 
+     * when we have identically named classes in different 
+     * packages - but this will usually work!
+     * 
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        if (args.length < 1)
+        {
+            System.err.println("QetestUtils.main() ERROR in usage: must have at least one arg: classname [options]");
+            return;
+        }
+
+        // Get the class specified by the first arg...
+        Class clazz = QetestUtils.testClassForName(
+                args[0], defaultPackages, null); // null = no default class
+        if (null == clazz)
+        {
+            System.err.println("QetestUtils.main() ERROR: Could not find class:" + args[0]);
+            return;
+        }
+
+        try
+        {
+            // ...find the main() method...
+            Class[] parameterTypes = new Class[1];
+            parameterTypes[0] = java.lang.String[].class;
+            java.lang.reflect.Method main = clazz.getMethod("main", parameterTypes);
+            
+            // ...copy over our remaining cmdline args...
+            final String[] appArgs = new String[(args.length) == 1 ? 0 : args.length - 1];
+            if (args.length > 1)
+            {
+                System.arraycopy(args, 1, 
+                                 appArgs, 0, 
+                                 args.length - 1);
+            }
+
+            // ...and execute the method!
+            Object[] mainArgs = new Object[1];
+            mainArgs[0] = appArgs;
+            main.invoke(null, mainArgs);
+        }
+        catch (Throwable t)
+        {
+            System.err.println("QetestUtils.main() ERROR: running " + args[0] 
+                    + ".main() threw: " + t.toString());
+            t.printStackTrace();
+        }        
+    }
+
+
+    /** 
+     * Default list of packages for xml-xalan tests.  
+     * Technically this is Xalan-specific and should really be 
+     * in some other directory, but I'm being lazy tonight.
+     * This looks for Xalan-related tests in the following 
+     * packages in <b>this order</b>:
+     * <ul>
+     * <li>org.apache.qetest.xsl</li>
+     * <li>org.apache.qetest.xalanj2</li>
+     * <li>org.apache.qetest.trax</li>
+     * <li>org.apache.qetest.trax.dom</li>
+     * <li>org.apache.qetest.trax.sax</li>
+     * <li>org.apache.qetest.trax.stream</li>
+     * <li>org.apache.qetest.xslwrapper</li>
+     * <li>org.apache.qetest.xalanj1</li>
+     * <li>org.apache.qetest</li>
+     * <li>org.apache.qetest.qetesttest</li>
+     * </ul>
+     * Note the normal naming convention for automated tests 
+     * is either *Test.java or *Testlet.java; although this is 
+     * not required, it will make it easier to write simple 
+     * test discovery mechanisims.
+     */
+    public static final String[] defaultPackages = 
+    {
+        "org.apache.qetest.xsl", 
+        "org.apache.qetest.xalanj2", 
+        "org.apache.qetest.trax", 
+        "org.apache.qetest.trax.dom", 
+        "org.apache.qetest.trax.sax", 
+        "org.apache.qetest.trax.stream", 
+        "org.apache.qetest.xslwrapper", 
+        "org.apache.qetest.dtm", 
+        "org.apache.qetest.xalanj1", 
+        "org.apache.qetest",
+        "org.apache.qetest.qetesttest" 
+    };
+
+}
diff --git a/test/java/src/org/apache/qetest/Reporter.java b/test/java/src/org/apache/qetest/Reporter.java
new file mode 100644
index 0000000..34efd06
--- /dev/null
+++ b/test/java/src/org/apache/qetest/Reporter.java
@@ -0,0 +1,2271 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * Reporter.java
+ *
+ */
+package org.apache.qetest;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+/**
+ * Class defining how a test can report results including convenience methods.
+ * <p>Tests generally interact with a Reporter, which turns around to call
+ * a Logger to actually store the results.  The Reporter serves as a
+ * single funnel for all results, hiding both the details and number of
+ * actual loggers that might currently be turned on (file, screen, network,
+ * etc.) from the test that created us.</p>
+ * <p>Note that Reporter adds numerous convenience methods that, while they
+ * are not strictly necessary to express a test's results, make coding
+ * tests much easier.  Reporter is designed to be subclassed for your
+ * particular application; in general you only need to provide setup mechanisims
+ * specific to your testing/product environment.</p>
+ * @todo all methods should check that available loggers are OK
+ * @todo explain better how results are rolled up and calculated
+ * @author Shane_Curcuru@lotus.com
+ * @author Jo_Grant@lotus.com
+ * @version $Id$
+ */
+public class Reporter implements Logger
+{
+
+    /**
+     * Parameter: (optional) Name of results summary file.
+     * <p>This is a custom parameter optionally used in writeResultsStatus.</p>
+     */
+    public static final String OPT_SUMMARYFILE = "summaryFile";
+
+
+    /**
+     * Constructor calls initialize(p).
+     * @param p Properties block to initialize us with.
+     */
+    public Reporter(Properties p)
+    {
+        ready = initialize(p);
+    }
+
+    /** If we're ready to start outputting yet. */
+    protected boolean ready = false;
+
+    //-----------------------------------------------------
+    //-------- Implement Logger Control and utility routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Return a description of what this Logger/Reporter does.
+     * @author Shane_Curcuru@lotus.com
+     * @return description of how this Logger outputs results, OR
+     * how this Reporter uses Loggers, etc..
+     */
+    public String getDescription()
+    {
+        return "Reporter: default reporter implementation";
+    }
+
+    /**
+     * Returns information about the Property name=value pairs that
+     * are understood by this Logger/Reporter.
+     * @author Shane_Curcuru@lotus.com
+     * @return same as {@link java.applet.Applet.getParameterInfo}.
+     */
+    public String[][] getParameterInfo()
+    {
+
+        String pinfo[][] =
+        {
+            { OPT_LOGGERS, "String", "FQCN of Loggers to add" },
+            { OPT_LOGFILE, "String",
+              "Name of file to use for file-based Logger output" },
+            { OPT_LOGGINGLEVEL, "int",
+              "to setLoggingLevel() to control amount of output" },
+            { OPT_PERFLOGGING, "boolean",
+              "if we should log performance data as well" },
+            { OPT_INDENT, "int",
+              "number of spaces to indent for supporting Loggers" },
+            { OPT_DEBUG, "boolean", "generic debugging flag" }
+        };
+
+        return pinfo;
+    }
+
+    /**
+     * Accessor methods for a properties block.
+     * @return our Properties block.
+     * @todo should this clone first?
+     */
+    public Properties getProperties()
+    {
+        return reporterProps;
+    }
+
+    /**
+     * Accessor methods for a properties block.
+     * Always having a Properties block allows users to pass common
+     * options to a Logger/Reporter without having to know the specific
+     * 'properties' on the object.
+     * <p>Much like in Applets, users can call getParameterInfo() to
+     * find out what kind of properties are available.  Callers more
+     * commonly simply call initialize(p) instead of setProperties(p)</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param p Properties to set (should be cloned).
+     */
+    public void setProperties(Properties p)
+    {
+        if (p != null)
+            reporterProps = (Properties) p.clone();
+    }
+
+    /**
+     * Call once to initialize this Logger/Reporter from Properties.
+     * <p>Simple hook to allow Logger/Reporters with special output
+     * items to initialize themselves.</p>
+     *
+     * @author Shane_Curcuru@lotus.com
+     * @param p Properties block to initialize from.
+     * @param status, true if OK, false if an error occoured.
+     */
+    public boolean initialize(Properties p)
+    {
+
+        setProperties(p);
+
+        String dbg = reporterProps.getProperty(OPT_DEBUG);
+
+        if ((dbg != null) && dbg.equalsIgnoreCase("true"))
+        {
+            setDebug(true);
+        }
+
+        String perf = reporterProps.getProperty(OPT_PERFLOGGING);
+
+        if ((perf != null) && perf.equalsIgnoreCase("true"))
+        {
+            setPerfLogging(true);
+        }
+
+        // int values need to be parsed
+        String logLvl = reporterProps.getProperty(OPT_LOGGINGLEVEL);
+
+        if (logLvl != null)
+        {
+            try
+            {
+                setLoggingLevel(Integer.parseInt(logLvl));
+            }
+            catch (NumberFormatException numEx)
+            { /* no-op */
+            }
+        }
+
+        // Add however many loggers are askedfor
+        boolean b = true;
+        StringTokenizer st =
+            new StringTokenizer(reporterProps.getProperty(OPT_LOGGERS),
+                                LOGGER_SEPARATOR);
+        int i;
+
+        for (i = 0; st.hasMoreTokens(); i++)
+        {
+            String temp = st.nextToken();
+
+            if ((temp != null) && (temp.length() > 1))
+            {
+                b &= addLogger(temp, reporterProps);
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Is this Logger/Reporter ready to log results?
+     * @author Shane_Curcuru@lotus.com
+     * @return status - true if it's ready to report, false otherwise
+     * @todo should we check our contained Loggers for their status?
+     */
+    public boolean isReady()
+    {
+        return ready;
+    }
+
+    /**
+     * Flush this Logger/Reporter - should ensure all output is flushed.
+     * Note that the flush operation is not necessarily pertinent to
+     * all types of Logger/Reporter - console-type Loggers no-op this.
+     * @author Shane_Curcuru@lotus.com
+     */
+    public void flush()
+    {
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].flush();
+        }
+    }
+
+    /**
+     * Close this Logger/Reporter - should include closing any OutputStreams, etc.
+     * Logger/Reporters should return isReady() = false after closing.
+     * @author Shane_Curcuru@lotus.com
+     */
+    public void close()
+    {
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].close();
+        }
+    }
+
+    /**
+     * Generic properties for this Reporter.
+     * <p>Use a Properties block to make it easier to add new features
+     * and to be able to pass data to our loggers.  Any properties that
+     * we recognize will be set here, and the entire block will be passed
+     * to any loggers that we control.</p>
+     */
+    protected Properties reporterProps = new Properties();
+
+    /**
+     * This determines the amount of data actually logged out to results.
+     * <p>Setting this higher will result in more data being logged out.
+     * Values range from Reporter.CRITICALMSG (0) to TRACEMSG (60).
+     * For non-performance-critical testing, you may wish to set this high,
+     * so all data gets logged, and then use reporting tools on the test output
+     * to filter for human use (since the appropriate level is stored with
+     * every logMsg() call)</p>
+     * @see #logMsg(int, java.lang.String)
+     */
+    protected int loggingLevel = DEFAULT_LOGGINGLEVEL;
+
+    /**
+     * Marker that a testcase is currently running.
+     * <p>NEEDSWORK: should do a better job of reporting results in cases
+     * where users might not call testCaseInit/testCaseClose in non-nested pairs.</p>
+     */
+    protected boolean duringTestCase = false;
+
+    /**
+     * Flag if we should force loggers closed upon testFileClose.
+     * <p>Default: true.  Standalone tests can leave this alone.
+     * Test Harnesses may want to reset this so they can have multiple
+     * file results in one actual output 'file' for file-based loggers.</p>
+     */
+    protected boolean closeOnFileClose = true;
+
+    /**
+     * Accessor method for closeOnFileClose.  
+     *
+     * @return our value for closeOnFileClose
+     */
+    public boolean getCloseOnFileClose()
+    {
+        return closeOnFileClose;
+    }
+
+    /**
+     * Accessor method for closeOnFileClose.  
+     *
+     * @param b value to set for closeOnFileClose
+     */
+    public void setCloseOnFileClose(boolean b)
+    {
+        closeOnFileClose = b;
+    }
+
+    //-----------------------------------------------------
+    //-------- Test results computation members and methods --------
+    //-----------------------------------------------------
+
+    /** Name of the current test. */
+    protected String testName;
+
+    /** Description of the current test. */
+    protected String testComment;
+
+    /** Number of current case within a test, usually automatically calculated. */
+    protected int caseNum;
+
+    /** Description of current case within a test. */
+    protected String caseComment;
+
+    /** Overall test result of current test, automatically calculated. */
+    protected int testResult;
+
+    /** Overall test result of current testcase, automatically calculated. */
+    protected int caseResult;
+
+    /**
+     * Counters for overall number of results - passes, fails, etc.
+     * @todo update this if we use TestResult objects
+     */
+    protected static final int FILES = 0;
+
+    /** NEEDSDOC Field CASES          */
+    protected static final int CASES = 1;
+
+    /** NEEDSDOC Field CHECKS          */
+    protected static final int CHECKS = 2;
+
+    /** NEEDSDOC Field MAX_COUNTERS          */
+    protected static final int MAX_COUNTERS = CHECKS + 1;
+
+    /**
+     * Counters for overall number of results - passes, fails, etc.
+     * @todo update this if we use TestResult objects
+     */
+    protected int[] incpCount = new int[MAX_COUNTERS];
+
+    /** NEEDSDOC Field passCount          */
+    protected int[] passCount = new int[MAX_COUNTERS];
+
+    /** NEEDSDOC Field ambgCount          */
+    protected int[] ambgCount = new int[MAX_COUNTERS];
+
+    /** NEEDSDOC Field failCount          */
+    protected int[] failCount = new int[MAX_COUNTERS];
+
+    /** NEEDSDOC Field errrCount          */
+    protected int[] errrCount = new int[MAX_COUNTERS];
+    
+
+    //-----------------------------------------------------
+    //-------- Composite Pattern Variables And Methods --------
+    //-----------------------------------------------------
+
+    /**
+     * Optimization: max number of loggers, stored in an array.
+     * <p>This is a design decision: normally, you might use a ConsoleReporter,
+     * some sort of file-based one, and maybe a network-based one.</p>
+     */
+    protected int MAX_LOGGERS = 3;
+
+    /**
+     * Array of loggers to whom we pass results.
+     * <p>Store our loggers in an array for optimization, since we want
+     * logging calls to take as little time as possible.</p>
+     */
+    protected Logger[] loggers = new Logger[MAX_LOGGERS];
+
+    /** NEEDSDOC Field numLoggers          */
+    protected int numLoggers = 0;
+
+    /**
+     * Add a new Logger to our array, optionally initializing it with Properties.
+     * <p>Store our Loggers in an array for optimization, since we want
+     * logging calls to take as little time as possible.</p>
+     * @todo enable users to add more than MAX_LOGGERS
+     * @author Gang Of Four
+     * @param rName fully qualified class name of Logger to add.
+     * @param p (optional) Properties block to initialize the Logger with.
+     * @return status - true if successful, false otherwise.
+     */
+    public boolean addLogger(String rName, Properties p)
+    {
+
+        if ((rName == null) || (rName.length() < 1))
+            return false;
+
+        debugPrintln("addLogger(" + numLoggers + ", " + rName + " ...)");
+
+        if ((numLoggers + 1) > loggers.length)
+        {
+
+            // @todo enable users to add more than MAX_LOGGERS
+            return false;
+        }
+
+        // Attempt to add Logger to our list
+        Class rClass;
+        Constructor rCtor;
+
+        try
+        {
+            rClass = Class.forName(rName);
+
+            debugPrintln("rClass is " + rClass.toString());
+
+            if (p == null)
+
+            // @todo should somehow pass along our own props as well
+            // Need to ensure Reporter and callers of this method always 
+            //  coordinate the initialization of the Loggers we hold
+            {
+                loggers[numLoggers] = (Logger) rClass.newInstance();
+            }
+            else
+            {
+                Class[] parameterTypes = new Class[1];
+
+                parameterTypes[0] = java.util.Properties.class;
+                rCtor = rClass.getConstructor(parameterTypes);
+
+                Object[] initArgs = new Object[1];
+
+                initArgs[0] = (Object) p;
+                loggers[numLoggers] = (Logger) rCtor.newInstance(initArgs);
+            }
+        }
+        catch (Exception e)
+        {
+
+            // @todo should we inform user why it failed?
+            // Note: the logMsg may fail since we might not have any reporters at this point!
+            debugPrintln("addLogger exception: " + e.toString());
+            logCriticalMsg("addLogger exception: " + e.toString());
+            logThrowable(CRITICALMSG, e, "addLogger exception:");
+
+            return false;
+        }
+
+        // Increment counter for later use
+        numLoggers++;
+
+        return true;
+    }
+
+    /**
+     * Return an Hashtable of all active Loggers.
+     * @todo revisit; perhaps use a Vector
+     * @reurns Hash of all active Loggers; null if none
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public Hashtable getLoggers()
+    {
+
+        // Optimization
+        if (numLoggers == 0)
+            return (null);
+
+        Hashtable temp = new Hashtable();
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            temp.put(loggers[i].getClass().getName(), loggers[i]);
+        }
+
+        return temp;
+    }
+
+    /**
+     * Add the default Logger to this Reporter, whatever it is.
+     * <p>Only adds the Logger if numLoggers <= 0; if the user has already
+     * setup another Logger, this is a no-op (for the testwriter who doesn't
+     * want the performance hit or annoyance of having Console output)</p>
+     * @author Gang Of Four
+     * @return status - true if successful, false otherwise.
+     */
+    public boolean addDefaultLogger()
+    {
+
+        // Optimization - return true, since they already have a logger
+        if (numLoggers > 0)
+            return true;
+
+        return addLogger(DEFAULT_LOGGER, reporterProps);
+    }
+
+    //-----------------------------------------------------
+    //-------- Testfile / Testcase start and stop routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Call once to initialize your Loggers for your test file.
+     * Also resets test name, result, case results, etc.
+     * <p>Currently, you must init/close your test file before init/closing
+     * any test cases.  No checking is currently done to ensure that
+     * mismatched test files are not nested.  This is an area that needs
+     * design decisions and some work eventually to be a really clean design.</p>
+     * <p>Not only do nested testfiles/testcases have implications for good
+     * testing practices, they may also have implications for various Loggers,
+     * especially XML or other ones with an implicit hierarcy in the reports.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param name file name or tag specifying the test.
+     * @param comment comment about the test.
+     */
+    public void testFileInit(String name, String comment)
+    {
+
+        testName = name;
+        testComment = comment;
+        testResult = DEFAULT_RESULT;
+        caseNum = 0;
+        caseComment = null;
+        caseResult = DEFAULT_RESULT;
+        duringTestCase = false;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].testFileInit(testName, testComment);
+        }
+
+        // Log out time whole test script starts
+        // Note there is a slight delay while logPerfMsg calls all reporters
+        long t = System.currentTimeMillis();
+
+        logPerfMsg(TEST_START, t, testName);
+    }
+
+    /**
+     * Call once to close out your test and summate results.
+     * <p>will close an open testCase before closing the file.  May also
+     * force all Loggers closed if getCloseOnFileClose() (which may imply
+     * that no more output will be logged to file-based reporters)</p>
+     * @author Shane_Curcuru@lotus.com
+     * @todo make this settable as to how/where the resultsCounters get output
+     */
+    public void testFileClose()
+    {
+
+        // Cache the time whole test script ends
+        long t = System.currentTimeMillis();
+
+        if (duringTestCase)
+        {
+
+            // Either user messed up (forgot to call testCaseClose) or something went wrong
+            logErrorMsg("WARNING! testFileClose when duringTestCase=true!");
+
+            // Force call to testCaseClose()
+            testCaseClose();
+        }
+
+        // Actually log the time the test script ends after closing any potentially open testcases
+        logPerfMsg(TEST_STOP, t, testName);
+
+        // Increment our results counters 
+        incrementResultCounter(FILES, testResult);
+
+        // Print out an overall count of results by type
+        // @todo make this settable as to how/where the resultsCounters get output
+        logResultsCounters();
+
+        // end this testfile - finish up any reporting we need to
+        for (int i = 0; i < numLoggers; i++)
+        {
+
+            // Log we're done and then flush
+            loggers[i].testFileClose(testComment, resultToString(testResult));
+            loggers[i].flush();
+
+            // Only close each reporter if asked to; this implies we're done
+            //  and can't perform any more logging ourselves (or our reporters)
+            if (getCloseOnFileClose())
+            {
+                loggers[i].close();
+            }
+        }
+
+        // Note: explicitly leave testResult, caseResult, etc. set for debugging
+        //       purposes or for use by external test harnesses
+    }
+
+    /**
+     * Implement Logger-only method.
+     * <p>Here, a Reporter is simply acting as a logger: so don't
+     * summate any results, do performance measuring, or anything
+     * else, just pass the call through to our Loggers.
+     * @param msg message to log out
+     * @param result result of testfile
+     */
+    public void testFileClose(String msg, String result)
+    {
+
+        if (duringTestCase)
+        {
+
+            // Either user messed up (forgot to call testCaseClose) or something went wrong
+            logErrorMsg("WARNING! testFileClose when duringTestCase=true!");
+
+            // Force call to testCaseClose()
+            testCaseClose();
+        }
+
+        // end this testfile - finish up any reporting we need to
+        for (int i = 0; i < numLoggers; i++)
+        {
+
+            // Log we're done and then flush
+            loggers[i].testFileClose(testComment, resultToString(testResult));
+            loggers[i].flush();
+
+            // Only close each reporter if asked to; this implies we're done
+            //  and can't perform any more logging ourselves (or our reporters)
+            if (getCloseOnFileClose())
+            {
+                loggers[i].close();
+            }
+        }
+    }
+
+    /**
+     * Call once to start each test case; logs out testcase number and your comment.
+     * <p>Testcase numbers are calculated as integers incrementing from 1.  Will
+     * also close any previously init'd but not closed testcase.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @todo investigate tieing this to the actual testCase methodnames,
+     * instead of blindly incrementing the counter
+     * @param comment short description of this test case's objective.
+     */
+    public void testCaseInit(String comment)
+    {
+
+        if (duringTestCase)
+        {
+
+            // Either user messed up (forgot to call testCaseClose) or something went wrong
+            logErrorMsg("WARNING! testCaseInit when duringTestCase=true!");
+
+            // Force call to testCaseClose()
+            testCaseClose();
+        }
+
+        caseNum++;
+
+        caseComment = comment;
+        caseResult = DEFAULT_RESULT;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].testCaseInit(String.valueOf(caseNum) + " "
+                                    + caseComment);
+        }
+
+        duringTestCase = true;
+
+        // Note there is a slight delay while logPerfMsg calls all reporters
+        long t = System.currentTimeMillis();
+
+        logPerfMsg(CASE_START, t, caseComment);
+    }
+
+    /**
+     * Call once to end each test case and sub-summate results.
+     * @author Shane_Curcuru@lotus.com
+     */
+    public void testCaseClose()
+    {
+
+        long t = System.currentTimeMillis();
+
+        logPerfMsg(CASE_STOP, t, caseComment);
+
+        if (!duringTestCase)
+        {
+            logErrorMsg("WARNING! testCaseClose when duringTestCase=false!");
+
+            // Force call to testCaseInit()
+            // NEEDSWORK: should we really do this?  This ensures any results
+            //            are well-formed, however a user might not expect this.
+            testCaseInit("WARNING! testCaseClose when duringTestCase=false!");
+        }
+
+        duringTestCase = false;
+        testResult = java.lang.Math.max(testResult, caseResult);
+
+        // Increment our results counters 
+        incrementResultCounter(CASES, caseResult);
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].testCaseClose(
+                String.valueOf(caseNum) + " " + caseComment,
+                resultToString(caseResult));
+        }
+    }
+
+    /**
+     * Implement Logger-only method.
+     * <p>Here, a Reporter is simply acting as a logger: so don't
+     * summate any results, do performance measuring, or anything
+     * else, just pass the call through to our Loggers.
+     * @param msg message of name of test case to log out
+     * @param result result of testfile
+     */
+    public void testCaseClose(String msg, String result)
+    {
+
+        if (!duringTestCase)
+        {
+            logErrorMsg("WARNING! testCaseClose when duringTestCase=false!");
+
+            // Force call to testCaseInit()
+            // NEEDSWORK: should we really do this?  This ensures any results
+            //            are well-formed, however a user might not expect this.
+            testCaseInit("WARNING! testCaseClose when duringTestCase=false!");
+        }
+
+        duringTestCase = false;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].testCaseClose(
+                String.valueOf(caseNum) + " " + caseComment,
+                resultToString(caseResult));
+        }
+    }
+
+    /**
+     * Calls back into a Test to run test cases in order.
+     * <p>Use reflection to call back and execute each testCaseXX method
+     * in the calling test in order, catching exceptions along the way.</p>
+     * //@todo rename to 'executeTestCases' or something
+     * //@todo implement options: either an inclusion or exclusion list
+     * @author Shane Curcuru
+     * @param testObject the test object itself.
+     * @param numTestCases number of consecutively numbered test cases to execute.
+     * @param options (future use: options to pass to testcases)
+     * @return status, true if OK, false if big bad error occoured
+     */
+    public boolean executeTests(Test testObject, int numTestCases,
+                                Object options)
+    {
+
+        // Flag denoting if we've had any errors
+        boolean gotException = false;
+
+        // Declare all needed java variables
+        String tmpErrString = "executeTests: no errors yet";
+        Object noArgs[] = new Object[0];  // use options instead
+        Class noParams[] = new Class[0];
+        Method currTestCase;
+        Class testClass;
+
+        // Get class reference for the test applet itself
+        testClass = testObject.getClass();
+
+        logTraceMsg("executeTests: running " + numTestCases + " tests now.");
+
+        for (int tcNum = 1; tcNum <= numTestCases; tcNum++)
+        {
+            try
+            {  // get a reference to the next test case that we'll be calling
+                tmpErrString = "executeTests: No such method: testCase"
+                               + tcNum + "()";
+                currTestCase = testClass.getMethod("testCase" + tcNum,
+                                                   noParams);
+
+                // Now directly invoke that test case
+                tmpErrString =
+                    "executeTests: Method threw an exception: testCase"
+                    + tcNum + "(): ";
+
+                logTraceMsg("executeTests: invoking testCase" + tcNum
+                            + " now.");
+                currTestCase.invoke(testObject, noArgs);
+            }
+            catch (InvocationTargetException ite)
+            {
+                // Catch any error, log it as an error, and allow next test case to run
+                gotException = true;
+                testResult = java.lang.Math.max(ERRR_RESULT, testResult);
+                tmpErrString += ite.toString();
+                logErrorMsg(tmpErrString);
+
+                // Grab the contained error, log it if available 
+                java.lang.Throwable containedThrowable =
+                    ite.getTargetException();
+                if (containedThrowable != null)
+                {
+                    logThrowable(ERRORMSG, containedThrowable, tmpErrString + "(1)");
+                }
+                logThrowable(ERRORMSG, ite, tmpErrString + "(2)");
+            }  // end of catch
+            catch (Throwable t)
+            {
+                // Catch any error, log it as an error, and allow next test case to run
+                gotException = true;
+                testResult = java.lang.Math.max(ERRR_RESULT, testResult);
+                tmpErrString += t.toString();
+                logErrorMsg(tmpErrString);
+                logThrowable(ERRORMSG, t, tmpErrString);
+            }  // end of catch
+        }  // end of for
+
+        // Convenience functionality: remind user if they appear to 
+        //  have set numTestCases too low 
+        try
+        {  
+            // Get a reference to the *next* test case after numTestCases
+            int moreTestCase = numTestCases + 1;
+            currTestCase = testClass.getMethod("testCase" + moreTestCase, noParams);
+
+            // If we get here, we found another testCase - warn the user
+            logWarningMsg("executeTests: extra testCase"+ moreTestCase
+                          + " found, perhaps numTestCases is too low?");
+        }
+        catch (Throwable t)
+        {
+            // Ignore errors: we don't care, since they didn't 
+            //  ask us to look for this method anyway
+        }
+
+        // Return true only if everything passed
+        if (testResult == PASS_RESULT)
+            return true;
+        else
+            return false;
+    }  // end of executeTests
+
+    //-----------------------------------------------------
+    //-------- Test results logging routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Accessor for loggingLevel, determines what level of log*() calls get output.
+     * @return loggingLevel, as an int.
+     */
+    public int getLoggingLevel()
+    {
+        return loggingLevel;
+    }
+
+    /**
+     * Accessor for loggingLevel, determines what level of log*() calls get output.
+     * @param setLL loggingLevel; normalized to be between CRITICALMSG and TRACEMSG.
+     */
+    public void setLoggingLevel(int setLL)
+    {
+
+        if (setLL < CRITICALMSG)
+        {
+            loggingLevel = CRITICALMSG;
+        }
+        else if (setLL > TRACEMSG)
+        {
+            loggingLevel = TRACEMSG;
+        }
+        else
+        {
+            loggingLevel = setLL;
+        }
+    }
+
+    /**
+     * Report a comment to result file with specified severity.
+     * <p>Works in conjunction with {@link #loggingLevel };
+     * only outputs messages that are more severe (i.e. lower)
+     * than the current logging level.</p>
+     * <p>Note that some Loggers may limit the comment string,
+     * either in overall length or by stripping any linefeeds, etc.
+     * This is to allow for optimization of file or database-type
+     * reporters with fixed fields.  Users who need to log out
+     * special string data should use logArbitrary() instead.</p>
+     * <p>Remember, use {@link #check(String, String, String)
+     * various check*() methods} to report the actual results
+     * of your tests.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message.
+     * @param msg comment to log out.
+     * @see #loggingLevel
+     */
+    public void logMsg(int level, String msg)
+    {
+
+        if (level > loggingLevel)
+            return;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].logMsg(level, msg);
+        }
+    }
+
+    /**
+     * Report an arbitrary String to result file with specified severity.
+     * Log out the String provided exactly as-is.
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity or class of message.
+     * @param msg arbitrary String to log out.
+     */
+    public void logArbitrary(int level, String msg)
+    {
+
+        if (level > loggingLevel)
+            return;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].logArbitrary(level, msg);
+        }
+    }
+
+    /**
+     * Logs out statistics to result file with specified severity.
+     * <p>This is a general-purpose way to log out numeric statistics.  We accept
+     * both a long and a double to allow users to save whatever kind of numbers
+     * they need to, with the simplest API.  The actual meanings of the numbers
+     * are dependent on the implementer.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message.
+     * @param lVal statistic in long format.
+     * @param dVal statistic in doubleformat.
+     * @param msg comment to log out.
+     */
+    public void logStatistic(int level, long lVal, double dVal, String msg)
+    {
+
+        if (level > loggingLevel)
+            return;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].logStatistic(level, lVal, dVal, msg);
+        }
+    }
+
+    /**
+     * Logs out a element to results with specified severity.
+     * This method is primarily for reporters that output to fixed
+     * structures, like files, XML data, or databases.
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message.
+     * @param element name of enclosing element
+     * @param attrs hash of name=value attributes
+     * @param msg Object to log out; up to reporters to handle
+     * processing of this; usually logs just .toString().
+     */
+    public void logElement(int level, String element, Hashtable attrs,
+                           Object msg)
+    {
+
+        if (level > loggingLevel)
+            return;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].logElement(level, element, attrs, msg);
+        }
+    }
+
+    /**
+     * Logs out Throwable.toString() and a stack trace of the 
+     * Throwable with the specified severity.
+     * <p>Works in conjuntion with {@link #setLoggingLevel(int)}; 
+     * only outputs messages that are more severe than the current 
+     * logging level.</p>
+     * <p>This uses logArbitrary to log out your msg - message, 
+     * a newline, throwable.toString(), a newline,
+     * and then throwable.printStackTrace().</p>
+     * <p>Note that this does not imply a failure or problem in 
+     * a test in any way: many tests may want to verify that 
+     * certain exceptions are thrown, etc.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message.
+     * @param throwable throwable/exception to log out.
+     * @param msg description of the throwable.
+     */
+    public void logThrowable(int level, Throwable throwable, String msg)
+    {
+
+        if (level > loggingLevel)
+            return;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].logThrowable(level, throwable, msg);
+        }
+    }
+
+    /**
+     * Logs out contents of a Hashtable with specified severity.
+     * <p>Works in conjuntion with setLoggingLevel(int); only outputs messages that
+     * are more severe than the current logging level.</p>
+     * <p>Loggers should store or log the full contents of the hashtable.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message.
+     * @param hash Hashtable to log the contents of.
+     * @param msg description of the Hashtable.
+     */
+    public void logHashtable(int level, Hashtable hash, String msg)
+    {
+        if (level > loggingLevel)
+          return;
+        
+        // Don't log anyway if level is 10 or less.
+        //@todo revisit this decision: I don't like having special
+        //  rules like this to exclude output.  On the other hand, 
+        //  if the user set loggingLevel this low, they really don't 
+        //  want much output coming out, and hashtables are big
+        if (loggingLevel <= 10)
+            return;
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].logHashtable(level, hash, msg);
+        }
+    }
+
+    /**
+     * Logs out an critical a comment to results; always printed out.
+     * @author Shane_Curcuru@lotus.com
+     * @param msg comment to log out.
+     */
+    public void logCriticalMsg(String msg)
+    {
+        logMsg(CRITICALMSG, msg);
+    }
+
+    // There is no logFailsOnlyMsg(String msg) method
+
+    /**
+     * Logs out an error a comment to results.
+     * <p>Note that subclassed libraries may choose to override to
+     * cause a fail to happen along with printing out the message.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param msg comment to log out.
+     */
+    public void logErrorMsg(String msg)
+    {
+        logMsg(ERRORMSG, msg);
+    }
+
+    /**
+     * Logs out a warning a comment to results.
+     * @author Shane_Curcuru@lotus.com
+     * @param msg comment to log out.
+     */
+    public void logWarningMsg(String msg)
+    {
+        logMsg(WARNINGMSG, msg);
+    }
+
+    /**
+     * Logs out an status a comment to results.
+     * @author Shane_Curcuru@lotus.com
+     * @param msg comment to log out.
+     */
+    public void logStatusMsg(String msg)
+    {
+        logMsg(STATUSMSG, msg);
+    }
+
+    /**
+     * Logs out an informational a comment to results.
+     * @author Shane_Curcuru@lotus.com
+     * @param msg comment to log out.
+     */
+    public void logInfoMsg(String msg)
+    {
+        logMsg(INFOMSG, msg);
+    }
+
+    /**
+     * Logs out an trace a comment to results.
+     * @author Shane_Curcuru@lotus.com
+     * @param msg comment to log out.
+     */
+    public void logTraceMsg(String msg)
+    {
+        logMsg(TRACEMSG, msg);
+    }
+
+    //-----------------------------------------------------
+    //-------- Test results reporting check* routines --------
+    //-----------------------------------------------------
+    // There is no public void checkIncp(String comment) method
+
+    /* EXPERIMENTAL: have duplicate set of check*() methods 
+       that all output some form of ID as well as comment. 
+       Leave the non-ID taking forms for both simplicity to the 
+       end user who doesn't care about IDs as well as for 
+       backwards compatibility.
+    */
+
+    /**
+     * Writes out a Pass record with comment.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the pass record.
+     */
+    public void checkPass(String comment)
+    {
+        checkPass(comment, null);
+    }
+
+    /**
+     * Writes out an ambiguous record with comment.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment to log with the ambg record.
+     */
+    public void checkAmbiguous(String comment)
+    {
+        checkAmbiguous(comment, null);
+    }
+
+    /**
+     * Writes out a Fail record with comment.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the fail record.
+     */
+    public void checkFail(String comment)
+    {
+        checkFail(comment, null);
+    }
+    
+
+    /**
+     * Writes out an Error record with comment.
+     * @author Shane_Curcuru@lotus.com
+     * @param comment comment to log with the error record.
+     */
+    public void checkErr(String comment)
+    {
+        checkErr(comment, null);
+    }
+
+    /**
+     * Writes out a Pass record with comment.
+     * A Pass signifies that an individual test point has completed and has
+     * been verified to have behaved correctly.
+     * <p>If you need to do your own specific comparisons, you can
+     * do them in your code and then just call checkPass or checkFail.</p>
+     * <p>Derived classes must implement this to <B>both</B> report the
+     * results out appropriately <B>and</B> to summate the results, if needed.</p>
+     * <p>Pass results are a low priority, except for INCP (incomplete).  Note
+     * that if a test never calls check*(), it will have an incomplete result.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param comment to log with the pass record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkPass(String comment, String id)
+    {
+
+        // Increment our results counters 
+        incrementResultCounter(CHECKS, PASS_RESULT);
+
+        // Special: only report it actually if needed
+        if (getLoggingLevel() > FAILSONLY)
+        {
+            for (int i = 0; i < numLoggers; i++)
+            {
+                loggers[i].checkPass(comment, id);
+            }
+        }
+
+        caseResult = java.lang.Math.max(PASS_RESULT, caseResult);
+    }
+
+    /**
+     * Writes out an ambiguous record with comment.
+     * <p>Ambiguous results are neither pass nor fail. Different test
+     * libraries may have slightly different reasons for using ambg.</p>
+     * <p>Derived classes must implement this to <B>both</B> report the
+     * results out appropriately <B>and</B> to summate the results, if needed.</p>
+     * <p>Ambg results have a middling priority, and take precedence over incomplete and pass.</p>
+     * <p>An Ambiguous result may signify that the test point has completed and either
+     * appears to have succeded, or that it has produced a result but there is no known
+     * 'gold' result to compare it to.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param comment to log with the ambg record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkAmbiguous(String comment, String id)
+    {
+
+        // Increment our results counters 
+        incrementResultCounter(CHECKS, AMBG_RESULT);
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].checkAmbiguous(comment, id);
+        }
+
+        caseResult = java.lang.Math.max(AMBG_RESULT, caseResult);
+    }
+
+    /**
+     * Writes out a Fail record with comment.
+     * <p>If you need to do your own specific comparisons, you can
+     * do them in your code and then just call checkPass or checkFail.</p>
+     * <p>Derived classes must implement this to <B>both</B> report the
+     * results out appropriately <B>and</B> to summate the results, if needed.</p>
+     * <p>Fail results have a high priority, and take precedence over incomplete, pass, and ambiguous.</p>
+     * <p>A Fail signifies that an individual test point has completed and has
+     * been verified to have behaved <B>in</B>correctly.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param comment to log with the fail record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkFail(String comment, String id)
+    {
+
+        // Increment our results counters 
+        incrementResultCounter(CHECKS, FAIL_RESULT);
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].checkFail(comment, id);
+        }
+
+        caseResult = java.lang.Math.max(FAIL_RESULT, caseResult);
+    }
+
+    /**
+     * Writes out an Error record with comment.
+     * <p>Derived classes must implement this to <B>both</B> report the
+     * results out appropriately <B>and</B> to summate the results, if needed.</p>
+     * <p>Error results have the highest priority, and take precedence over
+     * all other results.</p>
+     * <p>An Error signifies that something unusual has gone wrong with the execution
+     * of the test at this point - likely something that will require a human to
+     * debug to see what really happened.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param comment to log with the error record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkErr(String comment, String id)
+    {
+
+        // Increment our results counters 
+        incrementResultCounter(CHECKS, ERRR_RESULT);
+
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].checkErr(comment, id);
+        }
+
+        caseResult = java.lang.Math.max(ERRR_RESULT, caseResult);
+    }
+
+    //-----------------------------------------------------
+    //-------- Simplified Performance Logging - beyond interface Reporter --------
+    //-----------------------------------------------------
+
+    /** NEEDSDOC Field DEFAULT_PERFLOGGING_LEVEL          */
+    protected final boolean DEFAULT_PERFLOGGING_LEVEL = false;
+
+    /**
+     * This determines if performance information is logged out to results.
+     * <p>When true, extra performance records are written out to result files.</p>
+     * @see #logPerfMsg(java.lang.String, long, java.lang.String)
+     */
+    protected boolean perfLogging = DEFAULT_PERFLOGGING_LEVEL;
+
+    /**
+     * Accessor for perfLogging, determines if we log performance info.
+     * @todo add PerfLogging to Reporter interface
+     * @return Whether or not we log performance info.
+     */
+    public boolean getPerfLogging()
+    {
+        return (perfLogging);
+    }
+
+    /**
+     * Accessor for perfLogging, determines if we log performance info.
+     * @param Whether or not we log performance info.
+     *
+     * NEEDSDOC @param setPL
+     */
+    public void setPerfLogging(boolean setPL)
+    {
+        perfLogging = setPL;
+    }
+
+    /**
+     * Constants used to mark performance records in output.
+     */
+
+    // Note: string representations are explicitly set to all be 
+    //       4 characters long to make it simpler to parse results
+    public static final String TEST_START = "TSrt";
+
+    /** NEEDSDOC Field TEST_STOP          */
+    public static final String TEST_STOP = "TStp";
+
+    /** NEEDSDOC Field CASE_START          */
+    public static final String CASE_START = "CSrt";
+
+    /** NEEDSDOC Field CASE_STOP          */
+    public static final String CASE_STOP = "CStp";
+
+    /** NEEDSDOC Field USER_TIMER          */
+    public static final String USER_TIMER = "UTmr";
+
+    /** NEEDSDOC Field USER_TIMESTAMP          */
+    public static final String USER_TIMESTAMP = "UTim";
+
+    /** NEEDSDOC Field USER_MEMORY          */
+    public static final String USER_MEMORY = "UMem";
+
+    /** NEEDSDOC Field PERF_SEPARATOR          */
+    public static final String PERF_SEPARATOR = ";";
+
+    /**
+     * Logs out a performance statistic.
+     * <p>Only logs times if perfLogging set to true.</p>
+     * <p>As an optimization for record-based Loggers, this is a rather simplistic
+     * way to log performance info - however it's sufficient for most purposes.</p>
+     * @author Frank Bell
+     * @param type type of performance statistic.
+     * @param data long value of performance statistic.
+     * @param msg comment to log out.
+     */
+    public void logPerfMsg(String type, long data, String msg)
+    {
+
+        if (getPerfLogging())
+        {
+            double dummy = 0;
+
+            for (int i = 0; i < numLoggers; i++)
+            {
+
+                // NEEDSWORK: simply put it at the current loggingLevel we have set
+                //            Is there a better way to mesh performance output with the rest?
+                loggers[i].logStatistic(loggingLevel, data, dummy,
+                                        type + PERF_SEPARATOR + msg);
+            }
+        }
+    }
+
+    /**
+     * Captures current time in milliseconds, only if perfLogging.
+     * @author Shane_Curcuru@lotus.com
+     * @param msg comment to log out.
+     */
+    protected Hashtable perfTimers = new Hashtable();
+
+    /**
+     * NEEDSDOC Method startTimer 
+     *
+     *
+     * NEEDSDOC @param msg
+     */
+    public void startTimer(String msg)
+    {
+
+        // Note optimization: only capture times if perfLogging
+        if ((perfLogging) && (msg != null))
+        {
+            perfTimers.put(msg, new Long(System.currentTimeMillis()));
+        }
+    }
+
+    /**
+     * Captures current time in milliseconds and logs out difference.
+     * Will only log times if perfLogging set to true.
+     * <p>Only logs time if it finds a corresponding msg entry that was startTimer'd.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param msg comment to log out.
+     */
+    public void stopTimer(String msg)
+    {
+
+        // Capture time immediately to reduce latency
+        long stopTime = System.currentTimeMillis();
+
+        // Note optimization: only use times if perfLogging
+        if ((perfLogging) && (msg != null))
+        {
+            Long startTime = (Long) perfTimers.get(msg);
+
+            logPerfMsg(USER_TIMER, (stopTime - startTime.longValue()), msg);
+            perfTimers.remove(msg);
+        }
+    }
+
+    /**
+     * Accessor for currently running test case number, read-only.
+     * @return current test case number.
+     */
+    public int getCurrentCaseNum()
+    {
+        return caseNum;
+    }
+
+    /**
+     * Accessor for current test case's result, read-only.
+     * @return current test case result.
+     */
+    public int getCurrentCaseResult()
+    {
+        return caseResult;
+    }
+
+    /**
+     * Accessor for current test case's description, read-only.
+     * @return current test case result.
+     */
+    public String getCurrentCaseComment()
+    {
+        return caseComment;
+    }
+
+    /**
+     * Accessor for overall test file result, read-only.
+     * @return test file's overall result.
+     */
+    public int getCurrentFileResult()
+    {
+        return testResult;
+    }
+
+    /**
+     * Utility method to log out overall result counters.  
+     *
+     * @param count number of this kind of result
+     * @param desc description of this kind of result
+     */
+    protected void logResultsCounter(int count, String desc)
+    {
+
+        // Optimization: Only log the kinds of results we have
+        if (count > 0)
+            logStatistic(loggingLevel, count, 0, desc);
+    }
+
+    /** Utility method to log out overall result counters. */
+    public void logResultsCounters()
+    {
+
+        // NEEDSWORK: what's the best format to display this stuff in?
+        // NEEDSWORK: what loggingLevel should we use?
+        // NEEDSWORK: temporarily skipping the 'files' since 
+        //            we only have tests with one file being run
+        // logResultsCounter(incpCount[FILES], "incpCount[FILES]");
+        logResultsCounter(incpCount[CASES], "incpCount[CASES]");
+        logResultsCounter(incpCount[CHECKS], "incpCount[CHECKS]");
+
+        // logResultsCounter(passCount[FILES], "passCount[FILES]");
+        logResultsCounter(passCount[CASES], "passCount[CASES]");
+        logResultsCounter(passCount[CHECKS], "passCount[CHECKS]");
+
+        // logResultsCounter(ambgCount[FILES], "ambgCount[FILES]");
+        logResultsCounter(ambgCount[CASES], "ambgCount[CASES]");
+        logResultsCounter(ambgCount[CHECKS], "ambgCount[CHECKS]");
+
+        // logResultsCounter(failCount[FILES], "failCount[FILES]");
+        logResultsCounter(failCount[CASES], "failCount[CASES]");
+        logResultsCounter(failCount[CHECKS], "failCount[CHECKS]");
+
+        // logResultsCounter(errrCount[FILES], "errrCount[FILES]");
+        logResultsCounter(errrCount[CASES], "errrCount[CASES]");
+        logResultsCounter(errrCount[CHECKS], "errrCount[CHECKS]");
+    }
+
+    /** 
+     * Utility method to store overall result counters. 
+     *
+     * @return a Hashtable of various results items suitable for
+     * passing to logElement as attrs
+     */
+    protected Hashtable createResultsStatusHash()
+    {
+        Hashtable resHash = new Hashtable();
+        if (incpCount[CASES] > 0)
+            resHash.put(INCP + "-cases", new Integer(incpCount[CASES]));
+        if (incpCount[CHECKS] > 0)
+            resHash.put(INCP + "-checks", new Integer(incpCount[CHECKS]));
+
+        if (passCount[CASES] > 0)
+            resHash.put(PASS + "-cases", new Integer(passCount[CASES]));
+        if (passCount[CHECKS] > 0)
+            resHash.put(PASS + "-checks", new Integer(passCount[CHECKS]));
+
+        if (ambgCount[CASES] > 0)
+            resHash.put(AMBG + "-cases", new Integer(ambgCount[CASES]));
+        if (ambgCount[CHECKS] > 0)
+            resHash.put(AMBG + "-checks", new Integer(ambgCount[CHECKS]));
+
+        if (failCount[CASES] > 0)
+            resHash.put(FAIL + "-cases", new Integer(failCount[CASES]));
+        if (failCount[CHECKS] > 0)
+            resHash.put(FAIL + "-checks", new Integer(failCount[CHECKS]));
+
+        if (errrCount[CASES] > 0)
+            resHash.put(ERRR + "-cases", new Integer(errrCount[CASES]));
+        if (errrCount[CHECKS] > 0)
+            resHash.put(ERRR + "-checks", new Integer(errrCount[CHECKS]));
+        return resHash;
+    }
+
+    /** 
+     * Utility method to write out overall result counters. 
+     * 
+     * <p>This writes out both a testsummary element as well as 
+     * writing a separate marker file for the test's currently 
+     * rolled-up test results.</p>
+     *
+     * <p>Note if writeFile is true, we do a bunch of additional 
+     * processing, including deleting any potential marker 
+     * files, along with creating a new marker file.  This section 
+     * of code explicitly does file creation and also includes 
+     * some basic XML-isms in it.</p>
+     * 
+     * <p>Marker files look like: [testStat][testName].xml, where 
+     * testStat is the actual current status, like 
+     * Pass/Fail/Ambg/Errr/Incp, and testName comes from the 
+     * currently executing test; this may be overridden by 
+		  * setting OPT_SUMMARYFILE.</p>
+     *
+     * @param writeFile if we should also write out a separate 
+     * Passname/Failname marker file as well
+     */
+    public void writeResultsStatus(boolean writeFile)
+    {
+        final String DEFAULT_SUMMARY_NAME = "ResultsSummary.xml";
+        Hashtable resultsHash = createResultsStatusHash();
+        resultsHash.put("desc", testComment);
+        resultsHash.put("testName", testName);
+        //@todo the actual path in the property below may not necessarily 
+        //  either exist or be the correct location vis-a-vis the file
+        //  that we're writing out - but it should be close
+        resultsHash.put(OPT_LOGFILE, reporterProps.getProperty(OPT_LOGFILE, DEFAULT_SUMMARY_NAME));
+        try
+        {
+            resultsHash.put("baseref", System.getProperty("user.dir"));
+        } 
+        catch (Exception e) { /* no-op, ignore */ }
+
+        String elementName = "teststatus";
+        String overallResult = resultToString(getCurrentFileResult());
+        // Ask each of our loggers to report this
+        for (int i = 0; i < numLoggers; i++)
+        {
+            loggers[i].logElement(CRITICALMSG, elementName, resultsHash, overallResult);
+        }
+
+        // Only continue if user asked us to
+        if (!writeFile)
+            return;
+
+        // Now write an actual file out as a marker for enclosing 
+        //  harnesses and build environments
+
+        // Calculate the name relative to any logfile we have
+        String logFileBase = null;
+        try
+        {
+            // CanonicalPath gives a better path, especially if 
+            //  you mix your path separators up
+            logFileBase = (new File(reporterProps.getProperty(OPT_LOGFILE, DEFAULT_SUMMARY_NAME))).getCanonicalPath();
+        } 
+        catch (IOException ioe)
+        {
+            logFileBase = (new File(reporterProps.getProperty(OPT_LOGFILE, DEFAULT_SUMMARY_NAME))).getAbsolutePath();
+        }
+        logFileBase = (new File(logFileBase)).getParent();
+		 		 // Either use the testName or an optionally set summary name
+		 		 String summaryFileBase = reporterProps.getProperty(OPT_SUMMARYFILE, testName + ".xml");
+        final File[] summaryFiles = 
+        {
+            // Note array is ordered; should be re-designed so this doesn't matter
+            // Coordinate PASS name with results.marker in build.xml
+            // File name rationale: put Pass/Fail/etc first, so they 
+            //  all show up together in dir listing; include 
+            //  testName so you know where it came from; make it 
+            //  .xml since it is an XML file
+            new File(logFileBase, INCP + "-" + summaryFileBase),
+            new File(logFileBase, PASS + "-" + summaryFileBase),
+            new File(logFileBase, AMBG + "-" + summaryFileBase),
+            new File(logFileBase, FAIL + "-" + summaryFileBase),
+            new File(logFileBase, ERRR + "-" + summaryFileBase)
+        };
+        // Clean up any pre-existing files that might be confused 
+        //  as markers from this testrun
+        for (int i = 0; i < summaryFiles.length; i++)
+        {
+            if (summaryFiles[i].exists())
+                summaryFiles[i].delete();
+        }
+
+        File summaryFile = null;
+        switch (getCurrentFileResult())
+        {
+            case INCP_RESULT:
+                summaryFile = summaryFiles[0];
+                break;
+            case PASS_RESULT:
+                summaryFile = summaryFiles[1];
+                break;
+            case AMBG_RESULT:
+                summaryFile = summaryFiles[2];
+                break;
+            case FAIL_RESULT:
+                summaryFile = summaryFiles[3];
+                break;
+            case ERRR_RESULT:
+                summaryFile = summaryFiles[4];
+                break;
+            default:
+                // Use error case, this should never happen
+                summaryFile = summaryFiles[4];
+                break;
+        }
+		 		 resultsHash.put(OPT_SUMMARYFILE, summaryFile.getPath());
+        // Now actually write out the summary file
+        try
+        {
+            PrintWriter printWriter = new PrintWriter(new FileWriter(summaryFile));
+            // Fake the output of Logger.logElement mostly; except 
+            //  we add an XML header so this is a legal XML doc
+            printWriter.println("<?xml version=\"1.0\"?>"); 
+            printWriter.println("<" + elementName); 
+            for (Enumeration keys = resultsHash.keys();
+                    keys.hasMoreElements(); /* no increment portion */ )
+            {
+                Object key = keys.nextElement();
+                printWriter.println(key + "=\"" + resultsHash.get(key) + "\"");
+            }
+            printWriter.println(">"); 
+            printWriter.println(overallResult); 
+            printWriter.println("</" + elementName + ">"); 
+            printWriter.close();
+        }
+        catch(Exception e)
+        {
+            logErrorMsg("writeResultsStatus: Can't write: " + summaryFile);
+        }
+    }
+
+    //-----------------------------------------------------
+    //-------- Test results reporting check* routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Compares actual and expected, and logs the result, pass/fail.
+     * The comment you pass is added along with the pass/fail, of course.
+     * Currenly, you may pass a pair of any of these simple {type}:
+     * <ui>
+     * <li>boolean</li>
+     * <li>byte</li>
+     * <li>short</li>
+     * <li>int</li>
+     * <li>long</li>
+     * <li>float</li>
+     * <li>double</li>
+     * <li>String</li>
+     * </ui>
+     * <p>While tests could simply call checkPass(comment), providing these convenience
+     * method can save lines of code, since you can replace:</p>
+     * <code>if (foo = bar) <BR>
+     *           checkPass(comment); <BR>
+     *       else <BR>
+     *           checkFail(comment);</code>
+     * <p>With the much simpler:</p>
+     * <code>check(foo, bar, comment);</code>
+     * <p>Plus, you can either use or ignore the boolean return value.</p>
+     * <p>Note that individual methods checkInt(...), checkLong(...), etc. also exist.
+     * These type-independent overriden methods are provided as a convenience to
+     * Java-only testwriters.  JavaScript scripts must call the
+     * type-specific checkInt(...), checkString(...), etc. methods directly.</p>
+     * <p>Note that testwriters are free to ignore the boolean return value.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param actual value returned from your test code.
+     * @param expected value that test should return to pass.
+     * @param comment to log out with result.
+     * @return status, true=pass, false otherwise
+     * @see #checkPass
+     * @see #checkFail
+     * @see #checkObject
+     */
+    public boolean check(boolean actual, boolean expected, String comment)
+    {
+        return (checkBool(actual, expected, comment));
+    }
+
+    /**
+     * NEEDSDOC Method check 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (check) @return
+     */
+    public boolean check(byte actual, byte expected, String comment)
+    {
+        return (checkByte(actual, expected, comment));
+    }
+
+    /**
+     * NEEDSDOC Method check 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (check) @return
+     */
+    public boolean check(short actual, short expected, String comment)
+    {
+        return (checkShort(actual, expected, comment));
+    }
+
+    /**
+     * NEEDSDOC Method check 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (check) @return
+     */
+    public boolean check(int actual, int expected, String comment)
+    {
+        return (checkInt(actual, expected, comment));
+    }
+
+    /**
+     * NEEDSDOC Method check 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (check) @return
+     */
+    public boolean check(long actual, long expected, String comment)
+    {
+        return (checkLong(actual, expected, comment));
+    }
+
+    /**
+     * NEEDSDOC Method check 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (check) @return
+     */
+    public boolean check(float actual, float expected, String comment)
+    {
+        return (checkFloat(actual, expected, comment));
+    }
+
+    /**
+     * NEEDSDOC Method check 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (check) @return
+     */
+    public boolean check(double actual, double expected, String comment)
+    {
+        return (checkDouble(actual, expected, comment));
+    }
+
+    /**
+     * NEEDSDOC Method check 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (check) @return
+     */
+    public boolean check(String actual, String expected, String comment)
+    {
+        return (checkString(actual, expected, comment));
+    }
+
+    // No check(Object, Object, String) currently provided, please call checkObject(...) directly
+
+    /**
+     * Compares actual and expected (Object), and logs the result, pass/fail.
+     * <p><b>Special note for checkObject:</b></p>
+     * <p>Since this takes an object reference and not a primitive type,
+     * it works slightly differently than other check{Type} methods.</p>
+     * <ui>
+     * <li>If both are null, then Pass</li>
+     * <li>Else If actual.equals(expected) than Pass</li>
+     * <li>Else Fail</li>
+     * </ui>
+     * @author Shane_Curcuru@lotus.com
+     * @param actual Object returned from your test code.
+     * @param expected Object that test should return to pass.
+     * @param comment to log out with result.
+     * @see #checkPass
+     * @see #checkFail
+     * @see #check
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean checkObject(Object actual, Object expected, String comment)
+    {
+
+        // Pass if both null, or both valid & equals
+        if (actual != null)
+        {
+            if (actual.equals(expected))
+            {
+                checkPass(comment);
+
+                return true;
+            }
+            else
+            {
+                checkFail(comment);
+
+                return false;
+            }
+        }
+        else
+        {  // actual is null, so can't use .equals
+            if (expected == null)
+            {
+                checkPass(comment);
+
+                return true;
+            }
+            else
+            {
+                checkFail(comment);
+
+                return false;
+            }
+        }
+    }
+
+    /**
+     * NEEDSDOC Method checkBool 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (checkBool) @return
+     */
+    public boolean checkBool(boolean actual, boolean expected, String comment)
+    {
+
+        if (actual == expected)
+        {
+            checkPass(comment);
+
+            return true;
+        }
+        else
+        {
+            checkFail(comment);
+
+            return false;
+        }
+    }
+
+    /**
+     * NEEDSDOC Method checkByte 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (checkByte) @return
+     */
+    public boolean checkByte(byte actual, byte expected, String comment)
+    {
+
+        if (actual == expected)
+        {
+            checkPass(comment);
+
+            return true;
+        }
+        else
+        {
+            checkFail(comment);
+
+            return false;
+        }
+    }
+
+    /**
+     * NEEDSDOC Method checkShort 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (checkShort) @return
+     */
+    public boolean checkShort(short actual, short expected, String comment)
+    {
+
+        if (actual == expected)
+        {
+            checkPass(comment);
+
+            return true;
+        }
+        else
+        {
+            checkFail(comment);
+
+            return false;
+        }
+    }
+
+    /**
+     * NEEDSDOC Method checkInt 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (checkInt) @return
+     */
+    public boolean checkInt(int actual, int expected, String comment)
+    {
+
+        if (actual == expected)
+        {
+            checkPass(comment);
+
+            return true;
+        }
+        else
+        {
+            checkFail(comment);
+
+            return false;
+        }
+    }
+
+    /**
+     * NEEDSDOC Method checkLong 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (checkLong) @return
+     */
+    public boolean checkLong(long actual, long expected, String comment)
+    {
+
+        if (actual == expected)
+        {
+            checkPass(comment);
+
+            return true;
+        }
+        else
+        {
+            checkFail(comment);
+
+            return false;
+        }
+    }
+
+    /**
+     * NEEDSDOC Method checkFloat 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (checkFloat) @return
+     */
+    public boolean checkFloat(float actual, float expected, String comment)
+    {
+
+        if (actual == expected)
+        {
+            checkPass(comment);
+
+            return true;
+        }
+        else
+        {
+            checkFail(comment);
+
+            return false;
+        }
+    }
+
+    /**
+     * NEEDSDOC Method checkDouble 
+     *
+     *
+     * NEEDSDOC @param actual
+     * NEEDSDOC @param expected
+     * NEEDSDOC @param comment
+     *
+     * NEEDSDOC (checkDouble) @return
+     */
+    public boolean checkDouble(double actual, double expected, String comment)
+    {
+
+        if (actual == expected)
+        {
+            checkPass(comment);
+
+            return true;
+        }
+        else
+        {
+            checkFail(comment);
+
+            return false;
+        }
+    }
+
+    /**
+     * Compares actual and expected (String), and logs the result, pass/fail.
+     * <p><b>Special note for checkString:</b></p>
+     * <p>Since this takes a String object and not a primitive type,
+     * it works slightly differently than other check{Type} methods.</p>
+     * <ui>
+     * <li>If both are null, then Pass</li>
+     * <li>Else If actual.compareTo(expected) == 0 than Pass</li>
+     * <li>Else Fail</li>
+     * </ui>
+     * @author Shane_Curcuru@lotus.com
+     * @param actual String returned from your test code.
+     * @param expected String that test should return to pass.
+     * @param comment to log out with result.
+     * @see #checkPass
+     * @see #checkFail
+     * @see #checkObject
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean checkString(String actual, String expected, String comment)
+    {
+
+        // Pass if both null, or both valid & equals
+        if (actual != null)
+        {
+
+            // .compareTo returns 0 if the strings match lexicographically
+            if ((expected != null) && (actual.compareTo(expected) == 0))
+            {
+                checkPass(comment);
+
+                return true;
+            }
+            else
+            {
+                checkFail(comment);
+
+                return false;
+            }
+        }
+        else
+        {  // actual is null, so can't use .equals
+            if (expected == null)
+            {
+                checkPass(comment);
+
+                return true;
+            }
+            else
+            {
+                checkFail(comment);
+
+                return false;
+            }
+        }
+    }
+
+    /**
+     * Uses an external CheckService to Compares actual and expected,
+     * and logs the result, pass/fail.
+     * <p>CheckServices may be implemented to do custom equivalency
+     * checking between complex object types. It is the responsibility
+     * of the CheckService to call back into us to report results.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @param CheckService implementation to use
+     *
+     * @param service a non-null CheckService implementation for 
+     * this type of actual and expected object
+     * @param actual Object returned from your test code.
+     * @param expected Object that test should return to pass.
+     * @param comment to log out with result.
+     * @return status true if PASS_RESULT, false otherwise
+     * @see #checkPass
+     * @see #checkFail
+     * @see #check
+     */
+    public boolean check(CheckService service, Object actual,
+                         Object expected, String comment)
+    {
+
+        if (service == null)
+        {
+            checkErr("CheckService null for: " + comment);
+
+            return false;
+        }
+
+        if (service.check(this, actual, expected, comment) == PASS_RESULT)
+            return true;
+        else
+            return false;
+    }
+
+    /**
+     * Uses an external CheckService to Compares actual and expected,
+     * and logs the result, pass/fail.
+     */
+    public boolean check(CheckService service, Object actual,
+                         Object expected, String comment, String id)
+    {
+
+        if (service == null)
+        {
+            checkErr("CheckService null for: " + comment);
+
+            return false;
+        }
+
+        if (service.check(this, actual, expected, comment, id) == PASS_RESULT)
+            return true;
+        else
+            return false;
+    }
+
+    /** Flag to control internal debugging of Reporter; sends extra info to System.out. */
+    protected boolean debug = false;
+
+    /**
+     * Accessor for internal debugging flag.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean getDebug()
+    {
+        return (debug);
+    }
+
+    /**
+     * Accessor for internal debugging flag.  
+     *
+     * NEEDSDOC @param setDbg
+     */
+    public void setDebug(boolean setDbg)
+    {
+
+        debug = setDbg;
+
+        debugPrintln("setDebug enabled");  // will only print if setDbg was true
+    }
+
+    /**
+     * Basic debugging output wrapper for Reporter.  
+     *
+     * NEEDSDOC @param msg
+     */
+    public void debugPrintln(String msg)
+    {
+
+        if (!debug)
+            return;
+
+        // If we have reporters, use them
+        if (numLoggers > 0)
+            logCriticalMsg("RI.dP: " + msg);
+
+            // Otherwise, just dump to the console
+        else
+            System.out.println("RI.dP: " + msg);
+    }
+
+    /**
+     * Utility method to increment result counters.  
+     *
+     * NEEDSDOC @param ctrOffset
+     * NEEDSDOC @param r
+     */
+    public void incrementResultCounter(int ctrOffset, int r)
+    {
+
+        switch (r)
+        {
+        case INCP_RESULT :
+            incpCount[ctrOffset]++;
+            break;
+        case PASS_RESULT :
+            passCount[ctrOffset]++;
+            break;
+        case AMBG_RESULT :
+            ambgCount[ctrOffset]++;
+            break;
+        case FAIL_RESULT :
+            failCount[ctrOffset]++;
+            break;
+        case ERRR_RESULT :
+            errrCount[ctrOffset]++;
+            break;
+        default :
+            ;  // NEEDSWORK: should we report this, or allow users to add their own counters?
+        }
+    }
+
+    /**
+     * Utility method to translate an int result to a string.  
+     *
+     * NEEDSDOC @param r
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public static String resultToString(int r)
+    {
+
+        switch (r)
+        {
+        case INCP_RESULT :
+            return (INCP);
+        case PASS_RESULT :
+            return (PASS);
+        case AMBG_RESULT :
+            return (AMBG);
+        case FAIL_RESULT :
+            return (FAIL);
+        case ERRR_RESULT :
+            return (ERRR);
+        default :
+            return ("Unkn");  // NEEDSWORK: should have better constant for this
+        }
+    }
+}  // end of class Reporter
+
diff --git a/test/java/src/org/apache/qetest/SimpleFileCheckService.java b/test/java/src/org/apache/qetest/SimpleFileCheckService.java
new file mode 100644
index 0000000..776040a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/SimpleFileCheckService.java
@@ -0,0 +1,224 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.Properties;
+
+/**
+ * Simply does .readLine of each file into string buffers and then String.equals().
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class SimpleFileCheckService implements CheckService
+{
+
+    /**
+     * Compare two objects for equivalence, and return appropriate result.
+     *
+     * @param logger to dump any output messages to
+     * @param actual (current) File to check
+     * @param reference (gold, or expected) File to check against
+     * @param description of what you're checking
+     * @param msg comment to log out with this test point
+     * @param id ID tag to log out with this test point
+     * @return Logger.*_RESULT code denoting status; each method may 
+     * define it's own meanings for pass, fail, ambiguous, etc.
+     */
+    public int check(Logger logger, Object actual, Object reference,
+                     String msg, String id)
+    {
+
+        if (!((actual instanceof File) & (reference instanceof File)))
+        {
+
+            // Must have File objects to continue
+            logger.checkErr(msg + " :check() objects were not Files", id);
+
+            return Logger.ERRR_RESULT;
+        }
+
+        String fVal1 = readFileIntoString(logger, (File) actual);
+
+        // Fail if Actual file doesn't exist
+        if (fVal1 == null)
+        {
+            logger.checkFail(msg + " :Actual file null", id);
+
+            return Logger.FAIL_RESULT;
+        }
+
+        String fVal2 = readFileIntoString(logger, (File) reference);
+
+        // Ambiguous if gold or reference file doesn't exist
+        if (fVal2 == null)
+        {
+            logger.checkAmbiguous(msg + " :Gold file null", id);
+
+            return Logger.AMBG_RESULT;
+        }
+
+        // Pass if they're equal, fail otherwise        
+        if (fVal1.equals(fVal2))
+        {
+            logger.checkPass(msg, id);
+
+            return Logger.PASS_RESULT;
+        }
+        else
+        {
+            logger.checkFail(msg, id);
+
+            return Logger.FAIL_RESULT;
+        }
+    }
+
+    /**
+     * Compare two objects for equivalence, and return appropriate result.
+     *
+     * @param logger to dump any output messages to
+     * @param actual (current) File to check
+     * @param reference (gold, or expected) File to check against
+     * @param description of what you're checking
+     * @param msg comment to log out with this test point
+     * @return Logger.*_RESULT code denoting status; each method may 
+     * define it's own meanings for pass, fail, ambiguous, etc.
+     */
+    public int check(Logger logger, Object actual, Object reference,
+                     String msg)
+    {
+        return check(logger, actual, reference, msg, null);
+    }
+
+    /**
+     * Read text file into string line-by-line.  
+     * @param logger to dump any messages to
+     * @param f File object to read
+     * @return String of file's contents
+     */
+    private String readFileIntoString(Logger logger, File f)
+    {
+
+        StringBuffer sb = new StringBuffer();
+
+        try
+        {
+            FileReader fr = new FileReader(f);
+            BufferedReader br = new BufferedReader(fr);
+
+            for (;;)
+            {
+                String inbuf = br.readLine();
+
+                if (inbuf == null)
+                    break;
+
+                sb.append(inbuf);
+            }
+        }
+        catch (Exception e)
+        {
+            if (logger != null)
+            {
+                logger.logMsg(Logger.ERRORMSG, "SimpleFileCheckService(" + f.getPath()
+                                     + ") threw:" + e.toString());
+            }
+            else
+                System.err.println("SimpleFileCheckService(" + f.getPath()
+                                   + ") threw:" + e.toString());
+
+            return null;
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * Gets extended information about the last checkFiles call: NONE AVAILABLE.
+     * @return null, since we don't support this
+     */
+    public String getExtendedInfo()
+    {
+        return null;
+    }
+
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * No-op; this class does not have any supported attributes.
+     * 
+     * @param name The name of the attribute.
+     * @param value The value of the attribute.
+     * @throws IllegalArgumentException thrown if the underlying
+     * implementation doesn't recognize the attribute and wants to 
+     * inform the user of this fact.
+     */
+    public void setAttribute(String name, Object value)
+        throws IllegalArgumentException
+    {
+        /* no-op */        
+    }
+
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * No-op; this class does not have any supported attributes.
+     * 
+     * @param attrs Props of various name, value attrs.
+     */
+    public void applyAttributes(Properties attrs)
+    {
+        /* no-op */        
+    }
+
+    /**
+     * Allows the user to retrieve specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     *
+     * @param name The name of the attribute.
+     * @return null, no attributes supported.
+     * @throws IllegalArgumentException thrown if the underlying
+     * implementation doesn't recognize the attribute and wants to 
+     * inform the user of this fact.
+     */
+    public Object getAttribute(String name)
+        throws IllegalArgumentException
+    {
+        return null;
+    }
+
+    /**
+     * Description of what this testing utility does.  
+     * 
+     * @return String description of extension
+     */
+    public String getDescription()
+    {
+        return ("Reads in text files line-by-line as strings (ignoring newlines) and does String.equals()");
+    }
+
+}  // end of class SimpleFileCheckService
+
diff --git a/test/java/src/org/apache/qetest/Test.java b/test/java/src/org/apache/qetest/Test.java
new file mode 100644
index 0000000..299fdc3
--- /dev/null
+++ b/test/java/src/org/apache/qetest/Test.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * Test.java
+ *
+ */
+package org.apache.qetest;
+
+import java.util.Properties;
+
+/**
+ * Minimal interface defining a test.
+ * Supplying a separate interface from the most common default
+ * implementation makes it simpler for external harnesses or
+ * automation methods to handle lists of Tests.
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public interface Test
+{
+
+    /**
+     * Accesor method for the name of this test.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public abstract String getTestName();
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public abstract String getTestDescription();
+
+    /**
+     * Accesor methods for our Reporter.
+     * Tests will either have a Logger (for very simple tests)
+     * or a Reporter (for most tests).
+     * <p>Providing both API's in the interface allows us to run
+     * the two styles of tests nearly interchangeably.</p>
+     * @todo document this better; how to harnesses know which to use?
+     * @param r the Reporter to have this test use for logging results
+     */
+    public abstract void setReporter(Reporter r);
+
+    /**
+     * Accesor methods for our Reporter.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public abstract Reporter getReporter();
+
+    /**
+     * Accesor methods for our Logger.
+     * Tests will either have a Logger (for very simple tests)
+     * or a Reporter (for most tests).
+     * <p>Providing both API's in the interface allows us to run
+     * the two styles of tests nearly interchangeably.</p>
+     * @todo document this better; how to harnesses know which to use?
+     * @param l the Logger to have this test use for logging results
+     */
+    public abstract void setLogger(Logger l);
+
+    /**
+     * Accesor methods for our Logger.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public abstract Logger getLogger();
+
+    /**
+     * Accesor methods for our abort flag.
+     * If this flag is set during a test run, then we should simply
+     * not bother to run the rest of the test.  In all other cases,
+     * harnesses or Tests should attempt to continue running the
+     * entire test including cleanup routines.
+     * @param a true if we should halt processing this test
+     */
+    public abstract void setAbortTest(boolean a);
+
+    /**
+     * Accesor methods for our abort flag.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public abstract boolean getAbortTest();
+
+    /**
+     * Token used to pass command line as initializer.
+     * Commonly tests may be run as applications - this token is
+     * used as the name for the entry in the Properties block
+     * that will contain the array of Strings that was the command
+     * line for the application.
+     * <p>This allows external test harnesses or specific test
+     * implementations to easily pass in their command line using
+     * the Properties argument in many Test methods.</p>
+     */
+    public static final String MAIN_CMDLINE = "test.CmdLine";
+
+    /**
+     * Run this test: main interface to cause the test to run itself.
+     * A major goal of the Test class is to separate the act and
+     * process of writing a test from it's actual runtime
+     * implementation.  Testwriters should not generally need to
+     * know how their test is being executed.
+     * <ul>They should simply focus on defining:
+     * <li>doTestFileInit: what setup has to be done before running
+     * the testCases: initializing the product under test, etc.</li>
+     * <li>testCase1, 2, ... n: individual, independent test cases</li>
+     * <li>doTestFileClose: what cleanup has to be done after running
+     * the test, like restoring product state or freeing test resources</li>
+     * </ul>
+     * <p>This method returns a simple boolean status as a convenience.
+     * In cases where you have a harness that runs a great many
+     * tests that normally pass, the harness can simply check this
+     * value for each test: if it's true, you could even delete any
+     * result logs then, and simply print out a meta-log stating
+     * that the test passed.  Note that this does not provide any
+     * information about why a test failed (or caused an error, or
+     * whatever) - that's what the info in any reports/logs are for.</p>
+     * <p>If a test is aborted, then any containing harness needs not
+     * finish executing the test.  Otherwise, even if part of a test fails,
+     * you should let the whole test run through.  Note that aborting
+     * a test may result in the reporter or logger output being
+     * incomplete, which may make an invalid report file (in the case
+     * of XMLFileLogger, for example).</p>
+     * @todo Maybe return TestResult instead of boolean flag?
+     * @todo pass in a set of options for the test
+     * @author Shane_Curcuru@lotus.com
+     * @param Properties block used for initialization
+     *
+     * NEEDSDOC @param p
+     * @return status - true if test ran to completion and <b>all</b>
+     * cases passed, false otherwise
+     */
+    public abstract boolean runTest(Properties p);
+
+    /**
+     * Initialize this test - called once before running testcases.
+     * @todo does this need to be in the interface? Shouldn't external
+     * callers simply use the runTest() interface?
+     * @author Shane_Curcuru@lotus.com
+     * @param Properties block used for initialization
+     *
+     * NEEDSDOC @param p
+     * @return true if setup and Reporter creation successful, false otherwise
+     */
+    public abstract boolean testFileInit(Properties p);
+
+    /**
+     * Run all of our testcases.
+     * This should cause each testCase in the test to be executed
+     * independently, and then return true if and only if all
+     * testCases passed successfully.  If any testCase failed or
+     * caused any unexpected errors, exceptions, etc., it should
+     * return false.
+     * @todo Maybe return TestResult instead of boolean flag?
+     * @todo does this need to be in the interface? Shouldn't external
+     * callers simply use the runTest() interface?
+     * @author Shane_Curcuru@lotus.com
+     * @param Properties block used for initialization
+     *
+     * NEEDSDOC @param p
+     * @return true if all testCases passed, false otherwise
+     */
+    public abstract boolean runTestCases(Properties p);
+
+    /**
+     * Cleanup this test - called once after running testcases.
+     * @todo does this need to be in the interface? Shouldn't external
+     * callers simply use the runTest() interface?
+     * @author Shane_Curcuru@lotus.com
+     * @param Properties block used for initialization
+     *
+     * NEEDSDOC @param p
+     * @return true if cleanup successful, false otherwise
+     */
+    public abstract boolean testFileClose(Properties p);
+}  // end of class Test
+
diff --git a/test/java/src/org/apache/qetest/TestImpl.java b/test/java/src/org/apache/qetest/TestImpl.java
new file mode 100644
index 0000000..06a75bb
--- /dev/null
+++ b/test/java/src/org/apache/qetest/TestImpl.java
@@ -0,0 +1,434 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TestImpl.java
+ *
+ */
+package org.apache.qetest;
+
+import java.util.Properties;
+
+/**
+ * Minimal class defining a test implementation, using a Reporter.
+ * <p>TestImpls generally interact with a Reporter, which reports
+ * out in various formats the results from this test.
+ * Most test classes should subclass from this test, as it adds
+ * structure that helps to define the conceptual logic of running
+ * a 'test'.  It also provides useful default implementations.</p>
+ * <p>Users wishing a much simpler testing framework can simply
+ * implement the minimal methods in the Test interface, and use a
+ * Logger to report results instead of a Reporter.</p>
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class TestImpl implements Test
+{
+
+    /**
+     * Name (and description) of the current test.
+     * <p>Note that these are merely convenience variables - you do not need
+     * to use them.  If you do use them, they should be initialized at
+     * construction time.</p>
+     */
+    protected String testName = null;
+
+    /**
+     * Accesor method for the name of this test.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public String getTestName()
+    {
+        return testName;
+    }
+
+    /** (Name and) description of the current test. */
+    protected String testComment = null;
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public String getTestDescription()
+    {
+        return testComment;
+    }
+
+    /**
+     * Default constructor - initialize testName, Comment.
+     */
+    public TestImpl()
+    {
+
+        // Only set them if they're not set
+        if (testName == null)
+            testName = "TestImpl.defaultName";
+
+        if (testComment == null)
+            testComment = "TestImpl.defaultComment";
+    }
+
+    /** Our Logger, who we tell all our secrets to. */
+    protected Logger logger = null;
+
+    /**
+     * Accesor methods for our Logger.  
+     *
+     * NEEDSDOC @param l
+     */
+    public void setLogger(Logger l)
+    {  // no-op: our implementation always uses a Reporter
+    }
+
+    /**
+     * Accesor methods for our Logger.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public Logger getLogger()
+    {
+        return null;
+    }
+
+    /** Our Reporter, who we tell all our secrets to. */
+    protected Reporter reporter;
+
+    /**
+     * Accesor methods for our Reporter.  
+     *
+     * NEEDSDOC @param r
+     */
+    public void setReporter(Reporter r)
+    {
+        if (r != null)
+            reporter = r;
+    }
+
+    /**
+     * Accesor methods for our Reporter.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public Reporter getReporter()
+    {
+        return reporter;
+    }
+
+    /** Flag to indicate a serious enough error that we should just give up. */
+    protected boolean abortTest = false;
+
+    /**
+     * Accesor methods for our abort flag.  
+     *
+     * NEEDSDOC @param a
+     */
+    public void setAbortTest(boolean a)
+    {
+        abortTest = a;
+    }
+
+    /**
+     * Accesor methods for our abort flag.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean getAbortTest()
+    {
+        return (abortTest);
+    }
+
+    /**
+     * Run this test: main interface to cause the test to run itself.
+     * <p>A major goal of the TestImpl class is to separate the act and process
+     * of writing a test from it's actual runtime implementation.  Testwriters
+     * should not need to know how their test is being executed.</p>
+     * <ul>They should simply focus on defining:
+     * <li>doTestFileInit: what setup has to be done before running the test</li>
+     * <li>testCase1, 2, ... n: individual, independent test cases</li>
+     * <li>doTestFileClose: what cleanup has to be done after running the test</li>
+     * </ul>
+     * <p>This method returns a simple boolean status as a convenience.  In cases
+     * where you have a harness that runs a great many tests that normally pass, the
+     * harness can simply check this value for each test: if it's true, you could
+     * even delete any result logs then, and simply print out a meta-log stating
+     * that the test passed.  Note that this does not provide any information about
+     * why a test failed (or caused an error, or whatever) - that's what the info in
+     * any Reporter's logs are for.</p>
+     * <p>If a test is aborted, then any containing harness needs not
+     * finish executing the test.  Otherwise, even if part of a test fails,
+     * you should let the whole test run through.</p>
+     * <p>Harnesses should generally simply call runTest() to ask the
+     * test to run itself.  In some cases a Harness might want to control
+     * the process more closely, in which case it should call:
+     * <code>
+     *  test.setReporter(); // optional, depending on the test
+     *  test.testFileInit();
+     *  test.runTestCases();
+     *  test.testFileClose();
+     * </code>  instead.
+     * @todo return TestResult instead of boolean flag
+     * @author Shane_Curcuru@lotus.com
+     *
+     * NEEDSDOC @param p
+     * @return status - true if test ran to completion and <b>all</b>
+     * cases passed, false otherwise
+     */
+    public boolean runTest(Properties p)
+    {
+
+        boolean status = testFileInit(p);
+
+        if (getAbortTest())
+            return status;
+
+        status &= runTestCases(p);
+
+        if (getAbortTest())
+            return status;
+
+        status &= testFileClose(p);
+
+        return status;
+    }
+
+    /**
+     * Initialize this test - called once before running testcases.
+     * Predefined behavior - subclasses should <b>not</b> override this method.
+     * <p>This method is basically a composite that masks the most common
+     * implementation: creating a reporter or logger first, then initializing
+     * any data or product settings the test needs setup first. It does this
+     * by separating this method into three methods:
+     * <code>
+     *   preTestFileInit(); // Create/initialize Reporter
+     *   doTestFileInit();  // User-defined: initialize product under test
+     *   postTestFileInit() // Report out we've completed initialization
+     * </code>
+     * </p>
+     * @author Shane_Curcuru@lotus.com
+     * @see #preTestFileInit(java.util.Properties)
+     * @see #doTestFileInit(java.util.Properties)
+     * @see #postTestFileInit(java.util.Properties)
+     *
+     * NEEDSDOC @param p
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean testFileInit(Properties p)
+    {
+
+        // Note: we don't want to use shortcut operators here,
+        //       since we want each method to get called
+        // Pass the Property block to each method, so that 
+        //       subclasses can do initialization whenever 
+        //       is best for their design
+        return preTestFileInit(p) & doTestFileInit(p) & postTestFileInit(p);
+    }
+
+    /**
+     * Initialize this test - called once before running testcases.
+     * <p>Create and initialize a Reporter here.</p>
+     * <p>This implementation simply creates a default Reporter
+     * and adds a ConsoleLogger. Most test groups will want to override
+     * this method to create custom Reporters or Loggers.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @see #testFileInit(java.util.Properties)
+     *
+     * NEEDSDOC @param p
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean preTestFileInit(Properties p)
+    {
+
+        // Pass our properties block directly to the reporter
+        //  so it can use the same values in initialization
+        setReporter(new Reporter(p));
+        reporter.addDefaultLogger();
+        reporter.testFileInit(testName, testComment);
+
+        return true;
+    }
+
+    /**
+     * Initialize this test - called once before running testcases.
+     * <p>Subclasses <b>must</b> override this to do whatever specific
+     * processing they need to initialize their product under test.</p>
+     * <p>If for any reason the test should not continue, it <b>must</b>
+     * return false from this method.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @see #testFileInit(java.util.Properties)
+     *
+     * NEEDSDOC @param p
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+
+        // @todo implement in your subclass
+        reporter.logTraceMsg(
+            "TestImpl.doTestFileInit() default implementation - please override");
+
+        return true;
+    }
+
+    /**
+     * Initialize this test - called once before running testcases.
+     * <p>Simply log out that our initialization has completed,
+     * so that structured-style logs will make it clear where startup
+     * code ends and testCase code begins.</p>
+     * @author Shane_Curcuru@lotus.com
+     * @see #testFileInit(java.util.Properties)
+     *
+     * NEEDSDOC @param p
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean postTestFileInit(Properties p)
+    {
+
+        reporter.logTraceMsg(
+            "TestImpl.postTestFileInit() initialization complete");
+
+        return true;
+    }
+
+    /**
+     * Run all of our testcases.
+     * Subclasses must override this method.  It should cause each testCase
+     * in the test to be executed independently, and then return true if and
+     * only if all testCases passed successfully.  If any testCase failed or
+     * caused any unexpected errors, exceptions, etc., it should return false.
+     * @author Shane_Curcuru@lotus.com
+     *
+     * NEEDSDOC @param p
+     * @return true if all testCases passed, false otherwise
+     */
+    public boolean runTestCases(Properties p)
+    {
+
+        // @todo implement in your subclass
+        reporter.logTraceMsg(
+            "TestImpl.runTestCases() default implementation - please override");
+
+        return true;
+    }
+
+    /**
+     * Cleanup this test - called once after running testcases.
+     * @author Shane_Curcuru@lotus.com
+     *
+     * NEEDSDOC @param p
+     * @return true if cleanup successful, false otherwise
+     */
+    public boolean testFileClose(Properties p)
+    {
+
+        // Note: we don't want to use shortcut operators here,
+        //       since we want each method to get called
+        return preTestFileClose(p) & doTestFileClose(p)
+               & postTestFileClose(p);
+    }
+
+    /**
+     * Log a trace message - called once after running testcases.
+     * <p>Predefined behavior - subclasses should <B>not</B> override this method.</p>
+     * @todo currently is primarily here to mark that we're closing
+     * the test, in case doTestFileClose() blows up somehow.  May not be needed.
+     * @author Shane_Curcuru@lotus.com
+     * @see #testFileClose()
+     *
+     * NEEDSDOC @param p
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    protected boolean preTestFileClose(Properties p)
+    {
+
+        // Have the reporter log a trace that the test is about to cleanup
+        reporter.logTraceMsg("TestImpl.preTestFileClose()");
+
+        return true;
+    }
+
+    /**
+     * Cleanup this test - called once after running testcases.
+     * <p>Subclasses <b>must</b> override this to do whatever specific
+     * processing they need to cleanup after all testcases are run.</p>
+     * @author Shane_Curcuru@lotus.com
+     *
+     * NEEDSDOC @param p
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+
+        // @todo implement in your subclass
+        reporter.logTraceMsg(
+            "TestImpl.doTestFileClose() default implementation - please override");
+
+        return true;
+    }
+
+    /**
+     * Mark the test complete - called once after running testcases.
+     * <p>Predefined behavior - subclasses should <b>not</b> override
+     * this method. Currently just tells our reporter to log the
+     * testFileClose. This will calculate final results, and complete
+     * logging for any structured output logs (like XML files).</p>
+     * @author Shane_Curcuru@lotus.com
+     * @see #testFileClose()
+     *
+     * NEEDSDOC @param p
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    protected boolean postTestFileClose(Properties p)
+    {
+
+        // Have the reporter log out our completion
+        reporter.testFileClose();
+
+        return true;
+    }
+
+    /**
+     * Main method to run test from the command line.
+     * Test subclasses <B>must</B> override, obviously.
+     * @author Shane Curcuru
+     *
+     * NEEDSDOC @param args
+     */
+    public static void main(String[] args)
+    {
+
+        TestImpl app = new TestImpl();
+        Properties p = new Properties();
+
+        p.put(MAIN_CMDLINE, args);
+        app.runTest(p);
+    }
+}  // end of class Test
+
diff --git a/test/java/src/org/apache/qetest/TestfileInfo.java b/test/java/src/org/apache/qetest/TestfileInfo.java
new file mode 100644
index 0000000..8e3ec53
--- /dev/null
+++ b/test/java/src/org/apache/qetest/TestfileInfo.java
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TestfileInfo.java
+ *
+ */
+package org.apache.qetest;
+
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+/**
+ * Simple data-holding class specifying info about one 'testfile'.
+ * <p>This is purely a convenience class for tests that rely on
+ * external datafiles. Tests will very commonly need input data,
+ * will output operations to files, and compare those outputs to
+ * known good or 'gold' files. A generic description and author
+ * field are also provided.  A freeform String field of options
+ * is included for easy extensibility.</p>
+ * <ul>
+ * <li>inputName</li>
+ * <li>outputName</li>
+ * <li>goldName</li>
+ * <li>description</li>
+ * <li>author</li>
+ * <li>options</li>
+ * </ul>
+ * <p>Note that String representations are used, since this allows
+ * for testing of how applications translate the names to File
+ * objects, or whatever they use.</p>
+ * @author Shane Curcuru
+ * @version $Id$
+ * @todo Leave everything public for now for simplicity
+ * Later, if this is a useful construct, we should improve on it's services:
+ * allow it to verify it's own files, change absolute refs fo relative, etc.
+ */
+public class TestfileInfo
+{
+
+    /** Name of the input data file. */
+    public String inputName = null;
+
+    /** NEEDSDOC Field INPUTNAME          */
+    public static final String INPUTNAME = "inputName";
+
+    /** Name of the output file to be created. */
+    public String outputName = null;
+
+    /** NEEDSDOC Field OUTPUTNAME          */
+    public static final String OUTPUTNAME = "outputName";
+
+    /** Name of the gold file to compare output to. */
+    public String goldName = null;
+
+    /** NEEDSDOC Field GOLDNAME          */
+    public static final String GOLDNAME = "goldName";
+
+    /** Author or copyright info for the testfile. */
+    public String author = null;
+
+    /** NEEDSDOC Field AUTHOR          */
+    public static final String AUTHOR = "author";
+
+    /** Basic description of the testfile. */
+    public String description = null;
+
+    /** NEEDSDOC Field DESCRIPTION          */
+    public static final String DESCRIPTION = "description";
+
+    /** Any additional options (for future expansion). */
+    public String options = null;
+
+    /** NEEDSDOC Field OPTIONS          */
+    public static final String OPTIONS = "options";
+
+    /** No-arg constructor leaves everything null. */
+    public TestfileInfo(){}
+
+    /**
+     * Initialize members from name=value pairs in Properties block.
+     * Default value for each field is null.
+     * @param Properties block to initialize from
+     *
+     * NEEDSDOC @param p
+     */
+    public TestfileInfo(Properties p)
+    {
+        load(p);
+    }
+
+    /**
+     * Pass in a StringTokenizer-default-delimited string to initialize members.
+     * <p>Members are read in order: inputName outputName goldName
+     * author description options...
+     * default value for each field is null</p>
+     * @param String to initialize from
+     *
+     * NEEDSDOC @param inputStr
+     */
+    public TestfileInfo(String inputStr)
+    {
+
+        StringTokenizer st = new StringTokenizer(inputStr);
+
+        load(st, null);
+    }
+
+    /**
+     * Pass in a StringTokenizer-default-delimited string to initialize members.
+     * <p>Members are read in order: inputName outputName goldName
+     * author description options...
+     * default value for each field is user-specified String</p>
+     * @param String to initialize from
+     * @param String to use as default for any un-specified value
+     *
+     * NEEDSDOC @param inputStr
+     * NEEDSDOC @param defaultVal
+     */
+    public TestfileInfo(String inputStr, String defaultVal)
+    {
+
+        StringTokenizer st = new StringTokenizer(inputStr);
+
+        load(st, defaultVal);
+    }
+
+    /**
+     * Pass in a specified-delimited string to initialize members.
+     * <p>Members are read in order: inputName outputName goldName
+     * author description options...
+     * default value for each field is user-specified String</p>
+     * @param String to initialize from
+     * @param String to use as default for any un-specified value
+     * @param String to use as separator for StringTokenizer
+     *
+     * NEEDSDOC @param inputStr
+     * NEEDSDOC @param defaultVal
+     * NEEDSDOC @param separator
+     */
+    public TestfileInfo(String inputStr, String defaultVal, String separator)
+    {
+
+        StringTokenizer st = new StringTokenizer(inputStr, separator);
+
+        load(st, defaultVal);
+    }
+
+    /**
+     * Worker method to initialize members.
+     *
+     * NEEDSDOC @param st
+     * NEEDSDOC @param defaultVal
+     */
+    public void load(StringTokenizer st, String defaultVal)
+    {
+
+        // Fill in as many items as are available; default the value otherwise
+        // Note that order is important!
+        if (st.hasMoreTokens())
+            inputName = st.nextToken();
+        else
+            inputName = defaultVal;
+
+        if (st.hasMoreTokens())
+            outputName = st.nextToken();
+        else
+            outputName = defaultVal;
+
+        if (st.hasMoreTokens())
+            goldName = st.nextToken();
+        else
+            goldName = defaultVal;
+
+        if (st.hasMoreTokens())
+            author = st.nextToken();
+        else
+            author = defaultVal;
+
+        if (st.hasMoreTokens())
+            description = st.nextToken();
+        else
+            description = defaultVal;
+
+        if (st.hasMoreTokens())
+        {
+            options = st.nextToken();
+
+            // For now, simply glom all additional tokens into the options, until the end of string
+            // Leave separated with a single space char for readability
+            while (st.hasMoreTokens())
+            {
+                options += " " + st.nextToken();
+            }
+        }
+        else
+            options = defaultVal;
+    }
+
+    /**
+     * Initialize members from name=value pairs in Properties block.
+     * Default value for each field is null.
+     * @param Properties block to initialize from
+     *
+     * NEEDSDOC @param p
+     */
+    public void load(Properties p)
+    {
+
+        inputName = p.getProperty(INPUTNAME);
+        outputName = p.getProperty(OUTPUTNAME);
+        goldName = p.getProperty(GOLDNAME);
+        author = p.getProperty(AUTHOR);
+        description = p.getProperty(DESCRIPTION);
+        options = p.getProperty(OPTIONS);
+    }
+
+    /**
+     * Cheap-o debugging: return tab-delimited String of all our values.
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public String dump()
+    {
+        return (inputName + '\t' + outputName + '\t' + goldName + '\t'
+                + author + '\t' + description + '\t' + options);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/Testlet.java b/test/java/src/org/apache/qetest/Testlet.java
new file mode 100644
index 0000000..e1aad9d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/Testlet.java
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * Testlet.java
+ *
+ */
+package org.apache.qetest;
+
+/**
+ * Minimal interface defining a testlet, a sort of mini-test.
+ * A Testlet defines a single, simple test case that is completely
+ * independent.  Commonly a Testlet will perform a single 
+ * test operation and verify it, usually given a set of test 
+ * data to perform the operation on.  
+ *
+ * <p>This makes creating data-driven tests simpler, by separating 
+ * the test algorithim from the definition of the test data.  Note 
+ * that logging what happened during the test is already separated 
+ * out into the Logger interface.</p>
+ * 
+ * <p>Testlets are used with Datalets, which provide a single set 
+ * of data to execute this test case with.
+ * For example:</p>
+ * <ul>
+ *   <li>We define a Testlet that processes an XML file with a 
+ *   stylesheet in a certain manner - perhaps using a specific 
+ *   set of SAX calls.</li>
+ *   <li>The Testlet takes as an argument a matching Datalet, that 
+ *   defines any parameters that may change  - like the names 
+ *   of the XML file and the stylesheet file to use.</li>
+ *   <li>Test authors or users running a harness or the like can 
+ *   then easily define a large set of Datalets for various 
+ *   types of input files that they want to test, and simply 
+ *   iterate over the set of Datalets, repeatedly calling 
+ *   Testlet.execute().  Each execution of the Testlet will 
+ *   be independent.</li>
+ * </ul>
+ * 
+ * <p>Testlets may provide additional worker methods that allow them 
+ * to be easily run in varying situations; for example, a 
+ * testwriter may have a Test object that calls a number of Testlets 
+ * for it's test cases.  If one of the Testlets finds a bug, the 
+ * testwriter can simply reference the single Testlet and it's 
+ * current Datalet in the bug report, without having to reference 
+ * the enclosing Test file.  This makes it easier for others to 
+ * reproduce the problem with a minimum of overhead.</p>
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public interface Testlet
+{
+
+    /**
+     * Accesor method for a brief description of this Testlet.  
+     * <p>Testlet implementers should provide a brief, one line 
+     * description of the algorithim of their test case.</p>
+     * //@todo do we need to define a setDescription() method?
+     * Since Testlets are pretty self-sufficient, implementers 
+     * should always just define this, and not let callers 
+     * re-set them.
+     *
+     * @return String describing what this Testlet does.
+     */
+    public abstract String getDescription();
+
+
+    /**
+     * Accesor methods for our Logger.
+     * <p>Testlets use simple Loggers that they rely on the caller 
+     * to have setup.  This frees the Testlet and the Logger from 
+     * having to store any other state about the Testlet.  It is 
+     * the caller's responsibility to do any overall rolling-up 
+     * or aggregating of results reporting, if needed.</p>
+     *
+     * @param l the Logger to have this test use for logging 
+     * results; or null to use a default logger
+     */
+    public abstract void setLogger(Logger l);
+
+
+    /**
+     * Accesor methods for our Logger.  
+     *
+     * @return Logger we tell all our secrets to; may be null
+     */
+    public abstract Logger getLogger();
+
+
+    /**
+     * Get a default Logger for use with this Testlet.  
+     * <p>Provided to allow subclasses to override this in different 
+     * ways.  This would probably be called when setLogger(null) 
+     * is called.  The most common implementation would be to 
+     * return a Logger.DEFAULT_LOGGER (which simply 
+     * logs things to the console).</p>
+     *
+     * //@todo this sort of functionality should really be provided 
+     * by the Logger class itself - any caller should be able to ask 
+     * Logger (or a Logger factory, if you want to get fancy) for a 
+     * default Logger for use without having to supply any params.
+     *
+     * @return Logger suitable for passing to setLogger()
+     */
+    public abstract Logger getDefaultLogger();
+
+
+    /**
+     * Return this Testlet's default Datalet.  
+     * <p>Every Testlet should have created a default Datalet that can 
+     * be used with this test: i.e. the test case itself has a 
+     * default, or sample set of data to execute the test with. This 
+     * way a user can simply execute the Testlet on the fly without 
+     * having to provide any input data.</p>
+     * <p>If the Testlet can't provide a default Datalet, either 
+     * the user must provide one somehow, or an error message 
+     * should be printed out.  Note that the Testlet must still 
+     * return a Datalet of the correct class from this method, even 
+     * if the Datalet returned has no data set into it.  This would 
+     * allow a harness with random test data generation capabilities 
+     * to discover this Testlet, and then generate random Datalets to 
+     * pass to it.</p>
+     *
+     * @return Datalet this Testlet can use as a default test case.
+     */
+    public abstract Datalet getDefaultDatalet();
+
+
+    /**
+     * Run this Testlet: execute it's test and return.
+     * <p>The Testlet should perform it's test operation, logging 
+     * information as needed to it's Logger, using the provided 
+     * Datalet as a test point.</p>
+     * <p>If the Datalet passed is null, the Testlet should use 
+     * it's default Datalet as the test point data.</p>
+     * <p>Testlets should not throw exceptions and should not 
+     * return anything nor worry about checking their state or 
+     * rolling up any overall results to their Logger.  Testlets 
+     * should simply focus on performing their one test operation 
+     * and outputting any simple pass/fail/other results to their 
+     * Logger.  It is the responsibility of the caller to do any 
+     * overall or rolled-up reporting that is desired.</p>
+     *
+     * @author Shane_Curcuru@lotus.com
+     * @param Datalet to use as data points for the test; if null, 
+     * will attempt to use getDefaultDatalet()
+     */
+    public abstract void execute(Datalet datalet);
+
+
+}  // end of class Testlet
+
diff --git a/test/java/src/org/apache/qetest/TestletImpl.java b/test/java/src/org/apache/qetest/TestletImpl.java
new file mode 100644
index 0000000..972e1b7
--- /dev/null
+++ b/test/java/src/org/apache/qetest/TestletImpl.java
@@ -0,0 +1,294 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TestletImpl.java
+ *
+ */
+package org.apache.qetest;
+
+
+
+/**
+ * Simple implementation of a testlet, a sort of mini-test.
+ * <p>A TestletImpl defines some common implementations that 
+ * may be useful, including sample implementations that 
+ * can be copied if you don't want to exend this class.</p>
+ *
+ * <p>The most useful implementation is of main(String[]), which 
+ * allows a Testlet to be executed independently from the command 
+ * line.  See the code comments for a way to get this behavior in 
+ * your testlet without having to re-implement the whole main 
+ * method - by just including a static{} initializer with the 
+ * fully qualified classname of your class.</p>
+ *
+ * <b>Note:</b> Testlets based on this class are probably 
+ * not threadsafe, and must be executed singly! 
+ * See comments for thisClassName.
+ * 
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class TestletImpl implements Testlet
+{
+
+    //-----------------------------------------------------
+    //---- Implement Testlet interface methods
+    //-----------------------------------------------------
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String "TestletImpl: default implementation, does nothing"
+     */
+    public String getDescription()
+    {
+        return "TestletImpl: default implementation, does nothing";
+    }
+
+
+    /**
+     * Accesor methods for our Logger.
+     *
+     * @param l the Logger to have this test use for logging 
+     * results; or null to use a default logger
+     */
+    public void setLogger(Logger l)
+	{
+        // if null, set a default one
+        if (null == l)
+            logger = getDefaultLogger();
+        else
+            logger = l;
+	}
+
+
+    /**
+     * Accesor methods for our Logger.  
+     *
+     * @return Logger we tell all our secrets to.
+     */
+    public Logger getLogger()
+	{
+        return logger;
+	}
+
+
+    /**
+     * Get a default Logger for use with this Testlet.  
+     * Gets a default ConsoleLogger (only if a Logger isn't 
+     * currently set!).  
+     *
+     * @return current logger; if null, then creates a 
+     * Logger.DEFAULT_LOGGER and returns that; if it cannot
+     * create one, throws a RuntimeException
+     */
+    public Logger getDefaultLogger()
+    {
+        if (logger != null)
+            return logger;
+
+        try
+        {
+            Class rClass = Class.forName(Logger.DEFAULT_LOGGER);
+            return (Logger)rClass.newInstance();
+        } 
+        catch (Exception e)
+        {
+            // Must re-throw the exception, since returning 
+            //  null or the like could lead to recursion
+            e.printStackTrace();
+            throw new RuntimeException(e.toString());
+        }
+    }
+
+
+    /**
+     * Return this TestletImpl's default Datalet.  
+     * 
+     * @return Datalet <code>defaultDatalet</code>.
+     */
+    public Datalet getDefaultDatalet()
+	{
+        return defaultDatalet;
+	}
+
+
+    /**
+     * Run this TestletImpl: execute it's test and return.
+     * This must (obviously) be overriden by subclasses.  Here, 
+     * we simply log a message for debugging purposes.
+     *
+     * @param Datalet to use as data points for the test.
+     */
+    public void execute(Datalet datalet)
+	{
+        logger.logMsg(Logger.STATUSMSG, "TestletImpl.execute(" + datalet + ")");
+	}
+
+
+    //-----------------------------------------------------
+    //---- Implement useful worker methods and main()
+    //-----------------------------------------------------
+
+    /**
+     * Process default command line args.  
+     * Provides simple usage functionality: given a first arg of 
+     * -h, -H, -?, prints a usage statement based on getDescription()
+     * and on getDefaultDatalet().getDescription()
+     * 
+     * @param args command line args from the JVM
+     * @return true if we got and handled any default command line 
+     * args (i.e. you can quit now); false otherwise (i.e. you 
+     * should go ahead and execute)
+     */
+    protected boolean handledDefaultArgs(String[] args)
+    {
+        // We don't handle null or blank args
+        if ((null == args) || (0 == args.length))
+            return false;
+
+        // Provide basic processing for help, usage cases
+        if ("-h".equals(args[0])
+            || "-H".equals(args[0])
+            || "-?".equals(args[0])
+           )
+        {
+            logger.logMsg(Logger.STATUSMSG, thisClassName + " usage:");
+            logger.logMsg(Logger.STATUSMSG, "    Testlet: " + getDescription());
+            logger.logMsg(Logger.STATUSMSG, "    Datalet: " + getDefaultDatalet().getDescription());
+            return true;
+        }
+
+        // Otherwise, don't handle any other args
+        return false;
+    }
+
+
+    /**
+     * Default implementation for command line use.  
+     * Note subclasses can easily get the functionality we provide 
+     * here without having to copy this method merely by copying the 
+     * static initalization block shown above, replacing the 
+     * "thisClassName" with their own FQCN.
+     *
+     * This default implementation installs a default Logger, then 
+     * checks for and handles a few default command line args, and 
+     * then executes the Testlet.
+     *
+     * //@todo How do we easily specify alternate Datalets or 
+     * data to load a Datalet from?  What about the Datalet that 
+     * actually wants the first arg to be -h?
+     *
+     * @param args command line args from the JVM
+     */
+    public static void main(String[] args)
+    {
+        if (true)
+            System.out.println("TestletImpl.main");
+        TestletImpl t = null;
+        try
+        {
+            // Create an instance of the specific class at runtime
+            //  This relies on subclasses to reset 'thisClassName'
+            //  in their own static[] initialization block!
+            t = (TestletImpl)Class.forName(thisClassName).newInstance();
+
+            // Set a default logger automatically
+            t.setLogger(t.getDefaultLogger());
+
+            // Process default -h, etc. args
+            if (!t.handledDefaultArgs(args))
+            {
+                if (args.length > 0)
+                {
+                    // If we do have any args, then attempt to 
+                    //  load the correct-typed Datalet from the args
+                    Class dataletClass = t.getDefaultDatalet().getClass();
+                    t.logger.logMsg(Logger.TRACEMSG, "Loading Datalet " 
+                                  +  dataletClass.getName() + " from args");
+                    Datalet d = (Datalet)dataletClass.newInstance();
+                    d.load(args);
+                    t.execute(d);
+                }
+                else
+                {
+                    // Otherwise, use the defaultDatalet for that Testlet
+                    t.logger.logMsg(Logger.TRACEMSG, "Using defaultDatalet");
+                    t.execute(t.getDefaultDatalet());
+                }
+            }
+        }
+        catch (Exception e)
+        {
+            if ((null != t) && (null != t.logger))
+            {
+                // Use the logger which is (hopefully) OK
+                t.logger.checkErr("TestletImpl threw: " + e.toString());
+                java.io.StringWriter sw = new java.io.StringWriter();
+                java.io.PrintWriter pw = new java.io.PrintWriter(sw);
+                e.printStackTrace(pw);
+                t.logger.logArbitrary(Logger.ERRORMSG, sw.toString());
+            }
+            else
+            {
+                // Otherwise, just dump to System.err
+                System.err.println("TestletImpl threw: " + e.toString());
+                e.printStackTrace();
+            }
+        }
+    }
+
+
+    /**
+     * The FQCN of the current class.  
+     * See comments in main() and in the static initializer.
+     * <b>Note:</b> Testlets based on this class are probably 
+     * not threadsafe, and must be executed singly! 
+     */
+    protected static String thisClassName = null;
+
+
+    /**
+     * A static initializer setting the value of thisClassName.  
+     * Subclasses must copy this static block, and replace the 
+     * name of "...TestletImpl" with their own name.  Then, when 
+     * a user executes the subclassed Testlet on the command line 
+     * or calls it's main() method, the correct thing will happen.
+     */
+    static { thisClassName = "org.apache.qetest.TestletImpl"; }
+
+
+    /**
+     * Our Logger, who we tell all our secrets to.  
+     */
+    protected Logger logger = null;
+
+
+    /**
+     * Our deafult Datalet: in this case, not very interesting.  
+     * Provide a default 'null' datalet so unsuspecting callers 
+     * don't get NullPointerExceptions.
+     */
+    protected Datalet defaultDatalet = new NullDatalet();
+
+}  // end of class TestletImpl
diff --git a/test/java/src/org/apache/qetest/ThreadedStreamReader.java b/test/java/src/org/apache/qetest/ThreadedStreamReader.java
new file mode 100644
index 0000000..329145d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/ThreadedStreamReader.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+
+/**
+ * Utility class for reading buffered streams on a thread.
+ *
+ * <p>Common usage case:
+ * <pre>
+ * ThreadedStreamReader errReader = new ThreadedStreamReader();
+ * Process p = Runtime.exec(cmdLine, environment);
+ * errReader.setInputStream(
+ *     new BufferedReader(
+ *         new InputStreamReader(proc.getErrorStream()), bufSize));
+ * errReader.start();
+ * proc.waitFor();
+ * errReader.join();
+ * String sysErr = errReader.getBuffer().toString();
+ * </pre>
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class ThreadedStreamReader extends Thread
+{
+
+    /** Reader we pull data from.  */
+    BufferedReader is = null;
+
+    /** Buffer we store the data in.  */
+    StringBuffer sb = null;
+
+    /**
+     * Asks us to capture data from the provided stream.
+     * @param set BufferedReader we should pull data from
+     */
+    public void setInputStream(BufferedReader set)
+    {
+        is = set;
+    }
+
+    /**
+     * Implement Thread.run().  
+     * This asks us to start reading data from our setInputStream()
+     * and storing it in our getBuffer() area.  Note you probably 
+     * should have called setInputStream() first.
+     */
+    public void run()
+    {
+        sb = new StringBuffer();
+        sb.append(READER_START_MARKER);
+
+        if (null == is)
+        {
+            sb.append("ERROR! setInputStream(null)");
+            sb.append(READER_END_MARKER);
+            return;
+        }
+
+        String i = null;
+        try
+        {
+            i = is.readLine();
+        }
+        catch (IOException ioe1)
+        {
+            sb.append("ERROR! no data to read, threw: " + ioe1.toString());
+            i = null;
+        }
+
+        while (i != null)
+        {
+            sb.append(i);
+            // Note: also append the implicit newline that readLine grabbed
+            sb.append('\n');
+
+            try
+            {
+                i = is.readLine();
+            }
+            catch (IOException ioe2)
+            {
+                sb.append("WARNING! readLine() threw: " + ioe2.toString());
+                i = null;
+            }
+        }
+        sb.append(READER_END_MARKER);
+    }
+
+    /**
+     * Get the buffer of data we've captured. 
+     *
+     * @return our internal StringBuffer; will be null if we 
+     * have not been run yet.
+     */
+    public StringBuffer getBuffer()
+    {
+        return sb;
+    }
+
+    public static final String READER_START_MARKER = "<stream>\n";
+    public static final String READER_END_MARKER = "</stream>\n";
+
+}  // end of class ThreadedStreamReader
+
diff --git a/test/java/src/org/apache/qetest/XMLFileFilter.java b/test/java/src/org/apache/qetest/XMLFileFilter.java
new file mode 100644
index 0000000..2318997
--- /dev/null
+++ b/test/java/src/org/apache/qetest/XMLFileFilter.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest;
+
+/**
+ * FilenameFilter supporting includes/excludes returning files
+ * that match *.xml.
+ *
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class XMLFileFilter extends FilePatternFilter
+{
+
+    /** Default pattern we're looking for: *.xml.  */
+    public static final String PATTERN = "*.xml";
+
+    /** 
+     * Initialize for default pattern.  
+     */
+    public XMLFileFilter() 
+    {
+        super(null, null, PATTERN);
+    }
+
+    /**
+     * Initialize with some include(s)/exclude(s).  
+     *
+     * @param inc semicolon-delimited string of inclusion name(s)
+     * @param exc semicolon-delimited string of exclusion name(s)
+     */
+    public XMLFileFilter(String inc, String exc)
+    {
+        super(inc, exc, PATTERN);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/XMLFileLogger.java b/test/java/src/org/apache/qetest/XMLFileLogger.java
new file mode 100644
index 0000000..b6e6df4
--- /dev/null
+++ b/test/java/src/org/apache/qetest/XMLFileLogger.java
@@ -0,0 +1,1046 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * XMLFileLogger.java
+ *
+ */
+package org.apache.qetest;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * Logger that saves output to a simple XML-format file.
+ * @todo improve escapeString so it's more rigorous about escaping
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class XMLFileLogger implements Logger
+{
+
+    //-----------------------------------------------------
+    //-------- Constants for results file structure --------
+    //-----------------------------------------------------
+
+    /** XML root element tag: root of our output document.  */
+    public static final String ELEM_RESULTSFILE = "resultsfile";
+
+    /** XML element tag: testFileInit() parent element.  */
+    public static final String ELEM_TESTFILE = "testfile";
+
+    /** XML element tag: testFileClose() leaf element 
+      * emitted immediately before closing ELEM_TESTFILE.
+      */
+    public static final String ELEM_FILERESULT = "fileresult";
+
+    /** XML element tag: testCaseInit() parent element.  */
+    public static final String ELEM_TESTCASE = "testcase";
+
+    /** XML element tag: testCaseClose() leaf element 
+      * emitted immediately before closing ELEM_TESTCASE.
+      */
+    public static final String ELEM_CASERESULT = "caseresult";
+
+    /** XML element tag: check*() element.  */
+    public static final String ELEM_CHECKRESULT = "checkresult";
+
+    /** XML element tag: logStatistic() element.  */
+    public static final String ELEM_STATISTIC = "statistic";
+
+    /** XML element tag: logStatistic() child element.  */
+    public static final String ELEM_LONGVAL = "longval";
+
+    /** XML element tag: logStatistic() child element.  */
+    public static final String ELEM_DOUBLEVAL = "doubleval";
+
+    /** XML element tag: log*Msg() element.  */
+    public static final String ELEM_MESSAGE = "message";
+
+    /** XML element tag: logArbitrary() element.  */
+    public static final String ELEM_ARBITRARY = "arbitrary";
+
+    /** XML element tag: logHashtable() parent element.  */
+    public static final String ELEM_HASHTABLE = "hashtable";
+
+    /** XML element tag: logHashtable() child element.  */
+    public static final String ELEM_HASHITEM = "hashitem";
+
+    /** XML attribute tag: log*Msg(), etc. attribute denoting 
+     * loggingLevel for that element.
+     */
+    public static final String ATTR_LEVEL = "level";
+
+    /** XML attribute tag: comment value for various methods.  */
+    public static final String ATTR_DESC = "desc";
+
+    /** XML attribute tag: Date.toString() attribute on 
+     *  ELEM_TESTFILE and ELEM_FILERESULT.  */
+    public static final String ATTR_TIME = "time";
+
+    /** XML attribute tag: PASS|FAIL|etc. attribute on 
+     *  ELEM_CHECKRESULT, ELEM_CASERESULT, ELEM_FILERESULT.  
+     */
+    public static final String ATTR_RESULT = "result";
+
+    /** XML attribute tag: key name for ELEM_HASHITEM.  */
+    public static final String ATTR_KEY = "key";
+
+    /** XML attribute tag: actual output filename on ELEM_RESULTSFILE.  */
+    public static final String ATTR_FILENAME = OPT_LOGFILE;
+
+    /** XML attribute tag: test filename on ELEM_TESTFILE.  */
+    public static final String ATTR_TESTFILENAME = "filename";
+
+    /** Parameter: if we should flush on every testCaseClose().  */
+    public static final String OPT_FLUSHONCASECLOSE = "flushOnCaseClose";
+
+    //-----------------------------------------------------
+    //-------- Class members and accessors --------
+    //-----------------------------------------------------
+
+    /** If we're ready to start outputting yet. */
+    protected boolean ready = false;
+
+    /** If an error has occoured in this Logger. */
+    protected boolean error = false;
+
+    /** If we should flush on every testCaseClose(). */
+    protected boolean flushOnCaseClose = true;
+
+    /**
+     * Accessor for flushing; is set from properties.  
+     *
+     * @return current flushing status
+     */
+    public boolean getFlushOnCaseClose()
+    {
+        return (flushOnCaseClose);
+    }
+
+    /**
+     * Accessor for flushing; is set from properties.  
+     *
+     * @param b If we should flush on every testCaseClose() 
+     */
+    public void setFlushOnCaseClose(boolean b)
+    {
+        flushOnCaseClose = b;
+    }
+
+    /** If we have output anything yet. */
+    protected boolean anyOutput = false;
+
+    /** Name of the file we're outputing to. */
+    protected String fileName = null;
+
+    /** File reference and other internal convenience variables. */
+    protected File reportFile;
+
+    /** File reference and other internal convenience variables. */
+    protected FileWriter reportWriter;
+
+    /** File reference and other internal convenience variables. */
+    protected PrintWriter reportPrinter;
+
+    /** Generic properties for this logger; sort-of replaces instance variables. */
+    protected Properties loggerProps = null;
+
+    //-----------------------------------------------------
+    //-------- Control and utility routines --------
+    //-----------------------------------------------------
+
+    /** Simple constructor, does not perform initialization. */
+    public XMLFileLogger()
+    { /* no-op */
+    }
+
+    /**
+     * Constructor calls initialize(p).
+     * @param p Properties block to initialize us with.
+     */
+    public XMLFileLogger(Properties p)
+    {
+        ready = initialize(p);
+    }
+
+    /**
+     * Return a description of what this Logger does.
+     * @return "reports results in XML to specified fileName".
+     */
+    public String getDescription()
+    {
+        return ("org.apache.qetest.XMLFileLogger - reports results in XML to specified fileName.");
+    }
+
+    /**
+     * Returns information about the Property name=value pairs
+     * that are understood by this Logger: fileName=filename.
+     * @return same as {@link java.applet.Applet.getParameterInfo}.
+     */
+    public String[][] getParameterInfo()
+    {
+
+        String pinfo[][] =
+        {
+            { OPT_LOGFILE, "String",
+              "Name of file to use for output; required" },
+            { OPT_FLUSHONCASECLOSE, "boolean",
+              "if we should flush on every testCaseClose(); optional; default:true" }
+        };
+
+        return pinfo;
+    }
+
+    /**
+     * Accessor methods for our properties block.  
+     *
+     * @return our current properties; may be null
+     */
+    public Properties getProperties()
+    {
+        return loggerProps;
+    }
+
+    /**
+     * Accessor methods for our properties block.
+     * @param p Properties to set (is cloned).
+     */
+    public void setProperties(Properties p)
+    {
+
+        if (p != null)
+        {
+            loggerProps = (Properties) p.clone();
+        }
+    }
+
+    /**
+     * Initialize this XMLFileLogger.
+     * Must be called before attempting to log anything.
+     * Opens a FileWriter for our output, and logs Record format:
+     * <pre>&lt;resultfile fileName="<i>name of result file</i>"&gt;</pre>
+     *
+     * If no name provided, supplies a default one in current dir.
+     *
+     * @param p Properties block to initialize from
+     * @return true if we think we initialized OK
+     */
+    public boolean initialize(Properties p)
+    {
+
+        setProperties(p);
+
+        fileName = loggerProps.getProperty(OPT_LOGFILE, fileName);
+
+        if ((fileName == null) || fileName.equals(""))
+        {
+            // Make up a file name
+            fileName = "XMLFileLogger-default-results.xml";
+            loggerProps.put(OPT_LOGFILE, fileName);
+        }
+
+        // Create a file and ensure it has a place to live; be sure 
+        //  to insist on an absolute path for later parent path creation
+        reportFile = new File(fileName);
+        try
+        {
+            reportFile = new File(reportFile.getCanonicalPath());
+        } 
+        catch (IOException ioe1)
+        {
+            reportFile = new File(reportFile.getAbsolutePath());
+        }
+
+        // Note: bare filenames may not have parents, so catch and ignore exceptions
+        try
+        {
+            File parent = new File(reportFile.getParent());
+            if ((!parent.mkdirs()) && (!parent.exists()))
+            {
+
+                // Couldn't create or find the directory for the file to live in, so bail
+                error = true;
+                ready = false;
+
+                System.err.println(
+                    "XMLFileLogger.initialize() WARNING: cannot create directories: "
+                    + fileName);
+
+                // Don't return yet: see if the reportWriter can still create the file later
+                // return(false);
+            }
+        }
+        catch (Exception e)
+        {
+
+            // No-op: ignore if the parent's not there; trust that the file will get created later
+        }
+
+        try
+        {
+            reportWriter = new FileWriter(reportFile);
+        }
+        catch (IOException e)
+        {
+            System.err.println("XMLFileLogger.initialize() EXCEPTION: "
+                               + e.toString());
+            e.printStackTrace();
+
+            error = true;
+            ready = false;
+
+            return false;
+        }
+
+        String tmp = loggerProps.getProperty(OPT_FLUSHONCASECLOSE);
+        if (null != tmp)
+        {
+            setFlushOnCaseClose((Boolean.valueOf(tmp)).booleanValue());
+        }
+
+        // Use BufferedWriter for better general performance
+        reportPrinter = new PrintWriter(new BufferedWriter(reportWriter));
+        ready = true;
+
+        return startResultsFile();
+    }
+
+    /**
+     * Is this Logger ready to log results?
+     * @return status - true if it's ready to report, false otherwise
+     */
+    public boolean isReady()
+    {
+
+        // Ensure our underlying logger, if one, is still OK
+        if ((reportPrinter != null) && reportPrinter.checkError())
+        {
+
+            // NEEDSWORK: should we set ready = false in this case?
+            //            errors in the PrintStream are not necessarily fatal
+            error = true;
+            ready = false;
+        }
+
+        return ready;
+    }
+
+    /** Flush this logger - ensure our File is flushed. */
+    public void flush()
+    {
+
+        if (isReady())
+        {
+            reportPrinter.flush();
+        }
+    }
+
+    /**
+     * Close this logger - ensure our File, etc. are closed.
+     * Record format:
+     * <pre>&lt;/resultfile&gt;</pre>
+     */
+    public void close()
+    {
+
+        flush();
+
+        if (isReady())
+        {
+            closeResultsFile();
+            reportPrinter.close();
+        }
+
+        ready = false;
+    }
+
+    /**
+     * worker method to dump the xml header and open the resultsfile element.  
+     *
+     * @return true if ready/OK, false if not ready (meaning we may 
+     * not have output anything!)
+     */
+    protected boolean startResultsFile()
+    {
+
+        if (isReady())
+        {
+
+            // Write out XML header and root test result element
+            reportPrinter.println("<?xml version=\"1.0\"?>");
+
+            // Note: this tag is closed in our .close() method, which the caller had better call!
+            reportPrinter.println("<" + ELEM_RESULTSFILE + " "
+                                  + ATTR_FILENAME + "=\"" + fileName + "\">");
+
+            return true;
+        }
+        else
+            return false;
+    }
+
+    /**
+     * worker method to close the resultsfile element.  
+     *
+     * @return true if ready/OK, false if not ready (meaning we may 
+     * not have output a closing tag!)
+     */
+    protected boolean closeResultsFile()
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println("</" + ELEM_RESULTSFILE + ">");
+
+            return true;
+        }
+        else
+            return false;
+    }
+
+    //-----------------------------------------------------
+    //-------- Testfile / Testcase start and stop routines --------
+    //-----------------------------------------------------
+
+    /**
+     * Report that a testfile has started.
+     * Begins a testfile element.  Record format:
+     * <pre>&lt;testfile desc="<i>test description</i>" time="<i>timestamp</i>"&gt;</pre>
+     * @param name file name or tag specifying the test.
+     * @param comment comment about the test.
+     */
+    public void testFileInit(String name, String comment)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println("<" + ELEM_TESTFILE + " " 
+                                  + ATTR_TESTFILENAME + "=\""
+                                  + escapeString(name) + "\" " 
+                                  + ATTR_DESC + "=\""
+                                  + escapeString(comment) + "\" " 
+                                  + ATTR_TIME + "=\"" 
+                                  + (new Date()).toString() + "\">");
+        }
+    }
+
+    /**
+     * Report that a testfile has finished, and report it's result; flushes output.
+     * Ends a testfile element.  Record format:
+     * <pre>&lt;fileresult desc="<i>test description</i>" result="<i>pass/fail status</i>" time="<i>timestamp</i>"&gt;
+     * &lt;/testfile&gt;</pre>
+     * @param msg message to log out
+     * @param result result of testfile
+     */
+    public void testFileClose(String msg, String result)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println("<" + ELEM_FILERESULT + " " + ATTR_DESC
+                                  + "=\"" + escapeString(msg) + "\" "
+                                  + ATTR_RESULT + "=\"" + result + "\" "
+                                  + ATTR_TIME + "=\""
+                                  + (new Date()).toString() + "\"/>");
+            reportPrinter.println("</" + ELEM_TESTFILE + ">");
+        }
+
+        flush();
+    }
+
+    /** Optimization: for heavy use methods, form pre-defined constants to save on string concatenation. */
+    private static final String TESTCASEINIT_HDR = "<" + ELEM_TESTCASE + " "
+                                                       + ATTR_DESC + "=\"";
+
+    /**
+     * Report that a testcase has begun.
+     * Begins a testcase element.  Record format:
+     * <pre>&lt;testcase desc="<i>case description</i>"&gt;</pre>
+     *
+     * @param comment message to log out
+     */
+    public void testCaseInit(String comment)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println(TESTCASEINIT_HDR + escapeString(comment)
+                                  + "\">");
+        }
+    }
+
+    /** NEEDSDOC Field TESTCASECLOSE_HDR          */
+    private static final String TESTCASECLOSE_HDR = "<" + ELEM_CASERESULT
+                                                        + " " + ATTR_DESC
+                                                        + "=\"";
+
+    /**
+     * Report that a testcase has finished, and report it's result.
+     * Optionally flushes output. Ends a testcase element.   Record format:
+     * <pre>&lt;caseresult desc="<i>case description</i>" result="<i>pass/fail status</i>"&gt;
+     * &lt;/testcase&gt;</pre>
+     * @param msg message of name of test case to log out
+     * @param result result of testfile
+     */
+    public void testCaseClose(String msg, String result)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println(TESTCASECLOSE_HDR + escapeString(msg)
+                                  + "\" " + ATTR_RESULT + "=\"" + result
+                                  + "\"/>");
+            reportPrinter.println("</" + ELEM_TESTCASE + ">");
+        }
+
+        if (getFlushOnCaseClose())
+            flush();
+    }
+
+    //-----------------------------------------------------
+    //-------- Test results logging routines --------
+    //-----------------------------------------------------
+
+    /** NEEDSDOC Field MESSAGE_HDR          */
+    private static final String MESSAGE_HDR = "<" + ELEM_MESSAGE + " "
+                                              + ATTR_LEVEL + "=\"";
+
+    /**
+     * Report a comment to result file with specified severity.
+     * Record format: <pre>&lt;message level="##"&gt;msg&lt;/message&gt;</pre>
+     * @param level severity or class of message.
+     * @param msg comment to log out.
+     */
+    public void logMsg(int level, String msg)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.print(MESSAGE_HDR + level + "\">");
+            reportPrinter.print(escapeString(msg));
+            reportPrinter.println("</" + ELEM_MESSAGE + ">");
+        }
+    }
+
+    /** NEEDSDOC Field ARBITRARY_HDR          */
+    private static final String ARBITRARY_HDR = "<" + ELEM_ARBITRARY + " "
+                                                + ATTR_LEVEL + "=\"";
+
+    /**
+     * Report an arbitrary String to result file with specified severity.
+     * Appends and prepends \\n newline characters at the start and
+     * end of the message to separate it from the tags.
+     * Record format: <pre>&lt;arbitrary level="##"&gt;&lt;![CDATA[
+     * msg
+     * ]]&gt;&lt;/arbitrary&gt;</pre>
+     *
+     * Note that arbitrary messages are always wrapped in CDATA
+     * sections to ensure that any non-valid XML is wrapped.  This needs
+     * to be investigated for other elements as well (i.e. we should set a
+     * standard for what Logger calls must be well-formed or not).
+     * @param level severity or class of message.
+     * @param msg arbitrary String to log out.
+     * @todo investigate <b>not</b> fully escaping this string, since
+     * it does get wrappered in CDATA
+     */
+    public void logArbitrary(int level, String msg)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println(ARBITRARY_HDR + level + "\"><![CDATA[");
+            reportPrinter.println(escapeString(msg));
+            reportPrinter.println("]]></" + ELEM_ARBITRARY + ">");
+        }
+    }
+
+    /** NEEDSDOC Field STATISTIC_HDR          */
+    private static final String STATISTIC_HDR = "<" + ELEM_STATISTIC + " "
+                                                + ATTR_LEVEL + "=\"";
+
+    /**
+     * Logs out statistics to result file with specified severity.
+     * Record format: <pre>&lt;statistic level="##" desc="msg"&gt;&lt;longval&gt;1234&lt;/longval&gt;&lt;doubleval&gt;1.234&lt;/doubleval&gt;&lt;/statistic&gt;</pre>
+     * @param level severity of message.
+     * @param lVal statistic in long format.
+     * @param dVal statistic in double format.
+     * @param msg comment to log out.
+     */
+    public void logStatistic(int level, long lVal, double dVal, String msg)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.print(STATISTIC_HDR + level + "\" " + ATTR_DESC
+                                + "=\"" + escapeString(msg) + "\">");
+            reportPrinter.print("<" + ELEM_LONGVAL + ">" + lVal + "</"
+                                + ELEM_LONGVAL + ">");
+            reportPrinter.print("<" + ELEM_DOUBLEVAL + ">" + dVal + "</"
+                                + ELEM_DOUBLEVAL + ">");
+            reportPrinter.println("</" + ELEM_STATISTIC + ">");
+        }
+    }
+
+    /**
+     * Logs out Throwable.toString() and a stack trace of the 
+     * Throwable with the specified severity.
+     * <p>This uses logArbitrary to log out your msg - message, 
+     * a newline, throwable.toString(), a newline,
+     * and then throwable.printStackTrace().</p>
+     * //@todo future work to use logElement() to output 
+     * a specific &lt;throwable&gt; element instead.
+     * @author Shane_Curcuru@lotus.com
+     * @param level severity of message.
+     * @param throwable throwable/exception to log out.
+     * @param msg description of the throwable.
+     */
+    public void logThrowable(int level, Throwable throwable, String msg)
+    {
+        if (isReady())
+        {
+            StringWriter sWriter = new StringWriter();
+
+            sWriter.write(msg + "\n");
+            sWriter.write(throwable.toString() + "\n");
+
+            PrintWriter pWriter = new PrintWriter(sWriter);
+
+            throwable.printStackTrace(pWriter);
+            logArbitrary(level, sWriter.toString());
+        }
+    }
+
+    /**
+     * 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.
+     * Record format:
+     * <pre>&lt;<i>element_text</i> level="##"
+     * attribute1="value1"
+     * attribute2="value2"
+     * attribute<i>n</i>="value<i>n</i>"&gt;
+     * msg
+     * &lt;/<i>element_text</i>&gt;</pre>
+     * @author Shane_Curcuru@lotus.com
+     * @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 Object to log out .toString(); caller should
+     * ensure it's legal XML (no CDATA is supplied)
+     */
+    public void logElement(int level, String element, Hashtable attrs,
+                           Object msg)
+    {
+
+        if (isReady()
+            && (element != null)
+            && (attrs != null)
+           )
+        {
+            reportPrinter.println("<" + element + " " + ATTR_LEVEL + "=\""
+                                  + level + "\"");
+
+            for (Enumeration keys = attrs.keys();
+                    keys.hasMoreElements(); /* no increment portion */ )
+            {
+                Object key = keys.nextElement();
+
+                reportPrinter.println(key.toString() + "=\""
+                                      + escapeString(attrs.get(key).toString()) + "\"");
+            }
+
+            reportPrinter.println(">");
+            if (msg != null)
+                reportPrinter.println(msg.toString());
+            reportPrinter.println("</" + element + ">");
+        }
+    }
+
+    /** NEEDSDOC Field HASHTABLE_HDR          */
+    private static final String HASHTABLE_HDR = "<" + ELEM_HASHTABLE + " "
+                                                + ATTR_LEVEL + "=\"";
+
+    // Note the HASHITEM_HDR indent; must be updated if we ever switch to another indenting method.
+
+    /** NEEDSDOC Field HASHITEM_HDR          */
+    private static final String HASHITEM_HDR = "  <" + ELEM_HASHITEM + " "
+                                               + ATTR_KEY + "=\"";
+
+    /**
+     * Logs out contents of a Hashtable with specified severity.
+     * Indents each hashitem within the table.
+     * Record format: <pre>&lt;hashtable level="##" desc="msg"/&gt;
+     * &nbsp;&nbsp;&lt;hashitem key="key1"&gt;value1&lt;/hashitem&gt;
+     * &nbsp;&nbsp;&lt;hashitem key="key2"&gt;value2&lt;/hashitem&gt;
+     * &lt;/hashtable&gt;</pre>
+     *
+     * @param level severity or class of message.
+     * @param hash Hashtable to log the contents of.
+     * @param msg decription of the Hashtable.
+     */
+    public void logHashtable(int level, Hashtable hash, String msg)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println(HASHTABLE_HDR + level + "\" " + ATTR_DESC
+                                  + "=\"" + escapeString(msg) + "\">");
+
+            if (hash == null)
+            {
+                reportPrinter.print("<" + ELEM_HASHITEM + " " + ATTR_KEY
+                                    + "=\"null\">");
+                reportPrinter.println("</" + ELEM_HASHITEM + ">");
+            }
+
+            try
+            {
+                for (Enumeration keys = hash.keys();
+                        keys.hasMoreElements(); /* no increment portion */ )
+                {
+                    Object key = keys.nextElement();
+
+                    // Ensure we'll have clean output by pre-fetching value before outputting anything
+                    String value = escapeString(hash.get(key).toString());
+
+                    reportPrinter.print(HASHITEM_HDR + escapeString(key.toString())
+                                        + "\">");
+                    reportPrinter.print(value);
+                    reportPrinter.println("</" + ELEM_HASHITEM + ">");
+                }
+            }
+            catch (Exception e)
+            {
+
+                // No-op: should ensure we have clean output
+            }
+
+            reportPrinter.println("</" + ELEM_HASHTABLE + ">");
+        }
+    }
+
+    //-----------------------------------------------------
+    //-------- Test results reporting check* routines --------
+    //-----------------------------------------------------
+
+    /** NEEDSDOC Field CHECKPASS_HDR          */
+    private static final String CHECKPASS_HDR = "<" + ELEM_CHECKRESULT + " "
+                                                + ATTR_RESULT + "=\""
+                                                + Reporter.PASS + "\" "
+                                                + ATTR_DESC + "=\"";
+
+    /**
+     * Writes out a Pass record with comment.
+     * Record format: <pre>&lt;checkresult result="PASS" desc="comment"/&gt;</pre>
+     * @param comment comment to log with the pass record.
+     */
+    public void checkPass(String comment)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println(CHECKPASS_HDR + escapeString(comment)
+                                  + "\"/>");
+        }
+    }
+
+    /** NEEDSDOC Field CHECKAMBG_HDR          */
+    private static final String CHECKAMBG_HDR = "<" + ELEM_CHECKRESULT + " "
+                                                + ATTR_RESULT + "=\""
+                                                + Reporter.AMBG + "\" "
+                                                + ATTR_DESC + "=\"";
+
+    /**
+     * Writes out an ambiguous record with comment.
+     * Record format: <pre>&lt;checkresult result="AMBG" desc="comment"/&gt;</pre>
+     * @param comment comment to log with the ambg record.
+     */
+    public void checkAmbiguous(String comment)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println(CHECKAMBG_HDR + escapeString(comment)
+                                  + "\"/>");
+        }
+    }
+
+    /** NEEDSDOC Field CHECKFAIL_HDR          */
+    private static final String CHECKFAIL_HDR = "<" + ELEM_CHECKRESULT + " "
+                                                + ATTR_RESULT + "=\""
+                                                + Reporter.FAIL + "\" "
+                                                + ATTR_DESC + "=\"";
+
+    /**
+     * Writes out a Fail record with comment.
+     * Record format: <pre>&lt;checkresult result="FAIL" desc="comment"/&gt;</pre>
+     * @param comment comment to log with the fail record.
+     */
+    public void checkFail(String comment)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println(CHECKFAIL_HDR + escapeString(comment)
+                                  + "\"/>");
+        }
+    }
+
+    /** NEEDSDOC Field CHECKERRR_HDR          */
+    private static final String CHECKERRR_HDR = "<" + ELEM_CHECKRESULT + " "
+                                                + ATTR_RESULT + "=\""
+                                                + Reporter.ERRR + "\" "
+                                                + ATTR_DESC + "=\"";
+
+    /**
+     * Writes out a Error record with comment.
+     * Record format: <pre>&lt;checkresult result="ERRR" desc="comment"/&gt;</pre>
+     * @param comment comment to log with the error record.
+     */
+    public void checkErr(String comment)
+    {
+
+        if (isReady())
+        {
+            reportPrinter.println(CHECKERRR_HDR + escapeString(comment)
+                                  + "\"/>");
+        }
+    }
+
+    /* EXPERIMENTAL: have duplicate set of check*() methods 
+       that all output some form of ID as well as comment. 
+       Leave the non-ID taking forms for both simplicity to the 
+       end user who doesn't care about IDs as well as for 
+       backwards compatibility.
+    */
+
+    /** ID_ATTR optimization for extra ID attribute.  */
+    private static final String ATTR_ID = "\" id=\"";
+    /**
+     * Writes out a Pass record with comment.
+     * Record format: <pre>&lt;checkresult result="PASS" desc="comment"/&gt;</pre>
+     * @param comment comment to log with the pass record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkPass(String comment, String id)
+    {
+
+        if (isReady())
+        {
+            StringBuffer tmp = new StringBuffer(CHECKPASS_HDR + escapeString(comment));
+            if (id != null)
+                tmp.append(ATTR_ID + escapeString(id));
+                
+            tmp.append("\"/>");
+            reportPrinter.println(tmp);
+        }
+    }
+
+    /**
+     * Writes out an ambiguous record with comment.
+     * Record format: <pre>&lt;checkresult result="AMBG" desc="comment"/&gt;</pre>
+     * @param comment comment to log with the ambg record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkAmbiguous(String comment, String id)
+    {
+
+        if (isReady())
+        {
+            StringBuffer tmp = new StringBuffer(CHECKAMBG_HDR + escapeString(comment));
+            if (id != null)
+                tmp.append(ATTR_ID + escapeString(id));
+                
+            tmp.append("\"/>");
+            reportPrinter.println(tmp);
+        }
+    }
+
+    /**
+     * Writes out a Fail record with comment.
+     * Record format: <pre>&lt;checkresult result="FAIL" desc="comment"/&gt;</pre>
+     * @param comment comment to log with the fail record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkFail(String comment, String id)
+    {
+
+        if (isReady())
+        {
+            StringBuffer tmp = new StringBuffer(CHECKFAIL_HDR + escapeString(comment));
+            if (id != null)
+                tmp.append(ATTR_ID + escapeString(id));
+                
+            tmp.append("\"/>");
+            reportPrinter.println(tmp);
+        }
+    }
+
+    /**
+     * Writes out a Error record with comment.
+     * Record format: <pre>&lt;checkresult result="ERRR" desc="comment"/&gt;</pre>
+     * @param comment comment to log with the error record.
+     * @param ID token to log with the pass record.
+     */
+    public void checkErr(String comment, String id)
+    {
+
+        if (isReady())
+        {
+            StringBuffer tmp = new StringBuffer(CHECKERRR_HDR + escapeString(comment));
+            if (id != null)
+                tmp.append(ATTR_ID + escapeString(id));
+                
+            tmp.append("\"/>");
+            reportPrinter.println(tmp);
+        }
+    }
+
+    //-----------------------------------------------------
+    //-------- Worker routines for XML string escaping --------
+    //-----------------------------------------------------
+
+    /**
+     * Lifted from org.apache.xml.serialize.transition.XMLSerializer
+     *
+     * @param ch character to get entity ref for
+     * @return String of entity name
+     */
+    public static String getEntityRef(char ch)
+    {
+
+        // Encode special XML characters into the equivalent character references.
+        // These five are defined by default for all XML documents.
+        switch (ch)
+        {
+        case '<' :
+            return "lt";
+        case '>' :
+            return "gt";
+        case '"' :
+            return "quot";
+        case '\'' :
+            return "apos";
+        case '&' :
+            return "amp";
+        }
+
+        return null;
+    }
+
+    /**
+     * Identifies the last printable character in the Unicode range
+     * that is supported by the encoding used with this serializer.
+     * For 8-bit encodings this will be either 0x7E or 0xFF.
+     * For 16-bit encodings this will be 0xFFFF. Characters that are
+     * not printable will be escaped using character references.
+     * Lifted from org.apache.xml.serialize.transition.BaseMarkupSerializer
+     */
+    public static int _lastPrintable = 0x7E;
+
+    /**
+     * Lifted from org.apache.xml.serialize.transition.BaseMarkupSerializer
+     *
+     * @param ch character to escape
+     * @return String that is escaped
+     */
+    public static String printEscaped(char ch)
+    {
+
+        String charRef;
+
+        // If there is a suitable entity reference for this
+        // character, print it. The list of available entity
+        // references is almost but not identical between
+        // XML and HTML.
+        charRef = getEntityRef(ch);
+
+        if (charRef != null)
+        {
+
+            //_printer.printText( '&' );        // SC note we need to return a String for 
+            //_printer.printText( charRef );    //    someone else to serialize
+            //_printer.printText( ';' );
+            return "&" + charRef + ";";
+        }
+        else if ((ch >= ' ' && ch <= _lastPrintable && ch != 0xF7)
+                 || ch == '\n' || ch == '\r' || ch == '\t')
+        {
+
+            // If the character is not printable, print as character reference.
+            // Non printables are below ASCII space but not tab or line
+            // terminator, ASCII delete, or above a certain Unicode threshold.
+            //_printer.printText( ch );
+            return String.valueOf(ch);
+        }
+        else
+        {
+
+            //_printer.printText( "&#" );
+            //_printer.printText( Integer.toString( ch ) );
+            //_printer.printText( ';' );
+            return "&#" + Integer.toString(ch) + ";";
+        }
+    }
+
+    /**
+     * Escapes a string so it may be printed as text content or attribute
+     * value. Non printable characters are escaped using character references.
+     * Where the format specifies a deault entity reference, that reference
+     * is used (e.g. <tt>&amp;lt;</tt>).
+     * Lifted from org.apache.xml.serialize.transition.BaseMarkupSerializer
+     *
+     * @param source The string to escape
+     * @return String after escaping - needed for our application
+     */
+    public static String escapeString(String source)
+    {
+        // Check for null; just return null (callers shouldn't care)
+        if (source == null)
+        {
+            return null;
+        }
+        StringBuffer sb = new StringBuffer();
+        final int n = source.length();
+
+        for (int i = 0; i < n; ++i)
+        {
+
+            //char c = source.charAt( i );
+            sb.append(printEscaped(source.charAt(i)));
+        }
+
+        return sb.toString();
+    }
+}  // end of class XMLFileLogger
+
diff --git a/test/java/src/org/apache/qetest/XMLParse.java b/test/java/src/org/apache/qetest/XMLParse.java
new file mode 100644
index 0000000..c0d654e
--- /dev/null
+++ b/test/java/src/org/apache/qetest/XMLParse.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.qetest;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import org.w3c.dom.Document;
+
+/**
+ * A utility class, to check well-formedness of an XML document,
+ * using an XML DOM parser.
+ *
+ * @author mukulg@apache.org
+ * @version $Id$
+ */
+public class XMLParse {
+
+	private String xmlFilePath = null;
+
+	public XMLParse(String xmlFilePath) {
+		this.xmlFilePath = xmlFilePath;
+	}
+
+	public boolean parse() {
+	   boolean isDocumentWellFormedXml = false;
+	   try {
+		  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		  DocumentBuilder builder = factory.newDocumentBuilder();
+		  Document document = builder.parse(xmlFilePath);
+		  if (document != null) {
+			 isDocumentWellFormedXml = true;
+		  }
+       }
+	   catch (Exception ex) {
+		  // NO OP
+	   }
+
+	   return isDocumentWellFormedXml;
+	}
+
+}
diff --git a/test/java/src/org/apache/qetest/XMLParserTestDriver.java b/test/java/src/org/apache/qetest/XMLParserTestDriver.java
new file mode 100644
index 0000000..5a5cb77
--- /dev/null
+++ b/test/java/src/org/apache/qetest/XMLParserTestDriver.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.qetest;
+
+/**
+ * A test driver class, to invoke an XML document parser.
+ *
+ * @author mukulg@apache.org
+ * @version $Id$
+ */
+ public class XMLParserTestDriver {
+
+    private static String SUCCESS_MESG = "The test case passed";
+
+    private static String FAIL_MESG = "Test failed. Please solve this, before checking in";
+
+    private static String FILE_EXT_SEPARATOR = ".";
+
+    public static void main(String[] args) {
+        String xmlFilePath = args[0];
+        String contextProcessor = args[1];
+        documentParse(xmlFilePath, contextProcessor);
+    }
+
+    private static void documentParse(String xmlFilePath, String contextProcessor) {
+       XMLParse xmlParse = new XMLParse(xmlFilePath);
+       boolean isDocumentWellFormedXml = xmlParse.parse();
+       if (isDocumentWellFormedXml) {
+          System.out.println(SUCCESS_MESG + " [" + contextProcessor + " : " + xmlFilePath.substring(0,
+                                                      xmlFilePath.indexOf(FILE_EXT_SEPARATOR)) + "]!");
+       }
+       else {
+          System.out.println(FAIL_MESG + " [" + contextProcessor + " : " +  xmlFilePath.substring(0,
+                                                      xmlFilePath.indexOf(FILE_EXT_SEPARATOR)) + "]!");
+       }
+    }
+
+ }
diff --git a/test/java/src/org/apache/qetest/XSDFileFilter.java b/test/java/src/org/apache/qetest/XSDFileFilter.java
new file mode 100644
index 0000000..acb1a4c
--- /dev/null
+++ b/test/java/src/org/apache/qetest/XSDFileFilter.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest;
+
+/**
+ * FilenameFilter supporting includes/excludes returning files
+ * that match *.xsd.
+ *
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class XSDFileFilter extends FilePatternFilter
+{
+
+    /** Default pattern we're looking for: *.xsd.  */
+    public static final String PATTERN = "*.xsd";
+
+    /** 
+     * Initialize for default pattern.  
+     */
+    public XSDFileFilter() 
+    {
+        super(null, null, PATTERN);
+    }
+
+    /**
+     * Initialize with some include(s)/exclude(s).  
+     *
+     * @param inc semicolon-delimited string of inclusion name(s)
+     * @param exc semicolon-delimited string of exclusion name(s)
+     */
+    public XSDFileFilter(String inc, String exc)
+    {
+        super(inc, exc, PATTERN);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/XSLFileFilter.java b/test/java/src/org/apache/qetest/XSLFileFilter.java
new file mode 100644
index 0000000..55615c1
--- /dev/null
+++ b/test/java/src/org/apache/qetest/XSLFileFilter.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest;
+
+/**
+ * FilenameFilter supporting includes/excludes returning files
+ * that match *.xsl.
+ *
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class XSLFileFilter extends FilePatternFilter
+{
+
+    /** Default pattern we're looking for: *.xsl.  */
+    public static final String PATTERN = "*.xsl";
+
+    /** 
+     * Initialize for default pattern.  
+     */
+    public XSLFileFilter() 
+    {
+        super(null, null, PATTERN);
+    }
+
+    /**
+     * Initialize with some include(s)/exclude(s).  
+     *
+     * @param inc semicolon-delimited string of inclusion name(s)
+     * @param exc semicolon-delimited string of exclusion name(s)
+     */
+    public XSLFileFilter(String inc, String exc)
+    {
+        super(inc, exc, PATTERN);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/XSValidate.java b/test/java/src/org/apache/qetest/XSValidate.java
new file mode 100644
index 0000000..ed67cf4
--- /dev/null
+++ b/test/java/src/org/apache/qetest/XSValidate.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.qetest;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.XMLConstants;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * A utility class, to do XML Schema 1.0 validation.
+ *
+ * @author mukulg@apache.org
+ * @version $Id$
+ */
+public class XSValidate implements ErrorHandler {
+
+	private String xmlFilePath = null;
+	private String xsdFilePath = null;
+	private List validationMessages = null;
+
+	private static final String SCHEMA_FULL_CHECKING_FEATURE_ID = 
+	                                          "http://apache.org/xml/features/validation/schema-full-checking";
+
+	public XSValidate(String xmlFilePath, String xsdFilePath) {
+		this.xmlFilePath = xmlFilePath;
+		this.xsdFilePath = xsdFilePath;
+		validationMessages = new ArrayList();
+	}
+
+	public List validate() {
+		try {
+			SchemaFactory sfFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+			sfFactory.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);
+			sfFactory.setErrorHandler(this);
+			Schema schema = sfFactory.newSchema(new SAXSource(new InputSource(xsdFilePath)));
+			Validator validator = schema.newValidator();
+			validator.setErrorHandler(this);
+			validator.validate(new SAXSource(new InputSource(xmlFilePath)));
+		}
+		catch (SAXException ex) {
+			validationMessages.add("SAXException: " + ex.getMessage());
+		}
+		catch (IOException ex) {
+			validationMessages.add("IOException: " + ex.getMessage());
+		}
+
+		return validationMessages;
+	}
+
+	public void error(SAXParseException saxParseEx) throws SAXException {
+		String systemId = saxParseEx.getSystemId();
+		String[] sysIdParts = systemId.split("/");
+		String saxParseMesg = saxParseEx.getMessage();		
+		validationMessages.add("[Error] " + sysIdParts[sysIdParts.length - 1] + ":" + saxParseEx.getLineNumber() + ":" + 
+		                                    saxParseEx.getColumnNumber() + ":" + saxParseMesg);
+	}
+
+	public void fatalError(SAXParseException saxParseEx) throws SAXException {
+		String systemId = saxParseEx.getSystemId();
+		String[] sysIdParts = systemId.split("/");
+		validationMessages.add("[Fatal Error] " + sysIdParts[sysIdParts.length - 1] + ":" + saxParseEx.getLineNumber() + 
+		                                          ":" + saxParseEx.getColumnNumber() + ":" + saxParseEx.getMessage());
+	}
+
+	public void warning(SAXParseException saxParseEx) throws SAXException {
+	    // NO OP
+	}
+
+}
diff --git a/test/java/src/org/apache/qetest/XSValidationTestDriver.java b/test/java/src/org/apache/qetest/XSValidationTestDriver.java
new file mode 100644
index 0000000..cb128b3
--- /dev/null
+++ b/test/java/src/org/apache/qetest/XSValidationTestDriver.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.qetest;
+
+import java.util.List;
+
+/**
+ * A test driver class, to invoke XML Schema 1.0 validation.
+ *
+ * @author mukulg@apache.org
+ * @version $Id$
+ */
+ public class XSValidationTestDriver {
+
+    private static String SUCCESS_MESG = "The test case passed";
+
+    private static String FAIL_MESG = "Test failed. Please solve this, before checking in";
+
+    private static String FILE_EXT_SEPARATOR = ".";
+
+    public static void main(String[] args) {
+        String xmlFilePath = args[0];
+        String xsdFilePath = args[1];
+        String contextProcessor = args[2];
+        xsValidationTest(xmlFilePath, xsdFilePath, contextProcessor);
+    }
+
+    private static void xsValidationTest(String xmlFilePath, String xsdFilePath, String contextProcessor) {
+       XSValidate xsValidate = new XSValidate(xmlFilePath, xsdFilePath);
+       List validationMessages = xsValidate.validate();
+       if (validationMessages.size() == 0) {
+          System.out.println(SUCCESS_MESG + " [" + contextProcessor + " : " + xsdFilePath.substring(0, 
+                                                      xsdFilePath.indexOf(FILE_EXT_SEPARATOR)) + "]!");
+       }
+       else {
+          System.out.println(FAIL_MESG + " [" + contextProcessor + " : " +  xsdFilePath.substring(0, 
+                                                   xsdFilePath.indexOf(FILE_EXT_SEPARATOR)) + "]!");
+       } 
+    }
+
+ }
diff --git a/test/java/src/org/apache/qetest/dtm/QeDtmUtils.java b/test/java/src/org/apache/qetest/dtm/QeDtmUtils.java
new file mode 100644
index 0000000..df5d836
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/QeDtmUtils.java
@@ -0,0 +1,289 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+
+package org.apache.qetest.dtm;
+
+import java.io.FileOutputStream;
+import java.io.StringReader;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.Reporter;
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMAxisIterator;
+import org.apache.xml.dtm.DTMAxisTraverser;
+import org.apache.xml.dtm.DTMManager;
+import org.apache.xml.dtm.ref.DTMManagerDefault;
+import org.apache.xpath.objects.XMLStringFactoryImpl;
+
+/**
+ * Static utility class for both general-purpose testing methods 
+ * and a few XML-specific methods.  
+ * Also provides a simplistic Test/Testlet launching helper 
+ * functionality.  Simply execute this class from the command 
+ * line with a full or partial classname (in the org.apache.qetest 
+ * area, obviously) and we'll load and execute that class instead.
+ * @author paul_dick@us.ibm.com
+ * @version $Id$
+ */
+public abstract class QeDtmUtils
+{
+    // abstract class cannot be instantiated
+
+
+/** Subdirectory under test\tests\api for our xsl/xml files.  */
+public static final String DTM_SUBDIR = "dtm";
+public static final String DTM_Prefix = "DTM_";
+public static final String deepFile = "./tests/perf/xtestdata/elem10kdeep.xml";
+public static final String flatFile = "./tests/perf/xtestdata/words-repeat.xml";
+
+
+public static final String defaultSource=
+ 	"<?xml version=\"1.0\"?>\n"+
+ 	"<Document xmlns:d=\"www.d.com\" a1=\"hello\" a2=\"goodbye\">"+
+ 	"<!-- Default test document -->"+
+ 	"<?api a1=\"yes\" a2=\"no\"?>"+
+ 	"<A><!-- A Subtree --><B><C><D><E><F xmlns:f=\"www.f.com\" a1=\"down\" a2=\"up\"/></E></D></C></B></A>"+
+ 	"<Aa/><Ab/><Ac><Ac1/></Ac>"+
+ 	"<Ad xmlns:Ad=\"www.Ad.com\" xmlns:y=\"www.y.com\" xmlns:z=\"www.z.com\">"+
+ 	"<Ad1/></Ad>"+
+ 	"</Document>";
+ 
+public static final String defaultSource2=
+	"<?xml version=\"1.0\"?>\n"+
+	"  <bdd:dummyDocument xmlns:bdd=\"www.bdd.org\" version=\"99\">\n"+
+	"  <!-- Default test document -->&#09;&amp;"+
+	"  <?api attrib1=\"yes\" attrib2=\"no\"?>"+
+	"   <A>\n"+
+	"    <B hat=\"new\" car=\"Honda\" dog=\"Boxer\">Life is good</B>\n"+
+	"   </A>\n"+
+	"   <C>My Anaconda<xyz:D xmlns:xyz=\"www.xyz.org\"/>Words</C>\n"+
+	"  	   Want a more interesting docuent, provide the URI on the command line!\n"+
+ 	"   <Sub-Doc xmlns:d=\"www.d.com\" a1=\"hello\" a2=\"goodbye\">"+
+ 	"   <!-- Default test Subdocument -->"+
+ 	"   <?api a1=\"yes\" a2=\"no\"?>"+
+ 	"   <A><!-- A Subtree --><B><C><D><E><f:F xmlns:f=\"www.f.com\" a1=\"down\" a2=\"up\"/></E></D></C></B></A>"+
+ 	"   <Aa/><Ab/><Ac><Ac1/></Ac>"+
+ 	"   <Ad:Ad xmlns:Ad=\"www.Ad.com\" xmlns:y=\"www.y.com\" xmlns:z=\"www.z.com\">"+
+ 	"   <Ad1/></Ad:Ad>"+
+ 	"   </Sub-Doc>"+
+	"  </bdd:dummyDocument>\n";
+
+public static final String simpleFlatFile=
+ 	"<?xml version=\"1.0\"?>\n"+
+ 	"<Doc>\n"+
+	"<item>XSLT</item>\n"+
+	"<item>processors</item>\n"+
+	"<item>must</item>\n"+
+	"<item>use</item>\n"+
+	"<item>XML</item>\n"+
+	"<item>Namespaces</item>\n"+
+	"<item>mechanism</item>\n"+
+ 	"</Doc>";
+
+
+public static final String[] TYPENAME=
+  { "NULL",
+    "ELEMENT",
+    "ATTRIBUTE",
+    "TEXT",
+    "CDATA_SECTION",
+    "ENTITY_REFERENCE",
+    "ENTITY",
+    "PROCESSING_INSTRUCTION",
+    "COMMENT",
+    "DOCUMENT",
+    "DOCUMENT_TYPE",
+    "DOCUMENT_FRAGMENT",
+    "NOTATION",
+    "NAMESPACE"
+  };
+
+// This routine generates a new DTM for each testcase
+      // Get a DTM manager, and ask it to load the DTM "uniquely",
+      // with no whitespace filtering, nonincremental, but _with_
+      // indexing (a fairly common case, and avoids the special
+      // mode used for RTF DTMs).
+public static DTM createDTM(int method, String theSource, StringBuffer buf)
+{
+	dtmWSStripper stripper = new dtmWSStripper();
+	long dtmStart = 0;
+	long dtmStop = 0;
+	Source source;
+	long startMem, startTotMem, stopMem, stopTotMem, postGCfree, postGCtotal;
+
+
+	// Create DTM and generate initial context
+	if (method == 1)
+	{
+		source = new StreamSource(new StringReader(theSource));
+	}
+	else 
+	{
+		source=new StreamSource(theSource);
+	}
+
+	startMem = Runtime.getRuntime().freeMemory();
+	startTotMem = Runtime.getRuntime().totalMemory();
+
+	dtmStart = System.currentTimeMillis();
+	DTMManager manager= new DTMManagerDefault().newInstance(new XMLStringFactoryImpl());
+	DTM dtm=manager.getDTM(source, true, stripper, false, true);
+   	dtmStop = System.currentTimeMillis();
+
+	stopMem = Runtime.getRuntime().freeMemory();
+	stopTotMem = Runtime.getRuntime().totalMemory();
+
+	Runtime.getRuntime().gc();
+
+	postGCfree = Runtime.getRuntime().freeMemory();
+	postGCtotal = Runtime.getRuntime().totalMemory();
+
+	buf.append("\nPre-DTM free memory:\t" + startMem + "/" + startTotMem); 
+	buf.append("\nPost-DTM free memory:\t" + stopMem + "/" + stopTotMem);
+	buf.append("\nPost-GC free memory:\t" + postGCfree + "/" + postGCtotal);
+
+
+	buf.append("\nInit of DTM took: \t"+ (dtmStop-dtmStart) + "\n");
+	System.out.println(buf);
+	return dtm;
+}
+
+ public static void timeAxisIterator(DTM dtm, int axis, int context, int[] rtdata)
+  {	
+    long startTime = 0;
+    long iterTime = 0;
+	int atNode = 0;
+	int lastNode = 0;							
+	int numOfNodes =0;
+
+	// Time creation and iteration.
+	startTime = System.currentTimeMillis();
+
+    DTMAxisIterator iter = dtm.getAxisIterator(axis);
+    iter.setStartNode(context);
+
+    for (atNode = iter.next(); DTM.NULL != atNode; atNode = iter.next())
+		{ 
+          lastNode = atNode;
+		  numOfNodes = numOfNodes + 1;	// Need to know that we Iterated the whole tree
+    	}
+
+    iterTime = System.currentTimeMillis() - startTime;
+
+	if (lastNode != 0)
+		getNodeInfo(dtm, lastNode, " ");
+
+	rtdata[0] = (int)iterTime;
+	rtdata[1] = lastNode;
+	rtdata[2] = numOfNodes;
+  }
+
+  
+static void timeAxisTraverser(DTM dtm, int axis, int context, int[] rtdata)
+  {	
+    long startTime = 0;
+    long travTime = 0;
+	int atNode = 0;
+	int lastNode = 0;
+	int numOfNodes =0;
+
+	// Time the creation and traversal.
+	startTime = System.currentTimeMillis();
+
+  	DTMAxisTraverser at = dtm.getAxisTraverser(axis);
+
+    for (atNode = at.first(context); DTM.NULL != atNode; atNode = at.next(context, atNode))
+		{ 
+          lastNode = atNode;
+		  numOfNodes = numOfNodes + 1;
+    	}
+
+    travTime = System.currentTimeMillis() - startTime;
+
+	if (lastNode != 0)
+		getNodeInfo(dtm, lastNode, " ");
+
+	rtdata[0] = (int)travTime;
+	rtdata[1] = lastNode;
+	rtdata[2] = numOfNodes;
+
+ }
+
+// This routine gathers up all the important info about a node, concatenates
+// in all together into a single string and returns it. 
+public static String getNodeInfo(DTM dtm, int nodeHandle, String indent)
+{
+    // Formatting hack -- suppress quotes when value is null, to distinguish
+    // it from "null" (JK).
+	String buf = new String("null");
+    String value=dtm.getNodeValue(nodeHandle);
+    String vq = (value==null) ? "" : "\"";
+
+    // Skip outputing of text nodes. In most cases they clutter the output, 
+	// besides I'm only interested in the elemental structure of the dtm. 
+    if( TYPENAME[dtm.getNodeType(nodeHandle)] != "TEXT" )
+	{ 
+    	buf = new String(indent+
+		       nodeHandle+": "+
+		       TYPENAME[dtm.getNodeType(nodeHandle)]+" "+
+			   dtm.getNodeName(nodeHandle)+" "+
+			   " Level=" + dtm.getLevel(nodeHandle)+" "+
+		       "\tValue=" + vq + value + vq	+ "\n"
+		       ); 
+	}
+	
+	return buf;
+}
+
+// This routine generates the output file stream.
+public static FileOutputStream openFileStream(String name, Reporter reporter)
+{
+	FileOutputStream fos = null;
+
+	try
+	{  fos = new FileOutputStream(name); }
+
+	catch (Exception e)
+	{  reporter.checkFail("Failure opening output file."); }
+
+	return fos;
+}
+
+// This routine writes the results to the output file.
+public static void writeClose(FileOutputStream fos, StringBuffer buf, Reporter reporter)
+{
+	// Write results and close output file.
+	try
+	{
+		fos.write(buf.toString().getBytes());
+		fos.close();
+	}
+
+	catch (Exception e)
+	{  reporter.checkFail("Failure writing output."); 	}
+ }
+    
+
+
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TestDTM.java b/test/java/src/org/apache/qetest/dtm/TestDTM.java
new file mode 100644
index 0000000..0418485
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TestDTM.java
@@ -0,0 +1,339 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.StringReader;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.LinebyLineCheckService;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMManager;
+import org.apache.xml.dtm.ref.DTMManagerDefault;
+import org.apache.xpath.objects.XMLStringFactoryImpl;
+
+/**
+ * Unit test for DTMManager/DTM
+ *
+ * Loads an XML document from a file (or, if no filename is supplied,
+ * an internal string), then dumps its contents. Replaces the old
+ * version, which was specific to the ultra-compressed implementation.
+ * (Which, by the way, we probably ought to revisit as part of our ongoing
+ * speed/size performance evaluation.)
+ *
+ * %REVIEW% Extend to test DOM2DTM, incremental, DOM view of the DTM, 
+ * whitespace-filtered, indexed/nonindexed, ...
+ * */
+public class TestDTM extends FileBasedTest
+{
+/**
+* This test creates a DTM and tests basic functionality of the DTM API
+* - execute 'build package.trax', 'traxapitest TestDTMIter.java'
+* - a bunch of convenience variables/initializers are included, 
+*   use or delete as is useful
+* @author Paul Dick
+* @version $Id$
+*
+* Provides nextName(), currentName() functionality for tests 
+* that may produce any number of output files.
+*/
+protected OutputNameManager outNames;
+
+/** 
+* Information about an xsl/xml file pair for transforming.  
+* Public members include inputName (for xsl); xmlName; goldName; etc.
+* If you don't use an .xml file on disk, you don't actually need this.
+*/
+protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+/** Subdirectory under test\tests\api for our xsl/xml files.  */
+public static final String DTM_SUBDIR = "dtm";
+public static final String DTM_Prefix = "DTM_";
+
+String defaultSource=
+	"<?xml version=\"1.0\"?>\n"+
+	"  <bdd:dummyDocument xmlns:bdd=\"www.bdd.org\" version=\"99\">\n"+
+	"  <!-- Default test document -->&#09;&amp;"+
+	"  <?api attrib1=\"yes\" attrib2=\"no\"?>"+
+	"   <A>\n"+
+	"    <B hat=\"new\" car=\"Honda\" dog=\"Boxer\">Life is good</B>\n"+
+	"   </A>\n"+
+	"   <C>My Anaconda<xyz:D xmlns:xyz=\"www.xyz.org\"/>Words</C>\n"+
+	"  	   Want a more interesting docuent, provide the URI on the command line!\n"+
+ 	"   <Sub-Doc xmlns:d=\"www.d.com\" a1=\"hello\" a2=\"goodbye\">"+
+ 	"   <!-- Default test Subdocument -->"+
+ 	"   <?api a1=\"yes\" a2=\"no\"?>"+
+ 	"   <A><!-- A Subtree --><B><C><D><E><f:F xmlns:f=\"www.f.com\" a1=\"down\" a2=\"up\"/></E></D></C></B></A>"+
+ 	"   <Aa/><Ab/><Ac><Ac1/></Ac>"+
+ 	"   <Ad:Ad xmlns:Ad=\"www.Ad.com\" xmlns:y=\"www.y.com\" xmlns:z=\"www.z.com\">"+
+ 	"   <Ad1/></Ad:Ad>"+
+ 	"   </Sub-Doc>"+
+	"  </bdd:dummyDocument>\n";
+
+static final String[] TYPENAME=
+  { "NULL",
+    "ELEMENT",
+    "ATTRIBUTE",
+    "TEXT",
+    "CDATA_SECTION",
+    "ENTITY_REFERENCE",
+    "ENTITY",
+    "PROCESSING_INSTRUCTION",
+    "COMMENT",
+    "DOCUMENT",
+    "DOCUMENT_TYPE",
+    "DOCUMENT_FRAGMENT",
+    "NOTATION",
+    "NAMESPACE"
+  };
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TestDTM()
+    {
+        numTestCases = 1;
+        testName = "TestDTM";
+        testComment = "Function test of DTM";
+    }
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * REPLACE_other_test_file_init.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in dtm subdir
+        File outSubDir = new File(outputDir + File.separator + DTM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + DTM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator
+                              + DTM_Prefix;
+
+        //testFileInfo.inputName = testBasePath + "REPLACE_xslxml_filename.xsl";
+        //testFileInfo.xmlName = testBasePath + "REPLACE_xslxml_filename.xml";
+        testFileInfo.goldName = goldBasePath;
+
+        return true;
+    }
+
+    /**
+     * Cleanup this test - REPLACE_other_test_file_cleanup.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Often will be a no-op
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk CHILD axis.
+    * @return false if we should abort the test; true otherwise
+    */
+public boolean testCase1()
+  {
+	reporter.testCaseInit("Basic Functionality of DTM");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = openFileStream(outNames.nextName());
+    String gold = testFileInfo.goldName + "testcase1.out";
+
+    // Create dtm and generate initial context
+	DTM dtm = generateDTM();
+
+    // DTM -- which will always be true for a node obtained this way, but
+    // won't be true for "shared" DTMs used to hold XSLT variables
+    int rootNode=dtm.getDocument();
+	buf.append(" *** DOCUMENT PROPERTIES: *** "+
+	  "\nDocURI=\""+dtm.getDocumentBaseURI()+"\" "+
+	  "SystemID=\""+dtm.getDocumentSystemIdentifier(rootNode)+"\"\n"+
+         // removed from test until implemented bugzilla 14753
+         // "DocEncoding=\""+dtm.getDocumentEncoding(rootNode)+"\" "+
+	  "StandAlone=\""+dtm.getDocumentStandalone(rootNode)+"\" "+
+	  "DocVersion=\""+dtm.getDocumentVersion(rootNode)+"\""+
+	  "\n\n");
+      
+    // Simple test: Recursively dump the DTM's content.
+    // We'll want to replace this with more serious examples
+	buf.append(" *** DOCUMENT DATA: *** ");
+    recursiveDumpNode(dtm, rootNode, buf);
+    
+	// Write results and close output file.
+	writeClose(fos, buf);
+
+    // Verify results		
+    LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+    myfilechecker.check(reporter, new File(outNames.currentName()),
+        						  new File(gold),
+        						  "Testcase1");        						 
+    reporter.testCaseClose();
+    return true;
+
+}
+  
+void recursiveDumpNode(DTM dtm, int nodeHandle, StringBuffer buf)
+{
+    // ITERATE over siblings
+    for( ; nodeHandle!=DTM.NULL; nodeHandle=dtm.getNextSibling(nodeHandle) )
+    {
+    	buf.append(getNodeInfo(dtm,nodeHandle,""));
+      
+	    // List the namespaces, if any.
+	    // Include only node's local namespaces, not inherited
+	    // %ISSUE% Consider inherited?
+	    int kid=dtm.getFirstNamespaceNode(nodeHandle,false);
+	    if(kid!=DTM.NULL)
+		{
+			buf.append("\n\tNAMESPACES:");
+			for( ; kid!=DTM.NULL; kid=dtm.getNextNamespaceNode(nodeHandle,kid,false))
+			{
+				buf.append(getNodeInfo(dtm,kid,"\t"));
+			}
+		}
+      									
+		// List the attributes, if any
+		kid=dtm.getFirstAttribute(nodeHandle);
+		if(kid!=DTM.NULL)
+		{
+			buf.append("\n\tATTRIBUTES:");
+			for( ; kid!=DTM.NULL; kid=dtm.getNextSibling(kid))
+			{
+				buf.append(getNodeInfo(dtm,kid,"\t"));
+			}
+		}
+      
+		// Recurse into the children, if any
+		recursiveDumpNode(dtm, dtm.getFirstChild(nodeHandle), buf);
+	}
+}
+
+String getNodeInfo(DTM dtm, int nodeHandle, String indent)
+{
+
+    // Formatting hack -- suppress quotes when value is null, to distinguish
+    // it from "null".
+	String buf = new String("null");
+    String value=dtm.getNodeValue(nodeHandle);
+    String vq=(value==null) ? "" : "\"";
+
+    // Skip outputing of text nodes. In most cases they clutter the output, 
+	// besides I'm only interested in the elemental structure of the dtm. 
+	{
+    	buf = new String("\n" + indent+
+		       nodeHandle+": "+
+		       TYPENAME[dtm.getNodeType(nodeHandle)]+" "+
+		       dtm.getNodeNameX(nodeHandle)+ " : " +
+			   dtm.getNodeName(nodeHandle)+
+		       "\" E-Type="+dtm.getExpandedTypeID(nodeHandle)+
+			   " Level=" + dtm.getLevel(nodeHandle)+
+		       " Value=" + vq + value + vq	+ "\n"+
+		       indent+
+			   "\tPrefix= "+"\""+dtm.getPrefix(nodeHandle)+"\""+
+			   " Name= "+"\""+dtm.getLocalName(nodeHandle)+"\""+
+			   " URI= "+"\""+dtm.getNamespaceURI(nodeHandle)+"\" "+
+		       "Parent=" + dtm.getParent(nodeHandle) +
+		       " 1stChild=" + dtm.getFirstChild(nodeHandle) +
+		       " NextSib=" + dtm.getNextSibling(nodeHandle)
+		       );
+
+	} 
+	return buf;
+}
+  
+public String usage()
+{
+	return ("Common [optional] options supported by TestDTM:\n"
+             + "(Note: assumes inputDir=.\\tests\\api)\n");
+}
+
+FileOutputStream openFileStream(String name)
+{
+	FileOutputStream fos = null;
+
+	try
+	{  fos = new FileOutputStream(name); }
+
+	catch (Exception e)
+	{  reporter.checkFail("Failure opening output file."); }
+
+	return fos;
+}
+
+// This routine generates a new DTM for each testcase
+DTM generateDTM()
+{
+	dtmWSStripper stripper = new dtmWSStripper();
+
+	// Create DTM and generate initial context
+	Source source = new StreamSource(new StringReader(defaultSource));
+	DTMManager manager= new DTMManagerDefault().newInstance(new XMLStringFactoryImpl());
+	DTM dtm=manager.getDTM(source, true, stripper, false, true);
+   
+	return dtm;
+}
+
+void writeClose(FileOutputStream fos, StringBuffer buf)
+{
+	// Write results and close output file.
+	try
+	{
+               fos.write(buf.toString().getBytes("UTF-8"));
+		fos.close();
+	}
+
+	catch (Exception e)
+	{  reporter.checkFail("Failure writing output."); 	}
+ }
+    
+/**
+* Main method to run test from the command line - can be left alone.  
+* @param args command line argument array
+*/
+public static void main(String[] args)
+{
+	TestDTM app = new TestDTM();
+	app.doMain(args);
+}
+
+
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TestDTMIter.java b/test/java/src/org/apache/qetest/dtm/TestDTMIter.java
new file mode 100644
index 0000000..b4a993d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TestDTMIter.java
@@ -0,0 +1,714 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.StringReader;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.LinebyLineCheckService;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.dtm.Axis;
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMAxisIterator;
+import org.apache.xml.dtm.DTMManager;
+import org.apache.xml.dtm.ref.DTMManagerDefault;
+import org.apache.xpath.objects.XMLStringFactoryImpl;
+
+//-------------------------------------------------------------------------
+
+/**
+* This test creates a DTM and then walks it with axisIterators 
+* for each axis within XPATH
+* - execute 'build package.trax', 'traxapitest TestDTMIter.java'
+* - a bunch of convenience variables/initializers are included, 
+*   use or delete as is useful
+* @author Paul Dick
+* @version $Id$
+*/
+public class TestDTMIter extends FileBasedTest
+{
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     * If you don't use an .xml file on disk, you don't actually need this.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String DTM_SUBDIR = "dtm";
+	public static final String ITER_Prefix = "Iter_";
+
+	public static final String defaultSource=
+ 		"<?xml version=\"1.0\"?>\n"+
+ 		"<Document xmlns:d=\"www.d.com\" a1=\"hello\" a2=\"goodbye\">"+
+ 		"<!-- Default test document -->"+
+ 		"<?api a1=\"yes\" a2=\"no\"?>"+
+ 		"<A><!-- A Subtree --><B><C><D><E><F xmlns:f=\"www.f.com\" a1=\"down\" a2=\"up\"/></E></D></C></B></A>"+
+ 		"<Aa/><Ab/><Ac><Ac1/></Ac>"+
+ 		"<Ad xmlns:Ad=\"www.Ad.com\" xmlns:y=\"www.y.com\" xmlns:z=\"www.z.com\">"+
+ 		"<Ad1/></Ad>"+
+ 		"</Document>";
+ 
+	static final String[] TYPENAME=
+ 	{ 	"NULL",
+    	"ELEMENT",
+	    "ATTRIBUTE",
+   		"TEXT",
+   		"CDATA_SECTION",
+	    "ENTITY_REFERENCE",
+	    "ENTITY",
+	    "PROCESSING_INSTRUCTION",
+	    "COMMENT",
+	    "DOCUMENT",
+	    "DOCUMENT_TYPE",
+	    "DOCUMENT_FRAGMENT",
+	    "NOTATION",
+	    "NAMESPACE"
+	};
+
+	private int lastNode = 0;	// Set by first axis,  used by subsequent axis.
+	private String lastName;
+
+	private int lastNode2 = 0;	// Set by DESCENDANTORSELF, used in 11 & 12 
+	private String lastName2;
+
+	private int ANode = 0;		// Used in testcase 7 - 10
+	private String ANodeName;
+
+	private static dtmWSStripper stripper = new dtmWSStripper();
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TestDTMIter()
+    {
+        numTestCases = 12;
+        testName = "TestDTMIter";
+        testComment = "Function test of DTM iterators";
+    }
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * REPLACE_other_test_file_init.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in dtm subdir
+        File outSubDir = new File(outputDir + File.separator + DTM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + DTM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator
+                              + ITER_Prefix;
+
+        //testFileInfo.inputName = testBasePath + "REPLACE_xslxml_filename.xsl";
+        //testFileInfo.xmlName = testBasePath + "REPLACE_xslxml_filename.xml";
+        testFileInfo.goldName = goldBasePath;
+
+        return true;
+    }
+
+    /**
+     * Cleanup this test - REPLACE_other_test_file_cleanup.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Often will be a no-op
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk CHILD axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase1()
+    {
+		reporter.testCaseInit("Walk CHILD AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase1.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+	  	// Get various nodes to use as context nodes.
+	  	int dtmRoot = dtm.getDocument();				// #document
+	  	String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	  	int DNode = dtm.getFirstChild(dtmRoot);			// <Document>
+	  	String DNodeName = dtm.getNodeName(DNode);
+	  	int CNode = dtm.getFirstChild(DNode);			// <Comment>
+	  	int PINode = dtm.getNextSibling(CNode);			// <PI>
+	  	ANode = dtm.getNextSibling(PINode);				// <A>, used in testcase 7 - 10
+	  	ANodeName = dtm.getNodeName(ANode);
+
+
+		// Get a Iterator for CHILD:: axis and query it's direction.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.CHILD);
+      	iter.setStartNode(DNode);
+		buf.append("#### CHILD from "+DNodeName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+		{ 
+			buf.append(getNodeInfo(dtm, itNode, " "));
+			lastNode = itNode;			// Setting this GLOBAL IS BAD, but easy. Investigate!!
+		}
+		lastName = dtm.getNodeName(lastNode);
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase1"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Create AxisIterator and walk PARENT axis.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+		reporter.testCaseInit("Walk PARENT AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase2.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for PARENT:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.PARENT);
+      	iter.setStartNode(lastNode);
+
+		// Print out info about the axis
+		buf.append("#### PARENT from "+lastName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+			 buf.append(getNodeInfo(dtm, itNode, " "));
+		 		
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase2"); 
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk SELF axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase3()
+    {
+		reporter.testCaseInit("Walk SELF AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase3.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for CHILD:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.SELF);
+      	iter.setStartNode(lastNode);
+
+		// Print out info about the axis
+		buf.append("#### SELF from "+lastName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+		  buf.append(getNodeInfo(dtm, itNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase3"); 
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk NAMESPACE axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase4()
+    {
+		reporter.testCaseInit("Walk NAMESPACE AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase4.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for NAMESPACE:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.NAMESPACE);
+      	iter.setStartNode(lastNode);
+
+		// Print out info about the axis
+		buf.append("#### NAMESPACE from "+lastName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+		     buf.append(getNodeInfo(dtm, itNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase4"); 
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk PRECEDING axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase5()
+    {
+		reporter.testCaseInit("Walk PRECEDING AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase5.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for PRECEDING:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.PRECEDING);
+      	iter.setStartNode(lastNode);
+
+		// Print out info about the axis
+		buf.append("#### PRECEDING from "+lastName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+		     buf.append(getNodeInfo(dtm, itNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+
+	    // Verify results		
+	    LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+	    myfilechecker.check(reporter, new File(outNames.currentName()),
+	        						  new File(gold),
+	        						  "Testcase5");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk PRECEDINGSIBLING axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase6()
+    {
+		reporter.testCaseInit("Walk PRECEDINGSIBLING AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase6.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for PRECEDINGSIBLING:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.PRECEDINGSIBLING);
+      	iter.setStartNode(lastNode);
+
+		// Print out info about the axis
+		buf.append("#### PRECEDINGSIBLING from "+lastName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+		     buf.append(getNodeInfo(dtm, itNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase6"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk FOLLOWING axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase7()
+    {
+		reporter.testCaseInit("Walk FOLLOWING AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase7.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for FOLLOWING:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.FOLLOWING);
+      	iter.setStartNode(ANode);
+
+		// Print out info about the axis
+		buf.append("#### FOLLOWING from "+ANodeName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+		     buf.append(getNodeInfo(dtm, itNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase7"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk FOLLOWINGSIBLING axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase8()
+    {
+		reporter.testCaseInit("Walk FOLLOWINGSIBLING AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase8.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for FOLLOWINGSIBLING:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.FOLLOWINGSIBLING);
+      	iter.setStartNode(ANode);
+
+		// Print out info about the axis
+		buf.append("#### FOLLOWINGSIBLING from "+ANodeName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+		{ buf.append(getNodeInfo(dtm, itNode, " "));
+		  //lastNode = itNode;
+		}
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase8"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+   /**
+    * Create AxisIterator and walk DESCENDANT axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase9()
+    {
+		reporter.testCaseInit("Walk DESCENDANT AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase9.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for DESCENDANT:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.DESCENDANT);
+      	iter.setStartNode(ANode);
+
+		// Print out info about the axis
+		buf.append("#### DESCENDANT from "+ANodeName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+		     buf.append(getNodeInfo(dtm, itNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase9"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisIterator and walk DESCENDANTORSELF axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase10()
+    {
+		reporter.testCaseInit("Walk DESCENDANTORSELF AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase10.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for DESCENDANTORSELF:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.DESCENDANTORSELF);
+      	iter.setStartNode(ANode);
+
+		// Print out info about the axis
+		buf.append("#### DESCENDANTORSELF from "+ANodeName+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+	   	{
+	   		buf.append(getNodeInfo(dtm, itNode, " "));
+		  	lastNode2 = itNode;
+		}
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase10"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+   /**
+    * Create AxisIterator and walk ANCESTOR axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase11()
+    {
+		reporter.testCaseInit("Walk ANCESTOR AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase11.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for ANCESTOR:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.ANCESTOR);
+      	iter.setStartNode(lastNode2);
+
+		lastName2 = dtm.getNodeName(lastNode2);
+
+		// Print out info about the axis
+		buf.append("#### ANCESTOR from "+lastName2+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+			 buf.append(getNodeInfo(dtm, itNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+	    // Verify results		
+	    LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+	    myfilechecker.check(reporter, new File(outNames.currentName()),
+	        						  new File(gold),
+	        						  "Testcase11");        							
+        							 
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+   /**
+    * Create AxisIterator and walk ANCESTORORSELF axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase12()
+    {
+		reporter.testCaseInit("Walk ANCESTORORSELF AxisIterator");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase12.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Iterator for ANCESTORORSELF:: axis.
+      	DTMAxisIterator iter = dtm.getAxisIterator(Axis.ANCESTORORSELF);
+      	iter.setStartNode(lastNode2);
+
+		// Print out info about the axis
+		buf.append("#### ANCESTORORSELF from "+lastName2+", Reverse Axis:" + iter.isReverse() + "\n");
+
+	  	// Iterate the axis and write node info to output file
+      	for (int itNode = iter.next(); DTM.NULL != itNode; itNode = iter.next())
+			 buf.append(getNodeInfo(dtm, itNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+		LinebyLineCheckService myfilechecker = new LinebyLineCheckService();
+        myfilechecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase12"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+public String usage()
+{
+	return ("Common [optional] options supported by TestDTMIter:\n"
+             + "(Note: assumes inputDir=.\\tests\\api)\n");
+}
+
+FileOutputStream openFileStream(String name)
+{
+	FileOutputStream fos = null;
+
+	try
+	{  fos = new FileOutputStream(name); }
+
+	catch (Exception e)
+	{  reporter.checkFail("Failure opening output file."); }
+
+	return fos;
+}
+
+// This routine generates a new DTM for each testcase
+DTM generateDTM()
+{
+	// Create DTM and generate initial context
+	Source source = new StreamSource(new StringReader(defaultSource));
+	DTMManager manager= new DTMManagerDefault().newInstance(new XMLStringFactoryImpl());
+	DTM dtm=manager.getDTM(source, true, stripper, false, true);
+   
+	return dtm;
+}
+
+void writeClose(FileOutputStream fos, StringBuffer buf)
+{
+	// Write results and close output file.
+	try
+	{
+               fos.write(buf.toString().getBytes("UTF-8"));
+		fos.close();
+	}
+
+	catch (Exception e)
+	{  reporter.checkFail("Failure writing output."); 	}
+ }
+    
+String getNodeInfo(DTM dtm, int nodeHandle, String indent)
+{
+    // Formatting hack -- suppress quotes when value is null, to distinguish
+    // it from "null".
+	String buf = new String("null");
+    String value=dtm.getNodeValue(nodeHandle);
+    String vq = (value==null) ? "" : "\"";
+
+    // Skip outputing of text nodes. In most cases they clutter the output, 
+	// besides I'm only interested in the elemental structure of the dtm. 
+    if( TYPENAME[dtm.getNodeType(nodeHandle)] != "TEXT" )
+	{
+    	buf = new String(indent+
+		       nodeHandle+": "+
+		       TYPENAME[dtm.getNodeType(nodeHandle)]+" "+
+			   dtm.getNodeName(nodeHandle)+" "+
+			   " Level=" + dtm.getLevel(nodeHandle)+" "+
+		       "\tValue=" + vq + value + vq	+ "\n"
+		       ); 
+	}
+	return buf;
+}
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TestDTMIter app = new TestDTMIter();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TestDTMIterator.java b/test/java/src/org/apache/qetest/dtm/TestDTMIterator.java
new file mode 100644
index 0000000..6a778b3
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TestDTMIterator.java
@@ -0,0 +1,327 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import java.io.StringReader;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.xml.dtm.Axis;
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMAxisIterator;
+import org.apache.xml.dtm.DTMManager;
+import org.apache.xml.dtm.ref.DTMManagerDefault;
+import org.apache.xpath.objects.XMLStringFactoryImpl;
+
+
+/**
+ * Unit test for DTMManager/DTM
+ *
+ * Loads an XML document from a file (or, if no filename is supplied,
+ * an internal string), then dumps its contents. Replaces the old
+ * version, which was specific to the ultra-compressed implementation.
+ * (Which, by the way, we probably ought to revisit as part of our ongoing
+ * speed/size performance evaluation.)
+ *
+ * %REVIEW% Extend to test DOM2DTM, incremental, DOM view of the DTM, 
+ * whitespace-filtered, indexed/nonindexed, ...
+ * */
+public class TestDTMIterator {
+
+static final String[] TYPENAME=
+  { "NULL",
+    "ELEMENT",
+    "ATTRIBUTE",
+    "TEXT",
+    "CDATA_SECTION",
+    "ENTITY_REFERENCE",
+    "ENTITY",
+    "PROCESSING_INSTRUCTION",
+    "COMMENT",
+    "DOCUMENT",
+    "DOCUMENT_TYPE",
+    "DOCUMENT_FRAGMENT",
+    "NOTATION",
+    "NAMESPACE"
+  };
+
+  public static void main(String argv[])
+  {
+  	System.out.println("\nHELLO THERE AND WELCOME TO THE WACKY WORLD OF ITERATORS \n");
+    try
+    {
+	    // Pick our input source
+		Source source=null;
+		if(argv.length<1)
+		{
+			String defaultSource=
+ 		"<?xml version=\"1.0\"?>\n"+
+ 		"<Document xmlns:d=\"www.d.com\" a1=\"hello\" a2=\"goodbye\">"+
+ 		"<!-- Default test document -->"+
+ 		"<?api a1=\"yes\" a2=\"no\"?>"+
+ 		"<A><!-- A Subtree --><B><C><D><E><F xmlns:f=\"www.f.com\" a1=\"down\" a2=\"up\"/></E></D></C></B></A>"+
+ 		"<Aa/><Ab/><Ac><Ac1/></Ac>"+
+ 		"<Ad xmlns:Ad=\"www.Ad.com\" xmlns:y=\"www.y.com\" xmlns:z=\"www.z.com\">"+
+ 		"<Ad1/></Ad>"+
+ 		"</Document>";
+
+			source=new StreamSource(new StringReader(defaultSource));
+		}
+		else if (argv.length>1 &&  "X".equalsIgnoreCase(argv[1]))
+		{
+			// XNI stream startup goes here
+			// Remember to perform Schema validation, to obtain PSVI annotations
+		}
+		else
+		{
+			// Read from a URI via whatever mechanism the DTMManager prefers
+			source=new StreamSource(argv[0]);
+		}
+	
+      // Get a DTM manager, and ask it to load the DTM "uniquely",
+      // with no whitespace filtering, nonincremental, but _with_
+      // indexing (a fairly common case, and avoids the special
+      // mode used for RTF DTMs).
+
+	  // For testing with some of David Marston's files I do want to strip whitespace.
+	  dtmWSStripper stripper = new dtmWSStripper();
+
+      DTMManager manager= new DTMManagerDefault().newInstance(new XMLStringFactoryImpl());
+      DTM dtm=manager.getDTM(source, true, stripper, false, true);
+
+	  // Get various nodes to use as context nodes.
+	  int dtmRoot = dtm.getDocument();					// #document
+	  String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	  int DNode = dtm.getFirstChild(dtmRoot);			// <Document>
+	  String DNodeName = dtm.getNodeName(DNode);
+	  int CNode = dtm.getFirstChild(DNode);				// <Comment>
+	  int PINode = dtm.getNextSibling(CNode);			// <PI>
+	  int ANode = dtm.getNextSibling(PINode);			// <A>
+	  String ANodeName = dtm.getNodeName(ANode);
+	  int lastNode = 0;
+      
+
+	  // Get a Iterator for CHILD:: axis.
+      DTMAxisIterator iter = dtm.getAxisIterator(Axis.CHILD);
+      iter.setStartNode(DNode);
+
+	  System.out.println("#### CHILD from "+"<"+DNodeName+">, Reverse Axis:" + iter.isReverse());			   
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		{ printNode(dtm, itNode, " ");
+		  lastNode = itNode;
+		}
+	  
+	  String lastNodeName = dtm.getNodeName(lastNode);
+
+	  // Get iterator for PARENT:: Axis
+	  iter = dtm.getAxisIterator(Axis.PARENT);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### PARENT from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+  
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+	  // Get iterator for SELF:: Axis
+	  iter = dtm.getAxisIterator(Axis.SELF);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### SELF from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+/**** Not Implemented
+	  // Get iterator for NAMESPACEDECLS:: Axis
+	  iter = dtm.getAxisIterator(Axis.NAMESPACEDECLS);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### NAMESPACEDECLS from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+****/
+
+	  // Get iterator for NAMESPACE:: Axis
+	  iter = dtm.getAxisIterator(Axis.NAMESPACE);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### NAMESPACE from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+	  // Get iterator for PRECEDING:: Axis
+	  iter = dtm.getAxisIterator(Axis.PRECEDING);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### PRECEDING from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+	  // Get iterator for PRECEDINGSIBLING:: Axis
+	  iter = dtm.getAxisIterator(Axis.PRECEDINGSIBLING);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### PRECEDINGSIBLING from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+  
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+/**** ArrayIndexOutOfBoundsException
+	  // Get iterator for ATTRIBUTE:: Axis
+	  iter = dtm.getAxisIterator(Axis.ATTRIBUTE);
+	  iter.setStartNode(DNode);
+	  System.out.println("\n#### ATTRIBUTE from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+  
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+****/
+
+	  // Get iterator for FOLLOWING:: Axis
+	  iter = dtm.getAxisIterator(Axis.FOLLOWING);
+	  iter.setStartNode(ANode);
+	  System.out.println("\n#### FOLLOWING from "+"<"+ANodeName+">, Reverse Axis:" + iter.isReverse());	   
+  
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+	  // Get iterator for FOLLOWINGSIBLING:: Axis
+	  iter = dtm.getAxisIterator(Axis.FOLLOWINGSIBLING);
+	  iter.setStartNode(ANode);
+	  System.out.println("\n#### FOLLOWINGSIBLING from "+"<"+ANodeName+">, Reverse Axis:" + iter.isReverse());	   
+  
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+	  // Get a iterator for  DESCENDANT:: axis.
+	  iter = dtm.getAxisIterator(Axis.DESCENDANT);
+	  iter.setStartNode(ANode);
+	  System.out.println("\n#### DESCENDANT from "+"<"+ANodeName+">, Reverse Axis:" + iter.isReverse());
+
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  {
+		  	printNode(dtm, itNode, " ");
+			lastNode = itNode;
+		  }
+
+	  // Get iterator for DESCENDANTORSELF:: Axis
+	  iter = dtm.getAxisIterator(Axis.DESCENDANTORSELF);
+	  iter.setStartNode(ANode);
+	  System.out.println("\n#### DESCENDANT-OR-SELF from "+"<"+ANodeName+">, Reverse Axis:" + iter.isReverse());	   
+  
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		{
+		  printNode(dtm, itNode, " ");
+		  lastNode = itNode;
+		}
+
+	  //lastNode = iter.getLast();	 // Uncomment for Bugzilla 7885.
+      lastNodeName = dtm.getNodeName(lastNode);
+	  
+	  // The output from Ancestor and Ancestor-or-self is the topic
+	  // of Bugzilla 7886
+	  // Get iterator for ANCESTOR:: Axis
+	  iter = dtm.getAxisIterator(Axis.ANCESTOR);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### ANCESTOR from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+  
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+	  // Get iterator for ANCESTORORSELF:: Axis
+	  iter = dtm.getAxisIterator(Axis.ANCESTORORSELF);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### ANCESTOR-OR-SELF from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+  
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+
+/**** Absolute axis (ALL, DESCENDANTSFROMROOT, or DESCENDANTSORSELFFROMROOT) not implemented.  
+	  // Get itertor for ALL:: Axis
+	  // of previous iterator, i.e. lastNode.
+	  iter = dtm.getAxisIterator(Axis.ALL);
+	  iter.setStartNode(lastNode);
+	  System.out.println("\n#### ALL from "+"<"+lastNodeName+">, Reverse Axis:" + iter.isReverse());	   
+
+	  // Iterate the axis and print out node info.
+      for (int itNode = iter.next(); DTM.NULL != itNode;
+              itNode = iter.next())
+		  printNode(dtm, itNode, " ");
+****/
+    }
+    catch(Exception e)
+      {
+        e.printStackTrace();
+      }
+  }
+  
+static void printNode(DTM dtm, int nodeHandle, String indent)
+  {
+    // Briefly display this node
+    // Don't bother displaying namespaces or attrs; we do that at the
+    // next level up.
+    // %REVIEW% Add namespace info, type info, ...
+
+    // Formatting hack -- suppress quotes when value is null, to distinguish
+    // it from "null".
+    String value=dtm.getNodeValue(nodeHandle);
+    String vq = (value==null) ? "" : "\"";
+
+    // Skip outputing of text nodes. In most cases they clutter the output, 
+	// besides I'm only interested in the elemental structure of the dtm. 
+    if( TYPENAME[dtm.getNodeType(nodeHandle)] != "TEXT" )
+	{
+    	System.out.println(indent+
+		       +nodeHandle+": "+
+		       TYPENAME[dtm.getNodeType(nodeHandle)]+" "+
+			   dtm.getNodeName(nodeHandle)+" "+
+			   " Level=" + dtm.getLevel(nodeHandle)+" "+
+		       "\tValue=" + vq + value + vq
+		       ); 
+	}
+  }
+
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TestDTMTrav.java b/test/java/src/org/apache/qetest/dtm/TestDTMTrav.java
new file mode 100644
index 0000000..3711c3d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TestDTMTrav.java
@@ -0,0 +1,965 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.StringReader;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.dtm.Axis;
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMAxisTraverser;
+import org.apache.xml.dtm.DTMManager;
+import org.apache.xml.dtm.ref.DTMManagerDefault;
+import org.apache.xpath.objects.XMLStringFactoryImpl;
+
+//-------------------------------------------------------------------------
+
+/**
+* This test creates a DTM and then walks it with AxisTraversers 
+* for each axis within XPATH
+* - execute 'build package.trax', 'traxapitest TestDTMTrav.java'
+* - a bunch of convenience variables/initializers are included, 
+*   use or delete as is useful
+* @author Paul Dick
+* @version $Id$
+*/
+public class TestDTMTrav extends FileBasedTest
+{
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     * If you don't use an .xml file on disk, you don't actually need this.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String DTM_SUBDIR = "dtm";
+	public static final String TRAV_Prefix = "Trav_";
+
+	private static final String defaultSource=
+ 		"<?xml version=\"1.0\"?>\n"+
+ 		"<Document xmlns:d=\"www.d.com\" a1=\"hello\" a2=\"goodbye\">"+
+ 		"<!-- Default test document -->"+
+ 		"<?api a1=\"yes\" a2=\"no\"?>"+
+ 		"<A><!-- A Subtree --><B><C><D><E><F xmlns:f=\"www.f.com\" a1=\"down\" a2=\"up\"/></E></D></C></B></A>"+
+ 		"<Aa/><Ab/><Ac><Ac1/></Ac>"+
+ 		"<Ad xmlns:Ad=\"www.Ad.com\" xmlns:y=\"www.y.com\" xmlns:z=\"www.z.com\">"+
+ 		"<Ad1/></Ad>"+
+ 		"</Document>";
+ 
+	static final String[] TYPENAME=
+ 	{ 	"NULL",
+    	"ELEMENT",
+	    "ATTRIBUTE",
+   		"TEXT",
+   		"CDATA_SECTION",
+	    "ENTITY_REFERENCE",
+	    "ENTITY",
+	    "PROCESSING_INSTRUCTION",
+	    "COMMENT",
+	    "DOCUMENT",
+	    "DOCUMENT_TYPE",
+	    "DOCUMENT_FRAGMENT",
+	    "NOTATION",
+	    "NAMESPACE"
+	};
+
+	private int lastNode = 0;	// Set by first axis,  used by subsequent axis.
+	private String lastName;
+
+	private int lastNode2 = 0;	// Set by DESCENDANTORSELF, used in 11 & 12 
+	private String lastName2;
+
+	private int ANode = 0;		// Used in testcase 7 - 10
+	private String ANodeName;
+
+	private int CNode = 0;
+	private String CNodeName;
+
+	private int DNode = 0;
+	private String DNodeName;
+
+	private int PINode = 0;
+	private String PINodeName;
+
+	private static dtmWSStripper stripper = new dtmWSStripper();
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TestDTMTrav()
+    {
+        numTestCases = 20;
+        testName = "TestDTMTrav";
+        testComment = "Function test of DTM Traversers";
+    }
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * REPLACE_other_test_file_init.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in dtm subdir
+        File outSubDir = new File(outputDir + File.separator + DTM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + DTM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator
+                              + TRAV_Prefix;
+
+        //testFileInfo.inputName = testBasePath + "REPLACE_xslxml_filename.xsl";
+        //testFileInfo.xmlName = testBasePath + "REPLACE_xslxml_filename.xml";
+        testFileInfo.goldName = goldBasePath;
+
+        return true;
+    }
+
+    /**
+     * Cleanup this test - REPLACE_other_test_file_cleanup.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Often will be a no-op
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk CHILD axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase1()
+    {
+		reporter.testCaseInit("Walk CHILD AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase1.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+	  	// Get various nodes to use as context nodes.
+	  	int dtmRoot = dtm.getDocument();				// #document
+	  	String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	  	DNode = dtm.getFirstChild(dtmRoot);				// <Document>
+	  	DNodeName = dtm.getNodeName(DNode);
+	  	CNode = dtm.getFirstChild(DNode);				// <Comment>
+		CNodeName = dtm.getNodeName(CNode);
+	  	PINode = dtm.getNextSibling(CNode);				// <PI>
+		PINodeName = dtm.getNodeName(PINode);
+	  	ANode = dtm.getNextSibling(PINode);				// <A>
+	  	ANodeName = dtm.getNodeName(ANode);
+
+		// Get a Traverser for CHILD:: axis and query it's direction.
+		buf.append("#### CHILD from " + DNodeName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.CHILD);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(DNode); DTM.NULL != atNode; 
+      	     atNode = at.next(DNode,atNode))
+		{ 
+			buf.append(getNodeInfo(dtm, atNode, " "));
+			lastNode = atNode;			// Setting this GLOBAL IS BAD, but easy. Investigate!!
+		}
+		lastName = dtm.getNodeName(lastNode);
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase1"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+    public boolean testCase2()
+    {
+		reporter.testCaseInit("Walk PARENT AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase2.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for PARENT:: axis.
+		buf.append("#### PARENT from " + lastName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.PARENT);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+		 		
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase2"); 
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk SELF axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase3()
+    {
+		reporter.testCaseInit("Walk SELF AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase3.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for CHILD:: axis.
+		buf.append("#### SELF from " + lastName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.SELF);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode, atNode))
+		  buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase3"); 
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk NAMESPACE axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase4()
+    {
+		reporter.testCaseInit("Walk NAMESPACE AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase4.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for NAMESPACE:: axis.
+		buf.append("#### NAMESPACE from " + lastName + "\n");
+		DTMAxisTraverser at = dtm.getAxisTraverser(Axis.NAMESPACE);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode, atNode))
+		     buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase4"); 
+
+        reporter.testCaseClose();
+        return true;
+    }
+   /**
+    * Create AxisTraverser and walk NAMESPACEDECLS axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase5()
+    {
+		reporter.testCaseInit("Walk NAMESPACEDECLS AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase5.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for NAMESPACEDECLS:: axis.
+		buf.append("#### NAMESPACEDECLS from "+ lastName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.NAMESPACEDECLS);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode, atNode))
+		     buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase5"); 
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk PRECEDING axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase6()
+    {
+		reporter.testCaseInit("Walk PRECEDING AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase6.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for PRECEDING:: axis.
+		buf.append("#### PRECEDING from "+ lastName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.PRECEDING);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode, atNode))
+		     buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase5"); 
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk PRECEDINGSIBLING axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase7()
+    {
+		reporter.testCaseInit("Walk PRECEDINGSIBLING AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase7.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for PRECEDINGSIBLING:: axis.
+		buf.append("#### PRECEDINGSIBLING from "+ lastName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.PRECEDINGSIBLING);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode, atNode))
+		     buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase7"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+   /**
+    * Create AxisTraverser and walk FOLLOWING axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase8()
+    {
+		reporter.testCaseInit("Walk FOLLOWING AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase8.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for FOLLOWING:: axis.
+		buf.append("#### FOLLOWING from "+ ANodeName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.FOLLOWING);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(ANode); DTM.NULL != atNode; 
+      			atNode = at.next(ANode, atNode))
+		     buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase8"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk FOLLOWINGSIBLING axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase9()
+    {
+		reporter.testCaseInit("Walk FOLLOWINGSIBLING AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase9.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for FOLLOWINGSIBLING:: axis.
+      	buf.append("#### FOLLOWINGSIBLING from "+ ANodeName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.FOLLOWINGSIBLING);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(ANode); DTM.NULL != atNode; 
+      			atNode = at.next(ANode, atNode))
+		 	buf.append(getNodeInfo(dtm, atNode, " "));
+		
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase9"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+   /**
+    * Create AxisTraverser and walk DESCENDANT axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase10()
+    {
+		reporter.testCaseInit("Walk DESCENDANT AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase10.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for DESCENDANT:: axis.
+		buf.append("#### DESCENDANT from "+ ANodeName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.DESCENDANT);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(ANode); DTM.NULL != atNode; 
+      			atNode = at.next(ANode, atNode))
+		     buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase10"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk DESCENDANTORSELF axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase11()
+    {
+		reporter.testCaseInit("Walk DESCENDANTORSELF AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase11.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for DESCENDANTORSELF:: axis.
+		buf.append("#### DESCENDANTORSELF from "+ ANodeName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.DESCENDANTORSELF);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(ANode); DTM.NULL != atNode; 
+      			atNode = at.next(ANode, atNode))
+	   	{
+	   		buf.append(getNodeInfo(dtm, atNode, " "));
+		  	lastNode2 = atNode;
+		}
+
+		lastName2 = dtm.getNodeName(lastNode2);
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase11"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+   /**
+    * Create AxisTraverser and walk ANCESTOR axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase12()
+    {
+		reporter.testCaseInit("Walk ANCESTOR AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase12.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for ANCESTOR:: axis.
+		buf.append("#### ANCESTOR from "+ lastName2 + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.ANCESTOR);
+		
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode2); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode2, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase12"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+   /**
+    * Create AxisTraverser and walk ANCESTORORSELF axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase13()
+    {
+		reporter.testCaseInit("Walk ANCESTORORSELF AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase13.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for ANCESTORORSELF:: axis.
+		buf.append("#### ANCESTORORSELF from "+ lastName2 + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.ANCESTORORSELF);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode2); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode2, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase13"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk ALLFROMNODE axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase14()
+    {
+		reporter.testCaseInit("Walk ALLFROMNODE AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase14.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for ALLFROMNODE:: axis.
+		buf.append("#### ALL-FROM-NODE from "+ lastName2 + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.ALLFROMNODE);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode2); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode2, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase14"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk ATTRIBUTE axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase15()
+    {
+		reporter.testCaseInit("Walk ATTRIBUTE AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase15.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for ATTRIBUTE:: axis.
+		buf.append("#### ATTRIBUTE from "+ DNodeName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.ATTRIBUTE);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(DNode); DTM.NULL != atNode; 
+      			atNode = at.next(DNode, atNode))
+	   		buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase15"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+// ABSOLUTE AXIS TESTS
+// These next axis are all Absolute. They all default to the root of the dtm
+// tree,  regardless of what we call first() with. 
+
+
+   /**
+    * Create AxisTraverser and walk ALLFROMNODE axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase16()
+    {
+		reporter.testCaseInit("Walk ALL(absolute) AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase16.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for ALLFROMNODE:: axis.
+		buf.append("#### ALL(absolute) from "+ lastName2 + "(root)\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.ALL);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode2); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode2, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase16"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk ALLFROMNODE axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase17()
+    {
+		reporter.testCaseInit("Walk DESCENDANTSFROMROOT(abs) AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase17.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for DESCENDANTSFROMROOT:: axis.
+		buf.append("#### DESCENDANTSFROMROOT(abs) from "+ lastName2 + "(root)\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.DESCENDANTSFROMROOT);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode2); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode2, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase17"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk DESCENDANTSORSELFFROMROOT axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase18()
+    {
+		reporter.testCaseInit("Walk DESCENDANTSORSELFFROMROOT(abs) AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase18.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for ALLFROMNODE:: axis.
+		buf.append("#### DESCENDANTSORSELFFROMROOT(abs) from "+ lastName2 + "(root)\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.DESCENDANTSORSELFFROMROOT);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(lastNode2); DTM.NULL != atNode; 
+      			atNode = at.next(lastNode2, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase18"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk ALLFROMNODE axis.
+    * @return false if we should abort the test; true otherwise
+    */
+    public boolean testCase19()
+    {
+		reporter.testCaseInit("Walk ALLFROMNODE AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase19.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for ALLFROMNODE:: axis.
+		buf.append("#### ALL-FROM-NODE from "+ ANodeName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.ALLFROMNODE);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(ANode); DTM.NULL != atNode; 
+      			atNode = at.next(ANode, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase19"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+   /**
+    * Create AxisTraverser and walk ALLFROMNODE axis.
+    * @return false if we should abort the test; true otherwise
+   */
+   public boolean testCase20()
+    {
+		reporter.testCaseInit("Walk ALLFROMNODE AxisTraverser");
+		StringBuffer buf = new StringBuffer();
+		FileOutputStream fos = openFileStream(outNames.nextName());
+        String gold = testFileInfo.goldName + "testcase20.out";
+
+		// Create dtm and generate initial context
+		DTM dtm = generateDTM();
+
+		// Get a Traverser for ALLFROMNODE:: axis.
+		buf.append("#### ALL-FROM-NODE from "+ CNodeName + "\n");
+      	DTMAxisTraverser at = dtm.getAxisTraverser(Axis.ALLFROMNODE);
+
+	  	// Traverse the axis and write node info to output file
+      	for (int atNode = at.first(CNode); DTM.NULL != atNode; 
+      			atNode = at.next(CNode, atNode))
+			 buf.append(getNodeInfo(dtm, atNode, " "));
+
+		// Write results and close output file.
+		writeClose(fos, buf);
+
+        // Verify results
+        fileChecker.check(reporter, new File(outNames.currentName()),
+        							new File(gold),
+        							"Testcase20"); 
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+public String usage()
+{
+	return ("Common [optional] options supported by TestDTMTrav:\n"
+             + "(Note: assumes inputDir=.\\tests\\api)\n");
+}
+
+// This routine generates the output file stream.
+FileOutputStream openFileStream(String name)
+{
+	FileOutputStream fos = null;
+
+	try
+	{  fos = new FileOutputStream(name); }
+
+	catch (Exception e)
+	{  reporter.checkFail("Failure opening output file."); }
+
+	return fos;
+}
+
+// This routine generates a new DTM for each testcase
+DTM generateDTM()
+{
+	// Create DTM and generate initial context
+	Source source = new StreamSource(new StringReader(defaultSource));
+	DTMManager manager= new DTMManagerDefault().newInstance(new XMLStringFactoryImpl());
+	DTM dtm=manager.getDTM(source, true, stripper, false, true);
+   
+	return dtm;
+}
+
+// This routine writes the results to the output file.
+void writeClose(FileOutputStream fos, StringBuffer buf)
+{
+	// Write results and close output file.
+	try
+	{
+               fos.write(buf.toString().getBytes("UTF-8"));
+		fos.close();
+	}
+
+	catch (Exception e)
+	{  reporter.checkFail("Failure writing output."); 	}
+ }
+    
+// This routine gathers up all the important info about a node, concatenates
+// in all together into a single string and returns it. 
+String getNodeInfo(DTM dtm, int nodeHandle, String indent)
+{
+    // Formatting hack -- suppress quotes when value is null, to distinguish
+    // it from "null" (JK).
+	String buf = new String("null");
+    String value=dtm.getNodeValue(nodeHandle);
+    String vq = (value==null) ? "" : "\"";
+
+    // Skip outputing of text nodes. In most cases they clutter the output, 
+	// besides I'm only interested in the elemental structure of the dtm. 
+    if( TYPENAME[dtm.getNodeType(nodeHandle)] != "TEXT" )
+	{
+    	buf = new String(indent+
+		       nodeHandle+": "+
+		       TYPENAME[dtm.getNodeType(nodeHandle)]+" "+
+			   dtm.getNodeName(nodeHandle)+" "+
+			   " Level=" + dtm.getLevel(nodeHandle)+" "+
+		       "\tValue=" + vq + value + vq	+ "\n"
+		       ); 
+	}
+	return buf;
+}
+
+/**
+* Main method to run test from the command line - can be left alone.  
+* @param args command line argument array
+*/
+public static void main(String[] args)
+{
+	TestDTMTrav app = new TestDTMTrav();
+	app.doMain(args);
+}
+
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TestDTMTraverser.java b/test/java/src/org/apache/qetest/dtm/TestDTMTraverser.java
new file mode 100644
index 0000000..20bffe6
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TestDTMTraverser.java
@@ -0,0 +1,350 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import java.io.StringReader;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.xml.dtm.Axis;
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMAxisTraverser;
+import org.apache.xml.dtm.DTMManager;
+import org.apache.xml.dtm.ref.DTMManagerDefault;
+import org.apache.xpath.objects.XMLStringFactoryImpl;
+
+
+/**
+ * Unit test for DTMManager/DTM
+ *
+ * Loads an XML document from a file (or, if no filename is supplied,
+ * an internal string), then dumps its contents. Replaces the old
+ * version, which was specific to the ultra-compressed implementation.
+ * (Which, by the way, we probably ought to revisit as part of our ongoing
+ * speed/size performance evaluation.)
+ *
+ * %REVIEW% Extend to test DOM2DTM, incremental, DOM view of the DTM, 
+ * whitespace-filtered, indexed/nonindexed, ...
+ * */
+public class TestDTMTraverser {
+
+/*class myWSStripper implements DTMWSFilter {
+
+void myWWStripper()
+  { }
+
+public short getShouldStripSpace(int elementHandle, DTM dtm)
+  {
+ 	return DTMWSFilter.STRIP;
+  }
+
+}
+*/
+static final String[] TYPENAME=
+  { "NULL",
+    "ELEMENT",
+    "ATTRIBUTE",
+    "TEXT",
+    "CDATA_SECTION",
+    "ENTITY_REFERENCE",
+    "ENTITY",
+    "PROCESSING_INSTRUCTION",
+    "COMMENT",
+    "DOCUMENT",
+    "DOCUMENT_TYPE",
+    "DOCUMENT_FRAGMENT",
+    "NOTATION",
+    "NAMESPACE"
+  };
+
+  public static void main(String argv[])
+  {
+  	System.out.println("\nHELLO THERE AND WELCOME TO THE WACKY WORLD OF TRAVERSERS \n");
+    try
+    {
+		// Pick our input source
+		Source source=null;
+		if(argv.length<1)
+		{
+			String defaultSource=
+ 		"<?xml version=\"1.0\"?>\n"+
+ 		"<Document xmlns:d=\"www.d.com\" a1=\"hello\" a2=\"goodbye\">"+
+ 		"<!-- Default test document -->"+
+ 		"<?api a1=\"yes\" a2=\"no\"?>"+
+ 		"<A><!-- A Subtree --><B><C><D><E><F xmlns:f=\"www.f.com\" a1=\"down\" a2=\"up\"/></E></D></C></B></A>"+
+ 		"<Aa/><Ab/><Ac><Ac1/></Ac>"+
+ 		"<Ad xmlns:Ad=\"www.Ad.com\" xmlns:y=\"www.y.com\" xmlns:z=\"www.z.com\">"+
+ 		"<Ad1/></Ad>"+
+ 		"</Document>";
+
+			source=new StreamSource(new StringReader(defaultSource));
+		}
+		else if (argv.length>1 &&  "X".equalsIgnoreCase(argv[1]))
+		{
+			// XNI stream startup goes here
+			// Remember to perform Schema validation, to obtain PSVI annotations
+		}
+		else
+		{
+			// Read from a URI via whatever mechanism the DTMManager prefers
+			source=new StreamSource(argv[0]);
+		}
+	
+      // Get a DTM manager, and ask it to load the DTM "uniquely",
+      // with no whitespace filtering, nonincremental, but _with_
+      // indexing (a fairly common case, and avoids the special
+      // mode used for RTF DTMs).
+
+	  // For testing with some of David Marston's files I do want to strip whitespace.
+	  dtmWSStripper stripper = new dtmWSStripper();
+
+      DTMManager manager= new DTMManagerDefault().newInstance(new XMLStringFactoryImpl());
+      DTM dtm=manager.getDTM(source, true, stripper, false, true);
+
+	  // Get various nodes to use as context nodes.
+	  int dtmRoot = dtm.getDocument();					// #document
+	  String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	  int DNode = dtm.getFirstChild(dtmRoot);			// <Document>
+	  String DNodeName = dtm.getNodeName(DNode);
+	  int CNode = dtm.getFirstChild(DNode);				// <Comment>
+	  int PINode = dtm.getNextSibling(CNode);			// <PI>
+	  int ANode = dtm.getNextSibling(PINode);			// <A>
+	  String ANodeName = dtm.getNodeName(ANode);
+	  int lastNode = 0;
+
+      
+	  // Get a traverser for Child:: axis.
+	  System.out.println("\n#### CHILD from "+"<"+DNodeName+">");			   
+      DTMAxisTraverser at = dtm.getAxisTraverser(Axis.CHILD);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(DNode); DTM.NULL != atNode;
+              atNode = at.next(DNode, atNode))
+		{  printNode(dtm, atNode, " ");
+		   lastNode = atNode;
+		}
+      
+	  // Get a traverser for Parent:: axis.
+	  String lastNodeName = dtm.getNodeName(lastNode);
+	  System.out.println("\n#### PARENT from "+"<"+lastNodeName+">");			   
+      at = dtm.getAxisTraverser(Axis.PARENT);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		  printNode(dtm, atNode, " ");
+		
+	  // Get a from Self:: axis.
+	  System.out.println("\n#### SELF from "+"<"+lastNodeName+">");			   
+      at = dtm.getAxisTraverser(Axis.SELF);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		  printNode(dtm, atNode, " ");
+		
+	  // Get a traverser for NameSpaceDecls:: axis.
+	  System.out.println("\n#### NAMESPACEDECLS from "+"<"+lastNodeName+">");			   
+      at = dtm.getAxisTraverser(Axis.NAMESPACEDECLS);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		  printNode(dtm, atNode, " ");
+		
+	  // Get a traverser for Namespace:: axis.
+	  System.out.println("\n#### NAMESPACE from "+"<"+lastNodeName+">");			   
+      at = dtm.getAxisTraverser(Axis.NAMESPACE);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		  printNode(dtm, atNode, " ");
+      
+	  // Get a traverser for Preceding:: axis.
+	  System.out.println("\n#### PRECEDING from "+"<"+lastNodeName+">");			   
+      at = dtm.getAxisTraverser(Axis.PRECEDING);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for PRECEDING-SIBLING:: axis.
+	  System.out.println("\n#### PRECEDINGSIBLING from "+"<"+lastNodeName+">");			   
+      at = dtm.getAxisTraverser(Axis.PRECEDINGSIBLING);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for PRECEDINGANDANCESTOR:: axis.
+	  System.out.println("\n#### PRECEDINGANDANCESTOR from "+"<"+lastNodeName+">");			   
+      at = dtm.getAxisTraverser(Axis.PRECEDINGANDANCESTOR);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+      
+	  // Get a traverser for Attribute:: axis.
+	  System.out.println("\n#### ATTRIBUTE from "+"<"+DNodeName+">");			   
+      at = dtm.getAxisTraverser(Axis.ATTRIBUTE);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(DNode); DTM.NULL != atNode;
+              atNode = at.next(DNode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for Following:: axis.
+	  System.out.println("\n#### FOLLOWING from "+"<"+ANodeName+">");
+      at = dtm.getAxisTraverser(Axis.FOLLOWING);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(ANode); DTM.NULL != atNode;
+              atNode = at.next(ANode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for FollowingSibling:: axis.
+	  System.out.println("\n#### FOLLOWINGSIBLING from "+"<"+ANodeName+">");
+      at = dtm.getAxisTraverser(Axis.FOLLOWINGSIBLING);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(ANode); DTM.NULL != atNode;
+              atNode = at.next(ANode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for  DESCENDANT:: axis.
+	  System.out.println("\n#### DESCENDANT from "+"<"+ANodeName+">");
+      at = dtm.getAxisTraverser(Axis.DESCENDANT);
+
+	  // Traverse the axis and print out node info.
+	  for (int atNode = at.first(ANode); DTM.NULL != atNode;
+              atNode = at.next(ANode, atNode))
+		  printNode(dtm, atNode, " ");
+
+
+	  // Get a traverser for  DESCENDANTORSELF:: axis.
+	  System.out.println("\n#### DESCENDANT-OR-SELF from "+"<"+ANodeName+">");
+      at = dtm.getAxisTraverser(Axis.DESCENDANTORSELF);
+
+	  // Traverse the axis and print out node info.
+	  for (int atNode = at.first(ANode); DTM.NULL != atNode;
+              atNode = at.next(ANode, atNode))
+		{
+			printNode(dtm, atNode, " ");
+			lastNode = atNode;
+		}
+
+	  // Get a traverser for ANCESTOR:: axis.
+	  lastNodeName = dtm.getNodeName(lastNode);
+	  System.out.println("\n#### ANCESTOR from "+"<"+lastNodeName+">");
+      at = dtm.getAxisTraverser(Axis.ANCESTOR);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for ANCESTORORSELF:: axis.
+	  System.out.println("\n#### ANCESTOR-OR-SELF from "+"<"+lastNodeName+">");
+      at = dtm.getAxisTraverser(Axis.ANCESTORORSELF);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for ALLFROMNODE:: axis.
+	  System.out.println("\n#### ALL-FROM-NODE from "+"<"+lastNodeName+">");
+      at = dtm.getAxisTraverser(Axis.ALLFROMNODE);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // ABSOLUTE AXIS TESTS
+	  // These next axis are all Absolute. They all default to the root of the dtm
+	  // tree,  regardless of what we call first() with. 
+	  // Get a traverser for ALL:: axis. 
+	  System.out.println("\n#### ALL(absolute) from "+"<"+dtmRootName+">");
+      at = dtm.getAxisTraverser(Axis.ALL);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for DESCENDANTSFROMROOT:: axis.
+	  System.out.println("\n#### DESCENDANTSFROMROOT(absolute) from "+"<"+dtmRootName+">");
+      at = dtm.getAxisTraverser(Axis.DESCENDANTSFROMROOT);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+
+	  // Get a traverser for DESCENDANTSORSELFFROMROOT:: axis.
+	  System.out.println("\n#### DESCENDANTSORSELFFROMROOT(absolute) from "+"<"+dtmRootName+">");
+      at = dtm.getAxisTraverser(Axis.DESCENDANTSORSELFFROMROOT);
+
+	  // Traverse the axis and print out node info.
+      for (int atNode = at.first(lastNode); DTM.NULL != atNode;
+              atNode = at.next(lastNode, atNode))
+		printNode(dtm, atNode, " ");
+
+    }
+    catch(Exception e)
+      {
+        e.printStackTrace();
+      }
+  }
+  
+  static void printNode(DTM dtm,int nodeHandle,String indent)
+  {
+    // Briefly display this node
+    // Don't bother displaying namespaces or attrs; we do that at the
+    // next level up.
+    // %REVIEW% Add namespace info, type info, ...
+
+    // Formatting hack -- suppress quotes when value is null, to distinguish
+    // it from "null".
+    String value=dtm.getNodeValue(nodeHandle);
+    String vq=(value==null) ? "" : "\"";
+
+    // Skip outputing of text nodes. In most cases they clutter the output, 
+	// besides I'm only interested in the elemental structure of the dtm. 
+    if( TYPENAME[dtm.getNodeType(nodeHandle)] != "TEXT" )
+	{
+    	System.out.println(indent+
+		       +nodeHandle+": "+
+		       TYPENAME[dtm.getNodeType(nodeHandle)]+" "+
+			   dtm.getNodeName(nodeHandle)+" "+
+			   " Level=" + dtm.getLevel(nodeHandle)+" "+
+		       "\tValue=" + vq + value + vq
+		       ); 
+	}
+  }
+  
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TimeDTMIterDeep.java b/test/java/src/org/apache/qetest/dtm/TimeDTMIterDeep.java
new file mode 100644
index 0000000..df7a9ff
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TimeDTMIterDeep.java
@@ -0,0 +1,246 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.dtm.Axis;
+import org.apache.xml.dtm.DTM;
+
+
+public class TimeDTMIterDeep extends FileBasedTest
+{
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     * If you don't use an .xml file on disk, you don't actually need this.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String DTM_SUBDIR = "dtm";
+	public static final String TIME_Prefix = "TimeID_";
+
+	int   lastNode;
+	String lastNodeName;
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TimeDTMIterDeep()
+    {
+        numTestCases = 4;
+        testName = "TimeDTMIterDeep";
+        testComment = "Time the creation and various axis iterations with a deep tree";
+    }
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * REPLACE_other_test_file_init.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in dtm subdir
+        File outSubDir = new File(outputDir + File.separator + DTM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + DTM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator
+                              + TIME_Prefix;
+
+        testFileInfo.goldName = goldBasePath;
+
+        return true;
+    }
+
+    /**
+     * Cleanup this test - REPLACE_other_test_file_cleanup.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Often will be a no-op
+        return true;
+    }
+
+public boolean testCase1()
+{	  
+	reporter.testCaseInit("Time Iteration of Descendant:: axis");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = QeDtmUtils.openFileStream(outNames.nextName(), reporter);
+	String gold = testFileInfo.goldName + "testcase1.out";
+
+	buf.append("\nAxis is DESCENDANT");
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+
+	// Get various nodes to use as context nodes.
+	int dtmRoot = dtm.getDocument();				// #document
+	String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	int DNode = dtm.getFirstChild(dtmRoot);			// <Doc>
+	String DNodeName = dtm.getNodeName(DNode);
+	int[] rtData = {0,0,0};		// returns Iteration time, last node, number of nodes traversed 
+
+	// Get a iterator for Descendant:: axis.
+	buf.append("\n\tSTARTING from: "+ DNodeName);
+	QeDtmUtils.timeAxisIterator(dtm, Axis.DESCENDANT, DNode, rtData);
+	buf.append("\n\tTime="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	
+	// Write results and close output file.
+	QeDtmUtils.writeClose(fos, buf, reporter);
+
+    // Verify results
+    fileChecker.check(reporter, new File(outNames.currentName()),
+       							new File(gold),
+       							"Testcase1"); 
+    reporter.testCaseClose();
+    return true;
+
+}
+
+public boolean testCase2()
+{	  
+	reporter.testCaseInit("Time Iteration of DESCENDANT-OR-SELF:: axis");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = QeDtmUtils.openFileStream(outNames.nextName(), reporter);
+	String gold = testFileInfo.goldName + "testcase2.out";
+
+	buf.append("\nAxis is DESCENDANT-OR-SELF");
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+
+	// Get various nodes to use as context nodes.
+	int dtmRoot = dtm.getDocument();				// #document
+	String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	int DNode = dtm.getFirstChild(dtmRoot);			// <Doc>
+	String DNodeName = dtm.getNodeName(DNode);
+	int[] rtData = {0,0,0};		// returns Iteration time, last node, number of nodes traversed 
+
+	// Get a iterator for Descendant:: axis.
+	buf.append("\n\tSTARTING from: "+ DNodeName);
+	QeDtmUtils.timeAxisIterator(dtm, Axis.DESCENDANTORSELF, DNode, rtData);
+	buf.append("\n\tTime="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	lastNode = rtData[1];
+	lastNodeName = dtm.getNodeName(lastNode);
+
+	// Write results and close output file.
+	QeDtmUtils.writeClose(fos, buf, reporter);
+
+    // Verify results
+    fileChecker.check(reporter, new File(outNames.currentName()),
+       							new File(gold),
+       							"Testcase2"); 
+    reporter.testCaseClose();
+    return true;
+
+}
+
+public boolean testCase3()
+{	  
+	reporter.testCaseInit("Time Iteration of ANCESTOR:: axis");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = QeDtmUtils.openFileStream(outNames.nextName(), reporter);
+	String gold = testFileInfo.goldName + "testcase3.out";
+
+	buf.append("\nAxis is ANCESTOR");
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	buf.append("\n\tSTARTING from: "+ lastNodeName);
+	int[] rtData = {0,0,0};		// returns Iteration time, last node, number of nodes traversed 
+
+	// Get a iterator for ANCESTOR:: axis.
+	QeDtmUtils.timeAxisIterator(dtm, Axis.ANCESTOR, lastNode, rtData);
+	buf.append("\n\tTime="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	
+	// Write results and close output file.
+	QeDtmUtils.writeClose(fos, buf, reporter);
+
+    // Verify results
+    fileChecker.check(reporter, new File(outNames.currentName()),
+       							new File(gold),
+       							"Testcase3"); 
+    reporter.testCaseClose();
+    return true;
+
+}
+
+public boolean testCase4()
+{	  
+	reporter.testCaseInit("Time Iteration of ANCESTOR-or-Self:: axis");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = QeDtmUtils.openFileStream(outNames.nextName(), reporter);
+	String gold = testFileInfo.goldName + "testcase4.out";
+
+	buf.append("\nAxis is ANCESTOR-or-Self");
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	int[] rtData = {0,0,0};		// returns Iteration time, last node, number of nodes traversed 
+
+	// Get a iterator for ANCESTORORSELF:: axis.
+	buf.append("\n\tSTARTING from: "+ lastNodeName);
+	QeDtmUtils.timeAxisIterator(dtm, Axis.ANCESTORORSELF, lastNode, rtData);
+	buf.append("\n\tTime="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	
+	// Write results and close output file.
+	QeDtmUtils.writeClose(fos, buf, reporter);
+
+    // Verify results
+    fileChecker.check(reporter, new File(outNames.currentName()),
+       							new File(gold),
+       							"Testcase4"); 
+    reporter.testCaseClose();
+    return true;
+
+}
+
+
+/**
+* Main method to run test from the command line - can be left alone.  
+* @param args command line argument array
+*/
+public static void main(String[] args)
+{
+	TimeDTMIterDeep app = new TimeDTMIterDeep();
+	app.doMain(args);
+}
+ 
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TimeDTMIterator.java b/test/java/src/org/apache/qetest/dtm/TimeDTMIterator.java
new file mode 100644
index 0000000..a45c57b
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TimeDTMIterator.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import org.apache.xml.dtm.Axis;
+import org.apache.xml.dtm.DTM;
+
+
+public class TimeDTMIterator
+{
+
+public static void main(String argv[])
+{
+
+  	System.out.println("\n#### Timing Iterations of DEEP documents. ####");
+
+	StringBuffer buf = new StringBuffer();
+	int lastNode = 0;
+	String lastNodeName;
+	int[] rtData = {0,0,0};		// returns Traversal time, last node, number of nodes traversed 
+
+
+	// Preload once to prime the JVM.
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+
+	// Time the creation of the dtm	
+
+	buf.setLength(0);
+	dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	buf.setLength(0);
+	dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	buf.setLength(0);
+	dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+
+	// Get various nodes to use as context nodes.
+	int dtmRoot = dtm.getDocument();				// #document
+	String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	int DNode = dtm.getFirstChild(dtmRoot);			// <Doc>
+	String DNodeName = dtm.getNodeName(DNode);
+	int ANode = dtm.getFirstChild(DNode);			// <A>
+	String ANodeName = dtm.getNodeName(ANode);
+
+	// Get a traverser for Descendant:: axis.
+	System.out.println("\n* DESCENDANT from "+"<"+DNodeName+">");
+	QeDtmUtils.timeAxisIterator(dtm, Axis.DESCENDANT, DNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Descendant:: axis.
+	System.out.println("\n* DESCENDANT-OR-SELF from "+"<"+DNodeName+">");
+	QeDtmUtils.timeAxisIterator(dtm, Axis.DESCENDANTORSELF, DNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Use last node from Child traverse as Context node for subsequent traversals
+	lastNode = rtData[1];
+	lastNodeName = dtm.getNodeName(lastNode);
+
+	// Get a traverser for Ancestor:: axis.
+	System.out.println("\n* ANCESTOR from "+"<"+lastNodeName+">");	
+	QeDtmUtils.timeAxisIterator(dtm, Axis.ANCESTOR, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Ancestor:: axis.
+	System.out.println("\n* ANCESTOR-OR-SELF from "+"<"+lastNodeName+">");	
+	QeDtmUtils.timeAxisIterator(dtm, Axis.ANCESTORORSELF, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	
+  	System.out.println("\n#### Testing Iteration of FLAT documents. ####");
+
+	buf.setLength(0);
+	DTM dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+	buf.setLength(0);
+	dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+	buf.setLength(0);
+	dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+	buf.setLength(0);
+	dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+	buf.setLength(0);
+	dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+																
+	// Get various nodes to use as context nodes.
+	dtmRoot = dtm2.getDocument();				// #document
+	dtmRootName = dtm2.getNodeName(dtmRoot);	// Used for output
+	DNode = dtm2.getFirstChild(dtmRoot);		// <Doc>
+	DNodeName = dtm2.getNodeName(DNode);
+	int fiNode = dtm2.getFirstChild(DNode);			// first <item>
+	String fiNodeName = dtm2.getNodeName(fiNode);
+
+	// Get a traverser for Child:: axis.
+	System.out.println("\n* CHILD from "+"<"+DNodeName+"> " + DNode);
+	QeDtmUtils.timeAxisIterator(dtm2, Axis.CHILD, DNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Following:: axis.
+	System.out.println("\n* FOLLOWING from "+"<"+fiNodeName+"> " + fiNode);
+	QeDtmUtils.timeAxisIterator(dtm2, Axis.FOLLOWING, fiNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Following-sibling:: axis.
+	System.out.println("\n* FOLLOWINGSIBLING from "+"<"+fiNodeName+"> " + fiNode);
+	QeDtmUtils.timeAxisIterator(dtm2, Axis.FOLLOWINGSIBLING, fiNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Descendant:: axis.
+	System.out.println("\n* DESCENDANT from "+"<"+DNodeName+"> " + DNode);
+	QeDtmUtils.timeAxisIterator(dtm2, Axis.DESCENDANT, DNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Use last node from Descendant traverse as Context node for subsequent traversals
+	lastNode = rtData[1];
+	lastNodeName = dtm2.getNodeName(lastNode);
+
+	// Get a traverser for Ancestor:: axis.
+	System.out.println("\n* ANCESTOR from "+"<"+lastNodeName+"> " + lastNode);	
+	QeDtmUtils.timeAxisIterator(dtm2, Axis.ANCESTOR, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Preceding:: axis.
+	System.out.println("\n* PRECEDING-SIBLING from "+"<"+lastNodeName+"> " + lastNode);			   
+	QeDtmUtils.timeAxisIterator(dtm2, Axis.PRECEDINGSIBLING, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Preceding:: axis.
+	System.out.println("\n* PRECEDING from "+"<"+lastNodeName+"> " + lastNode);			   
+	QeDtmUtils.timeAxisIterator(dtm2, Axis.PRECEDING, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+
+}
+
+
+
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TimeDTMTravDeep.java b/test/java/src/org/apache/qetest/dtm/TimeDTMTravDeep.java
new file mode 100644
index 0000000..f28517f
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TimeDTMTravDeep.java
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.dtm.Axis;
+import org.apache.xml.dtm.DTM;
+
+
+public class TimeDTMTravDeep extends FileBasedTest
+{
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     * If you don't use an .xml file on disk, you don't actually need this.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String DTM_SUBDIR = "dtm";
+	public static final String TIME_Prefix = "TimeTD_";
+
+	//int[] metric = {0};
+	int   lastNode;
+	String lastNodeName;
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TimeDTMTravDeep()
+    {
+        numTestCases = 4;
+        testName = "TimeDTMTravDeep";
+        testComment = "Time the creation and various axis traversers with a deep tree";
+    }
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * REPLACE_other_test_file_init.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in dtm subdir
+        File outSubDir = new File(outputDir + File.separator + DTM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + DTM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + DTM_SUBDIR
+                              + File.separator
+                              + TIME_Prefix;
+
+        testFileInfo.goldName = goldBasePath;
+
+        return true;
+    }
+
+    /**
+     * Cleanup this test - REPLACE_other_test_file_cleanup.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Often will be a no-op
+        return true;
+    }
+
+public boolean testCase1()
+{	  
+	reporter.testCaseInit("Time Traversal of Descendant:: axis");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = QeDtmUtils.openFileStream(outNames.nextName(), reporter);
+	String gold = testFileInfo.goldName + "testcase1.out";
+
+	buf.append("\nAxis is DESCENDANT");
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+
+	// Get various nodes to use as context nodes.
+	int dtmRoot = dtm.getDocument();				// #document
+	String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	int DNode = dtm.getFirstChild(dtmRoot);			// <Doc>
+	String DNodeName = dtm.getNodeName(DNode);
+	int[] rtData = {0,0,0};		// returns Traversal time, last node, number of nodes traversed 
+
+	// Get a traverser for Descendant:: axis.
+	buf.append("\n\tSTARTING from: "+ DNodeName);
+	QeDtmUtils.timeAxisTraverser(dtm, Axis.DESCENDANT, DNode, rtData);
+	buf.append("\n\tTime="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	
+	// Write results and close output file.
+	QeDtmUtils.writeClose(fos, buf, reporter);
+
+    // Verify results
+    fileChecker.check(reporter, new File(outNames.currentName()),
+       							new File(gold),
+       							"Testcase1"); 
+    reporter.testCaseClose();
+    return true;
+
+}
+
+public boolean testCase2()
+{	  
+	reporter.testCaseInit("Time Traverser of DESCENDANT-OR-SELF:: axis");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = QeDtmUtils.openFileStream(outNames.nextName(), reporter);
+	String gold = testFileInfo.goldName + "testcase2.out";
+
+	buf.append("\nAxis is DESCENDANT-OR-SELF");
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+
+	// Get various nodes to use as context nodes.
+	int dtmRoot = dtm.getDocument();				// #document
+	String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	int DNode = dtm.getFirstChild(dtmRoot);			// <Doc>
+	String DNodeName = dtm.getNodeName(DNode);
+	int[] rtData = {0,0,0};		// returns Traversal time, last node, number of nodes traversed 
+
+	// Get a traverser for Descendant:: axis.
+	buf.append("\n\tSTARTING from: "+ DNodeName);
+	QeDtmUtils.timeAxisTraverser(dtm, Axis.DESCENDANTORSELF, DNode, rtData);
+	buf.append("\n\tTime="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	lastNode = rtData[1];
+	lastNodeName = dtm.getNodeName(lastNode);
+
+	// Write results and close output file.
+	QeDtmUtils.writeClose(fos, buf, reporter);
+
+    // Verify results
+    fileChecker.check(reporter, new File(outNames.currentName()),
+       							new File(gold),
+       							"Testcase2"); 
+    reporter.testCaseClose();
+    return true;
+
+}
+
+public boolean testCase3()
+{	  
+	reporter.testCaseInit("Time Traverser of ANCESTOR:: axis");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = QeDtmUtils.openFileStream(outNames.nextName(), reporter);
+	String gold = testFileInfo.goldName + "testcase3.out";
+
+	buf.append("\nAxis is ANCESTOR");
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	buf.append("\n\tSTARTING from: "+ lastNodeName);
+	int[] rtData = {0,0,0};		// returns Traversal time, last node, number of nodes traversed 
+
+	// Get a traverser for ANCESTOR:: axis.
+	QeDtmUtils.timeAxisTraverser(dtm, Axis.ANCESTOR, lastNode, rtData);
+	buf.append("\n\tTime="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	
+	// Write results and close output file.
+	QeDtmUtils.writeClose(fos, buf, reporter);
+
+    // Verify results
+    fileChecker.check(reporter, new File(outNames.currentName()),
+       							new File(gold),
+       							"Testcase3"); 
+    reporter.testCaseClose();
+    return true;
+
+}
+
+public boolean testCase4()
+{	  
+	reporter.testCaseInit("Time Traverser of ANCESTOR-or-Self:: axis");
+	StringBuffer buf = new StringBuffer();
+	FileOutputStream fos = QeDtmUtils.openFileStream(outNames.nextName(), reporter);
+	String gold = testFileInfo.goldName + "testcase4.out";
+
+	buf.append("\nAxis is ANCESTOR-or-Self");
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	int[] rtData = {0,0,0};		// returns Traversal time, last node, number of nodes traversed 
+
+	// Get a traverser for ANCESTORORSELF:: axis.
+	buf.append("\n\tSTARTING from: "+ lastNodeName);
+	QeDtmUtils.timeAxisTraverser(dtm, Axis.ANCESTORORSELF, lastNode, rtData);
+	buf.append("\n\tTime="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+	
+	// Write results and close output file.
+	QeDtmUtils.writeClose(fos, buf, reporter);
+
+    // Verify results
+    fileChecker.check(reporter, new File(outNames.currentName()),
+       							new File(gold),
+       							"Testcase4"); 
+    reporter.testCaseClose();
+    return true;
+
+}
+
+
+/**
+* Main method to run test from the command line - can be left alone.  
+* @param args command line argument array
+*/
+public static void main(String[] args)
+{
+	TimeDTMTravDeep app = new TimeDTMTravDeep();
+	app.doMain(args);
+}
+ 
+}
diff --git a/test/java/src/org/apache/qetest/dtm/TimeDTMTraverser.java b/test/java/src/org/apache/qetest/dtm/TimeDTMTraverser.java
new file mode 100644
index 0000000..6f80388
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/TimeDTMTraverser.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+import org.apache.xml.dtm.Axis;
+import org.apache.xml.dtm.DTM;
+
+
+/**
+ * Unit test for DTMManager/DTM
+ *
+ * Loads an XML document from a file (or, if no filename is supplied,
+ * an internal string), then dumps its contents. Replaces the old
+ * version, which was specific to the ultra-compressed implementation.
+ * (Which, by the way, we probably ought to revisit as part of our ongoing
+ * speed/size performance evaluation.)
+ *
+ * %REVIEW% Extend to test DOM2DTM, incremental, DOM view of the DTM, 
+ * whitespace-filtered, indexed/nonindexed, ...
+ * */
+public class TimeDTMTraverser 
+{
+
+public static void main(String argv[])
+  {
+  	long dtmStart = 0;		// Time the creation of dtmManager, and dtm initialization.
+
+  	System.out.println("\n#### Timing Traversal of DEEP documents. ####");
+
+	StringBuffer buf = new StringBuffer();
+											
+	// Preload once to prime the JVM.
+	DTM dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+										  
+	// Time the creation of the dtm
+	buf.setLength(0);
+	dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);  
+	buf.setLength(0);
+	dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	buf.setLength(0);
+	dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	buf.setLength(0);
+	dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+	buf.setLength(0);
+	dtm = QeDtmUtils.createDTM(0, QeDtmUtils.deepFile, buf);
+																
+	// Get various nodes to use as context nodes.
+	int dtmRoot = dtm.getDocument();				// #document
+	String dtmRootName = dtm.getNodeName(dtmRoot);	// Used for output
+	int DNode = dtm.getFirstChild(dtmRoot);			// <Doc>
+	String DNodeName = dtm.getNodeName(DNode);
+	int ANode = dtm.getFirstChild(DNode);			// <A>
+	String ANodeName = dtm.getNodeName(ANode);
+	
+	int[] rtData = {0,0,0};		// returns Traversal time, last node, number of nodes traversed 
+										   
+	// Get a traverser for Descendant:: axis.
+	System.out.println("\n* DESCENDANT from "+"<"+DNodeName+">");
+	QeDtmUtils.timeAxisTraverser(dtm, Axis.DESCENDANT, DNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Descendant:: axis.
+	System.out.println("\n* DESCENDANT-OR-SELF from "+"<"+DNodeName+">");
+	QeDtmUtils.timeAxisTraverser(dtm, Axis.DESCENDANTORSELF, DNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+										   
+	// Use last node from Child traverse as Context node for subsequent traversals
+	int lastNode = rtData[1];
+	String lastNodeName = dtm.getNodeName(lastNode);
+										   
+	// Get a traverser for Ancestor:: axis.
+	System.out.println("\n* ANCESTOR from "+"<"+lastNodeName+">");	
+	QeDtmUtils.timeAxisTraverser(dtm, Axis.ANCESTOR, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Ancestor:: axis.
+	System.out.println("\n* ANCESTOR-OR-SELF from "+"<"+lastNodeName+">");	
+	QeDtmUtils.timeAxisTraverser(dtm, Axis.ANCESTORORSELF, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	System.out.println("\n#### Timing Traversal of FLAT documents. ####");
+						  
+	buf.setLength(0);
+	DTM dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);  
+	buf.setLength(0);
+	dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+	buf.setLength(0);
+	dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+	buf.setLength(0);
+	dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+	buf.setLength(0);
+	dtm2 = QeDtmUtils.createDTM(0, QeDtmUtils.flatFile, buf);
+																  	
+	// Get various nodes to use as context nodes.
+	dtmRoot = dtm2.getDocument();					// #document
+	dtmRootName = dtm2.getNodeName(dtmRoot);		// Used for output
+	DNode = dtm2.getFirstChild(dtmRoot);			// <Doc>
+	DNodeName = dtm2.getNodeName(DNode);
+	int fiNode = dtm2.getFirstChild(DNode);			// first <item>
+	String fiNodeName = dtm2.getNodeName(fiNode);
+			   
+	// Get a traverser for Child:: axis.
+	System.out.println("\n* CHILD from "+"<"+DNodeName+"> " + DNode);
+	QeDtmUtils.timeAxisTraverser(dtm2, Axis.CHILD, DNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Following:: axis.
+	System.out.println("\n* FOLLOWING from "+"<"+fiNodeName+"> " + fiNode);
+	QeDtmUtils.timeAxisTraverser(dtm2, Axis.FOLLOWING, fiNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+							  
+	// Get a traverser for Following-sibling:: axis.
+	System.out.println("\n* FOLLOWINGSIBLING from "+"<"+fiNodeName+"> " +fiNode);
+	QeDtmUtils.timeAxisTraverser(dtm2, Axis.FOLLOWINGSIBLING, fiNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+				 							 
+	// Get a traverser for Descendant:: axis.
+	System.out.println("\n* DESCENDANT from "+"<"+DNodeName+"> " + DNode);
+	QeDtmUtils.timeAxisTraverser(dtm2, Axis.DESCENDANT, DNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Use last node from Descendant traverse as Context node for subsequent traversals
+	lastNode = rtData[1];
+	lastNodeName = dtm2.getNodeName(lastNode);
+											 
+	// Get a traverser for Ancestor:: axis.
+	System.out.println("\n* ANCESTOR from "+"<"+lastNodeName+"> " + lastNode);	
+	QeDtmUtils.timeAxisTraverser(dtm2, Axis.ANCESTOR, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+
+	// Get a traverser for Preceding:: axis.
+	System.out.println("\n* PRECEDING from "+"<"+lastNodeName+"> " + lastNode);			   
+	QeDtmUtils.timeAxisTraverser(dtm2, Axis.PRECEDING, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+											   
+	// Get a traverser for Preceding:: axis.
+	System.out.println("\n* PRECEDING-SIBLING from "+"<"+lastNodeName+"> " + lastNode);			   
+	QeDtmUtils.timeAxisTraverser(dtm2, Axis.PRECEDINGSIBLING, lastNode, rtData);
+	System.out.println("Time="+rtData[0] + " : " + "LastNode="+rtData[1]+" nodes="+rtData[2]);
+  
+}
+
+}
+  
diff --git a/test/java/src/org/apache/qetest/dtm/dtmWSStripper.java b/test/java/src/org/apache/qetest/dtm/dtmWSStripper.java
new file mode 100644
index 0000000..b76fb0c
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/dtmWSStripper.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.dtm;
+
+
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMWSFilter;
+/**
+ * Impl of DTMWSFilter
+ *
+ * Currently it always returns TRUE.
+ * TODO:
+ * 	Make into a more general purpose stripper. 
+ *
+ **/
+
+class dtmWSStripper implements DTMWSFilter {
+
+void dtmWSStripper()
+  { }
+
+public short getShouldStripSpace(int elementHandle, DTM dtm)
+  {
+ 	return DTMWSFilter.STRIP;
+  }
+
+}
diff --git a/test/java/src/org/apache/qetest/dtm/dtmtest.xml b/test/java/src/org/apache/qetest/dtm/dtmtest.xml
new file mode 100644
index 0000000..e45261a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/dtm/dtmtest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<!-- $Id$ -->
+<Document xmlns:x="www.x.com" a1="hello" a2="goodbye">
+<!-- Default test document -->
+<?api a1="yes" a2="no"?>
+<A><B><C><D><E><F/></E></D></C></B></A>
+<Aa/><Ab/><Ac><Ac1/></Ac>
+<Ad xmlns:xx="www.xx.com" xmlns:y="www.y.com" xmlns:z="www.z.com">
+<Ad1/></Ad>
+</Document>
diff --git a/test/java/src/org/apache/qetest/package.html b/test/java/src/org/apache/qetest/package.html
new file mode 100644
index 0000000..841db1d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/package.html
@@ -0,0 +1,90 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<!-- $Id$ -->
+<html>
+  <title>XSL-TEST Reporter package.</title>
+  <body>
+    <p>This package is an independent framework for writing automated test scripts in Java.</p>  
+    <dl>
+      <dt><b>Author: </b></dt><dd><a href="mailto:shane_curcuru@lotus.com">Shane_Curcuru@lotus.com</a></dd>
+      <dt><b>Program(s) Under Test: </b></dt>
+      <dd><a href="http://xml.apache.org/xalan-j" target="_top">Xalan-J 2.x XSLT Processor</a></dd>
+      <dd><a href="http://xml.apache.org/xalan" target="_top">Xalan-J 1.x XSLT Processor</a></dd>
+      <dd><a href="http://xml.apache.org/xalan-c" target="_top">Xalan-C 1.x XSLT Processor</a></dd>
+      <dt><b>Goals: </b></dt><dd>
+        <ul>
+          <li>Provide a solid, independent test framework.</li>
+          <li>Encourage good testing/verification practices.</li>
+          <li>Enable quicker generation of Xalan test cases.</li>
+          <li>Simplify maintenance of test cases.</li>
+          <li>Provide basic test results analysis frameworks.</li>
+        </ul>
+      </dd>
+    </dl>
+    <p>This package is primarily focused on the quality 
+    engineer, and system or integration level tests that are to be 
+    shared with a larger audience, rather than on a developer who 
+    writes unit tests primarily for their own use.</p>
+    <ul>A few of the basic design patterns/principles used:
+    <li>Most objects can be initialized either through their 
+    constructor or an initialize() method with a Properties 
+    block of name=value pairs to setup their internal state 
+    from.  Composite objects will typically pass their entire 
+    Properties block to sub-objects or contained objects for 
+    their own initializations.  One future drawback: need to 
+    ensure the namespace doesn't have collisions between tests, 
+    reporters, and loggers. Eventually I'd like to have a 
+    'namespace' for just the tests themselves.</li>
+    <li>Test, TestImpl, FileBasedTest: these all provide structure 
+    and utility methods useful for testing in general.</li>
+    <li>Testlet, Datalet: these small, focused mini-tests 
+    that encourage creating data driven tests and allow you 
+    to separate the specific testing algorithim used from 
+    the set of data to execute it on.</li>
+    <li>User subclasses of the Test classes should simply focus on 
+    manipulating the product under test and calling log*() or check*() 
+    methods to report information.  They shouldn't worry about the 
+    external environment or managing their reporter unless they have 
+    a specific reason to.</li>
+    <li>Loggers simply provide a mechanisim to output data in a manner 
+    so that the test doesn't have to manage the output at all.  They 
+    ensure that all tests produce output in a common format, making it 
+    easier to evaluate test results across many tests or products.  
+    Loggers generally don't keep track of the test's result state, 
+    relying on the user to analyze the result set later.</li>
+    <li>Reporters act as a composite of Loggers, as well as providing 
+    various useful utilities.  Reporters also keep a running track of 
+    the pass/fail state of a Test during execution, as well as reporting 
+    it out using their Loggers.</li>
+    <li>CheckService is a generic service for checking 'equivalence' 
+    of two objects and reporting the pass/fail/other result thereof.  
+    A SimpleFileCheckService implementation is provided as an 
+    example; we have plans to add various other kinds of checkers, 
+    perhaps a DOMCheckService.</li>
+    <li>OutputNameManager is a cheap-o helper for tests that create 
+    a large number of consecutive output files.</li>
+    <li>TestfileInfo is a simple data-holding class to store info 
+    about a test data file.  It is used in FileBasedTest, which may 
+    be a useful base class for your tests.  This should probably be 
+    replaced with a Datalet which, along with Testlets, provides a 
+    lighter-weight way to write tests.</li>
+    </ul>
+  </body>
+</html>
+
+
diff --git a/test/java/src/org/apache/qetest/trax/EmbeddedStylesheetTest.java b/test/java/src/org/apache/qetest/trax/EmbeddedStylesheetTest.java
new file mode 100644
index 0000000..06b1d51
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/EmbeddedStylesheetTest.java
@@ -0,0 +1,653 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * EmbeddedStylesheetTest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Test behavior of various kinds of embedded stylesheets.  
+ * <b>Note:</b> This test is directory-dependent, so if there are 
+ * any fails, check the code to see what the test file is expecting 
+ * the path/directory/etc. to be.
+ *
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class EmbeddedStylesheetTest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Name of a valid, known-good xsl/xml file pair we can use.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Embedded identity test file for getEmbedded....  */
+    protected XSLTestfileInfo embeddedFileInfo = new XSLTestfileInfo();
+
+    /** Embedded fragment test file for getEmbedded....  */
+    protected XSLTestfileInfo embeddedFragmentFileInfo = new XSLTestfileInfo();
+
+    /** Embedded types test file for getEmbedded.... text/xsl  */
+    protected String typeNameTextXsl = null;
+
+    /** Embedded types test file for getEmbedded.... text/xml  */
+    protected String typeNameTextXml = null;
+
+    /** Embedded types test file for getEmbedded.... application/xml+xslt  */
+    protected String typeNameApplicationXmlXslt = null;
+
+    /** Embedded types gold file for all types  */
+    protected String typeGoldName = null;
+
+    /** Embedded relative path test file for getEmbedded....  */
+    protected String embeddedRelativeXmlName = null;
+
+    /** Gold embedded relative path test file for getEmbedded, at up level....  */
+    protected String relativeGoldFileLevel0 = null;
+    /** Gold embedded relative path test file for getEmbedded, at default level....  */
+    protected String relativeGoldFileLevel1 = null;
+    /** Gold embedded relative path test file for getEmbedded, at down level....  */
+    protected String relativeGoldFileLevel2 = null;
+
+    /** SystemId identity test file for getEmbedded....  */
+    protected XSLTestfileInfo systemIdFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+    /** Convenience variable for user.dir - cached during test.  */
+    protected String savedUserDir = null;
+
+    /** Just initialize test name, comment, numTestCases. */
+    public EmbeddedStylesheetTest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "EmbeddedStylesheetTest";
+        testComment = "Test behavior of various kinds of embedded stylesheets";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * cache user.dir property.  
+     *
+     * @param p Properties to initialize from (unused)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+
+        // Just bare pathnames, not URI's
+        testFileInfo.inputName = testBasePath + testName + ".xsl";
+        testFileInfo.xmlName = testBasePath + testName + ".xml";
+        testFileInfo.goldName = goldBasePath + testName + ".out";
+
+        embeddedFileInfo.xmlName = testBasePath + "embeddedIdentity.xml";
+        embeddedFileInfo.goldName = goldBasePath + "embeddedIdentity.out";
+
+        typeNameTextXsl = testBasePath + "EmbeddedType-text-xsl.xml";
+        typeNameTextXml = testBasePath + "EmbeddedType-text-xml.xml";
+        typeNameApplicationXmlXslt = testBasePath + "EmbeddedType-application-xml-xslt.xml";
+        typeGoldName = goldBasePath + "EmbeddedType.out";
+
+        embeddedFragmentFileInfo.xmlName = testBasePath + "EmbeddedFragment.xml";
+        embeddedFragmentFileInfo.goldName = goldBasePath + "EmbeddedFragment.out";
+
+        embeddedRelativeXmlName = testBasePath + "EmbeddedRelative.xml";
+        relativeGoldFileLevel0 = goldBasePath + "EmbeddedRelative0.out";
+        relativeGoldFileLevel1 = goldBasePath + "EmbeddedRelative1.out";
+        relativeGoldFileLevel2 = goldBasePath + "EmbeddedRelative2.out";
+
+        systemIdFileInfo.xmlName = testBasePath + "SystemIdTest.xml";
+        systemIdFileInfo.goldName = goldBasePath + "SystemIdTest.out";
+
+        // Cache user.dir property
+        savedUserDir = System.getProperty("user.dir");
+        reporter.logHashtable(Logger.STATUSMSG, System.getProperties(), "System.getProperties()");
+        reporter.logHashtable(Logger.STATUSMSG, testProps, "testProps");
+
+        return true;
+    }
+
+
+    /**
+     * Cleanup this test - uncache user.dir property.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Uncache user.dir property
+        System.getProperties().put("user.dir", savedUserDir);
+        return true;
+    }
+
+
+    /**
+     * Simple xml documents with xml-stylesheet PI's.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Simple xml documents with xml-stylesheet PI's");
+
+        TransformerFactory factory = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            return true;
+        }
+        String media= null;     // often ignored
+        String title = null;    // often ignored
+        String charset = null;  // often ignored
+        try
+        {
+            // Verify you can process a simple embedded stylesheet 
+            //  (also tested in TransformerFactoryAPITest)
+            Source stylesheet = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(embeddedFileInfo.xmlName)), 
+                                                                media, title, charset);
+            reporter.logTraceMsg("got AssociatedStylesheet");
+            Templates embedTemplates = factory.newTemplates(stylesheet);
+            Transformer embedTransformer = embedTemplates.newTransformer();
+            reporter.logTraceMsg("Got embedded templates, about to transform.");
+            embedTransformer.transform(new StreamSource(QetestUtils.filenameToURL(embeddedFileInfo.xmlName)), 
+                                       new StreamResult(outNames.nextName()));
+
+            int result = fileChecker.check(reporter, 
+                                           new File(outNames.currentName()), 
+                                           new File(embeddedFileInfo.goldName), 
+                                          "(1)embedded transform into " + outNames.currentName());
+            if (result == Logger.FAIL_RESULT)
+                reporter.logInfoMsg("(1)embedded transform failure reason:" + fileChecker.getExtendedInfo());
+
+            // Verify the stylesheet you get from an embedded source 
+            //  can be reused for other documents
+            embedTransformer = embedTemplates.newTransformer();
+            embedTransformer.transform(new StreamSource(QetestUtils.filenameToURL(embeddedFileInfo.xmlName)), 
+                                       new StreamResult(outNames.nextName()));
+
+            result = fileChecker.check(reporter, 
+                                           new File(outNames.currentName()), 
+                                           new File(embeddedFileInfo.goldName), 
+                                          "(1a)embedded transform into " + outNames.currentName());
+            if (result == Logger.FAIL_RESULT)
+                reporter.logInfoMsg("(1a)embedded transform failure reason:" + fileChecker.getExtendedInfo());
+
+            // Verify the transformer itself can be reused
+            //  on a *different* document
+            embedTransformer.transform(new StreamSource(QetestUtils.filenameToURL(systemIdFileInfo.xmlName)), 
+                                       new StreamResult(outNames.nextName()));
+
+            result = fileChecker.check(reporter, 
+                                           new File(outNames.currentName()), 
+                                           new File(systemIdFileInfo.goldName), 
+                                          "(2)embedded transform into " + outNames.currentName());
+            if (result == Logger.FAIL_RESULT)
+                reporter.logInfoMsg("(2)embedded transform failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with simple embedded reuse");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with simple embedded reuse");
+        }
+
+        try
+        {
+            // Verify you can process an embedded stylesheet as fragment
+            testEmbeddedTransform(new StreamSource(QetestUtils.filenameToURL(embeddedFragmentFileInfo.xmlName)),
+                                  new StreamSource(QetestUtils.filenameToURL(embeddedFragmentFileInfo.xmlName)),
+                                  "(10)embedded fragment transform",
+                                  embeddedFragmentFileInfo.goldName);
+
+            // Verify you can process an embedded stylesheet that 
+            //  comes from a relative path - default systemId
+            testEmbeddedTransform(new StreamSource(QetestUtils.filenameToURL(embeddedRelativeXmlName)),
+                                  new StreamSource(QetestUtils.filenameToURL(embeddedRelativeXmlName)),
+                                  "(11)embedded relative transform",
+                                  relativeGoldFileLevel1);
+
+            // ...Verify relative paths, explicit systemId up one level0
+            // sysId for level0 up one: inputDir + File.separator + "EmbeddedRelative.xml"
+            Source relativeXmlSrc = new StreamSource(new FileInputStream(embeddedRelativeXmlName));
+            relativeXmlSrc.setSystemId(QetestUtils.filenameToURL(inputDir + File.separator + "EmbeddedRelative.xml"));
+            Source relativeTransformSrc = new StreamSource(new FileInputStream(embeddedRelativeXmlName));
+            relativeTransformSrc.setSystemId(QetestUtils.filenameToURL(inputDir + File.separator + "EmbeddedRelative.xml"));
+            testEmbeddedTransform(relativeXmlSrc,
+                                  relativeTransformSrc,
+                                  "(12a)embedded relative, explicit sysId up level0",
+                                  relativeGoldFileLevel0);
+            // ...Verify relative paths, explicit systemId same level1
+            relativeXmlSrc = new StreamSource(new FileInputStream(embeddedRelativeXmlName));
+            relativeXmlSrc.setSystemId(QetestUtils.filenameToURL(embeddedRelativeXmlName));
+            relativeTransformSrc = new StreamSource(new FileInputStream(embeddedRelativeXmlName));
+            relativeTransformSrc.setSystemId(QetestUtils.filenameToURL(embeddedRelativeXmlName));
+            testEmbeddedTransform(relativeXmlSrc,
+                                  relativeTransformSrc,
+                                  "(12b)embedded relative, explicit sysId same level1",
+                                  relativeGoldFileLevel1);
+
+            // ...Verify relative paths, explicit systemId down one level2
+            // sysId for level2 down one: inputDir + "/trax/systemid/" + "EmbeddedRelative.xml"
+            relativeXmlSrc = new StreamSource(new FileInputStream(embeddedRelativeXmlName));
+            relativeXmlSrc.setSystemId(QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + "EmbeddedRelative.xml"));
+            relativeTransformSrc = new StreamSource(new FileInputStream(embeddedRelativeXmlName));
+            relativeTransformSrc.setSystemId(QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + "EmbeddedRelative.xml"));
+            testEmbeddedTransform(relativeXmlSrc,
+                                  relativeTransformSrc,
+                                  "(12c)embedded relative, explicit sysId down level2",
+                                  relativeGoldFileLevel2);
+
+            // Verify you can process various types of embedded stylesheets
+            // This also verifies that a type of 'not/found' is skipped
+            // Xalan-specific: text/xsl
+            testEmbeddedTransform(new StreamSource(QetestUtils.filenameToURL(typeNameTextXsl)),
+                                  new StreamSource(QetestUtils.filenameToURL(typeNameTextXsl)),
+                                  "(20a)xml:stylesheet type=text/xsl",
+                                  typeGoldName);
+
+            // Proposed standard: text/xml
+            testEmbeddedTransform(new StreamSource(QetestUtils.filenameToURL(typeNameTextXml)),
+                                  new StreamSource(QetestUtils.filenameToURL(typeNameTextXml)),
+                                  "(20b)xml:stylesheet type=text/xml",
+                                  typeGoldName);
+
+            // Proposed standard: application/xml+xslt
+            testEmbeddedTransform(new StreamSource(QetestUtils.filenameToURL(typeNameApplicationXmlXslt)),
+                                  new StreamSource(QetestUtils.filenameToURL(typeNameApplicationXmlXslt)),
+                                  "(20b)xml:stylesheet type=application/xml+xslt",
+                                  typeGoldName);
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with other embedded");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with other embedded");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Test media, title, charset types of xml-stylesheet PI's.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Test media, title, charset types of xml-stylesheet PI's");
+
+        TransformerFactory factory = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            return true;
+        }
+        String mediaTitleName = inputDir + File.separator 
+                                + TRAX_SUBDIR + File.separator
+                                + "EmbeddedMediaTitle.xml";
+        try
+        {
+            String media= null;
+            String title = null;
+            String charset = null;
+            media = "foo/media";
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", media=" + media + ")");
+            Source xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            Transformer transformer = factory.newTransformer(xslSrc);
+            reporter.logTraceMsg("Got embedded templates, media=" + media + " , about to transform.");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                       new StreamResult(outNames.nextName()));
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(relativeGoldFileLevel1), 
+                                     "(20)embedded media=" + media + " transform into " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(20)embedded media=" + media + " failure reason:" + fileChecker.getExtendedInfo());
+            }
+
+
+            media = "bar/media";
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", media=" + media + ")");
+            xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            transformer = factory.newTransformer(xslSrc);
+            reporter.logTraceMsg("Got embedded templates, media=" + media + " , about to transform.");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                       new StreamResult(outNames.nextName()));
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(relativeGoldFileLevel0), 
+                                     "(20a)embedded media=" + media + " transform into " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(20a)embedded media=" + media + " failure reason:" + fileChecker.getExtendedInfo());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with testcase(media)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with testcase(media)");
+        }
+
+        try
+        {
+            String media= null;
+            String title = null;
+            String charset = null;
+            title = "foo-title";
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", title=" + title + ")");
+            Source xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            Transformer transformer = factory.newTransformer(xslSrc);
+            reporter.logTraceMsg("Got embedded templates, title=" + title + " , about to transform.");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                       new StreamResult(outNames.nextName()));
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(relativeGoldFileLevel1), 
+                                     "(21)embedded title=" + title + " transform into " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(21)embedded title=" + title + " failure reason:" + fileChecker.getExtendedInfo());
+            }
+
+
+            title = "bar-title";
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", title=" + title + ")");
+            xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            transformer = factory.newTransformer(xslSrc);
+            reporter.logTraceMsg("Got embedded templates, title=" + title + " , about to transform.");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                       new StreamResult(outNames.nextName()));
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(relativeGoldFileLevel0), 
+                                     "(21a)embedded title=" + title + " transform into " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(21a)embedded title=" + title + " failure reason:" + fileChecker.getExtendedInfo());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with testcase(title)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with testcase(title)");
+        }
+
+        try
+        {
+            String media= null;
+            String title = null;
+            String charset = null;
+            media = "alt/media"; // Should use alternate, I think
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", media=" + media + ")");
+            Source xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            Transformer transformer = factory.newTransformer(xslSrc);
+            reporter.logTraceMsg("Got embedded templates, media=" + media + " , about to transform.");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                       new StreamResult(outNames.nextName()));
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(relativeGoldFileLevel2), 
+                                     "(22)embedded media=" + media + " transform into " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(22)embedded media=" + media + " failure reason:" + fileChecker.getExtendedInfo());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with testcase(alternate)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with testcase(alternate)");
+        }
+        try
+        {
+            String media= null;
+            String title = null;
+            String charset = null;
+            title = "title-not-found"; // negative test: there is no title like this
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", title=" + title + ")");
+            Source xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            if (null == xslSrc)
+            {
+                reporter.checkPass("getAssociatedStylesheet returns null for not found title");
+            }
+            else
+            {
+                reporter.checkFail("getAssociatedStylesheet returns null for not found title");
+                reporter.logErrorMsg("xslSrc is: " + xslSrc);
+            }
+            title = null;
+            media = "media/notfound"; // negative test: there is no media like this
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", media=" + media + ")");
+            xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            if (null == xslSrc)
+            {
+                reporter.checkPass("getAssociatedStylesheet returns null for not found media");
+            }
+            else
+            {
+                reporter.checkFail("getAssociatedStylesheet returns null for not found media");
+                reporter.logErrorMsg("xslSrc is: " + xslSrc);
+            }
+
+            title = "alt-title";        // This title is in there, but
+            media = "media/notfound"; // negative test: there is no media like this
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", media=" + media + ")"
+                                 + ", title=" + title + ")");
+            xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            if (null == xslSrc)
+            {
+                reporter.checkPass("getAssociatedStylesheet returns null bad media, good title");
+            }
+            else
+            {
+                reporter.checkFail("getAssociatedStylesheet returns null bad media, good title");
+                reporter.logErrorMsg("xslSrc is: " + xslSrc);
+            }
+
+            title = "title-not-found"; // No title like this, but
+            media = "alt/media"; // there is a media like this
+            reporter.logTraceMsg("About to getAssociatedStylesheet(" + QetestUtils.filenameToURL(mediaTitleName)
+                                 + ", media=" + media + ")"
+                                 + ", title=" + title + ")");
+            xslSrc = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(mediaTitleName)), 
+                                                                media, title, charset);
+            if (null == xslSrc)
+            {
+                reporter.checkPass("getAssociatedStylesheet returns null bad title, good media");
+            }
+            else
+            {
+                reporter.checkFail("getAssociatedStylesheet returns null bad title, good media");
+                reporter.logErrorMsg("xslSrc is: " + xslSrc);
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with testcase(negative)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with testcase(negative)");
+        }
+
+        reporter.logTraceMsg("//@todo testing with charset");
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method to test transforming embedded stylesheets.
+     * Calls getAssociatedStylesheet on the xml source, and then 
+     * uses the resulting stylesheet to transform the other source.
+     * Two sources used since StreamSources may not be re-useable.
+     * Calls fileChecker.check to validate.
+     * 
+     * @param xmlSrc Source of XML file to use to get stylesheet from
+     * @param transformSrc Source of XML file to transform
+     * @param desc description of test, used in check() calls
+     * @param goldName path\filename of gold file
+     */
+    protected void testEmbeddedTransform(Source xmlSrc, Source transformSrc, 
+                                         String desc, String goldName)
+    {
+        TransformerFactory factory = null;
+        String media= null;     // often ignored
+        String title = null;    // often ignored
+        String charset = null;  // often ignored
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            Source stylesheet = factory.getAssociatedStylesheet(xmlSrc, 
+                                                                media, title, charset);
+            Templates embedTemplates = factory.newTemplates(stylesheet);
+            Transformer embedTransformer = embedTemplates.newTransformer();
+
+            reporter.logTraceMsg("Got embedded(" + xmlSrc.getSystemId() 
+                                 + "), about to transform(" + transformSrc.getSystemId() + ").");
+            embedTransformer.transform(transformSrc, 
+                                       new StreamResult(outNames.nextName()));
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(goldName), 
+                                     desc + " into " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg(desc + " failure reason:" + fileChecker.getExtendedInfo());
+            }
+        }
+        catch (Throwable t)
+        {
+            // We only expect transforms that work
+            reporter.checkFail("Transform(" + desc + ") threw:" + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "Transform(" + desc + ") threw");
+        }
+    }
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by EmbeddedStylesheetTest:\n"
+                + "(Note: assumes inputDir=tests\\api)\n"
+                + "(Note: test is directory-dependent!)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        EmbeddedStylesheetTest app = new EmbeddedStylesheetTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/ErrorListenerAPITest.java b/test/java/src/org/apache/qetest/trax/ErrorListenerAPITest.java
new file mode 100644
index 0000000..1476ef0
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/ErrorListenerAPITest.java
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ErrorListenerAPITest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.util.Properties;
+
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.TransformerException;
+
+import org.apache.qetest.FileBasedTest;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for ErrorListener; defaults to Xalan impl.
+ * Only very basic API coverage.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ErrorListenerAPITest extends FileBasedTest
+{
+    /** FQCN for Xalan-J 2.x impl.  */
+    public static final String XALAN_ERRORLISTENER_IMPL = "org.apache.xml.utils.DefaultErrorHandler";
+
+    /** FQCN for the Logging* impl that the tests provide.  */
+    public static final String QETEST_ERRORLISTENER_IMPL = "org.apache.qetest.trax.LoggingErrorHandler";
+
+    /** Name of ErrorListener implementation we're going to test.  */
+    public String errorListenerClassname = XALAN_ERRORLISTENER_IMPL;
+
+    /** Just initialize test name, comment, numTestCases. */
+    public ErrorListenerAPITest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "ErrorListenerAPITest";
+        testComment = "API Coverage test for ErrorListener; defaults to Xalan impl";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * //@todo read in name of alternate ErrorListener class!  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        reporter.logInfoMsg("//@todo allow user to change name of ErrorListener implementation used");
+        return true;
+    }
+
+
+    /**
+     * API Coverage of ErrorListener class, using Xalan-J 2.x impl.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("API Coverage of ErrorListener class, using Xalan-J 2.x impl");
+        Class elClass = null;
+        ErrorListener errorListener = null;
+        try
+        {
+            elClass = Class.forName(errorListenerClassname);
+            errorListener = (ErrorListener)elClass.newInstance();
+        }
+        catch (Exception e)
+        {
+            reporter.checkErr("Loading errorListener implementation " + errorListenerClassname
+                              + " threw: " + e.toString());
+            reporter.testCaseClose();
+            return true;
+        }
+
+        Exception ex = new Exception("Exception-message-here");
+        TransformerException tex = new TransformerException("TransformerException-message-here", ex);
+
+        try
+        {
+            errorListener.warning(tex);
+            reporter.checkPass("warning did not throw any exception");
+            reporter.logTraceMsg("//@todo also validate System.err stream!");
+        }
+        catch (TransformerException te)
+        {
+            reporter.checkFail("warning threw TransformerException, threw: " + te.toString());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("warning threw non-TransformerException, threw: " + t.toString());
+        }
+
+        try
+        {
+            // Default error impl in Xalan throws exception
+            errorListener.error(tex);
+            reporter.checkFail("error did not throw any exception");
+            reporter.logTraceMsg("//@todo also validate System.err stream!");
+        }
+        catch (TransformerException te)
+        {
+            reporter.checkPass("error expectedly threw TransformerException, threw: " + te.toString());
+            reporter.check((te.toString().indexOf("TransformerException-message-here") > -1), 
+                           true, "error's exception includes proper text");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("error threw non-TransformerException, threw: " + t.toString());
+        }
+
+        try
+        {
+            // Default fatalError impl in Xalan throws exception
+            errorListener.error(tex);
+            reporter.checkFail("fatalError did not throw any exception");
+            reporter.logTraceMsg("//@todo also validate System.err stream!");
+        }
+        catch (TransformerException te)
+        {
+            reporter.checkPass("fatalError expectedly threw TransformerException, threw: " + te.toString());
+            reporter.check((te.toString().indexOf("TransformerException-message-here") > -1), 
+                           true, "fatalError's exception includes proper text");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("fatalError threw non-TransformerException, threw: " + t.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by ErrorListenerAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        ErrorListenerAPITest app = new ErrorListenerAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/ErrorListenerTest.java b/test/java/src/org/apache/qetest/trax/ErrorListenerTest.java
new file mode 100644
index 0000000..dfe40d8
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/ErrorListenerTest.java
@@ -0,0 +1,436 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ErrorListenerTest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.LoggingSAXErrorHandler;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Verify that ErrorListeners are called properly from Transformers.
+ * Also verifies basic Transformer behavior after a stylesheet 
+ * with errors has been built.
+ * Note: parts of this test may rely on specific Xalan functionality, 
+ * in that with the specific errors I've chosen, Xalan can actually 
+ * continue to process the stylesheet, even though it had an error.
+ * XSLTC mode may either throw slighly different kinds of errors, or 
+ * may not be able to continue after the error (we should 
+ * investigate changing this test to just verify common things, 
+ * and then check the rest into the xalanj2 directory).
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ErrorListenerTest extends FileBasedTest
+{
+
+    /** Provide sequential output names automatically.   */
+    protected OutputNameManager outNames;
+
+    /** 
+     * A simple stylesheet with errors for testing in various flavors.  
+     * Must be coordinated with templatesExpectedType/Value,
+     * transformExpectedType/Value.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * A simple stylesheet without errors in it.  
+     */
+    protected XSLTestfileInfo goodFileInfo = new XSLTestfileInfo();
+
+    /** Expected type of error during stylesheet build.  */
+    protected int templatesExpectedType = 0;
+
+    /** Expected String of error during stylesheet build.  */
+    protected String templatesExpectedValue = null;
+
+    /** Expected type of error during transform.  */
+    protected int transformExpectedType = 0;
+
+    /** Expected String of error during transform.  */
+    protected String transformExpectedValue = null;
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String ERR_SUBDIR = "err";
+
+    /** Name of expected parent test\tests\api directory.  */
+    public static final String API_PARENTDIR = "api";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public ErrorListenerTest()
+    {
+        numTestCases = 4;  // REPLACE_num
+        testName = "ErrorListenerTest";
+        testComment = "Verify that ErrorListeners are called properly from Transformers.";
+    }
+
+
+    /**
+     * Initialize this test  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + ERR_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + ERR_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + ERR_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + ERR_SUBDIR
+                              + File.separator;
+
+        goodFileInfo.inputName = inputDir + File.separator 
+                              + "trax" + File.separator + "identity.xsl";
+        goodFileInfo.xmlName  = inputDir + File.separator 
+                              + "trax" + File.separator + "identity.xml";
+        goodFileInfo.goldName  = goldDir + File.separator 
+                              + "trax" + File.separator + "identity.out";
+
+        testFileInfo.inputName = testBasePath + "ErrorListenerTest.xsl";
+        testFileInfo.xmlName = testBasePath + "ErrorListenerTest.xml";
+        testFileInfo.goldName = goldBasePath + "ErrorListenerTest.out";
+        templatesExpectedType = LoggingErrorListener.TYPE_FATALERROR;
+        templatesExpectedValue = "decimal-format names must be unique. Name \"myminus\" has been duplicated";
+        transformExpectedType = LoggingErrorListener.TYPE_WARNING;
+        transformExpectedValue = "ExpectedMessage from:list1";
+
+        return true;
+    }
+
+
+    /**
+     * Build a stylesheet/do a transform with a known-bad stylesheet.
+     * Verify that the ErrorListener is called properly.
+     * Primarily using StreamSources.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Build a stylesheet/do a transform with a known-bad stylesheet");
+        LoggingErrorListener loggingErrorListener = new LoggingErrorListener(reporter);
+        loggingErrorListener.setThrowWhen(LoggingErrorListener.THROW_NEVER);
+        reporter.logTraceMsg("loggingErrorListener originally setup:" + loggingErrorListener.getQuickCounters());
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            // Set the errorListener and validate it
+            factory.setErrorListener(loggingErrorListener);
+            reporter.check((factory.getErrorListener() == loggingErrorListener),
+                           true, "set/getErrorListener on factory");
+
+            // Attempt to build templates from known-bad stylesheet
+            // Validate known errors in stylesheet building 
+            loggingErrorListener.setExpected(templatesExpectedType, 
+                                             templatesExpectedValue);
+            reporter.logInfoMsg("About to factory.newTemplates(" + QetestUtils.filenameToURL(testFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            reporter.logTraceMsg("loggingErrorListener after newTemplates:" + loggingErrorListener.getQuickCounters());
+            // Clear out any setExpected or counters
+            loggingErrorListener.reset();
+            reporter.checkPass("set ErrorListener prevented any exceptions in newTemplates()");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("errorListener unexpectedly threw: " + t.toString());
+            reporter.logThrowable(Logger.ERRORMSG, t, "errorListener unexpectedly threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Build a bad stylesheet/do a transform with SAX.
+     * Verify that the ErrorListener is called properly.
+     * Primarily using SAXSources.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Build a bad stylesheet/do a transform with SAX");
+        LoggingErrorListener loggingErrorListener = new LoggingErrorListener(reporter);
+        loggingErrorListener.setThrowWhen(LoggingErrorListener.THROW_NEVER);
+        reporter.logTraceMsg("loggingErrorListener originally setup:" + loggingErrorListener.getQuickCounters());
+
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+        XMLReader reader = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        TransformerHandler handler = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            saxFactory = (SAXTransformerFactory)factory; // assumes SAXSource.feature!
+
+            // Set the errorListener and validate it
+            saxFactory.setErrorListener(loggingErrorListener);
+            reporter.check((saxFactory.getErrorListener() == loggingErrorListener),
+                           true, "set/getErrorListener on saxFactory");
+
+            // Use the JAXP way to get an XMLReader
+            reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
+            InputSource is = new InputSource(QetestUtils.filenameToURL(testFileInfo.inputName));
+
+            // Attempt to build templates from known-bad stylesheet
+            // Validate known errors in stylesheet building 
+            loggingErrorListener.setExpected(templatesExpectedType, 
+                                             templatesExpectedValue);
+            reporter.logTraceMsg("About to factory.newTransformerHandler(SAX:" + QetestUtils.filenameToURL(testFileInfo.inputName) + ")");
+            handler = saxFactory.newTransformerHandler(new SAXSource(is));
+            reporter.logTraceMsg("loggingErrorListener after newTransformerHandler:" + loggingErrorListener.getQuickCounters());
+            // Clear out any setExpected or counters
+            loggingErrorListener.reset();
+            reporter.checkPass("set ErrorListener prevented any exceptions in newTransformerHandler()");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("errorListener-SAX unexpectedly threw: " + t.toString());
+            reporter.logThrowable(Logger.ERRORMSG, t, "errorListener-SAX unexpectedly threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Build a bad stylesheet/do a transform with DOMs.
+     * Verify that the ErrorListener is called properly.
+     * Primarily using DOMSources.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Build a bad stylesheet/do a transform with DOMs");
+        LoggingErrorListener loggingErrorListener = new LoggingErrorListener(reporter);
+        loggingErrorListener.setThrowWhen(LoggingErrorListener.THROW_NEVER);
+        reporter.logTraceMsg("loggingErrorListener originally setup:" + loggingErrorListener.getQuickCounters());
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        DocumentBuilderFactory dfactory = null;
+        DocumentBuilder docBuilder = null;
+        Node xmlNode = null;
+        Node xslNode = null;
+        try
+        {
+            // Startup a DOM factory, create some nodes/DOMs
+            dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            docBuilder = dfactory.newDocumentBuilder();
+            reporter.logInfoMsg("parsing xml, xsl files to DOMs");
+            xslNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            xmlNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(testFileInfo.xmlName)));
+
+            // Create a transformer factory with an error listener
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(loggingErrorListener);
+
+            // Attempt to build templates from known-bad stylesheet
+            // Validate known errors in stylesheet building 
+            loggingErrorListener.setExpected(templatesExpectedType, 
+                                             templatesExpectedValue);
+            reporter.logTraceMsg("About to factory.newTemplates(DOM:" + QetestUtils.filenameToURL(testFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new DOMSource(xslNode));
+            reporter.logTraceMsg("loggingErrorListener after newTemplates:" + loggingErrorListener.getQuickCounters());
+            // Clear out any setExpected or counters
+            loggingErrorListener.reset();
+            reporter.checkPass("set ErrorListener prevented any exceptions in newTemplates()");
+
+            // This stylesheet will still work, even though errors 
+            //  were detected during it's building.  Note that 
+            //  future versions of Xalan or other processors may 
+            //  not be able to continue here...
+            reporter.logErrorMsg("DOM templates/validation Moved to SmoketestOuttakes.java.testCase3 Oct-01 -sc Bugzilla#1062");
+/* **** Moved to SmoketestOuttakes.java.testCase4 Oct-01 -sc 
+            
+            transformer = templates.newTransformer();
+
+            reporter.logTraceMsg("default transformer's getErrorListener is: " + transformer.getErrorListener());
+            // Set the errorListener and validate it
+            transformer.setErrorListener(loggingErrorListener);
+            reporter.check((transformer.getErrorListener() == loggingErrorListener),
+                           true, "set/getErrorListener on transformer");
+
+            // Validate the first xsl:message call in the stylesheet
+            loggingErrorListener.setExpected(transformExpectedType, 
+                                             transformExpectedValue);
+            reporter.logInfoMsg("about to transform(DOM, StreamResult)");
+            transformer.transform(new DOMSource(xmlNode), 
+                                  new StreamResult(outNames.nextName()));
+            reporter.logTraceMsg("after transform(...)");
+            // Clear out any setExpected or counters
+            loggingErrorListener.reset();
+
+            // Validate the actual output file as well: in this case, 
+            //  the stylesheet should still work
+            fileChecker.check(reporter, 
+                    new File(outNames.currentName()), 
+                    new File(testFileInfo.goldName), 
+                    "DOM transform of error xsl into: " + outNames.currentName());
+**** Moved to SmoketestOuttakes.java.testCase4 Oct-01 -sc **** */
+            
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("errorListener-DOM unexpectedly threw: " + t.toString());
+            reporter.logThrowable(Logger.ERRORMSG, t, "errorListener-DOM unexpectedly threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Miscellaneous other ErrorListener tests.
+     * Includes Bugzilla1266.
+     * Primarily using StreamSources.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase4()
+    {
+        reporter.testCaseInit("Miscellaneous other ErrorListener tests");
+        LoggingErrorListener loggingErrorListener = new LoggingErrorListener(reporter);
+        loggingErrorListener.setThrowWhen(LoggingErrorListener.THROW_NEVER);
+        reporter.logTraceMsg("loggingErrorListener originally setup:" + loggingErrorListener.getQuickCounters());
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            reporter.logInfoMsg("About to factory.newTemplates(" + QetestUtils.filenameToURL(goodFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(goodFileInfo.inputName)));
+            transformer = templates.newTransformer();
+
+            // Set the errorListener and validate it
+            transformer.setErrorListener(loggingErrorListener);
+            reporter.check((transformer.getErrorListener() == loggingErrorListener),
+                           true, "set/getErrorListener on transformer");
+
+            reporter.logStatusMsg("Reproduce Bugzilla1266 - warning due to bad output props not propagated");
+            reporter.logStatusMsg("transformer.setOutputProperty(encoding, illegal-encoding-value)");
+            transformer.setOutputProperty("encoding", "illegal-encoding-value");
+
+            reporter.logTraceMsg("about to transform(...)");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(goodFileInfo.xmlName)), 
+                                  new StreamResult(outNames.nextName()));
+            reporter.logTraceMsg("after transform(...)");
+            reporter.logStatusMsg("loggingErrorListener after transform:" + loggingErrorListener.getQuickCounters());
+
+            // Validate that one warning (about illegal-encoding-value) should have been reported
+            int[] errCtr = loggingErrorListener.getCounters();
+            reporter.logErrorMsg("Validation of warning throw Moved to Bugzilla1266.java Oct-01 -sc");
+/* **** Moved to Bugzilla1266.java Oct-01 -sc
+            reporter.check((errCtr[LoggingErrorListener.TYPE_WARNING] > 0), true, "At least one Warning listned to for illegal-encoding-value");
+**** Moved to Bugzilla1266.java Oct-01 -sc **** */
+            
+            // Validate the actual output file as well: in this case, 
+            //  the stylesheet should still work
+            fileChecker.check(reporter, 
+                    new File(outNames.currentName()), 
+                    new File(goodFileInfo.goldName), 
+                    "transform of good xsl w/bad output props into: " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("errorListener4 unexpectedly threw: " + t.toString());
+            reporter.logThrowable(Logger.ERRORMSG, t, "errorListener4 unexpectedly threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by ErrorListenerTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        ErrorListenerTest app = new ErrorListenerTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/ExamplesTest.java b/test/java/src/org/apache/qetest/trax/ExamplesTest.java
new file mode 100644
index 0000000..937a85e
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/ExamplesTest.java
@@ -0,0 +1,1186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ExamplesTest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+// Support for test reporting and harness classes
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.serializer.OutputPropertiesFactory;
+import org.apache.xml.serializer.Serializer;
+import org.apache.xml.serializer.SerializerFactory;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLFilter;
+import org.xml.sax.XMLReader;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Test version of xml-xalan/java/samples/trax/Examples.java.
+ * <p>This file is essentially copied from the Examples for TRAX, or 
+ * javax.xml.transform; however this file actually validates most 
+ * output and behavior for correctness.  Hopefully, we can get this 
+ * file updated at the same time as Examples.java in the future.</p>
+ * <p>In general, I merely copied each method from Examples.java
+ * and made minor updates (try...catch within methods, call to 
+ * reporter.logBlah to output messages, etc.) then added validation 
+ * of actual output files.  Note that each method validates it's 
+ * output by calling fileChecker.check(...) explicitly, so we can't 
+ * change the input files without carefully changing the gold files 
+ * for each area.</p>
+ * <p>Note that some tests may use NOT_DEFINED for their gold file 
+ * if we haven't yet validated what the 'correct' output should be 
+ * for each case - these should be updated as time permits.</p>
+ * @author shane_curcuru@lotus.com
+ * @author scott_boag@lotus.com
+ * @version $Id$
+ */
+public class ExamplesTest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files, for the gold files
+     * NOTE: Gold names must match the test cases in order, and 
+     * must match the checked-in gold files ExamplesTest*.out!
+     */
+    protected OutputNameManager goldNames;
+
+    /** Sample test stylesheet to use for transformations, includes gold file.  */
+    protected XSLTestfileInfo fooFile = new XSLTestfileInfo();
+
+    /** Sample test stylesheet to use for transformations, includes gold file.  */
+    protected XSLTestfileInfo bazFile = new XSLTestfileInfo();
+
+    /** Sample test stylesheet name to use for multi-transformations.  */
+    protected String foo2File;
+
+    /** Sample test stylesheet name to use for multi-transformations.  */
+    protected String foo3File;
+
+    /** Sample gold files used for specific transforms - with params.  */
+    // protected String param1GoldName;
+
+    /** Sample gold files used for specific transforms - with params and output format.  */
+    // protected String param2GoldName;
+
+    /** Sample gold files used for specific transforms - with output format.  */
+    // protected String outputGoldName;
+
+    /** Sample gold files used for specific transforms - ContentHandler.  */
+    // protected String sax2GoldName;
+
+    /** Sample gold files used for specific transforms - XMLFilter/Reader.  */
+    // protected String saxGoldName;
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = "trax";
+    
+    /** Just initialize test name, comment, numTestCases. */
+    public ExamplesTest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "ExamplesTest";
+        testComment = "Test various combinations of Source and Result types";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * REPLACE_other_test_file_init.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // NOTE: 'reporter' variable is already initialized at this point
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        
+        goldNames = new OutputNameManager(goldBasePath
+                                         + File.separator + testName, ".out");
+
+        reporter.logTraceMsg("NOTE! This file is very sensitive to pathing issues!");
+        fooFile.inputName = swapSlash(testBasePath + "xsl/foo.xsl");
+        fooFile.xmlName = swapSlash(testBasePath + "xml/foo.xml");
+
+        bazFile.xmlName = swapSlash(testBasePath + "xml/baz.xml");
+
+        foo2File = swapSlash(testBasePath + "xsl/foo2.xsl");
+
+        foo3File = swapSlash(testBasePath + "xsl/foo3.xsl");
+
+        // param1GoldName = goldBasePath + "param1.out";
+        // param2GoldName = goldBasePath + "param2.out";
+        // outputGoldName = goldBasePath + "output.out";
+        // saxGoldName = goldBasePath + "fooSAX.out";
+        // sax2GoldName = goldBasePath + "fooSAX2.out";
+        return true;
+    }
+
+
+    /**
+     * Worker method to swap / for \ in Strings.  
+     */
+    public String swapSlash(String s)
+    {
+        return (new String(s)).replace('\\', '/');
+    }
+
+
+    /**
+     * Call each of the methods found in Examples.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Call each of the methods found in Examples");
+
+        // Note: the tests must be used with the same input files, 
+        //  since they hard-code the gold files within the methods
+        String tmpFooNames = fooFile.xmlName + ", " + fooFile.inputName;
+        reporter.logStatusMsg("exampleSimple1(" + tmpFooNames + ")");
+        exampleSimple1(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleSimple2(" + tmpFooNames + ")");
+        exampleSimple2(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleFromStream(" + tmpFooNames + ")");
+        exampleFromStream(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleFromReader(" + tmpFooNames + ")");
+        exampleFromReader(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleUseTemplatesObj(" + fooFile.xmlName + ", " + bazFile.xmlName + ", " + fooFile.inputName + ")");
+        exampleUseTemplatesObj(fooFile.xmlName, bazFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleContentHandlerToContentHandler(" + tmpFooNames + ")");
+        reporter.logErrorMsg("exampleContentHandlerToContentHandler(" + tmpFooNames + ") NOTE: See SmoketestOuttakes instead!");
+        String unused = goldNames.nextName(); // must increment out, gold names to simulate actual test
+        unused = outNames.nextName(); // must increment out, gold names to simulate actual test
+//        exampleContentHandlerToContentHandler(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleXMLReader(" + tmpFooNames + ")");
+        exampleXMLReader(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleXMLFilter(" + tmpFooNames + ")");
+        exampleXMLFilter(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleXMLFilterChain(" + tmpFooNames 
+                              + ", " + foo2File + ", " + foo3File + ")");
+        exampleXMLFilterChain(fooFile.xmlName, fooFile.inputName, foo2File, foo3File);
+
+        reporter.logStatusMsg("exampleDOM2DOM(" + tmpFooNames + ")");
+        exampleDOM2DOM(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleParam(" + tmpFooNames + ")");
+        exampleParam(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleTransformerReuse(" + tmpFooNames + ")");
+        exampleTransformerReuse(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleOutputProperties(" + tmpFooNames + ")");
+        exampleOutputProperties(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleUseAssociated(" + fooFile.xmlName +")");
+        exampleUseAssociated(fooFile.xmlName);
+
+        reporter.logStatusMsg("exampleContentHandler2DOM(" + tmpFooNames + ")");
+        reporter.logErrorMsg("exampleContentHandler2DOM(" + tmpFooNames + ") NOTE: See SmoketestOuttakes instead!");
+        unused = goldNames.nextName(); // must increment out, gold names to simulate actual test
+        unused = outNames.nextName(); // must increment out, gold names to simulate actual test
+        //exampleContentHandler2DOM(fooFile.xmlName, fooFile.inputName);
+
+        reporter.logStatusMsg("exampleAsSerializer(" + tmpFooNames + ")");
+        exampleAsSerializer(fooFile.xmlName, fooFile.inputName);
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+  /**
+   * Show the simplest possible transformation from system id 
+   * to output stream.
+   */
+  public void exampleSimple1(String sourceID, String xslID)
+  {
+    try
+    {
+        // Create a transform factory instance.
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+    
+        // Create a transformer for the stylesheet.
+        reporter.logTraceMsg("newTransformer(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+        Transformer transformer 
+          = tfactory.newTransformer(new StreamSource(QetestUtils.filenameToURL(xslID)));
+        // No need to setSystemId, the transformer can get it from the URL
+    
+        // Transform the source XML to System.out.
+        reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID));
+        transformer.transform( new StreamSource(QetestUtils.filenameToURL(sourceID)),
+                               new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        String goldname = goldNames.nextName();
+        System.out.println("fooFile.goldName: "+goldname);
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldname),                
+                          "exampleSimple1 fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleSimple1 threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleSimple1 threw");
+    }
+  }
+  
+  /**
+   * Show the simplest possible transformation from File 
+   * to a File.
+   */
+  public void exampleSimple2(String sourceID, String xslID)
+  {
+    try
+    {
+        // Create a transform factory instance.
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+    
+        // Create a transformer for the stylesheet.
+        reporter.logTraceMsg("newTransformer(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+        Transformer transformer 
+          = tfactory.newTransformer(new StreamSource(new File(xslID)));
+        // No need to setSystemId, the transformer can get it from the File
+    
+        // Transform the source XML to System.out.
+        reporter.logTraceMsg("new StreamSource(new File(" + sourceID);
+        transformer.transform( new StreamSource(new File(sourceID)),
+                               new StreamResult(new File(outNames.nextName())));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleSimple2 fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleSimple2 threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleSimple2 threw");
+    }
+  }
+
+  
+  /**
+   * Show simple transformation from input stream to output stream.
+   */
+  public void exampleFromStream(String sourceID, String xslID)
+ {
+    try
+    {
+        // Create a transform factory instance.
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+
+        reporter.logTraceMsg("new BufferedInputStream(new FileInputStream(" + xslID);
+        InputStream xslIS = new BufferedInputStream(new FileInputStream(xslID));
+        StreamSource xslSource = new StreamSource(xslIS);
+        // Note that if we don't do this, relative URLs can not be resolved correctly!
+        xslSource.setSystemId(QetestUtils.filenameToURL(xslID));
+
+        // Create a transformer for the stylesheet.
+        Transformer transformer = tfactory.newTransformer(xslSource);
+    
+        reporter.logTraceMsg("new BufferedInputStream(new FileInputStream(" + sourceID);
+        InputStream xmlIS = new BufferedInputStream(new FileInputStream(sourceID));
+        StreamSource xmlSource = new StreamSource(xmlIS);
+        // Note that if we don't do this, relative URLs can not be resolved correctly!
+        xmlSource.setSystemId(QetestUtils.filenameToURL(sourceID));
+    
+        // Transform the source XML to System.out.
+        transformer.transform( xmlSource, new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleFromStream fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleFromStream threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleFromStream threw");
+    }
+  }
+  
+  /**
+   * Show simple transformation from reader to output stream.  In general 
+   * this use case is discouraged, since the XML encoding can not be 
+   * processed.
+   */
+  public void exampleFromReader(String sourceID, String xslID)
+  {
+    try
+    {
+        // Create a transform factory instance.
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+
+        // Note that in this case the XML encoding can not be processed!
+        reporter.logTraceMsg("new BufferedReader(new InputStreamReader(new FileInputStream(" + xslID);
+        Reader xslReader = new BufferedReader(new InputStreamReader(new FileInputStream(xslID), "UTF-8")); //@DEM
+//        Reader xslReader = new BufferedReader(new FileReader(xslID));  @DEM
+        StreamSource xslSource = new StreamSource(xslReader);
+        // Note that if we don't do this, relative URLs can not be resolved correctly!
+        xslSource.setSystemId(QetestUtils.filenameToURL(xslID));
+
+        // Create a transformer for the stylesheet.
+        Transformer transformer = tfactory.newTransformer(xslSource);
+    
+        // Note that in this case the XML encoding can not be processed!
+        reporter.logTraceMsg("new BufferedReader(new FileReader(" + sourceID);
+        Reader xmlReader = new BufferedReader(new InputStreamReader(new FileInputStream(sourceID), "UTF-8")); //@DEM
+//        Reader xmlReader = new BufferedReader(new FileReader(sourceID));  @DEM
+        StreamSource xmlSource = new StreamSource(xmlReader);
+        // Note that if we don't do this, relative URLs can not be resolved correctly!
+        xmlSource.setSystemId(QetestUtils.filenameToURL(sourceID));
+    
+        // Transform the source XML to System.out.
+        transformer.transform( xmlSource, new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleFromReader fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleFromReader threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleFromReader threw");
+    }
+  }
+
+
+ 
+  /**
+   * Show the simplest possible transformation from system id to output stream.
+   */
+  public void exampleUseTemplatesObj(String sourceID1, 
+                                    String sourceID2, 
+                                    String xslID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+    
+        // Create a templates object, which is the processed, 
+        // thread-safe representation of the stylesheet.
+        reporter.logTraceMsg("newTemplates(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+        Templates templates = tfactory.newTemplates(new StreamSource(QetestUtils.filenameToURL(xslID)));
+
+        // Illustrate the fact that you can make multiple transformers 
+        // from the same template.
+        Transformer transformer1 = templates.newTransformer();
+        Transformer transformer2 = templates.newTransformer();
+    
+        reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID1));
+        transformer1.transform(new StreamSource(QetestUtils.filenameToURL(sourceID1)),
+                              new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleUseTemplatesObj(1) fileChecker of:" + outNames.currentName());
+    
+        reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID2));
+        transformer2.transform(new StreamSource(QetestUtils.filenameToURL(sourceID2)),
+                              new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleUseTemplatesObj(2) fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleUseTemplatesObj threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleUseTemplatesObj threw");
+    }
+  }
+  
+
+  /**
+   * Show the Transformer using SAX events in and SAX events out.
+   */
+  public void exampleContentHandlerToContentHandler(String sourceID, 
+                                                           String xslID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+
+        // Does this factory support SAX features?
+        if (!tfactory.getFeature(SAXSource.FEATURE))
+        {
+            reporter.logErrorMsg("exampleContentHandlerToContentHandler:Processor does not support SAX");
+            return;
+        }
+          // If so, we can safely cast.
+          SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory);
+          
+          // A TransformerHandler is a ContentHandler that will listen for 
+          // SAX events, and transform them to the result.
+          reporter.logTraceMsg("newTransformerHandler(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+          TransformerHandler handler 
+            = stfactory.newTransformerHandler(new StreamSource(QetestUtils.filenameToURL(xslID)));
+
+          // Set the result handling to be a serialization to the file output stream.
+          Serializer serializer = SerializerFactory.getSerializer
+                                  (OutputPropertiesFactory.getDefaultMethodProperties("xml"));
+          FileOutputStream fos = new FileOutputStream(outNames.nextName());
+          serializer.setOutputStream(fos);
+          reporter.logStatusMsg("Test-output-to: new FileOutputStream(" + outNames.currentName());
+          
+          Result result = new SAXResult(serializer.asContentHandler());
+
+          handler.setResult(result);
+          
+          // Create a reader, and set it's content handler to be the TransformerHandler.
+          XMLReader reader=null;
+
+          // Use JAXP1.1 ( if possible )
+          try {
+              javax.xml.parsers.SAXParserFactory factory=
+                  javax.xml.parsers.SAXParserFactory.newInstance();
+              factory.setNamespaceAware( true );
+              javax.xml.parsers.SAXParser jaxpParser=
+                  factory.newSAXParser();
+              reader=jaxpParser.getXMLReader();
+              
+          } catch( javax.xml.parsers.ParserConfigurationException ex ) {
+              throw new org.xml.sax.SAXException( ex );
+          } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) {
+              throw new org.xml.sax.SAXException( ex1.toString() );
+          } catch( NoSuchMethodError ex2 ) {
+          }
+          if( reader==null ) reader = getJAXPXMLReader();
+          reader.setContentHandler(handler);
+          
+          // It's a good idea for the parser to send lexical events.
+          // The TransformerHandler is also a LexicalHandler.
+          reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
+          
+          // Parse the source XML, and send the parse events to the TransformerHandler.
+          reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(sourceID));
+          reader.parse(QetestUtils.filenameToURL(sourceID));
+          fos.close();
+
+          reporter.logTraceMsg("Note: See SPR SCUU4RZT78 for discussion as to why this output is different than XMLReader/XMLFilter");
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleContentHandlerToContentHandler fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleContentHandlerToContentHandler threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleContentHandlerToContentHandler threw");
+    }
+
+  }
+  
+  /**
+   * Show the Transformer as a SAX2 XMLReader.  An XMLFilter obtained 
+   * from newXMLFilter should act as a transforming XMLReader if setParent is not
+   * called.  Internally, an XMLReader is created as the parent for the XMLFilter.
+   */
+  public void exampleXMLReader(String sourceID, String xslID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        if(!tfactory.getFeature(SAXSource.FEATURE))
+        {
+            reporter.logErrorMsg("exampleXMLReader:Processor does not support SAX");
+            return;
+        }
+          reporter.logTraceMsg("newXMLFilter(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+          XMLReader reader 
+            = ((SAXTransformerFactory) tfactory).newXMLFilter(new StreamSource(QetestUtils.filenameToURL(xslID)));
+          
+          // Set the result handling to be a serialization to the file output stream.
+          Serializer serializer = SerializerFactory.getSerializer
+                                  (OutputPropertiesFactory.getDefaultMethodProperties("xml"));
+          FileOutputStream fos = new FileOutputStream(outNames.nextName());                        
+          serializer.setOutputStream(fos);
+          reporter.logStatusMsg("Test-output-to: new FileOutputStream(" + outNames.currentName());
+      
+          reader.setContentHandler(serializer.asContentHandler());
+
+          reporter.logTraceMsg("reader.parse(new InputSource(" + QetestUtils.filenameToURL(sourceID));
+          reader.parse(new InputSource(QetestUtils.filenameToURL(sourceID)));
+          fos.close();
+
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleXMLReader fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleXMLReader threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleXMLReader threw");
+    }
+
+  }
+
+  /**
+   * Show the Transformer as a simple XMLFilter.  This is pretty similar
+   * to exampleXMLReader, except that here the parent XMLReader is created 
+   * by the caller, instead of automatically within the XMLFilter.  This 
+   * gives the caller more direct control over the parent reader.
+   */
+  public void exampleXMLFilter(String sourceID, String xslID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+
+        XMLReader reader=null;
+    
+        // Use JAXP1.1 ( if possible )
+        try {
+            javax.xml.parsers.SAXParserFactory factory=
+                javax.xml.parsers.SAXParserFactory.newInstance();
+              factory.setNamespaceAware( true );
+              javax.xml.parsers.SAXParser jaxpParser=
+                factory.newSAXParser();
+            reader=jaxpParser.getXMLReader();
+        
+        } catch( javax.xml.parsers.ParserConfigurationException ex ) {
+            throw new org.xml.sax.SAXException( ex );
+        } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) {
+            throw new org.xml.sax.SAXException( ex1.toString() );
+        } catch( NoSuchMethodError ex2 ) {
+        }
+        if( reader==null ) reader = getJAXPXMLReader();
+
+          // Set the result handling to be a serialization to the file output stream.
+          Serializer serializer = SerializerFactory.getSerializer
+                                  (OutputPropertiesFactory.getDefaultMethodProperties("xml"));
+          FileOutputStream fos = new FileOutputStream(outNames.nextName());
+          serializer.setOutputStream(fos);
+          reporter.logStatusMsg("Test-output-to: new FileOutputStream(" + outNames.currentName());
+          reader.setContentHandler(serializer.asContentHandler());
+
+        try
+        {
+          reader.setFeature("http://xml.org/sax/features/namespace-prefixes",
+                            true);
+          reader.setFeature("http://apache.org/xml/features/validation/dynamic",
+                            true);
+        }
+        catch (SAXException se)
+        {
+            reporter.logErrorMsg("exampleXMLFilter: reader threw :" + se.toString());
+          // What can we do?
+          // TODO: User diagnostics.
+        }
+
+        reporter.logTraceMsg("newXMLFilter(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+        XMLFilter filter 
+          = ((SAXTransformerFactory) tfactory).newXMLFilter(new StreamSource(QetestUtils.filenameToURL(xslID)));
+
+        filter.setParent(reader);
+
+        // Now, when you call transformer.parse, it will set itself as 
+        // the content handler for the parser object (it's "parent"), and 
+        // will then call the parse method on the parser.
+          reporter.logTraceMsg("filter.parse(new InputSource(" + QetestUtils.filenameToURL(sourceID));
+        filter.parse(new InputSource(QetestUtils.filenameToURL(sourceID)));
+        
+        fos.close();
+
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleXMLFilter fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleXMLFilter threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleXMLFilter threw");
+    }
+  }
+
+  /**
+   * This example shows how to chain events from one Transformer
+   * to another transformer, using the Transformer as a
+   * SAX2 XMLFilter/XMLReader.
+   */
+  public void exampleXMLFilterChain(String sourceID, String xslID_1, 
+                                    String xslID_2, String xslID_3)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+    
+        Templates stylesheet1 = tfactory.newTemplates(new StreamSource(QetestUtils.filenameToURL(xslID_1)));
+        Transformer transformer1 = stylesheet1.newTransformer();
+    
+         // If one success, assume all will succeed.
+        if (!tfactory.getFeature(SAXSource.FEATURE))
+        {
+            reporter.logErrorMsg("exampleXMLFilterChain:Processor does not support SAX");
+            return;
+        }
+          SAXTransformerFactory stf = (SAXTransformerFactory)tfactory;
+          XMLReader reader=null;
+
+          // Use JAXP1.1 ( if possible )
+          try {
+              javax.xml.parsers.SAXParserFactory factory=
+                  javax.xml.parsers.SAXParserFactory.newInstance();
+              factory.setNamespaceAware( true );
+              javax.xml.parsers.SAXParser jaxpParser=
+                  factory.newSAXParser();
+              reader=jaxpParser.getXMLReader();
+              
+          } catch( javax.xml.parsers.ParserConfigurationException ex ) {
+              throw new org.xml.sax.SAXException( ex );
+          } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) {
+              throw new org.xml.sax.SAXException( ex1.toString() );
+          } catch( NoSuchMethodError ex2 ) {
+          }
+          if( reader==null ) reader = getJAXPXMLReader();
+
+          reporter.logTraceMsg("newXMLFilter(new StreamSource(" + QetestUtils.filenameToURL(xslID_1));
+          XMLFilter filter1 = stf.newXMLFilter(new StreamSource(QetestUtils.filenameToURL(xslID_1)));
+
+          reporter.logTraceMsg("newXMLFilter(new StreamSource(" + QetestUtils.filenameToURL(xslID_2));
+          XMLFilter filter2 = stf.newXMLFilter(new StreamSource(QetestUtils.filenameToURL(xslID_2)));
+
+          reporter.logTraceMsg("newXMLFilter(new StreamSource(" + QetestUtils.filenameToURL(xslID_3));
+          XMLFilter filter3 = stf.newXMLFilter(new StreamSource(QetestUtils.filenameToURL(xslID_3)));
+
+          if (null == filter1) // If one success, assume all were success.
+          {
+              reporter.checkFail("exampleXMLFilterChain: filter is null");
+              return;
+          }
+
+            // transformer1 will use a SAX parser as it's reader.    
+            filter1.setParent(reader);
+
+            // transformer2 will use transformer1 as it's reader.
+            filter2.setParent(filter1);
+
+            // transform3 will use transform2 as it's reader.
+            filter3.setParent(filter2);
+
+          // Set the result handling to be a serialization to the file output stream.
+          Serializer serializer = SerializerFactory.getSerializer
+                                  (OutputPropertiesFactory.getDefaultMethodProperties("xml"));
+          FileOutputStream fos = new FileOutputStream(outNames.nextName());
+          serializer.setOutputStream(fos);
+          reporter.logStatusMsg("Test-output-to: new FileOutputStream(" + outNames.currentName());
+          filter3.setContentHandler(serializer.asContentHandler());
+
+            // Now, when you call transformer3 to parse, it will set  
+            // itself as the ContentHandler for transform2, and 
+            // call transform2.parse, which will set itself as the 
+            // content handler for transform1, and call transform1.parse, 
+            // which will set itself as the content listener for the 
+            // SAX parser, and call parser.parse(new InputSource(fooFile.xmlName)).
+          reporter.logTraceMsg("filter3.parse(new InputSource(" + QetestUtils.filenameToURL(sourceID));
+            filter3.parse(new InputSource(QetestUtils.filenameToURL(sourceID)));
+            fos.close();
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleXMLFilterChain fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleXMLFilterChain threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleXMLFilterChain threw");
+    }
+  }
+
+  /**
+   * Show how to transform a DOM tree into another DOM tree.
+   * This uses the javax.xml.parsers to parse an XML file into a
+   * DOM, and create an output DOM.
+   */
+  public Node exampleDOM2DOM(String sourceID, String xslID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+
+        if (!tfactory.getFeature(DOMSource.FEATURE))
+        {
+            reporter.logErrorMsg("exampleDOM2DOM:Processor does not support SAX");
+            return null;
+        }
+
+          Templates templates;
+
+          {
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+            org.w3c.dom.Document outNode = docBuilder.newDocument();
+            reporter.logTraceMsg("docBuilder.parse(new InputSource(" + QetestUtils.filenameToURL(xslID));
+            Node doc = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(xslID)));
+     
+            DOMSource dsource = new DOMSource(doc);
+            // If we don't do this, the transformer won't know how to 
+            // resolve relative URLs in the stylesheet.
+            dsource.setSystemId(QetestUtils.filenameToURL(xslID));
+
+            templates = tfactory.newTemplates(dsource);
+          }
+
+          Transformer transformer = templates.newTransformer();
+          DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+          dfactory.setNamespaceAware(true); // must have namespaces for xsl files!
+          DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+          org.w3c.dom.Document outNode = docBuilder.newDocument();
+          reporter.logTraceMsg("docBuilder.parse(new InputSource(" + QetestUtils.filenameToURL(sourceID));
+          Node doc = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(sourceID)));
+
+          transformer.transform(new DOMSource(doc), new DOMResult(outNode));
+          
+          Transformer serializer = tfactory.newTransformer();
+          serializer.transform(new DOMSource(outNode), new StreamResult(outNames.nextName()));
+          reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleDOM2DOM fileChecker of:" + outNames.currentName());
+          return outNode;
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleDOM2DOM threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleDOM2DOM threw");
+        return null;
+        
+    }
+  } 
+
+  /**
+   * This shows how to set a parameter for use by the templates. Use 
+   * two transformers to show that different parameters may be set 
+   * on different transformers.
+   */
+  public void exampleParam(String sourceID, String xslID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        reporter.logTraceMsg("newTemplates(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+        Templates templates = tfactory.newTemplates(new StreamSource(QetestUtils.filenameToURL(xslID)));
+        Transformer transformer1 = templates.newTransformer();
+        Transformer transformer2 = templates.newTransformer();
+
+        transformer1.setParameter("a-param",
+                                  "hello to you!");
+        reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID));
+        transformer1.transform(new StreamSource(QetestUtils.filenameToURL(sourceID)),
+                               new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleParam(1) fileChecker of:" + outNames.currentName());
+    
+    
+        transformer2.setOutputProperty(OutputKeys.INDENT, "yes");
+        reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID));
+        transformer2.transform(new StreamSource(QetestUtils.filenameToURL(sourceID)),
+                               new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleParam(2) fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleParam threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleParam threw");
+    }
+  }
+  
+  /**
+   * Show the that a transformer can be reused, and show resetting 
+   * a parameter on the transformer.
+   */
+  public void exampleTransformerReuse(String sourceID, String xslID)
+  {
+    try
+    {
+        // Create a transform factory instance.
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+    
+        // Create a transformer for the stylesheet.
+        reporter.logTraceMsg("newTemplates(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+        Transformer transformer 
+          = tfactory.newTransformer(new StreamSource(QetestUtils.filenameToURL(xslID)));
+    
+        transformer.setParameter("a-param",
+                                  "hello to you!");
+    
+        // Transform the source XML to System.out.
+        reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID));
+        transformer.transform( new StreamSource(QetestUtils.filenameToURL(sourceID)),
+                               new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleTransformerReuse(1) fileChecker of:" + outNames.currentName());
+
+        transformer.setParameter("a-param",
+                                  "hello to me!");
+        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+
+        // Transform the source XML to System.out.
+        reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID));
+        transformer.transform( new StreamSource(QetestUtils.filenameToURL(sourceID)),
+                               new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleTransformerReuse(2) fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleTransformerReuse threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleTransformerReuse threw");
+    }
+  }
+
+  /**
+   * Show how to override output properties.
+   */
+  public void exampleOutputProperties(String sourceID, String xslID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        reporter.logTraceMsg("newTemplates(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+        Templates templates = tfactory.newTemplates(new StreamSource(QetestUtils.filenameToURL(xslID)));
+        Properties oprops = templates.getOutputProperties();
+
+        oprops.put(OutputKeys.INDENT, "yes");
+
+        Transformer transformer = templates.newTransformer();
+
+        transformer.setOutputProperties(oprops);
+        reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID));
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(sourceID)),
+                               new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleOutputProperties fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleOutputProperties threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleOutputProperties threw");
+    }
+  }
+
+  /**
+   * Show how to get stylesheets that are associated with a given
+   * xml document via the xml-stylesheet PI (see http://www.w3.org/TR/xml-stylesheet/).
+   */
+  public void exampleUseAssociated(String sourceID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+
+        // The DOM tfactory will have it's own way, based on DOM2, 
+        // of getting associated stylesheets.
+        if (!(tfactory instanceof SAXTransformerFactory))
+        {
+            reporter.logErrorMsg("exampleUseAssociated:Processor does not support SAX");
+            return;
+        }
+          SAXTransformerFactory stf = ((SAXTransformerFactory) tfactory);
+          reporter.logTraceMsg("getAssociatedStylesheet(new StreamSource(" + QetestUtils.filenameToURL(sourceID));
+          Source sources =
+            stf.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(sourceID)),
+              null, null, null);
+
+          if(null == sources)
+          {
+            reporter.checkFail("exampleUseAssociated:problem with source objects");
+            return;
+          }
+            Transformer transformer = tfactory.newTransformer(sources);
+
+            reporter.logTraceMsg("new StreamSource(" + QetestUtils.filenameToURL(sourceID));
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(sourceID)),
+                               new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleUseAssociated fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleUseAssociated threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleUseAssociated threw");
+    }
+  }
+  
+  /**
+   * Show the Transformer using SAX events in and DOM nodes out.
+   */
+  public void exampleContentHandler2DOM(String sourceID, String xslID)
+  {
+    try
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+
+        // Make sure the transformer factory we obtained supports both
+        // DOM and SAX.
+        if (!(tfactory.getFeature(SAXSource.FEATURE)
+            && tfactory.getFeature(DOMSource.FEATURE)))
+        {
+            reporter.logErrorMsg("exampleContentHandler2DOM:Processor does not support SAX/DOM");
+            return;
+        }
+          // We can now safely cast to a SAXTransformerFactory.
+          SAXTransformerFactory sfactory = (SAXTransformerFactory) tfactory;
+          
+          // Create an Document node as the root for the output.
+          DocumentBuilderFactory dfactory 
+            = DocumentBuilderFactory.newInstance();
+          DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+          org.w3c.dom.Document outNode = docBuilder.newDocument();
+          
+          // Create a ContentHandler that can liston to SAX events 
+          // and transform the output to DOM nodes.
+          reporter.logTraceMsg("newTransformerHandler(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+          TransformerHandler handler 
+            = sfactory.newTransformerHandler(new StreamSource(QetestUtils.filenameToURL(xslID)));
+          handler.setResult(new DOMResult(outNode));
+          
+          // Create a reader and set it's ContentHandler to be the 
+          // transformer.
+          XMLReader reader=null;
+
+          // Use JAXP1.1 ( if possible )
+          try {
+              javax.xml.parsers.SAXParserFactory factory=
+                  javax.xml.parsers.SAXParserFactory.newInstance();
+              factory.setNamespaceAware( true );
+              javax.xml.parsers.SAXParser jaxpParser=
+                  factory.newSAXParser();
+              reader=jaxpParser.getXMLReader();
+              
+          } catch( javax.xml.parsers.ParserConfigurationException ex ) {
+              throw new org.xml.sax.SAXException( ex );
+          } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) {
+              throw new org.xml.sax.SAXException( ex1.toString() );
+          } catch( NoSuchMethodError ex2 ) {
+          }
+          if( reader==null ) reader= getJAXPXMLReader();
+          reader.setContentHandler(handler);
+          reader.setProperty("http://xml.org/sax/properties/lexical-handler",
+                             handler);
+          
+          // Send the SAX events from the parser to the transformer,
+          // and thus to the DOM tree.
+          reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(sourceID));
+          reader.parse(QetestUtils.filenameToURL(sourceID));
+          
+          // Serialize the node for diagnosis.
+          //    This serializes to outNames.nextName()
+          exampleSerializeNode(outNode);
+
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleContentHandler2DOM fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleContentHandler2DOM threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleContentHandler2DOM threw");
+    }
+  }
+  
+  /**
+   * Serialize a node to System.out.
+   */
+  public void exampleSerializeNode(Node node)
+    throws TransformerException, TransformerConfigurationException, SAXException, IOException,
+    ParserConfigurationException
+  {
+    TransformerFactory tfactory = TransformerFactory.newInstance(); 
+    
+    // This creates a transformer that does a simple identity transform, 
+    // and thus can be used for all intents and purposes as a serializer.
+    Transformer serializer = tfactory.newTransformer();
+    
+    serializer.setOutputProperty(OutputKeys.INDENT, "yes");
+    serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+    serializer.transform(new DOMSource(node), 
+                         new StreamResult(outNames.nextName()));
+    reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+                    // TEST UPDATE - Caller must validate outNames.currentName()
+  }  
+  
+  /**
+   * A fuller example showing how the TrAX interface can be used 
+   * to serialize a DOM tree.
+   */
+  public void exampleAsSerializer(String sourceID, String xslID)
+  {
+    try
+    {
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+        org.w3c.dom.Document outNode = docBuilder.newDocument();
+        reporter.logTraceMsg("docBuilder.parse(new InputSource(" + QetestUtils.filenameToURL(sourceID));
+        Node doc = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(sourceID)));
+
+        TransformerFactory tfactory = TransformerFactory.newInstance(); 
+    
+        // This creates a transformer that does a simple identity transform, 
+        // and thus can be used for all intents and purposes as a serializer.
+        Transformer serializer = tfactory.newTransformer();
+    
+        Properties oprops = new Properties();
+        oprops.put("method", "html");
+        oprops.put("{http://xml.apache.org/xslt}indent-amount", "2");
+        serializer.setOutputProperties(oprops);
+        serializer.transform(new DOMSource(doc), 
+                             new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldNames.nextName()),                
+                          "exampleAsSerializer fileChecker of:" + outNames.currentName());
+    } 
+    catch (Throwable t)
+    {
+        reporter.checkFail("exampleAsSerializer threw: " + t.toString());
+        reporter.logThrowable(reporter.ERRORMSG, t, "exampleAsSerializer threw");
+    }
+  }
+
+
+    /**
+     * Worker method to get an XMLReader.
+     *
+     * Not the most efficient of methods, but makes the code simpler.
+     *
+     * @return a new XMLReader for use, with setNamespaceAware(true)
+     */
+    protected XMLReader getJAXPXMLReader()
+            throws Exception
+    {
+        // Be sure to use the JAXP methods only!
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        SAXParser saxParser = factory.newSAXParser();
+        return saxParser.getXMLReader();
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by ExamplesTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+
+        ExamplesTest app = new ExamplesTest();
+
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/LoggingErrorListener.java b/test/java/src/org/apache/qetest/trax/LoggingErrorListener.java
new file mode 100644
index 0000000..41fefcd
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/LoggingErrorListener.java
@@ -0,0 +1,415 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingErrorListener.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.TransformerException;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+
+/**
+ * Cheap-o ErrorListener for use by API tests.
+ * <p>Implements javax.xml.transform.ErrorListener and dumps 
+ * everything to a Logger; is separately settable as 
+ * to when it will throw an exception; also separately settable 
+ * as to when we should validate specific events that we handle.</p>
+ * //@todo try calling getLocator() and asking it for info directly
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingErrorListener extends LoggingHandler implements ErrorListener
+{
+
+    /** No-op ctor seems useful. */
+    public LoggingErrorListener()
+    {
+        setLogger(getDefaultLogger());
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param l Logger we should log to
+     */
+    public LoggingErrorListener(Logger l)
+    {
+        setLogger(l);
+    }
+
+
+    /** 
+     * Constants determining when we should throw exceptions.
+     * <ul>Flags are combineable like a bitfield.
+     * <li>THROW_NEVER - never ever (always continue - note this 
+     * may have unexpected effects when fatalErrors happen, see 
+     * {@link javax.xml.transform.ErrorListener#fatalError(javax.xml.transform.TransformerException)}</li>
+     * <li>THROW_ON_WARNING - throw only on warnings</li>
+     * <li>THROW_ON_ERROR - throw only on errors</li>
+     * <li>THROW_ON_FATAL - throw only on fatalErrors - default</li>
+     * <li>THROW_ALWAYS - always throw exceptions</li>
+     * </ul>
+     */
+    public static final int THROW_NEVER = 0;
+
+    /** THROW_ON_WARNING - throw only on warnings.  */
+    public static final int THROW_ON_WARNING = 1;
+
+    /** THROW_ON_ERROR - throw only on errors.  */
+    public static final int THROW_ON_ERROR = 2;
+
+    /** THROW_ON_FATAL - throw only on fatalErrors - default.  */
+    public static final int THROW_ON_FATAL = 4;
+
+    /** THROW_ALWAYS - always throw exceptions.   */
+    public static final int THROW_ALWAYS = THROW_ON_WARNING & THROW_ON_ERROR
+                                           & THROW_ON_FATAL;
+
+    /** If we should throw an exception for each message type. */
+    protected int throwWhen = THROW_ON_FATAL;
+
+    /**
+     * Tells us when we should re-throw exceptions.  
+     *
+     * @param t THROW_WHEN_* constant as to when we should re-throw 
+     * an exception when we are called
+     */
+    public void setThrowWhen(int t)
+    {
+        throwWhen = t;
+    }
+
+    /**
+     * Tells us when we should re-throw exceptions.  
+     *
+     * @return THROW_WHEN_* constant as to when we should re-throw 
+     * an exception when we are called
+     */
+    public int getThrowWhen()
+    {
+        return throwWhen;
+    }
+
+    /** Constant for items returned in getCounters: messages.  */
+    public static final int TYPE_WARNING = 0;
+
+    /** Constant for items returned in getCounters: errors.  */
+    public static final int TYPE_ERROR = 1;
+
+    /** Constant for items returned in getCounters: fatalErrors.  */
+    public static final int TYPE_FATALERROR = 2;
+
+    /** 
+     * Counters for how many events we've handled.  
+     * Index into array are the TYPE_* constants.
+     */
+    protected int[] counters = 
+    {
+        0, /* warning */
+        0, /* error */
+        0  /* fatalError */
+    };
+
+
+    /**
+     * Get a list of counters of all items we've logged.
+     * Returned as warnings, errors, fatalErrors
+     * Index into array are the TYPE_* constants.
+     *
+     * @return array of int counters for each item we log
+     */
+    public int[] getCounters()
+    {
+        return counters;
+    }
+
+    /** Prefixed to all logger msg output. */
+    public static final String prefix = "LEL:";
+
+
+    /**
+     * Really Cheap-o string representation of our state.  
+     *
+     * @return String of getCounters() rolled up in minimal space
+     */
+    public String getQuickCounters()
+    {
+        return (prefix + "(" + counters[TYPE_WARNING] + ", "
+                + counters[TYPE_ERROR] + ", " + counters[TYPE_FATALERROR] + ")");
+    }
+
+
+    /** Cheap-o string representation of last warn/error/fatal we got. */
+    protected String lastItem = NOTHING_HANDLED;
+
+    /**
+     * Sets a String representation of last item we handled. 
+     *
+     * @param s set into lastItem for retrieval with getLast()
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+    /**
+     * Get a string representation of last item we logged.  
+     *
+     * @return String of the last item handled
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+
+    /** Expected values for events we may handle, default=ITEM_DONT_CARE. */
+    protected String[] expected = 
+    {
+        ITEM_DONT_CARE, /* warning */
+        ITEM_DONT_CARE, /* error */
+        ITEM_DONT_CARE  /* fatalError */
+    };
+
+
+    /**
+     * Ask us to report checkPass/Fail for certain events we handle.
+     * Since we may have to handle many events between when a test 
+     * will be able to call us, testers can set this to have us 
+     * automatically call checkPass when we see an item that matches, 
+     * or to call checkFail when we get an unexpected item.
+     * Generally, we only call check* methods when:
+     * <ul>
+     * <li>containsString is not set, reset, or is ITEM_DONT_CARE, 
+     * we do nothing (i.e. never call check* for this item)</li>
+     * <li>containsString is ITEM_CHECKFAIL, we will always call 
+     * checkFail with the contents of any item if it occours</li>
+     * <li>containsString is anything else, we will grab a String 
+     * representation of every item of that type that comes along, 
+     * and if the containsString is found, case-sensitive, within 
+     * the handled item's string, call checkPass, otherwise 
+     * call checkFail</li>
+     * <ul>
+     * Note that any time we handle a particular event that was 
+     * expected, we un-set the expected value for that item.  This 
+     * means that you can only ask us to validate one occourence 
+     * of any particular event; all events after that one will 
+     * be treated as ITEM_DONT_CARE.  Callers can of course call 
+     * setExpected again, of course, but this covers the case where 
+     * we handle multiple events in a single block, perhaps out of 
+     * the caller's direct control. 
+     * Note that we first store the event via setLast(), then we 
+     * validate the event as above, and then we potentially 
+     * re-throw the exception as by setThrowWhen().
+     *
+     * @param itemType which of the various types of items we might 
+     * handle; should be defined as a constant by subclasses
+     * @param containsString a string to look for within whatever 
+     * item we handle - usually checked for by seeing if the actual 
+     * item we handle contains the containsString
+     */
+    public void setExpected(int itemType, String containsString)
+    {
+        // Default to don't care on null
+        if (null == containsString)
+            containsString = ITEM_DONT_CARE;
+
+        try
+        {
+            expected[itemType] = containsString;
+        }
+        catch (ArrayIndexOutOfBoundsException aioobe)
+        {
+            // Just log it for callers reference and continue anyway
+            logger.logMsg(level, prefix + " setExpected called with illegal type:" + itemType);
+        }
+    }
+
+
+    /**
+     * Reset all items or counters we've handled.  
+     */
+    public void reset()
+    {
+        setLastItem(NOTHING_HANDLED);
+        for (int i = 0; i < counters.length; i++)
+        {
+            counters[i] = 0;
+        }
+        for (int j = 0; j < expected.length; j++)
+        {
+            expected[j] = ITEM_DONT_CARE;
+        }
+    }
+
+
+    /**
+     * Grab basic info out of a TransformerException.
+     * Worker method to hide implementation; currently just calls 
+     * exception.getMessageAndLocation().
+     *
+     * @param exception to get information from
+     * @return simple string describing the exception (getMessageAndLocation())
+     */
+    public String getTransformerExceptionInfo(TransformerException exception)
+    {
+
+        if (exception == null)
+            return "";  // Don't return null, just to make other code here simpler
+
+        return exception.getMessageAndLocation();
+    }
+
+
+    /**
+     * Implementation of warning; calls logMsg with info contained in exception.
+     *
+     * @param exception provided by Transformer
+     * @exception TransformerException thrown only if asked to or if loggers are bad
+     */
+    public void warning(TransformerException exception) throws TransformerException
+    {
+
+        // Increment counter and save the exception
+        counters[TYPE_WARNING]++;
+
+        String exInfo = getTransformerExceptionInfo(exception);
+
+        setLastItem(exInfo);
+
+        // Log or validate the exception
+        logOrCheck(TYPE_WARNING, "warning", exInfo);
+
+        // Also re-throw the exception if asked to
+        if ((throwWhen & THROW_ON_WARNING) == THROW_ON_WARNING)
+        {
+            // Note: re-throw the SAME exception, not a new one!
+            throw exception;
+        }
+    }
+
+    /**
+     * Implementation of error; calls logMsg with info contained in exception.
+     * Only ever throws an exception itself if asked to or if loggers are bad.
+     *
+     * @param exception provided by Transformer
+     * @exception TransformerException thrown only if asked to or if loggers are bad
+     */
+    public void error(TransformerException exception) throws TransformerException
+    {
+
+        // Increment counter, save the exception, and log what we got
+        counters[TYPE_ERROR]++;
+
+        String exInfo = getTransformerExceptionInfo(exception);
+
+        setLastItem(exInfo);
+
+        // Log or validate the exception
+        logOrCheck(TYPE_ERROR, "error", exInfo);
+
+        // Also re-throw the exception if asked to
+        if ((throwWhen & THROW_ON_ERROR) == THROW_ON_ERROR)
+        {
+            // Note: re-throw the SAME exception, not a new one!
+            throw exception;
+        }
+    }
+
+    /**
+     * Implementation of error; calls logMsg with info contained in exception.
+     * Only ever throws an exception itself if asked to or if loggers are bad.
+     * Note that this may cause unusual behavior since we may not actually
+     * re-throw the exception, even though it was 'fatal'.
+     *
+     * @param exception provided by Transformer
+     * @exception TransformerException thrown only if asked to or if loggers are bad
+     */
+    public void fatalError(TransformerException exception) throws TransformerException
+    {
+
+        // Increment counter, save the exception, and log what we got
+        counters[TYPE_FATALERROR]++;
+
+        String exInfo = getTransformerExceptionInfo(exception);
+
+        setLastItem(exInfo);
+
+        // Log or validate the exception
+        logOrCheck(TYPE_FATALERROR, "fatalError", exInfo);
+
+        // Also re-throw the exception if asked to
+        if ((throwWhen & THROW_ON_FATAL) == THROW_ON_FATAL)
+        {
+            // Note: re-throw the SAME exception, not a new one!
+            throw exception;
+        }
+    }
+
+
+    /**
+     * Worker method to either log or call check* for this event.  
+     * A simple way to validate for any kind of event.
+     *
+     * @param type of message (warning/error/fatalerror)
+     * @param desc description of this kind of message
+     * @param exInfo String representation of current exception
+     */
+    protected void logOrCheck(int type, String desc, String exInfo)
+    {
+        String tmp = getQuickCounters() + " " + desc;
+        // Either log the exception or call checkPass/checkFail 
+        //  as requested by setExpected for this type
+        if (ITEM_DONT_CARE == expected[type])
+        {
+            // We don't care about this, just log it
+            logger.logMsg(level, desc + " threw: " + exInfo);
+        }
+        else if (ITEM_CHECKFAIL == expected[type])
+        {
+            // We shouldn't have been called here, so fail
+            logger.checkFail(desc + " threw-unexpected: " + exInfo);
+        }
+        else if (exInfo.indexOf(expected[type]) > -1)
+        {   
+            // We got a warning the user expected, so pass
+            logger.checkPass(desc + " threw-matching: " + exInfo);
+            // Also reset this counter
+            //@todo needswork: this is very state-dependent, and 
+            //  might not be what the user expects, but at least it 
+            //  won't give lots of extra false fails or passes
+            expected[type] = ITEM_DONT_CARE;
+        }
+        else
+        {
+            // We got a warning the user didn't expect, so fail
+            logger.checkFail(desc + " threw-notmatching: " + exInfo);
+            // Also reset this counter
+            expected[type] = ITEM_DONT_CARE;
+        }
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/LoggingURIResolver.java b/test/java/src/org/apache/qetest/trax/LoggingURIResolver.java
new file mode 100644
index 0000000..ea3e559
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/LoggingURIResolver.java
@@ -0,0 +1,372 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingURIResolver.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.util.Hashtable;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.apache.xml.utils.SystemIDResolver;
+import org.xml.sax.InputSource;
+//-------------------------------------------------------------------------
+
+/**
+ * Implementation of URIResolver that logs all calls.
+ * Currently just provides default service; returns null.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingURIResolver extends LoggingHandler implements URIResolver
+{
+
+    /** No-op sets logger to default.  */
+    public LoggingURIResolver()
+    {
+        setLogger(getDefaultLogger());
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param l Logger we should log to
+     */
+    public LoggingURIResolver(Logger l)
+    {
+        setLogger(l);
+    }
+
+
+    /**
+     * Our default handler that we pass all events through to.
+     */
+    protected URIResolver defaultHandler = null;
+
+
+    /**
+     * Set a default handler for us to wrapper.
+     * Set a URIResolver for us to use.
+     * // Note that we don't currently have a default URIResolver, 
+     * //  so the LoggingURIResolver class will just attempt 
+     * //  to use the SystemIDResolver class instead
+     *
+     * @param default Object of the correct type to pass-through to;
+     * throws IllegalArgumentException if null or incorrect type
+     */
+    public void setDefaultHandler(Object defaultU)
+    {
+        try
+        {
+            defaultHandler = (URIResolver)defaultU;
+        }
+        catch (Throwable t)
+        {
+            throw new java.lang.IllegalArgumentException("setDefaultHandler illegal type: " + t.toString());
+        }
+    }
+
+
+    /**
+     * Accessor method for our default handler.
+     *
+     * @return default (Object) our default handler; null if unset
+     */
+    public Object getDefaultHandler()
+    {
+        return (Object)defaultHandler;
+    }
+
+
+    /** Prefixed to all logger msg output.  */
+    public static final String prefix = "LUR:";
+
+
+    /** 
+     * Counter for how many URIs we've resolved.  
+     */
+    protected int[] counters = { 0 };
+
+
+    /**
+     * Get a list of counters of all items we've logged.
+     * Only a single array item is returned.
+     *
+     * @return array of int counter for each item we log
+     */
+    public int[] getCounters()
+    {
+        return counters;
+    }
+
+
+    /**
+     * Really Cheap-o string representation of our state.  
+     *
+     * @return String of getCounters() rolled up in minimal space
+     */
+    public String getQuickCounters()
+    {
+        return (prefix + "(" + counters[0] + ")");
+    }
+
+
+    /** Cheap-o string representation of last URI we resolved.  */
+    protected String lastItem = NOTHING_HANDLED;
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @param s string to set
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @return last event string we had
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+
+    /** Expected value(s) for URIs we may resolve, default=ITEM_DONT_CARE. */
+    protected String[] expected = { ITEM_DONT_CARE };
+
+
+    /** Counter used when expected is an ordered array. */
+    protected int expectedCtr = 0;
+
+
+    /**
+     * Ask us to report checkPass/Fail for certain URIs we resolve.
+     *
+     * @param itemType ignored, we only do one type
+     * @param containsString a string to look for within whatever 
+     * item we handle - usually checked for by seeing if the actual 
+     * item we handle contains the containsString
+     */
+    public void setExpected(int itemType, String containsString)
+    {
+        // Default to don't care on null
+        if (null == containsString)
+            containsString = ITEM_DONT_CARE;
+
+        expected = new String[1];
+        expected[0] = containsString;
+    }
+
+    /**
+     * Ask us to report checkPass/Fail for an ordered list of URIs 
+     * we may resolve.
+     *
+     * Users can specify an array of expected URIs we should be 
+     * resolving in order.  Both the specific items and the exact 
+     * order must occour for us to call checkPass for each URI; 
+     * we call checkFail for any URI that doesn't match or is out 
+     * of order.  After we run off the end of the array, we 
+     * go back to the defaul of ITEM_DONT_CARE.
+     * Reset by reset(), of course.
+     *
+     * @param containsStrings[] and array of items to look for in 
+     * order: this allows you to test a stylesheet that has 
+     * three xsl:imports, for example
+     */
+    public void setExpected(String[] containsStrings)
+    {
+        // Default to don't care on null
+        if ((null == containsStrings) || (0 == containsStrings.length))
+        {
+            expected = new String[1];
+            expected[0] = ITEM_DONT_CARE;
+        }
+        else
+        {
+            expected = new String[containsStrings.length];
+            System.arraycopy(containsStrings, 0, expected, 0, containsStrings.length);
+        }
+        expectedCtr = 0;
+    }
+
+    /**
+     * Cheap-o worker method to get a string value.
+     * //@todo improve string return value
+     *
+     * @param i InputSource to get a string from
+     * @return some String representation thereof
+     */
+    private String getString(InputSource i)
+    {
+        return i.toString();
+    }
+
+
+    /**
+     * Reset all items or counters we've handled.  
+     */
+    public void reset()
+    {
+        setLastItem(NOTHING_HANDLED);
+        counters[0] = 0;
+        expected = new String[1];
+        expected[0] = ITEM_DONT_CARE;
+        expectedCtr = 0;
+    }
+
+
+    /**
+     * Worker method to either log or call check* for this event.  
+     * A simple way to validate for any kind of event.
+     *
+     * @param desc detail info from this kind of message
+     */
+    protected void checkExpected(String desc, String resolvedTo)
+    {
+        // Note the order of logging is important, which is why
+        //  we store these values and then log them later
+        final int DONT_CARE = 0;
+        final int PASS = 1;
+        final int FAIL = 2;
+        int checkResult = DONT_CARE;
+        String checkDesc = null;
+        StringBuffer extraInfo = new StringBuffer("");
+        Hashtable attrs = new Hashtable();
+        attrs.put("source", "LoggingURIResolver");
+        attrs.put("counters", getQuickCounters());
+        attrs.put("resolvedTo", resolvedTo);
+
+        String tmp = getQuickCounters() + " " + desc;
+        if (expectedCtr > expected.length)
+        {
+            // Sanity check: prevent AIOOBE 
+            expectedCtr = expected.length;
+            extraInfo.append(getQuickCounters() 
+                          + " error: array overbounds " + expectedCtr + "\n");
+        }
+        // Either log the exception or call checkPass/checkFail 
+        //  as requested by setExpected for this type
+        if (ITEM_DONT_CARE == expected[expectedCtr])
+        {
+            // We don't care about this, just log it
+            extraInfo.append("ITEM_DONT_CARE(" + expectedCtr + ") " + tmp + "\n");
+        }
+        else if (ITEM_CHECKFAIL == expected[expectedCtr])
+        {
+            // We shouldn't have been called here, so fail
+            checkResult = FAIL;
+            checkDesc = tmp + " was unexpected";
+        }
+        else if ((null != desc) 
+                  && (desc.indexOf(expected[expectedCtr]) > -1))
+        {   
+            // We got a warning the user expected, so pass
+            checkResult = PASS;
+            checkDesc = tmp + " matched";
+            // Also reset this counter
+            expected[expectedCtr] = ITEM_DONT_CARE;
+        }
+        else
+        {
+            // We got a warning the user didn't expect, so fail
+            checkResult = FAIL;
+            checkDesc = tmp + " did not match";
+            // Also reset this counter
+            expected[expectedCtr] = ITEM_DONT_CARE;
+        }
+        // If we have a list of expected items, increment
+        if (expected.length > 1)
+        {
+            expectedCtr++;
+            // If we run off the end, reset all expected
+            if (expectedCtr >= expected.length)
+            {
+                extraInfo.append("Ran off end of expected items, resetting\n");
+                expected = new String[1];
+                expected[0] = ITEM_DONT_CARE;
+                expectedCtr = 0;
+            }
+        }
+        logger.logElement(level, "loggingHandler", attrs, extraInfo);
+        if (PASS == checkResult)
+            logger.checkPass(checkDesc);
+        else if (FAIL == checkResult)
+            logger.checkFail(checkDesc);
+        // else - DONT_CARE is no-op
+    }
+
+
+    ////////////////// Implement URIResolver ////////////////// 
+    /**
+     * This will be called by the processor when it encounters
+     * an xsl:include, xsl:import, or document() function.
+     *
+     * @param href An href attribute, which may be relative or absolute.
+     * @param base The base URI in effect when the href attribute was encountered.
+     *
+     * @return A non-null Source object.
+     *
+     * @throws TransformerException
+     */
+    public Source resolve(String href, String base) 
+            throws TransformerException
+    {
+        counters[0]++;
+        setLastItem("{" + base + "}" + href);
+        // Store the source we're about to resolve - note that the 
+        //  order of logging and calling checkExpected is important
+        Source resolvedSource = null;
+        String resolvedTo = null;    
+
+        if (null != defaultHandler)
+        {
+            resolvedTo = "resolved by: " + defaultHandler;
+            resolvedSource = defaultHandler.resolve(href, base);
+        }
+        else
+        {
+            // Note that we don't currently have a default URIResolver, 
+            //  so the LoggingURIResolver class will just attempt 
+            //  to use the SystemIDResolver class instead
+            String sysId = SystemIDResolver.getAbsoluteURI(href, base);
+            resolvedTo = "resolved into new StreamSource(" + sysId + ")";
+            resolvedSource = new StreamSource(sysId);
+        }
+
+        // Call worker method to log out various info and then 
+        //  call check for us if needed
+        checkExpected(getLast(), resolvedTo);
+        return resolvedSource;
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/Minitest.java b/test/java/src/org/apache/qetest/trax/Minitest.java
new file mode 100644
index 0000000..4d0ffdd
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/Minitest.java
@@ -0,0 +1,587 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.Vector;
+
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+import org.apache.qetest.xslwrapper.TransformWrapperHelper;
+
+/**
+ * Minitest - developer check-in test for Xalan-J 2.x.  
+ *
+ * <p>Developers should always run either the minitest or smoketest 
+ * target before checking any code into the xml-xalan CVS 
+ * repository.  Running the minitest before checking in ensures 
+ * that the Xalan CVS tree will always be in a compileable and 
+ * at least basically functional state, thus ensuring a workable 
+ * product for your fellow Xalan developers.  Ensuring your code 
+ * passes the smoketest target will also help the nightly GUMP 
+ * runs to pass the smoketest as well and avoid 'nag' emails.</p>
+ *
+ * <p>If you really need to make a checkin that will temporarily 
+ * break or fail the minitest, then <b>please</b> be sure to send 
+ * email to xalan-dev@xml.apache.org letting everyone know.</p>
+ *
+ * <p>For more information, please see the 
+ * <a href="http://xml.apache.org/xalan-j/test/overview.html">
+ * testing docs</a> and the nightly 
+ * <a href="http://jakarta.apache.org/builds/gump/">
+ * GUMP build page</a>.</p>
+ *
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class Minitest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /**
+     * Basic output name root used throughout tests.
+     */
+    protected String baseOutName;
+
+    /** The Minitest.xsl/.xml file; note goldName is version-specific.  */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** The MinitestParam.xsl/.xml file.  */
+    protected XSLTestfileInfo paramFileInfo = new XSLTestfileInfo();
+
+    /** The MinitestPerf.xsl/.xml file.  */
+    protected XSLTestfileInfo perfFileInfo = new XSLTestfileInfo();
+
+
+    /** Constants matching parameter names/values in paramFileInfo.  */
+    public static final String PARAM1S = "param1s";
+    public static final String PARAM2S = "param2s";
+    public static final String PARAM1N = "param1n";
+    public static final String PARAM2N = "param2n";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public Minitest()
+    {
+        numTestCases = 5;  // REPLACE_num
+        testName = "Minitest";
+        testComment = "Minitest - developer check-in test for Xalan-J 2.x.";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files, etc.
+     *
+     * Also cleans up any Pass-Minitest.xml file that is checked 
+     * for in test.properties' minitest.passfile and generated by 
+     * Reporter.writeResultsStatus().
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     * @see Reporter.writeResultsStatus(boolean)
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in outputDir
+        File outSubDir = new File(outputDir);
+        if (!outSubDir.mkdirs())
+        {
+            if (!outSubDir.exists())
+                reporter.logErrorMsg("Problem creating output dir: " + outSubDir);
+        }
+        // Initialize an output name manager to that dir with .out extension
+        baseOutName = outputDir + File.separator + testName;
+        outNames = new OutputNameManager(baseOutName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator;
+
+        testFileInfo.inputName = testBasePath + "Minitest.xsl";
+        testFileInfo.xmlName = testBasePath + "Minitest.xml";
+        // Use separate output files for different versions, since 
+        //  some indenting rules are implemented differently 1.x/2.x
+        testFileInfo.goldName = goldBasePath + "Minitest-xalanj2.out";
+        testFileInfo.description = "General minitest, covers many xsl: elems";
+
+        paramFileInfo.inputName = testBasePath + "MinitestParam.xsl";
+        paramFileInfo.xmlName = testBasePath + "MinitestParam.xml";
+        paramFileInfo.goldName = goldBasePath + "MinitestParam.out";
+        paramFileInfo.description = "Simple string and int params";
+
+        perfFileInfo.inputName = testBasePath + "MinitestPerf.xsl";
+        perfFileInfo.xmlName = testBasePath + "MinitestPerf.xml";
+        perfFileInfo.goldName = goldBasePath + "MinitestPerf.out";
+        perfFileInfo.description = "Simple performance test";
+
+        try
+        {
+            // Clean up any Pass files for the minitest that exist
+            //@see Reporter.writeResultsStatus(boolean)
+            String logFileBase = (new File(testProps.getProperty(Logger.OPT_LOGFILE, "ResultsSummary.xml"))).getAbsolutePath();
+            logFileBase = (new File(logFileBase)).getParent();
+
+            File f = new File(logFileBase, Logger.PASS + "-" + testName + ".xml");
+            reporter.logTraceMsg("Deleting previous file: " + f);
+            f.delete();
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e, "Deleting Pass-Minitest file threw");
+            reporter.logErrorMsg("Deleting Pass-Minitest file threw: " + e.toString());
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic systemId transforms and params plus API coverage.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic systemId transforms and params plus API coverage");
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            reporter.check((templates != null), true, "factory.newTemplates(StreamSource) is non-null");
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, 
+                                  "Problem creating Templates; cannot continue testcase");
+            reporter.checkErr("Problem creating Templates; cannot continue testcase");
+            return true;
+        }
+        try
+        {
+            // Validate a systemId transform
+            reporter.logTraceMsg("Basic stream transform(1)(" + QetestUtils.filenameToURL(testFileInfo.xmlName) + ", "
+                                 + QetestUtils.filenameToURL(testFileInfo.inputName)  + ", "
+                                 + outNames.nextName());
+            transformer = templates.newTransformer();
+            FileOutputStream fos = new FileOutputStream(outNames.currentName());
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(testFileInfo.xmlName)), 
+                                  new StreamResult(fos));
+            fos.close();
+            int fileCheckStatus = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "Basic stream transform(1) into: " + outNames.currentName());
+            if (fileCheckStatus != reporter.PASS_RESULT)
+            {
+                reporter.logWarningMsg("Basic stream transform(1) into: " + outNames.currentName()
+                                       + fileChecker.getExtendedInfo());
+            }
+
+            // Validate transformer reuse
+            reporter.logTraceMsg("Basic stream transform(2)(" + QetestUtils.filenameToURL(testFileInfo.xmlName) + ", "
+                                 + QetestUtils.filenameToURL(testFileInfo.inputName)  + ", "
+                                 + outNames.nextName());
+            fos = new FileOutputStream(outNames.currentName());
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(testFileInfo.xmlName)), 
+                                  new StreamResult(fos));
+            fos.close();
+            fileCheckStatus = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "Basic stream transform(2) into: " + outNames.currentName());
+            if (fileCheckStatus != reporter.PASS_RESULT)
+            {
+                reporter.logWarningMsg("Basic stream transform(2) into: " + outNames.currentName()
+                                       + fileChecker.getExtendedInfo());
+            }
+        } 
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with simple stream transform");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with simple stream transform");
+        }
+
+        try
+        {
+            // Validate selected API's - primarily Parameters
+            Templates paramTemplates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(paramFileInfo.inputName)));
+            Transformer paramTransformer = paramTemplates.newTransformer();
+            String paramStr = "paramVal";
+            paramTransformer.setParameter(PARAM1S, paramStr);
+            reporter.logTraceMsg("Just set " + PARAM1S + " to " + paramStr);
+            Object tmp = paramTransformer.getParameter(PARAM1S);    // SPR SCUU4QWTVZ - returns an XObject - fixed
+            if (tmp == null)
+            {
+                reporter.checkFail(PARAM1S + " is still set to null!");
+            }
+            else
+            {   // Validate SPR SCUU4QWTVZ - should return the same type you set
+                if (tmp instanceof String)
+                {
+                    reporter.checkObject(tmp, paramStr, PARAM1S + " is now set to ?" + tmp + "?");
+                }
+                else
+                {
+                    reporter.checkFail(PARAM1S + " is now ?" + tmp + "?, isa " + tmp.getClass().getName());
+                }
+            }
+
+            // Verify simple re-set/get of a single parameter - new Integer
+            Integer paramInteger = new Integer(1234);
+            paramTransformer.setParameter(PARAM1S, paramInteger);   // SPR SCUU4R3JGY - can't re-set
+            reporter.logTraceMsg("Just reset " + PARAM1S + " to new Integer(99)");
+            tmp = null;
+            tmp = paramTransformer.getParameter(PARAM1S);
+            if (tmp == null)
+            {
+                reporter.checkFail(PARAM1S + " is still set to null!");
+            }
+            else
+            {   // Validate SPR SCUU4QWTVZ - should return the same type you set
+                if (tmp instanceof Integer)
+                {
+                    reporter.checkObject(tmp, paramInteger, PARAM1S + " is now set to ?" + tmp + "?");
+                }
+                else
+                {
+                    reporter.checkFail(PARAM1S + " is now ?" + tmp + "?, isa " + tmp.getClass().getName());
+                }
+            }
+            // Validate a transform with two params set
+            paramTransformer.setParameter(PARAM1N, "new-param1n-value");
+            reporter.logTraceMsg("Just reset " + PARAM1N + " to new-param1n-value");
+
+            reporter.logTraceMsg("Stream-param transform(" + QetestUtils.filenameToURL(paramFileInfo.xmlName) + ", "
+                                 + QetestUtils.filenameToURL(paramFileInfo.inputName)  + ", "
+                                 + outNames.nextName());
+            FileOutputStream fos = new FileOutputStream(outNames.currentName());
+            paramTransformer.transform(new StreamSource(QetestUtils.filenameToURL(paramFileInfo.xmlName)), 
+                                  new StreamResult(fos));
+            fos.close();
+            int fileCheckStatus = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(paramFileInfo.goldName), 
+                              "Stream transform with params into: " + outNames.currentName());
+            if (fileCheckStatus != reporter.PASS_RESULT)
+            {
+                reporter.logWarningMsg("Stream transform with params into: " + outNames.currentName()
+                                       + fileChecker.getExtendedInfo());
+            }
+            // Validate params are still set after transform
+            tmp = paramTransformer.getParameter(PARAM1S);
+            reporter.checkObject(tmp, paramInteger, PARAM1S + " is now set to ?" + tmp + "?");
+            tmp = paramTransformer.getParameter(PARAM1N);
+            reporter.checkObject(tmp, "new-param1n-value", PARAM1N + " is now set to ?" + tmp + "?");
+        } 
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with parameters");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with parameters");
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic trax.dom transformWrapper.  
+     * 
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        final String FLAVOR = "trax.dom";
+        final String DESC = "Basic " + FLAVOR + " transformWrapper";
+        reporter.testCaseInit(DESC);
+        try
+        {
+            testFileInfo.outputName = outNames.nextName();
+            transformUsingFlavor(testFileInfo, FLAVOR);
+            fileChecker.check(reporter, 
+                              new File(testFileInfo.outputName), 
+                              new File(testFileInfo.goldName), 
+                              DESC +" into: " + testFileInfo.outputName);
+        
+        } 
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, DESC + " threw: ");
+            reporter.checkErr(DESC + " threw: " + t.toString());
+        }
+        return true;
+    }
+
+
+    /**
+     * Basic trax.sax transformWrapper.  
+     * 
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        final String FLAVOR = "trax.sax";
+        final String DESC = "Basic " + FLAVOR + " transformWrapper";
+        reporter.testCaseInit(DESC);
+        try
+        {
+            testFileInfo.outputName = outNames.nextName();
+            transformUsingFlavor(testFileInfo, FLAVOR);
+            fileChecker.check(reporter, 
+                              new File(testFileInfo.outputName), 
+                              new File(testFileInfo.goldName), 
+                              DESC +" into: " + testFileInfo.outputName);
+        } 
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, DESC + " threw: ");
+            reporter.checkErr(DESC + " threw: " + t.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic trax.stream transformWrapper.  
+     * 
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase4()
+    {
+        final String FLAVOR = "trax.stream";
+        final String DESC = "Basic " + FLAVOR + " transformWrapper";
+        reporter.testCaseInit(DESC);
+        try
+        {
+            testFileInfo.outputName = outNames.nextName();
+            transformUsingFlavor(testFileInfo, FLAVOR);
+            fileChecker.check(reporter, 
+                              new File(testFileInfo.outputName), 
+                              new File(testFileInfo.goldName), 
+                              DESC +" into: " + testFileInfo.outputName);
+        } 
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, DESC + " threw: ");
+            reporter.checkErr(DESC + " threw: " + t.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic performance measurements of sample files.  
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase5()
+    {
+        String flavor = null;
+        final String DESC = "Simple performance measurement ";
+        reporter.testCaseInit(DESC);
+        // Reset the counting for outputNames for this testcase
+        outNames = new OutputNameManager(baseOutName + "Perf", ".out");
+        try
+        {
+            long[] times = null;
+            Vector streamTimes = new Vector();
+            Vector domTimes = new Vector();
+            TransformWrapper transformWrapper = null;
+
+            flavor = "trax.stream";
+            transformWrapper = TransformWrapperFactory.newWrapper(flavor);
+            transformWrapper.newProcessor(testProps);
+            reporter.logHashtable(Logger.TRACEMSG, transformWrapper.getProcessorInfo(), "wrapper.getProcessorInfo() for next transforms");
+
+            // Repeat a few times with streams
+            for (int i = 1; i <= 5; i++)
+            {
+                perfFileInfo.outputName = outNames.nextName();
+                reporter.logInfoMsg("perf-stream transform into " + perfFileInfo.outputName);
+                times = transformWrapper.transform(perfFileInfo.xmlName, perfFileInfo.inputName, perfFileInfo.outputName);
+                logPerfElem(times, perfFileInfo, flavor);
+                streamTimes.addElement(new Long(times[TransformWrapper.IDX_OVERALL]));
+            }
+            // Only bother checking the *last* iteration of perfs
+            fileChecker.check(reporter, 
+                              new File(perfFileInfo.outputName), 
+                              new File(perfFileInfo.goldName), 
+                              DESC + flavor + " into: " + perfFileInfo.outputName);
+            
+            flavor = "trax.dom";
+            transformWrapper = TransformWrapperFactory.newWrapper(flavor);
+            transformWrapper.newProcessor(testProps);
+            reporter.logHashtable(Logger.TRACEMSG, transformWrapper.getProcessorInfo(), "wrapper.getProcessorInfo() for next transforms");
+
+            // Repeat a few times with DOMs
+            for (int i = 1; i <= 5; i++)
+            {
+                perfFileInfo.outputName = outNames.nextName();
+                reporter.logInfoMsg("perf-dom transform into " + perfFileInfo.outputName);
+                times = transformWrapper.transform(perfFileInfo.xmlName, perfFileInfo.inputName, perfFileInfo.outputName);
+                logPerfElem(times, perfFileInfo, flavor);
+                domTimes.addElement(new Long(times[TransformWrapper.IDX_OVERALL]));
+            }
+            // Only bother checking the *last* iteration of perfs
+            fileChecker.check(reporter, 
+                              new File(perfFileInfo.outputName), 
+                              new File(perfFileInfo.goldName), 
+                              DESC + flavor + " into: " + perfFileInfo.outputName);
+
+            // Log a big message at the very end to make it easier to see
+            StringBuffer buf = new StringBuffer("Minitest.testCase5 PERFORMANCE NUMBERS\n");
+            buf.append("        STREAM OVERALL TIMES: ");
+            for (Enumeration elements = streamTimes.elements();
+                    elements.hasMoreElements(); /* no increment portion */ )
+            {
+                buf.append(elements.nextElement());
+                buf.append(", ");
+            }
+            buf.append("\n");
+            buf.append("           DOM OVERALL TIMES: ");
+            for (Enumeration elements = domTimes.elements();
+                    elements.hasMoreElements(); /* no increment portion */ )
+            {
+                buf.append(elements.nextElement());
+                buf.append(", ");
+            }
+            buf.append("\n");
+            reporter.logArbitrary(Logger.CRITICALMSG, buf.toString());
+        } 
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, DESC + flavor + " threw: ");
+            reporter.checkErr(DESC + flavor + " threw: " + t.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method to use a TransformWrapper to transform a file.
+     * 
+     * @param fileInfo inputName, xmlName of file to test
+     * @param flavor of TransformWrapper to use
+     * @return log number of overall millisec for transform.
+     */
+    public void transformUsingFlavor(XSLTestfileInfo fileInfo, String flavor)
+            throws Exception
+    {
+        TransformWrapper transformWrapper = TransformWrapperFactory.newWrapper(flavor);
+        transformWrapper.newProcessor(testProps);
+        reporter.logHashtable(Logger.TRACEMSG, transformWrapper.getProcessorInfo(), "wrapper.getProcessorInfo() for next transform");
+        if (null == fileInfo.inputName)
+        {
+            // presume it's an embedded test
+            reporter.logInfoMsg("transformEmbedded(" + fileInfo.xmlName + ", " + fileInfo.outputName + ")");
+            long[] times = transformWrapper.transformEmbedded(fileInfo.xmlName, fileInfo.outputName);
+            logPerfElem(times, fileInfo, flavor);
+        }
+        else
+        {
+            // presume it's a normal stylesheet test
+            reporter.logInfoMsg("transform(" + fileInfo.xmlName + ", " + fileInfo.inputName + ", " + fileInfo.outputName + ")");
+            long[] times = transformWrapper.transform(fileInfo.xmlName, fileInfo.inputName, fileInfo.outputName);
+            logPerfElem(times, fileInfo, flavor);
+        }
+        
+    }
+
+
+    /**
+     * Worker method to output a &lt;perf&gt; element.  
+     * @return false if we should abort the test; true otherwise
+     */
+    public void logPerfElem(long[] times, XSLTestfileInfo fileInfo, String flavor)
+    {
+        Hashtable attrs = new Hashtable();
+        // Add general information about this perf elem
+        attrs.put("UniqRunid", testProps.getProperty("runId", "runId;none"));
+        attrs.put("processor", flavor);
+        // idref is the individual filename
+        attrs.put("idref", (new File(fileInfo.inputName)).getName());
+        // inputName is the actual name we gave to the processor
+        attrs.put("inputName", fileInfo.inputName);
+
+        // Add all available specific timing data as well
+        for (int i = 0; i < times.length; i++)
+        {
+            // Only log items that have actual timing data
+            if (TransformWrapper.TIME_UNUSED != times[i])
+            {
+                attrs.put(TransformWrapperHelper.getTimeArrayDesc(i), 
+                          new Long(times[i]));
+            }
+        }
+
+        // Log the element out; note formatting matches
+        reporter.logElement(Logger.STATUSMSG, "perf", attrs, fileInfo.description);
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by Minitest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        Minitest app = new Minitest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/OutputPropertiesTest.java b/test/java/src/org/apache/qetest/trax/OutputPropertiesTest.java
new file mode 100644
index 0000000..f527e88
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/OutputPropertiesTest.java
@@ -0,0 +1,552 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * OutputPropertiesTest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.w3c.dom.Document;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Verify how output properties are handled from stylesheets and the API.
+ * @author shane_curcuru@lotus.com
+ * @author Krishna.Meduri@eng.sun.com
+ * @version $Id$
+ */
+public class OutputPropertiesTest extends FileBasedTest
+{
+
+    /** Used for generating names of actual output files.   */
+    protected OutputNameManager outNames;
+
+    /** Default OutputPropertiesTest.xml/xsl file pair.   */
+    protected XSLTestfileInfo htmlFileInfo = new XSLTestfileInfo();
+
+    /** xml/xsl file pair used in testlets.   */
+    protected XSLTestfileInfo testletFileInfo = new XSLTestfileInfo();
+
+    /** Alternate gold file used in testlets.   */
+    protected String citiesIndentNoGoldFile = null;
+
+    /** Alternate gold file used in testlets.   */
+    protected String citiesMethodTextGoldFile = null;
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+    /** Key for testlets to do special validation.  */
+    public static final String CROSS_VALIDATE = "validate-non-gold";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public OutputPropertiesTest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "OutputPropertiesTest";
+        testComment = "Verify how output properties are handled from stylesheets and the API";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files, etc.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Possible problem creating output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+
+        htmlFileInfo.inputName = testBasePath + "OutputPropertiesHTML.xsl";
+        htmlFileInfo.xmlName = testBasePath + "OutputPropertiesHTML.xml";
+        htmlFileInfo.goldName = goldBasePath + "OutputPropertiesHTML.out";
+
+        testletFileInfo.inputName = testBasePath + File.separator + "sax" 
+                                    + File.separator + "cities.xsl";
+        testletFileInfo.xmlName = testBasePath + File.separator + "sax" 
+                                    + File.separator + "cities.xml";
+        testletFileInfo.goldName = goldBasePath + File.separator + "sax" 
+                                    + File.separator + "cities.out";
+        citiesIndentNoGoldFile = goldBasePath + File.separator + "sax" 
+                                    + File.separator + "cities-indent-no.out";
+        citiesMethodTextGoldFile = goldBasePath + File.separator + "sax" 
+                                    + File.separator + "cities-method-text.out";
+        return true;
+    }
+
+
+    /**
+     * Verify setting output properties individually or whole blocks.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Verify setting output properties individually or whole blocks.");
+        // Simply start with Krishna's individual tests
+        testlet0(testletFileInfo.xmlName, testletFileInfo.inputName, testletFileInfo.goldName);
+        testlet1(testletFileInfo.xmlName, testletFileInfo.inputName, citiesIndentNoGoldFile);
+        testlet2(testletFileInfo.xmlName, testletFileInfo.inputName, citiesIndentNoGoldFile);
+        testlet3(testletFileInfo.xmlName, testletFileInfo.inputName, citiesMethodTextGoldFile);
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Verify various output properties with HTML.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Verify various output properties with HTML.");
+        TransformerFactory factory = null;
+        Templates templates = null;
+        try
+        {
+            // Preprocess the HTML stylesheet for later use
+            factory = TransformerFactory.newInstance();
+            reporter.logInfoMsg("creating shared newTemplates(" + QetestUtils.filenameToURL(htmlFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(htmlFileInfo.inputName)));
+            reporter.logHashtable(Logger.STATUSMSG, 
+                                  templates.getOutputProperties(), "shared templates output properties");
+
+            // Process the file once with default properties
+            Transformer transformer = templates.newTransformer();
+            Result result = new StreamResult(outNames.nextName());
+            reporter.logInfoMsg("(0)shared transform(" + QetestUtils.filenameToURL(htmlFileInfo.xmlName) 
+                                + ", " + outNames.currentName() + ")");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(htmlFileInfo.xmlName)), result);
+            // Validate the default transform
+            if
+                (Logger.PASS_RESULT 
+                 != fileChecker.check(reporter, 
+                                      new File(outNames.currentName()), 
+                                      new File(htmlFileInfo.goldName), 
+                                      "(0)shared transform into: " + outNames.currentName()
+                                      + " gold: " + htmlFileInfo.goldName)
+                )
+            {
+                reporter.logInfoMsg("(0)shared transform failure reason:" + fileChecker.getExtendedInfo());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("(0)Creating shared stylesheet threw:" + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "(0)Creating shared stylesheet threw ");
+            return true;
+        }
+
+        // Create a number of testcases and use worker method to process
+        Properties setProps = new Properties();
+        // If we reset only one property each time, the results should match
+        //  whether we set it thru properties or individually
+        setProps.put("indent", "no");
+        outputPropertyTestlet(templates, QetestUtils.filenameToURL(htmlFileInfo.xmlName), 
+                              setProps, CROSS_VALIDATE, CROSS_VALIDATE,
+                              "(1)Just reset indent=no");
+
+        setProps = new Properties();
+        setProps.put("method", "xml");
+        outputPropertyTestlet(templates, QetestUtils.filenameToURL(htmlFileInfo.xmlName), 
+                              setProps, CROSS_VALIDATE, CROSS_VALIDATE,
+                              "(2)Just reset method=xml");
+
+        // Just changing the standalone doesn't affect HTML output
+        setProps = new Properties();
+        setProps.put("standalone", "no");
+        outputPropertyTestlet(templates, QetestUtils.filenameToURL(htmlFileInfo.xmlName), 
+                              setProps, htmlFileInfo.goldName, htmlFileInfo.goldName,
+                              "(3)Just reset standalone=no");
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * outputPropertyTestlet: transform with specifically set output Properties.  
+     * Sets properties as a block and also individually, and checks 
+     * both outputs against the gold file.
+     * @author shane_curcuru@lotus.com
+     */
+    public void outputPropertyTestlet(Templates templates, String xmlId, 
+                                      Properties setProps, String goldName1, String goldName2,
+                                      String desc)
+    {
+        try
+        {
+            reporter.logHashtable(Logger.STATUSMSG, setProps,
+                                  "(-)" + desc + " begin with properties");
+            // First, set the properties as a block and transform
+            Transformer transformer1 = templates.newTransformer();
+            transformer1.setOutputProperties(setProps);
+            Result result1 = new StreamResult(outNames.nextName());
+            reporter.logTraceMsg("(-a)transform(" + xmlId + ", " + outNames.currentName() + ")");
+            transformer1.transform(new StreamSource(xmlId), result1);
+            // Only do validation if asked to
+            if (CROSS_VALIDATE == goldName1)
+            {
+                reporter.logWarningMsg("(-a-no-validation)" + desc + " into: " + outNames.currentName());
+            }
+            else if
+                (Logger.PASS_RESULT 
+                 != fileChecker.check(reporter, 
+                                      new File(outNames.currentName()), 
+                                      new File(goldName1), 
+                                      "(-a)" + desc + " into: " + outNames.currentName()
+                                      + " gold: " + goldName1)
+                )
+            {
+                reporter.logInfoMsg("(-a)" + desc + " failure reason:" + fileChecker.getExtendedInfo());
+            }
+
+            // Second, set the properties individually and transform
+            Transformer transformer2 = templates.newTransformer();
+            for (Enumeration names = setProps.propertyNames();
+                    names.hasMoreElements(); /* no increment portion */ )
+            {
+                String key = (String)names.nextElement();
+                String value = setProps.getProperty(key);
+                transformer2.setOutputProperty(key, value);
+            }
+            Result result2 = new StreamResult(outNames.nextName());
+            reporter.logTraceMsg("(-b)transform(" + xmlId + ", " + outNames.currentName() + ")");
+            transformer2.transform(new StreamSource(xmlId), result2);
+            // Only do validation if asked to
+            // If cross-validating, validate the first file against the second one
+            if (CROSS_VALIDATE == goldName2)
+            {
+                if
+                    (Logger.PASS_RESULT 
+                     != fileChecker.check(reporter, 
+                                          new File(outNames.previousName()), 
+                                          new File(outNames.currentName()), 
+                                          "(-b)" + desc + " into: " + outNames.currentName()
+                                          + " cross: " + outNames.previousName())
+                    )
+                {
+                    reporter.logInfoMsg("(-b)" + desc + " failure reason:" + fileChecker.getExtendedInfo());
+                }
+            }
+            else if
+                (Logger.PASS_RESULT 
+                 != fileChecker.check(reporter, 
+                                      new File(outNames.currentName()), 
+                                      new File(goldName2), 
+                                      "(-b)" + desc + " into: " + outNames.currentName()
+                                      + " gold: " + goldName2)
+                )
+            {
+                reporter.logInfoMsg("(-b)" + desc + " failure reason:" + fileChecker.getExtendedInfo());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("(-)" + desc + " threw:" + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "(-)" + desc + " threw ");
+        }
+    }
+
+
+    /**
+     * testlet0: transform with just stylesheet properties.  
+     * @author shane_curcuru@lotus.com
+     */
+    public void testlet0(String xmlName, String xslName, String goldName)
+    {
+        try 
+        {
+            reporter.logStatusMsg("testlet0: transform with just stylesheet properties");
+
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // sc for Xerces
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBld.parse(" + xslName + ")");
+            Document document = db.parse(new File(xslName));
+            DOMSource domSource = new DOMSource(document);
+            domSource.setSystemId(QetestUtils.filenameToURL(xslName)); // sc
+
+            TransformerFactory tfactory = TransformerFactory.newInstance();
+            Transformer transformer = tfactory.newTransformer(domSource);
+            Properties xslProps = transformer.getOutputProperties();
+            reporter.logHashtable(Logger.STATUSMSG, xslProps, 
+                                  "Properties originally from the stylesheet");
+
+            reporter.logTraceMsg("new StreamSource(new FileInputStream(" + xmlName + "))");
+            StreamSource streamSource = new StreamSource(new FileInputStream(xmlName));
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            StreamResult streamResult = new StreamResult(fos);
+
+            // Verify transform with existing properties
+            reporter.logTraceMsg("transformer.transform(xml, " + outNames.currentName() + ")");
+            transformer.transform(streamSource, streamResult);
+            fos.close();
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(goldName), 
+                                     "(t0)transform with stylesheet properties into: " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(t0)transform with stylesheet properties failure reason:" + fileChecker.getExtendedInfo());
+            }
+        } 
+        catch (Throwable t)
+        {
+            reporter.checkFail("testlet threw: " + t.toString());
+            reporter.logThrowable(Logger.WARNINGMSG, t, "testlet threw ");
+        }
+    }
+    /**
+     * testlet1: verify setOutputProperties(Properties).  
+     * @author Krishna.Meduri@eng.sun.com
+     */
+    public void testlet1(String xmlName, String xslName, String goldName)
+    {
+        try 
+        {
+            reporter.logStatusMsg("testlet1: verify setOutputProperties(Properties)");
+
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // sc for Xerces
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBld.parse(" + xslName + ")");
+            Document document = db.parse(new File(xslName));
+            DOMSource domSource = new DOMSource(document);
+            domSource.setSystemId(QetestUtils.filenameToURL(xslName)); // sc
+
+            TransformerFactory tfactory = TransformerFactory.newInstance();
+            Transformer transformer = tfactory.newTransformer(domSource);
+            Properties xslProps = transformer.getOutputProperties();
+            reporter.logHashtable(Logger.STATUSMSG, xslProps, 
+                                  "Properties originally from the stylesheet");
+
+            reporter.logTraceMsg("new StreamSource(new FileInputStream(" + xmlName + "))");
+            StreamSource streamSource = new StreamSource(new FileInputStream(xmlName));
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            StreamResult streamResult = new StreamResult(fos);
+
+            // Verify setting a whole block of properties
+            Properties properties = new Properties();
+            properties.put("method", "xml");
+            properties.put("encoding", "UTF-8");
+            properties.put("omit-xml-declaration", "no");
+            properties.put("{http://xml.apache.org/xslt}indent-amount", "0");
+            properties.put("indent", "no"); // This should override the indent=yes in the stylesheet
+            properties.put("standalone", "no");
+            properties.put("version", "1.0");
+            properties.put("media-type", "text/xml");
+            reporter.logHashtable(Logger.STATUSMSG, properties, 
+                                  "Properties block to be set via API");
+            reporter.logTraceMsg("transformer.setOutputProperties(properties block)");
+            transformer.setOutputProperties(properties);
+
+            reporter.logTraceMsg("transformer.transform(xml, " + outNames.currentName() + ")");
+            transformer.transform(streamSource, streamResult);
+            fos.close();
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(goldName), 
+                                     "(t1)transform after setOutputProperties(props) into: " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(t1)transform after setOutputProperties(props) failure reason:" + fileChecker.getExtendedInfo());
+            }
+        } 
+        catch (Throwable t)
+        {
+            reporter.checkFail("testlet threw: " + t.toString());
+            reporter.logThrowable(Logger.WARNINGMSG, t, "testlet threw ");
+        }
+    }
+
+    /**
+     * testlet2: verify setOutputProperty(s, s).  
+     * @author Krishna.Meduri@eng.sun.com
+     */
+    public void testlet2(String xmlName, String xslName, String goldName)
+    {
+        try 
+        {
+            reporter.logStatusMsg("testlet2: verify setOutputProperty(s, s)");
+
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // sc for Xerces
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBld.parse(" + xslName + ")");
+            Document document = db.parse(new File(xslName));
+            DOMSource domSource = new DOMSource(document);
+            domSource.setSystemId(QetestUtils.filenameToURL(xslName)); // sc
+
+            TransformerFactory tfactory = TransformerFactory.newInstance();
+            Transformer transformer = tfactory.newTransformer(domSource);
+            Properties xslProps = transformer.getOutputProperties();
+            reporter.logHashtable(Logger.STATUSMSG, xslProps, 
+                                  "Properties originally from the stylesheet");
+
+            reporter.logTraceMsg("new StreamSource(new FileInputStream(" + xmlName + "))");
+            StreamSource streamSource = new StreamSource(new FileInputStream(xmlName));
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            StreamResult streamResult = new StreamResult(fos);
+
+            // Verify setting a whole block of properties
+            reporter.logTraceMsg("transformer.setOutputProperty(indent, no)");
+            transformer.setOutputProperty("indent", "no");
+
+            reporter.logTraceMsg("transformer.transform(xml, " + outNames.currentName() + ")");
+            transformer.transform(streamSource, streamResult);
+            fos.close();
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(goldName), 
+                                     "(t2)transform after setOutputProperty(indent, no) into: " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(t2)transform after setOutputProperty(indent, no) failure reason:" + fileChecker.getExtendedInfo());
+            }
+        } 
+        catch (Throwable t)
+        {
+            reporter.checkFail("testlet threw: " + t.toString());
+            reporter.logThrowable(Logger.WARNINGMSG, t, "testlet threw ");
+        }
+    }
+    /**
+     * testlet1: verify setOutputProperty(s, s).  
+     * @author Krishna.Meduri@eng.sun.com
+     */
+    public void testlet3(String xmlName, String xslName, String goldName)
+    {
+        try 
+        {
+            reporter.logInfoMsg("testlet3: verify setOutputProperty(s, s)");
+
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // sc for Xerces
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBld.parse(" + xslName + ")");
+            Document document = db.parse(new File(xslName));
+            DOMSource domSource = new DOMSource(document);
+            domSource.setSystemId(QetestUtils.filenameToURL(xslName)); // sc
+
+            TransformerFactory tfactory = TransformerFactory.newInstance();
+            Transformer transformer = tfactory.newTransformer(domSource);
+            Properties xslProps = transformer.getOutputProperties();
+            reporter.logHashtable(Logger.STATUSMSG, xslProps, 
+                                  "Properties originally from the stylesheet");
+
+            reporter.logTraceMsg("new StreamSource(new FileInputStream(" + xmlName + "))");
+            StreamSource streamSource = new StreamSource(new FileInputStream(xmlName));
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            StreamResult streamResult = new StreamResult(fos);
+
+            // Verify setting single property
+            reporter.logTraceMsg("transformer.setOutputProperty(method, text)");
+            transformer.setOutputProperty("method", "text");
+
+            reporter.logTraceMsg("transformer.transform(xml, " + outNames.currentName() + ")");
+            transformer.transform(streamSource, streamResult);
+            fos.close();
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(outNames.currentName()), 
+                                     new File(goldName), 
+                                     "(t3)transform after setOutputProperty(method, text) into: " + outNames.currentName())
+               )
+            {
+                reporter.logInfoMsg("(t3)transform after setOutputProperty(method, text) failure reason:" + fileChecker.getExtendedInfo());
+            }
+        } 
+        catch (Throwable t)
+        {
+            reporter.checkFail("testlet threw: " + t.toString());
+            reporter.logThrowable(Logger.WARNINGMSG, t, "testlet threw ");
+        }
+    }
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by OutputPropertiesTest:\n"
+                + "(Note: assumes inputDir=tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+
+        OutputPropertiesTest app = new OutputPropertiesTest();
+
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/ParameterTest.java b/test/java/src/org/apache/qetest/trax/ParameterTest.java
new file mode 100644
index 0000000..0283516
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/ParameterTest.java
@@ -0,0 +1,580 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ParameterTest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Functional test of various usages of parameters in transforms.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ParameterTest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** Information about an xsl/xml file pair for transforming.  */
+    protected XSLTestfileInfo paramTest = new XSLTestfileInfo();
+
+    /** Information about an xsl/xml file pair for transforming.  */
+    protected XSLTestfileInfo paramTest2 = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public ParameterTest()
+    {
+        numTestCases = 3;  // REPLACE_num
+        testName = "ParameterTest";
+        testComment = "Functional test of various usages of parameters in transforms";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files, etc.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+
+        paramTest.inputName = QetestUtils.filenameToURL(testBasePath + "ParameterTest.xsl");
+        paramTest.xmlName = QetestUtils.filenameToURL(testBasePath + "ParameterTest.xml");
+
+        paramTest2.inputName = QetestUtils.filenameToURL(testBasePath + "ParameterTest2.xsl");
+        paramTest2.xmlName = QetestUtils.filenameToURL(testBasePath + "ParameterTest2.xml");
+        return true;
+    }
+
+
+    /** Array of test data for parameter testing.  */
+    protected String paramTests[][] = 
+    {
+        // { paramName to test,
+        //   paramValue to test
+        //   expected output string,
+        //   description of the test
+        // }
+        { 
+            "t1", 
+            "'a'",
+            "<outt>false-notset,false-blank,false-a,false-1,'a'</outt>",
+            "(10)Select expr of a 'param' string"
+        },
+        { 
+            "t1", 
+            "a",
+            "<outt>false-notset,false-blank,true-a,false-1,a</outt>",
+            "(10a)Select expr of a param string"
+        },
+        {
+            "t1", 
+            "'1'",
+            "<outt>false-notset,false-blank,false-a,false-1,'1'</outt>",
+            "(11)Select expr of a 'param' number"
+        },
+        {
+            "t1", 
+            "1",
+            "<outt>false-notset,false-blank,false-a,true-1,1</outt>",
+            "(11a)Select expr of a param number"
+        },
+        { 
+            "t1", 
+            "''",
+            "<outt>false-notset,false-blank,false-a,false-1,''</outt>",
+            "(12)Select expr of a param 'blank' string"
+        },
+        { 
+            "t1", 
+            "",
+            "<outt>false-notset,true-blank,false-a,false-1,</outt>",
+            "(12a)Select expr of a param blank string"
+        },
+        /*{ 
+            "t1", 
+            null,
+            "<outt>false-notset,false-blank,false-a,false-1,</outt>",
+            "(12b)Select expr of a null"
+        },*/
+        { 
+            "p1", 
+            "'foo'",
+            "'foo','foo';",
+            "(13)Stylesheet with literal 'param' value"
+        },
+        { 
+            "p1", 
+            "foo",
+            "foo,foo;",
+            "(13a)Stylesheet with literal param value"
+        },
+        { 
+            "p1", 
+            "'bar'",
+            "'bar','bar';",
+            "(14)Stylesheet with replaced/another literal 'param' value"
+        },
+        { 
+            "p1", 
+            "bar",
+            "bar,bar;",
+            "(14a)Stylesheet with replaced/another literal param value"
+        },
+        { 
+            "p2", 
+            "'&lt;item&gt;bar&lt;/item&gt;'",
+            "'&amp;lt;item&amp;gt;bar&amp;lt;/item&amp;gt;','&amp;lt;item&amp;gt;bar&amp;lt;/item&amp;gt;'; GHI,<B>GHI</B>; </outp>",
+            "(15)Stylesheet with 'param' value with nodes"
+        },
+        { 
+            "p2", 
+            "&lt;item&gt;bar&lt;/item&gt;",
+            "&amp;lt;item&amp;gt;bar&amp;lt;/item&amp;gt;,&amp;lt;item&amp;gt;bar&amp;lt;/item&amp;gt;;",
+            "(15a)Stylesheet with param value with nodes"
+        },
+        { 
+            "p3", 
+            "'foo3'",
+            "GHI,<B>GHI</B>;",
+            "(16)Stylesheet with literal 'param' value in a template, is not passed"
+        },
+        { 
+            "p3", 
+            "foo3",
+            "GHI,<B>GHI</B>;",
+            "(16a)Stylesheet with literal param value in a template, is not passed"
+        },
+        { 
+            "s1", 
+            "'foos'",
+            "'foos','foos';",
+            "(17)Stylesheet with literal 'param' select"
+        },
+        { 
+            "s1", 
+            "foos",
+            "foos,foos;",
+            "(17a)Stylesheet with literal param select"
+        },
+        { 
+            "s1", 
+            "'bars'",
+            "<outs>'bars','bars'; s2val,s2val; s3val,s3val; </outs>",
+            "(18)Stylesheet with replaced/another literal 'param' select"
+        },
+        { 
+            "s1", 
+            "bars",
+            "<outs>bars,bars; s2val,s2val; s3val,s3val; </outs>",
+            "(18a)Stylesheet with replaced/another literal param select"
+        },
+        { 
+            "s2", 
+            "'&lt;item/&gt;'",
+            "'&amp;lt;item/&amp;gt;','&amp;lt;item/&amp;gt;'; s3val,s3val; </outs>",
+            "(19)Stylesheet with nodes(?) 'param' select"
+        },
+        { 
+            "s2", 
+            "&lt;item/&gt;",
+            "&amp;lt;item/&amp;gt;,&amp;lt;item/&amp;gt;; s3val,s3val; </outs>",
+            "(19a)Stylesheet with nodes(?) param select"
+        },
+        { 
+            "s3", 
+            "foos3",
+            "s3val,s3val;",
+            "(20)Stylesheet with literal 'param' select in a template, is not passed"
+        },
+    }; // end of paramTests array
+
+
+    /**
+     * Setting various string-valued params.
+     * Just loops through array of simple test data.  
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Setting various simple string-valued params");
+        try
+        {
+            // Just loop through test elements and try each one
+            // Loop separately for each worker method
+            for (int i = 0; i < paramTests.length; i++)
+            {
+                // Try on a completely independent 
+                //  transformer and sources each time
+                testSetParam(paramTests[i][0], paramTests[i][1],
+                             new StreamSource(paramTest.xmlName), new StreamSource(paramTest.inputName), 
+                             paramTests[i][2], paramTests[i][3]);
+            }
+        }
+        catch (Exception e)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, e, "Testcase threw");
+            reporter.logErrorMsg("Testcase threw: " + e.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Reuse the same transformer multiple times with params set.
+     * This also reproduces Bugzilla1611
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Reuse the same transformer multiple times with params set");
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            templates = factory.newTemplates(new StreamSource(paramTest2.inputName));
+
+            // Process the file as-is, without any params set
+            transformer = templates.newTransformer();
+            reporter.logInfoMsg("Transforming " + paramTest.xmlName + " with " + paramTest2.inputName);
+            transformer.transform(new StreamSource(paramTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            // Verify the values are correct for no params set
+            checkFileContains(outNames.currentName(), "<globalVarAttr>ParameterTest.xml:</globalVarAttr>",
+                              "(2.0)Processing 1,2 w/no params into: " + outNames.currentName());
+
+            // Do NOT call clearParameters here; reuse the transformer
+            reporter.logInfoMsg("Reused-Transforming " + paramTest2.xmlName + " with " + paramTest2.inputName);
+            transformer.transform(new StreamSource(paramTest2.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            // Verify the values are correct for no params set
+            checkFileContains(outNames.currentName(), "<globalVarAttr>ParameterTest2.xml:</globalVarAttr>",
+                              "(2.0a) Bugzilla1611 Reused Transformer processing 2,2 w/no params into: " + outNames.currentName());
+
+            // Do NOT call clearParameters here; reuse the transformer again
+            reporter.logInfoMsg("Reused-Transforming-again " + paramTest.xmlName + " with " + paramTest2.inputName);
+            transformer.transform(new StreamSource(paramTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            // Verify the values are correct for no params set
+            checkFileContains(outNames.currentName(), "<globalVarAttr>ParameterTest.xml:</globalVarAttr>",
+                              "(2.0b) Bugzilla1611 Reused-Again Transformer processing 1,2 w/no params into: " + outNames.currentName());
+        }
+        catch (Exception e)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, e, "Testcase threw");
+            reporter.logErrorMsg("Testcase threw: " + e.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Setting various string-valued params and reusing transformers.
+     * Creates one transformer first, then loops through array 
+     * of simple test data re-using transformer.  
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Setting various string-valued params and re-using transformer");
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            templates = factory.newTemplates(new StreamSource(paramTest.inputName));
+        }
+        catch (Exception e)
+        {
+            reporter.checkFail("Problem creating Templates; cannot continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, e, 
+                                  "Problem creating Templates; cannot continue testcase");
+            return true;
+        }
+
+        try
+        {
+            // Process the file as-is, without any params set
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            transformer.transform(new StreamSource(paramTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            transformer.clearParameters();
+            // Verify each of the three kinds of params are correct
+            checkFileContains(outNames.currentName(), "<outp>ABC,<B>ABC</B>; DEF,<B>DEF</B>; GHI,<B>GHI</B>; </outp>",
+                              "(0) Stylesheet with default param value into: " + outNames.currentName());
+
+            checkFileContains(
+                outNames.currentName(),
+                "<outs>s1val,s1val; s2val,s2val; s3val,s3val; </outs>",
+                "(1) ... also with default param value in select expr into: " + outNames.currentName());
+            checkFileContains(
+                outNames.currentName(),
+                "<outt>true-notset,false-blank,false-a,false-1,notset</outt>",
+                "(2) ... also with default param value in select expr into: " + outNames.currentName());
+
+            // Just loop through test elements and try each one
+            for (int i = 0; i < paramTests.length; i++)
+            {
+                // Re-use the transformer from above for each test
+                transformer.clearParameters();
+                testSetParam(paramTests[i][0], paramTests[i][1],
+                             transformer, new StreamSource(paramTest.xmlName), new StreamSource(paramTest.inputName), 
+                             paramTests[i][2], paramTests[i][3]);
+            }
+        }
+        catch (Exception e)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, e, "Testcase threw");
+            reporter.logErrorMsg("Testcase threw: " + e.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Test setting a single string-valued parameter.  
+     * Uses the supplied Transformer and calls setParameter() 
+     * then transform(Source, Source), then uses the worker 
+     * method checkFileContains() to validate and output results.
+     *
+     * @param paramName simple name of parameter
+     * @param paramVal String value of parameter
+     * @param transformer object to use 
+     * @param xmlSource object to use in transform
+     * @param xslStylesheet object to use in transform
+     * @param checkString to look for in output file (logged)
+     * @param comment to log with check() call
+     * @return true if pass, false otherwise
+     */
+    protected boolean testSetParam(String paramName, String paramVal,
+                                   Transformer transformer, 
+                                   Source xmlSource, 
+                                   Source xslStylesheet, 
+                                   String checkString, String comment)
+    {
+        try
+        {
+            reporter.logTraceMsg("setParameter(" + paramName + ", " + paramVal +")");
+            transformer.setParameter(paramName, paramVal);
+            reporter.logTraceMsg("transform(" + xmlSource.getSystemId() + ", " + xslStylesheet.getSystemId() +", ...)");
+            transformer.transform(xmlSource, new StreamResult(outNames.nextName()));
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "testSetParam unexpectedly threw");
+            reporter.logErrorMsg("//@todo HACK: intermittent NPE; please report to curcuru@apache.org if you get this");
+            reporter.logErrorMsg("//@todo HACK: intermittent NPE; please report to curcuru@apache.org if you get this");
+            reporter.logErrorMsg("//@todo HACK: intermittent NPE; please report to curcuru@apache.org if you get this");
+            // Since we the NPE is intermittent, and we want the rest 
+            //  of this test in the smoketest, I'll go against my
+            //  better nature and ignore this fail
+            return true; //HACK: should be removed when fixed
+        }
+        return checkFileContains(outNames.currentName(), checkString,
+                                 "Reused:" + comment + " into: " + outNames.currentName());
+    }
+
+
+    /**
+     * Test setting a single string-valued parameter.  
+     * Creates a Transformer and calls setParameter() 
+     * then transform(Source, Source), then uses the worker 
+     * method checkFileContains() to validate and output results.
+     *
+     * @param paramName simple name of parameter
+     * @param paramVal String value of parameter
+     * @param xmlSource object to use in transform
+     * @param xslStylesheet object to use in transform
+     * @param checkString to look for in output file (logged)
+     * @param comment to log with check() call
+     * @return true if pass, false otherwise
+     */
+    protected boolean testSetParam(String paramName, String paramVal,
+                                   Source xmlSource, 
+                                   Source xslStylesheet, 
+                                   String checkString, String comment)
+    {
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            Transformer transformer = factory.newTransformer(xslStylesheet);
+            transformer.setErrorListener(new DefaultErrorHandler());
+
+            reporter.logTraceMsg("setParameter(" + paramName + ", " + paramVal +")");
+            transformer.setParameter(paramName, paramVal);
+            reporter.logTraceMsg("transform(" + xmlSource.getSystemId() + ", " + xslStylesheet.getSystemId() +", ...)");
+            transformer.transform(xmlSource, new StreamResult(outNames.nextName()));
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "testSetParam unexpectedly threw");
+        }
+        return checkFileContains(outNames.currentName(), checkString,
+                                 "New:" + comment + " into: " + outNames.currentName());
+    }
+
+
+    /**
+     * Checks and reports if a file contains a certain string 
+     * (all within one line).
+     * We should really consider validating the entire output 
+     * file, but this is the important funtionality, and it makes 
+     * maintaining the test and gold data easier (since it's all 
+     * in this file).
+     *
+     * @param fName local path/name of file to check
+     * @param checkStr String to look for in the file
+     * @param comment to log with the check() call
+     * @return true if pass, false otherwise
+     */
+    protected boolean checkFileContains(String fName, String checkStr,
+                                        String comment)
+    {
+        boolean passFail = false;
+        File f = new File(fName);
+
+        if (!f.exists())
+        {
+            reporter.checkFail("checkFileContains(" + fName
+                               + ") does not exist: " + comment);
+            return false;
+        }
+
+        try
+        {
+            InputStreamReader is = new InputStreamReader(new FileInputStream(f), "UTF-8");
+            BufferedReader br = new BufferedReader(is);
+
+            for (;;)
+            {
+                String inbuf = br.readLine();
+                if (inbuf == null)
+                    break;
+
+                if (inbuf.indexOf(checkStr) >= 0)
+                {
+                    passFail = true;
+                    reporter.logTraceMsg(
+                        "checkFileContains passes with line: " + inbuf);
+                    break;
+                }
+            }
+        }
+        catch (IOException ioe)
+        {
+            reporter.checkFail("checkFileContains(" + fName + ") threw: "
+                               + ioe.toString() + " for: " + comment);
+
+            return false;
+        }
+
+        if (!passFail)
+        {
+            reporter.logErrorMsg("checkFileContains failed to find: " + checkStr);
+        }
+        reporter.check(passFail, true, comment);
+        return passFail;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by ParameterTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        ParameterTest app = new ParameterTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/REPLACE_template_for_new_tests.java b/test/java/src/org/apache/qetest/trax/REPLACE_template_for_new_tests.java
new file mode 100644
index 0000000..2954f62
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/REPLACE_template_for_new_tests.java
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * REPLACE_template_for_new_tests.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.util.Properties;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+
+//-------------------------------------------------------------------------
+
+/**
+ * REPLACE_overall_test_comment.
+ * INSTRUCTIONS:
+ * - save as YourNewFilename,java
+ * - search-and-replace 'REPLACE_template_for_new_tests' with 'YourNewFilename'
+ * - search-and-replace all 'REPLACE_*' strings as appropriate
+ * - remove this block of comments and replace with your javadoc
+ * - implement sequentially numbered testCase1, testCase2, ... for 
+ *   each API or group or related API's
+ * - update the line: numTestCases = 2;  // REPLACE_num
+ * - execute 'build package.trax', 'traxapitest REPLACE_template_for_new_tests'
+ * - a bunch of convenience variables/initializers are included, 
+ *   use or delete as is useful
+ * @author REPLACE_authorname
+ * @version $Id$
+ */
+public class REPLACE_template_for_new_tests extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public REPLACE_template_for_new_tests()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "REPLACE_template_for_new_tests";
+        testComment = "REPLACE_overall_test_comment";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * REPLACE_other_test_file_init.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // NOTE: 'reporter' variable is already initialized at this point
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+
+        testFileInfo.inputName = testBasePath + "REPLACE_xslxml_filename.xsl";
+        testFileInfo.xmlName = testBasePath + "REPLACE_xslxml_filename.xml";
+        testFileInfo.goldName = goldBasePath + "REPLACE_xslxml_filename.out";
+
+        return true;
+    }
+
+
+    /**
+     * Cleanup this test - REPLACE_other_test_file_cleanup.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Often will be a no-op
+        return true;
+    }
+
+
+    /**
+     * REPLACE_brief_description_testCase1.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("REPLACE_brief_description_testCase1");
+
+        // REPLACE_init_data_for_this_independent_test_case
+        
+        // REPLACE_call_trax_apis_here_to_use_product
+        reporter.logInfoMsg("Use reporter.log*Msg() to report information about what the test is doing, as needed");
+        // REPLACE_call_trax_apis_here_to_verify_test_point
+        reporter.check(true, true, "use reporter.check(actual, gold, description) to report test point results");
+        reporter.logTraceMsg("Multiple test points per test case are fine; results are summed automatically");
+
+        // REPLACE_cleanup_data_for_this_independent_test_case
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by REPLACE_template_for_new_tests:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "REPLACE_any_new_test_arguments\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+
+        REPLACE_template_for_new_tests app = new REPLACE_template_for_new_tests();
+
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/SystemIdImpInclTest.java b/test/java/src/org/apache/qetest/trax/SystemIdImpInclTest.java
new file mode 100644
index 0000000..883d020
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/SystemIdImpInclTest.java
@@ -0,0 +1,872 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * SystemIdImpInclTest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Test behavior of imports/includes with various setSystemId sources.  
+ * <b>Note:</b> This test is directory-dependent, so if there are 
+ * any fails, check the code to see what the test file is expecting 
+ * the path/directory/etc. to be.
+ * //@todo More variations on kinds of systemIds: file: id's that 
+ * are absolute, etc.; any/all other forms of id's like http:
+ * (which will require network resources available).
+ *
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class SystemIdImpInclTest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Name of a valid, known-good xsl/xml file pair we can use.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Just basename of a valid, known-good file, both .xsl/.xml .
+     */
+    protected String knownGoodBaseName = null;
+
+    /** Gold filename for level0, i.e. one directory above the testfile.  */
+    protected String goldFileLevel0 = "SystemIdImpInclLevel0.out";
+
+    /** Gold filename for level1, i.e. the directory of the testfile.  */
+    protected String goldFileLevel1 = "SystemIdImpInclLevel1.out";
+
+    /** Gold filename for level2, i.e. a directory below the testfile.  */
+    protected String goldFileLevel2 = "SystemIdImpInclLevel2.out";
+
+    /** Gold filename for http, i.e. a from a webserver.  */
+    protected String goldFileHttp = "SystemIdImpInclHttp.out";
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+    /** Convenience variable for user.dir - cached during test.  */
+    protected String savedUserDir = null;
+
+    /** Just initialize test name, comment, numTestCases. */
+    public SystemIdImpInclTest()
+    {
+        numTestCases = 3; // Set numTestCases to 3 to skip the 4th one that does http:
+        testName = "SystemIdImpInclTest";
+        testComment = "Test behavior of imports/includes with various setSystemId sources";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * cache user.dir property.  
+     *
+     * @param p Properties to initialize from (unused)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+
+        // Just bare pathnames, not URI's
+        knownGoodBaseName = "SystemIdImpIncl";
+        testFileInfo.inputName = testBasePath + knownGoodBaseName + ".xsl";
+        testFileInfo.xmlName = testBasePath + knownGoodBaseName + ".xml";
+        testFileInfo.goldName = goldBasePath + knownGoodBaseName + ".out";
+        goldFileLevel0 = goldBasePath + goldFileLevel0; // just prepend path
+        goldFileLevel1 = goldBasePath + goldFileLevel1; // just prepend path
+        goldFileLevel2 = goldBasePath + goldFileLevel2; // just prepend path
+        goldFileHttp = goldBasePath + goldFileHttp; // just prepend path
+
+        // Cache user.dir property
+        savedUserDir = System.getProperty("user.dir");
+        reporter.logHashtable(Logger.STATUSMSG, System.getProperties(), "System.getProperties()");
+        reporter.logHashtable(Logger.STATUSMSG, testProps, "testProps");
+
+        return true;
+    }
+
+
+    /**
+     * Cleanup this test - uncache user.dir property.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Uncache user.dir property
+        System.getProperties().put("user.dir", savedUserDir);
+        return true;
+    }
+
+
+    /**
+     * Simple StreamSources with different setSystemIds.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Simple StreamSources with different setSystemIds");
+
+        TransformerFactory factory = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            return true;
+        }
+        try
+        {
+            // Verify we can do basic transforms with readers/streams,
+            //  with the 'normal' systemId
+            reporter.logInfoMsg("StreamSource.setSystemId(level1)");
+            InputStream xslStream1 = new FileInputStream(testFileInfo.inputName);
+            Source xslSource1 = new StreamSource(xslStream1);
+            xslSource1.setSystemId(QetestUtils.filenameToURL(testFileInfo.inputName));
+            
+            InputStream xmlStream1 = new FileInputStream(testFileInfo.xmlName);
+            Source xmlSource1 = new StreamSource(xmlStream1);
+            xmlSource1.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            FileOutputStream fos1 = new FileOutputStream(outNames.currentName());
+            Result result1 = new StreamResult(fos1);
+
+            Templates templates1 = factory.newTemplates(xslSource1);
+            Transformer transformer1 = templates1.newTransformer();
+            reporter.logInfoMsg("About to transform, systemId(level1)");
+            transformer1.transform(xmlSource1, result1);
+            fos1.close(); // must close ostreams we own
+            if (Logger.PASS_RESULT
+                != fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldFileLevel1), 
+                              "transform after setSystemId(level1) into " + outNames.currentName())
+               )
+                reporter.logInfoMsg("transform after setSystemId(level1)... failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with setSystemId(level1)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with after setSystemId(level1)");
+        }
+
+        try
+        {
+            // Verify we can do basic transforms with readers/streams,
+            //  systemId set up one level
+            reporter.logInfoMsg("StreamSource.setSystemId(level0)");
+            InputStream xslStream1 = new FileInputStream(testFileInfo.inputName);
+            Source xslSource1 = new StreamSource(xslStream1);
+            xslSource1.setSystemId(QetestUtils.filenameToURL(inputDir + File.separator + knownGoodBaseName + ".xsl"));
+            
+            InputStream xmlStream1 = new FileInputStream(testFileInfo.xmlName);
+            Source xmlSource1 = new StreamSource(xmlStream1);
+            xmlSource1.setSystemId(QetestUtils.filenameToURL(inputDir + File.separator + knownGoodBaseName + ".xml"));
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            FileOutputStream fos1 = new FileOutputStream(outNames.currentName());
+            Result result1 = new StreamResult(fos1);
+
+            Templates templates1 = factory.newTemplates(xslSource1);
+            Transformer transformer1 = templates1.newTransformer();
+            reporter.logInfoMsg("About to transform, systemId(level0)");
+            transformer1.transform(xmlSource1, result1);
+            fos1.close(); // must close ostreams we own
+            if (Logger.PASS_RESULT
+                != fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldFileLevel0), 
+                              "transform after setSystemId(level0) into " + outNames.currentName())
+               )
+                reporter.logInfoMsg("transform after setSystemId(level0)... failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with setSystemId(level0)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with setSystemId(level0)");
+        }
+
+        try
+        {
+            // Verify we can do basic transforms with readers/streams,
+            //  with the systemId down one level
+            reporter.logInfoMsg("StreamSource.setSystemId(level2)");
+            InputStream xslStream1 = new FileInputStream(testFileInfo.inputName);
+            Source xslSource1 = new StreamSource(xslStream1);
+            xslSource1.setSystemId(QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + knownGoodBaseName + ".xsl"));
+            
+            InputStream xmlStream1 = new FileInputStream(testFileInfo.xmlName);
+            Source xmlSource1 = new StreamSource(xmlStream1);
+            xmlSource1.setSystemId(QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + knownGoodBaseName + ".xml"));
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            FileOutputStream fos1 = new FileOutputStream(outNames.currentName());
+            Result result1 = new StreamResult(fos1);
+
+            Templates templates1 = factory.newTemplates(xslSource1);
+            Transformer transformer1 = templates1.newTransformer();
+            reporter.logInfoMsg("About to transform, systemId(level2)");
+            transformer1.transform(xmlSource1, result1);
+            fos1.close(); // must close ostreams we own
+            if (Logger.PASS_RESULT
+                != fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldFileLevel2), 
+                              "transform after setSystemId(level2) into " + outNames.currentName())
+               )
+                reporter.logInfoMsg("transform after setSystemId(level2)... failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with setSystemId(level2)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with setSystemId(level2)");
+        }
+
+        try
+        {
+            // Verify we can do basic transforms with readers/streams,
+            //  with the systemId down one level
+            reporter.logInfoMsg("StreamSource.setSystemId(xslonly level2)");
+            InputStream xslStream1 = new FileInputStream(testFileInfo.inputName);
+            Source xslSource1 = new StreamSource(xslStream1);
+            xslSource1.setSystemId(QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + knownGoodBaseName + ".xsl"));
+            
+            InputStream xmlStream1 = new FileInputStream(testFileInfo.xmlName);
+            Source xmlSource1 = new StreamSource(xmlStream1);
+            // Explicitly don't set the xmlId - shouldn't be needed
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            FileOutputStream fos1 = new FileOutputStream(outNames.currentName());
+            Result result1 = new StreamResult(fos1);
+
+            Templates templates1 = factory.newTemplates(xslSource1);
+            Transformer transformer1 = templates1.newTransformer();
+            reporter.logInfoMsg("About to transform, systemId(xslonly level2)");
+            transformer1.transform(xmlSource1, result1);
+            fos1.close(); // must close ostreams we own
+            if (Logger.PASS_RESULT
+                != fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldFileLevel2), 
+                              "transform after setSystemId(xslonly level2) into " + outNames.currentName())
+               )
+                reporter.logInfoMsg("transform after setSystemId(xslonly level2)... failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with setSystemId(xslonly level2)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with setSystemId(xslonly level2)");
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Verify simple SAXSources with systemIds.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Verify simple SAXSources with systemIds");
+
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+        InputSource xslInpSrc = null;
+        Source xslSource = null;
+        Source xmlSource = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            saxFactory = (SAXTransformerFactory)factory;
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            return true;
+        }
+        try
+        {
+            // Verify basic transforms with with various systemId
+            //  and a SAXSource(InputSource(String))
+            // level0: one level up
+/********************************
+// SAXSource(impSrc(str)) level0, level2
+// Note: these cases may not be valid to test, since the setSystemId
+//  call will effectively overwrite the underlying InputSource's 
+//  real systemId, and thus the stylesheet can't be built
+//  Answer: write a custom test case that parses the stylesheet
+//  and builds it, but doesn't get imports/includes until later 
+//  when we have setSystemId
+            xslInpSrc = new InputSource(new InputStreamReader(new FileInputStream(testFileInfo.inputName), "UTF-8")); //@DEM
+//            xslInpSrc = new InputSource(new FileReader(testFileInfo.inputName));  @DEM
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + File.separator + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel0,
+                                    "SAXSource(inpSrc(str)).systemId(level0: one up)");
+********************************/
+            // level1: same systemId as actual file
+			// @DEM changes are to allow test to run on various 
+			//	platforms regardeless of encodings; force it to 
+			//	be UTF-8 since that's what's checked in
+            xslInpSrc = new InputSource(new InputStreamReader(new FileInputStream(testFileInfo.inputName), "UTF-8")); //@DEM
+//            xslInpSrc = new InputSource(new FileReader(testFileInfo.inputName));  @DEM
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(testFileInfo.inputName), 
+                                    xmlSource, goldFileLevel1,
+                                    "SAXSource(inpSrc(str)).systemId(level1: same level)");
+
+            // level2: one level down
+/********************************
+// SAXSource(impSrc(str)) level0, level2
+// Note: these cases may not be valid to test, since the setSystemId
+//  call will effectively overwrite the underlying InputSource's 
+//  real systemId, and thus the stylesheet can't be built
+//  Answer: write a custom test case that parses the stylesheet
+//  and builds it, but doesn't get imports/includes until later 
+//  when we have setSystemId
+            xslInpSrc = new InputSource(new InputStreamReader(new FileInputStream(testFileInfo.inputName), "UTF-8")); //@DEM
+//            xslInpSrc = new InputSource(new FileReader(testFileInfo.inputName));  @DEM
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel2,
+                                    "SAXSource(inpSrc(str)).systemId(level2: one down)");
+********************************/
+            reporter.logTraceMsg("@todo: add test for SAXSource with reset systemId (see code comments)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with SAXSources(1)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with SAXSources(1)");
+        }
+        try
+        {
+            // Verify basic transforms with with various systemId
+            //  and a SAXSource(InputSource(InputStream))
+            // level0: one level up
+            xslInpSrc = new InputSource(new FileInputStream(testFileInfo.inputName));
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + File.separator + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel0,
+                                    "SAXSource(inpSrc(byteS)).systemId(level0: one up)");
+
+            // level1: same systemId as actual file
+            xslInpSrc = new InputSource(new FileInputStream(testFileInfo.inputName));
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(testFileInfo.inputName), 
+                                    xmlSource, goldFileLevel1,
+                                    "SAXSource(inpSrc(byteS)).systemId(level1: same level)");
+
+            // level2: one level down
+            xslInpSrc = new InputSource(new FileInputStream(testFileInfo.inputName));
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel2,
+                                    "SAXSource(inpSrc(byteS)).systemId(level2: one down)");
+
+            // Verify basic transforms with with various systemId
+            //  and a SAXSource(InputSource(Reader))
+            // level0: one level up
+            xslInpSrc = new InputSource(new InputStreamReader(new FileInputStream(testFileInfo.inputName), "UTF-8")); //@DEM
+//            xslInpSrc = new InputSource(new FileReader(testFileInfo.inputName));  @DEM
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + File.separator + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel0,
+                                    "SAXSource(inpSrc(charS)).systemId(level0: one up)");
+
+            // level1: same systemId as actual file
+            xslInpSrc = new InputSource(new InputStreamReader(new FileInputStream(testFileInfo.inputName), "UTF-8")); //@DEM
+//            xslInpSrc = new InputSource(new FileReader(testFileInfo.inputName));  @DEM
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(testFileInfo.inputName), 
+                                    xmlSource, goldFileLevel1,
+                                    "SAXSource(inpSrc(charS)).systemId(level1: same level)");
+
+            // level2: one level down
+            xslInpSrc = new InputSource(new InputStreamReader(new FileInputStream(testFileInfo.inputName), "UTF-8")); //@DEM
+//            xslInpSrc = new InputSource(new FileReader(testFileInfo.inputName));  @DEM
+            xslSource = new SAXSource(xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel2,
+                                    "SAXSource(inpSrc(charS)).systemId(level2: one down)");
+
+            // Verify basic transforms with with various systemId
+            //  and a SAXSource(XMLReader, InputSource(various))
+            // Be sure to use the JAXP methods only!
+            SAXParserFactory spfactory = SAXParserFactory.newInstance();
+            spfactory.setNamespaceAware(true);
+            SAXParser saxParser = spfactory.newSAXParser();
+    	    XMLReader reader = saxParser.getXMLReader();
+            // level0: one level up, with a character stream
+            xslInpSrc = new InputSource(new InputStreamReader(new FileInputStream(testFileInfo.inputName), "UTF-8")); //@DEM
+//            xslInpSrc = new InputSource(new FileReader(testFileInfo.inputName));  @DEM
+            xslSource = new SAXSource(reader, xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + File.separator + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel0,
+                                    "SAXSource(reader, inpSrc(charS)).systemId(level0: one up)");
+
+            // level1: same systemId as actual file, with a systemId
+            saxParser = spfactory.newSAXParser();
+    	    reader = saxParser.getXMLReader();
+            xslInpSrc = new InputSource(testFileInfo.inputName);
+            xslSource = new SAXSource(reader, xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(testFileInfo.inputName), 
+                                    xmlSource, goldFileLevel1,
+                                    "SAXSource(reader, inpSrc(str)).systemId(level1: same level)");
+
+            // level2: one level down, with a byte stream
+            saxParser = spfactory.newSAXParser();
+    	    reader = saxParser.getXMLReader();
+            xslInpSrc = new InputSource(new FileInputStream(testFileInfo.inputName));
+            xslSource = new SAXSource(reader, xslInpSrc);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel2,
+                                    "SAXSource(reader, inpSrc(byteS)).systemId(level2: one down)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with SAXSources(2)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with SAXSources(2)");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Verify simple DOMSources with systemIds.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Verify simple DOMSources with systemIds");
+        TransformerFactory factory = null;
+        DocumentBuilderFactory dfactory = null;
+        DocumentBuilder docBuilder = null;
+        Node xslNode = null;
+        Source xslSource = null;
+        Source xmlSource = null;
+
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            return true;
+        }
+        try
+        {
+            docBuilder = dfactory.newDocumentBuilder();
+
+            // Verify basic transforms with with various systemId
+            //  and a DOMSource(InputSource(String))
+            // level0: one level up
+            reporter.logTraceMsg("about to parse(InputSource(" + QetestUtils.filenameToURL(testFileInfo.inputName) + "))");
+            xslNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            xslSource = new DOMSource(xslNode);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + File.separator + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel0,
+                                    "DOMSource(inpSrc(str)).systemId(level0: one up)");
+
+            // level1: same systemId as actual file
+            reporter.logTraceMsg("about to parse(InputSource(" + QetestUtils.filenameToURL(testFileInfo.inputName) + "))");
+            xslNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            xslSource = new DOMSource(xslNode);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(testFileInfo.inputName), 
+                                    xmlSource, goldFileLevel1,
+                                    "DOMSource(inpSrc(str)).systemId(level1: same level)");
+
+            // level2: one level down
+            reporter.logTraceMsg("about to parse(InputSource(" + QetestUtils.filenameToURL(testFileInfo.inputName) + "))");
+            xslNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            xslSource = new DOMSource(xslNode);
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + "/trax/systemid/" + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel2,
+                                    "DOMSource(inpSrc(str)).systemId(level2: one down)");
+
+            // Sample extra test: DOMSource that had systemId set 
+            //  differently in the constructor - tests that you can 
+            //  later call setSystemId and have it work
+            // level0: one level up
+            reporter.logTraceMsg("about to parse(InputSource(" + QetestUtils.filenameToURL(testFileInfo.inputName) + "))");
+            xslNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            // Set the original systemId to itself, or level1
+            xslSource = new DOMSource(xslNode, QetestUtils.filenameToURL(testFileInfo.inputName));
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            // Test it with a level0, or one level up systemId
+            checkSourceWithSystemId(xslSource, QetestUtils.filenameToURL(inputDir + File.separator + knownGoodBaseName + ".xsl"), 
+                                    xmlSource, goldFileLevel0,
+                                    "DOMSource(inpSrc(str),sysId-level1).systemId(level0: one up)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with DOMSources(1)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with DOMSources(1)");
+        }
+
+
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Verify various simple Sources with http: systemIds.
+     * Test may be commented out until we have a better way to 
+     * maintain and check for existence and correct content of 
+     * stylesheets on the http server.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase4()
+    {
+        reporter.testCaseInit("Verify various simple Sources with http: systemIds");
+
+        // This is the name of a directory on the apache server 
+        //  that has impincl\SystemIdInclude.xsl and 
+        //  impincl\SystemIdImport.xsl files on it - obviously, 
+        //  your JVM must have access to this server to successfully
+        //  run this portion of the test!
+        String httpSystemIdBase = "http://xml.apache.org/xalan-j/test";
+
+        // Verify http connectivity
+        //  If your JVM environment can't connect to the http: 
+        //  server, then we can't complete the test
+        // This could happen due to various network problems, 
+        //  not being connected, firewalls, etc.
+        try
+        {
+            reporter.logInfoMsg("verifing http connectivity before continuing testCase");
+            // Note hard-coded path to one of the two files we'll be relying on
+            URL testURL = new URL(httpSystemIdBase + "/impincl/SystemIdInclude.xsl");
+            URLConnection urlConnection = testURL.openConnection();
+            // Ensure we don't get a cached copy
+            urlConnection.setUseCaches(false);
+            // Ensure we don't get asked interactive questions
+            urlConnection.setAllowUserInteraction(false);
+            // Actually connect to the document; will throw 
+            //  IOException if anything goes wrong
+            urlConnection.connect();
+            // Convenience: log out when the doc was last modified
+            reporter.logInfoMsg(testURL.toString() + " last modified: " 
+                                  + urlConnection.getLastModified());
+            int contentLen = urlConnection.getContentLength();
+            reporter.logStatusMsg("URL.getContentLength() was: " + contentLen);
+            if (contentLen < 1)
+            {
+                // if no content, throw 'fake' exception to 
+                //  short-circut test case
+                throw new IOException("URL.getContentLength() was: " + contentLen);
+            }
+            // Also verify that the file there contains (some of) the data we expect!
+            reporter.logTraceMsg("calling urlConnection.getContent()...");
+            Object content = urlConnection.getContent();
+            if (null == content)
+            {
+                // if no content, throw 'fake' exception to 
+                //  short-circut test case
+                throw new IOException("URL.getContent() was null!");
+            }
+            reporter.logTraceMsg("getContent().toString() is now: " + content.toString());
+
+            //@todo we should also verify some key strings in the 
+            //  expected .xsl file here, if possible
+        }
+        catch (IOException ioe)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, ioe, "Can't connect threw");
+            reporter.logErrorMsg("Can't connect to: " + httpSystemIdBase 
+                                 + "/impincl/SystemIdInclude.xsl, skipping testcase");
+            reporter.checkPass("FAKE PASS RECORD; testCase was skipped");
+            // Skip the rest of the testcase
+            reporter.testCaseClose();
+            return true;
+        }
+
+
+        TransformerFactory factory = null;
+        Source xslSource = null;
+        Source xmlSource = null;
+
+        try
+        {
+            factory = TransformerFactory.newInstance();
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            return true;
+        }
+        try
+        {
+            // Verify StreamSource from local disk with a 
+            //  http: systemId for imports/includes
+            xslSource = new StreamSource(new FileInputStream(testFileInfo.inputName));
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            // Note that the systemId set (the second argument below)
+            //  must be the path to the proper 'directory' level
+            //  on the webserver: setting it to just ".../test"
+            //  will fail, since it be considered a file of that 
+            //  name, not the directory
+            checkSourceWithSystemId(xslSource, httpSystemIdBase + "/", 
+                                    xmlSource, goldFileHttp,
+                                    "StreamSource().systemId(http:)");
+
+            xslSource = new StreamSource(new FileInputStream(testFileInfo.inputName));
+
+            xmlSource = new StreamSource(new FileInputStream(testFileInfo.xmlName));
+            xmlSource.setSystemId(QetestUtils.filenameToURL(testFileInfo.xmlName));
+
+            checkSourceWithSystemId(xslSource, httpSystemIdBase + "/" + knownGoodBaseName + ".xsl", 
+                                    xmlSource, goldFileHttp,
+                                    "StreamSource().systemId(http:)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with http systemIds(1)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with http systemIds(1)");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method to test setting SystemId and doing transform.
+     * Simply does:<pre>
+     * xslSrc.setSystemId(systemId);
+     * templates = factory.newTemplates(xslSrc);
+     * transformer = templates.newTransformer();
+     * transformer.transform(xmlSrc, StreamResult(...));
+     * fileChecker.check(... goldFileName, desc)
+     * </pre>
+     * Also catches any exceptions and logs them as fails.
+     *
+     * @param xslSrc Source to use for stylesheet
+     * @param systemId systemId to set on the stylesheet
+     * @param xmlSrc Source to use for XML input data
+     * @param goldFileName name of expected file to compare with
+     * @param desc description of this test
+     */
+    public void checkSourceWithSystemId(Source xslSrc, String systemId, 
+                                        Source xmlSrc, String goldFileName,
+                                        String desc)
+    {
+        reporter.logTraceMsg(desc + " (" + systemId + ")");
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            xslSrc.setSystemId(systemId);
+
+            // Use the next available output name for result
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result outputResult = new StreamResult(fos);
+
+            Templates templates = factory.newTemplates(xslSrc);
+            Transformer transformer = templates.newTransformer();
+            transformer.transform(xmlSrc, outputResult);
+            fos.close(); // must close ostreams we own
+            if (Logger.PASS_RESULT
+                != fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldFileName), 
+                              desc + " (" + systemId + ") into: " + outNames.currentName())
+               )
+                reporter.logInfoMsg(desc + "... failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(desc + " threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, desc + " threw");
+        }
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by SystemIdImpInclTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "(Note: test is directory-dependent!)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        SystemIdImpInclTest app = new SystemIdImpInclTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/SystemIdTest.java b/test/java/src/org/apache/qetest/trax/SystemIdTest.java
new file mode 100644
index 0000000..6e04a59
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/SystemIdTest.java
@@ -0,0 +1,765 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * SystemIdTest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Test behavior of various types of systemId forms.  
+ * <b>Note:</b> This test is directory-dependent, so if there are 
+ * any fails, check the code to see what the test file is expecting 
+ * the path/directory/etc. to be.
+ * I'm also using RFC1738 as the definition of what various 
+ * systemId's should look like: the validation of this test is 
+ * a little tricky, since it's not necessarily clear exactly which 
+ * forms of file: always have to be supported by the application.
+ * (Or which forms of file: are supported by the underlying parser) 
+ * Also, we really need to write some platform-dependent tests 
+ * for this area, to account for 'c:\foo' type paths in Windows, 
+ * and for '/usr/bin' type paths in UNIX-land, as well as various 
+ * links and such (although that may be beyond the scope of what 
+ * Xalan and it's parser do, and more into testing the JDK itself).
+ *
+ * Note RFC1738 specifies that file: URL's always use 
+ *  forward slash / as a file separator
+ * ABSOLUTE-PATHS
+ * file:///e:/path/file.txt absolute path to e:/path/file.txt
+ *
+ * file://localhost/e:/path/file.txt path to e:/path/file.txt 
+ *  on localhost, but goes direct to filesystem
+ *
+ * file://otherhost/e:/path/file.txt absolute path to
+ *  otherhost, but RFC1738 doesn't actually specify the 
+ *  protocol to use to get to the other machine to actually 
+ *  get the file
+ *
+ * RELATIVE-PATHS
+ * file:e:/path/file.txt is theoretically a relative URL
+ *  w/r/t the current Base URL
+ *
+ * file:/e:/path/file.txt is theoretically a relative URL
+ *  that starts with /e:/... - not likely to be useful
+ *
+ * file://file.txt theoretically a hostname (not a filename)
+ *  with no path or file portion
+ *
+ * ILLEGAL-PATHS
+ * file://e:\path\file.txt is illegal, since RFC1738
+ *  specifically says / forward slashes
+ *
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class SystemIdTest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Name of a valid, known-good xsl/xml file pair we can use.
+     */
+    protected XSLTestfileInfo knownGoodFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Just basename of a valid, known-good file, both .xsl/.xml .
+     */
+    protected String knownGoodBaseName = null;
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+    /** Convenience variable for user.dir - cached during test.  */
+    protected String savedUserDir = null;
+
+    /** Internal flag for test that we have not yet verified expected result.  */
+    protected static final String EXPECTED_RESULT_UNKNOWN = "EXPECTED_RESULT_UNKNOWN";
+    
+    /** Internal flag for test that should return non-null (and no exceptions).  */
+    protected static final String EXPECTED_RESULT_NONNULL = "EXPECTED_RESULT_NONNULL";
+
+    /** 
+     * Internal flag for test that should do a transform.  
+     * Presumably using the systemId item you just tested and 
+     * one of our known-good test files.
+     */
+    protected static final String EXPECTED_RESULT_DOTRANSFORM = "EXPECTED_RESULT_DOTRANSFORM";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public SystemIdTest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "SystemIdTest";
+        testComment = "Test behavior of various types of systemId forms";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * cache user.dir property.  
+     *
+     * @param p Properties to initialize from (unused)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+
+        // Just bare pathnames, not URI's
+        knownGoodBaseName = testName;
+        knownGoodFileInfo.inputName = testBasePath + knownGoodBaseName + ".xsl";
+        knownGoodFileInfo.xmlName = testBasePath + knownGoodBaseName + ".xml";
+        knownGoodFileInfo.goldName = goldBasePath + knownGoodBaseName + ".out";
+
+        // Cache user.dir property
+        savedUserDir = System.getProperty("user.dir");
+        reporter.logHashtable(Logger.STATUSMSG, System.getProperties(), "System.getProperties()");
+        reporter.logHashtable(Logger.STATUSMSG, testProps, "testProps");
+
+        return true;
+    }
+
+
+    /**
+     * Cleanup this test - uncache user.dir property.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        // Uncache user.dir property
+        System.getProperties().put("user.dir", savedUserDir);
+        return true;
+    }
+
+
+    /**
+     * Test various forms of XSL and XML systemIds to see what happens.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Test various forms of XSL and XML systemIds to see what happens");
+
+        // The path the user gave us in inputDir:
+        // inputDir + "/" + TRAX_SUBDIR + "/" filename
+        String inputDirPath = inputDir.replace('\\', '/') 
+                              + "/" + TRAX_SUBDIR + "/" + knownGoodBaseName;
+        //@todo: determine what type of path inputDir itself is: 
+        //  downwards relative, upwards relative, or absolute
+
+        // Assumed correct user.dir path (should be in xml-xalan\test):
+        // System.getProperty("user.dir") + "/tests/api/" + TRAX_SUBDIR
+        // user.dir in theory should always be absolute
+        String userDirPath = System.getProperty("user.dir").replace('\\', '/')
+                             + "/tests/api/" + TRAX_SUBDIR + "/" + knownGoodBaseName;
+
+        // Verify that user.dir is in the right place relative to 
+        //  the checked-in known-good files
+        String userDirExpected = EXPECTED_RESULT_UNKNOWN;
+        File f1 = new File(userDirPath + ".xsl");
+        File f2 = new File(userDirPath + ".xml");
+        if (f1.exists() && f2.exists())
+        {
+            // The known-good files are there, so expect we can use it
+            userDirExpected = EXPECTED_RESULT_DOTRANSFORM;
+        }
+        else
+        {
+            reporter.logWarningMsg("Known good files does not appear to exist at: "
+                                   + userDirPath + ".xml/.xsl");
+        }
+
+        String xslTestIds[][] = 
+        {
+            // { systemId to test,
+            //   description of the test,
+            //   expected XSL behavior or exception, 
+            //   expected XSL inner exception, 
+            //   expected XML behavior or exception, 
+            //   expected XML inner exception
+            // }
+
+            // Test variations on the inputDir specified by the 
+            //  user, to be able to do some adhoc testing
+            { "file:///" + inputDirPath, 
+            "file:///, user-specified inputDir, /blah1[1a]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+
+            { "file://localhost/" + inputDirPath, 
+            "file://localhost/, user-specified inputDir, /blah[1b]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+
+            { inputDirPath, 
+            "Just user-specified inputDir, /blah (works normally, if relative)[1c]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+
+            // Test variations on the System user.dir; validation 
+            //  depends on if it's set correctly
+            { "file:///" + userDirPath, 
+            "file:///, System(user.dir), /blah (works normally)[2a]",
+            userDirExpected,
+            null,
+            userDirExpected,
+            null },
+
+            { "file://localhost/" + userDirPath, 
+            "file://localhost/, System(user.dir), /blah (works normally)[2b]",
+            userDirExpected,
+            null,
+            userDirExpected,
+            null },
+
+            { userDirPath, 
+            "Just System(user.dir), /blah[2c]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+
+            // Absolute path with blank . step
+            { "file:///" + System.getProperty("user.dir").replace('\\', '/') 
+                         + "/tests/./api/" + TRAX_SUBDIR + "/" + knownGoodBaseName, 
+            "file:///, System(user.dir), /./blah (???)[2d]",
+            userDirExpected,
+            null,
+            userDirExpected,
+            null },
+
+            // Absolute path with up/down steps
+            { "file:///" + System.getProperty("user.dir").replace('\\', '/') 
+                         + "/tests/../tests/api/" + TRAX_SUBDIR + "/" + knownGoodBaseName, 
+            "file:///, System(user.dir), /updir/../downdir/blah (???)[2e]",
+            userDirExpected,
+            null,
+            userDirExpected,
+            null },
+
+            // Just relative paths, should work if user.dir correct
+            // Arguable: comment out for 2.0
+            { "file:tests/api/" + TRAX_SUBDIR + "/" + knownGoodBaseName, 
+            "Just file:/blah relative path[3a]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+
+            { "tests/api/" + TRAX_SUBDIR + "/" + knownGoodBaseName, 
+            "Just /blah relative path[3b]",
+            userDirExpected,
+            null,
+            userDirExpected,
+            null },
+
+            // file://blah should be interperted as a hostname, 
+            //  not as a filename, and should fail
+            { "file://" + userDirPath, 
+            "file://, System(user.dir), /blah (causes hostname error)[4a]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+        // Comment out for 2.0 due to SPR SCUU4SUQXU
+        /*
+            "javax.xml.transform.TransformerConfigurationException", 
+            "java.net.UnknownHostException",
+            "javax.xml.transform.TransformerException", 
+            "java.net.UnknownHostException" },
+        */
+
+            { "file://" + inputDirPath, 
+            "file://, user-specified inputDir, /blah (causes hostname error)[4b]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+        // Comment out for 2.0 due to SPR SCUU4SUQXU
+        /*
+            "javax.xml.transform.TransformerConfigurationException", 
+            "java.net.UnknownHostException",
+            "javax.xml.transform.TransformerException", 
+            "java.net.UnknownHostException" },
+        */
+
+            // file://host.does.not.exist/blah should fail, here we 
+            //  can also validate the error message completely
+            { "file://this.host.does.not.exist/" + userDirPath, 
+            "file://this.host.does.not.exist/userDir/blah (causes hostname error)[4c]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+        // Comment out for 2.0 due to SPR SCUU4SUQXU
+        /*
+            "javax.xml.transform.TransformerConfigurationException: this.host.does.not.exist", 
+            "java.net.UnknownHostException: this.host.does.not.exist",
+            "javax.xml.transform.TransformerException: this.host.does.not.exist", 
+            "java.net.UnknownHostException" },
+        */
+
+            { "file://this.host.does.not.exist/" + inputDirPath, 
+            "file://this.host.does.not.exist/inputDir/blah (causes hostname error)[4d]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+        // Comment out for 2.0 due to SPR SCUU4SUQXU
+        /*
+            "javax.xml.transform.TransformerConfigurationException: this.host.does.not.exist", 
+            "java.net.UnknownHostException: this.host.does.not.exist",
+            "javax.xml.transform.TransformerException: this.host.does.not.exist", 
+            "java.net.UnknownHostException" },
+        */
+            
+
+            // Too few leading slashes for the file: spec, probably error
+            { "file:/" + userDirPath, 
+            "file:/, System(user.dir), /blah (probable error)[5a]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+
+            { "file:/" + inputDirPath, 
+            "file:/, user-specified inputDir, /blah (probable error)[5b]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+
+            // No leading slashes for the file: spec, behavior is?
+            { "file:" + userDirPath, 
+            "file:, System(user.dir), /blah (probable error)[6a]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+
+            { "file:" + inputDirPath, 
+            "file:, user-specified inputDir, /blah (probable error)[6b]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+            
+
+            // Using backslashes in the path portion is explicitly
+            //  forbidden in the RFC, should give error            
+            { "file:///" + userDirPath.replace('/', '\\'),
+            "file:///, System(user.dir) \\blah, (backslashes are illegal)[7a]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null },
+            { "file:///" + inputDirPath.replace('/', '\\'),
+            "file:///, user-specified inputDir \\blah (backslashes are illegal)[7b]",
+            EXPECTED_RESULT_UNKNOWN,
+            null,
+            EXPECTED_RESULT_UNKNOWN,
+            null }
+        };
+
+        for (int i = 0; i < xslTestIds.length; i++)
+        {
+            // Loop and attempt to do newTemplates() with each
+            testNewTemplatesWithSystemId(xslTestIds[i][0] + ".xsl", xslTestIds[i][1], 
+                                         xslTestIds[i][2], xslTestIds[i][3]);
+
+            // Loop and attempt to do newTransformer() with each 
+            //  as well, since they have slightly different codepaths
+            testNewTransformerWithSystemId(xslTestIds[i][0] + ".xsl", xslTestIds[i][1], 
+                                           xslTestIds[i][2], xslTestIds[i][3]);
+
+            // Loop and attempt to do a transform of an xml 
+            //  document with each, using known-good stylesheet
+            testTransformWithSystemId(xslTestIds[i][0] + ".xml", xslTestIds[i][1], 
+                                      xslTestIds[i][4], xslTestIds[i][5]);
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Test setting various forms of systemIds to see what happens.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Test setting various forms of systemId to see what happens");
+
+        // This will have imports/includes on various levels, and then 
+        //  set the systemId of a Source to hopefully pull in the 
+        //  different imports/includes
+        reporter.checkPass("//@todo implement this testcase");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Worker method to test factory.newTemplates.
+     * Performs validation of various types based on the 
+     * expected value.
+     *
+     * @param sysId systemId of XSL to test with 
+     * @param desc description of test, used in check() calls
+     * @param expected either one of the EXPECTED_RESULT_* flags 
+     * defined in this file, or the start of a .toString of the 
+     * exception that you expect will be thrown
+     * @param innerExpected the start of a .toString of the 
+     * inner or wrapper exception that you expect will be thrown,
+     * presumably wrapped inside a TransformerException; if null, 
+     * then this is not checked for
+     * @return Templates object created as side effect
+     */
+    protected Templates testNewTemplatesWithSystemId(String sysId, String desc, 
+                                                     String expected, String innerExpected)
+    {
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        Throwable thrown = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            // Use a StreamSource with the systemId, which sets itself automatically
+            Source source = new StreamSource(sysId);
+            // Changed order of params for easier logging
+            reporter.logStatusMsg("newTemplates(" + desc + "): " + sysId + ", " + expected);
+            templates = factory.newTemplates(source);
+            reporter.logTraceMsg("newTemplates() no exceptions!");
+            // Just get the templates now for convenience, 
+            //  this implicitly tests that they're non-null
+            transformer = templates.newTransformer();
+        }
+        catch (Throwable t)
+        {
+            thrown = t;
+            reporter.logStatusMsg("newTemplates(" + desc + ") threw:" + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "newTemplates(" + desc + ") threw");
+        }
+        // Call worker method to perform actual validation
+        validateWithSystemId(sysId, desc, expected, innerExpected, thrown, transformer);
+        return templates;
+    }
+
+    /**
+     * Worker method to test factory.newTransformer.
+     * Performs validation of various types based on the 
+     * expected value.
+     *
+     * @param sysId systemId of XSL to test with 
+     * @param desc description of test, used in check() calls
+     * @param expected either one of the EXPECTED_RESULT_* flags 
+     * defined in this file, or the start of a .toString of the 
+     * exception that you expect will be thrown
+     * @param innerExpected the start of a .toString of the 
+     * inner or wrapper exception that you expect will be thrown,
+     * presumably wrapped inside a TransformerException; if null, 
+     * then this is not checked for
+     * @return Transformer object created as side effect
+     */
+    protected Transformer testNewTransformerWithSystemId(String sysId, String desc, 
+                                                         String expected, String innerExpected)
+    {
+        TransformerFactory factory = null;
+        Transformer transformer = null;
+        Throwable thrown = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            // Use a StreamSource with the systemId, which sets itself automatically
+            Source source = new StreamSource(sysId);
+            reporter.logStatusMsg("newTransformer(" + desc + "): " + sysId + ", " + expected);
+            transformer = factory.newTransformer(source);
+            reporter.logTraceMsg("newTransformer() no exceptions!");
+        }
+        catch (Throwable t)
+        {
+            thrown = t;
+            reporter.logStatusMsg("newTransformer(" + desc + ") threw:" + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "newTransformer(" + desc + ") threw");
+        }
+        // Call worker method to perform actual validation
+        validateWithSystemId(sysId, desc, expected, innerExpected, thrown, transformer);
+        return transformer;
+    }
+
+    /**
+     * Worker method to test transformer.transform().
+     * Performs validation of various types based on the 
+     * expected value, using a known-good XSL file.
+     * 
+     * @param sysId systemId of XML file to test with 
+     * @param desc description of test, used in check() calls
+     * @param expected either one of the EXPECTED_RESULT_* flags 
+     * defined in this file, or the start of a .toString of the 
+     * exception that you expect will be thrown
+     * @param innerExpected the start of a .toString of the 
+     * inner or wrapper exception that you expect will be thrown,
+     * presumably wrapped inside a TransformerException; if null, 
+     * then this is not checked for
+     */
+    protected void testTransformWithSystemId(String sysId, String desc, 
+                                             String expected, String innerExpected)
+    {
+        TransformerFactory factory = null;
+        Transformer transformer = null;
+        Throwable thrown = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            // Use a StreamSource with the known-good systemId, which sets itself automatically
+            Source source = new StreamSource(knownGoodFileInfo.inputName);
+            reporter.logStatusMsg("Transform(" + desc + "): " + sysId + ", " + expected);
+            transformer = factory.newTransformer(source);
+
+            // Always try the transform using a new StreamSource
+            reporter.logTraceMsg("About to transform(StreamSource(" + sysId + ", " + outNames.nextName() + ")");
+            transformer.transform(new StreamSource(sysId), 
+                                  new StreamResult(outNames.currentName()));
+        }
+        catch (Throwable t)
+        {
+            thrown = t;
+            reporter.logStatusMsg("Transform(" + desc + ") threw:" + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "Transform(" + desc + ") threw");
+        }
+
+        // Do our own validation since we've already done a transform implicitly
+        // Sorry for the icky if..else.. statement
+        if (EXPECTED_RESULT_UNKNOWN.equals(expected))
+        {
+            // Just log a message: no validation done
+            reporter.logWarningMsg("(" + desc + ") not validated!");
+        }
+        else if (EXPECTED_RESULT_NONNULL.equals(expected))
+        {
+            // Just validate that our object is non-null
+            reporter.check((transformer != null), true, "(" + desc + ") is non-null");
+        }
+        else if (EXPECTED_RESULT_DOTRANSFORM.equals(expected))
+        {
+            int result = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(knownGoodFileInfo.goldName), 
+                              "(" + desc + ") transform into: " + outNames.currentName());
+            if (result == reporter.FAIL_RESULT)
+                reporter.logInfoMsg("(" + desc + ") transform failure reason:" + fileChecker.getExtendedInfo());
+        }
+        else
+        {
+            // Otherwise, assume it's a string that any exception 
+            //  thrown should match the start of our message
+            validateException(sysId, desc, expected, innerExpected, thrown);
+        }
+    }
+
+
+    /**
+     * Worker method to validate either a transform or an exception.
+     *
+     * @param sysId systemId that you were testing with; used in logging 
+     * @param desc description of test, used in check() calls
+     * @param expected either one of the EXPECTED_RESULT_* flags 
+     * defined in this file, or the start of a .toString of the 
+     * exception that you expect will be thrown, only 
+     * used when expected=EXPECTED_RESULT_DOTRANSFORM
+     * @param innerExpected the start of a .toString of the 
+     * inner or wrapper exception that you expect will be thrown,
+     * presumably wrapped inside a TransformerException; if null, 
+     * then this is not checked for
+     * @param thrown any Throwable that was thrown in your operation
+     * @param transformer that was created from your operation; only 
+     * used for transform when expected=EXPECTED_RESULT_DOTRANSFORM
+     */
+    protected void validateWithSystemId(String sysId, String desc, 
+                                        String expected, String innerExpected,
+                                        Throwable thrown, 
+                                        Transformer transformer)
+    {
+        // Sorry for the icky if..else.. statement
+        if (EXPECTED_RESULT_UNKNOWN.equals(expected))
+        {
+            // Just log a message: no validation done
+            reporter.logWarningMsg("(" + desc + ") not validated!");
+        }
+        else if (EXPECTED_RESULT_NONNULL.equals(expected))
+        {
+            // Just validate that our object is non-null
+            reporter.check((transformer != null), true, "(" + desc + ") is non-null");
+        }
+        else if (EXPECTED_RESULT_DOTRANSFORM.equals(expected))
+        {
+            try
+            {
+                // First validate that our object is non-null
+                if (transformer != null)
+                {
+                    // Actually try to use the object in a transform
+                    transformer.transform(new StreamSource(QetestUtils.filenameToURL(knownGoodFileInfo.xmlName)), 
+                                          new StreamResult(outNames.nextName()));
+                    int result = fileChecker.check(reporter, 
+                                      new File(outNames.currentName()), 
+                                      new File(knownGoodFileInfo.goldName), 
+                                      "(" + desc + ") transform into: " + outNames.currentName());
+                    if (result == reporter.FAIL_RESULT)
+                        reporter.logInfoMsg("(" + desc + ") transform failure reason:" + fileChecker.getExtendedInfo());
+                }
+                else
+                {
+                    reporter.checkFail("(" + desc + ") transformer was null!");
+                }
+            }
+            catch (Throwable t)
+            {
+                reporter.checkFail("(" + desc + ") do transform threw:" + t.toString());
+                reporter.logThrowable(reporter.ERRORMSG, t, "(" + desc + ") do transform threw");
+            }
+        }
+        else
+        {
+            // Otherwise, assume it's a string that any exception 
+            //  thrown should match the start of our message
+            validateException(sysId, desc, expected, innerExpected, thrown);
+        }
+    }
+
+    /**
+     * Worker method to validate just a thrown exception.
+     *
+     * @param sysId systemId that you were testing with; currently unused? 
+     * @param desc description of test, used in check() calls
+     * @param expected the start of a .toString of the 
+     * exception that you expect will be thrown
+     * @param innerExpected the start of a .toString of the 
+     * inner or wrapper exception that you expect will be thrown,
+     * presumably wrapped inside a TransformerException; if null, 
+     * then this is not checked for
+     * @param thrown any Throwable that was thrown in your operation
+     */
+    protected void validateException(String sysId, String desc, 
+                                     String expected, String innerExpected,
+                                     Throwable thrown)
+    {
+        if (thrown == null)
+        {
+            reporter.checkFail("(" + desc + ") No exception was thrown when expected");
+        }
+        else
+        {
+            reporter.check(thrown.toString().startsWith(expected), true, "(" + desc + ") expected exception");
+            if ((innerExpected != null)
+                && (thrown instanceof TransformerException))
+            {
+                // Also validate any innerExceptions
+                Throwable inner = ((TransformerException)thrown).getException();
+                if (inner != null)
+                {
+                    reporter.check(inner.toString().startsWith(innerExpected), true, "(" + desc + ") inner expected exception");
+                }
+                else
+                {
+                    // User specified an innerException but none 
+                    //  was found, so fail
+                    reporter.checkFail("(" + desc + ") No innerException found like: " + innerExpected);
+                }
+            }
+        }
+    }
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by SystemIdTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "(Note: test is directory-dependent!)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        SystemIdTest app = new SystemIdTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/TemplatesAPITest.java b/test/java/src/org/apache/qetest/trax/TemplatesAPITest.java
new file mode 100644
index 0000000..61fc581
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/TemplatesAPITest.java
@@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TemplatesAPITest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Basic API coverage test for the Templates class of TRAX.
+ * @author shane_curcuru@lotus.com
+ */
+public class TemplatesAPITest extends FileBasedTest
+{
+
+    /**
+     * Cheap-o filename for various output files.
+     *
+     */
+    protected OutputNameManager outNames;
+
+    /** Cheap-o filename set for both API tests and exampleSimple. */
+    protected XSLTestfileInfo simpleTest = new XSLTestfileInfo();
+
+    /** Name of a stylesheet with xsl:output HTML. */
+    protected String outputFormatXSL = null;
+
+    /** System property name javax.xml.transform.TransformerFactory.  */
+    public static final String TRAX_PROCESSOR_XSLT = "javax.xml.transform.TransformerFactory";
+
+    /** Known outputFormat property name from outputFormatTest  */
+    public static final String OUTPUT_FORMAT_NAME = OutputKeys.CDATA_SECTION_ELEMENTS;
+
+    /** Known outputFormat property value from outputFormatTest  */
+    public static final String OUTPUT_FORMAT_VALUE = "cdataHere";
+
+    /** NEEDSDOC Field TRAX_SUBDIR          */
+    public static final String TRAX_SUBDIR = "trax";
+
+    /** Default ctor initializes test name, comment, numTestCases. */
+    public TemplatesAPITest()
+    {
+
+        numTestCases = 1;  // REPLACE_num
+        testName = "TemplatesAPITest";
+        testComment = "Basic API coverage test for the Templates class of TRAX";
+    }
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files, cache system property.  
+     *
+     * NEEDSDOC @param p
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+
+        // Used for all tests; just dump files in xapi subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: "
+                                   + outSubDir);
+
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        // Used for API coverage and exampleSimple
+        String testBasePath = inputDir + File.separator + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir + File.separator + TRAX_SUBDIR
+                              + File.separator;
+
+        simpleTest.xmlName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIParam.xml");
+        simpleTest.inputName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIParam.xsl");
+        simpleTest.goldName = goldBasePath + "TransformerAPIParam.out";
+        outputFormatXSL = QetestUtils.filenameToURL(testBasePath + "TransformerAPIOutputFormat.xsl");
+
+        reporter.logInfoMsg(TRAX_PROCESSOR_XSLT + " property is: "
+                            + System.getProperty(TRAX_PROCESSOR_XSLT));
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(StreamSource.FEATURE)
+                  && tf.getFeature(StreamResult.FEATURE)))
+            {   // The rest of this test relies on Streams
+                reporter.logErrorMsg("Streams not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * TRAX Templates: cover newTransformer(), 
+     * getOutputProperties() APIs and basic functionality.
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("TRAX Templates: cover APIs and basic functionality");
+
+        TransformerFactory factory = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+        }
+        catch (Exception e)
+        {
+            reporter.checkFail(
+                "Problem creating Processor; cannot continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, e,
+                                  "Problem creating Processor");
+            return true;
+        }
+
+        try
+        {
+            // Cover APIs newTransformer(), getOutputProperties()
+            Templates templates =
+                factory.newTemplates(new StreamSource(simpleTest.inputName));
+            Transformer transformer = templates.newTransformer();
+
+            reporter.check((transformer != null), true,
+                           "newTransformer() is non-null for "
+                           + simpleTest.inputName);
+
+            Properties outputFormat = templates.getOutputProperties();
+
+            reporter.check((outputFormat != null), true,
+                           "getOutputProperties() is non-null for "
+                           + simpleTest.inputName);
+            reporter.logHashtable(reporter.STATUSMSG, outputFormat,
+                                  "getOutputProperties for " + simpleTest.inputName);
+
+            // Check that the local stylesheet.getProperty has default set, cf. getOutputProperties javadoc
+            reporter.check(("xml".equals(outputFormat.getProperty(OutputKeys.METHOD))), true, simpleTest.inputName + ".op.getProperty(" 
+                           + OutputKeys.METHOD + ") is default value, act: " + outputFormat.getProperty(OutputKeys.METHOD));
+            // Check that the local stylesheet.get has nothing set, cf. getOutputProperties javadoc
+            reporter.check((null == outputFormat.get(OutputKeys.METHOD)), true, simpleTest.inputName + ".op.get(" 
+                           + OutputKeys.METHOD + ") is null value, act: " + outputFormat.get(OutputKeys.METHOD));
+
+            // Check that the local stylesheet.getProperty has default set, cf. getOutputProperties javadoc
+            reporter.check(("no".equals(outputFormat.getProperty(OutputKeys.INDENT))), true, simpleTest.inputName + ".op.getProperty(" 
+                           + OutputKeys.INDENT + ") is default value, act: " + outputFormat.getProperty(OutputKeys.INDENT));
+            // Check that the local stylesheet.get has nothing set, cf. getOutputProperties javadoc
+            reporter.check((null == (outputFormat.get(OutputKeys.INDENT))), true, simpleTest.inputName + ".op.get(" 
+                           + OutputKeys.INDENT + ") is null value, act: " + outputFormat.get(OutputKeys.INDENT));
+        }
+        catch (Exception e)
+        {
+            reporter.checkErr("newTransformer/getOutputProperties threw: "
+                              + e.toString());
+            reporter.logThrowable(reporter.STATUSMSG, e,
+                                  "newTransformer/getOutputProperties threw:");
+        }
+
+        try
+        {
+            Templates templates2 =
+                factory.newTemplates(new StreamSource(outputFormatXSL));
+            Properties outputFormat2 = templates2.getOutputProperties();
+
+            reporter.check((outputFormat2 != null), true,
+                           "getOutputProperties() is non-null for "
+                           + outputFormatXSL);
+            reporter.logHashtable(reporter.STATUSMSG, outputFormat2,
+                                  "getOutputProperties for " + outputFormatXSL);
+
+            String tmp = outputFormat2.getProperty(OUTPUT_FORMAT_NAME); // SPR SCUU4RXSG5 - has extra space
+            if (OUTPUT_FORMAT_VALUE.equals(tmp))    // Use if so we can put out id with checkPass/checkFail lines
+                reporter.checkPass("outputProperties " + OUTPUT_FORMAT_NAME + " has known value ?" + tmp + "?", "SCUU4RXSG5");
+            else
+                reporter.checkFail("outputProperties " + OUTPUT_FORMAT_NAME + " has known value ?" + tmp + "?", "SCUU4RXSG5");
+
+            tmp = outputFormat2.getProperty("omit-xml-declaration");
+            reporter.check(tmp, "yes", "outputProperties omit-xml-declaration has known value ?" + tmp + "?");
+        }
+        catch (Exception e)
+        {
+            reporter.checkErr("outputFormat() is html... threw: "
+                              + e.toString());
+            reporter.logThrowable(reporter.STATUSMSG, e,
+                                  "outputFormat() is html... threw:");
+        }
+        reporter.logTraceMsg("Functionality of Transformers covered in TransformerAPITest, elsewhere");
+        reporter.testCaseClose();
+
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public String usage()
+    {
+
+        return ("Common [optional] options supported by TemplatesAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "-processorClassname classname.of.processor  (to override setPlatformDefaultProcessor to Xalan 2.x)\n"
+                + super.usage());
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+
+        TemplatesAPITest app = new TemplatesAPITest();
+
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/TestMultiTypeThreads.java b/test/java/src/org/apache/qetest/trax/TestMultiTypeThreads.java
new file mode 100644
index 0000000..71b078b
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/TestMultiTypeThreads.java
@@ -0,0 +1,1013 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TestMultiTypeThreads.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Testing multiple simultaneous processors on different threads 
+ * using different processing methods with TRAX.
+ * <p>No validation of output files is currently done!  You must manually
+ * inspect any logfiles.  Most options can be passed in with a Properties file.</p>
+ * <p>Note: Most automated tests extend XSLProcessorTestBase, and 
+ * are named *Test.java.  Since we are semi-manual, we're 
+ * named Test*.java instead.</p>
+ * We assume Features.STREAM.
+ * @author shane_curcuru@lotus.com
+ */
+public class TestMultiTypeThreads
+{
+
+    /**
+     * Convenience method to print out usage information.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public static String usage()
+    {
+
+        return ("Usage: TestMultiTypeThreads [-load] file.properties :\n"
+                + "    where the properties file can set:,\n"
+                + "    inputDir=e:\\builds\\xsl-test\n"
+                + "    outputDir=e:\\builds\\xsl-test\\results\n"
+                + "    logFile=e:\\builds\\xsl-test\\results\\TestMultiTypeThreads.xml\n"
+                + "    numRunners=5\n" + "    numRunnerCalls=10\n"
+                + "    setOneFile=bool01\n" + "    setTwoFile=expr01\n"
+                + "    setThreeFile=numb01\n" + "    paramName=SomeParam\n"
+                + "    paramVal=TheValue\n");
+    }
+
+    /** NEEDSDOC Field debug          */
+    public boolean debug = true;  // for adhoc debugging
+
+    /**
+     * Number of sets of worker threads to create and loops per runner.
+     * <p>'numRunners=xx', default is 10; 'numRunnerCalls=xx', default is 50.</p>
+     */
+    protected int numRunners = 10;
+
+    /**
+     * Number of sets of worker threads to create and loops per runner.
+     * <p>'numRunners=xx', default is 10; 'numRunnerCalls=xx', default is 50.</p>
+     */
+    protected int numRunnerCalls = 50;
+
+    /**
+     * Root input filenames that certain runners should use, in the inputDir.
+     * <p>'setOneFile=File'; 'setTwoFile=File'; 'setThreeFile=File'
+     * in .prop file to set; default is TestMultiTypeThreads1, TestMultiTypeThreads2, TestMultiTypeThreads3.</p>
+     * <p>Files are found in 'inputDir=c:\bar\baz' from .prop file.</p>
+     */
+    protected String inputDir = null;
+
+    /** NEEDSDOC Field setOneFilenameRoot          */
+    protected String setOneFilenameRoot = "TestMultiTypeThreads1";
+
+    /** NEEDSDOC Field setTwoFilenameRoot          */
+    protected String setTwoFilenameRoot = "TestMultiTypeThreads2";
+
+    /** NEEDSDOC Field setThreeFilenameRoot          */
+    protected String setThreeFilenameRoot = "TestMultiTypeThreads3";
+
+    /**
+     * All output logs and files get put in the outputDir.
+     */
+    protected String outputDir = null;
+
+    /**
+     * Sample PARAM name that certain runners should use.
+     * <p>Use 'paramName=xx' in .prop file to set, default is test1.</p>
+     */
+    protected String paramName = "test1";
+
+    /**
+     * Sample PARAM value that certain runners should use.
+     * <p>Use 'paramVal=xx' in .prop file to set, default is bar.</p>
+     */
+    protected String paramVal = "bar";
+
+    /**
+     * liaisonClassName that just the *second* set of runners should use.
+     * <p>Use 'liaison=xx' in .prop file to set, default is null (whatever the processor's default is).</p>
+     */
+    protected String liaison = null;  // TRAX unused
+
+    // Used to pass info to runners; simpler to update than changing ctors
+
+    /** RunnerID offset in ctor's array initializer.   */
+    public static final int ID = 0;
+
+    /** NEEDSDOC Field XMLNAME          */
+    public static final int XMLNAME = 1;
+
+    /** NEEDSDOC Field XSLNAME          */
+    public static final int XSLNAME = 2;
+
+    /** NEEDSDOC Field OUTNAME          */
+    public static final int OUTNAME = 3;
+
+    /** NEEDSDOC Field PARAMNAME          */
+    public static final int PARAMNAME = 4;
+
+    /** NEEDSDOC Field PARAMVAL          */
+    public static final int PARAMVAL = 5;
+
+    /** NEEDSDOC Field OPTIONS          */
+    public static final int OPTIONS = 6;
+
+    /** NEEDSDOC Field LIAISON          */
+    public static final int LIAISON = 7;
+
+    /** TRANSFORM_TYPE defines which 'type' - dom, sax, streams, etc.  */
+    public static final int TRANSFORM_TYPE = 8;
+
+    /** NEEDSDOC Field FUTUREUSE          */
+    public static final int FUTUREUSE = 9;
+
+    /**
+     * Name of main file's output logging; each runner also has separate output.
+     */
+    protected String logFileName = "TestMultiTypeThreads.xml";
+
+    /**
+     * Construct multiple threads with processors and run them all.
+     * @author Shane Curcuru & Scott Boag
+     * <p>Preprocesses some stylesheets, then creates lots of worker threads.</p>
+     */
+    public void runTest()
+    {
+
+        // Prepare a log file and dump out some basic info
+        createLogFile(logFileName);
+        println("<?xml version=\"1.0\"?>");
+        println("<resultsfile logFile=\"" + logFileName + "\">");
+        println("<message desc=\"threads=" + (3 * numRunners)
+                + " iterations=" + numRunnerCalls + "\"/>");
+        println("<message desc=\"oneF=" + setOneFilenameRoot + " twof="
+                + setTwoFilenameRoot + " threef=" + setThreeFilenameRoot
+                + "\"/>");
+        println("<message desc=\"param=" + paramName + " val=" + paramVal
+                + " liaison=" + liaison + "\"/>");
+
+        // Preprocess some stylesheets for use by the runners
+        String errStr = "Create processor threw: ";
+        Templates stylesheet1, stylesheet2, stylesheet3;
+
+        try
+        {
+            String setOneURL = filenameToURI(inputDir + setOneFilenameRoot + ".xsl");
+            String setTwoURL = filenameToURI(inputDir + setTwoFilenameRoot + ".xsl");
+            String setThreeURL = filenameToURI(inputDir + setThreeFilenameRoot + ".xsl");
+
+            TransformerFactory factory = TransformerFactory.newInstance();
+
+            // Note: for now, just use StreamSources to build all stylesheets
+            errStr = "Processing stylesheet1 threw: ";
+            stylesheet1 =
+                factory.newTemplates(new StreamSource(setOneURL));
+            errStr = "Processing stylesheet2 threw: ";
+            stylesheet2 =
+                factory.newTemplates(new StreamSource(setTwoURL));
+            errStr = "Processing stylesheet3 threw: ";
+            stylesheet3 =
+                factory.newTemplates(new StreamSource(setThreeURL));
+        }
+        catch (Exception e)
+        {
+            println("<arbitrary desc=\"" + errStr + e.toString() + "\">");
+
+            if (pWriter != null)
+            {
+                e.printStackTrace(pWriter);
+            }
+
+            e.printStackTrace();
+            println("</arbitrary>");
+
+            return;
+        }
+
+        errStr = "PreCreating runners threw: ";
+
+        try
+        {
+            String[] rValues = new String[FUTUREUSE];
+
+            // Create a whole bunch of worker threads and run them
+            for (int i = 0; i < numRunners; i++)
+            {
+                TMTThreadsRunner r1, r2, r3;
+                Thread t1, t2, t3;
+                String transformType = StreamSource.FEATURE;
+
+                // Alternate sets of runners use alternate transform types
+                if ((i % 3) == 2)
+                {
+                    transformType = DOMSource.FEATURE;
+                }
+                else if ((i % 3) == 1)
+                {
+                    transformType = StreamSource.FEATURE;
+                }
+                else
+                {
+                    transformType = SAXSource.FEATURE;
+                }
+                // First set of runners reports on memory usage periodically
+                rValues[ID] = "one-" + i;
+                rValues[XMLNAME] = filenameToURI(inputDir + setOneFilenameRoot + ".xml");
+                rValues[XSLNAME] = filenameToURI(inputDir + setOneFilenameRoot + ".xsl");
+                rValues[OUTNAME] = outputDir + setOneFilenameRoot + "r" + i;
+                rValues[PARAMNAME] = paramName;
+                rValues[PARAMVAL] = paramVal;
+                rValues[OPTIONS] = "memory;param";
+                rValues[TRANSFORM_TYPE] = transformType;
+                errStr = "Creating runnerone-" + i + " threw: ";
+                r1 = new TMTThreadsRunner(rValues, stylesheet1,
+                                           numRunnerCalls);
+                t1 = new Thread(r1);
+
+                t1.start();
+
+                // Second set of runners is polite; uses optional liaison
+                rValues[ID] = "two-" + i;
+                rValues[XMLNAME] = filenameToURI(inputDir + setTwoFilenameRoot + ".xml");
+                rValues[XSLNAME] = filenameToURI(inputDir + setTwoFilenameRoot + ".xsl");
+                rValues[OUTNAME] = outputDir + setTwoFilenameRoot + "r" + i;
+                rValues[PARAMNAME] = paramName;
+                rValues[PARAMVAL] = paramVal;
+                rValues[OPTIONS] = "polite;param";
+                rValues[TRANSFORM_TYPE] = transformType;
+
+                if ((liaison != null) &&!(liaison.equals("")))
+                    rValues[LIAISON] = liaison;
+
+                errStr = "Creating runnertwo-" + i + " threw: ";
+                r2 = new TMTThreadsRunner(rValues, stylesheet2,
+                                           numRunnerCalls);
+                t2 = new Thread(r2);
+
+                t2.start();
+
+                rValues[LIAISON] = null;
+
+                // Third set of runners will recreate it's processor each time
+                // and report memory usage; but not set the param
+                // Note: this causes lots of calls to System.gc
+                rValues[ID] = "thr-" + i;
+                rValues[XMLNAME] = filenameToURI(inputDir + setThreeFilenameRoot + ".xml");
+                rValues[XSLNAME] = filenameToURI(inputDir + setThreeFilenameRoot + ".xsl");
+                rValues[OUTNAME] = outputDir + setThreeFilenameRoot + "r" + i;
+                rValues[PARAMNAME] = paramName;
+                rValues[PARAMVAL] = paramVal;
+                rValues[OPTIONS] = "recreate;memory";
+                rValues[TRANSFORM_TYPE] = transformType;
+                errStr = "Creating runnerthree-" + i + " threw: ";
+                r3 = new TMTThreadsRunner(rValues, stylesheet3,
+                                           numRunnerCalls);
+                t3 = new Thread(r3);
+
+                t3.start();
+                println("<message desc=\"Created " + i
+                        + "th set of runners.\"/>");
+            }
+        }
+        catch (Exception e)
+        {
+            println("<arbitrary desc=\"" + errStr + e.toString() + "\">");
+
+            if (pWriter != null)
+            {
+                e.printStackTrace(pWriter);
+            }
+
+            e.printStackTrace();
+            println("</arbitrary>");
+        }
+
+        // Clean up our own references, just for completeness
+        stylesheet1 = null;
+        stylesheet2 = null;
+        stylesheet3 = null;
+        errStr = null;
+
+        println("<message desc=\"Created all our runners!\"/>");
+        println("<message desc=\"TestMultiTypeThreads main thread now complete\"/>");
+        println("</resultsfile>");
+
+        if (pWriter != null)
+            pWriter.flush();
+    }
+
+    /**
+     * Read in properties file and set instance variables.  
+     *
+     * @param fName name of .properties file to read
+     * @return false if error occoured
+     */
+    protected boolean initPropFile(String fName)
+    {
+
+        Properties p = new Properties();
+
+        try
+        {
+
+            // Load named file into our properties block
+            FileInputStream fIS = new FileInputStream(fName);
+
+            p.load(fIS);
+
+            // Parse out any values that match our internal convenience variables
+            outputDir = p.getProperty("outputDir", outputDir);
+
+            // Validate the outputDir and use it to reset the logFileName
+            File oDir = new File(outputDir);
+
+            if (!oDir.exists())
+            {
+                if (!oDir.mkdirs())
+                {
+
+                    // Error, we can't create the outputDir, default to current dir
+                    println("<message desc=\"outputDir(" + outputDir
+                            + ") does not exist, defaulting to .\"/>");
+
+                    outputDir = ".";
+                }
+            }
+
+            // Verify inputDir as well
+            inputDir = p.getProperty("inputDir", inputDir);
+
+            File tDir = new File(inputDir);
+
+            if (!tDir.exists())
+            {
+                if (!tDir.mkdirs())
+                {
+
+                    // Error, we can't create the inputDir, abort
+                    println("<message desc=\"inputDir(" + inputDir
+                            + ") does not exist, terminating test\"/>");
+
+                    return false;
+                }
+            }
+
+            // Add on separators
+            inputDir += File.separator;
+            outputDir += File.separator;
+
+            // Each defaults to variable initializers            
+            logFileName = p.getProperty("logFile", logFileName);
+            setOneFilenameRoot = p.getProperty("setOneFile",
+                                               setOneFilenameRoot);
+            setTwoFilenameRoot = p.getProperty("setTwoFile",
+                                               setTwoFilenameRoot);
+            setThreeFilenameRoot = p.getProperty("setThreeFile",
+                                                 setThreeFilenameRoot);
+            paramName = p.getProperty("paramName", paramName);
+            paramVal = p.getProperty("paramVal", paramVal);
+            liaison = p.getProperty("liaison", liaison);
+
+            String numb;
+
+            numb = p.getProperty("numRunners");
+
+            if (numb != null)
+            {
+                try
+                {
+                    numRunners = Integer.parseInt(numb);
+                }
+                catch (NumberFormatException numEx)
+                {
+
+                    // no-op, leave set as default
+                    println("<message desc=\"numRunners threw: "
+                            + numEx.toString() + "\"/>");
+                }
+            }
+
+            numb = p.getProperty("numRunnerCalls");
+
+            if (numb != null)
+            {
+                try
+                {
+                    numRunnerCalls = Integer.parseInt(numb);
+                }
+                catch (NumberFormatException numEx)
+                {
+
+                    // no-op, leave set as default
+                    println("<message desc=\"numRunnerCalls threw: "
+                            + numEx.toString() + "\"/>");
+                }
+            }
+        }
+        catch (Exception e)
+        {
+            println("<arbitrary=\"initPropFile: " + fName + " threw: "
+                    + e.toString() + "\">");
+
+            if (pWriter != null)
+            {
+                e.printStackTrace(pWriter);
+            }
+
+            e.printStackTrace();
+            println("</arbitrary>");
+
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Bottleneck output; goes to System.out and main's pWriter.  
+     *
+     * NEEDSDOC @param s
+     */
+    protected void println(String s)
+    {
+
+        System.out.println(s);
+
+        if (pWriter != null)
+            pWriter.println(s);
+    }
+
+    /** A simple log output file for the main thread; each runner also has it's own. */
+    protected PrintWriter pWriter = null;
+
+    /**
+     * Worker method to setup a simple log output file.  
+     *
+     * NEEDSDOC @param n
+     */
+    protected void createLogFile(String n)
+    {
+
+        try
+        {
+            pWriter = new PrintWriter(new FileWriter(n, true));
+        }
+        catch (Exception e)
+        {
+            System.err.println("<message desc=\"createLogFile threw: "
+                               + e.toString() + "\"/>");
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * Startup the test from the command line.  
+     *
+     * NEEDSDOC @param args
+     */
+    public static void main(String[] args)
+    {
+
+        if (args.length < 1)
+        {
+            System.err.println("ERROR! Must have at least one argument\n" + usage());
+
+            return;  // Don't System.exit, it's not polite
+        }
+
+        TestMultiTypeThreads app = new TestMultiTypeThreads();
+        // semi-HACK: accept and ignore -load as first arg only
+        String propFileName = null;
+        if ("-load".equalsIgnoreCase(args[0]))
+        {
+            propFileName = args[1];
+        }
+        else
+        {
+            propFileName = args[0];
+        }
+        if (!app.initPropFile(propFileName))  // Side effect: creates pWriter for logging
+        {
+            System.err.println("ERROR! Could not read properties file: "
+                               + propFileName);
+
+            return;
+        }
+
+        app.runTest();
+    }
+
+    /**
+     * Worker method to translate String to URI.  
+     * Note: Xerces and Crimson appear to handle some URI references 
+     * differently - this method needs further work once we figure out 
+     * exactly what kind of format each parser wants (esp. considering 
+     * relative vs. absolute references).
+     * @param String path\filename of test file
+     * @return URL to pass to SystemId
+     */
+    public static String filenameToURI(String filename)
+    {
+        File f = new File(filename);
+        String tmp = f.getAbsolutePath();
+            if (File.separatorChar == '\\') {
+                tmp = tmp.replace('\\', '/');
+            }
+        return "file:///" + tmp;
+    }
+}  // end of class TestMultiTypeThreads
+
+/**
+ * Worker class to run a processor on a separate thread.
+ * <p>Currently, no automated validation is done, however most
+ * output files and all error logs are saved to disk allowing for
+ * later manual verification.</p>
+ */
+class TMTThreadsRunner implements Runnable
+{
+
+    /** NEEDSDOC Field xslStylesheet          */
+    Templates xslStylesheet;
+
+    /** NEEDSDOC Field numProcesses          */
+    int numProcesses;
+
+    /** NEEDSDOC Field runnerID          */
+    String runnerID;
+
+    /** NEEDSDOC Field xmlName          */
+    String xmlName;
+
+    /** NEEDSDOC Field xslName          */
+    String xslName;
+
+    /** NEEDSDOC Field outName          */
+    String outName;
+
+    /** NEEDSDOC Field paramName          */
+    String paramName;
+
+    /** NEEDSDOC Field paramVal          */
+    String paramVal;
+
+    /** NEEDSDOC Field liaison          */
+    String liaison;
+
+    /** NEEDSDOC Field polite          */
+    boolean polite = false;  // if we should yield each loop
+
+    /** NEEDSDOC Field recreate          */
+    boolean recreate = false;  // if we should re-create a new processor each time
+
+    /** NEEDSDOC Field validate          */
+    boolean validate = false;  // if we should attempt to validate output files (FUTUREWORK)
+
+    /** NEEDSDOC Field reportMem          */
+    boolean reportMem = false;  // if we should report memory usage periodically
+
+    /** NEEDSDOC Field setParam          */
+    boolean setParam = false;  // if we should set our parameter or not
+
+    /** NEEDSDOC Field setParam          */
+    String transformType = StreamSource.FEATURE;
+
+    /**
+     * Constructor TMTThreadsRunner
+     *
+     *
+     * NEEDSDOC @param params
+     * NEEDSDOC @param xslStylesheet
+     * NEEDSDOC @param numProcesses
+     */
+    TMTThreadsRunner(String[] params, Templates xslStylesheet,
+                      int numProcesses)
+    {
+
+        this.xslStylesheet = xslStylesheet;
+        this.numProcesses = numProcesses;
+        this.runnerID = params[TestMultiTypeThreads.ID];
+        this.xmlName = params[TestMultiTypeThreads.XMLNAME]; // must already be legal URI
+        this.xslName = params[TestMultiTypeThreads.XSLNAME]; // must already be legal URI
+        this.outName = params[TestMultiTypeThreads.OUTNAME]; // must be local path/filename
+        this.paramName = params[TestMultiTypeThreads.PARAMNAME];
+        this.paramVal = params[TestMultiTypeThreads.PARAMVAL];
+
+        if (params[TestMultiTypeThreads.OPTIONS].indexOf("polite") > 0)
+            polite = true;
+
+        if (params[TestMultiTypeThreads.OPTIONS].indexOf("recreate") > 0)
+            recreate = true;
+
+        if (params[TestMultiTypeThreads.OPTIONS].indexOf("validate") > 0)
+            validate = true;
+
+        // Optimization: only report memory if asked to and we're 
+        //  in the first iteration of runners created
+        if ((params[TestMultiTypeThreads.OPTIONS].indexOf("memory") > 0)
+            && (this.runnerID.indexOf("0") >= 0))
+            reportMem = true;
+
+        if (params[TestMultiTypeThreads.OPTIONS].indexOf("param") > 0)
+            setParam = true;
+
+        if (params[TestMultiTypeThreads.LIAISON] != null)  // TRAX unused
+            liaison = params[TestMultiTypeThreads.LIAISON];
+
+        if (params[TestMultiTypeThreads.TRANSFORM_TYPE] != null)
+            transformType = params[TestMultiTypeThreads.TRANSFORM_TYPE];
+    }
+
+    /**
+     * Bottleneck output; both to System.out and to our private errWriter.  
+     *
+     * NEEDSDOC @param s
+     */
+    protected void println(String s)
+    {
+
+        System.out.println(s);
+
+        if (errWriter != null)
+            errWriter.println(s);
+    }
+
+    /**
+     * Bottleneck output; both to System.out and to our private errWriter.  
+     *
+     * NEEDSDOC @param s
+     */
+    protected void print(String s)
+    {
+
+        System.out.print(s);
+
+        if (errWriter != null)
+            errWriter.print(s);
+    }
+
+    /** NEEDSDOC Field errWriter          */
+    PrintWriter errWriter = null;
+
+    /**
+     * NEEDSDOC Method createErrWriter 
+     *
+     */
+    protected void createErrWriter()
+    {
+
+        try
+        {
+            errWriter = new PrintWriter(new FileWriter(outName + ".log"),
+                                        true);
+        }
+        catch (Exception e)
+        {
+            System.err.println("<message desc=\"" + runnerID + ":threw: "
+                               + e.toString() + "\"/>");
+        }
+    }
+
+    /** Main entrypoint; loop and perform lots of processes. */
+    public void run()
+    {
+
+        int i = 0;  // loop counter; used for error reporting
+
+        createErrWriter();
+        println("<?xml version=\"1.0\"?>");
+        println("<testrunner desc=\"" + runnerID + ":started\" fileName=\""
+                + xslName + "\">");
+
+        TransformerFactory factory = null;
+
+        try
+        {
+
+            // Each runner creates it's own processor for use and it's own error log
+            factory = TransformerFactory.newInstance();
+
+            println("<arbitrary desc=\"" + runnerID + ":processing\">");
+        }
+        catch (Throwable ex)
+        {  // If we got here, just log it and bail, no sense continuing
+            println("<throwable desc=\"" + ex.toString() + "\"><![CDATA[");
+            ex.printStackTrace(errWriter);
+            println("\n</throwable>");
+            println("<message desc=\"" + runnerID + ":complete-ERROR:after:"
+                    + i + "\"/>");
+            println("</testrunner>");
+
+            if (errWriter != null)
+                errWriter.close();
+
+            return;
+        }
+
+        try
+        {
+
+            // Loop away...
+            for (i = 0; i < numProcesses; i++)
+            {
+
+                // Run a process using the pre-compiled stylesheet we were construced with
+                {
+                    Transformer transformer1 = xslStylesheet.newTransformer();
+                    if (transformType == DOMSource.FEATURE)
+                    {
+                        doDOMTransform(transformer1, xmlName, outName + "d.out", "d");
+                    }
+                    else if (transformType == SAXSource.FEATURE)
+                    {
+                        doSAXTransform(xslName, xmlName, outName + "x.out", "x");
+                    }
+                    else if (transformType == StreamSource.FEATURE)
+                    {
+                        // Call String ctor so we don't have to setSystemId
+                        Result result1 = new StreamResult(outName + "t.out");
+
+                        if (setParam)
+                            transformer1.setParameter(paramName, paramVal);
+
+                        print("t");  // Note presence of this in logs shows which process threw an exception
+                        transformer1.transform(new StreamSource(xmlName), result1);
+                    }
+                    else 
+                    {
+                        throw new RuntimeException("unsupported transformType: " + transformType);
+                    }
+
+                    // Temporary vars go out of scope for cleanup here
+                }
+
+                // Now process something with a newly-processed stylesheet
+                {
+                    Templates templates2 =
+                        factory.newTemplates(new StreamSource(xslName));
+                    Transformer transformer2 = templates2.newTransformer();
+                    if (transformType == DOMSource.FEATURE)
+                    {
+                        doDOMTransform(transformer2, xmlName, outName + "_D.out", "D");
+                    }
+                    else if (transformType == SAXSource.FEATURE)
+                    {
+                        doSAXTransform(xslName, xmlName, outName + "_X.out", "X");
+                    }
+                    else // if (transformType == StreamSource.FEATURE)
+                    {
+                        Result result2 = new StreamResult(outName + "_T.out");
+
+                        if (setParam)
+                            transformer2.setParameter(paramName, paramVal);
+
+                        print("T");  // Note presence of this in logs shows which process threw an exception
+                        transformer2.transform(new StreamSource(xmlName), result2);
+                    }
+                }
+
+                // if asked, report memory statistics
+                if (reportMem)
+                {
+                    Runtime r = Runtime.getRuntime();
+
+                    r.gc();
+
+                    long freeMemory = r.freeMemory();
+                    long totalMemory = r.totalMemory();
+
+                    println("<statistic desc=\"" + runnerID
+                            + ":memory:longval-free:doubleval-total\">");
+                    println("<longval>" + freeMemory + "</longval>");
+                    println("<doubleval>" + totalMemory + "</doubleval>");
+                    println("</statistic>");
+                }
+
+                // if we're polite, let others play for a bit
+                if (polite)
+                    java.lang.Thread.yield();
+            }
+
+            // IF we get here, we worked without exceptions (presumably successfully)
+            println("</arbitrary>");
+            println("<message desc=\"" + runnerID + ":complete-OK:after:"
+                    + numProcesses + "\"/>");
+        }
+
+        // Separate messages for each kind of exception
+        catch (TransformerException te)
+        {
+            println("\n<TransformerException desc=\"" + te.toString() + "\">");
+            logStackTrace(te, errWriter);
+            logContainedException(te, errWriter);
+            println("</TransformerException>");
+            println("</arbitrary>");
+            println("<message desc=\"" + runnerID + ":complete-ERROR:after:"
+                    + i + "\"/>");
+        }
+        catch (Throwable ex)
+        {
+            logThrowable(ex, errWriter);
+            println("</arbitrary>");
+            println("<message desc=\"" + runnerID + ":complete-ERROR:after:"
+                    + i + "\"/>");
+        }
+        finally
+        {
+
+            // Cleanup our references, etc.
+            println("</testrunner>");
+
+            if (errWriter != null)
+                errWriter.close();
+
+            runnerID = null;
+            xmlName = null;
+            xslName = null;
+            xslStylesheet = null;
+            outName = null;
+        }
+    }  // end of run()...
+
+    /** Worker method to do a specific type of transform  */
+    private void doDOMTransform(Transformer t, String xmlName, String outName, String marker)
+        throws Exception
+    {
+        if (setParam)
+            t.setParameter(paramName, paramVal);
+
+        // Parse in the xml data into a DOM
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        dfactory.setNamespaceAware(true);
+        DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+        Node xmlDoc = docBuilder.parse(new InputSource(xmlName));
+        Source xmlSource = new DOMSource(xmlDoc);
+        xmlSource.setSystemId(xmlName);
+
+        // Prepare a result and transform it into a DOM
+        org.w3c.dom.Document outNode = docBuilder.newDocument();
+        print(marker);  // Note presence of this in logs shows which process threw an exception
+        t.transform(xmlSource, new DOMResult(outNode));
+
+        // Now serialize output to disk with identity transformer
+        TransformerFactory factory = TransformerFactory.newInstance();
+        Transformer serializer = factory.newTransformer();
+        serializer.transform(new DOMSource(outNode), 
+                             new StreamResult(new FileOutputStream(outName)));
+        // do we need to FileOutputStream.close()?
+    }
+
+    /** Worker method to do a specific type of transform  */
+    private void doSAXTransform(String xslName, String xmlName, String outName, String marker)
+        throws Exception
+    {
+        TransformerFactory factory = TransformerFactory.newInstance();
+        // should check for SAXResult.FEATURE first!
+        SAXTransformerFactory sfactory = ((SAXTransformerFactory) factory);
+        
+        // Create an Document node as the root for the output.
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+        Document outNode = docBuilder.newDocument();
+    
+        // Create a ContentHandler that can liston to SAX events 
+        // and transform the output to DOM nodes.
+        TransformerHandler handler = sfactory.newTransformerHandler(new StreamSource(xslName));
+        handler.setResult(new DOMResult(outNode));
+    
+        // Create a reader and set it's ContentHandler to be the 
+        // transformer.
+        SAXParserFactory spfactory = SAXParserFactory.newInstance();
+        spfactory.setNamespaceAware(true);
+        SAXParser jaxpParser = spfactory.newSAXParser();
+        XMLReader reader = jaxpParser.getXMLReader();
+
+        reader.setContentHandler(handler);
+        reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
+    
+        // Send the SAX events from the parser to the transformer,
+        // and thus to the DOM tree.
+        print(marker);  // Note presence of this in logs shows which process threw an exception
+        handler.setSystemId(xmlName);
+        reader.parse(xmlName);
+
+        // Serialize the DOM tree out
+            FileOutputStream fos = new FileOutputStream(outName);
+        Transformer serializer = factory.newTransformer();
+        //serializer.setOutputProperty(OutputKeys.INDENT, "yes");
+        //serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+        serializer.transform(new DOMSource(outNode), new StreamResult(fos));
+    }
+
+    /**
+     * NEEDSDOC Method logContainedException 
+     *
+     *
+     * NEEDSDOC @param parent
+     * NEEDSDOC @param p
+     */
+    private void logContainedException(TransformerException parent, PrintWriter p)
+    {
+
+        Throwable containedException = parent.getException();
+
+        if (null != containedException)
+        {
+            println("<containedexception desc=\""
+                    + containedException.toString() + "\">");
+            logStackTrace(containedException, p);
+            println("</containedexception>");
+        }
+    }
+
+    /**
+     * NEEDSDOC Method logThrowable 
+     *
+     *
+     * NEEDSDOC @param t
+     * NEEDSDOC @param p
+     */
+    private void logThrowable(Throwable t, PrintWriter p)
+    {
+
+        println("\n<throwable desc=\"" + t.toString() + "\">");
+        logStackTrace(t, p);
+        println("</throwable>");
+    }
+
+    /**
+     * NEEDSDOC Method logStackTrace 
+     *
+     *
+     * NEEDSDOC @param t
+     * NEEDSDOC @param p
+     */
+    private void logStackTrace(Throwable t, PrintWriter p)
+    {
+
+        // Should check if (errWriter == null)
+        println("<stacktrace><![CDATA[");
+        t.printStackTrace(p);
+
+        // Could also echo to stdout, but not really worth it
+        println("]]></stacktrace>");
+    }
+}  // end of class TMTThreadsRunner...
+
+// END OF FILE
diff --git a/test/java/src/org/apache/qetest/trax/TestThreads.java b/test/java/src/org/apache/qetest/trax/TestThreads.java
new file mode 100644
index 0000000..5ef41f9
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/TestThreads.java
@@ -0,0 +1,877 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TestThreads.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+//-------------------------------------------------------------------------
+
+/**
+ * Testing multiple simultaneous processors on different threads with TRAX.
+ * <p>No validation of output files is currently done!  You must manually
+ * inspect any logfiles.  Most options can be passed in with a Properties file.</p>
+ * <p>Note: Most automated tests extend XSLProcessorTestBase, and 
+ * are named *Test.java.  Since we are semi-manual, we're 
+ * named Test*.java instead.</p>
+ * We assume Features.STREAM.
+ * @author shane_curcuru@lotus.com
+ */
+public class TestThreads
+{
+
+    /**
+     * Convenience method to print out usage information.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public static String usage()
+    {
+
+        return ("Usage: TestThreads [-load] file.properties :\n"
+                + "    where the properties file can set:,\n"
+                + "    inputDir=e:\\builds\\xsl-test\n"
+                + "    outputDir=e:\\builds\\xsl-test\\results\n"
+                + "    logFile=e:\\builds\\xsl-test\\results\\TestThreads.xml\n"
+                + "    numRunners=5\n" + "    numRunnerCalls=10\n"
+                + "    setOneFile=bool01\n" + "    setTwoFile=expr01\n"
+                + "    setThreeFile=numb01\n" + "    paramName=SomeParam\n"
+                + "    paramVal=TheValue\n");
+    }
+
+    /** NEEDSDOC Field debug          */
+    public boolean debug = true;  // for adhoc debugging
+
+    /**
+     * Number of sets of worker threads to create and loops per runner.
+     * <p>'numRunners=xx', default is 10; 'numRunnerCalls=xx', default is 50.</p>
+     */
+    protected int numRunners = 10;
+
+    /**
+     * Number of sets of worker threads to create and loops per runner.
+     * <p>'numRunners=xx', default is 10; 'numRunnerCalls=xx', default is 50.</p>
+     */
+    protected int numRunnerCalls = 50;
+
+    /**
+     * Root input filenames that certain runners should use, in the inputDir.
+     * <p>'setOneFile=File'; 'setTwoFile=File'; 'setThreeFile=File'
+     * in .prop file to set; default is TestThreads1, TestThreads2, TestThreads3.</p>
+     * <p>Files are found in 'inputDir=c:\bar\baz' from .prop file.</p>
+     */
+    protected String inputDir = null;
+
+    /** NEEDSDOC Field setOneFilenameRoot          */
+    protected String setOneFilenameRoot = "TestThreads1";
+
+    /** NEEDSDOC Field setTwoFilenameRoot          */
+    protected String setTwoFilenameRoot = "TestThreads2";
+
+    /** NEEDSDOC Field setThreeFilenameRoot          */
+    protected String setThreeFilenameRoot = "TestThreads3";
+
+    /**
+     * All output logs and files get put in the outputDir.
+     */
+    protected String outputDir = null;
+
+    /**
+     * Sample PARAM name that certain runners should use.
+     * <p>Use 'paramName=xx' in .prop file to set, default is test1.</p>
+     */
+    protected String paramName = "test1";
+
+    /**
+     * Sample PARAM value that certain runners should use.
+     * <p>Use 'paramVal=xx' in .prop file to set, default is bar.</p>
+     */
+    protected String paramVal = "bar";
+
+    /**
+     * liaisonClassName that just the *second* set of runners should use.
+     * <p>Use 'liaison=xx' in .prop file to set, default is null (whatever the processor's default is).</p>
+     */
+    protected String liaison = null;  // TRAX unused
+
+    // Used to pass info to runners; simpler to update than changing ctors
+
+    /** RunnerID offset in ctor's array initializer.   */
+    public static final int ID = 0;
+
+    /** NEEDSDOC Field XMLNAME          */
+    public static final int XMLNAME = 1;
+
+    /** NEEDSDOC Field XSLNAME          */
+    public static final int XSLNAME = 2;
+
+    /** NEEDSDOC Field OUTNAME          */
+    public static final int OUTNAME = 3;
+
+    /** NEEDSDOC Field PARAMNAME          */
+    public static final int PARAMNAME = 4;
+
+    /** NEEDSDOC Field PARAMVAL          */
+    public static final int PARAMVAL = 5;
+
+    /** NEEDSDOC Field OPTIONS          */
+    public static final int OPTIONS = 6;
+
+    /** NEEDSDOC Field LIAISON          */
+    public static final int LIAISON = 7;
+
+    /** NEEDSDOC Field FUTUREUSE          */
+    public static final int FUTUREUSE = 8;
+
+    /**
+     * Name of main file's output logging; each runner also has separate output.
+     */
+    protected String logFileName = "TestThreads.xml";
+
+    /**
+     * Construct multiple threads with processors and run them all.
+     * @author Shane Curcuru & Scott Boag
+     * <p>Preprocesses some stylesheets, then creates lots of worker threads.</p>
+     */
+    public void runTest()
+    {
+
+        // Prepare a log file and dump out some basic info
+        createLogFile(logFileName);
+        println("<?xml version=\"1.0\"?>");
+        println("<resultsfile logFile=\"" + logFileName + "\">");
+        println("<message desc=\"threads=" + (3 * numRunners)
+                + " iterations=" + numRunnerCalls + "\"/>");
+        println("<message desc=\"oneF=" + setOneFilenameRoot + " twof="
+                + setTwoFilenameRoot + " threef=" + setThreeFilenameRoot
+                + "\"/>");
+        println("<message desc=\"param=" + paramName + " val=" + paramVal
+                + " liaison=" + liaison + "\"/>");
+
+        // Preprocess some stylesheets for use by the runners
+        String errStr = "Create processor threw: ";
+        Templates stylesheet1, stylesheet2, stylesheet3;
+
+        try
+        {
+            String setOneURL = filenameToURI(inputDir + setOneFilenameRoot + ".xsl");
+            String setTwoURL = filenameToURI(inputDir + setTwoFilenameRoot + ".xsl");
+            String setThreeURL = filenameToURI(inputDir + setThreeFilenameRoot + ".xsl");
+
+            TransformerFactory factory = TransformerFactory.newInstance();
+
+            errStr = "Processing stylesheet1 threw: ";
+            stylesheet1 =
+                factory.newTemplates(new StreamSource(setOneURL));
+            errStr = "Processing stylesheet2 threw: ";
+            stylesheet2 =
+                factory.newTemplates(new StreamSource(setTwoURL));
+            errStr = "Processing stylesheet3 threw: ";
+            stylesheet3 =
+                factory.newTemplates(new StreamSource(setThreeURL));
+        }
+        catch (Exception e)
+        {
+            println("<arbitrary desc=\"" + errStr + e.toString() + "\">");
+
+            if (pWriter != null)
+            {
+                e.printStackTrace(pWriter);
+            }
+
+            e.printStackTrace();
+            println("</arbitrary>");
+
+            return;
+        }
+
+        errStr = "PreCreating runners threw: ";
+
+        try
+        {
+            String[] rValues = new String[FUTUREUSE];
+
+            // Create a whole bunch of worker threads and run them
+            for (int i = 0; i < numRunners; i++)
+            {
+                TestThreadsRunner r1, r2, r3;
+                Thread t1, t2, t3;
+
+                // First set of runners reports on memory usage periodically
+                rValues[ID] = "one-" + i;
+                rValues[XMLNAME] = filenameToURI(inputDir + setOneFilenameRoot + ".xml");
+                rValues[XSLNAME] = filenameToURI(inputDir + setOneFilenameRoot + ".xsl");
+                rValues[OUTNAME] = outputDir + setOneFilenameRoot + "r" + i;
+                rValues[PARAMNAME] = paramName;
+                rValues[PARAMVAL] = paramVal;
+                rValues[OPTIONS] = "memory;param";
+                errStr = "Creating runnerone-" + i + " threw: ";
+                r1 = new TestThreadsRunner(rValues, stylesheet1,
+                                           numRunnerCalls);
+                t1 = new Thread(r1);
+
+                t1.start();
+
+                // Second set of runners is polite; uses optional liaison
+                rValues[ID] = "two-" + i;
+                rValues[XMLNAME] = filenameToURI(inputDir + setTwoFilenameRoot + ".xml");
+                rValues[XSLNAME] = filenameToURI(inputDir + setTwoFilenameRoot + ".xsl");
+                rValues[OUTNAME] = outputDir + setTwoFilenameRoot + "r" + i;
+                rValues[PARAMNAME] = paramName;
+                rValues[PARAMVAL] = paramVal;
+                rValues[OPTIONS] = "polite;param";
+
+                if ((liaison != null) &&!(liaison.equals("")))
+                    rValues[LIAISON] = liaison;
+
+                errStr = "Creating runnertwo-" + i + " threw: ";
+                r2 = new TestThreadsRunner(rValues, stylesheet2,
+                                           numRunnerCalls);
+                t2 = new Thread(r2);
+
+                t2.start();
+
+                rValues[LIAISON] = null;
+
+                // Third set of runners will recreate it's processor each time
+                // and report memory usage; but not set the param
+                // Note: this causes lots of calls to System.gc
+                rValues[ID] = "thr-" + i;
+                rValues[XMLNAME] = filenameToURI(inputDir + setThreeFilenameRoot + ".xml");
+                rValues[XSLNAME] = filenameToURI(inputDir + setThreeFilenameRoot + ".xsl");
+                rValues[OUTNAME] = outputDir + setThreeFilenameRoot + "r" + i;
+                rValues[PARAMNAME] = paramName;
+                rValues[PARAMVAL] = paramVal;
+                rValues[OPTIONS] = "recreate;memory";
+                errStr = "Creating runnerthree-" + i + " threw: ";
+                r3 = new TestThreadsRunner(rValues, stylesheet3,
+                                           numRunnerCalls);
+                t3 = new Thread(r3);
+
+                t3.start();
+                println("<message desc=\"Created " + i
+                        + "th set of runners.\"/>");
+            }
+        }
+        catch (Exception e)
+        {
+            println("<arbitrary desc=\"" + errStr + e.toString() + "\">");
+
+            if (pWriter != null)
+            {
+                e.printStackTrace(pWriter);
+            }
+
+            e.printStackTrace();
+            println("</arbitrary>");
+        }
+
+        // Clean up our own references, just for completeness
+        stylesheet1 = null;
+        stylesheet2 = null;
+        stylesheet3 = null;
+        errStr = null;
+
+        println("<message desc=\"Created all our runners!\"/>");
+        println("<message desc=\"TestThreads main thread now complete\"/>");
+        println("</resultsfile>");
+
+        if (pWriter != null)
+            pWriter.flush();
+    }
+
+    /**
+     * Read in properties file and set instance variables.  
+     *
+     * @param fName name of .properties file to read
+     * @return false if error occoured
+     */
+    protected boolean initPropFile(String fName)
+    {
+
+        Properties p = new Properties();
+
+        try
+        {
+
+            // Load named file into our properties block
+            FileInputStream fIS = new FileInputStream(fName);
+
+            p.load(fIS);
+
+            // Parse out any values that match our internal convenience variables
+            outputDir = p.getProperty("outputDir", outputDir);
+
+            // Validate the outputDir and use it to reset the logFileName
+            File oDir = new File(outputDir);
+
+            if (!oDir.exists())
+            {
+                if (!oDir.mkdirs())
+                {
+
+                    // Error, we can't create the outputDir, default to current dir
+                    println("<message desc=\"outputDir(" + outputDir
+                            + ") does not exist, defaulting to .\"/>");
+
+                    outputDir = ".";
+                }
+            }
+
+            // Verify inputDir as well
+            inputDir = p.getProperty("inputDir", inputDir);
+
+            File tDir = new File(inputDir);
+
+            if (!tDir.exists())
+            {
+                if (!tDir.mkdirs())
+                {
+
+                    // Error, we can't create the inputDir, abort
+                    println("<message desc=\"inputDir(" + inputDir
+                            + ") does not exist, terminating test\"/>");
+
+                    return false;
+                }
+            }
+
+            // Add on separators
+            inputDir += File.separator;
+            outputDir += File.separator;
+
+            // Each defaults to variable initializers            
+            logFileName = p.getProperty("logFile", logFileName);
+            setOneFilenameRoot = p.getProperty("setOneFile",
+                                               setOneFilenameRoot);
+            setTwoFilenameRoot = p.getProperty("setTwoFile",
+                                               setTwoFilenameRoot);
+            setThreeFilenameRoot = p.getProperty("setThreeFile",
+                                                 setThreeFilenameRoot);
+            paramName = p.getProperty("paramName", paramName);
+            paramVal = p.getProperty("paramVal", paramVal);
+            liaison = p.getProperty("liaison", liaison);
+
+            String numb;
+
+            numb = p.getProperty("numRunners");
+
+            if (numb != null)
+            {
+                try
+                {
+                    numRunners = Integer.parseInt(numb);
+                }
+                catch (NumberFormatException numEx)
+                {
+
+                    // no-op, leave set as default
+                    println("<message desc=\"numRunners threw: "
+                            + numEx.toString() + "\"/>");
+                }
+            }
+
+            numb = p.getProperty("numRunnerCalls");
+
+            if (numb != null)
+            {
+                try
+                {
+                    numRunnerCalls = Integer.parseInt(numb);
+                }
+                catch (NumberFormatException numEx)
+                {
+
+                    // no-op, leave set as default
+                    println("<message desc=\"numRunnerCalls threw: "
+                            + numEx.toString() + "\"/>");
+                }
+            }
+        }
+        catch (Exception e)
+        {
+            println("<arbitrary=\"initPropFile: " + fName + " threw: "
+                    + e.toString() + "\">");
+
+            if (pWriter != null)
+            {
+                e.printStackTrace(pWriter);
+            }
+
+            e.printStackTrace();
+            println("</arbitrary>");
+
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Bottleneck output; goes to System.out and main's pWriter.  
+     *
+     * NEEDSDOC @param s
+     */
+    protected void println(String s)
+    {
+
+        System.out.println(s);
+
+        if (pWriter != null)
+            pWriter.println(s);
+    }
+
+    /** A simple log output file for the main thread; each runner also has it's own. */
+    protected PrintWriter pWriter = null;
+
+    /**
+     * Worker method to setup a simple log output file.  
+     *
+     * NEEDSDOC @param n
+     */
+    protected void createLogFile(String n)
+    {
+
+        try
+        {
+            pWriter = new PrintWriter(new FileWriter(n, true));
+        }
+        catch (Exception e)
+        {
+            System.err.println("<message desc=\"createLogFile threw: "
+                               + e.toString() + "\"/>");
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * Startup the test from the command line.  
+     *
+     * NEEDSDOC @param args
+     */
+    public static void main(String[] args)
+    {
+
+        if (args.length < 1)
+        {
+            System.err.println("ERROR! Must have at least one argument\n" + usage());
+
+            return;  // Don't System.exit, it's not polite
+        }
+
+        TestThreads app = new TestThreads();
+        // semi-HACK: accept and ignore -load as first arg only
+        String propFileName = null;
+        if ("-load".equalsIgnoreCase(args[0]))
+        {
+            propFileName = args[1];
+        }
+        else
+        {
+            propFileName = args[0];
+        }
+        if (!app.initPropFile(propFileName))  // Side effect: creates pWriter for logging
+        {
+            System.err.println("ERROR! Could not read properties file: "
+                               + propFileName);
+
+            return;
+        }
+
+        app.runTest();
+    }
+
+    /**
+     * Worker method to translate String to URI.  
+     * Note: Xerces and Crimson appear to handle some URI references 
+     * differently - this method needs further work once we figure out 
+     * exactly what kind of format each parser wants (esp. considering 
+     * relative vs. absolute references).
+     * @param String path\filename of test file
+     * @return URL to pass to SystemId
+     */
+    public static String filenameToURI(String filename)
+    {
+        File f = new File(filename);
+        String tmp = f.getAbsolutePath();
+	    if (File.separatorChar == '\\') {
+	        tmp = tmp.replace('\\', '/');
+	    }
+        return "file:///" + tmp;
+    }
+}  // end of class TestThreads
+
+/**
+ * Worker class to run a processor on a separate thread.
+ * <p>Currently, no automated validation is done, however most
+ * output files and all error logs are saved to disk allowing for
+ * later manual verification.</p>
+ */
+class TestThreadsRunner implements Runnable
+{
+
+    /** NEEDSDOC Field xslStylesheet          */
+    Templates xslStylesheet;
+
+    /** NEEDSDOC Field numProcesses          */
+    int numProcesses;
+
+    /** NEEDSDOC Field runnerID          */
+    String runnerID;
+
+    /** NEEDSDOC Field xmlName          */
+    String xmlName;
+
+    /** NEEDSDOC Field xslName          */
+    String xslName;
+
+    /** NEEDSDOC Field outName          */
+    String outName;
+
+    /** NEEDSDOC Field paramName          */
+    String paramName;
+
+    /** NEEDSDOC Field paramVal          */
+    String paramVal;
+
+    /** NEEDSDOC Field liaison          */
+    String liaison;
+
+    /** NEEDSDOC Field polite          */
+    boolean polite = false;  // if we should yield each loop
+
+    /** NEEDSDOC Field recreate          */
+    boolean recreate = false;  // if we should re-create a new processor each time
+
+    /** NEEDSDOC Field validate          */
+    boolean validate = false;  // if we should attempt to validate output files (FUTUREWORK)
+
+    /** NEEDSDOC Field reportMem          */
+    boolean reportMem = false;  // if we should report memory usage periodically
+
+    /** NEEDSDOC Field setParam          */
+    boolean setParam = false;  // if we should set our parameter or not
+
+    /**
+     * Constructor TestThreadsRunner
+     *
+     *
+     * NEEDSDOC @param params
+     * NEEDSDOC @param xslStylesheet
+     * NEEDSDOC @param numProcesses
+     */
+    TestThreadsRunner(String[] params, Templates xslStylesheet,
+                      int numProcesses)
+    {
+
+        this.xslStylesheet = xslStylesheet;
+        this.numProcesses = numProcesses;
+        this.runnerID = params[TestThreads.ID];
+        this.xmlName = params[TestThreads.XMLNAME]; // must already be legal URI
+        this.xslName = params[TestThreads.XSLNAME]; // must already be legal URI
+        this.outName = params[TestThreads.OUTNAME]; // must be local path/filename
+        this.paramName = params[TestThreads.PARAMNAME];
+        this.paramVal = params[TestThreads.PARAMVAL];
+
+        if (params[TestThreads.OPTIONS].indexOf("polite") > 0)
+            polite = true;
+
+        if (params[TestThreads.OPTIONS].indexOf("recreate") > 0)
+            recreate = true;
+
+        if (params[TestThreads.OPTIONS].indexOf("validate") > 0)
+            validate = true;
+
+        // Optimization: only report memory if asked to and we're 
+        //  in the first iteration of runners created
+        if ((params[TestThreads.OPTIONS].indexOf("memory") > 0)
+            && (this.runnerID.indexOf("0") >= 0))
+            reportMem = true;
+
+        if (params[TestThreads.OPTIONS].indexOf("param") > 0)
+            setParam = true;
+
+        if (params[TestThreads.LIAISON] != null)  // TRAX unused
+            liaison = params[TestThreads.LIAISON];
+    }
+
+    /**
+     * Bottleneck output; both to System.out and to our private errWriter.  
+     *
+     * NEEDSDOC @param s
+     */
+    protected void println(String s)
+    {
+
+        System.out.println(s);
+
+        if (errWriter != null)
+            errWriter.println(s);
+    }
+
+    /**
+     * Bottleneck output; both to System.out and to our private errWriter.  
+     *
+     * NEEDSDOC @param s
+     */
+    protected void print(String s)
+    {
+
+        System.out.print(s);
+
+        if (errWriter != null)
+            errWriter.print(s);
+    }
+
+    /** NEEDSDOC Field errWriter          */
+    PrintWriter errWriter = null;
+
+    /**
+     * NEEDSDOC Method createErrWriter 
+     *
+     */
+    protected void createErrWriter()
+    {
+
+        try
+        {
+            errWriter = new PrintWriter(new FileWriter(outName + ".log"),
+                                        true);
+        }
+        catch (Exception e)
+        {
+            System.err.println("<message desc=\"" + runnerID + ":threw: "
+                               + e.toString() + "\"/>");
+        }
+    }
+
+    /** Main entrypoint; loop and perform lots of processes. */
+    public void run()
+    {
+
+        int i = 0;  // loop counter; used for error reporting
+
+        createErrWriter();
+        println("<?xml version=\"1.0\"?>");
+        println("<testrunner desc=\"" + runnerID + ":started\" fileName=\""
+                + xslName + "\">");
+
+        TransformerFactory factory = null;
+
+        try
+        {
+
+            // Each runner creates it's own processor for use and it's own error log
+            factory = TransformerFactory.newInstance();
+            println("<arbitrary desc=\"" + runnerID + ":processing\">");
+        }
+        catch (Throwable ex)
+        {  // If we got here, just log it and bail, no sense continuing
+            println("<throwable desc=\"" + ex.toString() + "\"><![CDATA[");
+            ex.printStackTrace(errWriter);
+            println("\n</throwable>");
+            println("<message desc=\"" + runnerID + ":complete-ERROR:after:"
+                    + i + "\"/>");
+            println("</testrunner>");
+
+            if (errWriter != null)
+                errWriter.close();
+
+            return;
+        }
+
+        try
+        {
+
+            // Loop away...
+            for (i = 0; i < numProcesses; i++)
+            {
+
+                // Run a process using the pre-compiled stylesheet we were construced with
+                {
+                    Transformer transformer1 = xslStylesheet.newTransformer();
+                    FileOutputStream resultStream1 =
+                        new FileOutputStream(outName + ".out");
+                    Result result1 = new StreamResult(resultStream1);
+
+                    if (setParam)
+                        transformer1.setParameter(paramName, paramVal);
+
+                    print(".");  // Note presence of this in logs shows which process threw an exception
+                    transformer1.transform(new StreamSource(xmlName), result1);
+                    resultStream1.close();
+
+                    // Temporary vars go out of scope for cleanup here
+                }
+
+                // Now process something with a newly-processed stylesheet
+                {
+                    Templates templates2 =
+                        factory.newTemplates(new StreamSource(xslName));
+                    Transformer transformer2 = templates2.newTransformer();
+                    FileOutputStream resultStream2 =
+                        new FileOutputStream(outName + "_.out");
+                    Result result2 = new StreamResult(resultStream2);
+
+                    if (setParam)
+                        transformer2.setParameter(paramName, paramVal);
+
+                    print("*");  // Note presence of this in logs shows which process threw an exception
+                    transformer2.transform(new StreamSource(xmlName), result2);
+                    resultStream2.close();
+                }
+
+                // if asked, report memory statistics
+                if (reportMem)
+                {
+                    Runtime r = Runtime.getRuntime();
+
+                    r.gc();
+
+                    long freeMemory = r.freeMemory();
+                    long totalMemory = r.totalMemory();
+
+                    println("<statistic desc=\"" + runnerID
+                            + ":memory:longval-free:doubleval-total\">");
+                    println("<longval>" + freeMemory + "</longval>");
+                    println("<doubleval>" + totalMemory + "</doubleval>");
+                    println("</statistic>");
+                }
+
+                // if we're polite, let others play for a bit
+                if (polite)
+                    java.lang.Thread.yield();
+            }
+
+            // IF we get here, we worked without exceptions (presumably successfully)
+            println("</arbitrary>");
+            println("<message desc=\"" + runnerID + ":complete-OK:after:"
+                    + numProcesses + "\"/>");
+        }
+
+        // Separate messages for each kind of exception
+        catch (TransformerException te)
+        {
+            println("\n<TransformerException desc=\"" + te.toString() + "\">");
+            logStackTrace(te, errWriter);
+            logContainedException(te, errWriter);
+            println("</TransformerException>");
+            println("</arbitrary>");
+            println("<message desc=\"" + runnerID + ":complete-ERROR:after:"
+                    + i + "\"/>");
+        }
+        catch (Throwable ex)
+        {
+            logThrowable(ex, errWriter);
+            println("</arbitrary>");
+            println("<message desc=\"" + runnerID + ":complete-ERROR:after:"
+                    + i + "\"/>");
+        }
+        finally
+        {
+
+            // Cleanup our references, etc.
+            println("</testrunner>");
+
+            if (errWriter != null)
+                errWriter.close();
+
+            runnerID = null;
+            xmlName = null;
+            xslName = null;
+            xslStylesheet = null;
+            outName = null;
+        }
+    }  // end of run()...
+
+    /**
+     * NEEDSDOC Method logContainedException 
+     *
+     *
+     * NEEDSDOC @param parent
+     * NEEDSDOC @param p
+     */
+    private void logContainedException(TransformerException parent, PrintWriter p)
+    {
+
+        Throwable containedException = parent.getException();
+
+        if (null != containedException)
+        {
+            println("<containedexception desc=\""
+                    + containedException.toString() + "\">");
+            logStackTrace(containedException, p);
+            println("</containedexception>");
+        }
+    }
+
+    /**
+     * NEEDSDOC Method logThrowable 
+     *
+     *
+     * NEEDSDOC @param t
+     * NEEDSDOC @param p
+     */
+    private void logThrowable(Throwable t, PrintWriter p)
+    {
+
+        println("\n<throwable desc=\"" + t.toString() + "\">");
+        logStackTrace(t, p);
+        println("</throwable>");
+    }
+
+    /**
+     * NEEDSDOC Method logStackTrace 
+     *
+     *
+     * NEEDSDOC @param t
+     * NEEDSDOC @param p
+     */
+    private void logStackTrace(Throwable t, PrintWriter p)
+    {
+
+        // Should check if (errWriter == null)
+        println("<stacktrace><![CDATA[");
+        t.printStackTrace(p);
+
+        // Could also echo to stdout, but not really worth it
+        println("]]></stacktrace>");
+    }
+}  // end of class TestThreadsRunner...
+
+// END OF FILE
diff --git a/test/java/src/org/apache/qetest/trax/TransformerAPITest.java b/test/java/src/org/apache/qetest/trax/TransformerAPITest.java
new file mode 100644
index 0000000..fa0cf36
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/TransformerAPITest.java
@@ -0,0 +1,1315 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Basic API coverage test for the Transformer class of TRAX.
+ * This test focuses on coverage testing for the API's, and 
+ * very brief functional testing.  Also see tests in the 
+ * trax\sax, trax\dom, and trax\stream directories for specific 
+ * coverage of Transformer API's in those usage cases.
+ * @author shane_curcuru@lotus.com
+ */
+public class TransformerAPITest extends FileBasedTest
+{
+
+    /** Cheap-o filename for various output files.  */
+    protected OutputNameManager outNames;
+
+    /** Cheap-o filename set for general API tests. */
+    protected XSLTestfileInfo simpleTest = new XSLTestfileInfo();
+
+    /** TransformerAPIParam.xsl used for set/getParameter related tests  */
+    protected XSLTestfileInfo paramTest = new XSLTestfileInfo();
+
+    /** Parameter names from TransformerAPIParam.xsl  */
+    public static final String PARAM1S = "param1s";
+    public static final String PARAM2S = "param2s";
+    public static final String PARAM3S = "param3s";
+    public static final String PARAM1N = "param1n";
+    public static final String PARAM2N = "param2n";
+    public static final String PARAM3N = "param3n";
+
+    /** TransformerAPIOutputFormat.xsl used for set/getOutputFormat related tests  */
+    protected XSLTestfileInfo outputFormatTest = new XSLTestfileInfo();
+
+    /** Just goldName for outputFormatTest with UTF-8 */
+    protected String outputFormatTestUTF8 = null;
+
+    /** TransformerAPIHTMLFormat.xsl.xsl used for set/getOutputFormat related tests  */
+    protected XSLTestfileInfo htmlFormatTest = new XSLTestfileInfo();
+
+    /** Known outputFormat values from TransformerAPIOutputFormat.xsl  */
+    public static final String METHOD_VALUE = "xml";
+    public static final String VERSION_VALUE ="123.45";
+    public static final String ENCODING_VALUE ="UTF-16";
+    public static final String STANDALONE_VALUE = "yes";
+    public static final String DOCTYPE_PUBLIC_VALUE = "this-is-doctype-public";
+    public static final String DOCTYPE_SYSTEM_VALUE = "this-is-doctype-system";
+    public static final String CDATA_SECTION_ELEMENTS_VALUE = "cdataHere";
+    public static final String INDENT_VALUE  =  "yes";
+    public static final String MEDIA_TYPE_VALUE = "text/test/xml";
+    public static final String OMIT_XML_DECLARATION_VALUE = "yes";
+
+    /** Cheap-o filename set(s) for multiple transform tests. */
+    protected XSLTestfileInfo multiTest = new XSLTestfileInfo();
+    protected XSLTestfileInfo multi2Test = new XSLTestfileInfo();
+
+    /** Subdir name under test\tests\api for files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+    /** Default ctor initializes test name, comment, numTestCases. */
+    public TransformerAPITest()
+    {
+
+        numTestCases = 6;  // REPLACE_num
+        testName = "TransformerAPITest";
+        testComment = "Basic API coverage test for the Transformer class";
+    }
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files, cache system property.  
+     *
+     * @param p Properties to initialize with (may be unused)
+     * @return false if test should be aborted, true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: "
+                                   + outSubDir);
+
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        // We assume inputDir=...tests\api, and use the trax subdir
+        //  also assume inputDir, etc. exist already
+        String testBasePath = inputDir + File.separator + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir + File.separator + TRAX_SUBDIR
+                              + File.separator;
+
+        simpleTest.xmlName = QetestUtils.filenameToURL(testBasePath + "identity.xml");
+        simpleTest.inputName = QetestUtils.filenameToURL(testBasePath + "identity.xsl");
+        simpleTest.goldName = goldBasePath + "identity.out";
+
+        paramTest.xmlName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIParam.xml");
+        paramTest.inputName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIParam.xsl");
+        paramTest.goldName = goldBasePath + "TransformerAPIParam.out";
+        
+        outputFormatTest.xmlName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIOutputFormat.xml");
+        outputFormatTest.inputName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIOutputFormat.xsl");
+        outputFormatTest.goldName = goldBasePath + "TransformerAPIOutputFormatUTF16.out";
+        outputFormatTestUTF8 = goldBasePath + "TransformerAPIOutputFormatUTF8.out";
+
+        htmlFormatTest.xmlName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIHTMLFormat.xml");
+        htmlFormatTest.inputName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIHTMLFormat.xsl");
+        htmlFormatTest.goldName = goldBasePath + "TransformerAPIHTMLFormat.out";
+
+        multiTest.xmlName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIVar.xml");
+        multiTest.inputName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIVar.xsl");
+        multiTest.goldName = goldBasePath + "TransformerAPIVar.out";
+
+        multi2Test.xmlName = QetestUtils.filenameToURL(testBasePath + "TransformerAPIVar2.xml");
+        multi2Test.goldName = goldBasePath + "TransformerAPIVar2.out";
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(StreamSource.FEATURE)
+                  && tf.getFeature(StreamResult.FEATURE)))
+            {   // The rest of this test relies on Streams only
+                reporter.logErrorMsg("Streams not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Exception e)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, e,
+                                  "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * TRAX Transformer: cover basic get/setParameter(s) APIs.
+     * See {@link ParameterTest ParameterTest} for more 
+     * functional test coverage on setting different kinds 
+     * and types of parameters, etc.
+     * 
+     * @return false if we should abort the test
+     */
+    public boolean testCase1()
+    {
+
+        reporter.testCaseInit(
+            "TRAX Transformer: cover basic get/setParameter(s) APIs");
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        Transformer identityTransformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            identityTransformer = factory.newTransformer();
+            identityTransformer.setErrorListener(new DefaultErrorHandler());
+            templates = factory.newTemplates(new StreamSource(paramTest.inputName));
+        }
+        catch (Exception e)
+        {
+            reporter.checkFail("Problem creating Templates; cannot continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, e, 
+                                  "Problem creating Templates; cannot continue testcase");
+            return true;
+        }
+        // Note: large number of try...catch blocks so that early 
+        // exceptions won't blow out the whole testCase
+        try
+        {
+            // See what the default 'identity' transform has by default
+            Object tmp = identityTransformer.getParameter("This-param-does-not-exist");
+            reporter.checkObject(tmp, null, "This-param-does-not-exist is null by default identityTransformer");
+            // Can you set properties on this transformer?
+            identityTransformer.setParameter("foo", "bar");
+            tmp = identityTransformer.getParameter("foo");
+            if (tmp == null)
+            {
+                reporter.checkFail("identityTransformer set/getParameter is:" + tmp);
+            }
+            else
+            {
+                reporter.checkString((String)tmp, "bar", "identityTransformer set/getParameter value: " + tmp);
+                reporter.check((tmp instanceof String), true, "identityTransformer set/getParameter datatype");
+            }
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e, "Problem(1) with identity parameters");
+            reporter.checkFail("Problem(1) with identity parameters");
+        }
+
+        try
+        {
+            transformer = templates.newTransformer(); // may throw TransformerConfigurationException
+            transformer.setErrorListener(new DefaultErrorHandler());
+            // Default Transformer should not have any parameters..
+            Object tmp = transformer.getParameter("This-param-does-not-exist");
+            reporter.checkObject(tmp, null, "This-param-does-not-exist is null by default");
+            //  .. including params in the stylesheet
+            tmp = transformer.getParameter(PARAM1S);
+            if (tmp == null)
+            {   // @todo should use checkObject instead of this if... construct
+                reporter.checkPass(PARAM1S + " is null by default");
+            }
+            else
+            {
+                reporter.checkFail(PARAM1S + " is " + tmp + " by default");
+            }
+
+            // Verify simple set/get of a single parameter - String
+            transformer.setParameter(PARAM1S, "new value1s");
+            reporter.logTraceMsg("Just reset " + PARAM1S + " to new value1s");
+            tmp = transformer.getParameter(PARAM1S);    // SPR SCUU4QWTVZ - returns an XString - fixed
+            if (tmp == null)
+            {
+                reporter.checkFail(PARAM1S + " is still set to null!");
+            }
+            else
+            {   // Validate SPR SCUU4QWTVZ - should return the same type you set
+                if (tmp instanceof String)
+                {
+                    reporter.checkString((String)tmp, "new value1s", PARAM1S + " is now set to ?" + tmp + "?");
+                }
+                else
+                {
+                    reporter.checkFail(PARAM1S + " is now ?" + tmp + "?, isa " + tmp.getClass().getName());
+                }
+            }
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e, "Problem(2) set/getParameter testing");
+            reporter.checkFail("Problem(2) set/getParameter testing");
+        }
+
+        try
+        {
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            // Verify simple set/get of a single parameter - Integer
+            transformer.setParameter(PARAM3S, new Integer(1234));
+            reporter.logTraceMsg("Just set " + PARAM3S + " to Integer(1234)");
+            Object tmp = transformer.getParameter(PARAM3S);    // SPR SCUU4QWTVZ - returns an XObject - fixed
+            if (tmp == null)
+            {
+                reporter.checkFail(PARAM3S + " is still set to null!");
+            }
+            else
+            {   // Validate SPR SCUU4QWTVZ - should return the same type you set
+                if (tmp instanceof Integer)
+                {
+                    reporter.checkObject(tmp, new Integer(1234), PARAM3S + " is now set to ?" + tmp + "?");
+                }
+                else
+                {
+                    reporter.checkFail(PARAM3S + " is now ?" + tmp + "?, isa " + tmp.getClass().getName());
+                }
+            }
+
+            // Verify simple re-set/get of a single parameter - new Integer
+            transformer.setParameter(PARAM3S, new Integer(99));   // SPR SCUU4R3JGY - can't re-set
+            reporter.logTraceMsg("Just reset " + PARAM3S + " to new Integer(99)");
+            tmp = null;
+            tmp = transformer.getParameter(PARAM3S);
+            if (tmp == null)
+            {
+                reporter.checkFail(PARAM3S + " is still set to null!");
+            }
+            else
+            {   // Validate SPR SCUU4QWTVZ - should return the same type you set
+                if (tmp instanceof Integer)
+                {
+                    reporter.checkObject(tmp, new Integer(99), PARAM3S + " is now set to ?" + tmp + "?");
+                }
+                else
+                {
+                    reporter.checkFail(PARAM3S + " is now ?" + tmp + "?, isa " + tmp.getClass().getName());
+                }
+            }
+
+            // Verify simple re-set/get of a single parameter - now a new String
+            transformer.setParameter(PARAM3S, "new value3s");
+            reporter.logTraceMsg("Just reset " + PARAM3S + " to new value3s");
+            tmp = null;
+            tmp = transformer.getParameter(PARAM3S);
+            if (tmp == null)
+            {
+                reporter.checkFail(PARAM3S + " is still set to null!");
+            }
+            else
+            {   // Validate SPR SCUU4QWTVZ - should return the same type you set
+                if (tmp instanceof String)
+                {
+                    reporter.checkString((String)tmp, "new value3s", PARAM3S + " is now set to ?" + tmp + "?");
+                }
+                else
+                {
+                    reporter.checkFail(PARAM3S + " is now ?" + tmp + "?, isa " + tmp.getClass().getName());
+                }
+            }
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e, "Problem(3) set/getParameters testing");
+            reporter.checkFail("Problem(3) set/getParameters testing");
+        }
+
+        try
+        {
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            transformer.setParameter(PARAM1S, "'test-param-1s'"); // note single quotes
+            transformer.setParameter(PARAM1N, new Integer(1234));
+            // Verify basic params actually affect transformation
+            //   Use the transformer we set the params onto above!
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            if (doTransform(transformer,
+                            new StreamSource(paramTest.xmlName), 
+                            new StreamResult(fos)))
+            {
+                fos.close(); // must close ostreams we own
+                // @todo should update goldFile!
+                if (Logger.PASS_RESULT
+                    != fileChecker.check(reporter, 
+                        new File(outNames.currentName()), 
+                        new File(paramTest.goldName), 
+                        "transform with param1s,param1n into: " + outNames.currentName())
+                   )
+                    reporter.logInfoMsg("transform with param1s,param1n failure reason:" + fileChecker.getExtendedInfo());
+            }
+            String gotStr = (String)transformer.getParameter(PARAM1S);
+            reporter.check(gotStr, "'test-param-1s'", 
+                           PARAM1S + " is still set after transform to ?" + gotStr + "?");
+            Integer gotInt = (Integer)transformer.getParameter(PARAM1N);
+            reporter.checkInt(gotInt.intValue(), 1234, 
+                           PARAM1N + " is still set after transform to ?" + gotInt + "?");
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e, "Problem(4) with parameter transform");
+            reporter.checkFail("Problem(4) with parameter transform");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * API coverage test of Transformer.set/getOutputProperty()
+     * See {@link OutputPropertiesTest} for more coverage on setting 
+     * different kinds of outputs, etc.
+     * 
+     * @return false if we should abort the test
+     */
+    public boolean testCase2()
+    {
+        //@todo I can't decide how to split tests up between 
+        //  testCase2/testCase3 - they really should be reorganized
+        reporter.testCaseInit("API coverage test of Transformer.set/getOutputProperty()");
+        TransformerFactory factory = null;
+        Templates outputTemplates = null;
+        Transformer outputTransformer = null;
+        Templates htmlTemplates = null;
+        Transformer htmlTransformer = null;
+        Templates identityTemplates = null;
+        Transformer identityTransformer = null; // an .xsl file defining an identity transform
+        Transformer defaultTransformer = null; // the default 'identity' transform
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            outputTemplates = factory.newTemplates(new StreamSource(outputFormatTest.inputName));
+            outputTransformer = outputTemplates.newTransformer();
+            outputTransformer.setErrorListener(new DefaultErrorHandler());
+
+            htmlTemplates = factory.newTemplates(new StreamSource(htmlFormatTest.inputName));
+            htmlTransformer = htmlTemplates.newTransformer();
+            htmlTransformer.setErrorListener(new DefaultErrorHandler());
+
+            identityTemplates = factory.newTemplates(new StreamSource(simpleTest.inputName));
+            identityTransformer = identityTemplates.newTransformer();
+            identityTransformer.setErrorListener(new DefaultErrorHandler());
+
+            defaultTransformer = factory.newTransformer();
+            defaultTransformer.setErrorListener(new DefaultErrorHandler());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating Templates; cannot continue");
+            reporter.logThrowable(reporter.ERRORMSG, t, 
+                                  "Problem creating Templates; cannot continue");
+            return true;
+        }
+
+        try
+        {
+            // See what the default 'identity' transform has by default
+            Properties defaultProps = defaultTransformer.getOutputProperties(); // SPR SCUU4RXQYH throws npe
+            reporter.logHashtable(reporter.STATUSMSG, defaultProps, 
+                                  "default defaultTransformer.getOutputProperties()");
+
+            // Check that the local stylesheet.getProperty has default set, cf. getOutputProperties javadoc
+            reporter.check(("xml".equals(defaultProps.getProperty(OutputKeys.METHOD))), true, "defaultTransformer.op.getProperty(" 
+                           + OutputKeys.METHOD + ") is default value, act: " + defaultProps.getProperty(OutputKeys.METHOD));
+            // Check that the local stylesheet.get has nothing set, cf. getOutputProperties javadoc
+            reporter.check((null == defaultProps.get(OutputKeys.METHOD)), true, "defaultTransformer.op.get(" 
+                           + OutputKeys.METHOD + ") is null value, act: " + defaultProps.get(OutputKeys.METHOD));
+
+            // Can you set properties on this transformer?
+            defaultTransformer.setOutputProperty(OutputKeys.METHOD, "text");
+            reporter.logTraceMsg("Just defaultTransformer setOutputProperty(method,text)");
+            String tmp = defaultTransformer.getOutputProperty(OutputKeys.METHOD); // SPR SCUU4R3JPH - throws npe
+            reporter.check(tmp, "text", "defaultTransformer set/getOutputProperty, is ?" + tmp + "?");
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e, "Problem(1) with default output property");
+            reporter.checkFail("Problem(1) with default output property", "SCUU4RXQYH");
+        }
+
+        try
+        {
+            // See what the our .xsl file 'identity' transform has
+            Properties identityProps = identityTransformer.getOutputProperties();
+            reporter.logHashtable(reporter.STATUSMSG, identityProps, 
+                                  "default identityTransformer.getOutputProperties()");
+
+            // Check that the local stylesheet.getProperty has default set, cf. getOutputProperties javadoc
+            reporter.check(("xml".equals(identityProps.getProperty(OutputKeys.METHOD))), true, "identityTransformer.op.getProperty(" 
+                           + OutputKeys.METHOD + ") is default value, act: " + identityProps.getProperty(OutputKeys.METHOD));
+            // Check that the local stylesheet.get has nothing set, cf. getOutputProperties javadoc
+            reporter.check((null == identityProps.get(OutputKeys.METHOD)), true, "identityTransformer.op.get(" 
+                           + OutputKeys.METHOD + ") is null value, act: " + identityProps.get(OutputKeys.METHOD));
+
+            // Check that the local stylesheet.getProperty has default set, cf. getOutputProperties javadoc
+            reporter.check(("no".equals(identityProps.getProperty(OutputKeys.INDENT))), true, "identityTransformer.op.getProperty(" 
+                           + OutputKeys.INDENT + ") is default value, act: " + identityProps.getProperty(OutputKeys.INDENT));
+            // Check that the local stylesheet.get has nothing set, cf. getOutputProperties javadoc
+            reporter.check((null == (identityProps.get(OutputKeys.INDENT))), true, "identityTransformer.op.get(" 
+                           + OutputKeys.INDENT + ") is default value, act: " + identityProps.get(OutputKeys.INDENT));
+
+            // Can you set properties on this transformer?
+            defaultTransformer.setOutputProperty(OutputKeys.METHOD, "text");
+            reporter.logTraceMsg("Just identityTransformer setOutputProperty(method,text)");
+            String tmp = defaultTransformer.getOutputProperty(OutputKeys.METHOD); // SPR SCUU4R3JPH - throws npe
+            reporter.check(tmp, "text", "identityTransformer set/getOutputProperty, is ?" + tmp + "?");
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e, "Problem(2) with identity output property");
+            reporter.checkFail("Problem(2) with identity output property");
+        }
+
+        try
+        {
+            // See what the our html-format output has
+            Properties htmlProps = htmlTransformer.getOutputProperties();
+            reporter.logHashtable(reporter.STATUSMSG, htmlProps, 
+                                  "default htmlTransformer.getOutputProperties()");
+
+            // Check that the local stylesheet.getProperty has stylesheet val set, cf. getOutputProperties javadoc
+            reporter.check(("html".equals(htmlProps.getProperty(OutputKeys.METHOD))), true, "htmlTransformer.op.getProperty(" 
+                           + OutputKeys.METHOD + ") is stylesheet value, act: " + htmlProps.getProperty(OutputKeys.METHOD));
+            // Check that the local stylesheet.get has stylesheet val set, cf. getOutputProperties javadoc
+            reporter.check(("html".equals(htmlProps.get(OutputKeys.METHOD))), true, "htmlTransformer.op.get(" 
+                           + OutputKeys.METHOD + ") is stylesheet value, act: " + htmlProps.get(OutputKeys.METHOD));
+
+            // Check that the local stylesheet.getProperty has default set, cf. getOutputProperties javadoc
+            reporter.check(("yes".equals(htmlProps.getProperty(OutputKeys.INDENT))), true, "htmlTransformer.op.getProperty(" 
+                           + OutputKeys.INDENT + ") is default value, act: " + htmlProps.getProperty(OutputKeys.INDENT));
+            // Check that the local stylesheet.get has nothing set, cf. getOutputProperties javadoc
+            reporter.check((null == (htmlProps.get(OutputKeys.INDENT))), true, "htmlTransformer.op.get(" 
+                           + OutputKeys.INDENT + ") is default value, act: " + htmlProps.get(OutputKeys.INDENT));
+
+            // Can you set properties on this transformer?
+            defaultTransformer.setOutputProperty(OutputKeys.METHOD, "text");
+            reporter.logTraceMsg("Just htmlTransformer setOutputProperty(method,text)");
+            String tmp = defaultTransformer.getOutputProperty(OutputKeys.METHOD); // SPR SCUU4R3JPH - throws npe
+            reporter.check(tmp, "text", "htmlTransformer set/getOutputProperty, is ?" + tmp + "?");
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e, "Problem(3) with html output property");
+            reporter.checkFail("Problem(3) with html output property");
+        }
+
+        try
+        {
+            // See what our outputTemplates parent has
+            Properties tmpltProps = outputTemplates.getOutputProperties();
+            reporter.logHashtable(reporter.STATUSMSG, tmpltProps, 
+                                  "default outputTemplates.getOutputProperties()");
+
+            // See what we have by default, from our testfile
+            outputTransformer = outputTemplates.newTransformer();
+            outputTransformer.setErrorListener(new DefaultErrorHandler());
+            try
+            {
+                // Inner try-catch
+                Properties outProps = outputTransformer.getOutputProperties(); // SPR SCUU4RXQYH throws npe
+                reporter.logHashtable(reporter.STATUSMSG, outProps, 
+                                      "default outputTransformer.getOutputProperties()");
+
+                // Validate the two have the same properties (which they 
+                //  should, since we just got the templates now)
+                for (Enumeration names = tmpltProps.propertyNames();
+                        names.hasMoreElements(); /* no increment portion */ )
+                {
+                    String key = (String)names.nextElement();
+                    String value = tmpltProps.getProperty(key);
+                    reporter.check(value, outProps.getProperty(key), 
+                                   "Template, transformer identical outProp: " + key);
+                }
+            
+                // Validate known output properties from our testfile
+                String knownOutputProps[][] =
+                {
+                    { OutputKeys.METHOD, METHOD_VALUE },
+                    { OutputKeys.VERSION, VERSION_VALUE },
+                    { OutputKeys.ENCODING, ENCODING_VALUE },
+                    { OutputKeys.STANDALONE, STANDALONE_VALUE },
+                    { OutputKeys.DOCTYPE_PUBLIC, DOCTYPE_PUBLIC_VALUE }, // SPR SCUU4R3JRR - not returned
+                    { OutputKeys.DOCTYPE_SYSTEM, DOCTYPE_SYSTEM_VALUE }, // SPR SCUU4R3JRR - not returned
+                    { OutputKeys.CDATA_SECTION_ELEMENTS, CDATA_SECTION_ELEMENTS_VALUE }, // SPR SCUU4R3JRR - not returned
+                    { OutputKeys.INDENT, INDENT_VALUE },
+                    { OutputKeys.MEDIA_TYPE, MEDIA_TYPE_VALUE },
+                    { OutputKeys.OMIT_XML_DECLARATION, OMIT_XML_DECLARATION_VALUE }
+                };
+
+                for (int i = 0; i < knownOutputProps.length; i++)
+                {
+                    String item = outProps.getProperty(knownOutputProps[i][0]);
+                    reporter.check(item, knownOutputProps[i][1], 
+                                   "Known prop(1) " + knownOutputProps[i][0] 
+                                   + " is: ?" + item + "?");
+                }
+                reporter.logStatusMsg("@todo validate getting individual properties");
+            }
+            catch (Exception e)
+            {
+                reporter.logThrowable(reporter.ERRORMSG, e, "Problem(a1) with set/get output properties");
+                reporter.checkFail("Problem(a1) with set/get output properties", "SCUU4RXQYH");
+            }
+
+            /*
+            NOTE (SB):
+            Shane omits the xml-decl in the stylesheet, which I don't think 
+            will create a valid XML with UTF-16 encoding (I could be wrong).  
+            Also, Xerces 1.2.3 is pretty broken for UTF-16 right now.
+            So just comment this out for the moment.
+            
+            // Try doing a transform (will be UTF-16), to get some output
+            if (doTransform(outputTransformer, 
+                            new StreamSource(outputFormatTest.xmlName), 
+                            new StreamResult(new FileOutputStream(outNames.nextName()))))
+            {
+                // @todo should update goldFile!
+                fileChecker.check(reporter, 
+                                  new File(outNames.currentName()), 
+                                  new File(outputFormatTest.goldName), 
+                                  "transform(UTF-16,1) outputParams into: " + outNames.currentName());
+            }
+            */
+
+            // Change a single property (makes for simpler encoding output!)
+            outputTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            String encoding = outputTransformer.getOutputProperty(OutputKeys.ENCODING);
+            reporter.check(encoding, "UTF-8", "outputTransformer set/getOutputProperty value to ?" + encoding + "?");
+            // Try doing another transform (will be UTF-8), to get some output
+            // Verify that other output properties stay the same
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            if (doTransform(outputTransformer, 
+                            new StreamSource(outputFormatTest.xmlName), 
+                            new StreamResult(fos)))
+            {
+                fos.close(); // must close ostreams we own
+                // @todo should update goldFile!
+                if (Logger.PASS_RESULT
+                    != fileChecker.check(reporter, 
+                        new File(outNames.currentName()), 
+                        new File(outputFormatTestUTF8), 
+                        "transform(UTF-8) outputParams into: " + outNames.currentName())
+                   )
+                    reporter.logInfoMsg("transform(UTF-8) outputParams failure reason:" + fileChecker.getExtendedInfo());
+            }
+            // Try getting the whole block and logging it out, just to see what's there
+            Properties moreOutProps = outputTransformer.getOutputProperties();
+            reporter.logHashtable(reporter.STATUSMSG, moreOutProps, 
+                                  "After several transforms getOutputProperties()");
+
+            try
+            {   // Inner try-catch
+                // Simple set/getOutputProperty
+                outputTransformer = outputTemplates.newTransformer();
+                outputTransformer.setErrorListener(new DefaultErrorHandler());
+                String tmp = outputTransformer.getOutputProperty(OutputKeys.OMIT_XML_DECLARATION); // SPR SCUU4RXR6E
+                    // SPR SCUU4R3JZ7 - throws npe
+                reporter.logTraceMsg(OutputKeys.OMIT_XML_DECLARATION + " is currently: " + tmp);
+                outputTransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
+                tmp = outputTransformer.getOutputProperty(OutputKeys.OMIT_XML_DECLARATION);
+                reporter.check(tmp, "no", "outputTransformer set/getOutputProperty value to ?" + tmp + "?");
+            }
+            catch (Exception e)
+            {
+                reporter.logThrowable(reporter.ERRORMSG, e, "Problem(a2) with set/get output properties");
+                reporter.checkFail("Problem(a2) with set/get output properties", "SCUU4RXR6E");
+            }
+            try
+            {   // Inner try-catch
+                // Try getting the whole properties block, so we can see what it thinks it has
+                outputTransformer = outputTemplates.newTransformer();
+                outputTransformer.setErrorListener(new DefaultErrorHandler());
+                Properties newOutProps = outputTransformer.getOutputProperties();
+                reporter.logHashtable(reporter.STATUSMSG, newOutProps, 
+                                      "Another getOutputProperties()");
+
+                // Simple set/getOutputProperty
+                String tmp = outputTransformer.getOutputProperty(OutputKeys.ENCODING);
+                reporter.logTraceMsg(OutputKeys.ENCODING + " is currently: " + tmp);
+                outputTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+                tmp = outputTransformer.getOutputProperty(OutputKeys.ENCODING);
+                reporter.check(tmp, "UTF-8", "outputTransformer set/getOutputProperty value to ?" + tmp + "?");
+            }
+            catch (Exception e)
+            {
+                reporter.logThrowable(reporter.ERRORMSG, e,
+                                      "Problem(a3) with set/get output property");
+            }
+
+            // OutputKeys.METHOD = xml|html|text|qname-but-not-ncname
+            // OutputKeys.VERSION = number
+            // OutputKeys.ENCODING = string
+            // OutputKeys.OMIT_XML_DECLARATION = yes|no
+            // OutputKeys.STANDALONE = yes|no
+            // OutputKeys.DOCTYPE_PUBLIC = string
+            // OutputKeys.DOCTYPE_SYSTEM = string
+            // OutputKeys.CDATA_SECTION_ELEMENTS = qnames
+            // OutputKeys.INDENT = qnames
+            // OutputKeys.MEDIA_TYPE = qnames
+            // OutputKeys.CDATA_SECTION_ELEMENTS = qnames
+
+            reporter.logTraceMsg("//@todo Cover setOutputProperties(Properties oformat)");
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e,
+                                  "Problem(4) with set/get output properties");
+            reporter.checkFail("Problem(4) with set/get output properties");
+        }
+
+        reporter.logTraceMsg("//@todo: Negative testing: various illegal arguments, etc. - in separate testcase");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * API coverage test of Transformer.set/getOutputProperties()
+     * See {@link OutputPropertiesTest} for more coverage on setting 
+     * different kinds of outputs, etc.
+     * 
+     * @return false if we should abort the test
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("API coverage test of Transformer.set/getOutputProperties()");
+        TransformerFactory factory = null;
+        Templates outputTemplates = null;
+        Transformer outputTransformer = null;
+        Transformer identityTransformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            identityTransformer = factory.newTransformer();
+            identityTransformer.setErrorListener(new DefaultErrorHandler());
+            outputTemplates = factory.newTemplates(new StreamSource(outputFormatTest.inputName));
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating Templates; cannot continue");
+            reporter.logThrowable(reporter.ERRORMSG, t, 
+                                  "Problem creating Templates; cannot continue");
+            return true;
+        }
+        try
+        {
+            // See what the default 'identity' transform has by default
+            Properties identityProps = identityTransformer.getOutputProperties(); // SPR SCUU4RXQYH throws npe
+            reporter.check((null != identityProps), true, "identityTransformer.getOutputProperties() is non-null");
+            reporter.logHashtable(reporter.STATUSMSG, identityProps, 
+                                  "default identityTransformer.getOutputProperties()");
+        } 
+        catch (Exception e)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, e,
+                                  "Problem with identity OutputProperties");
+            reporter.checkFail("Problem with identity OutputProperties", "SCUU4RXQYH");
+        }
+
+        reporter.logTraceMsg("//@todo: coverage of non-identity transformers and set/get of props");
+        reporter.testCaseClose();
+        return true;
+    } // end testCase3
+
+
+    /**
+     * Negative tests of Transformer.set/getOutputProperty/ies()
+     * 
+     * @return false if we should abort the test
+     */
+    public boolean testCase4()
+    {
+        reporter.testCaseInit("Negative tests of Transformer.set/getOutputProperty/ies()");
+        TransformerFactory factory = null;
+        Templates outputTemplates = null;
+        Transformer outputTransformer = null;
+        Transformer identityTransformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            identityTransformer = factory.newTransformer();
+            identityTransformer.setErrorListener(new DefaultErrorHandler());
+            outputTemplates = factory.newTemplates(new StreamSource(outputFormatTest.inputName));
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating Templates; cannot continue");
+            reporter.logThrowable(reporter.ERRORMSG, t, 
+                                  "Problem creating Templates; cannot continue");
+            return true;
+        }
+
+        GetOutputPropertyTestlet testlet = new GetOutputPropertyTestlet();
+        reporter.logTraceMsg("Using GetOutputPropertyTestlet for negative tests");
+        testlet.setLogger(reporter);
+
+        // Negative tests of getOutputProperty()
+        GetOutputPropertyDatalet datalet = new GetOutputPropertyDatalet();
+        reporter.logTraceMsg("Using GetOutputPropertyDatalet for negative tests");
+
+        try
+        {
+            datalet.transformer = identityTransformer;
+            datalet.propName = "bogus-name";
+            datalet.expectedValue = null;
+            datalet.expectedException = "java.lang.IllegalArgumentException";
+            datalet.setDescription("bogus-name identityTransformer throws IllegalArgumentException");
+            testlet.execute(datalet);
+            
+            datalet.transformer = identityTransformer;
+            datalet.propName = "bogus-{name}";
+            datalet.expectedValue = null;
+            datalet.expectedException = "java.lang.IllegalArgumentException";
+            datalet.setDescription("bogus-{name} throws IllegalArgumentException");
+            testlet.execute(datalet);
+
+            datalet.transformer = identityTransformer;
+            datalet.propName = "{bogus-name";
+            datalet.expectedValue = null;
+            datalet.expectedException = "java.lang.IllegalArgumentException";
+            datalet.setDescription("{bogus-name throws IllegalArgumentException (bracket not closed)");
+            testlet.execute(datalet); 
+            
+            datalet.transformer = identityTransformer;
+            datalet.propName = "{some-namespace}bogus-name";
+            datalet.expectedValue = datalet.NULL_VALUE_EXPECTED;
+            datalet.expectedException = null;
+            datalet.setDescription("{some-namespace}bogus-name returns null");
+            testlet.execute(datalet);
+
+            datalet.transformer = identityTransformer;
+            datalet.propName = "{just-some-namespace}";
+            datalet.expectedValue = datalet.NULL_VALUE_EXPECTED;
+            datalet.expectedException = null;
+            datalet.setDescription("{just-some-namespace}bogus-name returns null");
+            testlet.execute(datalet);
+
+            datalet.transformer = identityTransformer;
+            datalet.propName = "{}no-namespace-at-all";
+            datalet.expectedValue = datalet.NULL_VALUE_EXPECTED;
+            datalet.expectedException = null;
+            datalet.setDescription("{}no-namespace-at-all returns null (is this correct?)");
+            testlet.execute(datalet);
+
+            datalet.transformer = identityTransformer;
+            datalet.propName = OutputKeys.METHOD;
+            datalet.expectedValue = "xml";
+            datalet.expectedException = null;
+            datalet.setDescription(OutputKeys.METHOD + " returns xml on identity transformer (is this really correct?)");
+            testlet.execute(datalet);
+            
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.STATUSMSG, t, "Problem(1) with negative identityTransformer getOutputProperty");
+            reporter.checkErr("Problem(1) with negative identityTransformer getOutputProperty: " + t.toString());
+        }
+        try
+        {
+            datalet.transformer = outputTemplates.newTransformer();
+            datalet.propName = "bogus-name";
+            datalet.expectedValue = null;
+            datalet.expectedException = "java.lang.IllegalArgumentException";
+            datalet.setDescription("bogus-name regular transformer throws IllegalArgumentException");
+            testlet.execute(datalet);
+            
+            datalet.transformer = outputTemplates.newTransformer();
+            datalet.propName = "bogus-{name}";
+            datalet.expectedValue = null;
+            datalet.expectedException = "java.lang.IllegalArgumentException";
+            datalet.setDescription("bogus-{name} throws IllegalArgumentException");
+            testlet.execute(datalet);
+
+            datalet.transformer = outputTemplates.newTransformer();
+            datalet.propName = "{bogus-name";
+            datalet.expectedValue = null;
+            datalet.expectedException = "java.lang.IllegalArgumentException";
+            datalet.setDescription("{bogus-name throws IllegalArgumentException (bracket not closed)");
+            /* testlet.execute(datalet); comment out 10-May-01 -sc Bugzilla 890 */
+            /* This is a fairly unimportant bug that may well be 
+               fixed in the javadoc, so I'm commenting this case 
+               out so we can run this test in the smoketest and 
+               get more regular coverage of it! */
+
+            datalet.transformer = outputTemplates.newTransformer();
+            datalet.propName = "{some-namespace}bogus-name";
+            datalet.expectedValue = datalet.NULL_VALUE_EXPECTED;
+            datalet.expectedException = null;
+            datalet.setDescription("{some-namespace}bogus-name returns null");
+            testlet.execute(datalet);
+
+            datalet.transformer = outputTemplates.newTransformer();
+            datalet.propName = "{just-some-namespace}";
+            datalet.expectedValue = datalet.NULL_VALUE_EXPECTED;
+            datalet.expectedException = null;
+            datalet.setDescription("{just-some-namespace}bogus-name returns null");
+            testlet.execute(datalet);
+
+            datalet.transformer = outputTemplates.newTransformer();
+            datalet.propName = "{}no-namespace-at-all";
+            datalet.expectedValue = datalet.NULL_VALUE_EXPECTED;
+            datalet.expectedException = null;
+            datalet.setDescription("{}no-namespace-at-all returns null (is this correct?)");
+            testlet.execute(datalet);
+
+            datalet.transformer = outputTemplates.newTransformer();
+            datalet.propName = OutputKeys.METHOD;
+            datalet.expectedValue = METHOD_VALUE;
+            datalet.expectedException = null;
+            datalet.setDescription(OutputKeys.METHOD + " returns " + METHOD_VALUE + " on transformer");
+            testlet.execute(datalet);
+            
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.STATUSMSG, t, "Problem(2) with negative transformer getOutputProperty");
+            reporter.checkErr("Problem(2) with negative transformer getOutputProperty: " + t.toString());
+        }
+
+        reporter.testCaseClose();
+        return true;
+    } // end testCase4
+
+
+    /**
+     * TRAX Transformer: cover transform() API and multiple 
+     * Transformations from single transformer.  
+     * 
+     * Note: obviously as the most important API, transform() is 
+     * also covered in many other API tests as well as in various 
+     * Stylesheet*Testlet tests.
+     * 
+     * @return false if we should abort the test
+     */
+    public boolean testCase5()
+    {
+        reporter.testCaseInit(
+            "TRAX Transformer: cover multiple calls to transform()");
+        TransformerFactory factory = null;
+        Templates templates = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.STATUSMSG, t, "Can't continue testcase, factory.newInstance threw:");
+            reporter.checkErr("Can't continue testcase, factory.newInstance threw: " + t.toString());
+            return true;
+        }
+
+        try
+        {
+            Transformer transformer = factory.newTransformer(new StreamSource(simpleTest.inputName));
+            transformer.setErrorListener(new DefaultErrorHandler());
+            // Re-use the transformer multiple times on identity
+            transformer.transform(new StreamSource(simpleTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            fileChecker.check(reporter, 
+                new File(outNames.currentName()), 
+                new File(simpleTest.goldName), 
+                "transform(#1) identity into: " + outNames.currentName());
+
+            transformer.transform(new StreamSource(simpleTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            fileChecker.check(reporter, 
+                new File(outNames.currentName()), 
+                new File(simpleTest.goldName), 
+                "transform(#2) identity into: " + outNames.currentName());
+
+            transformer.transform(new StreamSource(simpleTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            fileChecker.check(reporter, 
+                new File(outNames.currentName()), 
+                new File(simpleTest.goldName), 
+                "transform(#3) identity into: " + outNames.currentName());
+            
+            transformer = factory.newTransformer(new StreamSource(multiTest.inputName));
+            transformer.setErrorListener(new DefaultErrorHandler());
+            // Re-use the transformer multiple times on file with variable
+            transformer.transform(new StreamSource(multiTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            fileChecker.check(reporter, 
+                new File(outNames.currentName()), 
+                new File(multiTest.goldName), 
+                "transform(#1-a) var test into: " + outNames.currentName());
+
+            transformer.transform(new StreamSource(multiTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            fileChecker.check(reporter, 
+                new File(outNames.currentName()), 
+                new File(multiTest.goldName), 
+                "transform(#2-a) var test into: " + outNames.currentName());
+
+            // Reset the transformer to its original state
+            transformer.reset();
+            
+            transformer.transform(new StreamSource(multiTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            fileChecker.check(reporter, 
+                new File(outNames.currentName()), 
+                new File(multiTest.goldName), 
+                "transform(#3-a) var test into: " + outNames.currentName());
+
+            // Now re-use with different xml doc
+            transformer.transform(new StreamSource(multi2Test.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            fileChecker.check(reporter, 
+                new File(outNames.currentName()), 
+                new File(multi2Test.goldName), 
+                "transform(#4-b) var test into: " + outNames.currentName());
+
+            // Reset the transformer to its original state
+            transformer.reset();
+
+            // Now re-use with original xml doc
+            transformer.transform(new StreamSource(multiTest.xmlName), 
+                                  new StreamResult(outNames.nextName()));
+            fileChecker.check(reporter, 
+                new File(outNames.currentName()), 
+                new File(multiTest.goldName), 
+                "transform(#5-a) var test into: " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.WARNINGMSG, t, "Multiple transform() calls threw");
+            reporter.checkErr("Multiple transform() calls threw: " + t.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * TRAX Transformer: cover set/getURIResolver() API; 
+     * plus set/getErrorListener() API.
+     *
+     * Note: These are simply coverage tests for these api's, 
+     * for feature testing see links below 
+     * 
+     * @see ErrorListenerTest
+     * @see ErrorListenerAPITest
+     * @see URIResolverTest
+     * @return false if we should abort the test
+     */
+    public boolean testCase6()
+    {
+        reporter.testCaseInit(
+            "TRAX Transformer: cover transform() and set/getURIResolver API and functionality");
+        TransformerFactory factory = null;
+        Templates templates = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            // Grab a stylesheet to use for this testcase
+            factory.setErrorListener(new DefaultErrorHandler());
+            templates = factory.newTemplates(new StreamSource(simpleTest.inputName));
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Can't continue testcase, factory.newInstance threw: " + t.toString());
+            reporter.logThrowable(reporter.STATUSMSG, t, "Can't continue testcase, factory.newInstance threw:");
+            return true;
+        }
+
+        try
+        {
+            Transformer transformer = templates.newTransformer();
+            ErrorListener errListener = transformer.getErrorListener(); // SPR SCUU4R3K6G - is null
+            if (errListener == null)
+            {
+                reporter.checkFail("getErrorListener() non-null by default");
+            }
+            else
+            {
+                reporter.checkPass("getErrorListener() non-null by default, is: " + errListener);
+            }
+            
+            LoggingErrorListener loggingErrListener = new LoggingErrorListener(reporter);
+            transformer.setErrorListener(loggingErrListener);
+            reporter.checkObject(transformer.getErrorListener(), loggingErrListener, "set/getErrorListener API coverage(1)");
+            try
+            {
+                transformer.setErrorListener(null);                
+                reporter.checkFail("setErrorListener(null) worked, should have thrown exception");
+            }
+            catch (IllegalArgumentException iae)
+            {
+                reporter.checkPass("setErrorListener(null) properly threw: " + iae.toString());
+            }
+            // Verify the previous ErrorListener is still set
+            reporter.checkObject(transformer.getErrorListener(), loggingErrListener, "set/getErrorListener API coverage(2)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Coverage of get/setErrorListener threw: " + t.toString());
+            reporter.logThrowable(reporter.STATUSMSG, t, "Coverage of get/setErrorListener threw:");
+        }
+        reporter.logStatusMsg("@todo feature testing for ErrorListener; see ErrorListenerTest, ErrorListenerAPITest");
+
+        try
+        {
+            Transformer transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            // URIResolver should be null by default; try to set/get one
+            reporter.checkObject(transformer.getURIResolver(), null, "getURIResolver is null by default");
+            LoggingURIResolver myURIResolver = new LoggingURIResolver(reporter);
+            transformer.setURIResolver(myURIResolver);
+            reporter.checkObject(transformer.getURIResolver(), myURIResolver, "set/getURIResolver API coverage");
+            reporter.logTraceMsg("myURIres.getQuickCounters = " + myURIResolver.getQuickCounters());
+
+            // Assumes we support Streams
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            if (doTransform(transformer, 
+                            new StreamSource(simpleTest.xmlName), 
+                            new StreamResult(fos)))
+            {
+                fos.close(); // must close ostreams we own
+                fileChecker.check(reporter, 
+                        new File(outNames.currentName()), 
+                        new File(simpleTest.goldName), 
+                        "transform(Stream, Stream) into: " + outNames.currentName());
+            }
+            reporter.logTraceMsg("myURIres.getQuickCounters = " + myURIResolver.getQuickCounters());
+
+            reporter.logStatusMsg("@todo feature testing for URIResolver; see URIResolverTest");
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "TestCase threw:");
+            reporter.checkFail("TestCase threw: " + t.toString());
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method performs transforms (and catches exceptions, etc.)
+     * Side effect: checkFail() if exception thrown
+     *
+     * @param Transformer to use
+     * @param Source to pull in XML from
+     * @param Result to put output in; may be modified
+     * @return false if exception thrown, true otherwise
+     */
+    public boolean doTransform(Transformer t, Source s, Result r)
+    {
+        try
+        {
+            t.transform(s, r);
+            return true;
+        } 
+        catch (TransformerException e)
+        {
+            reporter.checkFail("doTransform threw: " + e.toString());
+            reporter.logThrowable(reporter.ERRORMSG, e, "doTransform threw:");
+            return false;
+        }
+    }
+
+    /** 
+     * Datalet for output property testing.   
+     * Fields: transformer, propName, (expectedValue|expectedException)
+     */
+    public class GetOutputPropertyDatalet implements Datalet
+    {
+        public GetOutputPropertyDatalet() {} // no-op
+        public GetOutputPropertyDatalet(String[] args)
+        {
+            load(args);
+        }
+        public final String IDENTITY = "identity";
+        public final String NULL_VALUE_EXPECTED = "NULL_VALUE_EXPECTED";
+        protected String description = "no data";
+        public String getDescription() { return description; }
+        public void setDescription(String d) { description = d; }
+        public Transformer transformer = null;
+        public String propName = null;
+        public String expectedValue = null;
+        public String expectedException = null;
+        public void load(String[] args)
+        {
+            try
+            {
+                if (IDENTITY.equals(args[0]))
+                    transformer = (TransformerFactory.newInstance()).newTransformer();
+                else
+                    transformer = (TransformerFactory.newInstance()).newTransformer(new StreamSource(args[0]));
+                propName = args[1];
+                String tmp = args[2];
+                // Semi-hack: if it looks like the FQCN of a 
+                //  Throwable derivative, then use one 
+                //  of those; otherwise, assume it's the expected 
+                //  value to get back from getOutputProperty
+                if ((tmp.indexOf("Exception") >= 0) || (tmp.indexOf("Error") >= 0))
+                    expectedException = tmp;
+                else
+                    expectedValue = tmp;
+            }
+            catch (Throwable t)
+            { /* no-op, let it fail elsewhere */
+            }
+        }
+        public void load(Hashtable h)
+        {
+            transformer = (Transformer)h.get("transformer");
+            propName = (String)h.get("propName");
+            expectedValue  = (String)h.get("expectedValue ");
+            expectedException = (String)h.get("expectedException");
+        }
+        
+    } // end class GetOutputPropertyDatalet
+
+    /** 
+     * Calls getOutputProperty() on the Transformer supplied, and 
+     * then either validates the returned String, or the classname 
+     * of any exception thrown.
+     *
+     * This is almost more complex to implement as a Testlet than
+     * is really worth it, but I wanted to experiment with using one.
+     */
+    public class GetOutputPropertyTestlet extends TestletImpl
+    {
+        { thisClassName = "org.apache.qetest.xsl.GetOutputPropertyTestlet"; }
+        public String getDescription() { return "gets OutputProperty and validates"; }
+        public Datalet getDefaultDatalet()
+        {
+            return new GetOutputPropertyDatalet(new String[] { "identity", "method", "xml" });
+        }
+        public void execute(Datalet d)
+        {
+            GetOutputPropertyDatalet datalet = null;
+            try
+            {
+                datalet = (GetOutputPropertyDatalet)d;
+            }
+            catch (ClassCastException e)
+            {
+                logger.checkErr("Datalet provided is not a GetOutputPropertyDatalet; cannot continue");
+                return;
+            }
+            try
+            {
+                // Perform the test
+                String val = datalet.transformer.getOutputProperty(datalet.propName);
+                // Validate non-throwing of expected exceptions
+                if (null != datalet.expectedException)
+                {
+                    logger.checkFail(datalet.getDescription() + ", did not throw:" + datalet.expectedException
+                                     + ", act:" + val);
+                    return;
+                }
+
+                // Validate any return data
+                if (null != val)
+                {
+                    // Check for positive values that exist
+                    if ((null != datalet.expectedValue) 
+                        && datalet.expectedValue.equals(val))
+                        logger.checkPass(datalet.getDescription());
+                    else
+                        logger.checkFail(datalet.getDescription() + " act:" + val 
+                                         + ", exp:" + datalet.expectedValue);
+                }
+                else if (datalet.NULL_VALUE_EXPECTED == datalet.expectedValue)
+                {
+                    // If expectedValue is the special 'null' string, 
+                    //  and we're not expecting an exception, then 
+                    //  we pass here
+                   logger.checkPass(datalet.getDescription());
+                }
+                else
+                {
+                    // Otherwise, we fail
+                    logger.checkFail(datalet.getDescription() + " act:" + val 
+                                     + ", exp:" + datalet.expectedValue);
+                }
+            }
+            catch (Throwable t)
+            {
+                // Validate any Exceptions thrown
+                if (null != datalet.expectedException)
+                {
+                    if (datalet.expectedException.equals(t.getClass().getName()))
+                        logger.checkPass(datalet.getDescription());
+                    else
+                        logger.checkFail(datalet.getDescription() + ", threw:" + t.toString()
+                                         + ", exp:" + datalet.expectedException);
+                }
+                else
+                    logger.checkFail(datalet.getDescription() + ", threw: " + t.toString());
+            }
+        }
+    } // end class GetOutputPropertyTestlet
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return usage string
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by TransformerAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "-processorClassname classname.of.processor  (to override setPlatformDefaultProcessor to Xalan 2.x)\n"
+                + super.usage());
+    }
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TransformerAPITest app = new TransformerAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/TransformerFactoryAPITest.java b/test/java/src/org/apache/qetest/trax/TransformerFactoryAPITest.java
new file mode 100644
index 0000000..6d16947
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/TransformerFactoryAPITest.java
@@ -0,0 +1,706 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TransformerFactoryAPITest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+import org.w3c.dom.Document;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for TransformerFactory class of TRAX.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class TransformerFactoryAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** Basic identity test file for newTransformer, newTemplates.  */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Embedded identity test file for getEmbedded....  */
+    protected XSLTestfileInfo embeddedFileInfo = new XSLTestfileInfo();
+
+    /** Modern test for testCase6.  */
+    protected XSLTestfileInfo embeddedCSSFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+    /** Cached system property.  */
+    protected String cachedSysProp = null;
+
+    /** System property name, from TransformerFactory (why is it private there?).  */
+    public static final String defaultPropName = "javax.xml.transform.TransformerFactory";
+
+    /** System property name for Xalan-J 2.x impl.  */
+    public static final String XALAN_CLASSNAME = "org.apache.xalan.processor.TransformerFactoryImpl";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TransformerFactoryAPITest()
+    {
+        numTestCases = 7;  // REPLACE_num
+        testName = "TransformerFactoryAPITest";
+        testComment = "API Coverage test for TransformerFactory class of TRAX";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * cache system property javax.xml.transform.TransformerFactory.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // NOTE: 'reporter' variable is already initialized at this point
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+
+        testFileInfo.inputName = QetestUtils.filenameToURL(testBasePath + "identity.xsl");
+        testFileInfo.xmlName = QetestUtils.filenameToURL(testBasePath + "identity.xml");
+        testFileInfo.goldName = goldBasePath + "identity.out";
+
+        embeddedFileInfo.xmlName = QetestUtils.filenameToURL(testBasePath + "embeddedIdentity.xml");
+        embeddedFileInfo.goldName = goldBasePath + "embeddedIdentity.out";
+
+        embeddedCSSFileInfo.xmlName = testBasePath + "TransformerFactoryAPIModern.xml"; // just the local path\filename
+        // embeddedCSSFileInfo.optionalName = testBasePath + "TransformerFactoryAPIModern.css"; // other file required by XML file
+
+        // Cache the system property; is reset in testFileClose
+        cachedSysProp = System.getProperty(defaultPropName);
+        return true;
+    }
+
+
+    /**
+     * Cleanup this test - reset cached system property.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileClose(Properties p)
+    {
+        if (cachedSysProp == null)
+            System.getProperties().remove(defaultPropName);
+        else
+            System.getProperties().put(defaultPropName, cachedSysProp);
+        return true;
+    }
+
+
+    /**
+     * Coverage tests for factory pattern API's.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Coverage tests for factory pattern API's");
+
+        // protected TransformerFactory(){} not normally accessible - not tested
+        // public static TransformerFactory newInstance()
+        TransformerFactory factory = null;
+        // test when system property is user-set (i.e. whatever we started with)
+        try
+        {
+            reporter.logStatusMsg("System property " + defaultPropName 
+                                  + " is: " + System.getProperty(defaultPropName));
+            factory = TransformerFactory.newInstance();
+            // No verification: just log what happened for user to see
+            reporter.logStatusMsg("factory.newInstance() is: " + factory.toString());
+        }
+        catch (Throwable t)
+        {
+            reporter.logStatusMsg("factory.newInstance() threw: " + t.toString());
+        }
+
+        // test when system property is null
+        try
+        {
+            System.getProperties().remove(defaultPropName);
+            reporter.logStatusMsg("System property " + defaultPropName 
+                                  + " is: " + System.getProperty(defaultPropName));
+            factory = TransformerFactory.newInstance();
+            reporter.logStatusMsg("factory.newInstance() is: " + factory.toString());
+        }
+        catch (Throwable t)
+        {
+            reporter.logStatusMsg("factory.newInstance() threw: " + t.toString());
+        }
+
+        // test when system property is a bogus name
+        try
+        {
+            System.getProperties().put(defaultPropName, "this.class.does.not.exist");
+            reporter.logStatusMsg("System property " + defaultPropName 
+                                  + " is: " + System.getProperty(defaultPropName));
+            factory = TransformerFactory.newInstance();
+            reporter.checkFail("factory.newInstance() with bogus name got: " + factory.toString());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkPass("factory.newInstance() with bogus name properly threw: " + t.toString());
+            // Could also verify specific type of exception
+        }
+
+        // test when system property is another kind of classname
+        try
+        {
+            System.getProperties().put(defaultPropName, "java.lang.String");
+            reporter.logStatusMsg("System property " + defaultPropName 
+                                  + " is: " + System.getProperty(defaultPropName));
+            factory = TransformerFactory.newInstance();
+            reporter.checkFail("factory.newInstance() with bogus class got: " + factory.toString());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkPass("factory.newInstance() with bogus class properly threw: " + t.toString());
+            // Could also verify specific type of exception
+        }
+
+        // Reset the system property to what was cached previously
+        try
+        {
+            // This should come last so it will stay set for the rest of the test
+            // Note: this needs review, since in the future we may 
+            //  not guaruntee order of testCase execution!
+            if (cachedSysProp == null)
+                System.getProperties().remove(defaultPropName);
+            else
+                System.getProperties().put(defaultPropName, cachedSysProp);
+
+            reporter.logStatusMsg("System property (default) " + defaultPropName 
+                                  + " is: " + System.getProperty(defaultPropName));
+            factory = TransformerFactory.newInstance();
+            reporter.checkPass("factory.newInstance() of default impl is: " + factory.toString());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("factory.newInstance() of default impl threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "factory.newInstance() of default impl threw:");
+        }
+
+        reporter.logStatusMsg("@todo code coverage for findFactory() method");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Coverage tests for newTransformer() API's.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Coverage tests for newTransformer() API's");
+        TransformerFactory factory = null;
+
+        try
+        {
+            reporter.logStatusMsg("System property " + defaultPropName 
+                                  + " is: " + System.getProperty(defaultPropName));
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            Transformer identityTransformer = factory.newTransformer();
+            reporter.check((identityTransformer != null), true, "newTransformer() APICoverage");
+
+            if (factory.getFeature(StreamSource.FEATURE))
+            {
+                Transformer transformer = factory.newTransformer(new StreamSource(testFileInfo.inputName));
+                reporter.check((transformer != null), true, "newTransformer(Source) APICoverage");
+            }
+            else
+                reporter.logErrorMsg("NOTE: getFeature(StreamSource.FEATURE) false, can't test newTransformer(Source)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("newTransformer() tests threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "newTransformer() tests threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Coverage tests for newTemplates() API's.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Coverage tests for newTemplates() API's");
+        TransformerFactory factory = null;
+
+        try
+        {
+            reporter.logStatusMsg("System property " + defaultPropName 
+                                  + " is: " + System.getProperty(defaultPropName));
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            if (factory.getFeature(StreamSource.FEATURE))
+            {
+                Templates templates = factory.newTemplates(new StreamSource(testFileInfo.inputName));
+                reporter.check((templates != null), true, "newTemplates(Source) APICoverage");
+            }
+            else
+                reporter.logErrorMsg("NOTE: getFeature(StreamSource.FEATURE) false, can't test newTemplates(Source)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("newTemplates() tests threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "newTemplates() tests threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Coverage tests for getAssociatedStylesheet() API's.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase4()
+    {
+        reporter.testCaseInit("Coverage tests for getAssociatedStylesheet() API's");
+        TransformerFactory factory = null;
+
+        try
+        {
+            reporter.logStatusMsg("System property " + defaultPropName 
+                                  + " is: " + System.getProperty(defaultPropName));
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            String media= null;     // currently untested
+            String title = null;    // currently untested
+            String charset = null;  // currently untested
+
+            // May throw IOException
+            FileOutputStream resultStream = new FileOutputStream(outNames.nextName());
+
+            // Get the xml-stylesheet and process it
+            Source stylesheet = factory.getAssociatedStylesheet(new StreamSource(embeddedFileInfo.xmlName), 
+                                                                media, title, charset);
+            reporter.check((stylesheet instanceof Source), true, "getAssociatedStylesheet returns instanceof Source");
+            reporter.check((null != stylesheet), true, "getAssociatedStylesheet returns a non-null Source");
+
+            Transformer transformer = factory.newTransformer(stylesheet);
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.logCriticalMsg("SPR SCUU4RXTSQ occours in below line, even though check reports pass (missing linefeed)");
+            transformer.transform(new StreamSource(embeddedFileInfo.xmlName), new StreamResult(resultStream));
+            resultStream.close();   // just in case
+            int result = fileChecker.check(reporter, 
+                                           new File(outNames.currentName()), 
+                                           new File(embeddedFileInfo.goldName), 
+                                          "transform of getAssociatedStylesheet into " + outNames.currentName());
+            if (result == Logger.FAIL_RESULT)
+                reporter.logInfoMsg("transform of getAssociatedStylesheet... failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "getAssociatedStylesheet() tests threw:");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Coverage tests for get/setURIResolver(), get/setErrorListener() API's.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase5()
+    {
+        reporter.testCaseInit("Coverage tests for get/setURIResolver(), get/setErrorListener() API's");
+        TransformerFactory factory = null;
+        reporter.logStatusMsg("System property " + defaultPropName 
+                              + " is: " + System.getProperty(defaultPropName));
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            URIResolver URIRes = factory.getURIResolver();
+            reporter.logInfoMsg("factory.getURIResolver() default is: " + URIRes);
+            
+            LoggingURIResolver loggingURIRes = new LoggingURIResolver(reporter);
+            factory.setURIResolver(loggingURIRes);
+            reporter.checkObject(factory.getURIResolver(), loggingURIRes, "set/getURIResolver API coverage");
+            factory.setURIResolver(null);
+            if (factory.getURIResolver() == null)
+            {
+                reporter.checkPass("setURIResolver(null) is OK");
+            }
+            else
+            {
+                reporter.checkFail("setURIResolver(null) not OK, is: " + factory.getURIResolver());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Coverage of get/setURIResolver threw: " + t.toString());
+            reporter.logThrowable(reporter.STATUSMSG, t, "Coverage of get/setURIResolver threw:");
+        }
+        reporter.logStatusMsg("//@todo feature testing for URIResolver: see URIResolverTest.java");
+
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            ErrorListener errListener = factory.getErrorListener();
+            if (errListener == null)
+            {
+                reporter.checkFail("getErrorListener() non-null by default");
+            }
+            else
+            {
+                reporter.checkPass("getErrorListener() non-null by default, is: " + errListener);
+            }
+            
+            LoggingErrorListener loggingErrListener = new LoggingErrorListener(reporter);
+            factory.setErrorListener(loggingErrListener);
+            reporter.checkObject(factory.getErrorListener(), loggingErrListener, "set/getErrorListener API coverage(1)");
+            try
+            {
+                factory.setErrorListener(null);                
+                reporter.checkFail("setErrorListener(null) worked, should have thrown exception");
+            }
+            catch (IllegalArgumentException iae)
+            {
+                reporter.checkPass("setErrorListener(null) properly threw: " + iae.toString());
+            }
+            // Verify the previous ErrorListener is still set
+            reporter.checkObject(factory.getErrorListener(), loggingErrListener, "set/getErrorListener API coverage(2)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Coverage of get/setErrorListener threw: " + t.toString());
+            reporter.logThrowable(reporter.STATUSMSG, t, "Coverage of get/setErrorListener threw:");
+        }
+        reporter.logStatusMsg("//@todo feature testing for ErrorListener: see ErrorListenerAPITest.java, ErrorListenerTest.java");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Miscellaneous tests.
+     * Bug/tests submitted by Bhakti.Mehta@eng.sun.com
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase6()
+    {
+        reporter.testCaseInit("Miscellaneous getAssociatedStylesheets tests");
+        TransformerFactory factory = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            DocumentBuilder db = dbf.newDocumentBuilder();
+
+            // Note that embeddedCSSFileInfo has the following PI:
+            //  <?xml-stylesheet href="TransformerFactoryAPIModern.css" title="Modern" media="screen" type="text/css"?>
+            // Which we should return null from, since we only support 
+            //  types that are properly mapped to xslt:
+            //  text/xsl, text/xml, and application/xml+xslt
+            //  see also EmbeddedStylesheetTest
+            Document doc = db.parse(new File(embeddedCSSFileInfo.xmlName));
+            DOMSource domSource = new DOMSource(doc);
+
+            // TransformerFactory01.check01()
+            try 
+            {
+                reporter.logInfoMsg("About to getAssociatedStylesheet(domsource-w/outsystemid, screen,Modern,null)");
+                Source s = factory.getAssociatedStylesheet(domSource,"screen","Modern",null);
+                reporter.check((null == s), true, "getAssociatedStylesheet returns null Source for text/css");
+            }
+            catch (Throwable t)
+            {
+                reporter.checkFail("TransformerFactory01.check01a threw: " + t.toString());
+                reporter.logThrowable(reporter.STATUSMSG, t, "TransformerFactory01.check01a threw");
+            }
+            try 
+            {
+                domSource.setSystemId(QetestUtils.filenameToURL(embeddedCSSFileInfo.xmlName));
+                reporter.logInfoMsg("About to getAssociatedStylesheet(domsource-w/systemid, screen,Modern,null)");
+                Source s = factory.getAssociatedStylesheet(domSource,"screen","Modern",null);
+                reporter.check((null == s), true, "getAssociatedStylesheet returns null Source for text/css");
+            }
+            catch (Throwable t)
+            {
+                reporter.checkFail("TransformerFactory01.check01b threw: " + t.toString());
+                reporter.logThrowable(reporter.STATUSMSG, t, "TransformerFactory01.check01b threw");
+            }
+
+            // public void TransformerFactory02.check01(){
+            try 
+            {
+                StreamSource ss = new StreamSource(new FileInputStream(embeddedCSSFileInfo.xmlName));
+                reporter.logInfoMsg("About to getAssociatedStylesheet(streamsource-w/outsystemid, screen,Modern,null)");
+                Source s = factory.getAssociatedStylesheet(ss,"screen","Modern",null);
+                reporter.check((null == s), true, "getAssociatedStylesheet returns null Source for text/css");
+            }
+            catch (Throwable t)
+            {
+                reporter.checkFail("TransformerFactory02.check01a threw: " + t.toString());
+                reporter.logThrowable(reporter.STATUSMSG, t, "TransformerFactory02.check01a threw");
+            }
+            try 
+            {
+                StreamSource ss = new StreamSource(new FileInputStream(embeddedCSSFileInfo.xmlName));
+                ss.setSystemId(QetestUtils.filenameToURL(embeddedCSSFileInfo.xmlName));
+                reporter.logInfoMsg("About to getAssociatedStylesheet(streamsource-w/systemid, screen,Modern,null)");
+                Source s = factory.getAssociatedStylesheet(ss,"screen","Modern",null);
+                reporter.check((null == s), true, "getAssociatedStylesheet returns null Source for text/css");
+            }
+            catch (Throwable t)
+            {
+                reporter.checkFail("TransformerFactory02.check01b threw: " + t.toString());
+                reporter.logThrowable(reporter.STATUSMSG, t, "TransformerFactory02.check01b threw");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Miscellaneous getAssociatedStylesheets tests threw: " + t.toString());
+            reporter.logThrowable(reporter.STATUSMSG, t, "Miscellaneous getAssociatedStylesheets tests threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Coverage tests for set/getFeature, set/getAttribute API's.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase7()
+    {
+        reporter.testCaseInit("Coverage tests for set/getFeature, set/getAttribute API's");
+        // This test case should be JAXP-generic, and must not rely on Xalan-J 2.x functionality
+        reporter.logInfoMsg("Note: only simple validation: most are negative tests");
+        TransformerFactory factory = null;
+        final String BOGUS_NAME = "fnord:this/feature/does/not/exist";
+
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            try
+            {
+                reporter.logStatusMsg("Calling: factory.getFeature(BOGUS_NAME)");
+                boolean b = factory.getFeature(BOGUS_NAME);
+                reporter.checkPass("factory.getFeature(BOGUS_NAME) did not throw exception");
+                reporter.logStatusMsg("factory.getFeature(BOGUS_NAME) = " + b);
+            }
+            catch (IllegalArgumentException iae1)
+            {
+                // This isn't documented, but is what I might expect
+                reporter.checkPass("factory.getFeature(BOGUS_NAME) threw expected IllegalArgumentException");
+            }
+
+            try
+            {
+                reporter.logStatusMsg("Calling: factory.setAttribute(BOGUS_NAME,...)");
+                factory.setAttribute(BOGUS_NAME, "on");
+                reporter.checkFail("factory.setAttribute(BOGUS_NAME,...) did not throw expected exception");
+            }
+            catch (IllegalArgumentException iae2)
+            {
+                reporter.checkPass("factory.setAttribute(BOGUS_NAME,...) threw expected IllegalArgumentException");
+            }
+
+            try
+            {
+                reporter.logStatusMsg("Calling: factory.getAttribute(BOGUS_NAME)");
+                Object o = factory.getAttribute(BOGUS_NAME);
+                reporter.checkFail("factory.getAttribute(BOGUS_NAME) did not throw expected exception");
+                reporter.logStatusMsg("factory.getAttribute(BOGUS_NAME) = " + o);
+            }
+            catch (IllegalArgumentException iae3)
+            {
+                reporter.checkPass("factory.getAttribute(BOGUS_NAME) threw expected IllegalArgumentException");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("getFeature/Attribute() tests threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "getFeature/Attribute() tests threw");
+        }
+
+        try
+        {
+            reporter.logWarningMsg("Note testing assumption: all factories must support Streams");
+            factory = TransformerFactory.newInstance();
+            reporter.logStatusMsg("Calling: factory.getFeature(StreamSource.FEATURE)");
+            boolean b = factory.getFeature(StreamSource.FEATURE);
+            reporter.check(b, true, "factory.getFeature(StreamSource.FEATURE)");
+
+            reporter.logStatusMsg("Calling: factory.getFeature(StreamResult.FEATURE)");
+            b = factory.getFeature(StreamResult.FEATURE);
+            reporter.check(b, true, "factory.getFeature(StreamResult.FEATURE)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("getFeature/Attribute()2 tests threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "getFeature/Attribute()2 tests threw");
+        }
+
+        try
+        {
+            reporter.logStatusMsg("Calling: factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING)");
+            factory = TransformerFactory.newInstance();
+            try
+            {
+                // All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature
+                factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
+                boolean b = factory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING);
+                reporter.check(b, true, "factory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)");
+                factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false);
+                b = factory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING);
+                reporter.check(b, false, "factory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)");
+                
+            }
+            catch (TransformerConfigurationException tce)
+            {
+                reporter.checkFail("set/getFeature(XMLConstants.FEATURE_SECURE_PROCESSING) tests threw: " + tce.toString());
+                reporter.logThrowable(reporter.ERRORMSG, tce, "set/getFeature(XMLConstants.FEATURE_SECURE_PROCESSING) tests threw");
+            }
+            
+            try
+            {
+                factory.setFeature(BOGUS_NAME, true);
+                reporter.checkFail("factory.setFeature(BOGUS_NAME) did not throw expected exception");
+                
+            }
+            catch (TransformerConfigurationException tce)
+            {
+                reporter.checkPass("factory.setFeature(BOGUS_NAME) threw expected TransformerConfigurationException");
+            }
+            
+            try
+            {
+                factory.setFeature(null, true);
+                reporter.checkFail("factory.setFeature(null, true) did not throw expected exception");
+            }
+            catch (NullPointerException npe)
+	    {
+	        reporter.checkPass("factory.setFeature(null, true) threw expected NullPointerException");
+            }
+                
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("set/getFeature() tests threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "set/getFeature() tests threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by TransformerFactoryAPITest:\n"
+                + "-transformerFactory <FQCN of TransformerFactoryImpl; default Xalan 2.x>\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TransformerFactoryAPITest app = new TransformerFactoryAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/URIResolverTest.java b/test/java/src/org/apache/qetest/trax/URIResolverTest.java
new file mode 100644
index 0000000..fe4053d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/URIResolverTest.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * URIResolverTest.java
+ *
+ */
+package org.apache.qetest.trax;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Verify that URIResolvers are called properly.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class URIResolverTest extends FileBasedTest
+{
+
+    /** Provide sequential output names automatically.   */
+    protected OutputNameManager outNames;
+
+
+    /** 
+     * A simple stylesheet with errors for testing in various flavors.  
+     * Must be coordinated with templatesExpectedType/Value,
+     * transformExpectedType/Value.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Subdir name under test\tests\api for files.  */
+    public static final String TRAX_SUBDIR = "trax";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public URIResolverTest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "URIResolverTest";
+        testComment = "Verify that URIResolvers are called properly.";
+    }
+
+
+    /**
+     * Initialize this test  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SUBDIR
+                              + File.separator;
+
+        testFileInfo.inputName = testBasePath + "URIResolverTest.xsl";
+        testFileInfo.xmlName = testBasePath + "URIResolverTest.xml";
+        testFileInfo.goldName = goldBasePath + "URIResolverTest.out";
+
+        return true;
+    }
+
+
+    /**
+     * Build a stylesheet/do a transform with lots of URIs to resolve.
+     * Verify that the URIResolver is called properly.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Build a stylesheet/do a transform with lots of URIs to resolve");
+        LoggingURIResolver loggingURIResolver = new LoggingURIResolver((Logger)reporter);
+        reporter.logTraceMsg("loggingURIResolver originally setup:" + loggingURIResolver.getQuickCounters());
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            // Set the URIResolver and validate it
+            factory.setURIResolver(loggingURIResolver);
+            reporter.check((factory.getURIResolver() == loggingURIResolver),
+                           true, "set/getURIResolver on factory");
+
+            // Validate various URI's to be resolved during stylesheet 
+            //  build with the loggingURIResolver
+            String[] expectedXslUris = 
+            {
+                "{" + QetestUtils.filenameToURL(testFileInfo.inputName) + "}" + "impincl/SystemIdImport.xsl",
+                "{" + QetestUtils.filenameToURL(testFileInfo.inputName) + "}" + "impincl/SystemIdInclude.xsl"
+            };
+            loggingURIResolver.setExpected(expectedXslUris);
+            // Note that we don't currently have a default URIResolver, 
+            //  so the LoggingURIResolver class will just attempt 
+            //  to use the SystemIDResolver class instead
+            // loggingURIResolver.setDefaultHandler(savedURIResolver);
+            reporter.logInfoMsg("About to factory.newTemplates(" + QetestUtils.filenameToURL(testFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            reporter.logTraceMsg("loggingURIResolver after newTemplates:" + loggingURIResolver.getQuickCounters());
+
+            // Clear out any setExpected or counters
+            loggingURIResolver.reset();
+
+            transformer = templates.newTransformer();
+            reporter.logTraceMsg("default transformer's getURIResolver is: " + transformer.getURIResolver());
+            // Set the URIResolver and validate it
+            transformer.setURIResolver(loggingURIResolver);
+            reporter.check((transformer.getURIResolver() == loggingURIResolver),
+                           true, "set/getURIResolver on transformer"); 
+
+            // Validate various URI's to be resolved during transform
+            //  time with the loggingURIResolver
+            String[] expectedXmlUris = 
+            {
+                "{" + QetestUtils.filenameToURL(testFileInfo.inputName) + "}" + "../impincl/SystemIdImport.xsl",
+                "{" + QetestUtils.filenameToURL(testFileInfo.inputName) + "}" + "impincl/SystemIdImport.xsl",
+                "{" + QetestUtils.filenameToURL(testFileInfo.inputName) + "}" + "systemid/impincl/SystemIdImport.xsl",
+            };
+            
+            //@todo Bugzilla#2425 every document() call is resolved twice twice - two fails caused below MOVED to SmoketestOuttakes.java 02-Nov-01 -sc
+            reporter.logWarningMsg("Bugzilla#2425 every document() call is resolved twice twice - two fails caused below MOVED to SmoketestOuttakes.java 02-Nov-01 -sc");
+            // loggingURIResolver.setExpected(expectedXmlUris);
+            //@todo Bugzilla#2425 every document() call is resolved twice twice - two fails caused below MOVED to SmoketestOuttakes.java 02-Nov-01 -sc
+
+            reporter.logTraceMsg("about to transform(...)");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(testFileInfo.xmlName)), 
+                                  new StreamResult(outNames.nextName()));
+            reporter.logTraceMsg("after transform(...)");
+            // Clear out any setExpected or counters
+            loggingURIResolver.reset();
+
+            // Validate the actual output file as well: in this case, 
+            //  the stylesheet should still work
+            fileChecker.check(reporter, 
+                    new File(outNames.currentName()), 
+                    new File(testFileInfo.goldName), 
+                    "transform of URI-filled xsl into: " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("URIResolver test unexpectedly threw: " + t.toString());
+            reporter.logThrowable(Logger.ERRORMSG, t, "URIResolver test unexpectedly threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by URIResolverTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        URIResolverTest app = new URIResolverTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/dom/DOMResultAPITest.java b/test/java/src/org/apache/qetest/trax/dom/DOMResultAPITest.java
new file mode 100644
index 0000000..0add0d5
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/dom/DOMResultAPITest.java
@@ -0,0 +1,479 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * DOMResultAPITest.java
+ *
+ */
+package org.apache.qetest.trax.dom;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for the DOMResult class of TRAX.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class DOMResultAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Information about an xsl/xml file pair for transforming with import/include.  
+     */
+    protected XSLTestfileInfo impInclFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_DOM_SUBDIR = "trax" + File.separator + "dom";
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public DOMResultAPITest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "DOMResultAPITest";
+        testComment = "API Coverage test for the DOMResult class of TRAX";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_DOM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_DOM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_DOM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_DOM_SUBDIR
+                              + File.separator;
+
+        testFileInfo.inputName = QetestUtils.filenameToURL(testBasePath + "DOMTest.xsl");
+        testFileInfo.xmlName = QetestUtils.filenameToURL(testBasePath + "DOMTest.xml");
+        testFileInfo.goldName = goldBasePath + "DOMTest.out";
+
+        impInclFileInfo.inputName = QetestUtils.filenameToURL(testBasePath + "DOMImpIncl.xsl");
+        impInclFileInfo.xmlName = QetestUtils.filenameToURL(testBasePath + "DOMImpIncl.xml");
+        impInclFileInfo.goldName = testBasePath + "DOMImpIncl.out";
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(DOMSource.FEATURE)
+                  && tf.getFeature(DOMResult.FEATURE)))
+            {   // The rest of this test relies on DOM
+                reporter.logErrorMsg("DOM*.FEATURE not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic API coverage, constructor and set/get methods.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage, constructor and set/get methods");
+
+        // Default no-arg ctor sets nothing (but needs special test for 
+        //  creating new doc when being transformed)
+        DOMResult defaultDOM = new DOMResult();
+        reporter.checkObject(defaultDOM.getNode(), null, "Default DOMResult should have null Node");
+        reporter.check(defaultDOM.getSystemId(), null, "Default DOMResult should have null SystemId");
+
+        try
+        {
+            // ctor(Node) with a simple node
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+            Node n = docBuilder.newDocument();
+            DOMResult nodeDOM = new DOMResult(n);
+            reporter.checkObject(nodeDOM.getNode(), n, "DOMResult(n) has Node: " + nodeDOM.getNode());
+            reporter.check(nodeDOM.getSystemId(), null, "DOMResult(n) should have null SystemId");
+
+            DOMResult nodeDOMid = new DOMResult(n, "this-is-system-id");
+            reporter.checkObject(nodeDOMid.getNode(), n, "DOMResult(n,id) has Node: " + nodeDOMid.getNode());
+            reporter.check(nodeDOMid.getSystemId(), "this-is-system-id", "DOMResult(n,id) has SystemId: " + nodeDOMid.getSystemId());
+
+            DOMResult wackyDOM = new DOMResult();
+            Node n2 = docBuilder.newDocument();
+            wackyDOM.setNode(n2);
+            reporter.checkObject(wackyDOM.getNode(), n2, "set/getNode API coverage");
+            
+            wackyDOM.setSystemId("another-system-id");
+            reporter.checkObject(wackyDOM.getSystemId(), "another-system-id", "set/getSystemId API coverage");
+            
+            // Test the DOMResult(Node node, Node nextSibling) constructor
+            Document doc = docBuilder.newDocument();
+            Element a = doc.createElementNS("", "a");
+            Element b = doc.createElementNS("", "b");
+            Element c = doc.createElementNS("", "c");
+            doc.appendChild(a);
+            a.appendChild(b);
+            a.appendChild(c);
+            DOMResult nodeNextSiblingDOM = new DOMResult(a, c);
+            reporter.checkObject(nodeNextSiblingDOM.getNode(), a, "DOMResult(node, nextSibling) has Node: " + nodeNextSiblingDOM.getNode());
+            reporter.checkObject(nodeNextSiblingDOM.getNextSibling(), c, "DOMResult(node, nextSibling) has nextSibling: " + nodeNextSiblingDOM.getNextSibling());
+        
+            // Test the DOMResult(Node node, Node nextSibling, String systemId) constructor
+	    DOMResult nodeNextSiblingIdDOM = new DOMResult(a, b, "this-is-system-id");
+	    reporter.checkObject(nodeNextSiblingIdDOM.getNode(), a, "DOMResult(node, nextSibling, systemId) has Node: " + nodeNextSiblingIdDOM.getNode());
+            reporter.checkObject(nodeNextSiblingIdDOM.getNextSibling(), b, "DOMResult(node, nextSibling, systemId) has nextSibling: " + nodeNextSiblingIdDOM.getNextSibling());
+            reporter.check(nodeNextSiblingIdDOM.getSystemId(), "this-is-system-id", "DOMResult(node, nextSibling, systemId) has SystemId: " + nodeNextSiblingIdDOM.getSystemId());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with DOMResult set/get API");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with DOMResult set/get API");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic functionality of DOMResults.
+     * Test 'blank' Result; reuse Results; swap Nodes; etc.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Basic functionality of DOMResults");
+
+        DocumentBuilder docBuilder = null;
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        Node xmlNode = null;
+        Node xslNode = null;
+        Node xslImpInclNode = null;
+        Node xmlImpInclNode = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            docBuilder = dfactory.newDocumentBuilder();
+            reporter.logTraceMsg("parsing xml, xsl files");
+            xslNode = docBuilder.parse(new InputSource(testFileInfo.inputName));
+            xmlNode = docBuilder.parse(new InputSource(testFileInfo.xmlName));
+            xslImpInclNode = docBuilder.parse(new InputSource(impInclFileInfo.inputName));
+            xmlImpInclNode = docBuilder.parse(new InputSource(impInclFileInfo.xmlName));
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            reporter.testCaseClose();
+            return true;
+        }
+        try
+        {
+            // Try to get templates, transformer from node
+            DOMSource xslSource = new DOMSource(xslNode);
+            templates = factory.newTemplates(xslSource);
+            DOMSource xmlSource = new DOMSource(xmlNode);
+            
+            // Transforming into a DOMResult with a node is already 
+            //  well covered in DOMSourceAPITest and elsewhere
+            // Verify a 'blank' Result object gets filled up properly
+            DOMResult blankResult = new DOMResult();
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            transformer.transform(xmlSource, blankResult);
+            reporter.logTraceMsg("blankResult is now: " + blankResult);
+            Node blankNode = blankResult.getNode();
+            if (blankNode != null)
+            {
+                serializeDOMAndCheck(blankNode, testFileInfo.goldName, "transform into blank DOMResult");
+            }
+            else
+            {
+                reporter.checkFail("transform into 'blank' DOMResult");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with blank results");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem with blank results");
+        }
+        boolean reusePass = false;
+        try
+        {
+            DOMSource xmlSource = new DOMSource(xmlNode);
+            DOMSource xslSource = new DOMSource(xslNode);
+            templates = factory.newTemplates(xslSource);
+            
+            // Reuse the same result for multiple transforms
+            DOMResult reuseResult = new DOMResult(docBuilder.newDocument());
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            transformer.transform(xmlSource, reuseResult);
+            Node reuseNode = reuseResult.getNode();
+            serializeDOMAndCheck(reuseNode, testFileInfo.goldName, "transform into reuseable1 DOMResult");
+            
+            // Get a new transformer just to avoid extra complexity
+            reporter.logTraceMsg("About to re-use DOMResult from previous transform, should throw");
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reusePass = true; // Next line should throw an exception
+            transformer.transform(xmlSource, reuseResult); // SPR SCUU4RJKG4 throws DOM006
+            reporter.checkFail("Re-using DOMResult should have thrown exception", "SCUU4RJKG4");
+        }
+        catch (Throwable t)
+        {
+            reporter.check(reusePass, true, "Re-using DOMResult throws exception properly");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Re-using DOMResult throws exception properly");
+            reporter.logTraceMsg("@todo Should validate specific kind of error above");
+        }
+        try
+        {
+            DOMSource xmlSource = new DOMSource(xmlNode);
+            DOMSource xslSource = new DOMSource(xslNode);
+            templates = factory.newTemplates(xslSource);
+            
+            // Reuse the same result for multiple transforms, after resetting node
+            DOMResult reuseResult = new DOMResult(docBuilder.newDocument());
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            transformer.transform(xmlSource, reuseResult);
+            Node reuseNode = reuseResult.getNode();
+            serializeDOMAndCheck(reuseNode, testFileInfo.goldName, "transform into reuseable2 DOMResult");
+            
+            // Get a new transformer just to avoid extra complexity
+            reporter.logTraceMsg("About to re-use DOMResult from previous transform after setNode()");
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reuseResult.setNode(docBuilder.newDocument());
+            transformer.transform(xmlSource, reuseResult);
+            reuseNode = reuseResult.getNode();
+            serializeDOMAndCheck(reuseNode, testFileInfo.goldName, "transform into reused2 DOMResult");
+
+            // Reuse again, with the same transformer
+            reuseResult.setNode(docBuilder.newDocument());
+            transformer.transform(xmlSource, reuseResult);
+            reuseNode = reuseResult.getNode();
+            serializeDOMAndCheck(reuseNode, testFileInfo.goldName, "transform into reused2 DOMResult again");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with re-using results(2)");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem with re-using results(2)");
+        }
+
+        try
+        {
+            // The gold file when transforming with a DOMResult created by
+            // the DOMResult(Node node, Node nextSibling) constructor.
+            String goldFileName2 = goldDir 
+                              + File.separator 
+                              + TRAX_DOM_SUBDIR
+                              + File.separator
+                              + "DOMTest2.out";
+            
+            DOMSource xmlSource = new DOMSource(xmlNode);
+	    DOMSource xslSource = new DOMSource(xslNode);
+            templates = factory.newTemplates(xslSource);
+            
+            // Create a DOMResult using the DOMResult(Node node, Node nextSibling) constructor
+            Document doc = docBuilder.newDocument();
+            Element a = doc.createElementNS("", "a");
+            Element b = doc.createElementNS("", "b");
+            Element c = doc.createElementNS("", "c");
+            doc.appendChild(a);
+            a.appendChild(b);
+            a.appendChild(c);
+            DOMResult result = new DOMResult(a, c);
+            
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            transformer.transform(xmlSource, result);
+            Node resultNode = result.getNode();
+            serializeDOMAndCheck(resultNode, goldFileName2, "transform into DOMResult with nextSibling");            
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with DOMResult with nextSibling");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem with DOMResult with nextSibling");        
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method to serialize DOM and fileChecker.check().  
+     * @return true if pass, false otherwise
+     */
+    public boolean serializeDOMAndCheck(Node dom, String goldFileName, String comment)
+    {
+        if ((dom == null) || (goldFileName == null))
+        {
+            reporter.logWarningMsg("serializeDOMAndCheck of null dom or goldFileName!");
+            return false;
+        }
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            if (factory.getFeature(StreamResult.FEATURE))
+            {
+                // Use identity transformer to serialize
+                Transformer identityTransformer = factory.newTransformer();
+                FileOutputStream fos = new FileOutputStream(outNames.nextName());
+                StreamResult streamResult = new StreamResult(fos);
+                DOMSource nodeSource = new DOMSource(dom);
+                reporter.logTraceMsg("serializeDOMAndCheck() into " + outNames.currentName());
+                identityTransformer.transform(nodeSource, streamResult);
+                fos.close(); // must close ostreams we own
+                fileChecker.check(reporter, 
+                                  new File(outNames.currentName()), 
+                                  new File(goldFileName), 
+                                  comment + " into " + outNames.currentName());
+                return true;    // Note: should check return from fileChecker.check!
+            }
+            else
+            {   // We should try another method to serialize the data
+                reporter.logWarningMsg("getFeature(StreamResult.FEATURE), can't validate serialized data");
+                return false;
+            }
+            
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("serializeDOMAndCheckFile threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "serializeDOMAndCheckFile threw:");
+            return false;
+        }
+    }
+
+
+    /**
+     * Worker method to translate String to URI.  
+     * Note: Xerces and Crimson appear to handle some URI references 
+     * differently - this method needs further work once we figure out 
+     * exactly what kind of format each parser wants (esp. considering 
+     * relative vs. absolute references).
+     * @param String path\filename of test file
+     * @return URL to pass to SystemId
+     */
+    public String filenameToURI(String filename)
+    {
+        File f = new File(filename);
+        String tmp = f.getAbsolutePath();
+	    if (File.separatorChar == '\\') {
+	        tmp = tmp.replace('\\', '/');
+	    }
+        return "file:///" + tmp;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by DOMResultAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "REPLACE_any_new_test_arguments\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+
+        DOMResultAPITest app = new DOMResultAPITest();
+
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/dom/DOMSourceAPITest.java b/test/java/src/org/apache/qetest/trax/dom/DOMSourceAPITest.java
new file mode 100644
index 0000000..8d84b02
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/dom/DOMSourceAPITest.java
@@ -0,0 +1,564 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * DOMSourceAPITest.java
+ *
+ */
+package org.apache.qetest.trax.dom;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for the DOMSource class of TRAX.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class DOMSourceAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Information about an xsl/xml file pair for transforming with import/include.  
+     */
+    protected XSLTestfileInfo impInclFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_DOM_SUBDIR = "trax" + File.separator + "dom";
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public DOMSourceAPITest()
+    {
+        numTestCases = 3;  // REPLACE_num
+        testName = "DOMSourceAPITest";
+        testComment = "API Coverage test for the DOMSource class of TRAX";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_DOM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_DOM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_DOM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_DOM_SUBDIR
+                              + File.separator;
+
+        testFileInfo.inputName = QetestUtils.filenameToURL(testBasePath + "DOMTest.xsl");
+        testFileInfo.xmlName = QetestUtils.filenameToURL(testBasePath + "DOMTest.xml");
+        testFileInfo.goldName = goldBasePath + "DOMTest.out";
+
+        impInclFileInfo.inputName = QetestUtils.filenameToURL(testBasePath + "DOMImpIncl.xsl");
+        impInclFileInfo.xmlName = QetestUtils.filenameToURL(testBasePath + "DOMImpIncl.xml");
+        impInclFileInfo.goldName = goldBasePath + "DOMImpIncl.out";
+
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(DOMSource.FEATURE)
+                  && tf.getFeature(DOMResult.FEATURE)))
+            {   // The rest of this test relies on DOM
+                reporter.logErrorMsg("DOM*.FEATURE not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic API coverage, constructor and set/get methods.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage, constructor and set/get methods");
+
+        // Default no-arg ctor sets nothing (but needs special test for 
+        //  creating new doc when being transformed)
+        DOMSource defaultDOM = new DOMSource();
+        reporter.checkObject(defaultDOM.getNode(), null, "Default DOMSource should have null Node");
+        reporter.check(defaultDOM.getSystemId(), null, "Default DOMSource should have null SystemId");
+
+        try
+        {
+            // ctor(Node) with a simple node
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+            Node n = docBuilder.newDocument();
+            DOMSource nodeDOM = new DOMSource(n);
+            reporter.checkObject(nodeDOM.getNode(), n, "DOMSource(n) has Node: " + nodeDOM.getNode());
+            reporter.check(nodeDOM.getSystemId(), null, "DOMSource(n) should have null SystemId");
+
+            DOMSource nodeDOMid = new DOMSource(n, "this-is-system-id");
+            reporter.checkObject(nodeDOMid.getNode(), n, "DOMSource(n,id) has Node: " + nodeDOMid.getNode());
+            reporter.check(nodeDOMid.getSystemId(), "this-is-system-id", "DOMSource(n,id) has SystemId: " + nodeDOMid.getSystemId());
+
+            DOMSource wackyDOM = new DOMSource();
+            Node n2 = docBuilder.newDocument();
+            wackyDOM.setNode(n2);
+            reporter.checkObject(wackyDOM.getNode(), n2, "set/getNode API coverage");
+            
+            wackyDOM.setSystemId("another-system-id");
+            reporter.checkObject(wackyDOM.getSystemId(), "another-system-id", "set/getSystemId API coverage");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with DOMSource set/get API");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with DOMSource set/get API");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic functionality of DOMSources.
+     * Use them in simple transforms, with/without systemId set.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Basic functionality of DOMSources");
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformerXSL = null;
+        DocumentBuilder docBuilder = null;
+        Node xmlNode = null;
+        Node xslNode = null;
+        Node xslImpInclNode = null;
+        Node xmlImpInclNode = null;
+        try
+        {
+            // Startup a factory, create some nodes/DOMs
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            docBuilder = dfactory.newDocumentBuilder();
+            reporter.logTraceMsg("parsing xml, xsl files");
+            xslNode = docBuilder.parse(new InputSource(testFileInfo.inputName));
+            xmlNode = docBuilder.parse(new InputSource(testFileInfo.xmlName));
+            xslImpInclNode = docBuilder.parse(new InputSource(impInclFileInfo.inputName));
+            xmlImpInclNode = docBuilder.parse(new InputSource(impInclFileInfo.xmlName));
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Problem with factory; testcase may not work");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with factory; testcase may not work");
+        }
+        try
+        {
+            // A blank DOM as an input stylesheet - what should happen?
+            DOMSource blankXSLDOM = new DOMSource();
+            reporter.logTraceMsg("About to newTemplates(blankXSLDOM)");
+            Templates blankTemplates = factory.newTemplates(blankXSLDOM); // SPR SCUU4R5JYZ throws npe; 0b29CVS now returns null
+            // Note: functionality (and hopefully Javadoc too) have 
+            //  been updated to make it illegal to use a DOMSource 
+            //  with a null node as the XSL document -sc 18-Dec-00
+            reporter.checkFail("blankXSLDOM should throw exception per Resolved bug", "SCUU4R5JYZ");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkPass("blankXSLDOM should throw exception per Resolved bug", "SCUU4R5JYZ");
+            reporter.logThrowable(reporter.ERRORMSG, t, "blankXSLDOM(1) should throw exception");
+        }
+        try
+        {
+            // A blank DOM as an input stylesheet - what should happen?
+            DOMSource blankXSLDOM = new DOMSource();
+            reporter.logTraceMsg("About to newTransformer(blankXSLDOM)");
+            Transformer blankTransformer = factory.newTransformer(blankXSLDOM); // SPR SCUU4R5JYZ throws npe
+            reporter.checkFail("blankXSLDOM should throw exception per Resolved bug", "SCUU4R5JYZ");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkPass("blankXSLDOM should throw exception per Resolved bug", "SCUU4R5JYZ");
+            reporter.logThrowable(reporter.ERRORMSG, t, "blankXSLDOM(2) should throw exception");
+        }
+
+        try
+        {
+            // Try to get templates, transformerXSL from node
+            DOMSource xslDOM = new DOMSource(xslNode);
+            templates = factory.newTemplates(xslDOM);
+            reporter.check((templates != null), true, "factory.newTemplates(DOMSource) is non-null");
+            transformerXSL = factory.newTransformer(xslDOM);
+            transformerXSL.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformerXSL != null), true, "factory.newTransformer(DOMSource) is non-null");
+            
+            // A simple DOM-DOM-DOM transform
+            DOMSource xmlDOM = new DOMSource(xmlNode);
+            Node outNode = docBuilder.newDocument();
+            DOMResult outDOM = new DOMResult(outNode);
+            transformerXSL.transform(xmlDOM, outDOM);
+            Node gotNode = outDOM.getNode();
+            reporter.check((gotNode != null), true, "transform(xmlDOM, outDOM) has non-null outNode");
+            serializeDOMAndCheck(gotNode, testFileInfo.goldName, "transform(xmlDOM, outDOM)");
+            reporter.logTraceMsg("@todo validate the dom in memory as well");
+
+            // A blank DOM as source doc of the transform - should 
+            // create an empty source Document using 
+            // DocumentBuilder.newDocument(). 
+            DOMSource blankSource = new DOMSource();
+            Node emptyNode = docBuilder.newDocument();
+            DOMResult emptyNodeDOM = new DOMResult(emptyNode);
+            reporter.logTraceMsg("About to transform(blankSource, emptyNodeDOM)");
+            transformerXSL.transform(blankSource, emptyNodeDOM); 
+
+            reporter.check(emptyNodeDOM.getNode().toString(),"[#document: null]","transform(blankDOM, result) should create an empty document");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkPass("transform(blankDOM, result) should throw exception", "SCUU4R5KLL");
+            reporter.logThrowable(reporter.ERRORMSG, t, "transform(blankDOM, result) should throw exception");
+        }
+        try
+        {
+            // A blank DOM as an output of the transform - should 
+            //  auto-create a source Document
+            DOMSource xmlDOM = new DOMSource(xmlNode);
+            Node outNode = docBuilder.newDocument();
+            DOMResult outResult = new DOMResult(outNode);
+            reporter.logTraceMsg("About to transform(xmlDOM, emptyResult)");
+            transformerXSL.transform(xmlDOM, outResult);
+            outNode = outResult.getNode();
+            reporter.check((outNode != null), true, "transform(xmlDOM, outResult) has non-null node");
+            serializeDOMAndCheck(outNode, testFileInfo.goldName, "transform(xmlDOM, outResult)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with transform(doms 2)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with transform(doms 2)");
+        }
+
+        try
+        {
+            // Setting SystemId with imports/inclues
+            DOMSource xslDOM = new DOMSource(xslImpInclNode);
+            // Note that inputName, xmlName are already URL'd
+            xslDOM.setSystemId(impInclFileInfo.inputName);
+            transformerXSL = factory.newTransformer(xslDOM);
+            transformerXSL.setErrorListener(new DefaultErrorHandler());
+            DOMSource xmlDOM = new DOMSource(xmlImpInclNode);
+            // Do we really need to set SystemId on both XML and XSL?
+            xmlDOM.setSystemId(impInclFileInfo.xmlName);
+            DOMResult emptyResult = new DOMResult();
+            reporter.logTraceMsg("About to transformXSLImpIncl(xmlDOM, emptyResult)");
+            transformerXSL.transform(xmlDOM, emptyResult);
+            Node outNode = emptyResult.getNode();
+            reporter.check((outNode != null), true, "transformXSLImpIncl(xmlDOM, emptyResult) has non-null node");
+            serializeDOMAndCheck(outNode, impInclFileInfo.goldName, "transformXSLImpIncl(xmlDOM, emptyResult)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with SystemId");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with SystemId");
+        }
+        try
+        {
+            // Do a transform without systemId set
+            // Note: is affected by user.dir property; if we're 
+            //  already in the correct place, this won't be different
+            // But: most people will run from xml-xalan\test, so this should fail
+            try
+            {
+                reporter.logStatusMsg("System.getProperty(user.dir) = " + System.getProperty("user.dir"));
+            }
+            catch (SecurityException e) // in case of Applet context
+            {
+                reporter.logTraceMsg("System.getProperty(user.dir) threw SecurityException");
+            }
+            DOMSource xslDOM = new DOMSource(xslImpInclNode);
+            transformerXSL = factory.newTransformer(xslDOM);
+            transformerXSL.setErrorListener(new DefaultErrorHandler());
+            DOMSource xmlDOM = new DOMSource(xmlImpInclNode);
+            DOMResult emptyResult = new DOMResult();
+            reporter.logStatusMsg("About to transform without systemID; probably throws exception");
+            transformerXSL.transform(xmlDOM, emptyResult);
+            reporter.checkFail("The above transform should probably have thrown an exception");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkPass("Transforming with include/import and wrong SystemId throws exception");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Transforming with include/import and wrong SystemId");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * More advanced functionality of DOMSources.
+     * Re-using DOMSource objects for multiple transforms; setNode and reuse; etc.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("More advanced functionality of DOMSources");
+
+        TransformerFactory factory = null;
+        DocumentBuilder docBuilder = null;
+        Node xmlNode = null;
+        Node xslNode = null;
+        Node xslImpInclNode = null;
+        Node xmlImpInclNode = null;
+
+        try
+        {
+            // Startup a factory, create some nodes/DOMs
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            docBuilder = dfactory.newDocumentBuilder();
+            reporter.logTraceMsg("parsing xml, xsl files");
+            xslNode = docBuilder.parse(new InputSource(testFileInfo.inputName));
+            xmlNode = docBuilder.parse(new InputSource(testFileInfo.xmlName));
+            xslImpInclNode = docBuilder.parse(new InputSource(impInclFileInfo.inputName));
+            xmlImpInclNode = docBuilder.parse(new InputSource(impInclFileInfo.xmlName));
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Problem with factory; testcase may not work");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with factory; testcase may not work");
+        }
+        try
+        {
+            // Re-use DOMSource for stylesheet
+            DOMSource xmlSource1 = new DOMSource(xmlNode);
+            DOMResult result1 = new DOMResult(docBuilder.newDocument());
+            DOMSource xslSource = new DOMSource(xslNode);
+            Transformer transformer1 = factory.newTransformer(xslSource);
+            transformer1.setErrorListener(new DefaultErrorHandler());
+            transformer1.transform(xmlSource1, result1);
+            Node node1 = result1.getNode();
+            serializeDOMAndCheck(node1, testFileInfo.goldName, "transform first time xslSource worked");
+            // Use same Source for the stylesheet
+            DOMSource xmlSource2 = new DOMSource(xmlNode);
+            DOMResult result2 = new DOMResult(docBuilder.newDocument());
+            Transformer transformer2 = factory.newTransformer(xslSource);
+            transformer2.setErrorListener(new DefaultErrorHandler());
+            transformer2.transform(xmlSource2, result2);
+            Node node2 = result2.getNode();
+            serializeDOMAndCheck(node2, testFileInfo.goldName, "transform second time xslSource worked");
+
+            // Re-use DOMSource for XML doc; with the same stylesheet
+            DOMResult result3 = new DOMResult(docBuilder.newDocument());
+            Transformer transformer3 = factory.newTransformer(xslSource);
+            transformer3.setErrorListener(new DefaultErrorHandler());
+            transformer3.transform(xmlSource2, result3);
+            Node node3 = result3.getNode();
+            serializeDOMAndCheck(node3, testFileInfo.goldName, "transform reusing both xsl/xml Sources");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with reuse xslSource");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem reuse xslSource");
+        }
+
+        try
+        {
+            // Re-use DOMSource after setNode to different one
+            DOMSource xmlSource = new DOMSource(xmlNode);
+            DOMSource xslSource = new DOMSource(xslNode);
+            Transformer transformer1 = factory.newTransformer(xslSource);
+            transformer1.setErrorListener(new DefaultErrorHandler());
+            DOMResult result1 = new DOMResult(docBuilder.newDocument());
+            transformer1.transform(xmlSource, result1);
+            Node node1 = result1.getNode();
+            serializeDOMAndCheck(node1, testFileInfo.goldName, "transform with original Sources");
+
+            // Use same Sources, but change Nodes for xml,xsl
+            xmlSource.setNode(xmlImpInclNode);
+            xmlSource.setSystemId(impInclFileInfo.xmlName);
+            xslSource.setNode(xslImpInclNode);
+            xslSource.setSystemId(impInclFileInfo.inputName);
+            Transformer transformer2 = factory.newTransformer(xslSource);
+            transformer2.setErrorListener(new DefaultErrorHandler());
+            DOMResult result2 = new DOMResult(docBuilder.newDocument());
+            transformer2.transform(xmlSource, result2);
+            Node node2 = result2.getNode();
+            serializeDOMAndCheck(node2, impInclFileInfo.goldName, "transform after xml/xslSource.setNode, setSystemId");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with reuse after setNode");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with reuse after setNode");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method to serialize DOM and fileChecker.check().  
+     * @return true if pass, false otherwise
+     */
+    public boolean serializeDOMAndCheck(Node dom, String goldFileName, String comment)
+    {
+        if ((dom == null) || (goldFileName == null))
+        {
+            reporter.logWarningMsg("serializeDOMAndCheck of null dom or goldFileName!");
+            return false;
+        }
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            if (factory.getFeature(StreamResult.FEATURE))
+            {
+                // Use identity transformer to serialize
+                Transformer identityTransformer = factory.newTransformer();
+                identityTransformer.setErrorListener(new DefaultErrorHandler());
+                String outName = outNames.nextName();
+                FileOutputStream fos = new FileOutputStream(outName);
+                StreamResult streamResult = new StreamResult(fos);
+                DOMSource nodeSource = new DOMSource(dom);
+                reporter.logTraceMsg("serializeDOMAndCheck() into " + outNames.currentName());
+                identityTransformer.transform(nodeSource, streamResult);
+                fos.close();
+                fileChecker.check(reporter, 
+                                  new File(outNames.currentName()), 
+                                  new File(goldFileName), 
+                                  comment + " into " + outNames.currentName()+" gold is "+
+                                  goldFileName+" xsl is identity transform");
+                return true;    // Note: should check return from fileChecker.check!
+            }
+            else
+            {   // We should try another method to serialize the data
+                reporter.logWarningMsg("getFeature(StreamResult.FEATURE), can't validate serialized data");
+                return false;
+            }
+            
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("serializeDOMAndCheckFile threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "serializeDOMAndCheckFile threw:");
+            return false;
+        }
+    }
+
+
+    /**
+     * Worker method to create factory objects.  
+     * Changes caller's copy of passed arguments; passes-through
+     * any underlying exceptions; dfactory.setNamespaceAware(true)
+     */
+    public void createFactoryAndDocBuilder(TransformerFactory f, DocumentBuilder d)
+        throws Exception
+    {
+        f = TransformerFactory.newInstance();
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        dfactory.setNamespaceAware(true);
+        d = dfactory.newDocumentBuilder();
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by DOMSourceAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "REPLACE_any_new_test_arguments\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+
+        DOMSourceAPITest app = new DOMSourceAPITest();
+
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/package.html b/test/java/src/org/apache/qetest/trax/package.html
new file mode 100644
index 0000000..6a5b6a3
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/package.html
@@ -0,0 +1,41 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<!-- $Id$ -->
+<html>
+  <title>XSL-TEST TRAX testing package.</title>
+  <body>
+    <p>This package is for TRAX-interface API tests.<p>
+    <dl>
+      <dt><b>Author: </b></dt><dd><a href="mailto:shane_curcuru@lotus.com">Shane_Curcuru@lotus.com</a></dd>
+      <dt><b>Program(s) Under Test: </b></dt>
+      <dd><a href="http://xml.apache.org/xalan-j" target="_top">Xalan-J 2.x XSLT Processor</a></dd>
+    </dl>
+    <p>Most tests are completely generic to the TRAX interface, although they 
+    do default System properties to use the Xalan-J 2.x implementation.<p>
+    <ul>Current tests are primarily focused on covering the API's and include:
+    <li>ProcessorAPITest - basic coverage of both factory methods and instance methods</li>
+    <li>ResultAPITest</li>
+    <li>TransformerAPITest</li>
+    <li>TemplatesAPITest - also covers TemplatesBuilder class</li>
+    <li>TestThreads - a semi-automated test for multithreaded testing, 
+    results must be manually analyzed currently</li>
+    </ul>
+  </body>
+</html>
+
+
diff --git a/test/java/src/org/apache/qetest/trax/sax/SAXResultAPITest.java b/test/java/src/org/apache/qetest/trax/sax/SAXResultAPITest.java
new file mode 100644
index 0000000..cbee656
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/sax/SAXResultAPITest.java
@@ -0,0 +1,558 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * SAXResultAPITest.java
+ *
+ */
+package org.apache.qetest.trax.sax;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.LoggingContentHandler;
+import org.apache.qetest.xsl.LoggingLexicalHandler;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.ext.LexicalHandler;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for the SAXResult class of TRAX.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class SAXResultAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Information about an xsl/xml file pair for transforming with import/include.  
+     */
+    protected XSLTestfileInfo impInclFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Information about an xsl/xml file pair for transforming with DTD, etc.  
+     */
+    protected XSLTestfileInfo dtdFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SAX_SUBDIR = "trax" + File.separator + "sax";
+
+    /** Nonsense systemId for various tests.  */
+    public static final String NONSENSE_SYSTEMID = "file:///nonsense-system-id";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public SAXResultAPITest()
+    {
+        numTestCases = 3;  // REPLACE_num
+        testName = "SAXResultAPITest";
+        testComment = "API Coverage test for the SAXResult class of TRAX";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+
+        // Note these are initialized as strings denoting filenames,
+        //  and *not* as URL/URI's
+        testFileInfo.inputName = testBasePath + "SAXTest.xsl";
+        testFileInfo.xmlName = testBasePath + "SAXTest.xml";
+        testFileInfo.goldName = goldBasePath + "SAXTest.out";
+
+        impInclFileInfo.inputName = testBasePath + "SAXImpIncl.xsl";
+        impInclFileInfo.xmlName = testBasePath + "SAXImpIncl.xml";
+        impInclFileInfo.goldName = goldBasePath + "SAXImpIncl.out";
+
+        dtdFileInfo.inputName = testBasePath + "SAXdtd.xsl";
+        dtdFileInfo.xmlName = testBasePath + "SAXdtd.xml";
+        dtdFileInfo.goldName = goldBasePath + "SAXdtd.out";
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(SAXSource.FEATURE)
+                  && tf.getFeature(SAXResult.FEATURE)))
+            {   // The rest of this test relies on SAX
+                reporter.logErrorMsg("SAX*.FEATURE not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic API coverage, constructor and set/get methods.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage, constructor and set/get methods");
+
+        // Default no-arg ctor sets nothing 
+        SAXResult defaultSAX = new SAXResult();
+        reporter.checkObject(defaultSAX.getHandler(), null, "Default SAXResult should have null Handler");
+        reporter.checkObject(defaultSAX.getLexicalHandler(), null, "Default SAXResult should have null LexicalHandler");
+        reporter.checkObject(defaultSAX.getSystemId(), null, "Default SAXResult should have null SystemId");
+
+        try
+        {
+            TransformerFactory factory = null;
+            SAXTransformerFactory saxFactory = null;
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // ctor(Handler) with identity transformer, which is both
+            //  a ContentHandler and LexicalHandler
+            TransformerHandler tHandler = saxFactory.newTransformerHandler();  // identity transformer
+            ContentHandler handler = (ContentHandler)tHandler;
+            SAXResult handlerSAX = new SAXResult(handler);
+            reporter.checkObject(handlerSAX.getHandler(), handler, "SAXResult(handler) has Handler: " + handlerSAX.getHandler());
+            reporter.checkObject(handlerSAX.getLexicalHandler(), null, "SAXResult(handler) should have null LexicalHandler");
+            reporter.checkObject(handlerSAX.getSystemId(), null, "SAXResult(handler) should have null SystemId");
+
+            // ctor(Handler) with LoggingContentHandler, which not
+            //  a LexicalHandler, so it can't be cast
+            ContentHandler nonLexHandler = new LoggingContentHandler(reporter);
+            SAXResult otherHandlerSAX = new SAXResult(nonLexHandler);
+            reporter.checkObject(otherHandlerSAX.getHandler(), nonLexHandler, "SAXResult(non-lexhandler) has Handler: " + otherHandlerSAX.getHandler());
+            reporter.checkObject(otherHandlerSAX.getLexicalHandler(), null, "SAXResult(non-lexhandler) should have null LexicalHandler when ContentHandler!=LexicalHandler");
+            reporter.checkObject(otherHandlerSAX.getSystemId(), null, "SAXResult(non-lexhandler) should have null SystemId");
+
+            // Note the Javadoc in SAXResult which talks about 
+            //  automatically casting the ContentHandler into 
+            //  a LexicalHandler: this cannot be tested alone 
+            //  here, since it's the Transformer that does that 
+            //  internally if necessary, and it may not get set 
+            //  back into the SAXResult object itself
+
+            // set/getHandler API coverage
+            SAXResult wackySAX = new SAXResult();
+            wackySAX.setHandler(handler); // isa LexicalHandler also
+            reporter.checkObject(wackySAX.getHandler(), handler, "set/getHandler API coverage");
+            reporter.checkObject(wackySAX.getLexicalHandler(), null, "getLexicalHandler after set/getHandler");
+
+            // set/getLexicalHandler API coverage
+            LexicalHandler lexHandler = new LoggingLexicalHandler(reporter);
+            reporter.logTraceMsg("lexHandler is " + lexHandler);
+            wackySAX.setLexicalHandler(lexHandler); // SCUU4SPPMV - does not work
+            LexicalHandler gotLH = wackySAX.getLexicalHandler();
+            if (gotLH == lexHandler)
+            {
+                reporter.checkPass("set/getLexicalHandler API coverage is: " + wackySAX.getLexicalHandler(), "SCUU4SPPMV");
+            }
+            else
+            {
+                reporter.checkFail("set/getLexicalHandler API coverage is: " + wackySAX.getLexicalHandler(), "SCUU4SPPMV");
+            }
+            reporter.checkObject(wackySAX.getHandler(), handler, "set/getLexicalHandler API coverage, does not affect ContentHandler");
+
+            // set/getHandler API coverage, setting to null, which 
+            //  should work here but can't be used legally
+            wackySAX.setHandler(null);
+            reporter.checkObject(wackySAX.getHandler(), null, "set/getHandler API coverage to null (possibly illegal)");
+            gotLH = wackySAX.getLexicalHandler();
+            if (gotLH == lexHandler)
+            {
+                reporter.checkPass("getLexicalHandler unaffected by setHandler(null), is: " + wackySAX.getLexicalHandler(), "SCUU4SPPMV");
+            }
+            else
+            {
+                reporter.checkFail("getLexicalHandler unaffected by setHandler(null), is: " + wackySAX.getLexicalHandler(), "SCUU4SPPMV");
+            }
+            wackySAX.setLexicalHandler(null);
+            reporter.checkObject(wackySAX.getLexicalHandler(), null, "set/getHandler API coverage to null (possibly illegal)");
+
+            // set/getSystemId API coverage
+            wackySAX.setSystemId(NONSENSE_SYSTEMID);
+            reporter.checkObject(wackySAX.getSystemId(), NONSENSE_SYSTEMID, "set/getSystemId API coverage");
+            wackySAX.setSystemId(null);
+            reporter.checkObject(wackySAX.getSystemId(), null, "set/getSystemId API coverage to null");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with SAXResult set/get API");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with SAXResult set/get API");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic functionality of SAXResults.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Basic functionality of SAXResults");
+        // Provide local copies of URLized filenames, so that we can
+        //  later run tests with either Strings or URLs
+        String xslURI = QetestUtils.filenameToURL(testFileInfo.inputName);
+        String xmlURI = QetestUtils.filenameToURL(testFileInfo.xmlName);
+        String xslImpInclURI = QetestUtils.filenameToURL(impInclFileInfo.inputName);
+        String xmlImpInclURI = QetestUtils.filenameToURL(impInclFileInfo.xmlName);
+
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+        Templates streamTemplates;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+            // Process a simple stylesheet for use later
+            reporter.logTraceMsg("factory.newTemplates(new StreamSource(" + xslURI + "))");
+            streamTemplates = factory.newTemplates(new StreamSource(xslURI));
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,"Problem creating factory; can't continue testcase");
+            return true;
+        }
+        try
+        {
+            // Verify very simple use of just a SAXResult
+            // Use simple Xalan serializer for disk output, setting 
+            //  the stylesheet's output properties into it
+            Properties outProps = streamTemplates.getOutputProperties();
+            // Use a TransformerHandler for serialization: this 
+            //  supports ContentHandler and can replace the 
+            //  Xalan/Xerces specific Serializers we used to use
+            TransformerHandler tHandler = saxFactory.newTransformerHandler();
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            //Serializer serializer = SerializerFactory.getSerializer(outProps);
+            //reporter.logTraceMsg("serializer.setOutputStream(new FileOutputStream(" + outNames.currentName() + ")");
+            //serializer.setOutputStream(fos);
+            //SAXResult saxResult = new SAXResult(serializer.asContentHandler()); // use other ContentHandler 
+            Result realResult = new StreamResult(fos);
+            tHandler.setResult(realResult);
+            SAXResult saxResult = new SAXResult(tHandler);
+            
+            // Just do a normal transform to this result
+            Transformer transformer = streamTemplates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.logTraceMsg("transform(new StreamSource(" + xmlURI + "), saxResult)");
+            transformer.transform(new StreamSource(xmlURI), saxResult);
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "simple transform into SAXResult into: " + outNames.currentName());
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Basic functionality of SAXResults threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "Basic functionality of SAXResults");
+        }
+
+        try
+        {
+            // Negative test: SAXResult without a handler should throw
+            SAXResult saxResult = new SAXResult();
+            
+            // Just do a normal transform to this result
+            Transformer transformer = streamTemplates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.logTraceMsg("transform(..., nullsaxResult)");
+            transformer.transform(new StreamSource(xmlURI), saxResult);
+            reporter.checkFail("transform(..., nullsaxResult) should have thrown exception");
+        }
+        catch (IllegalArgumentException iae)
+        {
+            // This is the exception we expect, so pass (and don't 
+            //  bother displaying the full logThrowable)
+            reporter.checkPass("transform(..., nullsaxResult) properly threw: " + iae.toString());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("transform(..., nullsaxResult) unexpectedly threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "transform(..., nullsaxResult) threw");
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Detailed functionality of SAXResults: setLexicalHandler.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Detailed functionality of SAXResults: setLexicalHandler");
+        String xslURI = QetestUtils.filenameToURL(dtdFileInfo.inputName);
+        String xmlURI = QetestUtils.filenameToURL(dtdFileInfo.xmlName);
+
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+        Templates streamTemplates;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+            // Process a simple stylesheet for use later
+            reporter.logTraceMsg("factory.newTemplates(new StreamSource(" + xslURI + "))");
+            streamTemplates = factory.newTemplates(new StreamSource(xslURI));
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,"Problem creating factory; can't continue testcase");
+            return true;
+        }
+        try
+        {
+            // Validate a StreamSource to a logging SAXResult, 
+            //  where we validate the actual events passed 
+            //  through the SAXResult's ContentHandler and 
+            //  LexicalHandler
+
+            // Have an actual handler that does the physical output
+            reporter.logInfoMsg("TransformerHandler.setResult(StreamResult)");
+            TransformerHandler tHandler = saxFactory.newTransformerHandler();
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result realResult = new StreamResult(fos);
+            tHandler.setResult(realResult);
+
+            SAXResult saxResult = new SAXResult();
+            // Add a contentHandler that logs out info about the 
+            //  transform, and that passes-through calls back 
+            //  to the original tHandler
+            reporter.logInfoMsg("loggingSaxResult.setHandler(loggingContentHandler)");
+            LoggingContentHandler lch = new LoggingContentHandler((Logger)reporter);
+            lch.setDefaultHandler(tHandler);
+            saxResult.setHandler(lch);
+
+            // Add a lexicalHandler that logs out info about the 
+            //  transform, and that passes-through calls back 
+            //  to the original tHandler
+            reporter.logInfoMsg("loggingSaxResult.setLexicalHandler(loggingLexicalHandler)");
+            LoggingLexicalHandler llh = new LoggingLexicalHandler((Logger)reporter);
+            llh.setDefaultHandler(tHandler);
+            saxResult.setLexicalHandler(llh);
+            
+            // Just do a normal transform to this result
+            Transformer transformer = streamTemplates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.logTraceMsg("transform(new StreamSource(" + xmlURI + "), loggingSaxResult)");
+            transformer.transform(new StreamSource(xmlURI), saxResult);
+            fos.close(); // must close ostreams we own
+            reporter.logStatusMsg("Closed result stream from loggingSaxResult, about to check result");
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(dtdFileInfo.goldName), 
+                              "transform loggingSaxResult into: " + outNames.currentName());
+            reporter.logWarningMsg("//@todo validate that llh got lexical events: Bugzilla#888");
+            reporter.logWarningMsg("//@todo validate that lch got content events");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Basic functionality1 of SAXResults threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "Basic functionality1 of SAXResults");
+        }
+        try
+        {
+            // Same as above, with identityTransformer
+            reporter.logInfoMsg("TransformerHandler.setResult(StreamResult)");
+            TransformerHandler tHandler = saxFactory.newTransformerHandler();
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result realResult = new StreamResult(fos);
+            tHandler.setResult(realResult);
+
+            SAXResult saxResult = new SAXResult();
+            reporter.logInfoMsg("loggingSaxResult.setHandler(loggingContentHandler)");
+            LoggingContentHandler lch = new LoggingContentHandler((Logger)reporter);
+            lch.setDefaultHandler(tHandler);
+            saxResult.setHandler(lch);
+
+            reporter.logInfoMsg("loggingSaxResult.setLexicalHandler(loggingLexicalHandler)");
+            LoggingLexicalHandler llh = new LoggingLexicalHandler((Logger)reporter);
+            llh.setDefaultHandler(tHandler);
+            saxResult.setLexicalHandler(llh);
+            
+            // Do an identityTransform to this result
+            Transformer identityTransformer = TransformerFactory.newInstance().newTransformer();
+            identityTransformer.setErrorListener(new DefaultErrorHandler());
+            reporter.logTraceMsg("identityTransform(new StreamSource(" + xmlURI + "), loggingSaxResult)");
+            identityTransformer.transform(new StreamSource(xmlURI), saxResult);
+            fos.close(); // must close ostreams we own
+            reporter.logStatusMsg("Closed result stream from loggingSaxResult, about to check result");
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(dtdFileInfo.xmlName), 
+                              "identity transform loggingSaxResult into: " + outNames.currentName());
+            reporter.logWarningMsg("//@todo validate that llh got lexical events: Bugzilla#888");
+            reporter.logWarningMsg("//@todo validate that lch got content events");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Basic functionality2 of SAXResults threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "Basic functionality2 of SAXResults");
+        }
+        try
+        {
+            // Validate a DOMSource to a logging SAXResult, as above 
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+            reporter.logTraceMsg("docBuilder.parse(" + xmlURI + ")");
+            Node xmlNode = docBuilder.parse(new InputSource(xmlURI));
+
+
+            // Have an actual handler that does the physical output
+            TransformerHandler tHandler = saxFactory.newTransformerHandler();
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result realResult = new StreamResult(fos);
+            tHandler.setResult(realResult);
+
+            SAXResult saxResult = new SAXResult();
+            // Add a contentHandler that logs out info about the 
+            //  transform, and that passes-through calls back 
+            //  to the original tHandler
+            LoggingContentHandler lch = new LoggingContentHandler((Logger)reporter);
+            lch.setDefaultHandler(tHandler);
+            saxResult.setHandler(lch);
+
+            // Add a lexicalHandler that logs out info about the 
+            //  transform, and that passes-through calls back 
+            //  to the original tHandler
+            LoggingLexicalHandler llh = new LoggingLexicalHandler((Logger)reporter);
+            llh.setDefaultHandler(tHandler);
+            saxResult.setLexicalHandler(llh);
+            
+            // Just do a normal transform to this result
+            Transformer transformer = streamTemplates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.logTraceMsg("transform(new DOMSource(" + xmlURI + "), loggingSaxResult)");
+            transformer.transform(new DOMSource(xmlNode), saxResult);
+            fos.close(); // must close ostreams we own
+            reporter.logStatusMsg("Closed result stream from loggingSaxResult, about to check result");
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(dtdFileInfo.goldName), 
+                              "transform DOM-loggingSaxResult into: " + outNames.currentName());
+            reporter.logWarningMsg("//@todo validate that llh got lexical events: Bugzilla#888");
+            reporter.logWarningMsg("//@todo validate that lch got content events");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Basic functionality3 of SAXResults threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "Basic functionality3 of SAXResults");
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by SAXResultAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        SAXResultAPITest app = new SAXResultAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/sax/SAXSourceAPITest.java b/test/java/src/org/apache/qetest/trax/sax/SAXSourceAPITest.java
new file mode 100644
index 0000000..53c8525
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/sax/SAXSourceAPITest.java
@@ -0,0 +1,437 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * SAXSourceAPITest.java
+ *
+ */
+package org.apache.qetest.trax.sax;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Properties;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for the SAXSource class of TRAX.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class SAXSourceAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Information about an xsl/xml file pair for transforming with import/include.  
+     */
+    protected XSLTestfileInfo impInclFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SAX_SUBDIR = "trax" + File.separator + "sax";
+
+    /** Nonsense systemId for various tests.  */
+    public static final String NONSENSE_SYSTEMID = "file:///nonsense-system-id";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public SAXSourceAPITest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "SAXSourceAPITest";
+        testComment = "API Coverage test for the SAXSource class of TRAX";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+
+        // Note these are initialized as strings denoting filenames,
+        //  and *not* as URL/URI's
+        testFileInfo.inputName = testBasePath + "SAXTest.xsl";
+        testFileInfo.xmlName = testBasePath + "SAXTest.xml";
+        testFileInfo.goldName = goldBasePath + "SAXTest.out";
+
+        impInclFileInfo.inputName = testBasePath + "SAXImpIncl.xsl";
+        impInclFileInfo.xmlName = testBasePath + "SAXImpIncl.xml";
+        impInclFileInfo.goldName = goldBasePath + "SAXImpIncl.out";
+
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(SAXSource.FEATURE)
+                  && tf.getFeature(SAXResult.FEATURE)))
+            {   // The rest of this test relies on SAX
+                reporter.logErrorMsg("SAX*.FEATURE not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic API coverage, constructor and set/get methods.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage, constructor and set/get methods");
+
+        // Default no-arg ctor sets nothing (but needs special test for 
+        //  creating new doc when being transformed)
+        SAXSource defaultSAX = new SAXSource();
+        reporter.checkObject(defaultSAX.getInputSource(), null, "Default SAXSource should have null InputSource");
+        reporter.checkObject(defaultSAX.getXMLReader(), null, "Default SAXSource should have null XMLReader");
+        reporter.check(defaultSAX.getSystemId(), null, "Default SAXSource should have null SystemId");
+
+        try
+        {
+            // ctor(InputSource) with an InputSource()
+            InputSource srcNoID = new InputSource();
+            SAXSource saxSrcNoID = new SAXSource(srcNoID);
+            reporter.checkObject(saxSrcNoID.getInputSource(), srcNoID, "SAXSource(new InputSource()) has InputSource: " + saxSrcNoID.getInputSource());
+            reporter.checkObject(saxSrcNoID.getXMLReader(), null, "SAXSource(new InputSource()) should have null XMLReader");
+            reporter.check(saxSrcNoID.getSystemId(), null, "SAXSource(new InputSource()) should have null SystemId");
+
+            // ctor(InputSource) with an InputSource("sysId")
+            InputSource srcWithID = new InputSource(NONSENSE_SYSTEMID);
+            SAXSource saxSrcWithID = new SAXSource(srcWithID);
+            reporter.checkObject(saxSrcWithID.getInputSource(), srcWithID, "SAXSource(new InputSource(sysId)) has InputSource: " + saxSrcWithID.getInputSource());
+            reporter.checkObject(saxSrcWithID.getXMLReader(), null, "SAXSource(new InputSource(sysId)) should have null XMLReader");
+            reporter.check(saxSrcWithID.getSystemId(), NONSENSE_SYSTEMID, "SAXSource(new InputSource(sysId)) has SystemId: " + saxSrcWithID.getSystemId());
+
+            // ctor(XMLReader, InputSource) 
+            reporter.logTraceMsg("API coverage of ctor(XMLReader, InputSource)...");
+            reporter.logTraceMsg("JAXP way:reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader()");
+            XMLReader reader2 = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
+            SAXSource saxSrcReaderID2 = new SAXSource(reader2, srcWithID);
+            reporter.checkObject(saxSrcReaderID2.getInputSource(), srcWithID, "SAXSource(reader, new InputSource(sysId)) has InputSource: " + saxSrcReaderID2.getInputSource());
+            reporter.checkObject(saxSrcReaderID2.getXMLReader(), reader2, "SAXSource(reader, new InputSource(sysId)) has XMLReader: " + saxSrcReaderID2.getXMLReader());
+            reporter.check(saxSrcReaderID2.getSystemId(), NONSENSE_SYSTEMID, "SAXSource(reader, new InputSource(sysId)) has SystemId: " + saxSrcReaderID2.getSystemId());
+
+            // ctor(XMLReader, InputSource) 
+            reporter.logTraceMsg("SAX way:reader = SAXParser.getXMLReader()");
+            // Be sure to use the JAXP methods only!
+            SAXParserFactory factory = SAXParserFactory.newInstance();
+            factory.setNamespaceAware(true);
+            SAXParser saxParser = factory.newSAXParser();
+            XMLReader reader = saxParser.getXMLReader();
+            SAXSource saxSrcReaderID = new SAXSource(reader, srcWithID);
+            reporter.checkObject(saxSrcReaderID.getInputSource(), srcWithID, "SAXSource(reader, new InputSource(sysId)) has InputSource: " + saxSrcReaderID.getInputSource());
+            reporter.checkObject(saxSrcReaderID.getXMLReader(), reader, "SAXSource(reader, new InputSource(sysId)) has XMLReader: " + saxSrcReaderID.getXMLReader());
+            reporter.check(saxSrcReaderID.getSystemId(), NONSENSE_SYSTEMID, "SAXSource(reader, new InputSource(sysId)) has SystemId: " + saxSrcReaderID.getSystemId());
+
+            // ctor(null InputSource) - note it won't actually 
+            //  be able to be used as a Source in real life
+            SAXSource saxNullSrc = new SAXSource(null);
+            reporter.checkObject(saxNullSrc.getInputSource(), null, "SAXSource(null InputSource) has null InputSource");
+            reporter.checkObject(saxNullSrc.getXMLReader(), null, "SAXSource(null InputSource) has null XMLReader");
+            reporter.check(saxNullSrc.getSystemId(), null, "SAXSource(null InputSource) has null SystemId");
+
+            // ctor(null Reader, null InputSource)
+            SAXSource saxNullSrc2 = new SAXSource(null, null);
+            reporter.checkObject(saxNullSrc2.getInputSource(), null, "SAXSource(null XMLReader, null InputSource) has null InputSource");
+            reporter.checkObject(saxNullSrc2.getXMLReader(), null, "SAXSource(null XMLReader, null InputSource) has null XMLReader");
+            reporter.check(saxNullSrc2.getSystemId(), null, "SAXSource(null XMLReader, null InputSource) has null SystemId");
+
+
+            // Validate various simple set/get methods
+            SAXSource wackySAX = new SAXSource();
+            // Validate setting systemId auto-creates InputSource 
+            //  with that systemId
+            wackySAX.setSystemId(NONSENSE_SYSTEMID);
+            reporter.checkObject(wackySAX.getSystemId(), NONSENSE_SYSTEMID, "set/getSystemId API coverage - after autocreate InputSource");
+            reporter.check((wackySAX.getInputSource() != null), true, "setSystemId autocreates an InputSource");
+            InputSource newIS = wackySAX.getInputSource();
+            reporter.check(newIS.getSystemId(), NONSENSE_SYSTEMID, "autocreated InputSource has correct systemId");
+
+            // API Coverage set/getSystemId
+            wackySAX.setSystemId("another-system-id");
+            reporter.checkObject(wackySAX.getSystemId(), "another-system-id", "set/getSystemId API coverage");
+            InputSource gotIS = wackySAX.getInputSource();
+            reporter.check(gotIS.getSystemId(), "another-system-id", "Changing SAXSource systemId changes InputSource's");
+            // setting to null explicitly
+            wackySAX.setSystemId(null);
+            reporter.checkObject(wackySAX.getSystemId(), null, "set/getSystemId API coverage with null");
+            reporter.checkObject(wackySAX.getInputSource().getSystemId(), null, "InputSource follows setSystemId(null) of parent source");
+
+            // API Coverage set/getInputSource
+            InputSource anotherIS = new InputSource(NONSENSE_SYSTEMID);
+            wackySAX.setInputSource(anotherIS);
+            reporter.checkObject(wackySAX.getInputSource(), anotherIS, "set/getInputSource API coverage");
+            reporter.check(wackySAX.getSystemId(), NONSENSE_SYSTEMID, "setInputSource sets our systemId");
+
+
+            // API Coverage set/getXMLReader
+            reporter.checkObject(wackySAX.getXMLReader(), null, "wackySAX still does not have an XMLReader");
+            // Be sure to use the JAXP methods only!
+            saxParser = factory.newSAXParser();
+            XMLReader wackyReader = saxParser.getXMLReader();
+            wackySAX.setXMLReader(wackyReader);
+            reporter.checkObject(wackySAX.getXMLReader(), wackyReader, "set/getXMLReader API coverage");
+            wackySAX.setXMLReader(null);
+            reporter.checkObject(wackySAX.getXMLReader(), null, "set/getXMLReader API coverage with null");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with SAXSource set/get API");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with SAXSource set/get API");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic functionality of SAXSources.
+     * Use them in simple transforms, with/without systemId set.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Basic functionality of SAXSources");
+        // Provide local copies of URLized filenames, so that we can
+        //  later run tests with either Strings or URLs
+        String xslURI = QetestUtils.filenameToURL(testFileInfo.inputName);
+        String xmlURI = QetestUtils.filenameToURL(testFileInfo.xmlName);
+        String xslImpInclURI = QetestUtils.filenameToURL(impInclFileInfo.inputName);
+        String xmlImpInclURI = QetestUtils.filenameToURL(impInclFileInfo.xmlName);
+
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,"Problem creating factory; can't continue testcase");
+            return true;
+        }
+
+        try
+        {
+            // Validate process of a stylesheet using a simple SAXSource with a URL
+            reporter.logTraceMsg("Create templates/transformer from SAXSource(new InputSource(URL))");
+            SAXSource xslSAXSrc = new SAXSource(new InputSource(xslURI));
+            Templates templates = factory.newTemplates(xslSAXSrc);
+            reporter.check((templates != null), true, "Create templates from SAXSource(new InputSource(URL))");
+            
+            xslSAXSrc = new SAXSource(new InputSource(xslURI));
+            Transformer transformer1 = factory.newTransformer(xslSAXSrc);
+            transformer1.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer1 != null), true, "Create transformer from SAXSource(new InputSource(URL))");
+
+            Transformer transformer2 = templates.newTransformer();
+            transformer2.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer2 != null), true, "Create transformer from earlier templates");
+
+            reporter.logTraceMsg("Validate transform of SAXSource(XML) using above transformers");
+            SAXSource xmlSAXSrc = new SAXSource(new InputSource(xmlURI));
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            transformer1.transform(xmlSAXSrc, new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform of SAXSource(URL) using newTransformer transformer into: " + outNames.currentName());
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            transformer2.transform(xmlSAXSrc, new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform of SAXSource(URL) using templates.getTransformer into: " + outNames.currentName());
+
+
+            // Validate process of a stylesheet using a simple SAXSource with an InputStream
+            //  Note setting systemId is not necessary with this stylesheet
+            reporter.logTraceMsg("Create templates/transformer from SAXSource(...new InputStream(" + testFileInfo.inputName + ")))");
+            SAXSource xslSAXSrcStream = new SAXSource(new InputSource(new FileInputStream(testFileInfo.inputName)));
+            Templates templatesStream = factory.newTemplates(xslSAXSrc);
+            reporter.check((templatesStream != null), true, "Create templates from SAXSource(FileInputStream())");
+            Transformer transformerStream = templatesStream.newTransformer();
+            transformerStream.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformerStream != null), true, "Create transformer from templates");
+            
+            reporter.logTraceMsg("Validate transform of SAXSource(...new InputStream(" + testFileInfo.xmlName + " )) using above transformers");
+            SAXSource xmlSAXSrcStream = new SAXSource(new InputSource(new FileInputStream(testFileInfo.xmlName)));
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            transformerStream.transform(xmlSAXSrcStream, new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform of SAXSource(FileInputStreams) into: " + outNames.currentName());
+            
+        reporter.logTraceMsg("@todo: add more systemId tests of various types here");
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("simple SAXSources threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "simple SAXSources threw");
+        }
+
+        try
+        {
+            // Validate process of a stylesheet using a simple SAXSource with imports/includes
+            // Since we're providing the InputSource with a URL, we
+            //  don't also need to setSystemId
+            reporter.logTraceMsg("Create templates/transformer from SAXSource(new InputSource(" + xslImpInclURI + "))");
+            SAXSource xslSAXSrc = new SAXSource(new InputSource(xslImpInclURI));
+            Templates templates = factory.newTemplates(xslSAXSrc);
+            reporter.check((templates != null), true, "Create templates from SAXSource(new InputSource(" + xslImpInclURI + "))");
+            
+            xslSAXSrc = new SAXSource(new InputSource(xslImpInclURI));
+            Transformer transformer1 = factory.newTransformer(xslSAXSrc);
+            transformer1.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer1 != null), true, "Create transformer from SAXSource(new InputSource(" + xslImpInclURI + "))");
+
+            Transformer transformer2 = factory.newTransformer(xslSAXSrc);
+            transformer2.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer2 != null), true, "Create transformer from earlier templates");
+
+            reporter.logTraceMsg("Validate transform of SAXSource(" + xmlImpInclURI + ") using above transformers");
+            SAXSource xmlSAXSrc = new SAXSource(new InputSource(xmlImpInclURI));
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            transformer1.transform(xmlSAXSrc, new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(impInclFileInfo.goldName), 
+                              "transform of SAXSource(impinclURLXML) using newTransformer transformer into: " + outNames.currentName());
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            xmlSAXSrc = new SAXSource(new InputSource(xmlImpInclURI));
+            xmlSAXSrc.setSystemId(xmlImpInclURI); // see if setting it affects anything
+            transformer2.transform(xmlSAXSrc, new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(impInclFileInfo.goldName), 
+                              "transform of SAXSource(impinclURLXML) using templates.getTransformer into: " + outNames.currentName());
+
+            reporter.logTraceMsg("@todo: add systemId tests, etc. for various kinds of InputSources");
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("impinclURL SAXSources threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "impinclURL SAXSources threw");
+        }
+
+        reporter.logTraceMsg("@todo: add SAXSource(Reader, InputSource) tests");
+
+        reporter.logTraceMsg("@todo: add wacky tests: reuse SAXSource, use then set/get then reuse, etc.");
+
+        reporter.logTraceMsg("@todo: test static sourceToInputSource() method");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by SAXSourceAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        SAXSourceAPITest app = new SAXSourceAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/sax/SAXTransformerFactoryAPITest.java b/test/java/src/org/apache/qetest/trax/sax/SAXTransformerFactoryAPITest.java
new file mode 100644
index 0000000..28508e5
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/sax/SAXTransformerFactoryAPITest.java
@@ -0,0 +1,912 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * SAXTransformerFactoryAPITest.java
+ *
+ */
+package org.apache.qetest.trax.sax;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TemplatesHandler;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.trax.LoggingErrorListener;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLFilter;
+import org.xml.sax.XMLReader;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for SAXTransformerFactory.
+ * @author Krishna.Meduri@eng.sun.com
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class SAXTransformerFactoryAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Basic test file: cities.xml/xsl/out.
+     */
+    protected XSLTestfileInfo citiesFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Alternate test file: citiesinclude.xsl.
+     */
+    protected String citiesIncludeFileName = null;
+
+    /** 
+     * Alternate gold file: citiesSerialized.out.
+     */
+    protected String citiesSerializedFileName = null;
+
+    /** Gold file used for tests we haven't validated the correct results of yet.  */
+    protected String NOT_DEFINED;
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SAX_SUBDIR = "trax" + File.separator + "sax";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public SAXTransformerFactoryAPITest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "SAXTransformerFactoryAPITest";
+        testComment = "API Coverage test for SAXTransformerFactory";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+
+        citiesFileInfo.inputName = testBasePath + "cities.xsl";
+        citiesFileInfo.xmlName = testBasePath + "cities.xml";
+        citiesFileInfo.goldName = goldBasePath + "cities.out";    // Tests 001 - 009
+
+        citiesIncludeFileName = testBasePath + File.separator + "impincl" 
+                                + File.separator + "citiesinclude.xsl"; // Test 004, etc.
+
+        citiesSerializedFileName = goldBasePath + "citiesSerialized.out";    // Tests 010 - 013
+        NOT_DEFINED = goldBasePath + "need-validated-output-file-here.out";
+
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(SAXSource.FEATURE)
+                  && tf.getFeature(SAXResult.FEATURE)))
+            {   // The rest of this test relies on SAX
+                reporter.logErrorMsg("SAX*.FEATURE not supported! Some tests may be invalid!");
+            }
+
+            if (!(tf.getFeature(SAXTransformerFactory.FEATURE)
+                  && tf.getFeature(SAXTransformerFactory.FEATURE_XMLFILTER))) {
+                // The rest of this test relies on SAXTransformerFactory
+                reporter.logErrorMsg("SAXTransformerFactory.FEATURE* not "
+                                     +"supported!  Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("Problem creating factory; Some tests may be invalid!");
+        }
+        return true;
+    }
+
+
+    /**
+     * Call various Sun tests of SAX-related classes.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Call various Sun tests of SAX-related classes");
+
+        // Just call each method in order, with appropriate input
+        //  and output filenames
+        // Each method will call check() itself, and log any problems
+        SAXTFactoryTest001(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest002(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest003(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest004(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest005(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest006(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        // Validate the output by comparing against gold
+        // 18-Dec-00 Note: need to check what we should be 
+        //  validating first - this test case seems incomplete
+        // SAXTFactoryTest007(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest008(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest009(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest010(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest011(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest012(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+        SAXTFactoryTest013(citiesFileInfo.xmlName, citiesFileInfo.inputName, citiesFileInfo.goldName);
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * SAXTFactoryTest001 test.  
+     * This tests newTransformerhandler() method which takes StreamSource as argument. This is a positive test
+     */
+    public void SAXTFactoryTest001(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest001: newTransformerhandler() method which takes StreamSource as argument. ");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            XMLReader reader = getJAXPXMLReader();
+
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory)tfactory;
+            TransformerHandler handler = saxTFactory.newTransformerHandler(
+                        new StreamSource(QetestUtils.filenameToURL(xslName)));
+            //Result result = new StreamResult(System.out);
+            // Send results out to the next output name
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+
+            handler.setResult(result);
+            reader.setContentHandler(handler);
+            // Log what output is about to be created
+            reporter.logInfoMsg("reader.parse() into: " + outNames.currentName());
+            reader.parse(QetestUtils.filenameToURL(xmlName));
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                        new File(outNames.currentName()), 
+                        new File(goldName), 
+                        "SAXTFactoryTest001: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest001 threw");
+            reporter.checkFail("SAXTFactoryTest001 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest001()
+
+
+    /**
+     * SAXTFactoryTest002 test.  
+     * This tests newTransformerhandler() method which takes SAXSource as argument. This is a positive test
+     */
+    public void SAXTFactoryTest002(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest002: This tests newTransformerhandler() method which takes SAXSource as argument. ");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            XMLReader reader = getJAXPXMLReader();
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+
+            InputSource is = new InputSource(new FileInputStream(xslName));
+            SAXSource ss = new SAXSource();
+            ss.setInputSource(is);
+
+            TransformerHandler handler =  saxTFactory.newTransformerHandler(ss);
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+
+            handler.setResult(result);
+            reader.setContentHandler(handler);
+
+            // Log what output is about to be created
+            reporter.logInfoMsg("SAXTFactoryTest002 into: " + outNames.currentName());
+            reader.parse(QetestUtils.filenameToURL(xmlName));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldName), 
+                              "SAXTFactoryTest002: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest002 threw");
+            reporter.checkFail("SAXTFactoryTest002 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest002()
+
+    /**
+     * SAXTFactoryTest003 test.  
+     * This tests newTransformerhandler() method which takes DOMSource as argument. No relative URIs used. This is a positive test
+     */
+    public void SAXTFactoryTest003(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest003: This tests newTransformerhandler() method which takes DOMSource as argument. No relative URIs used. ");
+        reporter.logStatusMsg("Note: Need to verify that URI's are still correct from porting -sc");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        LoggingErrorListener loggingErrListener = new LoggingErrorListener(reporter);
+        tfactory.setErrorListener(loggingErrListener);
+        try 
+        {
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // Ensure we get namespaces! May be required for some Xerces versions
+
+            DocumentBuilder docBuilder = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBuilder.parse(new File(" + xslName + "))");
+            Document document = docBuilder.parse(new File(xslName));
+            Node node = (Node)document;
+            DOMSource domSource = new DOMSource(node);
+
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory)tfactory;
+            TransformerHandler handler = saxTFactory.newTransformerHandler(domSource);
+
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+            handler.setResult(result);
+
+            XMLReader reader = getJAXPXMLReader();
+            reader.setContentHandler(handler);
+
+            // Log what output is about to be created
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            reader.parse(QetestUtils.filenameToURL(xmlName));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldName), 
+                              "SAXTFactoryTest003: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest003 threw");
+            reporter.checkFail("SAXTFactoryTest003 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest003()
+
+
+    /**
+     * SAXTFactoryTest004 test.  
+     * This tests newTransformerhandler() method which takes DOMSource as argument. Here a relative URI is used in citiesinclude.xsl file. setSystemId is not used for DOMSource. It should throw an exception. This is a negative test
+     */
+    public void SAXTFactoryTest004(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest004: This tests newTransformerhandler() method which takes DOMSource as argument. Here a relative URI is used in citiesinclude.xsl file. setSystemId is not used for DOMSource. It should throw an exception. This is a negative test");
+        // Grab an extra outName, so the numbers line up - purely cosmetic, not really needed
+        String tmpOutName = outNames.nextName();
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // Ensure we get namespaces! May be required for some Xerces versions
+            DocumentBuilder docBuilder = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBuilder.parse(new File(" + citiesIncludeFileName + "))");
+            Document document = docBuilder.parse(new File(citiesIncludeFileName));  // note specific file name used
+            Node node = (Node) document;
+            DOMSource domSource = new DOMSource(node);
+            // setSystemId is not used for DOMSource
+
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+            TransformerHandler handler = saxTFactory.newTransformerHandler(domSource);
+
+            FileOutputStream fos = new FileOutputStream(tmpOutName);
+            Result result = new StreamResult(fos);
+            handler.setResult(result);
+
+            XMLReader reader = getJAXPXMLReader();
+            reader.setContentHandler(handler);
+
+            // Log what output is about to be created
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            reader.parse(QetestUtils.filenameToURL(xmlName));
+            fos.close(); // just to be complete
+
+            reporter.checkFail("Should have thrown exception because systemId not set!");
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logStatusMsg("@todo validate specific exception type");
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest004 threw");
+            reporter.checkPass("SAXTFactoryTest004 properly threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest004()
+
+
+    /**
+     * SAXTFactoryTest005 test.  
+     * This tests newTransformerhandler() method which takes DOMSource as argument.  Here a relative URI is used in citiesinclude.xsl file. setSystemId is used for DOMSource. It should run well. This is a positive test
+     */
+    public void SAXTFactoryTest005(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest005: This tests newTransformerhandler() method which takes DOMSource as argument.  Here a relative URI is used in citiesinclude.xsl file. setSystemId is used for DOMSource. It should run well. ");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        LoggingErrorListener loggingErrListener = new LoggingErrorListener(reporter);
+        tfactory.setErrorListener(loggingErrListener);
+        try 
+        {
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // Ensure we get namespaces! May be required for some Xerces versions
+            DocumentBuilder docBuilder = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBuilder.parse(new File(" + citiesIncludeFileName + "))");
+            Document document = docBuilder.parse(new File(citiesIncludeFileName));
+            Node node = (Node) document;
+            DOMSource domSource = new DOMSource(node);
+            // String testDirPath = System.getProperty("Tests_Dir"); // @todo: update to new names
+            // domSource.setSystemId("file:///" + testDirPath); // @todo: update to new names
+            domSource.setSystemId(QetestUtils.filenameToURL(citiesIncludeFileName));
+
+            TransformerHandler handler = saxTFactory.newTransformerHandler(domSource);
+
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+            handler.setResult(result);
+
+            XMLReader reader = getJAXPXMLReader();
+            reader.setContentHandler(handler);
+
+            // Log what output is about to be created
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            reader.parse(QetestUtils.filenameToURL(xmlName));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldName), 
+                              "SAXTFactoryTest005: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest005 threw");
+            reporter.checkFail("SAXTFactoryTest005 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest005()
+    
+
+    /**
+     * SAXTFactoryTest006 test.  
+     * This tests newTransformerhandler() method which takes DOMSource as argument.  Here a relative URI is used in citiesinclude.xsl file. setSystemId is used for DOMSource. Here Constructor that takes systemId as argument is used for creating DOMSource. It should run well. This is a positive test
+     */
+    public void SAXTFactoryTest006(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest006: This tests newTransformerhandler() method which takes DOMSource as argument.  Here a relative URI is used in citiesinclude.xsl file. setSystemId is used for DOMSource. Here Constructor that takes systemId as argument is used for creating DOMSource. It should run well. ");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // Ensure we get namespaces! May be required for some Xerces versions
+            DocumentBuilder docBuilder = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBuilder.parse(new File(" + citiesIncludeFileName + "))");
+            Document document = docBuilder.parse(new File(citiesIncludeFileName));
+            Node node = (Node) document;
+            // String testDirPath = System.getProperty("Tests_Dir"); // @todo update systemId
+            // DOMSource domSource = new DOMSource(node, "file:///" + testDirPath); // @todo update systemId
+            DOMSource domSource = new DOMSource(node, QetestUtils.filenameToURL(citiesIncludeFileName));
+
+            TransformerHandler handler = saxTFactory.newTransformerHandler(domSource);
+
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+            handler.setResult(result);
+
+            XMLReader reader = getJAXPXMLReader();
+            reader.setContentHandler(handler);
+
+            // Log what output is about to be created
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            reader.parse(QetestUtils.filenameToURL(xmlName));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldName), 
+                              "SAXTFactoryTest006: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest006 threw");
+            reporter.checkFail("SAXTFactoryTest006 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest006()
+
+    
+    /**
+     * SAXTFactoryTest007 test.  
+     * This tests newTransformerhandler() method which takes DOMSource as argument.  Here a relative URI is used in citiesinclude.xsl file. setSystemId is used for DOMSource. Here Constructor that takes systemId as argument is used for creating DOMSource. It should run well. This is a positive test
+     */
+    public void SAXTFactoryTest007(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest007: This tests newTransformerhandler() method which takes DOMSource as argument.  Here a relative URI is used in citiesinclude.xsl file. setSystemId is used for DOMSource. Here Constructor that takes systemId as argument is used for creating DOMSource. It should run well. ");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // Ensure we get namespaces! May be required for some Xerces versions
+
+            DocumentBuilder docBuilder = dbf.newDocumentBuilder();
+            reporter.logTraceMsg("docBuilder.parse(new File(" + citiesIncludeFileName + "))");
+            Document document = docBuilder.parse(new File(citiesIncludeFileName));
+            Node node = (Node) document;
+            DOMSource domSource = new DOMSource(node);
+
+            XMLReader reader = getJAXPXMLReader();
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+
+            //For xml file.
+            reporter.logTraceMsg("docBuilder.parse(" + xmlName + ")");
+            Document xmlDocument = docBuilder.parse(new File(xmlName));
+            Node xmlNode = (Node) xmlDocument;
+            DOMSource xmlDomSource = new DOMSource(xmlNode);
+            //Please look into this later...You want to use newTransformerhandler()
+            TransformerHandler handler = saxTFactory.newTransformerHandler();
+            Transformer transformer = handler.getTransformer();
+
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+
+            // Log what output is about to be created
+            reporter.logTraceMsg("transformer.transform(xmlDomSource, StreamResult) into: " + outNames.currentName());
+            transformer.transform(xmlDomSource, result);
+
+            // Validate the output by comparing against gold
+            // 18-Dec-00 Note: need to check what we should be 
+            //  validating first - this test case seems incomplete
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(NOT_DEFINED), 
+                              "SAXTFactoryTest007: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest007 threw");
+            reporter.checkFail("SAXTFactoryTest007 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest007()
+
+
+    /**
+     * SAXTFactoryTest008 test.  
+     * XDESCRIPTION
+     */
+    public void SAXTFactoryTest008(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest008: Simple SAX: TemplatesHandler to FileOutputStream");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+            TemplatesHandler thandler = saxTFactory.newTemplatesHandler();
+
+            XMLReader reader = getJAXPXMLReader();
+            reader.setContentHandler(thandler);
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(xslName) + ")");
+            reader.parse(QetestUtils.filenameToURL(xslName));
+
+            TransformerHandler tfhandler = saxTFactory.newTransformerHandler(thandler.getTemplates());
+
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+
+            tfhandler.setResult(result);
+            reader.setContentHandler(tfhandler);
+            // Log what output is about to be created
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            reader.parse(QetestUtils.filenameToURL(xmlName));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldName), 
+                              "SAXTFactoryTest008: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest008 threw");
+            reporter.checkFail("SAXTFactoryTest008 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest008()
+    
+
+    /**
+     * SAXTFactoryTest009 test.  
+     * XDESCRIPTION
+     */
+    public void SAXTFactoryTest009(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest009: Simple SAX with included stylesheet");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            XMLReader reader = getJAXPXMLReader();
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+            TemplatesHandler thandler = saxTFactory.newTemplatesHandler();
+            // String testDirPath = System.getProperty("Tests_Dir"); // @todo update systemId
+            // thandler.setSystemId("file:///" + testDirPath); // @todo update systemId
+            thandler.setSystemId(QetestUtils.filenameToURL(citiesIncludeFileName)); // @todo update systemId
+
+            reader.setContentHandler(thandler);
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(citiesIncludeFileName) + ")");
+            reader.parse(QetestUtils.filenameToURL(citiesIncludeFileName));
+
+            TransformerHandler tfhandler =
+                saxTFactory.newTransformerHandler(thandler.getTemplates());
+
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+            tfhandler.setResult(result);
+            reader.setContentHandler(tfhandler);
+
+            // Log what output is about to be created
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            reader.parse(QetestUtils.filenameToURL(xmlName));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldName), 
+                              "SAXTFactoryTest009: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest009 threw");
+            reporter.checkFail("SAXTFactoryTest009 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest009()
+
+
+    /**
+     * SAXTFactoryTest010 test.  
+     * The transformer will use a SAX parser as it's reader
+     */
+    public void SAXTFactoryTest010(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest010: The transformer will use a SAX parser as it's reader");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+            // The transformer will use a SAX parser as it's reader.
+            XMLReader reader = getJAXPXMLReader();
+            // Set the result handling to be a serialization to the file output stream.
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result realResult = new StreamResult(fos);
+            TransformerHandler tHandler = saxTFactory.newTransformerHandler();
+            tHandler.setResult(realResult);
+            reader.setContentHandler(tHandler);
+
+            reporter.logTraceMsg("saxTFactory.newXMLFilter(new StreamSource(" + QetestUtils.filenameToURL(xslName) + "))");
+            XMLFilter filter = saxTFactory.newXMLFilter(new StreamSource(QetestUtils.filenameToURL(xslName)));
+
+            filter.setParent(reader);
+
+            // Now, when you call transformer.parse, it will set itself as
+            // the content handler for the parser object (it's "parent"), and
+            // will then call the parse method on the parser.
+            // Log what output is about to be created
+            reporter.logTraceMsg("filter.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            filter.parse(new InputSource(QetestUtils.filenameToURL(xmlName)));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(citiesSerializedFileName), 
+                              "SAXTFactoryTest010: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest010 threw");
+            reporter.checkFail("SAXTFactoryTest010 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest010()
+
+
+    /**
+     * SAXTFactoryTest011 test.  
+     * The transformer will use a SAX parser as it's reader
+     */
+    public void SAXTFactoryTest011(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest011: The transformer will use a SAX parser as it's reader");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            // The transformer will use a SAX parser as it's reader.
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true); // Ensure we get namespaces! May be required for some Xerces versions
+            DocumentBuilder docBuilder = dbf.newDocumentBuilder();
+
+            reporter.logTraceMsg("docBuilder.parse(new File(" + xslName + "))");
+            Document document = docBuilder.parse(new File(xslName));
+            Node node = (Node) document;
+            DOMSource domSource = new DOMSource(node);
+            SAXTransformerFactory saxTFactory =  (SAXTransformerFactory) tfactory;
+            XMLFilter filter = saxTFactory.newXMLFilter(domSource);
+
+            XMLReader reader = getJAXPXMLReader();
+            // Set the result handling to be a serialization to the file output stream.
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result realResult = new StreamResult(fos);
+            TransformerHandler tHandler = saxTFactory.newTransformerHandler();
+            tHandler.setResult(realResult);
+            reader.setContentHandler(tHandler);
+
+            filter.setParent(reader);
+
+            // Now, when you call transformer.parse, it will set itself as
+            // the content handler for the parser object (it's "parent"), and
+            // will then call the parse method on the parser.
+
+            // Log what output is about to be created
+            reporter.logTraceMsg("filter.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            filter.parse(new InputSource(QetestUtils.filenameToURL(xmlName)));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(citiesSerializedFileName), 
+                              "SAXTFactoryTest011: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest011 threw");
+            reporter.checkFail("SAXTFactoryTest011 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest011()
+    
+
+    /**
+     * SAXTFactoryTest012 test.  
+     * The transformer will use a SAX parser as it's reader
+     */
+    public void SAXTFactoryTest012(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest012: The transformer will use a SAX parser as it's reader");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            // The transformer will use a SAX parser as it's reader.
+
+            InputSource is = new InputSource(new FileInputStream(xslName));
+            SAXSource saxSource = new SAXSource();
+            saxSource.setInputSource(is);
+
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+            reporter.logTraceMsg("newXMLFilter(..." + xslName + ")");
+            XMLFilter filter = saxTFactory.newXMLFilter(saxSource);
+
+            XMLReader reader = getJAXPXMLReader();
+            // Set the result handling to be a serialization to the file output stream.
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result realResult = new StreamResult(fos);
+            TransformerHandler tHandler = saxTFactory.newTransformerHandler();
+            tHandler.setResult(realResult);
+            reader.setContentHandler(tHandler);
+            filter.setParent(reader);
+
+            // Now, when you call transformer.parse, it will set itself as
+            // the content handler for the parser object (it's "parent"), and
+            // will then call the parse method on the parser.
+            // Log what output is about to be created
+            reporter.logTraceMsg("filter.parse(" + QetestUtils.filenameToURL(xmlName) + ") into: " + outNames.currentName());
+            filter.parse(new InputSource(QetestUtils.filenameToURL(xmlName)));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(citiesSerializedFileName), 
+                              "SAXTFactoryTest012: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest012 threw");
+            reporter.checkFail("SAXTFactoryTest012 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest012()
+
+
+    /**
+     * SAXTFactoryTest013 test.  
+     * The transformer will use a SAX parser as it's reader
+     */
+    public void SAXTFactoryTest013(String xmlName, String xslName, String goldName) 
+    {
+        // Log the test we're about to do
+        reporter.logStatusMsg("SAXTFactoryTest013: The transformer will use a SAX parser as it's reader");
+
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+        tfactory.setErrorListener(new DefaultErrorHandler());
+        try 
+        {
+            // The transformer will use a SAX parser as it's reader.
+            XMLReader reader = getJAXPXMLReader();
+            SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory;
+            TemplatesHandler thandler = saxTFactory.newTemplatesHandler();
+            // String testDirPath = System.getProperty("Tests_Dir"); // @todo update systemId
+
+            // I have put this as it was complaining about systemid
+            // thandler.setSystemId("file:///" + testDirPath); // @todo update systemId
+            thandler.setSystemId(QetestUtils.filenameToURL(xslName)); // @todo update systemId
+
+            reader.setContentHandler(thandler);
+            reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(xslName) + ")");
+            reader.parse(QetestUtils.filenameToURL(xslName));
+
+            XMLFilter filter = saxTFactory.newXMLFilter(thandler.getTemplates());
+
+            filter.setParent(reader);
+            // Set the result handling to be a serialization to the file output stream.
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result realResult = new StreamResult(fos);
+            TransformerHandler tHandler = saxTFactory.newTransformerHandler();
+            tHandler.setResult(realResult);
+            filter.setContentHandler(tHandler);
+
+            // Log what output is about to be created
+            reporter.logTraceMsg("filter.parse(" + xmlName + ") into: " + outNames.currentName());
+            filter.parse(new InputSource(new FileInputStream(xmlName)));
+
+            // Validate the output by comparing against gold
+            fos.close(); // must close ostreams we own
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(citiesSerializedFileName), 
+                              "SAXTFactoryTest013: into " + outNames.currentName());
+        } 
+        catch (Throwable t) 
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "SAXTFactoryTest013 threw");
+            reporter.checkFail("SAXTFactoryTest013 threw: " + t.toString());
+        }
+    }// end of SAXTFactoryTest013()
+
+
+    /**
+     * Worker method to get an XMLReader.
+     *
+     * Not the most efficient of methods, but makes the code simpler.
+     *
+     * @return a new XMLReader for use, with setNamespaceAware(true)
+     */
+    protected XMLReader getJAXPXMLReader()
+            throws Exception
+    {
+        // Be sure to use the JAXP methods only!
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        SAXParser saxParser = factory.newSAXParser();
+        return saxParser.getXMLReader();
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by SAXTransformerFactoryAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        SAXTransformerFactoryAPITest app = new SAXTransformerFactoryAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/sax/TemplatesHandlerAPITest.java b/test/java/src/org/apache/qetest/trax/sax/TemplatesHandlerAPITest.java
new file mode 100644
index 0000000..d579e4f
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/sax/TemplatesHandlerAPITest.java
@@ -0,0 +1,399 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TemplatesHandlerAPITest.java
+ *
+ */
+package org.apache.qetest.trax.sax;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TemplatesHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.xml.sax.XMLReader;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for the TemplatesHandler class of TRAX.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class TemplatesHandlerAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Information about an xsl/xml file pair for transforming with import/include.  
+     */
+    protected XSLTestfileInfo impInclFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SAX_SUBDIR = "trax" + File.separator + "sax";
+
+    /** Nonsense systemId for various tests.  */
+    public static final String NONSENSE_SYSTEMID = "file:///nonsense/system/id/";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TemplatesHandlerAPITest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "TemplatesHandlerAPITest";
+        testComment = "API Coverage test for the TemplatesHandler class of TRAX";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+
+        // Note these are initialized as strings denoting filenames,
+        //  and *not* as URL/URI's
+        testFileInfo.inputName = testBasePath + "SAXTest.xsl";
+        testFileInfo.xmlName = testBasePath + "SAXTest.xml";
+        testFileInfo.goldName = goldBasePath + "SAXTest.out";
+
+        impInclFileInfo.inputName = testBasePath + "SAXImpIncl.xsl";
+        impInclFileInfo.xmlName = testBasePath + "SAXImpIncl.xml";
+        impInclFileInfo.goldName = goldBasePath + "SAXImpIncl.out";
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(SAXSource.FEATURE)
+                  && tf.getFeature(SAXResult.FEATURE)))
+            {   // The rest of this test relies on SAX
+                reporter.logErrorMsg("SAX*.FEATURE not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic API coverage of set/get methods.
+     * Note that most of the functionality of this class goes 
+     * far beyond what we test in this testCase.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage of set/get methods");
+
+        // No public constructor available: you must always ask 
+        //  a SAXTransformerFactory to give you one
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Basic construction
+            TemplatesHandler tHandler = saxFactory.newTemplatesHandler();
+            reporter.check((tHandler != null), true, "newTemplatesHandler() returns non-null");
+
+            // getTemplates API coverage - simple
+            Templates templates = tHandler.getTemplates();
+            reporter.checkObject(templates, null, "getTemplates() is null on new TemplatesHandler");
+
+            // set/getSystemId API coverage
+            tHandler.setSystemId(NONSENSE_SYSTEMID);
+            reporter.checkObject(tHandler.getSystemId(), NONSENSE_SYSTEMID, "set/getSystemId API coverage");
+            tHandler.setSystemId(null);
+            reporter.checkObject(tHandler.getSystemId(), null, "set/getSystemId API coverage to null");
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with TemplatesHandler set/get API");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with TemplatesHandler set/get API");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic functionality of TemplatesHandler.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Basic functionality of TemplatesHandler");
+        // Provide local copies of URLized filenames, so that we can
+        //  later run tests with either Strings or URLs
+        String xslURI = QetestUtils.filenameToURL(testFileInfo.inputName);
+        String xmlURI = QetestUtils.filenameToURL(testFileInfo.xmlName);
+        String xslImpInclURI = QetestUtils.filenameToURL(impInclFileInfo.inputName);
+        String xmlImpInclURI = QetestUtils.filenameToURL(impInclFileInfo.xmlName);
+
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+        TemplatesHandler templatesHandler = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Validate a templatesHandler can create a valid stylesheet
+            templatesHandler = saxFactory.newTemplatesHandler();
+
+            XMLReader reader = getJAXPXMLReader();
+            reader.setContentHandler(templatesHandler);
+
+            // Parse the stylesheet, which means we should be able to getTemplates()
+            reader.parse(xslURI);
+
+            //Get the Templates object from the ContentHandler
+            templates = templatesHandler.getTemplates();
+            reporter.check((templates != null), true, "getTemplates() returns non-null with valid stylesheet");
+            Properties xslOutProps = templates.getOutputProperties();
+            reporter.check((xslOutProps != null), true, "getTemplates().getOutputProperties() returns non-null with valid stylesheet");
+            //@todo validate a specific output property
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer != null), true, "getTemplates().newTransformer() returns non-null with valid stylesheet");
+
+            // Validate that this transformer actually works
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+            Source xmlSource = new StreamSource(xmlURI);
+            transformer.transform(xmlSource, result);
+            fos.close(); // must close ostreams we own
+            if (Logger.PASS_RESULT
+                != fileChecker.check(reporter, 
+                        new File(outNames.currentName()), 
+                        new File(testFileInfo.goldName), 
+                        "SAX-built simple transform into: " + outNames.currentName())
+                )
+                 reporter.logInfoMsg("SAX-built simple transform failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem TemplatesHandler(1)");
+            reporter.logThrowable(reporter.ERRORMSG, t,"Problem TemplatesHandler(1)");
+        }
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Validate a templatesHandler can create a stylesheet 
+            //  with imports/includes, with the default systemId
+            templatesHandler = saxFactory.newTemplatesHandler();
+
+            XMLReader reader = getJAXPXMLReader();
+            reader.setContentHandler(templatesHandler);
+
+            // Parse the stylesheet, which means we should be able to getTemplates()
+            reader.parse(xslImpInclURI);
+
+            //Get the Templates object from the ContentHandler
+            templates = templatesHandler.getTemplates();
+            reporter.check((templates != null), true, "getTemplates() returns non-null with impincl stylesheet");
+            Properties xslOutProps = templates.getOutputProperties();
+            reporter.check((xslOutProps != null), true, "getTemplates().getOutputProperties() returns non-null with impincl stylesheet");
+            //@todo validate a specific output property
+            transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer != null), true, "getTemplates().newTransformer() returns non-null with impincl stylesheet");
+
+            // Validate that this transformer actually works
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            Result result = new StreamResult(fos);
+            Source xmlSource = new StreamSource(xmlImpInclURI);
+            transformer.transform(xmlSource, result);
+            fos.close(); // must close ostreams we own
+            if (Logger.PASS_RESULT
+                != fileChecker.check(reporter, 
+                        new File(outNames.currentName()), 
+                        new File(impInclFileInfo.goldName), 
+                        "SAX-built impincl transform into: " + outNames.currentName())
+                )
+                 reporter.logInfoMsg("SAX-built impincl transform failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem TemplatesHandler(2)");
+            reporter.logThrowable(reporter.ERRORMSG, t,"Problem TemplatesHandler(2)");
+        }
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Validate a templatesHandler with an incorrect 
+            //  systemId reports an error nicely
+            templatesHandler = saxFactory.newTemplatesHandler();
+
+            // Set the base systemId for the handler to a bogus one
+            templatesHandler.setSystemId(NONSENSE_SYSTEMID);
+
+            XMLReader reader = getJAXPXMLReader();
+            reader.setContentHandler(templatesHandler);
+
+            // Parse the stylesheet, which should throw some 
+            //  exception, since the imports/includes won't be 
+            //  found at the bogus systemId
+            reader.parse(xslImpInclURI);
+
+            // This line will only get run if above didn't throw an exception
+            reporter.checkFail("No exception when expected: parsing stylesheet with bad systemId");
+
+        }
+        catch (Throwable t)
+        {
+            String msg = t.toString();
+            if (msg != null)
+            {
+                // Note: 'impincl/SimpleImport.xsl' comes from the stylesheet itself,
+                //  so to reduce dependencies, only validate that portion of the msg
+                reporter.check((msg.indexOf("impincl/SimpleImport.xsl") > 0), true, 
+                               "Expected Exception has proper message for bad systemId");
+            }
+            else
+            {
+                reporter.checkFail("Expected Exception has proper message for bad systemId");
+            }
+            reporter.logThrowable(reporter.STATUSMSG, t,"(potentially) Expected Exception");
+        }
+        finally
+        {
+            // Validate the templatesHandler still has systemId set
+            reporter.check(templatesHandler.getSystemId(), NONSENSE_SYSTEMID, 
+                           "templatesHandler still has systemId set");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method to get an XMLReader.
+     *
+     * Not the most efficient of methods, but makes the code simpler.
+     *
+     * @return a new XMLReader for use, with setNamespaceAware(true)
+     */
+    protected XMLReader getJAXPXMLReader()
+            throws Exception
+    {
+        // Be sure to use the JAXP methods only!
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        SAXParser saxParser = factory.newSAXParser();
+        return saxParser.getXMLReader();
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by TemplatesHandlerAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TemplatesHandlerAPITest app = new TemplatesHandlerAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/sax/TransformerHandlerAPITest.java b/test/java/src/org/apache/qetest/trax/sax/TransformerHandlerAPITest.java
new file mode 100644
index 0000000..982eaca
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/sax/TransformerHandlerAPITest.java
@@ -0,0 +1,381 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TransformerHandlerAPITest.java
+ *
+ */
+package org.apache.qetest.trax.sax;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for the TransformerHandler class of TRAX.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class TransformerHandlerAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** 
+     * Information about an xsl/xml file pair for transforming with import/include.  
+     */
+    protected XSLTestfileInfo impInclFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SAX_SUBDIR = "trax" + File.separator + "sax";
+
+    /** Nonsense systemId for various tests.  */
+    public static final String NONSENSE_SYSTEMID = "file:///nonsense/system/id/";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TransformerHandlerAPITest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "TransformerHandlerAPITest";
+        testComment = "API Coverage test for the TransformerHandler class of TRAX";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_SAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_SAX_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_SAX_SUBDIR
+                              + File.separator;
+
+        // Note these are initialized as strings denoting filenames,
+        //  and *not* as URL/URI's
+        testFileInfo.inputName = testBasePath + "SAXTest.xsl";
+        testFileInfo.xmlName = testBasePath + "SAXTest.xml";
+        testFileInfo.goldName = goldBasePath + "SAXTest.out";
+
+        impInclFileInfo.inputName = testBasePath + "SAXImpIncl.xsl";
+        impInclFileInfo.xmlName = testBasePath + "SAXImpIncl.xml";
+        impInclFileInfo.goldName = goldBasePath + "SAXImpIncl.out";
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(SAXSource.FEATURE)
+                  && tf.getFeature(SAXResult.FEATURE)))
+            {   // The rest of this test relies on SAX
+                reporter.logErrorMsg("SAX*.FEATURE not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic API coverage of set/get methods.
+     * Note that most of the functionality of this class goes 
+     * far beyond what we test in this testCase.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage of set/get methods");
+
+        // No public constructor available: you must always ask 
+        //  a SAXTransformerFactory to give you one
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+
+        try
+        {
+            // Validate API's for an identity transformer
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Basic construction of identity transformer
+            TransformerHandler tHandler = saxFactory.newTransformerHandler();
+            reporter.check((tHandler != null), true, "newTransformerHandler() returns non-null");
+
+            // getTemplates API coverage - simple
+            Transformer transformer = tHandler.getTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer != null), true, "getTransformer() is non-null on new identity TransformerHandler");
+
+            // set/getSystemId API coverage
+            tHandler.setSystemId(NONSENSE_SYSTEMID);
+            reporter.checkObject(tHandler.getSystemId(), NONSENSE_SYSTEMID, "identityTransformer.set/getSystemId API coverage");
+            tHandler.setSystemId(null);
+            reporter.checkObject(tHandler.getSystemId(), null, "identityTransformer.set/getSystemId API coverage to null");
+
+            // setResult API coverage
+            Result unusedResult = new StreamResult(outNames.currentName()); // currentName is probably _0
+            tHandler.setResult(unusedResult);
+            reporter.checkPass("Crash test: identityTransformer.setResult appears to have worked");
+            reporter.logStatusMsg("Note that we can't verify setResult since there's no getResult!");
+            try
+            {
+                tHandler.setResult(null);
+                reporter.checkFail("identityTransformer.setResult(null) did not throw an exception");            
+            }
+            catch (IllegalArgumentException iae)
+            {
+                reporter.checkPass("identityTransformer.setResult(null) properly threw: " + iae.toString());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with TransformerHandler set/get API");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with TransformerHandler set/get API");
+        }
+
+        try
+        {
+            // Validate API's for a 'real' transformer, which is different code
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Basic construction of identity transformer
+            TransformerHandler tHandler = saxFactory.newTransformerHandler(new StreamSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            reporter.check((tHandler != null), true, "newTransformerHandler(.." + QetestUtils.filenameToURL(testFileInfo.inputName) + ")) returns non-null");
+
+            // getTemplates API coverage - simple
+            Transformer transformer = tHandler.getTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer != null), true, "realTransformer.getTransformer() is non-null");
+
+            // set/getSystemId API coverage
+            tHandler.setSystemId(NONSENSE_SYSTEMID);
+            reporter.checkObject(tHandler.getSystemId(), NONSENSE_SYSTEMID, "realTransformer.set/getSystemId API coverage");
+            tHandler.setSystemId(null);
+            reporter.checkObject(tHandler.getSystemId(), null, "realTransformer.set/getSystemId API coverage to null");
+
+            // setResult API coverage
+            Result unusedResult = new StreamResult(outNames.nextName()); // use nextName() instead of currentName()
+            reporter.logInfoMsg("new StreamResult(" + outNames.currentName() + ")");
+            tHandler.setResult(unusedResult);
+            reporter.checkPass("Crash test: realTransformer.setResult appears to have worked");
+            reporter.logStatusMsg("Note that we can't verify setResult since there's no getResult!");
+            try
+            {
+                tHandler.setResult(null);
+                reporter.checkFail("realTransformer.setResult(null) did not throw an exception");            
+            }
+            catch (IllegalArgumentException iae)
+            {
+                reporter.checkPass("realTransformer.setResult(null) properly threw: " + iae.toString());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with TransformerHandler set/get API");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with TransformerHandler set/get API");
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic functionality of TransformerHandler.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Basic functionality of TransformerHandler");
+        // Provide local copies of URLized filenames, so that we can
+        //  later run tests with either Strings or URLs
+        String xslURI = QetestUtils.filenameToURL(testFileInfo.inputName);
+        String xmlURI = QetestUtils.filenameToURL(testFileInfo.xmlName);
+        String xslImpInclURI = QetestUtils.filenameToURL(impInclFileInfo.inputName);
+        String xmlImpInclURI = QetestUtils.filenameToURL(impInclFileInfo.xmlName);
+
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+        TransformerHandler transformerHandler = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Validate an identity transformerHandler is valid 
+            //  and performs as an identity stylesheet
+            transformerHandler = saxFactory.newTransformerHandler();
+            transformer = transformerHandler.getTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer != null), true, "identity newTransformerHandler is non-null");
+            transformer.transform(new StreamSource(xmlURI), new StreamResult(outNames.nextName()));
+            int res = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.xmlName), 
+                              "identity newTransformerHandler transform into: " + outNames.currentName());
+            if (res == reporter.FAIL_RESULT)
+                reporter.logInfoMsg("identity newTransformerHandler transform failure reason:" + fileChecker.getExtendedInfo());
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem TransformerHandler(1)");
+            reporter.logThrowable(reporter.ERRORMSG, t,"Problem TransformerHandler(1)");
+        }
+
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Validate newTransformerHandler(Source) works
+            Source xslSource = new StreamSource(xslURI);
+            transformerHandler = saxFactory.newTransformerHandler(xslSource);
+            transformer = transformerHandler.getTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer != null), true, "newTransformerHandler(Source) is non-null");
+            transformer.transform(new StreamSource(xmlURI), new StreamResult(outNames.nextName()));
+            int res = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "newTransformerHandler(Source) transform into: " + outNames.currentName());
+            if (res == reporter.FAIL_RESULT)
+                reporter.logInfoMsg("newTransformerHandler(Source) transform failure reason:" + fileChecker.getExtendedInfo());
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem TransformerHandler(2)");
+            reporter.logThrowable(reporter.ERRORMSG, t,"Problem TransformerHandler(2)");
+        }
+
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            // Validate newTransformerHandler(Templates) works
+            Source xslSource = new StreamSource(xslURI);
+            Templates otherTemplates = factory.newTemplates(xslSource);
+            transformerHandler = saxFactory.newTransformerHandler(otherTemplates);
+            transformer = transformerHandler.getTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            reporter.check((transformer != null), true, "newTransformerHandler(Templates) is non-null");
+            transformer.transform(new StreamSource(xmlURI), new StreamResult(outNames.nextName()));
+            int res = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "newTransformerHandler(Templates) transform into: " + outNames.currentName());
+            if (res == reporter.FAIL_RESULT)
+                reporter.logInfoMsg("newTransformerHandler(Templates) transform failure reason:" + fileChecker.getExtendedInfo());
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem TransformerHandler(3)");
+            reporter.logThrowable(reporter.ERRORMSG, t,"Problem TransformerHandler(3)");
+        }
+        reporter.logTraceMsg("//@todo validate newTransformerHandler.setResult functionality");
+        reporter.logTraceMsg("//@todo validate newTransformerHandler.set/getSystemId functionality");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by TransformerHandlerAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TransformerHandlerAPITest app = new TransformerHandlerAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/sax/TransformerHandlerTest.java b/test/java/src/org/apache/qetest/trax/sax/TransformerHandlerTest.java
new file mode 100644
index 0000000..a55a95e
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/sax/TransformerHandlerTest.java
@@ -0,0 +1,278 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TransformerHandlerTest.java
+ *
+ */
+package org.apache.qetest.trax.sax;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Basic functionality test for the TransformerHandler class of TRAX.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class TransformerHandlerTest extends FileBasedTest
+{
+
+    /** Provides nextName(), currentName() functionality for output files.  */
+    protected OutputNameManager outNames;
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TransformerHandlerTest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "TransformerHandlerTest";
+        testComment = "Basic functionality test for the TransformerHandler class of TRAX";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        final String outSubDirName = outputDir + File.separator + "trax" 
+                                     + File.separator + "sax";
+        File outSubDir = new File(outSubDirName);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outSubDirName + File.separator + testName, ".out");
+        return true;
+    }
+
+
+    /**
+     * TransformerHandler tests in error conditions.
+     * Inspired by http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2310
+     * @author scott_boag@lotus.com
+     * @author shane_curcuru@lotus.com
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage of set/get methods");
+
+        // No public constructor available: you must always ask 
+        //  a SAXTransformerFactory to give you one
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+
+        // Simply use strings instead of files to keep data together
+        String xmlErrorStr = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root1></root2>"; // note mismatched tags
+        String xmlGoodStr  = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>Hello world</root>";
+        String xslStr = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+                + "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">"
+                + "<xsl:template match=\"/\">" 
+                + "<xsl:copy-of select=\".\"/>"
+                + "</xsl:template>" 
+                + "</xsl:stylesheet>";
+
+        // Use arbitrary so strings don't get escaped for XML output
+        reporter.logArbitrary(Logger.STATUSMSG, "xmlErrorStr is: " + xmlErrorStr);
+        reporter.logArbitrary(Logger.STATUSMSG, "xmlGoodStr is: " + xmlErrorStr);
+        reporter.logArbitrary(Logger.STATUSMSG, "xslStr is: " + xmlErrorStr);
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            saxFactory = (SAXTransformerFactory)factory;
+
+            boolean gotExpectedException = false;
+            Transformer reusedTransformer = null; // This is reused later; not sure if ordering is important
+            try
+            {
+                reporter.logInfoMsg("About to newTransformer(xslStr)");
+                reusedTransformer = saxFactory.newTransformer(
+                                    new StreamSource(new java.io.StringReader(xslStr)));
+                reusedTransformer.setErrorListener(new DefaultErrorHandler());
+                reporter.logInfoMsg("About to transform(xmlErrorStr, " + outNames.nextName() + ")");
+                reusedTransformer.transform(new StreamSource(new java.io.StringReader(xmlErrorStr)),
+                            new StreamResult(outNames.currentName()));
+            }
+            catch (TransformerException te)
+            {
+                // Transformer should only throw a TransformerException - pass
+                gotExpectedException = true;
+                reporter.logThrowable(Logger.INFOMSG, te, "Normal transform of xmlErrorStr correctly threw");
+                // Also validate part of the string, since we know root1 should be in there somewhere
+                reporter.check((te.toString().indexOf("root1") > -1), true, "Exception.toString correctly had root1 in it");
+                //sb reporter.logInfoMsg("transformation 1 failed above (it is supposed to)");
+            }
+            catch (Throwable t)
+            {
+                // Any other Throwables - fail
+                gotExpectedException = false;
+                reporter.logThrowable(Logger.ERRORMSG, t, "Normal transform of xmlErrorStr threw unexpected Throwable");
+                //sb reporter.logInfoMsg("transformation 1 failed above (it is supposed to)");
+            }
+            reporter.check(gotExpectedException, true, "Got expected exception from previous operation");
+            gotExpectedException = false;
+
+
+            // Note this is reused several times; I'm not sure if the reuse is important
+            TransformerHandler thandler = null;
+            try
+            {
+                reporter.logInfoMsg("About to newTransformerHandler(xslStr)");
+                thandler = saxFactory.newTransformerHandler(
+                                                new StreamSource(new java.io.StringReader(xslStr)));
+
+                SAXParserFactory spf = SAXParserFactory.newInstance();
+                spf.setNamespaceAware(true);
+                SAXParser parser = spf.newSAXParser();
+                org.xml.sax.XMLReader reader = parser.getXMLReader();
+                reporter.logTraceMsg("Got a SAXParser, now setting ContentHandler, ErrorHandler");
+                reader.setContentHandler(thandler);
+                reader.setErrorHandler((org.xml.sax.ErrorHandler)thandler);
+                reporter.logInfoMsg("Now setResult to " + outNames.nextName()); // Note nextName here
+                thandler.setResult(new StreamResult(outNames.currentName()));
+                reporter.logInfoMsg("About to reader.parse(xmlErrorStr...)");
+                reader.parse(new org.xml.sax.InputSource(new java.io.StringReader(xmlErrorStr)));
+            }
+            catch (Exception e)
+            {
+                gotExpectedException = true;
+                reporter.logThrowable(Logger.INFOMSG, e, "TransformerHandler of xmlErrorStr correctly threw");
+                // Validate that it had root1, which we know is part of the error
+                //  Note: we could also validate that it was a SAXParseException, but 
+                //  I'm not sure that's worth the maintenance here 
+                reporter.check((e.toString().indexOf("root1") > -1), true, "Exception.toString correctly had root1 in it");
+                //sb reporter.logInfoMsg("transformation 2 failed above (it is supposed to)");
+            }
+            reporter.check(gotExpectedException, true, "Got expected exception from previous operation");
+            gotExpectedException = false;
+
+            try
+            {
+                reporter.logInfoMsg("About to newTransformerHandler(xslStr)");
+                thandler = saxFactory.newTransformerHandler(
+                            new StreamSource(new java.io.StringReader(xslStr)));
+
+                SAXParserFactory spf = SAXParserFactory.newInstance();
+                spf.setNamespaceAware(true);
+                SAXParser parser = spf.newSAXParser();
+                org.xml.sax.XMLReader reader = parser.getXMLReader();
+                reporter.logTraceMsg("Got a SAXParser");
+
+                reporter.logInfoMsg("Now setResult to " + outNames.nextName()); // Note nextName here
+                thandler.setResult(new StreamResult(outNames.currentName()));
+
+                reporter.logTraceMsg("Got a SAXParser, now setting ContentHandler, ErrorHandler");
+                reader.setContentHandler(thandler);
+                reader.setErrorHandler((org.xml.sax.ErrorHandler)thandler);
+
+                reporter.logInfoMsg("About to reader.parse(xmlGoodStr...)");
+                reader.parse(new org.xml.sax.InputSource(new java.io.StringReader(xmlGoodStr)));
+                reporter.checkPass("TransformerHandler did not throw");
+            }
+            catch (Exception e)
+            {
+                reporter.logThrowable(Logger.INFOMSG, e, "TransformerHandler should not have thrown");
+                reporter.checkFail("TransformerHandler should not have thrown");
+                //sb reporter.logInfoMsg("transformation 3 failed above (bad)");
+            }
+            gotExpectedException = false;
+
+
+
+            try
+            {
+                reporter.logInfoMsg("About to newTransformer(xslStr)");
+                reusedTransformer = ((TransformerFactory) TransformerFactory.newInstance())
+                                    .newTransformer(new StreamSource(new java.io.StringReader(xslStr)));
+                reporter.logInfoMsg("About to transform(xmlGoodStr, " + outNames.nextName() + ")");
+                reusedTransformer.transform(new StreamSource(new java.io.StringReader(xmlGoodStr)),
+                            new StreamResult(outNames.currentName()));
+                reporter.checkPass("Transformer did not throw");
+            }
+            catch (Exception e)
+            {
+                reporter.logThrowable(Logger.INFOMSG, e, "TransformerHandler should not have thrown");
+                reporter.checkFail("TransformerHandler should not have thrown");
+                //sb reporter.logInfoMsg("transformation 4 failed above (bad)");
+            }
+            gotExpectedException = false;
+
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with testCase1");
+            reporter.logThrowable(reporter.ERRORMSG, t, "testCase1");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by TransformerHandlerTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TransformerHandlerTest app = new TransformerHandlerTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/stream/StreamResultAPITest.java b/test/java/src/org/apache/qetest/trax/stream/StreamResultAPITest.java
new file mode 100644
index 0000000..f79d646
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/stream/StreamResultAPITest.java
@@ -0,0 +1,400 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * StreamResultAPITest.java
+ *
+ */
+package org.apache.qetest.trax.stream;
+
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintStream;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.Reporter;
+import org.apache.qetest.xsl.XHTFileCheckService;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for the StreamResult class of TRAX..
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class StreamResultAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** StreamImpIncl for testing systemId stuff.  */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** StreamOutputFormat for testing types of output streams.  */
+    protected XSLTestfileInfo outputFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_STREAM_SUBDIR = "trax" + File.separator + "stream";
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public StreamResultAPITest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "StreamResultAPITest";
+        testComment = "API Coverage test for the StreamResult class of TRAX.";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // NOTE: 'reporter' variable is already initialized at this point
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_STREAM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_STREAM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_STREAM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_STREAM_SUBDIR
+                              + File.separator;
+
+        testFileInfo.inputName = testBasePath + "StreamImpIncl.xsl";
+        testFileInfo.xmlName = testBasePath + "StreamImpIncl.xml";
+        testFileInfo.goldName = goldBasePath + "StreamImpIncl.out";
+        outputFileInfo.inputName = testBasePath + "StreamOutputFormat.xsl";
+        outputFileInfo.xmlName = testBasePath + "StreamOutputFormat.xml";
+        outputFileInfo.goldName = goldBasePath + "StreamOutputFormat.out";
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(StreamSource.FEATURE)
+                  && tf.getFeature(StreamResult.FEATURE)))
+            {   // The rest of this test relies on Streams
+                reporter.logErrorMsg("Streams not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic API coverage, constructor and set/get methods.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage, constructor and set/get methods");
+
+        reporter.logWarningMsg("public StreamResult(File f) not yet tested");
+
+        // Default no-arg ctor sets nothing
+        StreamResult defaultStream = new StreamResult();
+        reporter.checkObject(defaultStream.getOutputStream(), null, "Default StreamResult should have null ByteStream");
+        reporter.checkObject(defaultStream.getWriter(), null, "Default StreamResult should have null CharacterStream");
+        reporter.check(defaultStream.getSystemId(), null, "Default StreamResult should have null SystemId");
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        StreamResult byteResult1 = new StreamResult(baos);
+        reporter.checkObject(byteResult1.getOutputStream(), baos, "StreamResult(os) has ByteStream " + byteResult1.getOutputStream());
+        reporter.checkObject(byteResult1.getWriter(), null, "StreamResult(os) should have null CharacterStream");
+        reporter.check(byteResult1.getSystemId(), null, "StreamResult(os) should have null SystemId");
+
+        StringWriter strWriter = new StringWriter();
+        StreamResult readerResult1 = new StreamResult(strWriter);
+        reporter.checkObject(readerResult1.getOutputStream(), null, "StreamResult(writer) should have null ByteStream");
+        reporter.checkObject(readerResult1.getWriter(), strWriter, "StreamResult(writer) has CharacterStream " + readerResult1.getWriter());
+        reporter.check(readerResult1.getSystemId(), null, "StreamResult(writer) should have null SystemId");
+
+        StreamResult wackyStream = new StreamResult();
+        wackyStream.setOutputStream(baos);
+        OutputStream gotStream = wackyStream.getOutputStream();
+        reporter.checkObject(gotStream, baos, "set/getOutputStream API coverage");
+
+        wackyStream.setWriter(strWriter);
+        Writer gotWriter = wackyStream.getWriter();
+        reporter.checkObject(gotWriter, strWriter, "set/getWriter API coverage");
+
+        wackyStream.setSystemId("new-system-id");
+        String gotSystemId = wackyStream.getSystemId();
+        reporter.check(gotSystemId, "new-system-id", "set/getSystemId API coverage");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic functionality of StreamResults.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Basic functionality of StreamResults");
+
+        TransformerFactory factory = null;
+        Source xslSource = null;
+        Source xmlSource = null;
+        Templates templates = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            // Create re-useable sources
+            xslSource = new StreamSource(new FileInputStream(outputFileInfo.inputName));
+            reporter.logTraceMsg("Create stream sources, templates");
+            templates = factory.newTemplates(xslSource);
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            return true;
+        }
+
+        try
+        {
+            // Test some OutputStreams
+            // Simple FileOutputStream is tested in numerous other tests
+            Transformer transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            Result result1 = new StreamResult(baos);
+            reporter.logTraceMsg("About to Transform into ByteArrayOutputStream");
+
+            // Note: must get a new xmlSource for each transform
+            //  Should this really be necessary? I suppose 
+            //  FileInputStreams don't just get 'reset' for you, 
+            //  but it would be nice to reuse the StreamSources
+            xmlSource = new StreamSource(new FileInputStream(outputFileInfo.xmlName));
+            transformer.transform(xmlSource, result1);
+            reporter.logTraceMsg("baos.size() is: " + baos.size());
+
+            ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
+            PrintStream ps = new PrintStream(baos2);
+            Result result2 = new StreamResult(ps);
+            reporter.logTraceMsg("About to Transform into PrintStream");
+
+            xmlSource = new StreamSource(new FileInputStream(outputFileInfo.xmlName));
+            transformer.transform(xmlSource, result2);
+            reporter.logTraceMsg("ps(baos2).size() is: " + baos2.size());
+
+            if (!reporter.checkString(baos.toString(), baos2.toString(), "BAOS and PS output comparison"))
+            {
+                reporter.logArbitrary(reporter.TRACEMSG, "baos was: " + baos.toString());
+                reporter.logArbitrary(reporter.TRACEMSG, "ps(baos2) was: " + baos2.toString());
+            }
+            writeFileAndValidate(baos.toString("UTF-8"), outputFileInfo.goldName);
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with transform-streams(1)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with transform-streams(1)");
+        }
+
+        try
+        {
+            // Test some Writers
+            Transformer transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            StringWriter sw = new StringWriter();
+            Result result1 = new StreamResult(sw);
+            reporter.logTraceMsg("About to Transform into StringWriter");
+            xmlSource = new StreamSource(new FileInputStream(outputFileInfo.xmlName));
+            transformer.transform(xmlSource, result1);
+
+            CharArrayWriter cw = new CharArrayWriter();
+            Result result2 = new StreamResult(cw);
+            reporter.logTraceMsg("About to Transform into CharArrayWriter");
+            xmlSource = new StreamSource(new FileInputStream(outputFileInfo.xmlName));
+            transformer.transform(xmlSource, result2);
+
+            if (!reporter.checkString(sw.toString(), cw.toString(), "SW and CW output comparison"))
+            {
+                reporter.logArbitrary(reporter.TRACEMSG, "sw was: " + sw.toString());
+                reporter.logArbitrary(reporter.TRACEMSG, "cw was: " + cw.toString());
+            }
+            writeFileAndValidate(sw.toString(), outputFileInfo.goldName);
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with transform-streams(2)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with transform-streams(2)");
+        }
+
+        try
+        {
+            // Test with systemId set
+            // Note: may be affected by user.dir property; if we're 
+            //  already in the correct place, this won't be different
+            try
+            {
+                reporter.logTraceMsg("System.getProperty(user.dir) = " + System.getProperty("user.dir"));
+            }
+            catch (SecurityException e) // in case of Applet context
+            {
+                reporter.logTraceMsg("System.getProperty(user.dir) threw SecurityException");
+            }
+            Transformer transformer = templates.newTransformer();
+            transformer.setErrorListener(new DefaultErrorHandler());
+            StringWriter sw1 = new StringWriter();
+            Result result1 = new StreamResult(sw1);
+            reporter.logTraceMsg("About to Transform into StringWriter w/out systemId set");
+            xmlSource = new StreamSource(new FileInputStream(outputFileInfo.xmlName));
+            transformer.transform(xmlSource, result1);
+
+            StringWriter sw2 = new StringWriter();
+            Result result2 = new StreamResult(sw2);
+            result2.setSystemId("random-system-id");
+            reporter.logTraceMsg("About to Transform into StringWriter w/ systemId set");
+            xmlSource = new StreamSource(new FileInputStream(outputFileInfo.xmlName));
+            transformer.transform(xmlSource, result2);
+            reporter.check(result2.getSystemId(), "random-system-id", "systemId remains set after transform");
+
+            if (!reporter.checkString(sw1.toString(), sw2.toString(), "Output comparison, with/without systemId"))
+            {
+                reporter.logArbitrary(reporter.TRACEMSG, "sw1 w/out systemId was: " + sw1.toString());
+                reporter.logArbitrary(reporter.TRACEMSG, "sw2 w/ systemId was: " + sw2.toString());
+            }
+            writeFileAndValidate(sw1.toString(), outputFileInfo.goldName);
+            reporter.logInfoMsg("@todo we should update XHTComparator for bogus systemId's like we have in this test");
+            // @todo we should update XHTComparator for bogus systemId's like we have in this test
+            // Note that using XHTFileCheckService, it always compares our 
+            //  outputs using [text] since the XML parser usually throws:
+            //  warning;org.xml.sax.SAXParseException: File "file:/E:/builds/xml-xalan/test/tests/api-gold/trax/stream/this-is-doctype-system" not found.
+            if (reporter.getLoggingLevel() >= Reporter.TRACEMSG)
+            {
+                reporter.logArbitrary(reporter.TRACEMSG, fileChecker.getExtendedInfo());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with transform-streams(3)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with transform-streams(3)");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method to dump a string to a file and validate it.  
+     * @return true if OK, false otherwise
+     */
+    public void writeFileAndValidate(String data, String goldFile)
+    {
+        try
+        {
+            FileOutputStream fos = new FileOutputStream(outNames.nextName());
+            OutputStreamWriter fw = new OutputStreamWriter(fos, "UTF-8");
+            fw.write(data);
+            fw.close();
+            // Explicitly ask that Validation be turned off, since 
+            //  we use bogus systemids
+            fileChecker.setAttribute(XHTFileCheckService.SETVALIDATING, "false");
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(goldFile),
+                              "writeStringToFile() checking: " + outNames.currentName());
+        }
+        catch (Exception e)
+        {
+            reporter.checkFail("writeStringToFile() threw: " + e.toString());
+            reporter.logThrowable(Reporter.ERRORMSG, e, "writeStringToFile() threw");
+        }
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by StreamResultAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "REPLACE_any_new_test_arguments\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+
+        StreamResultAPITest app = new StreamResultAPITest();
+
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/trax/stream/StreamSourceAPITest.java b/test/java/src/org/apache/qetest/trax/stream/StreamSourceAPITest.java
new file mode 100644
index 0000000..c305e0d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/trax/stream/StreamSourceAPITest.java
@@ -0,0 +1,388 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * StreamSourceAPITest.java
+ *
+ */
+package org.apache.qetest.trax.stream;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API Coverage test for the StreamSource class of TRAX..
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class StreamSourceAPITest extends FileBasedTest
+{
+
+    /**
+     * Provides nextName(), currentName() functionality for tests 
+     * that may produce any number of output files.
+     */
+    protected OutputNameManager outNames;
+
+    /** 
+     * Information about an xsl/xml file pair for transforming.  
+     * Public members include inputName (for xsl); xmlName; goldName; etc.
+     */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_STREAM_SUBDIR = "trax" + File.separator + "stream";
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public StreamSourceAPITest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "StreamSourceAPITest";
+        testComment = "API Coverage test for the StreamSource class of TRAX.";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // NOTE: 'reporter' variable is already initialized at this point
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + TRAX_STREAM_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + TRAX_STREAM_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + TRAX_STREAM_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + TRAX_STREAM_SUBDIR
+                              + File.separator;
+
+        testFileInfo.inputName = testBasePath + "StreamImpIncl.xsl";
+        testFileInfo.xmlName = testBasePath + "StreamImpIncl.xml";
+        testFileInfo.goldName = goldBasePath + "StreamImpIncl.out";
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(StreamSource.FEATURE)
+                  && tf.getFeature(StreamResult.FEATURE)))
+            {   // The rest of this test relies on Streams
+                reporter.logErrorMsg("Streams not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Basic API coverage, constructor and set/get methods.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic API coverage, constructor and set/get methods");
+
+        reporter.logWarningMsg("public StreamSource(File f) not yet tested");
+        reporter.logWarningMsg("public void setSystemId(File f) not yet tested");
+
+        // Default no-arg ctor sets nothing
+        StreamSource defaultStream = new StreamSource();
+        reporter.checkObject(defaultStream.getInputStream(), null, "Default StreamSource should have null ByteStream");
+        reporter.checkObject(defaultStream.getReader(), null, "Default StreamSource should have null CharacterStream");
+        reporter.check(defaultStream.getPublicId(), null, "Default StreamSource should have null PublicId");
+        reporter.check(defaultStream.getSystemId(), null, "Default StreamSource should have null SystemId");
+
+        byte[] bytes = { 0, 0, 0, 0 };  // just a few zeroes, not really needed
+        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        StreamSource byteSource1 = new StreamSource(bais);
+        reporter.checkObject(byteSource1.getInputStream(), bais, "StreamSource(is) has ByteStream " + byteSource1.getInputStream());
+        reporter.checkObject(byteSource1.getReader(), null, "StreamSource(is) should have null CharacterStream");
+        reporter.check(byteSource1.getPublicId(), null, "StreamSource(is) should have null PublicId");
+        reporter.check(byteSource1.getSystemId(), null, "StreamSource(is) should have null SystemId");
+
+        StreamSource byteSource2 = new StreamSource(bais, "some-system-id");
+        reporter.checkObject(byteSource2.getInputStream(), bais, "StreamSource(is, sysID) has ByteStream " + byteSource2.getInputStream());
+        reporter.checkObject(byteSource2.getReader(), null, "StreamSource(is, sysID) should have null CharacterStream");
+        reporter.check(byteSource2.getPublicId(), null, "StreamSource(is, sysID) should have null PublicId");
+        reporter.check(byteSource2.getSystemId(), "some-system-id", "StreamSource(is, sysID) has SystemId " + byteSource2.getSystemId());
+
+        StringReader strReader = new StringReader("this is not your parent's XML data");
+        StreamSource readerSource1 = new StreamSource(strReader);
+        reporter.checkObject(readerSource1.getInputStream(), null, "StreamSource(reader) should have null ByteStream");
+        reporter.checkObject(readerSource1.getReader(), strReader, "StreamSource(reader) has CharacterStream " + readerSource1.getReader());
+        reporter.check(readerSource1.getPublicId(), null, "StreamSource(reader) should have null PublicId");
+        reporter.check(readerSource1.getSystemId(), null, "StreamSource(reader) should have null SystemId");
+
+        StreamSource readerSource2 = new StreamSource(strReader, "some-system-id");
+        reporter.checkObject(readerSource2.getInputStream(), null, "StreamSource(reader, sysID) should have null ByteStream");
+        reporter.checkObject(readerSource2.getReader(), strReader, "StreamSource(reader, sysID) has CharacterStream " + readerSource2.getReader());
+        reporter.check(readerSource2.getPublicId(), null, "StreamSource(reader, sysID) should have null PublicId");
+        reporter.check(readerSource2.getSystemId(), "some-system-id", "StreamSource(reader, sysID) has SystemId " + readerSource2.getSystemId());
+
+        StreamSource sysIDStream = new StreamSource("real-system-id");
+        reporter.checkObject(sysIDStream.getInputStream(), null, "StreamSource(sysID) should have null ByteStream");
+        reporter.checkObject(sysIDStream.getReader(), null, "StreamSource(sysID) should have null CharacterStream");
+        reporter.check(sysIDStream.getPublicId(), null, "StreamSource(sysID) should have null PublicId");
+        reporter.check(sysIDStream.getSystemId(), "real-system-id", "StreamSource(sysID) has SystemId " + sysIDStream.getSystemId());
+
+        StreamSource wackyStream = new StreamSource();
+        wackyStream.setInputStream(bais);
+        InputStream gotStream = wackyStream.getInputStream();
+        reporter.checkObject(gotStream, bais, "set/getInputStream API coverage");
+
+        wackyStream.setReader(strReader);
+        Reader gotReader = wackyStream.getReader();
+        reporter.checkObject(gotReader, strReader, "set/getReader API coverage");
+
+        wackyStream.setSystemId("new-system-id");
+        String gotSystemId = wackyStream.getSystemId();
+        reporter.check(gotSystemId, "new-system-id", "set/getSystemId API coverage");
+
+        wackyStream.setPublicId("new-public-id");
+        String gotPublicId = wackyStream.getPublicId();
+        reporter.check(gotPublicId, "new-public-id", "set/getPublicId API coverage");
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Basic functionality of StreamSources.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Basic functionality of StreamSources");
+
+        TransformerFactory factory = null;
+        String xslID = testFileInfo.inputName;
+        String xmlID = testFileInfo.xmlName;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(new DefaultErrorHandler());
+            // Create URLs for the filenames
+            // What's the simplest way to do this?!? i.e. as a solution 
+            //  to the general problem of having a String denoting a 
+            //  path/filename, that may be absolute or relative,
+            //  and may or may not exist, and to get a valid file: URL?
+            reporter.logTraceMsg("Original names xslID=" + xslID + ", xmlID=" + xmlID);
+            xslID = filenameToURI(xslID);
+            xmlID = filenameToURI(xmlID);
+            reporter.logTraceMsg("URL-ized names xslID=" + xslID + ", xmlID=" + xmlID);
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem creating factory; can't continue testcase");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; can't continue testcase");
+            return true;
+        }
+        try
+        {
+            // Verify we can do basic transforms with readers/streams
+            reporter.logTraceMsg("Create stream sources and setSystemId separately");
+            InputStream xslStream1 = new FileInputStream(testFileInfo.inputName);
+            Source xslSource1 = new StreamSource(xslStream1);
+            xslSource1.setSystemId(xslID);
+            InputStream xmlStream1 = new FileInputStream(testFileInfo.xmlName);
+            Source xmlSource1 = new StreamSource(xmlStream1);
+            xmlSource1.setSystemId(xmlID);
+
+            reporter.logTraceMsg("Create FileOutputStream to " + outNames.nextName());
+            FileOutputStream fos1 = new FileOutputStream(outNames.currentName());
+            Result result1 = new StreamResult(fos1);
+            Templates templates1 = factory.newTemplates(xslSource1);
+            Transformer transformer1 = templates1.newTransformer();
+            transformer1.setErrorListener(new DefaultErrorHandler());
+            reporter.logTraceMsg("about to transform to streams after setSystemId");
+            transformer1.transform(xmlSource1, result1);
+            fos1.close(); // must close ostreams we own
+            int result = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform to streams after setSystemId into " + outNames.currentName());
+            if (result == reporter.FAIL_RESULT)
+                reporter.logInfoMsg("transform to streams... failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with transform-streams(1)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with transform-streams(1)");
+        }
+        try
+        {
+            reporter.logTraceMsg("Create stream sources with setSystemId in ctor");
+            InputStream xslStream2 = new FileInputStream(testFileInfo.inputName);
+            Source xslSource2 = new StreamSource(xslStream2, xslID);
+            InputStream xmlStream2 = new FileInputStream(testFileInfo.xmlName);
+            Source xmlSource2 = new StreamSource(xmlStream2, xmlID);
+            FileOutputStream fos2 = new FileOutputStream(outNames.nextName());
+            Result result2 = new StreamResult(fos2);
+
+            reporter.logInfoMsg("Transform into " + outNames.currentName());
+            Templates templates2 = factory.newTemplates(xslSource2);
+            Transformer transformer2 = templates2.newTransformer();
+            transformer2.setErrorListener(new DefaultErrorHandler());
+            transformer2.transform(xmlSource2, result2);
+            fos2.close(); // must close ostreams we own
+            int result = fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform to streams after SystemId in ctor into " + outNames.currentName());
+            if (result == reporter.FAIL_RESULT)
+                reporter.logInfoMsg("transform to streams... failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with transform-streams(2)");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with transform-streams(2)");
+        }
+
+        try
+        {
+            // Do a transform without systemId set
+            // Note: is affected by user.dir property; if we're 
+            //  already in the correct place, this won't be different
+            // But: most people will run from xml-xalan\test, so this should fail
+            try
+            {
+                reporter.logStatusMsg("System.getProperty(user.dir) = " + System.getProperty("user.dir"));
+            }
+            catch (SecurityException e) // in case of Applet context
+            {
+                reporter.logTraceMsg("System.getProperty(user.dir) threw SecurityException");
+            }
+            reporter.logTraceMsg("Create stream sources without setSystemId set");
+            InputStream xslStream3 = new FileInputStream(testFileInfo.inputName);
+            Source xslSource3 = new StreamSource(xslStream3);
+            InputStream xmlStream3 = new FileInputStream(testFileInfo.xmlName);
+            Source xmlSource3 = new StreamSource(xmlStream3);
+            FileOutputStream fos3 = new FileOutputStream(outNames.nextName());
+            Result result3 = new StreamResult(fos3);
+
+            Templates templates3 = factory.newTemplates(xslSource3);
+            Transformer transformer3 = templates3.newTransformer();
+            transformer3.setErrorListener(new DefaultErrorHandler());
+            reporter.logStatusMsg("About to transform without systemID; probably throws exception");
+            transformer3.transform(xmlSource3, result3);
+            reporter.checkFail("The above transform should probably have thrown an exception; into " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkPass("Transforming with include/import and wrong SystemId throws exception; into " + outNames.currentName());
+            reporter.logThrowable(reporter.ERRORMSG, t, "Transforming with include/import and wrong SystemId");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Worker method to translate String to URI.  
+     * Note: Xerces and Crimson appear to handle some URI references 
+     * differently - this method needs further work once we figure out 
+     * exactly what kind of format each parser wants (esp. considering 
+     * relative vs. absolute references).
+     * @param String path\filename of test file
+     * @return URL to pass to SystemId
+     */
+    public String filenameToURI(String filename)
+    {
+        File f = new File(filename);
+        String tmp = f.getAbsolutePath();
+	    if (File.separatorChar == '\\') {
+	        tmp = tmp.replace('\\', '/');
+	    }
+        return "file:///" + tmp;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by StreamSourceAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+
+        StreamSourceAPITest app = new StreamSourceAPITest();
+
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/DTMDumpTest.java b/test/java/src/org/apache/qetest/xalanj2/DTMDumpTest.java
new file mode 100644
index 0000000..1769dc4
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/DTMDumpTest.java
@@ -0,0 +1,224 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * DTMDumpTest.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.TraxDatalet;
+import org.apache.xalan.extensions.ExpressionContext;
+import org.apache.xml.dtm.ref.DTMNodeProxy;
+import org.apache.xpath.NodeSet;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Simple unit test of various DTM and related apis.  
+ * This class acts as it's own Xalan extension.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class DTMDumpTest extends FileBasedTest
+{
+
+    /** Provides nextName(), currentName() functionality.   */
+    protected OutputNameManager outNames;
+
+    /** Simple test with dumpDTM extension calls in.  */
+    protected TraxDatalet testFileInfo = new TraxDatalet();
+
+    /** Just initialize test name, comment, numTestCases. */
+    public DTMDumpTest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "DTMDumpTest";
+        testComment = "Simple unit test of various DTM and related apis";
+    }
+
+
+    /**
+     * Initialize this test - create output dir, outNames.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        final String XALANJ2 = "xalanj2";
+        File outSubDir = new File(outputDir + File.separator + XALANJ2);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + XALANJ2
+                                         + File.separator + testName, ".out");
+                                         
+        testFileInfo.setDescription("Simple transform with dumpDTM extension call");
+        testFileInfo.setNames(inputDir + File.separator + XALANJ2, "DTMDumpTest");
+        testFileInfo.goldName = goldDir + File.separator + XALANJ2 + File.separator + "DTMDumpTest.out";
+        return true;
+    }
+
+
+    /**
+     * Simple dumping of DTM info from nodes.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Simple dumping of DTM info from nodes");
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            // Transform a file that calls us as an extension
+            templates = factory.newTemplates(testFileInfo.getXSLSource());
+            transformer = templates.newTransformer();
+            reporter.logInfoMsg("Before dtmBuf: " + dtmBuf.toString());
+            reporter.logInfoMsg("About to create output: " + outNames.nextName()); 
+            transformer.transform(testFileInfo.getXMLSource(),
+                                  new StreamResult(outNames.currentName()));
+            reporter.checkPass("Crash test only: returned from transform() call");
+            reporter.logInfoMsg("After dtmBuf: " + dtmBuf.toString());
+                
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "Simple DTM test threw:");
+            reporter.checkFail("Simple DTM test threw:");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Validate transforms with FEATURE_INCREMENTAL on/off.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Unused");
+        reporter.checkPass("Unused");
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /** Cheap way to pass info from extension methods to test.  */
+    protected static StringBuffer dtmBuf = new StringBuffer();
+    
+    /** Cheap way to pass info from extension methods to test.  */
+    protected static final String DTMBUFSEP = ";";
+
+    /**
+     * Implements a simple Xalan extension method.  
+     *
+     * Just a way to implement an extension and the test that calls 
+     * it together in the same class.  Watch out for thread safety.
+     * @param ExpressionContext from the transformer
+     * @return String describing actions
+     */
+    public static String dumpDTM(ExpressionContext context)
+    {
+        Node contextNode = context.getContextNode();
+        DTMNodeProxy proxy = (DTMNodeProxy)contextNode;
+        dtmBuf.append(XalanDumper.dump(proxy, XalanDumper.DUMP_DEFAULT) + DTMBUFSEP);
+        return XalanDumper.dump(proxy, XalanDumper.DUMP_NOIDS);
+    }
+
+    /**
+     * Implements a simple Xalan extension method.  
+     *
+     * Just a way to implement an extension and the test that calls 
+     * it together in the same class.  Watch out for thread safety.
+     * @param context from the transformer
+     * @param obj object to test; presumably an RTF
+     * @return String describing actions
+     */
+    public static String dumpDTM(ExpressionContext context, Object rtf)
+    {
+        if (rtf instanceof NodeIterator)
+        {
+            NodeSet ns = new NodeSet((NodeIterator) rtf);
+            Node first = ns.nextNode();
+            DTMNodeProxy proxy = (DTMNodeProxy)first;
+            dtmBuf.append("NI:" + XalanDumper.dump(proxy, XalanDumper.DUMP_DEFAULT) + DTMBUFSEP);
+            return XalanDumper.dump(proxy, XalanDumper.DUMP_NOIDS);
+        }
+        else if (rtf instanceof NodeSet)
+        {
+            NodeSet ns = (NodeSet)rtf;
+            Node first = ns.nextNode();
+            DTMNodeProxy proxy = (DTMNodeProxy)first;
+            dtmBuf.append("NS:" + XalanDumper.dump(proxy, XalanDumper.DUMP_DEFAULT) + DTMBUFSEP);
+            return XalanDumper.dump(proxy, XalanDumper.DUMP_NOIDS);
+        }
+        else
+        {
+            dtmBuf.append("UK:" + rtf.toString() + DTMBUFSEP);
+            return "UK:" + rtf.toString();
+        }
+    }
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by DTMDumpTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        DTMDumpTest app = new DTMDumpTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/FactoryFeatureTest.java b/test/java/src/org/apache/qetest/xalanj2/FactoryFeatureTest.java
new file mode 100644
index 0000000..4dbff74
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/FactoryFeatureTest.java
@@ -0,0 +1,460 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * FactoryFeatureTest.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.Vector;
+
+import javax.xml.XMLConstants;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.TraxDatalet;
+import org.apache.xalan.processor.TransformerFactoryImpl;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Basic functionality test of various Factory configuration APIs.
+ * Testing TransformerFactoryImpl.setAttribute, getFeature, etc.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class FactoryFeatureTest extends FileBasedTest
+{
+
+    /** Provides nextName(), currentName() functionality.   */
+    protected OutputNameManager outNames;
+
+    /** Marker for datalet.options that notes setAttribute val.   */
+    protected static final String SET_ATTRIBUTE = "setAttribute";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public FactoryFeatureTest()
+    {
+        numTestCases = 4;  // REPLACE_num
+        testName = "FactoryFeatureTest";
+        testComment = "Basic functionality test of various Factory configuration APIs";
+    }
+
+
+    /**
+     * Initialize this test - create output dir, outNames.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        File outSubDir = new File(outputDir + File.separator + "xalanj2");
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + "xalanj2"
+                                         + File.separator + testName, ".out");
+        return true;
+    }
+
+
+    /**
+     * Default values/settings of known features; simple error cases.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Default values/settings of known features; simple error cases");
+
+        TransformerFactory factory = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+
+            try
+            {
+                reporter.logStatusMsg("Calling: factory.getAttribute(FEATURE_INCREMENTAL)");
+                Object o = factory.getAttribute(TransformerFactoryImpl.FEATURE_INCREMENTAL);
+                reporter.checkPass("factory.getAttribute(FEATURE_INCREMENTAL) returned a value");
+                reporter.logWarningMsg("//@todo also validate default value:false");                
+            }
+            catch (IllegalArgumentException iae1)
+            {
+                // Note Xalan-J 2.2D06 does not fully implement this yet!
+                reporter.checkPass("factory.getAttribute(FEATURE_INCREMENTAL) threw an expected IllegalArgumentException");
+            }
+
+            try
+            {
+                reporter.logStatusMsg("Calling: factory.getAttribute(FEATURE_OPTIMIZE)");
+                Object o = factory.getAttribute(TransformerFactoryImpl.FEATURE_OPTIMIZE);
+                reporter.checkPass("factory.getAttribute(FEATURE_OPTIMIZE) returned a value");
+                reporter.logWarningMsg("//@todo also validate default value:true");                
+            }
+            catch (IllegalArgumentException iae1)
+            {
+                // Note Xalan-J 2.2D06 does not fully implement this yet!
+                reporter.checkPass("factory.getAttribute(FEATURE_OPTIMIZE) threw an expected IllegalArgumentException");
+            }
+
+            // Set each value to it's non-default value and ensure no exceptions thrown
+            reporter.logStatusMsg("Calling: factory.setAttribute(FEATURE_INCREMENTAL, Boolean.TRUE)");
+            factory.setAttribute(TransformerFactoryImpl.FEATURE_INCREMENTAL, Boolean.TRUE);
+            reporter.checkPass("factory.setAttribute(FEATURE_INCREMENTAL, Boolean.TRUE) returned OK");
+
+            reporter.logStatusMsg("Calling: factory.setAttribute(FEATURE_OPTIMIZE, Boolean.FALSE)");
+            factory.setAttribute(TransformerFactoryImpl.FEATURE_OPTIMIZE, Boolean.FALSE);
+            reporter.checkPass("factory.setAttribute(FEATURE_OPTIMIZE, Boolean.FALSE) returned OK");
+
+            // Try setting a non-recognized attribute
+            try
+            {
+                reporter.logTraceMsg("Calling: factory.setAttribute(unrecognized-attribute, Boolean.FALSE)");
+                factory.setAttribute("unrecognized-attribute", Boolean.FALSE);
+                reporter.checkFail("factory.setAttribute(unrecognized-attribute,...) did not throw expected exception");
+            }
+            catch (IllegalArgumentException iae1)
+            {
+                reporter.checkPass("factory.setAttribute(unrecognized-attribute,...) properly threw: " + iae1.toString());
+            }
+
+            // Try setting a recognized attribute to a bad value
+            try
+            {
+                reporter.logTraceMsg("Calling: factory.setAttribute(..., bad-object-value)");
+                // Note: pass any sort of non-String, non-Boolean Object, since 
+                //  this attribute only accepts ture|false as Strings or Booleans
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_OPTIMIZE, factory);
+                reporter.checkFail("factory.setAttribute(..., bad-object-value) did not throw expected exception");
+            }
+            catch (IllegalArgumentException iae2)
+            {
+                reporter.checkPass("factory.setAttribute(..., bad-object-value) properly threw: " + iae2.toString());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("setAttribute() tests threw: " + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "setAttribute() tests threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Validate transforms with FEATURE_INCREMENTAL on/off.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Validate transforms with FEATURE_INCREMENTAL on/off");
+
+        // Get our list of xsl datalets to test
+        Vector datalets = buildDatalets(null, new File(inputDir), 
+                                        new File(outputDir), new File(goldDir));
+
+        // Skip Validating datalets - they're hard-coded
+        int numDatalets = datalets.size();
+        reporter.logInfoMsg("processFileList-equivalent() with " + numDatalets
+                            + " potential tests");
+
+        TransformerFactory factory = null;
+        // Iterate over every datalet and test it with both feature settings
+        for (int ctr = 0; ctr < numDatalets; ctr++)
+        {
+            TraxDatalet datalet = (TraxDatalet)datalets.elementAt(ctr);
+            try
+            {
+                // Get a new factory for each datalet - not strictly necessary
+                factory = TransformerFactory.newInstance();
+
+                // Test both a Boolean object..
+                reporter.logStatusMsg("Calling: factory.setAttribute(FEATURE_INCREMENTAL, Boolean.TRUE)");
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_INCREMENTAL, Boolean.TRUE);
+                datalet.options.put(SET_ATTRIBUTE, "FEATURE_INCREMENTAL, Boolean.TRUE");
+                datalet.outputName = outNames.nextName();
+                transformAndCheck(factory, datalet);
+
+                reporter.logStatusMsg("Calling: factory.setAttribute(FEATURE_INCREMENTAL, Boolean.FALSE)");
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_INCREMENTAL, Boolean.FALSE);
+                datalet.options.put(SET_ATTRIBUTE, "FEATURE_INCREMENTAL, Boolean.FALSE");
+                datalet.outputName = outNames.nextName();
+                transformAndCheck(factory, datalet);
+
+                // .. and a String representation of true|false
+                reporter.logStatusMsg("Calling: factory.setAttribute(FEATURE_INCREMENTAL, 'true')");
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_INCREMENTAL, "true");
+                datalet.options.put(SET_ATTRIBUTE, "FEATURE_INCREMENTAL, 'true'");
+                datalet.outputName = outNames.nextName();
+                transformAndCheck(factory, datalet);
+
+                reporter.logStatusMsg("Calling: factory.setAttribute(FEATURE_INCREMENTAL, 'false')");
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_INCREMENTAL, "false");
+                datalet.options.put(SET_ATTRIBUTE, "FEATURE_INCREMENTAL, 'false'");
+                datalet.outputName = outNames.nextName();
+                transformAndCheck(factory, datalet);
+            } 
+            catch (Throwable t)
+            {
+                reporter.logThrowable(Logger.ERRORMSG, t, datalet.getDescription() + "(" + ctr + ") threw");
+                reporter.checkFail(datalet.getDescription() + "(" + ctr + ") threw: " + t.toString());
+            }
+        }  // of while...
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Validate transforms with FEATURE_OPTIMIZE on/off.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Validate transforms with FEATURE_OPTIMIZE on/off");
+
+        // Get our list of xsl datalets to test
+        Vector datalets = buildDatalets(null, new File(inputDir), 
+                                        new File(outputDir), new File(goldDir));
+
+        // Skip Validating datalets - they're hard-coded
+        int numDatalets = datalets.size();
+        reporter.logInfoMsg("processFileList-equivalent() with " + numDatalets
+                            + " potential tests");
+
+        TransformerFactory factory = null;
+        // Iterate over every datalet and test it with both feature settings
+        for (int ctr = 0; ctr < numDatalets; ctr++)
+        {
+            TraxDatalet datalet = (TraxDatalet)datalets.elementAt(ctr);
+            try
+            {
+                // Get a new factory for each datalet - not strictly necessary
+                factory = TransformerFactory.newInstance();
+
+                // Test both a Boolean object..
+                reporter.logInfoMsg("Calling: factory.setAttribute(FEATURE_OPTIMIZE, Boolean.TRUE)");
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_OPTIMIZE, Boolean.TRUE);
+                datalet.options.put(SET_ATTRIBUTE, "FEATURE_OPTIMIZE, Boolean.TRUE");
+                datalet.outputName = outNames.nextName();
+                transformAndCheck(factory, datalet);
+
+                reporter.logInfoMsg("Calling: factory.setAttribute(FEATURE_OPTIMIZE, Boolean.FALSE)");
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_OPTIMIZE, Boolean.FALSE);
+                datalet.options.put(SET_ATTRIBUTE, "FEATURE_OPTIMIZE, Boolean.FALSE");
+                datalet.outputName = outNames.nextName();
+                transformAndCheck(factory, datalet);
+
+                // .. and a String representation of true|false
+                reporter.logInfoMsg("Calling: factory.setAttribute(FEATURE_OPTIMIZE, 'true')");
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_OPTIMIZE, "true");
+                datalet.options.put(SET_ATTRIBUTE, "FEATURE_OPTIMIZE, 'true'");
+                datalet.outputName = outNames.nextName();
+                transformAndCheck(factory, datalet);
+
+                reporter.logInfoMsg("Calling: factory.setAttribute(FEATURE_OPTIMIZE, 'false')");
+                factory.setAttribute(TransformerFactoryImpl.FEATURE_OPTIMIZE, "false");
+                datalet.options.put(SET_ATTRIBUTE, "FEATURE_OPTIMIZE, 'false'");
+                datalet.outputName = outNames.nextName();
+                transformAndCheck(factory, datalet);
+            } 
+            catch (Throwable t)
+            {
+                reporter.logThrowable(Logger.ERRORMSG, t, datalet.getDescription() + "(" + ctr + ") threw");
+                reporter.checkFail(datalet.getDescription() + "(" + ctr + ") threw: " + t.toString());
+            }
+        }  // of while...
+
+        reporter.testCaseClose();
+        return true;
+    }
+    
+    /**
+     * Validate transforms with FEATURE_SECURE_PROCESSING on/off.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase4()
+    {
+        reporter.testCaseInit("Validate transforms with FEATURE_SECURE_PROCESSING on/off");
+        
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            
+            // The test xsl contains an extension function. The transformation is successful
+            // when FEATURE_SECURE_PROCESSING is set to false.
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false);
+            
+            TraxDatalet datalet = new TraxDatalet();
+            datalet.setDescription("Test secure processing feature:");
+            datalet.setNames(inputDir + File.separator + "xalanj2", "SecureProcessingTest");
+            datalet.goldName = goldDir + File.separator + "xalanj2" + File.separator + "SecureProcessingTest.out";
+            datalet.outputName = outNames.nextName();
+            transformAndCheck(factory, datalet);
+                        
+            try
+            {
+                // TransformerException is thrown when FEATURE_SECURE_PROCESSING is set to true.
+                factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
+                Transformer transformer = factory.newTransformer(datalet.getXSLSource());
+                transformer.setErrorListener(new DefaultErrorHandler());
+                transformer.transform(datalet.getXMLSource(), new StreamResult(datalet.outputName));
+                reporter.checkFail("Expected TransformerException not thrown when secure processing feature is set to true.");
+            }
+            catch (javax.xml.transform.TransformerException e)
+            {
+                reporter.checkPass("TransformerFactory with FEATURE_SECURE_PROCESSING set to true threw TransformerException:  " + e.toString());
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "Failed in secure processing feature test");
+            reporter.checkFail("Failed in secure processing feature test");
+        }
+        
+        reporter.testCaseClose();
+        return true;        
+    }
+
+
+    /**
+     * Create a vector of filled-in datalets to be tested.
+     *
+     * This currently is hard-coded to return a static Vector
+     * of Datalets that are simply constructed here.
+     * In the future we should add a way to read them in from disk.
+     * The 'what' files we should test.
+     * 
+     * @param files Vector of local path\filenames to be tested
+     * This is currently ignored
+     * @param testLocation File denoting directory where all 
+     * .xml/.xsl tests are found
+     * @param outLocation File denoting directory where all 
+     * output files should be put
+     * @param goldLocation File denoting directory where all 
+     * gold files are found
+     * @return Vector of StylesheetDatalets that are fully filled in,
+     * i.e. outputName, goldName, etc are filled in respectively 
+     * to inputName
+     */
+    public Vector buildDatalets(Vector files, File testLocation, 
+                                File outLocation, File goldLocation)
+    {
+        Vector v = new Vector();
+        // identity transform
+        // Info about the minitest: note gold file naming is different
+        TraxDatalet d = new TraxDatalet();
+        d.setDescription("Identity transform and:");
+        d.setNames(inputDir + File.separator + "trax", "identity");
+        d.goldName = goldDir + File.separator + "trax" + File.separator + "identity.out";
+        v.addElement(d);
+
+        // Info about the minitest: note gold file naming is different
+        d = new TraxDatalet();
+        d.setDescription("Basic Minitest file and:");
+        d.setNames(inputDir, "Minitest");
+        d.goldName = goldDir + File.separator + "Minitest-xalanj2.out";
+        v.addElement(d);
+
+        // All done: return full vector
+        return v;
+    }
+
+
+    /**
+     * Convenience method to do a transform and validate output.  
+     * The 'how' of a specific test.
+     * @param factory to use to create transformers
+     * @param datalet to use (TraxDatalet)
+     */
+    protected void transformAndCheck(TransformerFactory factory, 
+                                     TraxDatalet datalet)
+    {
+        // Validate arguments
+        if ((null == factory) || (null == datalet))
+        {
+            reporter.checkErr(datalet.getDescription() + " with null args!");
+            return;
+        }
+        final String desc = datalet.getDescription() + datalet.options.get(SET_ATTRIBUTE);
+
+        try
+        {
+            reporter.logStatusMsg("transformAndCheck of: " + desc);
+            Transformer transformer = factory.newTransformer(datalet.getXSLSource());
+            reporter.logTraceMsg("About to transform...");
+            transformer.transform(datalet.getXMLSource(), new StreamResult(datalet.outputName));
+
+            if (Logger.PASS_RESULT 
+                != fileChecker.check(reporter, 
+                                     new File(datalet.outputName), 
+                                     new File(datalet.goldName), 
+                                     desc + " into " + datalet.outputName)
+               )
+                reporter.logInfoMsg(desc + " failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, desc + " threw");
+            reporter.checkFail(desc + " threw: " + t.toString());
+        }        
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by FactoryFeatureTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        FactoryFeatureTest app = new FactoryFeatureTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/LoggingPrintTraceListener.java b/test/java/src/org/apache/qetest/xalanj2/LoggingPrintTraceListener.java
new file mode 100644
index 0000000..ec48917
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/LoggingPrintTraceListener.java
@@ -0,0 +1,434 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingPrintTraceListener.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.apache.xalan.templates.Constants;
+import org.apache.xalan.templates.ElemTemplate;
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.templates.ElemTextLiteral;
+import org.apache.xalan.trace.GenerateEvent;
+import org.apache.xalan.trace.PrintTraceListener;
+import org.apache.xalan.trace.SelectionEvent;
+import org.apache.xalan.trace.TracerEvent;
+import org.apache.xml.serializer.SerializerTrace;
+import org.apache.xpath.axes.ContextNodeList;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+
+/**
+ * Logging TraceListener interface.
+ * Implementation of the TraceListener interface that
+ * prints each event to our logger as it occurs.
+ * Future improvements: also implement LoggingHandler properly 
+ * so we can do both the PrintTraceListener-specific stuff while 
+ * still looking like other LoggingHandlers.
+ * @author shane_curcuru@lotus.com
+ * @author myriam_midy@lotus.com
+ * @version $Id$
+ */
+public class LoggingPrintTraceListener extends PrintTraceListener       
+{
+
+    /**
+     * Accesor method for a brief description of this service.  
+     * @return String "LoggingPrintTraceListener: logs and counts trace events"
+     */
+    public String getDescription()
+    {
+        return "LoggingPrintTraceListener: logs and counts trace events";
+    }
+
+
+    /** No-op sets logger to default.  */
+    public LoggingPrintTraceListener()
+    {
+        super(new java.io.PrintWriter(System.err, true));
+        setLogger(getDefaultLogger());
+        initTrace();
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param r Logger we should log to
+     */
+    public LoggingPrintTraceListener(Logger l)
+    {
+        super(new java.io.PrintWriter(System.err, true));
+        setLogger(l);
+        initTrace();
+    }
+    
+
+    /**
+     * Initialize trace fields from PrintTraceListener.
+     */
+    public void initTrace()
+	{
+        m_traceTemplates = true;
+        m_traceElements = true;
+        m_traceGeneration = true;
+        m_traceSelection = true;
+	}
+
+
+     /** Our Logger, who we tell all our secrets to. */
+    protected Logger logger = null;
+    
+    /**
+     * Accesor methods for our Logger.
+     *
+     * @param l the Logger to have this test use for logging 
+     * results; or null to use a default logger
+     */
+    public void setLogger(Logger l)
+	{
+        // if null, set a default one
+        if (null == l)
+            logger = getDefaultLogger();
+        else
+            logger = l;
+	}
+
+
+    /**
+     * Accesor methods for our Logger.  
+     *
+     * @return Logger we tell all our secrets to.
+     */
+    public Logger getLogger()
+	{
+        return logger;
+	}
+
+
+    /**
+     * Get a default Logger for use with this Handler.  
+     * Gets a default ConsoleLogger (only if a Logger isn't 
+     * currently set!).  
+     *
+     * @return current logger; if null, then creates a 
+     * Logger.DEFAULT_LOGGER and returns that; if it cannot
+     * create one, throws a RuntimeException
+     */
+    public Logger getDefaultLogger()
+    {
+        if (logger != null)
+            return logger;
+
+        try
+        {
+            Class rClass = Class.forName(Logger.DEFAULT_LOGGER);
+            return (Logger)rClass.newInstance();
+        } 
+        catch (Exception e)
+        {
+            // Must re-throw the exception, since returning 
+            //  null or the like could lead to recursion
+            e.printStackTrace();
+            throw new RuntimeException(e.toString());
+        }
+    }
+    
+    /** What loggingLevel to use for reporter.logMsg(). */
+    protected int level = Logger.DEFAULT_LOGGINGLEVEL;
+    
+
+    /**
+     * Set a default handler for us to wrapper - no-op.
+     * Since you can add multiple TraceListeners, there's no sense 
+     * in us wrappering another one.
+     * @param default Object unused
+     */
+    public void setDefaultHandler(Object noop)
+    {
+        /* no-op */
+    }
+
+
+    /**
+     * Accessor method for our default handler - no-op.
+     * @return null
+     */
+    public Object getDefaultHandler()
+    {
+        return null;
+    }
+
+
+    /** Prefixed to all logger msg output for TraceListener.  */
+    public final String prefix = "LPTL:";
+
+
+    /** Cheap-o string representation of last event we got.  */
+    protected String lastItem = LoggingHandler.NOTHING_HANDLED;
+
+
+    /**
+     * Accessor for string representation of last trace event.  
+     * @param s string to set
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+
+    /**
+     * Accessor for string representation of last trace event.  
+     * @return last event string we had
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+
+    /** Constant for getCounters()[]: trace events.  */
+    public static final int TYPE_TRACE = 0;
+
+    /** Constant for getCounters()[]: generated events.  */
+    public static final int TYPE_GENERATED = 1;
+
+    /** Constant for getCounters()[]: selected events.  */
+    public static final int TYPE_SELECTED = 2;
+
+    /** 
+     * Counters for how many events we've handled.  
+     * Index into array are the TYPE_* constants.
+     */
+    protected int[] counters = 
+    {
+        0, /* trace */
+        0, /* generated */
+        0  /* selected */
+    };
+
+
+    /**
+     * Get a list of counters of all items we've logged.
+     * Returned as trace, generated, selected
+     * Index into array are the TYPE_* constants.
+     *
+     * @return array of int counters for each item we log
+     */
+    public int[] getCounters()
+    {
+        return counters;
+    }
+
+    /**
+     * Reset all items or counters we've handled.  
+     */
+    public void reset()
+    {
+        setLastItem(LoggingHandler.NOTHING_HANDLED);
+        for (int i = 0; i < counters.length; i++)
+        {
+            counters[i] = 0;
+        }
+    }
+
+    /** setExpected, etc. not yet implemented.  */
+
+    ////////////////// Implement TraceListener ////////////////// 
+    /**
+     * Logging implementation of TraceListener method.
+     * Method that is called when a trace event occurs.
+     * The method is blocking.  It must return before processing continues.
+     *
+     * @param tracerEvent the trace event.
+     */
+    public void trace(TracerEvent tracerEvent)
+    {
+      super.trace(tracerEvent);
+        counters[TYPE_TRACE]++;
+
+        StringBuffer buf = new StringBuffer("trace:");
+        int dumpLevel = XalanDumper.DUMP_DEFAULT;
+        if (null != tracerEvent.m_mode) // not terribly elegant way to do it
+            dumpLevel = XalanDumper.DUMP_NOCLOSE;
+        switch (tracerEvent.m_styleNode.getXSLToken())
+        {
+            // Specific handling for most common 'interesting' items
+            case Constants.ELEMNAME_TEXTLITERALRESULT :
+                buf.append(XalanDumper.dump((ElemTextLiteral) tracerEvent.m_styleNode, dumpLevel));
+                break;
+
+            case Constants.ELEMNAME_TEMPLATE :
+                buf.append(XalanDumper.dump((ElemTemplate) tracerEvent.m_styleNode, dumpLevel));
+                break;
+
+            default :
+                buf.append(XalanDumper.dump((ElemTemplateElement) tracerEvent.m_styleNode, dumpLevel));
+        }
+        if (null != tracerEvent.m_mode)
+            buf.append(XalanDumper.SEP + "m_mode=" + tracerEvent.m_mode + XalanDumper.RBRACKET);
+
+        setLastItem(buf.toString());
+        logger.logMsg(level, prefix + getLast());
+    }
+
+    /**
+     * Logging implementation of TraceListener method.
+     * Method that is called just after the formatter listener is called.
+     *
+     * @param selectionEvent the selected event.
+     * @throws javax.xml.transform.TransformerException never thrown
+     */
+    public void selected(SelectionEvent selectionEvent) 
+            throws javax.xml.transform.TransformerException
+    {
+      super.selected(selectionEvent);
+        counters[TYPE_SELECTED]++;
+
+        StringBuffer buf = new StringBuffer("selected:");
+        ElemTemplateElement styleNodeElem = (ElemTemplateElement) selectionEvent.m_styleNode;
+        ElemTemplateElement parent = (ElemTemplateElement) styleNodeElem.getParentNode();
+        if (parent == styleNodeElem.getStylesheetRoot().getDefaultRootRule())
+        {
+            buf.append("[default-root-rule]");
+        }
+        else if (parent == styleNodeElem.getStylesheetRoot().getDefaultTextRule())
+        {
+            buf.append("[default-text-rule]");
+        }
+        else if (parent == styleNodeElem.getStylesheetRoot().getDefaultRule())
+        {
+            buf.append("[default-rule]");
+        }
+        else
+            buf.append(XalanDumper.dump(styleNodeElem, XalanDumper.DUMP_NOCLOSE));
+
+        buf.append(selectionEvent.m_attributeName + "="
+                   + selectionEvent.m_xpath.getPatternString() + ";");
+
+        if (selectionEvent.m_selection.getType() == selectionEvent.m_selection.CLASS_NODESET)
+        {
+            // Must create as DTMNodeIterator for DTM_EXP merge 13-Jun-01
+            NodeIterator nl = selectionEvent.m_selection.nodeset();
+
+            if (nl instanceof ContextNodeList)
+            {
+                try
+                {
+                    nl = ((ContextNodeList)nl).cloneWithReset();
+                }
+                catch(CloneNotSupportedException cnse)
+                {
+                    buf.append("[Can't trace nodelist, threw: CloneNotSupportedException]");
+                }
+                Node pos = nl.nextNode();
+
+                if (null == pos)
+                {
+                    buf.append("[empty node list]");
+                }
+                else // (null == pos)
+                {
+                    while (null != pos)
+                    {
+                        buf.append(" " + pos);
+                        pos = nl.nextNode();
+                    }
+                }
+            }
+            else // (nl instanceof ContextNodeList)
+            {
+                buf.append("[Can't trace nodelist: it isn't a ContextNodeList]");
+            }
+        }
+        else // (selectionEvent.m_selection.getType() == selectionEvent.m_selection.CLASS_NODESET)
+        {
+            buf.append("[" + selectionEvent.m_selection.str() +"]");
+        }
+        buf.append(XalanDumper.RBRACKET);   // Since we said DUMP_NOCLOSE above
+        setLastItem(buf.toString());
+        logger.logMsg(level, prefix + getLast());
+    }
+
+    /**
+     * Logging implementation of TraceListener method.
+     * Method that is called just after the formatter listener is called.
+     *
+     * @param generateEvent the generate event.
+     */
+    public void generated(GenerateEvent generateEvent)
+    {
+      super.generated(generateEvent);
+        counters[TYPE_GENERATED]++;
+
+        StringBuffer buf = new StringBuffer("generated:");
+        switch (generateEvent.m_eventtype)
+        {
+            case SerializerTrace.EVENTTYPE_STARTDOCUMENT :
+                buf.append("STARTDOCUMENT");
+            break;
+
+            case SerializerTrace.EVENTTYPE_ENDDOCUMENT :
+                buf.append("ENDDOCUMENT");
+            break;
+
+            case SerializerTrace.EVENTTYPE_STARTELEMENT :
+                buf.append("STARTELEMENT[" + generateEvent.m_name + "]"); // just hardcode [ LBRACKET ] RBRACKET here
+            break;
+
+            case SerializerTrace.EVENTTYPE_ENDELEMENT :
+                buf.append("ENDELEMENT[" + generateEvent.m_name + "]");
+            break;
+
+            case SerializerTrace.EVENTTYPE_CHARACTERS :
+                String chars1 = new String(generateEvent.m_characters, generateEvent.m_start, generateEvent.m_length);
+                buf.append("CHARACTERS[" + chars1 + "]");
+            break;
+
+            case SerializerTrace.EVENTTYPE_CDATA :
+                String chars2 = new String(generateEvent.m_characters, generateEvent.m_start, generateEvent.m_length);
+                buf.append("CDATA[" + chars2 + "]");
+            break;
+
+            case SerializerTrace.EVENTTYPE_COMMENT :
+                buf.append("COMMENT[" + generateEvent.m_data + "]");
+            break;
+
+            case SerializerTrace.EVENTTYPE_PI :
+                buf.append("PI[" + generateEvent.m_name + ", " + generateEvent.m_data + "]");
+            break;
+
+            case SerializerTrace.EVENTTYPE_ENTITYREF :
+                buf.append("ENTITYREF[" + generateEvent.m_name + "]");
+            break;
+
+            case SerializerTrace.EVENTTYPE_IGNORABLEWHITESPACE :
+                buf.append("IGNORABLEWHITESPACE");
+            break;
+        }
+        setLastItem(buf.toString());
+        logger.logMsg(level, prefix + getLast());
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/LoggingTraceListener.java b/test/java/src/org/apache/qetest/xalanj2/LoggingTraceListener.java
new file mode 100644
index 0000000..d01ae5d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/LoggingTraceListener.java
@@ -0,0 +1,372 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingTraceListener.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+import java.util.Hashtable;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.apache.xalan.templates.Constants;
+import org.apache.xalan.templates.ElemTemplate;
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.templates.ElemTextLiteral;
+import org.apache.xalan.trace.GenerateEvent;
+import org.apache.xalan.trace.SelectionEvent;
+import org.apache.xalan.trace.TraceListener;
+import org.apache.xalan.trace.TracerEvent;
+import org.apache.xml.serializer.SerializerTrace;
+import org.apache.xpath.axes.ContextNodeList;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+
+/**
+ * Logging TraceListener interface.
+ * Implementation of the TraceListener interface that
+ * prints each event to our logger as it occurs.
+ * Future improvements: allow you to specify a set of 
+ * expected events to validate.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingTraceListener extends LoggingHandler 
+       implements TraceListener
+{
+
+    /**
+     * Accesor method for a brief description of this service.  
+     * @return String "LoggingTraceListener: logs and counts trace events"
+     */
+    public String getDescription()
+    {
+        return "LoggingTraceListener: logs and counts trace events";
+    }
+
+
+    /** No-op sets logger to default.  */
+    public LoggingTraceListener()
+    {
+        setLogger(getDefaultLogger());
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param r Logger we should log to
+     */
+    public LoggingTraceListener(Logger l)
+    {
+        setLogger(l);
+    }
+
+
+    /**
+     * Set a default handler for us to wrapper - no-op.
+     * Since you can add multiple TraceListeners, there's no sense 
+     * in us wrappering another one.
+     * @param default Object unused
+     */
+    public void setDefaultHandler(Object noop)
+    {
+        /* no-op */
+    }
+
+
+    /**
+     * Accessor method for our default handler - no-op.
+     * @return null
+     */
+    public Object getDefaultHandler()
+    {
+        return null;
+    }
+
+
+    /** Cheap-o string representation of last event we got.  */
+    protected String lastItem = NOTHING_HANDLED;
+
+
+    /**
+     * Accessor for string representation of last trace event.  
+     * @param s string to set
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+
+    /**
+     * Accessor for string representation of last trace event.  
+     * @return last event string we had
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+
+    /** Constant for getCounters()[]: trace events.  */
+    public static final int TYPE_TRACE = 0;
+
+    /** Constant for getCounters()[]: generated events.  */
+    public static final int TYPE_GENERATED = 1;
+
+    /** Constant for getCounters()[]: selected events.  */
+    public static final int TYPE_SELECTED = 2;
+
+    /** 
+     * Counters for how many events we've handled.  
+     * Index into array are the TYPE_* constants.
+     */
+    protected int[] counters = 
+    {
+        0, /* trace */
+        0, /* generated */
+        0  /* selected */
+    };
+
+
+    /**
+     * Get a list of counters of all items we've logged.
+     * Returned as trace, generated, selected
+     * Index into array are the TYPE_* constants.
+     *
+     * @return array of int counters for each item we log
+     */
+    public int[] getCounters()
+    {
+        return this.counters;
+    }
+
+    /**
+     * Reset all items or counters we've handled.  
+     */
+    public void reset()
+    {
+        setLastItem(NOTHING_HANDLED);
+        for (int i = 0; i < this.counters.length; i++)
+        {
+            this.counters[i] = 0;
+        }
+    }
+
+    /** setExpected, etc. not yet implemented.  */
+
+    ////////////////// Implement TraceListener ////////////////// 
+
+    /** Name of custom logElement each event outputs: traceListenerDump.  */
+    public static final String TRACE_LISTENER_DUMP = "traceListenerDump";
+
+    /**
+     * Logging implementation of TraceListener method.
+     * Method that is called when a trace event occurs.
+     * The method is blocking.  It must return before processing continues.
+     *
+     * @param tracerEvent the trace event.
+     */
+    public void trace(TracerEvent tracerEvent)
+    {
+        counters[TYPE_TRACE]++;
+
+        Hashtable attrs = new Hashtable();
+        attrs.put("event", "trace");
+        attrs.put("location", "L" + tracerEvent.m_styleNode.getLineNumber()
+                  + "C" + tracerEvent.m_styleNode.getColumnNumber());
+
+        StringBuffer buf = new StringBuffer("  <styleNode>");
+        switch (tracerEvent.m_styleNode.getXSLToken())
+        {
+            // Specific handling for most common 'interesting' items
+            case Constants.ELEMNAME_TEXTLITERALRESULT :
+                buf.append(XalanDumper.dump((ElemTextLiteral) tracerEvent.m_styleNode, XalanDumper.DUMP_DEFAULT));
+                break;
+
+            case Constants.ELEMNAME_TEMPLATE :
+                buf.append(XalanDumper.dump((ElemTemplate) tracerEvent.m_styleNode, XalanDumper.DUMP_DEFAULT));
+                break;
+
+            default :
+                buf.append(XalanDumper.dump((ElemTemplateElement) tracerEvent.m_styleNode, XalanDumper.DUMP_DEFAULT));
+        }
+        buf.append("  </styleNode>\n");
+        // Always add the mode value; will either use toString() 
+        //  automatically or will print 'null'
+        buf.append("  <m_mode>" + tracerEvent.m_mode + "</m_mode>\n");
+
+        // Also dump the sourceNode too!
+        buf.append("  <m_sourceNode>" + XalanDumper.dump(tracerEvent.m_sourceNode, XalanDumper.DUMP_DEFAULT) + "</m_sourceNode>\n");
+
+        setLastItem(buf.toString());
+        logger.logElement(level, TRACE_LISTENER_DUMP, attrs, buf.toString());
+    }
+
+    /**
+     * Logging implementation of TraceListener method.
+     * Method that is called just after the formatter listener is called.
+     *
+     * @param selectionEvent the selected event.
+     * @throws javax.xml.transform.TransformerException never thrown
+     */
+    public void selected(SelectionEvent selectionEvent) 
+            throws javax.xml.transform.TransformerException
+    {
+        counters[TYPE_SELECTED]++;
+
+        Hashtable attrs = new Hashtable();
+        attrs.put("event", "selected");
+        attrs.put("location", "L" + selectionEvent.m_styleNode.getLineNumber()
+                  + "C" + selectionEvent.m_styleNode.getColumnNumber());
+
+        StringBuffer buf = new StringBuffer("  <styleNode>");
+        ElemTemplateElement styleNodeElem = (ElemTemplateElement) selectionEvent.m_styleNode;
+        ElemTemplateElement parent = (ElemTemplateElement) styleNodeElem.getParentNode();
+        if (parent == styleNodeElem.getStylesheetRoot().getDefaultRootRule())
+        {
+            buf.append("[default-root-rule]");
+        }
+        else if (parent == styleNodeElem.getStylesheetRoot().getDefaultTextRule())
+        {
+            buf.append("[default-text-rule]");
+        }
+        else if (parent == styleNodeElem.getStylesheetRoot().getDefaultRule())
+        {
+            buf.append("[default-rule]");
+        }
+        else
+            buf.append(XalanDumper.dump(styleNodeElem, XalanDumper.DUMP_DEFAULT));
+        buf.append("  </styleNode>\n");
+
+        buf.append("  <m_xpath>" + selectionEvent.m_attributeName + "="
+                   + selectionEvent.m_xpath.getPatternString() + "</m_xpath>\n");
+
+        buf.append("  <m_selection>");
+        if (selectionEvent.m_selection.getType() == selectionEvent.m_selection.CLASS_NODESET)
+        {
+            NodeIterator nl = selectionEvent.m_selection.nodeset();
+
+            if (nl instanceof ContextNodeList)
+            {
+                try
+                {
+                    nl = ((ContextNodeList)nl).cloneWithReset();
+                }
+                catch(CloneNotSupportedException cnse)
+                {
+                    buf.append("[Can't trace nodelist, threw: CloneNotSupportedException]");
+                }
+                Node pos = nl.nextNode();
+
+                if (null == pos)
+                {
+                    buf.append("[empty node list]");
+                }
+                else // (null == pos)
+                {
+                    while (null != pos)
+                    {
+                        buf.append(" " + pos);
+                        pos = nl.nextNode();
+                    }
+                }
+            }
+            else // (nl instanceof ContextNodeList)
+            {
+                buf.append("[Can't trace nodelist: it isn't a ContextNodeList]");
+            }
+        }
+        else // (selectionEvent.m_selection.getType() == selectionEvent.m_selection.CLASS_NODESET)
+        {
+            buf.append("[" + selectionEvent.m_selection.str() +"]");
+        }
+        buf.append("</m_selection>\n");
+        buf.append("  <m_sourceNode>" + XalanDumper.dump(selectionEvent.m_sourceNode, XalanDumper.DUMP_DEFAULT) + "</m_sourceNode>\n");
+        setLastItem(buf.toString());
+        logger.logElement(level, TRACE_LISTENER_DUMP, attrs, buf.toString());
+    }
+
+    /**
+     * Logging implementation of TraceListener method.
+     * Method that is called just after the formatter listener is called.
+     *
+     * @param generateEvent the generate event.
+     */
+    public void generated(GenerateEvent generateEvent)
+    {
+        counters[TYPE_GENERATED]++;
+
+        Hashtable attrs = new Hashtable();
+        attrs.put("event", "generated");
+
+        StringBuffer buf = new StringBuffer("  <eventtype ");
+        switch (generateEvent.m_eventtype)
+        {
+            case SerializerTrace.EVENTTYPE_STARTDOCUMENT :
+                buf.append("type=\"STARTDOCUMENT\">");
+            break;
+
+            case SerializerTrace.EVENTTYPE_ENDDOCUMENT :
+                buf.append("type=\"ENDDOCUMENT\">");
+            break;
+
+            case SerializerTrace.EVENTTYPE_STARTELEMENT :
+                buf.append("type=\"STARTELEMENT\">" + generateEvent.m_name);
+            break;
+
+            case SerializerTrace.EVENTTYPE_ENDELEMENT :
+                buf.append("type=\"ENDELEMENT\">" + generateEvent.m_name);
+            break;
+
+            case SerializerTrace.EVENTTYPE_CHARACTERS :
+                String chars1 = new String(generateEvent.m_characters, generateEvent.m_start, generateEvent.m_length);
+                buf.append("type=\"CHARACTERS\">" + chars1);
+            break;
+
+            case SerializerTrace.EVENTTYPE_CDATA :
+                String chars2 = new String(generateEvent.m_characters, generateEvent.m_start, generateEvent.m_length);
+                buf.append("type=\"CDATA\">" + chars2);
+            break;
+
+            case SerializerTrace.EVENTTYPE_COMMENT :
+                buf.append("type=\"COMMENT\">" + generateEvent.m_data);
+            break;
+
+            case SerializerTrace.EVENTTYPE_PI :
+                buf.append("type=\"PI\">" + generateEvent.m_name + ", " + generateEvent.m_data);
+            break;
+
+            case SerializerTrace.EVENTTYPE_ENTITYREF :
+                buf.append("type=\"ENTITYREF\">" + generateEvent.m_name);
+            break;
+
+            case SerializerTrace.EVENTTYPE_IGNORABLEWHITESPACE :
+                buf.append("type=\"IGNORABLEWHITESPACE\">");
+            break;
+        }
+        buf.append("</eventtype>\n");
+        setLastItem(buf.toString());
+        logger.logElement(level, TRACE_LISTENER_DUMP, attrs, buf.toString());
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/LoggingTraceListenerEx.java b/test/java/src/org/apache/qetest/xalanj2/LoggingTraceListenerEx.java
new file mode 100644
index 0000000..6ab7600
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/LoggingTraceListenerEx.java
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingTraceListenerEx.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+import java.util.Hashtable;
+
+import org.apache.qetest.Logger;
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.trace.EndSelectionEvent;
+import org.apache.xalan.trace.TraceListenerEx;
+import org.apache.xpath.axes.ContextNodeList;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+
+/**
+ * Logging TraceListenerEx interface.
+ * Implementation of the TraceListenerEx interface that
+ * prints each event to our logger as it occurs; simply adds 
+ * impl of new selectedEnd event to LoggingTraceListener.
+ * Future improvements: allow you to specify a set of 
+ * expected events to validate.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingTraceListenerEx extends LoggingTraceListener 
+       implements TraceListenerEx
+{
+
+    /**
+     * Accesor method for a brief description of this service.  
+     * @return String "LoggingTraceListenerEx: logs and counts trace and end events"
+     */
+    public String getDescription()
+    {
+        return "LoggingTraceListenerEx: logs and counts trace and end events";
+    }
+
+
+    /** No-op sets logger to default.  */
+    public LoggingTraceListenerEx()
+    {
+        setLogger(getDefaultLogger());
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param r Logger we should log to
+     */
+    public LoggingTraceListenerEx(Logger l)
+    {
+        setLogger(l);
+    }
+
+
+    /** Constant for getCounters()[]: selected events.  */
+    public static final int TYPE_SELECTED_END = 3;
+
+    /** 
+     * Counters for how many events we've handled.  
+     * Index into array are the TYPE_* constants.
+     */
+    protected int[] counters = 
+    {
+        0, /* trace */
+        0, /* generated */
+        0, /* selected */
+        0  /* selectedEnd */
+    };
+
+    public int getCounterEx()
+    {
+        return counters[TYPE_SELECTED_END];
+        
+    }
+    /** setExpected, etc. not yet implemented.  */
+
+    ////////////////// Implement TraceListenerEx ////////////////// 
+
+    /**
+     * Method that is called after an xsl:apply-templates or 
+     * xsl:for-each selection occurs.
+     *
+     * @param ev the generate event.
+     *
+     * @throws javax.xml.transform.TransformerException
+     */
+    public void selectEnd(EndSelectionEvent endSelectionEvent) 
+          throws javax.xml.transform.TransformerException
+    {
+        counters[TYPE_SELECTED_END]++;
+        Hashtable attrs = new Hashtable();
+        attrs.put("event", "selectEnd");
+        attrs.put("location", "L" + endSelectionEvent.m_styleNode.getLineNumber()
+                  + "C" + endSelectionEvent.m_styleNode.getColumnNumber());
+
+        StringBuffer buf = new StringBuffer("  <styleNode>");
+        ElemTemplateElement styleNodeElem = (ElemTemplateElement) endSelectionEvent.m_styleNode;
+        ElemTemplateElement parent = (ElemTemplateElement) styleNodeElem.getParentNode();
+        if (parent == styleNodeElem.getStylesheetRoot().getDefaultRootRule())
+        {
+            buf.append("[default-root-rule]");
+        }
+        else if (parent == styleNodeElem.getStylesheetRoot().getDefaultTextRule())
+        {
+            buf.append("[default-text-rule]");
+        }
+        else if (parent == styleNodeElem.getStylesheetRoot().getDefaultRule())
+        {
+            buf.append("[default-rule]");
+        }
+        else
+            buf.append(XalanDumper.dump(styleNodeElem, XalanDumper.DUMP_DEFAULT));
+            
+        buf.append("  </styleNode>\n");
+
+        buf.append("  <m_xpath>" + endSelectionEvent.m_attributeName + "="
+                   + endSelectionEvent.m_xpath.getPatternString() + "</m_xpath>\n");
+
+        buf.append("  <m_selection>");
+        if (endSelectionEvent.m_selection.getType() == endSelectionEvent.m_selection.CLASS_NODESET)
+        {
+            NodeIterator nl = endSelectionEvent.m_selection.nodeset();
+
+            if (nl instanceof ContextNodeList)
+            {
+                try
+                {
+                    nl = ((ContextNodeList)nl).cloneWithReset();
+                }
+                catch(CloneNotSupportedException cnse)
+                {
+                    buf.append("[Can't trace nodelist, threw: CloneNotSupportedException]");
+                }
+                Node pos = nl.nextNode();
+
+                if (null == pos)
+                {
+                    buf.append("[empty node list]");
+                }
+                else // (null == pos)
+                {
+                    while (null != pos)
+                    {
+                        buf.append(" " + pos);
+                        pos = nl.nextNode();
+                    }
+                }
+            }
+            else // (nl instanceof ContextNodeList)
+            {
+                buf.append("[Can't trace nodelist: it isn't a ContextNodeList]");
+            }
+        }
+        else // (selectionEvent.m_selection.getType() == selectionEvent.m_selection.CLASS_NODESET)
+        {
+            buf.append("[" + endSelectionEvent.m_selection.str() +"]");
+        }
+        buf.append("</m_selection>\n");
+
+        buf.append("  <m_sourceNode>" + XalanDumper.dump(endSelectionEvent.m_sourceNode, XalanDumper.DUMP_DEFAULT) + "</m_sourceNode>\n");
+
+        setLastItem(buf.toString());
+        logger.logElement(level, TRACE_LISTENER_DUMP, attrs, buf.toString());
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/LoggingTransformState.java b/test/java/src/org/apache/qetest/xalanj2/LoggingTransformState.java
new file mode 100644
index 0000000..3e0b940
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/LoggingTransformState.java
@@ -0,0 +1,477 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingTransformState.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.lang.reflect.Method;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.apache.xalan.templates.ElemLiteralResult;
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.transformer.TransformState;
+import org.apache.xalan.transformer.TransformerClient;
+import org.apache.xpath.XPath;
+import org.w3c.dom.Node;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+
+/**
+ * Cheap-o ContentHandler that logs info about TransformState interface.
+ * <p>Implements ContentHandler and dumps simplistic info 
+ * everything to a Logger; a way to debug TransformState.</p>
+ * <p>This class could use improvement, but currently serves both 
+ * as a 'layer' for a ContentHandler (i.e. you can stick 
+ * setDefaultHandler in which we'll call for you, thus actually 
+ * getting output from your transform) as well as a logging 
+ * service for the TransformState interface.  We dump to our 
+ * Logger various interesting info from the TransformState 
+ * object during each of our startElement(), endElement(), and 
+ * characters() calls about both the source node being processed 
+ * and about the xsl: element doing the processing.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingTransformState extends LoggingHandler 
+       implements ContentHandler, TransformerClient
+{
+
+    /** No-op sets logger to default.  */
+    public LoggingTransformState()
+    {
+        setLogger(getDefaultLogger());
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param r Logger we should log to
+     */
+    public LoggingTransformState(Logger l)
+    {
+        setLogger(l);
+    }
+
+
+    /**
+     * A TransformState object that we use to log state data.
+     * This is the equivalent of the defaultHandler, even though 
+     * that's not really the right metaphor.  This class could be 
+     * upgraded to have both a default ContentHandler and a 
+     * defaultTransformerClient in the future.
+     */
+    protected TransformState transformState = null;
+
+
+    /**
+     * Implement TransformerClient.setTransformState interface.  
+     * Pass in a reference to a TransformState object, which
+     * can be used during SAX ContentHandler events to obtain
+     * information about he state of the transformation. This
+     * method will be called before each startDocument event.
+     *
+     * @param ts A reference to a TransformState object
+     */
+    public void setTransformState(TransformState ts)
+    {
+        transformState = ts;
+    }
+
+
+    /**
+     * Accessor method for our TransformState object.
+     *
+     * @param TransformState object we are using
+     */
+    public TransformState getTransformState()
+    {
+        return transformState;
+    }
+
+
+    /**
+     * Our default handler that we pass all events through to.
+     */
+    protected ContentHandler defaultHandler = null;
+
+
+    /**
+     * Set a default handler for us to wrapper.
+     * Set a ContentHandler for us to use.
+     *
+     * @param default Object of the correct type to pass-through to;
+     * throws IllegalArgumentException if null or incorrect type
+     */
+    public void setDefaultHandler(Object defaultC)
+    {
+        try
+        {
+            defaultHandler = (ContentHandler)defaultC;
+        }
+        catch (Throwable t)
+        {
+            throw new java.lang.IllegalArgumentException("setDefaultHandler illegal type: " + t.toString());
+        }
+    }
+
+
+    /**
+     * Accessor method for our default handler.
+     *
+     * @return default (Object) our default handler; null if unset
+     */
+    public Object getDefaultHandler()
+    {
+        return (Object)defaultHandler;
+    }
+
+
+    /** Prefixed to all logger msg output for ContentHandler.  */
+    public final String prefix = "LTS:";
+
+
+    /** Prefixed to all logger msg output for TransformState.  */
+    public final String prefix2 = "LTS2:";
+
+
+    /** Cheap-o string representation of last event we got.  */
+    protected String lastItem = NOTHING_HANDLED;
+
+
+    /** 
+     * Cheap-o Verbosity flag: should we log all ContentHandler 
+     * messages or not.  
+     * //@todo should have accessors and be integrated better
+     */
+    public boolean verbose = false;
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @param s string to set
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @return last event string we had
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+
+    /** setExpected, etc. not yet implemented.  */
+
+
+    /** How many characters to report from characters event.  */
+    private int charLimit = 30;
+
+
+    /**
+     * How many characters to report from characters event.  
+     * @param l charLimit for us to use
+     */
+    public void setCharLimit(int l)
+    {
+        charLimit = l;
+    }
+
+
+    /**
+     * How many characters to report from characters event.  
+     * @return charLimit we use
+     */
+    public int getCharLimit()
+    {
+        return charLimit;
+    }
+
+
+
+    ////////////////// Utility methods for TransformState ////////////////// 
+    /**
+     * Utility method to gather data about current node.  
+     * @return String describing node
+     */
+    protected String getCurrentNodeInfo(TransformState ts, String x)
+    {
+        StringBuffer buf = new StringBuffer();
+        Node n = ts.getCurrentNode();
+        if(null != n)
+        {
+            buf.append(n.getNodeName());
+            if(Node.TEXT_NODE == n.getNodeType())
+            {
+                buf.append("[");
+                buf.append(n.getNodeValue());
+                buf.append("]");
+            }
+        }
+        else
+            buf.append("[NULL-NODE]");
+
+        if (null != x)            
+            buf.append("[" + x + "]");
+
+        return buf.toString();
+    }
+
+    /**
+     * Utility method to gather data about current element in xsl.  
+     * @return String describing element
+     */
+    protected String getCurrentElementInfo(TransformState ts)
+    {
+        StringBuffer buf = new StringBuffer();
+        ElemTemplateElement templ = ts.getCurrentElement();
+
+        if(null != templ)
+        {
+            // Note for user if it's an LRE or an xsl element
+            if(templ instanceof ElemLiteralResult)
+                buf.append("LRE:");
+            else
+                buf.append("xsl:");
+
+            buf.append(templ.getNodeName());
+            buf.append(", line# "+templ.getLineNumber());
+            buf.append(", col# "+templ.getColumnNumber());
+            try
+            {
+                Class cl = ((Object)templ).getClass();
+                Method getSelect = cl.getMethod("getSelect", null);
+                if(null != getSelect)
+                {
+                    buf.append(", select='");
+                    XPath xpath = (XPath)getSelect.invoke(templ, null);
+                    buf.append(xpath.getPatternString()+"'");
+                }
+            }
+            catch(java.lang.reflect.InvocationTargetException ite)
+            {
+                // no-op: just don't put in the select info for these items
+                // buf.append("(threw: InvocationTargetException)");
+            }
+            catch(IllegalAccessException iae)
+            {
+                // no-op
+            }
+            catch(NoSuchMethodException nsme)
+            {
+                // no-op
+            }
+        }
+        else
+            buf.append("[NULL-ELEMENT]");
+
+        return buf.toString();
+    }
+
+
+    ////////////////// Implement ContentHandler ////////////////// 
+    protected Locator ourLocator = null;
+    
+    /** Implement ContentHandler.setDocumentLocator.  */
+    public void setDocumentLocator (Locator locator)
+    {
+        // Note: this implies this class is !not! threadsafe
+        setLastItem("setDocumentLocator");
+        ourLocator = locator; // future use
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.setDocumentLocator(locator);
+    }
+
+
+    /** Implement ContentHandler.startDocument.  */
+    public void startDocument ()
+        throws SAXException
+    {
+        setLastItem("startDocument");
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.startDocument();
+    }
+
+
+    /** Implement ContentHandler.endDocument.  */
+    public void endDocument()
+        throws SAXException
+    {
+        setLastItem("endDocument");
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.endDocument();
+    }
+
+
+    /** Implement ContentHandler.startPrefixMapping.  */
+    public void startPrefixMapping (String prefix, String uri)
+        throws SAXException
+    {
+        setLastItem("startPrefixMapping: " + prefix + ", " + uri);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.startPrefixMapping(prefix, uri);
+    }
+
+
+    /** Implement ContentHandler.endPrefixMapping.  */
+    public void endPrefixMapping (String prefix)
+        throws SAXException
+    {
+        setLastItem("endPrefixMapping: " + prefix);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.endPrefixMapping(prefix);
+    }
+
+
+    /** Implement ContentHandler.startElement.  */
+    public void startElement (String namespaceURI, String localName,
+                                                        String qName, Attributes atts)
+        throws SAXException
+    {
+        final String START_ELEMENT = "startElement: ";
+        StringBuffer buf = new StringBuffer();
+        buf.append(namespaceURI + ", " 
+                   + namespaceURI + ", " + qName);
+                   
+        int n = atts.getLength();
+        for(int i = 0; i < n; i++)
+        {
+            buf.append(", " + atts.getQName(i));
+        }
+        setLastItem(START_ELEMENT + buf.toString());
+        if (verbose)
+            logger.logMsg(level, prefix + getLast());
+
+        if (null != defaultHandler)
+            defaultHandler.startElement(namespaceURI, localName, qName, atts);
+
+        // Also handle TransformerState
+        if(null != transformState)
+        {
+            logger.logMsg(level, prefix2 + START_ELEMENT 
+                         + getCurrentElementInfo(transformState) + " is processing: " 
+                         + getCurrentNodeInfo(transformState, buf.toString()));
+        }
+    }
+
+
+    /** Implement ContentHandler.endElement.  */
+    public void endElement (String namespaceURI, String localName, String qName)
+        throws SAXException
+    {
+        final String END_ELEMENT = "endElement: ";
+        setLastItem(END_ELEMENT + namespaceURI + ", " + namespaceURI + ", " + qName);
+        if (verbose)
+            logger.logMsg(level, prefix + getLast());
+
+        if (null != defaultHandler)
+            defaultHandler.endElement(namespaceURI, localName, qName);
+
+        // Also handle TransformerState
+        if(null != transformState)
+        {
+            logger.logMsg(level, prefix2 + END_ELEMENT 
+                         + getCurrentElementInfo(transformState) + " is processing: " 
+                         + getCurrentNodeInfo(transformState, null));
+        }
+    }
+
+
+    /** Implement ContentHandler.characters.  */
+    public void characters (char ch[], int start, int length)
+        throws SAXException
+    {
+        final String CHARACTERS = "characters: ";
+        String s = new String(ch, start, (length > charLimit) ? charLimit : length);
+        String tmp = null;
+        if(length > charLimit)
+            tmp = "\"" + s + "\"...";
+        else
+            tmp = "\"" + s + "\"";
+
+        setLastItem(CHARACTERS + tmp);
+        if (verbose)
+            logger.logMsg(level, prefix + getLast());
+
+        if (null != defaultHandler)
+            defaultHandler.characters(ch, start, length);
+
+        // Also handle TransformerState
+        if(null != transformState)
+        {
+            logger.logMsg(level, prefix2 + CHARACTERS 
+                         + getCurrentElementInfo(transformState) + " is processing: " 
+                         + getCurrentNodeInfo(transformState, tmp));
+        }
+    }
+
+
+    /** Implement ContentHandler.ignorableWhitespace.  */
+    public void ignorableWhitespace (char ch[], int start, int length)
+        throws SAXException
+    {
+        setLastItem("ignorableWhitespace: len " + length);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.ignorableWhitespace(ch, start, length);
+    }
+
+
+    /** Implement ContentHandler.processingInstruction.  */
+    public void processingInstruction (String target, String data)
+        throws SAXException
+    {
+        setLastItem("processingInstruction: " + target + ", " + data);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.processingInstruction(target, data);
+    }
+
+
+    /** Implement ContentHandler.skippedEntity.  */
+    public void skippedEntity (String name)
+        throws SAXException
+    {
+        setLastItem("skippedEntity: " + name);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.skippedEntity(name);
+    }
+
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/OutputSettingsTest.java b/test/java/src/org/apache/qetest/xalanj2/OutputSettingsTest.java
new file mode 100644
index 0000000..1c8bdbf
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/OutputSettingsTest.java
@@ -0,0 +1,254 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * OutputSettingsTest.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Verify xalan:-specific output properties.
+ * This test is similar to trax.OutputPropertiesTest but tests 
+ * some Xalan-J 2.2.x+ specific features for the xalan: namespace, 
+ * like: indent-amount, content-handler, entities,
+ * use-url-escaping, and omit-meta-tag.
+ * 
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class OutputSettingsTest extends FileBasedTest
+{
+
+    /** Used for generating names of actual output files.   */
+    protected OutputNameManager outNames;
+
+    /** Default OutputSettingsTest.xml/xsl file pair.   */
+    protected XSLTestfileInfo xmlFileInfo = new XSLTestfileInfo();
+
+    /** OutputEntities.xml/xsl/ent file pair.   */
+    protected XSLTestfileInfo entFileInfo = new XSLTestfileInfo();
+
+    /** Just initialize test name, comment, numTestCases. */
+    public OutputSettingsTest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "OutputSettingsTest";
+        testComment = "Verify xalan:-specific output properties";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files, etc.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + "xalanj2");
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Possible problem creating output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + "xalanj2"
+                                         + File.separator + testName, ".out");
+
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + "xalanj2"
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + "xalanj2"
+                              + File.separator;
+
+        xmlFileInfo.inputName = testBasePath + "OutputSettingsXML.xsl";
+        xmlFileInfo.xmlName = testBasePath + "OutputSettingsXML.xml";
+        // Only root of the output gold name
+        xmlFileInfo.goldName = goldBasePath + "OutputSettingsXML";
+
+        // xsl file references OutputEntities.ent
+        entFileInfo.inputName = testBasePath + "OutputEntities.xsl";
+        entFileInfo.xmlName = testBasePath + "identity.xml";
+        entFileInfo.goldName = goldBasePath + "OutputEntities.out";
+        return true;
+    }
+
+
+    /**
+     * Verify xalan:entities output property.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Verify xalan:entities output property");
+        TransformerFactory factory = null;
+        Templates templates = null;
+
+        try
+        {
+            // Process stylesheet with replaced entities
+            factory = TransformerFactory.newInstance();
+            reporter.logInfoMsg("entFileInfo newTemplates(" + QetestUtils.filenameToURL(entFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(entFileInfo.inputName)));
+            reporter.logHashtable(Logger.STATUSMSG, 
+                                  templates.getOutputProperties(), "entFileInfo templates output properties");
+
+            // Process the file once with default properties
+            Transformer transformer = templates.newTransformer();
+            Result result = new StreamResult(outNames.nextName());
+            reporter.logInfoMsg("(1)replaced entities transform(" + QetestUtils.filenameToURL(entFileInfo.xmlName) 
+                                + ", " + outNames.currentName() + ")");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(entFileInfo.xmlName)), result);
+            // Validate the default transform to base gold file
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(entFileInfo.goldName), 
+                              "(1)replaced entities transform into: " + outNames.currentName()
+                              + " gold: " + entFileInfo.goldName);
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("(1)replaced entities threw:" + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "(1)replaced entities threw ");
+            return true;
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Verify xalan:indent-amount output property.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Verify xalan:indent-amount output property");
+        TransformerFactory factory = null;
+        Templates templates = null;
+        try
+        {
+            // Process simple XML output stylesheet
+            factory = TransformerFactory.newInstance();
+            reporter.logInfoMsg("xmlFileInfo newTemplates(" + QetestUtils.filenameToURL(xmlFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(xmlFileInfo.inputName)));
+            reporter.logHashtable(Logger.STATUSMSG, 
+                                  templates.getOutputProperties(), "xmlFileInfo templates output properties");
+
+            // Process the file once with default properties
+            Transformer transformer = templates.newTransformer();
+            Result result = new StreamResult(outNames.nextName());
+            reporter.logInfoMsg("(2)xml transform(" + QetestUtils.filenameToURL(xmlFileInfo.xmlName) 
+                                + ", " + outNames.currentName() + ")");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlFileInfo.xmlName)), result);
+            // Validate the default transform to base gold file
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(xmlFileInfo.goldName + ".out"), 
+                              "(2)xml transform into: " + outNames.currentName()
+                              + " gold: " + xmlFileInfo.goldName + ".out");
+
+            // Set Xalan-specific output property 
+            reporter.logInfoMsg("setOutputProperty({http://xml.apache.org/xslt}indent-amount, 2)");
+            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
+
+            result = new StreamResult(outNames.nextName());
+            reporter.logInfoMsg("(2)xml-2 transform(" + QetestUtils.filenameToURL(xmlFileInfo.xmlName) 
+                                + ", " + outNames.currentName() + ")");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlFileInfo.xmlName)), result);
+            // Validate the default transform to base gold file
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(xmlFileInfo.goldName + "-2.out"), 
+                              "(2)xml-2 transform into: " + outNames.currentName()
+                              + " gold: " + xmlFileInfo.goldName + "-2.out");
+            reporter.logHashtable(Logger.STATUSMSG, 
+                                  transformer.getOutputProperties(), "xml-2 transformer output properties");
+
+            // Set Xalan-specific output property 
+            reporter.logInfoMsg("setOutputProperty({http://xml.apache.org/xslt}indent-amount, 12)");
+            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "12");
+
+            result = new StreamResult(outNames.nextName());
+            reporter.logInfoMsg("(2)xml-12 transform(" + QetestUtils.filenameToURL(xmlFileInfo.xmlName) 
+                                + ", " + outNames.currentName() + ")");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlFileInfo.xmlName)), result);
+            // Validate the default transform to base gold file
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(xmlFileInfo.goldName + "-12.out"), 
+                              "(2)xml-12 transform into: " + outNames.currentName()
+                              + " gold: " + xmlFileInfo.goldName + "-12.out");
+            reporter.logHashtable(Logger.STATUSMSG, 
+                                  transformer.getOutputProperties(), "xml-12 transformer output properties");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkErr("(2)xml stylesheet threw:" + t.toString());
+            reporter.logThrowable(reporter.ERRORMSG, t, "(2)xml stylesheet threw ");
+            return true;
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by OutputSettingsTest:\n"
+                + "(Note: assumes inputDir=tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        OutputSettingsTest app = new OutputSettingsTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/PrefixResolverAPITest.java b/test/java/src/org/apache/qetest/xalanj2/PrefixResolverAPITest.java
new file mode 100644
index 0000000..b1ced99
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/PrefixResolverAPITest.java
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.StringReader;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.xml.utils.PrefixResolver;
+import org.apache.xml.utils.PrefixResolverDefault;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Functionality/system/integration tests for PrefixResolver.
+ *
+ * Very simple coverage test.
+ * 
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class PrefixResolverAPITest extends FileBasedTest
+{
+    /** Just initialize test name, comment, numTestCases. */
+    public PrefixResolverAPITest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "PrefixResolverAPITest";
+        testComment = "Functionality/system/integration tests for PrefixResolver";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        /* no-op */
+        return true;
+    }
+
+    /** XML prefixes and namespaces in our DOM to test.  */
+    protected static String[][] XMLDOC_PREFIXES = 
+    {
+        { "", "urn://doc.level.attr/xmlns" } , /* default ns */
+        { "pre", "urn://doc.level.attr/preNS" }, 
+        { "other", "urn://doc.level.attr/otherNS" }, 
+        { "subNS", "urn://doc.subElement/subNS" }/* ns only on subElement */
+    };
+
+    /** XML string for our DOM to test.  */
+    protected static String XMLDOC = 
+        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "\n" + 
+        "<pre:document " + "\n" + 
+        "docLevelAttr=\"urn://doc.level.attr/notNS\"" + "\n" + 
+        "xmlns=\"" + XMLDOC_PREFIXES[0][1] + "\"" + "\n" + 
+        "xmlns:" + XMLDOC_PREFIXES[1][0] + "=\"" + XMLDOC_PREFIXES[1][1] + "\" " + "\n" + 
+        "xmlns:" + XMLDOC_PREFIXES[2][0] + "=\"" + XMLDOC_PREFIXES[2][1] + "\" " + "\n" + 
+        ">" + "\n" + 
+        "<pre:element elementAttr=\"elementAttrVal\" elementAttrNS=\"pre:elementAttrValNS\" xml:lang=\"en\">" + "\n" + 
+        "    <pre:subElement subElementAttr=\"subElementAttrVal\" xmlns:" + XMLDOC_PREFIXES[3][0] + "=\"" + XMLDOC_PREFIXES[3][1] + "\" subElementAttrNS=\"other:subElementAttrValNS\">" + "\n" + 
+        "        <pre:subSubElement />" + "\n" + 
+        "    </pre:subElement>" + "\n" + 
+        "</pre:element>" + "\n" + 
+        "</pre:document>" ;
+
+    /**
+     * Read in hard-coded dom and try resolving some namespaces.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Read in hard-coded dom and try resolving some namespaces");
+
+        try
+        {
+            // Startup a factory and docbuilder, create some nodes/DOMs
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+            reporter.logArbitrary(reporter.TRACEMSG, "hardcoded XML text is:" + XMLDOC);
+            reporter.logTraceMsg("parsing hardcoded XML");
+            Document doc = docBuilder.parse(new InputSource(new StringReader(XMLDOC)));
+            Element docElem = doc.getDocumentElement();
+
+            // Test from the root element
+            PrefixResolver docResolver = new PrefixResolverDefault(docElem);
+            reporter.logStatusMsg("new PrefixResolver(" + docElem.getNodeName() + ") is: " + docResolver);
+            // -1 because only subelem has last prefix available
+            for (int i = 0; i < (XMLDOC_PREFIXES.length - 1); i++)
+            {
+                String ns = docResolver.getNamespaceForPrefix(XMLDOC_PREFIXES[i][0]);
+                reporter.check(ns, XMLDOC_PREFIXES[i][1], "getNamespaceForPrefix(" + XMLDOC_PREFIXES[i][0] + ") = " + ns);
+            }
+
+            // Try again, from further down the tree (* is match any ns)
+            Node elemElem = doc.getElementsByTagNameNS("*", "element").item(0);
+            PrefixResolver elemResolver = new PrefixResolverDefault(elemElem);
+            reporter.logStatusMsg("new PrefixResolver(" + elemElem.getNodeName() + ") is: " + elemResolver);
+            // -1 because only subelem has last prefix available
+            for (int i = 0; i < (XMLDOC_PREFIXES.length - 1); i++)
+            {
+                String ns = elemResolver.getNamespaceForPrefix(XMLDOC_PREFIXES[i][0]);
+                reporter.check(ns, XMLDOC_PREFIXES[i][1], "getNamespaceForPrefix(" + XMLDOC_PREFIXES[i][0] + ") = " + ns);
+            }
+
+            // Try again, from further down the tree with additional ns (* is match any ns)
+            Node subElem = doc.getElementsByTagNameNS("*", "subElement").item(0);
+            PrefixResolver subResolver = new PrefixResolverDefault(subElem);
+            reporter.logStatusMsg("new PrefixResolver(" + subElem.getNodeName() + ") is: " + subResolver);
+            for (int i = 0; i < XMLDOC_PREFIXES.length; i++)
+            {
+                String ns = subResolver.getNamespaceForPrefix(XMLDOC_PREFIXES[i][0]);
+                reporter.check(ns, XMLDOC_PREFIXES[i][1], "getNamespaceForPrefix(" + XMLDOC_PREFIXES[i][0] + ") = " + ns);
+            }
+
+            // Try again, from further down the tree with additional ns (* is match any ns)
+            Node subSubElem = doc.getElementsByTagNameNS("*", "subSubElement").item(0);
+            PrefixResolver subSubResolver = new PrefixResolverDefault(subSubElem);
+            reporter.logStatusMsg("new PrefixResolver(" + subSubElem.getNodeName() + ") is: " + subSubResolver);
+            for (int i = 0; i < XMLDOC_PREFIXES.length; i++)
+            {
+                String ns = subSubResolver.getNamespaceForPrefix(XMLDOC_PREFIXES[i][0]);
+                reporter.check(ns, XMLDOC_PREFIXES[i][1], "getNamespaceForPrefix(" + XMLDOC_PREFIXES[i][0] + ") = " + ns);
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "testCase1 threw");
+            reporter.checkFail("testCase1 threw: " + t.toString());
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by PrefixResolverAPITest:\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        PrefixResolverAPITest app = new PrefixResolverAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/ProgrammaticDOMTest.java b/test/java/src/org/apache/qetest/xalanj2/ProgrammaticDOMTest.java
new file mode 100644
index 0000000..0d6e4d6
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/ProgrammaticDOMTest.java
@@ -0,0 +1,513 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ProgrammaticDOMTest.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Functionality/system/integration tests for DOMSource.
+ * Various kinds of DOM elements, documents used.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ProgrammaticDOMTest extends FileBasedTest
+{
+
+    /** Provides nextName(), currentName() functionality.  */
+    protected OutputNameManager outNames;
+
+    /** Simple DOMTest.xml/xsl file pair.  */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = File.separator + "trax" + File.separator;
+
+    private static final String xslNamespace = "http://www.w3.org/1999/XSL/Transform";
+    private static final String nsNamespace = "http://www.w3.org/XML/1998/namespace";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public ProgrammaticDOMTest()
+    {
+        numTestCases = 2;  // REPLACE_num
+        testName = "ProgrammaticDOMTest";
+        testComment = "Functionality/system/integration tests for DOMSource";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + TRAX_SUBDIR
+                                         + testName, ".out");
+
+        testFileInfo.inputName = QetestUtils.filenameToURL(inputDir 
+                              + TRAX_SUBDIR + "identity.xsl");
+        testFileInfo.xmlName = QetestUtils.filenameToURL(inputDir
+                              + TRAX_SUBDIR + "identity.xml");
+        testFileInfo.goldName = goldDir + TRAX_SUBDIR + "identity.out";
+
+        try
+        {
+            TransformerFactory tf = TransformerFactory.newInstance();
+            if (!(tf.getFeature(DOMSource.FEATURE)
+                  && tf.getFeature(DOMResult.FEATURE)))
+            {   // The rest of this test relies on DOM
+                reporter.logErrorMsg("DOM*.FEATURE not supported! Some tests may be invalid!");
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail(
+                "Problem creating factory; Some tests may be invalid!");
+            reporter.logThrowable(reporter.ERRORMSG, t,
+                                  "Problem creating factory; Some tests may be invalid!");
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Pass various forms of XML DOM's to a transform.
+     * Reproduce Bugzilla 1361.
+     * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1361
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Pass various forms of XML DOM's to a transform");
+
+        try
+        {
+            // Startup a factory and docbuilder, create some nodes/DOMs
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+            reporter.logTraceMsg("parsing xml, xsl files");
+            Document xslDoc = docBuilder.parse(new InputSource(testFileInfo.inputName));
+            Document xmlDoc = docBuilder.parse(new InputSource(testFileInfo.xmlName));
+            TransformerFactory factory = TransformerFactory.newInstance();
+
+            // Try a transform with XSL Document and XML Document (common usage)
+            Templates templates = factory.newTemplates(new DOMSource(xslDoc));
+            Transformer transformer = templates.newTransformer();
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xmlDoc,...) into " + outNames.currentName());
+
+            // Programmatically build the XML file into a Document and transform
+            Document xmlBuiltDoc = docBuilder.newDocument();
+            appendIdentityDOMXML(xmlBuiltDoc, xmlBuiltDoc, true);
+            transformer = templates.newTransformer();
+            reporter.logInfoMsg("About to transform(xmlBuiltDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlBuiltDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xmlBuiltDoc,...) into " + outNames.currentName());
+
+            // Again, with identity transformer
+            transformer = factory.newTransformer();
+            reporter.logInfoMsg("About to identityTransform(xmlBuiltDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlBuiltDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "identityTransform(xmlBuiltDoc,...) into " + outNames.currentName());
+
+
+            // Programmatically build the XML file into a DocFrag and transform
+            xmlBuiltDoc = docBuilder.newDocument();
+            DocumentFragment xmlBuiltDocFrag = xmlBuiltDoc.createDocumentFragment();
+            appendIdentityDOMXML(xmlBuiltDocFrag, xmlBuiltDoc, true);
+            transformer = templates.newTransformer();
+            reporter.logInfoMsg("About to transform(xmlBuiltDocFrag, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlBuiltDocFrag), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xmlBuiltDocFrag,...) into " + outNames.currentName());
+
+            // Again, with identity transformer
+            transformer = factory.newTransformer();
+            reporter.logInfoMsg("About to identityTransform(xmlBuiltDocFrag, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlBuiltDocFrag), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "identityTransform(xmlBuiltDocFrag,...) into " + outNames.currentName());
+
+
+            // Programmatically build the XML file into an Element and transform
+            xmlBuiltDoc = docBuilder.newDocument();
+            // Note: Here, we implicitly already have the outer list 
+            //  element, so ensure the worker method doesn't add again
+            Element xmlBuiltElem = xmlBuiltDoc.createElement("list");
+            appendIdentityDOMXML(xmlBuiltElem, xmlBuiltDoc, false);
+            transformer = templates.newTransformer();
+            reporter.logInfoMsg("About to transform(xmlBuiltElem, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlBuiltElem), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xmlBuiltElem,...) into " + outNames.currentName());
+
+            // Again, with identity transformer
+            transformer = factory.newTransformer();
+            reporter.logInfoMsg("About to identityTransform(xmlBuiltElem, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlBuiltElem), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "identityTransform(xmlBuiltElem,...) into " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with various XML elems/documents");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with various XML elems/documents");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Build a stylesheet DOM programmatically and use it.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Build a stylesheet DOM programmatically and use it");
+
+        try
+        {
+            // Startup a factory and docbuilder, create some nodes/DOMs
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+            reporter.logTraceMsg("parsing xml file");
+            Document xmlDoc = docBuilder.parse(new InputSource(testFileInfo.xmlName));
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = null;
+ 
+            // Programmatically build the XSL file into a Document and transform
+            Document xslBuiltDoc = docBuilder.newDocument();
+            appendIdentityDOMXSL(xslBuiltDoc, xslBuiltDoc, true);
+            // For debugging, write the generated stylesheet out
+            //  Note this will not textually exactly match the identity.xsl file
+            reporter.logInfoMsg("Writing out xslBuiltDoc to "+ outNames.nextName());
+            transformer = factory.newTransformer();
+            transformer.transform(new DOMSource(xslBuiltDoc), new StreamResult(outNames.currentName()));
+
+            reporter.logInfoMsg("About to newTransformer(xslBuiltDoc)");
+            transformer = factory.newTransformer(new DOMSource(xslBuiltDoc));
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xslBuiltDoc,...) into " + outNames.currentName());
+
+
+            // Programmatically build the XSL file into a DocFrag and transform
+            xslBuiltDoc = docBuilder.newDocument();
+            DocumentFragment xslBuiltDocFrag = xslBuiltDoc.createDocumentFragment();
+            appendIdentityDOMXSL(xslBuiltDocFrag, xslBuiltDoc, true);
+            // For debugging, write the generated stylesheet out
+            reporter.logInfoMsg("Writing out xslBuiltDocFrag to "+ outNames.nextName());
+            transformer = factory.newTransformer();
+            transformer.transform(new DOMSource(xslBuiltDocFrag), new StreamResult(outNames.currentName()));
+
+            reporter.logCriticalMsg("//@todo Verify that this is even a valid operation!");
+            reporter.logCriticalMsg("Bugzilla#5133 NPE below MOVED to SmoketestOuttakes.java 27-Nov-01 -sc");
+/* @todo Bugzilla#5133 NPE below MOVED to SmoketestOuttakes.java 27-Nov-01 -sc
+// Check that the DOM is actually correct, esp namespace nodes on top level
+// java.lang.NullPointerException
+//	at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java, Compiled Code)
+
+
+            reporter.logInfoMsg("About to newTransformer(xslBuiltDocFrag)");
+            transformer = factory.newTransformer(new DOMSource(xslBuiltDocFrag));
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xslBuiltDocFrag,...) into " + outNames.currentName());
+** @todo Bugzilla#5133 NPE above MOVED to SmoketestOuttakes.java 27-Nov-01 -sc */
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with various XSL1 elems/documents");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with various XSL1 elems/documents");
+        }
+
+/* @todo Bugzilla#5133 DOM003 Namespace error below MOVED to SmoketestOuttakes.java 27-Nov-01 -sc
+//org.w3c.dom.DOMException: DOM003 Namespace error
+//	at org.apache.xerces.dom.AttrNSImpl.&lt;init&gt;(AttrNSImpl.java:134)
+//	at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:1363)
+//	at org.apache.xerces.dom.ElementImpl.setAttributeNS(ElementImpl.java:596)
+//	at org.apache.qetest.xalanj2.ProgrammaticDOMTest.testCase2(ProgrammaticDOMTest.java:355)
+
+        try
+        {
+            // Startup a factory and docbuilder, create some nodes/DOMs
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+            reporter.logTraceMsg("parsing xml file");
+            Document xmlDoc = docBuilder.parse(new InputSource(testFileInfo.xmlName));
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = null;
+
+            // Programmatically build the XSL file into an Element and transform
+            Document xslBuiltDoc = docBuilder.newDocument();
+            // Note: Here, we implicitly already have the outer list 
+            //  element, so ensure the worker method doesn't add again
+            Element xslBuiltElem = xslBuiltDoc.createElementNS(xslNamespace, "xsl:stylesheet");
+            xslBuiltElem.setAttributeNS(null, "version", "1.0");
+            xslBuiltElem.setAttributeNS(nsNamespace, "xmlns:xsl", xslNamespace);
+            appendIdentityDOMXSL(xslBuiltElem, xslBuiltDoc, false);
+            // For debugging, write the generated stylesheet out
+            reporter.logInfoMsg("Writing out xslBuiltElem to "+ outNames.nextName());
+            transformer = factory.newTransformer();
+            transformer.transform(new DOMSource(xslBuiltElem), new StreamResult(outNames.currentName()));
+
+            reporter.logCriticalMsg("//@todo Verify that this is even a valid operation!");
+            reporter.logInfoMsg("About to newTransformer(xslBuiltElem)");
+            transformer = factory.newTransformer(new DOMSource(xslBuiltElem));
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xslBuiltElem,...) into " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with various XSL2 elems/documents");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with various XSL2 elems/documents");
+        }
+** @todo Bugzilla#5133 DOM003 Namespace error above MOVED to SmoketestOuttakes.java 27-Nov-01 -sc */
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Adds identity.xml elems to Node passed in.  
+     * Subject to change; hackish for now
+     * @author curcuru
+     * @param n Node to append DOM elems to
+     * @param factory Document providing createElement, etc. services
+     * @param useOuterElem if we should append the top-level <list> elem
+     */
+    public void appendIdentityDOMXML(Node n, Document factory, boolean useOuterElem)
+    {
+        try
+        {
+            Node container = null;
+            if (useOuterElem)
+            {
+                // If asked to, create and append top-level <list>
+                container = factory.createElement("list");
+                n.appendChild(container);
+            }
+            else
+            {
+                // Otherwise, just use their Node
+                container = n;
+            }
+            container.appendChild(factory.createTextNode("\n  "));
+
+            Element elemItem = factory.createElement("item");
+            elemItem.appendChild(factory.createTextNode("Xalan-J 1.x"));
+            container.appendChild(elemItem);
+            container.appendChild(factory.createTextNode("\n  "));
+
+            elemItem = factory.createElement("item");
+            elemItem.appendChild(factory.createTextNode("Xalan-J 2.x"));
+            container.appendChild(elemItem);
+            container.appendChild(factory.createTextNode("\n  "));
+
+            elemItem = factory.createElement("item");
+            elemItem.appendChild(factory.createTextNode("Xalan-C 1.x"));
+            container.appendChild(elemItem);
+            container.appendChild(factory.createTextNode("\n  "));
+
+            Element elemInnerList = factory.createElement("list");
+            container.appendChild(elemInnerList);
+            elemInnerList.appendChild(factory.createTextNode("\n    "));
+
+            elemItem = factory.createElement("item");
+            elemItem.appendChild(factory.createTextNode("Xalan documentation"));
+            elemInnerList.appendChild(elemItem);
+            elemInnerList.appendChild(factory.createTextNode("\n    "));
+
+            elemItem = factory.createElement("item");
+            elemItem.appendChild(factory.createTextNode("Xalan tests"));
+            elemInnerList.appendChild(elemItem);
+            elemInnerList.appendChild(factory.createTextNode("\n  "));
+
+            container.appendChild(factory.createTextNode("\n"));
+        }
+        catch (Exception e)
+        {
+            reporter.logErrorMsg("appendDOMTestXML threw: " + e.toString());
+            reporter.logThrowable(Logger.ERRORMSG, e, "appendDOMTestXML threw");
+        }
+    }    
+
+
+    /**
+     * Adds identity.xsl elems to Node passed in.  
+     * Subject to change; hackish for now
+     * @author curcuru
+     * @param n Node to append DOM elems to
+     * @param factory Document providing createElement, etc. services
+     * @param useOuterElem if we should append the top-level <stylesheet> elem
+     */
+    public void appendIdentityDOMXSL(Node n, Document factory, boolean useOuterElem)
+    {
+        try
+        {
+            /// <xsl:template match="@*|node()">
+            Element template = factory.createElementNS(xslNamespace, "xsl:template");
+            template.setAttributeNS(null, "match", "@*|node()");
+
+            /// <xsl:copy>
+            Element copyElem = factory.createElementNS(xslNamespace, "xsl:copy");
+
+            /// <xsl:apply-templates select="@*|node()"/>
+            Element applyTemplatesElem = factory.createElementNS(xslNamespace, "xsl:apply-templates");
+            applyTemplatesElem.setAttributeNS(null, "select", "@*|node()");
+
+            // Stick it all together with faked-up newlines for readability
+            copyElem.appendChild(factory.createTextNode("\n    "));
+            copyElem.appendChild(applyTemplatesElem);
+            copyElem.appendChild(factory.createTextNode("\n  "));
+
+            template.appendChild(factory.createTextNode("\n  "));
+            template.appendChild(copyElem);
+            template.appendChild(factory.createTextNode("\n"));
+
+
+            if (useOuterElem)
+            {
+                // If asked to, create and append top-level <stylesheet> elem
+                /// <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+                Element stylesheetElem = factory.createElementNS(xslNamespace, "xsl:stylesheet");
+                stylesheetElem.setAttributeNS(null, "version", "1.0");
+
+                // Following is not officially needed by the DOM,  but may help 
+                // less-sophisticated DOM readers downstream
+                // Removed due to DOM003 Namespace error
+                // stylesheetElem.setAttributeNS(nsNamespace, "xmlns:xsl", xslNamespace);
+                stylesheetElem.appendChild(template);
+                n.appendChild(stylesheetElem);
+            }
+            else
+            {
+                // Otherwise, just use their Node
+                n.appendChild(template);
+            }
+
+        }
+        catch (Exception e)
+        {
+            reporter.logErrorMsg("appendIdentityDOMXSL threw: " + e.toString());
+            reporter.logThrowable(Logger.ERRORMSG, e, "appendIdentityDOMXSL threw");
+        }
+    }    
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by ProgrammaticDOMTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + "REPLACE_any_new_test_arguments\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        ProgrammaticDOMTest app = new ProgrammaticDOMTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/SerializedStylesheetTest.java b/test/java/src/org/apache/qetest/xalanj2/SerializedStylesheetTest.java
new file mode 100644
index 0000000..428d0e9
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/SerializedStylesheetTest.java
@@ -0,0 +1,225 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * SerializedStylesheetTest.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Properties;
+
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Basic functional test of serialized Templates objects.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class SerializedStylesheetTest extends FileBasedTest
+{
+
+    /** Provides nextName(), currentName() functionality.  */
+    protected OutputNameManager outNames;
+
+    /** Simple identity.xml/xsl file pair.  */
+    protected XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+
+    /** Complex minitest.xml/xsl file pair.  */
+    protected XSLTestfileInfo minitestFileInfo = new XSLTestfileInfo();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String TRAX_SUBDIR = File.separator + "trax" + File.separator;
+
+    /** Just initialize test name, comment, numTestCases. */
+    public SerializedStylesheetTest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "SerializedStylesheetTest";
+        testComment = "Basic functional test of serialized Templates objects";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + TRAX_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + TRAX_SUBDIR
+                                         + testName, ".out");
+
+        testFileInfo.inputName = QetestUtils.filenameToURL(inputDir 
+                              + TRAX_SUBDIR + "identity.xsl");
+        testFileInfo.xmlName = QetestUtils.filenameToURL(inputDir
+                              + TRAX_SUBDIR + "identity.xml");
+        testFileInfo.goldName = goldDir + TRAX_SUBDIR + "identity.out";
+
+        minitestFileInfo.inputName = QetestUtils.filenameToURL(inputDir 
+                              + File.separator + "Minitest.xsl");
+        minitestFileInfo.xmlName = QetestUtils.filenameToURL(inputDir
+                              + File.separator + "Minitest.xml");
+        minitestFileInfo.goldName = goldDir + File.separator + "Minitest-xalanj2.out";
+
+        return true;
+    }
+
+
+    /**
+     * Basic functional test of serialized Templates objects.
+     * Reproduce Bugzilla 2005 by rob.stanley@geac.com
+     * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2005
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Basic functional test of serialized Templates objects");
+
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            // Create templates from normal stylesheet
+            Templates origTemplates = factory.newTemplates(new StreamSource(testFileInfo.inputName));
+
+            // Serialize the Templates to disk
+            reporter.logInfoMsg("About to serialize " + testFileInfo.inputName + " templates to: " + outNames.nextName());
+            FileOutputStream ostream = new FileOutputStream(outNames.currentName());
+            ObjectOutputStream oos = new java.io.ObjectOutputStream(ostream);
+            oos.writeObject(origTemplates);
+            oos.flush();
+            ostream.close();            
+            
+            // Read the Templates back in
+            reporter.logInfoMsg("About to read templates back");
+            FileInputStream istream = new FileInputStream(outNames.currentName());
+            ObjectInputStream ois = new ObjectInputStream(istream);
+            Templates templates = (Templates)ois.readObject();
+            istream.close();
+ 
+            // Use the Templates in a transform
+            reporter.logInfoMsg("About to call newTransformer");
+            Transformer transformer = templates.newTransformer();
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new StreamSource(testFileInfo.xmlName), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "Using serialized Templates, transform into " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with serialized Template");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with serialized Template");
+        }
+
+        try
+        {
+            reporter.logTraceMsg("Try again, using the Minitest (with imports/includes/etc.)");
+            TransformerFactory factory = TransformerFactory.newInstance();
+            // Create templates from normal stylesheet
+            Templates origTemplates = factory.newTemplates(new StreamSource(minitestFileInfo.inputName));
+
+            // Serialize the Templates to disk
+            reporter.logInfoMsg("About to serialize " + minitestFileInfo.inputName + " templates to: " + outNames.nextName());
+            FileOutputStream ostream = new FileOutputStream(outNames.currentName());
+            ObjectOutputStream oos = new java.io.ObjectOutputStream(ostream);
+            oos.writeObject(origTemplates);
+            oos.flush();
+            ostream.close();            
+            
+            // Read the Templates back in
+            reporter.logInfoMsg("About to read templates back");
+            FileInputStream istream = new FileInputStream(outNames.currentName());
+            ObjectInputStream ois = new ObjectInputStream(istream);
+            Templates templates = (Templates)ois.readObject();
+            istream.close();
+ 
+            // Use the Templates in a transform
+            reporter.logInfoMsg("About to call newTransformer");
+            Transformer transformer = templates.newTransformer();
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new StreamSource(minitestFileInfo.xmlName), new StreamResult(outNames.currentName()));
+            if (Logger.PASS_RESULT != 
+                fileChecker.check(reporter, 
+                        new File(outNames.currentName()), 
+                        new File(minitestFileInfo.goldName), 
+                        "Using serialized Templates, transform into " + outNames.currentName())
+               )
+                reporter.logStatusMsg("Using serialized Templates: failure reason:" + fileChecker.getExtendedInfo());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with serialized Minitest Template");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with serialized Minitest Template");
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by SerializedStylesheetTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        SerializedStylesheetTest app = new SerializedStylesheetTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/SmoketestOuttakes.java b/test/java/src/org/apache/qetest/xalanj2/SmoketestOuttakes.java
new file mode 100644
index 0000000..76de9fc
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/SmoketestOuttakes.java
@@ -0,0 +1,856 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * SmoketestOuttakes.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+// Support for test reporting and harness classes
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.trax.LoggingErrorListener;
+import org.apache.qetest.trax.LoggingURIResolver;
+import org.apache.qetest.xsl.LoggingSAXErrorHandler;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.serializer.OutputPropertiesFactory;
+import org.apache.xml.serializer.Serializer;
+import org.apache.xml.serializer.SerializerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Individual test points taken out of other automation files.  
+ * 
+ * Although as a quality engineer I'm not sure I really like this 
+ * idea, I'm temporarily moving test points with known and reported 
+ * fail conditions out of a number of other automated tests into 
+ * here.  In a distributed open source project like this, this 
+ * should make it easier for developers to run a reliable smoketest 
+ * before making any checkins (since the list of smoketest files 
+ * will generally be kept to tests that we expect should pass; thus 
+ * any fails when you run the smoketest when you run it are likely 
+ * due to recent changes you have made).
+ *
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class SmoketestOuttakes extends FileBasedTest
+{
+
+    /** Provides nextName(), currentName() functionality.  */
+    protected OutputNameManager outNames;
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public SmoketestOuttakes()
+    {
+        numTestCases = 6;  // REPLACE_num
+        testName = "SmoketestOuttakes";
+        testComment = "Individual test points taken out of other automation files";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + "trax");
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + "trax" + File.separator
+                                         + testName, ".out");
+
+        return true;
+    }
+
+
+    /**
+     * Recreate ExamplesTest.exampleContentHandlerToContentHandler.  
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Recreate ExamplesTest.exampleContentHandlerToContentHandler");
+
+        try
+        {
+        String xslID = inputDir 
+                              + File.separator 
+                              + "trax"
+                              + File.separator
+                              + "xsl"
+                              + File.separator
+                              + "foo.xsl";
+        String sourceID = inputDir 
+                              + File.separator 
+                              + "trax"
+                              + File.separator
+                              + "xml"
+                              + File.separator
+                              + "foo.xml";
+        String goldName = goldDir 
+                              + File.separator 
+                              + "trax"
+                              + File.separator
+                              + "ExamplesTest_7.out";
+
+        reporter.logTraceMsg("NOTE! This file is very sensitive to pathing issues!");
+        
+        TransformerFactory tfactory = TransformerFactory.newInstance();
+
+        // Does this factory support SAX features?
+        if (!tfactory.getFeature(SAXSource.FEATURE))
+        {
+            reporter.logErrorMsg("exampleContentHandlerToContentHandler:Processor does not support SAX");
+            return true;
+        }
+          // If so, we can safely cast.
+          SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory);
+          
+          // A TransformerHandler is a ContentHandler that will listen for 
+          // SAX events, and transform them to the result.
+          reporter.logTraceMsg("newTransformerHandler(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+          TransformerHandler handler 
+            = stfactory.newTransformerHandler(new StreamSource(QetestUtils.filenameToURL(xslID)));
+
+          // Set the result handling to be a serialization to the file output stream.
+          Serializer serializer = SerializerFactory.getSerializer
+            (OutputPropertiesFactory.getDefaultMethodProperties("xml"));
+          FileOutputStream fos = new FileOutputStream(outNames.nextName());
+          serializer.setOutputStream(fos);
+          reporter.logStatusMsg("Test-output-to: new FileOutputStream(" + outNames.currentName());
+          
+          Result result = new SAXResult(serializer.asContentHandler());
+
+          handler.setResult(result);
+          
+          // Create a reader, and set it's content handler to be the TransformerHandler.
+          XMLReader reader=null;
+
+          // Use JAXP1.1 ( if possible )
+          try {
+              javax.xml.parsers.SAXParserFactory factory=
+                  javax.xml.parsers.SAXParserFactory.newInstance();
+              factory.setNamespaceAware( true );
+              javax.xml.parsers.SAXParser jaxpParser=
+                  factory.newSAXParser();
+              reader=jaxpParser.getXMLReader();
+              
+          } catch( javax.xml.parsers.ParserConfigurationException ex ) {
+              throw new org.xml.sax.SAXException( ex );
+          } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) {
+              throw new org.xml.sax.SAXException( ex1.toString() );
+          } catch( NoSuchMethodError ex2 ) {
+          }
+          if( reader==null ) reader = getJAXPXMLReader();
+          reader.setContentHandler(handler);
+          
+          // It's a good idea for the parser to send lexical events.
+          // The TransformerHandler is also a LexicalHandler.
+          reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
+          
+          // Parse the source XML, and send the parse events to the TransformerHandler.
+          reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(sourceID));
+          reader.parse(QetestUtils.filenameToURL(sourceID));
+          fos.close();
+
+          reporter.logTraceMsg("Note: See SPR SCUU4RZT78 for discussion as to why this output is different than XMLReader/XMLFilter");
+        fileChecker.check(reporter, new File(outNames.currentName()),
+                          new File(goldName),                
+                          "exampleContentHandlerToContentHandler fileChecker of:" + outNames.currentName());
+        
+        
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with testCase1:");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with testCase1");
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+
+    /**
+     * Recreate ExamplesTest.exampleContentHandlerToContentHandler.  
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Recreate ExamplesTest.exampleContentHandlerToContentHandler");
+
+        String xslID = inputDir 
+                              + File.separator 
+                              + "trax"
+                              + File.separator
+                              + "xsl"
+                              + File.separator
+                              + "foo.xsl";
+        String sourceID = inputDir 
+                              + File.separator 
+                              + "trax"
+                              + File.separator
+                              + "xml"
+                              + File.separator
+                              + "foo.xml";
+        String goldName = goldDir 
+                              + File.separator 
+                              + "trax"
+                              + File.separator
+                              + "ExamplesTest_18.out";
+
+        try
+        {
+
+            TransformerFactory tfactory = TransformerFactory.newInstance();
+
+            // Make sure the transformer factory we obtained supports both
+            // DOM and SAX.
+            if (!(tfactory.getFeature(SAXSource.FEATURE)
+                && tfactory.getFeature(DOMSource.FEATURE)))
+            {
+                reporter.logErrorMsg("exampleContentHandler2DOM:Processor does not support SAX/DOM");
+                return true;
+            }
+              // We can now safely cast to a SAXTransformerFactory.
+              SAXTransformerFactory sfactory = (SAXTransformerFactory) tfactory;
+              
+              // Create an Document node as the root for the output.
+              DocumentBuilderFactory dfactory 
+                = DocumentBuilderFactory.newInstance();
+              DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+              org.w3c.dom.Document outNode = docBuilder.newDocument();
+              
+              // Create a ContentHandler that can liston to SAX events 
+              // and transform the output to DOM nodes.
+              reporter.logTraceMsg("newTransformerHandler(new StreamSource(" + QetestUtils.filenameToURL(xslID));
+              TransformerHandler handler 
+                = sfactory.newTransformerHandler(new StreamSource(QetestUtils.filenameToURL(xslID)));
+              handler.setResult(new DOMResult(outNode));
+              
+              // Create a reader and set it's ContentHandler to be the 
+              // transformer.
+              XMLReader reader=null;
+
+              // Use JAXP1.1 ( if possible )
+              try {
+                  javax.xml.parsers.SAXParserFactory factory=
+                      javax.xml.parsers.SAXParserFactory.newInstance();
+                  factory.setNamespaceAware( true );
+                  javax.xml.parsers.SAXParser jaxpParser=
+                      factory.newSAXParser();
+                  reader=jaxpParser.getXMLReader();
+                  
+              } catch( javax.xml.parsers.ParserConfigurationException ex ) {
+                  throw new org.xml.sax.SAXException( ex );
+              } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) {
+                  throw new org.xml.sax.SAXException( ex1.toString() );
+              } catch( NoSuchMethodError ex2 ) {
+              }
+              if( reader==null ) reader= getJAXPXMLReader();
+              reader.setContentHandler(handler);
+              reader.setProperty("http://xml.org/sax/properties/lexical-handler",
+                                 handler);
+              
+              // Send the SAX events from the parser to the transformer,
+              // and thus to the DOM tree.
+              reporter.logTraceMsg("reader.parse(" + QetestUtils.filenameToURL(sourceID));
+              reader.parse(QetestUtils.filenameToURL(sourceID));
+              
+              // Serialize the node for diagnosis.
+              //    This serializes to outNames.nextName()
+              exampleSerializeNode(outNode);
+
+            fileChecker.check(reporter, new File(outNames.currentName()),
+                              new File(goldName),                
+                              "exampleContentHandler2DOM fileChecker of:" + outNames.currentName());
+
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with testCase2:");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with testCase2");
+        }
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+    * Serialize a node to System.out; 
+    * used in ExamplesTest; testCase1, testCase2 above
+    */
+    public void exampleSerializeNode(Node node)
+        throws TransformerException, TransformerConfigurationException, 
+        SAXException, IOException, ParserConfigurationException
+    {
+        TransformerFactory tfactory = TransformerFactory.newInstance(); 
+
+        // This creates a transformer that does a simple identity transform, 
+        // and thus can be used for all intents and purposes as a serializer.
+        Transformer serializer = tfactory.newTransformer();
+
+        serializer.setOutputProperty(OutputKeys.INDENT, "yes");
+        serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+        serializer.transform(new DOMSource(node), 
+                             new StreamResult(outNames.nextName()));
+        reporter.logStatusMsg("Test-output-to: new StreamResult(" + outNames.currentName());
+        // TEST UPDATE - Caller must validate outNames.currentName()
+    }  
+
+
+    /**
+     * From ErrorListenerTest.java testCase2
+     * Build a bad stylesheet/do a transform with SAX.
+     * Verify that the ErrorListener is called properly.
+     * Primarily using SAXSources.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Build a bad stylesheet/do a transform with SAX");
+        XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+        testFileInfo.inputName = inputDir 
+                              + File.separator 
+                              + "err"
+                              + File.separator + "ErrorListenerTest.xsl";
+        testFileInfo.xmlName = inputDir 
+                              + File.separator 
+                              + "err"
+                              + File.separator + "ErrorListenerTest.xml";
+        testFileInfo.goldName = goldDir 
+                              + File.separator 
+                              + "err"
+                              + File.separator + "ErrorListenerTest.out";
+        int templatesExpectedType = LoggingErrorListener.TYPE_FATALERROR;
+        String templatesExpectedValue = "decimal-format names must be unique. Name \"myminus\" has been duplicated";
+        int transformExpectedType = LoggingErrorListener.TYPE_WARNING;
+        String transformExpectedValue = "ExpectedMessage from:list1";
+        
+        
+        LoggingErrorListener loggingErrorListener = new LoggingErrorListener(reporter);
+        loggingErrorListener.setThrowWhen(LoggingErrorListener.THROW_NEVER);
+        reporter.logTraceMsg("loggingErrorListener originally setup:" + loggingErrorListener.getQuickCounters());
+
+        TransformerFactory factory = null;
+        SAXTransformerFactory saxFactory = null;
+        XMLReader reader = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        TransformerHandler handler = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            saxFactory = (SAXTransformerFactory)factory; // assumes SAXSource.feature!
+
+            // Set the errorListener and validate it
+            saxFactory.setErrorListener(loggingErrorListener);
+            reporter.check((saxFactory.getErrorListener() == loggingErrorListener),
+                           true, "set/getErrorListener on saxFactory");
+
+            // Use the JAXP way to get an XMLReader
+            reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
+            InputSource is = new InputSource(QetestUtils.filenameToURL(testFileInfo.inputName));
+
+            // Attempt to build templates from known-bad stylesheet
+            // Validate known errors in stylesheet building 
+            loggingErrorListener.setExpected(templatesExpectedType, 
+                                             templatesExpectedValue);
+            reporter.logTraceMsg("About to factory.newTransformerHandler(SAX:" + QetestUtils.filenameToURL(testFileInfo.inputName) + ")");
+            handler = saxFactory.newTransformerHandler(new SAXSource(is));
+            reporter.logTraceMsg("loggingErrorListener after newTransformerHandler:" + loggingErrorListener.getQuickCounters());
+            // Clear out any setExpected or counters
+            loggingErrorListener.reset();
+            reporter.checkPass("set ErrorListener prevented any exceptions in newTransformerHandler()");
+
+            // This stylesheet will still work, even though errors 
+            //  were detected during it's building.  Note that 
+            //  future versions of Xalan or other processors may 
+            //  not be able to continue here...
+
+            // Create a result and setup SAX parsing 'tree'
+            Result result = new StreamResult(outNames.nextName());
+            handler.setResult(result);
+            reader.setContentHandler(handler);
+
+            LoggingSAXErrorHandler loggingSAXErrorHandler = new LoggingSAXErrorHandler(reporter);
+            loggingSAXErrorHandler.setThrowWhen(LoggingSAXErrorHandler.THROW_NEVER);
+            reporter.logTraceMsg("LoggingSAXErrorHandler originally setup:" + loggingSAXErrorHandler.getQuickCounters());
+            reader.setErrorHandler(loggingSAXErrorHandler);
+            
+            // Validate the first xsl:message call in the stylesheet
+            loggingErrorListener.setExpected(transformExpectedType, 
+                                             transformExpectedValue);
+            reporter.logInfoMsg("about to parse/transform(" + QetestUtils.filenameToURL(testFileInfo.xmlName) + ")");
+            reader.parse(QetestUtils.filenameToURL(testFileInfo.xmlName));
+            reporter.logTraceMsg("LoggingSAXErrorHandler after parse:" + loggingSAXErrorHandler.getQuickCounters());
+            // Clear out any setExpected or counters
+            loggingErrorListener.reset();
+            loggingSAXErrorHandler.reset();
+
+            // Validate the actual output file as well: in this case, 
+            //  the stylesheet should still work
+            fileChecker.check(reporter, 
+                    new File(outNames.currentName()), 
+                    new File(testFileInfo.goldName), 
+                    "Bugzilla#4044 SAX transform of error xsl into: " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("errorListener-SAX unexpectedly threw: " + t.toString());
+            reporter.logThrowable(Logger.ERRORMSG, t, "errorListener-SAX unexpectedly threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * From ErrorListenerTest.java testCase3
+     * Build a bad stylesheet/do a transform with DOMs.
+     * Verify that the ErrorListener is called properly.
+     * Primarily using DOMSources.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase4()
+    {
+        reporter.testCaseInit("Build a bad stylesheet/do a transform with DOMs");
+        XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+        testFileInfo.inputName = inputDir 
+                              + File.separator 
+                              + "err"
+                              + File.separator + "ErrorListenerTest.xsl";
+        testFileInfo.xmlName = inputDir 
+                              + File.separator 
+                              + "err"
+                              + File.separator + "ErrorListenerTest.xml";
+        testFileInfo.goldName = goldDir 
+                              + File.separator 
+                              + "err"
+                              + File.separator + "ErrorListenerTest.out";
+        int templatesExpectedType = LoggingErrorListener.TYPE_FATALERROR;
+        String templatesExpectedValue = "decimal-format names must be unique. Name \"myminus\" has been duplicated";
+        int transformExpectedType = LoggingErrorListener.TYPE_WARNING;
+        String transformExpectedValue = "ExpectedMessage from:list1";
+
+        LoggingErrorListener loggingErrorListener = new LoggingErrorListener(reporter);
+        loggingErrorListener.setThrowWhen(LoggingErrorListener.THROW_NEVER);
+        reporter.logTraceMsg("loggingErrorListener originally setup:" + loggingErrorListener.getQuickCounters());
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        DocumentBuilderFactory dfactory = null;
+        DocumentBuilder docBuilder = null;
+        Node xmlNode = null;
+        Node xslNode = null;
+        try
+        {
+            // Startup a DOM factory, create some nodes/DOMs
+            dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            docBuilder = dfactory.newDocumentBuilder();
+            reporter.logInfoMsg("parsing xml, xsl files to DOMs");
+            xslNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            xmlNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(testFileInfo.xmlName)));
+
+            // Create a transformer factory with an error listener
+            factory = TransformerFactory.newInstance();
+            factory.setErrorListener(loggingErrorListener);
+
+            // Attempt to build templates from known-bad stylesheet
+            // Validate known errors in stylesheet building 
+            loggingErrorListener.setExpected(templatesExpectedType, 
+                                             templatesExpectedValue);
+            reporter.logTraceMsg("About to factory.newTemplates(DOM:" + QetestUtils.filenameToURL(testFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new DOMSource(xslNode));
+            reporter.logTraceMsg("loggingErrorListener after newTemplates:" + loggingErrorListener.getQuickCounters());
+            // Clear out any setExpected or counters
+            loggingErrorListener.reset();
+            reporter.checkPass("set ErrorListener prevented any exceptions in newTemplates()");
+
+            // This stylesheet will still work, even though errors 
+            //  were detected during it's building.  Note that 
+            //  future versions of Xalan or other processors may 
+            //  not be able to continue here...
+            reporter.logErrorMsg("Bugzilla#1062 throws NPE below at templates.newTransformer()");
+            transformer = templates.newTransformer();
+
+            reporter.logTraceMsg("default transformer's getErrorListener is: " + transformer.getErrorListener());
+            // Set the errorListener and validate it
+            transformer.setErrorListener(loggingErrorListener);
+            reporter.check((transformer.getErrorListener() == loggingErrorListener),
+                           true, "set/getErrorListener on transformer");
+
+            // Validate the first xsl:message call in the stylesheet
+            loggingErrorListener.setExpected(transformExpectedType, 
+                                             transformExpectedValue);
+            reporter.logInfoMsg("about to transform(DOM, StreamResult)");
+            transformer.transform(new DOMSource(xmlNode), 
+                                  new StreamResult(outNames.nextName()));
+            reporter.logTraceMsg("after transform(...)");
+            // Clear out any setExpected or counters
+            loggingErrorListener.reset();
+
+            // Validate the actual output file as well: in this case, 
+            //  the stylesheet should still work
+            fileChecker.check(reporter, 
+                    new File(outNames.currentName()), 
+                    new File(testFileInfo.goldName), 
+                    "DOM transform of error xsl into: " + outNames.currentName());
+            
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("errorListener-DOM unexpectedly threw: " + t.toString());
+            reporter.logThrowable(Logger.ERRORMSG, t, "errorListener-DOM unexpectedly threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * From URIResolverTest.java testCase1
+     * Build a stylesheet/do a transform with lots of URIs to resolve.
+     * Verify that the URIResolver is called properly.
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase5()
+    {
+        reporter.testCaseInit("Build a stylesheet/do a transform with lots of URIs to resolve");
+
+        XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+        testFileInfo.inputName = inputDir + File.separator + "trax" + File.separator + "URIResolverTest.xsl";
+        testFileInfo.xmlName = inputDir + File.separator + "trax" + File.separator + "URIResolverTest.xml";
+        testFileInfo.goldName = goldDir + File.separator + "trax" + File.separator + "URIResolverTest.out";
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            // Set the URIResolver and validate it
+            reporter.logInfoMsg("About to factory.newTemplates(" + QetestUtils.filenameToURL(testFileInfo.inputName) + ")");
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+            transformer = templates.newTransformer();
+
+            // Set the URIResolver and validate it
+            LoggingURIResolver loggingURIResolver = new LoggingURIResolver((Logger)reporter);
+            reporter.logTraceMsg("loggingURIResolver originally setup:" + loggingURIResolver.getQuickCounters());
+            transformer.setURIResolver(loggingURIResolver);
+            reporter.check((transformer.getURIResolver() == loggingURIResolver),
+                           true, "set/getURIResolver on transformer"); 
+
+            // Validate various URI's to be resolved during transform
+            //  time with the loggingURIResolver
+            reporter.logWarningMsg("Bugzilla#2425 every document() call is resolved twice twice - two fails caused below");
+            String[] expectedXmlUris = 
+            {
+                "{" + QetestUtils.filenameToURL(testFileInfo.inputName) + "}" + "../impincl/SystemIdImport.xsl",
+                "{" + QetestUtils.filenameToURL(testFileInfo.inputName) + "}" + "impincl/SystemIdImport.xsl",
+                "{" + QetestUtils.filenameToURL(testFileInfo.inputName) + "}" + "systemid/impincl/SystemIdImport.xsl",
+            };
+            loggingURIResolver.setExpected(expectedXmlUris);
+            reporter.logTraceMsg("about to transform(...)");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(testFileInfo.xmlName)), 
+                                  new StreamResult(outNames.nextName()));
+            reporter.logTraceMsg("after transform(...)");
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("URIResolver test unexpectedly threw: " + t.toString());
+            reporter.logThrowable(Logger.ERRORMSG, t, "URIResolver test unexpectedly threw");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+       public static final String xslNamespace = "http://www.w3.org/1999/XSL/Transform";
+      public static final String nsNamespace = "http://www.w3.org/XML/1998/namespace";
+    /**
+     * From ProgrammaticDOMTest.java testCase2 Bugzilla#5133
+     * Build a stylesheet DOM programmatically and use it.
+     * 
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase6()
+    {
+        reporter.testCaseInit("Build a stylesheet DOM programmatically and use it");
+
+        XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+        testFileInfo.inputName = inputDir + File.separator + "trax" + File.separator + "identity.xsl";
+        testFileInfo.xmlName = inputDir + File.separator + "trax" + File.separator + "identity.xml";
+        testFileInfo.goldName = goldDir + File.separator + "trax" + File.separator + "identity.out";
+        try
+        {
+            // Startup a factory and docbuilder, create some nodes/DOMs
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+            reporter.logTraceMsg("parsing xml file");
+            Document xmlDoc = docBuilder.parse(new InputSource(testFileInfo.xmlName));
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = null;
+ 
+            // Programmatically build the XSL file into a Document and transform
+            Document xslBuiltDoc = docBuilder.newDocument();
+            appendIdentityDOMXSL(xslBuiltDoc, xslBuiltDoc, true);
+            // For debugging, write the generated stylesheet out
+            //  Note this will not textually exactly match the identity.xsl file
+            reporter.logInfoMsg("Writing out xslBuiltDoc to "+ outNames.nextName());
+            transformer = factory.newTransformer();
+            transformer.transform(new DOMSource(xslBuiltDoc), new StreamResult(outNames.currentName()));
+
+            reporter.logInfoMsg("About to newTransformer(xslBuiltDoc)");
+            transformer = factory.newTransformer(new DOMSource(xslBuiltDoc));
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xslBuiltDoc,...) into " + outNames.currentName());
+
+
+            // Programmatically build the XSL file into a DocFrag and transform
+            xslBuiltDoc = docBuilder.newDocument();
+            DocumentFragment xslBuiltDocFrag = xslBuiltDoc.createDocumentFragment();
+            appendIdentityDOMXSL(xslBuiltDocFrag, xslBuiltDoc, true);
+            // For debugging, write the generated stylesheet out
+            reporter.logInfoMsg("Writing out xslBuiltDocFrag to "+ outNames.nextName());
+            transformer = factory.newTransformer();
+            transformer.transform(new DOMSource(xslBuiltDocFrag), new StreamResult(outNames.currentName()));
+
+            reporter.logCriticalMsg("//@todo Verify that this is even a valid operation!");
+            reporter.logInfoMsg("About to newTransformer(xslBuiltDocFrag)");
+            reporter.logCriticalMsg("Bugzilla#5133: will throw NPE");
+            transformer = factory.newTransformer(new DOMSource(xslBuiltDocFrag));
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xslBuiltDocFrag,...) into " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with various XSL1 elems/documents");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with various XSL1 elems/documents");
+        }
+        try
+        {
+            // Startup a factory and docbuilder, create some nodes/DOMs
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+            reporter.logTraceMsg("parsing xml file");
+            Document xmlDoc = docBuilder.parse(new InputSource(testFileInfo.xmlName));
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = null;
+
+            // Programmatically build the XSL file into an Element and transform
+            Document xslBuiltDoc = docBuilder.newDocument();
+            // Note: Here, we implicitly already have the outer list 
+            //  element, so ensure the worker method doesn't add again
+            reporter.logCriticalMsg("Bugzilla#5133: will throw DOM003 exception");
+            Element xslBuiltElem = xslBuiltDoc.createElementNS(xslNamespace, "xsl:stylesheet");
+            xslBuiltElem.setAttributeNS(null, "version", "1.0");
+            appendIdentityDOMXSL(xslBuiltElem, xslBuiltDoc, false);
+            // For debugging, write the generated stylesheet out
+            reporter.logInfoMsg("Writing out xslBuiltElem to "+ outNames.nextName());
+            transformer = factory.newTransformer();
+            transformer.transform(new DOMSource(xslBuiltElem), new StreamResult(outNames.currentName()));
+
+            reporter.logCriticalMsg("//@todo Verify that this is even a valid operation!");
+            reporter.logInfoMsg("About to newTransformer(xslBuiltElem)");
+            transformer = factory.newTransformer(new DOMSource(xslBuiltElem));
+            reporter.logInfoMsg("About to transform(xmlDoc, StreamResult(" + outNames.nextName() + "))");
+            transformer.transform(new DOMSource(xmlDoc), new StreamResult(outNames.currentName()));
+            fileChecker.check(reporter, 
+                              new File(outNames.currentName()), 
+                              new File(testFileInfo.goldName), 
+                              "transform(xslBuiltElem,...) into " + outNames.currentName());
+        }
+        catch (Throwable t)
+        {
+            reporter.checkFail("Problem with various XSL2 elems/documents");
+            reporter.logThrowable(reporter.ERRORMSG, t, "Problem with various XSL2 elems/documents");
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Adds identity.xsl elems to Node passed in.  
+     * Subject to change; hackish for now
+     * @author curcuru
+     * @param n Node to append DOM elems to
+     * @param factory Document providing createElement, etc. services
+     * @param useOuterElem if we should append the top-level <stylesheet> elem
+     */
+    public void appendIdentityDOMXSL(Node n, Document factory, boolean useOuterElem)
+    {
+        try
+        {
+            /// <xsl:template match="@*|node()">
+            Element template = factory.createElementNS(xslNamespace, "xsl:template");
+            template.setAttributeNS(null, "match", "@*|node()");
+
+            /// <xsl:copy>
+            Element copyElem = factory.createElementNS(xslNamespace, "xsl:copy");
+
+            /// <xsl:apply-templates select="@*|node()"/>
+            Element applyTemplatesElem = factory.createElementNS(xslNamespace, "xsl:apply-templates");
+            applyTemplatesElem.setAttributeNS(null, "select", "@*|node()");
+
+            // Stick it all together with faked-up newlines for readability
+            copyElem.appendChild(factory.createTextNode("\n    "));
+            copyElem.appendChild(applyTemplatesElem);
+            copyElem.appendChild(factory.createTextNode("\n  "));
+
+            template.appendChild(factory.createTextNode("\n  "));
+            template.appendChild(copyElem);
+            template.appendChild(factory.createTextNode("\n"));
+
+
+            if (useOuterElem)
+            {
+                // If asked to, create and append top-level <stylesheet> elem
+                /// <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+                Element stylesheetElem = factory.createElementNS(xslNamespace, "xsl:stylesheet");
+                stylesheetElem.setAttributeNS(null, "version", "1.0");
+
+                // Following is not officially needed by the DOM,  but may help 
+                // less-sophisticated DOM readers downstream
+                // Removed due to DOM003 Namespace error
+                // stylesheetElem.setAttributeNS(nsNamespace, "xmlns:xsl", xslNamespace);
+                stylesheetElem.appendChild(template);
+                n.appendChild(stylesheetElem);
+            }
+            else
+            {
+                // Otherwise, just use their Node
+                n.appendChild(template);
+            }
+
+        }
+        catch (Exception e)
+        {
+            reporter.logErrorMsg("appendIdentityDOMXSL threw: " + e.toString());
+            reporter.logThrowable(Logger.ERRORMSG, e, "appendIdentityDOMXSL threw");
+        }
+    }    
+
+    /**
+     * Worker method to get an XMLReader.
+     *
+     * Not the most efficient of methods, but makes the code simpler.
+     *
+     * @return a new XMLReader for use, with setNamespaceAware(true)
+     */
+    protected XMLReader getJAXPXMLReader()
+            throws Exception
+    {
+        // Be sure to use the JAXP methods only!
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        SAXParser saxParser = factory.newSAXParser();
+        return saxParser.getXMLReader();
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by SmoketestOuttakes:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        SmoketestOuttakes app = new SmoketestOuttakes();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/SystemIDResolverAPITest.java b/test/java/src/org/apache/qetest/xalanj2/SystemIDResolverAPITest.java
new file mode 100644
index 0000000..f4b9d96
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/SystemIDResolverAPITest.java
@@ -0,0 +1,182 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xalanj2;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.xml.utils.SystemIDResolver;
+import java.nio.file.Paths;
+
+/**
+ * Functionality/system/integration tests for SystemIDResolver.
+ *
+ * Very simple coverage test.
+ * 
+ * @author shane_curcuru@us.ibm.com,
+ *         Joe Kesselman  
+ * @version $Id$
+ */
+public class SystemIDResolverAPITest extends FileBasedTest
+{
+    /** Just initialize test name, comment, numTestCases. */
+    public SystemIDResolverAPITest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "SystemIDResolverAPITest";
+        testComment = "Functionality/system/integration tests for SystemIDResolver";
+    }
+
+    /** Separator for hierarchical URLs /.  */
+    private static final char URL_SEP = '/';
+
+    /** Default file:// scheme header.  */
+    private static final String FILE_SCHEME = "file://";
+
+    /** 
+     * Test strings and expected data for getAbsoluteURIFromRelative(String uri).  
+     * NOTE: We really need a more definitive and thorough set of 
+     * test strings: this requires really reading a number of RFC's...
+     */
+    protected static String[][] ABS_URI_FROM_REL = 
+    { /* Assumption: test prepends expected user.dir stuff */
+        { "foo.out", "foo.out" },
+        { "bar/foo.out", "bar/foo.out" },
+        { "bar\\foo.out", "bar/foo.out" },
+        { "foo.out", "foo.out" }
+    };
+
+    /** Test strings and expected data for getAbsoluteURI(String url) 
+     * assuming they're relative paths from a baseURL of file:///'user.dir'.  
+     * NOTE: We really need a more definitive and thorough set of 
+     * test strings: this requires really reading a number of RFC's...
+     */
+    protected static String[][] ABS_URI_REL = 
+    { /* Assumption: test prepends expected user.dir stuff */
+        { "foo.out", "foo.out" },
+        { "bar/foo.out", "bar/foo.out" },
+        { "bar\\foo.out", "bar/foo.out" },
+        { "foo.out", "foo.out" }
+    };
+
+    /** Test strings and expected data for getAbsoluteURI(String url) 
+     * assuming they're absolute paths with their own scheme:.  
+     * NOTE: We really need a more definitive and thorough set of 
+     * test strings: this requires really reading a number of RFC's...
+     */
+    protected static String[][] ABS_URI_ABS = 
+    {
+        { "http://server.com/foo.out", "http://server.com/foo.out" },
+        { "http://server.com/bar/foo.out", "http://server.com/bar/foo.out" },
+        { "http://server.com/bar/foo.out#fragment", "http://server.com/bar/foo.out#fragment" },
+        { "http://server.com/bar/foo/?param=value&name=value", "http://server.com/bar/foo/?param=value&name=value" }, 
+        { "http://127.0.0.1/bar/foo.out#fragment", "http://127.0.0.1/bar/foo.out#fragment" },
+        { "file://server.com/bar/foo.out", "file://server.com/bar/foo.out" }
+    };
+
+    /** Test strings and expected data for getAbsoluteURI(String urlString, String base).  */
+    protected static String[][] ABS_URI_WITH_BASE = 
+    { /*  "urlString", "base", "expected result" */
+        { "foo.out", "file:///bar", "file:///foo.out" }, /* Note that trailing /bar is dropped since it's effectively a file reference */
+        { "foo.out", "file:///bar/", "file:///bar/foo.out" },
+        { "foo.out", "http://server.com/bar", "http://server.com/foo.out" },
+        { "foo.out", "http://server.com/bar/", "http://server.com/bar/foo.out" },
+        { "../foo.out", "http://server.com/bar/", "http://server.com/foo.out" }
+    };
+
+
+    /**
+     * Using our data set of URLs, try various resolver calls.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Using our data set of URLs, try various resolver calls");
+
+        try
+        {
+            String prevUserDir = System.getProperty("user.dir");
+            String baseURL = ((Paths.get(prevUserDir)).toUri()).toString();
+
+            reporter.logStatusMsg("user.dir baseURI is: " + baseURL);
+
+            reporter.logTraceMsg("Now testing getAbsoluteURIFromRelative...");
+            for (int i = 0; i < ABS_URI_FROM_REL.length; i++)
+            {
+                String val = SystemIDResolver.getAbsoluteURIFromRelative(ABS_URI_FROM_REL[i][0]);
+                // Automatically prepend the baseURI to expected data
+                reporter.check(val, baseURL + ABS_URI_FROM_REL[i][1], "getAbsoluteURIFromRelative(" + ABS_URI_FROM_REL[i][0] + ") = " + val);
+            }
+
+            reporter.logTraceMsg("Now testing getAbsoluteURI with relative paths and default baseURL");
+            for (int i = 0; i < ABS_URI_REL.length; i++)
+            {
+                String val = SystemIDResolver.getAbsoluteURI(ABS_URI_REL[i][0]);
+                // Automatically prepend the baseURI to expected data
+                reporter.check(val, baseURL + ABS_URI_REL[i][1], "getAbsoluteURI(" + ABS_URI_REL[i][0] + ") = " + val);
+            }
+
+            reporter.logTraceMsg("Now testing getAbsoluteURI with absolute paths");
+            for (int i = 0; i < ABS_URI_ABS.length; i++)
+            {
+                String val = SystemIDResolver.getAbsoluteURI(ABS_URI_ABS[i][0]);
+                reporter.check(val, ABS_URI_ABS[i][1], "getAbsoluteURI(" + ABS_URI_ABS[i][0] + ") = " + val);
+            }
+
+            reporter.logTraceMsg("Now testing getAbsoluteURI with a user-supplied baseURL");
+            for (int i = 0; i < ABS_URI_WITH_BASE.length; i++)
+            {
+                String val = SystemIDResolver.getAbsoluteURI(ABS_URI_WITH_BASE[i][0], ABS_URI_WITH_BASE[i][1]);
+                reporter.check(val, ABS_URI_WITH_BASE[i][2], "getAbsoluteURI(" + ABS_URI_WITH_BASE[i][0]
+                        + ", " + ABS_URI_WITH_BASE[i][1] + ") = " + val);
+            }
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(reporter.ERRORMSG, t, "testCase1 threw");
+            reporter.checkFail("testCase1 threw: " + t.toString());
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by SystemIDResolverAPITest:\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        SystemIDResolverAPITest app = new SystemIDResolverAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/TestXPathAPI.java b/test/java/src/org/apache/qetest/xalanj2/TestXPathAPI.java
new file mode 100644
index 0000000..ff9bd85
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/TestXPathAPI.java
@@ -0,0 +1,462 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+// This file uses 2 space indents, no tabs.
+
+/*
+ *
+ * TestXPathAPI.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.XSLTestfileInfo;
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMIterator;
+import org.apache.xml.dtm.DTMManager;
+import org.apache.xml.utils.PrefixResolverDefault;
+import org.apache.xpath.XPathAPI;
+import org.apache.xpath.objects.XObject;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.traversal.NodeIterator;
+import org.xml.sax.InputSource;
+
+/**
+ * Basic functionality test of the public XPathAPI methods.
+ * 
+ * Very basic coverage/smoketest level test.
+ * Applies a number of XPaths to some sample documents 
+ * and checks output from the various public XPathAPI mehods.
+ * @see XPathAPI
+ * @author myriam_midy@lotus.com
+ * @author shane_curcuru@lotus.com
+ */
+public class TestXPathAPI extends FileBasedTest
+{
+  /** Array of sample XPaths to test.  */
+  protected String[] xpath;
+  
+  /** Base path/name of all output files.  */
+  protected String baseOutName = null;
+
+  protected XSLTestfileInfo testFileInfo1 = new XSLTestfileInfo();
+  protected XSLTestfileInfo testFileInfo2 = new XSLTestfileInfo();
+  protected XSLTestfileInfo testFileInfo3 = new XSLTestfileInfo();
+  protected XSLTestfileInfo testFileInfo4 = new XSLTestfileInfo();
+  protected XSLTestfileInfo testFileInfo5 = new XSLTestfileInfo();
+  protected XSLTestfileInfo testFileInfo6 = new XSLTestfileInfo();
+  protected XSLTestfileInfo testFileInfo7 = new XSLTestfileInfo();
+
+
+  /** Provides nextName(), currentName() functionality.  */
+  protected OutputNameManager outNames; 
+
+  /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String X2J_SUBDIR = "xalanj2";
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TestXPathAPI()
+    {
+        numTestCases = 7;  // REPLACE_num
+        testName = "TestXPathAPI";
+        testComment = "API coverage testing of XPathAPI";
+    }
+    
+    /**
+     * Initialize this test - Set names of xml/xsl test files etc.  
+     * Also initializes an array of sample xpaths to test.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + X2J_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Output name manager initialized in each testCase
+        baseOutName = outputDir + File.separator + X2J_SUBDIR + File.separator + testName;
+       
+        String testBasePath = inputDir 
+                              + File.separator 
+                              + X2J_SUBDIR
+                              + File.separator;
+        String goldBasePath = goldDir 
+                              + File.separator 
+                              + X2J_SUBDIR
+                              + File.separator;
+
+        // Gold names are appended onto for each test
+        testFileInfo1.xmlName = testBasePath + "testXPath.xml";
+        testFileInfo1.goldName = goldBasePath;
+
+        testFileInfo2.xmlName = testBasePath + "testXPath.xml";
+        testFileInfo2.goldName = goldBasePath;
+
+        testFileInfo3.xmlName = testBasePath + "testXPath.xml";
+        testFileInfo3.goldName = goldBasePath;
+
+        testFileInfo4.xmlName = testBasePath + "testXPath.xml";
+        testFileInfo4.goldName = goldBasePath;
+        
+        testFileInfo5.xmlName = testBasePath + "testXPath.xml";
+        testFileInfo5.goldName = goldBasePath;
+        
+        testFileInfo6.xmlName = testBasePath + "testXPath2.xml";
+        testFileInfo6.goldName = goldBasePath;
+        
+        testFileInfo7.xmlName = testBasePath + "testXPath3.xml";
+        testFileInfo7.goldName = goldBasePath;
+        
+        // Initialize xpath test data
+        // Note: when adding new xpaths, update array ctor and 
+        //  also need to update each testCase's gold files
+        xpath = new String[25];
+        xpath[0] = "/doc/a/@test";
+        xpath[1] = "//."; 
+        xpath[2] = "/doc"; 
+        xpath[3] = "/doc/a"; 
+        xpath[4] = "//@*";
+        xpath[5] = ".";
+        xpath[6] = "//ancestor-or-self::*";
+        xpath[7] = "./child::*[1]";
+        xpath[8] = "//descendant-or-self::*/@*[1]";
+        xpath[9] = "//@* | * | node()";
+        xpath[10] = "//*";
+        xpath[11] = "/doc/namespace::*";
+        xpath[12] = "//descendant::comment()";        
+        xpath[13] = "//*[local-name()='a']";
+        xpath[14] = "//*[current()]/@*";
+        xpath[15] = "//*[last()]";
+        xpath[16] = "doc/*[last()]";
+        xpath[17] = "/doc/a/*[current()]/@*";
+        xpath[18] = "doc/descendant::node()";
+        xpath[19] = "doc/a/@*";
+        xpath[20] = "doc/b/a/ancestor-or-self::*";
+        xpath[21] = "doc/b/a/preceding::*";
+        xpath[22] = "doc/a/following::*";
+        xpath[23] = "/doc/b/preceding-sibling::*";
+        xpath[24] = "/doc/a/following-sibling::*";
+               
+        return true;
+    }
+
+
+  
+  /** Quick test of XPathAPI.selectNodeIterator().  */
+  public boolean testCase1()
+    throws Exception
+  {        
+    reporter.testCaseInit("Quick test of XPathAPI.selectNodeIterator()");
+    outNames = new OutputNameManager(baseOutName + reporter.getCurrentCaseNum(), ".out");
+    
+    Document doc = parseToDOM(testFileInfo1.xmlName);
+    Transformer serializer = getSerializer();
+    
+    for (int i=0;i<xpath.length; i++) 
+    {
+      // Use the simple XPath API to select a nodeIterator.
+      NodeIterator nl = XPathAPI.selectNodeIterator(doc, xpath[i]);
+      
+      Node n;
+      while ((n = nl.nextNode())!= null)
+      { 
+        serializer.transform(new DOMSource(n), new StreamResult(outNames.nextName()));
+        File f = new File(outNames.currentName()); 
+        fileChecker.check(reporter, 
+                           f, 
+                           new File(testFileInfo1.goldName + f.getName()), 
+                          "selectNodeIterator() of "+xpath[i] + " into " + outNames.currentName());
+      }
+    } // of for...
+    reporter.testCaseClose();
+    return true;
+  }
+  
+  /** Quick test of XPathAPI.selectNodeList().  */
+  public boolean testCase2()
+    throws Exception
+  {        
+    reporter.testCaseInit("Quick test of XPathAPI.selectNodeList()");
+    outNames = new OutputNameManager(baseOutName + reporter.getCurrentCaseNum(), ".out");
+
+    // Note: parsed file and gold file don't match - why? 10-Oct-01 -sc
+    Document doc = parseToDOM(testFileInfo1.xmlName);
+    Transformer serializer = getSerializer();
+
+    for (int i=0;i<xpath.length; i++) 
+    {
+      NodeList nl = XPathAPI.selectNodeList(doc, xpath[i]);
+      
+      Node n;
+      int j = 0;
+      while (j < nl.getLength())
+      {        
+        n = nl.item(j++);
+        serializer.transform(new DOMSource(n), new StreamResult(outNames.nextName()));
+        File f = new File(outNames.currentName()); 
+        fileChecker.check(reporter, 
+                          f, 
+                          new File(testFileInfo2.goldName + f.getName()), 
+                          "selectNodeList() of "+xpath[i] + " into " + outNames.currentName());
+      }
+    } // of for...
+    reporter.testCaseClose();
+    return true;
+  }
+  
+  /** Quick test of XPathAPI.selectSingleNode().  */
+  public boolean testCase3()
+    throws Exception
+  {        
+    reporter.testCaseInit("Quick test of XPathAPI.selectSingleNode()");
+    outNames = new OutputNameManager(baseOutName + reporter.getCurrentCaseNum(), ".out");
+
+    // Note: parsed file and gold file don't match - why? 10-Oct-01 -sc
+    Document doc = parseToDOM(testFileInfo1.xmlName);
+    Transformer serializer = getSerializer();
+    
+    for (int i=0;i<xpath.length; i++) 
+    {
+      Node n = XPathAPI.selectSingleNode(doc, xpath[i]);
+      
+      if (n != null)
+      {
+        serializer.transform(new DOMSource(n), new StreamResult(outNames.nextName()));
+        File f = new File(outNames.currentName()); 
+        fileChecker.check(reporter, 
+                           f, 
+                           new File(testFileInfo3.goldName + f.getName()), 
+                          "selectSingleNode() of "+xpath[i] + " into " + outNames.currentName());
+      }
+      else
+      {
+        reporter.logWarningMsg("No node found with selectSingleNode() of "+xpath[i]);
+      }
+    } // of for...
+    reporter.testCaseClose();
+    return true;
+  }
+  
+  
+  /** Quick test of XPathAPI.eval().  */
+  public boolean testCase4()
+    throws Exception
+  {        
+    reporter.testCaseInit("Quick test of XPathAPI.eval()");
+    outNames = new OutputNameManager(baseOutName + reporter.getCurrentCaseNum(), ".out");
+
+    // Note: parsed file and gold file don't match - why? 10-Oct-01 -sc
+    Document doc = parseToDOM(testFileInfo1.xmlName);
+    Transformer serializer = getSerializer();
+    
+    //Document d1 =(Document) doc.getDocumentElement();
+    // Node d = (doc.getNodeType() == Node.DOCUMENT_NODE)
+    // ? (Document) doc.getDocumentElement() : doc;
+    reporter.logInfoMsg("Creating a PrefixResolverDefault(...)");
+    PrefixResolverDefault prefixResolver = 
+               new PrefixResolverDefault(doc.getDocumentElement());
+
+    for (int i=0;i<xpath.length; i++) 
+    {
+      XObject list = XPathAPI.eval(doc, xpath[i], prefixResolver);
+      
+      int n;
+      DTMIterator nl = list.iter();
+      DTMManager dtmManager = nl.getDTMManager();
+      while ((n = nl.nextNode())!= DTM.NULL)
+      { 
+        Node node = dtmManager.getDTM(n).getNode(n);
+        serializer.transform(new DOMSource(node), new StreamResult(outNames.nextName()));
+        File f = new File(outNames.currentName()); 
+        fileChecker.check(reporter, 
+                           f, 
+                           new File(testFileInfo4.goldName + f.getName()), 
+                          "eval() of "+xpath[i] + " into " + outNames.currentName());
+      }
+    } // of for...
+    reporter.testCaseClose();
+    return true;
+  }
+  
+  /** Quick test of XPathAPI.selectNodeList() and doc.getFirstChild().  */
+  public boolean testCase5()
+    throws Exception
+  {        
+    reporter.testCaseInit("Quick test of XPathAPI.selectNodeList() and doc.getFirstChild()");
+    outNames = new OutputNameManager(baseOutName + reporter.getCurrentCaseNum(), ".out");
+
+    Document doc = parseToDOM(testFileInfo5.xmlName);
+    Transformer serializer = getSerializer();
+    
+    // Use the simple XPath API to select a nodeIterator.
+    reporter.logStatusMsg("Querying DOM using selectNodeList(doc.getFirstChild(), 'a')");
+    NodeList nl = XPathAPI.selectNodeList(doc.getFirstChild(), "a");
+    
+    Node n;
+    int j = 0;
+    while (j < nl.getLength())
+    {        
+      n = nl.item(j++);
+      serializer.transform(new DOMSource(n), new StreamResult(outNames.nextName()));
+      File f = new File(outNames.currentName()); 
+      fileChecker.check(reporter, 
+                        f, 
+                        new File(testFileInfo5.goldName + f.getName()), 
+                        "selectNodeList(doc.getFirstChild(), 'a') into " + outNames.currentName());
+    }
+    reporter.testCaseClose();
+    return true;
+  }
+  
+  /** Quick test of XPathAPI.selectNodeIterator() and non-document node.  */
+  public boolean testCase6()
+    throws Exception
+  {        
+    reporter.testCaseInit("Quick test of XPathAPI.selectNodeIterator() and non-document node");
+    outNames = new OutputNameManager(baseOutName + reporter.getCurrentCaseNum(), ".out");
+    String filename = testFileInfo6.xmlName;
+    String xpathStr = "*[local-name()='sitemap' and namespace-uri()='http://apache.org/xalan/test/sitemap']"; 
+
+    // Set up a DOM tree to query.
+    reporter.logInfoMsg("Parsing input file "+filename);
+    InputSource in = new InputSource(new FileInputStream(filename));
+    DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+    dfactory.setNamespaceAware(true);
+    Document doc = dfactory.newDocumentBuilder().parse(in);
+
+    Transformer serializer = getSerializer();
+    
+    // Create DocumentFragment
+    DocumentFragment frag = doc.createDocumentFragment();
+    frag.appendChild(doc.getFirstChild());
+    
+    // Use the simple XPath API to select a nodeIterator.
+    reporter.logStatusMsg("selectNodeIterator(" + xpathStr + ") and a non document node");
+    NodeIterator nl = XPathAPI.selectNodeIterator(frag, xpathStr);
+    
+    Node n;
+    while ((n = nl.nextNode())!= null)
+    {        
+      serializer.transform(new DOMSource(n), new StreamResult(outNames.nextName()));
+      File f = new File(outNames.currentName()); 
+      fileChecker.check(reporter, 
+                        f, 
+                        new File(testFileInfo6.goldName + f.getName()), 
+                        "selectNodeIterator(...) into " + outNames.currentName());
+    }
+    reporter.testCaseClose();
+    return true;
+  }
+  
+  /** Quick test of XPathAPI.selectNodeList using 'id(a)'.  */
+  public boolean testCase7()
+    throws Exception
+  {        
+    reporter.testCaseInit("Quick test of XPathAPI.selectNodeList using 'id(a)'");
+    outNames = new OutputNameManager(baseOutName + reporter.getCurrentCaseNum(), ".out");
+
+    // Note: parsed file and gold file don't match - why? 10-Oct-01 -sc
+    Document doc = parseToDOM(testFileInfo7.xmlName);
+    Transformer serializer = getSerializer();
+    
+    // Use the simple XPath API to select a nodeIterator.
+    reporter.logStatusMsg("selectNodeList using 'id(a)' ");
+    NodeList nl = XPathAPI.selectNodeList(doc, "id('a')");
+    
+    Node n;
+    int j = 0;
+    while (j < nl.getLength())
+    {        
+      n = nl.item(j++);
+      serializer.transform(new DOMSource(n), new StreamResult(outNames.nextName()));
+      File f = new File(outNames.currentName()); 
+      fileChecker.check(reporter, 
+                        f, 
+                        new File(testFileInfo5.goldName + f.getName()), 
+                        "selectNodeList using 'id(a)' into " + outNames.currentName());
+    }
+    reporter.testCaseClose();
+    return true;
+  }
+
+  /** Worker method to return a transformer for serializing.  */
+  protected Transformer getSerializer() throws TransformerException
+  {
+    // Set up an identity transformer to use as serializer.
+    Transformer serializer = TransformerFactory.newInstance().newTransformer();
+    serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+    return serializer;
+  }
+  
+  /** Worker method to parse file into a DOM.  */
+  protected Document parseToDOM(String filename) throws Exception
+  {
+    reporter.logInfoMsg("Parsing input file "+filename);
+    
+    // Set up a DOM tree to query.
+    InputSource in = new InputSource(new FileInputStream(filename));
+    DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+    Document doc = dfactory.newDocumentBuilder().parse(in);
+    return doc;
+  }
+
+  //-----------------------------------------------------------
+  //---- Basic XSLProcessorTestBase utility methods
+  //-----------------------------------------------------------
+  /**
+   * Convenience method to print out usage information - update if needed.  
+   * @return String denoting usage of this test class
+   */
+  public String usage()
+  {
+    return ("Common [optional] options supported by TestXPathAPI:\n"
+            + "(Note: assumes inputDir=.\\tests\\api)\n"
+            + super.usage());   // Grab our parent classes usage as well
+  }
+  
+  
+  /** Main method to run from the command line.    */
+  public static void main (String[] args)
+  {
+    TestXPathAPI app = new TestXPathAPI();
+    app.doMain(args);
+  }	
+  
+} // end of class ApplyXPath
+
diff --git a/test/java/src/org/apache/qetest/xalanj2/TraceListenerTest.java b/test/java/src/org/apache/qetest/xalanj2/TraceListenerTest.java
new file mode 100644
index 0000000..e8c88c7
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/TraceListenerTest.java
@@ -0,0 +1,481 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TraceListenerTest.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.xsl.TraxDatalet;
+import org.apache.xalan.trace.TraceListener;
+import org.apache.xalan.trace.TraceManager;
+import org.apache.xalan.transformer.TransformerImpl;
+import org.apache.xalan.transformer.XalanProperties;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Basic functionality testing of TraceListener interface and etc.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class TraceListenerTest extends FileBasedTest
+{
+
+    /** Provides nextName(), currentName() functionality.  */
+    protected OutputNameManager outNames;
+
+    /** Simple test to do tracing on.  */
+    protected TraxDatalet testFileInfo = new TraxDatalet();
+
+    /** Another '2' Simple test to do tracing on.  */
+    protected TraxDatalet testFileInfo2 = new TraxDatalet();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String X2J_SUBDIR = "xalanj2";
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TraceListenerTest()
+    {
+        numTestCases = 4;  // REPLACE_num
+        testName = "TraceListenerTest";
+        testComment = "Basic functionality testing of TraceListener interface and etc";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files,
+     * REPLACE_other_test_file_init.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // NOTE: 'reporter' variable is already initialized at this point
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + X2J_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + X2J_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        // NOTE: validation is tied to details within this file!
+        testFileInfo.setDescription("Simple transform: TraceListenerTest");
+        testFileInfo.setNames(inputDir + File.separator + X2J_SUBDIR, "TraceListenerTest");
+        testFileInfo.goldName = goldDir + File.separator + X2J_SUBDIR + File.separator + "TraceListenerTest.out";
+        
+        testFileInfo2.setDescription("for-each transform: TraceListenerTest2");
+        testFileInfo2.setNames(inputDir + File.separator + X2J_SUBDIR, "TraceListenerTest2");
+        testFileInfo2.goldName = goldDir + File.separator + X2J_SUBDIR + File.separator + "TraceListenerTest2.out";
+        return true;
+    }
+
+
+    /**
+     * Quick smoketest of TraceListener; verify it traces something.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Quick smoketest of TraceListener");
+        reporter.logWarningMsg("Note: limited validation: partly just a crash test so far.");
+
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = factory.newTransformer(testFileInfo.getXSLSource());
+
+            reporter.logInfoMsg("Transformer created, addTraceListener..."); 
+            LoggingTraceListener ltl = new LoggingTraceListener(reporter);
+            TraceManager traceManager = ((TransformerImpl)transformer).getTraceManager();
+            reporter.check((null != traceManager), true, "getTraceManager is non-null");
+            reporter.logStatusMsg("traceManager.hasTraceListeners() is: " + traceManager.hasTraceListeners());
+            traceManager.addTraceListener((TraceListener)ltl);
+            reporter.check(traceManager.hasTraceListeners(), true, "traceManager.hasTraceListeners() true after adding one");
+         
+            reporter.logInfoMsg("About to create output: " + outNames.nextName()); 
+            transformer.transform(testFileInfo.getXMLSource(),
+                                  new StreamResult(outNames.currentName()));
+            reporter.checkPass("Crash test only: returned from transform() call");
+            int[] tracedEvents = ltl.getCounters();
+            reporter.logStatusMsg("Last event traced:" + ltl.getLast());
+            reporter.logStatusMsg("Events traced:" + tracedEvents[LoggingTraceListener.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents[LoggingTraceListener.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents[LoggingTraceListener.TYPE_SELECTED]);
+            reporter.check(tracedEvents[LoggingTraceListener.TYPE_SELECTED], 3, 
+                           "Correct number of selected events for testfile " + testFileInfo.getDescription());
+            reporter.logStatusMsg("//@todo add more validation of trace events");
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "testCase1a threw: ");
+            reporter.checkFail("testCase1a threw: " + t.toString());
+        }
+
+        try
+        {
+/**** Temporarily comment out - my bad, missed checkin on testFileInfo2 tests! 27-jul-01 -sc ****
+            // Try again with a different file with new Ex listener (should be parameterized)
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = factory.newTransformer(testFileInfo2.getXSLSource());
+
+            reporter.logInfoMsg("Transformer2 created, addTraceListener(Ex)..."); 
+            LoggingTraceListenerEx ltl = new LoggingTraceListenerEx(reporter);
+            TraceManager traceManager = ((TransformerImpl)transformer).getTraceManager();
+            traceManager.addTraceListener((TraceListener)ltl);
+         
+            reporter.logInfoMsg("About to create output: " + outNames.nextName()); 
+            transformer.transform(testFileInfo2.getXMLSource(),
+                                  new StreamResult(outNames.currentName()));
+            reporter.checkPass("Crash test only: returned from transform() call");
+            int[] tracedEvents = ltl.getCounters();
+            int selectedEndCtr = ltl.getCounterEx();
+            reporter.logStatusMsg("Last event traced:" + ltl.getLast());
+            reporter.logStatusMsg("Events traced:" + tracedEvents[LoggingTraceListener.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents[LoggingTraceListener.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents[LoggingTraceListener.TYPE_SELECTED]
+                                  + " events selectEnd:" + selectedEndCtr);
+            reporter.check(tracedEvents[LoggingTraceListener.TYPE_SELECTED], 10, 
+                           "Correct number of selected events for testfile " + testFileInfo2.getDescription());
+            reporter.check(selectedEndCtr, 5, 
+                           "Correct number of selectedEnd events for testfile " + testFileInfo2.getDescription());
+**** Temporarily comment out - my bad, missed checkin on testFileInfo2 tests! 27-jul-01 -sc  ****/
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "testCase1b threw: ");
+            reporter.checkFail("testCase1b threw: " + t.toString());
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Test TraceListenerEx and multiple simultaneous trace listeners.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Test TraceListenerEx and multiple simultaneous trace listeners");
+        reporter.logWarningMsg("Note: limited validation: partly just a crash test so far.");
+
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = factory.newTransformer(testFileInfo.getXSLSource());
+
+            TraceManager traceManager = ((TransformerImpl)transformer).getTraceManager();
+            reporter.check((null != traceManager), true, "getTraceManager is non-null");
+            reporter.logStatusMsg("traceManager.hasTraceListeners() is-0: " + traceManager.hasTraceListeners());
+
+            LoggingTraceListener ltl = new LoggingTraceListener(reporter);
+            LoggingPrintTraceListener ltl2 = new LoggingPrintTraceListener(reporter);
+            LoggingTraceListenerEx ltl3 = new LoggingTraceListenerEx(reporter);
+            
+            
+            reporter.logInfoMsg("Transformer created, addTraceListener(LoggingTraceListener)..."); 
+            traceManager.addTraceListener((TraceListener)ltl);
+            reporter.logStatusMsg("traceManager.hasTraceListeners() is-1: " + traceManager.hasTraceListeners());
+            
+            reporter.logInfoMsg("... and addTraceListener(LoggingPrintTraceListener)"); 
+            traceManager.addTraceListener((TraceListener)ltl2);
+            reporter.logStatusMsg("traceManager.hasTraceListeners() is-2: " + traceManager.hasTraceListeners());
+
+            reporter.logInfoMsg("... and addTraceListener(LoggingTraceListenerEx)"); 
+            traceManager.addTraceListener((TraceListener)ltl3);
+            
+            reporter.check(traceManager.hasTraceListeners(), true, "traceManager.hasTraceListeners() true after adding several");
+         
+            reporter.logInfoMsg("About to create output: " + outNames.nextName()); 
+            transformer.transform(testFileInfo.getXMLSource(),
+                                  new StreamResult(outNames.currentName()));
+            reporter.checkPass("Crash test only: returned from transform() call");
+            
+            // Now ask each listener how many events it traced
+            int[] tracedEvents = ltl.getCounters();
+            reporter.logStatusMsg("Last event traced(LTL):" + ltl.getLast());
+            reporter.logStatusMsg("Events traced(LTL):" + tracedEvents[LoggingTraceListener.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents[LoggingTraceListener.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents[LoggingTraceListener.TYPE_SELECTED]);
+            reporter.check(tracedEvents[LoggingTraceListener.TYPE_SELECTED], 3, 
+                           "LTL Correct number of selected events for testfile " + testFileInfo.getDescription());
+            
+            int[] tracedEvents2 = ltl2.getCounters();
+            reporter.logStatusMsg("Last event traced(LPTL):" + ltl2.getLast());
+            reporter.logStatusMsg("Events traced(LPTL):" + tracedEvents2[LoggingPrintTraceListener.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents2[LoggingPrintTraceListener.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents2[LoggingPrintTraceListener.TYPE_SELECTED]);
+            reporter.check(tracedEvents2[LoggingTraceListener.TYPE_SELECTED], 3, 
+                           "LPTL Correct number of selected events for testfile " + testFileInfo.getDescription());
+            
+            // For some reason this returns it's parent's class counter 
+            //  array, not it's own...
+            int[] tracedEvents3 = ltl3.getCounters();
+            int selectedEndCtr = ltl3.getCounterEx();
+            reporter.logStatusMsg("Last event traced(LTLE):" + ltl3.getLast());
+            reporter.logStatusMsg("Events traced(LTLE):" + tracedEvents3[LoggingTraceListenerEx.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents3[LoggingTraceListenerEx.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents3[LoggingTraceListenerEx.TYPE_SELECTED]
+                                  + " events selectEnd:" + selectedEndCtr);
+            reporter.check(tracedEvents3[LoggingTraceListenerEx.TYPE_SELECTED], 3, 
+                           "LTLE Correct number of selected events for testfile " + testFileInfo.getDescription());
+            
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "testCase2 threw: ");
+            reporter.checkFail("testCase2 threw: " + t.toString());
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Test adding and removing multiple simultaneous trace listeners.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Test adding and removing multiple simultaneous trace listeners");
+        reporter.logWarningMsg("Note: limited validation: partly just a crash test so far.");
+
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = factory.newTransformer(testFileInfo.getXSLSource());
+
+            TraceManager traceManager = ((TransformerImpl)transformer).getTraceManager();
+            reporter.check((null != traceManager), true, "getTraceManager is non-null");
+            reporter.check(traceManager.hasTraceListeners(), false, "traceManager.hasTraceListeners() false before adding");
+
+            LoggingTraceListener ltl = new LoggingTraceListener(reporter);
+            LoggingPrintTraceListener ltl2 = new LoggingPrintTraceListener(reporter);
+            LoggingTraceListenerEx ltl3 = new LoggingTraceListenerEx(reporter);
+            
+            // Add one trace listener
+            reporter.logInfoMsg("Transformer created, addTraceListener(LoggingTraceListener)..."); 
+            traceManager.addTraceListener((TraceListener)ltl);
+            reporter.check(traceManager.hasTraceListeners(), true, "traceManager.hasTraceListeners() true after adding1");
+
+            // Remove one
+            traceManager.removeTraceListener((TraceListener)ltl);
+            //@todo Bugzilla#5140 comment out temporarily so smoketest passes 28-Nov-01 -sc
+            // reporter.check(traceManager.hasTraceListeners(), false, "traceManager.hasTraceListeners() false after removing1");
+            reporter.logWarningMsg("Bugzilla#5140 traceManager.hasTraceListeners() is (s/b:false) " + traceManager.hasTraceListeners());
+            
+            // Add multiple 
+            traceManager.addTraceListener((TraceListener)ltl);
+            reporter.check(traceManager.hasTraceListeners(), true, "traceManager.hasTraceListeners() true after adding1b");
+            
+            traceManager.addTraceListener((TraceListener)ltl2);
+            reporter.check(traceManager.hasTraceListeners(), true, "traceManager.hasTraceListeners() true after adding2");
+
+            traceManager.addTraceListener((TraceListener)ltl3);
+            reporter.check(traceManager.hasTraceListeners(), true, "traceManager.hasTraceListeners() true after adding3");
+            
+            // Remove one
+            traceManager.removeTraceListener((TraceListener)ltl2);
+            reporter.check(traceManager.hasTraceListeners(), true, "traceManager.hasTraceListeners() true after adding3 removing1");
+
+            // Remove all
+            traceManager.removeTraceListener((TraceListener)ltl);
+            traceManager.removeTraceListener((TraceListener)ltl3);
+            //@todo Bugzilla#5140 comment out temporarily so smoketest passes 28-Nov-01 -sc
+            // reporter.check(traceManager.hasTraceListeners(), false, "traceManager.hasTraceListeners() false after adding3 removing3");
+            reporter.logWarningMsg("Bugzilla#5140 traceManager.hasTraceListeners() is (s/b:false) " + traceManager.hasTraceListeners());
+
+            // Add one back and check transform
+            traceManager.addTraceListener((TraceListener)ltl);
+            reporter.check(traceManager.hasTraceListeners(), true, "traceManager.hasTraceListeners() true after adding1c");
+         
+            // Force trace listener to not bother logging, just capture statistics
+            ltl.setLoggingLevel(100); // HACK - happens to be above 99, which is what we usually set max level tofs
+            reporter.logInfoMsg("About to create output: " + outNames.nextName()); 
+            transformer.transform(testFileInfo.getXMLSource(),
+                                  new StreamResult(outNames.currentName()));
+            reporter.checkPass("Crash test only: returned from transform() call");
+            
+            // Now ask each listener how many events it traced
+            int[] tracedEvents = ltl.getCounters();
+            reporter.logStatusMsg("Last event traced(LTL):" + ltl.getLast());
+            reporter.logStatusMsg("Events traced(LTL):" + tracedEvents[LoggingTraceListener.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents[LoggingTraceListener.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents[LoggingTraceListener.TYPE_SELECTED]);
+            reporter.check(tracedEvents[LoggingTraceListener.TYPE_SELECTED], 3, 
+                           "LTL Correct number of selected events for testfile " + testFileInfo.getDescription());
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "testCase3-add/remove threw: ");
+            reporter.checkFail("testCase3-add/remove threw: " + t.toString());
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Test TraceListener with XalanProperties.SOURCE_LOCATION.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase4()
+    {
+        reporter.testCaseInit("Test TraceListener with XalanProperties.SOURCE_LOCATION");
+        reporter.logWarningMsg("Note: limited validation: partly just a crash test so far.");
+
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = factory.newTransformer(testFileInfo.getXSLSource());
+
+            TraceManager traceManager = ((TransformerImpl)transformer).getTraceManager();
+            reporter.logTraceMsg("getTraceManager is:" + traceManager);
+
+            LoggingTraceListener ltl = new LoggingTraceListener(reporter);
+            ltl.setLoggingLevel(Logger.INFOMSG + 1);
+            
+            reporter.logInfoMsg("Transformer created, addTraceListener(LoggingTraceListener)..."); 
+            traceManager.addTraceListener((TraceListener)ltl);
+            
+            // Verify new Xalan-J 2.x specific property as true (non-default value)
+            reporter.logInfoMsg("About to run with Source Location Property ON"); 
+            ((TransformerImpl)transformer).setProperty(XalanProperties.SOURCE_LOCATION, Boolean.TRUE);
+            reporter.logInfoMsg("About to create output: " + outNames.nextName()); 
+            transformer.transform(testFileInfo.getXMLSource(),
+                                  new StreamResult(outNames.currentName()));
+            reporter.logInfoMsg("Done creating output: " + outNames.currentName());
+
+            int[] tracedEvents = ltl.getCounters();
+            reporter.logStatusMsg("Last event traced(LPTL):" + ltl.getLast());
+            reporter.logStatusMsg("Events traced(LPTL):" + tracedEvents[LoggingPrintTraceListener.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents[LoggingPrintTraceListener.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents[LoggingPrintTraceListener.TYPE_SELECTED]);
+            reporter.checkPass("Crash test: completed transformations with SOURCE_LOCATION just ON");
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "testCase4a-XalanProperties.SOURCE_LOCATION threw: ");
+            reporter.checkFail("testCase4a-XalanProperties.SOURCE_LOCATION threw: " + t.toString());
+        }
+
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            Transformer transformer = factory.newTransformer(testFileInfo.getXSLSource());
+
+            TraceManager traceManager = ((TransformerImpl)transformer).getTraceManager();
+            reporter.logTraceMsg("getTraceManager is:" + traceManager);
+
+            LoggingTraceListener ltl = new LoggingTraceListener(reporter);
+            ltl.setLoggingLevel(Logger.INFOMSG + 1);
+            
+            reporter.logInfoMsg("Transformer created, addTraceListener(LoggingTraceListener)..."); 
+            traceManager.addTraceListener((TraceListener)ltl);
+            
+            // Verify new Xalan-J 2.x specific property; false then true
+            reporter.logInfoMsg("About to run with Source Location Property OFF"); 
+            ((TransformerImpl)transformer).setProperty(XalanProperties.SOURCE_LOCATION, Boolean.FALSE);
+            reporter.logInfoMsg("About to create output: " + outNames.nextName()); 
+            transformer.transform(testFileInfo.getXMLSource(),
+                                  new StreamResult(outNames.currentName()));
+            reporter.logInfoMsg("Done creating output: " + outNames.currentName());
+
+            int[] tracedEvents1 = ltl.getCounters();
+            reporter.logStatusMsg("Last event traced(LPTL):" + ltl.getLast());
+            reporter.logStatusMsg("Events traced(LPTL):" + tracedEvents1[LoggingPrintTraceListener.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents1[LoggingPrintTraceListener.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents1[LoggingPrintTraceListener.TYPE_SELECTED]);
+
+            ltl.reset();
+
+            // Verify new Xalan-J 2.x specific property; false then true
+            reporter.logInfoMsg("About to run with Source Location Property ON"); 
+            ((TransformerImpl)transformer).setProperty(XalanProperties.SOURCE_LOCATION, Boolean.TRUE);
+            reporter.logInfoMsg("About to create output: " + outNames.nextName()); 
+            transformer.transform(testFileInfo.getXMLSource(),
+                                  new StreamResult(outNames.currentName()));
+            reporter.logInfoMsg("Done creating output: " + outNames.currentName());
+
+            int[] tracedEvents2 = ltl.getCounters();
+            reporter.logStatusMsg("Last event traced(LPTL):" + ltl.getLast());
+            reporter.logStatusMsg("Events traced(LPTL):" + tracedEvents2[LoggingPrintTraceListener.TYPE_TRACE]
+                                  + " events generated:" + tracedEvents2[LoggingPrintTraceListener.TYPE_GENERATED]
+                                  + " events selected:" + tracedEvents2[LoggingPrintTraceListener.TYPE_SELECTED]);
+            reporter.checkPass("Crash test: completed transformations with SOURCE_LOCATION OFF and ON");
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "testCase4b-XalanProperties.SOURCE_LOCATION threw: ");
+            reporter.checkFail("testCase4b-XalanProperties.SOURCE_LOCATION threw: " + t.toString());
+        }
+
+        reporter.testCaseClose();
+        return true;
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by TraceListenerTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TraceListenerTest app = new TraceListenerTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/TransformStateAPITest.java b/test/java/src/org/apache/qetest/xalanj2/TransformStateAPITest.java
new file mode 100644
index 0000000..4de0cd0
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/TransformStateAPITest.java
@@ -0,0 +1,533 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TransformStateAPITest.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.apache.qetest.OutputNameManager;
+import org.apache.qetest.Reporter;
+import org.apache.qetest.XMLFileLogger;
+import org.apache.qetest.xsl.TraxDatalet;
+import org.apache.xalan.templates.ElemTemplate;
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.transformer.TransformState;
+import org.apache.xalan.transformer.TransformerClient;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+//-------------------------------------------------------------------------
+
+/**
+ * API coverage testing of TransformState interface.
+ * Currently this focuses on dumping debug information about 
+ * a TransformState while transforming several different 
+ * stylesheets; manual validation of the output results 
+ * to see what was traced) is expected.
+ * Future work will add basic validation of 
+ * various ExpectedTransformState objects, which will be 
+ * keyed off of the ContentHandler event and the line/column 
+ * information of the pertinent element or template. 
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class TransformStateAPITest extends FileBasedTest
+        implements ContentHandler, TransformerClient
+
+{
+    /** Provides nextName(), currentName() functionality.  */
+    protected OutputNameManager outNames;
+
+    /** Identity transform - simple test.  */
+    protected TraxDatalet testFileInfo = new TraxDatalet();
+
+    /**  RootTemplate: simple stylesheet with xsl:template select="/".  */
+    protected TraxDatalet testFileInfo2 = new TraxDatalet();
+
+    /**  Another simple test for manual debugging.  */
+    protected TraxDatalet testFileInfo3 = new TraxDatalet();
+
+    /**  Another simple test for manual debugging.  */
+    protected TraxDatalet testFileInfo4 = new TraxDatalet();
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String X2J_SUBDIR = "xalanj2";
+
+    /** Level that various TransformState logging should use.  */
+    protected int traceLoggingLevel = Logger.INFOMSG - 1;
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TransformStateAPITest()
+    {
+        numTestCases = 4;  // REPLACE_num
+        testName = "TransformStateAPITest";
+        testComment = "API coverage testing of TransformState interface";
+    }
+
+
+    /**
+     * Initialize this test - Set names of xml/xsl test files etc.
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // NOTE: 'reporter' variable is already initialized at this point
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + X2J_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+        // Initialize an output name manager to that dir with .out extension
+        outNames = new OutputNameManager(outputDir + File.separator + X2J_SUBDIR
+                                         + File.separator + testName, ".out");
+
+        testFileInfo.setDescription("Identity transform");
+        testFileInfo.setNames(inputDir + File.separator + X2J_SUBDIR, "identity");
+        testFileInfo.goldName = goldDir + File.separator + X2J_SUBDIR + File.separator + "identity.out";
+
+        testFileInfo2.setDescription("TransformStateAPITest");
+        testFileInfo2.setNames(inputDir + File.separator + X2J_SUBDIR, "TransformStateAPITest");
+
+        testFileInfo3.setDescription("RootTemplate");
+        testFileInfo3.setNames(inputDir + File.separator + X2J_SUBDIR, "RootTemplate");
+
+        testFileInfo4.setDescription("URIResolverTest"); // Note in different dir
+        testFileInfo4.setNames(inputDir + File.separator + "trax", "URIResolverTest");
+
+        return true;
+    }
+
+
+    /**
+     * Quick smoketest of TransformState.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        reporter.testCaseInit("Quick smoketest of TransformState");
+        reporter.logWarningMsg("Note: limited validation: partly just a crash test so far.");
+        doTransform(testFileInfo.getXSLSource(), 
+                    testFileInfo.getXMLSource(), 
+                    null);
+
+        //@todo: add specific validation for selected trace elements in specific stylesheets
+        reporter.checkPass("Crash test: we haven't crashed yet!");
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Quick smoketest of TransformState.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase2()
+    {
+        reporter.testCaseInit("Quick smoketest of TransformState");
+        reporter.logWarningMsg("Note: limited validation: partly just a crash test so far.");
+        doTransform(testFileInfo2.getXSLSource(), 
+                    testFileInfo2.getXMLSource(), 
+                    null);
+
+        //@todo: add specific validation for selected trace elements in specific stylesheets
+        reporter.checkPass("Crash test: we haven't crashed yet!");
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Quick smoketest of TransformState.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase3()
+    {
+        reporter.testCaseInit("Quick smoketest of TransformState");
+        reporter.logWarningMsg("Note: limited validation: partly just a crash test so far.");
+        doTransform(testFileInfo3.getXSLSource(), 
+                    testFileInfo3.getXMLSource(), 
+                    null);
+
+        //@todo: add specific validation for selected trace elements in specific stylesheets
+        reporter.checkPass("Crash test: we haven't crashed yet!");
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /**
+     * Quick smoketest of TransformState.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase4()
+    {
+        reporter.testCaseInit("Quick smoketest of TransformState");
+        reporter.logWarningMsg("Note: limited validation: partly just a crash test so far.");
+        doTransform(testFileInfo4.getXSLSource(), 
+                    testFileInfo4.getXMLSource(), 
+                    null);
+
+        //@todo: add specific validation for selected trace elements in specific stylesheets
+        reporter.checkPass("Crash test: we haven't crashed yet!");
+        reporter.testCaseClose();
+        return true;
+    }
+
+    /** Cheap-o worker method to do transform with us as output handler.  */
+    protected void doTransform(Source xslSource, Source xmlSource, String options)
+    {
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            reporter.logInfoMsg("---- doTransform:" + options); // options otherwise currently unused
+            reporter.logTraceMsg("---- About to newTransformer " + xslSource.getSystemId());
+            Transformer transformer = factory.newTransformer(xslSource);
+            reporter.logTraceMsg("---- About to transform " + xmlSource.getSystemId() + " into: SAXResult(this-no disk output)");
+            transformer.transform(xmlSource,
+                                  new SAXResult(this)); // use us to handle result
+            reporter.logInfoMsg("---- Afterwards, this.transformState=" + transformState);
+            transformState = null; // just in case
+        }
+        catch (TransformerException te)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, te, "doTransform threw: ");
+            reporter.checkFail("doTransform threw: " + te.toString());
+        }
+    }
+
+    ////////////////// partially Implement LoggingHandler ////////////////// 
+    /** Cheap-o string representation of last event we got.  */
+    protected String lastItem = LoggingHandler.NOTHING_HANDLED;
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @param s string to set
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @return last event string we had
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+    /** 
+     * Worker routine to validate a TransformState based on an event/value.  
+     * Note: this may not be threadsafe!
+     * //@todo actually add validation code - just logs out now
+     * @param ts TransformState to validate, if null, just logs it
+     * @param event our String constant of START_ELEMENT, etc.
+     * @param value any String value of the current event 
+     */
+    protected void validateTransformState(TransformState ts, String event, String value)
+    {
+        if(null == transformState)
+        {
+            reporter.logTraceMsg("validateTransformState(ts-NULL!, " + event + ")=" + value);
+            return;
+        }
+        reporter.logTraceMsg("validateTransformState(" + event + ")=" + value);
+        logTransformStateDump(reporter, traceLoggingLevel, ts, event);
+        //@todo: implement validation service for this stuff
+        //  focus on what tooling/debugging clients will want to see
+    }
+
+
+    //-----------------------------------------------------------
+    //---- Implement the TransformerClient interface
+    //-----------------------------------------------------------
+    /**
+     * A TransformState object that we use to log state data.
+     * This is the equivalent of the defaultHandler, even though 
+     * that's not really the right metaphor.  This class could be 
+     * upgraded to have both a default ContentHandler and a 
+     * defaultTransformerClient in the future.
+     */
+    protected TransformState transformState = null;
+
+
+    /**
+     * Implement TransformerClient.setTransformState interface.  
+     * Pass in a reference to a TransformState object, which
+     * can be used during SAX ContentHandler events to obtain
+     * information about he state of the transformation. This
+     * method will be called before each startDocument event.
+     *
+     * @param ts A reference to a TransformState object
+     */
+    public void setTransformState(TransformState ts)
+    {
+        transformState = ts;
+    }
+
+    ////////////////// Utility methods for TransformState ////////////////// 
+    /**
+     * Utility method to dump data from TransformState.  
+     * @return String describing various bits of the state
+     */
+    protected void logTransformStateDump(Reporter reporter, int traceLoggingLevel, 
+            TransformState ts, String event)
+    {
+        String elemName = "transformStateDump";
+        Hashtable attrs = new Hashtable();
+        attrs.put("event", event);
+        attrs.put("location", "L" + ts.getCurrentTemplate().getLineNumber()
+                  + "C" + ts.getCurrentTemplate().getColumnNumber());
+
+        StringBuffer buf = new StringBuffer();
+        ElemTemplateElement elem = ts.getCurrentElement(); // may be actual or default template
+        buf.append("  <currentElement>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(elem, XalanDumper.DUMP_DEFAULT)) + "</currentElement>\n");
+
+        ElemTemplate currentTempl = ts.getCurrentTemplate(); // Actual current template
+        buf.append("  <currentTemplate>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(currentTempl, XalanDumper.DUMP_DEFAULT)) + "</currentTemplate>\n");
+
+        ElemTemplate matchTempl = ts.getMatchedTemplate(); // Actual matched template
+        if (matchTempl != currentTempl)
+            buf.append("  <matchedTemplate>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(matchTempl, XalanDumper.DUMP_DEFAULT)) + "</matchedTemplate>\n");
+
+        Node n = ts.getCurrentNode();   // current context node in source tree
+        buf.append("  <currentNode>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(n, XalanDumper.DUMP_DEFAULT)) + "</currentNode>\n");
+
+        Node matchedNode = ts.getMatchedNode(); // node in source matched via getMatchedTemplate
+        buf.append("  <matchedNode>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(matchedNode, XalanDumper.DUMP_DEFAULT)) + "</matchedNode>\n");
+
+        NodeIterator contextNodeList = ts.getContextNodeList(); // current context node list
+        Node rootNode = contextNodeList.getRoot();
+        buf.append("  <contextNodeListGetRoot>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(rootNode, XalanDumper.DUMP_DEFAULT)) + "</contextNodeListGetRoot>\n");
+
+        // Skip dumping Transformer info until we actually do something with it
+        // Transformer transformer = ts.getTransformer(); // current transformer working
+        // buf.append("getTransformer:" + transformer + "\n"); // TBD
+
+        reporter.logElement(traceLoggingLevel, elemName, attrs, buf.toString());
+    }
+
+
+    //-----------------------------------------------------------
+    //---- Implement the ContentHandler interface
+    //-----------------------------------------------------------
+    protected final String START_ELEMENT = "startElement:";
+    protected final String END_ELEMENT = "endElement:";
+    protected final String CHARACTERS = "characters:";
+
+    // String Locator.getPublicId() null if none available
+    // String Locator.getPublicId() null if none available
+    // int Locator.getLineNumber() -1 if none available
+    // int Locator.getColumnNumber() -1 if none available
+    protected Locator ourLocator = null;
+    
+    /** 
+     * Implement ContentHandler.setDocumentLocator.  
+     * If available, this should always be called prior to a 
+     * startDocument event.
+     */
+    public void setDocumentLocator (Locator locator)
+    {
+        // Note: this implies this class is !not! threadsafe
+        ourLocator = locator; // future use
+        if (null != locator)
+            setLastItem("setDocumentLocator.getSystemId():" + locator.getSystemId());
+        else
+            setLastItem("setDocumentLocator:NULL");
+        reporter.logMsg(traceLoggingLevel, getLast());
+    }
+
+
+    /** Cached TransformState object during lifetime startDocument -> endDocument.  */
+    // Note: is this correct? Will it always be the same object?
+    protected TransformState docCachedTransformState = null;
+    /** Implement ContentHandler.startDocument.  */
+    public void startDocument ()
+        throws SAXException
+    {
+        setLastItem("startDocument");
+        reporter.logMsg(traceLoggingLevel, getLast());
+        // Comment out check call since the spec'd functionality
+        //  is very likely to change to *not* be in startDocument 19-Jun-01 -sc 
+        // reporter.check((null != transformState), true, "transformState non-null in startDocument");
+        reporter.logStatusMsg("transformState in startDocument is: " + transformState);
+        docCachedTransformState = transformState; // see endDocument
+    }
+
+
+    /** Implement ContentHandler.endDocument.  */
+    public void endDocument()
+        throws SAXException
+    {
+        setLastItem("endDocument");
+        reporter.logMsg(traceLoggingLevel, getLast());
+        // Comment out check call since the spec'd functionality
+        //  is very likely to change to *not* be in startDocument 19-Jun-01 -sc 
+        // reporter.checkObject(docCachedTransformState, transformState, 
+        //               "transformState same in endDocument as startDocument"); // see startDocument
+        reporter.logStatusMsg("transformState in endDocument is: " + transformState);
+        docCachedTransformState = null;
+    }
+
+
+    /** Implement ContentHandler.startPrefixMapping.  */
+    public void startPrefixMapping (String prefix, String uri)
+        throws SAXException
+    {
+        setLastItem("startPrefixMapping: " + prefix + ", " + uri);
+        reporter.logMsg(traceLoggingLevel, getLast());
+    }
+
+
+    /** Implement ContentHandler.endPrefixMapping.  */
+    public void endPrefixMapping (String prefix)
+        throws SAXException
+    {
+        setLastItem("endPrefixMapping: " + prefix);
+        reporter.logMsg(traceLoggingLevel, getLast());
+    }
+
+
+    /** Implement ContentHandler.startElement.  */
+    public void startElement (String namespaceURI, String localName,
+                              String qName, Attributes atts)
+        throws SAXException
+    {
+        StringBuffer buf = new StringBuffer();
+        buf.append(namespaceURI + ", " 
+                   + localName + ", " + qName + ";");
+                   
+        int n = atts.getLength();
+        for(int i = 0; i < n; i++)
+        {
+            buf.append(", " + atts.getQName(i));
+        }
+        setLastItem(START_ELEMENT + buf.toString());
+
+        validateTransformState(transformState, START_ELEMENT, buf.toString());
+    }
+
+
+    /** Implement ContentHandler.endElement.  */
+    public void endElement (String namespaceURI, String localName, String qName)
+        throws SAXException
+    {
+        setLastItem(END_ELEMENT + namespaceURI + ", " + localName + ", " + qName);
+
+        validateTransformState(transformState, END_ELEMENT, null);
+    }
+
+
+    /** Implement ContentHandler.characters.  */
+    public void characters (char ch[], int start, int length)
+        throws SAXException
+    {
+        String s = new String(ch, start, length);
+        setLastItem(CHARACTERS + "\"" + s + "\"");
+
+        validateTransformState(transformState, CHARACTERS, s);
+    }
+
+
+    /** Implement ContentHandler.ignorableWhitespace.  */
+    public void ignorableWhitespace (char ch[], int start, int length)
+        throws SAXException
+    {
+        setLastItem("ignorableWhitespace: len " + length);
+        reporter.logMsg(traceLoggingLevel, getLast());
+    }
+
+
+    /** Implement ContentHandler.processingInstruction.  */
+    public void processingInstruction (String target, String data)
+        throws SAXException
+    {
+        setLastItem("processingInstruction: " + target + ", " + data);
+        reporter.logMsg(traceLoggingLevel, getLast());
+    }
+
+
+    /** Implement ContentHandler.skippedEntity.  */
+    public void skippedEntity (String name)
+        throws SAXException
+    {
+        setLastItem("skippedEntity: " + name);
+        reporter.logMsg(traceLoggingLevel, getLast());
+    }
+
+
+    //-----------------------------------------------------------
+    //---- Basic XSLProcessorTestBase utility methods
+    //-----------------------------------------------------------
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by TransformStateAPITest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TransformStateAPITest app = new TransformStateAPITest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/TransformStateDatalet.java b/test/java/src/org/apache/qetest/xalanj2/TransformStateDatalet.java
new file mode 100644
index 0000000..db15302
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/TransformStateDatalet.java
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TransformStateDatalet.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.apache.qetest.Datalet;
+
+/**
+ * Datalet for holding ExpectedTransformState objects.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class TransformStateDatalet implements Datalet
+{
+    //// Items associated with the normal test
+    /** URL of the stylesheet; default:.../identity.xsl.  */
+    public String inputName = "tests/api/trax/identity.xsl";
+
+    /** URL of the xml document; default:.../identity.xml.  */
+    public String xmlName = "tests/api/trax/identity.xml";
+
+    /** URL to put output into; default:TransformStateDatalet.out.  */
+    public String outputName = "TransformStateDatalet.out";
+
+    /** URL of the a gold file or data; default:.../identity.out.  */
+    public String goldName = "tests/api-gold/trax/identity.out";
+
+    /** 
+     * A Hashtable of ExpectedTransformState objects to validate.  
+     * Users should put ExpectedTransformState objects in here with 
+     * some sort of hashKey that they want to use.
+     */
+/***********************************************
+// Comment out validation using ExpectedObjects since they hang 28-Jun-01 -sc
+    public Hashtable expectedTransformStates = new Hashtable();
+// Comment out validation using ExpectedObjects since they hang 28-Jun-01 -sc
+***********************************************/
+
+    /** 
+     * Cheap-o hash of items to validate for column 99.  
+     * Temporary use until we solve problem in TransformStateTestlet:
+     * "Comment out validation using ExpectedObjects since they hang 28-Jun-01 -sc".
+     */
+    public Hashtable validate99 = new Hashtable();
+
+
+    /** Description of what this Datalet tests.  */
+    protected String description = "TransformStateDatalet: String inputName, String xmlName, String outputName, String goldName, String flavor; plus second Templates object";
+
+
+    /**
+     * No argument constructor is a no-op.  
+     */
+    public TransformStateDatalet() { /* no-op */ }
+
+
+    /**
+     * Initialize this datalet from a string, perhaps from 
+     * a command line.  
+     * We will parse the command line with whitespace and fill
+     * in our member variables in order:
+     * <pre>inputName, xmlName, outputName, goldName, flavor</pre>, 
+     * if there are too few tokens, remaining variables will default.
+     */
+    public TransformStateDatalet(String args)
+    {
+        load(args);
+    }
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @return String describing the specific set of data 
+     * this Datalet contains (can often be used as the description
+     * of any check() calls made from the Testlet).
+     */
+    public String getDescription()
+    {
+        return description;
+    }
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @param s description to use for this Datalet.
+     */
+    public void setDescription(String s)
+    {
+        description = s;
+    }
+
+
+    /**
+     * Load fields of this Datalet from a Hashtable.  
+     * Caller must provide data for all of our fields.
+     * //@todo NOT FULLY IMPLEMENTED!.
+     * 
+     * @param Hashtable to load
+     */
+    public void load(Hashtable h)
+    {
+        if (null == h)
+            return; //@todo should this have a return val or exception?
+
+        inputName = (String)h.get("inputName");
+        xmlName = (String)h.get("xmlName");
+        outputName = (String)h.get("outputName");
+        goldName = (String)h.get("goldName");
+    }
+
+
+    /**
+     * Load fields of this Datalet from a Properties.  
+     * Caller must provide data for all of our fields.
+     * //@todo NOT FULLY IMPLEMENTED!.
+     * 
+     * @param Hashtable to load
+     */
+    public void load(Properties p)
+    {
+        if (null == p)
+            return; //@todo should this have a return val or exception?
+
+        inputName = (String)p.getProperty("inputName");
+        xmlName = (String)p.getProperty("xmlName");
+        outputName = (String)p.getProperty("outputName");
+        goldName = (String)p.getProperty("goldName");
+    }
+    /**
+     * Load fields of this Datalet from a String.  
+     * NOT IMPLEMENTED! No easy way to load the Templates from string.  
+     * 
+     * @param s String to load
+     */
+    public void load(String s)
+    {
+        throw new RuntimeException("TransformStateDatalet.load(String) not implemented!");
+    }
+    /**
+     * Load fields of this Datalet from a String[].  
+     * NOT IMPLEMENTED! No easy way to load the Templates from string.  
+     * 
+     * @param s String array to load
+     */
+    public void load(String[] s)
+    {
+        throw new RuntimeException("TransformStateDatalet.load(String[]) not implemented!");
+    }
+}  // end of class TransformStateDatalet
+
diff --git a/test/java/src/org/apache/qetest/xalanj2/TransformStateTest.java b/test/java/src/org/apache/qetest/xalanj2/TransformStateTest.java
new file mode 100644
index 0000000..9965373
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/TransformStateTest.java
@@ -0,0 +1,299 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TransformStateTest.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Basic functionality testing of TransformState interface.
+ * This is basically just a test driver class for an explicit 
+ * list of TransformStateTestlet/Datalets.  In the future we 
+ * should enable better data-driven testing by being able to 
+ * read in a list of TransformStateDatalets somehow.
+ * 
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class TransformStateTest extends FileBasedTest
+{
+
+    /** Subdirectory under test\tests\api for our xsl/xml files.  */
+    public static final String X2J_SUBDIR = "xalanj2";
+
+
+    /** Just initialize test name, comment, numTestCases. */
+    public TransformStateTest()
+    {
+        numTestCases = 1;  // REPLACE_num
+        testName = "TransformStateTest";
+        testComment = "Basic functionality testing of TransformState interface";
+    }
+
+
+    /**
+     * Initialize this test - create output dir.  
+     *
+     * @param p Properties to initialize from (if needed)
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // NOTE: 'reporter' variable is already initialized at this point
+
+        // Used for all tests; just dump files in trax subdir
+        File outSubDir = new File(outputDir + File.separator + X2J_SUBDIR);
+        if (!outSubDir.mkdirs())
+            reporter.logWarningMsg("Could not create output dir: " + outSubDir);
+
+        return true;
+    }
+
+
+    /**
+     * Use a TransformStateTestlet to test some datalets.
+     *
+     * @return false if we should abort the test; true otherwise
+     */
+    public boolean testCase1()
+    {
+        // Use a 'fake' testCase1 to initialize everything
+        reporter.testCaseInit("Use a TransformStateTestlet to test some datalets");
+        reporter.logWarningMsg("Note: limited validation: only certain events checked.");
+
+        // First arg is list of files; currently unused
+        // Note: several method signatures are copied from 
+        //  StylesheetTestletDriver for future growth
+        Vector datalets = buildDatalets(null, 
+                                        new File(inputDir + File.separator + X2J_SUBDIR), 
+                                        new File(outputDir + File.separator + X2J_SUBDIR), 
+                                        new File(goldDir + File.separator + X2J_SUBDIR));
+
+        // Validate datalets
+        if ((null == datalets) || (0 == datalets.size()))
+        {
+            // No datalets to test, report it as an error
+            reporter.checkErr("Testlet or datalets are null/blank, nothing to test!");
+            return true;
+        }
+        else
+        {
+            reporter.checkPass("Found " + datalets.size() + " datalets to test...");
+        }
+
+        // Now just go through the list and process each set
+        int numDatalets = 0;
+        numDatalets = datalets.size();
+        reporter.logInfoMsg("processFileList-equivalent() with " + numDatalets
+                            + " potential tests");
+        // Close out our 'fake' initialization testCase1
+        reporter.testCaseClose();
+        // Iterate over every datalet and test it
+        for (int ctr = 0; ctr < numDatalets; ctr++)
+        {
+            try
+            {
+                reporter.testCaseInit("Testing datalet(" + ctr + ") validation size=" 
+                        + ((TransformStateDatalet)datalets.elementAt(ctr)).validate99.size());
+                // Create a Testlet to execute a test with this 
+                //  next datalet - the Testlet will log all info 
+                //  about the test, including calling check*()
+                getTestlet().execute((TransformStateDatalet)datalets.elementAt(ctr));
+            } 
+            catch (Throwable t)
+            {
+                // Log any exceptions as fails and keep going
+                //@todo improve the below to output more useful info
+                reporter.checkFail("Datalet num " + ctr + " threw: " + t.toString());
+                reporter.logThrowable(Logger.ERRORMSG, t, "Datalet threw");
+            }
+            reporter.testCaseClose();
+        }  // of while...
+
+        return true;
+    }
+
+
+    /**
+     * Transform a vector of individual test names into a Vector 
+     * of filled-in datalets to be tested
+     *
+     * This currently is hard-coded to return a static Vector
+     * of Datalets that are simply constructed here.
+     * In the future we should add a way to read them in from disk.
+     * 
+     * @param files Vector of local path\filenames to be tested
+     * This is currently ignored
+     * @param testLocation File denoting directory where all 
+     * .xml/.xsl tests are found
+     * @param outLocation File denoting directory where all 
+     * output files should be put
+     * @param goldLocation File denoting directory where all 
+     * gold files are found
+     * @return Vector of StylesheetDatalets that are fully filled in,
+     * i.e. outputName, goldName, etc are filled in respectively 
+     * to inputName
+     */
+    public Vector buildDatalets(Vector files, File testLocation, 
+                                File outLocation, File goldLocation)
+    {
+        Vector v = new Vector();
+        
+/***********************************************
+// Comment out validation using ExpectedObjects since they hang 28-Jun-01 -sc
+        // A simple datalet for identity transform
+        TransformStateDatalet d = new TransformStateDatalet();
+        String testFileName = "identity";
+        d.inputName = testLocation.getPath() + File.separator + testFileName + ".xsl";
+        d.xmlName = testLocation.getPath() + File.separator + testFileName + ".xml";
+        d.outputName = outLocation.getPath() + File.separator + testFileName + ".out";
+        d.goldName = goldLocation.getPath() + File.separator + testFileName + ".out";
+        // Validation TransformStates for RootTemplate
+        ExpectedTransformState ets = new ExpectedTransformState();
+        ets.setName("doc");
+        ets.set("line", ExpectedObject.MUST_EQUAL, new Integer(6));
+        ets.set("column", ExpectedObject.MUST_EQUAL, new Integer(8));
+        ets.set("event", ExpectedObject.MUST_EQUAL, "startElement:");
+        ets.set("current.match", ExpectedObject.MUST_EQUAL, "@*|node()");
+        ets.set("matched.match", ExpectedObject.MUST_EQUAL, "@*|node()");
+        // Add the expected object(s) to the datalet..
+        d.expectedTransformStates.put(ets.getHashKey(), ets);
+
+        ets = new ExpectedTransformState();
+        ets.setName("copy");
+        ets.set("line", ExpectedObject.MUST_EQUAL, new Integer(7));
+        ets.set("column", ExpectedObject.MUST_EQUAL, new Integer(15));
+        ets.set("event", ExpectedObject.MUST_EQUAL, "startElement:");
+        ets.set("current.match", ExpectedObject.MUST_EQUAL, "@*|node()");
+        // Add the expected object(s) to the datalet..
+        d.expectedTransformStates.put(ets.getHashKey(), ets);
+
+// Comment out validation using ExpectedObjects since they hang 28-Jun-01 -sc
+***********************************************/
+        // Simple single file with call-template, modes
+        TransformStateDatalet d = new TransformStateDatalet();
+        String testFileName = "TransformState99a";
+        d.inputName = testLocation.getPath() + File.separator + testFileName + ".xsl";
+        d.xmlName = testLocation.getPath() + File.separator + testFileName + ".xml";
+        d.outputName = outLocation.getPath() + File.separator + testFileName + ".out";
+        d.goldName = goldLocation.getPath() + File.separator + testFileName + ".out";
+        d.validate99.put("42.current.name", "apple");
+        d.validate99.put("42.current.match", "pies-are-good");
+        d.validate99.put("42.matched.name", "template-1-root");
+        d.validate99.put("42.matched.match", "/");
+
+        // .. and Add the datalet to the vector
+        v.addElement(d);
+
+        // Simple included file
+        d = new TransformStateDatalet();
+        testFileName = "TransformState99b"; // and TransformState99binc.xsl
+        d.inputName = testLocation.getPath() + File.separator + testFileName + ".xsl";
+        d.xmlName = testLocation.getPath() + File.separator + testFileName + ".xml";
+        d.outputName = outLocation.getPath() + File.separator + testFileName + ".out";
+        d.goldName = goldLocation.getPath() + File.separator + testFileName + ".out";
+        // Note this should still be cross-checked for line numbers when using included files!
+        d.validate99.put("27.current.name", "apple");
+        d.validate99.put("27.current.match", "pies-are-good");
+        d.validate99.put("27.matched.name", "template-1-root");
+        d.validate99.put("27.matched.match", "/");
+
+        // .. and Add the datalet to the vector
+        v.addElement(d);
+
+        // Simple imported file
+        d = new TransformStateDatalet();
+        testFileName = "TransformState99c"; // and TransformState99cimp.xsl
+        d.inputName = testLocation.getPath() + File.separator + testFileName + ".xsl";
+        d.xmlName = testLocation.getPath() + File.separator + testFileName + ".xml";
+        d.outputName = outLocation.getPath() + File.separator + testFileName + ".out";
+        d.goldName = goldLocation.getPath() + File.separator + testFileName + ".out";
+        // Note this should still be cross-checked for line numbers when using included files!
+        d.validate99.put("32.current.name", "apple");
+        d.validate99.put("32.current.match", "pies-are-good");
+        d.validate99.put("32.matched.name", "template-1-root");
+        d.validate99.put("32.matched.match", "/");
+
+        // .. and Add the datalet to the vector
+        v.addElement(d);
+
+        // All done: return full vector
+        return v;
+    }
+
+
+    /**
+     * Convenience method to get a Testlet to use.  
+     * Hard-coded to return a TransformStateTestlet.
+     * 
+     * @return Testlet for use in this test; null if error
+     */
+    public TransformStateTestlet getTestlet()
+    {
+        try
+        {
+            // Create it and set our reporter into it
+            TransformStateTestlet t = new TransformStateTestlet();
+            t.setLogger((Logger)reporter);
+            return t;
+        }
+        catch (Exception e)
+        {
+            // Ooops, problem, should get logged somehow
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by TransformStateTest:\n"
+                + "(Note: assumes inputDir=.\\tests\\api)\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        TransformStateTest app = new TransformStateTest();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xalanj2/TransformStateTestlet.java b/test/java/src/org/apache/qetest/xalanj2/TransformStateTestlet.java
new file mode 100644
index 0000000..9a4e791
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/TransformStateTestlet.java
@@ -0,0 +1,493 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TransformStateTestlet.java
+ *
+ */
+package org.apache.qetest.xalanj2;
+
+import java.util.Hashtable;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.XMLFileLogger;
+import org.apache.xalan.templates.ElemTemplate;
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.transformer.TransformState;
+import org.apache.xalan.transformer.TransformerClient;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+/**
+ * Testlet for testing TransformState of a stylesheet.
+ *
+ * In progress - data-driven tests for tooling API's.
+ * Currently uses cheap-o validation method
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class TransformStateTestlet extends TestletImpl
+        implements ContentHandler, TransformerClient
+
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.TransformStateTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new TransformStateDatalet(); }
+
+    /** 
+     * Class-wide copy of TransformStateDatalet.  
+     * This is used in execute() and in various worker methods 
+     * underneath the ContentHandler interface.
+     */
+    protected TransformStateDatalet tsDatalet = null;
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String describing what this TransformStateTestlet does.
+     */
+    public String getDescription()
+    {
+        return "TransformStateTestlet";
+    }
+
+
+    /**
+     * Run this TransformStateTestlet: execute it's test and return.
+     *
+     * @param Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        try
+        {
+            tsDatalet = (TransformStateDatalet)d;
+        }
+        catch (ClassCastException e)
+        {
+            logger.checkErr("Datalet provided is not a TransformStateDatalet; cannot continue with " + d);
+            return;
+        }
+
+        logger.logMsg(Logger.STATUSMSG, "About to test: " 
+                      + (null == tsDatalet.inputName
+                         ? tsDatalet.xmlName
+                         : tsDatalet.inputName));
+        try
+        {
+            // Perform the transform
+            TransformerFactory factory = TransformerFactory.newInstance();
+            logger.logMsg(Logger.TRACEMSG, "---- About to newTransformer " + QetestUtils.filenameToURL(tsDatalet.inputName));
+            Transformer transformer = factory.newTransformer(new StreamSource(QetestUtils.filenameToURL(tsDatalet.inputName)));
+            logger.logMsg(Logger.TRACEMSG, "---- About to transform " + QetestUtils.filenameToURL(tsDatalet.xmlName) + " into: SAXResult(this-no disk output)");
+
+            // Note most validation happens here: we get ContentHandler 
+            //  callbacks from being in the SAXResult, and that's where 
+            //  we do our validation
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL(tsDatalet.xmlName)),
+                                  new SAXResult(this)); // use us to handle result
+
+            logger.logMsg(Logger.INFOMSG, "---- Afterwards, this.transformState=" + transformState);
+        }
+        catch (Throwable t)
+        {
+            // Put the logThrowable first, so it appears before 
+            //  the Fail record, and gets color-coded
+            logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " " + tsDatalet.getDescription());
+            logger.checkFail(getDescription() + " " + tsDatalet.getDescription() 
+                             + " threw: " + t.toString());
+            return;
+        }
+	}
+    ////////////////// partially Implement LoggingHandler ////////////////// 
+    /** Cheap-o string representation of last event we got.  */
+    protected String lastItem = LoggingHandler.NOTHING_HANDLED;
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @param s string to set
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @return last event string we had
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+    /** 
+     * Worker routine to validate a TransformState based on an event/value.  
+     * Note: this may not be threadsafe!
+     * //@todo actually add validation code - just logs out now
+     * @param ts TransformState to validate, if null, just logs it
+     * @param event our String constant of START_ELEMENT, etc.
+     * @param value any String value of the current event 
+     */
+    protected void validateTransformState(TransformState ts, String event, String value)
+    {
+        if(null == transformState)
+        {
+            // We should never have a null TransformState since the 
+            //  transformer should have always filled it in
+            logger.checkErr("validateTransformState(ts-NULL!, " + event + ")=" + value);
+            return;
+        }
+        logTransformStateDump(logger, Logger.INFOMSG, ts, event, value);
+
+        // Cheap-o validation: only validate items on column 99
+        if (99 == ts.getCurrentElement().getColumnNumber())
+        {
+            int line = ts.getCurrentElement().getLineNumber();
+            // Get cheap-o validation from the datalet for this line..
+            String exp = (String)tsDatalet.validate99.get(line + ".current.name");
+            // .. If there's an expected value for this line's property..
+            if (null != exp)
+                // .. Then check if it's equal and report pass/fail
+                checkString(ts.getCurrentTemplate().getName().toString(), exp, 
+                            "Validate L" + line + "C99 .current.name");
+
+            exp = (String)tsDatalet.validate99.get(line + ".current.match");
+            if (null != exp)
+                checkString(ts.getCurrentTemplate().getMatch().getPatternString(), exp, 
+                            "Validate L" + line + "C99 .current.match");
+
+            exp = (String)tsDatalet.validate99.get(line + ".current.mode");
+            if (null != exp)
+                checkString(ts.getCurrentTemplate().getMode().toString(), exp, 
+                            "Validate L" + line + "C99 .current.mode");
+
+
+            exp = (String)tsDatalet.validate99.get(line + ".matched.name");
+            if (null != exp)
+                checkString(ts.getMatchedTemplate().getName().toString(), exp, 
+                            "Validate L" + line + "C99 .matched.name");
+
+            exp = (String)tsDatalet.validate99.get(line + ".matched.match");
+            if (null != exp)
+                checkString(ts.getMatchedTemplate().getMatch().getPatternString(), exp, 
+                            "Validate L" + line + "C99 .matched.match");
+
+            exp = (String)tsDatalet.validate99.get(line + ".matched.mode");
+            if (null != exp)
+                checkString(ts.getMatchedTemplate().getMode().toString(), exp, 
+                            "Validate L" + line + "C99 .matched.mode");
+        }
+
+/***********************************************
+// Comment out validation using ExpectedObjects since they hang 28-Jun-01 -sc
+        // See if we have a matching expected state for this event
+        //@todo use event string as part of hashkey!!!
+        String marker = ExpectedTransformState.getHashKey(ts);
+        // Add on the event as well; see ExpectedTransformState.getHashKey()
+        //  for why we have to do this separately
+        marker += ExpectedTransformState.SEP + event;
+        ExpectedTransformState ets = (ExpectedTransformState)tsDatalet.expectedTransformStates.get(marker);
+        logger.logMsg(Logger.TRACEMSG, "ETS-HACK:" + marker + "=" + ets);
+        if (null != ets)
+        {
+            // Ask it to validate itself as needed
+            synchronized(ets) // voodoo: attempt to solve hang problems
+            {
+                ExpectedObjectCheckService.check(logger, ts, ets, "Compare ExpectedTransformState of " + marker);
+            }
+        }
+// Comment out validation using ExpectedObjects since they hang 28-Jun-01 -sc
+***********************************************/
+    }
+
+    private void checkString(String act, String exp, String comment)
+    {
+        if (exp.equals(act))
+            logger.checkPass(comment);
+        else
+            logger.checkFail(comment + "; act(" + act + ") exp(" + exp + ")");
+    }
+
+    ////////////////// Utility methods for TransformState ////////////////// 
+    /**
+     * Utility method to dump data from TransformState.  
+     * @return String describing various bits of the state
+     */
+    protected void logTransformStateDump(Logger logger, int traceLoggingLevel, 
+            TransformState ts, String event, String value)
+    {
+        String elemName = "transformStateDump";
+        Hashtable attrs = new Hashtable();
+        attrs.put("event", event);
+        if (null != value)
+            attrs.put("value", value);
+        attrs.put("location", "L" + ts.getCurrentElement().getLineNumber()
+                  + "C" + ts.getCurrentElement().getColumnNumber());
+
+        StringBuffer buf = new StringBuffer();
+        ElemTemplateElement elem = ts.getCurrentElement(); // may be actual or default template
+        buf.append("  <currentElement>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(elem, XalanDumper.DUMP_DEFAULT)) + "</currentElement>");
+
+        ElemTemplate currentTempl = ts.getCurrentTemplate(); // Actual current template
+        buf.append("\n  <currentTemplate>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(currentTempl, XalanDumper.DUMP_DEFAULT)) + "</currentTemplate>");
+
+        ElemTemplate matchTempl = ts.getMatchedTemplate(); // Actual matched template
+        if (matchTempl != currentTempl)
+            buf.append("\n  <matchedTemplate>" 
+                + XMLFileLogger.escapeString(XalanDumper.dump(matchTempl, XalanDumper.DUMP_DEFAULT)) + "</matchedTemplate>");
+
+        // Optimization: skip most logging when on endElement
+        if (!END_ELEMENT.equals(event))
+        {
+            Node n = ts.getCurrentNode();   // current context node in source tree
+            buf.append("\n  <currentNode>" 
+                    + XMLFileLogger.escapeString(XalanDumper.dump(n, XalanDumper.DUMP_DEFAULT)) + "</currentNode>");
+
+            Node matchedNode = ts.getMatchedNode(); // node in source matched via getMatchedTemplate
+            // Optimization: only output if different
+            if (n != matchedNode)
+                buf.append("\n  <matchedNode>" 
+                        + XMLFileLogger.escapeString(XalanDumper.dump(matchedNode, XalanDumper.DUMP_DEFAULT)) + "</matchedNode>");
+
+            NodeIterator contextNodeList = ts.getContextNodeList(); // current context node list
+            Node rootNode = contextNodeList.getRoot();
+            // Optimization: only output if different
+            if (n != rootNode)
+                buf.append("\n  <contextNodeListGetRoot>" 
+                        + XMLFileLogger.escapeString(XalanDumper.dump(rootNode, XalanDumper.DUMP_DEFAULT)) + "</contextNodeListGetRoot>");
+
+            Transformer transformer = ts.getTransformer(); // current transformer working
+            // Optimization: only dump transformer at startElement to save space
+            if (START_ELEMENT.equals(event))
+            {
+                buf.append("\n  <transformer>" 
+                        + XMLFileLogger.escapeString(XalanDumper.dump(transformer, XalanDumper.DUMP_DEFAULT)) + "</transformer>");
+            }
+            else
+            {
+                // Just log error case if transformer is ever null
+                if (null == transformer)
+                buf.append("\n  <transformer>" 
+                        + "ERROR! Transformer was null!" + "</transformer>");
+            }
+        }
+
+        logger.logElement(traceLoggingLevel, elemName, attrs, buf.toString());
+    }
+
+    //-----------------------------------------------------------
+    //---- Implement the TransformerClient interface
+    //-----------------------------------------------------------
+    /**
+     * A TransformState object that we use to log state data.
+     * This is the equivalent of the defaultHandler, even though 
+     * that's not really the right metaphor.  This class could be 
+     * upgraded to have both a default ContentHandler and a 
+     * defaultTransformerClient in the future.
+     */
+    protected TransformState transformState = null;
+
+
+    /**
+     * Implement TransformerClient.setTransformState interface.  
+     * Pass in a reference to a TransformState object, which
+     * can be used during SAX ContentHandler events to obtain
+     * information about he state of the transformation. This
+     * method will be called before each startDocument event.
+     *
+     * @param ts A reference to a TransformState object
+     */
+    public void setTransformState(TransformState ts)
+    {
+        transformState = ts;
+    }
+
+    //-----------------------------------------------------------
+    //---- Implement the ContentHandler interface
+    //-----------------------------------------------------------
+    protected final String START_ELEMENT = "startElement:";
+    protected final String END_ELEMENT = "endElement:";
+    protected final String CHARACTERS = "characters:";
+
+    // String Locator.getPublicId() null if none available
+    // String Locator.getPublicId() null if none available
+    // int Locator.getLineNumber() -1 if none available
+    // int Locator.getColumnNumber() -1 if none available
+    protected Locator ourLocator = null;
+    
+    /** 
+     * Implement ContentHandler.setDocumentLocator.  
+     * If available, this should always be called prior to a 
+     * startDocument event.
+     */
+    public void setDocumentLocator (Locator locator)
+    {
+        // Note: this implies this class is !not! threadsafe
+        ourLocator = locator; // future use
+        if (null != locator)
+            setLastItem("setDocumentLocator.getSystemId():" + locator.getSystemId());
+        else
+            setLastItem("setDocumentLocator:NULL");
+        logger.logMsg(Logger.INFOMSG, getLast());
+    }
+
+
+    /** Cached TransformState object during lifetime startDocument -> endDocument.  */
+    // Note: is this correct? Will it always be the same object?
+    protected TransformState docCachedTransformState = null;
+    /** Implement ContentHandler.startDocument.  */
+    public void startDocument ()
+        throws SAXException
+    {
+        setLastItem("startDocument");
+        logger.logMsg(Logger.INFOMSG, getLast());
+        // Comment out check call since the spec'd functionality
+        //  is very likely to change to *not* be in startDocument 19-Jun-01 -sc 
+        // logger.check((null != transformState), true, "transformState non-null in startDocument");
+        logger.logMsg(Logger.STATUSMSG, "transformState in startDocument is: " + transformState);
+        docCachedTransformState = transformState; // see endDocument
+    }
+
+
+    /** Implement ContentHandler.endDocument.  */
+    public void endDocument()
+        throws SAXException
+    {
+        setLastItem("endDocument");
+        logger.logMsg(Logger.INFOMSG, getLast());
+        // Comment out check call since the spec'd functionality
+        //  is very likely to change to *not* be in startDocument 19-Jun-01 -sc 
+        // logger.checkObject(docCachedTransformState, transformState, 
+        //               "transformState same in endDocument as startDocument"); // see startDocument
+        logger.logMsg(Logger.STATUSMSG, "transformState in endDocument is: " + transformState);
+        docCachedTransformState = null;
+    }
+
+
+    /** Implement ContentHandler.startPrefixMapping.  */
+    public void startPrefixMapping (String prefix, String uri)
+        throws SAXException
+    {
+        setLastItem("startPrefixMapping: " + prefix + ", " + uri);
+        logger.logMsg(Logger.INFOMSG, getLast());
+    }
+
+
+    /** Implement ContentHandler.endPrefixMapping.  */
+    public void endPrefixMapping (String prefix)
+        throws SAXException
+    {
+        setLastItem("endPrefixMapping: " + prefix);
+        logger.logMsg(Logger.INFOMSG, getLast());
+    }
+
+
+    /** Implement ContentHandler.startElement.  */
+    public void startElement (String namespaceURI, String localName,
+                              String qName, Attributes atts)
+        throws SAXException
+    {
+        StringBuffer buf = new StringBuffer();
+        buf.append(namespaceURI + ", " 
+                   + localName + ", " + qName + ";");
+                   
+        int n = atts.getLength();
+        for(int i = 0; i < n; i++)
+        {
+            buf.append(", " + atts.getQName(i));
+        }
+        setLastItem(START_ELEMENT + buf.toString());
+
+        validateTransformState(transformState, START_ELEMENT, buf.toString());
+    }
+
+
+    /** Implement ContentHandler.endElement.  */
+    public void endElement (String namespaceURI, String localName, String qName)
+        throws SAXException
+    {
+        setLastItem(END_ELEMENT + namespaceURI + ", " + localName + ", " + qName);
+
+        validateTransformState(transformState, END_ELEMENT, null);
+    }
+
+
+    /** Implement ContentHandler.characters.  */
+    public void characters (char ch[], int start, int length)
+        throws SAXException
+    {
+        String s = new String(ch, start, length);
+        setLastItem(CHARACTERS + "\"" + s + "\"");
+
+        validateTransformState(transformState, CHARACTERS, s);
+    }
+
+
+    /** Implement ContentHandler.ignorableWhitespace.  */
+    public void ignorableWhitespace (char ch[], int start, int length)
+        throws SAXException
+    {
+        setLastItem("ignorableWhitespace: len " + length);
+        logger.logMsg(Logger.INFOMSG, getLast());
+    }
+
+
+    /** Implement ContentHandler.processingInstruction.  */
+    public void processingInstruction (String target, String data)
+        throws SAXException
+    {
+        setLastItem("processingInstruction: " + target + ", " + data);
+        logger.logMsg(Logger.INFOMSG, getLast());
+    }
+
+
+    /** Implement ContentHandler.skippedEntity.  */
+    public void skippedEntity (String name)
+        throws SAXException
+    {
+        setLastItem("skippedEntity: " + name);
+        logger.logMsg(Logger.INFOMSG, getLast());
+    }
+
+}  // end of class TransformStateTestlet
+
diff --git a/test/java/src/org/apache/qetest/xalanj2/XalanDumper.java b/test/java/src/org/apache/qetest/xalanj2/XalanDumper.java
new file mode 100644
index 0000000..8747fff
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xalanj2/XalanDumper.java
@@ -0,0 +1,472 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xalanj2;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.reflect.Method;
+import java.util.Properties;
+
+import javax.xml.transform.Transformer;
+
+import org.apache.xalan.templates.ElemLiteralResult;
+import org.apache.xalan.templates.ElemTemplate;
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.templates.ElemTextLiteral;
+import org.apache.xalan.transformer.TransformerImpl;
+import org.apache.xml.dtm.ref.DTMNodeProxy;
+import org.apache.xpath.XPath;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Static utility for dumping info about common Xalan objects.
+ * Cheap-o string representations of some common properties 
+ * of various objects; supports some formatting and encapsulation 
+ * but could use improvements.
+ * Note: currently purposefully outputs plain strings, not 
+ * any XML-like elements, so it's easier for other XML-like 
+ * logging utilities to output our data without escaping, etc.
+ * 
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public abstract class XalanDumper 
+{
+    // abstract class cannot be instantiated
+
+    /** Simple text constants: for items that are null.  */
+    public static final String NULL = "NULL";
+    /** Simple text constants: separator between items.  */
+    public static final String SEP = ";";
+    /** Simple text constants: beginning a block of items.  */
+    public static final String LBRACKET = "[";
+    /** Simple text constants: ending a block of items.  */
+    public static final String RBRACKET = "]";
+    /** Simple text constants: line number.  */
+    public static final String LNUM = "L";
+    /** Simple text constants: column number.  */
+    public static final String CNUM = "C";
+
+    /** Simple output formats: default behavior.  */
+    public static final int DUMP_DEFAULT = 0;
+    /** Simple output formats: verbose: extra output.  */
+    public static final int DUMP_VERBOSE = 1;
+    /** Simple output formats: a contained object.  */
+    public static final int DUMP_CONTAINED = 2;
+    /** Simple output formats: don't close block.  */
+    public static final int DUMP_NOCLOSE = 4;
+    /** Simple output formats: don't include id's or other items likely to change.  */
+    public static final int DUMP_NOIDS = 8;
+
+    /** Cheap-o recursion marker: already recursing in Nodes/NodeLists.  */
+    public static final int DUMP_NODE_RECURSION = 16;
+
+    /**
+     * Return String describing an ElemTemplateElement.
+     *
+     * @param elem the ElemTemplateElement to print info of
+     * @param dumpLevel what format/how much to dump
+     */
+    public static String dump(ElemTemplateElement elem, int dumpLevel)
+    {
+        StringBuffer buf = new StringBuffer("ElemTemplateElement" + LBRACKET);
+        if (null == elem)
+            return buf.toString() + NULL + RBRACKET;
+
+        // Note for user if it's an LRE or an xsl element
+        if(elem instanceof ElemLiteralResult)
+            buf.append("LRE:");
+        else
+            buf.append("xsl:");
+
+        buf.append(elem.getNodeName());
+        buf.append(SEP + LNUM + elem.getLineNumber());
+        buf.append(SEP + CNUM + elem.getColumnNumber());
+        buf.append(SEP + "getLength=" + elem.getLength());
+        if (DUMP_VERBOSE == (dumpLevel & DUMP_VERBOSE))
+        {
+            // Only include systemIds (which are long) if verbose
+            buf.append(SEP + "getSystemId=" + elem.getSystemId());
+            buf.append(SEP + "getStylesheet=" + elem.getStylesheet().getSystemId());
+        }
+        try
+        {
+            Class cl = ((Object)elem).getClass();
+            Method getSelect = cl.getMethod("getSelect", null);
+            if(null != getSelect)
+            {
+                buf.append(SEP + "select=");
+                XPath xpath = (XPath)getSelect.invoke(elem, null);
+                buf.append(xpath.getPatternString());
+            }
+        }
+        catch(Exception e)
+        {
+            // no-op: just don't put in the select info for these items
+        }
+        if (DUMP_NOCLOSE == (dumpLevel & DUMP_NOCLOSE))
+            return buf.toString();
+        else
+            return buf.toString() + RBRACKET;
+    }
+
+
+    /**
+     * Return String describing an ElemTextLiteral.
+     *
+     * @param elem the ElemTextLiteral to print info of
+     * @param dumpLevel what format/how much to dump
+     */
+    public static String dump(ElemTextLiteral elem, int dumpLevel)
+    {
+        StringBuffer buf = new StringBuffer("ElemTextLiteral" + LBRACKET);
+        if (null == elem)
+            return buf.toString() + NULL + RBRACKET;
+
+        buf.append(elem.getNodeName()); // I don't think this ever changes from #Text?
+        buf.append(SEP + LNUM + elem.getLineNumber());
+        buf.append(SEP + CNUM + elem.getColumnNumber());
+
+        String chars = new String(elem.getChars(), 0, elem.getChars().length);
+        buf.append(SEP + "chars=" + chars.trim());
+
+        if (DUMP_NOCLOSE == (dumpLevel & DUMP_NOCLOSE))
+            return buf.toString();
+        else
+            return buf.toString() + RBRACKET;
+    }
+
+    /**
+     * Return String describing an ElemTemplate.
+     *
+     * @param elem the ElemTemplate to print info of
+     * @param dumpLevel what format/how much to dump
+     */
+    public static String dump(ElemTemplate elem, int dumpLevel)
+    {
+        StringBuffer buf = new StringBuffer("ElemTemplate" + LBRACKET);
+        if (null == elem)
+            return buf.toString() + NULL + RBRACKET;
+
+        buf.append("xsl:" + elem.getNodeName());
+        buf.append(SEP + LNUM + elem.getLineNumber());
+        buf.append(SEP + CNUM + elem.getColumnNumber());
+        if (DUMP_VERBOSE == (dumpLevel & DUMP_VERBOSE))
+        {
+            // Only include systemIds (which are long) if verbose
+            buf.append(SEP + "getSystemId=" + elem.getSystemId());
+            buf.append(SEP + "getStylesheet=" + elem.getStylesheet().getSystemId());
+        }
+        try
+        {
+            Class cl = ((Object)elem).getClass();
+            Method getSelect = cl.getMethod("getSelect", null);
+            if(null != getSelect)
+            {
+                buf.append(SEP + "select=");
+                XPath xpath = (XPath)getSelect.invoke(elem, null);
+                buf.append(xpath.getPatternString());
+            }
+        }
+        catch(Exception e)
+        {
+            // no-op: just don't put in the select info for these items
+        }
+        if (null != elem.getMatch())
+            buf.append(SEP + "match=" + elem.getMatch().getPatternString());
+
+        if (null != elem.getName())
+            buf.append(SEP + "name=" + elem.getName());
+
+        if (null != elem.getMode())
+            buf.append(SEP + "mode=" + elem.getMode());
+
+        buf.append(SEP + "priority=" + elem.getPriority());
+
+        if (DUMP_NOCLOSE == (dumpLevel & DUMP_NOCLOSE))
+            return buf.toString();
+        else
+            return buf.toString() + RBRACKET;
+    }
+
+
+    /**
+     * Return String describing a Transformer.
+     * Currently just returns info about a get selected public 
+     * getter methods from a Transformer.
+     * Only really useful when it can do instanceof TransformerImpl 
+     * to return custom info about Xalan
+     *
+     * @param t the Transformer to print info of
+     * @param dumpLevel what format/how much to dump
+     */
+    public static String dump(Transformer trans, int dumpLevel)
+    {
+        if (null == trans)
+            return "Transformer" + LBRACKET + NULL + RBRACKET;
+
+        StringBuffer buf = new StringBuffer();
+
+        StringWriter sw = new StringWriter();
+        Properties p = trans.getOutputProperties();
+        if (null != p)
+        {
+            p.list(new PrintWriter(sw));
+            buf.append("getOutputProperties{" + sw.toString() + "}");
+        }
+
+        if (trans instanceof TransformerImpl)
+        {
+            final TransformerImpl timpl = (TransformerImpl)trans;
+            // We have a Xalan-J 2.x basic transformer
+            buf.append("getBaseURLOfSource=" + timpl.getBaseURLOfSource() + SEP);
+            // Result getOutputTarget()
+            // ContentHandler getInputContentHandler(boolean doDocFrag)
+            // DeclHandler getInputDeclHandler()
+            // LexicalHandler getInputLexicalHandler()
+            // OutputProperties getOutputFormat()
+            // Serializer getSerializer()
+            // ElemTemplateElement getCurrentElement()
+            // int getCurrentNode()
+            // ElemTemplate getCurrentTemplate()
+            // ElemTemplate getMatchedTemplate()
+            // int getMatchedNode()
+            // DTMIterator getContextNodeList()
+            // StylesheetRoot getStylesheet()
+            // int getRecursionLimit()
+            buf.append("getMode=" + timpl.getMode() + SEP);
+        }
+
+        return "Transformer" + LBRACKET 
+            + buf.toString() + RBRACKET;
+    }
+
+
+    /**
+     * Return String describing a Node.
+     * Currently just returns TracerEvent.printNode(n)
+     *
+     * @param n the Node to print info of
+     * @param dumpLevel what format/how much to dump
+     */
+    public static String dump(Node n, int dumpLevel)
+    {
+        if (null == n)
+            return "Node" + LBRACKET + NULL + RBRACKET;
+
+        // Copied but modified from TracerEvent; ditch hashCode
+        StringBuffer buf = new StringBuffer();
+
+        if (n instanceof Element)
+        {
+            buf.append(n.getNodeName());
+
+            Node c = n.getFirstChild();
+
+            while (null != c)
+            {
+                if (c instanceof Attr)
+                {
+                    buf.append(dump(c, dumpLevel | DUMP_NODE_RECURSION) + " ");
+                }
+                c = c.getNextSibling();
+            }
+        }
+        else
+        {
+            if (n instanceof Attr)
+            {
+                buf.append(n.getNodeName() + "=" + n.getNodeValue());
+            }
+            else
+            {
+                buf.append(n.getNodeName());
+            }
+        }
+
+            
+        // If we're already recursing, don't bother printing out 'Node' again
+        if (DUMP_NODE_RECURSION == (dumpLevel & DUMP_NODE_RECURSION))
+            return LBRACKET + buf.toString() + RBRACKET;
+        else
+            return "Node" + LBRACKET + buf.toString() + RBRACKET;
+    }
+
+    /**
+     * Return String describing a DTMNodeProxy.
+     * This is the Xalan-J 2.x internal wrapper for Nodes.
+     *
+     * @param n the DTMNodeProxy to print info of
+     * @param dumpLevel what format/how much to dump
+     */
+    public static String dump(DTMNodeProxy n, int dumpLevel)
+    {
+        if (null == n)
+            return "DTMNodeProxy" + LBRACKET + NULL + RBRACKET;
+
+        // Copied but modified from TracerEvent; ditch hashCode
+        StringBuffer buf = new StringBuffer();
+
+        if (DUMP_NOIDS != (dumpLevel & DUMP_NOIDS))
+        {
+            // Only include the DTM node number if asked
+            buf.append(n.getDTMNodeNumber());
+        }
+        
+        if (n instanceof Element)
+        {
+            buf.append(n.getNodeName());
+            // Also output first x chars of value
+            buf.append(substr(n.getNodeValue()));
+
+            DTMNodeProxy c = (DTMNodeProxy)n.getFirstChild();
+
+            while (null != c)
+            {
+                buf.append(dump(c, dumpLevel | DUMP_NODE_RECURSION) + " ");
+                c = (DTMNodeProxy)c.getNextSibling();
+            }
+        }
+        else
+        {
+            if (n instanceof Attr)
+            {
+                buf.append(n.getNodeName() + "=" + n.getNodeValue());
+            }
+            else
+            {
+                buf.append(n.getNodeName());
+                // Also output first x chars of value
+                buf.append(substr(n.getNodeValue()));
+            }
+        }
+
+            
+        // If we're already recursing, don't bother printing out 'Node' again
+        if (DUMP_NODE_RECURSION == (dumpLevel & DUMP_NODE_RECURSION))
+            return LBRACKET + buf.toString() + RBRACKET;
+        else
+            return "DTMNodeProxy" + LBRACKET + buf.toString() + RBRACKET;
+    }
+
+    /** Cheap-o worker method to substring a string.  */
+    public static int MAX_SUBSTR = 8;
+
+    /** Cheap-o worker method to substring a string.  */
+    public static String SUBSTR_PREFIX = ":";
+
+    /** Cheap-o worker method to substring a string.  */
+    protected static String substr(String s)
+    {
+        if (null == s)
+            return "";
+        return SUBSTR_PREFIX + s.substring(0, Math.min(s.length(), MAX_SUBSTR));
+    }
+
+    /**
+     * Return String describing a NodeList.
+     * Currently just returns TracerEvent.printNode(n)
+     *
+     * @param nl the NodeList to print info of
+     * @param dumpLevel what format/how much to dump
+     */
+    public static String dump(NodeList nl, int dumpLevel)
+    {
+        if (null == nl)
+            return "NodeList" + LBRACKET + NULL + RBRACKET;
+
+        StringBuffer buf = new StringBuffer();
+
+        int len = nl.getLength() - 1;
+        int i = 0;
+        while (i < len)
+        {
+            Node n = nl.item(i);
+            if (null != n)
+            {
+                buf.append(dump(n, dumpLevel) + ", ");
+            }
+            ++i;
+        }
+
+        if (i == len)
+        {
+            Node n = nl.item(len);
+            if (null != n)
+            {
+                buf.append(dump(n, dumpLevel));
+            }
+        }
+        return "NodeList" + LBRACKET 
+            + buf.toString() + RBRACKET;
+    }
+
+
+    /**
+     * Print String type of node.  
+     * @param n Node to report type of 
+     * @return String type name
+     */
+    public static String dumpNodeType(Node n)
+    {
+        if (null == n)
+            return NULL;
+        switch (n.getNodeType())
+        {
+        case Node.DOCUMENT_NODE :
+            return "DOCUMENT_NODE";
+
+        case Node.ELEMENT_NODE :
+            return "ELEMENT_NODE";
+
+        case Node.CDATA_SECTION_NODE :
+            return "CDATA_SECTION_NODE";
+
+        case Node.ENTITY_REFERENCE_NODE :
+            return "ENTITY_REFERENCE_NODE";
+
+        case Node.ATTRIBUTE_NODE :
+            return "ATTRIBUTE_NODE";
+
+        case Node.COMMENT_NODE :
+            return "COMMENT_NODE";
+
+        case Node.ENTITY_NODE :
+            return "ENTITY_NODE";
+
+        case Node.NOTATION_NODE :
+            return "NOTATION_NODE";
+
+        case Node.PROCESSING_INSTRUCTION_NODE :
+            return "PROCESSING_INSTRUCTION_NODE";
+
+        case Node.TEXT_NODE :
+            return "TEXT_NODE";
+
+        default :
+            return "UNKNOWN_NODE";
+        }
+    }  // end of dumpNodeType()
+
+}
diff --git a/test/java/src/org/apache/qetest/xsl/BugzillaFileRules.java b/test/java/src/org/apache/qetest/xsl/BugzillaFileRules.java
new file mode 100644
index 0000000..05f167d
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/BugzillaFileRules.java
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+
+/**
+ * Bugzilla-specific file filter: .java or .xsl files.
+ * Has crude support for an excludes list of filename bases.
+ * @see #accept(File, String)
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class BugzillaFileRules implements FilenameFilter
+{
+
+    /** Initialize for defaults (not using exclusion list) no-op. */
+    public BugzillaFileRules(){}
+
+    /**
+     * Initialize with a case-sensitive Hash of file names to exclude.  
+     *
+     * @param excludesHash - keys are basenames of files to exclude
+     */
+    public BugzillaFileRules(Hashtable excludesHash)
+    {
+        setExcludes(excludesHash);
+    }
+
+    /**
+     * Initialize with a case-insensitive semicolon-delimited String of file names to exclude.  
+     *
+     * @param excludesStr is specific file names to exclude
+     */
+    public BugzillaFileRules(String excludesStr)
+    {
+        setExcludes(excludesStr);
+    }
+
+    /**
+     * Hash of file name portions to exclude.
+     * <p>Keys are base file names, values in hash are ignored. Note that
+     * file names may be case-sensitive.</p>
+     * <p>Note that we will exclude any filename in our excludes.</p>
+     */
+    protected Hashtable excludeFiles = null;
+
+    /**
+     * Accessor methods to set a case-sensitive Hash of file names to exclude.  
+     *
+     * @param exFiles hash keys are filenames to exclude
+     */
+    public void setExcludes(Hashtable exFiles)
+    {
+
+        if (exFiles != null)
+            excludeFiles = (Hashtable) exFiles.clone();
+        else
+            excludeFiles = null;
+    }
+
+    /**
+     * Accessor methods to set a case-sensitive Hash of file names to exclude.  
+     *
+     * @return clone of our excludes hash
+     */
+    public Hashtable getExcludes()
+    {
+
+        if (excludeFiles != null)
+        {
+            Hashtable tempHash = (Hashtable) excludeFiles.clone();
+
+            return tempHash;
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    /**
+     * Accessor method to set a list of case-insensitive String
+     * directory name(s) to exclude.
+     * Names should be separated by {@link #SEPARATOR semicolon}.
+     *
+     * @param exFiles are specific file names to exclude
+     */
+    public void setExcludes(String exFiles)
+    {
+        setExcludes(exFiles, false);
+    }
+
+    /** Semicolon separator for {@link #setExcludes(java.lang.String)}. */
+    public static final String SEPARATOR = ";";
+
+    /**
+     * Accessor method to set an optionally case-sensitive String file name(s) to exclude.
+     * <p><b>Note:</b> simply uses .toUpperCase() and .toLowerCase() on the input string(s);
+     * does not do full case-checking on the entire string!</p>
+     *
+     * @param exFiles is specific file names to exclude
+     * @param caseSensitive is we should attempt to be
+     */
+    public void setExcludes(String exFiles, boolean caseSensitive)
+    {
+
+        StringTokenizer st = new StringTokenizer(exFiles, SEPARATOR);
+
+        excludeFiles = null;
+        excludeFiles = new Hashtable();
+
+        for (int i = 0; st.hasMoreTokens(); i++)
+        {
+            String fName = st.nextToken();
+
+            excludeFiles.put(fName, "");
+
+            if (!caseSensitive)
+            {
+                excludeFiles.put(fName.toUpperCase(), "");
+                excludeFiles.put(fName.toLowerCase(), "");
+            }
+        }
+    }
+
+    /**
+     * Tests if a specified file should be included in a file list.
+     * <p>Returns true for: filenames that begin with the directory 
+     * name, and: are *.java, or are *.xsl.  If one of each exists, 
+     * then we only return true for the *.java file (and not for the 
+     * *.xsl file).</p>
+     * <p>The essence here is that we return only one file for each 
+     * conceptual 'test' that the user wrote.  If they only wrote a 
+     * .xsl stylesheet, we return that.  If they only wrote a .java 
+     * file (presumably a Testlet), we return that.  If they wrote 
+     * both, only return the .java file, since it should have all the 
+     * logic necessary to run the test, including hardcoded .xsl 
+     * file name.  In this case, it might not be a valid test to 
+     * simply transform the .xsl file because the Testlet may 
+     * expect that parameters are set, etc.</p>
+     * <p><b>Except:</b> if any filenames contain an item 
+     * in excludeFiles.</p>
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name should be included in the file list; <code>false</code> otherwise.
+     * @since JDK1.0
+     */
+    public boolean accept(File dir, String name)
+    {
+
+        // Shortcuts for bogus filenames and dirs
+        if (name == null || dir == null)
+            return false;
+
+        // Exclude any files that match an exclude rule
+        if ((excludeFiles != null) && (excludeFiles.containsKey(name)))
+            return false;
+
+        File file = new File(dir, name);
+        // Skip any dirs
+        if (file.isDirectory())
+            return false;
+    
+        // Only accept files that start with 'bugzilla'
+        // HACK: we should really look at the last part of the 
+        //  directory name here, but in this one case it's much 
+        //  easier to just hard-code the name (this is in 
+        //  response to specifying inputDir=tests/bugzilla 
+        //  on a Windows platform)
+        if (!(name.toLowerCase().startsWith("bugzilla")))
+            return false;
+            
+        // Accept any .java files
+        if (name.toLowerCase().endsWith("java"))
+            return true;
+            
+        // If it's a .xsl file..
+        if (name.toLowerCase().endsWith("xsl"))
+        {
+            // Construct matching foo.java from foo.xsl (xsl len = 3)
+            File matchingJava = new File(dir, 
+                    name.substring(0, (name.length() - 3)) + "java");
+            // ..Only accept if matchingJava does not exist        
+            return !matchingJava.exists();
+        }
+            
+        // Fall-through: doesn't match, return false
+        return false;
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/BugzillaTestletDriver.java b/test/java/src/org/apache/qetest/xsl/BugzillaTestletDriver.java
new file mode 100644
index 0000000..f2cb641
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/BugzillaTestletDriver.java
@@ -0,0 +1,502 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * BugzillaTestletDriver.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.Testlet;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Test driver for Bugzilla tests with .java/.xsl files..
+ * 
+ * This driver does not iterate over a directory tree; only 
+ * over a single directory.  It supports either 'classic' tests
+ * with matching .xsl/.xml/.out files like the conformance test, 
+ * or tests that also include a .java file that is the specific 
+ * testlet to execute for that test.
+ *
+ *
+ *
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class BugzillaTestletDriver extends StylesheetTestletDriver
+{
+
+    /** Convenience constant: .java extension for Java Testlet source.  */
+    public static final String JAVA_EXTENSION = ".java";
+
+    /** Convenience constant: Property key for java filenames.  */
+    public static final String JAVA_SOURCE_NAME = "java.source.name";
+
+    /** Convenience constant: Default .xml file to use.  */
+    public static final String DEFAULT_XML_FILE = "identity.xml";
+
+    /** 
+     * Default FilenameFilter FQCN for files - overridden.  
+     * By default, use a custom FilenameFilter that picks up 
+     * both .java and .xsl files, with slightly different 
+     * naming conventions than normal.
+     */
+    protected String defaultFileFilter = "org.apache.qetest.xsl.BugzillaFileRules";
+
+
+    /** Just initialize test name, comment; numTestCases is not used. */
+    public BugzillaTestletDriver()
+    {
+        testName = "BugzillaTestletDriver";
+        testComment = "Test driver for Bugzilla tests with .java/.xsl files.";
+    }
+
+
+    /**
+     * Special: test all Bugzilla* files in just the bugzilla directory.
+     * This does not iterate down directories.
+     * This is a specific test driver for testlets that may have 
+     * matching foo*.java and foo*.xml/xsl/out
+     * Parameters: none, uses our internal members inputDir, 
+     * outputDir, testlet, etc.
+     */
+    public void processInputDir()
+    {
+        // Ensure the inputDir is there - we must have a valid location for input files
+        File testDirectory = new File(inputDir);
+
+        if (!testDirectory.exists())
+        {
+            // Try a default inputDir
+            String oldInputDir = inputDir; // cache for potential error message
+            testDirectory = new File((inputDir = getDefaultInputDir()));
+            if (!testDirectory.exists())
+            {
+                // No inputDir, can't do any tests!
+                // @todo check if this is the best way to express this
+                reporter.checkErr("inputDir(" + oldInputDir
+                                  + ", or " + inputDir + ") does not exist, aborting!");
+                return;
+            }
+        }
+
+        // Validate that each of the specified dirs exists
+        // Returns directory references like so:
+        //  testDirectory = 0, outDirectory = 1, goldDirectory = 2
+        File[] dirs = validateDirs(new File[] { testDirectory }, 
+                                   new File[] { new File(outputDir), new File(goldDir) });
+
+        if (null == dirs)  // this should never happen...
+        {
+            // No inputDir, can't do any tests!
+            // @todo check if this is the best way to express this
+            reporter.checkErr("inputDir(" + dirs[0] + ") does not exist, aborting!");
+            return;
+        }
+
+        // Call worker method to process the individual directory
+        //  and get a list of .java or .xsl files to test
+        Vector files = getFilesFromDir(dirs[0], getFileFilter(), embedded);
+
+        // 'Transform' the list of individual test files into a 
+        //  list of Datalets with all fields filled in
+        //@todo should getFilesFromDir and buildDatalets be combined?
+        Vector datalets = buildDatalets(files, dirs[0], dirs[1], dirs[2]);
+
+        if ((null == datalets) || (0 == datalets.size()))
+        {
+            // No tests, log error and return
+            //  other directories to test
+            reporter.checkErr("inputDir(" + dirs[0] + ") did not contain any tests, aborting!");
+            return;
+        }
+
+        // Now process the list of files found in this dir
+        processFileList(datalets, "Bugzilla tests of: " + dirs[0]);
+    }
+
+
+    /**
+     * Run a list of bugzilla-specific tests.
+     * Bugzilla tests may either be encoded as a .java file that 
+     * defines a Testlet, or as a normal .xsl/.xml file pair that 
+     * should simply be transformed simply, by a StylesheetTestlet.
+     *
+     * @param vector of Datalet objects to pass in
+     * @param desc String to use as testCase description
+     */
+    public void processFileList(Vector datalets, String desc)
+    {
+        // Validate arguments
+        if ((null == datalets) || (0 == datalets.size()))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.checkErr("Testlet or datalets are null/blank, nothing to test!");
+            return;
+        }
+
+        // Now just go through the list and process each set
+        int numDatalets = datalets.size();
+        reporter.logInfoMsg("processFileList() with " + numDatalets
+                            + " potential Bugzillas");
+        // Iterate over every datalet and test it
+        for (int ctr = 0; ctr < numDatalets; ctr++)
+        {
+            try
+            {
+                // Depending on the Datalet class, run a different algorithim
+                Datalet d = (Datalet)datalets.elementAt(ctr);
+                if (d instanceof TraxDatalet)
+                {
+                    // Assume we the datalet holds the name of a 
+                    //  .java file that's a testlet, and just 
+                    //  execute that itself
+                    // Note: Since they're packageless and have 
+                    //  hardcoded paths to the current dir, must 
+                    //  change user.dir each time in worker method
+                    Testlet t = getTestlet((TraxDatalet)d);
+                    // Each Bugzilla is it's own testcase
+                    reporter.testCaseInit(t.getDescription());
+                    executeTestletInDir(t, d, inputDir);
+                }
+                else if (d instanceof StylesheetDatalet)
+                {
+                    // Create plain Testlet to execute a test with this 
+                    //  next datalet - the Testlet will log all info 
+                    //  about the test, including calling check*()
+                    // Each Bugzilla is it's own testcase
+                    reporter.testCaseInit(d.getDescription());
+                    getTestlet().execute(d);
+                }
+                else
+                {
+                    reporter.checkErr("Unknown Datalet type: " + d);                
+                }
+            } 
+            catch (Throwable t)
+            {
+                // Log any exceptions as fails and keep going
+                //@todo improve the below to output more useful info
+                reporter.checkFail("Datalet num " + ctr + " threw: " + t.toString());
+                reporter.logThrowable(Logger.ERRORMSG, t, "Datalet threw");
+            }
+            reporter.testCaseClose();
+        }  // of while...
+    }
+    
+    
+    /**
+     * Transform a vector of individual test names into a Vector 
+     * of filled-in datalets to be tested - Bugzilla-specific.  
+     *
+     * This does special processing since we may either have .java 
+     * files that should be compiled, or we may have plain .xsl/.xml 
+     * file pairs that we should simpy execute through a default 
+     * StylesheetTestlet as-is.
+     * This basically just calculates local path\filenames across 
+     * the three presumably-parallel directory trees of testLocation 
+     * (inputDir), outLocation (outputDir) and goldLocation 
+     * (forced to be same as inputDir).  It then stuffs each of 
+     * these values plus some generic info like our testProps 
+     * into each datalet it creates.
+     * 
+     * @param files Vector of local path\filenames to be tested
+     * @param testLocation File denoting directory where all 
+     * .xml/.xsl tests are found
+     * @param outLocation File denoting directory where all 
+     * output files should be put
+     * @param goldLocation File denoting directory where all 
+     * gold files are found - IGNORED; forces testLocation instead
+     * @return Vector of StylesheetDatalets that are fully filled in,
+     * i.e. outputName, goldName, etc are filled in respectively 
+     * to inputName
+     */
+    public Vector buildDatalets(Vector files, File testLocation, 
+                                File outLocation, File goldLocation)
+    {
+        // Validate arguments
+        if ((null == files) || (files.size() < 1))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.logWarningMsg("buildDatalets null or empty file vector");
+            return null;
+        }
+        Vector v = new Vector(files.size());
+        int xslCtr = 0;
+        int javaCtr = 0;
+
+        // For every file in the vector, construct the matching 
+        //  out, gold, and xml/xsl files; plus see if we have 
+        //  a .java file as well
+        for (Enumeration elements = files.elements();
+                elements.hasMoreElements(); /* no increment portion */ )
+        {
+            String file = null;
+            try
+            {
+                file = (String)elements.nextElement();
+            }
+            catch (ClassCastException cce)
+            {
+                // Just skip this entry
+                reporter.logWarningMsg("Bad file element found, skipping: " + cce.toString());
+                continue;
+            }
+
+            Datalet d = null;
+            // If it's a .java file: just set java.source.name/java.class.name
+            if (file.endsWith(JAVA_EXTENSION))
+            {
+                // Use TraxDatalets if we have .java
+                d = new TraxDatalet();
+                ((TraxDatalet)d).options = new Properties(testProps);
+                ((TraxDatalet)d).options.put("java.source.dir", testLocation);
+                ((TraxDatalet)d).options.put(JAVA_SOURCE_NAME, file);
+                ((TraxDatalet)d).options.put("fileCheckerImpl", fileChecker);
+                // That's it - when we execute tests later on, if 
+                //  there's a JAVA_SOURCE_NAME we simply use that to 
+                //  find the testlet to execute
+                javaCtr++;
+            }
+            // If it's a .xsl file, just set the filenames as usual
+            else if (file.endsWith(XSL_EXTENSION))
+            {
+                // Use plain StylesheetDatalets if we just have .xsl
+                d = new StylesheetDatalet();
+                ((StylesheetDatalet)d).inputName = testLocation.getPath() + File.separator + file;
+
+                String fileNameRoot = file.substring(0, file.indexOf(XSL_EXTENSION));
+                // Check for existence of xml - if not there, then set to some default
+                //@todo this would be a perfect use of TraxDatalet.setXMLString()
+                String xmlFileName = testLocation.getPath() + File.separator + fileNameRoot + XML_EXTENSION;
+                if ((new File(xmlFileName)).exists())
+                {
+                    ((StylesheetDatalet)d).xmlName = xmlFileName;
+                }
+                else
+                {
+                    ((StylesheetDatalet)d).xmlName = testLocation.getPath() + File.separator + DEFAULT_XML_FILE;
+                }
+                ((StylesheetDatalet)d).outputName = outLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+                ((StylesheetDatalet)d).goldName = testLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+                ((StylesheetDatalet)d).flavor = flavor;
+                ((StylesheetDatalet)d).options = new Properties(testProps);
+                ((StylesheetDatalet)d).options.put("fileCheckerImpl", fileChecker);
+                // These tests will be run by a plain StylesheetTestlet
+                xslCtr++;
+            }
+            else
+            {
+                // Hmmm - I'm not sure what we should do here
+                reporter.logWarningMsg("Unexpected test file found, skipping: " + file);
+                continue;
+            }
+            d.setDescription(file);
+            v.addElement(d);
+        }
+        reporter.logTraceMsg("Bugzilla buildDatalets with " + javaCtr 
+                + " .java Testlets, and " + xslCtr + " .xsl files to test");
+        return v;
+    }
+
+
+    /**
+     * Execute a Testlet with a specific user.dir.
+     * Bugzilla testlets hardcode their input file names, assuming 
+     * they're in the current directory.  But this automation is 
+     * frequently run in another directory, and uses the inputDir 
+     * setting to point where the files are.  Hence this worker 
+     * method to change user.dir, execute the Testlet, and then 
+     * switch back.
+     * Note: will not work in Applet context, obviously.
+     *
+     * @param t Testlet to execute
+     * @param dir to change user.dir to first
+     * @throws propagates any non-user.dir exceptions
+     */
+    public void executeTestletInDir(Testlet t, Datalet d, String dir)
+        throws Exception
+    {
+        final String USER_DIR = "user.dir";
+        try
+        {
+            // Note: we must actually keep a cloned copy of the 
+            //  whole system properties block to replace later 
+            //  in case a Bugzilla testlet changes any other 
+            //  properties during it's execution
+            Properties p = System.getProperties();
+            Properties cacheProps = (Properties)p.clone();
+            // This should, I hope, properly get the correct path 
+            //  for what the inputDir would be, whether it's a 
+            //  relative or absolute path from where we are now
+            File f = new File(inputDir);
+            try
+            {
+                // Note the canonical form seems to be the most reliable for our purpose
+                p.put(USER_DIR, f.getCanonicalPath());
+            } 
+            catch (IOException ioe)
+            {
+                p.put(USER_DIR, f.getAbsolutePath());
+            }
+            System.setProperties(p);
+
+            // Now just execute the Testlet from here
+            t.execute(d);
+
+            // Replace the system properties to be polite!
+            System.setProperties(cacheProps);
+        } 
+        catch (SecurityException se)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, se, "executeTestletInDir threw");
+            reporter.checkErr("executeTestletInDir threw :" + se 
+                    + " cannot execute Testlet in correct dir " + dir);
+        }
+    }
+
+
+    /**
+     * Convenience method to get a Bugzilla Testlet to use.  
+     * Take the TraxDatalet given and find the java classname 
+     * from it.  Then just load an instance of that Testlet class.
+     * 
+     * @return Testlet for use in this test; null if error
+     */
+    public Testlet getTestlet(TraxDatalet d)
+    {
+        try
+        {
+            // Calculate the java classname
+            String testletSourceName = (String)d.options.get(JAVA_SOURCE_NAME);
+            // Potential problem: what if the SourceName doesn't have .java at end?
+            String testletClassName = testletSourceName.substring(0, testletSourceName.indexOf(JAVA_EXTENSION));
+            //@todo should we attempt to compile to a .class file 
+            //  if we can't find the class here?  This adds a bunch 
+            //  of complexity here; so I'm thinking it's better to 
+            //  simply require the user to 'build all' first
+            Class testletClazz = Class.forName(testletClassName);
+            // Create it and set our reporter into it
+            Testlet t = (Testlet)testletClazz.newInstance();
+            t.setLogger((Logger)reporter);
+            return (Testlet)t;
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found, log an error
+            reporter.logThrowable(Logger.ERRORMSG, e, "getTestlet(d) threw");
+            reporter.checkErr("getTestlet(d) threw: " + e.toString());
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to get a default filter for files.  
+     * Returns special file filter for our use.
+     * 
+     * @return FilenameFilter using BugzillaFileRules(excludes).
+     */
+    public FilenameFilter getFileFilter()
+    {
+        // Find a Testlet class to use
+        Class clazz = QetestUtils.testClassForName("org.apache.qetest.xsl.BugzillaFileRules", 
+                                                   QetestUtils.defaultPackages,
+                                                   defaultFileFilter);
+        try
+        {
+            // Create it, optionally with a category
+            String excludes = testProps.getProperty(OPT_EXCLUDES);
+            if ((null != excludes) && (excludes.length() > 1))  // Arbitrary check for non-null, non-blank string
+            {
+                Class[] parameterTypes = { java.lang.String.class };
+                Constructor ctor = clazz.getConstructor(parameterTypes);
+
+                Object[] ctorArgs = { excludes };
+                return (FilenameFilter) ctor.newInstance(ctorArgs);
+            }
+            else
+            {
+                return (FilenameFilter)clazz.newInstance();
+            }
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found!
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to get a default inputDir when none or
+     * a bad one was given.  
+     * @return String pathname of default inputDir "tests\bugzilla".
+     */
+    public String getDefaultInputDir()
+    {
+        return "tests" + File.separator + "bugzilla";
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+      * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Additional options supported by BugzillaTestletDriver:\n"
+                + "    (Note: assumes inputDir=test/tests/bugzilla)"
+                + "    (Note: we do *not* support -embedded)"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        BugzillaTestletDriver app = new BugzillaTestletDriver();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/CmdlineTestlet.java b/test/java/src/org/apache/qetest/xsl/CmdlineTestlet.java
new file mode 100644
index 0000000..58e2c51
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/CmdlineTestlet.java
@@ -0,0 +1,296 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * CmdlineTestlet.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.util.Hashtable;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.ThreadedStreamReader;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+
+/**
+ * Testlet for conformance testing of xsl stylesheet files using 
+ * a command line interface instead of a TransformWrapper.
+ *
+ * This class provides a default algorithim for testing XSLT 
+ * processsors from the command line.  Subclasses define the 
+ * exact command line args, etc. used for different products.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class CmdlineTestlet extends StylesheetTestlet
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.CmdlineTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String describing what this CmdlineTestlet does.
+     */
+    public String getDescription()
+    {
+        return "CmdlineTestlet";
+    }
+
+    /**
+     * Parameter: Actual name of external program to call.  
+     */
+    public static final String OPT_PROGNAME = "progName";
+
+    /**
+     * Default Actual name of external program to call.  
+     * @return TestXSLT, the Xalan-C command line.
+     */
+    public String getDefaultProgName()
+    {
+        return "TestXSLT";
+    }
+
+    /**
+     * Path to external program to call; default is none.  
+     */
+    public static final String OPT_PROGPATH = "progPath";
+
+
+    /** 
+     * Worker method to actually perform the transform; 
+     * overriden to use command line processing.  
+     *
+     * Logs out applicable info; attempts to perform transformation.
+     *
+     * @param datalet to test with
+     * @param transformWrapper to have perform the transform
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void testDatalet(StylesheetDatalet datalet, TransformWrapper transformWrapper)
+            throws Exception
+    {
+        String[] defaultArgs = new String[0];   // Currently unused
+        String[] args = getProgramArguments(datalet, defaultArgs);
+    
+        StringBuffer argBuf = new StringBuffer();
+        for (int i = 0; i < args.length; i++)
+        {
+            argBuf.append(args[i]);
+            argBuf.append(" ");
+        }
+        //@todo Should we log a custom logElement here instead?
+        logger.logMsg(Logger.TRACEMSG, "cmdline executing: " + argBuf.toString());
+
+        // Declare variables ahead of time to minimize latency
+        long startTime = 0;
+        long overallTime = 0;
+
+        // Use our worker method to execute the process, which 
+        //  runs the test via the command line
+        startTime = System.currentTimeMillis();
+        execProcess(args, null);
+        overallTime = System.currentTimeMillis() - startTime;
+        
+    }
+
+
+    /**
+     * Worker method to get list of arguments specific to this program.  
+     * 
+     * <p>Must be overridden for different processors, obviously.  
+     * This implementation returns the args for Xalan-C TestXSLT</p>
+     * 
+     * @param program path\name of program to Runtime.exec()
+     * @param defaultArgs any additional arguments to pass
+     * @return String array of arguments suitable to pass to 
+     * Runtime.exec()
+     */
+    public String[] getProgramArguments(StylesheetDatalet datalet, String[] defaultArgs)
+    {
+        final int NUMARGS = 7;
+        String[] args = new String[defaultArgs.length + NUMARGS];
+        String progName = datalet.options.getProperty(OPT_PROGNAME, getDefaultProgName());
+        String progPath = datalet.options.getProperty(OPT_PROGPATH);
+        if ((null != progPath) && (progPath.length() > 0))
+        {
+            args[0] = progPath + File.separator + progName;
+        }
+        else
+        {
+            // Pesume the program is on the PATH already...
+            args[0] = progName;
+        }
+    
+        // Default args for Xalan-C TestXSLT
+        args[1] = "-in";
+        args[2] = datalet.xmlName;
+        args[3] = "-xsl";
+        args[4] = datalet.inputName;
+        args[5] = "-out";
+        args[6] = datalet.outputName;
+
+        if (defaultArgs.length > 0)
+            System.arraycopy(defaultArgs, 0, args, NUMARGS, defaultArgs.length);
+
+        return args;
+    }
+
+
+    /**
+     * Worker method to shell out an external process.  
+     * 
+     * <p>Does a simple capturing of the out and err streams from
+     * the process and logs them out.  Inherits the same environment 
+     * that the current JVM is in.</p>
+     * 
+     * @param cmdline actual command line to run, including program name
+     * @param environment passed as-is to Process.run
+     * @return return value from program
+     * @exception Exception may be thrown by Runtime.exec
+     */
+    public void execProcess(String[] cmdline, String[] environment)
+            throws Exception
+    {
+        if ((cmdline == null) || (cmdline.length < 1))
+        {
+            logger.checkFail("execProcess called with null/blank arguments!");
+            return;
+        }
+
+        int bufSize = 2048; // Arbitrary bufSize seems to work well
+        ThreadedStreamReader outReader = new ThreadedStreamReader();
+        ThreadedStreamReader errReader = new ThreadedStreamReader();
+        Runtime r = Runtime.getRuntime();
+        java.lang.Process proc = null;  // Fully declare to not conflict with org.apache.xalan.xslt.Process
+
+        // Actually begin executing the program
+        logger.logMsg(Logger.TRACEMSG, "execProcess starting " + cmdline[0]);
+
+        proc = r.exec(cmdline, environment);
+
+        // Immediately begin capturing any output therefrom
+        outReader.setInputStream(
+            new BufferedReader(
+                new InputStreamReader(proc.getInputStream()), bufSize));
+        errReader.setInputStream(
+            new BufferedReader(
+                new InputStreamReader(proc.getErrorStream()), bufSize));
+
+        // Start two threads off on reading the System.out and System.err from proc
+        outReader.start();
+        errReader.start();
+        int processReturnVal = -2; // HACK the default
+        try
+        {
+            // Wait for the process to exit normally
+            processReturnVal = proc.waitFor();
+        }
+        catch (InterruptedException ie1)
+        {
+            logger.logThrowable(Logger.ERRORMSG, ie1, 
+                                  "execProcess proc.waitFor() threw");
+        }
+
+        // Now that we're done, presumably the Readers are also done
+        StringBuffer sysOut = null;
+        StringBuffer sysErr = null;
+        try
+        {
+            outReader.join();
+            sysOut = outReader.getBuffer();
+        }
+        catch (InterruptedException ie2)
+        {
+            logger.logThrowable(Logger.ERRORMSG, ie2, "Joining outReader threw");
+        }
+
+        try
+        {
+            errReader.join();
+            sysErr = errReader.getBuffer();
+        }
+        catch (InterruptedException ie3)
+        {
+            logger.logThrowable(Logger.ERRORMSG, ie3, "Joining errReader threw");
+        }
+
+        checkOutputStreams(cmdline, sysOut, sysErr, processReturnVal);
+    }
+
+
+    /** 
+     * Worker method to evaluate the System.out/.err streams of 
+     * a particular processor.  
+     *
+     * @param cmdline that was used for execProcess
+     * @param outBuf buffer from execProcess' System.out
+     * @param errBuf buffer from execProcess' System.err
+     * @param processReturnVal from execProcess
+     */
+    protected void checkOutputStreams(String[] cmdline, StringBuffer outBuf, 
+            StringBuffer errBuf, int processReturnVal)
+    {
+        Hashtable attrs = new Hashtable();
+        attrs.put("program", cmdline[0]);
+        attrs.put("returnVal", String.valueOf(processReturnVal));
+
+        StringBuffer buf = new StringBuffer();
+        if ((null != errBuf) && (errBuf.length() > 0))
+        {
+            buf.append("<system-err>");
+            buf.append(errBuf);
+            buf.append("</system-err>\n");
+        }
+        if ((null != outBuf) && (outBuf.length() > 0))
+        {
+            buf.append("<system-out>");
+            buf.append(outBuf);
+            buf.append("</system-out>\n");
+        }
+        logger.logElement(Logger.INFOMSG, "checkOutputStreams", attrs, buf.toString());
+        attrs = null;
+        buf = null;
+    }
+
+
+    /** 
+     * Worker method to get a TransformWrapper; overridden as no-op.  
+     *
+     * @param datalet to test with
+     * @return null; CmdlineTestlet does not use this
+     */
+    protected TransformWrapper getTransformWrapper(StylesheetDatalet datalet)
+    {
+        return null;
+    }
+}  // end of class CmdlineTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/ConformanceDirRules.java b/test/java/src/org/apache/qetest/xsl/ConformanceDirRules.java
new file mode 100644
index 0000000..6a4c62f
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ConformanceDirRules.java
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+
+/**
+ * Returns directories that are either on an inclusion list, or
+ * just ones that don't begin with [x|X], or are 'CVS'.
+ * Rudimentary multiple inclusion dirs are now supported.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ConformanceDirRules implements FilenameFilter
+{
+
+    /** Initialize for defaults (not using inclusion list) no-op. */
+    public ConformanceDirRules(){}
+
+    /**
+     * Initialize with a case-sensitive Hash of directory names to include.  
+     *
+     * @param iDirs hash of inclusion dirs
+     */
+    public ConformanceDirRules(Hashtable iDirs)
+    {
+        setIncludeDirs(iDirs);
+    }
+
+    /**
+     * Initialize with a case-insensitive String directory name(s) to include.  
+     *
+     * @param incDir semicolon-delimited string of inclusion dir(s)
+     */
+    public ConformanceDirRules(String incDir)
+    {
+        setIncludeDirs(incDir);
+    }
+
+    /**
+     * Hash of directory names to include.
+     * <p>Keys are dir names, values in hash are ignored. Note that
+     * directory names are case-sensitive.  If list is not set somehow,
+     * then we return all dirs that don't begin with [x|X].</p>
+     */
+    protected Hashtable includeDirs = null;
+
+    /** Exclude CVS repository dirs always. */
+    public static final String CVS = "CVS";
+
+    /**
+     * Accessor methods for case-sensitive Hash of directory names to include.  
+     *
+     * @param iDirs hash of inclusion dirs
+     */
+    public void setIncludeDirs(Hashtable iDirs)
+    {
+
+        if (iDirs != null)
+            includeDirs = (Hashtable) iDirs.clone();
+        else
+            includeDirs = null;
+    }
+
+    /**
+     * Accessor methods for case-sensitive Hash of directory names to include.  
+     *
+     * @return clone of our hash of inclusion dirs
+     */
+    public Hashtable getIncludeDirs()
+    {
+
+        if (includeDirs != null)
+        {
+            Hashtable tempHash = (Hashtable) includeDirs.clone();
+
+            return (tempHash);
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    /**
+     * Accessor method to set a case-insensitive String directory name to include.  
+     *
+     * @param incDir semicolon-delimited string of inclusion dir(s)
+     */
+    public void setIncludeDirs(String incDir)
+    {
+        setIncludeDirs(incDir, false);
+    }
+
+    /**
+     * Accessor method to set an optionally case-sensitive String directory name to include.
+     * <p><b>Note:</b> simply uses .toUpperCase() and .toLowerCase() on the input string;
+     * does not do full case-checking on the entire string!</p>
+     *
+     * @param incDir semicolon-delimited string of inclusion dir(s)
+     * @param caseSensitive - should be obvious, shouldn't it?
+     */
+    public void setIncludeDirs(String incDir, boolean caseSensitive)
+    {
+
+        if ((incDir != null) && (incDir != ""))
+        {
+            includeDirs = null;
+            includeDirs = new Hashtable();
+
+            StringTokenizer st = new StringTokenizer(incDir, ";");
+            while (st.hasMoreTokens())
+            {
+                String tmp = st.nextToken();
+                // Value in hash is ignored
+                includeDirs.put(tmp, Boolean.TRUE);
+                if (!caseSensitive)
+                {
+                    includeDirs.put(tmp.toUpperCase(), Boolean.TRUE);
+                    includeDirs.put(tmp.toLowerCase(), Boolean.TRUE);
+                }
+            }
+        }
+        else
+        {
+            includeDirs = null;
+        }
+    }
+
+    /**
+     * Tests if a specified file should be included in a file list.
+     * Returns only directories that are on our inclusion list.
+     * Currently may be case-sensitive or insensitive, depending on
+     * how/if our inclusion list was set.
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name should be included in the file list; <code>false</code> otherwise.
+     * @since JDK1.0
+     */
+    public boolean accept(File dir, String name)
+    {
+
+        // Shortcut to only look at directories
+        File file = new File(dir, name);
+
+        if (!file.isDirectory())
+            return (false);
+
+        // If we have an inclusion list, just look at that
+        if (includeDirs != null)
+        {
+            if (includeDirs.containsKey(name))
+                return (true);
+            else
+                return (false);
+        }
+
+        // Otherwise, exclude any other names that begin with [x|X]
+        char firstChar = name.charAt(0);
+
+        if ((firstChar == 'x') || (firstChar == 'X'))
+            return (false);
+        else if (CVS.equals(name))  // ALSO: exclude "CVS" dirs from our source control
+            return (false);
+        else
+            return (true);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/ConformanceFileRules.java b/test/java/src/org/apache/qetest/xsl/ConformanceFileRules.java
new file mode 100644
index 0000000..a03efd0
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ConformanceFileRules.java
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+
+/**
+ * Simple file filter; returns *.xsl non-dir files that start with the directory name.
+ * Has crude support for an excludes list of filename bases.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ConformanceFileRules implements FilenameFilter
+{
+
+    /** Initialize for defaults (not using inclusion list) no-op. */
+    public ConformanceFileRules(){}
+
+    /**
+     * Initialize with a case-sensitive Hash of file names to exclude.  
+     *
+     * NEEDSDOC @param excludesHash
+     */
+    public ConformanceFileRules(Hashtable excludesHash)
+    {
+        setExcludes(excludesHash);
+    }
+
+    /**
+     * Initialize with a case-insensitive semicolon-delimited String of file names to exclude.  
+     *
+     * NEEDSDOC @param excludesStr
+     */
+    public ConformanceFileRules(String excludesStr)
+    {
+        setExcludes(excludesStr);
+    }
+
+    /**
+     * Hash of file name portions to exclude.
+     * <p>Keys are base file names, values in hash are ignored. Note that
+     * file names may be case-sensitive.</p>
+     * <p>Note that we will exclude any filename in our excludes.</p>
+     */
+    protected Hashtable excludeFiles = null;
+
+    /**
+     * Accessor methods to set a case-sensitive Hash of file names to exclude.  
+     *
+     * NEEDSDOC @param exFiles
+     */
+    public void setExcludes(Hashtable exFiles)
+    {
+
+        if (exFiles != null)
+            excludeFiles = (Hashtable) exFiles.clone();
+        else
+            excludeFiles = null;
+    }
+
+    /**
+     * Accessor methods to set a case-sensitive Hash of file names to exclude.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public Hashtable getExcludes()
+    {
+
+        if (excludeFiles != null)
+        {
+            Hashtable tempHash = (Hashtable) excludeFiles.clone();
+
+            return tempHash;
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    /**
+     * Accessor method to set a list of case-insensitive String
+     * directory name(s) to exclude.
+     * Names should be separated by {@link #SEPARATOR semicolon}.
+     *
+     * NEEDSDOC @param exFiles
+     */
+    public void setExcludes(String exFiles)
+    {
+        setExcludes(exFiles, false);
+    }
+
+    /** Semicolon separator for {@link #setExcludes(java.lang.String)}. */
+    public static final String SEPARATOR = ";";
+
+    /**
+     * Accessor method to set an optionally case-sensitive String file name(s) to exclude.
+     * <p><b>Note:</b> simply uses .toUpperCase() and .toLowerCase() on the input string(s);
+     * does not do full case-checking on the entire string!</p>
+     *
+     * NEEDSDOC @param exFiles
+     * NEEDSDOC @param caseSensitive
+     */
+    public void setExcludes(String exFiles, boolean caseSensitive)
+    {
+
+        StringTokenizer st = new StringTokenizer(exFiles, SEPARATOR);
+
+        excludeFiles = null;
+        excludeFiles = new Hashtable();
+
+        for (int i = 0; st.hasMoreTokens(); i++)
+        {
+            String fName = st.nextToken();
+
+            excludeFiles.put(fName, "");
+
+            if (!caseSensitive)
+            {
+                excludeFiles.put(fName.toUpperCase(), "");
+                excludeFiles.put(fName.toLowerCase(), "");
+            }
+        }
+    }
+
+    /**
+     * Tests if a specified file should be included in a file list.
+     * <p>Returns true only for *.xsl files whose names start with
+     * the name of the directory, case-insensitive (uses .toLowerCase()).
+     * <b>Except:</b> if any filenames contain an item in excludeFiles.</p>
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name should be included in the file list; <code>false</code> otherwise.
+     * @since JDK1.0
+     */
+    public boolean accept(File dir, String name)
+    {
+
+        // Shortcuts for bogus filenames and dirs
+        if (name == null || dir == null)
+            return false;
+
+        // Exclude any files that match an exclude rule
+        if ((excludeFiles != null) && (excludeFiles.containsKey(name)))
+            return false;
+
+        File file = new File(dir, name);
+
+        return (!file.isDirectory()) && name.toLowerCase().endsWith("xsl")
+               && name.toLowerCase().startsWith(dir.getName().toLowerCase());
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/ConformanceXSLFileRules.java b/test/java/src/org/apache/qetest/xsl/ConformanceXSLFileRules.java
new file mode 100644
index 0000000..441210f
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ConformanceXSLFileRules.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+
+/**
+ * Simple file filter; returns *.xsl non-dir files.
+ * Has crude support for an excludes list of filename bases.
+ * Copied from ConformanceFileRules, used for ad-hoc testing 
+ * where you don't want to rename files to match dir names.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ConformanceXSLFileRules implements FilenameFilter
+{
+
+    /** Initialize for defaults (not using inclusion list) no-op. */
+    public ConformanceXSLFileRules(){}
+
+    /**
+     * Initialize with a case-sensitive Hash of file names to exclude.  
+     *
+     * @param excludesHash where keys are case-sensitive filenames 
+     * to exclude; values are ignored
+     */
+    public ConformanceXSLFileRules(Hashtable excludesHash)
+    {
+        setExcludes(excludesHash);
+    }
+
+    /**
+     * Initialize with a case-insensitive semicolon-delimited String of file names to exclude.  
+     *
+     * @param excludesStr well, mostly case-insensitive string
+     */
+    public ConformanceXSLFileRules(String excludesStr)
+    {
+        setExcludes(excludesStr);
+    }
+
+    /**
+     * Hash of file name portions to exclude.
+     * <p>Keys are base file names, values in hash are ignored. Note that
+     * file names may be case-sensitive.</p>
+     * <p>Note that we will exclude any filename in our excludes.</p>
+     */
+    protected Hashtable excludeFiles = null;
+
+    /**
+     * Accessor methods to set a case-sensitive Hash of file names to exclude.  
+     *
+     * @param exFiles where keys are case-sensitive filenames 
+     * to exclude; values are ignored
+     */
+    public void setExcludes(Hashtable exFiles)
+    {
+
+        if (exFiles != null)
+            excludeFiles = (Hashtable) exFiles.clone();
+        else
+            excludeFiles = null;
+    }
+
+    /**
+     * Accessor methods to get a case-sensitive Hash of file names to exclude.  
+     *
+     * @return cloned Hashtable with keys of filenames to exclude
+     */
+    public Hashtable getExcludes()
+    {
+
+        if (excludeFiles != null)
+        {
+            Hashtable tempHash = (Hashtable) excludeFiles.clone();
+
+            return tempHash;
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    /**
+     * Accessor method to set a list of case-insensitive String
+     * directory name(s) to exclude.
+     * Names should be separated by {@link #SEPARATOR semicolon}.
+     *
+     * @param excludesStr well, mostly case-insensitive string
+     */
+    public void setExcludes(String exFiles)
+    {
+        setExcludes(exFiles, false);
+    }
+
+    /** Semicolon separator for {@link #setExcludes(java.lang.String)}. */
+    public static final String SEPARATOR = ";";
+
+    /**
+     * Accessor method to set an optionally case-sensitive String file name(s) to exclude.
+     * <p><b>Note:</b> simply uses .toUpperCase() and .toLowerCase() on the input string(s);
+     * does not do full case-checking on the entire string!</p>
+     *
+     * @param exFiles  well, mostly case-insensitive string
+     * @param caseSensitive if we should add the 
+     * toUpperCase() and toLowerCase() or not
+     */
+    public void setExcludes(String exFiles, boolean caseSensitive)
+    {
+
+        StringTokenizer st = new StringTokenizer(exFiles, SEPARATOR);
+
+        excludeFiles = null;
+        excludeFiles = new Hashtable();
+
+        for (int i = 0; st.hasMoreTokens(); i++)
+        {
+            String fName = st.nextToken();
+
+            excludeFiles.put(fName, "");
+
+            if (!caseSensitive)
+            {
+                excludeFiles.put(fName.toUpperCase(), "");
+                excludeFiles.put(fName.toLowerCase(), "");
+            }
+        }
+    }
+
+    /**
+     * Tests if a specified file should be included in a file list.
+     * <p>Returns true only for *.xsl files.
+     * <b>Except:</b> if any filenames contain an item in excludeFiles.</p>
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name should be included in the file list; <code>false</code> otherwise.
+     * @since JDK1.0
+     */
+    public boolean accept(File dir, String name)
+    {
+
+        // Shortcuts for bogus filenames and dirs
+        if (name == null || dir == null)
+            return false;
+
+        // Exclude any files that match an exclude rule
+        if ((excludeFiles != null) && (excludeFiles.containsKey(name)))
+            return false;
+
+        File file = new File(dir, name);
+
+        return (!file.isDirectory() && name.toLowerCase().endsWith(".xsl"));
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/ErrorHandlerTestlet.java b/test/java/src/org/apache/qetest/xsl/ErrorHandlerTestlet.java
new file mode 100644
index 0000000..fe709a5
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ErrorHandlerTestlet.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.lang.reflect.Constructor;
+
+import javax.xml.transform.ErrorListener;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.trax.LoggingErrorListener;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+import org.apache.qetest.xslwrapper.TraxWrapperUtils;
+
+/**
+ * Testlet for testing of xsl stylesheets using a custom 
+ * JAXP ErrorHandler.
+ *
+ * This class provides the testing algorithim used for verifying 
+ * how a XSLT processor handles stylesheets with known expected 
+ * errors conditions in them using a JAXP ErrorHandler.  Note that 
+ * this testlet is effectively only applicable with 
+ * TransformWrappers that wrap JAXP-compatible implementations.
+ *
+ * Attempts to separate validation between stylesheet parse/build 
+ * errors and transform errors.
+ *
+ * //@todo better doc on our algorithim
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class ErrorHandlerTestlet extends StylesheetTestlet
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.ErrorHandlerTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+
+    /**
+     * Accesor method for a brief description of this test.  
+     * @return String describing what this ErrorHandlerTestlet does.
+     */
+    public String getDescription()
+    {
+        return "ErrorHandlerTestlet";
+    }
+
+
+    /**
+     * Our testing state: during stylesheet build or transform.
+     */
+    protected boolean duringXSLBuild = true;
+
+
+    /** 
+     * Worker method to actually perform the transform: overridden.  
+     *
+     * Explicitly builds a stylesheet first, then does transform.  
+     * With duringXSLBuild state above, we can then validate 
+     * when exceptions/errors are thrown.
+     * Note: Does not properly handle embedded tests yet!
+     *
+     * @param datalet to test with
+     * @param transformWrapper to have perform the transform
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void testDatalet(StylesheetDatalet datalet, TransformWrapper transformWrapper)
+            throws Exception
+    {
+        //@todo Should we log a custom logElement here instead?
+        logger.logMsg(Logger.TRACEMSG, "executing with: inputName=" + datalet.inputName
+                      + " xmlName=" + datalet.xmlName + " outputName=" + datalet.outputName
+                      + " goldName=" + datalet.goldName + " flavor="  + datalet.flavor);
+
+        // Simply have the wrapper do all the transforming
+        //  or processing for us - we handle either normal .xsl 
+        //  stylesheet tests or just .xml embedded tests
+        long retVal = 0L;
+        if (null == datalet.inputName)
+        {
+            // presume it's an embedded test
+            //@todo make this handle duringXSLBuild state!
+            long [] times = transformWrapper.transformEmbedded(datalet.xmlName, datalet.outputName);
+            retVal = times[TransformWrapper.IDX_OVERALL];
+        }
+        else
+        {
+            // presume it's a normal stylesheet test
+            // First build the stylesheet
+            duringXSLBuild = true;
+            long[] times = transformWrapper.buildStylesheet(datalet.inputName);
+            duringXSLBuild = false;
+            times = transformWrapper.transformWithStylesheet(datalet.xmlName, datalet.outputName);
+        }
+    }
+
+
+    /** 
+     * Worker method to get a TransformWrapper: overridden.  
+     *
+     * @param datalet to test with
+     * @return TransformWrapper to use with this datalet
+     */
+    protected TransformWrapper getTransformWrapper(StylesheetDatalet datalet)
+    {
+        try
+        {
+            TransformWrapper transformWrapper = TransformWrapperFactory.newWrapper(datalet.flavor);
+            // Set our datalet's options as options in the wrapper
+            // PLUS put in special key for our ErrorListener - this 
+            //  will log any errors to our logger
+            //@todo add expected data here as well so that we can 
+            //  actually validate the specific errors logged
+            ErrorListener listener = (ErrorListener)getLoggingHandler(datalet);
+            datalet.options.put(TransformWrapper.SET_PROCESSOR_ATTRIBUTES + TraxWrapperUtils.SET_ERROR_LISTENER, 
+                                listener);
+            transformWrapper.newProcessor(datalet.options);
+            return transformWrapper;
+        }
+        catch (Throwable t)
+        {
+            logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " newWrapper/newProcessor threw");
+            logger.checkErr(getCheckDescription(datalet) + " newWrapper/newProcessor threw: " + t.toString());
+            return null;
+        }
+    }
+
+
+    /** 
+     * Worker method to get a specific ErrorListener for a datalet.  
+     *
+     * @param datalet to test with
+     * @return LoggingHandler presumably suitable for use as 
+     * a JAXP ErrorListener or SAX ErrorHandler
+     */
+    protected LoggingHandler getLoggingHandler(StylesheetDatalet datalet)
+    {
+        try
+        {
+            Class clazz = QetestUtils.testClassForName(datalet.options.getProperty("errorListener"), 
+                                                        QetestUtils.defaultPackages, 
+                                                        "org.apache.qetest.trax.LoggingErrorListener");
+                                                
+            // Get the class, find appropriate constructor, 
+            //  munge together appropriate ctor args, and 
+            //  call the constructor to get a LoggingHandler
+            Class[] ctorTypes = new Class[1];
+            ctorTypes[0] = Logger.class;
+            Constructor ctor = clazz.getConstructor(ctorTypes);
+
+            Object[] ctorArgs = new Object[1];
+            ctorArgs[0] = (Object) logger;
+            LoggingHandler handler = (LoggingHandler) ctor.newInstance(ctorArgs);
+            if ((handler instanceof LoggingErrorListener) || 
+                (handler instanceof LoggingSAXErrorHandler))
+            {
+                // Mimic DefaultErrorHandler behavior
+                ((LoggingErrorListener)handler).setThrowWhen(LoggingErrorListener.THROW_ON_ERROR & LoggingErrorListener.THROW_ON_FATAL);
+            }
+            return handler;
+        }
+        catch (Throwable t)
+        {
+            logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " newWrapper/newProcessor threw");
+            logger.checkErr(getCheckDescription(datalet) + " newWrapper/newProcessor threw: " + t.toString());
+            return null;
+        }
+    }
+}  // end of class ErrorHandlerTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/ExtensionTestlet.java b/test/java/src/org/apache/qetest/xsl/ExtensionTestlet.java
new file mode 100644
index 0000000..bce0784
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ExtensionTestlet.java
@@ -0,0 +1,228 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ExtensionTestlet.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.lang.reflect.Method;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+
+/**
+ * Testlet for testing xsl stylesheet extensions.  
+ *
+ * This class provides the testing algorithim used for verifying 
+ * Xalan-specific extensions, primarily by transforming stylesheets 
+ * that use extensions and optionally by allowing any Java-based 
+ * extension classes to verify themselves and log out info.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class ExtensionTestlet extends StylesheetTestlet
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.ExtensionTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /** Convenience constant: Property key for Java classnames.  */
+    public static final String JAVA_CLASS_NAME = "java.class.name";
+
+    /** Convenience constant: Property key for TestableExtension objects.  */
+    public static final String TESTABLE_EXTENSION = "testable.extension";
+
+    /**
+     * Accesor method for a brief description of this test.  
+     * @return String describing what this ExtensionTestlet does.
+     */
+    public String getDescription()
+    {
+        return "ExtensionTestlet";
+    }
+
+
+    /** 
+     * Worker method to perform any pre-processing needed.  
+     *
+     * This optionally does deleteOutFile, then attempts to load 
+     * a matching TestableExtension class that matches the datalet's 
+     * stylesheet.  If one is found, we call preCheck on that too.
+     *
+     * @param datalet to test with
+     */
+    protected void testletInit(StylesheetDatalet datalet)
+    {
+        // Simply grab any superclass functionality first
+        super.testletInit(datalet);
+        
+        // Now do custom initialization for extensions
+
+        // See if we have a Java-based extension class
+        // Side effect: fills in datalet.options
+        findExtensionClass(datalet);
+
+        // If found, ask the class to validate
+        Class extensionClazz = (Class)datalet.options.get(TESTABLE_EXTENSION);
+        if (null != extensionClazz)
+        {
+            boolean ignored = invokeMethodOn(extensionClazz, "preCheck", datalet);
+        }
+        else
+        {
+            logger.logMsg(Logger.TRACEMSG, "No extension class found");
+        }
+    }
+
+
+    /** 
+     * Worker method to validate output file with gold.  
+     *
+     * Logs out applicable info while validating output file.
+     * Most commonly will call the underlying TestableExtension's 
+     * postCheck method to get validation done.
+     *
+     * @param datalet to test with
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void checkDatalet(StylesheetDatalet datalet)
+            throws Exception
+    {
+        // If we have an associated extension class, call postCheck
+        // If found, ask the class to validate
+        Class extensionClazz = (Class)datalet.options.get(TESTABLE_EXTENSION);
+        if (null != extensionClazz)
+        {
+            boolean ignored = invokeMethodOn(extensionClazz, "postCheck", datalet);
+        }
+        else
+        {
+            // Have our parent class do it's own validation
+            super.checkDatalet(datalet);
+        }
+    }
+
+
+    /**
+     * Worker method: Try to find a matching .class file for this .xsl.  
+     * 
+     * Accesses our class member logger.
+     * @param d datalet to use for testing
+     */
+    protected void findExtensionClass(StylesheetDatalet datalet)
+    {
+        // Find the basename of the stylesheet
+        String classname = null;
+        if (null != datalet.inputName)
+        {
+            classname = datalet.inputName.substring(0, datalet.inputName.indexOf(".xsl"));
+        }
+        else
+        {
+            classname = datalet.xmlName.substring(0, datalet.xmlName.indexOf(".xml"));
+        }
+        
+        // Also rip off any pathing info if it's found
+        classname = classname.substring(classname.lastIndexOf(File.separator) + 1);
+            
+        try
+        {
+            //@todo future work: since these Java extensions are all 
+            //  packageless, figure out a better way to reduce name 
+            //  collisions - perhaps allow as org.apache.qetest.something
+            Class extensionClazz = Class.forName(classname);
+            logger.logMsg(Logger.TRACEMSG, "findExtensionClass found for " 
+                    + classname + " which is " + extensionClazz.getName());
+
+            // Ensure the class is a TestableExtension
+            if ((TestableExtension.class).isAssignableFrom((Class)extensionClazz))
+            {
+                // Store info about class in datalet
+                datalet.options.put(JAVA_CLASS_NAME, extensionClazz.getName());
+                datalet.options.put(TESTABLE_EXTENSION, extensionClazz);
+            }
+            else
+            {
+                logger.logMsg(Logger.STATUSMSG, "findExtensionClass was not a TestableExtension, was: " + extensionClazz);
+            }
+        } 
+        catch (Exception e)
+        {
+            logger.logMsg(Logger.INFOMSG, "findExtensionClass not found for " + classname);
+        }
+    }
+
+
+    /**
+     * Worker method: Call a method on this extension.  
+     * Only works for preCheck/postCheck, since they have the 
+     * proper method signatures.
+     * 
+     * Accesses our class member logger.
+     * @param extensionClazz Class that's assumed to be a TestableExtension
+     * @param methodName method to invoke
+     * @param datalet to pass to method
+     */
+    protected boolean invokeMethodOn(Class extensionClazz, 
+            String methodName, StylesheetDatalet datalet)
+    {
+        try
+        {
+            Class[] parameterTypes = new Class[2];
+            parameterTypes[0] = Logger.class;
+            parameterTypes[1] = StylesheetDatalet.class;
+            Method method = extensionClazz.getMethod(methodName, parameterTypes);
+    
+            // Call static method to perform pre-transform validation
+            // Pass on the datalet's options in case it uses them
+            Object[] parameters = new Object[2];
+            parameters[0] = logger;
+            parameters[1] = datalet;
+            Object returnValue = method.invoke(null, parameters);
+            // If the method returned something, return that ..
+            if ((null != returnValue)
+                && (returnValue instanceof Boolean))
+            {
+                return ((Boolean)returnValue).booleanValue();
+            }
+            else
+            {
+                // .. otherwise just return true by default
+                return true;
+            }
+        }
+        catch (Exception e)
+        {
+            logger.logThrowable(Logger.WARNINGMSG, e, "invokeMethodOn(" + methodName + ") threw");
+            logger.checkErr("invokeMethodOn(" + methodName + ") threw: " + e.toString());
+            return false;
+        }
+    }
+
+}  // end of class ExtensionTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/GoldFileRules.java b/test/java/src/org/apache/qetest/xsl/GoldFileRules.java
new file mode 100644
index 0000000..8f70c50
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/GoldFileRules.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.util.Hashtable;
+
+/**
+ * Simple file filter; returns *.xsl non-dir files that start with the directory name.
+ * Has crude support for an excludes list of filename bases.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class GoldFileRules extends ConformanceFileRules
+{
+
+    /** Initialize for defaults (not using inclusion list) no-op. */
+    public GoldFileRules(){}
+
+    /**
+     * Initialize with a case-sensitive Hash of file names to exclude.  
+     *
+     * NEEDSDOC @param excludesHash
+     */
+    public GoldFileRules(Hashtable excludesHash)
+    {
+    	super(excludesHash);
+    }
+
+    /**
+     * Initialize with a case-insensitive semicolon-delimited String of file names to exclude.  
+     *
+     * NEEDSDOC @param excludesStr
+     */
+    public GoldFileRules(String excludesStr)
+    {
+        super(excludesStr);
+    }
+
+    /**
+     * Tests if a specified file should be included in a file list.
+     * <p>Returns true only for *.xsl files whose names start with
+     * the name of the directory, case-insensitive (uses .toLowerCase()).
+     * <b>Except:</b> if any filenames contain an item in excludeFiles.</p>
+     * @param dir the directory in which the file was found.
+     * @param name the name of the file.
+     * @return <code>true</code> if the name should be included in the file list; <code>false</code> otherwise.
+     * @since JDK1.0
+     */
+    public boolean accept(File dir, String name)
+    {
+
+        // Shortcuts for bogus filenames and dirs
+        if (name == null || dir == null)
+            return false;
+
+        // Exclude any files that match an exclude rule
+        if ((excludeFiles != null) && (excludeFiles.containsKey(name)))
+            return false;
+
+        File file = new File(dir, name);
+
+        return (!file.isDirectory()) && name.toLowerCase().endsWith(".out")
+               && name.toLowerCase().startsWith(dir.getName().toLowerCase());
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/LoggingContentHandler.java b/test/java/src/org/apache/qetest/xsl/LoggingContentHandler.java
new file mode 100644
index 0000000..19c762a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/LoggingContentHandler.java
@@ -0,0 +1,282 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingContentHandler.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+/**
+ * Cheap-o ContentHandler for use by API tests.
+ * <p>Implements ContentHandler and dumps simplistic info 
+ * everything to a Logger; a way to debug SAX stuff.</p>
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingContentHandler extends LoggingHandler implements ContentHandler
+{
+
+    /** No-op sets logger to default.  */
+    public LoggingContentHandler()
+    {
+        setLogger(getDefaultLogger());
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param r Logger we should log to
+     */
+    public LoggingContentHandler(Logger l)
+    {
+        setLogger(l);
+    }
+
+
+    /**
+     * Our default handler that we pass all events through to.
+     */
+    protected ContentHandler defaultHandler = null;
+
+
+    /**
+     * Set a default handler for us to wrapper.
+     * Set a ContentHandler for us to use.
+     *
+     * @param default Object of the correct type to pass-through to;
+     * throws IllegalArgumentException if null or incorrect type
+     */
+    public void setDefaultHandler(Object defaultC)
+    {
+        try
+        {
+            defaultHandler = (ContentHandler)defaultC;
+        }
+        catch (Throwable t)
+        {
+            throw new java.lang.IllegalArgumentException("setDefaultHandler illegal type: " + t.toString());
+        }
+    }
+
+
+    /**
+     * Accessor method for our default handler.
+     *
+     * @return default (Object) our default handler; null if unset
+     */
+    public Object getDefaultHandler()
+    {
+        return (Object)defaultHandler;
+    }
+
+
+    /** Prefixed to all logger msg output.  */
+    public final String prefix = "LCH:";
+
+
+    /** Cheap-o string representation of last event we got.  */
+    protected String lastItem = NOTHING_HANDLED;
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @param s string to set
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @return last event string we had
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+
+    /** setExpected, etc. not yet implemented.  */
+
+
+    /** How many characters to report from characters event.  */
+    private int charLimit = 30;
+
+
+    /**
+     * How many characters to report from characters event.  
+     * @param l charLimit for us to use
+     */
+    public void setCharLimit(int l)
+    {
+        charLimit = l;
+    }
+
+
+    /**
+     * How many characters to report from characters event.  
+     * @return charLimit we use
+     */
+    public int getCharLimit()
+    {
+        return charLimit;
+    }
+
+
+    ////////////////// Implement ContentHandler ////////////////// 
+    protected Locator ourLocator = null;
+    
+    public void setDocumentLocator (Locator locator)
+    {
+        // Note: this implies this class is !not! threadsafe
+        setLastItem("setDocumentLocator");
+        ourLocator = locator; // future use
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.setDocumentLocator(locator);
+    }
+
+
+    public void startDocument ()
+        throws SAXException
+    {
+        setLastItem("startDocument");
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.startDocument();
+    }
+
+
+    public void endDocument()
+        throws SAXException
+    {
+        setLastItem("endDocument");
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.endDocument();
+    }
+
+
+    public void startPrefixMapping (String prefix, String uri)
+        throws SAXException
+    {
+        setLastItem("startPrefixMapping: " + prefix + ", " + uri);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.startPrefixMapping(prefix, uri);
+    }
+
+
+    public void endPrefixMapping (String prefix)
+        throws SAXException
+    {
+        setLastItem("endPrefixMapping: " + prefix);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.endPrefixMapping(prefix);
+    }
+
+
+    public void startElement (String namespaceURI, String localName,
+                                                        String qName, Attributes atts)
+        throws SAXException
+    {
+        StringBuffer buf = new StringBuffer();
+        buf.append("startElement: " + namespaceURI + ", " 
+                   + namespaceURI + ", " + qName);
+                   
+        int n = atts.getLength();
+        for(int i = 0; i < n; i++)
+        {
+            buf.append(", " + atts.getQName(i));
+        }
+        setLastItem(buf.toString());
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.startElement(namespaceURI, localName, qName, atts);
+    }
+
+
+    public void endElement (String namespaceURI, String localName, String qName)
+        throws SAXException
+    {
+        setLastItem("endElement: " + namespaceURI + ", " + namespaceURI + ", " + qName);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.endElement(namespaceURI, localName, qName);
+    }
+
+
+    public void characters (char ch[], int start, int length)
+        throws SAXException
+    {
+        String s = new String(ch, start, (length > charLimit) ? charLimit : length);
+        if(length > charLimit)
+            setLastItem("characters: \"" + s + "\"...");
+        else
+            setLastItem("characters: \"" + s + "\"");
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.characters(ch, start, length);
+    }
+
+
+    public void ignorableWhitespace (char ch[], int start, int length)
+        throws SAXException
+    {
+        setLastItem("ignorableWhitespace: len " + length);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.ignorableWhitespace(ch, start, length);
+    }
+
+
+    public void processingInstruction (String target, String data)
+        throws SAXException
+    {
+        setLastItem("processingInstruction: " + target + ", " + data);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.processingInstruction(target, data);
+    }
+
+
+    public void skippedEntity (String name)
+        throws SAXException
+    {
+        setLastItem("skippedEntity: " + name);
+        logger.logMsg(level, prefix + getLast());
+        if (null != defaultHandler)
+            defaultHandler.skippedEntity(name);
+    }
+
+}
diff --git a/test/java/src/org/apache/qetest/xsl/LoggingEntityResolver.java b/test/java/src/org/apache/qetest/xsl/LoggingEntityResolver.java
new file mode 100644
index 0000000..1f239d9
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/LoggingEntityResolver.java
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingEntityResolver.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.IOException;
+
+import org.apache.qetest.Reporter;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Implementation of EntityResolver that logs all calls.
+ * Currently just provides default service; returns null.
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingEntityResolver implements EntityResolver
+{
+
+    /** No-op ctor since it's often useful to have one. */
+    public LoggingEntityResolver(){}
+
+    /**
+     * Ctor that calls setReporter automatically.  
+     *
+     * NEEDSDOC @param r
+     */
+    public LoggingEntityResolver(Reporter r)
+    {
+        setReporter(r);
+    }
+
+    /** Our Reporter, who we tell all our secrets to. */
+    private Reporter reporter;
+
+    /**
+     * Accesor methods for our Reporter.  
+     *
+     * NEEDSDOC @param r
+     */
+    public void setReporter(Reporter r)
+    {
+        if (r != null)
+            reporter = r;
+    }
+
+    /**
+     * Accesor methods for our Reporter.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public Reporter getReporter()
+    {
+        return (reporter);
+    }
+
+    /** Prefixed to all reporter msg output. */
+    private String prefix = "ER:";
+
+    /** Counters for how many entities we've 'resolved'. */
+    private int entityCtr = 0;
+
+    /**
+     * Accesor methods for entity counter.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public int getEntityCtr()
+    {
+        return entityCtr;
+    }
+
+    /**
+     * Cheap-o string representation of our state.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public String getCounterString()
+    {
+        return (prefix + "Entities: " + getEntityCtr());
+    }
+
+    /** Cheap-o string representation of last entity we resolved. */
+    private String lastEntity = null;
+
+    /**
+     * NEEDSDOC Method setLastEntity 
+     *
+     *
+     * NEEDSDOC @param s
+     */
+    protected void setLastEntity(String s)
+    {
+        lastEntity = s;
+    }
+
+    /**
+     * Accessor for string representation of last entity we resolved.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public String getLastEntity()
+    {
+        return lastEntity;
+    }
+
+    /** What loggingLevel to use for reporter.logMsg(). */
+    private int level = Reporter.DEFAULT_LOGGINGLEVEL;
+
+    /**
+     * Accesor methods; don't think it needs to be synchronized.  
+     *
+     * NEEDSDOC @param l
+     */
+    public void setLoggingLevel(int l)
+    {
+        level = l;
+    }
+
+    /**
+     * Accesor methods; don't think it needs to be synchronized.  
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public int getLoggingLevel()
+    {
+        return level;
+    }
+
+    /**
+     * Implement this method: just returns null for now.
+     * Also saves the last entity for later retrieval, and counts
+     * how many entities we've 'resolved' overall.
+     * @todo have a settable property to actually return as the InputSource
+     *
+     * NEEDSDOC @param publicId
+     * NEEDSDOC @param systemId
+     *
+     * NEEDSDOC ($objectName$) @return
+     * @exception SAXException never thrown
+     * @exception IOException never thrown
+     */
+    public InputSource resolveEntity(String publicId, String systemId)
+            throws SAXException, IOException
+    {
+
+        entityCtr++;
+
+        setLastEntity(publicId + ";" + systemId);
+
+        if (reporter != null)
+        {
+            reporter.logMsg(level,
+                            prefix + getLastEntity() + " "
+                            + getCounterString());
+        }
+
+        return null;
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/LoggingLexicalHandler.java b/test/java/src/org/apache/qetest/xsl/LoggingLexicalHandler.java
new file mode 100644
index 0000000..a811e57
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/LoggingLexicalHandler.java
@@ -0,0 +1,402 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingLexicalHandler.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * Cheap-o LexicalHandler for use by API tests.
+ * <p>Implements LexicalHandler and dumps simplistic info 
+ * everything to a Logger; a way to debug SAX stuff.</p>
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingLexicalHandler extends LoggingHandler implements LexicalHandler
+{
+
+    /** No-op sets logger to default.  */
+    public LoggingLexicalHandler()
+    {
+        setLogger(getDefaultLogger());
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param l Logger we should log to
+     */
+    public LoggingLexicalHandler(Logger l)
+    {
+        setLogger(l);
+    }
+
+
+    /**
+     * Our default handler that we pass all events through to.
+     */
+    protected LexicalHandler defaultHandler = null;
+
+
+    /**
+     * Set a default handler for us to wrapper.
+     * Set a LexicalHandler for us to use.
+     *
+     * @param default Object of the correct type to pass-through to;
+     * throws IllegalArgumentException if null or incorrect type
+     */
+    public void setDefaultHandler(Object defaultH)
+    {
+        try
+        {
+            defaultHandler = (LexicalHandler)defaultH;
+        }
+        catch (Throwable t)
+        {
+            throw new java.lang.IllegalArgumentException("setDefaultHandler illegal type: " + t.toString());
+        }
+    }
+
+
+    /**
+     * Accessor method for our default handler.
+     *
+     * @return default (Object) our default handler; null if unset
+     */
+    public Object getDefaultHandler()
+    {
+        return (Object)defaultHandler;
+    }
+
+
+    /** Prefixed to all logger msg output.  */
+    public static final String prefix = "LLH:";
+
+    /** Constant for items returned in getCounters: startDTD.  */
+    public static final int TYPE_STARTDTD = 0;
+
+    /** Constant for items returned in getCounters: endDTD.  */
+    public static final int TYPE_ENDDTD = 1;
+
+    /** Constant for items returned in getCounters: startEntity.  */
+    public static final int TYPE_STARTENTITY = 2;
+
+    /** Constant for items returned in getCounters: endEntity.  */
+    public static final int TYPE_ENDENTITY = 3;
+
+    /** Constant for items returned in getCounters: startCDATA.  */
+    public static final int TYPE_STARTCDATA = 4;
+
+    /** Constant for items returned in getCounters: endCDATA.  */
+    public static final int TYPE_ENDCDATA = 5;
+
+    /** Constant for items returned in getCounters: comment.  */
+    public static final int TYPE_COMMENT = 6;
+
+
+    /** 
+     * Counters for how many events we've handled.  
+     * Index into array are the TYPE_* constants.
+     */
+    protected int[] counters = 
+    {
+        0, /* startDTD */
+        0, /* endDTD */
+        0, /* startEntity */
+        0, /* endEntity */
+        0, /* startCDATA */
+        0, /* endCDATA */
+        0  /* comment */
+    };
+
+
+    /**
+     * Get a list of counters of all items we've logged.
+     * Returned in order as startDTD, endDTD, startEntity,
+     * endEntity, startCDATA, endCDATA, comment.
+     * Index into array are the TYPE_* constants.
+     *
+     * @return array of int counters for each item we log
+     */
+    public int[] getCounters()
+    {
+        return counters;
+    }
+
+
+    /**
+     * Really Cheap-o string representation of our state.  
+     *
+     * @return String of getCounters() rolled up in minimal space
+     */
+    public String getQuickCounters()
+    {
+        return (prefix + "(" 
+                + counters[TYPE_STARTDTD] + ", " + counters[TYPE_ENDDTD] + "; " 
+                + counters[TYPE_STARTENTITY] + ", " + counters[TYPE_ENDENTITY] + "; " 
+                + counters[TYPE_STARTCDATA] + ", " + counters[TYPE_ENDCDATA] + "; " 
+                + counters[TYPE_COMMENT] + ")");
+    }
+
+
+    /** Expected values for events we may handle, default=ITEM_DONT_CARE. */
+    protected String[] expected = 
+    {
+        ITEM_DONT_CARE, /* startDTD */
+        ITEM_DONT_CARE, /* endDTD */
+        ITEM_DONT_CARE, /* startEntity */
+        ITEM_DONT_CARE, /* endEntity */
+        ITEM_DONT_CARE, /* startCDATA */
+        ITEM_DONT_CARE, /* endCDATA */
+        ITEM_DONT_CARE  /* comment */
+    };
+
+
+    /** Cheap-o string representation of last event we got.  */
+    protected String lastItem = NOTHING_HANDLED;
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @param s string to set
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+
+    /**
+     * Accessor for string representation of last event we got.  
+     * @return last event string we had
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+
+    /**
+     * Ask us to report checkPass/Fail for certain events we handle.
+     * Since we may have to handle many events between when a test 
+     * will be able to call us, testers can set this to have us 
+     * automatically call checkPass when we see an item that matches, 
+     * or to call checkFail when we get an unexpected item.
+     * Generally, we only call check* methods when:
+     * <ul>
+     * <li>containsString is not set, reset, or is ITEM_DONT_CARE, 
+     * we do nothing (i.e. never call check* for this item)</li>
+     * <li>containsString is ITEM_CHECKFAIL, we will always call 
+     * checkFail with the contents of any item if it occours</li>
+     * <li>containsString is anything else, we will grab a String 
+     * representation of every item of that type that comes along, 
+     * and if the containsString is found, case-sensitive, within 
+     * the handled item's string, call checkPass, otherwise 
+     * call checkFail</li>
+     * <ul>
+     * Note that any time we handle a particular event that was 
+     * expected, we un-set the expected value for that item.  This 
+     * means that you can only ask us to validate one occourence 
+     * of any particular event; all events after that one will 
+     * be treated as ITEM_DONT_CARE.  Callers can of course call 
+     * setExpected again, of course, but this covers the case where 
+     * we handle multiple events in a single block, perhaps out of 
+     * the caller's direct control. 
+     * Note that we first store the event via setLast(), then we 
+     * validate the event as above, and then we potentially 
+     * re-throw the exception as by setThrowWhen().
+     *
+     * @param itemType which of the various types of items we might 
+     * handle; should be defined as a constant by subclasses
+     * @param containsString a string to look for within whatever 
+     * item we handle - usually checked for by seeing if the actual 
+     * item we handle contains the containsString
+     */
+    public void setExpected(int itemType, String containsString)
+    {
+        // Default to don't care on null
+        if (null == containsString)
+            containsString = ITEM_DONT_CARE;
+
+        try
+        {
+            expected[itemType] = containsString;
+        }
+        catch (ArrayIndexOutOfBoundsException aioobe)
+        {
+            // Just log it for callers reference and continue anyway
+            logger.logMsg(level, prefix + " setExpected called with illegal type:" + itemType);
+        }
+    }
+
+
+    /**
+     * Reset all items or counters we've handled.  
+     */
+    public void reset()
+    {
+        setLastItem(NOTHING_HANDLED);
+        for (int i = 0; i < counters.length; i++)
+        {
+            counters[i] = 0;
+        }
+        for (int j = 0; j < expected.length; j++)
+        {
+            expected[j] = ITEM_DONT_CARE;
+        }
+    }
+
+
+    /**
+     * Worker method to either log or call check* for this event.  
+     * A simple way to validate for any kind of event.
+     * Note that various events may store the various arguments 
+     * they get differently, so you should check the code to 
+     * ensure you're specifying the correct containsString.
+     *
+     * @param type of event (startdtd|enddtd|etc)
+     * @param desc detail info from this kind of message
+     */
+    protected void logOrCheck(int type, String desc)
+    {
+        String tmp = getQuickCounters() + " " + desc;
+        // Either log the exception or call checkPass/checkFail 
+        //  as requested by setExpected for this type
+        if (ITEM_DONT_CARE == expected[type])
+        {
+            // We don't care about this, just log it
+            logger.logMsg(level, tmp);
+        }
+        else if (ITEM_CHECKFAIL == expected[type])
+        {
+            // We shouldn't have been called here, so fail
+            logger.checkFail(tmp + " was unexpected");
+        }
+        else if ((null != desc) 
+                  && (desc.indexOf(expected[type]) > -1))
+        {   
+            // We got a warning the user expected, so pass
+            logger.checkPass(tmp + " matched");
+            // Also reset this counter
+            //@todo needswork: this is very state-dependent, and 
+            //  might not be what the user expects, but at least it 
+            //  won't give lots of extra false fails or passes
+            expected[type] = ITEM_DONT_CARE;
+        }
+        else
+        {
+            // We got a warning the user didn't expect, so fail
+            logger.checkFail(tmp + " did not match");
+            // Also reset this counter
+            expected[type] = ITEM_DONT_CARE;
+        }
+    }
+
+
+    ////////////////// Implement LexicalHandler ////////////////// 
+    public void startDTD (String name, String publicId, String systemId)
+    	throws SAXException
+    {
+        // Note: this implies this class is !not! threadsafe
+        // Increment counter and save info
+        counters[TYPE_STARTDTD]++;
+        setLastItem("startDTD: " + name + ", " + publicId + ", " + systemId);
+        logOrCheck(TYPE_STARTDTD, getLast());
+        if (null != defaultHandler)
+            defaultHandler.startDTD(name, publicId, systemId);
+    }
+
+    public void endDTD ()
+	    throws SAXException
+    {
+        counters[TYPE_ENDDTD]++;
+        setLastItem("endDTD");
+        logOrCheck(TYPE_ENDDTD, getLast());
+        if (null != defaultHandler)
+            defaultHandler.endDTD();
+    }
+
+    public void startEntity (String name)
+    	throws SAXException
+    {
+        counters[TYPE_STARTENTITY]++;
+        setLastItem("startEntity: " + name);
+        logOrCheck(TYPE_STARTENTITY, getLast());
+        if (null != defaultHandler)
+            defaultHandler.startEntity(name);
+    }
+
+    public void endEntity (String name)
+	    throws SAXException
+    {
+        counters[TYPE_ENDENTITY]++;
+        setLastItem("endEntity: " + name);
+        logOrCheck(TYPE_ENDENTITY, getLast());
+        if (null != defaultHandler)
+            defaultHandler.endEntity(name);
+    }
+
+    public void startCDATA ()
+    	throws SAXException
+    {
+        counters[TYPE_STARTCDATA]++;
+        setLastItem("startCDATA");
+        logOrCheck(TYPE_STARTCDATA, getLast());
+        if (null != defaultHandler)
+            defaultHandler.startCDATA();
+    }
+
+    public void endCDATA ()
+	    throws SAXException
+    {
+        counters[TYPE_ENDCDATA]++;
+        setLastItem("endCDATA");
+        logOrCheck(TYPE_ENDCDATA, getLast());
+        if (null != defaultHandler)
+            defaultHandler.endCDATA();
+    }
+
+    public void comment (char ch[], int start, int length)
+    	throws SAXException
+    {
+        counters[TYPE_COMMENT]++;
+        StringBuffer buf = new StringBuffer("comment: ");
+        buf.append(ch);
+        buf.append(", ");
+        buf.append(start);
+        buf.append(", ");
+        buf.append(length);
+
+        setLastItem(buf.toString());
+        logOrCheck(TYPE_COMMENT, getLast());
+        if (null != defaultHandler)
+            defaultHandler.comment(ch, start, length);
+    }
+
+}
diff --git a/test/java/src/org/apache/qetest/xsl/LoggingSAXErrorHandler.java b/test/java/src/org/apache/qetest/xsl/LoggingSAXErrorHandler.java
new file mode 100644
index 0000000..0ae6a7a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/LoggingSAXErrorHandler.java
@@ -0,0 +1,452 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * LoggingSAXErrorHandler.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.LoggingHandler;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Cheap-o ErrorHandler for use by API tests.
+ * <p>Implements org.xml.sax.ErrorHandler and dumps everything to a Reporter.</p>
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class LoggingSAXErrorHandler extends LoggingHandler implements ErrorHandler
+{
+    /** No-op ctor seems useful. */
+    public LoggingSAXErrorHandler()
+    {
+        setLogger(getDefaultLogger());
+    }
+
+    /**
+     * Ctor that calls setLogger automatically.  
+     *
+     * @param l Logger we should log to
+     */
+    public LoggingSAXErrorHandler(Logger l)
+    {
+        setLogger(l);
+    }
+
+
+    /** 
+     * Constants determining when we should throw exceptions.
+     * <ul>Flags are combineable like a bitfield.
+     * <li>THROW_NEVER - never ever (always continue - note this 
+     * may have unexpected effects when fatalErrors happen, see 
+     * {@link javax.xml.transform.ErrorListener#fatalError(javax.xml.transform.TransformerException)}</li>
+     * <li>THROW_ON_WARNING - throw only on warnings</li>
+     * <li>THROW_ON_ERROR - throw only on errors</li>
+     * <li>THROW_ON_FATAL - throw only on fatalErrors - default</li>
+     * <li>THROW_ALWAYS - always throw exceptions</li>
+     * </ul>
+     */
+    public static final int THROW_NEVER = 0;
+
+    /** THROW_ON_WARNING - throw only on warnings.  */
+    public static final int THROW_ON_WARNING = 1;
+
+    /** THROW_ON_ERROR - throw only on errors.  */
+    public static final int THROW_ON_ERROR = 2;
+
+    /** THROW_ON_FATAL - throw only on fatalErrors - default.  */
+    public static final int THROW_ON_FATAL = 4;
+
+    /** THROW_ALWAYS - always throw exceptions.   */
+    public static final int THROW_ALWAYS = THROW_ON_WARNING & THROW_ON_ERROR
+                                           & THROW_ON_FATAL;
+
+    /** If we should throw an exception for each message type. */
+    protected int throwWhen = THROW_ON_FATAL;
+
+    /**
+     * Tells us when we should re-throw exceptions.  
+     *
+     * @param t THROW_WHEN_* constant as to when we should re-throw 
+     * an exception when we are called
+     */
+    public void setThrowWhen(int t)
+    {
+        throwWhen = t;
+    }
+
+    /**
+     * Tells us when we should re-throw exceptions.  
+     *
+     * @return THROW_WHEN_* constant as to when we should re-throw 
+     * an exception when we are called
+     */
+    public int getThrowWhen()
+    {
+        return throwWhen;
+    }
+
+    /** Constant for items returned in getCounters: messages.  */
+    public static final int TYPE_WARNING = 0;
+
+    /** Constant for items returned in getCounters: errors.  */
+    public static final int TYPE_ERROR = 1;
+
+    /** Constant for items returned in getCounters: fatalErrors.  */
+    public static final int TYPE_FATALERROR = 2;
+
+    /** 
+     * Counters for how many events we've handled.  
+     * Index into array are the TYPE_* constants.
+     */
+    protected int[] counters = 
+    {
+        0, /* warning */
+        0, /* error */
+        0  /* fatalError */
+    };
+
+
+    /**
+     * Get a list of counters of all items we've logged.
+     * Returned as warnings, errors, fatalErrors
+     * Index into array are the TYPE_* constants.
+     *
+     * @return array of int counters for each item we log
+     */
+    public int[] getCounters()
+    {
+        return counters;
+    }
+
+    /** Prefixed to all logger msg output. */
+    public static final String prefix = "SEH:";
+
+
+    /**
+     * Really Cheap-o string representation of our state.  
+     *
+     * @return String of getCounters() rolled up in minimal space
+     */
+    public String getQuickCounters()
+    {
+        return (prefix + "(" + counters[TYPE_WARNING] + ", "
+                + counters[TYPE_ERROR] + ", " + counters[TYPE_FATALERROR] + ")");
+    }
+
+
+    /** Cheap-o string representation of last warn/error/fatal we got. */
+    protected String lastItem = NOTHING_HANDLED;
+
+    /**
+     * Sets a String representation of last item we handled. 
+     *
+     * @param s set into lastItem for retrieval with getLast()
+     */
+    protected void setLastItem(String s)
+    {
+        lastItem = s;
+    }
+
+    /**
+     * Get a string representation of last item we logged.  
+     *
+     * @return String of the last item handled
+     */
+    public String getLast()
+    {
+        return lastItem;
+    }
+
+
+    /** Expected values for events we may handle, default=ITEM_DONT_CARE. */
+    protected String[] expected = 
+    {
+        ITEM_DONT_CARE, /* warning */
+        ITEM_DONT_CARE, /* error */
+        ITEM_DONT_CARE  /* fatalError */
+    };
+
+
+    /**
+     * Ask us to report checkPass/Fail for certain events we handle.
+     * Since we may have to handle many events between when a test 
+     * will be able to call us, testers can set this to have us 
+     * automatically call checkPass when we see an item that matches, 
+     * or to call checkFail when we get an unexpected item.
+     * Generally, we only call check* methods when:
+     * <ul>
+     * <li>containsString is not set, reset, or is ITEM_DONT_CARE, 
+     * we do nothing (i.e. never call check* for this item)</li>
+     * <li>containsString is ITEM_CHECKFAIL, we will always call 
+     * checkFail with the contents of any item if it occours</li>
+     * <li>containsString is anything else, we will grab a String 
+     * representation of every item of that type that comes along, 
+     * and if the containsString is found, case-sensitive, within 
+     * the handled item's string, call checkPass, otherwise 
+     * call checkFail</li>
+     * <ul>
+     * Note that any time we handle a particular event that was 
+     * expected, we un-set the expected value for that item.  This 
+     * means that you can only ask us to validate one occourence 
+     * of any particular event; all events after that one will 
+     * be treated as ITEM_DONT_CARE.  Callers can of course call 
+     * setExpected again, of course, but this covers the case where 
+     * we handle multiple events in a single block, perhaps out of 
+     * the caller's direct control. 
+     * Note that we first store the event via setLast(), then we 
+     * validate the event as above, and then we potentially 
+     * re-throw the exception as by setThrowWhen().
+     *
+     * @param itemType which of the various types of items we might 
+     * handle; should be defined as a constant by subclasses
+     * @param containsString a string to look for within whatever 
+     * item we handle - usually checked for by seeing if the actual 
+     * item we handle contains the containsString
+     */
+    public void setExpected(int itemType, String containsString)
+    {
+        // Default to don't care on null
+        if (null == containsString)
+            containsString = ITEM_DONT_CARE;
+
+        try
+        {
+            expected[itemType] = containsString;
+        }
+        catch (ArrayIndexOutOfBoundsException aioobe)
+        {
+            // Just log it for callers reference and continue anyway
+            logger.logMsg(level, prefix + " setExpected called with illegal type:" + itemType);
+        }
+    }
+
+
+    /**
+     * Reset all items or counters we've handled.  
+     */
+    public void reset()
+    {
+        setLastItem(NOTHING_HANDLED);
+        for (int i = 0; i < counters.length; i++)
+        {
+            counters[i] = 0;
+        }
+        for (int j = 0; j < expected.length; j++)
+        {
+            expected[j] = ITEM_DONT_CARE;
+        }
+    }
+
+
+    /**
+     * Grab basic info out of a SAXParseException.
+     *
+     * @param exception the SAXParseException to get info from
+     * @return condensed string of important info therefrom
+     */
+    public String getParseExceptionInfo(SAXParseException exception)
+    {
+
+        if (exception == null)
+            return null;
+
+        String retVal = new String("");
+        String tmp;
+
+        tmp = exception.getPublicId();
+
+        if (tmp != null)
+            retVal += " publicID:" + tmp;
+
+        tmp = exception.getSystemId();
+
+        if (tmp != null)
+            retVal += " systemId:" + tmp;
+
+        try
+        {
+            tmp = Integer.toString(exception.getLineNumber());
+        }
+        catch (NumberFormatException nfe)
+        {
+            tmp = null;
+        }
+
+        if (tmp != null)
+            retVal += " lineNumber:" + tmp;
+
+        try
+        {
+            tmp = Integer.toString(exception.getColumnNumber());
+        }
+        catch (NumberFormatException nfe)
+        {
+            tmp = null;
+        }
+
+        if (tmp != null)
+            retVal += " columnNumber:" + tmp;
+
+        tmp = exception.getMessage();  // Will grab inner message if needed
+
+        if (tmp != null)
+            retVal += " message:" + tmp;
+
+        return retVal;
+    }
+
+
+
+    /////////////////// Implement SAXErrorHandler ///////////////////
+    /**
+     * Implementation of warning; calls logMsg with info contained in exception.
+     *
+     * @param exception provided by Transformer
+     * @exception TransformerException thrown only if asked to or if loggers are bad
+     */
+    public void warning(SAXParseException exception) throws SAXException
+    {
+
+        // Increment counter and save the exception
+        counters[TYPE_WARNING]++;
+
+        String exInfo = getParseExceptionInfo(exception);
+
+        setLastItem(exInfo);
+
+        // Log or validate the exception
+        logOrCheck(TYPE_WARNING, "warning", exInfo);
+
+        // Also re-throw the exception if asked to
+        if ((throwWhen & THROW_ON_WARNING) == THROW_ON_WARNING)
+        {
+            throw new SAXException(exception);
+        }
+    }
+
+
+    /**
+     * Implementation of error; calls logMsg with info contained in exception.
+     * Only ever throws an exception itself if asked to or if loggers are bad.
+     *
+     * @param exception provided by Transformer
+     * @exception TransformerException thrown only if asked to or if loggers are bad
+     */
+    public void error(SAXParseException exception) throws SAXException
+    {
+
+        // Increment counter, save the exception, and log what we got
+        counters[TYPE_ERROR]++;
+
+        String exInfo = getParseExceptionInfo(exception);
+
+        setLastItem(exInfo);
+
+        // Log or validate the exception
+        logOrCheck(TYPE_ERROR, "error", exInfo);
+
+        // Also re-throw the exception if asked to
+        if ((throwWhen & THROW_ON_ERROR) == THROW_ON_ERROR)
+        {
+            throw new SAXException(exception);
+        }
+    }
+
+    /**
+     * Implementation of error; calls logMsg with info contained in exception.
+     * Only ever throws an exception itself if asked to or if loggers are bad.
+     * Note that this may cause unusual behavior since we may not actually
+     * re-throw the exception, even though it was 'fatal'.
+     *
+     * @param exception provided by Transformer
+     * @exception TransformerException thrown only if asked to or if loggers are bad
+     */
+    public void fatalError(SAXParseException exception) throws SAXException
+    {
+
+        // Increment counter, save the exception, and log what we got
+        counters[TYPE_FATALERROR]++;
+
+        String exInfo = getParseExceptionInfo(exception);
+
+        setLastItem(exInfo);
+
+        // Log or validate the exception
+        logOrCheck(TYPE_FATALERROR, "fatalError", exInfo);
+
+        // Also re-throw the exception if asked to
+        if ((throwWhen & THROW_ON_FATAL) == THROW_ON_FATAL)
+        {
+            throw new SAXException(exception);
+        }
+    }
+
+
+    /**
+     * Worker method to either log or call check* for this event.  
+     * A simple way to validate for any kind of event.
+     *
+     * @param type of message (warning/error/fatalerror)
+     * @param desc description of this kind of message
+     * @param exInfo String representation of current exception
+     */
+    protected void logOrCheck(int type, String desc, String exInfo)
+    {
+        String tmp = getQuickCounters() + " " + desc;
+        // Either log the exception or call checkPass/checkFail 
+        //  as requested by setExpected for this type
+        if (ITEM_DONT_CARE == expected[type])
+        {
+            // We don't care about this, just log it
+            logger.logMsg(level, desc + " threw: " + exInfo);
+        }
+        else if (ITEM_CHECKFAIL == expected[type])
+        {
+            // We shouldn't have been called here, so fail
+            logger.checkFail(desc + " threw-unexpected: " + exInfo);
+        }
+        else if (exInfo.indexOf(expected[type]) > -1)
+        {   
+            // We got a warning the user expected, so pass
+            logger.checkPass(desc + " threw-matching: " + exInfo);
+            // Also reset this counter
+            //@todo needswork: this is very state-dependent, and 
+            //  might not be what the user expects, but at least it 
+            //  won't give lots of extra false fails or passes
+            expected[type] = ITEM_DONT_CARE;
+        }
+        else
+        {
+            // We got a warning the user didn't expect, so fail
+            logger.checkFail(desc + " threw-notmatching: " + exInfo);
+            // Also reset this counter
+            expected[type] = ITEM_DONT_CARE;
+        }
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/MSXSLTestlet.java b/test/java/src/org/apache/qetest/xsl/MSXSLTestlet.java
new file mode 100644
index 0000000..875ecf8
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/MSXSLTestlet.java
@@ -0,0 +1,210 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.util.Hashtable;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+
+/**
+ * Testlet for conformance testing of xsl stylesheet files using 
+ * the MSXSL command line instead of a TransformWrapper.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class MSXSLTestlet extends CmdlineTestlet
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.MSXSLTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String describing what this MSXSLTestlet does.
+     */
+    public String getDescription()
+    {
+        return "MSXSLTestlet";
+    }
+
+
+    /**
+     * Default Actual name of external program to call.  
+     * @return msxsl, the MSXSL 4.0 command line.
+     */
+    public String getDefaultProgName()
+    {
+        return "msxsl";
+    }
+
+
+    /**
+     * Worker method to get list of arguments specific to this program.  
+     * 
+     * <p>Must be overridden for different processors, obviously.  
+     * This implementation returns the args for Xalan-C TestXSLT</p>
+     * 
+     * @param program path\name of program to Runtime.exec()
+     * @param defaultArgs any additional arguments to pass
+     * @return String array of arguments suitable to pass to 
+     * Runtime.exec()
+     */
+    public String[] getProgramArguments(StylesheetDatalet datalet, String[] defaultArgs)
+    {
+        final int NUMARGS = 6;
+        String[] args = new String[defaultArgs.length + NUMARGS];
+        String progName = datalet.options.getProperty(OPT_PROGNAME, getDefaultProgName());
+        String progPath = datalet.options.getProperty(OPT_PROGPATH);
+        if ((null != progPath) && (progPath.length() > 0))
+        {
+            args[0] = progPath + File.separator + progName;
+        }
+        else
+        {
+            // Pesume the program is on the PATH already...
+            args[0] = progName;
+        }
+    
+        // Default args for MSXSL 4.0
+        args[1] = datalet.xmlName;
+        args[2] = datalet.inputName;
+        args[3] = "-o"; // Write output to named file
+        args[4] = datalet.outputName;
+        args[5] = "-t"; // Show load and transformation timings
+
+        if (defaultArgs.length > 0)
+            System.arraycopy(defaultArgs, 0, args, NUMARGS, defaultArgs.length);
+
+        return args;
+    }
+
+
+    /** 
+     * Worker method to evaluate the System.out/.err streams of 
+     * a particular processor.  
+     *
+     * Overridden to parse out -t timings from msxsl output.
+     *
+     * @param cmdline that was used for execProcess
+     * @param outBuf buffer from execProcess' System.out
+     * @param errBuf buffer from execProcess' System.err
+     * @param processReturnVal from execProcess
+     */
+    protected void checkOutputStreams(String[] cmdline, StringBuffer outBuf, 
+            StringBuffer errBuf, int processReturnVal)
+    {
+        Hashtable attrs = new Hashtable();
+        attrs.put("program", cmdline[0]);
+        attrs.put("returnVal", String.valueOf(processReturnVal));
+
+        StringBuffer buf = new StringBuffer();
+        if ((null != errBuf) && (errBuf.length() > 0))
+        {
+            buf.append("<system-err>");
+            buf.append(errBuf);
+            buf.append("</system-err>\n");
+        }
+        if ((null != outBuf) && (outBuf.length() > 0))
+        {
+            buf.append("<system-out>");
+            buf.append(outBuf);
+            buf.append("</system-out>\n");
+        }
+        logger.logElement(Logger.INFOMSG, "checkOutputStreams", attrs, buf.toString());
+        attrs = null;
+        buf = null;
+
+        try
+        {
+            final String SOURCE_LOAD = "Source document load time:";
+            final String STYLESHEET_LOAD = "Stylesheet document load time:";
+            final String STYLESHEET_COMPILE = "Stylesheet compile time:";
+            final String STYLESHEET_EXECUTE = "Stylesheet execution time:";
+            final String MILLISECONDS = "milliseconds";
+            double sourceLoad;
+            double stylesheetLoad;
+            double stylesheetCompile;
+            double stylesheetExecute;
+            // Now actually parse the system-err stream for performance
+            // This is embarassingly messy, but I'm not investing 
+            //  more time here until I'm sure it'll be worth it
+            String tmp = errBuf.toString();
+            String ms = null;
+            int tmpIdx = 0;
+            // Advance to source loading time
+            tmp = tmp.substring(tmp.indexOf(SOURCE_LOAD) + SOURCE_LOAD.length());
+            // Time is spaces & numbers up to the 'milliseconds' marker
+            ms = tmp.substring(0, tmp.indexOf(MILLISECONDS)).trim();
+            sourceLoad = Double.parseDouble(ms);
+
+            // Advance to stylesheet loading time
+            tmp = tmp.substring(tmp.indexOf(STYLESHEET_LOAD) + STYLESHEET_LOAD.length());
+            // Time is spaces & numbers up to the 'milliseconds' marker
+            ms = tmp.substring(0, tmp.indexOf(MILLISECONDS)).trim();
+            stylesheetLoad = Double.parseDouble(ms);
+            
+            // Advance to stylesheet compile time
+            tmp = tmp.substring(tmp.indexOf(STYLESHEET_COMPILE) + STYLESHEET_COMPILE.length());
+            // Time is spaces & numbers up to the 'milliseconds' marker
+            ms = tmp.substring(0, tmp.indexOf(MILLISECONDS)).trim();
+            stylesheetCompile = Double.parseDouble(ms);
+            
+            // Advance to stylesheet execute time
+            tmp = tmp.substring(tmp.indexOf(STYLESHEET_EXECUTE) + STYLESHEET_EXECUTE.length());
+            // Time is spaces & numbers up to the 'milliseconds' marker
+            ms = tmp.substring(0, tmp.indexOf(MILLISECONDS)).trim();
+            stylesheetExecute = Double.parseDouble(ms);
+
+            // Log out approximate timing data
+            // Log special performance element with our timing
+            attrs = new Hashtable();
+            // UniqRunid is an Id that our TestDriver normally sets 
+            //  with some unique code, so that results analysis 
+            //  stylesheets can compare different test runs
+            attrs.put("UniqRunid", "runId;notImplemented-MSXSLTestlet");
+            // processor is the 'flavor' of processor we're testing
+            attrs.put("processor", getDescription());
+            // idref is the individual filename
+            attrs.put("idref", (new File(cmdline[2])).getName());
+            // inputName is the actual name we gave to the processor
+            attrs.put("inputName", cmdline[2]);
+            attrs.put("iterations", new Integer(1));
+            attrs.put("sourceLoad", new Double(sourceLoad));
+            attrs.put("stylesheetLoad", new Double(stylesheetLoad));
+            attrs.put("stylesheetCompile", new Double(stylesheetCompile));
+            attrs.put("stylesheetExecute", new Double(stylesheetExecute));
+
+            logger.logElement(Logger.STATUSMSG, "perf", attrs, "PItr;");
+        } 
+        catch (Exception e)
+        {
+            logger.logThrowable(Logger.WARNINGMSG, e, "checkOutputStreams threw");
+        }
+    }
+}  // end of class MSXSLTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/PerfEverythingTestlet.java b/test/java/src/org/apache/qetest/xsl/PerfEverythingTestlet.java
new file mode 100644
index 0000000..281887a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/PerfEverythingTestlet.java
@@ -0,0 +1,334 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * PerfEverythingTestlet.java
+ *
+ */
+package org.apache.qetest.xsl;
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Hashtable;
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+
+/**
+ * Testlet to capture specific timing performance data.
+ * This Testlet attempts to mirror what one of our Xalan-C 
+ * performance tests does, at least as well as we can compare 
+ * Java processing to the C processing model.
+ * Note that as a standalone Testlet, this class does waaaay too 
+ * much stuff: Testlets should really be smaller test algorithims
+ * than here.  However for performance measurements and reporting 
+ * purposes, we really need to do it all here.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class PerfEverythingTestlet extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.PerfEverythingTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String describing what this PerfEverythingTestlet does.
+     */
+    public String getDescription()
+    {
+        return "PerfEverythingTestlet: processes supplied file in multiple ways over multiple iterations and logs timing data";
+    }
+
+
+    /**
+     * Run this PerfEverythingTestlet: execute it's test and return.
+     * This algorithim processes the supplied file in several 
+     * different ways:
+     * <ul>
+     * <li>Run one full end-to-end transform and log timing 
+     * (a 'preload' process: note that results may vary for this 
+     * timing depending on whether you run this Testlet standalone 
+     * or if you're using StylesheetTestletDriver to run it, due at 
+     * least to classloading issues, if nothing else)</li>
+     * <li>Preprocess the stylesheet once and log timing</li>
+     * <li>Process that preprocessed stylesheet once and log timing</li>
+     * <li>Loop iterations times and preprocess the stylesheet, 
+     * then do a transform with it, and log each time</li>
+     * <li>Loop iterations times and do a full end-to-end transform
+     * and log each time</li>
+     * </ul>
+     * We (optionally) call Runtime.gc() after every use of the 
+     * processor, and log out memory statistics here and there.
+     *
+     * Note that if any error happens during the execution, we 
+     * simply log the error and return: in this case, a &lt;perf&gt;
+     * element will <b>not</b> be output at all.
+     *
+     * @param Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        StylesheetDatalet datalet = null;
+        try
+        {
+            datalet = (StylesheetDatalet)d;
+            
+        }
+        catch (ClassCastException e)
+        {
+            logger.checkErr("Incorrect Datalet type provided, threw:" + e.toString());
+            return;
+        }
+        logger.logMsg(Logger.STATUSMSG, "About to test: " 
+                      + (null == datalet.inputName
+                         ? datalet.xmlName
+                         : datalet.inputName));
+        
+        // Cleanup outName only if asked to - delete the file on disk
+        if ("true".equalsIgnoreCase(datalet.options.getProperty("deleteOutFile")))
+        {
+            try
+            {
+                File outFile = new File(datalet.outputName);
+                boolean btmp = outFile.delete();
+                logger.logMsg(Logger.TRACEMSG, "Deleting OutFile of::" + datalet.outputName
+                                     + " status: " + btmp);
+            }
+            catch (SecurityException se)
+            {
+                logger.logMsg(Logger.WARNINGMSG, "Deleting OutFile of::" + datalet.outputName
+                                       + " threw: " + se.toString());
+                // But continue anyways...
+            }
+        }
+
+        // Setup: Save options from the datalet in convenience variables
+        int iterations = 10;
+        boolean preload = true;
+        boolean runtimeGC = false;
+        try
+        {
+            iterations = Integer.parseInt(datalet.options.getProperty("iterations"));
+        }
+        catch (Exception e) { /* no-op, leave as default */ }
+        try
+        {
+            preload = (new Boolean(datalet.options.getProperty("preload"))).booleanValue();
+        }
+        catch (Exception e) { /* no-op, leave as default */ }
+        try
+        {
+            runtimeGC = (new Boolean(datalet.options.getProperty("runtimeGC"))).booleanValue();
+        }
+        catch (Exception e) { /* no-op, leave as default */ }
+
+        // Setup: store various timing data in convenience variables
+        long singletransform = 0L;  // Very first Preload end-to-end transform
+        long etoe = 0L;     // First end-to-end transform during iterations
+        long avgetoe = 0L;  // Average of end-to-end transforms during iterations
+        long parsexsl = 0L;     // First stylesheet preprocess during iterations
+        long avgparsexsl = 0L;  // Average of stylesheet preprocess during iterations
+        long unparsedxml = 0L;   // First stylesheet process during iterations
+        long avgunparsedxml = 0L;// Average of stylesheet process during iterations
+
+        // Create a new TransformWrapper of appropriate flavor
+        //  null arg is unused liaison for TransformWrapper
+        //@todo allow user to pass in pre-created 
+        //  TransformWrapper so we don't have lots of objects 
+        //  created and destroyed for every file
+        TransformWrapper transformWrapper = null;
+        try
+        {
+            transformWrapper = TransformWrapperFactory.newWrapper(datalet.flavor);
+            transformWrapper.newProcessor(null);
+        }
+        catch (Throwable t)
+        {
+            logThrowable(t, getDescription() + " newWrapper/newProcessor threw");
+            logger.checkErr(getDescription() + " newWrapper/newProcessor threw: " + t.toString());
+            return;
+        }
+
+        // Test our supplied file in multiple ways, logging performance data
+        try
+        {
+            // Store local copies of XSL, XML references to avoid 
+            //  potential for changing datalet            
+            String inputName = datalet.inputName;
+            String xmlName = datalet.xmlName;
+
+            logger.logMsg(Logger.TRACEMSG, "executing with: inputName=" + inputName
+                          + " xmlName=" + xmlName + " outputName=" + datalet.outputName
+                          + " goldName=" + datalet.goldName + " flavor="  + datalet.flavor
+                          + " iterations=" + iterations + " preload=" + preload
+                          + " algorithim=" + getDescription());
+
+            //@todo make various logMemory calls optional
+            logMemory(runtimeGC, true);
+
+            // Measure(singletransform): Very first Preload end-to-end transform
+            long[] times = null;
+            times = transformWrapper.transform(xmlName, inputName,
+                                                datalet.outputName);
+            singletransform = times[TransformWrapper.IDX_OVERALL];
+            logMemory(runtimeGC, false);
+
+            // Measure(parsexsl): once: first preprocess
+            times = transformWrapper.buildStylesheet(inputName);
+            parsexsl = times[TransformWrapper.IDX_OVERALL];
+            logMemory(runtimeGC, false);
+
+            // Measure(unparsedxml): once: first process
+            times = transformWrapper.transformWithStylesheet(xmlName, datalet.outputName);
+            unparsedxml = times[TransformWrapper.IDX_OVERALL];
+            logMemory(runtimeGC, false);
+
+            for (int ctr = 1; ctr <= iterations; ctr++)
+            {
+                // Measure(avgparsexsl): average preprocess
+                times = transformWrapper.buildStylesheet(inputName);
+                avgparsexsl += times[TransformWrapper.IDX_OVERALL];
+                logMemory(runtimeGC, false);
+
+                // Measure(avgunparsedxml): average process
+                times = transformWrapper.transformWithStylesheet(xmlName, datalet.outputName);
+                avgunparsedxml += times[TransformWrapper.IDX_OVERALL];
+                logMemory(runtimeGC, false);
+            }
+
+            // Measure(etoe): once: first full process
+            times = transformWrapper.transform(xmlName, inputName, datalet.outputName);
+            etoe = times[TransformWrapper.IDX_OVERALL];
+            logMemory(runtimeGC, true);
+
+            for (int ctr = 1; ctr <= iterations; ctr++)
+            {
+                // Measure(avgetoe): average full process
+                times = transformWrapper.transform(xmlName, inputName, datalet.outputName);
+                avgetoe += times[TransformWrapper.IDX_OVERALL];
+                logMemory(runtimeGC, false);
+            }
+
+            // Log special performance element with our timing
+            Hashtable attrs = new Hashtable();
+            // UniqRunid is an Id that our TestDriver normally sets 
+            //  with some unique code, so that results analysis 
+            //  stylesheets can compare different test runs
+            attrs.put("UniqRunid", datalet.options.getProperty("runId", "runId;none"));
+            // processor is the 'flavor' of processor we're testing
+            attrs.put("processor", transformWrapper.getDescription());
+            // idref is the individual filename
+            attrs.put("idref", (new File(datalet.inputName)).getName());
+            // inputName is the actual name we gave to the processor
+            attrs.put("inputName", inputName);
+            attrs.put("iterations", new Integer(iterations));
+            attrs.put("singletransform", new Long(singletransform)); // Very first Preload end-to-end transform
+            attrs.put("etoe", new Long(etoe)); // First end-to-end transform during iterations
+            attrs.put("avgetoe", new Long(avgetoe / iterations)); // Average of end-to-end transforms during iterations
+            attrs.put("parsexsl", new Long(parsexsl)); // First stylesheet preprocess during iterations
+            attrs.put("avgparsexsl", new Long(avgparsexsl / iterations)); // Average of stylesheet preprocess during iterations
+            attrs.put("unparsedxml", new Long(unparsedxml)); // First stylesheet process during iterations
+            attrs.put("avgunparsedxml", new Long(avgunparsedxml / iterations)); // Average of stylesheet process during iterations
+
+            logger.logElement(Logger.STATUSMSG, "perf", attrs, "PItr;");
+
+            // If we get here, attempt to validate the contents of 
+            //  the last outputFile created
+            CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+            // Supply default value
+            if (null == fileChecker)
+                fileChecker = new XHTFileCheckService();
+            if (Logger.PASS_RESULT
+                != fileChecker.check(logger,
+                                     new File(datalet.outputName), 
+                                     new File(datalet.goldName), 
+                                     getDescription() + ", " + datalet.getDescription())
+               )
+                logger.logMsg(Logger.WARNINGMSG, "Failure reason: " + fileChecker.getExtendedInfo());
+        }
+        // try...catch around entire performance operation
+        catch (Throwable t)
+        {
+            java.io.StringWriter sw = new java.io.StringWriter();
+            java.io.PrintWriter pw = new java.io.PrintWriter(sw);
+            t.printStackTrace(pw);
+            logger.logArbitrary(Logger.ERRORMSG, sw.toString());
+            logger.checkErr("PerfEverythingTestlet with:" + datalet.inputName
+                                 + " threw: " + t.toString());
+            return;
+        }
+
+        //@todo Should we attempt to cleanup anything else here?
+        //  We've had problems running this testlet over large 
+        //  files, so I'm looking for ways to reduce the impact 
+        //  this test code has on the JVM
+	}
+
+
+    /**
+     * Worker method: optionally reports Runtime.totalMemory/freeMemory; 
+     * optionally first calls .gc() to force garbage collection.  
+     * @param doGC: call .gc() or not first
+     * @param doLog: log out memory stats or not
+     */
+    protected void logMemory(boolean doGC, boolean doLog)
+    {
+        if (doGC)
+        {
+            Runtime.getRuntime().gc();
+        }
+        if (doLog)
+        {
+            logger.logStatistic(Logger.STATUSMSG, Runtime.getRuntime().freeMemory(), 0, "UMem;freeMemory");
+            logger.logStatistic(Logger.STATUSMSG, Runtime.getRuntime().totalMemory(), 0, "UMem;totalMemory");
+        }
+    }
+
+
+    /**
+     * Logs out throwable.toString() and stack trace to our Logger.
+     * //@todo Copied from Reporter; should probably be moved into Logger.
+     * @param throwable thrown throwable/exception to log out.
+     * @param msg description of the throwable.
+     */
+    protected void logThrowable(Throwable throwable, String msg)
+    {
+        StringWriter sWriter = new StringWriter();
+        sWriter.write(msg + "\n");
+
+        PrintWriter pWriter = new PrintWriter(sWriter);
+        throwable.printStackTrace(pWriter);
+
+        logger.logArbitrary(Logger.STATUSMSG, sWriter.toString());
+    }
+}  // end of class PerfEverythingTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/PerfTestlet.java b/test/java/src/org/apache/qetest/xsl/PerfTestlet.java
new file mode 100644
index 0000000..b2ee9fd
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/PerfTestlet.java
@@ -0,0 +1,321 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.text.DecimalFormat;
+import java.util.Hashtable;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperHelper;
+
+/**
+ * Testlet to capture specific timing performance data.
+ * This Testlet is a cut-down version of PerfEverythingTestlet.
+ *
+ * We log out XalanC-like overall performance numbers, as well 
+ * as logging out any available data from the times array returned 
+ * by our transformWrapper.  Note that different flavors of 
+ * transformWrapper will return different sets of timings.
+ *
+ * @author Shane_Curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class PerfTestlet extends StylesheetTestlet
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.PerfTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     * @return String describing what this PerfTestlet does.
+     */
+    public String getDescription()
+    {
+        return "PerfTestlet";
+    }
+
+
+    /** 
+     * Worker method to actually perform the transform; 
+     * overriden to use command line processing.  
+     *
+     * Logs out applicable info; attempts to perform transformation 
+     * and also prints out a &lt;perf&gt; element.
+     *
+     * @param datalet to test with
+     * @param transformWrapper to have perform the transform
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void testDatalet(StylesheetDatalet datalet, TransformWrapper transformWrapper)
+            throws Exception
+    {
+        // Setup: Save options from the datalet in convenience variables
+        int iterations = 5;
+        boolean runtimeGC = true;
+        long[] times = null;
+
+		// Read in necessary options from test.properties file.
+        try
+        {
+            iterations = Integer.parseInt(datalet.options.getProperty("iterations"));
+        }
+        catch (Exception e) { /* no-op, leave as default */ }
+        try
+        {	
+        	String gc = datalet.options.getProperty("runtimeGC");
+			if (gc != null)
+				runtimeGC = (Boolean.valueOf(gc)).booleanValue(); 
+        }
+        catch (Exception e) { /* no-op, leave as default */ }
+
+        // Setup: store various XalanC-like timing data in convenience variables
+		long warmup = 0L;			// First transform. Used to load classes.
+        long singletransform = 0L;  // Very first Preload end-to-end transform
+        long etoe = 0L;     		// First end-to-end transform during iterations
+        long avgetoe = 0L;  		// Average of end-to-end transforms during iterations
+        long parsexsl = 0L;     	// First stylesheet preprocess during iterations
+        long avgparsexsl = 0L;  	// Average of stylesheet preprocess during iterations
+        long unparsedxml = 0L;   	// First stylesheet process during iterations
+        long transxml = 0L;			// Transform w/Stylesheet - NO OUTPUT
+		long transxmloutput = 0L; 	// Transform w/Stylesheet - OUTPUT
+
+        //logger.logMsg(Logger.TRACEMSG, "executing with: inputName=" + datalet.inputName
+        //              + " xmlName=" + datalet.xmlName + " outputName=" + datalet.outputName
+        //              + " goldName=" + datalet.goldName + " flavor="  + datalet.flavor
+        //              + " iterations=" + iterations 
+        //              + " algorithim=" + getDescription());
+
+        //@todo make various logMemory calls optional
+        logMemory(runtimeGC, false);
+
+        // Measure(warmup): JVM warm up
+        times = transformWrapper.transform(datalet.xmlName, datalet.inputName,
+                                            datalet.outputName);
+        warmup = times[TransformWrapper.IDX_OVERALL];
+        logMemory(runtimeGC, false);
+
+        // Measure(singletransform): Very first Preload end-to-end transform
+        times = transformWrapper.transform(datalet.xmlName, datalet.inputName,
+                                            datalet.outputName);
+        singletransform = times[TransformWrapper.IDX_OVERALL];
+        logMemory(runtimeGC, false);
+
+        // Measure(parsexsl): once: first preprocess
+        times = transformWrapper.buildStylesheet(datalet.inputName);
+        parsexsl = times[TransformWrapper.IDX_OVERALL];
+        logMemory(runtimeGC, false);
+
+        // Measure(unparsedxml): once: first process
+        times = transformWrapper.transformWithStylesheet(datalet.xmlName, datalet.outputName);
+        unparsedxml = times[TransformWrapper.IDX_OVERALL];
+        logMemory(runtimeGC, false);
+
+        for (int ctr = 1; ctr <= iterations; ctr++)
+        {
+            // Measure(avgparsexsl): average preprocess
+            times = transformWrapper.buildStylesheet(datalet.inputName);
+            avgparsexsl += times[TransformWrapper.IDX_OVERALL];
+            logMemory(runtimeGC, false);
+
+            // Measure(avgunparsedxml): getTransformer + xmlRead + transform 
+            times = transformWrapper.transformWithStylesheet(datalet.xmlName, datalet.outputName);
+            transxml += times[TransformWrapper.IDX_TRANSFORM];
+            logMemory(runtimeGC, false);
+
+            // Measure(avgunparsedxml): getTransformer + xmlRead + transform + resultWrite
+            times = transformWrapper.transformWithStylesheet(datalet.xmlName, datalet.outputName);
+            transxmloutput += times[TransformWrapper.IDX_OVERALL];
+            logMemory(runtimeGC, false);
+
+        }
+
+        // Measure(etoe): once: first full process
+        times = transformWrapper.transform(datalet.xmlName, datalet.inputName, datalet.outputName);
+        etoe = times[TransformWrapper.IDX_OVERALL];
+        logMemory(runtimeGC, false);
+
+        // Aggregate all specific timing data returned by TransformWrappers
+        //  note that different flavors of wrappers will be able 
+        //  to report different kinds of times
+        // This data is separate from the XalanC-like data above
+        //@todo determine which data is best to store
+        long[] storedTimes = TransformWrapperHelper.getTimeArray();
+        long[] storedCounts = TransformWrapperHelper.getTimeArray();
+        for (int ctr = 1; ctr <= iterations; ctr++)
+        {
+            // Measure(avgetoe): average full process
+            times = transformWrapper.transform(datalet.xmlName, datalet.inputName, datalet.outputName);
+            avgetoe += times[TransformWrapper.IDX_OVERALL];
+            aggregateTimes(times, storedTimes, storedCounts);
+            logMemory(runtimeGC, false);
+        }
+
+        Hashtable attrs = new Hashtable();
+        // BOTH: Log all specific timing data returned by TransformWrappers
+        logAggregateTimes(attrs, storedTimes, storedCounts);
+
+        // ASLO: Log special XalanC-like performance element with our timing
+        // UniqRunid is an Id that our TestDriver normally sets 
+        //  with some unique code, so that results analysis 
+        //  stylesheets can compare different test runs
+        attrs.put("UniqRunid", datalet.options.getProperty("runId", "runId;none"));
+        // processor is the 'flavor' of processor we're testing
+        attrs.put("processor", transformWrapper.getDescription());
+        // idref is the individual filename
+        attrs.put("idref", (new File(datalet.inputName)).getName());
+        // inputName is the actual name we gave to the processor
+        attrs.put("inputName", datalet.inputName);
+        attrs.put("iterations", new Integer(iterations));
+		attrs.put("warmup", new Long(warmup)); 
+        attrs.put("singletransform", new Long(singletransform)); // Very first Preload end-to-end transform
+        attrs.put("etoe", new Long(etoe)); // First end-to-end transform during iterations
+        // Note that avgetoe should match logTimes()'s OVERALL value
+        attrs.put("avgetoe", new Long(avgetoe / iterations)); // Average of end-to-end transforms during iterations
+        attrs.put("parsexsl", new Long(parsexsl)); // First stylesheet preprocess during iterations
+        attrs.put("avgparsexsl", new Long(avgparsexsl / iterations)); // Average of stylesheet preprocess during iterations
+        attrs.put("unparsedxml", new Long(unparsedxml)); // First stylesheet process during iterations
+        attrs.put("transxml", new Long(transxml / iterations)); // Average of stylesheet process during iterations
+
+		// Additional metrics for data throughput
+		File fIn = new File(datalet.inputName);
+		long btIn = iterations * fIn.length();
+		attrs.put("BytesIn", new Long(btIn));
+
+		// Due to unknown reasons the output needs to be filtered through a FileInputStream to get it's size.
+		File fOut = new File(datalet.outputName);
+		FileInputStream fOutStrm = new FileInputStream(fOut);
+
+		int len = fOutStrm.available();
+		long btOut = iterations * fOut.length();
+		attrs.put("BytesOut", new Long(btOut));
+		fOutStrm.close();
+
+		// I've added additional measurments.  DP calculated KBs as ((Ki+Ko)/2)/sec.
+		// I now calculate it with the following (Ki+K0)/sec
+
+		// Calculate TRANSFORM thruput (Kb/sec). Based on DataPower; does NOT file I/O
+		double KBtdp = (double)(1000 * (btIn + btOut)) / (double)(1024 * 2 * transxml);
+		DecimalFormat fmt = new DecimalFormat("####.##");
+		StringBuffer x = new StringBuffer( fmt.format(KBtdp));
+		attrs.put("KBtdp", x); 
+
+		// Calculate OVERALL thruput (Kb/sec). Based on DataPower; does include file I/O
+		double KBtsdp = (double)(1000 * (btIn + btOut)) / (double)(1024 * 2 * transxmloutput);
+		//DecimalFormat fmt = new DecimalFormat("####.##");
+		x = new StringBuffer(fmt.format(KBtsdp));
+		attrs.put("KBtsdp", x); 
+
+		// Calculate TRANSFORM thruput (Kb/sec). Based on ped; does NOT file I/O
+		double KBtPD = (double)(1000 * (btIn + btOut)) / (double)(1024 * transxml);
+		//DecimalFormat fmt = new DecimalFormat("####.##");
+		x = new StringBuffer(fmt.format(KBtPD));
+		attrs.put("KBtPD", x); 
+
+		// Calculate OVERALL thruput (Kb/sec). Based on ped; does include file I/O
+		double KBtsPD = (double)(1000 * (btIn + btOut)) / (double)(1024 * transxmloutput);
+		//DecimalFormat fmt = new DecimalFormat("####.##");
+		x = new StringBuffer(fmt.format(KBtsPD));
+		attrs.put("KBtsPD", x); 
+
+		logger.logElement(Logger.STATUSMSG, "perf", attrs, fIn.getName());
+    }
+
+    /**
+     * Worker method: optionally reports Runtime.totalMemory/freeMemory; 
+     * optionally first calls .gc() to force garbage collection.  
+     * @param doGC: call .gc() or not first
+     * @param doLog: log out memory stats or not
+     */
+    protected void logMemory(boolean doGC, boolean doLog)
+    {
+        if (doGC)
+        {
+            Runtime.getRuntime().gc();
+			//System.out.print(".");
+        }
+        if (doLog)
+        {
+            logger.logStatistic(Logger.STATUSMSG, Runtime.getRuntime().freeMemory(), 0, "UMem;freeMemory");
+            logger.logStatistic(Logger.STATUSMSG, Runtime.getRuntime().totalMemory(), 0, "UMem;totalMemory");
+        }
+    }
+
+    /**
+     * Worker method: aggregate timing arrays and keep counters.  
+     * @param newTimes new timing data to add to storedTimes
+     * @param storedTimes incremented from newTimes
+     * @param countTimes number of time slots actually incremented; 
+     * i.e. TIME_UNUSED ones are not incremented
+     */
+    protected void aggregateTimes(long[] newTimes, long[] storedTimes, long[] countTimes)
+    {
+        // Note assumption in this class that all are same len
+        for (int i = 0; i < storedTimes.length; i++)
+        {
+            // Only aggregate items that have actual timing data
+            if (TransformWrapper.TIME_UNUSED != newTimes[i])
+            {
+                // Be sure to start from 0 if we haven't been hit before
+                if (TransformWrapper.TIME_UNUSED == storedTimes[i])
+                {
+                    // Start counting the time data for this slot
+                    storedTimes[i] = newTimes[i];
+                    // Start counter for this slot
+                    countTimes[i] = 1;
+                }
+                else
+                {
+                    // Aggregate the time data for this slot
+                    storedTimes[i] += newTimes[i];
+                    // Increment counter for this slot
+                    countTimes[i]++;
+                }
+            }
+        }
+    }
+
+    /**
+     * Worker method: log aggregate timing arrays and keep counters.  
+     * @param storedTimes to log out
+     * @param countTimes number of time slots actually incremented
+     */
+    protected void logAggregateTimes(Hashtable attrs, long[] storedTimes, long[] countTimes)
+    {
+        for (int i = 0; i < storedTimes.length; i++)
+        {
+            // Only log items that have actual timing data
+            if (TransformWrapper.TIME_UNUSED != storedTimes[i])
+            {
+                attrs.put(TransformWrapperHelper.getTimeArrayDesc(i), 
+                          new Long(storedTimes[i] / countTimes[i]));
+            }
+        }
+    }
+}  // end of class PerfTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/ResultScanner.java b/test/java/src/org/apache/qetest/xsl/ResultScanner.java
new file mode 100644
index 0000000..bc1e082
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ResultScanner.java
@@ -0,0 +1,336 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.io.PrintWriter;
+
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * Scans a directory tree of result.xml and assorted files 
+ * and creates a rolled-up overview of test problems.
+ * 
+ * <p>Currently fairly tightly coupled to it's stylesheet and to 
+ * XMLFileLogger and Reporter.  Scans a directory tree (default is 
+ * results-alltest) looking for Pass-/Fail-*.xml results marker 
+ * files from test runs.  Then runs the stylesheet over those, 
+ * which produces a single output .html file that lists just fails 
+ * and related messages.</p>
+ *  
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ResultScanner
+{
+
+    /**
+     * Scan a directory tree for result files and create report.  
+     *
+     * @param resultDir directory to start scanning in
+     * @param baseName of output filename (.xml/.html added)
+     * @throws any underlying exceptions, including 
+     * FileNotFoundException if if can't find any results
+     */
+    public void scanResults(String resultName, String baseName)
+            throws Exception
+    {
+        File resultDir = new File(resultName);
+        if (!resultDir.exists() || !resultDir.isDirectory())
+        {
+            throw new FileNotFoundException("ResultScanner: resultDir " + resultDir + " does not exist!");
+        }
+        
+        // Create file to hold list of all results found
+        String listFilename = baseName + ".xml";
+        FileOutputStream fos = new FileOutputStream(listFilename);
+        PrintWriter writer = new PrintWriter(fos);
+        
+        // Scan for result files in the dir tree
+        try
+        {
+            logStartTag(writer, listFilename);
+            scanDir(resultDir, writer, 1);  // 1 = starting recursion
+        } 
+        catch (Exception e)
+        {
+            logError(writer, "scanResults threw: " + e.toString());
+        }
+        finally
+        {
+            logEndTag(writer);
+            writer.close();
+        }
+
+        // Transform the list into a master overview of fails
+        transformScan(resultDir, listFilename, baseName + ".html");
+    }
+
+
+    /**
+     * Scan a directory tree for result files and create report.  
+     *
+     *
+     * @param resultDir directory to start scanning in
+     * @param writer to println results to
+     * @param recursion depth of this method
+     * @throws any underlying exceptions, including 
+     * FileNotFoundException if if can't find any results
+     */
+    protected void scanDir(File resultDir, PrintWriter writer, int depth)
+            throws Exception
+    {
+        depth++;
+        if (depth > MAX_DEPTH)
+        {
+            logError(writer, "scanDir: MAX_DEPTH exceeded, returning!");
+            return;
+        }
+
+        if (!resultDir.exists() || !resultDir.isDirectory())
+        {
+            logError(writer, "scanDir: attempt to scan non-directory, returning!");
+            return;
+        }
+        
+        // Get list of teststatus files that definitely have problems
+        String badResults[] = resultDir.list(
+                new FilenameFilter() // anonymous class
+                {
+                    public boolean accept(File dir, String name)
+                    {
+                        // Shortcuts for bogus filenames and dirs
+                        if (name == null || dir == null)
+                            return false;
+                        // Skip already-rolledup Harness reports
+                        if (name.endsWith("Harness.xml"))
+                            return false;
+                        return (name.startsWith("Fail-") 
+                                || name.startsWith("Errr-") 
+                                || name.startsWith("Incp-"));
+                    }
+                }
+            );
+
+        // Get list of teststatus files that passed or were 
+        //  ambiguous, which means they didn't fail
+        String okResults[] = resultDir.list(
+                new FilenameFilter() // anonymous class
+                {
+                    public boolean accept(File dir, String name)
+                    {
+                        // Shortcuts for bogus filenames and dirs
+                        if (name == null || dir == null)
+                            return false;
+                        return (name.startsWith("Pass-") 
+                                || name.startsWith("Ambg-"));
+                    }
+                }
+            );
+
+        // Output references to both sets of files if needed
+        if ((null != okResults) && (null != badResults)
+            && (okResults.length + badResults.length > 0))
+        {
+            logTestGroup(writer, resultDir.getPath(), okResults, badResults);
+        }
+        
+        // Traverse down directories
+        String subdirs[] = resultDir.list(
+                new FilenameFilter() // anonymous class
+                {
+                    public boolean accept(File dir, String name)
+                    {
+                        // Shortcuts for bogus filenames and dirs and CVS junk
+                        if (null == name || null == dir || "CVS".equals(name))
+                            return false;
+                        return (new File(dir, name)).isDirectory();
+                    }
+                }
+            );
+        if (null != subdirs)
+        {
+            for (int i=0; i < subdirs.length; i++)
+            {
+                scanDir(new File(resultDir, subdirs[i]), writer, depth + 1);
+            }
+        }
+
+    }
+
+
+    /**
+     * Transform a resultfilelist into a real report.  
+     *
+     *
+     * @param resultDir directory to start scanning in
+     * @param filename name of listfile
+     * @throws any underlying exceptions
+     */
+    protected void transformScan(File resultDir, String xmlName, String outName)
+            throws TransformerException
+    {
+        Templates templates = getTemplates();
+        Transformer transformer = templates.newTransformer();
+        transformer.transform(new StreamSource(xmlName), 
+                              new StreamResult(outName));        
+    }
+    
+
+    /**
+     * Find the appropriate stylesheet to use.  
+     *
+     * Worker method for future expansion
+     *
+     * @return Templates object to use for transform
+     * @throws any underlying TransformerException
+     */
+    public Templates getTemplates()
+            throws TransformerException
+    {
+        //@todo assumption: it's in current dir
+        String xslName = "ResultScanner.xsl";
+        StreamSource xslSource = new StreamSource(xslName);
+        TransformerFactory factory = TransformerFactory.newInstance();
+        return factory.newTemplates(xslSource);
+    }
+
+    
+    /**
+     * Write an xml decl and start tag to our list file.
+     *
+     * @param writer where to write to
+     */
+    public static void logStartTag(PrintWriter writer, String name)
+    {
+        writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+        writer.println("<resultfilelist logFile=\"" + name + "\">");
+        writer.flush();
+    }
+
+
+    /**
+     * Write the end tag to our list file.
+     *
+     * @param writer where to write to
+     */
+    public static void logEndTag(PrintWriter writer)
+    {
+        writer.println("</resultfilelist>");
+        writer.flush();
+    }
+
+
+    /**
+     * Write an group of tests to our list file.
+     *
+     * @param writer where to write to
+     * @param base basedir where these are found
+     * @param okTests list of passing tests to write
+     * @param badTests list of failing tests to write
+     */
+    public static void logTestGroup(PrintWriter writer, String base, 
+            String[] okTests, String[] badTests)
+    {
+        writer.println("<testgroup href=\"" + base + "\" >");
+        if ((null != okTests) && (okTests.length > 0))
+        {
+            for (int i = 0; i < okTests.length; i++)
+            {
+                writer.println("<teststatus href=\"" + okTests[i] + "\" status=\"ok\" />");
+            }
+        }
+        if ((null != badTests) && (badTests.length > 0))
+        {
+            for (int i = 0; i < badTests.length; i++)
+            {
+                writer.println("<teststatus href=\"" + badTests[i] + "\" status=\"notok\" />");
+            }
+        }
+        writer.println("</testgroup>");
+    }
+
+
+    /**
+     * Write an error message to our list file.
+     *
+     * @param writer where to write to
+     * @param error string to write out
+     */
+    public static void logError(PrintWriter writer, String error)
+    {
+        writer.println("<error>" + error + "</error>");
+        writer.flush();
+    }
+
+
+    /**
+     * Defensive coding: limit directory depth recursion.
+     */
+    protected static final int MAX_DEPTH = 10;
+
+
+    /**
+     * Bottleneck output for future redirection.
+     */
+    protected PrintWriter outWriter = new PrintWriter(System.out);
+    
+    
+    /**
+     * Main method to run from the command line; sample usage.
+     * @param args cmd line arguments
+     */
+    public static void main(String[] args)
+    {
+        String resultDir = "results-alltest";
+        if (args.length >= 1)
+        {
+            resultDir = args[0];
+        }
+        String logFile = resultDir + File.separator + "ResultReport";
+        if (args.length >= 2)
+        {
+            logFile = args[1];
+        }
+        //@todo add more arguments; filtering, options 
+        //  to pass to stylesheets etc.
+        try
+        {
+            ResultScanner app = new ResultScanner();
+            app.scanResults(resultDir, logFile);
+            System.out.println("ResultScanner of " + resultDir + " complete in: " + logFile + ".html");
+        } 
+        catch (Exception e)
+        {
+            System.out.println("ResultScanner error on: " + resultDir);
+            e.printStackTrace();
+        }
+    }
+
+}
diff --git a/test/java/src/org/apache/qetest/xsl/ResultsCompareTestlet.java b/test/java/src/org/apache/qetest/xsl/ResultsCompareTestlet.java
new file mode 100644
index 0000000..2889181
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ResultsCompareTestlet.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ResultsCompareTestlet.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.util.Hashtable;
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+
+/**
+ * Testlet for just comparing results of test runs.
+ *
+ * This class provides a simple way to compare two result 
+ * trees, without actually invoking the processor.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class ResultsCompareTestlet extends StylesheetTestlet
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.ResultsCompareTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String describing what this ResultsCompareTestlet does.
+     */
+    public String getDescription()
+    {
+        return "ResultsCompareTestlet";
+    }
+
+    /** 
+     * Worker method merely compares results.  
+     *
+     * Logs out applicable info; ignores transformation, 
+     * compares results in goldDir with outputDir.
+     *
+     * @param datalet to test with
+     * @param transformWrapper to have perform the transform
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void testDatalet(StylesheetDatalet datalet, TransformWrapper transformWrapper)
+            throws Exception
+    {
+        //@todo Should we log a custom logElement here instead?
+        logger.logMsg(Logger.TRACEMSG, "ResultsCompare of: outputName=" + datalet.outputName
+                      + " goldName=" + datalet.goldName);
+
+        // If we get here, attempt to validate the contents of 
+        //  the last outputFile created
+        CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+        // Supply default value
+        if (null == fileChecker)
+            fileChecker = new XHTFileCheckService();
+        // Apply any testing options to the fileChecker
+        // Note: for the overall conformance test case, this is 
+        //  a bit inefficient, but we don't necessarily know if 
+        //  the checkService has already been setup or not    
+        fileChecker.applyAttributes(datalet.options);    
+        if (Logger.PASS_RESULT
+            != fileChecker.check(logger,
+                                 new File(datalet.outputName), 
+                                 new File(datalet.goldName), 
+                                 getDescription() + " " + datalet.getDescription())
+           )
+        {
+            // Log a custom element with all the file refs first
+            // Closely related to viewResults.xsl select='fileref"
+            //@todo check that these links are valid when base 
+            //  paths are either relative or absolute!
+            Hashtable attrs = new Hashtable();
+            attrs.put("idref", (new File(datalet.inputName)).getName());
+            attrs.put("inputName", datalet.inputName);
+            attrs.put("xmlName", datalet.xmlName);
+            attrs.put("outputName", datalet.outputName);
+            attrs.put("goldName", datalet.goldName);
+            logger.logElement(Logger.STATUSMSG, "fileref", attrs, "Conformance test file references");
+            // No longer need to log failure reason, this kind 
+            //  of functionality should be kept in checkServices
+        }
+    }
+
+
+    /** 
+     * Worker method to validate or log exceptions thrown by testDatalet.  
+     *
+     * Provided so subclassing is simpler; our implementation merely 
+     * calls checkErr and logs the exception.
+     *
+     * @param datalet to test with
+     * @param e Throwable that was thrown
+     */
+    protected void handleException(StylesheetDatalet datalet, Throwable t)
+    {
+        // Put the logThrowable first, so it appears before 
+        //  the Fail record, and gets color-coded
+        logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " " + datalet.getDescription());
+        logger.checkFail(getDescription() + " " + datalet.getDescription() 
+                         + " threw: " + t.toString());
+    }
+}  // end of class ResultsCompareTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/StylesheetDatalet.java b/test/java/src/org/apache/qetest/xsl/StylesheetDatalet.java
new file mode 100644
index 0000000..4ba1edc
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/StylesheetDatalet.java
@@ -0,0 +1,295 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * StylesheetDatalet.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.qetest.Datalet;
+
+/**
+ * Datalet for conformance testing of xsl stylesheet files.
+ * Should serve as a base class for other XSLT related Datalets.
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class StylesheetDatalet implements Datalet
+{
+    /** URL of the stylesheet; default:.../identity.xsl.  */
+    public String inputName = "tests/api/trax/identity.xsl";
+
+    /** URL of the stylesheet params; default:.../identity.xsl.  */
+    public String paramName = "tests/api/trax/identity.param";
+
+    /** URL of the xml document; default:.../identity.xml.  */
+    public String xmlName = "tests/api/trax/identity.xml";
+
+    /** URL to put output into; default:StylesheetDatalet.out.  */
+    public String outputName = "StylesheetDatalet.out";
+
+    /** URL of the a gold file or data; default:.../identity.out.  */
+    public String goldName = "tests/api-gold/trax/identity.out";
+
+    /** Flavor of a ProcessorWrapper to use; default:trax.  */
+    public String flavor = "trax"; //@todo should be ProcessorWrapper.DEFAULT_FLAVOR
+
+    /** 
+     * Generic placeholder for any additional options.  
+     * I'm still undecided if I like this idea or not.  
+     * This allows StylesheetDatalets to support additional kinds 
+     * of tests, like performance tests, without having to change 
+     * this data model.  These options can serve as a catch-all 
+     * for any new properties or options or what-not that new 
+     * tests need, without having to change how the most basic 
+     * member variables here work.
+     * Note that while this needs to be a Properties object to 
+     * take advantage of the parent/default behavior in 
+     * getProperty(), this doesn't necessarily mean they can only 
+     * store Strings.
+     */
+    public Properties options = new Properties();
+
+    public Map params = new HashMap();
+
+    /** Description of what this Datalet tests.  */
+    protected String description = "StylesheetDatalet: String inputName, String xmlName, String outputName, String goldName, String flavor, String paramName";
+
+
+    /**
+     * No argument constructor is a no-op.  
+     */
+    public StylesheetDatalet() { /* no-op */ }
+
+
+    /**
+     * Initialize this datalet from a string, perhaps from 
+     * a command line.  
+     * We will parse the command line with whitespace and fill
+     * in our member variables in order:
+     * <pre>inputName, xmlName, outputName, goldName, flavor</pre>, 
+     * if there are too few tokens, remaining variables will default.
+     */
+    public StylesheetDatalet(String args)
+    {
+        load(args);
+        setDescription("inputName=" + inputName 
+                       + " xmlName=" + xmlName 
+                       + " outputName=" + outputName 
+                       + " goldName=" + goldName 
+                       + " flavor=" + flavor
+                       + " paramName=" + paramName);
+    }
+
+
+    /**
+     * Initialize this datalet from a string, plus a Properties 
+     * block to use as our default options.  
+     * We will parse the command line with whitespace and fill
+     * in our member variables in order:
+     * <pre>inputName, xmlName, outputName, goldName, flavor</pre>, 
+     * if there are too few tokens, remaining variables will default.
+     */
+    public StylesheetDatalet(String args, Properties defaults)
+    {
+        // First set our defaults and our flavor member
+        options = new Properties(defaults);
+        flavor = options.getProperty("flavor", flavor);
+        // Then set all other items from the string, potentially 
+        //  overriding the flavor set above
+        load(args);
+        setDescription("inputName=" + inputName 
+                       + " xmlName=" + xmlName 
+                       + " outputName=" + outputName 
+                       + " goldName=" + goldName 
+                       + " flavor=" + flavor
+                       + " paramName=" + paramName);
+    }
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @return String describing the specific set of data 
+     * this Datalet contains (can often be used as the description
+     * of any check() calls made from the Testlet).
+     */
+    public String getDescription()
+    {
+        return description;
+    }
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @param s description to use for this Datalet.
+     */
+    public void setDescription(String s)
+    {
+        description = s;
+    }
+
+
+    /**
+     * Load fields of this Datalet from a Hashtable.  
+     * Caller must provide data for all of our fields.
+     * //@todo design decision: only have load(Hashtable)
+     * or load(Properties), not both.
+     * 
+     * @param Hashtable to load
+     */
+    public void load(Hashtable h)
+    {
+        if (null == h)
+            return; //@todo should this have a return val or exception?
+
+        inputName = (String)h.get("inputName");
+        paramName = (String)h.get("paramName");
+        xmlName = (String)h.get("xmlName");
+        outputName = (String)h.get("outputName");
+        goldName = (String)h.get("goldName");
+        flavor = (String)h.get("flavor");
+    }
+
+
+    /**
+     * Load fields of this Datalet from a Properties.  
+     * Caller must provide data for all of our fields.
+     * //@todo design decision: only have load(Hashtable)
+     * or load(Properties), not both.
+     * 
+     * @param Hashtable to load
+     */
+    public void load(Properties p)
+    {
+        if (null == p)
+            return; //@todo should this have a return val or exception?
+
+        inputName = (String)p.getProperty("inputName");
+        paramName = (String)p.getProperty("paramName");
+        xmlName = (String)p.getProperty("xmlName");
+        outputName = (String)p.getProperty("outputName");
+        goldName = (String)p.getProperty("goldName");
+        flavor = (String)p.getProperty("flavor");
+        // Also set our internal options to default to this Properties
+        options = new Properties(p);
+    }
+
+    /**
+     * Load fields of this Datalet from an array.  
+     * Order: inputName, xmlName, outputName, goldName, flavor
+     * If too few args, then fields at end of list are left at default value.
+     * @param args array of Strings
+     */
+    public void load(String[] args)
+    {
+        if (null == args)
+            return; //@todo should this have a return val or exception?
+
+        try
+        {
+            inputName = args[0];
+            xmlName = args[1];
+            outputName = args[2];
+            goldName = args[3];
+            flavor = args[4];
+            if (args.length > 4) {
+                paramName = args[5];
+            }
+        }
+        catch (ArrayIndexOutOfBoundsException  aioobe)
+        {
+            // No-op, leave remaining items as default
+        }
+    }
+
+
+    /**
+     * Load fields of this Datalet from a whitespace-delimited String.  
+     * Order: inputName, xmlName, outputName, goldName, flavor
+     * If too few args, then fields at end of list are left at default value.
+     * EXPERIMENTAL: takes any extra args as name value pairs and 
+     * attempts to add them to our options
+     * @param args array of Strings
+     */
+    public void load(String str)
+    {
+        if (null == str)
+            return; //@todo should this have a return val or exception?
+
+        StringTokenizer st = new StringTokenizer(str);
+
+        // Fill in as many items as we can; leave as default otherwise
+        // Note that order is important!
+        if (st.hasMoreTokens())
+        {
+            inputName = st.nextToken();
+            if (st.hasMoreTokens())
+            {
+                xmlName = st.nextToken();
+                if (st.hasMoreTokens())
+                {
+                    outputName = st.nextToken();
+                    if (st.hasMoreTokens())
+                    {
+                        goldName = st.nextToken();
+            
+                        if (st.hasMoreTokens())
+                        {
+                            flavor = st.nextToken();
+
+                            if (st.hasMoreTokens())
+                            {
+                                paramName = st.nextToken();
+                            }
+                        
+                        }
+                    }
+                }
+            }
+        }
+        // EXPERIMENTAL add extra name value pairs to our options
+        while (st.hasMoreTokens())
+        {
+            String name = st.nextToken();
+            if (st.hasMoreTokens())
+            {
+                options.put(name, st.nextToken());
+            }
+            else
+            {
+                // Just put it as 'true' for boolean options
+                options.put(name, "true");
+            }
+        }
+
+    }
+}  // end of class StylesheetDatalet
+
diff --git a/test/java/src/org/apache/qetest/xsl/StylesheetDataletManager.java b/test/java/src/org/apache/qetest/xsl/StylesheetDataletManager.java
new file mode 100644
index 0000000..ab2fb4c
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/StylesheetDataletManager.java
@@ -0,0 +1,489 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.qetest.Logger;
+
+/**
+ * Simple services for getting lists of StylesheetDatalets.
+ * 
+ *
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public abstract class StylesheetDataletManager // provide static services only
+{
+
+    /** 
+     * Token in xsl file denoting the text of an expected exception.  
+     * Used in getInfoItem.
+     */
+    public static final String INFOITEM_EXPECTED_EXCEPTION = "ExpectedException:";
+
+    /**
+     * Get specified information about the datalet.
+     * 
+     * <p>Note that different kinds of information may be read 
+     * or discovered in different ways.</p>
+     *
+     * <p>Currently only implemented for 
+     * INFOITEM_EXPECTED_EXCEPTION.</p>
+     *
+     * @param logger to report problems to
+     * @param datalet to get information about
+     * @param infoItem to get information about
+     * @return Vector of object(s) of appropriate type; 
+     * or null if error
+     */
+    public static Vector getInfoItem(Logger logger, StylesheetDatalet datalet, String infoItem)
+    {
+        if ((null == datalet) || (null == infoItem))
+        {
+            logger.logMsg(Logger.ERRORMSG, "getTestInfo called with null datalet or infoItem!");
+            return null;
+        }
+        if (INFOITEM_EXPECTED_EXCEPTION.equals(infoItem))
+        {
+            return getExpectedException(logger, datalet);
+        }
+        else
+        {
+            logger.logMsg(Logger.WARNINGMSG, "getTestInfo unsupported infoItem: " + infoItem);
+            return null;
+        }
+    }
+
+
+    /**
+     * Worker method to get expected exception text about a stylesheet.
+     * 
+     * Currently parses the inputDir stylesheet for a line that contains 
+     * EXPECTED_EXCEPTION inside an xsl comment, on a single line, and 
+     * trims off the closing comment -->.
+     * Future work: allow options on datalet to specify some other 
+     * expected data in another format - a whole Throwable object to 
+     * compare to, or a stacktrace, etc.
+     * 
+     * @author Shane Curcuru
+     * @param d Datalet that contains info about the exception
+     * @return Vector of Strings denoting toString of exception(s)
+     * we might expect - any one of them will pass; null if error
+     */
+    protected static Vector getExpectedException(Logger logger, StylesheetDatalet d)
+    {
+        final String EXPECTED_EXCEPTION_END = "-->";
+        Vector v = null;
+        // Read in the testName file to see if it's expecting something        
+        try
+        {
+            FileReader fr = new FileReader(d.inputName);
+            BufferedReader br = new BufferedReader(fr);
+            for (;;)
+            {
+                String inbuf = br.readLine();
+
+                if (inbuf == null)
+                    break;  // end of file, break out and return
+
+                int idx = inbuf.indexOf(INFOITEM_EXPECTED_EXCEPTION);
+
+                if (idx < 0)
+                    continue;  // not on this line, keep going
+
+                // The expected exception.getMessage is the rest of the line...
+                String expExc = inbuf.substring(idx + INFOITEM_EXPECTED_EXCEPTION.length(),
+                                         inbuf.length());
+
+                // ... less the trailing " -->" comment end; trimmed
+                int endComment = expExc.indexOf(EXPECTED_EXCEPTION_END);
+                if (endComment > -1)
+                    expExc = expExc.substring(0, endComment).trim();
+                else
+                    expExc = expExc.trim();
+
+                if (null == v)
+                    v = new Vector(); // only create if needed
+                v.addElement(expExc);
+
+                // Continue reading the file for more potential
+                //  expected exception strings - read them all
+                //@todo optimization: stop parsing after xx lines?
+
+            }  // end for (;;)
+        }
+        catch (java.io.IOException ioe)
+        {
+            logger.logMsg(Logger.ERRORMSG, "getExpectedException() threw: "
+                                   + ioe.toString());
+            return null;
+        }
+        return v;
+    }
+
+
+    /** '[' character, first char in first line of xsltmark fileList.  */
+    public static final String XSLTMARK_CHAR = "[";
+
+    /** '#' character, comment char in qetest fileList.  */
+    public static final String QETEST_COMMENT_CHAR = "#";
+
+    /**
+     * Read in a file specifying a list of files to test.
+     * <p>File format is determined from first line in file, 
+     * which is a little bit dangerous!</p>
+     * <p>If first line starts with '[', it's an xsltmark-style 
+     * fileList, otherwise it's a qetest-style fileList.</p>
+     *
+     * @param logger to report problems to
+     * @param fileName String; name of the file
+     * @param desc description; caller's copy changed
+     * @param defaults default properties to potentially add to each datalet
+     * @return Vector of StylesheetDatalets, or null if error
+     */
+    public static Vector readFileList(Logger logger, String fileName, String desc, Properties defaults)
+    {
+        // Verify the file is there
+        File f = new File(fileName);
+        if (!f.exists())
+        {
+            logger.logMsg(Logger.ERRORMSG, "readFileList: " + fileName  
+                          + " does not exist!");
+            return null;
+        }
+
+        BufferedReader br = null;
+        String line = null;
+        try
+        {
+            br = new BufferedReader(new FileReader(f));
+            line = br.readLine(); // read just first line
+        }
+        catch (IOException ioe)
+        {
+            logger.logMsg(Logger.ERRORMSG, "readFileList: " + fileName 
+                          + " threw: " + ioe.toString());
+            return null;
+        }
+
+        // Verify the first line
+        if (line == null)
+        {
+            logger.logMsg(Logger.ERRORMSG, "readFileList: " + fileName
+                          + " appears to be blank!");
+            return null;
+        }
+
+        // Determine which kind of fileList this is
+        //  we support the 'native' org.apache.qetest format, and 
+        //  alternately the .ini file format used in xsltmark
+        Vector vec = null;
+        if (line.startsWith(XSLTMARK_CHAR))
+        {
+            // This is an xsltmark .ini style file
+            vec = readXsltmarkFileList(logger, br, line, fileName, desc, defaults);
+        }
+        else if (line.startsWith(QETEST_COMMENT_CHAR))
+        {
+            // This is a native qetest style file
+            vec = readQetestFileList(logger, br, line, fileName, desc, defaults);
+        }
+        else
+        {
+            logger.logMsg(Logger.WARNINGMSG, "readFileList: " + fileName
+                          + " could not determine file type; assuming qetest!");
+            vec = readQetestFileList(logger, br, line, fileName, desc, defaults);
+        }
+
+        if (vec.size() == 0)
+        {
+            logger.logMsg(Logger.ERRORMSG, "readFileList: " + fileName
+                          + " did not have any non-comment lines!");
+            return null;
+        }
+        return vec;
+    }
+    
+    /**
+     * Read in a qetest fileList specifying a list of files to test.
+     * <p>File format is pretty simple:</p>
+     * <ul>
+     * <li># first line of comments is copied into desc</li>
+     * <li># beginning a line is a comment</li>
+     * <li># rest of lines are whitespace delimited filenames and options</li>
+     * <li>inputName xmlName outName goldName flavor options...</li>
+     * <li><b>Note:</b> see {@link StylesheetDatalet} for
+     * details on how the file lines are parsed!</li>
+     * </ul>
+     * <p>Most items are optional, but not having them may result 
+     * in validation oddities.  Future work would be to coordinate 
+     * this with various Datalet's implementations of .load() so 
+     * that Datalets can do better defaulting of non-provided 
+     * items; or maybe so that a user can specific a default 'mask' 
+     * of values to use for unspecified items.</p>
+     *
+     * @param logger to report problems to
+     * @param br BufferedReader to read from
+     * @param firstLine already read from br
+     * @param fileName String; name of the file
+     * @param desc to use of this file
+     * @param defaults default properties to potentially add to each datalet
+     * @return Vector of StylesheetDatalets, or null if error
+     */
+    protected static Vector readQetestFileList(Logger logger, BufferedReader br, 
+                                               String firstLine, String fileName, 
+                                               String desc, Properties defaults)
+    {
+        final String ABSOLUTE = "absolute";
+        final String RELATIVE = "relative";
+
+        Vector vec = new Vector();
+        String line = firstLine;
+        // Check if the first line is a comment 
+        if (line.startsWith(QETEST_COMMENT_CHAR))
+        {
+            // Save it as the description
+            desc = line;
+            // Parse the next line
+            try
+            {
+                line = br.readLine();
+            } 
+            catch (IOException ioe)
+            {
+                logger.logMsg(Logger.ERRORMSG, "readQetestFileList: " 
+                              + fileName + " threw: " + ioe.toString());
+                return null;
+            }
+        }
+
+        // Load each line into a StylesheetDatalet
+        for (;;)
+        {
+            // Skip any lines beginning with # comment char or that are blank
+            if ((!line.startsWith(QETEST_COMMENT_CHAR)) && (line.length() > 0))
+            {
+                // Create a Datalet and initialize with the line's 
+                //  contents and default properties
+                StylesheetDatalet d = new StylesheetDatalet(line, defaults);
+
+                // Also pass over the global runId, if set
+                d.options.put("runId", defaults.getProperty("runId"));
+
+                //@todo Avoid spurious passes when output & gold not specified
+                //  needs to detect when StylesheetDatalet doesn't 
+                //  properly have outputName and goldName set
+
+                // Add it to our vector
+                vec.addElement(d);
+            }
+
+            // Read next line and loop
+            try
+            {
+                line = br.readLine();
+            }
+            catch (IOException ioe2)
+            {
+                // Just force us out of the loop; if we've already 
+                //  read part of the file, fine
+                logger.logMsg(Logger.WARNINGMSG, "readQetestFileList: " 
+                              + fileName + " threw: " + ioe2.toString());
+                break;
+            }
+
+            if (line == null)
+                break;
+        } // end of for (;;)
+        return vec;
+    }
+
+    /**
+     * Read in an xsltmark fileList specifying a list of files to test.
+     * <p>File format is an .ini file like so:</p>
+     * <pre>
+     * [avts]
+     * input=db100.xml
+     * stylesheet=avts.xsl
+     * output=avts.out
+     * reference=avts.ref
+     * iterations=100
+     * </pre>
+     * <p>Note that additional attributes will be logged as warnings
+     * and will be ignored.</p>
+     *
+     * @param logger to report problems to
+     * @param br BufferedReader to read from
+     * @param firstLine already read from br
+     * @param fileName String; name of the file
+     * @param desc to use of this file
+     * @param defaults default properties to potentially add to each datalet
+     * @return Vector of StylesheetDatalets, or null if error
+     */
+    protected static Vector readXsltmarkFileList(Logger logger, BufferedReader br, 
+                                                 String firstLine, String fileName, 
+                                                 String desc, Properties defaults)
+    {
+        Vector vec = new Vector();
+        String line = firstLine;
+        // Parse each line and build a datalet
+        for (;;)
+        {
+            // If we're starting a section, parse the section to a datalet
+            if (line.startsWith(XSLTMARK_CHAR))
+            {
+                StylesheetDatalet d = readXsltmarkDatalet(logger, br, line, fileName, desc, defaults);
+
+                // Also pass over the global runId, if set
+                d.options.put("runId", defaults.getProperty("runId"));
+
+                // Add datalet to our vector
+                vec.addElement(d);
+            }
+            // Skip blank lines
+            else if (line.length() == 0)
+            {
+                /* no-op */
+            }
+            // Ooops, readXsltmarkDatalet didn't work right
+            else
+            {
+                logger.logMsg(Logger.WARNINGMSG, "readXsltmarkFileList parse error, unknown line: " 
+                              + line);
+            }
+
+            // Read next line and loop
+            try
+            {
+                line = br.readLine();
+            }
+            catch (IOException ioe2)
+            {
+                // Just force us out of the loop; if we've already 
+                //  read part of the file, fine
+                logger.logMsg(Logger.WARNINGMSG, "readXsltmarkFileList: " 
+                              + fileName + " threw: " + ioe2.toString());
+                break;
+            }
+
+            if (line == null)
+                break;
+        } // end of for (;;)
+        return vec;
+    }
+
+    /**
+     * Read in an xsltmark fileList specifying a list of files to test.
+     * <p>File format is an .ini file</p>
+     *
+     * @param logger to report problems to
+     * @param br BufferedReader to read from
+     * @param firstLine already read from br
+     * @param fileName String; name of the file
+     * @param desc to use of this file
+     * @param defaults default properties to potentially add to each datalet
+     * @return StylesheetDatalet with appropriate data, or null if error
+     */
+    private static StylesheetDatalet readXsltmarkDatalet(Logger logger, BufferedReader br, 
+                                                String firstLine, String fileName, 
+                                                String desc, Properties defaults)
+    {
+        final String STYLESHEET_MARKER = "stylesheet=";
+        final String INPUT_MARKER = "input=";
+        final String OUTPUT_MARKER = "output=";
+        final String REFERENCE_MARKER = "reference=";
+        final String ITERATIONS_MARKER = "iterations=";
+        
+        String line = firstLine;
+        StylesheetDatalet d = new StylesheetDatalet();
+
+        // Also pass over the default properties as well
+        d.options = new Properties(defaults);
+
+        // Parse lines throughout the section to build the datalet
+        for (;;)
+        {
+            // Each .ini file line starts with name of item to fill
+            if (line.startsWith(STYLESHEET_MARKER))
+            {
+                d.inputName = line.substring(STYLESHEET_MARKER.length());
+            } 
+            else if (line.startsWith(INPUT_MARKER))
+            {
+                d.xmlName = line.substring(INPUT_MARKER.length());
+            } 
+            else if (line.startsWith(OUTPUT_MARKER))
+            {
+                d.outputName = line.substring(OUTPUT_MARKER.length());
+            } 
+            else if (line.startsWith(REFERENCE_MARKER))
+            {
+                d.goldName = line.substring(REFERENCE_MARKER.length());
+            } 
+            else if (line.startsWith(XSLTMARK_CHAR))
+            {
+                d.setDescription(line);
+            } 
+            else if (line.startsWith(ITERATIONS_MARKER))
+            {
+                d.options.put("iterations", line.substring(ITERATIONS_MARKER.length()));
+            } 
+            else if (line.length() == 0)
+            {
+                // Blank lines mean end-of-section; return datalet
+                // This is the primary exit point for this method
+                return d;
+            }
+            else
+            {
+                logger.logMsg(Logger.WARNINGMSG, "readXsltmarkDatalet, unknown line: " 
+                              + line);
+            }
+
+            // Read next line and loop
+            try
+            {
+                line = br.readLine();
+            }
+            catch (IOException ioe2)
+            {
+                // Just force us out of the loop; if we've already 
+                //  read part of the file, fine
+                logger.logMsg(Logger.WARNINGMSG, "readXsltmarkDatalet: " 
+                              + fileName + " threw: " + ioe2.toString());
+                break;
+            }
+
+            if (line == null)
+                break;
+        } // end of for (;;)
+        logger.logMsg(Logger.ERRORMSG, "readXsltmarkDatalet: " + fileName
+                      + " no data found!");
+        return null;
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/StylesheetDriver.java b/test/java/src/org/apache/qetest/xsl/StylesheetDriver.java
new file mode 100644
index 0000000..03a69c0
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/StylesheetDriver.java
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+
+/**
+ * Test driver for running a single XSLT test.
+ * 
+ * This is a simplification of the generic StylesheetTestletDriver 
+ * that simply executes a single stylesheet test using minimal 
+ * parameters but still supporting all the normal testing options.
+ *
+ * @author shane_curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class StylesheetDriver extends StylesheetTestletDriver
+{
+    /** Just initialize test name, comment; numTestCases is not used. */
+    public StylesheetDriver()
+    {
+        testName = "StylesheetDriver";
+        testComment = "Test driver for single XSLT stylesheets";
+    }
+
+
+    /**
+     * Override default processing to simply create a fileList 
+     * based on the single input file desired.
+     *
+     * @param p Properties block of options to use - unused
+     * @return true if OK, false if we should abort
+     */
+    public boolean runTestCases(Properties p)
+    {
+        // First log out any other runtime information, like the 
+        //  actual flavor of ProcessorWrapper, etc.
+        try
+        {
+            // Just grab all the info from the TransformWrapper...
+            Properties runtimeProps = TransformWrapperFactory.newWrapper(flavor).getProcessorInfo();
+            // ... and add a few extra things ourselves
+            runtimeProps.put("actual.testlet", getTestlet());
+            runtimeProps.put("actual.dirFilter", getDirFilter());
+            runtimeProps.put("actual.fileFilter", getFileFilter());
+            reporter.logHashtable(Logger.CRITICALMSG, runtimeProps, 
+                                  "actual.runtime information");
+        }
+        catch (Exception e)
+        {
+            reporter.logThrowable(Logger.WARNINGMSG, e, "Logging actual.runtime threw");
+        }
+
+        // Get the baseName of the test: axes01, boolean34, etc.
+        String testBaseName = testProps.getProperty("test", "processorinfo01"); // HACK some default test
+
+        // Create the datalet to run for this test
+        Vector datalets = buildDatalet(testBaseName);
+
+        // Actually process the specified file(s) in a testCase as normal
+        processFileList(datalets, "test1:" + testBaseName);
+        return true;
+    }
+
+
+    /**
+     * Create datalet(s) from a single user-supplied test name 
+     * in the format of 'axes44' or 'string132'.
+     *
+     * @param baseName of just one stylesheet to test
+     * @return Vector of local path\filenames of tests to run;
+     * the tests themselves will exist; null if error
+     */
+    public Vector buildDatalet(String baseName)
+    {
+        // Calculate directory name; pattern assumed to be 
+        //  [chars]N... where N... is numeric
+        String subdirName = baseName.substring(0, (baseName.length() - 2)); // HACK must actually calculate name, not assume 2 digits
+        reporter.logTraceMsg("buildDatalet:" + baseName + " baseName " + subdirName);
+
+        File subTestDir = new File(new File(inputDir), subdirName);
+        File subOutDir = new File(outputDir, subdirName);
+        File subGoldDir = new File(goldDir, subdirName);
+        // Validate that each of the specified dirs exists
+        // Returns directory references like so:
+        //  testDirectory = 0, outDirectory = 1, goldDirectory = 2
+        File[] dirs = validateDirs(new File[] { subTestDir }, 
+                                   new File[] { subOutDir, subGoldDir });
+
+        String testFilename = baseName + XSL_EXTENSION; // HACK should allow for xml embedded as well
+        File testFile = new File(subTestDir.getPath() + File.separator + testFilename);
+        if (!testFile.exists())
+        {
+            reporter.checkErr("test1: file does not exist: " + testFilename);
+            return null;
+        }
+        // Go and construct the datalet with all info
+        Vector v = new Vector(1);
+        // Check if it's a normal .xsl file, or a .xml file
+        //  (we assume .xml files are embedded tests!)
+        StylesheetDatalet d = new StylesheetDatalet();
+        if (testFilename.endsWith(XML_EXTENSION))
+        {
+            d.xmlName = subTestDir.getPath() + File.separator + testFilename;
+
+            String fileNameRoot = testFilename.substring(0, testFilename.indexOf(XML_EXTENSION));
+            d.inputName = null;
+            d.outputName = subOutDir.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+            d.goldName = subGoldDir.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+        }
+        else if (testFilename.endsWith(XSL_EXTENSION))
+        {
+            d.inputName = subTestDir.getPath() + File.separator + testFilename;
+
+            String fileNameRoot = testFilename.substring(0, testFilename.indexOf(XSL_EXTENSION));
+            d.xmlName = subTestDir.getPath() + File.separator + fileNameRoot + XML_EXTENSION;
+            d.outputName = subOutDir.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+            d.goldName = subGoldDir.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+        }
+        else
+        {
+            // Hmmm - I'm not sure what we should do here
+            reporter.logWarningMsg("Unexpected test file found, skipping: " + testFilename);
+        }
+        d.setDescription(testFilename);
+        d.flavor = flavor;
+        // Also copy over our own testProps as it's 
+        //  options: this allows for future expansion
+        //  of values in the datalet
+        d.options = new Properties(testProps);
+        // Optimization: put in a copy of our fileChecker, so 
+        //  that each testlet doesn't have to create it's own
+        //  fileCheckers should not store state, so this 
+        //  shouldn't affect the testing at all
+        d.options.put("fileCheckerImpl", fileChecker);
+        v.addElement(d);
+
+        return v;
+    }
+
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by StylesheetDriver:\n"
+                + "    -" + "test"
+                + "  <baseName of tests to run - axes01 >\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        StylesheetDriver app = new StylesheetDriver();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/StylesheetErrorTestlet.java b/test/java/src/org/apache/qetest/xsl/StylesheetErrorTestlet.java
new file mode 100644
index 0000000..b562914
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/StylesheetErrorTestlet.java
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+
+/**
+ * Testlet for testing of xsl stylesheets with expected errors.
+ *
+ * This class provides the testing algorithim used for verifying 
+ * how a XSLT processor handles stylesheets with known expected 
+ * errors conditions in them.  
+ * The primary testing mode is attempting to build a stylesheet 
+ * or use a stylesheet to process an XML document, where the 
+ * stylesheet has a known error and should cause the processor 
+ * to throw an exception.
+ * This testlet then verifies the text of the exception against 
+ * a specified ExpectedException: provided (normally provided in 
+ * comments at the head of a stylesheet test).  Multiple 
+ * ExpectedExceptions: may be provided, and we only check that 
+ * toString() of the actual exception contains one of the 
+ * ExpectedExceptions, not the full text (this makes maintaining 
+ * the expected data easier).
+ * Note also: we do nothing with the output files, so currently 
+ * we can't validate tests that both throw an exception and 
+ * produce an output file (that's the subject of another test...)
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class StylesheetErrorTestlet extends StylesheetTestlet
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.StylesheetErrorTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+
+    /**
+     * Accesor method for a brief description of this test.  
+     * @return String describing what this StylesheetErrorTestlet does.
+     */
+    public String getDescription()
+    {
+        return "StylesheetErrorTestlet";
+    }
+
+
+    /** 
+     * Worker method to validate output file with gold; overridden
+     * to call checkFail, since our definition of error tests 
+     * is that they should have thrown an exception!  
+     *
+     * Logs out applicable info while validating output file.
+     *
+     * @param datalet to test with
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void checkDatalet(StylesheetDatalet datalet)
+            throws Exception
+    {
+        // Just log a fail; error tests must throw exceptions
+        logger.checkFail(datalet.getDescription() + " did not throw any exception");
+        // Log a custom element with all the file refs
+        // Closely related to viewResults.xsl select='fileref"
+        //@todo check that these links are valid when base 
+        //  paths are either relative or absolute!
+        Hashtable attrs = new Hashtable();
+        attrs.put("idref", (new File(datalet.inputName)).getName());
+        try
+        {
+            attrs.put("baseref", System.getProperty("user.dir"));
+        } 
+        catch (Exception e) { /* no-op, ignore */ }
+        
+        attrs.put("inputName", datalet.inputName);
+        attrs.put("xmlName", datalet.xmlName);
+        attrs.put("outputName", datalet.outputName);
+        attrs.put("goldName", datalet.goldName);
+        logger.logElement(Logger.STATUSMSG, "fileref", attrs, "Conformance test file references");
+    }
+
+
+    /** 
+     * Worker method to validate exceptions thrown by testDatalet.  
+     *
+     * Our implementation compares t.toString() with 
+     * expectedException data from the stylesheet test.
+     *
+     * @param datalet to test with
+     * @param e Throwable that was thrown
+     */
+    protected void handleException(StylesheetDatalet datalet, Throwable t)
+    {
+        // Get gold or reference info from the datalet
+        Vector expectedExceptions = StylesheetDataletManager.getInfoItem(logger, datalet, StylesheetDataletManager.INFOITEM_EXPECTED_EXCEPTION);
+        if ((null == expectedExceptions) || (0 == expectedExceptions.size()))
+        {
+            logger.logThrowable(Logger.INFOMSG, t, getDescription() + " " + datalet.getDescription());
+            // No gold info available; report ambiguous and return
+            logger.checkAmbiguous(getDescription() + " " + datalet.getDescription() 
+                            + " no " + StylesheetDataletManager.INFOITEM_EXPECTED_EXCEPTION + " available!");
+        }
+        else
+        {
+            // Attempt to see if our throwable matches any gold data
+            boolean foundExpected = false;
+            for (Enumeration elements = expectedExceptions.elements();
+                 elements.hasMoreElements(); 
+                 /* no increment portion */)
+            {
+                // Maintenance Note: Ensure this will always be String data
+                String expExc = (String)elements.nextElement();
+                if (t.toString().indexOf(expExc) > -1)
+                {
+                    foundExpected = true;
+                    break;
+                }
+            }
+            if (foundExpected)
+            {
+                logger.checkPass(getDescription() + " " + datalet.getDescription() 
+                                 + " expectedly threw: " + t.toString());
+            }
+            else
+            {
+                // Put the logThrowable first, so it appears before 
+                //  the Fail record, and gets color-coded
+                logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " " + datalet.getDescription());
+                logger.checkFail(getDescription() + " " + datalet.getDescription() 
+                                 + " unexpectedly threw: " + t.toString());
+            }
+        }
+    }
+
+}  // end of class StylesheetErrorTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/StylesheetTestlet.java b/test/java/src/org/apache/qetest/xsl/StylesheetTestlet.java
new file mode 100644
index 0000000..c3d9968
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/StylesheetTestlet.java
@@ -0,0 +1,331 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * StylesheetTestlet.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.QetestFactory;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+
+/**
+ * Testlet for conformance testing of xsl stylesheet files.
+ *
+ * This class provides the default algorithm used for verifying 
+ * Xalan's conformance to the XSLT spec.  It works in conjunction 
+ * with StylesheetTestletDriver, which supplies the logic for 
+ * choosing the testfiles to iterate over, and with 
+ * TransformWrapper, which provides an XSL  processor- and 
+ * method-independent way to process files (i.e. different 
+ * flavors of TransformWrapper may be different products, as well 
+ * as different processing models, like SAX, DOM or Streams).
+ *
+ * This class is broken up into common worker methods to make 
+ * subclassing easier for alternate testing algorithm.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class StylesheetTestlet extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.StylesheetTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String describing what this StylesheetTestlet does.
+     */
+    public String getDescription()
+    {
+        return "StylesheetTestlet";
+    }
+
+
+    /**
+     * Run this StylesheetTestlet: execute it's test and return.
+     *
+     * @param Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Ensure we have the correct kind of datalet
+        StylesheetDatalet datalet = null;
+        try
+        {
+            datalet = (StylesheetDatalet)d;
+        }
+        catch (ClassCastException e)
+        {
+            logger.checkErr("Datalet provided is not a StylesheetDatalet; cannot continue with " + d);
+            return;
+        }
+
+        // Perform any other general setup needed
+        testletInit(datalet);
+        try
+        {
+            // Get a TransformWrapper of the appropriate flavor
+            TransformWrapper transformWrapper = getTransformWrapper(datalet);
+            // Transform our supplied input file...
+            testDatalet(datalet, transformWrapper);
+            transformWrapper = null;
+            // ...and compare with gold data
+            checkDatalet(datalet);
+        }
+        // Handle any exceptions from the testing
+        catch (Throwable t)
+        {
+            handleException(datalet, t);
+            return;
+        }
+	}
+
+
+    /** 
+     * Worker method to perform any pre-processing needed.  
+     *
+     * @param datalet to test with
+     */
+    protected void testletInit(StylesheetDatalet datalet)
+    {
+        //@todo validate our Datalet - ensure it has valid 
+        //  and/or existing files available.
+
+        // Cleanup outName only if asked to - delete the file on disk
+        // Optimization: this takes extra time and often is not 
+        //  needed, so only do this if the option is set
+        if ("true".equalsIgnoreCase(datalet.options.getProperty("deleteOutFile")))
+        {
+            try
+            {
+                boolean btmp = (new File(datalet.outputName)).delete();
+                logger.logMsg(Logger.TRACEMSG, "Deleting OutFile of::" + datalet.outputName
+                                     + " status: " + btmp);
+            }
+            catch (SecurityException se)
+            {
+                logger.logMsg(Logger.WARNINGMSG, "Deleting OutFile of::" + datalet.outputName
+                                       + " threw: " + se.toString());
+            }
+        }
+    }
+
+
+    /** 
+     * Worker method to get a TransformWrapper.  
+     *
+     * @param datalet to test with
+     * @return TransformWrapper to use with this datalet
+     */
+    protected TransformWrapper getTransformWrapper(StylesheetDatalet datalet)
+    {
+        TransformWrapper transformWrapper = null;
+        try
+        {
+            transformWrapper = TransformWrapperFactory.newWrapper(datalet.flavor);
+            // Set our datalet's options as options in the wrapper
+            //@todo this is inefficient, since our datalet may 
+            //  have many options that don't pertain to the wrapper, 
+            //  but it does allow users to simply pass new options 
+            //  without us having to change code
+            transformWrapper.newProcessor(datalet.options);
+        }
+        catch (Throwable t)
+        {
+            logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " newWrapper/newProcessor threw");
+            logger.checkErr(getCheckDescription(datalet) + " newWrapper/newProcessor threw: " + t.toString());
+            return null;
+        }
+        return transformWrapper;
+    }
+
+
+    /** 
+     * Worker method to actually perform the transform.  
+     *
+     * Logs out applicable info; attempts to perform transformation.
+     *
+     * @param datalet to test with
+     * @param transformWrapper to have perform the transform
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void testDatalet(StylesheetDatalet datalet, TransformWrapper transformWrapper)
+            throws Exception
+    {
+        //@todo Should we log a custom logElement here instead?
+        logger.logMsg(Logger.TRACEMSG, "executing with: inputName=" + datalet.inputName
+                      + " xmlName=" + datalet.xmlName + " outputName=" + datalet.outputName
+                      + " goldName=" + datalet.goldName + " flavor="  + datalet.flavor
+                      + " paramName="  + datalet.paramName);
+
+        // Optional: configure a test with XSLT parameters.
+        final File paramFile = new File(datalet.paramName);
+        if (paramFile.exists()) {
+            Properties params = new Properties();
+            final FileInputStream inStream = new FileInputStream(paramFile);
+            try {
+                params.load(inStream);
+                final Iterator iter = params.entrySet().iterator();
+                while (iter.hasNext()) {
+                    Map.Entry entry = (Map.Entry) iter.next();
+                    transformWrapper.setParameter(null, entry.getKey().toString(), entry.getValue());
+                }
+            } finally {
+                inStream.close();
+            }
+        }
+        
+        // Simply have the wrapper do all the transforming
+        //  or processing for us - we handle either normal .xsl 
+        //  stylesheet tests or just .xml embedded tests
+        long retVal = 0L;
+        if (null == datalet.inputName)
+        {
+            // presume it's an embedded test
+            long [] times = transformWrapper.transformEmbedded(datalet.xmlName, datalet.outputName);
+            retVal = times[TransformWrapper.IDX_OVERALL];
+        }
+        else
+        {
+            // presume it's a normal stylesheet test
+            long[] times = transformWrapper.transform(datalet.xmlName, datalet.inputName, datalet.outputName);
+            retVal = times[TransformWrapper.IDX_OVERALL];
+        }
+    }
+
+
+    /** 
+     * Worker method to validate output file with gold.  
+     *
+     * Logs out applicable info while validating output file.
+     *
+     * @param datalet to test with
+     * @throws allows any underlying exception to be thrown
+     */
+    protected void checkDatalet(StylesheetDatalet datalet)
+            throws Exception
+    {
+        // See if the datalet already has a fileChecker to use...
+        CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+
+        // ...if not, construct a default one with attributes
+        if (null == fileChecker) {
+	    String fcName = datalet.options.getProperty("fileChecker");
+	    Class fcClazz = QetestUtils.testClassForName(fcName,
+							 QetestUtils.defaultPackages, 
+							 null);
+	    if (null != fcClazz) {
+		fileChecker = (CheckService) fcClazz.newInstance();
+		fileChecker.applyAttributes(datalet.options);
+	    }
+	}
+	
+        if (null == fileChecker)
+        {
+            fileChecker = QetestFactory.newCheckService(logger, QetestFactory.TYPE_FILES);
+            // Apply any testing options to the fileChecker
+            fileChecker.applyAttributes(datalet.options);    
+        }
+
+        // Validate the file            
+        if (Logger.PASS_RESULT
+            != fileChecker.check(logger,
+                                 new File(datalet.outputName), 
+                                 new File(datalet.goldName), 
+                                 getCheckDescription(datalet))
+           )
+        {
+            // Log a custom element with all the file refs
+            // Closely related to viewResults.xsl select='fileref"
+            //@todo check that these links are valid when base 
+            //  paths are either relative or absolute!
+            Hashtable attrs = new Hashtable();
+            attrs.put("idref", (new File(datalet.inputName)).getName());
+            try
+            {
+                attrs.put("baseref", System.getProperty("user.dir"));
+            } 
+            catch (Exception e) { /* no-op, ignore */ }
+            
+            attrs.put("inputName", datalet.inputName);
+            attrs.put("xmlName", datalet.xmlName);
+            attrs.put("outputName", datalet.outputName);
+            attrs.put("goldName", datalet.goldName);
+            logger.logElement(Logger.STATUSMSG, "fileref", attrs, "Conformance test file references");
+        }
+    }
+
+
+    /** 
+     * Worker method to validate or log exceptions thrown by testDatalet.  
+     *
+     * Provided so subclassing is simpler; our implementation merely 
+     * calls checkErr and logs the exception.
+     *
+     * @param datalet to test with
+     * @param e Throwable that was thrown
+     */
+    protected void handleException(StylesheetDatalet datalet, Throwable t)
+    {
+        // Put the logThrowable first, so it appears before 
+        //  the Fail record, and gets color-coded
+        logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " " + datalet.getDescription());
+        logger.checkErr(getCheckDescription(datalet) 
+                         + " threw: " + t.toString());
+    }
+
+
+    /** 
+     * Worker method to construct a description.  
+     *
+     * Simply concatenates useful info to override getDescription().
+     *
+     * @param datalet to test with
+     * @param e Throwable that was thrown
+     */
+    protected String getCheckDescription(StylesheetDatalet datalet)
+    {
+        return getDescription() 
+                + "{" + datalet.flavor + "} "
+                + datalet.getDescription();
+    }
+}  // end of class StylesheetTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/StylesheetTestletDriver.java b/test/java/src/org/apache/qetest/xsl/StylesheetTestletDriver.java
new file mode 100644
index 0000000..0103638
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/StylesheetTestletDriver.java
@@ -0,0 +1,953 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.lang.reflect.Constructor;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.Testlet;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+
+/**
+ * Test driver for XSLT stylesheet Testlets.
+ * 
+ * This is a generic driver for XSLT-oriented Testlets, and 
+ * supports iterating over either a user-supplied, specific list 
+ * of files to test or over a directory tree of test files.
+ * Note there are a number of design decisions made that are 
+ * just slightly specific to stylesheet testing, although this 
+ * would be a good model for a completely generic TestletDriver.
+ *
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class StylesheetTestletDriver extends FileBasedTest
+{
+
+    //-----------------------------------------------------
+    //-------- Constants for common input params --------
+    //-----------------------------------------------------
+
+    /**
+     * Parameter: Run a specific list of files, instead of 
+     * iterating over directories.  
+     * <p>Default: null, do normal iteration.</p>
+     */
+    public static final String OPT_FILELIST = "fileList";
+
+    /** Name of fileList file to read in to get test definitions from.   */
+    protected String fileList = null;
+
+    /**
+     * Parameter: FQCN or simple classname of Testlet to use.  
+     * <p>User may pass in either a FQCN or just a base classname, 
+     * and we will attempt to look it up in any of the most common 
+     * Xalan-testing packages.  See QetestUtils.testClassForName().</p>
+     * <p>Default: null, use StylesheetTestlet.</p>
+     */
+    public static final String OPT_TESTLET = "testlet";
+
+    /** Classname of Testlet to use.   */
+    protected String testlet = null;
+
+    /**
+     * Parameter: FQCN or simple classname of FilenameFilter for 
+     * directories under testDir we will process.  
+     * If fileList is not set, we simply go to our inputDir, and 
+     * then use this filter to iterate through directories returned.
+     * <p>Default: null, use ConformanceDirRules.</p>
+     */
+    public static final String OPT_DIRFILTER = "dirFilter";
+
+    /** Classname of FilenameFilter to use for dirs.  */
+    protected String dirFilter = null;
+
+    /**
+     * Parameter: FQCN or simple classname of FilenameFilter for 
+     * files within subdirs we will process.  
+     * If fileList is not set, we simply go through all directories 
+     * specified by directoryFilter, and then use this filter to 
+     * find all stylesheet test files in that directory to test.
+     * Note that this does <b>not</b> handle embedded tests, where 
+     * the XML document has an xml-stylesheet PI that defines the 
+     * stylesheet to use to process it.
+     * <p>Default: null, use ConformanceFileRules.</p>
+     */
+    public static final String OPT_FILEFILTER = "fileFilter";
+
+    /** Classname of FilenameFilter to use for files.  */
+    protected String fileFilter = null;
+
+
+    /**
+     * Parameter: What flavor of TransformWrapper to use: trax.sax|trax.stream|other?
+     * <p>Default: trax.</p>
+     */
+    public static final String OPT_FLAVOR = "flavor";
+
+    /** Parameter: What flavor of TransformWrapper to use: trax.sax|trax.stream|other?  */
+    protected String flavor = "trax";
+
+
+    /**
+     * Parameter: Are there any embedded stylesheets in XML files?
+     * <p>Default: null (no embedded tests; otherwise specify 
+     * semicolon delimited list of bare filenames something like 
+     * 'axes02.xml;bool98.xml').</p>
+     */
+    public static final String OPT_EMBEDDED = "embedded";
+
+    /** Parameter: Are there any embedded stylesheets in XML files?  */
+    protected String embedded = null;
+
+    /**
+     * Parameter: Is there any preference to which gold file to use?
+     * <p>Default: null (use standard .out file)
+     * name of processor, could be XalanJ-I, XalanJ-C, or XalanC
+     * </p>
+     */
+    public static final String OPT_PROCESSOR = "processor";
+
+    /**
+     * Parameter: Is there any parameters for XSL to use?
+     * <p>Default: none
+     * </p>
+     */
+    public static final String OPT_PARAM = "param";
+
+    /** Parameter: What processor is being used?  */
+    protected String processor = null;
+
+    /**
+     * Parameter: Is trace mode on?
+     * <p>Default: null (no trace)
+     * if on, non-null
+     * </p>
+     */
+    public static final String OPT_TRACE = "trace";
+
+    /** Parameter: Are we tracing? */
+    protected String traceMode = null;
+
+    /**
+     * Parameter: Name of test (Conf, Accept) as StylesheetTestletDriver
+     * can be used for more than one bucket
+     * <p>Default: null (use StylesheetTestletDriver)
+     * </p>
+     */
+    public static final String OPT_TESTNAME = "testName";
+
+
+    /** Unique runId for each specific invocation of this test driver.  */
+    protected String runId = null;
+
+    /** Convenience constant: .xml extension for input data file.  */
+    public static final String XML_EXTENSION = ".xml";
+
+    /** Convenience constant: .param extension for input data file.  */
+    public static final String PARAM_EXTENSION = ".param";
+
+    /** Convenience constant: .xsl extension for stylesheet file.  */
+    public static final String XSL_EXTENSION = ".xsl";
+
+    /** Convenience constant: .out extension for output result file.  */
+    public static final String OUT_EXTENSION = ".out";
+
+    /** Convenience constant: .log extension for log file.  */
+    public static final String LOG_EXTENSION = ".log";
+
+
+    /** Just initialize test name, comment; numTestCases is not used. */
+    public StylesheetTestletDriver()
+    {
+        testName = "StylesheetTestletDriver";
+        testComment = "Test driver for XSLT stylesheet Testlets";
+    }
+
+
+    /**
+     * Initialize this test - fill in parameters.
+     * Simply fills in convenience variables from user parameters.
+     *
+     * @param p unused
+     * @return true
+     */
+    public boolean doTestFileInit(Properties p)
+    {
+        // Copy any of our parameters from testProps to 
+        //  our local convenience variables
+        testlet = testProps.getProperty(OPT_TESTLET, testlet);
+        dirFilter = testProps.getProperty(OPT_DIRFILTER, dirFilter);
+        fileFilter = testProps.getProperty(OPT_FILEFILTER, fileFilter);
+        fileList = testProps.getProperty(OPT_FILELIST, fileList);
+        flavor = testProps.getProperty(OPT_FLAVOR, flavor);
+        embedded = testProps.getProperty(OPT_EMBEDDED, embedded);
+        processor = testProps.getProperty(OPT_PROCESSOR, processor);        
+        testName = testProps.getProperty(OPT_TESTNAME, testName);
+        traceMode = testProps.getProperty(OPT_TRACE, traceMode);
+        // Grab a unique runid for logging out with our tests 
+        //  Used in results reporting stylesheets to differentiate 
+        //  between different test runs
+        runId = QetestUtils.createRunId(testProps.getProperty("runId"));
+        testProps.put("runId", runId);  // put back in the properties 
+                                        // for later use
+        return true;
+    }
+
+
+    /**
+     * Run through the directory given to us and run tests found
+     * in subdirs; or run through our fileList.
+     *
+     * This method logs some basic runtime data (like the actual 
+     * testlet and ProcessorWrapper implementations used) and 
+     * then decides to either run a user-specified fileList or to 
+     * use our dirFilter to iterate over the inputDir.
+     *
+     * @param p Properties block of options to use - unused
+     * @return true if OK, false if we should abort
+     */
+    public boolean runTestCases(Properties p)
+    {
+        // First log out any other runtime information, like the 
+        //  actual flavor of ProcessorWrapper, etc.
+        try
+        {
+            // Note that each of these calls actually force the 
+            //  creation of an actual object of each type: this is 
+            //  required since we may default the types or our call 
+            //  to QetestUtils.testClassForName() may return a 
+            //  different classname than the user actually specified
+            // Care should be taken that the construction of objects 
+            //  here does not affect our testing later on
+            // Just grab all the info from the TransformWrapper...
+            Properties runtimeProps = TransformWrapperFactory.newWrapper(flavor).getProcessorInfo();
+            // ... and add a few extra things ourselves
+            runtimeProps.put("actual.testlet", getTestlet());
+            runtimeProps.put("actual.dirFilter", getDirFilter());
+            runtimeProps.put("actual.fileFilter", getFileFilter());
+            reporter.logHashtable(Logger.CRITICALMSG, runtimeProps, 
+                                  "actual.runtime information");
+        }
+        catch (Exception e)
+        {
+            reporter.logWarningMsg("Logging actual.runtime threw: " + e.toString());
+            reporter.logThrowable(Logger.WARNINGMSG, e, "Logging actual.runtime threw");
+        }
+
+        // Now either run a list of specific tests the user specified, 
+        //  or do the default of iterating over a set of directories
+        if (null != fileList)
+        {
+            // Process the specific list of tests the user supplied
+            String desc = "User-supplied fileList: " + fileList; // provide default value
+            // Use static worker class to process the list
+            Vector datalets = StylesheetDataletManager.readFileList(reporter, fileList, desc, testProps);
+
+            // Actually process the specified files in a testCase
+            processFileList(datalets, desc);
+        }
+        else
+        {
+            // Do the default, which is to iterate over the inputDir
+            // Note that this calls the testCaseInit/testCaseClose
+            //  logging methods itself
+            processInputDir();
+        }
+        return true;
+    }
+
+
+    /**
+     * Do the default: test all stylesheets found in subdirs
+     * of our inputDir, using FilenameFilters for dirs and files.
+     * This only goes down one level in the tree, eg:
+     * <ul>inputDir = tests/conf
+     * <li>tests/conf - not tested</li>
+     * <li>tests/conf/boolean - test all boolean*.xsl files</li>
+     * <li>tests/conf/copy - test all copy*.xsl files</li>
+     * <li>tests/conf/copy/foo - not tested</li>
+     * <li>tests/conf/xmanual - not tested, since default 
+     * ConformanceDirRules excludes dirs starting with 'x|X'</li>
+     * <li>tests/whitespace - test all whitespace*.xsl files</li>
+     * <li>etc.</li>
+     * </ul>
+     * Parameters: none, uses our internal members inputDir, 
+     * outputDir, testlet, etc.
+     */
+    public void processInputDir()
+    {
+        // Ensure the inputDir is there - we must have a valid location for input files
+        File testDirectory = new File(inputDir);
+
+        if (!testDirectory.exists())
+        {
+            // Try a default inputDir
+            String oldInputDir = inputDir; // cache for potential error message
+            testDirectory = new File((inputDir = getDefaultInputDir()));
+            if (!testDirectory.exists())
+            {
+                // No inputDir, can't do any tests!
+                // @todo check if this is the best way to express this
+                reporter.checkErr("inputDir(" + oldInputDir
+                                  + ", or " + inputDir + ") does not exist, aborting!");
+                return;
+            }
+        }
+
+        reporter.logInfoMsg("inputDir(" + testDirectory.getPath()
+                            + ") looking for subdirs with: " + dirFilter);
+
+        // Use our filter to get a list of directories to process
+        String subdirs[] = testDirectory.list(getDirFilter());
+
+        // Validate that we have some valid directories to process
+        if ((null == subdirs) || (subdirs.length <= 0))
+        {
+            reporter.checkErr("inputDir(" + testDirectory.getPath()
+                               + ") no valid subdirs found!");
+            return;
+        }
+
+        int numSubdirs = subdirs.length;
+
+        // For every subdirectory, check if we should run tests in it
+        for (int i = 0; i < numSubdirs; i++)
+        {
+            File subTestDir = new File(testDirectory, subdirs[i]);
+
+            if ((null == subTestDir) || (!subTestDir.exists()))
+            {
+                // Just log it and continue; presumably we'll find 
+                //  other directories to test
+                reporter.logWarningMsg("subTestDir(" + subTestDir.getPath() 
+                                       + ") does not exist, skipping!");
+                continue;
+            }
+
+            // Construct matching directories for outputs and golds
+            File subOutDir = new File(outputDir, subdirs[i]);
+            File subGoldDir = new File(goldDir, subdirs[i]);
+
+            // Validate that each of the specified dirs exists
+            // Returns directory references like so:
+            //  testDirectory = 0, outDirectory = 1, goldDirectory = 2
+            File[] dirs = validateDirs(new File[] { subTestDir }, 
+                                       new File[] { subOutDir, subGoldDir });
+
+            if (null == dirs)  // also ensures that dirs[0] is non-null
+            {
+                // Just log it and continue; presumably we'll find 
+                //  other directories to test
+                reporter.logWarningMsg("subTestDir(" + subTestDir.getPath() 
+                                       + ") or associated dirs does not exist, skipping!");
+                continue;
+            }
+
+            // Call worker method to process the individual directory
+            //  and get a list of .xsl files to test
+            Vector files = getFilesFromDir(subTestDir, getFileFilter(), embedded);
+            Hashtable goldFiles = getGoldsFromDir(subGoldDir, getGoldFileFilter(), processor);
+
+            // 'Transform' the list of individual test files into a 
+            //  list of Datalets with all fields filled in
+            //@todo should getFilesFromDir and buildDatalets be combined?
+            Vector datalets = buildDatalets(files, subTestDir, subOutDir, subGoldDir, goldFiles);
+
+            if ((null == datalets) || (0 == datalets.size()))
+            {
+                // Just log it and continue; presumably we'll find 
+                //  other directories to test
+                reporter.logWarningMsg("subTestDir(" + subTestDir.getPath() 
+                                       + ") did not contain any tests, skipping!");
+                continue;
+            }
+
+            // Now process the list of files found in this dir
+            processFileList(datalets, "Conformance test of: " + subdirs[i]);
+        } // end of for...
+    }
+
+
+    /**
+     * Run a list of stylesheet tests through a Testlet.
+     * The file names are assumed to be fully specified, and we assume
+     * the corresponding directories exist.
+     * Each fileList is turned into a testcase.
+     *
+     * @param vector of Datalet objects to pass in
+     * @param desc String to use as testCase description
+     */
+    public void processFileList(Vector datalets, String desc)
+    {
+        // Validate arguments
+        if ((null == datalets) || (0 == datalets.size()))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.checkErr("Testlet or datalets are null/blank, nothing to test!");
+            return;
+        }
+
+        // Put everything else into a testCase
+        //  This is not necessary, but feels a lot nicer to 
+        //  break up large test sets
+        reporter.testCaseInit(desc);
+
+        // Now just go through the list and process each set
+        int numDatalets = datalets.size();
+        reporter.logInfoMsg("processFileList() with " + numDatalets
+                            + " potential tests");
+        // Iterate over every datalet and test it
+        for (int ctr = 0; ctr < numDatalets; ctr++)
+        {
+            try
+            {
+                // Create a Testlet to execute a test with this 
+                //  next datalet - the Testlet will log all info 
+                //  about the test, including calling check*()
+                getTestlet().execute((Datalet)datalets.elementAt(ctr));
+            } 
+            catch (Throwable t)
+            {
+                // Log any exceptions as fails and keep going
+                //@todo improve the below to output more useful info
+                reporter.checkFail("Datalet num " + ctr + " threw: " + t.toString());
+                reporter.logThrowable(Logger.ERRORMSG, t, "Datalet threw");
+            }
+        }  // of while...
+        reporter.testCaseClose();
+    }
+
+
+    /**
+     * Use the supplied filter on given directory to return a list 
+     * of stylesheet tests to be run.
+     * Uses the normal filter for variations of *.xsl files, and 
+     * also constructs names for any -embedded tests found (which 
+     * may be .xml with xml-stylesheet PI's, not just .xsl)
+     *
+     * @param dir directory to scan
+     * @param filter to use on this directory; if null, uses default
+     * @param embeddedFiles special list of embedded files to find
+     * @return Vector of local path\filenames of tests to run;
+     * the tests themselves will exist; null if error
+     */
+    public Vector getFilesFromDir(File dir, FilenameFilter filter, String embeddedFiles)
+    {
+        // Validate arguments
+        if ((null == dir) || (!dir.exists()))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.logWarningMsg("getFilesFromDir(" + dir.toString() + ") dir null or does not exist");
+            return null;
+        }
+        // Get the list of 'normal' test files
+        String[] files = dir.list(filter);
+        Vector v = new Vector(files.length);
+        for (int i = 0; i < files.length; i++)
+        {
+            v.addElement(files[i]);
+        }
+        reporter.logTraceMsg("getFilesFromDir(" + dir.toString() + ") found " + v.size() + " xsl files to test");
+
+        // Also get a list of any embedded test files here
+        //  Optimization: only look for embedded files when likely to find them
+        if ((null != embeddedFiles) && (embeddedFiles.indexOf(dir.getName()) > -1))
+        {
+            // OK, presumably we have an embedded file in the current dir, 
+            //  add that name
+            StringTokenizer st = new StringTokenizer(embeddedFiles, ";");//@todo resource ;
+            while (st.hasMoreTokens())
+            {
+                String embeddedName = st.nextToken();
+                // Check if it's in our dir...
+                if (embeddedName.startsWith(dir.getName()))
+                {
+                    // ...and that it exists
+                    if ((new File(dir.getPath() + File.separator + embeddedName)).exists())
+                    {
+                        v.addElement(embeddedName);
+                    }
+                    else
+                    {
+                        reporter.logWarningMsg("Requested embedded file " + dir.getPath() + File.separator + embeddedName
+                                               + " does not exist, skipping");
+                    }
+                }
+            }
+        }
+        reporter.logTraceMsg("getFilesFromDir(" + dir.toString() + ") found " + v.size() + " total files to test");
+        return v;
+    }
+
+    /**
+     * Use the supplied filter on given directory to return a list 
+     * of stylesheet tests to be run.
+     * Uses the normal filter for variations of *.xsl files, and 
+     * also constructs names for any -embedded tests found (which 
+     * may be .xml with xml-stylesheet PI's, not just .xsl)
+     *
+     * @param dir directory to scan
+     * @param filter to use on this directory; if null, uses default
+     * @param embeddedFiles special list of embedded files to find
+     * @return Vector of local path\filenames of tests to run;
+     * the tests themselves will exist; null if error
+     */
+    public Hashtable getGoldsFromDir(File dir, FilenameFilter filter, String processor)
+    {
+        // Validate arguments
+        if ((null == dir) || (!dir.exists()))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.logWarningMsg("getGoldsFromDir(" + dir.toString() + ") dir null or does not exist");
+            return null;
+        }
+        // Get the list of 'normal' test files
+        String[] files = dir.list(filter);
+        Hashtable h = new Hashtable();
+        for (int i = 0; i < files.length; i++)
+        {        
+        	// Check after the first .
+        	// if "out", assume to be 'default' file
+        	// if name of the processor, override default file.
+        	StringTokenizer strTok = new StringTokenizer(files[i],".");
+        	String testCase = strTok.nextToken();
+        	String procChk = strTok.nextToken();
+        	if (procChk.equals(processor) ||
+        	    (procChk.equals("out") && h.get(testCase) == null)) {
+        	  h.put(testCase,files[i]);
+      	    }
+        }
+        reporter.logTraceMsg("getGoldsFromDir(" + dir.toString() + ") found " + h.size() + " gold files to test");
+        return h;
+    }
+
+    /**
+     * Transform a vector of individual test names into a Vector 
+     * of filled-in datalets to be tested
+     *
+     * This basically just calculates local path\filenames across 
+     * the three presumably-parallel directory trees of testLocation 
+     * (inputDir), outLocation (outputDir) and goldLocation 
+     * (goldDir).  It then stuffs each of these values plus some 
+     * generic info like our testProps into each datalet it creates.
+     * 
+     * @param files Vector of local path\filenames to be tested
+     * @param testLocation File denoting directory where all 
+     * .xml/.xsl tests are found
+     * @param outLocation File denoting directory where all 
+     * output files should be put
+     * @param goldLocation File denoting directory where all 
+     * gold files are found
+     * @return Vector of StylesheetDatalets that are fully filled in,
+     * i.e. outputName, goldName, etc are filled in respectively 
+     * to inputName
+     */
+    public Vector buildDatalets(Vector files, File testLocation, 
+                                File outLocation, File goldLocation,
+                                Hashtable goldFiles)
+    {
+        // Validate arguments
+        if ((null == files) || (files.size() < 1))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.logWarningMsg("buildDatalets null or empty file vector");
+            return null;
+        }
+        Vector v = new Vector(files.size());
+
+        // For every file in the vector, construct the matching 
+        //  out, gold, and xml/xsl files
+        for (Enumeration elements = files.elements();
+                elements.hasMoreElements(); /* no increment portion */ )
+        {
+            String file = null;
+            try
+            {
+                file = (String)elements.nextElement();
+            }
+            catch (ClassCastException cce)
+            {
+                // Just skip this entry
+                reporter.logWarningMsg("Bad file element found, skipping: " + cce.toString());
+                continue;
+            }
+            // Check if it's a normal .xsl file, or a .xml file
+            //  (we assume .xml files are embedded tests!)
+            StylesheetDatalet d = new StylesheetDatalet();
+            if (file.endsWith(XML_EXTENSION))
+            {
+                d.xmlName = testLocation.getPath() + File.separator + file;
+
+                String fileNameRoot = file.substring(0, file.indexOf(XML_EXTENSION));
+                d.inputName = null;
+                
+                d.outputName = outLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+                if (goldFiles != null && goldFiles.get(fileNameRoot) != null) {
+                  d.goldName = goldLocation.getPath() + File.separator + goldFiles.get(fileNameRoot);
+                } else {
+                  d.goldName = goldLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+                }                  
+            }
+            else if (file.endsWith(XSL_EXTENSION))
+            {
+                d.inputName = testLocation.getPath() + File.separator + file;
+
+                String fileNameRoot = file.substring(0, file.indexOf(XSL_EXTENSION));
+                d.paramName = testLocation.getPath() + File.separator + fileNameRoot + PARAM_EXTENSION;
+                d.xmlName = testLocation.getPath() + File.separator + fileNameRoot + XML_EXTENSION;
+                d.outputName = outLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+                d.goldName = goldLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+                if (goldFiles != null && goldFiles.get(fileNameRoot) != null) {
+                  d.goldName = goldLocation.getPath() + File.separator + goldFiles.get(fileNameRoot);
+                } else {
+                  d.goldName = goldLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
+                }                  
+                
+            }
+            else
+            {
+                // Hmmm - I'm not sure what we should do here
+                reporter.logWarningMsg("Unexpected test file found, skipping: " + file);
+                continue;
+            }
+            d.setDescription(file);
+            d.flavor = flavor;
+            // Also copy over our own testProps as it's 
+            //  options: this allows for future expansion
+            //  of values in the datalet
+            d.options = new Properties(testProps);
+            // Optimization: put in a copy of our fileChecker, so 
+            //  that each testlet doesn't have to create it's own
+            //  fileCheckers should not store state, so this 
+            //  shouldn't affect the testing at all
+            d.options.put("fileCheckerImpl", fileChecker);
+            if (traceMode != null) {
+                d.options.put(TransformWrapper.SET_PROCESSOR_ATTRIBUTES  + "setTraceListener", d.outputName + LOG_EXTENSION);
+            }
+            v.addElement(d);
+        }
+        return v;
+    }
+
+
+    /**
+     * Validate existence of or create various directories needed.
+     * <p>If any optionalDir cannot be created, it's array entry 
+     * will be null.</p>
+     *
+     * @param requiredDirs array of directories that must previously 
+     * exist; if none do, will return null; if none passed, return null
+     * @param optionalDirs array of optional directories; if they do 
+     * not exist they'll be created
+     * @return array of file objects, null if any error; all 
+     * required dirs are first, in order; then all optionalDirs
+     */
+    public File[] validateDirs(File[] requiredDirs, File[] optionalDirs)
+    {
+        if ((null == requiredDirs) || (0 == requiredDirs.length))
+        {
+            return null;
+        }
+    
+        File[] dirs = new File[(requiredDirs.length + optionalDirs.length)];
+        int ctr = 0;
+
+        try
+        {
+            // Validate requiredDirs exist first
+            for (int ir = 0; ir < requiredDirs.length; ir++)
+            {
+                if (!requiredDirs[ir].exists())
+                {
+                    reporter.logErrorMsg("validateDirs("
+                                         + requiredDirs[ir]
+                                         + ") requiredDir did not exist!");
+                    return null;
+                }
+                dirs[ctr] = requiredDirs[ir];
+                ctr++;
+            }
+
+            // Create any optionalDirs needed
+            for (int iopt = 0; iopt < optionalDirs.length; iopt++)
+            {
+                if (!optionalDirs[iopt].exists())
+                {
+                    if (!optionalDirs[iopt].mkdirs())
+                    {
+                        reporter.logWarningMsg("validateDirs("
+                                               + optionalDirs[iopt]
+                                               + ") optionalDir could not be created");
+                        dirs[ctr] = null;
+                    }
+                    else
+                    {
+                        reporter.logTraceMsg("validateDirs("
+                                             + optionalDirs[iopt]
+                                             + ") optionalDir was created");
+                        dirs[ctr] = optionalDirs[iopt];
+                    }
+                }
+                else
+                {  
+                    // It does previously exist, so copy it over
+                    dirs[ctr] = optionalDirs[iopt];
+                }
+                ctr++;
+            }
+        }
+        catch (Exception e)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, e, "validateDirs threw: " + e.toString());
+            return null;
+        }
+
+        return dirs;
+    }
+
+
+    /** Default FilenameFilter FQCN for directories.   */
+    protected String defaultDirFilter = "org.apache.qetest.xsl.ConformanceDirRules";
+
+    /** Default FilenameFilter FQCN for files.   */
+    protected String defaultFileFilter = "org.apache.qetest.xsl.ConformanceFileRules";
+
+    /** Default GoldFilenameFilter FQCN for files.   */
+    protected String defaultGoldFileFilter = "org.apache.qetest.xsl.GoldFileRules";
+
+
+    /** Default Testlet FQCN for executing stylesheet tests.   */
+    protected String defaultTestlet = "org.apache.qetest.xsl.StylesheetTestlet";
+
+    /** Cached Testlet Class; used for life of this test.   */
+    protected Class cachedTestletClazz = null;
+
+    /**
+     * Convenience method to get a Testlet to use.  
+     * Attempts to return one as specified by our testlet parameter, 
+     * otherwise returns a default StylesheetTestlet.
+     * 
+     * @return Testlet for use in this test; null if error
+     */
+    public Testlet getTestlet()
+    {
+        // Find a Testlet class to use if we haven't already
+        if (null == cachedTestletClazz)
+        {
+            cachedTestletClazz = QetestUtils.testClassForName(testlet, 
+                                                              QetestUtils.defaultPackages,
+                                                              defaultTestlet);
+        }
+        try
+        {
+            // Create it and set our reporter into it
+            Testlet t = (Testlet)cachedTestletClazz.newInstance();
+            t.setLogger((Logger)reporter);
+            return (Testlet)t;
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found! This should be very rare, since 
+            //  we know the defaultTestlet should be found
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to get a default filter for directories.  
+     * Uses category member variable if set.
+     * 
+     * @return FilenameFilter using ConformanceDirRules(category).
+     */
+    public FilenameFilter getDirFilter()
+    {
+        // Find a FilenameFilter class to use
+        Class clazz = QetestUtils.testClassForName(dirFilter, 
+                                                   QetestUtils.defaultPackages,
+                                                   defaultDirFilter);
+        try
+        {
+            // Create it, optionally with a category
+            String category = testProps.getProperty(OPT_CATEGORY);
+            if ((null != category) && (category.length() > 1))  // Arbitrary check for non-null, non-blank string
+            {
+                Class[] parameterTypes = { java.lang.String.class };
+                Constructor ctor = clazz.getConstructor(parameterTypes);
+
+                Object[] ctorArgs = { category };
+                return (FilenameFilter)ctor.newInstance(ctorArgs);
+            }
+            else
+            {
+                return (FilenameFilter)clazz.newInstance();
+            }
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found!
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to get a default filter for files.  
+     * Uses excludes member variable if set.
+     * 
+     * @return FilenameFilter using ConformanceFileRules(excludes).
+     */
+    public FilenameFilter getFileFilter()
+    {
+        // Find a FilenameFilter class to use
+        Class clazz = QetestUtils.testClassForName(fileFilter, 
+                                                   QetestUtils.defaultPackages,
+                                                   defaultFileFilter);
+        try
+        {
+            // Create it, optionally with excludes
+            String excludes = testProps.getProperty(OPT_EXCLUDES);
+            if ((null != excludes) && (excludes.length() > 1))  // Arbitrary check for non-null, non-blank string
+            {
+                Class[] parameterTypes = { java.lang.String.class };
+                Constructor ctor = clazz.getConstructor(parameterTypes);
+
+                Object[] ctorArgs = { excludes };
+                return (FilenameFilter) ctor.newInstance(ctorArgs);
+            }
+            else
+            {
+                return (FilenameFilter)clazz.newInstance();
+            }
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found!
+            return null;
+        }
+    }
+
+    /**
+     * Convenience method to get a default filter for files.  
+     * Uses excludes member variable if set.
+     * 
+     * @return FilenameFilter using ConformanceFileRules(excludes).
+     */
+    public FilenameFilter getGoldFileFilter()
+    {
+        // Find a FilenameFilter class to use
+        Class clazz = QetestUtils.testClassForName(fileFilter, 
+                                                   QetestUtils.defaultPackages,
+                                                   defaultGoldFileFilter);
+        try
+        {
+            // Create it, optionally with excludes
+            String excludes = testProps.getProperty(OPT_EXCLUDES);
+            if ((null != excludes) && (excludes.length() > 1))  // Arbitrary check for non-null, non-blank string
+            {
+                Class[] parameterTypes = { java.lang.String.class };
+                Constructor ctor = clazz.getConstructor(parameterTypes);
+
+                Object[] ctorArgs = { excludes };
+                return (FilenameFilter) ctor.newInstance(ctorArgs);
+            }
+            else
+            {
+                return (FilenameFilter)clazz.newInstance();
+            }
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found!
+            return null;
+        }
+    }
+
+
+    /**
+     * Convenience method to get a default inputDir when none or
+     * a bad one was given.  
+     * @return String pathname of default inputDir "tests\conf".
+     */
+    public String getDefaultInputDir()
+    {
+        return "tests" + File.separator + "conf";
+    }
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Additional options supported by StylesheetTestletDriver:\n"
+                + "    -" + OPT_FILELIST
+                + "   <name of listfile of tests to run>\n"
+                + "    -" + OPT_DIRFILTER
+                + "  <classname of FilenameFilter for dirs>\n"
+                + "    -" + OPT_FILEFILTER
+                + " <classname of FilenameFilter for files>\n"
+                + "    -" + OPT_TESTLET
+                + "    <classname of Testlet to execute tests with>\n"
+                + "    -" + OPT_EMBEDDED
+                + "   <list;of;specific file.xml embedded tests to run>\n" 
+                + "    -" + OPT_FLAVOR
+                + "     <trax.sax|trax.dom|etc> which TransformWrapper to use\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        StylesheetTestletDriver app = new StylesheetTestletDriver();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/StylesheetTestletLocalPaths.java b/test/java/src/org/apache/qetest/xsl/StylesheetTestletLocalPaths.java
new file mode 100644
index 0000000..20a12c2
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/StylesheetTestletLocalPaths.java
@@ -0,0 +1,231 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * StylesheetTestletLocalPaths.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Hashtable;
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+
+/**
+ * Testlet for conformance testing of xsl stylesheet files.
+ *
+ * HACK: Forces use of local pathnames.
+ * 
+ * This class provides the testing algorithim used for verifying 
+ * Xalan's conformance to the XSLT spec.  It works in conjunction 
+ * with StylesheetTestletLocalPathsDriver, which supplies the logic for 
+ * choosing the testfiles to iterate over, and with 
+ * TransformWrapper, which provides an XSL  processor- and 
+ * method-independent way to process files (i.e. different 
+ * flavors of TransformWrapper may be different products, as well 
+ * as different processing models, like SAX, DOM or Streams).
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class StylesheetTestletLocalPaths extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.StylesheetTestletLocalPaths"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     *
+     * @return String describing what this StylesheetTestletLocalPaths does.
+     */
+    public String getDescription()
+    {
+        return "StylesheetTestletLocalPaths";
+    }
+
+
+    /**
+     * Run this StylesheetTestletLocalPaths: execute it's test and return.
+     *
+     * @param Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        StylesheetDatalet datalet = null;
+        try
+        {
+            datalet = (StylesheetDatalet)d;
+        }
+        catch (ClassCastException e)
+        {
+            logger.checkErr("Datalet provided is not a StylesheetDatalet; cannot continue with " + d);
+            return;
+        }
+
+        logger.logMsg(Logger.STATUSMSG, "About to test: " 
+                      + (null == datalet.inputName
+                         ? datalet.xmlName
+                         : datalet.inputName));
+        //@todo validate our Datalet - ensure it has valid 
+        //  and/or existing files available.
+
+        // Cleanup outName only if asked to - delete the file on disk
+        // Optimization: this takes extra time and often is not 
+        //  needed, so only do this if the option is set
+        if ("true".equalsIgnoreCase(datalet.options.getProperty("deleteOutFile")))
+        {
+            try
+            {
+                boolean btmp = (new File(datalet.outputName)).delete();
+                logger.logMsg(Logger.TRACEMSG, "Deleting OutFile of::" + datalet.outputName
+                                     + " status: " + btmp);
+            }
+            catch (SecurityException se)
+            {
+                logger.logMsg(Logger.WARNINGMSG, "Deleting OutFile of::" + datalet.outputName
+                                       + " threw: " + se.toString());
+                // But continue anyways...
+            }
+        }
+
+        // Create a new TransformWrapper of appropriate flavor
+        //  null arg is unused liaison for TransformWrapper
+        //@todo allow user to pass in pre-created 
+        //  TransformWrapper so we don't have lots of objects 
+        //  created and destroyed for every file
+        TransformWrapper transformWrapper = null;
+        try
+        {
+            transformWrapper = TransformWrapperFactory.newWrapper(datalet.flavor);
+            transformWrapper.newProcessor(null);
+        }
+        catch (Throwable t)
+        {
+            logThrowable(t, getDescription() + " newWrapper/newProcessor threw");
+            logger.checkErr(getDescription() + " newWrapper/newProcessor threw: " + t.toString());
+            return;
+        }
+
+        // Test our supplied input file, and compare with gold
+        try
+        {
+            // Store local copies of XSL, XML references for 
+            //  potential change to URLs            
+            String inputName = datalet.inputName;
+            String xmlName = datalet.xmlName;
+
+            // * HACK: Forces use of local pathnames.
+
+            //@todo Should we log a custom logElement here instead?
+            logger.logMsg(Logger.TRACEMSG, "executing with: inputName=" + inputName
+                          + " xmlName=" + xmlName + " outputName=" + datalet.outputName
+                          + " goldName=" + datalet.goldName + " flavor="  + datalet.flavor);
+
+            // Simply have the wrapper do all the transforming
+            //  or processing for us - we handle either normal .xsl 
+            //  stylesheet tests or just .xml embedded tests
+            long retVal = 0L;
+            if (null == datalet.inputName)
+            {
+                // presume it's an embedded test
+                long [] times = transformWrapper.transformEmbedded(xmlName, datalet.outputName);
+                retVal = times[TransformWrapper.IDX_OVERALL];
+            }
+            else
+            {
+                // presume it's a normal stylesheet test
+                long[] times = transformWrapper.transform(xmlName, inputName, datalet.outputName);
+                retVal = times[TransformWrapper.IDX_OVERALL];
+            }
+
+            // If we get here, attempt to validate the contents of 
+            //  the last outputFile created
+            CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+            // Supply default value
+            if (null == fileChecker)
+                fileChecker = new XHTFileCheckService();
+            if (Logger.PASS_RESULT
+                != fileChecker.check(logger,
+                                     new File(datalet.outputName), 
+                                     new File(datalet.goldName), 
+                                     getDescription() + " " + datalet.getDescription())
+               )
+            {
+                // Log a custom element with all the file refs first
+                // Closely related to viewResults.xsl select='fileref"
+                //@todo check that these links are valid when base 
+                //  paths are either relative or absolute!
+                Hashtable attrs = new Hashtable();
+                attrs.put("idref", (new File(datalet.inputName)).getName());
+                attrs.put("inputName", datalet.inputName);
+                attrs.put("xmlName", datalet.xmlName);
+                attrs.put("outputName", datalet.outputName);
+                attrs.put("goldName", datalet.goldName);
+                logger.logElement(Logger.STATUSMSG, "fileref", attrs, "Conformance test file references");
+                // Then log the failure reason
+                logger.logArbitrary(Logger.STATUSMSG, (new File(datalet.inputName)).getName() 
+                                    + " failure reason: " + fileChecker.getExtendedInfo());
+            }
+        }
+        // Note that this class can only validate positive test 
+        //  cases - we don't handle ExpectedExceptions
+        catch (Throwable t)
+        {
+            // Put the logThrowable first, so it appears before 
+            //  the Fail record, and gets color-coded
+            logThrowable(t, getDescription() + " " + datalet.getDescription());
+            logger.checkFail(getDescription() + " " + datalet.getDescription() 
+                             + " threw: " + t.toString());
+            return;
+        }
+	}
+
+
+    /**
+     * Logs out throwable.toString() and stack trace to our Logger.
+     * //@todo Copied from Reporter; should probably be moved into Logger.
+     * @param throwable thrown throwable/exception to log out.
+     * @param msg description of the throwable.
+     */
+    protected void logThrowable(Throwable throwable, String msg)
+    {
+        StringWriter sWriter = new StringWriter();
+        sWriter.write(msg + "\n");
+
+        PrintWriter pWriter = new PrintWriter(sWriter);
+        throwable.printStackTrace(pWriter);
+
+        logger.logArbitrary(Logger.STATUSMSG, sWriter.toString());
+    }
+}  // end of class StylesheetTestletLocalPaths
+
diff --git a/test/java/src/org/apache/qetest/xsl/TestableExtension.java b/test/java/src/org/apache/qetest/xsl/TestableExtension.java
new file mode 100644
index 0000000..c67fbd7
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/TestableExtension.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TestableExtension.java
+ *
+ */
+package org.apache.qetest.xsl;
+import org.apache.qetest.Logger;
+
+
+/**
+ * Simple base class defining test hooks for Java extensions.  
+ *
+ * Currently provides generic but limited verification for 
+ * basic extensions in the context of being called from standard 
+ * transformations.  I would have preferred an interface, but then 
+ * methods couldn't be static, which makes validation simpler 
+ * since the test doesn't have to try to grab the same instance of 
+ * an extension that the transformer used.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class TestableExtension
+{
+    /** 
+     * Perform and log any pre-transformation info.  
+     *
+     * The extension should log out to the logger brief info 
+     * about what the extension does.  It may also use items in 
+     * the datalet to perform additional validation (like ensuring 
+     * that counters are zeroed, etc.).
+     *
+     * TestableExtensions should validate any output files needed in 
+     * their postCheck method; ExtensionTestlets simply rely on this 
+     * method to both validate the internal actions of the extension 
+     * as well as any output files, as needed.
+     *
+     * This should only return false if some horrendous error with 
+     * the extension appears to have occoured; it will likely prevent 
+     * any callers from completing the test.
+     * 
+     * @return true if OK; false if any fatal error occoured
+     * @param logger Logger to dump any info to
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static boolean preCheck(Logger logger, StylesheetDatalet datalet) 
+    {
+        /* Must be overridden */
+        return false;
+    }
+    
+
+    /** 
+     * Perform and log any post-transformation info.  
+     * 
+     * The extension should validate that it's extension was 
+     * properly called.  It should also validate any output files
+     * specified in the datalet, etc.  It may also 
+     * validate against extension-specific data in the options 
+     * (like validating that some extension call was hit a 
+     * certain number of times or the like).
+     * 
+     * @param logger Logger to dump any info to
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static void postCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        /* Must be overridden */
+        return;
+    }
+
+
+    /**
+     * Description of what this extension does.  
+     * @return String description of extension
+     */
+    public static String getDescription()
+    {
+        return "Must be overridden";
+    }
+
+}  // end of class TestableExtension
+
diff --git a/test/java/src/org/apache/qetest/xsl/ThreadedStylesheetDatalet.java b/test/java/src/org/apache/qetest/xsl/ThreadedStylesheetDatalet.java
new file mode 100644
index 0000000..1c88aaa
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ThreadedStylesheetDatalet.java
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ThreadedStylesheetDatalet.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+
+/**
+ * Datalet for conformance testing of xsl stylesheet files.
+ * Used specifically in multi-threaded tests.  Allows a user 
+ * to specify both a normal set of inputs (inputName, xmlName, 
+ * etc.) as well as a second set - usually a Transformer 
+ * object (which is threadsafe) and an xmlName2 to use with it.
+ *
+ * //@todo see if we should subclass StylesheetDatalet or not?
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class ThreadedStylesheetDatalet implements Datalet
+{
+    //// Items associated with the normal test
+    /** URL of the stylesheet; default:.../identity.xsl.  */
+    public String inputName = "tests/api/trax/identity.xsl";
+
+    /** URL of the xml document; default:.../identity.xml.  */
+    public String xmlName = "tests/api/trax/identity.xml";
+
+    /** URL to put output into; default:ThreadedStylesheetDatalet.out.  */
+    public String outputName = "ThreadedStylesheetDatalet.out";
+
+    /** URL of the a gold file or data; default:.../identity.out.  */
+    public String goldName = "tests/api-gold/trax/identity.out";
+
+    /** 
+     * Templates object to use for second transform; default: NONE  
+     * The Templates object is wrapped inside a TransformWrapper 
+     * since that allows us to use a shared TransformWrapper that 
+     * encapsulates a flavor and performance measurements as well.
+     * Note: this must be set by the user, otherwise it will 
+     * be ignored.  The inputName parameter is still provided so 
+     * users can supply optional systemId of the stylesheet.
+     */
+    public TransformWrapper transformWrapper = null;
+
+    /** Number of times to loop for each thread; default: 10.  */
+    public int iterations = 10;
+
+    /** 
+     * If we should force any local path\filenames to URLs.  
+     * Note: This is not really the best place for this, but 
+     * since it works with Xerces and Crimson and Xalan, it's 
+     * good enough for now.  
+     * Not currently settable by user; default:true
+     */
+    public boolean useURL = true;
+
+    /** 
+     * Generic placeholder for any additional options.  
+     * I'm still undecided if I like this idea or not.  
+     * This allows ThreadedStylesheetDatalets to support additional kinds 
+     * of tests, like performance tests, without having to change 
+     * this data model.  These options can serve as a catch-all 
+     * for any new properties or options or what-not that new 
+     * tests need, without having to change how the most basic 
+     * member variables here work.
+     * Note that while this needs to be a Properties object to 
+     * take advantage of the parent/default behavior in 
+     * getProperty(), this doesn't necessarily mean they can only 
+     * store Strings.
+     */
+    public Properties options = new Properties();
+
+    /** Description of what this Datalet tests.  */
+    protected String description = "ThreadedStylesheetDatalet: String inputName, String xmlName, String outputName, String goldName, String flavor; plus second Templates object";
+
+
+    /**
+     * No argument constructor is a no-op.  
+     */
+    public ThreadedStylesheetDatalet() { /* no-op */ }
+
+
+    /**
+     * Initialize this datalet from a string, perhaps from 
+     * a command line.  
+     * We will parse the command line with whitespace and fill
+     * in our member variables in order:
+     * <pre>inputName, xmlName, outputName, goldName, flavor</pre>, 
+     * if there are too few tokens, remaining variables will default.
+     */
+    public ThreadedStylesheetDatalet(String args)
+    {
+        load(args);
+    }
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @return String describing the specific set of data 
+     * this Datalet contains (can often be used as the description
+     * of any check() calls made from the Testlet).
+     */
+    public String getDescription()
+    {
+        return description;
+    }
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @param s description to use for this Datalet.
+     */
+    public void setDescription(String s)
+    {
+        description = s;
+    }
+
+
+    /**
+     * Load fields of this Datalet from a Hashtable.  
+     * Caller must provide data for all of our fields.
+     * Note: this call also fills in info about the second 
+     * Templates, etc. object as well.
+     * //@todo design decision: only have load(Hashtable)
+     * or load(Properties), not both.
+     * 
+     * @param Hashtable to load
+     */
+    public void load(Hashtable h)
+    {
+        if (null == h)
+            return; //@todo should this have a return val or exception?
+
+        inputName = (String)h.get("inputName");
+        xmlName = (String)h.get("xmlName");
+        outputName = (String)h.get("outputName");
+        goldName = (String)h.get("goldName");
+        transformWrapper = (TransformWrapper)h.get("transformWrapper");
+    }
+
+
+    /**
+     * Load fields of this Datalet from a Properties.  
+     * Caller must provide data for all of our fields.
+     * Note: this call also fills in info about the second 
+     * Templates, etc. object as well.
+     * //@todo design decision: only have load(Hashtable)
+     * or load(Properties), not both.
+     * 
+     * @param Hashtable to load
+     */
+    public void load(Properties p)
+    {
+        if (null == p)
+            return; //@todo should this have a return val or exception?
+
+        inputName = (String)p.getProperty("inputName");
+        xmlName = (String)p.getProperty("xmlName");
+        outputName = (String)p.getProperty("outputName");
+        goldName = (String)p.getProperty("goldName");
+        // Also set our internal options to default to this Properties
+        options = new Properties(p);
+        // Also set our second set of templates
+        transformWrapper = (TransformWrapper)p.get("transformWrapper");
+    }
+    /**
+     * Load fields of this Datalet from a String.  
+     * NOT IMPLEMENTED! No easy way to load the Templates from string.  
+     * 
+     * @param s String to load
+     */
+    public void load(String s)
+    {
+        throw new RuntimeException("ThreadedStylesheetDatalet.load(String) not implemented!");
+    }
+    /**
+     * Load fields of this Datalet from a String[].  
+     * NOT IMPLEMENTED! No easy way to load the Templates from string.  
+     * 
+     * @param s String array to load
+     */
+    public void load(String[] s)
+    {
+        throw new RuntimeException("ThreadedStylesheetDatalet.load(String[]) not implemented!");
+    }
+}  // end of class ThreadedStylesheetDatalet
+
diff --git a/test/java/src/org/apache/qetest/xsl/ThreadedStylesheetTestlet.java b/test/java/src/org/apache/qetest/xsl/ThreadedStylesheetTestlet.java
new file mode 100644
index 0000000..39163c7
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ThreadedStylesheetTestlet.java
@@ -0,0 +1,406 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ThreadedStylesheetTestlet.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+
+/**
+ * Testlet for basic thread testing of xsl stylesheet files.
+ *
+ * This class provides a simple testing algorithim for verifying 
+ * that Xalan functions properly when run on multiple threads 
+ * simultaneously.  Currently it simply does most of what the 
+ * normal StylesheetTestlet does, except it does it in the run()
+ * method on a thread - thus you'd commonly use this with 
+ * ThreadedTestletDriver to start multiple of these testlets 
+ * up at the same time.
+ * We implement Runnable, so classically a test driver would 
+ * create us then pass us to new Thread(us).start(), instead 
+ * of calling execute(). @todo find a better way to integrate!
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class ThreadedStylesheetTestlet 
+        extends TestletImpl 
+        implements Runnable
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.ThreadedStylesheetTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+    
+    /** Accessor for our Datalet instead of calling execute().  */
+    public void setDefaultDatalet(StylesheetDatalet d)
+    {
+        defaultDatalet = d;
+    }
+    
+    /* Special ThreadedStylesheetDatalet with a Templates.  */
+    public ThreadedStylesheetDatalet sharedDatalet = new ThreadedStylesheetDatalet();
+
+    /* Description of our current state; changes during our lifecycle.  */
+    protected String description = "ThreadedStylesheetTestlet - before execute()";
+
+    /**
+     * Accesor method for a brief description of this test.  
+     * When created, this returns a description of this testlet.
+     * After you've called execute(), this returns a brief 
+     * description of our current result or status.
+     *
+     * @return String describing what this ThreadedStylesheetTestlet does.
+     * @see #getResult()
+     */
+    public String getDescription()
+    {
+        return description;
+    }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     * Automatically adds our identifier at the start.
+     *
+     * @param d String to set as our current description.
+     */
+    protected void setDescription(String d)
+    {
+        description = "[" + threadIdentifier + "]" + d;
+    }
+
+    /* Our 'final' test result; actually changes during our lifecycle.  */
+    protected int result = Logger.DEFAULT_RESULT;
+
+    /**
+     * Accesor method for the final result of this test.  
+     * Note: this starts as INCP_RESULT, and given that we're 
+     * threaded, may end up as INCP_RESULT and you may not know 
+     * the difference.  Could use more thought.
+     *
+     * @return int one of of Logger.*_RESULT.
+     */
+    public int getResult()
+    {
+        return result;
+    }
+
+    /* Cheap-o counter: so driver can differentiate each thread.  */
+    public int threadIdentifier = 0;
+
+    /**
+     * Run this ThreadedStylesheetTestlet: start this test as 
+     * a thread and return immediately.
+     * Note that you must join() this thread later if you want 
+     * to wait until we're done.
+     * //@todo improve docs on how to communicate between threads
+     *
+     * @param Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        StylesheetDatalet datalet = null;
+        try
+        {
+            datalet = (StylesheetDatalet)d;
+        }
+        catch (ClassCastException e)
+        {
+            logger.checkErr("Datalet provided is not a StylesheetDatalet; cannot continue with " + d);
+            return;
+        }
+
+        logger.logMsg(Logger.STATUSMSG, "About to test: " 
+                      + (null == datalet.inputName
+                         ? datalet.xmlName
+                         : datalet.inputName)
+                      + " plus " + sharedDatalet.xmlName);
+        
+        // All the rest of the test is executed in our thread.
+        //if (true) //@todo check defaultDatalet.options...
+        //    this.start();
+        //@todo Um, how do we do this? Or do we just ask caller to do it?
+        logger.logMsg(Logger.CRITICALMSG, "//@todo execute() is not yet implemented - you must start our thread yourself");
+
+        // Return to caller; they must join() us later if they 
+        //  want to know when we're actually complete
+        return;
+    }
+
+    /** 
+     * Called by execute() to perform the looping and actual test. 
+     * Note: You must have set our defaultDatalet first!
+     */
+    public void run()
+    {
+        // Relies on defaultDatalet being set!
+        logger.logMsg(Logger.STATUSMSG, "Beginning thread shared output into: " 
+                      + ((StylesheetDatalet)defaultDatalet).outputName);
+        // Also set our description so outside users know what 
+        // point in our Thread lifetime we're at
+        setDescription("ThreadedStylesheetTestlet.run() just started...");
+
+        StylesheetDatalet datalet = null;
+        try
+        {
+            datalet = (StylesheetDatalet)defaultDatalet;
+        }
+        catch (ClassCastException e)
+        {
+            setDescription("Datalet provided is not a StylesheetDatalet; cannot continue with " + datalet);
+            logger.checkErr(description);
+            return;
+        }
+        //@todo validate our Datalet - ensure it has valid 
+        //  and/or existing files available.
+
+        // Cleanup outName(s) only if asked to - delete the file on disk
+        // Optimization: this takes extra time and often is not 
+        //  needed, so only do this if the option is set
+        if ("true".equalsIgnoreCase(datalet.options.getProperty("deleteOutFile")))
+        {
+            try
+            {
+                boolean btmp = (new File(datalet.outputName)).delete();
+                logger.logMsg(Logger.TRACEMSG, "Deleting OutFile of::" + datalet.outputName
+                                     + " status: " + btmp);
+            }
+            catch (SecurityException se)
+            {
+                logger.logMsg(Logger.WARNINGMSG, "Deleting OutFile of::" + datalet.outputName
+                                       + " threw: " + se.toString());
+                // But continue anyways...
+            }
+            //@todo make sure all sharedDatalets use different 
+            //  output files! No sense in having them use 
+            //  the same file all the time in all threads!
+        }
+
+        // Ask our independent datalet how many iterations to use 
+        int iterations = sharedDatalet.iterations; // default value
+        try
+        {
+            iterations = Integer.parseInt(datalet.options.getProperty("iterations"));
+        }
+        catch (NumberFormatException numEx)
+        {
+            // no-op; leave as default
+        }
+        
+        // Now loop a number of times as specified, and for each 
+        //  loop, use the presupplied Templates object, then run 
+        //  one independent process, plus validate on first & last
+        setDescription("...about to iterate... " + datalet.outputName);
+        for (int ctr = 1; (ctr <= iterations); ctr++)
+        {
+            // Only validate on first and last iteration
+            boolean doValidation = ((1 == ctr) || (iterations == ctr));
+            logger.logMsg(Logger.TRACEMSG, "About to do iteration " + ctr);
+            // Note: logic moved to worker methods for clarity; 
+            //  these methods just use our local vars and datalet
+            //@todo Note: while I've tried to mirror as much 
+            //  structure from StylesheetTestlet as possible, 
+            //  this has made this class very inefficent (note 
+            //  we iterate, and within each method do the same 
+            //  name munging and some basic setup in each worker 
+            //  method every time!)
+            // Long-term, we should just redesign this to be 
+            //  a custom class with it's own algorithim
+            processExistingTemplates(sharedDatalet, doValidation);
+            processNewStylesheet(datalet, doValidation);
+            setDescription("...done iteration # " + ctr);
+        }
+        // That's it! We're done!
+        logger.logMsg(Logger.STATUSMSG, "Completed thread with: " + datalet.getDescription());
+        setDescription("All iterations complete! " + datalet.outputName);
+        // Also set our result, now that we think we're done
+        try
+        {
+            result = ((org.apache.qetest.Reporter)logger).getCurrentCaseResult();
+        }
+        catch (ClassCastException cce)
+        {
+            // Basically a no-op; just log out for info
+            logger.logMsg(Logger.WARNINGMSG, "logger is not a Reporter; overall result may be incorrect!");
+        }
+	}
+
+
+    /** 
+     * Worker method to process premade Templates object.  
+     * Uses various local variables.
+     * //@todo Should we simply propagate exceptions instead of just logging them?
+     */
+    private void processExistingTemplates(ThreadedStylesheetDatalet datalet, boolean doValidation)
+    {
+        // First: use our (presumably) shared Templates object to 
+        // perform a Transformation - using the existing 
+        // TransformWrapper object that already has built a stylesheet
+        if (!datalet.transformWrapper.isStylesheetReady())
+        {
+            // Can't continue if the Templates is not ready
+            logger.logMsg(Logger.WARNINGMSG, "datalet shared Templates isStylesheetReady false!");
+            // Anything else we should log out here?  In case someone 
+            //  care about this, don't have it fail
+            return;
+        }
+        
+        // Since the wrapper's ready (and flavor, etc. setup) then 
+        //  just go ahead and ask it to transform
+        try
+        {
+            String outputName = datalet.outputName + threadIdentifier;
+
+            //@todo Should we log a custom logElement here instead?
+            logger.logMsg(Logger.TRACEMSG, "About to test shared Templates: "
+                          + " xmlName=" + datalet.xmlName 
+                          + " outputName=" + outputName
+                          + " goldName=" + datalet.goldName);
+
+            // Simply have the wrapper do all the transforming
+            //  or processing for us - we handle either normal .xsl 
+            //  stylesheet tests or just .xml embedded tests
+            long retVal = 0L;
+            // Here, we only use the existing Templates to do the transform
+            long[] times = datalet.transformWrapper.transformWithStylesheet(datalet.xmlName, outputName);
+            retVal = times[TransformWrapper.IDX_OVERALL];
+
+            if (!doValidation)
+            {
+                logger.logMsg(Logger.TRACEMSG, "Skipping validation of outputName=" + outputName);
+                // Only bother to validate the output if asked
+                return;
+            }
+            // If we get here, attempt to validate the contents of 
+            //  the last outputFile created - only first and last time through loop!
+            CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+            // Supply default value
+            if (null == fileChecker)
+                fileChecker = new XHTFileCheckService();
+            fileChecker.check(logger,
+                              new File(outputName), 
+                              new File(datalet.goldName), 
+                              "Shared Templates of: " + datalet.getDescription());
+        }
+        // Note that this class can only validate positive test 
+        //  cases - we don't handle ExpectedExceptions
+        catch (Throwable t)
+        {
+            // Put the logThrowable first, so it appears before 
+            //  the Fail record, and gets color-coded
+            logger.logThrowable(Logger.ERRORMSG, t, "Shared Templates of: " + datalet.getDescription());
+            logger.checkFail("Shared Templates of: " + datalet.getDescription() 
+                             + " threw: " + t.toString());
+        }
+    }
+    /** 
+     * Worker method to process a new stylesheet/xml document.  
+     * Uses various local variables.
+     * Note this is essentially a copy of StylesheetTestlet.execute().
+     * //@todo Should we simply propagate exceptions instead of just logging them?
+     */
+    private void processNewStylesheet(StylesheetDatalet datalet, boolean doValidation)
+    {
+        // Test our supplied input file, and compare with gold
+        try
+        {
+            String outputName =  datalet.outputName + threadIdentifier;
+
+            //@todo Should we log a custom logElement here instead?
+            logger.logMsg(Logger.TRACEMSG, "About to test: inputName=" + datalet.inputName
+                          + " xmlName=" + datalet.xmlName + " outputName=" + outputName
+                          + " goldName=" + datalet.goldName + " flavor="  + datalet.flavor);
+
+            // Create a new TransformWrapper of appropriate flavor
+            //  null arg is unused liaison for TransformWrapper
+            TransformWrapper transformWrapper = null;
+            try
+            {
+                transformWrapper = TransformWrapperFactory.newWrapper(datalet.flavor);
+                transformWrapper.newProcessor(null);
+            }
+            catch (Throwable t)
+            {
+                logger.logThrowable(Logger.ERRORMSG, t, getDescription() + " newWrapper/newProcessor threw");
+                logger.checkErr(getDescription() + " newWrapper/newProcessor threw: " + t.toString());
+                return;
+            }
+
+            // Simply have the wrapper do all the transforming
+            //  or processing for us - we handle either normal .xsl 
+            //  stylesheet tests or just .xml embedded tests
+            long retVal = 0L;
+            if (null == datalet.inputName)
+            {
+                // presume it's an embedded test
+                long [] times = transformWrapper.transformEmbedded(datalet.xmlName, outputName);
+                retVal = times[TransformWrapper.IDX_OVERALL];
+            }
+            else
+            {
+                // presume it's a normal stylesheet test
+                long[] times = transformWrapper.transform(datalet.xmlName, datalet.inputName, outputName);
+                retVal = times[TransformWrapper.IDX_OVERALL];
+            }
+
+            if (!doValidation)
+            {
+                logger.logMsg(Logger.TRACEMSG, "Skipping validation of outputName=" + outputName);
+                // Only bother to validate the output if asked
+                return;
+            }
+            // If we get here, attempt to validate the contents of 
+            //  the last outputFile created
+            CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+            // Supply default value
+            if (null == fileChecker)
+                fileChecker = new XHTFileCheckService();
+            fileChecker.check(logger,
+                              new File(outputName), 
+                              new File(datalet.goldName), 
+                              getDescription() + " " + datalet.getDescription());
+        }
+        // Note that this class can only validate positive test 
+        //  cases - we don't handle ExpectedExceptions
+        catch (Throwable t)
+        {
+            // Put the logThrowable first, so it appears before 
+            //  the Fail record, and gets color-coded
+            logger.logThrowable(Logger.ERRORMSG, t, "New stylesheet of: " + datalet.getDescription());
+            logger.checkFail("New stylesheet of: " + datalet.getDescription() 
+                             + " threw: " + t.toString());
+        }
+    }
+
+}  // end of class ThreadedStylesheetTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/ThreadedTestletDriver.java b/test/java/src/org/apache/qetest/xsl/ThreadedTestletDriver.java
new file mode 100644
index 0000000..48b3635
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/ThreadedTestletDriver.java
@@ -0,0 +1,423 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * ThreadedTestletDriver.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.qetest.Logger;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.Reporter;
+import org.apache.qetest.xslwrapper.TransformWrapper;
+import org.apache.qetest.xslwrapper.TransformWrapperFactory;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Test driver for XSLT stylesheet Testlets.
+ * 
+ * This is a specific driver for XSLT-oriented Testlets, testing 
+ * them in an explicitly threaded model.  Currently, this class is 
+ * tightly bound to ThreadedStylesheetTestlet/Datalet.
+ *
+ * @author shane_curcuru@lotus.com
+ * @version $Id$
+ */
+public class ThreadedTestletDriver extends StylesheetTestletDriver
+{
+
+
+    /** Just initialize test name, comment; numTestCases is not used. */
+    public ThreadedTestletDriver()
+    {
+        testName = "ThreadedTestletDriver";
+        testComment = "Threaded test driver for XSLT stylesheet Testlets";
+    }
+
+
+    /**
+     * Do the default: test all stylesheets found in subdirs
+     * of our inputDir, using FilenameFilters for dirs and files.
+     * This only goes down one level in the tree, eg:
+     * <ul>inputDir = tests/conf
+     * <li>tests/conf - not tested</li>
+     * <li>tests/conf/boolean - test all boolean*.xsl files</li>
+     * <li>tests/conf/copy - test all copy*.xsl files</li>
+     * <li>tests/conf/copy/foo - not tested</li>
+     * <li>tests/conf/xmanual - not tested, since default 
+     * ConformanceDirRules excludes dirs starting with 'x|X'</li>
+     * <li>tests/whitespace - test all whitespace*.xsl files</li>
+     * <li>etc.</li>
+     * </ul>
+     * Parameters: none, uses our internal members inputDir, 
+     * outputDir, testlet, etc.
+     */
+    public void processInputDir()
+    {
+        // Implement this later!
+        reporter.checkErr("processInputDir not yet implemented use -fileList list.txt instead!");
+    }
+
+
+    /**
+     * Run a list of stylesheet tests through a Testlet.
+     * The file names are assumed to be fully specified, and we assume
+     * the corresponding directories exist.
+     * Each fileList is turned into a testcase.
+     * The first file in the list is used as a common Template that 
+     * is passed to each ThreadedStylesheetTestlet that is created 
+     * from every other item in the file list.
+     * i.e. the first file is used commonly throughout every 
+     * testlet.  For every other file in the list, a new Thread is 
+     * created that will perform processes on both the shared 
+     * Templates from the first file and from this listed file.
+     *
+     * @param vector of Datalet objects to pass in
+     * @param desc String to use as testCase description
+     */
+    public void processFileList(Vector datalets, String desc)
+    {
+        // Validate arguments - must have at least two files to test
+        if ((null == datalets) || (datalets.size() < 2))
+        {
+            // Bad arguments, report it as an error
+            // Note: normally, this should never happen, since 
+            //  this class normally validates these arguments 
+            //  before calling us
+            reporter.checkErr("Testlet or datalets are null/less than 2, nothing to test!");
+            return;
+        }
+
+        // Put everything else into a testCase
+        //  This is not necessary, but feels a lot nicer to 
+        //  break up large test sets
+        reporter.testCaseInit(desc);
+
+        // Now just go through the list and process each set
+        int numDatalets = datalets.size();
+        reporter.logInfoMsg("processFileList() with " + numDatalets
+                            + " potential tests");
+
+        // Take the first Datalet and create a Templates from it; 
+        //  this is going to be shared by all other threads/testlets
+        StylesheetDatalet firstDatalet = (StylesheetDatalet)datalets.elementAt(0);
+        TransformWrapper transformWrapper = null;        
+        // Create a TransformWrapper of appropriate flavor
+        try
+        {
+            transformWrapper = TransformWrapperFactory.newWrapper(firstDatalet.flavor);
+            transformWrapper.newProcessor(null);
+            reporter.logMsg(Logger.INFOMSG, "Created transformWrapper, about to process shared: " + firstDatalet.inputName);
+            transformWrapper.buildStylesheet(firstDatalet.inputName);
+        }
+        catch (Throwable t)
+        {
+            reporter.logThrowable(Logger.ERRORMSG, t, "Creating transformWrapper: newWrapper/newProcessor threw");
+            reporter.checkErr("Creating transformWrapper: newWrapper/newProcessor threw: " + t.toString());
+            return;
+        }
+        
+        // Create a ThreadedStylesheetDatalet for shared use        
+        ThreadedStylesheetDatalet sharedDatalet = new ThreadedStylesheetDatalet();
+        // Copy all other info over
+        sharedDatalet.inputName = firstDatalet.inputName;
+        sharedDatalet.outputName = firstDatalet.outputName;
+        sharedDatalet.goldName = firstDatalet.goldName;
+        sharedDatalet.transformWrapper = transformWrapper;
+        sharedDatalet.setDescription(firstDatalet.getDescription());
+       
+        
+        // Prepare array to store all datalets for later joining
+        //  Note: store all but first datalet, which is used as 
+        //  the common shared stylesheet/Templates
+        ThreadedTestletInfo[] testletThreads = new ThreadedTestletInfo[numDatalets - 1];
+        
+        // Iterate over every OTHER datalet and test it
+        for (int ctr = 1; ctr < numDatalets; ctr++)
+        {
+            try
+            {
+                // Create ThreadedStylesheetDatalets from the common 
+                //  one we already have and each of the normal 
+                //  StylesheetDatalets that we were handed
+                ThreadedStylesheetTestlet testlet = getTestlet(ctr);
+                testlet.sharedDatalet = sharedDatalet;
+                testlet.setDefaultDatalet((StylesheetDatalet)datalets.elementAt(ctr));
+                testlet.threadIdentifier = ctr;
+                // Save a copy of each datalet for later joining
+                //  Note off-by-one necessary for arrays
+                testletThreads[ctr - 1] = new ThreadedTestletInfo(testlet, new Thread(testlet));
+                //@todo (optional) start this testlet - should allow 
+                //  user to start sequentially or all at once later
+                ((testletThreads[ctr - 1]).thread).start();
+                reporter.logMsg(Logger.INFOMSG, "Started testlet(" + ctr + ")");
+                // Continue looping and creating each Testlet
+            } 
+            catch (Throwable t)
+            {
+                // Log any exceptions as fails and keep going
+                //@todo improve the below to output more useful info
+                reporter.checkFail("Datalet num " + ctr + " threw: " + t.toString());
+                reporter.logThrowable(Logger.ERRORMSG, t, "Datalet threw");
+            }
+        }  // of while...
+        
+        // We now wait for every thread to finish, and only then 
+        //  will we write a final report and finish the test
+        //@todo probably an easier way; for now, just join the last one
+        reporter.logMsg(Logger.STATUSMSG, "Driver Attempting-to-Join last thread");
+        long maxWaitMillis = 100000; // Wait at most xxxx milliseconds
+        // Try waiting for the last thread several times
+        testletThreads[testletThreads.length - 1].waitForComplete
+                (reporter, maxWaitMillis, 10);
+        reporter.logMsg(Logger.TRACEMSG, "Driver Apparently-Joined last thread");
+
+        // Also join all other threads
+        for (int i = 0; i < (testletThreads.length - 1); i++)
+        {
+            // Only wait a little while for these
+            testletThreads[i].waitForComplete(reporter, maxWaitMillis, 2);
+        }
+        reporter.logMsg(Logger.INFOMSG, "Driver Apparently-joined all threads");
+        
+        // Log results from all threads
+        for (int i = 0; i < testletThreads.length; i++)
+        {
+            switch (testletThreads[i].result)
+            {
+                case Logger.PASS_RESULT:
+                    if (testletThreads[i].complete)
+                    {
+                        reporter.checkPass("Thread(" + i + ") " + testletThreads[i].lastStatus);
+                    }
+                    else
+                    {
+                        reporter.checkPass("Thread(" + i + ") " + testletThreads[i].lastStatus);
+                        //@todo What kind of status do we do here?
+                        // In theory the testlet successfully ran 
+                        //  transforms and checked results, but 
+                        //  for some reason we don't think the 
+                        //  thread completed properly/in time
+                        reporter.checkErr("Thread(" + i + ") NOT COMPLETE! " + testletThreads[i].lastStatus);
+                    }
+                    break;
+                case Logger.FAIL_RESULT:
+                    reporter.checkFail("Thread(" + i + ") " + testletThreads[i].lastStatus);
+                    break;
+                case Logger.AMBG_RESULT:
+                    reporter.checkAmbiguous("Thread(" + i + ") " + testletThreads[i].lastStatus);
+                    break;
+                case Logger.ERRR_RESULT:
+                    reporter.checkErr("Thread(" + i + ") " + testletThreads[i].lastStatus);
+                    break;
+                case Logger.INCP_RESULT:
+                    reporter.checkErr("Thread(" + i + ") INCP! " + testletThreads[i].lastStatus);
+                    break;
+                default:
+                    reporter.checkErr("Thread(" + i + ") BAD RESULT! " + testletThreads[i].lastStatus);
+                    break;
+            }
+            //@todo optimizaion: null out vars for gc?
+            //   or should we do this earlier?
+            testletThreads[i].thread = null;
+            testletThreads[i].testlet = null;
+        }
+        reporter.testCaseClose();
+    }
+
+
+    /**
+     * Convenience method to get a Testlet to use.  
+     * Attempts to return one as specified by our testlet parameter, 
+     * otherwise returns a default ThreadedStylesheetTestlet.
+     * Overrides StylesheetTestletDriver to use a separate logger 
+     * for every testlet, since currently loggers may not be threadsafe.
+     * Note: We actually cheat and pass a Reporter to each Testlet, 
+     * since they need to keep their own pass/fail state.
+     * 
+     * @return Testlet for use in this test; null if error
+     */
+    public ThreadedStylesheetTestlet getTestlet(int ctr)
+    {
+        // Find a Testlet class to use if we haven't already
+        if (null == cachedTestletClazz)
+        {
+            cachedTestletClazz = QetestUtils.testClassForName(testlet, 
+                                                              QetestUtils.defaultPackages,
+                                                              defaultTestlet);
+        }
+        try
+        {
+            // Create it and set a new logger into it
+            ThreadedStylesheetTestlet t = (ThreadedStylesheetTestlet)cachedTestletClazz.newInstance();
+            //@todo Note assumption we have a file name to log to!
+            //  This is too tightly bound to the file-based Loggers
+            //  this design should be cleaned up so we don't know 
+            //  what/where/how the loggers are outputing stuff, and 
+            //  so each testlet can automatically get a new logger 
+            //  based off of our logger
+            String testletLogFile = testProps.getProperty(Logger.OPT_LOGFILE, "threadedTestlet");
+            int idx = testletLogFile.lastIndexOf("."); // Assumption: there'll be a .extension
+            testletLogFile = testletLogFile.substring(0, idx) + ctr + testletLogFile.substring(idx);
+            Properties testletLoggerProperties = new Properties(testProps);
+            testletLoggerProperties.put(Logger.OPT_LOGFILE, testletLogFile);
+            t.setLogger(new Reporter(testletLoggerProperties));
+            return t;
+        }
+        catch (Exception e)
+        {
+            // Ooops, none found! This should be very rare, since 
+            //  we know the defaultTestlet should be found
+            return null;
+        }
+    }
+
+
+    /** 
+     * Local class to store info about threads we spawn.  
+     * A simple little data holding class that stores info about 
+     * various Threads we spawn (presumably each 
+     * ThreadedStylesheetTestlets or the like).
+     * <ul>
+     * <li>ThreadedStylesheetTestlet</li>
+     * <li>Thread - the actual thread started</li>
+     * <li>lastStatus - copy of testlet.getDescription, 
+     * which the testlet changes to reflect it's current state</li>
+     * <li>result - copy of testlet.getResult</li>
+     * <li>complete - convenience variable, if we think 
+     * the testlet is done (or if we think it's ready to be 
+     * reported on; may force this to true if we timeout or think 
+     * the testlet/thread has hung, etc.)</li>
+     * </ul>
+     */
+    class ThreadedTestletInfo
+    {
+        ThreadedStylesheetTestlet testlet = null;
+        Thread thread = null;
+        String lastStatus = Logger.INCP;
+        int result = Logger.INCP_RESULT;
+        boolean complete = false;
+        ThreadedTestletInfo(ThreadedStylesheetTestlet tst, 
+                            Thread t)
+        {
+            testlet = tst;
+            thread = t;
+            // Should help ease debugging
+            thread.setName(((StylesheetDatalet)testlet.getDefaultDatalet()).inputName);
+        }
+        
+        /** 
+         * Attempt to wait for this thread to complete.
+         * Essentially does a .join on our thread, waiting 
+         * millisWait.  If this doesn't work, it logs a message 
+         * and then tries again waitNumTimes.  If the thread is 
+         * still not done, then log a message and return anyway.
+         * //@todo should we kill the thread at this point?
+         */
+        void waitForComplete(Logger l, long millisWait, int waitNumTimes)
+        {
+            // If we think we're already done, just return
+            //@todo ensure coordination between this and actual 
+            //  Thread state; or remove this
+            if (complete)
+                return;
+                
+            try
+            {
+                thread.join(millisWait);
+            }
+            catch (InterruptedException ie)
+            {
+                l.logMsg(Logger.WARNINGMSG, "waitForComplete threw: " + ie.toString());
+            }    
+            if (!thread.isAlive())
+            {
+                // If the Thread is already done, then copy over 
+                //  each value and return
+                complete = true;
+                lastStatus = testlet.getDescription();
+                result = testlet.getResult();
+                return;
+            }
+            // Otherwise, keep waiting for the thread
+            for (int i = 0; i < waitNumTimes; i++)
+            {
+                l.logMsg(Logger.TRACEMSG, "waitForComplete(" + i + ") of "
+                         + thread.getName());
+                try
+                {
+                    thread.join(millisWait);
+                }
+                catch (InterruptedException ie)
+                {
+                    l.logMsg(Logger.WARNINGMSG, "waitForComplete(" + i + ") threw: " + ie.toString());
+                }    
+            }
+            if (!thread.isAlive())
+            {
+                // If the Thread is already done, then set complete 
+                //  (which means the thread did finish normally)
+                complete = true;
+            }
+            // Copy over the rest of the testlet/thread's status
+            lastStatus = testlet.getDescription();
+            result = testlet.getResult();
+            return;
+        }
+    } // end of inner class ThreadedTestletInfo
+
+
+    /**
+     * Convenience method to print out usage information - update if needed.  
+     * //@todo update this for iteration, etc.
+      * @return String denoting usage of this test class
+     */
+    public String usage()
+    {
+        return ("Common [optional] options supported by ThreadedTestletDriver:\n"
+                + "    -" + OPT_FILELIST
+                + "  <name of listfile of tests to run>\n"
+                + "    -" + OPT_DIRFILTER
+                + "  <classname of FilenameFilter for dirs>\n"
+                + "    -" + OPT_FILEFILTER
+                + "  <classname of FilenameFilter for files>\n"
+                + "    -" + OPT_TESTLET
+                + "  <classname of Testlet to execute tests with>\n"
+                + super.usage());   // Grab our parent classes usage as well
+    }
+
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public static void main(String[] args)
+    {
+        ThreadedTestletDriver app = new ThreadedTestletDriver();
+        app.doMain(args);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/TraxDatalet.java b/test/java/src/org/apache/qetest/xsl/TraxDatalet.java
new file mode 100644
index 0000000..8963d21
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/TraxDatalet.java
@@ -0,0 +1,279 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * TraxDatalet.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.StringReader;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.Datalet;
+import org.apache.qetest.QetestUtils;
+
+/**
+ * Datalet for holding TrAX-like Sources and Results.
+ *
+ * Allows tester to set either a filename, URL, or Node for 
+ * both the xml and xsl sources, and the application simply 
+ * requests a Source object each time.
+ * We apply a simplistic algorithim to determine which kind of 
+ * Source object we return.
+ * <b>Note:</b> Currently only supports StreamSources of various types.
+ *
+ * Note: should probably be moved to the org.apache.qetest.trax 
+ * package, but I'm leaving it in the xsl package for now.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class TraxDatalet implements Datalet
+{
+    /** URL of XSL source to use on disk.  */
+    protected String xslURL = null;
+
+    /** String of characters to use as XSL source in a StringReader.  */
+    protected String xslString = null;
+
+    /** @param s the local path/filename of the XSL to use.  */
+    public void setXSLName(String s)
+    {
+        xslURL = QetestUtils.filenameToURL(s);
+    }
+
+    /** @param s the URL/URI of the XSL to use.  */
+    public void setXSLURL(String s)
+    {
+        xslURL = s;
+    }
+
+    /** @param s String of XSL to use in a StringReader, etc..  */
+    public void setXSLString(String s)
+    {
+        xslString = s;
+    }
+
+    /** 
+     * Return a Source object representing our XSL.
+     * This may be any kind of source and is determined by which 
+     * kinds of setXSL*() methods you've called.
+     * <ul>
+     * <li>if xslString is set, return new StreamSource(new StringReader(xslString))</li>
+     * <li>if xslURL/Name is set, return new StreamSource(xslURL)</li>
+     * <li>More types TBD</li>
+     * </ul>
+     * @return Source object representing our XSL, or an 
+     * IllegalStateException if we don't have any XSL
+     */
+    public Source getXSLSource()
+    {
+        if (null != xslString)
+            return new StreamSource(new StringReader(xslString));
+        else if (null != xslURL)
+            return new StreamSource(xslURL);
+        else
+            throw new IllegalStateException("TraxDatalet.getXSLSource() with no XSL!");
+    }
+
+
+    /** URL of XML source to use on disk.  */
+    protected String xmlURL = null;
+
+    /** String of characters to use as XML source in a StringReader.  */
+    protected String xmlString = null;
+
+    /** @param s the local path/filename of the XML to use.  */
+    public void setXMLName(String s)
+    {
+        xmlURL = QetestUtils.filenameToURL(s);
+    }
+
+    /** @param s the URL/URI of the XML to use.  */
+    public void setXMLURL(String s)
+    {
+        xmlURL = s;
+    }
+
+    /** @param s String of XML to use in a StringReader, etc..  */
+    public void setXMLString(String s)
+    {
+        xmlString = s;
+    }
+
+    /** 
+     * Return a Source object representing our XML.
+     * This may be any kind of source and is determined by which 
+     * kinds of setXML*() methods you've called.
+     * <ul>
+     * <li>if xmlString is set, return new StreamSource(new StringReader(xmlString))</li>
+     * <li>if xmlURL/Name is set, return new StreamSource(xmlURL)</li>
+     * <li>More types TBD</li>
+     * </ul>
+     * @return Source object representing our XML, or an 
+     * IllegalStateException if we don't have any XML
+     */
+    public Source getXMLSource()
+    {
+        if (null != xmlString)
+            return new StreamSource(new StringReader(xmlString));
+        else if (null != xmlURL)
+            return new StreamSource(xmlURL);
+        else
+            throw new IllegalStateException("TraxDatalet.getXMLSource() with no XML!");
+    }
+
+
+    /** 
+     * Convenience method: set both XML and XSL names at once.  
+     *
+     * @param baseDir path/filename to your inputDir where 
+     * your matched xml, xsl files are
+     * @param baseName base portion of filename (not including 
+     * extension, which is automatically .xml and .xsl)
+     */
+    public void setNames(String baseDir, String baseName)
+    {
+        // Note forward slash, since 
+        String baseURL = QetestUtils.filenameToURL(baseDir) + "/";
+        xslURL = baseURL + baseName + ".xsl";
+        xmlURL = baseURL + baseName + ".xml";
+    }
+
+
+    /** Old-way: name to put output into; default:TraxDatalet.out.  */
+    public String outputName = "TraxDatalet.out";
+
+    /** Old-way: name of the a gold file or data; default:no-gold-file.out.  */
+    public String goldName = "no-gold-file.out";
+
+
+    /** 
+     * Generic placeholder for any additional options.  
+     * @see StylesheetDatalet#options
+     */
+    public Properties options = new Properties();
+
+
+    /** 
+     * A block of objects to validate.  
+     * Users may put in various objects that they will use as 
+     * expected data later on.  You can access this as a Properties 
+     * block or as a Hashtable; it's up to each user to define this.
+     */
+    public Properties expected = new Properties();
+
+
+    /** No argument constructor is a no-op.  */
+    public TraxDatalet() { /* no-op */ }
+
+
+    /** Description of what this Datalet tests.  */
+    protected String description = "TraxDatalet: javax.xml.transform Source holder";
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @return String describing the specific set of data 
+     * this Datalet contains (can often be used as the description
+     * of any check() calls made from the Testlet).
+     */
+    public String getDescription()
+    {
+        return description;
+    }
+
+
+    /**
+     * Accesor method for a brief description of this Datalet.  
+     *
+     * @param s description to use for this Datalet.
+     */
+    public void setDescription(String s)
+    {
+        description = s;
+    }
+
+
+    /**
+     * Load fields of this Datalet from a Hashtable.  
+     * Caller must provide data for all of our fields.
+     * 
+     * @param Hashtable to load
+     */
+    public void load(Hashtable h)
+    {
+        if (null == h)
+            return;
+        xslURL = (String)h.get("xslURL");
+        xslString = (String)h.get("xslString");
+        xmlURL = (String)h.get("xmlURL");
+        xmlString = (String)h.get("xmlString");
+        outputName = (String)h.get("outputName");
+        goldName = (String)h.get("goldName");
+        description = (String)h.get("description");
+        try
+        {
+            options = (Properties)h.get("options");
+        }
+        catch (Exception e) { /* no-op, ignore */ }
+        try
+        {
+            expected = (Properties)h.get("expected");
+        }
+        catch (Exception e) { /* no-op, ignore */ }
+    }
+
+
+    /**
+     * Load fields of this Datalet from a String[].  
+     * Order: xslURL, xmlURL, outputName, goldName, description
+     * If too few args, then fields at end of list are left at default value.
+     * 
+     * @param s String array to load
+     */
+    public void load(String[] args)
+    {
+        if (null == args)
+            return; //@todo should this have a return val or exception?
+
+        try
+        {
+            xslURL = args[0];
+            xmlURL = args[1];
+            outputName = args[2];
+            goldName = args[3];
+            description = args[4];
+        }
+        catch (ArrayIndexOutOfBoundsException  aioobe)
+        {
+            // No-op, leave remaining items as default
+        }
+    }
+}  // end of class TraxDatalet
+
diff --git a/test/java/src/org/apache/qetest/xsl/XHTComparator.java b/test/java/src/org/apache/qetest/xsl/XHTComparator.java
new file mode 100644
index 0000000..fcb6cbd
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XHTComparator.java
@@ -0,0 +1,788 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.qetest.QetestUtils;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+import org.w3c.tidy.Tidy;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Uses an XML/HTML/Text diff comparator to check or diff two files.
+ * <p>Given two files, an actual test result and a known good or 'gold'
+ * test result, diff the two files to see if they are equal; if not, provide
+ * some very basic info on where they differ.</p>
+ *
+ * <p>Attempts to parse each file as an XML document using Xerces;
+ * if that fails, attempt to parse each as an HTML document using
+ * <i>NEED NEW HTML PARSER</i>; if that fails, pretend to parse each
+ * doc as text and construct a faux document node; then do 
+ * readLine() and construct a &lt;line> element for each line.</p>
+ *
+ * <p>The comparison routine then recursively compares the two 
+ * documents node-by-node; see the code for exactly how each 
+ * node type is handled.  Note that some node types are currently 
+ * ignored.</p>
+ *
+ * //@todo document whitespace difference handling better -sc
+ * //@todo check how XML decls are handled (or not) -sc
+ * //@todo Allow param to define the type of parse we do (i.e. if a
+ * testwriter knows their output file will be XML, we should only
+ * attempt to parse it as XML, not other types)
+ * @see XHTComparatorXSLTC for an alternate implementation of 
+ * diff() which tests some things as QNames (which checks for the 
+ * true namespace, instead of just the prefix)
+ * @author Scott_Boag@lotus.com
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class XHTComparator
+{
+
+    /** 
+     * Maximum output length we may log for differing values.  
+     * When two nodes have mismatched values, we output the first 
+     * two values that were mismatched.  In some cases, this may be 
+     * extremely long, so limit how much we output for convenience.
+     */
+    protected int maxDisplayLen = 511;  // arbitrary length, for convenience
+
+    /**
+     * Accessor method for maxDisplayLen.
+     * @param i maximum length we log out
+     */
+    public void setMaxDisplayLen(int i)
+    {
+        if (i > 0)
+            maxDisplayLen = i;
+    }
+
+    /** Constants for reporting out reason for failed diffs. */
+    public static final String SEPARATOR = ";";
+
+    /** LBRACKET '['  */
+    public static final String LBRACKET = "[";
+
+    /** RBRACKET ']'  */
+    public static final String RBRACKET = "]";
+
+    /** TEST 'test', for the actual value.  */
+    public static final String TEST = "test";
+
+    /** GOLD 'gold' for the gold or expected value.  */
+    public static final String GOLD = "gold";
+
+    /** PARSE_TYPE '-parse-type' */
+    public static final String PARSE_TYPE = "-parse-type" + SEPARATOR;  // postpended to TEST or GOLD
+
+    /** OTHER_ERROR 'other-error'  */
+    public static final String OTHER_ERROR = "other-error" + SEPARATOR;
+
+    /** WARNING 'warning'  */
+    public static final String WARNING = "warning" + SEPARATOR;
+
+    /** MISMATCH_NODE  */
+    public static final String MISMATCH_NODE = "mismatch-node" + SEPARATOR;
+
+    /** MISSING_TEST_NODE  */
+    public static final String MISSING_TEST_NODE = "missing-node-" + TEST
+                                                       + SEPARATOR;
+
+    /** MISSING_GOLD_NODE  */
+    public static final String MISSING_GOLD_NODE = "missing-node-" + GOLD
+                                                       + SEPARATOR;
+
+    /** MISMATCH_ATTRIBUTE */
+    public static final String MISMATCH_ATTRIBUTE = "mismatch-attribute"
+                                                        + SEPARATOR;
+
+    /** MISMATCH_VALUE  */
+    public static final String MISMATCH_VALUE = "mismatch-value" + SEPARATOR;
+
+    /** MISMATCH_VALUE  */
+    public static final String MISMATCH_VALUE_GOLD = "mismatch-value-gold" + SEPARATOR;
+
+    /** MISMATCH_VALUE  */
+    public static final String MISMATCH_VALUE_TEXT = "mismatch-value-text" + SEPARATOR;
+
+    /** MISSING_TEST_VALUE  */
+    public static final String MISSING_TEST_VALUE = "missing-value-" + TEST
+                                                        + SEPARATOR;
+
+    /** MISSING_GOLD_VALUE  */
+    public static final String MISSING_GOLD_VALUE = "missing-value-" + GOLD
+                                                        + SEPARATOR;
+
+    /** WHITESPACE_DIFF  */
+    public static final String WHITESPACE_DIFF = "whitespace-diff;";
+
+    /**
+     * Compare two files by parsing into DOMs and comparing trees.
+     *
+     * <p>Parses the goldFileName by using the 
+     * {@link #parse(String, PrintWriter, String, Properties) parse worker method}
+     * - if null, we bail and return false.  If non-null, we parse the 
+     * testFileName into a Document as well.  Then we call 
+     * {@link #diff(Node, Node, PrintWriter, boolean[]) diff worker method} 
+     * to do the real work of comparing.</p>
+     *
+     * @param goldFileName expected file
+     * @param testFileName actual file
+     * @param reporter PrintWriter to dump status info to
+     * @param warning array of warning flags (for whitespace diffs, 
+     * item[0] is set to true if we find whitespace-only diffs)
+     * @param attributes to attempt to set onto parsers
+     * @return true if they match, false otherwise
+     */
+    public boolean compare(String goldFileName, String testFileName,
+                           PrintWriter reporter, boolean[] warning,
+                           Properties attributes)
+    {
+
+        // parse the gold doc
+        Document goldDoc = parse(goldFileName, reporter, GOLD, attributes);
+
+        // parse the test doc only if gold doc was parsed OK
+        //@todo Jun-02 -sc Note the logic here might be improveable to 
+        //  actually report file missing problems better: i.e. 
+        //  in theory, if the actual is missing, it's a fail; if 
+        //  the gold (only) is missing, it's ambiguous
+        Document testDoc = (null != goldDoc)
+                           ? parse(testFileName, reporter, TEST, attributes) : null;
+
+        if (null == goldDoc)
+        {
+            reporter.println(OTHER_ERROR + GOLD + SEPARATOR
+                             + "document null");
+
+            return false;
+        }
+        else if (null == testDoc)
+        {
+            reporter.println(OTHER_ERROR + TEST + SEPARATOR
+                             + "document null");
+
+            return false;
+        }
+
+        return diff(goldDoc, testDoc, reporter, warning);
+    }
+
+    // Reporter format:
+    // REASON_CONSTANT;gold val;test val;reason description
+
+    /**
+     * Diff two Nodes recursively and report true if equal.  
+     *
+     * <p>The contract is: when you enter here the gold and test nodes are the same type,
+     * both non-null, and both in the same basic position in the tree.
+     * //@todo verify caller really performs for the contract -sc</p>
+     *
+     * <p>See the code for how it's done; note that not all node 
+     * types are actually compared currently.  Also see 
+     * {@link XHTComparatorXSLTC} for an alternate implementation.</p>
+     *
+     * @param gold or expected node
+     * @param test actual node
+     * @param reporter PrintWriter to dump status info to
+     * @param warning[] if any whitespace diffs found
+     *
+     * @return true if pass, false if any problems encountered
+     */
+    boolean diff(Node gold, Node test, PrintWriter reporter,
+                 boolean[] warning)
+    {
+
+        String name1 = gold.getNodeName();
+        String name2 = test.getNodeName();
+
+        // If both there but not equal, fail
+        if ((null != name1) && (null != name2) &&!name1.equals(name2))
+        {
+            reporter.println(MISMATCH_NODE + nodeTypeString(gold) + SEPARATOR
+                           + nodeTypeString(test) + SEPARATOR
+                           + "name does not equal test node");
+
+            return false;
+        }
+        else if ((null != name1) && (null == name2))
+        {
+            reporter.println(MISSING_TEST_NODE + nodeTypeString(gold)
+                           + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                           + "name missing on test");
+
+            return false;
+        }
+        else if ((null == name1) && (null != name2))
+        {
+            reporter.println(MISSING_GOLD_NODE + nodeTypeString(gold)
+                           + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                           + "name missing on gold");
+
+            return false;
+        }
+
+        String value1 = gold.getNodeValue();
+        String value2 = test.getNodeValue();
+
+        if ((null != value1) && (null != value2) &&!value1.equals(value2))
+        {
+            reporter.println(MISMATCH_VALUE + nodeTypeString(gold) + "len="
+                           + value1.length() + SEPARATOR
+                           + nodeTypeString(test) + "len=" + value2.length()
+                           + SEPARATOR + "values do not match");
+            printNodeDiff(gold, test, reporter);
+            return false;
+        }
+        else if ((null != value1) && (null == value2))
+        {
+            reporter.println(MISSING_TEST_VALUE + nodeTypeString(gold) + "-"
+                           + value1 + SEPARATOR + nodeTypeString(test)
+                           + SEPARATOR + "test no value");
+
+            return false;
+        }
+        else if ((null == value1) && (null != value2))
+        {
+            reporter.println(MISSING_GOLD_VALUE + nodeTypeString(gold)
+                           + SEPARATOR + nodeTypeString(test) + "-" + value2
+                           + SEPARATOR + "gold no value");
+
+            return false;
+        }
+
+        switch (gold.getNodeType())
+        {
+        case Node.DOCUMENT_NODE :
+        {
+
+            // Why don't we do anything here? -sc
+        }
+        break;
+        case Node.ELEMENT_NODE :
+        {
+
+            // Explicitly ignore attribute ordering
+            // TODO do we need to make this settable for testing purposes? -sc
+            NamedNodeMap goldAttrs = gold.getAttributes();
+            NamedNodeMap testAttrs = test.getAttributes();
+
+            if ((null != goldAttrs) && (null == testAttrs))
+            {
+                reporter.println(MISMATCH_ATTRIBUTE + nodeTypeString(gold)
+                               + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                               + "test no attrs");
+
+                return false;
+            }
+            else if ((null == goldAttrs) && (null != testAttrs))
+            {
+                reporter.println(MISMATCH_ATTRIBUTE + nodeTypeString(gold)
+                               + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                               + "gold no attrs");
+
+                return false;
+            }
+
+            int gn = goldAttrs.getLength();
+            int tn = testAttrs.getLength();
+
+            if (gn != tn)
+            {
+                reporter.println(MISMATCH_ATTRIBUTE + nodeTypeString(gold)
+                               + "-" + gn + SEPARATOR + nodeTypeString(test)
+                               + "-" + tn + SEPARATOR
+                               + "attribte count mismatch");
+
+                // TODO: add output of each set of attrs for comparisons
+                return false;
+            }
+
+            // TODO verify this checks the full list of attributes both ways, 
+            //      from gold->test and from test->gold -sc
+            for (int i = 0; i < gn; i++)
+            {
+                Attr goldAttr = (Attr) goldAttrs.item(i);
+                String goldAttrName = goldAttr.getName();
+                Node testAttr = testAttrs.getNamedItem(goldAttrName);
+
+                if (null == testAttr)
+                {
+                    reporter.println(MISMATCH_ATTRIBUTE + nodeTypeString(gold)
+                                   + "-" + goldAttrName + SEPARATOR
+                                   + nodeTypeString(test) + SEPARATOR
+                                   + "missing attribute on test");
+
+                    return false;
+                }
+
+                if (!diff(goldAttr, testAttr, reporter, warning))
+                {
+                    return false;
+                }
+            }
+        }
+        break;
+        case Node.CDATA_SECTION_NODE :{}
+        break;
+        case Node.ENTITY_REFERENCE_NODE :{}
+        break;
+        case Node.ATTRIBUTE_NODE :{}
+        break;
+        case Node.COMMENT_NODE :{}
+        break;
+        case Node.ENTITY_NODE :{}
+        break;
+        case Node.NOTATION_NODE :{}
+        break;
+        case Node.PROCESSING_INSTRUCTION_NODE :{}
+        break;
+        case Node.TEXT_NODE :{}
+        break;
+        default :{}
+        }
+
+        Node try2[] = new Node[2];
+        Node goldChild = gold.getFirstChild();
+        Node testChild = test.getFirstChild();
+
+        if (!basicChildCompare(goldChild, testChild, reporter, warning, try2))
+            return false;
+
+        goldChild = try2[0];
+        testChild = try2[1];
+
+        while (null != goldChild)
+        {
+            if (!diff(goldChild, testChild, reporter, warning))
+                return false;
+
+            goldChild = goldChild.getNextSibling();
+            testChild = testChild.getNextSibling();
+
+            if (!basicChildCompare(goldChild, testChild, reporter, warning,
+                                   try2))
+                return false;
+
+            goldChild = try2[0];
+            testChild = try2[1];
+        }
+
+        return true;
+    }  // end of diff()
+
+    /**
+     * Returns Character.isWhitespace
+     * @param s String to check for whitespace
+     * @return true if all whitespace; false otherwise
+     */
+    boolean isWhiteSpace(String s)
+    {
+
+        int n = s.length();
+
+        for (int i = 0; i < n; i++)
+        {
+            if (!Character.isWhitespace(s.charAt(i)))
+                return false;
+        }
+
+        return true;
+    }  // end of isWhiteSpace()
+
+    /**
+     * NEEDSDOC Method tryToAdvancePastWhitespace 
+     *
+     *
+     * @param n node to check if it's whitespace
+     * @param reporter PrintWriter to dump status info to
+     * @param warning set to true if we advance past a 
+     * whitespace node; note that this logic isn't quite 
+     * correct, I think (it should only be set if 
+     * we advance past whitespace that isn't equal in 
+     * both trees or something like that)
+     * @param next array of nodes to continue thru
+     * @param which index into next array
+     *
+     * @return Node we should be at after advancing
+     */
+    Node tryToAdvancePastWhitespace(Node n, PrintWriter reporter,
+                                    boolean[] warning, Node next[], int which)
+    {
+
+        if (n.getNodeType() == Node.TEXT_NODE)
+        {
+            String data = n.getNodeValue();
+
+            if (null != data)
+            {
+                if (isWhiteSpace(data))
+                {
+                    warning[0] = true;
+
+                    reporter.print(WHITESPACE_DIFF + " ");  // TODO check the format of this; maybe use println -sc
+
+                    n = n.getNextSibling();
+                    next[which] = n;
+                }
+            }
+        }
+
+        return n;
+    }  // end of tryToAdvancePastWhitespace()
+
+    /**
+     * NEEDSDOC Method basicChildCompare 
+     *
+     *
+     * NEEDSDOC @param gold
+     * NEEDSDOC @param test
+     * @param reporter PrintWriter to dump status info to
+     * NEEDSDOC @param warning
+     * NEEDSDOC @param next
+     *
+     * NEEDSDOC (basicChildCompare) @return
+     */
+    boolean basicChildCompare(Node gold, Node test, PrintWriter reporter,
+                              boolean[] warning, Node next[])
+    {
+
+        next[0] = gold;
+        next[1] = test;
+
+        boolean alreadyTriedToAdvance = false;
+
+        if ((null != gold) && (null == test))
+        {
+            gold = tryToAdvancePastWhitespace(gold, reporter, warning, next,
+                                              0);
+            alreadyTriedToAdvance = true;
+
+            if ((null != gold) && (null == test))
+            {
+                reporter.println(MISSING_TEST_NODE + nodeTypeString(gold)
+                               + SEPARATOR + SEPARATOR
+                               + "missing node on test");
+
+                return false;
+            }
+        }
+        else if ((null == gold) && (null != test))
+        {
+            test = tryToAdvancePastWhitespace(test, reporter, warning, next,
+                                              1);
+            alreadyTriedToAdvance = true;
+
+            if ((null == gold) && (null != test))
+            {
+                reporter.println(MISSING_GOLD_NODE + SEPARATOR
+                               + nodeTypeString(test) + SEPARATOR
+                               + "missing node on gold");
+
+                return false;
+            }
+        }
+
+        if ((null != gold) && (gold.getNodeType() != test.getNodeType()))
+        {
+            Node savedGold = gold;
+            Node savedTest = test;
+
+            if (!alreadyTriedToAdvance)
+            {
+                gold = tryToAdvancePastWhitespace(gold, reporter, warning,
+                                                  next, 0);
+
+                if (gold == savedGold)
+                {
+                    test = tryToAdvancePastWhitespace(test, reporter,
+                                                      warning, next, 1);
+                }
+            }
+
+            if ((null != gold) && (gold.getNodeType() != test.getNodeType()))
+            {
+                gold = savedGold;
+                test = savedTest;
+
+                reporter.println(MISMATCH_NODE + nodeTypeString(gold)
+                               + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                               + "node type mismatch");
+                printNodeDiff(gold, test, reporter);
+
+                return false;
+            }
+        }
+
+        return true;
+    }  // end of basicChildCompare()
+
+    /**
+     * Cheap-o text printout of a node.  By Scott.  
+     *
+     * @param n node to print info for
+     * @return String of getNodeType plus getNodeName
+     */
+    public static String nodeTypeString(Node n)
+    {
+        switch (n.getNodeType())
+        {
+        case Node.DOCUMENT_NODE :
+            return "DOCUMENT(" + n.getNodeName() + ")";
+        case Node.ELEMENT_NODE :
+            return "ELEMENT(" + n.getNodeName() + ")";
+        case Node.CDATA_SECTION_NODE :
+            return "CDATA_SECTION(" + n.getNodeName() + ")";
+        case Node.ENTITY_REFERENCE_NODE :
+            return "ENTITY_REFERENCE(" + n.getNodeName() + ")";
+        case Node.ATTRIBUTE_NODE :
+            return "ATTRIBUTE(" + n.getNodeName() + ")";
+        case Node.COMMENT_NODE :
+            return "COMMENT(" + n.getNodeName() + ")";
+        case Node.ENTITY_NODE :
+            return "ENTITY(" + n.getNodeName() + ")";
+        case Node.NOTATION_NODE :
+            return "NOTATION(" + n.getNodeName() + ")";
+        case Node.PROCESSING_INSTRUCTION_NODE :
+            return "PROCESSING_INSTRUCTION(" + n.getNodeName() + ")";
+        case Node.TEXT_NODE :
+            return "TEXT()"; // #text is all that's ever printed out, so skip it
+        default :
+            return "UNKNOWN(" + n.getNodeName() + ")";
+        }
+    }  // end of nodeTypeString()
+
+
+    /**
+     * Cheap-o text printout of two different nodes.  
+     *
+     * @param goldNode or expected node to print info
+     * @param testNode or actual node to print info
+     * @param n node to print info for
+     * @param reporter PrintWriter to dump status info to
+     */
+    public void printNodeDiff(Node goldNode, Node testNode, PrintWriter reporter)
+    {
+        String goldValue = goldNode.getNodeValue();
+        String testValue = testNode.getNodeValue();
+        if (null == goldValue)
+            goldValue = "null";
+        if (null == testValue)
+            testValue = "null";
+
+        // Limit length we output to logs; extremely long values 
+        //  are more hassle than they're worth (at that point, 
+        //  it's either obvious what the problem is, or it's 
+        //  such a small problem that you'll need to manually
+        //  compare the files separately
+        if (goldValue.length() > maxDisplayLen)
+            goldValue = goldValue.substring(0, maxDisplayLen);
+        if (testValue.length() > maxDisplayLen)
+            testValue = testValue.substring(0, maxDisplayLen);
+        reporter.println(MISMATCH_VALUE_GOLD + nodeTypeString(goldNode) + SEPARATOR + "\n" + goldValue);
+        reporter.println(MISMATCH_VALUE_TEXT + nodeTypeString(testNode) + SEPARATOR + "\n" + testValue);
+    }
+
+
+    /**
+     * Simple worker method to parse filename to a Document.  
+     *
+     * <p>Attempts XML parse, if that throws an exception, then 
+     * we attempt an HTML parse (when parser available), if 
+     * that throws an exception, then we parse as text: 
+     * we construct a faux document element to hold it all, 
+     * and then parse by readLine() and put each line of 
+     * text into a &lt;line> element.</p>
+     *
+     * @param filename to parse as a local path
+     * @param reporter PrintWriter to dump status info to
+     * @param which either TEST or GOLD file being parsed
+     * @param attributes name=value pairs to set on the 
+     * DocumentBuilderFactory that we use to parse
+     *
+     * @return Document object with contents of the file; 
+     * otherwise throws an unchecked RuntimeException if there 
+     * is any fatal problem
+     */
+    Document parse(String filename, PrintWriter reporter, String which, Properties attributes)
+    {
+        // Force filerefs to be URI's if needed: note this is independent of any other files
+        String docURI = QetestUtils.filenameToURL(filename);
+        
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        // Always set namespaces on
+        dfactory.setNamespaceAware(true);
+        // Set other attributes here as needed
+        applyAttributes(dfactory, attributes);
+        
+        // Local class: cheap non-printing ErrorHandler
+        // This is used to suppress validation warnings which 
+        //  would otherwise clutter up the console
+        ErrorHandler nullHandler = new ErrorHandler() {
+            public void warning(SAXParseException e) throws SAXException {}
+            public void error(SAXParseException e) throws SAXException {}
+            public void fatalError(SAXParseException e) throws SAXException 
+            {
+                throw e;
+            }
+        };
+
+        String parseType = which + PARSE_TYPE + "[xml];";
+        Document doc = null;
+        try
+        {
+            // First, attempt to parse as XML (preferred)...
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+            docBuilder.setErrorHandler(nullHandler);
+            doc = docBuilder.parse(new InputSource(docURI));
+        }
+        catch (Throwable se)
+        {
+            // ... if we couldn't parse as XML, attempt parse as HTML...
+            reporter.println(WARNING + se.toString());
+            parseType = which + PARSE_TYPE + "[html];";
+
+            try
+            {
+                // Use the copy of Tidy that the XSLTC team has checked in
+                // Submitted by: Gunnar Klauberg <gklauberg@yahoo.de>
+                // Alternate by: Santiago.PericasGeertsen@sun.com
+    	        Tidy tidy = new Tidy();
+    	        tidy.setXHTML(true);
+    	        tidy.setTidyMark(false);
+    	        tidy.setShowWarnings(false);
+                tidy.setShowErrors(0);
+    	        tidy.setQuiet(true);
+    	        doc = tidy.parseDOM(new URL(docURI).openStream(), null);
+            }
+            catch (Exception e)
+            {
+                // ... if we can't parse as HTML, then just parse the text
+                try
+                {
+                    reporter.println(WARNING + e.toString());
+                    parseType = which + PARSE_TYPE + "[text];";
+
+                    // First build a faux document with parent element
+                    DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+                    doc = docBuilder.newDocument();
+                    Element outElem = doc.createElement("out");
+
+                    // Parse as text, line by line
+                    //   Since we already know it should be text, this should 
+                    //   work better than parsing by bytes.
+                    FileReader fr = new FileReader(filename);
+                    BufferedReader br = new BufferedReader(fr);
+                    for (;;)
+                    {
+                        String tmp = br.readLine();
+
+                        if (tmp == null)
+                        {
+                            break;
+                        }
+                        // An additional thing we could do would 
+                        //  be to put in the line number in the 
+                        //  file in here somehow, so when users 
+                        //  view reports, they get that info
+                        Element lineElem = doc.createElement("line");
+                        outElem.appendChild(lineElem);
+                        Text textNode = doc.createTextNode(tmp);
+                        lineElem.appendChild(textNode);
+                    }
+                    // Now stick the whole element into the document to return
+                    doc.appendChild(outElem);
+                }
+                catch (Throwable throwable)
+                {
+                    reporter.println(OTHER_ERROR + filename + SEPARATOR
+                                   + "threw:" + throwable.toString());
+                }
+            }
+        }
+
+        // Output a newline here for readability
+        reporter.println(parseType);
+
+        return doc;
+    }  // end of parse()
+    
+    /**
+     * Pass applicable attributes onto our DocumentBuilderFactory.  
+     *
+     * Only passes thru attributes we explicitly know about and 
+     * are constants from XHTFileCheckService.
+     * 
+     * @param dbf factory to attempt to set* onto
+     * @param attrs various attributes we should try to set
+     */
+    protected void applyAttributes(DocumentBuilderFactory dfactory, Properties attributes)
+    {
+        if ((null == attributes) || (null == dfactory))
+            return;
+
+        String tmp = attributes.getProperty(XHTFileCheckService.SETVALIDATING);
+        if (null != tmp)
+        {
+            dfactory.setValidating(new Boolean(tmp).booleanValue());
+        }
+        tmp = attributes.getProperty(XHTFileCheckService.SETIGNORINGELEMENTCONTENTWHITESPACE);
+        if (null != tmp)
+        {
+            dfactory.setIgnoringElementContentWhitespace(new Boolean(tmp).booleanValue());
+        }
+        tmp = attributes.getProperty(XHTFileCheckService.SETEXPANDENTITYREFERENCES);
+        if (null != tmp)
+        {
+            dfactory.setExpandEntityReferences(new Boolean(tmp).booleanValue());
+        }
+        tmp = attributes.getProperty(XHTFileCheckService.SETIGNORINGCOMMENTS);
+        if (null != tmp)
+        {
+            dfactory.setIgnoringComments(new Boolean(tmp).booleanValue());
+        }
+        tmp = attributes.getProperty(XHTFileCheckService.SETCOALESCING);
+        if (null != tmp)
+        {
+            dfactory.setCoalescing(new Boolean(tmp).booleanValue());
+        }
+        /* Unknown attributes are ignored! */
+    }
+
+}
diff --git a/test/java/src/org/apache/qetest/xsl/XHTComparatorXSLTC.java b/test/java/src/org/apache/qetest/xsl/XHTComparatorXSLTC.java
new file mode 100644
index 0000000..4c01164
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XHTComparatorXSLTC.java
@@ -0,0 +1,318 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.PrintWriter;
+import java.util.Vector;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * Defines XSLTC's XML/HTML/Text diff comparator to check or diff two files.
+ * This comparator uses the expanded name instead of the qname to compare
+ * element names. Also, for simplicity, it ignores NS declaration attributes.
+ *
+ * //@todo Use expanded name for attributes as well
+ *
+ * @author Scott_Boag@lotus.com
+ * @author Shane_Curcuru@lotus.com
+ * @author Santiago.PericasGeertsen@sun.com
+ * @version $Id$
+ */
+public class XHTComparatorXSLTC extends XHTComparator
+{
+
+    /**
+     * The contract is: when you enter here the gold and test nodes are the same type,
+     * both non-null, and both in the same basic position in the tree.
+     * //@todo verify caller really performs for the contract -sc
+     *
+     * This overridden method does additional checking of namespaces 
+     * and local names, instead of just getNodeName().
+     *
+     * @param gold gold or expected node
+     * @param test actual node
+     * @param reporter PrintWriter to dump status info to
+     * @param warning[] if any whitespace diffs found
+     *
+     * @return true if pass, false if any problems encountered
+     */
+    boolean diff(Node gold, Node test, PrintWriter reporter,
+                 boolean[] warning)
+    {
+
+        String name1 = gold.getLocalName();
+        String name2 = test.getLocalName();
+
+        // If both there but not equal, fail
+        if ((null != name1) && (null != name2) &&!name1.equals(name2))
+        {
+            reporter.println(MISMATCH_NODE + nodeTypeString(gold) + SEPARATOR
+                           + nodeTypeString(test) + SEPARATOR
+                           + "name does not equal test node");
+
+            return false;
+        }
+        else if ((null != name1) && (null == name2))
+        {
+            reporter.println(MISSING_TEST_NODE + nodeTypeString(gold)
+                           + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                           + "name missing on test");
+
+            return false;
+        }
+        else if ((null == name1) && (null != name2))
+        {
+            reporter.println(MISSING_GOLD_NODE + nodeTypeString(gold)
+                           + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                           + "name missing on gold");
+
+            return false;
+        }
+
+	String uri1 = gold.getNamespaceURI();
+	String uri2 = test.getNamespaceURI();
+
+        // If both there but not equal, fail
+        if ((null != uri1) && (null != uri2) && !uri1.equals(uri2))
+        {
+            reporter.println(MISMATCH_NODE + nodeTypeString(gold) + SEPARATOR
+                           + nodeTypeString(test) + SEPARATOR
+                           + "namespace URI does not equal test node");
+
+            return false;
+        }
+        else if ((null != uri1) && (null == uri2))
+        {
+            reporter.println(MISSING_TEST_NODE + nodeTypeString(gold)
+                           + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                           + "namespace URI missing on test");
+
+            return false;
+        }
+        else if ((null == uri1) && (null != uri2))
+        {
+            reporter.println(MISSING_GOLD_NODE + nodeTypeString(gold)
+                           + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                           + "namespace URI missing on gold");
+
+            return false;
+        }
+
+        String value1 = gold.getNodeValue();
+        String value2 = test.getNodeValue();
+
+        if ((null != value1) && (null != value2) &&!value1.equals(value2))
+        {
+            reporter.println(MISMATCH_VALUE + nodeTypeString(gold) + "len="
+                           + value1.length() + SEPARATOR
+                           + nodeTypeString(test) + "len=" + value2.length()
+                           + SEPARATOR + "lengths do not match");
+
+            // Limit length we output to logs; extremely long values 
+            //  are more hassle than they're worth (at that point, 
+            //  it's either obvious what the problem is, or it's 
+            //  such a small problem that you'll need to manually
+            //  compare the files separately
+            if (value1.length() > maxDisplayLen)
+                value1 = value1.substring(0, maxDisplayLen);
+            if (value2.length() > maxDisplayLen)
+                value2 = value2.substring(0, maxDisplayLen);
+            reporter.println(MISMATCH_VALUE_GOLD + nodeTypeString(gold) + SEPARATOR + "\n" + value1);
+            reporter.println(MISMATCH_VALUE_TEXT + nodeTypeString(test) + SEPARATOR + "\n" + value2);
+
+            return false;
+        }
+        else if ((null != value1) && (null == value2))
+        {
+            reporter.println(MISSING_TEST_VALUE + nodeTypeString(gold) + "-"
+                           + value1 + SEPARATOR + nodeTypeString(test)
+                           + SEPARATOR + "test no value");
+
+            return false;
+        }
+        else if ((null == value1) && (null != value2))
+        {
+            reporter.println(MISSING_GOLD_VALUE + nodeTypeString(gold)
+                           + SEPARATOR + nodeTypeString(test) + "-" + value2
+                           + SEPARATOR + "gold no value");
+
+            return false;
+        }
+
+        switch (gold.getNodeType())
+        {
+        case Node.DOCUMENT_NODE :
+        {
+
+            // Why don't we do anything here? -sc
+        }
+        break;
+        case Node.ELEMENT_NODE :
+        {
+
+            // Explicitly ignore attribute ordering
+            // TODO do we need to make this settable for testing purposes? -sc
+            NamedNodeMap goldAttrs = gold.getAttributes();
+            NamedNodeMap testAttrs = test.getAttributes();
+
+            if ((null != goldAttrs) && (null == testAttrs))
+            {
+                reporter.println(MISMATCH_ATTRIBUTE + nodeTypeString(gold)
+                               + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                               + "test no attrs");
+
+                return false;
+            }
+            else if ((null == goldAttrs) && (null != testAttrs))
+            {
+                reporter.println(MISMATCH_ATTRIBUTE + nodeTypeString(gold)
+                               + SEPARATOR + nodeTypeString(test) + SEPARATOR
+                               + "gold no attrs");
+
+                return false;
+            }
+
+	    // Remove NS declarations from gold attribute list
+	    Vector nsDeclarations = new Vector();
+	    int length = goldAttrs.getLength();
+	    for (int i = 0; i < length; i++) {
+		final String name = goldAttrs.item(i).getNodeName();
+		if (name.startsWith("xmlns")) {
+		    nsDeclarations.addElement(name);
+		}
+	    }
+	    length = nsDeclarations.size();
+	    for (int i = 0; i < length; i++) {
+		goldAttrs.removeNamedItem((String) nsDeclarations.elementAt(i));
+	    }
+
+	    // Remove NS declarations from test attribute list
+	    nsDeclarations.removeAllElements(); // Use JDK 1.1.x methods
+	    length = testAttrs.getLength();
+	    for (int i = 0; i < length; i++) {
+		final String name = testAttrs.item(i).getNodeName();
+		if (name.startsWith("xmlns")) {
+		    nsDeclarations.addElement(name);
+		}
+	    }
+	    length = nsDeclarations.size();
+	    for (int i = 0; i < length; i++) {
+		testAttrs.removeNamedItem((String) nsDeclarations.elementAt(i));
+	    }
+
+            int gn = goldAttrs.getLength();
+            int tn = testAttrs.getLength();
+
+            if (gn != tn)
+            {
+                reporter.println(MISMATCH_ATTRIBUTE + nodeTypeString(gold)
+                               + "-" + gn + SEPARATOR + nodeTypeString(test)
+                               + "-" + tn + SEPARATOR
+                               + "attribte count mismatch");
+
+                // TODO: add output of each set of attrs for comparisons
+                return false;
+            }
+
+            // TODO verify this checks the full list of attributes both ways, 
+            //      from gold->test and from test->gold -sc
+            for (int i = 0; i < gn; i++)
+            {
+                Attr goldAttr = (Attr) goldAttrs.item(i);
+                String goldAttrLocalName = goldAttr.getLocalName();
+                String goldAttrNamespaceURI = goldAttr.getNamespaceURI();
+                String goldAttrName = goldAttr.getName();
+                Node testAttr;
+                if (goldAttrNamespaceURI != null && goldAttrLocalName != null) {
+                        testAttr = testAttrs.getNamedItemNS(goldAttrNamespaceURI,goldAttrLocalName);
+                } else {
+                        testAttr = testAttrs.getNamedItem(goldAttrName);
+                }
+
+                if (null == testAttr)
+                {
+                    reporter.println(MISMATCH_ATTRIBUTE + nodeTypeString(gold)
+                                   + "-" + goldAttrName + SEPARATOR
+                                   + nodeTypeString(test) + SEPARATOR
+                                   + "missing attribute on test");
+
+                    return false;
+                }
+
+                if (!diff(goldAttr, testAttr, reporter, warning))
+                {
+                    return false;
+                }
+            }
+        }
+        break;
+        case Node.CDATA_SECTION_NODE :{}
+        break;
+        case Node.ENTITY_REFERENCE_NODE :{}
+        break;
+        case Node.ATTRIBUTE_NODE :{}
+        break;
+        case Node.COMMENT_NODE :{}
+        break;
+        case Node.ENTITY_NODE :{}
+        break;
+        case Node.NOTATION_NODE :{}
+        break;
+        case Node.PROCESSING_INSTRUCTION_NODE :{}
+        break;
+        case Node.TEXT_NODE :{}
+        break;
+        default :{}
+        }
+
+        Node try2[] = new Node[2];
+        Node goldChild = gold.getFirstChild();
+        Node testChild = test.getFirstChild();
+
+        if (!basicChildCompare(goldChild, testChild, reporter, warning, try2))
+            return false;
+
+        goldChild = try2[0];
+        testChild = try2[1];
+
+        while (null != goldChild)
+        {
+            if (!diff(goldChild, testChild, reporter, warning))
+                return false;
+
+            goldChild = goldChild.getNextSibling();
+            testChild = testChild.getNextSibling();
+
+            if (!basicChildCompare(goldChild, testChild, reporter, warning,
+                                   try2))
+                return false;
+
+            goldChild = try2[0];
+            testChild = try2[1];
+        }
+
+        return true;
+    }  // end of diff()
+}
diff --git a/test/java/src/org/apache/qetest/xsl/XHTFileCheckService.java b/test/java/src/org/apache/qetest/xsl/XHTFileCheckService.java
new file mode 100644
index 0000000..bbb2465
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XHTFileCheckService.java
@@ -0,0 +1,487 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * XHTFileCheckService.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.ConsoleLogger;
+import org.apache.qetest.Logger;
+import org.apache.qetest.XMLFileLogger;
+
+/**
+ * Uses an XML/HTML/Text diff comparator to check or diff two files.
+ * @see #check(Logger logger, Object actual, Object reference, String msg, String id)
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class XHTFileCheckService implements CheckService
+{
+
+    /** XHTComparator tool to diff two files. */
+    protected XHTComparator comparator = new XHTComparator();
+
+    /** Stores last checkFile calls printed output. */
+    private StringWriter sw = null;
+
+    /**
+     * Compare two objects for equivalence, and return appropriate result.
+     * Note that the order of actual, reference is important
+     * important in determining the result.
+     * <li>Typically:
+     * <ul>any unexpected Exceptions thrown -> ERRR_RESULT</ul>
+     * <ul>actual does not exist -> FAIL_RESULT</ul>
+     * <ul>reference does not exist -> AMBG_RESULT</ul>
+     * <ul>actual is equivalent to reference -> PASS_RESULT</ul>
+     * <ul>actual is not equivalent to reference -> FAIL_RESULT</ul>
+     * </li>
+     * Equvalence is first checked by parsing both files as XML to 
+     * a DOM; if that has problems, we parse as HTML to a DOM; if 
+     * that has problems, we create a DOM with a single text node 
+     * after reading the file as text.  We then compare the two DOM 
+     * trees for equivalence. Note that in XML mode differences in 
+     * the XML header itself (i.e. standalone=no/yes) are not caught,
+     * and will still report a pass (this is a defect in our 
+     * comparison method).
+     * Side effect: every call to check() fills some additional 
+     * info about how the check() call was processed which is then 
+     * returned from getExtendedInfo() - this happens no matter what 
+     * the result of the check() call was.
+     *
+     * @param logger to dump any output messages to
+     * @param actual (current) Object to check
+     * @param reference (gold, or expected) Object to check against
+     * @param description of what you're checking
+     * @param msg comment to log out with this test point
+     * @param id ID tag to log out with this test point
+     * @return Logger.*_RESULT code denoting status; each method may 
+     * define it's own meanings for pass, fail, ambiguous, etc.
+     */
+	public  XHTFileCheckService()
+	{
+	  //No-op
+	}
+
+    public int check(Logger logger, Object actual, Object reference,
+                     String msg, String id)
+    {
+        // Create our 'extended info' stuff now, so it will 
+        //  always reflect the most recent call to this method
+        sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+
+        if (((null == actual) || (null == reference )))
+        {
+            pw.println("XHTFileCheckService actual or reference was null!");
+            pw.flush();
+            logFileCheckElem(logger, "null", "null", msg, id, sw.toString());
+            logger.checkErr(msg, id);
+            return logger.ERRR_RESULT;
+        }
+        if (!((actual instanceof File) & (reference instanceof File)))
+        {
+            // Must have File objects to continue
+            pw.println("XHTFileCheckService only takes File objects!");
+            pw.flush();
+            logFileCheckElem(logger, actual.toString(), reference.toString(), msg, id, sw.toString());
+            logger.checkErr(msg, id);
+            return logger.ERRR_RESULT;
+        }
+
+        File actualFile = (File) actual;
+        File referenceFile = (File) reference;
+
+        // Fail if Actual file doesn't exist or is 0 len
+        if ((!actualFile.exists()) || (actualFile.length() == 0))
+        {
+            pw.println("actual(" + actualFile.toString() + ") did not exist or was 0 len");
+            pw.flush();
+            logFileCheckElem(logger, actualFile.toString(), referenceFile.toString(), msg, id, sw.toString());
+            logger.checkFail(msg, id);
+            return logger.FAIL_RESULT;
+        }
+
+        // Ambiguous if gold file doesn't exist or is 0 len
+        if ((!referenceFile.exists()) || (referenceFile.length() == 0))
+        {
+            pw.println("reference(" + referenceFile.toString() + ") did not exist or was 0 len");
+            pw.flush();
+            logFileCheckElem(logger, actualFile.toString(), referenceFile.toString(), msg, id, sw.toString());
+            logger.checkAmbiguous(msg, id);
+            return Logger.AMBG_RESULT;
+        }
+
+        boolean warning[] = new boolean[1];
+        warning[0] = false;
+        boolean isEqual = false;
+
+        // Inefficient code to get around very rare spurious exception:
+        // java.io.IOException: The process cannot access the file because it is being used by another process
+	    //    at java.io.Win32FileSystem.canonicalize(Native Method)
+	    //    at java.io.File.getCanonicalPath(File.java:442)
+	    //    at org.apache.qetest.xsl.XHTFileCheckService.check(XHTFileCheckService.java:181)
+        // So get filenames first separately, then call comparator
+        String referenceFileName = referenceFile.getAbsolutePath();
+        String actualFileName = actualFile.getAbsolutePath();
+        try
+        {
+            referenceFileName = referenceFile.getCanonicalPath();
+            // Occasional spurious exception happens here, perhaps 
+            //  because sometimes the previous transform or whatever 
+            //  hasn't quite closed the actualFile yet
+            actualFileName = actualFile.getCanonicalPath();
+        } 
+        catch (Exception e) { /* no-op, ignore */ }
+        
+        try
+        {
+            // Note calling order (gold, act) is different than checkFiles()
+            isEqual = comparator.compare(referenceFileName,
+                                         actualFileName, pw,
+                                         warning, attributes);
+            // Side effect: fills in pw/sw with info about the comparison
+        }
+        catch (Throwable t)
+        {
+            // Add any exception info to pw/sw; this will automatically 
+            //  get logged out later on via logFileCheckElem
+            pw.println("XHTFileCheckService threw: " + t.toString());
+            t.printStackTrace(pw);
+            isEqual = false;
+        }
+
+        // If not equal at all, fail
+        if (!isEqual)
+        {
+            pw.println("XHTFileCheckService files were not equal");
+            pw.flush();
+            logFileCheckElem(logger, actualFile.toString(), referenceFile.toString(), msg, id, sw.toString());
+            logger.checkFail(msg, id);
+            return Logger.FAIL_RESULT;
+        }
+        // If whitespace-only diffs, then pass/fail based on allowWhitespaceDiff
+        else if (warning[0])
+        {
+            pw.println("XHTFileCheckService whitespace diff warning!");
+            pw.flush();
+            if (allowWhitespaceDiff)
+            {
+                logger.logMsg(Logger.STATUSMSG, "XHTFileCheckService whitespace diff warning, passing!");
+                logger.checkPass(msg, id);
+                return Logger.PASS_RESULT;
+            }
+            else
+            {
+                logFileCheckElem(logger, actualFile.toString(), referenceFile.toString(), msg, id, 
+                        "XHTFileCheckService whitespace diff warning, failing!\n" + sw.toString());
+                logger.checkFail(msg, id);
+                return Logger.FAIL_RESULT;
+            }
+        }
+        // Otherwise we were completely equal, so pass
+        else
+        {
+            pw.println("XHTFileCheckService files were equal");
+            pw.flush();
+            // For pass case, we *dont* call logFileCheckElem
+            logger.checkPass(msg, id);
+            return Logger.PASS_RESULT;
+        }
+    }
+
+    /**
+     * Logs a custom element about the current check() call.  
+     * <pre>
+     * <fileCheck level="40"
+     * reference="tests\conf-gold\match\match16.out"
+     * reportedBy="XHTFileCheckService"
+     * actual="results-alltest\dom\match\match16.out"
+     * >
+     * StylesheetTestlet match16.xsl(null) 
+     * XHTFileCheckService threw: java.io.IOException: The process cannot access the file because it is being used by another process
+     * java.io.IOException: The process cannot access the file because it is being used by another process
+     * 	at java.io.Win32FileSystem.canonicalize(Native Method)
+     *     etc...
+     * XHTFileCheckService files were not equal
+     * 
+     * </fileCheck>
+     * </pre>     
+     * @param logger to dump any output messages to
+     * @param name of actual (current) File to check
+     * @param name of reference (gold, or expected) File to check against
+     * @param msg comment to log out with this test point
+     * @param id to log out with this test point
+     * @param additional log info from PrintWriter/StringWriter
+     */
+    protected void logFileCheckElem(Logger logger, 
+            String actualFile, String referenceFile,
+            String msg, String id, String logs)
+    {
+        Hashtable attrs = new Hashtable();
+        attrs.put("actual", actualFile);
+        attrs.put("reference", referenceFile);
+        attrs.put("reportedBy", "XHTFileCheckService");
+        try
+        {
+            attrs.put("baseref", System.getProperty("user.dir"));
+        } 
+        catch (Exception e) { /* no-op, ignore */ }
+        String elementBody = msg + "(" + id + ") \n" + logs;
+        // HACK: escapeString(elementBody) so that it's legal XML
+        //  for cases where we have XML output.  This isn't 
+        //  necessarily a 'hack', I'm just not sure what the 
+        //  cleanest place to put this is (here or some sort 
+        //  of intelligent logic in XMLFileLogger)
+        elementBody = XMLFileLogger.escapeString(elementBody);
+		logger.logElement(Logger.STATUSMSG, "fileCheck", attrs, elementBody);
+    }
+
+    /**
+     * Compare two objects for equivalence, and return appropriate result.
+     *
+     * @see #check(Logger logger, Object actual, Object reference, String msg, String id)
+     * @param logger to dump any output messages to
+     * @param actual (current) File to check
+     * @param reference (gold, or expected) File to check against
+     * @param description of what you're checking
+     * @param msg comment to log out with this test point
+     * @return Logger.*_RESULT code denoting status; each method may 
+     * define it's own meanings for pass, fail, ambiguous, etc.
+     */
+    public int check(Logger logger, Object actual, Object reference,
+                     String msg)
+    {
+        return check(logger, actual, reference, msg, null);
+    }
+
+    /** 
+     * Prefix to all attrs we understand.  
+     * Note: design-wise, it would be better to have these constants 
+     * in the XHTComparator class, since we know we're tightly bound 
+     * to them anyways, and they shouldn't really be bound to us.
+     * But for my current purposes, it's simpler to put them here 
+     * for documentation purposes.
+     */
+    public static final String URN_XHTFILECHECKSERVICE = "urn:XHTFileCheckService:";
+
+    /** Whether whitespace differences will cause a fail or not.  */
+    public static final String ALLOW_WHITESPACE_DIFF = URN_XHTFILECHECKSERVICE + "allowWhitespaceDiff";
+
+    /** If we should call parser.setValidating().  */
+    public static final String SETVALIDATING = URN_XHTFILECHECKSERVICE + "setValidating";
+
+    /** If we should call parser.setIgnoringElementContentWhitespace().  */
+    public static final String SETIGNORINGELEMENTCONTENTWHITESPACE = URN_XHTFILECHECKSERVICE + "setIgnoringElementContentWhitespace";
+
+    /** If we should call parser.setExpandEntityReferences().  */
+    public static final String SETEXPANDENTITYREFERENCES = URN_XHTFILECHECKSERVICE + "setExpandEntityReferences";
+
+    /** If we should call parser.setIgnoringComments().  */
+    public static final String SETIGNORINGCOMMENTS = URN_XHTFILECHECKSERVICE + "setIgnoringComments";
+
+    /** If we should call parser.setCoalescing().  */
+    public static final String SETCOALESCING = URN_XHTFILECHECKSERVICE + "setCoalescing";
+
+    /**
+     * Whether whitespace differences will cause a fail or not.  
+     * setAttribute("allow-whitespace-diff", true|false)
+     * true=whitespace-only diff will pass;
+     * false, whitespace-only diff will fail
+     */
+    protected boolean allowWhitespaceDiff = false;  // default; backwards compatible
+
+    /**
+     * Properties/Hash of parser-like attributes that have been set.  
+     */
+    protected Properties attributes = null;
+
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * Supports basic JAXP DocumentBuilder attributes, plus our own 
+     * ALLOW_WHITESPACE_DIFF attribute.
+     * 
+     * @param name The name of the attribute.
+     * @param value The value of the attribute.
+     * @throws IllegalArgumentException thrown if the underlying
+     * implementation doesn't recognize the attribute and wants to 
+     * inform the user of this fact.
+     */
+    public void setAttribute(String name, Object value)
+        throws IllegalArgumentException
+    {
+        // Check for our own attributes first
+        if (ALLOW_WHITESPACE_DIFF.equals(name))
+        {
+            try
+            {
+                allowWhitespaceDiff = (new Boolean((String)value)).booleanValue();
+            } 
+            catch (Throwable t)
+            {
+                // If it's an illegal value or type, ignore it
+            }
+        }
+        else
+        {
+            if (null == attributes)
+            {
+                attributes = new Properties();
+            }
+            attributes.put(name, value);
+        }
+    }
+
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * This method should attempt to set any applicable attributes 
+     * found in the given attrs onto itself, and will ignore any and 
+     * all attributes it does not recognize.  It should never 
+     * throw exceptions.  This method will overwrite any previous 
+     * attributes that were set.
+     * This method will only set values that are Strings findable 
+     * by the Properties.getProperty() method.
+     * 
+     * Future Work: this could be optimized by simply setting our 
+     * Properties block to default from the passed-in one, but for 
+     * now instead it only copies over the explicit values that 
+     * we think are applicable.
+     * 
+     * @param attrs Props of various name, value attrs.
+     */
+    public void applyAttributes(Properties attrs)
+    {
+        attributes = null;
+        for (Enumeration names = attrs.propertyNames();
+                names.hasMoreElements(); /* no increment portion */ )
+        {
+            String key = (String)names.nextElement();
+            if (key.startsWith(URN_XHTFILECHECKSERVICE))
+            {
+                setAttribute(key, attrs.getProperty(key));
+            }
+        }
+    }
+
+    /**
+     * Allows the user to retrieve specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     *
+     * See applyAttributes for some limitations.
+     *
+     * @param name The name of the attribute.
+     * @return value of supported attributes or null if not recognized.
+     * @throws IllegalArgumentException thrown if the underlying
+     * implementation doesn't recognize the attribute and wants to 
+     * inform the user of this fact.
+     */
+    public Object getAttribute(String name)
+        throws IllegalArgumentException
+    {
+        // Check for our own attributes first
+        if (ALLOW_WHITESPACE_DIFF.equals(name))
+        {
+            return new Boolean(allowWhitespaceDiff);
+        }
+        else if (null != attributes)
+        {
+            return attributes.get(name);
+        }
+        else
+            return null;
+    }
+
+    /**
+     * Description of what this testing utility does.  
+     * 
+     * @return String description of extension
+     */
+    public String getDescription()
+    {
+        return ("Uses an XML/HTML/Text diff comparator to check or diff two files.");
+    }
+
+    /**
+     * Gets extended information about the last check call.
+     * This info is filled in for every call to check() with brief
+     * descriptions of what happened; will return 
+     * <code>XHTFileCheckService-no-info-available</code> if 
+     * check() has never been called.
+     * @return String describing any additional info about the 
+     * last two files that were checked
+     */
+    public String getExtendedInfo()
+    {
+
+        if (sw != null)
+            return sw.toString();
+        else
+            return "XHTFileCheckService-no-info-available";
+    }
+
+    /**
+     * Main method to run test from the command line - can be left alone.  
+     * @param args command line argument array
+     */
+    public  static void main(String[] args)
+    {
+		if (args.length < 2)
+		{
+			System.out.println("	Please provide two files to compare");
+		}
+		else
+		{
+			ConsoleLogger log = new ConsoleLogger();
+			XHTFileCheckService app = new XHTFileCheckService();
+			System.out.println("\nThank you for using XHTFileCheckService");
+			System.out.println( app.getDescription() );
+			System.out.println("We hope your results are satisfactory");
+			System.out.println("\n" + args[0] + "  " + args[1]);
+
+			File fAct = new File(args[0]);
+			File fExp = new File(args[1]);
+		
+			try
+			{
+				app.check(log, fAct, fExp, "Check");
+			}
+			catch (Exception e) 
+			{ 
+			   System.out.println ("main() caught unexpected Exception"); 
+			}
+		}
+    }
+}  // end of class XHTFileCheckService
+
diff --git a/test/java/src/org/apache/qetest/xsl/XHTFileCheckServiceXSLTC.java b/test/java/src/org/apache/qetest/xsl/XHTFileCheckServiceXSLTC.java
new file mode 100644
index 0000000..d1579f3
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XHTFileCheckServiceXSLTC.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * XHTFileCheckServiceXSLTC.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+
+
+/**
+ * Uses XSLTC's XML/HTML/Text diff comparator to check or diff two files.
+ * @see #check(Logger logger, Object actual, Object reference, String msg, String id)
+ * @author Shane_Curcuru@lotus.com
+ * @author Santiago.PericasGeertsen@sun.com
+ * @version $Id$
+ */
+public class XHTFileCheckServiceXSLTC extends XHTFileCheckService
+{
+    public  XHTFileCheckServiceXSLTC()
+    {
+	comparator = new XHTComparatorXSLTC();
+    }
+}
+
diff --git a/test/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.java b/test/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.java
new file mode 100644
index 0000000..8f4d968
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.java
@@ -0,0 +1,84 @@
+package org.apache.qetest.xsl;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+import java.io.File;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+
+/*
+   This ant task checks, whether ant target "api"'s result 
+   is pass or fail, by inspecting content within test results 
+   XML documents.
+
+   @author <a href="mailto:mukulg@apache.org">Mukul Gandhi</a>
+*/
+public class XSLApiTestsResultTask extends Task {
+    
+    private String resultDir;
+
+    private String fileNamePrefix;    
+
+    private static final String PASS = "Pass";
+
+    // method to run this, ant build task
+    public void execute() throws BuildException {
+        File dirObj = new File(this.resultDir);
+        File[] fileList = dirObj.listFiles();
+        for (int idx = 0; idx < fileList.length; idx++) {
+           String fileName = fileList[idx].getName();
+           if (fileName.startsWith(this.fileNamePrefix)) {
+               String testResultFilePassStatus  = getTestResultFilePassStatus(
+                                          fileList[idx].getAbsolutePath());
+               if (!PASS.equals(testResultFilePassStatus)) {
+                  String[] dirNameParts = (this.resultDir).split("/"); 
+                  String errorContextFileName = dirNameParts[dirNameParts.length - 1] + "/" + fileName;
+                  throw new BuildException("One or more tests in an 'api' target failed. Test failure was found, " + 
+                                           "while inspecting the file " + errorContextFileName + ". Please fix any api tests " + 
+                                           "problems before checking in!", location);
+               }
+           } 
+        }
+    }
+
+    public void setResultDir(String resultDir) {
+        this.resultDir = resultDir;
+    }
+
+    public void setFileNamePrefix(String fileNamePrefix) {
+        this.fileNamePrefix = fileNamePrefix;
+    }
+
+    /*
+       Read the test pass status value, within test result's XML document.
+    */
+    private String getTestResultFilePassStatus(String testResultFilePath) {
+       String resultStr = "";
+       
+       try {	   
+            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
+            Document xmlDocument = docBuilder.parse(testResultFilePath);
+            XPath xPath = XPathFactory.newInstance().newXPath();
+            String xpathExprStr = "/teststatus";
+            String xpathNodeValue = (String)((xPath.compile(xpathExprStr)).
+                                                    evaluate(xmlDocument, 
+                                                            XPathConstants.STRING));
+            resultStr = xpathNodeValue.trim();
+       }
+       catch (Exception ex) {
+          String[] filePathParts = testResultFilePath.split("/");
+          throw new BuildException("Exception occured, processing api test result XML document " + filePathParts[filePathParts.length - 1], location);
+       }
+
+       return resultStr;
+	}
+
+}
diff --git a/test/java/src/org/apache/qetest/xsl/XSLProcessorTestBase.java b/test/java/src/org/apache/qetest/xsl/XSLProcessorTestBase.java
new file mode 100644
index 0000000..6c0aef2
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XSLProcessorTestBase.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * XSLProcessorTestBase.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import org.apache.qetest.FileBasedTest;
+
+
+/**
+ * Base class for all Xalan tests (TO BE SUPERCEDED SOON!).
+ * <p>XSLProcessorTestBase will soon be replaced by functionality 
+ * in FileBasedTest and/or in StylesheetTestletDriver, depending 
+ * in the kind of test it is.</p>
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class XSLProcessorTestBase extends FileBasedTest
+{
+    /* no-op: class to be removed */
+
+}  // end of class XSLProcessorTestBase
+
diff --git a/test/java/src/org/apache/qetest/xsl/XSLTestAntTask.java b/test/java/src/org/apache/qetest/xsl/XSLTestAntTask.java
new file mode 100644
index 0000000..8608d7f
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XSLTestAntTask.java
@@ -0,0 +1,755 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xsl;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.QetestUtils;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.Environment;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.ExecuteJava;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.taskdefs.PumpStreamHandler;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.Vector;
+
+/**
+ * Execute an instance of an org.apache.qetest.xsl.XSLProcessorTestBase.
+ *
+ * Cheap-o (for now) way to run qetest or Xalan tests directly
+ * from an Ant build file.  Current usage:
+ * <code>
+ * &lt;taskdef name="QetestTask" classname="org.apache.qetest.xsl.XSLTestAntTask"/>
+ *  &lt;target name="test">
+ *      &lt;QetestTask
+ *          test="Minitest"
+ *          loggingLevel="50"
+ *          consoleLoggingLevel="40"
+ *          inputDir="../tests/api"
+ *          goldDir="../tests/api-gold"
+ *          outputDir="../tests/minitest"
+ *          logFile="../tests/minitest/log.xml"
+ *          flavor="trax"
+ *       />
+ * </code>
+ * To be improved: I'd like to basically convert XSLTestHarness
+ * into an Ant task, so you can run multiple tests at once.
+ * Other obvious improvements include an AntLogger implementation
+ * of Logger and better integration with the Project and
+ * the various ways build scripts use properties.
+ * Also, various properties should really have default values.
+ *
+ * Blatantly ripped off from org.apache.tools.ant.taskdefs.Java Ant 1.3
+ *
+ * @author <a href="mailto:shane_curcuru@lotus.com">Shane Curcuru</a>
+ * @author Stefano Mazzocchi <a href="mailto:stefano@apache.org">stefano@apache.org</a>
+ * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @version $Id$
+ */
+public class XSLTestAntTask extends Task
+{
+
+    /** Representation of command line to run for our test.  */
+    protected CommandlineJava commandLineJava = new CommandlineJava();
+
+    /** If we should fork another JVM to execute the test.  */
+    protected boolean fork = false;
+
+    /** If forking, current dir to set new JVM in.  */
+    protected File dir = null;
+
+    /** Alternate Ant output file to use.  */
+    protected File out;
+
+    /** 
+     * If Ant errors/problems should throw a BuildException.  
+     * Note: This does not fail if the test fails, only on a 
+     * serious error or problem running the test.
+     */
+    protected boolean failOnError = false;
+
+    /** Normal constants for testType: API tests.  */
+    public static final String TESTTYPE_API = "api.";
+
+    /** Normal constants for testType: API tests.  */
+    public static final String TESTTYPE_CONF = "conf.";
+
+    /** Normal constants for testType: API tests.  */
+    public static final String TESTTYPE_PERF = "perf.";
+
+    /** Normal constants for testType: API tests.  */
+    public static final String TESTTYPE_CONTRIB = "contrib.";
+
+    /** 
+     * Type of test we're executing.
+     * Used by passThruProps to determine which kind of prefixed 
+     * properties from the Ant file to pass thru to the test.
+     * Normally one of api|conf|perf|contrib, etc.
+     */
+    protected String testType = TESTTYPE_API;
+
+    /** 
+     * Name of the class to execute as the test.  
+     */
+    protected String testClass = null;
+
+    /** 
+     * Cheap-o way to pass properties to the underlying test.  
+     * This task simply writes out needed properties to this file, 
+     * then tells the test to -load them when executing.
+     */
+    protected String passThruProps = "XSLTestAntTask.properties";
+
+    //-----------------------------------------------------
+    //-------- Implementations for test-related parameters --------
+    //-----------------------------------------------------
+
+    /**
+     * Test parameter: Set the type of this test.
+     *
+     * @param ll loggingLevel passed to test for all
+     * non-console output; 0=very little output, 99=lots
+     * @see org.apache.qetest.Reporter#setLoggingLevel(int)
+     */
+    public void setTestType(String type)
+    {
+        log("setTestType(" + type + ")", Project.MSG_VERBOSE);
+        testType = type;
+    }
+
+
+    /**
+     * Test parameter: Name of test class to execute.
+     *
+     * Replacement for Java's setClassname property; accepts the
+     * name of a specific Test subclass.  Note that we use
+     * {@link org.apache.qetest.QetestUtils.testClassForName(String, String[], String) QetestUtils.testClassForName}
+     * to actually get the FQCN of the class to run; this allows
+     * users to just specify the name of the class itself
+     * (e.g. SystemIdTest) and have it work properly.
+     * We search a number of default packages in order if needed: 
+     * as seen in QetestUtils.testClassForName().
+     * Note! Due to Ant's interesting handling of classpaths, we 
+     * cannot actually resolve the testname here - we simply store 
+     * the string, and then let QetestUtils resolve it later 
+     * when we're actually executing.  That's because any classpaths 
+     * that were set in the build.xml file aren't valid here, when 
+     * the task is setting properties - they're only valid when the 
+     * task actually executes later on.
+     *
+     * @param testClassname FQCN or just bare classname
+     * of test to run
+     */
+    public void setTest(String testClassname)
+    {
+        log("setTest(" + testClassname + ")", Project.MSG_VERBOSE);
+        testClass = testClassname;
+
+        // Force the actual class being executed to be a 'launcher' class
+        commandLineJava.setClassname("org.apache.qetest.QetestUtils");
+        // Note this needs to be the first argument in the line,
+        //  thus this should be the first property set
+        //@todo fix this so users can actually use other properties 
+        //  first without the ordering problem
+        commandLineJava.createArgument().setLine(testClass);
+    }
+
+
+    /**
+     * Test parameter: Set the loggingLevel used in this test.
+     * //@todo deprecate: should use passThruProps instead
+     *
+     * @param ll loggingLevel passed to test for all
+     * non-console output; 0=very little output, 99=lots
+     * @see org.apache.qetest.Reporter#setLoggingLevel(int)
+     */
+    public void setLoggingLevel(int ll)
+    {
+
+        // Is this really the simplest way to stuff data into 
+        //  objects in the 'proper Ant way'?
+        commandLineJava.createArgument().setLine("-"
+                                                 + Logger.OPT_LOGGINGLEVEL
+                                                 + " "
+                                                 + Integer.toString(ll));
+    }
+
+
+    /**
+     * Test parameter: Set the consoleLoggingLevel used in this test.
+     * //@todo deprecate: should use passThruProps instead
+     *
+     * @param ll loggingLevel used just for console output; here,
+     * the default log going to Ant's console
+     * @see org.apache.qetest.ConsoleLogger
+     */
+    public void setConsoleLoggingLevel(int ll)
+    {
+        commandLineJava.createArgument().setLine(
+            "-ConsoleLogger.loggingLevel " + Integer.toString(ll));
+    }
+
+
+    /**
+     * Test parameter: inputDir, root of input files tree (required).
+     * //@todo deprecate: should use passThruProps instead
+     *
+     * //@todo this should have a default, since without a valid
+     * value most tests will just return an error
+     * @param d Path to look for input files in: should be the
+     * root of the applicable tests/api, tests/conf, etc. tree
+     * @see org.apache.qetest.FileBasedTest#OPT_INPUTDIR
+     */
+    public void setInputDir(Path d)
+    {
+
+        commandLineJava.createArgument().setValue(
+            "-" + FileBasedTest.OPT_INPUTDIR);
+        commandLineJava.createArgument().setPath(d);
+    }
+
+
+    /**
+     * Test parameter: outputDir, dir to put outputs in.
+     * //@todo deprecate: should use passThruProps instead
+     * @param d where the test will put it's output files
+     * @see org.apache.qetest.FileBasedTest#OPT_OUTPUTDIR
+     */
+    public void setOutputDir(Path d)
+    {
+
+        commandLineJava.createArgument().setValue(
+            "-" + FileBasedTest.OPT_OUTPUTDIR);
+        commandLineJava.createArgument().setPath(d);
+    }
+
+
+    /**
+     * Test parameter: goldDir, root of gold files tree.
+     * //@todo deprecate: should use passThruProps instead
+     * @param d Path to look for gold files in: should be the
+     * root of the applicable tests/api-gold, tests/conf-gold, etc. tree
+     * @see org.apache.qetest.FileBasedTest#OPT_GOLDDIR
+     */
+    public void setGoldDir(Path d)
+    {
+
+        commandLineJava.createArgument().setValue(
+            "-" + FileBasedTest.OPT_GOLDDIR);
+        commandLineJava.createArgument().setPath(d);
+    }
+
+
+    /**
+     * Test parameter: logFile, where to put XMLFileLogger output.
+     * //@todo deprecate: should use passThruProps instead
+     * @param f File(name) to send our 'official' results to via
+     * an {@link org.apache.qetest.XMLFileLogger XMLFileLogger}
+     */
+    public void setLogFile(File f)
+    {
+        commandLineJava.createArgument().setValue("-" + Logger.OPT_LOGFILE);
+        commandLineJava.createArgument().setFile(f);  // Check if this is what the test is expecting
+    }
+
+    
+    /** 
+     * Default prefix of Ant properties to passThru to the test.  
+     * Note that testType is also a dynamic prefix that's also used.
+     */
+    public static final String ANT_PASSTHRU_PREFIX = "qetest.";
+    
+    
+    /**
+     * Worker method to write out properties file for test.  
+     * Simply translates any properties in your Ant build file that 
+     * begin with the prefix, and puts them in a Properties block.
+     * This block is then written out to disk, so that the test can 
+     * later read them in via -load.
+     * //@todo NEEDS IMPROVEMENT: make more robust; check for write 
+     * access to local dir; support dir-switching attribute 
+     * when forking from Ant task; etc.
+     * @param altPrefix alternate prefix of Ant properties to also 
+     * pass thru in addition to ANT_PASSTHRU_PREFIX; these will 
+     * override any of the default prefix ones
+     */
+    protected void writePassThruProps(String altPrefix)
+    {
+        Hashtable antProps = this.getProject().getProperties();
+
+        Properties passThru = new Properties();
+        // Passthru any of the default prefixed properties..
+        for (Enumeration keys = antProps.keys();
+                keys.hasMoreElements(); 
+                /* no increment portion */ )
+        {
+            String key = keys.nextElement().toString();
+            if (key.startsWith(ANT_PASSTHRU_PREFIX))
+            {
+                // Move any of these properties into the test; 
+                //  rip off the prefix first
+                passThru.put(key.substring(ANT_PASSTHRU_PREFIX.length()), antProps.get(key));
+            }
+        }
+        //.. Then also passthru any alternate prefix properties
+        //  this ensures alternate prefixes will overwrite default ones
+        for (Enumeration keys = antProps.keys();
+                keys.hasMoreElements(); 
+                /* no increment portion */ )
+        {
+            String key = keys.nextElement().toString();
+            if (key.startsWith(altPrefix))
+            {
+                // Also move alternate prefixed properties too
+                passThru.put(key.substring(altPrefix.length()), antProps.get(key));
+            }
+        }
+        // Make sure to write to the basedir of the project!
+        File baseDir = this.getProject().getBaseDir();
+        String propFileName = baseDir.getPath() + File.separator + passThruProps;
+        log("writePassThruProps attempting to write to " + propFileName, Project.MSG_VERBOSE);
+        try
+        {
+            // If we can write the props out to disk...
+            passThru.save(new FileOutputStream(propFileName), 
+                    "XSLTestAntTask.writePassThruProps() generated for use by test " + testClass);
+            
+            // ... then also force -load of this file into test's command line
+            commandLineJava.createArgument().setLine("-load " + passThruProps);
+        }
+        catch (IOException ioe)
+        {
+            throw new BuildException("writePassThruProps could not write to " + propFileName + ", threw: "
+                                     + ioe.toString(), location);
+        }
+    }
+
+
+    //-----------------------------------------------------
+    //-------- Implementations from Java task --------
+    //-----------------------------------------------------
+
+    /**
+     * Execute this task.
+     *
+     * Basically just calls the
+     * {@link #executeJava() executeJava() worker method} to do
+     * all the work of executing the task.  Then checks the
+     * failOnError member to see if we should throw an exception.
+     *
+     * @throws BuildException
+     */
+    public void execute() throws BuildException
+    {
+        // Log out our version info: useful for debugging, since 
+        //  the wrong version of this class can easily get loaded
+        log("XSLTestAntTask: $Id$", Project.MSG_VERBOSE);
+
+        // Call worker method to create and write prop file
+        // This passes thru both default 'qetest.' properties as 
+        //  well as properties associated with testType
+        writePassThruProps(testType);
+        
+        int err = -1;
+
+        if ((err = executeJava()) != 0)
+        {
+            if (failOnError)
+            {
+                throw new BuildException("XSLTestAntTask execution returned: "
+                                         + err, location);
+            }
+            else
+            {
+                log("XSLTestAntTask Result: " + err, Project.MSG_ERR);
+            }
+        }
+    }
+
+
+    /**
+     * Worker method to do the execution and return a return code.
+     *
+     * @return the return code from the execute java class if it
+     * was executed in a separate VM (fork = "yes").
+     *
+     * @throws BuildException
+     */
+    public int executeJava() throws BuildException
+    {
+
+        String classname = commandLineJava.getClassname();
+
+
+        if (classname == null)
+        {
+            throw new BuildException("Classname must not be null.");
+        }
+
+        if (fork)
+        {
+            log("Forking " + commandLineJava.toString(), Project.MSG_VERBOSE);
+
+            return run(commandLineJava.getCommandline());
+        }
+        else
+        {
+            if (commandLineJava.getVmCommand().size() > 1)
+            {
+                log("JVM args ignored when same JVM is used.",
+                    Project.MSG_WARN);
+            }
+
+            if (dir != null)
+            {
+                log("Working directory ignored when same JVM is used.",
+                    Project.MSG_WARN);
+            }
+
+            log("Running in same VM "
+                + commandLineJava.getJavaCommand().toString(), Project.MSG_VERBOSE);
+            run(commandLineJava);
+
+            return 0;
+        }
+    }
+
+
+    /**
+     * Set the classpath to be used for this test.
+     *
+     * @param s classpath used for running the test
+     */
+    public void setClasspath(Path s)
+    {
+        createClasspath().append(s);
+    }
+
+
+    /**
+     * Creates a nested classpath element
+     *
+     * @return classpath element to set for this test
+     */
+    public Path createClasspath()
+    {
+        return commandLineJava.createClasspath(project).createPath();
+    }
+
+
+    /**
+     * Adds a reference to a CLASSPATH defined elsewhere.
+     *
+     * @param r reference to the CLASSPATH
+     */
+    public void setClasspathRef(Reference r)
+    {
+        createClasspath().setRefid(r);
+    }
+
+
+    /**
+     * Creates a nested arg element.
+     *
+     * @return Argument to send to our test
+     */
+    public Commandline.Argument createArg()
+    {
+        return commandLineJava.createArgument();
+    }
+
+
+    /**
+     * Set the forking flag.
+     *
+     * @param s true if we should fork; false otherwise
+     */
+    public void setFork(boolean s)
+    {
+        this.fork = s;
+    }
+
+
+    /**
+     * Creates a nested jvmarg element.
+     *
+     * @return Argument to send to our JVM if forking
+     */
+    public Commandline.Argument createJvmarg()
+    {
+        return commandLineJava.createVmArgument();
+    }
+
+
+    /**
+     * Set the command used to start the VM (only if fork==false).
+     *
+     * @param s vm command used
+     */
+    public void setJvm(String s)
+    {
+        commandLineJava.setVm(s);
+    }
+
+
+    /**
+     * Add a nested sysproperty element.
+     *
+     * @param sysp to send to our test/JVM
+     */
+    public void addSysproperty(Environment.Variable sysp)
+    {
+        commandLineJava.addSysproperty(sysp);
+    }
+
+
+    /**
+     * Throw a BuildException if process returns non 0.
+     *
+     * @param fail if we should fail on serious errors
+     */
+    public void setFailonerror(boolean fail)
+    {
+        failOnError = fail;
+    }
+
+
+    /**
+     * The working directory of the process, if forked.
+     *
+     * @param d current directory for test, if forked
+     */
+    public void setDir(File d)
+    {
+        this.dir = d;
+    }
+
+
+    /**
+     * File the output of the process is redirected to.
+     *
+     * @param out output file for Ant output (not just test output)
+     */
+    public void setOutput(File out)
+    {
+        this.out = out;
+    }
+
+
+    /**
+     * -mx or -Xmx depending on VM version
+     *
+     * @param max max Java memory to use for test execution
+     */
+    public void setMaxmemory(String max)
+    {
+
+        if (Project.getJavaVersion().startsWith("1.1"))
+        {
+            createJvmarg().setValue("-mx" + max);
+        }
+        else
+        {
+            createJvmarg().setValue("-Xmx" + max);
+        }
+    }
+
+
+    /**
+     * Executes the given classname with the given arguments as if
+     * it was a command line application.
+     * Explicitly adds test-specific args from our members.
+     *
+     * @param command object to execute
+     *
+     * @throws BuildException thrown if IOException thrown internally
+     */
+    private void run(CommandlineJava command) throws BuildException
+    {
+
+        ExecuteJava exe = new ExecuteJava();
+
+
+        exe.setJavaCommand(command.getJavaCommand());
+        exe.setClasspath(command.getClasspath());
+        exe.setSystemProperties(command.getSystemProperties());
+
+        if (out != null)
+        {
+            try
+            {
+                exe.setOutput(new PrintStream(new FileOutputStream(out)));
+            }
+            catch (IOException io)
+            {
+                throw new BuildException(io, location);
+            }
+        }
+
+        exe.execute(project);
+    }
+
+
+    /**
+     * Executes the given classname with the given arguments in a separate VM.
+     *
+     * @param command line args to execute
+     *
+     * @return status from VM execution
+     *
+     * @throws BuildException thrown if IOException thrown internally
+     */
+    private int run(String[] command) throws BuildException
+    {
+
+        FileOutputStream fos = null;
+
+
+        try
+        {
+            Execute exe = null;
+
+
+            if (out == null)
+            {
+                exe = new Execute(
+                    new LogStreamHandler(
+                    this, Project.MSG_INFO, Project.MSG_WARN), null);
+            }
+            else
+            {
+                fos = new FileOutputStream(out);
+                exe = new Execute(new PumpStreamHandler(fos), null);
+            }
+
+            exe.setAntRun(project);
+
+            if (dir == null)
+            {
+                dir = project.getBaseDir();
+            }
+            else if (!dir.exists() ||!dir.isDirectory())
+            {
+                throw new BuildException(
+                    dir.getAbsolutePath() + " is not a valid directory",
+                    location);
+            }
+
+            exe.setWorkingDirectory(dir);
+            exe.setCommandline(command);
+
+            try
+            {
+                return exe.execute();
+            }
+            catch (IOException e)
+            {
+                throw new BuildException(e, location);
+            }
+        }
+        catch (IOException io)
+        {
+            throw new BuildException(io, location);
+        }
+        finally
+        {
+            if (fos != null)
+            {
+                try
+                {
+                    fos.close();
+                }
+                catch (IOException io){}
+            }
+        }
+    }
+
+
+    /**
+     * Executes the given classname with the given arguments as if it
+     * was a command line application.
+     *
+     * @param classname of Java class to execute
+     * @param args for Java class
+     *
+     * @throws BuildException not thrown
+     */
+    protected void run(String classname, Vector args) throws BuildException
+    {
+
+        CommandlineJava cmdj = new CommandlineJava();
+
+
+        cmdj.setClassname(classname);
+
+        for (int i = 0; i < args.size(); i++)
+        {
+            cmdj.createArgument().setValue((String) args.elementAt(i));
+        }
+
+        run(cmdj);
+    }
+
+
+    /**
+     * Clear out the arguments to this java task.
+     */
+    public void clearArgs()
+    {
+        commandLineJava.clearJavaArgs();
+    }
+    
+   /**
+     * Set the bootclasspathref to be used for this test.
+     *
+     * @param s bootclasspathref used for running the test
+     */
+    public void setBootclasspathref(Reference r)
+    {
+        // This is a hack.
+        // On JDK 1.4.x or later we need to override bootclasspath
+        // the Xalan/Xerces in rt.jar.
+        String jdkRelease =
+                   System.getProperty("java.version", "0.0").substring(0,3);
+        if (!jdkRelease.equals("1.1")
+                && !jdkRelease.equals("1.2")
+                && !jdkRelease.equals("1.3")) {
+            Path p = (Path)r.getReferencedObject(this.getProject());
+            log("Bootclasspath: " + p);
+            createJvmarg().setValue("-Xbootclasspath/p:" + p);
+        }
+    }    
+}
diff --git a/test/java/src/org/apache/qetest/xsl/XSLTestHarness.java b/test/java/src/org/apache/qetest/xsl/XSLTestHarness.java
new file mode 100644
index 0000000..d11990a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XSLTestHarness.java
@@ -0,0 +1,688 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * XSLTestHarness.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.Set;
+import java.util.Iterator;
+
+import org.apache.qetest.FileBasedTest;
+import org.apache.qetest.Logger;
+import org.apache.qetest.QetestUtils;
+import org.apache.qetest.Reporter;
+
+//-------------------------------------------------------------------------
+
+/**
+ * Utility to run multiple FileBasedTest objects in a row.  
+ * <p>Generally run from the command line and passed a list 
+ * of tests to execute, the XSLTestHarness will run each test in 
+ * order, saving the results of each test for reporting later.</p>
+ * <p>User must have supplied minimal legal properties in the input 
+ * Properties file: outputDir, inputDir, logFile, and tests.</p>
+ * @todo update to accept per-test.properties and pass'em thru
+ * @todo update to check for similarly named tests (in different pkgs)
+ * @todo update TestReporter et al to better cover case when 
+ *        user doesn't call testCaseClose (where do results go?)
+ * @todo report on memory usage, etc.
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class XSLTestHarness
+{
+
+/**
+ * Convenience method to print out usage information.
+ * @return String denoting usage suitable for printing
+ */
+    public String usage()
+    {
+        FileBasedTest tmp = new FileBasedTest();
+        return ("XSLTestHarness - execute multiple Tests in sequence and log results:\n"
+                + "    Usage: java XSLTestHarness [-load] properties.prop\n"
+                + "    Reads in all options from a Properties file:\n"
+                + "    " + OPT_TESTS + "=semicolon;delimited;list;of FQCNs tests to run\n"
+                + "    Most other options (in prop file only) are identical to FileBasedTest:\n"
+                + tmp.usage()
+                );
+    }
+
+    /** 
+     * Various property names we're expecting.  
+     * <ul>
+     * <li>tests=TestOne;TestTwo;TestThree - semicolon-delimited list of 
+     * TestClassNames to execute, in order; assumes all are in the 
+     * org.apache.qetest. as base package currently (subject to change)</li>
+     * <li>logFile=LogFileName - name of output XML file to store harness 
+     * log data in (passed to Reporter; constant in FileBasedTest.java)</li>
+     * <li>inputDir=path\\to\\tests - where the tests should find data</li>
+     * <li>outputDir=path\\to\\output - where the tests should send output and results</li>
+     * <li>goldDir=path\\to\\golds - where the tests should find gold files</li>
+     * <li>loggingLevel=50 - how much output tests should produce</li>
+     * <li>resultsViewer=Filename.xsl - reference to results processing stylesheet file</li>
+     * <li>Any other options are passed as-is to individual tests</li>
+     * </ul>
+     * <p>Currently each test has it's own logFile in the outputDir, 
+     * named after the test.</p>
+     */
+
+    /**
+     * Parameter: semicolong delimited list of FQCN's of test names.
+     * <p>Default: none - this parameter is required.  If the name 
+     * is not package-complete, the harness may attempt to 'guess'
+     * the correct package underneath org.apache.qetest.</p>
+     */
+    public static final String OPT_TESTS = "tests";
+
+    /** Delimiter for OPT_TESTS.  */
+    public static final String TESTS_DELIMITER = ";";
+
+    /** 
+     * We prepend the default package if any test name does not 
+     * have a '.' in it.  
+     * This is part of our 'guess' at the appropriate packagename.
+     * <b>WARNING!</b> Subject to change!
+     */
+    public static final String DEFAULT_PACKAGE = "org.apache.qetest.";
+
+    /** Separator character for package.ClassName.  */
+    public static final String DOT = ".";
+
+    /** Default extension for logFiles.  */
+    public static final String LOG_EXTENSION = ".xml";
+
+    /**
+     * Generic Properties block for storing initialization info.
+     * All startup options get stored in here for later use, both by
+     * the test itself and by any Reporters we use.
+     */
+    protected Properties harnessProps;
+
+    /** Our Reporter, who we tell all our secrets to.  */
+    protected Reporter reporter;
+
+
+    /**
+     * Setup any options and construct a list of tests to execute.  
+     * <p>Accesses our class variables harnessProps and debug.  
+     * Must not use Reporter, since it hasn't been created yet.</p>
+     * @param args array of command line arguments
+     * @return array of testClassNames to execute; null if error
+     */
+    protected String[] doTestHarnessInit(String args[])
+    {
+        // Harness loads all info from one properties file
+        // semi-HACK: accept and ignore -load as first arg only
+        String propFileName = null;
+        if ("-load".equalsIgnoreCase(args[0]))
+        {
+            propFileName = args[1];
+        }
+        else
+        {
+            propFileName = args[0];
+        }
+        try
+        {
+            // Load named file into our properties block
+            FileInputStream fIS = new FileInputStream(propFileName);
+            harnessProps = new Properties();
+            harnessProps.load(fIS);
+        } 
+        catch (IOException ioe)
+        {
+            System.err.println("ERROR! loading properties file failed: " + propFileName);
+            ioe.printStackTrace();
+            return null;
+        }
+
+        // Grab the list of tests, which is specific only to the harness
+        // String testNames = harnessProps.getProperty(OPT_TESTS);
+        StringBuffer testNamesStrBuff = new StringBuffer();      
+        Set<String> strPropNames = harnessProps.stringPropertyNames();
+        Iterator<String> strPropIter = strPropNames.iterator();
+        while (strPropIter.hasNext()) {
+           String propName = strPropIter.next();
+           if (propName.endsWith(DOT + OPT_TESTS)) {
+              String propValue = harnessProps.getProperty(propName);
+              testNamesStrBuff.append(propValue + TESTS_DELIMITER);
+           }
+        }
+
+        String testNames = testNamesStrBuff.toString();
+        if (testNames.length() > 0) {
+           testNames = testNames.substring(0, testNames.length());
+        } 
+
+        if ((testNames == null) || (testNames.length() == 0))
+        {
+            System.err.println("ERROR! No tests(1) were supplied in the properties file!");
+            return null;
+        }
+
+        // Split up the list of names
+        StringTokenizer st = new StringTokenizer(testNames, TESTS_DELIMITER);
+        int testCount = st.countTokens();
+        if (testCount == 0)
+        {
+            System.err.println("ERROR! No tests(2) were supplied in the properties file!");
+            return null;
+        }
+        String tests[] = new String[testCount];
+        for (int i = 0; st.hasMoreTokens(); i++)
+        {
+            String s = st.nextToken();
+            if (s.startsWith("org"))
+            {   
+                // Assume user specified complete package.ClassName
+                tests[i] = s;
+            }
+            else
+            {
+                // Use QetestUtils to find the correct name.
+                tests[i] = QetestUtils.testClassnameForName(s, QetestUtils.defaultPackages, null);
+            }
+        }
+        // Munge the inputDir and goldDir to use platform path 
+        //  separators if needed
+
+        String tempS = harnessProps.getProperty(FileBasedTest.OPT_INPUTDIR);
+        tempS = swapPathDelimiters(tempS);
+        File tempF = new File(tempS);
+        if (tempF.exists())
+        {
+            harnessProps.put(FileBasedTest.OPT_INPUTDIR, tempS);
+        }
+        else
+        {
+            System.err.println("ERROR! " + FileBasedTest.OPT_INPUTDIR + " property does not exist! " + tempS);
+            return null;
+        }
+        tempS = harnessProps.getProperty(FileBasedTest.OPT_GOLDDIR);
+        tempS = swapPathDelimiters(tempS);
+        tempF = new File(tempS);
+        if (tempF.exists())
+        {
+            harnessProps.put(FileBasedTest.OPT_GOLDDIR, tempS);
+        }
+        else
+        {
+            System.err.println("WARNING! " + FileBasedTest.OPT_GOLDDIR + " property does not exist! " + tempS);
+        }
+
+        // Also swap around path on outputDir, logFile
+        tempS = harnessProps.getProperty(FileBasedTest.OPT_OUTPUTDIR);
+        tempS = swapPathDelimiters(tempS);
+        tempF = new File(tempS);
+        if (tempF.exists())
+        {
+            harnessProps.put(FileBasedTest.OPT_OUTPUTDIR, tempS);
+        }
+        else
+        {
+            System.err.println("WARNING! " + FileBasedTest.OPT_OUTPUTDIR + " property does not exist! " + tempS);
+        }
+
+        tempS = harnessProps.getProperty(Logger.OPT_LOGFILE);
+        tempS = swapPathDelimiters(tempS);
+        harnessProps.put(Logger.OPT_LOGFILE, tempS);
+        return tests;
+    }
+
+    /**
+     * Update a path to use system-dependent delimiter.  
+     *
+     * Allow user to specify a system-dependent path in the 
+     * properties file we're loaded from, but then let another 
+     * user run the same files on another environment.
+     *
+     * I'm drawing a complete blank today on the classic way to 
+     * do this, so don't be disappointed if you look at the code 
+     * and it's goofy.
+     */
+    protected String swapPathDelimiters(String s)
+    {
+        if (null == s)
+            return null;
+        // If we're not on Windows, swap an apparent Windows-based 
+        //  backslash separator with a forward slash separator
+        // This is because I'm lazy and checkin .properties files 
+        //  with Windows based paths, but want unix-based people 
+        //  to be able to run the tests as-is
+        if (File.separatorChar != '\\') 
+            return s.replace('\\', File.separatorChar);
+        else
+            return s;
+    }
+
+    /**
+     * Go run the available tests!  
+     * <p>This is sort-of the equivalent of runTest() in a Test 
+     * object.  Each test is run in order, and is the equivalent 
+     * of a testCase for the Harness.  The Harness records a master 
+     * log file, and each test puts its results in it's own log file.</p>
+     */
+    protected boolean runHarness(String testList[])
+    {
+        // Report that we've begun testing
+        // Note that we're hackishly re-using the 'test' metaphor 
+        //      on a grand scale here, where each of the harness'
+        //      testCases corresponds to one entire Test
+        reporter.testFileInit("Harness", "Harness executing " + testList.length + " tests");
+        logHarnessProps();
+
+        // Note 'passCount' is poorly named: a test may fail but 
+        //  may still return true from runTest. You really have to 
+        //  look at the result files to see real test status
+        int passCount = 0;
+        int nonPassCount = 0;
+        // Run each test in order!
+        for (int testIdx = 0; testIdx < testList.length; testIdx++)
+        {
+            boolean testStat = false;
+            try
+            {
+                // This method logs out status to our log file, as well 
+                //      as initializing and running the test
+                testStat = runOneTest(testList[testIdx], harnessProps);
+            }
+            catch (Throwable t)
+            {
+                // Catch everything, log it, and move on
+                reporter.checkErr("Test " + testList[testIdx] + " threw: " + t.toString());
+                reporter.logThrowable(reporter.ERRORMSG, t, "Test " 
+                                      + testList[testIdx] + " threw: " + t.toString());
+            }
+            finally
+            {
+                if (testStat)
+                    passCount++;
+                else
+                    nonPassCount++;
+            }
+        }
+        // Below line is not a 'check': each runOneTest call logs it's own status
+        // Only for information; remember that the runTest status is not the pass/fail of the test!
+        reporter.logCriticalMsg("All tests complete, testStatOK:" + passCount + " testStatNOTOK:" + nonPassCount);
+
+        // Have the reporter write out a summary file for us
+        reporter.writeResultsStatus(true);
+
+        // Close reporter and return true only if all tests passed
+        // Note the passCount/nonPassCount are misnomers, since they
+        //  really only report if a test aborted, not passed
+        reporter.testFileClose();
+        if ((passCount < 0) && (nonPassCount == 0))
+            return true;
+        else
+            return false;
+    }
+
+
+    /**
+     * Run a single FileBasedTest and report it's results.  
+     * <p>Uses our class field reporter to dump our results to, also 
+     * creates a separate reporter for the test to use.</p>
+     * <p>See the code for the specific initialization we custom-craft for 
+     * each individual test.  Basically we clone our harnessProps, update the 
+     * logFile and outputDir per test, and create a testReporter, then use these 
+     * to initialize the test before we call runTest on it.</p>
+     * @param testName FQCN of the test to execute; must be instanceof FileBasedTest
+     * @param hProps property block to use as initializer
+     * @return the pass/fail return from runTest(), which is not necessarily 
+     *         the same as what we're going to log as the test's result
+     */
+    protected boolean runOneTest(String testName, Properties hProps)
+    {
+        // Report on what we're about to do
+        reporter.testCaseInit("runOneTest:" + testName);
+
+        // Validate our basic arguments
+        if ((testName == null) || (testName.length() == 0) || (hProps == null))
+        {
+            reporter.checkErr("runOneTest called with bad arguments!");
+            reporter.testCaseClose();
+            return false;
+        }
+
+        // Calculate just the ClassName of the test for later use as the logFile name
+        String bareClassName = null;
+        StringTokenizer st = new StringTokenizer(testName, ".");
+        for (bareClassName = st.nextToken(); st.hasMoreTokens(); bareClassName = st.nextToken())
+        { /* empty loop body */
+        }
+        st = null; // no longer needed
+
+        // Validate that the output directory exists for the test to put it's results in
+        String testOutDir = hProps.getProperty(FileBasedTest.OPT_OUTPUTDIR);
+        if ((testOutDir == null) || (testOutDir.length() == 0))
+        {
+            // Default to current dir plus the bareClassName if not set
+            testOutDir = new String("." + File.separator + bareClassName);
+        }
+        else
+        {
+            // Append the bareClassName so different tests don't clobber each other
+            testOutDir += File.separator + bareClassName;
+        }
+        File oDir = new File(testOutDir);
+        if (!oDir.exists())
+        {
+            if (!oDir.mkdirs())
+            {
+                // Report this but keep going anyway
+                reporter.logErrorMsg("Could not create testOutDir: " + testOutDir);
+            }
+        }
+        // no longer needed
+        oDir = null;
+
+        // Validate we can instantiate the test object itself
+        reporter.logTraceMsg("About to newInstance(" + testName + ")");
+        FileBasedTest test = null;
+        try
+        {
+            Class testClass = Class.forName(testName);
+            test = (FileBasedTest)testClass.newInstance();
+        }
+        catch (Exception e1)
+        {
+            reporter.checkErr("Could not create test, threw: " + e1.toString());
+            reporter.logThrowable(reporter.ERRORMSG, e1, "Could not create test, threw");
+            reporter.testCaseClose();
+            return false;
+        }
+
+        // Create a properties block for the test and pre-fill it with custom info
+        //      Start with the harness' properties, and then replace certain values
+        Properties testProps = (Properties)hProps.clone();
+        testProps.put(FileBasedTest.OPT_OUTPUTDIR, testOutDir);
+        testProps.put(Logger.OPT_LOGFILE, testOutDir + LOG_EXTENSION);
+
+        // Disable the ConsoleReporter for the *individual* tests, it's too confusing
+        testProps.put("noDefaultReporter", "true");
+        reporter.logHashtable(reporter.INFOMSG, testProps, "testProps before test creation");
+
+        // Initialize the test with the properties we created
+        test.setProperties(testProps);
+        boolean testInit = test.initializeFromProperties(testProps);
+        reporter.logInfoMsg("Test(" + testName + ").initializeFromProperties() = " + testInit);
+
+        // -----------------
+        // Execute the test!
+        // -----------------
+        boolean runTestStat = test.runTest(testProps);
+
+        // Report where the test stored it's results - future use 
+        //  by multiViewResults.xsl or some other rolledup report
+        // Note we should really handle the filenames here better, 
+        //  especially for relative vs. absolute issues
+        Hashtable h = new Hashtable(2);
+        h.put("result", reporter.resultToString(test.getReporter().getCurrentFileResult()));
+        h.put("fileRef", (String)testProps.get(Logger.OPT_LOGFILE));
+        reporter.logElement(reporter.WARNINGMSG, "resultsfile", h, test.getTestDescription());
+        h = null; // no longer needed
+
+        // Call worker method to actually calculate the result and call check*()        
+        logTestResult(bareClassName, test.getReporter().getCurrentFileResult(), 
+                      runTestStat, test.getAbortTest());
+
+        // Cleanup local variables and garbage collect, in case tests don't
+        //      release all resources or something
+        testProps = null;
+        test = null;
+        logMemory();    // Side effect: System.gc()
+        
+        reporter.testCaseClose();
+        return runTestStat;
+    }
+
+
+    /**
+     * Convenience method to report the result of a single test.  
+     * <p>Depending on the test's return value, it's currentFileResult, 
+     * and if it was ever aborted, we call check to our reporter to log it.</p>
+     * @param testName basic name of the test
+     * @param testResult result of whole test file
+     * @param testStat return value from test.runTest()
+     * @param testAborted if the test was aborted at all
+     */
+    protected void logTestResult(String testName, int testResult, boolean testStat, boolean testAborted)
+    {
+        // Report the 'rolled-up' results of the test, combining each of the above data
+        switch (testResult)
+        {
+            case Logger.INCP_RESULT:
+                // There is no 'checkIncomplete' method, so simply avoid calling check at all
+                reporter.logErrorMsg(testName + ".runTest() returned INCP_RESULT!");
+                break;
+            case Logger.PASS_RESULT:
+                // Only report a pass if it returned true and didn't abort
+                if (testStat && (!testAborted))
+                {
+                    reporter.checkPass(testName + ".runTest()");
+                }
+                else
+                {
+                    // Assume something went wrong and call it an ERRR
+                    reporter.checkErr(testName + ".runTest()");
+                }
+                break;
+            case Logger.AMBG_RESULT:
+                reporter.checkAmbiguous(testName + ".runTest()");
+                break;
+            case Logger.FAIL_RESULT:
+                reporter.checkFail(testName + ".runTest()");
+                break;
+            case Logger.ERRR_RESULT:
+                reporter.checkErr(testName + ".runTest()");
+                break;
+            default:
+                // Assume something went wrong
+                //  (always 'err' on the safe side, ha, ha)
+                reporter.checkErr(testName + ".runTest()");
+                break;
+        }
+    }
+
+
+    /**
+     * Convenience method to log out any version or system info.  
+     * <p>Logs System.getProperties(), the harnessProps block, plus 
+     * info about the classpath.</p>
+     */
+    protected void logHarnessProps()
+    {
+        reporter.logHashtable(reporter.WARNINGMSG, System.getProperties(), "System.getProperties");
+        reporter.logHashtable(reporter.WARNINGMSG, harnessProps, "harnessProps");
+        // Since we're running a bunch of tests, also check which version 
+        //      of various jars we're running against
+        logClasspathInfo(System.getProperty("java.class.path"));
+    }
+
+
+    /**
+     * Convenience method to log out misc info about your classpath.  
+     * @param classpath presumably the java.class.path to search for jars
+     */
+    protected void logClasspathInfo(String classpath)
+    {
+        StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator);
+        for (int i = 0; st.hasMoreTokens(); i++)
+        {
+            logClasspathItem(st.nextToken());
+        }
+    }
+
+
+    /**
+     * Convenience method to log out misc info about a single classpath entry.  
+     * <p>Implicitly looks for specific jars, namely xalan.jar, xerces.jar, etc.</p>
+     * @param filename classpath entry to report about
+     */
+    protected void logClasspathItem(String filename)
+    {
+        // Make sure the comparison names are all lower case
+        // This allows us to do case-insensitive compares, but 
+        //      actually use the case-sensitive filename for lookups
+        String filenameLC = filename.toLowerCase();
+        String checknames[] = { "xalan.jar", "xerces.jar", "testxsl.jar", "minitest.jar"};
+
+        for (int i = 0; i < checknames.length; i++)
+        {
+            if (filenameLC.indexOf(checknames[i]) > -1)
+            {
+                File f = new File(filename);
+                if (f.exists())
+                {
+                    Hashtable h = new Hashtable(4);
+                    h.put("jarname", checknames[i]);
+                    h.put("length", String.valueOf(f.length()));
+                    h.put("lastModified", String.valueOf(f.lastModified()));
+                    h.put("path", f.getAbsolutePath());
+                    reporter.logElement(Reporter.INFOMSG, "classpathitem", h, null);
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Cheap-o memory logger - just reports Runtime.totalMemory/freeMemory.  
+     */
+    protected void logMemory()
+    {
+        Runtime r = Runtime.getRuntime();
+        r.gc();
+        reporter.logPerfMsg("UMem", r.freeMemory(), "freeMemory");
+        reporter.logPerfMsg("UMem", r.totalMemory(), "totalMemory");
+    }
+
+
+    /**
+     * Run the test harness to execute the specified tests.  
+     */
+    public void doMain(String args[])
+    {
+        // Must have at least one arg to continue
+        if ((args == null) || (args.length == 0))
+        {
+            System.err.println("ERROR in usage: must have at least one argument");
+            System.err.println(usage());
+            return;
+        }
+
+        // Initialize ourselves and a list of tests to execute
+        // Side effects: sets harnessProps, debug
+        String tests[] = doTestHarnessInit(args);
+        if (tests == null)
+        {
+            System.err.println("ERROR in usage: Problem during initialization - no tests!");
+            System.err.println(usage());
+            return;
+        }
+
+        // Use a separate copy of our properties to init our Reporter
+        Properties reporterProps = (Properties)harnessProps.clone();
+
+        // Ensure we have an XMLFileLogger if we have a logName
+        String logF = reporterProps.getProperty(Logger.OPT_LOGFILE);
+
+        if ((logF != null) && (!logF.equals("")))
+        {
+            // We should ensure there's an XMLFileReporter
+            String r = reporterProps.getProperty(Reporter.OPT_LOGGERS);
+
+            if (r == null)
+            {
+                reporterProps.put(Reporter.OPT_LOGGERS,
+                              "org.apache.qetest.XMLFileLogger");
+            }
+            else if (r.indexOf("XMLFileLogger") <= 0)
+            {
+                reporterProps.put(Reporter.OPT_LOGGERS,
+                              r + Reporter.LOGGER_SEPARATOR
+                              + "org.apache.qetest.XMLFileLogger");
+            }
+        }
+
+        // Ensure we have a ConsoleLogger unless asked not to
+        // @todo improve and document this feature
+        String noDefault = reporterProps.getProperty("noDefaultReporter");
+        if (noDefault == null)
+        {
+            // We should ensure there's an XMLFileReporter
+            String r = reporterProps.getProperty(Reporter.OPT_LOGGERS);
+
+            if (r == null)
+            {
+                reporterProps.put(Reporter.OPT_LOGGERS,
+                              "org.apache.qetest.ConsoleLogger");
+            }
+            else if (r.indexOf("ConsoleLogger") <= 0)
+            {
+                reporterProps.put(Reporter.OPT_LOGGERS,
+                              r + Reporter.LOGGER_SEPARATOR
+                              + "org.apache.qetest.ConsoleLogger");
+            }
+        }
+
+        // A Reporter will auto-initialize from the values
+        //  in the properties block
+        reporter = new Reporter(reporterProps);
+        reporter.addDefaultLogger();  // add default logger if needed
+
+        // Call worker method to actually run all the tests
+        // Worker method manages all it's own reporting, including 
+        //  calling testFileInit/testFileClose
+        boolean notUsed = runHarness(tests);
+
+        // Tell user if a logFile should have been saved
+        String logFile = reporterProps.getProperty(Logger.OPT_LOGFILE);
+        if (logFile != null)
+        {
+            System.out.println("");
+            System.out.println("Hey! A summary-harness logFile was written to: " + logFile);
+        }
+    }
+
+
+    /**
+     * Main method to run the harness from the command line.  
+     */
+    public static void main (String[] args)
+    {
+        XSLTestHarness app = new XSLTestHarness();
+        app.doMain(args);
+    }
+}    // end of class XSLTestHarness
+
diff --git a/test/java/src/org/apache/qetest/xsl/XSLTestfileInfo.java b/test/java/src/org/apache/qetest/xsl/XSLTestfileInfo.java
new file mode 100644
index 0000000..5c7054e
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XSLTestfileInfo.java
@@ -0,0 +1,221 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+/*
+ *
+ * XSLTestfileInfo.java
+ *
+ */
+package org.apache.qetest.xsl;
+
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.qetest.TestfileInfo;
+
+/**
+ * Simple data-holding class specifying info about one 'testfile'.
+ * <p>Convenience class for XSL Processor testing, includes
+ * additional fields and overrides some methods to change order
+ * of initializer strings.</p>
+ * <ul>Fields read in new order:
+ * <li>inputName - xsl stylesheet</li>
+ * <li>xmlName - xml data file <b>new</b></li>
+ * <li>outputName - for results of transform</li>
+ * <li>goldName</li>
+ * <li>description</li>
+ * <li>author</li>
+ * <li>options</li>
+ * </ul>
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class XSLTestfileInfo extends TestfileInfo
+{
+
+    /** Name of the input XML data file. */
+    public String xmlName = null;
+
+    /** NEEDSDOC Field XMLNAME          */
+    public static final String XMLNAME = "xmlName";
+
+    /** No-arg constructor leaves everything null. */
+    public XSLTestfileInfo(){}
+
+    /**
+     * Initialize members from name=value pairs in Properties block.
+     * Default value for each field is null.
+     * @param Properties block to initialize from
+     *
+     * NEEDSDOC @param p
+     */
+    public XSLTestfileInfo(Properties p)
+    {
+        load(p);
+    }
+
+    /**
+     * Pass in a StringTokenizer-default-delimited string to initialize members.
+     * <p>Members are read in order: inputName <i>xmlName</i> outputName goldName
+     * author description options...
+     * default value for each field is null</p>
+     * @param String to initialize from
+     *
+     * NEEDSDOC @param inputStr
+     */
+    public XSLTestfileInfo(String inputStr)
+    {
+
+        StringTokenizer st = new StringTokenizer(inputStr);
+
+        load(st, null);
+    }
+
+    /**
+     * Pass in a StringTokenizer-default-delimited string to initialize members.
+     * <p>Members are read in order: inputName <i>xmlName</i> outputName goldName
+     * author description options...
+     * default value for each field is user-specified String</p>
+     * @param String to initialize from
+     * @param String to use as default for any un-specified value
+     *
+     * NEEDSDOC @param inputStr
+     * NEEDSDOC @param defaultVal
+     */
+    public XSLTestfileInfo(String inputStr, String defaultVal)
+    {
+
+        StringTokenizer st = new StringTokenizer(inputStr);
+
+        load(st, defaultVal);
+    }
+
+    /**
+     * Pass in a specified-delimited string to initialize members.
+     * <p>Members are read in order: inputName <i>xmlName</i> outputName goldName
+     * author description options...
+     * default value for each field is user-specified String</p>
+     * @param String to initialize from
+     * @param String to use as default for any un-specified value
+     * @param String to use as separator for StringTokenizer
+     *
+     * NEEDSDOC @param inputStr
+     * NEEDSDOC @param defaultVal
+     * NEEDSDOC @param separator
+     */
+    public XSLTestfileInfo(String inputStr, String defaultVal,
+                           String separator)
+    {
+
+        StringTokenizer st = new StringTokenizer(inputStr, separator);
+
+        load(st, defaultVal);
+    }
+
+    /**
+     * Worker method to initialize members.
+     *
+     * NEEDSDOC @param st
+     * NEEDSDOC @param defaultVal
+     */
+    public void load(StringTokenizer st, String defaultVal)
+    {
+
+        // Fill in as many items as are available; default the value otherwise
+        // Note that order is important!
+        if (st.hasMoreTokens())
+            inputName = st.nextToken();
+        else
+            inputName = defaultVal;
+
+        // Override from base class: put the xmlName next
+        if (st.hasMoreTokens())
+            xmlName = st.nextToken();
+        else
+            xmlName = defaultVal;
+
+        if (st.hasMoreTokens())
+            outputName = st.nextToken();
+        else
+            outputName = defaultVal;
+
+        if (st.hasMoreTokens())
+            goldName = st.nextToken();
+        else
+            goldName = defaultVal;
+
+        if (st.hasMoreTokens())
+            author = st.nextToken();
+        else
+            author = defaultVal;
+
+        if (st.hasMoreTokens())
+            description = st.nextToken();
+        else
+            description = defaultVal;
+
+        if (st.hasMoreTokens())
+        {
+            options = st.nextToken();
+
+            // For now, simply glom all additional tokens into the options, until the end of string
+            // Leave separated with a single space char for readability
+            while (st.hasMoreTokens())
+            {
+                options += " " + st.nextToken();
+            }
+        }
+        else
+            options = defaultVal;
+    }
+
+    /**
+     * Initialize members from name=value pairs in Properties block.
+     * Default value for each field is null.
+     * @param Properties block to initialize from
+     *
+     * NEEDSDOC @param p
+     */
+    public void load(Properties p)
+    {
+
+        inputName = p.getProperty(INPUTNAME);
+        xmlName = p.getProperty(XMLNAME);  // Override from base class
+        outputName = p.getProperty(OUTPUTNAME);
+        goldName = p.getProperty(GOLDNAME);
+        author = p.getProperty(AUTHOR);
+        description = p.getProperty(DESCRIPTION);
+        options = p.getProperty(OPTIONS);
+    }
+
+    /**
+     * Cheap-o debugging: return tab-delimited String of all our values.
+     *
+     * NEEDSDOC ($objectName$) @return
+     */
+    public String dump()
+    {
+
+        return (inputName + '\t' + xmlName  // Override from base class
+                + '\t' + outputName + '\t' + goldName + '\t' + author + '\t'
+                + description + '\t' + options);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xsl/XalanCTestlet.java b/test/java/src/org/apache/qetest/xsl/XalanCTestlet.java
new file mode 100644
index 0000000..670b93c
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XalanCTestlet.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xsl;
+
+import java.io.File;
+
+import org.apache.qetest.Datalet;
+
+/**
+ * Testlet for conformance testing of xsl stylesheet files using 
+ * XalanC commandline instead of a TransformWrapper.
+ *
+ * Note: this class simply uses CmdlineTestlet's implementation.
+ *
+ * @author Shane_Curcuru@lotus.com
+ * @version $Id$
+ */
+public class XalanCTestlet extends CmdlineTestlet
+{
+    // Initialize our classname for TestletImpl's main() method
+    static { thisClassName = "org.apache.qetest.xsl.XalanCTestlet"; }
+
+    // Initialize our defaultDatalet
+    { defaultDatalet = (Datalet)new StylesheetDatalet(); }
+
+    /**
+     * Accesor method for a brief description of this test.  
+     * @return String describing what this XalanCTestlet does.
+     */
+    public String getDescription()
+    {
+        return "XalanCTestlet";
+    }
+
+    /**
+     * Default Actual name of external program to call.  
+     * @return Xalan, the Xalan-C command line.
+     */
+    public String getDefaultProgName()
+    {
+        return "Xalan";
+    }
+
+    /**
+     * Worker method to get list of arguments specific to this program.  
+     * 
+     * <p>Must be overridden for different processors, obviously.  
+     * This implementation returns the args for Xalan-C TestXSLT</p>
+     * 
+     * @param program path\name of program to Runtime.exec()
+     * @param defaultArgs any additional arguments to pass
+     * @return String array of arguments suitable to pass to 
+     * Runtime.exec()
+     */
+    public String[] getProgramArguments(StylesheetDatalet datalet, String[] defaultArgs)
+    {
+        final int NUMARGS = 5;
+        String[] args = new String[defaultArgs.length + NUMARGS];
+        String progName = datalet.options.getProperty(OPT_PROGNAME, getDefaultProgName());
+        String progPath = datalet.options.getProperty(OPT_PROGPATH);
+        if ((null != progPath) && (progPath.length() > 0))
+        {
+            args[0] = progPath + File.separator + progName;
+        }
+        else
+        {
+            // Pesume the program is on the PATH already...
+            args[0] = progName;
+        }
+    
+        // Default args for Xalan-C TestXSLT
+        args[1] = "-o";
+        args[2] = datalet.outputName;
+        args[3] = datalet.xmlName;
+        args[4] = datalet.inputName;
+
+        if (defaultArgs.length > 0)
+            System.arraycopy(defaultArgs, 0, args, NUMARGS, defaultArgs.length);
+
+        return args;
+    }
+
+
+}  // end of class XalanCTestlet
+
diff --git a/test/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.java b/test/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.java
new file mode 100644
index 0000000..991d160
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.java
@@ -0,0 +1,35 @@
+package org.apache.qetest.xsl;
+
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.ErrorListener;
+
+/*
+   An object of this class, can be set on XalanJ TransformerFactory
+   to report run-time XSLTC compilation errors.
+
+   @author <a href="mailto:mukulg@apache.org">Mukul Gandhi</a>
+*/
+public class XsltcTestsErrorListener implements ErrorListener {
+
+      private String errListenerMesg = null;
+
+	  @Override
+	  public void warning(TransformerException ex) throws TransformerException {
+	     // NO OP
+	  }
+
+	  @Override
+	  public void error(TransformerException ex) throws TransformerException {
+         // NO OP
+	  }
+
+	  @Override
+	  public void fatalError(TransformerException ex) throws TransformerException {
+          this.errListenerMesg = ex.getMessage();
+	  }
+
+      public String getErrListenerMesg() {
+          return this.errListenerMesg; 
+      }
+		
+}
\ No newline at end of file
diff --git a/test/java/src/org/apache/qetest/xsl/XsltcTestsTask.java b/test/java/src/org/apache/qetest/xsl/XsltcTestsTask.java
new file mode 100644
index 0000000..af13daf
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/XsltcTestsTask.java
@@ -0,0 +1,241 @@
+package org.apache.qetest.xsl;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.types.Path;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSSerializer;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.Iterator;
+
+/*
+   This ant task can, check whether XalanJ's XSLTC processor 
+   can compile XSLT stylesheets correctly.
+
+   @author <a href="mailto:mukulg@apache.org">Mukul Gandhi</a>
+*/
+public class XsltcTestsTask extends Task {
+    
+    private String inputDir;
+
+    private String resultDir;
+
+    private static final String XSLT_FILE_EXT = ".xsl";
+
+    private static final String expectedTestResultsDoc = "expected_test_results.xml";
+
+    private static final String testResultsDoc = "actual_test_results.xml";
+
+    private static final String STYLESHEET_COMPILATION_ERR_MESG = "Could not compile stylesheet";
+
+    private static final String PASS = "pass";
+
+    private static final String FAIL = "fail";
+
+    private CommandlineJava commandLineJava = new CommandlineJava();
+
+    // method to run this, ant build task
+    public void execute() throws BuildException {
+
+        System.setProperty("javax.xml.transform.TransformerFactory", 
+		                        "org.apache.xalan.xsltc.trax.TransformerFactoryImpl");
+
+        Document expectedTestResultsDocument = getExpectedTestResultsDocument();
+        
+        Map<String, Boolean> testResults = new HashMap<String, Boolean>();
+
+        File dirObj = new File(this.inputDir);
+        File[] fileList = dirObj.listFiles();
+        
+        boolean isXsltcTestsPassed = true;
+
+        try {
+            for (int idx = 0; idx < fileList.length; idx++) {
+               String fileName = fileList[idx].getName();
+               if (fileName.endsWith(XSLT_FILE_EXT)) {                  
+                  XsltcTestsErrorListener xsltcTestsErrorListener = new XsltcTestsErrorListener();                      
+                  compileXslDocument(fileName, xsltcTestsErrorListener);
+                  boolean isCompileErrorOccured = STYLESHEET_COMPILATION_ERR_MESG.
+                                                          equals(xsltcTestsErrorListener.getErrListenerMesg());                                                                               
+                  boolean hasTestPassed = isTestPassed(expectedTestResultsDocument, 
+                                                              fileName, isCompileErrorOccured);
+                  if (hasTestPassed) {
+                     testResults.put(fileName, Boolean.TRUE);
+                  }
+                  else {
+                     testResults.put(fileName, Boolean.FALSE);
+                     isXsltcTestsPassed = false;
+                  }                                      
+               }
+            }
+
+            serializeTestResultsToXmlDocument(testResults);
+        }
+        catch (Exception ex) {
+           throw new BuildException(ex.getMessage(), location);
+        }
+        
+        if (!isXsltcTestsPassed) {
+           throw new BuildException("One or more XSLTC tests have failed. Please fix any XSLTC tests problems, " + 
+                                      "before checking in! XSLTC test results are available at " + resultDir + "/" + 
+                                        testResultsDoc , location);
+        }
+    }
+
+    public void setInputDir(String inputDir) {
+        this.inputDir = inputDir;
+    }
+
+    public void setResultDir(String resultDir) {
+        this.resultDir = resultDir;
+    }
+
+    /**
+     * Set the bootclasspathref to be used for this test.
+     *
+     * @param bootclasspathref used for running the test
+     */
+    public void setBootclasspathref(Reference ref)
+    {
+        String jdkRelease =
+                   System.getProperty("java.version", "0.0").substring(0,3);
+        if (!jdkRelease.equals("1.1")
+                && !jdkRelease.equals("1.2")
+                && !jdkRelease.equals("1.3")) {
+            Path p = (Path)ref.getReferencedObject(this.getProject());
+            createJvmarg().setValue("-Xbootclasspath/p:" + p);
+        }
+    }
+
+    /**
+     * Creates a nested jvmarg element.
+     *
+     * @return Argument to send to our JVM if forking
+     */
+    public Commandline.Argument createJvmarg()
+    {
+        return commandLineJava.createVmArgument();
+    } 
+
+    /*
+       This method, attempts to compile an XSLT stylesheet. If the stylesheet
+       cannot be compiled, the registered error listener sets the resulting
+       error message within a variable.
+    */
+    private void compileXslDocument(String xslName, XsltcTestsErrorListener 
+                                                        xsltcTestsErrorListener) {         
+         try {
+            TransformerFactory trfFactory = TransformerFactory.newInstance();         
+            trfFactory.setErrorListener(xsltcTestsErrorListener);
+            Transformer transformer = trfFactory.newTransformer(
+                                                new StreamSource(this.inputDir + "/" + xslName));
+         }
+         catch (Exception ex) {
+            // NO OP
+         }                                                      
+    }
+
+    /*
+       An expected tests results document, is already available before running
+       this ant task. This method, returns an XML DOM representation of that
+       XML document.
+    */
+    private Document getExpectedTestResultsDocument() { 
+       Document xmlResultDocument = null;
+
+       try {
+          DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
+          DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
+          xmlResultDocument = docBuilder.parse(this.inputDir + "/" + expectedTestResultsDoc);
+       }
+       catch (Exception ex) {
+          throw new BuildException(ex.getMessage(), location);
+       }
+      
+       return xmlResultDocument; 
+    }
+
+    /*
+       This method, checks whether an XSLTC test that has been run, 
+       has passed or not.
+    */
+    private boolean isTestPassed(Document expectedTestResultsDoc, 
+                                    String xslFileName, boolean isCompileErrorOccured) 
+                                                                      throws Exception {
+       XPath xPath = XPathFactory.newInstance().newXPath();
+       String isCompileErrorOccuredStr = (new Boolean(isCompileErrorOccured)).toString();
+       String xpathExprStr = "/expectedResults/file[@name = '" + xslFileName + "' and " +
+                                  "compileError = '" + isCompileErrorOccuredStr + "']/expected";                                 
+       String xpathNodeStrValue = (String)((xPath.compile(xpathExprStr)).
+                                                    evaluate(expectedTestResultsDoc, 
+                                                                 XPathConstants.STRING));
+       return PASS.equals(xpathNodeStrValue) ? true : false;                                                                
+    }
+
+    /*
+       Given XSLTC overall test results, produced by this class (available as Map object),
+       this method serializes those results to an XML document.
+    */
+    private void serializeTestResultsToXmlDocument(Map testResultsMap) 
+                                                              throws Exception {
+       Set<Map.Entry<String,Boolean>> mapEntries = testResultsMap.entrySet();
+       Iterator<Map.Entry<String,Boolean>> iter = mapEntries.iterator();
+       
+       DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
+       DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
+       Document resultDocument = docBuilder.newDocument();
+
+       Element testResultsElem = resultDocument.createElement("testResults");       
+       while (iter.hasNext()) {
+          Map.Entry<String,Boolean> mapEntry = iter.next();
+          String fileName = mapEntry.getKey();
+          Boolean passStatus = mapEntry.getValue();
+          
+          Element resultElem = resultDocument.createElement("result");
+          Element fileNameElem = resultDocument.createElement("fileName");
+          fileNameElem.appendChild(resultDocument.createTextNode(fileName));
+          resultElem.appendChild(fileNameElem);
+          Element statusElem = resultDocument.createElement("status");
+          statusElem.appendChild(resultDocument.createTextNode(passStatus == 
+                                                   Boolean.TRUE ? "pass" : "fail"));
+          resultElem.appendChild(statusElem);
+          
+          testResultsElem.appendChild(resultElem);
+       }
+
+       resultDocument.appendChild(testResultsElem);
+
+       DOMImplementationLS domImplementation = (DOMImplementationLS) 
+                                                         resultDocument.getImplementation();
+       LSSerializer lsSerializer = domImplementation.createLSSerializer();
+       (lsSerializer.getDomConfig()).setParameter("format-pretty-print", Boolean.TRUE);
+       String resultDocumentXmlStr = lsSerializer.writeToString(resultDocument);
+
+       Files.write(Paths.get(resultDir + "/" + testResultsDoc), 
+                                                    resultDocumentXmlStr.getBytes());
+    }
+
+}
diff --git a/test/java/src/org/apache/qetest/xsl/package.html b/test/java/src/org/apache/qetest/xsl/package.html
new file mode 100644
index 0000000..98a4f9f
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xsl/package.html
@@ -0,0 +1,75 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<!-- $Id$ -->
+<html>
+  <title>XSL-TEST general XSLT package.</title>
+  <body>
+    <p>This package contains XSLT testing base classes and utilities, and a generic test driver.</p>
+    <dl>
+      <dt><b>Author: </b></dt><dd><a href="mailto:shane_curcuru@lotus.com">Shane_Curcuru@lotus.com</a></dd>
+      <dt><b>Program(s) Under Test: </b></dt>
+      <dd><a href="http://xml.apache.org/xalan-j" target="_top">Xalan-J 2.x XSLT Processor</a></dd>
+      <dd><a href="http://xml.apache.org/xalan" target="_top">Xalan-J 1.x XSLT Processor</a></dd>
+      <dd><a href="http://xml.apache.org/xalan-c" target="_top">Xalan-C 1.x XSLT Processor</a></dd>
+    </dl>
+    <p>This package includes base classes and utilities, as well as several 
+    generic test drivers that use {@link org.apache.qetest.xslwrapper.ProcessorWrapper ProcessorWrappers} 
+    to process stylesheets.  Classes in this package must not depend directly 
+    on any Xalan interfaces, only on the ProcessorWrapper interface.<p>
+    <ul>Current utilities include:
+    <li>Logging* - implementations of XSLT-related listeners 
+    and the like that log to our Reporter.</li>
+    <li>XHTFileCheckService, XHTComparator - checks equivalence of 
+    two File objects by parsing either as XML, HTML, or text.  Note 
+    the HTML parsing is unimplemented - we need a good HTML->DOM 
+    parser we can use in Apache - any suggestions?</li>
+    <li>XSLTestfileInfo - simple extension of TestfileInfo to 
+    add xmlName member. Should be replaced with StylesheetDatalet</li>
+    <li>XSLDirectoryIterator - simple implementation that processes 
+    xsl/xml file pairs from a fileList or over a directory tree, 
+    automatically comparing the result files with a known good 
+    or 'gold' reference tree of outputs. Should be replaced 
+    with StylesheetTestletDriver and various Testlets.</li>
+    <li>XSLProcessorTestBase - adds useful XSLT processing 
+    utilities, etc. from FileTestBase: including flags like 
+    -preprocess, -flavor, -category, etc.  Most xsl and trax 
+    package Test scripts derive from this class.</li>
+    </ul>
+    <ul>Current tests include:
+    <li>ConformanceTest - generic test driver, including some 
+    FilenameFilters.  This essentially uses the XSLDirectoryIterator 
+    for everything. 
+    Being replaced by StylesheetTestletDriver and 
+    StylesheetTestlet/Datalet</li>
+    <li>PerformanceTest - test driver that iterates repeatedly and 
+    reports memory and timing info
+    Being replaced by StylesheetTestletDriver and 
+    PerformanceTestlet, PerfPreloadTestlet</li>
+
+    <li>CConformanceTest - generic test driver that constructs a 
+    command line and then shells out to execute TestXSLT.exe, which 
+    is from the Xalan-C build.  This allows basic comparisons of 
+    results from the Java versions with the C++ versions.
+    I'd like to replace this with a more generic and configurable 
+    CmdlineTestlet, that can run any sort of command-line interface
+    like this in a standard way.</li>
+    </ul>
+  </body>
+</html>
+
+
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TransformWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/TransformWrapper.java
new file mode 100644
index 0000000..4ca1363
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TransformWrapper.java
@@ -0,0 +1,435 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.apache.qetest.Configurable;
+
+/**
+ * Helper interface to wrapper various XSLT processors for testing.
+ *
+ * A TransformWrapper wraps a particular 'flavor' of XSLT processing. 
+ * This includes both a particular XSLT implementation, such as 
+ * Xalan or Saxon, as well as a particular method to perform 
+ * processing, like using streams or DOMs to perform transforms.
+ *
+ * As an important side effect, this class should return timing 
+ * information about the steps done to perform the transformation.
+ * Note that exactly what is timed and how it's timed should be 
+ * clearly documented in implementing classes!
+ * 
+ * This is not a general-purpose wrapper for doing XSLT 
+ * transformations: for that, you might as well use the real 
+ * javax.xml.transform package itself.  However this does allow 
+ * many conformance and performance tests to run comparatively 
+ * between different flavors of processors.
+ *
+ * TransformWrapper is a bit of an awkward name, but I wanted to 
+ * keep it separate from the pre-existing ProcessorWrapper that 
+ * this replaces so we can ensure stability for Xalan testing 
+ * while updating to this new class.
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public interface TransformWrapper extends Configurable
+{
+
+    /**
+     * Timing constant: this operation did not attempt to time this 
+     * item, or the item is not appropriate for this case.  
+     * 
+     * Currently we return a similar array of longs from every 
+     * timed call, however buildStylesheet() would obviously not 
+     * have entries for xmlread/xmlbuild times.  This value will 
+     * be used for any times not used, since a negative number is 
+     * clearly inappropriate for a time duration (until someone 
+     * does some heavy relativistic optimizations).
+     */
+    public static final long TIME_UNUSED = -2L;
+
+
+    /**
+     * Timing index: overall time to complete operation.  
+     * 
+     * This time, which is always the first long[] array item in 
+     * any timed call, is the overall amount of time taken to 
+     * complete the whole operation, from start to finish.  This 
+     * may include time in reading the inputs from disk and 
+     * writing the outputs to disk, as well as any other time 
+     * taken by the processor to complete other portions of the 
+     * task.
+     *
+     * In general, this should not include overhead for the wrapper 
+     * itself, and notably will not include time taken up while 
+     * setting parameters or other attributes into the underlying 
+     * processor (which are hopefully minor compared to other items).
+     *
+     * Note that other timing indexes may be filled in as 
+     * TIME_UNUSED by calls that don't time anything useful.  E.g. 
+     * buildStylesheet will not return data for xml-related times.
+     */
+    public static final int IDX_OVERALL = 0;
+
+
+    /**
+     * Timing index: time spend reading an XSL file into memory.  
+     * 
+     * This should be the time spent just reading the XSL file from 
+     * disk into memory, to attempt to isolate disk I/O issues.  
+     * Note that implementations should carefully document exactly 
+     * what this operation does: just reads the data into a 
+     * ByteStream, or actually builds a DOM, or whatever.
+     */
+    public static final int IDX_XSLREAD = 1;
+
+
+    /**
+     * Timing index: time to build the stylesheet.  
+     * 
+     * This should include the time it takes the processor 
+     * implementation to take an XSL source and turn it into 
+     * whatever useable form it wants.
+     * 
+     * In TrAX, this would normally correspond to the time it 
+     * takes the newTemplates() call to return when handed a 
+     * StreamSource(ByteStream) object.  Normally this would 
+     * be a ByteStream already in memory, but some wrappers 
+     * may not allow separating the xslread time (which would 
+     * be reading the file from disk into a ByteStream in memory) 
+     * from this xslbuild time.
+     */
+    public static final int IDX_XSLBUILD = 2;
+
+
+    /**
+     * Timing index: time spend reading an XML file into memory.  
+     * 
+     * This should be the time spent just reading the XML file from 
+     * disk into memory, to attempt to isolate disk I/O issues.  
+     * Note that implementations should carefully document exactly 
+     * what this operation does: just reads the data into a 
+     * ByteStream, or actually builds a DOM, or whatever.
+     */
+    public static final int IDX_XMLREAD = 3;
+
+
+    /**
+     * Timing index: time to build the XML document.  
+     * 
+     * This should include the time it takes the processor 
+     * implementation to take an XML source and turn it into 
+     * whatever useable form it wants.
+     * 
+     * In TrAX, this would normally only correspond to the time 
+     * taken to create a DOMSource from an in-memory ByteStream.  
+     * The Xalan-C version may use this more than the Java version.
+     */
+    public static final int IDX_XMLBUILD = 4;
+
+
+    /**
+     * Timing index: time to complete the transform from sources.  
+     * 
+     * Normally this should be just the time to complete outputting 
+     * the whole result tree from a transform from in-memory sources.
+     * Obviously different wrapper implementations will measure 
+     * slightly different things in this field, which needs to be 
+     * clearly documented.  
+     *
+     * For example, in TrAX, this would correspond to doing a 
+     * transformer.transform(xmlSource, StreamResult(ByteStream))
+     * where the ByteStream is in memory.  A separate time should be 
+     * recorded for resultwrite that actually puts the stream out 
+     * to disk.
+     *
+     * Note that some wrappers may not be able to separate the 
+     * transform time from the resultwrite time: for example a 
+     * wrapper that wants to test with new StreamResult(URL).
+     */
+    public static final int IDX_TRANSFORM = 5;
+
+
+    /**
+     * Timing index: time to write the result tree to disk.  
+     * 
+     * See discussion in IDX_TRANSFORM.  This may not always 
+     * be used.
+     */
+    public static final int IDX_RESULTWRITE = 6;
+
+
+    /**
+     * Timing index: Time from beginning of transform from sources 
+     * until the first bytes of the result tree come out.  
+     * 
+     * Future use.  This is for testing pipes and server 
+     * applications, where the user is concerned about latency and 
+     * throughput.  This will measure how responsive the processor 
+     * appears to be at first (but not necessarily how long it 
+     * takes to write the whole the result tree).
+     */
+    public static final int IDX_FIRSTLATENCY = 7;
+
+
+    /**
+     * URL for set/getAttribute: should be an integer to set 
+     * for the output indent of the processor.
+     *
+     * This is a common enough attribute that most wrapper 
+     * implementations should be able to support it in a 
+     * straightforward manner.
+     */
+    public static final String ATTRIBUTE_INDENT =
+        "http://xml.apache.org/xalan/wrapper/indent";
+
+
+    /** 
+     * URL for set/getAttribute: should be an Object to attempt 
+     * to set as a diagnostic log/stream for the processor.
+     *
+     * //@todo see if there's a fairly generic way to implement 
+     * this that will get at least some data from all common 
+     * processor implementations: either by using some native 
+     * diagnostics PrintStream the processor provides, or by 
+     * implementing a simple LoggingErrorListener, etc.
+     */
+    public static final String ATTRIBUTE_DIAGNOSTICS =
+        "http://xml.apache.org/xalan/wrapper/diagnostics";
+
+
+    /**
+     * Marker for Attributes to set on Processors.  
+     * 
+     * Options that startWith() this constant will actually be 
+     * attempted to be set onto our underlying processor/transformer.
+     */
+    public static final String SET_PROCESSOR_ATTRIBUTES = 
+        "Processor.setAttribute.";
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo();
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * For TrAX/javax.xml.transform implementations, this creates 
+     * a new TransformerFactory.  For Xalan-J 1.x this creates an 
+     * XSLTProcessor.  Other implmentations may or may not actually 
+     * do any work in this method.
+     *
+     * @param options Hashtable of options, possibly specific to 
+     * that implementation.  For future use.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception;
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed for any underlying 
+     * processor implementation.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of various parts of 
+     * our operation; [0] is always the total end-to-end time, and 
+     * other array indicies are represented by IDX_* constants
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception;
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of various parts of 
+     * our operation; [0] is always the total end-to-end time, and 
+     * other array indicies are represented by constants
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception;
+
+
+    /**
+     * Reports if a pre-built/pre-compiled stylesheet is ready; 
+     * presumably built by calling buildStylesheet(xslName).
+     *
+     * @return true if one is ready; false otherwise
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public boolean isStylesheetReady();
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of various parts of 
+     * our operation; [0] is always the total end-to-end time, and 
+     * other array indicies are represented by constants
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception;
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of various parts of 
+     * our operation; [0] is always the total end-to-end time, and 
+     * other array indicies are represented by constants
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception;
+
+
+    /**
+     * Set a stylesheet parameter for use in later transforms.  
+     *
+     * This method merely stores the triple for use later in a 
+     * transform operation.  Note that the actual mechanisims for 
+     * setting parameters in implementation differ, especially with 
+     * regards to namespaces.
+     *
+     * Note that the namespace may not contain the "{" or "}"
+     * characters, since these would be illegal XML namespaces 
+     * anyways; an IllegalArgumentException will be thrown; also 
+     * the name must not be null.
+     *
+     * @param namespace for the parameter, must not contain {}
+     * @param name of the parameter, must not be null
+     * @param value of the parameter
+     *
+     * @throws IllegalArgumentException thrown if the namespace
+     * or name appears to be illegal.
+     */
+    public void setParameter(String namespace, String name, Object value)
+        throws IllegalArgumentException;
+
+
+    /**
+     * Get a parameter that was set with setParameter.  
+     *
+     * Only returns parameters set locally, not parameters exposed 
+     * by the underlying processor implementation.  Not terribly 
+     * useful but I like providing gets for any sets I define.
+     *
+     * @param namespace for the parameter, must not contain {}
+     * @param name of the parameter, must not be null
+     *
+     * @return value of the parameter; null if not found
+     */
+    public Object getParameter(String namespace, String name);
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor);
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperFactory.java b/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperFactory.java
new file mode 100644
index 0000000..befa635
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperFactory.java
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.apache.qetest.QetestUtils;
+
+/**
+ * Factory static class for creating TransformWrappers.
+ *
+ * Includes a 'wrapperMapper' functionality to simplify specifying 
+ * the 'flavor' of a wrapper to create.  This is optional, but will 
+ * allow a user to specify newWrapper("trax.file") and get back an 
+ * instance of an org.apache.qetest.xslwrapper.TraxFileWrapper.
+ *
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public abstract class TransformWrapperFactory
+{
+
+    /**
+     * Currently known list of implemented wrappers.
+     *
+     * Allows specification of a simple name for each wrapper,
+     * so clients don't necessarily have to know the FQCN or
+     * fully qualified classname of their wrapper.</p>
+     *
+     * <ul>Where:
+     * <li>key = String simple name = xalan|trax|etc...</li>
+     * <li>value = String FQCN of wrapper implementation</li>
+     * <li>Supports: See TransformWrapperFactory.properties</li>
+     * </ul>
+     */
+    protected static Properties wrapperMapper = null;
+
+
+    /** 
+     * Static initializer for wrapperMapper.  
+     * Attempts to load TransformWrapperFactory.properties into 
+     * our wrapperMapper.
+     */
+    static
+    {
+        wrapperMapper = new Properties();
+
+        // Add a default trax flavor, since it's widely used
+        // This should be overwritten below if the properties 
+        //  file can be loaded
+        wrapperMapper.put("trax", "org.apache.qetest.xslwrapper.TraxFileWrapper");
+
+        try
+        {
+            InputStream is =
+                TransformWrapperFactory.class.getResourceAsStream(
+                    "TransformWrapperFactory.properties");
+
+            wrapperMapper.load(is);
+            is.close();
+        }
+        catch (Exception e)
+        {
+            System.err.println(
+                "TransformWrapperFactory.properties.load() threw: "
+                + e.toString());
+            e.printStackTrace();
+        }
+    };
+
+
+    /**
+     * Accessor for our wrapperMapper.
+     *
+     * @return Properties block of wrapper implementations
+     * that we implicitly know about; may be null if we have none
+     */
+    public static final Properties getDescriptions()
+    {
+        return wrapperMapper;
+    }
+
+
+    /**
+     * Return an instance of a TransformWrapper of requested flavor.
+     *
+     * This static factory method creates TransformWrappers for the 
+     * user.  Our 'wrapperMapper' functionality allows users to 
+     * either specify short names listed in 
+     * TransformWrapperFactory.properties (which are mapped to the 
+     * appropriate FQCN's) or to directly supply the FQCN of a 
+     * wrapper to create.
+     *
+     * @param flavor to create, either a wrapperMapped one or FQCN
+     *
+     * @return instance of a wrapper; will throw an 
+     * IllegalArgumentException if we cannot find the asked-for 
+     * wrapper class anywhere
+     */
+    public static final TransformWrapper newWrapper(String flavor)
+    {
+
+        // Attempt to lookup the flavor: if found, use the 
+        //  value we got, otherwise default to the same value
+        String className = wrapperMapper.getProperty(flavor, flavor);
+        
+        try
+        {
+            // Allow people to use bare classnames in popular packages
+            Class clazz = QetestUtils.testClassForName(className, 
+                               QetestUtils.defaultPackages,
+                               "Wrapper Not Found");
+            
+            return (TransformWrapper) clazz.newInstance();
+        }
+        catch (Exception e)
+        {
+            throw new IllegalArgumentException("newWrapper(" + flavor + ") threw: " + e.toString());
+        }
+    }
+
+
+    /**
+     * Simplistic command line support merely prints out wrapperMapper.
+     *
+     * @param args command line args - unused
+     */
+    public static void main(String[] args)
+    {
+        Properties p = getDescriptions();
+        System.out.println("TransformWrapperFactory: installed flavors=wrappers");
+        p.list(System.out);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperFactory.properties b/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperFactory.properties
new file mode 100644
index 0000000..e411c21
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperFactory.properties
@@ -0,0 +1,51 @@
+##
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+##
+#
+# $Id$
+#
+# Used by TransformWrapperFactory.wrapperMapper 
+#   This maps simple 'flavor' names to specific FQCN names 
+#   of actual TransformWrapper implementations, allowing users 
+#   to specify much simpler -flavor arguments
+
+# Default for Xalan2 and TrAX is the TraxFileWrapper, which 
+#   does transforms from StreamSource(URL)
+xalan2=org.apache.qetest.xslwrapper.TraxSystemIdWrapper
+trax=org.apache.qetest.xslwrapper.TraxSystemIdWrapper
+
+# Other TrAX wrappers use the same TrAX APIs but in 
+#   different models - streams, doms, sax, etc.
+# Note that you must set the appropriate Java system property to switch 
+#   between different javax.xml.transform.TransformerFactory implementations
+trax.systemId=org.apache.qetest.xslwrapper.TraxSystemIdWrapper
+trax.file=org.apache.qetest.xslwrapper.TraxFileWrapper
+trax.stream=org.apache.qetest.xslwrapper.TraxStreamWrapper
+trax.dom=org.apache.qetest.xslwrapper.TraxDOMWrapper
+trax.sax=org.apache.qetest.xslwrapper.TraxSAXWrapper
+trax.localPath=org.apache.qetest.xslwrapper.TraxLocalPathWrapper
+
+# TRaX wrapper that performs three transforms using same transformer
+trax.systemId3=org.apache.qetest.xslwrapper.TraxSystemId3Wrapper
+
+# Xalan command line wrapper, calls Process.main()
+xalan=org.apache.qetest.xslwrapper.XalanProcessWrapper
+process=org.apache.qetest.xslwrapper.XalanProcessWrapper
+
+# XSLTC is now available as a separate 'mode'
+#   XsltcMainWrapper effectively just calls old XSLTC command line
+xsltc=org.apache.qetest.xslwrapper.XsltcMainWrapper
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperHelper.java b/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperHelper.java
new file mode 100644
index 0000000..c141c0f
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperHelper.java
@@ -0,0 +1,387 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * A few default implementations of TransformWrapper methods.  
+ *
+ * A TransformWrapperHelper implements a few of the common methods 
+ * from TransformWrapper that don't directly interact with the 
+ * underlying processor.  Individual wrapper implementations are 
+ * free to extend this class to get some free code.
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public abstract class TransformWrapperHelper implements TransformWrapper
+{
+
+    /** Constant denoting that indent should not be set.  */ 
+    protected static final int NO_INDENT = -2;
+
+
+    /** 
+     * Current number of spaces to indent, default: NO_INDENT.  
+     * Users call setAttribute(ATTRIBUTE_INDENT, int) to set this. 
+     * If it is set, it will be applied to an underlying processor 
+     * during each transform operation, where supported.
+     */ 
+    protected int m_indent = NO_INDENT;
+
+
+    /**
+     * Allows the user to ask the wrapper to set specific 
+     * attributes on the underlying implementation.  
+     *
+     * Supported attributes in this class include:
+     * ATTRIBUTE_INDENT
+     *
+     * //@todo define behavior for subclasses who want our default 
+     * behavior but also want to throw the exception for 
+     * attributes that are not recognized.
+     *
+     * @param name The name of the attribute.
+     * @param value The value of the attribute.
+     *
+     * @throws IllegalArgumentException thrown only if we can't 
+     * parse an int from the value
+     * 
+     * @see #ATTRIBUTE_INDENT
+     */
+    public void setAttribute(String name, Object value)
+        throws IllegalArgumentException
+    {
+        if (ATTRIBUTE_INDENT.equals(name))
+        {
+            try
+            {
+                m_indent = (new Integer((String)value)).intValue();
+            }
+            catch (Exception e)
+            {
+                throw new IllegalArgumentException("setAttribute: bad value: " + value);
+            }
+        }
+    }
+
+
+    /**
+     * Allows the user to set specific attributes on the testing 
+     * utility or it's underlying product object under test.
+     * 
+     * This method should attempt to set any applicable attributes 
+     * found in the given attrs onto itself, and will ignore any and 
+     * all attributes it does not recognize.  It should never 
+     * throw exceptions.  This method may overwrite any previous 
+     * attributes that were set.  Currently since this takes a 
+     * Properties block you may only be able to set objects that 
+     * are Strings, although individual implementations may 
+     * attempt to use Hashtable.get() on only the local part.
+     * 
+     * Currently unimplemented; no-op.
+     *
+     * @param attrs Props of various name, value attrs.
+     */
+    public void applyAttributes(Properties attrs)
+    {
+        /* no-op */;
+    }
+
+
+    /**
+     * Allows the user to retrieve specific attributes on the 
+     * underlying implementation.  
+     * 
+     * This class merely returns the indent for ATTRIBUTE_INDENT.
+     *
+     * //@todo define behavior for subclasses who want our default 
+     * behavior but also want to throw the exception for 
+     * attributes that are not recognized.
+     *
+     * @param name The name of the attribute.
+     * @return value The value of the attribute.
+     * @throws IllegalArgumentException not thrown from this class
+     * 
+     * @see #ATTRIBUTE_INDENT
+     */
+    public Object getAttribute(String name) throws IllegalArgumentException
+    {
+        if (ATTRIBUTE_INDENT.equals(name))
+        {
+            return new Integer(m_indent);
+        }
+        return null;
+    }
+
+
+    /** If our wrapper has a built stylesheet ready.  */ 
+    protected boolean m_stylesheetReady = false;
+
+
+    /**
+     * Reports if a pre-built/pre-compiled stylesheet is ready; 
+     * presumably built by calling buildStylesheet(xslName).
+     *
+     * @return true if one is ready; false otherwise
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public boolean isStylesheetReady()
+    {
+        return m_stylesheetReady;
+    }
+
+
+    /** Set of stylesheet parameters for use in transforms.  */ 
+    protected Hashtable m_params = null;
+
+
+    /**
+     * Set a stylesheet parameter for use in later transforms.  
+     *
+     * This method merely stores the triple for use later in a 
+     * transform operation.  Note that the actual mechanisims for 
+     * setting parameters in implementation differ, especially with 
+     * regards to namespaces.
+     *
+     * Note that the namespace may not contain the "{" or "}"
+     * characters, since these would be illegal XML namespaces 
+     * anyways; an IllegalArgumentException will be thrown.
+     * Note that the name may not begin with the "{" 
+     * character, since it would likely be an illegal XML name
+     * anyways; an IllegalArgumentException will be thrown.
+     *
+     * @param namespace for the parameter
+     * @param name of the parameter
+     * @param value of the parameter
+     *
+     * @throws IllegalArgumentException thrown if the namespace
+     * appears to be illegal.
+     */
+    public void setParameter(String namespace, String name, Object value)
+        throws IllegalArgumentException
+    {
+        if (null != namespace)
+        {
+            if ((namespace.indexOf("{") > -1) 
+                || (namespace.indexOf("}") > -1))
+                throw new IllegalArgumentException(
+                    "setParameter: illegal namespace includes brackets: " + namespace);
+        }
+        if (null != name)
+        {
+            if (name.startsWith("{"))
+                throw new IllegalArgumentException(
+                    "setParameter: illegal name begins with bracket: " + name);
+        }
+        
+        if (null == m_params)
+            m_params = new Hashtable();
+
+        if (null != namespace)
+        {
+            m_params.put("{" + namespace + "}" + name, value);
+        }
+        else
+        {
+            m_params.put(name, value);
+        }
+    }
+
+
+    /**
+     * Get a parameter that was set with setParameter.  
+     *
+     * Only returns parameters set locally, not parameters exposed 
+     * by the underlying processor implementation.  Not terribly useful 
+     * but I always like providing gets for any sets I define.
+     *
+     * @param namespace for the parameter
+     * @param name of the parameter
+     *
+     * @param value of the parameter; null if not found
+     */
+    public Object getParameter(String namespace, String name)
+    {
+        if (null == m_params)
+            return null;
+
+        if (null != namespace)
+        {
+            return m_params.get("{" + namespace + "}" + name);
+        }
+        else
+        {
+            return m_params.get(name);
+        }
+    }
+
+
+    /**
+     * Apply the parameters that were set with setParameter to
+     * our underlying processor implementation.  
+     *
+     * Subclasses may call this to apply all set parameters during 
+     * each transform if they override the applyParameter() method 
+     * to set a single parameter.
+     *
+     * This is a convenience method for getting data out of 
+     * m_params that was encoded by our setParameter().
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     */
+    protected void applyParameters(Object passThru)
+    {
+        if (null == m_params)
+            return;
+
+        for (Enumeration keys = m_params.keys();
+             keys.hasMoreElements(); 
+             /* no increment portion */ )
+        {
+            String namespace = null;
+            String name = null;
+            String key = keys.nextElement().toString();
+            //@todo compare with TransformerImpl.setParameter's use of a StringTokenizer(..., "{}"...
+            // Decode the namespace, if present
+            if (key.startsWith("{"))
+            {
+                int idx = key.indexOf("}");
+                namespace = key.substring(1, idx);
+                name = key.substring(idx + 1); //@todo check for out of range?
+            }
+            else
+            {
+                // namespace stays null
+                name = key;
+            }
+            // Call subclassed worker method for each parameter
+            applyParameter(passThru, namespace, name, m_params.get(key));
+        }
+    }
+
+
+    /**
+     * Apply a single parameter to our underlying processor 
+     * implementation: must be overridden.
+     *
+     * Subclasses must override; this class will throw an 
+     * IllegalStateException since we can't do anything.
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        throw new IllegalStateException("TransformWrapperHelper.applyParameter must be overridden!");
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This class clears the indent and any parameters. 
+     * Subclasses are free to call us to get this default behavior
+     * or not.  Note that subclasses must clear m_stylesheetReady
+     * themselves if needed.  
+     *
+     * @param newProcessor ignored in this class
+     */
+    public void reset(boolean newProcessor)
+    {
+        m_params = null;
+        m_indent = NO_INDENT;
+    }
+
+
+    /**
+     * Static worker method to return default array of longs.
+     *
+     * Simply returns long[] pre-filled to TIME_UNUSED, suitable 
+     * for returning from various transform API's.  May be called 
+     * by external callers to get pre-sized array.
+     *
+     * @return long[] = TIME_UNUSED
+     */
+    public static long[] getTimeArray()
+    {
+        return new long[]
+        {
+            TIME_UNUSED, /* IDX_OVERALL */
+            TIME_UNUSED, /* IDX_XSLREAD */
+            TIME_UNUSED, /* IDX_XSLBUILD */
+            TIME_UNUSED, /* IDX_XMLREAD */
+            TIME_UNUSED, /* IDX_XMLBUILD */
+            TIME_UNUSED, /* IDX_TRANSFORM */
+            TIME_UNUSED, /* IDX_RESULTWRITE */
+            TIME_UNUSED  /* IDX_FIRSTLATENCY */
+        };
+    }
+
+
+    /**
+     * Static worker method to return description of timing slots.
+     *
+     * @return String describing this idx slot in a getTimeArray
+     */
+    public static String getTimeArrayDesc(int idx)
+    {
+        switch (idx)
+        {
+            case IDX_OVERALL:
+                return "OVERALL";
+
+            case IDX_XSLREAD:
+                return "XSLREAD";
+                
+            case IDX_XSLBUILD:
+                return "XSLBUILD";
+                
+            case IDX_XMLREAD:
+                return "XMLREAD";
+                
+            case IDX_XMLBUILD:
+                return "XMLBUILD";
+                
+            case IDX_TRANSFORM:
+                return "TRANSFORM";
+                
+            case IDX_RESULTWRITE:
+                return "RESULTWRITE";
+                
+            case IDX_FIRSTLATENCY:
+                return "FIRSTLATENCY";
+                
+            default:
+                return "ERROR:unknown-getTimeArrayDesc-idx";
+        }
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TraxDOMWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/TraxDOMWrapper.java
new file mode 100644
index 0000000..309bc2f
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TraxDOMWrapper.java
@@ -0,0 +1,577 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.QetestUtils;
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+/**
+ * Implementation of TransformWrapper that uses the TrAX API and 
+ * uses DOMs for it's sources.
+ *
+ * This implementation records separate times for xslRead (time to 
+ * parse the xsl and build a DOM) and xslBuild (time to take the 
+ * DOMSource object until it's built the templates); xmlRead (time 
+ * to parse the xml and build a DOM).  Note xmlBuild is not timed 
+ * since it's not easily measureable in TrAX.
+ * The transform time is just the time to create the DOMResult 
+ * object; the resultsWrite is the separate time it takes to 
+ * serialize that to disk.
+ *
+ * <b>Important!</b>  The underlying System property of 
+ * javax.xml.transform.TransformerFactory will determine the actual 
+ * TrAX implementation used.  This value will be reported out in 
+ * our getProcessorInfo() method.
+ * 
+ * //@todo add in checks for factory.getFeature(DOMSource.FEATURE)
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class TraxDOMWrapper extends TransformWrapperHelper
+{
+
+    /**
+     * TransformerFactory to use; constructed in newProcessor().
+     */
+    protected TransformerFactory factory = null;
+
+
+    /**
+     * Templates to use for buildStylesheet().
+     */
+    protected Templates builtTemplates = null;
+
+
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses TrAX to perform transforms from DOMSource(node)
+     */
+    public String getDescription()
+    {
+        return "Uses TrAX to perform transforms from DOMSource(node)";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "dom");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * For TrAX/javax.xml.transform implementations, this creates 
+     * a new TransformerFactory.  For Xalan-J 1.x this creates an 
+     * XSLTProcessor.  Other implmentations may or may not actually 
+     * do any work in this method.
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        //@todo do we need to do any other cleanup?
+        reset(false);
+        factory = TransformerFactory.newInstance();
+        factory.setErrorListener(new DefaultErrorHandler());
+        // Verify the factory supports DOM!
+        if (!(factory.getFeature(DOMSource.FEATURE)
+              && factory.getFeature(DOMResult.FEATURE)))
+        {   
+            throw new TransformerConfigurationException("TraxDOMWrapper.newProcessor: factory does not support DOM!");
+        }
+        // Set any of our options as Attributes on the factory
+        TraxWrapperUtils.setAttributes(factory, options);
+        return (Object)factory;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed for any underlying 
+     * processor implementation.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long xmlRead = 0;
+        long transform = 0;
+        long resultWrite = 0;
+   
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        dfactory.setNamespaceAware(true);
+        DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+        // Timed: read xsl into a DOM
+        startTime = System.currentTimeMillis();
+        Node xslNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(xslName)));
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create DOMSource and setSystemId
+        DOMSource xslSource = new DOMSource(xslNode);
+        xslSource.setSystemId(QetestUtils.filenameToURL(xslName));
+
+        // Timed: build Transformer from DOMSource
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(xslSource);
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Timed: read xml into a DOM
+        startTime = System.currentTimeMillis();
+        Node xmlNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(xmlName)));
+        xmlRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create DOMSource and setSystemId
+        DOMSource xmlSource = new DOMSource(xmlNode);
+        xmlSource.setSystemId(QetestUtils.filenameToURL(xmlName));
+
+        // Untimed: create DOMResult
+        Document outDoc = docBuilder.newDocument();                
+        DocumentFragment outNode = outDoc.createDocumentFragment();
+        DOMResult domResult = new DOMResult(outNode);
+        
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: build xml (so to speak) and transform
+        startTime = System.currentTimeMillis();
+        transformer.transform(xmlSource, domResult);
+        transform = System.currentTimeMillis() - startTime;
+
+        // Untimed: prepare serializer with outputProperties 
+        //  from the stylesheet
+        Transformer resultSerializer = factory.newTransformer();
+        resultSerializer.setErrorListener(new DefaultErrorHandler());
+        Properties serializationProps = transformer.getOutputProperties();
+        resultSerializer.setOutputProperties(serializationProps);
+        
+        // Timed: writeResults from the DOMResult
+        startTime = System.currentTimeMillis();
+        resultSerializer.transform(new DOMSource(outNode), 
+                             new StreamResult(resultName));
+        resultWrite = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild + xmlRead 
+                             + transform + resultWrite;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_XMLREAD] = xmlRead;
+        times[IDX_TRANSFORM] = transform;
+        times[IDX_RESULTWRITE] = resultWrite;
+        return times;
+    }
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        dfactory.setNamespaceAware(true);
+        DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+        // Timed: read xsl into a DOM
+        startTime = System.currentTimeMillis();
+        Node xslNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(xslName)));
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create DOMSource and setSystemId
+        DOMSource xslSource = new DOMSource(xslNode);
+        xslSource.setSystemId(QetestUtils.filenameToURL(xslName));
+
+        // Timed: build Templates from DOMSource
+        startTime = System.currentTimeMillis();
+        builtTemplates = factory.newTemplates(xslSource);
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        m_stylesheetReady = true;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XMLREAD, 
+     * IDX_TRANSFORM, IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        preventFootShooting();
+        long startTime = 0;
+        long xmlRead = 0;
+        long transform = 0;
+        long resultWrite = 0;
+        
+        // Untimed: get Transformer from Templates
+        Transformer transformer = builtTemplates.newTransformer();
+        transformer.setErrorListener(new DefaultErrorHandler());
+
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        dfactory.setNamespaceAware(true);
+        DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+         // Timed: read xml into a DOM
+        startTime = System.currentTimeMillis();
+        Node xmlNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(xmlName)));
+        xmlRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create DOMSource and setSystemId
+        DOMSource xmlSource = new DOMSource(xmlNode);
+        xmlSource.setSystemId(QetestUtils.filenameToURL(xmlName));
+
+        // Untimed: create DOMResult
+        Document outNode = docBuilder.newDocument();
+        DOMResult domResult = new DOMResult(outNode);
+        
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: build xml (so to speak) and transform
+        startTime = System.currentTimeMillis();
+        transformer.transform(xmlSource, domResult);
+        transform = System.currentTimeMillis() - startTime;
+
+        // Untimed: prepare serializer with outputProperties 
+        //  from the stylesheet
+        Transformer resultSerializer = factory.newTransformer();
+        resultSerializer.setErrorListener(new DefaultErrorHandler());
+        Properties serializationProps = transformer.getOutputProperties();
+        resultSerializer.setOutputProperties(serializationProps);
+        
+        // Timed: writeResults from the DOMResult
+        startTime = System.currentTimeMillis();
+        resultSerializer.transform(new DOMSource(outNode), 
+                             new StreamResult(resultName));
+        resultWrite = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xmlRead + transform + resultWrite;
+        times[IDX_XMLREAD] = xmlRead;
+        times[IDX_TRANSFORM] = transform;
+        times[IDX_RESULTWRITE] = resultWrite;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM, 
+     * and IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long xmlRead = 0;
+        long transform = 0;
+        long resultWrite = 0;
+   
+        DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+        dfactory.setNamespaceAware(true);
+        DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+
+        // Timed: read xml into a DOM
+        startTime = System.currentTimeMillis();
+        Node xmlNode = docBuilder.parse(new InputSource(QetestUtils.filenameToURL(xmlName)));
+        xmlRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create DOMSource and setSystemId
+        DOMSource xmlSource = new DOMSource(xmlNode);
+        xmlSource.setSystemId(QetestUtils.filenameToURL(xmlName));
+
+        // Timed: readxsl from the xml document
+        startTime = System.currentTimeMillis();
+        Source xslSource = factory.getAssociatedStylesheet(xmlSource, 
+                                                           null, null, null);
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Timed: build Transformer from Source
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(xslSource);
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: create DOMResult
+        Document outNode = docBuilder.newDocument();
+        DOMResult domResult = new DOMResult(outNode);
+        
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: build xml (so to speak) and transform
+        startTime = System.currentTimeMillis();
+        transformer.transform(xmlSource, domResult);
+        transform = System.currentTimeMillis() - startTime;
+
+        // Untimed: prepare serializer with outputProperties 
+        //  from the stylesheet
+        Transformer resultSerializer = factory.newTransformer();
+        resultSerializer.setErrorListener(new DefaultErrorHandler());
+        Properties serializationProps = transformer.getOutputProperties();
+        resultSerializer.setOutputProperties(serializationProps);
+        
+        // Timed: writeResults from the DOMResult
+        startTime = System.currentTimeMillis();
+        resultSerializer.transform(new DOMSource(outNode), 
+                             new StreamResult(resultName));
+        resultWrite = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild + xmlRead 
+                             + transform + resultWrite;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_XMLREAD] = xmlRead;
+        times[IDX_TRANSFORM] = transform;
+        times[IDX_RESULTWRITE] = resultWrite;
+        return times;
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+        builtTemplates = null;
+        if (newProcessor)
+        {
+            try
+            {
+                newProcessor(newProcessorOpts);
+            }
+            catch (Exception e)
+            {
+                //@todo Hmm: what should we do here?
+            }
+        }
+    }
+
+
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * Overridden to take a Transformer and call setParameter().
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        try
+        {
+            Transformer t = (Transformer)passThru;
+            // Munge the namespace into the name per 
+            //  javax.xml.transform.Transformer.setParameter()
+            if (null != namespace)
+            {
+                name = "{" + namespace + "}" + name;
+            }
+            t.setParameter(name, value);
+        }
+        catch (Exception e)
+        {
+            throw new IllegalArgumentException("applyParameter threw: " + e.toString());
+        }
+    }
+
+
+    /**
+     * Ensure newProcessor has been called when needed.
+     *
+     * Prevent users from shooting themselves in the foot by 
+     * calling a transform* API before newProcessor().
+     *
+     * (Sorry, I couldn't resist)
+     */
+    public void preventFootShooting() throws Exception
+    {
+        if (null == factory)
+            newProcessor(newProcessorOpts);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TraxFileWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/TraxFileWrapper.java
new file mode 100644
index 0000000..110a73a
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TraxFileWrapper.java
@@ -0,0 +1,431 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+import java.io.File;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+/**
+ * Implementation of TransformWrapper that uses the TrAX API and 
+ * uses files for it's sources.
+ *
+ * This is the second most common usage:
+ * transformer = factory.newTransformer(new StreamSource(new File(xslName)));
+ * transformer.transform(new StreamSource(new File(xmlName)), new StreamResult(resultFileName));
+ *
+ * <b>Important!</b>  The underlying System property of 
+ * javax.xml.transform.TransformerFactory will determine the actual 
+ * TrAX implementation used.  This value will be reported out in 
+ * our getProcessorInfo() method.
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class TraxFileWrapper extends TransformWrapperHelper
+{
+
+    /**
+     * TransformerFactory to use; constructed in newProcessor().
+     */
+    protected TransformerFactory factory = null;
+
+
+    /**
+     * Templates to use for buildStylesheet().
+     */
+    protected Templates builtTemplates = null;
+
+
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses TrAX to perform transforms from StreamSource(systemId)
+     */
+    public String getDescription()
+    {
+        return "Uses TrAX to perform transforms from StreamSource(new File(filename))";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "file");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * For TrAX/javax.xml.transform implementations, this creates 
+     * a new TransformerFactory.  For Xalan-J 1.x this creates an 
+     * XSLTProcessor.  Other implmentations may or may not actually 
+     * do any work in this method.
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        //@todo do we need to do any other cleanup?
+        reset(false);
+        factory = TransformerFactory.newInstance();
+        factory.setErrorListener(new DefaultErrorHandler());
+        // Verify the factory supports Streams!
+        if (!(factory.getFeature(StreamSource.FEATURE)
+              && factory.getFeature(StreamResult.FEATURE)))
+        {   
+            throw new TransformerConfigurationException("TraxFileWrapper.newProcessor: factory does not support Streams!");
+        }
+        // Set any of our options as Attributes on the factory
+        TraxWrapperUtils.setAttributes(factory, options);
+        return (Object)factory;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed for any underlying 
+     * processor implementation.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        
+        // Timed: read/build xsl from a File
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(new StreamSource(new File(xslName)));
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(new File(xmlName)), new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild + transform;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+        
+        // Timed: read/build xsl from a URL
+        startTime = System.currentTimeMillis();
+        builtTemplates = factory.newTemplates(new StreamSource(new File(xslName)));
+        xslBuild = System.currentTimeMillis() - startTime;
+        m_stylesheetReady = true;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild;
+        times[IDX_XSLBUILD] = xslBuild;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        preventFootShooting();
+        long startTime = 0;
+        long transform = 0;
+        
+        // UNTimed: get Transformer from Templates
+        Transformer transformer = builtTemplates.newTransformer();
+        transformer.setErrorListener(new DefaultErrorHandler());
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(new File(xmlName)), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = transform;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        
+        // Timed: readxsl from the xml document
+        startTime = System.currentTimeMillis();
+        Source xslSource = factory.getAssociatedStylesheet(new StreamSource(new File(xmlName)), 
+                                                              null, null, null);
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Timed: build xsl from a URL
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(xslSource);
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(new File(xmlName)), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild + transform;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+        builtTemplates = null;
+        if (newProcessor)
+        {
+            try
+            {
+                newProcessor(newProcessorOpts);
+            }
+            catch (Exception e)
+            {
+                //@todo Hmm: what should we do here?
+            }
+        }
+    }
+
+
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * Overridden to take a Transformer and call setParameter().
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        try
+        {
+            Transformer t = (Transformer)passThru;
+            // Munge the namespace into the name per 
+            //  javax.xml.transform.Transformer.setParameter()
+            if (null != namespace)
+            {
+                name = "{" + namespace + "}" + name;
+            }
+            t.setParameter(name, value);
+        }
+        catch (Exception e)
+        {
+            throw new IllegalArgumentException("applyParameter threw: " + e.toString());
+        }
+    }
+
+
+    /**
+     * Ensure newProcessor has been called when needed.
+     *
+     * Prevent users from shooting themselves in the foot by 
+     * calling a transform* API before newProcessor().
+     *
+     * (Sorry, I couldn't resist)
+     */
+    public void preventFootShooting() throws Exception
+    {
+        if (null == factory)
+            newProcessor(newProcessorOpts);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TraxLocalPathWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/TraxLocalPathWrapper.java
new file mode 100644
index 0000000..3ce6afb
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TraxLocalPathWrapper.java
@@ -0,0 +1,438 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+/**
+ * Implementation of TransformWrapper that uses the TrAX API and 
+ * uses supplied local paths for it's sources.
+ *
+ * This is the most common usage:
+ * transformer = factory.newTransformer(new StreamSource(xslPath));
+ * transformer.transform(new StreamSource(xmlPath), new StreamResult(resultFileName));
+ *
+ * Note that URLs are theoretically required by the TrAX API's, so 
+ * this is not necessarily a good test...  It is essentially the 
+ * same as TraxLocalPathWrapper without calling filenameToURL().
+ *
+ * <b>Important!</b>  The underlying System property of 
+ * javax.xml.transform.TransformerFactory will determine the actual 
+ * TrAX implementation used.  This value will be reported out in 
+ * our getProcessorInfo() method.
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class TraxLocalPathWrapper extends TransformWrapperHelper
+{
+
+    /**
+     * TransformerFactory to use; constructed in newProcessor().
+     */
+    protected TransformerFactory factory = null;
+
+
+    /**
+     * Templates to use for buildStylesheet().
+     */
+    protected Templates builtTemplates = null;
+
+
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses TrAX to perform transforms from StreamSource(localPath)
+     */
+    public String getDescription()
+    {
+        return "Uses TrAX to perform transforms from StreamSource(localPath)";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "localPath");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * For TrAX/javax.xml.transform implementations, this creates 
+     * a new TransformerFactory.  For Xalan-J 1.x this creates an 
+     * XSLTProcessor.  Other implmentations may or may not actually 
+     * do any work in this method.
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        //@todo do we need to do any other cleanup?
+        reset(false);
+        factory = TransformerFactory.newInstance();
+        factory.setErrorListener(new DefaultErrorHandler());
+        // Verify the factory supports Streams!
+        if (!(factory.getFeature(StreamSource.FEATURE)
+              && factory.getFeature(StreamResult.FEATURE)))
+        {   
+            throw new TransformerConfigurationException("TraxLocalPathWrapper.newProcessor: factory does not support Streams!");
+        }
+        // Set any of our options as Attributes on the factory
+        TraxWrapperUtils.setAttributes(factory, options);
+        return (Object)factory;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed for any underlying 
+     * processor implementation.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        
+        // Timed: read/build xsl from a URL
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(
+                new StreamSource(xslName));
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(xmlName), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild + transform;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+        
+        // Timed: read/build xsl from a URL
+        startTime = System.currentTimeMillis();
+        builtTemplates = factory.newTemplates(
+                new StreamSource(xslName));
+        xslBuild = System.currentTimeMillis() - startTime;
+        m_stylesheetReady = true;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild;
+        times[IDX_XSLBUILD] = xslBuild;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        preventFootShooting();
+        long startTime = 0;
+        long transform = 0;
+        
+        // UNTimed: get Transformer from Templates
+        Transformer transformer = builtTemplates.newTransformer();
+        transformer.setErrorListener(new DefaultErrorHandler());
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(xmlName), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = transform;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        
+        // Timed: readxsl from the xml document
+        startTime = System.currentTimeMillis();
+        Source xslSource = factory.getAssociatedStylesheet(new StreamSource(xmlName), 
+                                                              null, null, null);
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Timed: build xsl from a URL
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(xslSource);
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(xmlName), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild + transform;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+        builtTemplates = null;
+        if (newProcessor)
+        {
+            try
+            {
+                newProcessor(newProcessorOpts);
+            }
+            catch (Exception e)
+            {
+                //@todo Hmm: what should we do here?
+            }
+        }
+    }
+
+
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * Overridden to take a Transformer and call setParameter().
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        try
+        {
+            Transformer t = (Transformer)passThru;
+            // Munge the namespace into the name per 
+            //  javax.xml.transform.Transformer.setParameter()
+            if (null != namespace)
+            {
+                name = "{" + namespace + "}" + name;
+            }
+            t.setParameter(name, value);
+        }
+        catch (Exception e)
+        {
+            throw new IllegalArgumentException("applyParameter threw: " + e.toString());
+        }
+    }
+
+
+    /**
+     * Ensure newProcessor has been called when needed.
+     *
+     * Prevent users from shooting themselves in the foot by 
+     * calling a transform* API before newProcessor().
+     *
+     * (Sorry, I couldn't resist)
+     */
+    public void preventFootShooting() throws Exception
+    {
+        if (null == factory)
+            newProcessor(newProcessorOpts);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TraxSAXWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/TraxSAXWrapper.java
new file mode 100644
index 0000000..8d06cc1
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TraxSAXWrapper.java
@@ -0,0 +1,617 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TemplatesHandler;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.qetest.QetestUtils;
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * Implementation of TransformWrapper that uses the TrAX API and 
+ * uses SAXSource/SAXResult whenever possible.
+ *
+ * <p>This implementation uses SAX to build the stylesheet and 
+ * to perform the transformation.</p>
+ * 
+ * <p><b>Important!</b>  The underlying System property of 
+ * javax.xml.transform.TransformerFactory will determine the actual 
+ * TrAX implementation used.  This value will be reported out in 
+ * our getProcessorInfo() method.</p>
+ *
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class TraxSAXWrapper extends TransformWrapperHelper
+{
+
+    /**
+     * TransformerFactory to use; constructed in newProcessor().
+     */
+    protected TransformerFactory factory = null;
+
+
+    /**
+     * SAXTransformerFactory we actually use; constructed in newProcessor().
+     */
+    protected SAXTransformerFactory saxFactory = null;
+
+
+    /**
+     * Templates to use for buildStylesheet().
+     */
+    protected Templates builtTemplates = null;
+
+
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses TrAX to perform transforms from SAXSource(systemId)
+     */
+    public String getDescription()
+    {
+        return "Uses TrAX to perform transforms from SAXSource(stream)";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "sax");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * For TrAX/javax.xml.transform implementations, this creates 
+     * a new TransformerFactory.  
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        //@todo do we need to do any other cleanup?
+        reset(false);
+        factory = TransformerFactory.newInstance();
+        factory.setErrorListener(new DefaultErrorHandler());
+        // Verify the factory supports SAX!
+        if (!(factory.getFeature(SAXSource.FEATURE)
+              && factory.getFeature(SAXResult.FEATURE)))
+        {   
+            throw new TransformerConfigurationException("TraxSAXWrapper.newProcessor: factory does not support SAX!");
+        }
+        // Set any of our options as Attributes on the factory
+        TraxWrapperUtils.setAttributes(factory, options);
+        saxFactory = (SAXTransformerFactory)factory;
+        return (Object)saxFactory;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file using SAX.
+     *
+     * Pseudocode:
+     * <code> 
+     *   // Read/build stylesheet
+     *   xslReader.setContentHandler(templatesHandler);
+     *   xslReader.parse(xslName);
+     *
+     *   xslOutputProps = templates.getOutputProperties();
+     *   // Set features and tie in DTD, lexical, etc. handling
+     *   
+     *   serializingHandler.getTransformer().setOutputProperties(xslOutputProps);
+     *   serializingHandler.setResult(new StreamResult(outBytes));
+     *   stylesheetHandler.setResult(new SAXResult(serializingHandler));
+     *   xmlReader.setContentHandler(stylesheetHandler); 
+     *   // Perform Transform
+     *   xmlReader.parse(xmlName);
+     *   // Separately: write bytes to disk
+     * </code>
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, 
+     * IDX_TRANSFORM, IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        long resultWrite = 0;
+
+        // Create a ContentHandler to handle parsing of the xsl
+        TemplatesHandler templatesHandler = saxFactory.newTemplatesHandler();
+
+        // Create an XMLReader and set its ContentHandler.
+        // Be sure to use the JAXP methods only!
+        XMLReader xslReader = getJAXPXMLReader();
+        xslReader.setContentHandler(templatesHandler);
+
+        // Timed: read/build Templates from StreamSource
+        startTime = System.currentTimeMillis();
+        xslReader.parse(QetestUtils.filenameToURL(xslName));
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Get the Templates object from the ContentHandler.
+        Templates templates = templatesHandler.getTemplates();
+        // Get the outputProperties from the stylesheet, so 
+        //  we can later use them for the serialization
+        Properties xslOutputProps = templates.getOutputProperties();
+
+        // Create a ContentHandler to handle parsing of the XML
+        TransformerHandler stylesheetHandler = saxFactory.newTransformerHandler(templates);
+        // Also set systemId to the stylesheet
+        stylesheetHandler.setSystemId(QetestUtils.filenameToURL(xslName));
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(stylesheetHandler.getTransformer(), newProcessorOpts);
+
+        // Apply any parameters needed
+        applyParameters(stylesheetHandler.getTransformer());
+
+        // Use a new XMLReader to parse the XML document
+        XMLReader xmlReader = getJAXPXMLReader();
+        xmlReader.setContentHandler(stylesheetHandler); 
+
+        // Set the ContentHandler to also function as LexicalHandler,
+        // includes "lexical" events (e.g., comments and CDATA). 
+        xmlReader.setProperty(
+                "http://xml.org/sax/properties/lexical-handler", 
+                stylesheetHandler);
+
+        // Also attempt to set as a DeclHandler, which Xalan-J 
+        //  supports even though it is not required by JAXP
+        // Ignore exceptions for other processors since this 
+        //  is not a required setting
+        try
+        {
+            xmlReader.setProperty(
+                    "http://xml.org/sax/properties/declaration-handler",
+                    stylesheetHandler);
+        } 
+        catch (SAXException se) { /* no-op - ignore */ }
+        
+        // added by sb. Tie together DTD and other handling
+        xmlReader.setDTDHandler(stylesheetHandler);
+        try
+        {
+            xmlReader.setFeature(
+                    "http://xml.org/sax/features/namespace-prefixes",
+                    true);
+        }
+        catch (SAXException se) { /* no-op - ignore */ }
+        try
+        {
+            xmlReader.setFeature(
+                    "http://apache.org/xml/features/validation/dynamic",
+                    true);
+        }
+        catch (SAXException se) { /* no-op - ignore */ }
+
+        // Create a 'pipe'-like identity transformer, so we can 
+        //  easily get our results serialized to disk
+        TransformerHandler serializingHandler = saxFactory.newTransformerHandler();
+        // Set the stylesheet's output properties into the output 
+        //  via it's Transformer
+        serializingHandler.getTransformer().setOutputProperties(xslOutputProps);
+
+        // Create StreamResult to byte stream in memory
+        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
+        StreamResult byteResult = new StreamResult(outBytes);
+        serializingHandler.setResult(byteResult);
+
+        // Create a SAXResult dumping into our 'pipe' serializer
+        //  and tie in lexical handling (is any other handling needed?)
+        SAXResult saxResult = new SAXResult(serializingHandler);
+        saxResult.setLexicalHandler(serializingHandler);
+
+        // Set the original stylesheet to dump into our result
+        stylesheetHandler.setResult(saxResult);
+
+        // Timed: Parse the XML input document and do transform
+        startTime = System.currentTimeMillis();
+        xmlReader.parse(QetestUtils.filenameToURL(xmlName));
+        transform = System.currentTimeMillis() - startTime;
+
+        // Timed: writeResults from the byte array
+        startTime = System.currentTimeMillis();
+        byte[] writeBytes = outBytes.toByteArray(); // Should this be timed too or not?
+                                                    // @see TraxStreamWrapper
+        FileOutputStream writeStream = new FileOutputStream(resultName);
+        writeStream.write(writeBytes);
+        writeStream.close();
+        resultWrite = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild + transform + resultWrite;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        times[IDX_RESULTWRITE] = resultWrite;
+        return times;
+    }
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+
+        // Create a ContentHandler to handle parsing of the xsl
+        TemplatesHandler templatesHandler = saxFactory.newTemplatesHandler();
+
+        // Create an XMLReader and set its ContentHandler.
+        XMLReader xslReader = getJAXPXMLReader();
+        xslReader.setContentHandler(templatesHandler);
+
+        // Timed: read/build Templates from StreamSource
+        startTime = System.currentTimeMillis();
+        xslReader.parse(QetestUtils.filenameToURL(xslName));
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Also set systemId to the stylesheet
+        templatesHandler.setSystemId(QetestUtils.filenameToURL(xslName));
+
+        // Get the Templates object from the ContentHandler.
+        builtTemplates = templatesHandler.getTemplates();
+        m_stylesheetReady = true;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild;
+        times[IDX_XSLBUILD] = xslBuild;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, 
+     * IDX_XMLREAD, IDX_TRANSFORM, IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long xmlRead = 0;
+        long transform = 0;
+        long resultWrite = 0;
+   
+        // Get the outputProperties from the stylesheet, so 
+        //  we can later use them for the serialization
+        Properties xslOutputProps = builtTemplates.getOutputProperties();
+
+        // Create a ContentHandler to handle parsing of the XML
+        TransformerHandler stylesheetHandler = saxFactory.newTransformerHandler(builtTemplates);
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(stylesheetHandler.getTransformer(), newProcessorOpts);
+
+        // Apply any parameters needed
+        applyParameters(stylesheetHandler.getTransformer());
+
+        // Use a new XMLReader to parse the XML document
+        XMLReader xmlReader = getJAXPXMLReader();
+        xmlReader.setContentHandler(stylesheetHandler); 
+
+        // Set the ContentHandler to also function as LexicalHandler,
+        // includes "lexical" events (e.g., comments and CDATA). 
+        xmlReader.setProperty(
+                "http://xml.org/sax/properties/lexical-handler", 
+                stylesheetHandler);
+        xmlReader.setProperty(
+                "http://xml.org/sax/properties/declaration-handler",
+                stylesheetHandler);
+        
+        // added by sb. Tie together DTD and other handling
+        xmlReader.setDTDHandler(stylesheetHandler);
+        try
+        {
+            xmlReader.setFeature(
+                    "http://xml.org/sax/features/namespace-prefixes",
+                    true);
+        }
+        catch (SAXException se) { /* no-op - ignore */ }
+        try
+        {
+            xmlReader.setFeature(
+                    "http://apache.org/xml/features/validation/dynamic",
+                    true);
+        }
+        catch (SAXException se) { /* no-op - ignore */ }
+
+        // Create a 'pipe'-like identity transformer, so we can 
+        //  easily get our results serialized to disk
+        TransformerHandler serializingHandler = saxFactory.newTransformerHandler();
+        // Set the stylesheet's output properties into the output 
+        //  via it's Transformer
+        serializingHandler.getTransformer().setOutputProperties(xslOutputProps);
+
+        // Create StreamResult to byte stream in memory
+        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
+        StreamResult byteResult = new StreamResult(outBytes);
+        serializingHandler.setResult(byteResult);
+
+        // Create a SAXResult dumping into our 'pipe' serializer
+        //  and tie in lexical handling (is any other handling needed?)
+        SAXResult saxResult = new SAXResult(serializingHandler);
+        saxResult.setLexicalHandler(serializingHandler);
+
+        // Set the original stylesheet to dump into our result
+        stylesheetHandler.setResult(saxResult);
+
+        // Timed: Parse the XML input document and do transform
+        startTime = System.currentTimeMillis();
+        xmlReader.parse(QetestUtils.filenameToURL(xmlName));
+        transform = System.currentTimeMillis() - startTime;
+
+        // Timed: writeResults from the byte array
+        startTime = System.currentTimeMillis();
+        byte[] writeBytes = outBytes.toByteArray(); // Should this be timed too or not?
+                                                    // @see TraxStreamWrapper
+        FileOutputStream writeStream = new FileOutputStream(resultName);
+        writeStream.write(writeBytes);
+        writeStream.close();
+        resultWrite = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = transform + resultWrite;
+        times[IDX_TRANSFORM] = transform;
+        times[IDX_RESULTWRITE] = resultWrite;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long transform = 0;
+
+        throw new RuntimeException("TraxSAXWrapper.transformEmbedded not implemented yet!");
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+        builtTemplates = null;
+        if (newProcessor)
+        {
+            try
+            {
+                newProcessor(newProcessorOpts);
+            }
+            catch (Exception e)
+            {
+                //@todo Hmm: what should we do here?
+            }
+        }
+    }
+
+
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * Overridden to take a Transformer and call setParameter().
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        try
+        {
+            Transformer t = (Transformer)passThru;
+            // Munge the namespace into the name per 
+            //  javax.xml.transform.Transformer.setParameter()
+            if (null != namespace)
+            {
+                name = "{" + namespace + "}" + name;
+            }
+            t.setParameter(name, value);
+        }
+        catch (Exception e)
+        {
+            throw new IllegalArgumentException("applyParameter threw: " + e.toString());
+        }
+    }
+
+
+    /**
+     * Ensure newProcessor has been called when needed.
+     *
+     * Prevent users from shooting themselves in the foot by 
+     * calling a transform* API before newProcessor().
+     *
+     * (Sorry, I couldn't resist)
+     */
+    public void preventFootShooting() throws Exception
+    {
+        if (null == factory)
+            newProcessor(newProcessorOpts);
+    }
+
+
+    /**
+     * Worker method to get an XMLReader.
+     *
+     * Not the most efficient of methods, but makes the code simpler.
+     *
+     * @return a new XMLReader for use, with setNamespaceAware(true)
+     */
+    protected XMLReader getJAXPXMLReader()
+            throws Exception
+    {
+        // Be sure to use the JAXP methods only!
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        SAXParser saxParser = factory.newSAXParser();
+        return saxParser.getXMLReader();
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TraxStreamWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/TraxStreamWrapper.java
new file mode 100644
index 0000000..6591651
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TraxStreamWrapper.java
@@ -0,0 +1,587 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.QetestUtils;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+/**
+ * Implementation of TransformWrapper that uses the TrAX API and 
+ * uses in-memory streams for it's sources.
+ *
+ * <p>This implementation separates the process of reading xml and xsl 
+ * files from disk into byte arrays out from the time processing of 
+ * a new StreamSource(byte[]) takes to build a stylesheet.
+ * It also separates the time of performing the transformation 
+ * to a StreamResult(byte[]) from the time spent simply sending 
+ * the byte[] through a FileOutputStream to disk.</p>
+ * 
+ * <p><b>Important!</b>  The underlying System property of 
+ * javax.xml.transform.TransformerFactory will determine the actual 
+ * TrAX implementation used.  This value will be reported out in 
+ * our getProcessorInfo() method.</p>
+ *
+ * <p>//@todo: currently limited to reading in files whose length 
+ * will fit into an int value.  The actual file reading routine 
+ * should be updated in several of our methods.</p>
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class TraxStreamWrapper extends TransformWrapperHelper
+{
+
+    /**
+     * TransformerFactory to use; constructed in newProcessor().
+     */
+    protected TransformerFactory factory = null;
+
+
+    /**
+     * Templates to use for buildStylesheet().
+     */
+    protected Templates builtTemplates = null;
+
+
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses TrAX to perform transforms from StreamSource(systemId)
+     */
+    public String getDescription()
+    {
+        return "Uses TrAX to perform transforms from StreamSource(stream)";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "streams");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * For TrAX/javax.xml.transform implementations, this creates 
+     * a new TransformerFactory.  
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        //@todo do we need to do any other cleanup?
+        reset(false);
+        factory = TransformerFactory.newInstance();
+        factory.setErrorListener(new DefaultErrorHandler());
+        // Verify the factory supports Streams!
+        if (!(factory.getFeature(StreamSource.FEATURE)
+              && factory.getFeature(StreamResult.FEATURE)))
+        {   
+            throw new TransformerConfigurationException("TraxStreamWrapper.newProcessor: factory does not support Streams!");
+        }
+        // Set any of our options as Attributes on the factory
+        TraxWrapperUtils.setAttributes(factory, options);
+        return (Object)factory;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be read as byte streams before being passed to 
+     * underlying StreamSources, etc.  
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD, IDX_XSLBUILD, 
+     * IDX_XMLREAD, IDX_TRANSFORM, IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long xmlRead = 0;
+        long transform = 0;
+        long resultWrite = 0;		
+   
+        File xslFile = new File(xslName);
+        int xslLength = new Long(xslFile.length()).intValue(); //@todo warning: possible overflow
+        byte[] xslBytes = new byte[xslLength];
+        FileInputStream xslStream = new FileInputStream(xslFile);
+        // Timed: read xsl into a byte array
+        startTime = System.currentTimeMillis();
+        int xslRetVal = xslStream.read(xslBytes);
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create StreamSource and setSystemId
+        StreamSource xslSource = new StreamSource(new ByteArrayInputStream(xslBytes));
+        // Note that systemIds must be a legal URI
+        xslSource.setSystemId(QetestUtils.filenameToURL(xslName));
+
+        // Timed: build Transformer from StreamSource
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(xslSource);
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        File xmlFile = new File(xmlName);
+        int xmlLength = new Long(xmlFile.length()).intValue(); //@todo warning: possible overflow
+        byte[] xmlBytes = new byte[xmlLength];
+        FileInputStream xmlStream = new FileInputStream(xmlFile);
+        // Timed: read xml into a byte array
+        startTime = System.currentTimeMillis();
+        int xmlRetVal = xmlStream.read(xmlBytes);
+        xmlRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create StreamSource and setSystemId
+        StreamSource xmlSource = new StreamSource(new ByteArrayInputStream(xmlBytes));
+        xmlSource.setSystemId(QetestUtils.filenameToURL(xmlName));
+
+        // Untimed: create StreamResult
+        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
+        StreamResult byteResult = new StreamResult(outBytes);
+        
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: build xml (so to speak) and transform
+        startTime = System.currentTimeMillis();
+        transformer.transform(xmlSource, byteResult);
+        transform = System.currentTimeMillis() - startTime;
+
+        // Timed: writeResults from the byte array
+        startTime = System.currentTimeMillis();
+        byte[] writeBytes = outBytes.toByteArray(); // Should this be timed too or not?
+        FileOutputStream writeStream = new FileOutputStream(resultName);
+        writeStream.write(writeBytes);
+        writeStream.close();
+        resultWrite = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild + xmlRead 
+                             + transform + resultWrite;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_XMLREAD] = xmlRead;
+        times[IDX_TRANSFORM] = transform;
+        times[IDX_RESULTWRITE] = resultWrite;
+        return times;
+    }
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        
+        File xslFile = new File(xslName);
+        int xslLength = new Long(xslFile.length()).intValue(); //@todo warning: possible overflow
+        byte[] xslBytes = new byte[xslLength];
+        FileInputStream xslStream = new FileInputStream(xslFile);
+        // Timed: read xsl into a byte array
+        startTime = System.currentTimeMillis();
+        int xslRetVal = xslStream.read(xslBytes);
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create StreamSource and setSystemId
+        StreamSource xslSource = new StreamSource(new ByteArrayInputStream(xslBytes));
+        // Note that systemIds must be a legal URI
+        xslSource.setSystemId(QetestUtils.filenameToURL(xslName));
+
+        // Timed: build Transformer from StreamSource
+        startTime = System.currentTimeMillis();
+        builtTemplates = factory.newTemplates(xslSource);
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Set internal state that we have a templates ready
+        //  Note: in theory, there's no need to check builtTemplates
+        //  since the newTemplates should never return null
+        //  (it might have thrown an exception, but we don't care)
+        m_stylesheetReady = true;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild + xslRead;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, 
+     * IDX_XMLREAD, IDX_TRANSFORM, IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        preventFootShooting();
+		long getTransformer = 0; // This is timed in DataPower's xsltMark
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long xmlRead = 0;
+        long transform = 0;
+        long resultWrite = 0;
+   
+        // Timed: get Transformer from Templates
+		startTime = System.currentTimeMillis();
+        Transformer transformer = builtTemplates.newTransformer();
+        transformer.setErrorListener(new DefaultErrorHandler());
+	getTransformer = System.currentTimeMillis() - startTime;
+
+        File xmlFile = new File(xmlName);
+        int xmlLength = new Long(xmlFile.length()).intValue(); //@todo warning: possible overflow
+        byte[] xmlBytes = new byte[xmlLength];
+        FileInputStream xmlStream = new FileInputStream(xmlFile);
+        // Timed: read xml into a byte array
+        startTime = System.currentTimeMillis();
+        int xmlRetVal = xmlStream.read(xmlBytes);
+        xmlRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create StreamSource and setSystemId
+        StreamSource xmlSource = new StreamSource(new ByteArrayInputStream(xmlBytes));
+        xmlSource.setSystemId(QetestUtils.filenameToURL(xmlName));
+
+        // Untimed: create StreamResult
+        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
+        StreamResult byteResult = new StreamResult(outBytes);
+        
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: build xml (so to speak) and transform
+        startTime = System.currentTimeMillis();
+        transformer.transform(xmlSource, byteResult);
+        transform = System.currentTimeMillis() - startTime;
+
+        // Timed: writeResults from the byte array
+        startTime = System.currentTimeMillis();
+        byte[] writeBytes = outBytes.toByteArray(); // Should this be timed too or not?
+        FileOutputStream writeStream = new FileOutputStream(resultName);
+        writeStream.write(writeBytes);
+        writeStream.close();
+        resultWrite = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = getTransformer + xmlRead + transform + resultWrite;
+        times[IDX_XMLREAD] = xmlRead;
+        times[IDX_TRANSFORM] = getTransformer + xmlRead + transform;
+        times[IDX_RESULTWRITE] = resultWrite;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM, 
+     * IDX_XMLREAD, IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long xmlRead = 0;
+        long transform = 0;
+        long resultWrite = 0;
+        
+
+        File xmlFile = new File(xmlName);
+        int xmlLength = new Long(xmlFile.length()).intValue(); //@todo warning: possible overflow
+        byte[] xmlBytes = new byte[xmlLength];
+        FileInputStream xmlStream = new FileInputStream(xmlFile);
+        // Timed: read xml into a byte array
+        startTime = System.currentTimeMillis();
+        int xmlRetVal = xmlStream.read(xmlBytes);
+        xmlRead = System.currentTimeMillis() - startTime;
+
+        // Untimed: create StreamSource and setSystemId
+        StreamSource xmlSource = new StreamSource(new ByteArrayInputStream(xmlBytes));
+        xmlSource.setSystemId(QetestUtils.filenameToURL(xmlName));
+
+        // Timed: readxsl from the xml document
+        // Should this be timed as something?
+        startTime = System.currentTimeMillis();
+        Source xslSource = factory.getAssociatedStylesheet(xmlSource, null, null, null);
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Timed: build xsl from a URL
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(xslSource);
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Re-read the XML file for use in transform; not timed
+        xmlFile = new File(xmlName);
+        xmlLength = new Long(xmlFile.length()).intValue(); //@todo warning: possible overflow
+        xmlBytes = new byte[xmlLength];
+        xmlStream = new FileInputStream(xmlFile);
+        xmlRetVal = xmlStream.read(xmlBytes);
+
+        // Untimed: create StreamSource and setSystemId
+        xmlSource = new StreamSource(new ByteArrayInputStream(xmlBytes));
+        xmlSource.setSystemId(QetestUtils.filenameToURL(xmlName));
+
+        // Untimed: create StreamResult
+        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
+        StreamResult byteResult = new StreamResult(outBytes);
+        
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: build xml (so to speak) and transform
+        startTime = System.currentTimeMillis();
+        transformer.transform(xmlSource, byteResult);
+        transform = System.currentTimeMillis() - startTime;
+
+        // Timed: writeResults from the byte array
+        startTime = System.currentTimeMillis();
+        byte[] writeBytes = outBytes.toByteArray(); // Should this be timed too or not?
+        FileOutputStream writeStream = new FileOutputStream(resultName);
+        writeStream.write(writeBytes);
+        writeStream.close();
+        resultWrite = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild + xmlRead 
+                             + transform + resultWrite;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_XMLREAD] = xmlRead;
+        times[IDX_TRANSFORM] = transform;
+        times[IDX_RESULTWRITE] = resultWrite;
+        return times;
+
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+        builtTemplates = null;
+        if (newProcessor)
+        {
+            try
+            {
+                newProcessor(newProcessorOpts);
+            }
+            catch (Exception e)
+            {
+                //@todo Hmm: what should we do here?
+            }
+        }
+    }
+
+
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * Overridden to take a Transformer and call setParameter().
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        try
+        {
+            Transformer t = (Transformer)passThru;
+            // Munge the namespace into the name per 
+            //  javax.xml.transform.Transformer.setParameter()
+            if (null != namespace)
+            {
+                name = "{" + namespace + "}" + name;
+            }
+            t.setParameter(name, value);
+        }
+        catch (Exception e)
+        {
+            throw new IllegalArgumentException("applyParameter threw: " + e.toString());
+        }
+    }
+
+
+    /**
+     * Ensure newProcessor has been called when needed.
+     *
+     * Prevent users from shooting themselves in the foot by 
+     * calling a transform* API before newProcessor().
+     *
+     * (Sorry, I couldn't resist)
+     */
+    public void preventFootShooting() throws Exception
+    {
+        if (null == factory)
+            newProcessor(newProcessorOpts);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TraxSystemId3Wrapper.java b/test/java/src/org/apache/qetest/xslwrapper/TraxSystemId3Wrapper.java
new file mode 100644
index 0000000..a2f177e
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TraxSystemId3Wrapper.java
@@ -0,0 +1,274 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.QetestUtils;
+
+/**
+ * Implementation of TransformWrapper that uses the TrAX API and 
+ * uses systemId URL's for it's sources; plus always transforms 
+ * the xml file <b>three</b> times.
+ *
+ * This is the most common usage:
+ * transformer = factory.newTransformer(new StreamSource(xslURL));
+ * transformer.transform(new StreamSource(xmlURL), new StreamResult(resultFileName));
+ *
+ * <b>Important!</b>  The underlying System property of 
+ * javax.xml.transform.TransformerFactory will determine the actual 
+ * TrAX implementation used.  This value will be reported out in 
+ * our getProcessorInfo() method.
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class TraxSystemId3Wrapper extends TraxSystemIdWrapper
+{
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses TrAX to perform THREE transforms from StreamSource(systemId)
+     */
+    public String getDescription()
+    {
+        return "Uses TrAX to perform THREE transforms from StreamSource(systemId)";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "systemId3");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file <b>three</b> times.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed for any underlying 
+     * processor implementation.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        
+        // Timed: read/build xsl from a URL
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(
+                new StreamSource(QetestUtils.filenameToURL(xslName)));
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        // Only time the first transform, but do two more
+        // This is to test transformer re-use
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                      new StreamResult(resultName));
+
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                      new StreamResult(resultName));
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild + transform;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file <b>three</b> times.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        preventFootShooting();
+        long startTime = 0;
+        long transform = 0;
+        
+        // UNTimed: get Transformer from Templates
+        Transformer transformer = builtTemplates.newTransformer();
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        // Only time the first transform, but do two more
+        // This is to test transformer re-use
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = transform;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        
+        // Timed: readxsl from the xml document
+        startTime = System.currentTimeMillis();
+        Source xslSource = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                                                              null, null, null);
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Timed: build xsl from a URL
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(xslSource);
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        // Only time the first transform, but do two more
+        // This is to test transformer re-use
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild + transform;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TraxSystemIdWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/TraxSystemIdWrapper.java
new file mode 100644
index 0000000..162b7e6
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TraxSystemIdWrapper.java
@@ -0,0 +1,436 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.qetest.QetestUtils;
+import org.apache.xml.utils.DefaultErrorHandler;
+
+/**
+ * Implementation of TransformWrapper that uses the TrAX API and 
+ * uses systemId URL's for it's sources.
+ *
+ * This is the most common usage:
+ * transformer = factory.newTransformer(new StreamSource(xslURL));
+ * transformer.transform(new StreamSource(xmlURL), new StreamResult(resultFileName));
+ *
+ * <b>Important!</b>  The underlying System property of 
+ * javax.xml.transform.TransformerFactory will determine the actual 
+ * TrAX implementation used.  This value will be reported out in 
+ * our getProcessorInfo() method.
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class TraxSystemIdWrapper extends TransformWrapperHelper
+{
+
+    /**
+     * TransformerFactory to use; constructed in newProcessor().
+     */
+    protected TransformerFactory factory = null;
+
+
+    /**
+     * Templates to use for buildStylesheet().
+     */
+    protected Templates builtTemplates = null;
+
+
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses TrAX to perform transforms from StreamSource(systemId)
+     */
+    public String getDescription()
+    {
+        return "Uses TrAX to perform transforms from StreamSource(systemId)";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "systemId");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * For TrAX/javax.xml.transform implementations, this creates 
+     * a new TransformerFactory.  For Xalan-J 1.x this creates an 
+     * XSLTProcessor.  Other implmentations may or may not actually 
+     * do any work in this method.
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        //@todo do we need to do any other cleanup?
+        reset(false);
+        factory = TransformerFactory.newInstance();
+        factory.setErrorListener(new DefaultErrorHandler());
+        // Verify the factory supports Streams!
+        if (!(factory.getFeature(StreamSource.FEATURE)
+              && factory.getFeature(StreamResult.FEATURE)))
+        {   
+            throw new TransformerConfigurationException("TraxSystemIdWrapper.newProcessor: factory does not support Streams!");
+        }
+        // Set any of our options as Attributes on the factory
+        TraxWrapperUtils.setAttributes(factory, newProcessorOpts);
+        return (Object)factory;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed for any underlying 
+     * processor implementation.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        
+        // Timed: read/build xsl from a URL
+        startTime = System.currentTimeMillis();
+        
+        Transformer transformer = factory.newTransformer(
+                                   new StreamSource(QetestUtils.filenameToURL(xslName)));       
+        transformer.setErrorListener(new DefaultErrorHandler());
+
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild + transform;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslBuild = 0;
+        
+        // Timed: read/build xsl from a URL
+        startTime = System.currentTimeMillis();
+        builtTemplates = factory.newTemplates(
+                new StreamSource(QetestUtils.filenameToURL(xslName)));
+        xslBuild = System.currentTimeMillis() - startTime;
+        m_stylesheetReady = true;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild;
+        times[IDX_XSLBUILD] = xslBuild;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        preventFootShooting();
+        long startTime = 0;
+        long transform = 0;
+        
+        // UNTimed: get Transformer from Templates
+        Transformer transformer = builtTemplates.newTransformer();
+        transformer.setErrorListener(new DefaultErrorHandler());
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = transform;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        preventFootShooting();
+        long startTime = 0;
+        long xslRead = 0;
+        long xslBuild = 0;
+        long transform = 0;
+        
+        // Timed: readxsl from the xml document
+        startTime = System.currentTimeMillis();
+        Source xslSource = factory.getAssociatedStylesheet(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                                                              null, null, null);
+        xslRead = System.currentTimeMillis() - startTime;
+
+        // Timed: build xsl from a URL
+        startTime = System.currentTimeMillis();
+        Transformer transformer = factory.newTransformer(xslSource);
+        transformer.setErrorListener(new DefaultErrorHandler());
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Untimed: Set any of our options as Attributes on the transformer
+        TraxWrapperUtils.setAttributes(transformer, newProcessorOpts);
+
+        // Untimed: Apply any parameters needed
+        applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+        startTime = System.currentTimeMillis();
+        transformer.transform(new StreamSource(QetestUtils.filenameToURL(xmlName)), 
+                              new StreamResult(resultName));
+        transform = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslRead + xslBuild + transform;
+        times[IDX_XSLREAD] = xslRead;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+        builtTemplates = null;
+        if (newProcessor)
+        {
+            try
+            {
+                newProcessor(newProcessorOpts);
+            }
+            catch (Exception e)
+            {
+                //@todo Hmm: what should we do here?
+            }
+        }
+    }
+
+
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * Overridden to take a Transformer and call setParameter().
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        try
+        {
+            Transformer t = (Transformer)passThru;
+            // Munge the namespace into the name per 
+            //  javax.xml.transform.Transformer.setParameter()
+            if (null != namespace)
+            {
+                name = "{" + namespace + "}" + name;
+            }
+            t.setParameter(name, value);
+        }
+        catch (Exception e)
+        {
+            throw new IllegalArgumentException("applyParameter threw: " + e.toString());
+        }
+    }
+
+
+    /**
+     * Ensure newProcessor has been called when needed.
+     *
+     * Prevent users from shooting themselves in the foot by 
+     * calling a transform* API before newProcessor().
+     *
+     * (Sorry, I couldn't resist)
+     */
+    public void preventFootShooting() throws Exception
+    {
+        if (null == factory)
+            newProcessor(newProcessorOpts);
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/TraxWrapperUtils.java b/test/java/src/org/apache/qetest/xslwrapper/TraxWrapperUtils.java
new file mode 100644
index 0000000..1b390e5
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/TraxWrapperUtils.java
@@ -0,0 +1,282 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintWriter;
+import java.lang.reflect.Field;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.URIResolver;
+
+import org.apache.xalan.trace.PrintTraceListener;
+import org.apache.xalan.trace.TraceManager;
+import org.apache.xalan.transformer.TransformerImpl;
+
+/**
+ * Cheap-o utilities for Trax*Wrapper implementations.
+ *
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public abstract class TraxWrapperUtils
+{
+
+    /**
+     * Get a generic description of the TrAX related info.  
+     *
+     * @return Properties block with basic info about any TrAX 
+     * implementing processor, plus specific version information
+     * about Xalan-J 2.x or Xerces-J 1.x if found
+     */
+    public static Properties getTraxInfo()
+    {
+        Properties p = new Properties();
+        p.put("traxwrapper.api", "trax");
+        p.put("traxwrapper.language", "java");
+        try
+        {
+            Properties sysProps = System.getProperties();
+            p.put("traxwrapper.jaxp.transform", 
+                  sysProps.getProperty("javax.xml.transform.TransformerFactory", "unset"));
+            p.put("traxwrapper.jaxp.parser.dom", 
+                  sysProps.getProperty("javax.xml.parsers.DocumentBuilderFactory", "unset"));
+            p.put("traxwrapper.jaxp.parser.sax", 
+                  sysProps.getProperty("javax.xml.parsers.SAXParserFactory", "unset"));
+        }
+        // In case we're in an Applet
+        catch (SecurityException se) { /* no-op, ignore */ }
+
+        // Look for some Xalan/Xerces specific version info
+        try
+        {
+            Class clazz = Class.forName("org.apache.xerces.framework.Version");
+            // Found 1.x, grab it's version fields
+            Field f = clazz.getField("fVersion");
+            p.put("traxwrapper.xerces.version", (String)f.get(null));
+        }
+        catch (Exception e1) { /* no-op, ignore */ }
+
+        try
+        {
+            Class clazz = Class.forName("org.apache.xalan.processor.XSLProcessorVersion");
+            Field f = clazz.getField("S_VERSION");
+            p.put("traxwrapper.xalan.version", (String)f.get(null));
+        }
+        catch (Exception e2) { /* no-op, ignore */ }
+
+        return p;
+    }
+
+
+    /**
+     * Apply specific Attributes to a TransformerFactory OR 
+     * Transformer, OR call specific setFoo() API's on a 
+     * TransformerFactory OR Transformer.  
+     *
+     * Filters on hashkeys.startsWith("Processor.setAttribute.")
+     * Most Attributes are simply passed to factory.setAttribute(), 
+     * however certain special cases are handled:
+     * setURIResolver, setErrorListener.
+     * Exceptions thrown by underlying transformer are propagated.
+     * 
+     * This takes an Object so that an underlying worker method can 
+     * process either a TransformerFactory or a Transformer.
+     *
+     * @param factory TransformerFactory to call setAttributes on.
+     * @param attrs Hashtable of potential attributes to set.
+     */
+    public static void setAttributes(Object setPropsOn, 
+                                     Hashtable attrs)
+                                     throws IllegalArgumentException
+    {
+        if ((null == setPropsOn) || (null == attrs))
+            return;
+
+        Enumeration attrKeys = null;
+        try
+        {
+            // Attempt to use as a Properties block..
+            attrKeys = ((Properties)attrs).propertyNames();
+        }
+        catch (ClassCastException cce)
+        {
+            // .. but fallback to get as Hashtable instead
+            attrKeys = attrs.keys();
+        }
+
+        while (attrKeys.hasMoreElements())
+        {
+            String key = (String) attrKeys.nextElement();
+            // Only attempt to set the attr if it matches our marker
+            if ((null != key)
+                && (key.startsWith(TransformWrapper.SET_PROCESSOR_ATTRIBUTES)))
+            {
+                Object value = null;
+                try
+                {
+                    // Attempt to use as a Properties block..
+                    value = ((Properties)attrs).getProperty(key);
+                    // But, if null, then try getting as hash anyway
+                    if (null == value)
+                    {
+                        value = attrs.get(key);
+                    }
+                }
+                catch (ClassCastException cce)
+                {
+                    // .. but fallback to get as Hashtable instead
+                    value = attrs.get(key);
+                }
+                // Strip off our marker for the property name
+                String processorKey = key.substring(TransformWrapper.SET_PROCESSOR_ATTRIBUTES.length());
+                // Ugly, but it works -sc
+                if (setPropsOn instanceof TransformerFactory)
+                    setAttribute((TransformerFactory)setPropsOn, processorKey, value);
+                else if (setPropsOn instanceof Transformer)
+                    setAttribute((Transformer)setPropsOn, processorKey, value);
+                // else - ignore it, no-op    
+            }
+        }
+
+    }
+
+
+    /** Token specifying a call to setURIResolver.  */
+    public static String SET_URI_RESOLVER = "setURIResolver";
+
+    /** Token specifying a call to setErrorListener.  */
+    public static String SET_ERROR_LISTENER = "setErrorListener";
+
+    /** Token specifying a call to setup a trace listener.  */
+    public static String SET_TRACE_LISTENER = "setTraceListener";
+
+    /**
+     * Apply specific Attributes to a TransformerFactory OR call 
+     * specific setFoo() API's on a TransformerFactory.  
+     *
+     * Filters on hashkeys.startsWith("Processor.setAttribute.")
+     * Most Attributes are simply passed to factory.setAttribute(), 
+     * however certain special cases are handled:
+     * setURIResolver, setErrorListener.
+     * Exceptions thrown by underlying transformer are propagated.
+     *
+     * @see setAttribute(Transformer, String, Object)
+     * @param factory TransformerFactory to call setAttributes on.
+     * @param key specific attribute or special case attr.
+     * @param value to set for key.
+     */
+    private static void setAttribute(TransformerFactory factory, 
+                                     String key, 
+                                     Object value)
+                                     throws IllegalArgumentException
+    {
+        if ((null == factory) || (null == key))
+            return;
+
+        // Note: allow exceptions to propagate here
+
+        // Check if this is a special case to call a specific 
+        //  API, or the general case to call setAttribute(key...)
+        if (SET_URI_RESOLVER.equals(key))
+        {
+            factory.setURIResolver((URIResolver)value);
+        }
+        else if (SET_ERROR_LISTENER.equals(key))
+        {
+            factory.setErrorListener((ErrorListener)value);
+        }
+        else if (SET_TRACE_LISTENER.equals(key))
+        {
+            // no-op
+        }
+        else
+        {
+            // General case; just call setAttribute
+            factory.setAttribute(key, value);
+        }
+    }
+
+
+    /**
+     * Apply specific Attributes to a Transformer OR call 
+     * specific setFoo() API's on a Transformer.  
+     *
+     * Filters on hashkeys.startsWith("Processor.setAttribute.")
+     * Only certain special cases are handled:
+     * setURIResolver, setErrorListener.
+     * Exceptions thrown by underlying transformer are propagated.
+     *
+     * @see setAttribute(TransformerFactory, String, Object)
+     * @param factory TransformerFactory to call setAttributes on.
+     * @param key specific attribute or special case attr.
+     * @param value to set for key.
+     */
+    private static void setAttribute(Transformer transformer, 
+                                     String key, 
+                                     Object value)
+                                     throws IllegalArgumentException
+    {
+        if ((null == transformer) || (null == key))
+            return;
+
+        // Note: allow exceptions to propagate here
+
+        // Check if this is a special case to call a specific 
+        //  API, or the general case to call setAttribute(key...)
+        if (SET_URI_RESOLVER.equals(key))
+        {
+            transformer.setURIResolver((URIResolver)value);
+        }
+        else if (SET_ERROR_LISTENER.equals(key))
+        {
+            transformer.setErrorListener((ErrorListener)value);
+        }
+        else if (SET_TRACE_LISTENER.equals(key) && transformer instanceof TransformerImpl)
+        {
+            TraceManager traceManager = ((TransformerImpl)transformer).getTraceManager();
+            try {
+                FileOutputStream writeStream = new FileOutputStream((String)value);
+                PrintWriter printWriter = new PrintWriter(writeStream, true);
+                PrintTraceListener traceListener = new PrintTraceListener(printWriter);
+                traceListener.m_traceElements = true;
+                traceListener.m_traceGeneration = true;
+                traceListener.m_traceSelection = true;
+                traceListener.m_traceTemplates = true;
+                traceManager.addTraceListener(traceListener);        
+            } catch (FileNotFoundException fnfe) {
+                System.out.println("File not found: " + fnfe);
+            } catch (Exception e) {
+                System.out.println("Exception: " + e);
+            }
+        }
+        else
+        {
+            // General case; no-op; no equivalent
+        }
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/XTWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/XTWrapper.java
new file mode 100644
index 0000000..4c2ebe3
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/XTWrapper.java
@@ -0,0 +1,397 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+
+package org.apache.qetest.xslwrapper;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.xml.sax.InputSource;
+
+/**
+ * Implementation of TransformWrapper that uses the simplest method 
+ * possible to use James Clark's XT processor.
+ *
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class XTWrapper extends TransformWrapperHelper
+{
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses XT in simplest manner possible
+     */
+    public String getDescription()
+    {
+        return "Uses XT in simplest manner possible";
+    }
+
+
+    /** No-op Ctor for the Xalan-J 1.x wrapper. */
+    public XTWrapper(){}
+
+    /** Reference to current processor - XT flavor - convenience method. */
+    protected com.jclark.xsl.sax.XSLProcessorImpl processor = null;
+
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = new Properties();
+        p.put("traxwrapper.method", "simple");
+        p.put("traxwrapper.desc", getDescription());
+        //@todo call XT to find version info
+        return p;
+    }
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * This creates a com.jclark.xsl.sax.XSLProcessorImpl.  
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        // Cleanup any prior objects 
+        reset(false);
+
+        processor = new com.jclark.xsl.sax.XSLProcessorImpl();
+
+        String liaisonClassName = "com.jclark.xml.sax.CommentDriver";  // default
+
+        try
+        {
+            Object parserObj = Class.forName(liaisonClassName).newInstance();
+
+            if (parserObj instanceof XMLProcessorEx)
+                processor.setParser((XMLProcessorEx) parserObj);
+            else
+                processor.setParser((org.xml.sax.Parser) parserObj);
+        }
+        catch (Exception e)
+        {
+            System.err.println("createNewProcesor(xt) threw: "
+                               + e.toString());
+            e.printStackTrace();
+
+            processor = null;
+        }
+
+        return (Object)processor;
+    }
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file using XT.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD, IDX_XSLBUILD, 
+     * IDX_TRANSFORM, IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        // Declare variables ahead of time to minimize latency
+        long startTime = 0;
+        long endTime = 0;
+
+        // Create XT-specific sources
+        OutputMethodHandlerImpl outHandler =
+            new OutputMethodHandlerImpl(processor);
+
+        outHandler.setDestination(new FileDestination(new File(resultName)));
+
+        InputSource xmlIS = xtInputSourceFromString(xmlName);
+        InputSource xslIS = xtInputSourceFromString(xslName);
+
+        // Begin timing the process: stylesheet, output, and process
+        startTime = System.currentTimeMillis();
+
+        processor.loadStylesheet(xslIS);
+        processor.setOutputMethodHandler(outHandler);
+        processor.parse(xmlIS);
+
+        endTime = System.currentTimeMillis();
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = endTime - startTime;
+        return times;
+    }
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        // Declare variables ahead of time to minimize latency
+        long startTime = 0;
+        long endTime = 0;
+
+        // Create XT-specific source
+        InputSource xslIS = xtInputSourceFromString(xslName);
+
+        // Begin timing loading the stylesheet
+        startTime = System.currentTimeMillis();
+
+        processor.loadStylesheet(xslIS);  // side effect: also sets the stylesheet
+
+        endTime = System.currentTimeMillis();
+        m_stylesheetReady = true;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = endTime - startTime;
+        return times;
+    }
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of all parts of 
+     * our operation: IDX_OVERALL, 
+     * IDX_XMLREAD, IDX_TRANSFORM, IDX_RESULTWRITE
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        // Declare variables ahead of time to minimize latency
+        long startTime = 0;
+        long endTime = 0;
+
+        // Create XT-specific sources
+        OutputMethodHandlerImpl outHandler =
+            new OutputMethodHandlerImpl(processor);
+
+        outHandler.setDestination(new FileDestination(new File(resultName)));
+
+        InputSource xmlIS = xtInputSourceFromString(xmlName);
+
+        // Begin timing the process: stylesheet, output, and process
+        startTime = System.currentTimeMillis();
+
+        processor.setOutputMethodHandler(outHandler);
+        processor.parse(xmlIS);
+
+        endTime = System.currentTimeMillis();
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = endTime - startTime;
+        return times;
+    }
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        throw new RuntimeException("XTWrapper.transformEmbedded not implemented yet!");
+    }
+
+    /**
+     * Worker method for using XT to process.  
+     *
+     * @param name local name of file
+     *
+     * @return InputSource for XT after munging name as needed
+     */
+    private InputSource xtInputSourceFromString(String name)
+    {
+
+        File file = new File(name);
+        String path = file.getAbsolutePath();
+
+        // Add absolute / to beginning if needed
+        if (path.charAt(0) != '/')
+            path = '/' + path;
+
+        try
+        {
+            java.net.URL temp = new URL("file", "", path);
+
+            return (new InputSource(temp.toString()));
+        }
+        catch (Exception e)
+        {
+            System.err.println("xtInputSourceFromString(xt) of: " + name
+                               + " threw: " + e.toString());
+            e.printStackTrace();
+
+            return (null);
+        }
+    }
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+        if (newProcessor)
+        {
+            try
+            {
+                newProcessor(newProcessorOpts);
+            }
+            catch (Exception e)
+            {
+                //@todo Hmm: what should we do here?
+            }
+        }
+    }
+
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * Overridden for XT to call setParameter().
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        try
+        {
+            XSLProcessorImpl p = (XSLProcessorImpl)passThru;
+            //@todo: HACK: smash the namespace in - not sure if this is correct
+            if (null != namespace)
+            {
+                name = namespace + ":" + name;
+            }
+            p.setParameter(name, value);
+        }
+        catch (Exception e)
+        {
+            throw new IllegalArgumentException("applyParameter threw: " + e.toString());
+        }
+    }
+
+}  // end of class XTWrapper
+
diff --git a/test/java/src/org/apache/qetest/xslwrapper/XalanProcessWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/XalanProcessWrapper.java
new file mode 100644
index 0000000..8de2da5
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/XalanProcessWrapper.java
@@ -0,0 +1,330 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import org.apache.qetest.QetestUtils;
+
+/**
+ * Implementation of TransformWrapper that calls Xalan's default 
+ * command line class Process.main.
+ *
+ * This is similar to the common usage:
+ * java org.apache.xalan.xslt.Process -in foo.xml -xsl foo.xsl ...
+ *
+ * See OPT_PREFIX for how to pass miscellaneous cmdline args.
+ *
+ * //@todo support precompiled/serialized stylesheets
+ *
+ * @author Shane_Curcuru@us.ibm.com
+ * @version $Id$
+ */
+public class XalanProcessWrapper extends TransformWrapperHelper
+{
+
+    /**
+     * Marker for cmdline items to add to optionArgs.  
+     */
+    public static final String OPT_PREFIX = TransformWrapper.SET_PROCESSOR_ATTRIBUTES + "cmdline";
+
+
+    /**
+     * Array of additional or optional args for Process.main() calls.  
+     */
+    protected String[] optionArgs = new String[0];
+
+
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Calls org.apache.xalan.xslt.Process -in foo.xml -xsl foo.xsl ...
+     */
+    public String getDescription()
+    {
+        return "Calls org.apache.xalan.xslt.Process -in foo.xml -xsl foo.xsl ...";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "xalanProcess");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * No-op, since we always construct a new Process instance 
+     * for every transformation.
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return null, we don't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        
+        // semi-HACK: set any additional cmdline options from user
+        String extraOpts = null;
+        try
+        {
+            // Attempt to use as a Properties block..
+            extraOpts = ((Properties)options).getProperty(OPT_PREFIX);
+            // But, if null, then try getting as hash anyway
+            if (null == extraOpts)
+            {
+                extraOpts = (String)options.get(OPT_PREFIX);
+            }
+        }
+        catch (ClassCastException cce)
+        {
+            // .. but fallback to get as Hashtable instead
+            extraOpts = (String)options.get(OPT_PREFIX);
+        }
+
+        if ((null != extraOpts) && (extraOpts.length() > 0))
+        {
+            Vector v = new Vector();
+            StringTokenizer st = new StringTokenizer(extraOpts, " ");
+            while (st.hasMoreTokens())
+            {
+                v.addElement(st.nextToken());
+            }
+            optionArgs = new String[v.size()];
+            v.copyInto(optionArgs);
+        }
+        //@todo do we need to do any other cleanup?
+        reset(false);
+        return null;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed for any underlying 
+     * processor implementation.
+     *
+     * //@todo attempt to capture any System.out/err output 
+     * from this command line class for logging
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        long startTime = 0;
+        long overall = 0;
+        
+        // Untimed: Apply any parameters needed
+        applyParameters(null);
+
+        // Untimed: Construct command line array
+        final int NUM_FARGS = 6; // Need 6 extra slots for 
+                                     // -in XML -xsl XSL -out OUT
+        String args[] = new String[optionArgs.length + NUM_FARGS];
+
+        args[0] = "-in";
+        args[1] = QetestUtils.filenameToURL(xmlName);
+        args[2] = "-xsl";
+        args[3] = QetestUtils.filenameToURL(xslName);
+        args[4] = "-out";
+        args[5] = resultName;
+        System.arraycopy(optionArgs, 0, args, NUM_FARGS, optionArgs.length);
+
+        // Timed: entire operation
+        //@todo attempt to capture any System.out/err output 
+        //  from this command line class for logging
+        startTime = System.currentTimeMillis();
+        org.apache.xalan.xslt.Process.main(args);
+        overall = System.currentTimeMillis() - startTime;
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = overall;
+        return times;
+    }
+
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        throw new IllegalStateException("XalanProcessWrapper.transformWithStylesheet not implemented!");
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        throw new IllegalStateException("XalanProcessWrapper.transformWithStylesheet not implemented!");
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        throw new IllegalStateException("XalanProcessWrapper.transformWithStylesheet not implemented!");
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+    }
+
+
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * No-op, we don't yet support parameters.
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        return;
+    }
+
+
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/XsltcMainWrapper.java b/test/java/src/org/apache/qetest/xslwrapper/XsltcMainWrapper.java
new file mode 100644
index 0000000..6ef27fb
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/XsltcMainWrapper.java
@@ -0,0 +1,410 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.qetest.xslwrapper;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.xalan.xsltc.cmdline.Compile;
+import org.apache.xalan.xsltc.cmdline.Transform;
+
+/**
+ * Implementation of TransformWrapper that uses the command line 
+ * wrappers of XSLTC - interim use only.
+ *
+ * <b>Important!</b> This wrapper is for temporary use only: we 
+ * should really focus on getting XSLTC to use JAXP 1.1 as it's 
+ * interface, and then (as needed) write another custom wrapper 
+ * that calls XSLTC API's directly.
+ * 
+ * @author Shane Curcuru
+ * @version $Id$
+ */
+public class XsltcMainWrapper extends TransformWrapperHelper
+{
+
+    private static final char CLEAN_CHAR = '_';
+    protected static final String XSLTC_COMPILER_CLASS = "org.apache.xalan.xsltc.cmdline.Compile";
+    protected static final String XSLTC_RUNTIME_CLASS = "org.apache.xalan.xsltc.cmdline.Transform";
+
+    private static final char FILE_SEPARATOR = System.getProperty("file.separator").charAt(0);
+    
+    /**
+     * Cached copy of newProcessor() Hashtable.
+     */
+    protected Hashtable newProcessorOpts = null;
+
+    /**
+     * Get a general description of this wrapper itself.
+     *
+     * @return Uses XSLTC command line to perform transforms
+     */
+    public String getDescription()
+    {
+        return "Uses XSLTC command line to perform transforms";
+    }
+
+
+    /**
+     * Get a specific description of the wrappered processor.  
+     *
+     * @return specific description of the underlying processor or 
+     * transformer implementation: this should include both the 
+     * general product name, as well as specific version info.  If 
+     * possible, should be implemented without actively creating 
+     * an underlying processor.
+     */
+    public Properties getProcessorInfo()
+    {
+        Properties p = TraxWrapperUtils.getTraxInfo();
+        p.put("traxwrapper.method", "streams");
+        p.put("traxwrapper.desc", getDescription());
+        return p;
+    }
+
+
+    /**
+     * Actually create/initialize an underlying processor or factory.
+     * 
+     * Effectively a no-op; returns null.  Just forces a reset().
+     *
+     * @param options Hashtable of options, unused.
+     *
+     * @return (Object)getProcessor() as a side-effect, this will 
+     * be null if there was any problem creating the processor OR 
+     * if the underlying implementation doesn't use this
+     *
+     * @throws Exception covers any underlying exceptions thrown 
+     * by the actual implementation
+     */
+    public Object newProcessor(Hashtable options) throws Exception
+    {
+        newProcessorOpts = options;
+        //@todo do we need to do any other cleanup?
+        reset(false);
+        return null;
+    }
+
+
+    /**
+     * Transform supplied xmlName file with the stylesheet in the 
+     * xslName file into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed for any underlying 
+     * processor implementation.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param xslName local path\filename of XSL stylesheet to use
+     * @param resultName local path\filename to put result in
+/* TWA - temp hack; use results dir to get path for to use for a dir to put
+the translets
+*/
+     /*
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transform(String xmlName, String xslName, String resultName)
+        throws Exception
+    {
+        long startTime = 0;
+        long xslBuild = 0;
+        long transform = 0;
+
+        // java org.apache.xalan.xlstc.cmdline.Compile play1.xsl
+        // java org.apache.xalan.xlstc.cmdline.Transform play.xml play1 >stdout
+
+        // Timed: compile stylesheet class from XSL file
+//        String[] args1 = new String[2];
+/* TWA - commented out the following for short-term
+Problem when local path/file is being used, somewhere a file://// prefix is 
+being appended to the filename and xsltc can't find the file even with the -u
+So I strip off the protocol prefix and pass the local path/file
+        args1[0] = "-u"; // Using URIs
+        args1[1] = xslName;
+*/
+/* TWA - temporay hack to construct and pass a directory for translets */
+        int last = resultName.lastIndexOf(FILE_SEPARATOR);
+        String tdir = resultName.substring(0, last);
+        int next = tdir.lastIndexOf(FILE_SEPARATOR);
+        String transletsdirName = tdir.substring(0, next);
+
+        String[] args1 = new String[3];
+        args1[0] = "-d";
+        args1[1] = transletsdirName;
+        args1[2] = xslName;
+        int idx = xslName.indexOf("file:////");
+        if (idx != -1){
+               xslName = new String(xslName.substring(8));
+               args1[2] = xslName;
+        }
+        startTime = System.currentTimeMillis();
+        /// Transformer transformer = factory.newTransformer(new StreamSource(xslName));
+        Compile.main(args1);
+        xslBuild = System.currentTimeMillis() - startTime;
+
+        // Verify output file was created
+        // WARNING: assumption of / here, which means we assume URI not local path - needs revisiting
+        int nameStart = xslName.lastIndexOf(FILE_SEPARATOR) + 1;
+        String baseName = xslName.substring(nameStart);
+        int extStart = baseName.lastIndexOf('.');
+        if (extStart > 0) {
+            baseName = baseName.substring(0, extStart);
+        }
+        
+        // Replace illegal class name chars with underscores.
+        StringBuffer sb = new StringBuffer(baseName.length());
+        char charI = baseName.charAt(0);
+        sb.append(Character.isJavaLetter(charI) ? charI :CLEAN_CHAR);
+        for (int i = 1; i < baseName.length(); i++) {
+            charI = baseName.charAt(i);
+            sb.append(Character.isJavaLetterOrDigit(charI) ? charI :CLEAN_CHAR);
+        }
+        baseName = sb.toString();
+        
+        // Untimed: Apply any parameters needed
+        // applyParameters(transformer);
+
+        // Timed: read/build xml, transform, and write results
+
+/* TWA - I don't see how this could have worked, there is no -s option in DefaultRun
+so passing it in the args2 caused usage messages to be output.
+Also, we shouldn't use the -u option unless we are really using URLs, 
+I'm just trying to get it to work with local path/files. With or without the 
+-u option, the files were getting a file://// prefix with caused them to be not found
+        String[] args2 = new String[3];
+        args2[0] = "-s"; // Don't allow System.exit
+        args2[1] = "-u"; // Using URIs
+        args2[2] = xmlName;
+        args2[3] = baseName;    // Just basename of the .class file, without the .class
+                                // Note that . must be on CLASSPATH to work!
+*/
+        
+        String[] tempParam = makeParamArray();
+        String[] args2 = new String[2 + tempParam.length];
+        args2[0] = xmlName;
+        int idx2 = xmlName.indexOf("file:////");
+        if (idx2 != -1){
+               args2[0] = new String(xmlName.substring(8));
+        }
+        args2[1] = baseName;
+        System.arraycopy(tempParam, 0, args2, 2, tempParam.length);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        PrintStream newSystemOut = new PrintStream(baos);
+        PrintStream saveSystemOut = System.out;
+        startTime = System.currentTimeMillis();
+        // transformer.transform(new StreamSource(xmlName), new StreamResult(resultName));
+        try
+        {
+            // Capture System.out into our byte array
+            System.setOut(new PrintStream(baos));
+            Transform.main(args2);
+        }
+        finally
+        {
+            // Be sure to restore System stuff!
+            System.setOut(saveSystemOut);
+        }
+        // Writing data should really go in separate timing loop
+        FileOutputStream fos = new FileOutputStream(resultName);
+        fos.write(baos.toByteArray());
+        fos.close();
+        transform = System.currentTimeMillis() - startTime;
+
+        File compiledXslClass = new File(baseName + ".class");
+        //@todo WARNING! We REALLY need to clean up the name*.class files when we're done!!! -sc
+        // TWA - we should probably use the -d option to put them in a desired directory first
+        // I commented out the delete, to see if the translets were getting compiled
+//        if (compiledXslClass.exists())
+//             compiledXslClass.delete();
+
+        long[] times = getTimeArray();
+        times[IDX_OVERALL] = xslBuild + transform;
+        times[IDX_XSLBUILD] = xslBuild;
+        times[IDX_TRANSFORM] = transform;
+        return times;
+    }
+
+    private String[] makeParamArray() {
+        if (m_params == null) {
+            return new String[0];
+        }
+        String[] params = new String[m_params.size()];
+        Iterator iter = m_params.entrySet().iterator();
+        int i = 0;
+        while (iter.hasNext()) {
+            Map.Entry entry = (Map.Entry) iter.next();
+            params[i++] = entry.getKey() + "=" + entry.getValue();
+        }
+        return params;
+    }
+
+    /**
+     * Pre-build/pre-compile a stylesheet.
+     *
+     * Although the actual mechanics are implementation-dependent, 
+     * most processors have some method of pre-setting up the data 
+     * needed by the stylesheet itself for later use in transforms.
+     * In TrAX/javax.xml.transform, this equates to creating a 
+     * Templates object.
+     * 
+     * Sets isStylesheetReady() to true if it succeeds.  Users can 
+     * then call transformWithStylesheet(xmlName, resultName) to 
+     * actually perform a transformation with this pre-built 
+     * stylesheet.
+     *
+     * @param xslName local path\filename of XSL stylesheet to use
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     *
+     * @see #transformWithStylesheet(String xmlName, String resultName)
+     */
+    public long[] buildStylesheet(String xslName) throws Exception
+    {
+        throw new RuntimeException("buildStylesheet not implemented yet!");
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a pre-built/pre-compiled 
+     * stylesheet into a resultName file.  
+     *
+     * User must have called buildStylesheet(xslName) beforehand,
+     * obviously.
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLBUILD, IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation; throws an 
+     * IllegalStateException if isStylesheetReady() == false.
+     *
+     * @see #buildStylesheet(String xslName)
+     */
+    public long[] transformWithStylesheet(String xmlName, String resultName)
+        throws Exception
+    {
+        if (!isStylesheetReady())
+            throw new IllegalStateException("transformWithStylesheet() when isStylesheetReady() == false");
+
+        throw new RuntimeException("transformWithStylesheet not implemented yet!");
+    }
+
+
+    /**
+     * Transform supplied xmlName file with a stylesheet found in an 
+     * xml-stylesheet PI into a resultName file.
+     *
+     * Names are assumed to be local path\filename references, and 
+     * will be converted to URLs as needed.  Implementations will 
+     * use whatever facilities exist in their wrappered processor 
+     * to fetch and build the stylesheet to use for the transform.
+     *
+     * @param xmlName local path\filename of XML file to transform
+     * @param resultName local path\filename to put result in
+     *
+     * @return array of longs denoting timing of only these parts of 
+     * our operation: IDX_OVERALL, IDX_XSLREAD (time to find XSL
+     * reference from the xml-stylesheet PI), IDX_XSLBUILD, (time 
+     * to then build the Transformer therefrom), IDX_TRANSFORM
+     *
+     * @throws Exception any underlying exceptions from the 
+     * wrappered processor are simply allowed to propagate; throws 
+     * a RuntimeException if any other problems prevent us from 
+     * actually completing the operation
+     */
+    public long[] transformEmbedded(String xmlName, String resultName)
+        throws Exception
+    {
+        throw new RuntimeException("transformEmbedded not implemented yet!");
+    }
+
+
+    /**
+     * Reset our parameters and wrapper state, and optionally 
+     * force creation of a new underlying processor implementation.
+     *
+     * This always clears our built stylesheet and any parameters 
+     * that have been set.  If newProcessor is true, also forces a 
+     * re-creation of our underlying processor as if by calling 
+     * newProcessor().
+     *
+     * @param newProcessor if we should reset our underlying 
+     * processor implementation as well
+     */
+    public void reset(boolean newProcessor)
+    {
+        super.reset(newProcessor); // clears indent and parameters
+        m_stylesheetReady = false;
+        // builtTemplates = null;
+        if (newProcessor)
+        {
+            try
+            {
+                newProcessor(newProcessorOpts);
+            }
+            catch (Exception e)
+            {
+                //@todo Hmm: what should we do here?
+            }
+        }
+    }
+    
+    /**
+     * Apply a single parameter to a Transformer.
+     *
+     * WARNING: Not implemented! 27-Apr-01
+     *
+     * @param passThru to be passed to each applyParameter() method 
+     * call - for TrAX, you might pass a Transformer object.
+     * @param namespace for the parameter, may be null
+     * @param name for the parameter, should not be null
+     * @param value for the parameter, may be null
+     */
+    protected void applyParameter(Object passThru, String namespace, 
+                                  String name, Object value)
+    {
+        /* WARNING: Not implemented! 27-Apr-01 */
+    }
+}
diff --git a/test/java/src/org/apache/qetest/xslwrapper/package.html b/test/java/src/org/apache/qetest/xslwrapper/package.html
new file mode 100644
index 0000000..d5817bd
--- /dev/null
+++ b/test/java/src/org/apache/qetest/xslwrapper/package.html
@@ -0,0 +1,41 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<!-- $Id$ -->
+<html>
+  <title>XSL-TEST xslwrapper package.</title>
+  <body>
+    <p>This package provides an abstraction layer for XSLT processors through {@link ProcessorWrapper}.</p>
+    <dl>
+      <dt><b>Author: </b></dt><dd><a href="mailto:shane_curcuru@lotus.com">Shane_Curcuru@lotus.com</a></dd>
+      <dt><b>Program(s) Under Test: </b></dt>
+      <dd><a href="http://xml.apache.org/xalan-j" target="_top">Xalan-J 2.x XSLT Processor</a></dd>
+      <dd><a href="http://xml.apache.org/xalan" target="_top">Xalan-J 1.x XSLT Processor</a></dd>
+    </dl>
+    <p>This package also provides a number of implementations 
+    for varying XSLT processors, including Xalan-J 1.x, 
+    Xalan-J 2.x using the TRAX interface, and others.<p>
+    <p>This allows many test classes to eliminate dependencies 
+    on a specific processor and be able to plug-and-play 
+    different processors to compare test results.<p>
+    <p>See ProcessorWrapper.properties for info on how a -flavor 
+    can get mapped into a specific implementation and 'type' 
+    of a ProcessorWrapper.</p>
+  </body>
+</html>
+
+
diff --git a/test/java/xdocs/sources/entities.ent b/test/java/xdocs/sources/entities.ent
new file mode 100644
index 0000000..f6c3fd3
--- /dev/null
+++ b/test/java/xdocs/sources/entities.ent
@@ -0,0 +1 @@
+<?xml encoding="US-ASCII"?>
diff --git a/test/java/xdocs/sources/tests/design.xml b/test/java/xdocs/sources/tests/design.xml
new file mode 100644
index 0000000..06b4ee9
--- /dev/null
+++ b/test/java/xdocs/sources/tests/design.xml
@@ -0,0 +1,278 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<s1 title="Testing Design/Standards">
+<ul>
+<li><link anchor="overview-tests">Overview of Testing concepts</link></li>
+<li><link anchor="standards-api-tests">Standards for API Tests</link></li>
+<li><link anchor="standards-xsl-tests">Standards for Stylesheet Tests</link></li>
+<li><link anchor="testing-links">Links to other testing sites</link></li>
+</ul>
+
+  <anchor name="overview-tests"/>
+  <s2 title="Overview of Testing concepts">
+    <p>While an overview of software testing in general is outside 
+    the scope we can address in this document, here are some of the 
+    concepts and background behind the Xalan testing effort.</p>
+    <gloss>
+      <label>A quick glossary of Xalan testing terms:</label><item></item>
+      <label>What is a test?</label>
+      <item>The word 'test' is overused, and can refer to a number 
+      of things.  It can be an API test, which will usually be a Java 
+      class that verifies the behavior of Xalan by calling it's API's.
+      It can be a stylesheet test, which is normally an .xsl stylesheet 
+      file with a matching .xml data file, and often has an expected 
+      output file with a .out extension.</item>
+      <label>What kinds of tests does Xalan have?</label>
+      <item>There are several different ways to categorize the 
+      tests currently used in Xalan: API tests and testlets, specific tests 
+      for detailed areas of the API in Xalan; Conformance Tests, 
+      with stylesheets in the tests\conf directory that each test 
+      conformance with a specific part of the XSLT spec, and are 
+      run automatically by a test driver; performance tests, which 
+      are a set of stylesheets specifically designed to show the 
+      performance of a processor in various ways, that are run 
+      automatically by a test driver; contributed tests, which are 
+      stored in tests\contrib, where anyone is invited to submit their 
+      own favorite stylesheets that we can use to test future Xalan 
+      releases.  There are also a few specific tests of extensions, as well 
+      as a small but growing suite of individual Bugzilla bug regression tests. 
+      We are working on better documentation and 
+      structure for the tests.</item>
+      <label>What is a test result?</label>
+      <item>While most people view tests as having a simple boolean 
+      pass/fail result, I've found it more useful to have a range of 
+      results from our tests. Briefly, they include INCP or incomplete 
+      tests; PASS tests, where everything went correctly; FAIL tests, 
+      where something obviously didn't go correctly; ERRR tests, where 
+      something failed in an unexpected way, and AMBG or ambiguous tests, 
+      where the test appears to have completed but the output results 
+      haven't been verified to be correct yet. 
+      <link anchor="overview-tests-results">See a full description of test results.</link></item>
+      <label>How are test results stored/displayed?</label>
+      <item>Xalan tests all use 
+      <jump href="apidocs/org/apache/qetest/Reporter.html">Reporter</jump>s and 
+      <jump href="apidocs/org/apache/qetest/Logger.html">Logger</jump>s to store their results. 
+      By default, most Reporters send output to a ConsoleLogger (so you 
+      can see what's happening as the test runs) and to an XMLFileLogger 
+      (which stores it's results on disk).  The logFile input to a test 
+      (generally on the command line or in a .properties file)
+      determines where it will produce it's MyTestResults.xml file, which 
+      are the complete report of what the test did, as saved to disk by 
+      it's XMLFileLogger.  You can 
+      then use <link idref="run" anchor="how-to-view-results">viewResults.xsl</link> 
+      to pretty-print the results into a MyTestResults.html
+      file that you can view in your browser.  We are working on other 
+      stylesheets to output results in different formats.
+      </item>
+      <label>What are your file/test naming conventions?</label>
+      <item>See the sections below for <link anchor="standards-api-tests">API test naming</link> and 
+      <link anchor="standards-xsl-tests">stylesheet file naming</link> conventions.</item>
+    </gloss>
+
+    <anchor name="overview-tests-results"/>
+    <p>Xalan tests will report one of several results, as detailed below. 
+    Note that the framework automatically rolls-up the results for 
+    any individual test file: a testCase's result is calculated from 
+    any test points or <code>check*()</code> calls within that testCase; 
+    a testFile's result is calculated from the results of it's testCases.</p>
+    <ul>
+    <li>INCP/incomplete: all tests start out as incomplete.  If a test never calls 
+    a <code>check*()</code> method (i.e. never officially verifies a test 
+    point), then it's result will be incomplete. This is important for cases 
+    where a test file begins running, and then causes some unexpected 
+    error that exits the test.  
+    <br/>Some other test harnesses will erroneously 
+    report this test as passing, since it never actually reported that 
+    anything failed.  For Xalan, this may also be reported if a test 
+    calls <code>testFileInit</code> or <code>testCaseInit</code>, but 
+    never calls the corresponding <code>testFileClose</code> or <code>testCaseClose</code>.
+    See <jump href="apidocs/org/apache/qetest/Logger.html#INCP">Logger.INCP</jump></li>
+
+    <li>PASS: the test ran to completion and all test points verified correctly. 
+    This is obviously a good thing. A test will only pass if it has at least one 
+    test point that passes and has no other kinds of test points (i.e. fail, 
+    ambiguous, or error).
+    See <jump href="apidocs/org/apache/qetest/Logger.html#PASS">Logger.PASS</jump></li>
+
+    <li>AMBG/ambiguous: the test ran to completion but at least one test point 
+    could not verify it's data because it could not find the 'gold' 
+    data to verify against.  This test niether passes nor fails, 
+    but exists somewhere in the middle.  
+    <br/>The usual solution is to 
+    manually compare the actual output the test produced and verify 
+    that it is correct, and then check in the output as the 'gold'
+    or expected data.  Then when you next run the test, it should pass.
+    A test is ambiguous if at least one test point is ambiguous, and 
+    it has no fail or error test points; this means that a test with 
+    both ambiguous and pass test points will roll-up to be ambiguous.
+    See <jump href="apidocs/org/apache/qetest/Logger.html#AMBG">Logger.AMBG</jump></li>
+
+    <li>FAIL: the test ran to completion but at least one test point 
+    did not verify correctly.  This is normally used for cases where 
+    we attempt to validate a test point, but get the wrong answer: 
+    for example if we call setData(3) then call getData and get a '2' back.
+    <br/>In most cases, a test should be able to continue normally after a FAIL 
+    result, and the rest of the results should be valid.
+    A test will fail if at least one test point is fail, and 
+    it has no error test points; thus a fail always takes precedence
+    over a pass or ambiguous result.
+    See <jump href="apidocs/org/apache/qetest/Logger.html#FAIL">Logger.FAIL</jump></li>
+
+    <li>ERRR/error: the test ran to completion but at least one test point 
+    had an error or did not verify correctly. This is normally used for 
+    cases where we attempt to validate a test point, but something unexpected
+    happens: for example if we call setData(3), and calling getData throws 
+    an exception.  
+    <br/>Although the difference seems subtle, it can be a useful 
+    diagnostic, since a test that reports an ERRR may not necessarily be able 
+    to continue normally.  In Xalan API tests, we often use this code if 
+    some setup routines for a testCase fail, meaning that the rest of the 
+    test case probably won't work properly.
+    <br/>A test will report an ERRR result if at least one test point is ERRR; 
+    thus an ERRR result takes precedence over any other kind of result.
+    Note that calling <code>Reporter.logErrorMsg()</code> will not cause 
+    an error result, it will merely log out the message.  You generally must 
+    call <code>checkErr</code> directly to cause an ERRR result.
+    See <jump href="apidocs/org/apache/qetest/Logger.html#ERRR">Logger.ERRR</jump></li>
+
+    </ul>
+  </s2>
+
+  <anchor name="standards-api-tests"/>
+  <s2 title="Standards for API Tests">
+    <p>In progress. Both the overall Java testing framework, the test drivers, 
+    and the specific API tests have a number of design decisions detailed 
+    in the javadoc 
+    <jump href="apidocs/org/apache/qetest/package-summary.html">here</jump> and 
+    <jump href="apidocs/org/apache/qetest/xsl/package-summary.html">here</jump>.</p>
+    <p>Naming conventions: obviously we follow basic Java coding 
+    standards as well as some specific standards that apply to Xalan
+    or to testing in general.  Comments appreciated.</p>
+    <gloss>
+      <label>Some naming conventions currently used:</label><item></item>
+      <label>*Test.java/.class</label>
+      <item>As in 'ConformanceTest', 'PerformanceTest', etc.: a single, 
+      automated test file designed to be run from the command line or 
+      from a testing harness.  This may be used in the future by 
+      automated test discovery mechanisims.</item>
+      <label>*Testlet.java/.class</label>
+      <item>As in '<jump href="apidocs/org/apache/qetest/xsl/StylesheetTestlet.html">StylesheetTestlet</jump>', 'PerformanceTestlet', etc.: a single, 
+      automated testlet designed to be run from the command line or 
+      from a testing harness.  Testlets are generally focused on one 
+      or a very few test points, and usually are data-driven.  A testlet 
+      defines a single test case algorithim, and relies on the caller 
+      (or *TestletDriver) to provide it with the data point(s) to use 
+      in it's test, including gold comparison info.</item>
+      <label>*Datalet.java/.class</label>
+      <item>As in '<jump href="apidocs/org/apache/qetest/xsl/StylesheetDatalet.html">StylesheetDatalet</jump>': a single set of test data for 
+      a Testlet to execute.  Separating a specific set of data from the 
+      testing algorithim to use with the data makes it easy to write 
+      and run large sets of data-driven tests.</item>
+      <label>*APITest.java/.class</label>
+      <item>As in 'TransformerAPITest', etc.: a single, 
+      automated test file designed to be run from the command line or 
+      from a testing harness, specifically providing test coverage of 
+      a number of API's.  Instead of performing the same kind of generic 
+      processing/transformations to a whole directory tree of files, these 
+      *APITests attempt to validate the API functionality itself: e.g. when 
+      you call setFoo(1), you should expect that getFoo() will return 1.
+      </item>
+      <label>XSL*.java/.class</label>
+      <item>Files that are specific to some kind of XSL(T) and XML concepts in 
+      general, but not necessarily specific to Xalan itself. I.e. these 
+      files may generally need org.xml.sax.* or org.w3c.dom.* to compile, but 
+      usually should not need org.apache.xalan.* to compile.</item>
+      <label>Logging*.java/.class</label>
+      <item>Various testing implementations of common error handler, 
+      URI resolver, and other classes.  These generally do not implement 
+      much functionality of the underlying classes, but simply log out 
+      everything that happens to them to a Logger, for later analysis.  
+      Thus we can hook a LoggingErrorHandler up to a Transformer, run a 
+      stylesheet with known errors through it, and then go back and validate 
+      that the Transformer logged the appropriate errors with this service.</item>
+      <label>QetestUtils.java/.class</label>
+      <item>A simple static utility class with a few general-purpose 
+      utility methods for testing.</item>
+    </gloss>
+    <p>Please: if you plan to submit Java API tests, use the existing framework 
+    as <link idref="submit" anchor="write-API-tests">described</link>.</p>
+  </s2>
+      
+  <anchor name="standards-xsl-tests"/>
+  <s2 title="Standards for Stylesheet Tests">
+    <p>In progress. See the <link idref="submit" anchor="write-xsl-tests">discussion about OASIS</link> for an overview.</p>
+    <p>Currently, the basic standards for Conformance and related 
+    tests are to provide similarly-named 
+    *.xml and *.xsl files, and a proposed *.out 'gold' or expected 
+    output file.  The basenames of the file should start with the name 
+    of the parent directory the files are in.  Thus if you had a new 
+    test you wanted to contribute about the 'foo' feature, you might
+    submit a set of files like so:</p>
+    <p>All under <code>xml-xalan\test\tests</code>:<br/>
+      <code>contrib\foo\foo.xml</code><br/>
+      <code>contrib\foo\foo.xsl</code><br/>
+      <code>contrib-gold\foo\foo.out</code><br/><br/>
+      You could then run this test through the Conformance test driver like:<br/>
+      <code>cd xml-xalan\test</code><br/>
+      <code>build contrib -Dqetest.category=foo</code><br/>
+    </p>
+    <p>Tests using Xalan Extensions may be found under test/tests/extensions and are separated 
+    into directories by language:<br/>
+    <gloss>
+      <label>test/tests/extensions/library</label>
+        <item>Stylesheets for extensions implemented natively in Xalan; these only 
+        have .xsl and .xml files for the test</item>
+      <label>test/tests/extensions/java</label>
+        <item>Stylesheets for extensions implemented in Java; these are run by 
+        a .java file that uses an ExtensionTestlet to run</item>
+      <label>test/tests/extensions/javascript</label>
+        <item>Stylesheets for extensions implemented in Javascript; these include 
+        only a .xsl and .xml file but require 
+        <jump href="http://xml.apache.org/xalan-j/extensions.html#supported-lang">bsf.jar and js.jar</jump> in the classpath</item>
+    </gloss>
+    </p>
+
+  </s2>
+
+  <anchor name="testing-links"/>
+  <s2 title="Links to other testing sites">
+    <p>A few quick links to other websites about software quality 
+    engineering/assurance.  No endorsement, express or implied should 
+    be inferred from any of these links, but hopefully they'll be 
+    useful for a few of you.</p>
+    <p>One note: I've commonly found two basic 
+    kinds of sites about software testing: ones for IS/IT types,
+    and ones for software engineers.  The first kind deal with testing 
+    or verifying the deployment or integration of business software 
+    systems, certification exams for MS or Novell networks, ISO 
+    certification for your company, etc.  The second kind (which I 
+    find more interesting) deal with testing software applications 
+    themselves; i.e. the testing ISV's do to their own software before 
+    selling it in the market.  So far, there seem to be a lot more 
+    IS/IT 'testing' sites than there are application 'testing' sites.</p>
+    <ul>
+    <li><jump href="http://www.soft.com/Institute/HotList/index.html">Software Research Institute HotList</jump>
+    This is a pretty good laundry list of top-level links for software testing</li>
+    <li><jump href="http://www.swquality.com/users/pustaver/index.shtml">SWQuality site; plenty of links</jump></li>
+    <li><jump href="http://www.stickyminds.com/">StickyMinds</jump></li>
+    <li><jump href="http://www.sqe.com/press/index.asp">SQE</jump></li>
+    </ul>
+  </s2>
+</s1>
diff --git a/test/java/xdocs/sources/tests/faq.xml b/test/java/xdocs/sources/tests/faq.xml
new file mode 100644
index 0000000..2e360b1
--- /dev/null
+++ b/test/java/xdocs/sources/tests/faq.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<s1 title="Frequently asked questions">
+
+  <s2 title="In progress">
+    <p>We need to start a FAQ for testing Xalan, unfortunately the faq doctype 
+    doesn't properly work in this tree, so I'm using an s1/s2 doc instead temporarily.
+    Some topics include:</p>
+<ul>
+<li><link anchor="viewresults">Pretty-printing results</link></li>
+<li><link anchor="debug">Run tests in a debugger, etc.</link></li>
+</ul>
+  </s2>
+  <s2 title="Prepare to run tests">
+    <p>CVSROOT=:pserver:<em>user</em>@cvs.apache.org:/home/cvs etc.<br/>
+    or CVSROOT=:pserver:anoncvs@cvs.apache.org:/home/cvspublic etc.<br/>
+    cvs checkout xml-xalan/java<br/>
+    cvs checkout xml-xalan/test<br/>
+    cd xml-xalan/java<br/>
+    build jar<br/>
+    cd ../test<br/>
+    build jar<br/>
+    build -projecthelp  - to get a list of targets<br/>
+    </p>
+  </s2>
+
+  <s2 title="Run conformance tests">
+    <p>The conf set of tests can be run in a variety of ways, especially with each different flavor.
+    For a list of flavors, see xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperFactory.properties</p>
+    <ul>
+    <li><source>build conf</source>  (default: trax.systemId)<br/><br/></li>
+    <li><source>build conf -Dconf.flavor=trax.sax</source>   (uses SAX IMPORTANT!)<br/><br/></li>
+    <li><source>build conf -Dconf.flavor=trax.dom</source>   (uses dom IMPORTANT!)<br/><br/></li>
+    <li>trax.file - File object instead of systemId<br/><br/></li>
+    <li>trax.stream - InputStreams - IMPORTANT!<br/><br/></li>
+    <li>trax.localPath - uses local paths instead of URLs, experimental<br/><br/></li>
+    <li>trax.systemId3 - does systemId transform three times in a row, experimental<br/><br/></li>
+    <li>process - uses command line class - IMPORTANT!<br/><br/></li>
+    </ul>
+  </s2>
+
+  <s2 title="Run contrib/perf tests">
+    <p>Same as running conf tests, except substitute 'contrib' for 'conf' everywhere, 
+    or 'perf' instead.  Note that 'perf' uses a custom Testlet testing algorithim
+    that iterates several times and outputs custom perf elements.</p>
+    <ul>
+    <li><source>build contrib -Dcontrib.flavor=trax.sax</source><br/><br/></li>
+    <li><source>build perf -Dperf.flavor=trax.stream</source><br/><br/></li>
+    </ul>
+  </s2>
+
+  <anchor name="xsltc"/>
+  <s2 title="Run XSLTC-related tests">
+    <p>Note that currently some of the XSLTC-specific tests are 
+    built with separate targets; in the future as the XSLTC engine 
+    is more completely integrated into the Xalan core, we hope to 
+    merge the tests as well.</p>
+    <p>Note that many of the tests that use TrAX/JAXP should work 
+    equally well with XSLTC since they have their own version of 
+    a TransformerFactory; remember to set the appropriate system 
+    property or classpath appropriately.  The various org.apache.qetest.trax 
+    API tests should also work normally with XSLTC.</p>
+  </s2>
+
+  <anchor name="xsltmark"/>
+  <s2 title="Run XSLTMARK perf tests">
+    <p>Xalan has it's own more detailed automation harness for running 
+    stylesheet tests and capturing performance metrics.  You can run the XSLTMARK 
+    set of stylesheets using Xalan's harness to see more detailed performance 
+    data.</p>
+    <ul>
+    <li>Copy xsltmark/testcases to xml-xalan/test (so it's xml-xalan/test/testcases)<br/><br/></li>
+    <li>Copy xsltmark/testcases/default.conf to xml-xalan/test/xsltmark.filelist<br/><br/></li>
+    <li>cd xml-xalan/test<br/><br/></li>
+    <li>Search-and-replace xsltmark.filelist 't=' 't=testcases/'<br/><br/></li>
+    <li>Search-and-replace xsltmark.filelist 'e=' 'e=testcases/'<br/><br/></li>
+    <li><source>build perf -Dperf.fileList=xsltmark.filelist</source><br/><br/></li>
+    <li><source>java -classpath blah org.apache.xalan.xslt.Process -in results-perf/results.xml -xsl PerfScanner.xsl -out results-perf/PerfReport.html</source><br/><br/></li>
+    <li>(where blah includes xml-apis.jar;xalan.jar;xercesImpl.jar)<br/><br/></li>
+    </ul>
+  </s2>
+
+  <anchor name="viewresults"/>
+  <s2 title="View results in HTML">
+    <p>Every test creates a results.xml (or TestName.xml) file of all the results 
+    the test has performed - no need to examine the console, since all the info will 
+    be here.  We have a couple of prototype stylesheets to view the results in a 
+    semi-pretty HTML style.</p>
+    <p>There is also a tableResults.xsl stylesheet for creating a table of conformance
+      test results. For documentation on how to use the stylesheet, please consult the section
+      <link idref="run" anchor="how-to-view-results">How-to: View Results</link>.
+    </p>
+    <ul>
+    <li><source>build perf</source><br/>
+    (Creates results-perf/results.xml)<br/></li>
+    <li><source>java -classpath blah org.apache.xalan.xslt.Process -in results-perf/results.xml -xsl FailScanner.xsl -out results-perf/FailReport.html</source><br/><br/></li>
+    <li><source>java -classpath blah org.apache.xalan.xslt.Process -in results-perf/results.xml -xsl PerfScanner.xsl -out results-perf/PerfReport.html</source><br/><br/></li>
+    <li><source>build alltest</source><br/>
+    (Creates a <b>LOT</b> of results in results-alltest/**)<br/></li>
+    <li><source>build scan</source><br/>
+    (Runs ResultScanner by default on results-alltest/**)<br/></li>
+    <li><source>build scan -Dscan.outputDir=results-perf</source>  etc.<br/></li>
+    <li><source>java -classpath blah;testxsl.jar org.apache.qetest.xsl.ResultScanner results-alltest</source><br/>
+    (This uses ResultScanner.xsl to style <b>all</b> results in the whole tree under 
+    results-alltest into a single ResultReport.html in the current directory; it currently 
+    uses FailScanner.xsl to only include fail results)<br/></li>
+    </ul>
+  </s2>
+
+  <s2 title="Include/Exclude tests">
+    <p>Run just a subset of tests, or exclude tests using simple command line options.</p>
+    <ul>
+    <li><source>build conf -Dconf.category=axes;boolean</source> - Only run those directories<br/><br/></li>
+    <li><source>build conf -Dconf.excludes=axes107.xsl;boolean12.xsl</source> - Skip those explicit xsl filenames<br/><br/></li>
+    </ul>
+  </s2>
+
+  <anchor name="conf.one"/>
+  <s2 title="Run a single conf test">
+    <ul>
+    <li><source>build conf.one -Dconf.test=axes44 -Dconf.flavor=trax.stream</source><br/>
+    This will run just the axes44.xsl test, using the normal Testlet algorithim <b>and</b> 
+    using whatever flavor you choose (which makes it easy to see if single tests 
+    run properly using SAX, DOM, streams, whatever)<br/></li>
+    </ul>
+  </s2>
+
+  <s2 title="Run all API tests">
+    <ul>
+    <li><source>build api -DtestClass=TransformerAPITest</source><br/></li>
+    <li>This runs all the available specific API tests, which includes all the 
+    API tests in the smoketest, plus other tests that fail due to known bugzilla reports.<br/></li>
+    <li>Note that in the case of <source>testClass</source>, you do <b>not</b> 
+    prefix the name of the option with conf,api,perf,etc.<br/><br/></li>
+    </ul>
+  </s2>
+
+  <s2 title="Run a LOT tests">
+    <ul>
+    <li><source>build alltest</source> (runs all,alltest.other,alltest.conf,alltest.contrib)<br/></li>
+    <li><source>build alltest.other</source> runs all API tests, extensions, bugzilla, threading, and perf tests<br/></li>
+    <li><source>build alltest.conf</source> run all flavors of conf tests<br/></li>
+    <li><source>build alltest.contrib</source>  run all flavors of contrib tests<br/></li>
+    <li><source>build alltest.features</source> run all conf and contrib tests, 
+    matrixed over all flavors, twice: once with the feature incremental set to true, 
+    once with optimize set to false (note: not all features matter with all flavors, 
+    but we run them all anyway.  Several meg of output!)<br/></li>
+    </ul>
+  </s2>
+
+  <anchor name="debug"/>
+  <s2 title="Debug the tests">
+    <p>It's quite simple to run the tests standalone, without using Ant - this is 
+    suitable for running in your debugger or what-not (or in environments where 
+    you feel that the overhead of running Ant might interfere with the test).</p>
+    <p>Normally, we have the build.bat/.sh files and the Ant script build.xml 
+    manage parsing the command line and setting up the CLASSPATH and options for 
+    running tests.  However all tests can be run on the command line, and will 
+    accept options in either a -load file.properties block, or on the command line itself.</p>
+    <ul>
+    <li><source>debugapi.bat org.apache.qetest.trax.TransformerAPITest</source><br/>
+    Runs just one API test without using Ant; edit debugapi.properties to 
+    change parameters passed to the test.<br/></li>
+    <li><source>debugconf.bat [options]</source><br/>
+    Runs a set of conf/ stylesheet tests using the normal StylesheetTestletDriver; 
+    see debugconf.properties for settable options.  Note that this method does not 
+    directly support 'conf.one' to run only a <b>single</b> test.<br/></li>
+    <li>Setup everything manually.  Minimal setup is: CLASSPATH has 
+    xalan.jar;serializer.jar,xercesImpl.jar;xml-apis.jar;testxsl.jar, command line parameters or 
+    -load file.properties includes other test properties, like inputDir, goldDir, 
+    outputDir, logFile, etc.</li>
+    </ul>
+  </s2>
+</s1>
diff --git a/test/java/xdocs/sources/tests/getstarted.xml b/test/java/xdocs/sources/tests/getstarted.xml
new file mode 100644
index 0000000..e414122
--- /dev/null
+++ b/test/java/xdocs/sources/tests/getstarted.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<s1 title="Getting Started">
+<ul>
+<li><link anchor="quickstart">Quick Start</link></li>
+<li><link anchor="downloading">Downloading the code</link></li>
+<li><link anchor="how-to-build">Building the Tests</link></li>
+</ul>
+
+  <anchor name="quickstart"/>
+  <s2 title="Quick Start">
+    <note>This section assumes you are already familiar with 
+    <jump href="http://xml.apache.org/xalan-j/readme.html#build">building Xalan-J</jump> and with 
+    <jump href="http://jakarta.apache.org/ant/">Ant</jump>.</note>
+    <p>Set JAVA_HOME, and have your classes.zip or tools.jar in the CLASSPATH.</p>
+    <p>Here are some sample commands to build and run tests:</p>
+    <p><code>cd /builds  </code>
+    <br/><code>checkout xml-xalan/java  </code> Get the Xalan-J code (or simply get a nightly build or distro)
+    <br/><code>cd xml-xalan/java  </code>
+    <br/><code>build jar  </code> Build Xalan-J as usual
+    <br/><code>build smoketest   </code> Run the build Smoketest (optional; simply calls the smoketest target below)
+    </p>
+    <p><code>cd /builds  </code>
+    <br/><code>checkout xml-xalan/test  </code>
+    <br/><code>cd xml-xalan/test  </code>
+    <br/><code>build jar   </code> Build the test framework/harness and most API/conf/etc. tests into <code>java/build/testxsl.jar  </code>
+    <br/><code>build smoketest   </code> Run the build Smoketest (includes a selection of API tests and the conf tests); results in smoketest/
+    <br/><code>build conf   </code> Run the StylesheetTestletDriver over the conf dir; results in results-conf/
+    <br/><code>build conf -Dqetest.optionName=valueName -Dqetest.category=axes  </code> Run the StylesheetTestletDriver over the conf dir; passing options, and only on the axes subdirectory
+    <br/><code>build api -DtestClass=TransformerAPITest </code> Run a single API test; results in results-api/
+    <br/><code>build harness </code> Run the full set of individual API tests; results in results-api/
+    </p>
+    <p><code>build extensions.classes   </code> Compile the tests/extensions tests
+    <br/><code>build extensions   </code> Run the tests/extensions tests
+    <br/><code>build bugzilla.classes   </code> Compile the tests/bugzilla bug regression tests
+    <br/><code>build bugzilla   </code> Run the tests/bugzilla bug regression tests
+    <br/><code>build clean   </code> Clean up the built automation (does not clean any results you've generated)
+    <br/><code>build -h   </code> Get help on build.bat/build.sh options and Ant targets
+    </p>
+    <p>Changing options:</p>
+    <p>Since we use the Ant test/build.xml script to kick off tests, <link idref="run" anchor="test-options">test options</link>
+    get passed slightly differently.  The actual options the tests see and use 
+    remain the same as before, however when you invoke Ant you need to specify the 
+    options with a -D and a prefix that Ant uses and then strips off in XSLTestAntTask.</p>
+    <p>Default options (inputDir, loggingLevel, etc.) are now all stored in test.properties. 
+    Overall defaults are prefixed with <code>qetest.</code>, which are used if no other 
+    type of test is specified.  Each type of test (api, conf, perf, contrib, etc.) has 
+    it's own set of some prefixed options - namely api.inputDir, api.outputDir, api.goldDir and 
+    api.logFile, etc..</p>
+    <p>Users may override the defaults in one of two ways:</p>
+    <ul>
+    <li>Create a <code>my.test.properties</code> file with any options you wish to use
+    in the xml-xalan/test directory.  This will 
+    override any options set in the test.properties or build.xml files.  The format 
+    is the same as the test.properties file.  A different name of this file may be specified 
+    using -Dlocal.properties=new.name.properties on the command line</li>
+    <li>Pass options on the command line.  This is the same as passing options to 
+    java or your JDK, so you must use the <code>-Dname=value</code> format.</li>
+    </ul>
+    <p><code>build conf -Dconf.category=axes -Dconf.flavor=trax.sax  </code> This runs 
+    the normal conf tests, but only on the axes subdir, and using the TraxSaxWrapper class.
+    <br/><code>build api -DtestClass=TransformStateTest -Dapi.loggingLevel=30  </code> This runs 
+    the org.apache.qetest.xalanj2.TransformStateTest with a lower loggingLevel (so less is output).
+    Note that testClass is one of the few properties that is not prefixed, since it is 
+    not passed on to the test itself, but is only used by the Ant script to load the test.
+    </p>
+  </s2>
+
+  <anchor name="downloading"/>
+  <s2 title="Downloading the tests">
+    <note>Since these tests are primarily to help developers test their 
+    changes to Xalan source code, we don't currently provide prebuilt 
+    builds of the test code. Most tests also require Xalan-J, even 
+    if you are testing a Xalan-C build.</note>
+    <p>To use the tests, you will need both a working build of Xalan-J 
+    as well as the sources for the tests themselves.
+    </p><p>To download Xalan builds, see the:
+    <jump href="http://xml.apache.org/xalan-j/dist/">Xalan-J download page</jump> or the 
+    <jump href="http://xml.apache.org/xalan-c/dist/">Xalan-C download page</jump>
+    </p><p>To get the test sources, do the following:
+    <br/>Check out the xml-xalan\test repository <jump href="http://xml.apache.org/cvs.html">directly from CVS</jump> 
+    (<jump href="http://xml.apache.org/cvs.html">read-only access</jump> is available to all).
+    <br/><br/>
+    </p>
+    
+  </s2>
+      
+  <anchor name="how-to-build"/>
+  <s2 title="Building the Tests">
+    <p>Since the test automation is written in Java, you must build it before running 
+    any tests.  Like Xalan-J, we use Ant build.xml files as 'makefiles' to build the 
+    project.  A copy of the Ant runtime files is provided in the xml-xalan/java/tools directory if you 
+    need them; you may also use your own copy of Ant if you have it installed.  
+    Unless specifically noted, all testing code should work either on Windows or 
+    UNIX systems; adjust .sh/.bat and path\separators/as needed.  Note that paths 
+    in .properties files may always use forward / slashes since Ant's path 
+    handling will always do the proper thing.</p>
+
+    <p>This assumes you already have a version of Xalan-J in \builds\xml-xalan\java  
+    This may either be a distribution or a copy you pulled from CVS and built yourself.</p>
+    <p>Download the tests to \builds\xml-xalan\test.</p>
+    <p><code>cd \builds\xml-xalan\test  </code>
+    <br/><code>build jar   </code> This calls build.bat/.sh to find a copy of ant.jar and an 
+    xml parser (which Ant requires).  It then calls Ant to run the 'jar' target in the 
+    default build.xml file.  This will compile all the base test reporting libraries and 
+    framework, as well as the most common test drivers and API tests.
+    </p>
+    <p>The default way to build and run the tests assumes you have both the xml-xalan/java 
+    and xml-xalan/test directories locally, as if you were a developer on xalan.  See below 
+    for a simple alternate way to set your classpath using JARDIR.  This allows QE/QA/test 
+    people to run the same set of tests quickly against different versions of the product.</p>
+    <note>Using JARDIR is no longer fully supported due to lack of 
+    interest.  Those wishing to manage custom classpaths are welcome 
+    to submit patches to allow this in an automated fashion.</note>
+
+    <p>The default jar target builds all TestletDrivers and most of the tests.  
+    A few kinds of tests require separate targets to compile since they have 
+    extra dependencies.  In particular, any XSLTC-specific API tests or 
+    TransformWrapper subclasses are compiled in a separate set of targets.</p>
+
+    <p>Users of automated IDE's that automatically compile all *.java files 
+    in the source tree will either have to use the Ant build.xml script or may 
+    have to manually compile certain files with the extra dependencies.  Note that 
+    JUnit is only required for the special qetesttest directory, which is only used to 
+    test the qetest framework itself and is not needed to test Xalan.</p>
+    <p>Note that there are a few precompiled .class files in the test/java/src/ area.  
+    By default these are simply copied into the testxsl.jar for you.  These are files 
+    that require extra dependencies to compile, and change infrequently, so as a 
+    convenience they're checked in to the repository as precompiled .class files as well as source.</p>
+    <p>Building the Javadocs for the tests is done by <code>build.bat javadocs  </code>, and 
+    is best done under JDK 1.2.2 or higher - they will build with JDK 1.1.8, but not 
+    all the links will work properly.</p>
+    <p>Building these top-level documents in the xdocs directory can 
+    be done with <code>build.bat docs  </code> and must be done under JDK 1.2.2 or higher, 
+    since the Xalan-related stylebook code that we use requires that. </p>
+  </s2>
+</s1>
diff --git a/test/java/xdocs/sources/tests/overview.xml b/test/java/xdocs/sources/tests/overview.xml
new file mode 100644
index 0000000..2378443
--- /dev/null
+++ b/test/java/xdocs/sources/tests/overview.xml
@@ -0,0 +1,235 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<s1 title="Overview">
+<ul>
+<li><link anchor="purpose">Purpose of these tests</link></li>
+<li><link anchor="brief-overview">Brief overview of testing methods</link></li>
+<li><link anchor="dir-map">Directory Structure</link></li>
+<li><link anchor="test-map">Listing of Java tests and drivers</link></li>
+<li><link anchor="credits">Credits for the tests</link></li>
+</ul>
+
+    <anchor name="purpose"/>
+    <s2 title="Purpose of these tests">
+    <p>These tests are provided for Xalan contributors to evaluate the impact of code changes. 
+    Run the tests on the unchanged code, make the change and rebuild. Then run the tests again 
+    and compare the results. Results are automatically compared to the files in the "-gold" 
+    directory trees. Even though not all tests have "gold" files, it's still valuable to run 
+    the tests before and after a code change. That way you can at least ensure that 
+    your changes didn't cause any regressions to the code before you check your 
+    changes in. In the future, we hope to provide a tool to compare test results from 
+    one run to another (without necessarily having to re-run the test) to make this process even simpler.</p>
+    </s2>
+      
+    <anchor name="brief-overview"/>
+    <s2 title="Brief overview of testing methods">
+    <p>The Xalan tests include a richly featured and fully automated testing framework 
+    that the great majority of the tests use.  The org.apache.qetest package provides 
+    an independent testing and automation harness for Xalan, including logging and 
+    reporting mechanisims.  The basic framework is easily used in testing 
+    other programs as well since dependencies on Xalan and an XML parser are 
+    clearly compartmented.</p>
+    <p>Nearly all tests are automated, run without any user interaction and with a minimum amount of setup, and produce 
+    a rolled-up report of their pass/fail/other status.  Our existing testing library includes 
+    a wide array of tests, from XSLT conformance to detailed API tests, and welcomes 
+    user-submitted tests as well.  The 'smoketest' target (a subset of the most important 
+    tests) are also integrated into the 
+    <jump href="http://vmgump.apache.org/gump/public/xml-xalan/xml-xalan2-smoketest/index.html">GUMP nightly build system</jump>, 
+    and thus ensure a 
+    minimum baseline of functionality on a daily basis.  Developers can run the smoketest 
+    and ensure it passes before checking in code changes.</p>
+    </s2>
+
+    <anchor name="dir-map"/>
+    <s2 title="Directory Structure">
+    <gloss>
+      <label>Brief overview of directory structure:</label>
+      <label><code>xml-xalan/test</code></label>
+      <item>Top level dir for all Xalan versions/products tests</item>
+      <label></label>
+      <label><code>xml-xalan/test/tools</code></label>
+      <item>Tools required by the test harness, such as JTidy.  Note that all .jars
+        required to run Xalan, including Ant, the Xerces parser, etc, are
+        included in the lib and tools directories under xml-xalan/java. 
+        </item>
+      <label><code>xml-xalan/test/java/src</code></label>
+      <item>Java test automation source tree - this includes 
+      a generic testing framework as well as specific API tests for parts of Xalan 
+      and several test drivers for testing conformance / performance / etc. over a large 
+      number of xsl test stylesheets.
+      <br/>Primary packages are:<br/>
+      <jump href="apidocs/org/apache/qetest/package-summary.html">org.apache.qetest</jump><br/>
+      <jump href="apidocs/org/apache/qetest/xsl/package-summary.html">org.apache.qetest.xsl</jump><br/>
+      <jump href="apidocs/org/apache/qetest/trax/package-summary.html">org.apache.qetest.trax</jump><br/>
+      <jump href="apidocs/org/apache/qetest/trax/dom/package-summary.html">org.apache.qetest.trax.dom</jump><br/>
+      <jump href="apidocs/org/apache/qetest/trax/stream/package-summary.html">org.apache.qetest.trax.stream</jump><br/>
+      <jump href="apidocs/org/apache/qetest/trax/sax/package-summary.html">org.apache.qetest.trax.sax</jump><br/>
+      <jump href="apidocs/org/apache/qetest/xalanj2/package-summary.html">org.apache.qetest.xalanj2</jump><br/>
+      <jump href="apidocs/org/apache/qetest/dtm/package-summary.html">org.apache.qetest.dtm</jump><br/>
+      <br/></item>
+      <label><code>xml-xalan/test/tests</code></label><item>Top level for XSLT stylesheet trees and special API tests</item>
+      <label><code>xml-xalan/test/tests/conf</code></label><item>Directory tree of specific conformance testing stylesheets</item>
+      <label><code>xml-xalan/test/tests/conf-gold</code></label><item>Directory tree of specific conformance testing stylesheets gold 
+      output reference files (this tree should mirror the structure of contrib)<br/></item>
+      <label><code>xml-xalan/test/tests/contrib</code></label><item>Directory tree of user-contributed stylesheets</item>
+      <label><code>xml-xalan/test/tests/contrib-gold</code></label><item>Directory tree of user-contributed stylesheets gold 
+      output reference files (this tree should mirror the structure of contrib)<br/></item>
+      <label><code>xml-xalan/test/tests/api</code></label><item>Directory tree for stylesheets used in Java API tests</item>
+      <label><code>xml-xalan/test/tests/api/trax</code></label><item>Stylesheets used in Java API tests in 
+      <jump href="apidocs/org/apache/qetest/trax/package-summary.html">org.apache.qetest.trax</jump></item>
+      <label><code>xml-xalan/test/tests/api/trax/dom</code></label><item>Stylesheets used in Java API tests in 
+      <jump href="apidocs/org/apache/qetest/trax/dom/package-summary.html">org.apache.qetest.trax.dom</jump></item>
+      <label></label><item>etc. - often the directory tree in the stylesheet area
+      will match the Java sources directory/package tree.</item>
+      <label><code>xml-xalan/test/tests/api-gold</code></label><item>Matching Directory tree of gold files for Java API tests<br/></item>
+      <label><code>xml-xalan/test/tests/extensions</code></label><item>Directory tree for stylesheets used in Xalan-specific extension tests</item>
+      <label><code>xml-xalan/test/tests/extensions/java</code></label><item>Tests for extensions written in Java</item>
+      <label><code>xml-xalan/test/tests/extensions/javascript</code></label><item>Tests for extensions written in Javascript</item>
+      <label><code>xml-xalan/test/tests/extension-gold</code></label><item>Matching Directory tree of gold files for extensions tests<br/></item>
+      <label><code>xml-xalan/test/tests/bugzilla</code></label><item>Special directory of stylesheets and automated Testlets reproducing selected Bugzilla bug reports</item>
+    </gloss>
+    </s2>
+
+    <anchor name="test-map"/>
+    <s2 title="Listing of Java tests and drivers">
+    <note>This section is a sort of catalog of existing tests.  Beginning users 
+    will probably want to see <link idref="run" anchor="how-to-run">how to run tests</link> as well.</note>
+<p>Java Test Drivers (data driven testing)</p>
+<p>A Java Test Driver executes a test for each xml/xsl file pair in 
+the specified directory tree or each pair in the specified fileList. 
+The driver iterates over the inputDir tree or list of files 
+and asks a Testlet to execute() a test on each one.  This is also similar to 
+data driven testing, where a common algorithim is defined for a test case, and 
+then a large number of data points (in this case, the xml/xsl file pairs) are run through the test case in order. 
+The best example is <jump href="apidocs/org/apache/qetest/xsl/StylesheetTestletDriver.html">StylesheetTestletDriver</jump>. 
+Another generic example is <jump href="apidocs/org/apache/qetest/FileTestletDriver.html">FileTestletDriver</jump>.</p> 
+<p>The Test Drivers rely on various Testlet implementations  
+to define the actual testing algorithim to apply to each xml/xsl 
+file pair.  This defines any options to be used when processing the 
+file as well as logging out information about the test in progress.
+Examples include 
+<jump href="apidocs/org/apache/qetest/xsl/StylesheetTestlet.html">StylesheetTestlet</jump> and 
+<jump href="apidocs/org/apache/qetest/xsl/PerformanceTestlet.html">PerformanceTestlet</jump></p>
+<p>The Testlets rely on <jump href="apidocs/org/apache/qetest/xslwrapper/TransformWrapper.html">TransformWrapper</jump> 
+subclasses to perform the actual test of processing or transformation 
+of the xml/xsl file pair into the output file. We can then plug 
+in different TransformWrapper "flavors" easily. Different 
+TransformWrapper can process or transform in various ways, like 
+using DOM trees, SAX events, or input/output streams.</p>
+<p>The three levels of iteration, test algorithim, and 
+processor flavor are all independently changeable, so we can 
+easily try out different kinds of tests.  This technique is used to 
+run the full sets of 'conf' (conformance), 'perf' (performance), 
+extensions, and 'contrib' (user contributed stylesheets) tests.</p>
+<gloss>
+<label>org.apache.qetest.xsl.<link idref="run" anchor="how-to-run-c">XalanCTestlet</link></label>
+<item>This is similar to the StylesheetTestlet, but for Xalan-C.  
+It simply shells 
+out to a command prompt to run each stylesheet through the TestXSLT.exe program
+from Xalan-C.</item>
+</gloss>
+
+<p>Java API tests for the TRAX (or javax.xml.transform) interface, that 
+Xalan-J 2.x implements.<br/>
+All in package: org.apache.qetest.trax</p>
+<note>(This Section needs updating: many new tests have been added; see the Javadoc for a list -sc)</note>
+<gloss>
+<label>REPLACE_template_for_new_tests.java</label>
+<item>a template for creating new TRAX API tests, see <link idref="submit" anchor="write-API-tests">Submitting New Tests</link></item>
+<label>LoggingErrorListener.java</label>
+<item><ref>utility:</ref> wraps javax.xml.transform.ErrorListener, and logs info; 
+this class also supports setting expected errors to trap, and it will call 
+logger.checkPass/checkFail for you when it gets an expected or unexpected event. 
+This allows us to write very detailed negative tests and have them be 
+fully automated.</item>
+<label>LoggingURIResolver.java</label>
+<item><ref>utility:</ref> wraps javax.xml.transform.URIResolver, and logs info</item>
+<label>ExamplesTest.java</label>
+<item>A testing version of samples/trax/Examples.java, a sample file
+provided in Xalan-J 2.x showing various uses of the TRAX or 
+javax.xml.transform API to process stylesheets.</item>
+<label>TransformerAPITest.java</label>
+<item>API coverage tests for javax.xml.transform.Transformer</item>
+<label>TransformerFactoryAPITest.java</label>
+<item>API coverage tests for javax.xml.transform.TransformerFactory</item>
+<label>TemplatesAPITest.java</label>
+<item>API coverage tests for javax.xml.transform.Templates</item>
+
+<label>EmbeddedStylesheetTest.java</label>
+<item>Testing various types and kinds of stylesheets embedded with the xml-stylesheet PI</item>
+<label>ErrorListenerAPITest.java</label>
+<item>API Coverage test for ErrorListener</item>
+<label>ErrorListenerTest.java</label>
+<item>Functionality test of error listeners when using illegal stylesheets</item>
+<label>OutputPropertiesTest.java</label>
+<item>Various tests of programmatic access and changing of output properties</item>
+<label>SystemIdImpInclTest.java</label>
+<item>Testing various forms of URLs in setSystemID with imported and included stylesheets</item>
+<label>SystemIdTest.java</label>
+<item>Testing various forms of URLs in setSystemID</item>
+
+
+<label>TestThreads.java</label>
+<item>MANUALLY executed test for running multiple threads 
+and transforming multiple stylesheets simultaneously.  An updated and automated 
+test is now available, org.apache.qetest.xsl.ThreadedTestletDriver, which 
+should be used instead. </item>
+</gloss>
+
+<p>All in subpackages of: org.apache.qetest.trax</p>
+<gloss>
+<label>stream.StreamSourceAPITest.java</label>
+<item>API coverage tests for javax.xml.transform.stream.StreamSource</item>
+<label>stream.StreamResultAPITest.java</label>
+<item>API coverage tests for javax.xml.transform.stream.StreamResult</item>
+
+<label>etc.</label>
+<item>API coverage tests are available with a similar naming scheme for most javax.xml.transform.* classes</item>
+</gloss>
+
+
+<p>A few tests are ones that Xalan does not currently pass due to Bugzilla reports, but we know the 
+correct ("gold") result by analysis or by trying the test on other processors. 
+A number of tests may also be missing matching "gold" files, if we haven't 
+yet had time to confirm the correct output.  It's still useful to run these 
+tests (although the test driver will report an AMBG or 'Ambiguous' 
+result) because you can still see if the output looks basically correct, and 
+compare the output to previous test runs before you submit your code changes, etc.</p>
+<p>The tests have several different types of results beyond just pass or fail, 
+which are documented in <jump href="apidocs/org/apache/qetest/Logger.html#PASS_RESULT">org.apache.qetest.Logger</jump>.
+</p>
+
+    </s2>
+
+    <anchor name="credits"/>
+    <s2 title="Credits for the tests">
+      <ul>
+        <li><jump href="mailto:shane_curcuru@us.ibm.com">Shane Curcuru</jump></li>
+        <li><jump href="mailto:paul_dick@us.ibm.com">Paul Dick</jump></li>
+        <li><jump href="mailto:David_Marston@us.ibm.com">David Marston</jump></li>
+        <li><jump href="mailto:tom.amiro@east.sun.com">Tom Amiro</jump></li>
+        <li><jump href="mailto:garyp@firstech.com">Gary L Peskin</jump></li>
+        <li>Many other <jump href="http://xml.apache.org/mail.html">xalan-dev</jump> subscribers</li>
+        <li>Test cases written by Carmelo Montanez at <jump href="http://www.nist.gov/xml/">NIST</jump> for general use</li>
+        <li>Many other helpers who we still need to credit! Sorry!</li>
+      </ul>
+    </s2>
+
+</s1>
diff --git a/test/java/xdocs/sources/tests/run.xml b/test/java/xdocs/sources/tests/run.xml
new file mode 100644
index 0000000..b86d0f5
--- /dev/null
+++ b/test/java/xdocs/sources/tests/run.xml
@@ -0,0 +1,198 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<s1 title="Running Tests">
+<ul>
+<li><link anchor="how-to-run">How-to: Run Xalan-J tests</link></li>
+<li><link anchor="how-to-view-results">How-to: View Test Results</link></li>
+<li><link anchor="test-options">Common Test Options</link></li>
+<li><link anchor="how-to-run-c">How-to: Run Xalan-C tests</link></li>
+</ul>
+
+    <anchor name="how-to-run"/>
+    <s2 title="How-to: Run tests">
+    <p>Nearly all tests for Xalan are independent Java classes built 
+    into testxsl.jar that 
+    can be run either individually on the command line, programmatically 
+    from your application or our handy Ant build.xml file, or in batches from 
+    <jump href="apidocs/org/apache/qetest/xsl/XSLTestHarness.html">XSLTestHarness</jump>.
+    There really isn't any magic to them: you can just set your classpath and 
+    execute java.exe to run them; some Tests and Testlets currently provide defaults
+    for their inputs, so you can run them without any setup at all. 
+    However we have provided a couple of more 
+    convenient ways to run the most common tests:</p>
+    <note>If you need to debug into the tests themselves, 
+    you may want to use the <link idref="faq" anchor="debug">debug*.bat files</link></note>
+    <p>Of course, first <link idref="getstarted" anchor="how-to-build">Build a fresh copy of testxsl.jar.</link>
+    </p>
+    <p>cd xml-xalan\test<br/></p>
+    <p>You can either: use the Ant build.xml script; run a convenience batch file; or execute java.exe yourself.</p>
+    
+    <p>
+      <code>build conf [<link anchor="test-options">Ant-prefixed options</link>]</code>
+        <br/>(runs StylesheetTestletDriver over tests\conf test tree using the default StylesheetTestlet)<br/><br/>
+      <code>build perf [<link anchor="test-options">Ant-prefixed options</link>]</code>
+        <br/>(runs StylesheetTestletDriver over tests\perf test tree using the default PerformanceTestlet)<br/><br/>
+      <code>build api -DtestClass=TRAXAPITestClassName [<link anchor="test-options">Ant-prefixed options</link>]</code> 
+      <br/>(runs TRAX interface tests with Xalan-J 2.x<br/>
+    </p>
+    <p>Alternately: some convenience batch files are provided for the most common 
+    tests - these simply turn around and call build.bat/.sh for you.<br/>
+    (Namely conf.bat, perf.bat, and the like)</p>
+    <p>Alternately: Run java.exe and the desired test class yourself:<br/></p>
+    <note>Running tests with alternate JAXP parsers: all org.apache.qetest.trax.* 
+    tests can be run with Xalan-J 2.x and any JAXP 1.1 compatible parser, like 
+    crimson.jar.  Be sure to manually set the appropriate system properties to use 
+    your parser instead of xerces.jar, which is the default for Xalan-J.  Tests will 
+    also run on any JAXP 1.1 compatible xslt processor, namely either our default 
+    xalan one or our new xsltc one.</note>
+    </s2>
+      
+    <anchor name="how-to-view-results"/>
+    <s2 title="How-to: View Test Results">
+      <p>Most tests both send basic results to System.out, as well as 
+      writing a full set of output results to their <code><link anchor="test-options-logfile">logFile</link></code>, as 
+      set from a .properties file or the command line. Generally the 
+      output results file is easier to deal with. The basic format is 
+      fairly simple and you can certainly read it as-is.  Also, many tests 
+      send only summary results to the console, but full output to the results file.</p>
+      <p>To 'pretty-print' results or produce reports, please use the 
+        viewResults.xsl stylesheet and associated batch/shell files, like so:<br/>
+        <code>cd \xml-xalan\test</code><br/><br/>
+        <code>build conf -DoptionName=optionValue <link anchor="test-options-logfile">-Dqetest.logFile results/MyResults.xml</link></code><br/><br/>
+        <code>viewResults.bat results/MyResults.xml results/MyPrettyResults.html [options]</code><br/><br/>
+        These options are passed to Xalan's command line to transform the 
+        xml formatted output results into a nicer-looking html file. The most 
+        common option would be <code>-param loggingLevel 99</code> to get 
+        more output shown in the results (higher numbers up to 99 show more details, 
+        lower numbers, down to 0, show fewer details).
+      </p>  
+      <p>Alternatively, the tableResults.xsl stylesheet can be used to pretty-print
+        results from the conformance test for multiple TRAX flavours:<br/><br/>
+        <code>cd \xml-xalan\test</code><br/><br/>
+        <code>build alltest.conf</code><br/><br/>
+        <code>set RESULTSCANNER=tableResults.xsl</code><br/><br/>
+        <code>viewResults.bat results-alltest/conf/sax/results.xml results.html [options]</code><br/><br/>
+        This will generate a pretty-printed HTML table in results.html, listing all
+        flavours as well as the results of individual test cases for each category.
+        The options can be passed to tableResults.xsl to generate conformance reports
+        on previously run tests, or to compare two runs of the conformance test suite.
+      </p>  
+      <p>Possible options that can be passed to tableResults.xsl:
+        <ul>
+          <li>
+            <code>-param resultsDir /path/to/result/results-alltest/conf</code><br/><br/>
+            Passing the path to the <code>results-alltest/conf</code> directory generates
+            a report based on the results in that directory. Defaults to <code>./results-alltest/conf</code><br/><br/>
+          </li>
+          <li>
+            <code>-param compareAgainst /path/to/other/results-alltest/conf</code><br/><br/>
+            Passing the path to anothe <code>results-alltest/conf</code> directory compares
+            that result against the result pointed to by resultsDir.<br/><br/>
+          </li>
+          <li>
+            <code>-param resultsDir results-alltest.xsltc/conf</code><br/><br/>
+            Generates a report on the results of an xsltc test (with the <code>alltest.conf.xsltc</code>) target.
+          </li>
+        </ul>
+      </p>      
+      <p>Future work includes greatly updated results analysis stylesheets. 
+      See FailScanner.xsl and PerfScanner.xsl for ideas.  An important design 
+      principle in the tests is that at runtime the tests merely output 
+      whatever data they can as results are generated; afterwards, we then 
+      post-process the results into whatever presentation format is needed, 
+      including perhaps re-calculating overall results (example: if we have 
+      a list of known fails correlated to JIRA numbers, then a stylesheet 
+      could filter out these fails and report them as known bugs instead.
+      </p>
+    </s2>
+    <anchor name="test-options"/>
+    <s2 title="Common Test Options">
+      <note>Section needs updating to reflect the fact that while the options the 
+      tests see remain as below, the user must now prefix all optionNames with 
+      'qetest.' or 'conf.', etc. when passing the options on the command line or 
+      via my.test.properties or test.properties -sc</note>
+      <p>Most tests can either accept options from a properties file, via:<br/>
+      <code>&nbsp;&nbsp;TestName -load file.properties</code><br/><br/>
+      or simply from the command line (which overrides the properties file) like:<br/>
+      <code>&nbsp;&nbsp;TestName -arg1 value1 -arg2 -arg3 value3</code><br/><br/></p>
+      <p>To see all options, call a test with an illegal argument to force it 
+      to print out it's .usage(). You may mix setting options from a properties 
+      file and from the command line; command line options will take precedence.</p>
+      <p>For another description of options, see <br/><code>xml-xalan\test\test.properties</code>,<br/> 
+      which describes most of them with comments.  Remember that the prefixes 
+      'qetest.', 'conf.' etc. are used by the Ant build.xml file to manage which 
+      properties are used for different kinds of tests, and are ripped off before 
+      being passed to the Java test script itself.  Thus qetest.loggingLevel=99 in 
+      the test.properties file becomes just loggingLevel of 99 when passed to the test.</p>
+      <note>Path-like options set in a properties file generally should use 
+      forward slashes (legal in URL's), even on Windows platforms.</note>
+      <p>Quick list of options</p>
+        <anchor name="test-options-logfile"/>
+      <gloss>
+        <label>-logFile <ref>resultsFileName.xml</ref></label>
+          <item>sends test results to an XML-based results file</item>
+        <label>-loggingLevel <ref>nn</ref></label>
+          <item>determines how much information is sent to your logFile, 0=very little, 99=lots</item>
+        <label>-ConsoleLogger.loggingLevel <ref>nn</ref></label>
+          <item>determines how much information is sent just to the default ConsoleLogger: 
+          since often you won't be watching the console as the test is running, you can set this 
+          lower than your loggingLevel to speed the tests up a little</item>
+        <label>-inputDir <ref>path/to/tests</ref></label>
+          <item>path to a directory tree of input *.xml/*.xsl files, using your system's separator</item>
+        <label>-outputDir <ref>path/to/output/area</ref></label>
+          <item>where all output is sent</item>
+        <label>-goldDir <ref>path/to/gold</ref></label>
+          <item>path to a directory tree of reference output - this tree should be 
+          a parallel structure to the inputDir tree</item>
+        <label>-category <ref>dirName</ref></label>
+          <item>only run this single named subdir within inputDir</item>
+        <label>-excludes <ref>'test1.xsl;test2.xsl'</ref></label>
+          <item>will skip running any specifically named tests; do not use any path elements here</item>
+        <label>-flavor <ref>xalan|trax|trax.d2d</ref></label>
+          <item>which kind/flavor of Processor to test; see
+          <jump href="apidocs/org/apache/qetest/xslwrapper/ProcessorWrapper.html">ProcessorWrapper.java</jump> </item>
+        <label>-testlet <ref>TestletClassname</ref></label>
+          <item>For StylesheetTestletDriver, use a different class for the testing algorithim</item>
+        <label>-load <ref>file.properties</ref></label>
+          <item>(read in a .properties file, that can set any/all of the other opts)  
+          This option is automatically used by the Ant build.xml file, so you normally 
+          would not specify it yourself.</item>
+      </gloss> 	
+      <p>Note that most options work equivalently with either Xalan-J or Xalan-C tests.</p>
+      <p>When running tests using Ant, the &lt;xalantest&gt; task actually 
+      marshalls various Ant variables and uses the precompiled org.apache.qetest.xsl.XSLTestAntTask 
+      to actually execute the test (either in the same JVM or forked depending on 
+      ${fork-tests}.  It simply strips the appropriate set of prefixes 
+      off of required Ant variables and dumps them into an XSLTestAntTask.properties 
+      file on disk, which it tells the test executing to -load.</p>
+    </s2>
+    
+    <anchor name="how-to-run-c"/>
+    <s2 title="How-to: Run Xalan-C tests">
+      <p>In progress.  A few C++ API tests are checked into the <code>xml-xalan/c/Tests</code>
+      repository area already.  To execute any set of 'conformance' tests with the 
+      Xalan-C processor, we currently use the 
+      org.apache.qetest.xsl.<jump href="apidocs/org/apache/qetest/xsl/XalanCTestlet.html">XalanCTestlet</jump>
+      driver.  This is written in Java to take advantage of the framework and 
+      results reporting, but basically constructs a command line for each test 
+      and then shells out to <code>TestXSLT.exe -in file.xsl...</code> to run the test; 
+      it then uses the same validation routines as the Java ConformanceTest.</p>
+    </s2>    
+</s1>
diff --git a/test/java/xdocs/sources/tests/submit.xml b/test/java/xdocs/sources/tests/submit.xml
new file mode 100644
index 0000000..d7d190c
--- /dev/null
+++ b/test/java/xdocs/sources/tests/submit.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<s1 title="Submitting New Tests">
+<ul>
+<li><link anchor="write-API-tests">How to Write API Tests</link></li>
+<li><link anchor="write-xsl-tests">How to Write Stylesheet Tests</link></li>
+</ul>
+
+    <anchor name="write-API-tests"/>
+    <s2 title="How to Write API Tests">
+<p>Use the existing framework!  It provides lots of useful functionality, 
+and will help us to maintain your tests.</p>
+<p>For example: To write a new TRAX/javax.xml.transform API test:</p>
+<p>- open org.apache.qetest.trax.REPLACE_template_for_new_tests.java</p>
+<p>- follow directions to rename the file (and put in the correct dom/sax/stream
+ subdir, if needed) and search-and-replace all REPLACE_* tokens</p>
+<p>- write one-time-only setup code in testFileInit()</p>
+<p>- write a number of testCase<ref>n</ref> methods. Each one should 
+be independent from the other test cases. Try to test between one 
+and ten or so individual test points (or calls to reporter.check(...)
+for each testCase method.</p>
+<p>- Never use System.out/.err - always use reporter.log*Msg() (to report 
+general messages), or reporter.check() (to validate a specific test point)</p>
+<note>This is an important point. Bottlenecking all output from the tests 
+through a <jump href="apidocs/org/apache/qetest/Reporter.html">Reporter</jump> 
+allows us to manage and analyze the results much more easily. Reporters also 
+put all output to both the console and to your <link idref="run" anchor="test-options-logfile">logFile</link>.</note>
+<p>- Build the tests, including your new one, <link idref="getstarted" anchor="how-to-build">as described</link></p>
+<p>- Put your test's supporting xml/xsl files in xml-xalan/test/tests/api/trax or 
+subdirectories</p>
+<p>- Use xml-xalan\test\traxapitest.bat (and APITest.properties) <link idref="run" anchor="how-to-run">to run your test</link>!
+Results will be placed by default into xml-xalan\test\results-api\APITest.xml</p>
+<p>The same basic template can be used for other kinds of API tests, with appropriate 
+changes to the package name, etc.</p>
+<p>You can pretty-print the results by using the <link idref="run" anchor="how-to-view-results">viewResults.xsl stylesheet</link> to turn
+the XML into an HTML format.</p>
+    </s2>
+      
+    <anchor name="write-xsl-tests"/>
+    <s2 title="How to Write Stylesheet Tests">
+    <p>Test cases in the "conf" group will ultimately be submitted to OASIS as part of 
+their vendor-independent project on XSLT/XPath Conformance Testing. For more 
+information about this project, visit 
+<jump href="http://www.oasis-open.org/committees/xslt/index.html">http://www.oasis-open.org/committees/xslt/index.html</jump></p>
+
+<p>The OASIS project will combine test cases from different sources and will provide a way to 
+customize the set of tests according to design decisions made for each processor 
+under test. We expect that when the OASIS test system is delivered, it will supplant 
+most or all of the "conf" group provided here. Conformance tests are designed as 
+streamlined "atomic" (or at least "molecular") tests, so there are several hundred of them.
+Currently, Lotus/IBM is working on submitting a significant body of Conformance tests 
+to OASIS. We also would like to temporarily provide most of the tests here on 
+Apache for Xalan developer's use, while OASIS finalizes it's test suite.</p>
+
+<p>You are invited to submit additional test cases by checking them into the "contrib" 
+area or mailing them to <jump href="mailto:David_Marston@lotus.com">David_Marston@lotus.com</jump>. 
+If you want to help with testing Xalan and wish to be 
+assigned to write some cases, send email to David Marston stating your interest. 
+Contributed tests may be sent along to the OASIS conformance project if they test 
+conformance. Guidelines for comments in tests are still evolving as part of the 
+OASIS project, so it may be necessary to add more comments or other annotation 
+after the test is submitted. We hope to have a template for contributing 
+stylesheet tests available soon that will closely match the eventual OASIS format.</p>
+
+<p>The Xalan team will continue to provide test automation, like the 
+StylesheetTestletDriver and various StylesheetTestlet classes, that 
+enables a user to easily run large suites of tests with fully rolled-up 
+reporting and a rich set of options.</p>
+    </s2>
+</s1>
diff --git a/test/java/xdocs/sources/tests/xalanctests.xml b/test/java/xdocs/sources/tests/xalanctests.xml
new file mode 100644
index 0000000..7410dbc
--- /dev/null
+++ b/test/java/xdocs/sources/tests/xalanctests.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<s1 title="Xalan C Testing">
+<ul>
+<li><link anchor="how-to-run-c">How-to: Run Xalan-C tests</link></li>
+<li><link anchor="ctesting-notes">Xalan-C testing notes</link></li>
+</ul>
+
+    <anchor name="how-to-run-c"/>
+    <s2 title="How-to: Run Xalan-C tests">
+      <p>In progress.</p>
+    </s2>    
+
+    <anchor name="ctesting-notes"/>
+    <s2 title="Xalan-C testing notes">
+      <p>In progress.  Fill in general notes here.</p>
+    </s2>    
+</s1>
diff --git a/test/java/xdocs/sources/xalantest.xml b/test/java/xdocs/sources/xalantest.xml
new file mode 100644
index 0000000..5fe2b39
--- /dev/null
+++ b/test/java/xdocs/sources/xalantest.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!DOCTYPE book SYSTEM "sbk:/style/dtd/book.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<book title="Xalan Testing" copyright="2000 The Apache Software Foundation">
+
+  <!--resources source="sbk:/sources/tests/resources.xml"/-->
+  
+  <document id="overview"
+            label="Overview"
+            source="tests/overview.xml"/>
+			
+  <document id="getstarted"
+            label="Getting Started"
+            source="tests/getstarted.xml"/>
+			
+  <separator/>
+  
+  <external href="apidocs/index.html" label="Java API"/>
+  
+  <separator/>
+ 
+  <document id="faq"
+            label="FAQ"
+            source="tests/faq.xml"/>
+
+  <document id="run"
+            label="Running Tests"
+            source="tests/run.xml"/>  
+  
+  <document id="submit"
+            label="Writing New Tests"
+            source="tests/submit.xml"/>
+			
+  <document id="design"
+            label="Test Standards"
+            source="tests/design.xml"/>
+
+  <document id="xalanc"
+            label="Xalan-C Tests"
+            source="tests/xalanctests.xml"/>
+  <separator/>
+  <!-- How do you create a separator or item with text, but no link? -->
+  <external href="http://xml.apache.org/xalan-j" label="Xalan-J 2.x"/>
+  <external href="http://xml.apache.org/xalan" label="Xalan-J 1.x"/>
+  <external href="http://xml.apache.org/xalan-c" label="Xalan-C 1.x"/>
+			
+</book>
+  
diff --git a/test/tests/2.7.3_release/2.7.3_release.bat b/test/tests/2.7.3_release/2.7.3_release.bat
new file mode 100644
index 0000000..474fe5d
--- /dev/null
+++ b/test/tests/2.7.3_release/2.7.3_release.bat
@@ -0,0 +1,77 @@
+@echo off
+rem
+rem ==========================================================================
+rem Copyright 2001-2023 The Apache Software Foundation.
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem ==========================================================================
+
+rem     Author: mukulg@apache.org
+
+rem Set JAVA_HOME environment variable, for the local environment
+
+if "%JAVA_HOME%"=="" goto noJavaHome
+
+set XALAN_BUILD_DIR_PATH=..\..\..\xalan-java\build;..\..\..\build
+
+set XERCES_ENDORSED_DIR_PATH=..\..\..\xalan-java\lib\endorsed;..\..\..\lib\endorsed
+
+rem #Test 1 (Testing XalanJ integer truncation bug fix, with XalanJ XSLTC processor)
+if exist "int_trunc.class" (
+  rem delete the result XalanJ translet file, if that exists
+  del int_trunc.class
+)
+
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XALAN_BUILD_DIR_PATH%;%XERCES_ENDORSED_DIR_PATH% org.apache.xalan.xslt.Process -XSLTC -IN int_trunc.xml -XSL int_trunc.xsl -SECURE -XX -XT 2>NUL
+
+if exist "int_trunc.class" (
+    echo Test failed. Please solve this, before checking in! 
+) else (
+    echo The xalanj integer truncation bug fix test passed!
+)
+
+rem #Test 2 (Testing bug fix of the jira issue XALANJ-2584, with XalanJ interpretive processor)
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XALAN_BUILD_DIR_PATH%;%XERCES_ENDORSED_DIR_PATH% org.apache.xalan.xslt.Process -IN jira_xalanj_2584.xml -XSL jira_xalanj_2584.xsl > jira_xalanj_2584.out 
+
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XERCES_ENDORSED_DIR_PATH% -classpath ..\..\java\build\testxsl.jar org.apache.qetest.XMLParserTestDriver jira_xalanj_2584.out xalan_interpretive
+
+rem #Test 3 (Testing bug fix of the jira issue XALANJ-2584, with XalanJ XSLTC processor)
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XALAN_BUILD_DIR_PATH%;%XERCES_ENDORSED_DIR_PATH% org.apache.xalan.xslt.Process -XSLTC -IN jira_xalanj_2584.xml -XSL jira_xalanj_2584.xsl > jira_xalanj_2584.out 
+
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XERCES_ENDORSED_DIR_PATH% -classpath ..\..\java\build\testxsl.jar org.apache.qetest.XMLParserTestDriver jira_xalanj_2584.out xalan_xsltc
+
+del jira_xalanj_2584.out
+
+rem #Test 4 (Testing bug fix of the jira issue XALANJ-2623, with XalanJ interpretive processor)
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XALAN_BUILD_DIR_PATH%;%XERCES_ENDORSED_DIR_PATH% org.apache.xalan.xslt.Process -IN jira_xalanj_2623.xml -XSL jira_xalanj_2623.xsl > jira_xalanj_2623.out 
+
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XERCES_ENDORSED_DIR_PATH% -classpath ..\..\java\build\testxsl.jar org.apache.qetest.XSValidationTestDriver jira_xalanj_2623.out jira_xalanj_2623.xsd xalan_interpretive
+
+rem #Test 5 (Testing bug fix of the jira issue XALANJ-2623, with XalanJ XSLTC processor)
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XALAN_BUILD_DIR_PATH%;%XERCES_ENDORSED_DIR_PATH% org.apache.xalan.xslt.Process -XSLTC -IN jira_xalanj_2623.xml -XSL jira_xalanj_2623.xsl > jira_xalanj_2623.out 
+
+%JAVA_HOME%\bin\java -Djava.endorsed.dirs=%XERCES_ENDORSED_DIR_PATH% -classpath ..\..\java\build\testxsl.jar org.apache.qetest.XSValidationTestDriver jira_xalanj_2623.out jira_xalanj_2623.xsd xalan_xsltc
+
+del jira_xalanj_2623.out
+
+goto end
+
+:noJavaHome
+echo Warning: JAVA_HOME environment variable is not set
+
+:end
+set XALAN_BUILD_DIR_PATH=
+set XERCES_ENDORSED_DIR_PATH= 
\ No newline at end of file
diff --git a/test/tests/2.7.3_release/2.7.3_release.sh b/test/tests/2.7.3_release/2.7.3_release.sh
new file mode 100644
index 0000000..2dbfbe9
--- /dev/null
+++ b/test/tests/2.7.3_release/2.7.3_release.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+#=========================================================================
+# Copyright 2001-2023 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.
+#=========================================================================
+#
+#	Author: mukulg@apache.org
+
+#	Setup:
+#         You must set JAVA_HOME, for example,
+#         $ export JAVA_HOME=/etc/alternatives/java_sdk
+
+if [ "$JAVA_HOME" = "" ]; then 
+    echo Warning: JAVA_HOME environment variable is not exported
+    echo You may have meant to set it to /etc/alternatives/java_sdk
+    exit 1
+fi
+
+JAVACMD=$JAVA_HOME/bin/java
+
+CLASSPATH=../../java/build/testxsl.jar
+
+XALAN_BUILD_DIR_PATH=../../../xalan-java/build:../../../build
+
+XERCES_ENDORSED_DIR_PATH=../../../xalan-java/lib/endorsed:../../../lib/endorsed
+
+TEST_XSL_DIR=../../java/build:../../../java/build
+
+#Test 1 (Testing XalanJ integer truncation bug fix, with XalanJ XSLTC processor)
+if [ -f "int_trunc.class" ]; then
+  # delete the result XalanJ translet file, if that exists
+  rm int_trunc.class
+fi
+
+$JAVACMD -Djava.endorsed.dirs=$XALAN_BUILD_DIR_PATH:$XERCES_ENDORSED_DIR_PATH org.apache.xalan.xslt.Process -XSLTC -IN int_trunc.xml -XSL int_trunc.xsl -SECURE -XX -XT 2>NUL
+
+if [ -f "int_trunc.class" ]; then
+    echo Test failed. Please solve this, before checking in! 
+else
+    echo The xalanj integer truncation bug fix test passed!
+fi
+
+#Test 2 (Testing bug fix of the jira issue XALANJ-2584, with XalanJ interpretive processor)
+$JAVACMD -Djava.endorsed.dirs=$XALAN_BUILD_DIR_PATH:$XERCES_ENDORSED_DIR_PATH org.apache.xalan.xslt.Process -IN jira_xalanj_2584.xml -XSL jira_xalanj_2584.xsl > jira_xalanj_2584.out 
+
+$JAVACMD -Djava.endorsed.dirs=$XERCES_ENDORSED_DIR_PATH -classpath $TEST_XSL_DIR/testxsl.jar org.apache.qetest.XMLParserTestDriver jira_xalanj_2584.out xalan_interpretive
+
+#Test 3 (Testing bug fix of the jira issue XALANJ-2584, with XalanJ XSLTC processor)
+$JAVACMD -Djava.endorsed.dirs=$XALAN_BUILD_DIR_PATH:$XERCES_ENDORSED_DIR_PATH org.apache.xalan.xslt.Process -XSLTC -IN jira_xalanj_2584.xml -XSL jira_xalanj_2584.xsl > jira_xalanj_2584.out 
+
+$JAVACMD -Djava.endorsed.dirs=$XERCES_ENDORSED_DIR_PATH -classpath $TEST_XSL_DIR/testxsl.jar org.apache.qetest.XMLParserTestDriver jira_xalanj_2584.out xalan_xsltc
+
+rm jira_xalanj_2584.out
+
+#Test 4 (Testing bug fix of the jira issue XALANJ-2623, with XalanJ interpretive processor)
+$JAVACMD -Djava.endorsed.dirs=$XALAN_BUILD_DIR_PATH:$XERCES_ENDORSED_DIR_PATH org.apache.xalan.xslt.Process -IN jira_xalanj_2623.xml -XSL jira_xalanj_2623.xsl > jira_xalanj_2623.out 
+
+$JAVACMD -Djava.endorsed.dirs=$XERCES_ENDORSED_DIR_PATH -classpath $TEST_XSL_DIR/testxsl.jar org.apache.qetest.XSValidationTestDriver jira_xalanj_2623.out jira_xalanj_2623.xsd xalan_interpretive
+
+#Test 5 (Testing bug fix of the jira issue XALANJ-2623, with XalanJ XSLTC processor)
+$JAVACMD -Djava.endorsed.dirs=$XALAN_BUILD_DIR_PATH:$XERCES_ENDORSED_DIR_PATH org.apache.xalan.xslt.Process -XSLTC -IN jira_xalanj_2623.xml -XSL jira_xalanj_2623.xsl > jira_xalanj_2623.out 
+
+$JAVACMD -Djava.endorsed.dirs=$XERCES_ENDORSED_DIR_PATH -classpath $TEST_XSL_DIR/testxsl.jar org.apache.qetest.XSValidationTestDriver jira_xalanj_2623.out jira_xalanj_2623.xsd xalan_xsltc
+
+rm jira_xalanj_2623.out
diff --git a/test/tests/2.7.3_release/int_trunc.xml b/test/tests/2.7.3_release/int_trunc.xml
new file mode 100644
index 0000000..1dd94d4
--- /dev/null
+++ b/test/tests/2.7.3_release/int_trunc.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<aab>test string</aab>
\ No newline at end of file
diff --git a/test/tests/2.7.3_release/int_trunc.xsl b/test/tests/2.7.3_release/int_trunc.xsl
new file mode 100644
index 0000000..6173df8
--- /dev/null
+++ b/test/tests/2.7.3_release/int_trunc.xsl
@@ -0,0 +1,219 @@
+<!--
+  This XSLT stylesheet has been prepared, by running a tool related to this bug report, provided by XalanJ user.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:template name='aaa' match="/aab"><ceil aac='aad' aae='aaf' aag='aah' aai='aaj' aak='aal' aam='aan' aao='aap' aaq='aar' aas='aat' aau='aav' aaw='aax' aay='aaz' aaA='aaB' aaC='aaD' aaE='aaF' aaG='aaH' aaI='aaJ' aaK='aaL' aaM='aaN' aaO='aaP' aaQ='aaR' aaS='aaT' aaU='aaV' aaW='aaX' aaY='aaZ' aba='abb' abc='abd' abe='abf' abg='abh' abi='abj' abk='abl' abm='abn' abo='abp' abq='abr' abs='abt' abu='abv' abw='abx' aby='abz' abA='abB' abC='abD' abE='abF' abG='abH' abI='abJ' abK='abL' abM='abN' abO='abP' abQ='abR' abS='abT' abU='abV' abW='abX' abY='abZ' aca='acb' acc='acd' ace='acf' acg='ach' aci='acj' ack='acl' acm='acn' aco='acp' acq='acr' acs='act' acu='acv' acw='acx' acy='acz' acA='acB' acC='acD' acE='acF' acG='acH' acI='acJ' acK='acL' acM='acN' acO='acP' acQ='acR' acS='acT' acU='acV' acW='acX' acY='acZ' ada='adb' adc='add' ade='adf' adg='adh' adi='adj' adk='adl' adm='adn' ado='adp' adq='adr' ads='adt' adu='adv' adw='adx' ady='adz' adA='adB' adC='adD' adE='adF' adG='adH' adI='adJ' adK='adL' adM='adN' adO='adP' adQ='adR' adS='adT' adU='adV' adW='adX' /><xsl:value-of select='ceiling(1337)'/><xsl:value-of select='ceiling(133701)'/><xsl:value-of select='ceiling(133702)'/><adY adZ='aea' aeb='aec' aed='aee' aef='aeg' aeh='aei' aej='aek' ael='aem' aen='aeo' aep='aeq' aer='aes' aet='aeu' aev='aew' aex='aey' aez='aeA' aeB='aeC' aeD='aeE' aeF='aeG' aeH='aeI' aeJ='aeK' aeL='aeM' aeN='aeO' aeP='aeQ' aeR='aeS' aeT='aeU' aeV='aeW' aeX='aeY' aeZ='afa' afb='afc' afd='afe' aff='afg' afh='afi' afj='afk' afl='afm' afn='afo' afp='afq' afr='afs' aft='afu' afv='afw' afx='afy' afz='afA' afB='afC' afD='afE' afF='afG' afH='afI' afJ='afK' afL='afM' afN='afO' afP='afQ' afR='afS' afT='afU' afV='afW' afX='afY' afZ='aga' agb='agc' agd='age' agf='agg' agh='agi' agj='agk' agl='agm' agn='ago' agp='agq' agr='ags' agt='agu' agv='agw' agx='agy' agz='agA' agB='agC' agD='agE' agF='agG' agH='agI' agJ='agK' agL='agM' agN='agO' agP='agQ' agR='agS' agT='agU' agV='agW' agX='agY' agZ='aha' ahb='ahc' ahd='ahe' ahf='ahg' ahh='ahi' ahj='ahk' ahl='ahm' ahn='aho' ahp='ahq' ahr='ahs' aht='ahu' ahv='ahw' ahx='ahy' ahz='ahA' ahB='ahC' ahD='ahE' ahF='ahG' ahH='ahI' ahJ='ahK' ahL='ahM' ahN='ahO' ahP='ahQ' ahR='ahS' ahT='ahU' ahV='ahW' ahX='ahY' ahZ='aia' aib='aic' aid='aie' aif='aig' aih='aii' aij='aik' ail='aim' ain='aio' aip='aiq' air='ais' ait='aiu' aiv='aiw' aix='aiy' aiz='aiA' aiB='aiC' aiD='aiE' aiF='aiG' aiH='aiI' aiJ='aiK' aiL='aiM' aiN='aiO' aiP='aiQ' aiR='aiS' aiT='aiU' aiV='aiW' aiX='aiY' aiZ='aja' ajb='ajc' ajd='aje' ajf='ajg' ajh='aji' ajj='ajk' ajl='ajm' ajn='ajo' ajp='ajq' ajr='ajs' ajt='aju' ajv='ajw' ajx='ajy' ajz='ajA' ajB='ajC' ajD='ajE' ajF='ajG' ajH='ajI' ajJ='ajK' ajL='ajM' ajN='ajO' ajP='ajQ' ajR='ajS' ajT='ajU' ajV='ajW' ajX='ajY' ajZ='aka' akb='akc' akd='ake' akf='akg' akh='aki' akj='akk' akl='akm' akn='ako' akp='akq' akr='aks' akt='aku' akv='akw' akx='aky' akz='akA' akB='akC' akD='akE' akF='akG' akH='akI' akJ='akK' akL='akM' akN='akO' akP='akQ' akR='akS' akT='akU' akV='akW' akX='akY' akZ='ala' alb='alc' ald='ale' alf='alg' alh='ali' alj='alk' all='alm' aln='alo' alp='alq' alr='als' alt='alu' alv='alw' alx='aly' alz='alA' alB='alC' alD='alE' alF='alG' alH='alI' alJ='alK' alL='alM' alN='alO' alP='alQ' alR='alS' alT='alU' alV='alW' alX='alY' alZ='ama' amb='amc' amd='ame' amf='amg' amh='ami' amj='amk' aml='amm' amn='amo' amp='amq' amr='ams' amt='amu' amv='amw' amx='amy' amz='amA' amB='amC' amD='amE' amF='amG' amH='amI' amJ='amK' amL='amM' amN='amO' amP='amQ' amR='amS' amT='amU' amV='amW' amX='amY' amZ='ana' anb='anc' and='ane' anf='ang' anh='ani' anj='ank' anl='anm' ann='ano' anp='anq' anr='ans' ant='anu' anv='anw' anx='any' anz='anA' anB='anC' anD='anE' anF='anG' anH='anI' anJ='anK' anL='anM' anN='anO' anP='anQ' anR='anS' anT='anU' anV='anW' anX='anY' anZ='aoa' aob='aoc' aod='aoe' aof='aog' aoh='aoi' aoj='aok' aol='aom' aon='aoo' aop='aoq' aor='aos' aot='aou' aov='aow' aox='aoy' aoz='aoA' aoB='aoC' aoD='aoE' aoF='aoG' aoH='aoI' aoJ='aoK' aoL='aoM' aoN='aoO' aoP='aoQ' aoR='aoS' aoT='aoU' aoV='aoW' aoX='aoY' aoZ='apa' apb='apc' apd='ape' apf='apg' aph='api' apj='apk' apl='apm' apn='apo' app='apq' apr='aps' apt='apu' apv='apw' apx='apy' apz='apA' apB='apC' apD='apE' apF='apG' apH='apI' apJ='apK' apL='apM' apN='apO' apP='apQ' apR='apS' apT='apU' apV='apW' apX='apY' apZ='aqa' aqb='aqc' aqd='aqe' aqf='aqg' aqh='aqi' aqj='aqk' />
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008344026969402015)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007406827652861232)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010609979082)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001393005378307274)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000386843816)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025588349409616466)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000108331572)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104126)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210413)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104136)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210414)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104146)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210415)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104156)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210416)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104166)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210417)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104176)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210418)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104186)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210419)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021046406)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010655986780146883)'/>
+        <aql aqm='aqn' aqo='aqp' aqq='aqr' aqs='aqt' aqu='aqv' aqw='aqx' aqy='aqz' aqA='aqB' aqC='aqD' aqE='aqF' aqG='aqH' aqI='aqJ' aqK='aqL' aqM='aqN' aqO='aqP' aqQ='aqR' aqS='aqT' aqU='aqV' aqW='aqX' aqY='aqZ' ara='arb' arc='ard' are='arf' arg='arh' ari='arj' ark='arl' arm='arn' aro='arp' arq='arr' ars='art' aru='arv' arw='arx' ary='arz' arA='arB' arC='arD' arE='arF' arG='arH' arI='arJ' arK='arL' arM='arN' arO='arP' arQ='arR' arS='arT' arU='arV' arW='arX' arY='arZ' asa='asb' asc='asd' ase='asf' asg='ash' asi='asj' ask='asl' asm='asn' aso='asp' asq='asr' ass='ast' asu='asv' asw='asx' asy='asz' asA='asB' asC='asD' asE='asF' asG='asH' asI='asJ' asK='asL' asM='asN' asO='asP' asQ='asR' asS='asT' asU='asV' asW='asX' asY='asZ' ata='atb' atc='atd' ate='atf' atg='ath' ati='atj' atk='atl' atm='atn' ato='atp' atq='atr' ats='att' atu='atv' atw='atx' aty='atz' />
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000142326501945645)'/>
+        <atA atB='atC' atD='atE' atF='atG' atH='atI' atJ='atK' atL='atM' atN='atO' atP='atQ' atR='atS' atT='atU' atV='atW' atX='atY' atZ='aua' aub='auc' aud='aue' auf='aug' auh='aui' auj='auk' aul='aum' aun='auo' aup='auq' aur='aus' aut='auu' auv='auw' aux='auy' auz='auA' auB='auC' auD='auE' auF='auG' auH='auI' auJ='auK' auL='auM' auN='auO' auP='auQ' auR='auS' auT='auU' auV='auW' auX='auY' auZ='ava' avb='avc' avd='ave' avf='avg' avh='avi' avj='avk' avl='avm' avn='avo' avp='avq' avr='avs' avt='avu' avv='avw' avx='avy' avz='avA' avB='avC' avD='avE' avF='avG' avH='avI' avJ='avK' avL='avM' avN='avO' avP='avQ' avR='avS' avT='avU' avV='avW' avX='avY' avZ='awa' awb='awc' awd='awe' awf='awg' awh='awi' awj='awk' awl='awm' awn='awo' awp='awq' awr='aws' awt='awu' awv='aww' awx='awy' awz='awA' awB='awC' awD='awE' awF='awG' awH='awI' awJ='awK' awL='awM' awN='awO' awP='awQ' awR='awS' awT='awU' awV='awW' awX='awY' awZ='axa' axb='axc' axd='axe' axf='axg' axh='axi' axj='axk' axl='axm' axn='axo' axp='axq' axr='axs' axt='axu' axv='axw' axx='axy' axz='axA' axB='axC' axD='axE' axF='axG' axH='axI' axJ='axK' axL='axM' axN='axO' axP='axQ' axR='axS' axT='axU' axV='axW' axX='axY' axZ='aya' ayb='ayc' ayd='aye' ayf='ayg' ayh='ayi' ayj='ayk' ayl='aym' ayn='ayo' ayp='ayq' ayr='ays' ayt='ayu' ayv='ayw' ayx='ayy' ayz='ayA' ayB='ayC' ayD='ayE' ayF='ayG' ayH='ayI' ayJ='ayK' ayL='ayM' ayN='ayO' ayP='ayQ' ayR='ayS' ayT='ayU' ayV='ayW' ayX='ayY' ayZ='aza' azb='azc' azd='aze' azf='azg' azh='azi' azj='azk' azl='azm' azn='azo' azp='azq' azr='azs' azt='azu' azv='azw' azx='azy' azz='azA' azB='azC' azD='azE' azF='azG' azH='azI' azJ='azK' azL='azM' azN='azO' azP='azQ' azR='azS' azT='azU' azV='azW' azX='azY' azZ='aAa' aAb='aAc' aAd='aAe' aAf='aAg' aAh='aAi' aAj='aAk' aAl='aAm' aAn='aAo' aAp='aAq' aAr='aAs' aAt='aAu' aAv='aAw' aAx='aAy' aAz='aAA' aAB='aAC' aAD='aAE' aAF='aAG' aAH='aAI' aAJ='aAK' aAL='aAM' aAN='aAO' aAP='aAQ' aAR='aAS' aAT='aAU' aAV='aAW' aAX='aAY' aAZ='aBa' aBb='aBc' aBd='aBe' aBf='aBg' aBh='aBi' aBj='aBk' aBl='aBm' aBn='aBo' aBp='aBq' aBr='aBs' aBt='aBu' aBv='aBw' aBx='aBy' aBz='aBA' aBB='aBC' aBD='aBE' aBF='aBG' aBH='aBI' aBJ='aBK' aBL='aBM' aBN='aBO' aBP='aBQ' aBR='aBS' aBT='aBU' aBV='aBW' aBX='aBY' aBZ='aCa' aCb='aCc' aCd='aCe' aCf='aCg' aCh='aCi' aCj='aCk' aCl='aCm' aCn='aCo' aCp='aCq' aCr='aCs' aCt='aCu' aCv='aCw' aCx='aCy' aCz='aCA' aCB='aCC' aCD='aCE' aCF='aCG' aCH='aCI' aCJ='aCK' aCL='aCM' aCN='aCO' aCP='aCQ' aCR='aCS' aCT='aCU' aCV='aCW' aCX='aCY' aCZ='aDa' aDb='aDc' aDd='aDe' aDf='aDg' aDh='aDi' aDj='aDk' aDl='aDm' aDn='aDo' aDp='aDq' aDr='aDs' aDt='aDu' aDv='aDw' aDx='aDy' aDz='aDA' aDB='aDC' aDD='aDE' aDF='aDG' aDH='aDI' aDJ='aDK' aDL='aDM' aDN='aDO' aDP='aDQ' aDR='aDS' aDT='aDU' aDV='aDW' aDX='aDY' aDZ='aEa' aEb='aEc' aEd='aEe' aEf='aEg' aEh='aEi' aEj='aEk' aEl='aEm' aEn='aEo' aEp='aEq' aEr='aEs' aEt='aEu' aEv='aEw' aEx='aEy' aEz='aEA' aEB='aEC' aED='aEE' aEF='aEG' aEH='aEI' aEJ='aEK' aEL='aEM' aEN='aEO' aEP='aEQ' aER='aES' aET='aEU' aEV='aEW' aEX='aEY' aEZ='aFa' aFb='aFc' aFd='aFe' aFf='aFg' aFh='aFi' aFj='aFk' aFl='aFm' aFn='aFo' aFp='aFq' aFr='aFs' aFt='aFu' aFv='aFw' aFx='aFy' aFz='aFA' aFB='aFC' aFD='aFE' aFF='aFG' aFH='aFI' aFJ='aFK' aFL='aFM' aFN='aFO' aFP='aFQ' aFR='aFS' aFT='aFU' aFV='aFW' aFX='aFY' aFZ='aGa' aGb='aGc' aGd='aGe' aGf='aGg' aGh='aGi' aGj='aGk' aGl='aGm' aGn='aGo' aGp='aGq' aGr='aGs' aGt='aGu' aGv='aGw' aGx='aGy' aGz='aGA' aGB='aGC' aGD='aGE' aGF='aGG' aGH='aGI' aGJ='aGK' aGL='aGM' aGN='aGO' aGP='aGQ' aGR='aGS' aGT='aGU' aGV='aGW' aGX='aGY' aGZ='aHa' aHb='aHc' aHd='aHe' aHf='aHg' aHh='aHi' aHj='aHk' aHl='aHm' aHn='aHo' aHp='aHq' aHr='aHs' aHt='aHu' aHv='aHw' aHx='aHy' aHz='aHA' aHB='aHC' aHD='aHE' aHF='aHG' aHH='aHI' aHJ='aHK' aHL='aHM' aHN='aHO' aHP='aHQ' aHR='aHS' aHT='aHU' aHV='aHW' aHX='aHY' aHZ='aIa' aIb='aIc' aId='aIe' aIf='aIg' aIh='aIi' aIj='aIk' aIl='aIm' aIn='aIo' aIp='aIq' aIr='aIs' aIt='aIu' aIv='aIw' aIx='aIy' aIz='aIA' aIB='aIC' aID='aIE' aIF='aIG' aIH='aII' aIJ='aIK' aIL='aIM' aIN='aIO' aIP='aIQ' aIR='aIS' aIT='aIU' aIV='aIW' aIX='aIY' aIZ='aJa' aJb='aJc' aJd='aJe' aJf='aJg' aJh='aJi' aJj='aJk' aJl='aJm' aJn='aJo' aJp='aJq' aJr='aJs' aJt='aJu' aJv='aJw' aJx='aJy' aJz='aJA' aJB='aJC' aJD='aJE' aJF='aJG' aJH='aJI' aJJ='aJK' aJL='aJM' aJN='aJO' aJP='aJQ' aJR='aJS' aJT='aJU' aJV='aJW' aJX='aJY' aJZ='aKa' aKb='aKc' aKd='aKe' aKf='aKg' aKh='aKi' aKj='aKk' aKl='aKm' aKn='aKo' aKp='aKq' aKr='aKs' aKt='aKu' aKv='aKw' aKx='aKy' aKz='aKA' aKB='aKC' aKD='aKE' aKF='aKG' aKH='aKI' aKJ='aKK' aKL='aKM' aKN='aKO' aKP='aKQ' aKR='aKS' aKT='aKU' aKV='aKW' aKX='aKY' aKZ='aLa' aLb='aLc' aLd='aLe' aLf='aLg' aLh='aLi' aLj='aLk' aLl='aLm' aLn='aLo' aLp='aLq' aLr='aLs' aLt='aLu' aLv='aLw' aLx='aLy' aLz='aLA' aLB='aLC' aLD='aLE' aLF='aLG' aLH='aLI' aLJ='aLK' aLL='aLM' aLN='aLO' aLP='aLQ' aLR='aLS' aLT='aLU' aLV='aLW' aLX='aLY' aLZ='aMa' aMb='aMc' aMd='aMe' aMf='aMg' aMh='aMi' aMj='aMk' aMl='aMm' aMn='aMo' aMp='aMq' aMr='aMs' aMt='aMu' aMv='aMw' aMx='aMy' aMz='aMA' aMB='aMC' aMD='aME' aMF='aMG' aMH='aMI' aMJ='aMK' aML='aMM' aMN='aMO' aMP='aMQ' aMR='aMS' aMT='aMU' aMV='aMW' aMX='aMY' aMZ='aNa' aNb='aNc' aNd='aNe' aNf='aNg' aNh='aNi' aNj='aNk' aNl='aNm' aNn='aNo' aNp='aNq' aNr='aNs' aNt='aNu' aNv='aNw' aNx='aNy' aNz='aNA' aNB='aNC' aND='aNE' aNF='aNG' aNH='aNI' aNJ='aNK' aNL='aNM' aNN='aNO' aNP='aNQ' aNR='aNS' aNT='aNU' aNV='aNW' aNX='aNY' aNZ='aOa' aOb='aOc' aOd='aOe' aOf='aOg' aOh='aOi' aOj='aOk' aOl='aOm' aOn='aOo' aOp='aOq' aOr='aOs' aOt='aOu' aOv='aOw' aOx='aOy' aOz='aOA' aOB='aOC' aOD='aOE' aOF='aOG' aOH='aOI' aOJ='aOK' aOL='aOM' aON='aOO' aOP='aOQ' aOR='aOS' aOT='aOU' aOV='aOW' aOX='aOY' aOZ='aPa' aPb='aPc' aPd='aPe' aPf='aPg' aPh='aPi' aPj='aPk' aPl='aPm' aPn='aPo' aPp='aPq' aPr='aPs' aPt='aPu' aPv='aPw' aPx='aPy' aPz='aPA' aPB='aPC' aPD='aPE' aPF='aPG' aPH='aPI' aPJ='aPK' aPL='aPM' aPN='aPO' aPP='aPQ' aPR='aPS' aPT='aPU' aPV='aPW' aPX='aPY' aPZ='aQa' aQb='aQc' aQd='aQe' aQf='aQg' aQh='aQi' aQj='aQk' aQl='aQm' aQn='aQo' aQp='aQq' aQr='aQs' aQt='aQu' aQv='aQw' aQx='aQy' aQz='aQA' aQB='aQC' aQD='aQE' aQF='aQG' aQH='aQI' aQJ='aQK' aQL='aQM' aQN='aQO' aQP='aQQ' aQR='aQS' aQT='aQU' aQV='aQW' aQX='aQY' aQZ='aRa' aRb='aRc' aRd='aRe' aRf='aRg' aRh='aRi' aRj='aRk' aRl='aRm' aRn='aRo' aRp='aRq' aRr='aRs' aRt='aRu' aRv='aRw' aRx='aRy' aRz='aRA' aRB='aRC' aRD='aRE' aRF='aRG' aRH='aRI' aRJ='aRK' aRL='aRM' aRN='aRO' aRP='aRQ' aRR='aRS' aRT='aRU' aRV='aRW' aRX='aRY' aRZ='aSa' aSb='aSc' aSd='aSe' aSf='aSg' aSh='aSi' aSj='aSk' aSl='aSm' aSn='aSo' aSp='aSq' aSr='aSs' aSt='aSu' aSv='aSw' aSx='aSy' aSz='aSA' aSB='aSC' aSD='aSE' aSF='aSG' aSH='aSI' aSJ='aSK' aSL='aSM' aSN='aSO' aSP='aSQ' aSR='aSS' aST='aSU' aSV='aSW' aSX='aSY' aSZ='aTa' aTb='aTc' aTd='aTe' aTf='aTg' aTh='aTi' aTj='aTk' aTl='aTm' aTn='aTo' aTp='aTq' aTr='aTs' aTt='aTu' aTv='aTw' aTx='aTy' aTz='aTA' aTB='aTC' aTD='aTE' aTF='aTG' aTH='aTI' aTJ='aTK' aTL='aTM' aTN='aTO' aTP='aTQ' aTR='aTS' aTT='aTU' aTV='aTW' aTX='aTY' aTZ='aUa' aUb='aUc' aUd='aUe' aUf='aUg' aUh='aUi' aUj='aUk' aUl='aUm' aUn='aUo' aUp='aUq' aUr='aUs' aUt='aUu' aUv='aUw' aUx='aUy' aUz='aUA' aUB='aUC' aUD='aUE' aUF='aUG' aUH='aUI' aUJ='aUK' aUL='aUM' aUN='aUO' aUP='aUQ' aUR='aUS' aUT='aUU' aUV='aUW' aUX='aUY' aUZ='aVa' aVb='aVc' aVd='aVe' aVf='aVg' aVh='aVi' aVj='aVk' aVl='aVm' aVn='aVo' aVp='aVq' aVr='aVs' aVt='aVu' aVv='aVw' aVx='aVy' aVz='aVA' aVB='aVC' aVD='aVE' aVF='aVG' aVH='aVI' aVJ='aVK' aVL='aVM' aVN='aVO' aVP='aVQ' aVR='aVS' aVT='aVU' aVV='aVW' aVX='aVY' aVZ='aWa' aWb='aWc' aWd='aWe' aWf='aWg' aWh='aWi' aWj='aWk' aWl='aWm' aWn='aWo' aWp='aWq' aWr='aWs' aWt='aWu' aWv='aWw' aWx='aWy' aWz='aWA' aWB='aWC' aWD='aWE' aWF='aWG' aWH='aWI' aWJ='aWK' aWL='aWM' aWN='aWO' aWP='aWQ' aWR='aWS' aWT='aWU' aWV='aWW' aWX='aWY' aWZ='aXa' aXb='aXc' aXd='aXe' aXf='aXg' aXh='aXi' aXj='aXk' aXl='aXm' aXn='aXo' aXp='aXq' aXr='aXs' aXt='aXu' aXv='aXw' aXx='aXy' aXz='aXA' aXB='aXC' aXD='aXE' aXF='aXG' aXH='aXI' aXJ='aXK' aXL='aXM' aXN='aXO' aXP='aXQ' aXR='aXS' aXT='aXU' aXV='aXW' aXX='aXY' aXZ='aYa' aYb='aYc' aYd='aYe' aYf='aYg' aYh='aYi' aYj='aYk' aYl='aYm' aYn='aYo' aYp='aYq' aYr='aYs' aYt='aYu' aYv='aYw' aYx='aYy' aYz='aYA' aYB='aYC' aYD='aYE' aYF='aYG' aYH='aYI' aYJ='aYK' aYL='aYM' aYN='aYO' aYP='aYQ' aYR='aYS' aYT='aYU' aYV='aYW' aYX='aYY' aYZ='aZa' aZb='aZc' aZd='aZe' aZf='aZg' aZh='aZi' aZj='aZk' aZl='aZm' aZn='aZo' aZp='aZq' aZr='aZs' aZt='aZu' aZv='aZw' aZx='aZy' aZz='aZA' aZB='aZC' aZD='aZE' aZF='aZG' aZH='aZI' aZJ='aZK' aZL='aZM' aZN='aZO' aZP='aZQ' aZR='aZS' aZT='aZU' aZV='aZW' aZX='aZY' aZZ='baa' bab='bac' bad='bae' baf='bag' bah='bai' baj='bak' bal='bam' ban='bao' bap='baq' bar='bas' bat='bau' bav='baw' bax='bay' baz='baA' baB='baC' baD='baE' baF='baG' baH='baI' baJ='baK' baL='baM' baN='baO' baP='baQ' baR='baS' baT='baU' baV='baW' baX='baY' baZ='bba' bbb='bbc' bbd='bbe' bbf='bbg' bbh='bbi' bbj='bbk' bbl='bbm' bbn='bbo' bbp='bbq' bbr='bbs' bbt='bbu' bbv='bbw' bbx='bby' bbz='bbA' bbB='bbC' bbD='bbE' bbF='bbG' bbH='bbI' bbJ='bbK' bbL='bbM' bbN='bbO' bbP='bbQ' bbR='bbS' bbT='bbU' bbV='bbW' bbX='bbY' bbZ='bca' bcb='bcc' bcd='bce' bcf='bcg' bch='bci' bcj='bck' bcl='bcm' bcn='bco' bcp='bcq' bcr='bcs' bct='bcu' bcv='bcw' bcx='bcy' bcz='bcA' bcB='bcC' bcD='bcE' bcF='bcG' bcH='bcI' bcJ='bcK' bcL='bcM' bcN='bcO' bcP='bcQ' bcR='bcS' bcT='bcU' bcV='bcW' bcX='bcY' bcZ='bda' bdb='bdc' bdd='bde' bdf='bdg' bdh='bdi' bdj='bdk' bdl='bdm' bdn='bdo' bdp='bdq' bdr='bds' bdt='bdu' bdv='bdw' bdx='bdy' bdz='bdA' bdB='bdC' bdD='bdE' bdF='bdG' bdH='bdI' bdJ='bdK' bdL='bdM' bdN='bdO' bdP='bdQ' bdR='bdS' bdT='bdU' bdV='bdW' bdX='bdY' bdZ='bea' beb='bec' bed='bee' bef='beg' beh='bei' bej='bek' bel='bem' ben='beo' bep='beq' ber='bes' bet='beu' bev='bew' bex='bey' bez='beA' beB='beC' beD='beE' beF='beG' beH='beI' beJ='beK' beL='beM' beN='beO' beP='beQ' beR='beS' beT='beU' beV='beW' beX='beY' beZ='bfa' bfb='bfc' bfd='bfe' bff='bfg' bfh='bfi' bfj='bfk' bfl='bfm' bfn='bfo' bfp='bfq' bfr='bfs' bft='bfu' bfv='bfw' bfx='bfy' bfz='bfA' bfB='bfC' bfD='bfE' bfF='bfG' bfH='bfI' bfJ='bfK' bfL='bfM' bfN='bfO' bfP='bfQ' bfR='bfS' bfT='bfU' bfV='bfW' bfX='bfY' bfZ='bga' bgb='bgc' bgd='bge' bgf='bgg' bgh='bgi' bgj='bgk' bgl='bgm' bgn='bgo' bgp='bgq' bgr='bgs' bgt='bgu' bgv='bgw' bgx='bgy' bgz='bgA' bgB='bgC' bgD='bgE' bgF='bgG' bgH='bgI' bgJ='bgK' bgL='bgM' bgN='bgO' bgP='bgQ' bgR='bgS' bgT='bgU' bgV='bgW' bgX='bgY' bgZ='bha' bhb='bhc' bhd='bhe' bhf='bhg' bhh='bhi' bhj='bhk' bhl='bhm' bhn='bho' bhp='bhq' bhr='bhs' bht='bhu' bhv='bhw' bhx='bhy' bhz='bhA' bhB='bhC' bhD='bhE' bhF='bhG' bhH='bhI' bhJ='bhK' bhL='bhM' bhN='bhO' bhP='bhQ' bhR='bhS' bhT='bhU' bhV='bhW' bhX='bhY' bhZ='bia' bib='bic' bid='bie' bif='big' bih='bii' bij='bik' bil='bim' bin='bio' bip='biq' bir='bis' bit='biu' biv='biw' bix='biy' biz='biA' biB='biC' biD='biE' biF='biG' biH='biI' biJ='biK' biL='biM' biN='biO' biP='biQ' biR='biS' biT='biU' biV='biW' biX='biY' biZ='bja' bjb='bjc' bjd='bje' bjf='bjg' bjh='bji' bjj='bjk' bjl='bjm' bjn='bjo' bjp='bjq' bjr='bjs' bjt='bju' bjv='bjw' bjx='bjy' bjz='bjA' bjB='bjC' bjD='bjE' bjF='bjG' bjH='bjI' bjJ='bjK' bjL='bjM' bjN='bjO' bjP='bjQ' bjR='bjS' bjT='bjU' bjV='bjW' bjX='bjY' bjZ='bka' bkb='bkc' bkd='bke' bkf='bkg' bkh='bki' bkj='bkk' bkl='bkm' bkn='bko' bkp='bkq' bkr='bks' bkt='bku' bkv='bkw' bkx='bky' bkz='bkA' bkB='bkC' bkD='bkE' bkF='bkG' bkH='bkI' bkJ='bkK' bkL='bkM' bkN='bkO' bkP='bkQ' bkR='bkS' bkT='bkU' bkV='bkW' bkX='bkY' bkZ='bla' blb='blc' bld='ble' blf='blg' blh='bli' blj='blk' bll='blm' bln='blo' blp='blq' blr='bls' blt='blu' blv='blw' blx='bly' blz='blA' blB='blC' blD='blE' blF='blG' blH='blI' blJ='blK' blL='blM' blN='blO' blP='blQ' blR='blS' blT='blU' blV='blW' blX='blY' blZ='bma' bmb='bmc' bmd='bme' bmf='bmg' bmh='bmi' bmj='bmk' bml='bmm' bmn='bmo' bmp='bmq' bmr='bms' bmt='bmu' bmv='bmw' bmx='bmy' bmz='bmA' bmB='bmC' bmD='bmE' bmF='bmG' bmH='bmI' bmJ='bmK' bmL='bmM' bmN='bmO' bmP='bmQ' bmR='bmS' bmT='bmU' bmV='bmW' bmX='bmY' bmZ='bna' bnb='bnc' bnd='bne' bnf='bng' bnh='bni' bnj='bnk' bnl='bnm' bnn='bno' bnp='bnq' bnr='bns' bnt='bnu' bnv='bnw' bnx='bny' bnz='bnA' bnB='bnC' bnD='bnE' bnF='bnG' bnH='bnI' bnJ='bnK' bnL='bnM' bnN='bnO' bnP='bnQ' bnR='bnS' bnT='bnU' bnV='bnW' bnX='bnY' bnZ='boa' bob='boc' bod='boe' bof='bog' boh='boi' boj='bok' bol='bom' bon='boo' bop='boq' bor='bos' bot='bou' bov='bow' box='boy' boz='boA' boB='boC' boD='boE' boF='boG' boH='boI' boJ='boK' boL='boM' boN='boO' boP='boQ' boR='boS' boT='boU' boV='boW' boX='boY' boZ='bpa' bpb='bpc' bpd='bpe' bpf='bpg' bph='bpi' bpj='bpk' bpl='bpm' bpn='bpo' bpp='bpq' bpr='bps' bpt='bpu' bpv='bpw' bpx='bpy' bpz='bpA' bpB='bpC' bpD='bpE' bpF='bpG' bpH='bpI' bpJ='bpK' bpL='bpM' bpN='bpO' bpP='bpQ' bpR='bpS' bpT='bpU' bpV='bpW' bpX='bpY' bpZ='bqa' bqb='bqc' bqd='bqe' bqf='bqg' bqh='bqi' bqj='bqk' bql='bqm' bqn='bqo' bqp='bqq' bqr='bqs' bqt='bqu' bqv='bqw' bqx='bqy' bqz='bqA' bqB='bqC' bqD='bqE' bqF='bqG' bqH='bqI' bqJ='bqK' bqL='bqM' bqN='bqO' bqP='bqQ' bqR='bqS' bqT='bqU' bqV='bqW' bqX='bqY' bqZ='bra' brb='brc' brd='bre' brf='brg' brh='bri' brj='brk' brl='brm' brn='bro' brp='brq' brr='brs' brt='bru' brv='brw' brx='bry' brz='brA' brB='brC' brD='brE' brF='brG' brH='brI' brJ='brK' brL='brM' brN='brO' brP='brQ' brR='brS' brT='brU' brV='brW' brX='brY' brZ='bsa' bsb='bsc' bsd='bse' bsf='bsg' bsh='bsi' bsj='bsk' bsl='bsm' bsn='bso' bsp='bsq' bsr='bss' bst='bsu' bsv='bsw' bsx='bsy' bsz='bsA' bsB='bsC' bsD='bsE' bsF='bsG' bsH='bsI' bsJ='bsK' bsL='bsM' bsN='bsO' bsP='bsQ' bsR='bsS' bsT='bsU' bsV='bsW' bsX='bsY' bsZ='bta' btb='btc' btd='bte' btf='btg' bth='bti' btj='btk' btl='btm' btn='bto' btp='btq' btr='bts' btt='btu' btv='btw' btx='bty' btz='btA' btB='btC' btD='btE' btF='btG' btH='btI' btJ='btK' btL='btM' btN='btO' btP='btQ' btR='btS' btT='btU' btV='btW' btX='btY' btZ='bua' bub='buc' bud='bue' buf='bug' buh='bui' buj='buk' bul='bum' bun='buo' bup='buq' bur='bus' but='buu' buv='buw' bux='buy' buz='buA' buB='buC' buD='buE' buF='buG' buH='buI' buJ='buK' buL='buM' buN='buO' buP='buQ' buR='buS' buT='buU' buV='buW' buX='buY' buZ='bva' bvb='bvc' bvd='bve' bvf='bvg' bvh='bvi' bvj='bvk' bvl='bvm' bvn='bvo' bvp='bvq' bvr='bvs' bvt='bvu' bvv='bvw' bvx='bvy' bvz='bvA' bvB='bvC' bvD='bvE' bvF='bvG' bvH='bvI' bvJ='bvK' bvL='bvM' bvN='bvO' bvP='bvQ' bvR='bvS' bvT='bvU' bvV='bvW' bvX='bvY' bvZ='bwa' bwb='bwc' bwd='bwe' bwf='bwg' bwh='bwi' bwj='bwk' bwl='bwm' bwn='bwo' bwp='bwq' bwr='bws' bwt='bwu' bwv='bww' bwx='bwy' bwz='bwA' bwB='bwC' bwD='bwE' bwF='bwG' bwH='bwI' bwJ='bwK' bwL='bwM' bwN='bwO' bwP='bwQ' bwR='bwS' bwT='bwU' bwV='bwW' bwX='bwY' bwZ='bxa' bxb='bxc' bxd='bxe' bxf='bxg' bxh='bxi' bxj='bxk' bxl='bxm' bxn='bxo' bxp='bxq' bxr='bxs' bxt='bxu' bxv='bxw' bxx='bxy' bxz='bxA' bxB='bxC' bxD='bxE' bxF='bxG' bxH='bxI' bxJ='bxK' bxL='bxM' bxN='bxO' bxP='bxQ' bxR='bxS' bxT='bxU' bxV='bxW' bxX='bxY' bxZ='bya' byb='byc' byd='bye' byf='byg' byh='byi' byj='byk' byl='bym' byn='byo' byp='byq' byr='bys' byt='byu' byv='byw' byx='byy' byz='byA' byB='byC' byD='byE' byF='byG' byH='byI' byJ='byK' byL='byM' byN='byO' byP='byQ' byR='byS' byT='byU' byV='byW' byX='byY' byZ='bza' bzb='bzc' bzd='bze' bzf='bzg' bzh='bzi' bzj='bzk' bzl='bzm' bzn='bzo' bzp='bzq' bzr='bzs' bzt='bzu' bzv='bzw' bzx='bzy' bzz='bzA' bzB='bzC' bzD='bzE' bzF='bzG' bzH='bzI' bzJ='bzK' bzL='bzM' bzN='bzO' bzP='bzQ' bzR='bzS' bzT='bzU' bzV='bzW' bzX='bzY' bzZ='bAa' bAb='bAc' bAd='bAe' bAf='bAg' bAh='bAi' bAj='bAk' bAl='bAm' bAn='bAo' bAp='bAq' bAr='bAs' bAt='bAu' bAv='bAw' bAx='bAy' bAz='bAA' bAB='bAC' bAD='bAE' bAF='bAG' bAH='bAI' bAJ='bAK' bAL='bAM' bAN='bAO' bAP='bAQ' bAR='bAS' bAT='bAU' bAV='bAW' bAX='bAY' bAZ='bBa' bBb='bBc' bBd='bBe' bBf='bBg' bBh='bBi' bBj='bBk' bBl='bBm' bBn='bBo' bBp='bBq' bBr='bBs' bBt='bBu' bBv='bBw' bBx='bBy' bBz='bBA' bBB='bBC' bBD='bBE' bBF='bBG' bBH='bBI' bBJ='bBK' bBL='bBM' bBN='bBO' bBP='bBQ' bBR='bBS' bBT='bBU' bBV='bBW' bBX='bBY' bBZ='bCa' bCb='bCc' bCd='bCe' bCf='bCg' bCh='bCi' bCj='bCk' bCl='bCm' bCn='bCo' bCp='bCq' bCr='bCs' bCt='bCu' bCv='bCw' bCx='bCy' bCz='bCA' bCB='bCC' bCD='bCE' bCF='bCG' bCH='bCI' bCJ='bCK' bCL='bCM' bCN='bCO' bCP='bCQ' bCR='bCS' bCT='bCU' bCV='bCW' bCX='bCY' bCZ='bDa' bDb='bDc' bDd='bDe' bDf='bDg' bDh='bDi' bDj='bDk' bDl='bDm' bDn='bDo' bDp='bDq' bDr='bDs' bDt='bDu' bDv='bDw' bDx='bDy' bDz='bDA' bDB='bDC' bDD='bDE' bDF='bDG' bDH='bDI' bDJ='bDK' bDL='bDM' bDN='bDO' bDP='bDQ' bDR='bDS' bDT='bDU' bDV='bDW' bDX='bDY' bDZ='bEa' bEb='bEc' bEd='bEe' bEf='bEg' bEh='bEi' bEj='bEk' bEl='bEm' bEn='bEo' bEp='bEq' bEr='bEs' bEt='bEu' bEv='bEw' bEx='bEy' bEz='bEA' bEB='bEC' bED='bEE' bEF='bEG' bEH='bEI' bEJ='bEK' bEL='bEM' bEN='bEO' bEP='bEQ' bER='bES' bET='bEU' bEV='bEW' bEX='bEY' bEZ='bFa' bFb='bFc' bFd='bFe' bFf='bFg' bFh='bFi' bFj='bFk' bFl='bFm' bFn='bFo' bFp='bFq' bFr='bFs' bFt='bFu' bFv='bFw' bFx='bFy' bFz='bFA' bFB='bFC' bFD='bFE' bFF='bFG' bFH='bFI' bFJ='bFK' bFL='bFM' bFN='bFO' bFP='bFQ' bFR='bFS' bFT='bFU' bFV='bFW' bFX='bFY' bFZ='bGa' bGb='bGc' bGd='bGe' bGf='bGg' bGh='bGi' bGj='bGk' bGl='bGm' bGn='bGo' bGp='bGq' bGr='bGs' bGt='bGu' bGv='bGw' bGx='bGy' bGz='bGA' bGB='bGC' bGD='bGE' bGF='bGG' bGH='bGI' bGJ='bGK' bGL='bGM' bGN='bGO' bGP='bGQ' bGR='bGS' bGT='bGU' bGV='bGW' bGX='bGY' bGZ='bHa' bHb='bHc' bHd='bHe' bHf='bHg' bHh='bHi' bHj='bHk' bHl='bHm' bHn='bHo' bHp='bHq' bHr='bHs' bHt='bHu' bHv='bHw' bHx='bHy' bHz='bHA' bHB='bHC' bHD='bHE' bHF='bHG' bHH='bHI' bHJ='bHK' bHL='bHM' bHN='bHO' bHP='bHQ' bHR='bHS' bHT='bHU' bHV='bHW' bHX='bHY' bHZ='bIa' bIb='bIc' bId='bIe' bIf='bIg' bIh='bIi' bIj='bIk' bIl='bIm' bIn='bIo' bIp='bIq' bIr='bIs' bIt='bIu' bIv='bIw' bIx='bIy' bIz='bIA' bIB='bIC' bID='bIE' bIF='bIG' bIH='bII' bIJ='bIK' bIL='bIM' bIN='bIO' bIP='bIQ' bIR='bIS' bIT='bIU' bIV='bIW' bIX='bIY' bIZ='bJa' bJb='bJc' bJd='bJe' bJf='bJg' bJh='bJi' bJj='bJk' bJl='bJm' bJn='bJo' bJp='bJq' bJr='bJs' bJt='bJu' bJv='bJw' bJx='bJy' bJz='bJA' bJB='bJC' bJD='bJE' bJF='bJG' bJH='bJI' bJJ='bJK' bJL='bJM' bJN='bJO' bJP='bJQ' bJR='bJS' bJT='bJU' bJV='bJW' bJX='bJY' bJZ='bKa' bKb='bKc' bKd='bKe' bKf='bKg' bKh='bKi' bKj='bKk' bKl='bKm' bKn='bKo' bKp='bKq' bKr='bKs' bKt='bKu' bKv='bKw' bKx='bKy' bKz='bKA' bKB='bKC' bKD='bKE' bKF='bKG' bKH='bKI' bKJ='bKK' bKL='bKM' bKN='bKO' bKP='bKQ' bKR='bKS' bKT='bKU' bKV='bKW' bKX='bKY' bKZ='bLa' bLb='bLc' bLd='bLe' bLf='bLg' bLh='bLi' bLj='bLk' bLl='bLm' bLn='bLo' bLp='bLq' bLr='bLs' bLt='bLu' bLv='bLw' bLx='bLy' bLz='bLA' bLB='bLC' bLD='bLE' bLF='bLG' bLH='bLI' bLJ='bLK' bLL='bLM' bLN='bLO' bLP='bLQ' bLR='bLS' bLT='bLU' bLV='bLW' bLX='bLY' bLZ='bMa' bMb='bMc' bMd='bMe' bMf='bMg' bMh='bMi' bMj='bMk' bMl='bMm' bMn='bMo' bMp='bMq' bMr='bMs' bMt='bMu' bMv='bMw' bMx='bMy' bMz='bMA' bMB='bMC' bMD='bME' bMF='bMG' bMH='bMI' bMJ='bMK' bML='bMM' bMN='bMO' bMP='bMQ' bMR='bMS' bMT='bMU' bMV='bMW' bMX='bMY' bMZ='bNa' bNb='bNc' bNd='bNe' bNf='bNg' bNh='bNi' bNj='bNk' bNl='bNm' bNn='bNo' bNp='bNq' bNr='bNs' bNt='bNu' bNv='bNw' bNx='bNy' bNz='bNA' bNB='bNC' bND='bNE' bNF='bNG' bNH='bNI' bNJ='bNK' bNL='bNM' bNN='bNO' bNP='bNQ' bNR='bNS' bNT='bNU' bNV='bNW' bNX='bNY' bNZ='bOa' bOb='bOc' bOd='bOe' bOf='bOg' bOh='bOi' bOj='bOk' bOl='bOm' bOn='bOo' bOp='bOq' bOr='bOs' bOt='bOu' bOv='bOw' bOx='bOy' bOz='bOA' bOB='bOC' bOD='bOE' bOF='bOG' bOH='bOI' bOJ='bOK' bOL='bOM' bON='bOO' bOP='bOQ' bOR='bOS' bOT='bOU' bOV='bOW' bOX='bOY' bOZ='bPa' bPb='bPc' bPd='bPe' bPf='bPg' bPh='bPi' bPj='bPk' bPl='bPm' bPn='bPo' bPp='bPq' bPr='bPs' bPt='bPu' bPv='bPw' bPx='bPy' bPz='bPA' bPB='bPC' bPD='bPE' bPF='bPG' bPH='bPI' bPJ='bPK' bPL='bPM' bPN='bPO' bPP='bPQ' bPR='bPS' bPT='bPU' bPV='bPW' bPX='bPY' bPZ='bQa' bQb='bQc' bQd='bQe' bQf='bQg' bQh='bQi' bQj='bQk' bQl='bQm' bQn='bQo' bQp='bQq' bQr='bQs' bQt='bQu' bQv='bQw' bQx='bQy' bQz='bQA' bQB='bQC' bQD='bQE' bQF='bQG' bQH='bQI' bQJ='bQK' bQL='bQM' bQN='bQO' bQP='bQQ' bQR='bQS' bQT='bQU' bQV='bQW' bQX='bQY' bQZ='bRa' bRb='bRc' bRd='bRe' bRf='bRg' bRh='bRi' bRj='bRk' bRl='bRm' bRn='bRo' bRp='bRq' bRr='bRs' bRt='bRu' bRv='bRw' bRx='bRy' bRz='bRA' bRB='bRC' bRD='bRE' bRF='bRG' bRH='bRI' bRJ='bRK' bRL='bRM' bRN='bRO' bRP='bRQ' bRR='bRS' bRT='bRU' bRV='bRW' bRX='bRY' bRZ='bSa' bSb='bSc' bSd='bSe' bSf='bSg' bSh='bSi' bSj='bSk' bSl='bSm' bSn='bSo' bSp='bSq' bSr='bSs' bSt='bSu' bSv='bSw' bSx='bSy' bSz='bSA' bSB='bSC' bSD='bSE' bSF='bSG' bSH='bSI' bSJ='bSK' bSL='bSM' bSN='bSO' bSP='bSQ' bSR='bSS' bST='bSU' bSV='bSW' bSX='bSY' bSZ='bTa' bTb='bTc' bTd='bTe' bTf='bTg' bTh='bTi' bTj='bTk' bTl='bTm' bTn='bTo' bTp='bTq' bTr='bTs' bTt='bTu' bTv='bTw' bTx='bTy' bTz='bTA' bTB='bTC' bTD='bTE' bTF='bTG' bTH='bTI' bTJ='bTK' bTL='bTM' bTN='bTO' bTP='bTQ' bTR='bTS' bTT='bTU' bTV='bTW' bTX='bTY' bTZ='bUa' bUb='bUc' bUd='bUe' bUf='bUg' bUh='bUi' bUj='bUk' bUl='bUm' bUn='bUo' bUp='bUq' bUr='bUs' bUt='bUu' bUv='bUw' bUx='bUy' bUz='bUA' bUB='bUC' bUD='bUE' bUF='bUG' bUH='bUI' bUJ='bUK' bUL='bUM' bUN='bUO' bUP='bUQ' bUR='bUS' bUT='bUU' bUV='bUW' bUX='bUY' bUZ='bVa' bVb='bVc' bVd='bVe' bVf='bVg' bVh='bVi' bVj='bVk' bVl='bVm' bVn='bVo' bVp='bVq' bVr='bVs' bVt='bVu' bVv='bVw' bVx='bVy' bVz='bVA' bVB='bVC' bVD='bVE' bVF='bVG' bVH='bVI' bVJ='bVK' bVL='bVM' bVN='bVO' bVP='bVQ' bVR='bVS' bVT='bVU' bVV='bVW' bVX='bVY' bVZ='bWa' bWb='bWc' bWd='bWe' bWf='bWg' bWh='bWi' bWj='bWk' bWl='bWm' bWn='bWo' bWp='bWq' bWr='bWs' bWt='bWu' bWv='bWw' bWx='bWy' bWz='bWA' bWB='bWC' bWD='bWE' bWF='bWG' bWH='bWI' bWJ='bWK' bWL='bWM' bWN='bWO' bWP='bWQ' bWR='bWS' bWT='bWU' bWV='bWW' bWX='bWY' bWZ='bXa' bXb='bXc' bXd='bXe' bXf='bXg' bXh='bXi' bXj='bXk' bXl='bXm' bXn='bXo' bXp='bXq' bXr='bXs' bXt='bXu' bXv='bXw' bXx='bXy' bXz='bXA' bXB='bXC' bXD='bXE' bXF='bXG' bXH='bXI' bXJ='bXK' bXL='bXM' bXN='bXO' bXP='bXQ' bXR='bXS' bXT='bXU' bXV='bXW' bXX='bXY' bXZ='bYa' bYb='bYc' bYd='bYe' bYf='bYg' bYh='bYi' bYj='bYk' bYl='bYm' bYn='bYo' bYp='bYq' bYr='bYs' bYt='bYu' bYv='bYw' bYx='bYy' bYz='bYA' bYB='bYC' bYD='bYE' bYF='bYG' bYH='bYI' bYJ='bYK' bYL='bYM' bYN='bYO' bYP='bYQ' bYR='bYS' bYT='bYU' bYV='bYW' bYX='bYY' bYZ='bZa' bZb='bZc' bZd='bZe' bZf='bZg' bZh='bZi' bZj='bZk' bZl='bZm' bZn='bZo' bZp='bZq' bZr='bZs' bZt='bZu' bZv='bZw' bZx='bZy' bZz='bZA' bZB='bZC' bZD='bZE' bZF='bZG' bZH='bZI' bZJ='bZK' bZL='bZM' bZN='bZO' bZP='bZQ' bZR='bZS' bZT='bZU' bZV='bZW' bZX='bZY' bZZ='caa' cab='cac' cad='cae' caf='cag' cah='cai' caj='cak' cal='cam' can='cao' cap='caq' car='cas' cat='cau' cav='caw' cax='cay' caz='caA' caB='caC' caD='caE' caF='caG' caH='caI' caJ='caK' caL='caM' caN='caO' caP='caQ' caR='caS' caT='caU' caV='caW' caX='caY' caZ='cba' cbb='cbc' cbd='cbe' cbf='cbg' cbh='cbi' cbj='cbk' cbl='cbm' cbn='cbo' cbp='cbq' cbr='cbs' cbt='cbu' cbv='cbw' cbx='cby' cbz='cbA' cbB='cbC' cbD='cbE' cbF='cbG' cbH='cbI' cbJ='cbK' cbL='cbM' cbN='cbO' cbP='cbQ' cbR='cbS' cbT='cbU' cbV='cbW' cbX='cbY' cbZ='cca' ccb='ccc' ccd='cce' ccf='ccg' cch='cci' ccj='cck' ccl='ccm' ccn='cco' ccp='ccq' ccr='ccs' cct='ccu' ccv='ccw' ccx='ccy' ccz='ccA' ccB='ccC' ccD='ccE' ccF='ccG' ccH='ccI' ccJ='ccK' ccL='ccM' ccN='ccO' ccP='ccQ' ccR='ccS' ccT='ccU' ccV='ccW' ccX='ccY' ccZ='cda' cdb='cdc' cdd='cde' cdf='cdg' cdh='cdi' cdj='cdk' cdl='cdm' cdn='cdo' cdp='cdq' cdr='cds' cdt='cdu' cdv='cdw' cdx='cdy' cdz='cdA' cdB='cdC' cdD='cdE' cdF='cdG' cdH='cdI' cdJ='cdK' cdL='cdM' cdN='cdO' cdP='cdQ' cdR='cdS' cdT='cdU' cdV='cdW' cdX='cdY' cdZ='cea' ceb='cec' ced='cee' cef='ceg' ceh='cei' cej='cek' cel='cem' cen='ceo' cep='ceq' cer='ces' cet='ceu' cev='cew' cex='cey' cez='ceA' ceB='ceC' ceD='ceE' ceF='ceG' ceH='ceI' ceJ='ceK' ceL='ceM' ceN='ceO' ceP='ceQ' ceR='ceS' ceT='ceU' ceV='ceW' ceX='ceY' ceZ='cfa' cfb='cfc' cfd='cfe' cff='cfg' cfh='cfi' cfj='cfk' cfl='cfm' cfn='cfo' cfp='cfq' cfr='cfs' cft='cfu' cfv='cfw' cfx='cfy' cfz='cfA' cfB='cfC' cfD='cfE' cfF='cfG' cfH='cfI' cfJ='cfK' cfL='cfM' cfN='cfO' cfP='cfQ' cfR='cfS' cfT='cfU' cfV='cfW' cfX='cfY' cfZ='cga' cgb='cgc' cgd='cge' cgf='cgg' cgh='cgi' cgj='cgk' cgl='cgm' cgn='cgo' cgp='cgq' cgr='cgs' cgt='cgu' cgv='cgw' cgx='cgy' cgz='cgA' cgB='cgC' cgD='cgE' cgF='cgG' cgH='cgI' cgJ='cgK' cgL='cgM' cgN='cgO' cgP='cgQ' cgR='cgS' cgT='cgU' cgV='cgW' cgX='cgY' cgZ='cha' chb='chc' chd='che' chf='chg' chh='chi' chj='chk' chl='chm' chn='cho' chp='chq' chr='chs' cht='chu' chv='chw' chx='chy' chz='chA' chB='chC' chD='chE' chF='chG' chH='chI' chJ='chK' chL='chM' chN='chO' chP='chQ' chR='chS' chT='chU' chV='chW' chX='chY' chZ='cia' cib='cic' cid='cie' cif='cig' cih='cii' cij='cik' cil='cim' cin='cio' cip='ciq' cir='cis' cit='ciu' civ='ciw' cix='ciy' ciz='ciA' ciB='ciC' ciD='ciE' ciF='ciG' ciH='ciI' ciJ='ciK' ciL='ciM' ciN='ciO' ciP='ciQ' ciR='ciS' ciT='ciU' ciV='ciW' ciX='ciY' ciZ='cja' cjb='cjc' cjd='cje' cjf='cjg' cjh='cji' cjj='cjk' cjl='cjm' cjn='cjo' cjp='cjq' cjr='cjs' cjt='cju' cjv='cjw' cjx='cjy' cjz='cjA' cjB='cjC' cjD='cjE' cjF='cjG' cjH='cjI' cjJ='cjK' cjL='cjM' cjN='cjO' cjP='cjQ' cjR='cjS' cjT='cjU' cjV='cjW' cjX='cjY' cjZ='cka' ckb='ckc' ckd='cke' ckf='ckg' ckh='cki' ckj='ckk' ckl='ckm' ckn='cko' ckp='ckq' ckr='cks' ckt='cku' ckv='ckw' ckx='cky' ckz='ckA' ckB='ckC' ckD='ckE' ckF='ckG' ckH='ckI' ckJ='ckK' ckL='ckM' ckN='ckO' ckP='ckQ' ckR='ckS' ckT='ckU' ckV='ckW' ckX='ckY' ckZ='cla' clb='clc' cld='cle' clf='clg' clh='cli' clj='clk' cll='clm' cln='clo' clp='clq' clr='cls' clt='clu' clv='clw' clx='cly' clz='clA' clB='clC' clD='clE' clF='clG' clH='clI' clJ='clK' clL='clM' clN='clO' clP='clQ' clR='clS' clT='clU' clV='clW' clX='clY' clZ='cma' cmb='cmc' cmd='cme' cmf='cmg' cmh='cmi' cmj='cmk' cml='cmm' cmn='cmo' cmp='cmq' cmr='cms' cmt='cmu' cmv='cmw' cmx='cmy' cmz='cmA' cmB='cmC' cmD='cmE' cmF='cmG' cmH='cmI' cmJ='cmK' cmL='cmM' cmN='cmO' cmP='cmQ' cmR='cmS' cmT='cmU' cmV='cmW' cmX='cmY' cmZ='cna' cnb='cnc' cnd='cne' cnf='cng' cnh='cni' cnj='cnk' cnl='cnm' cnn='cno' cnp='cnq' cnr='cns' cnt='cnu' cnv='cnw' cnx='cny' cnz='cnA' cnB='cnC' cnD='cnE' cnF='cnG' cnH='cnI' cnJ='cnK' cnL='cnM' cnN='cnO' cnP='cnQ' cnR='cnS' cnT='cnU' cnV='cnW' cnX='cnY' cnZ='coa' cob='coc' cod='coe' cof='cog' coh='coi' coj='cok' col='com' con='coo' cop='coq' cor='cos' cot='cou' cov='cow' cox='coy' coz='coA' coB='coC' coD='coE' coF='coG' coH='coI' coJ='coK' coL='coM' coN='coO' coP='coQ' coR='coS' coT='coU' coV='coW' coX='coY' coZ='cpa' cpb='cpc' cpd='cpe' cpf='cpg' cph='cpi' cpj='cpk' cpl='cpm' cpn='cpo' cpp='cpq' cpr='cps' cpt='cpu' cpv='cpw' cpx='cpy' cpz='cpA' cpB='cpC' cpD='cpE' cpF='cpG' cpH='cpI' cpJ='cpK' cpL='cpM' cpN='cpO' cpP='cpQ' cpR='cpS' cpT='cpU' cpV='cpW' cpX='cpY' cpZ='cqa' cqb='cqc' cqd='cqe' cqf='cqg' cqh='cqi' cqj='cqk' cql='cqm' cqn='cqo' cqp='cqq' cqr='cqs' cqt='cqu' cqv='cqw' cqx='cqy' cqz='cqA' cqB='cqC' cqD='cqE' cqF='cqG' cqH='cqI' cqJ='cqK' cqL='cqM' cqN='cqO' cqP='cqQ' cqR='cqS' cqT='cqU' cqV='cqW' cqX='cqY' cqZ='cra' crb='crc' crd='cre' crf='crg' crh='cri' crj='crk' crl='crm' crn='cro' crp='crq' crr='crs' crt='cru' crv='crw' crx='cry' crz='crA' crB='crC' crD='crE' crF='crG' crH='crI' crJ='crK' crL='crM' crN='crO' crP='crQ' crR='crS' crT='crU' crV='crW' crX='crY' crZ='csa' csb='csc' csd='cse' csf='csg' csh='csi' csj='csk' csl='csm' csn='cso' csp='csq' csr='css' cst='csu' csv='csw' csx='csy' csz='csA' csB='csC' csD='csE' csF='csG' csH='csI' csJ='csK' csL='csM' csN='csO' csP='csQ' csR='csS' csT='csU' csV='csW' csX='csY' csZ='cta' ctb='ctc' ctd='cte' ctf='ctg' cth='cti' ctj='ctk' ctl='ctm' ctn='cto' ctp='ctq' ctr='cts' ctt='ctu' ctv='ctw' ctx='cty' ctz='ctA' ctB='ctC' ctD='ctE' ctF='ctG' ctH='ctI' ctJ='ctK' ctL='ctM' ctN='ctO' ctP='ctQ' ctR='ctS' ctT='ctU' ctV='ctW' ctX='ctY' ctZ='cua' cub='cuc' cud='cue' cuf='cug' cuh='cui' cuj='cuk' cul='cum' cun='cuo' cup='cuq' cur='cus' cut='cuu' cuv='cuw' cux='cuy' cuz='cuA' cuB='cuC' cuD='cuE' cuF='cuG' cuH='cuI' cuJ='cuK' cuL='cuM' cuN='cuO' cuP='cuQ' cuR='cuS' cuT='cuU' cuV='cuW' cuX='cuY' cuZ='cva' cvb='cvc' cvd='cve' cvf='cvg' cvh='cvi' cvj='cvk' cvl='cvm' cvn='cvo' cvp='cvq' cvr='cvs' cvt='cvu' cvv='cvw' cvx='cvy' cvz='cvA' cvB='cvC' cvD='cvE' cvF='cvG' cvH='cvI' cvJ='cvK' cvL='cvM' cvN='cvO' cvP='cvQ' cvR='cvS' cvT='cvU' cvV='cvW' cvX='cvY' cvZ='cwa' cwb='cwc' cwd='cwe' cwf='cwg' cwh='cwi' cwj='cwk' cwl='cwm' cwn='cwo' cwp='cwq' cwr='cws' cwt='cwu' cwv='cww' cwx='cwy' cwz='cwA' cwB='cwC' cwD='cwE' cwF='cwG' cwH='cwI' cwJ='cwK' cwL='cwM' cwN='cwO' cwP='cwQ' cwR='cwS' cwT='cwU' cwV='cwW' cwX='cwY' cwZ='cxa' cxb='cxc' cxd='cxe' cxf='cxg' cxh='cxi' cxj='cxk' cxl='cxm' cxn='cxo' cxp='cxq' cxr='cxs' cxt='cxu' cxv='cxw' cxx='cxy' cxz='cxA' cxB='cxC' cxD='cxE' cxF='cxG' cxH='cxI' cxJ='cxK' cxL='cxM' cxN='cxO' cxP='cxQ' cxR='cxS' cxT='cxU' cxV='cxW' cxX='cxY' cxZ='cya' cyb='cyc' cyd='cye' cyf='cyg' cyh='cyi' cyj='cyk' cyl='cym' cyn='cyo' cyp='cyq' cyr='cys' cyt='cyu' cyv='cyw' cyx='cyy' cyz='cyA' cyB='cyC' cyD='cyE' cyF='cyG' cyH='cyI' cyJ='cyK' cyL='cyM' cyN='cyO' cyP='cyQ' cyR='cyS' cyT='cyU' cyV='cyW' cyX='cyY' cyZ='cza' czb='czc' czd='cze' czf='czg' czh='czi' czj='czk' czl='czm' czn='czo' czp='czq' czr='czs' czt='czu' czv='czw' czx='czy' czz='czA' czB='czC' czD='czE' czF='czG' czH='czI' czJ='czK' czL='czM' czN='czO' czP='czQ' czR='czS' czT='czU' czV='czW' czX='czY' czZ='cAa' cAb='cAc' cAd='cAe' cAf='cAg' cAh='cAi' cAj='cAk' cAl='cAm' cAn='cAo' cAp='cAq' cAr='cAs' cAt='cAu' cAv='cAw' cAx='cAy' cAz='cAA' cAB='cAC' cAD='cAE' cAF='cAG' cAH='cAI' cAJ='cAK' cAL='cAM' cAN='cAO' cAP='cAQ' cAR='cAS' cAT='cAU' cAV='cAW' cAX='cAY' cAZ='cBa' cBb='cBc' cBd='cBe' cBf='cBg' cBh='cBi' cBj='cBk' cBl='cBm' cBn='cBo' cBp='cBq' cBr='cBs' cBt='cBu' cBv='cBw' cBx='cBy' cBz='cBA' cBB='cBC' cBD='cBE' cBF='cBG' cBH='cBI' cBJ='cBK' cBL='cBM' cBN='cBO' cBP='cBQ' cBR='cBS' cBT='cBU' cBV='cBW' cBX='cBY' cBZ='cCa' cCb='cCc' cCd='cCe' cCf='cCg' cCh='cCi' cCj='cCk' cCl='cCm' cCn='cCo' cCp='cCq' cCr='cCs' cCt='cCu' cCv='cCw' cCx='cCy' cCz='cCA' cCB='cCC' cCD='cCE' cCF='cCG' cCH='cCI' cCJ='cCK' cCL='cCM' cCN='cCO' cCP='cCQ' cCR='cCS' cCT='cCU' cCV='cCW' cCX='cCY' cCZ='cDa' cDb='cDc' cDd='cDe' cDf='cDg' cDh='cDi' cDj='cDk' cDl='cDm' cDn='cDo' cDp='cDq' cDr='cDs' cDt='cDu' cDv='cDw' cDx='cDy' cDz='cDA' cDB='cDC' cDD='cDE' cDF='cDG' cDH='cDI' cDJ='cDK' cDL='cDM' cDN='cDO' cDP='cDQ' cDR='cDS' cDT='cDU' cDV='cDW' cDX='cDY' cDZ='cEa' cEb='cEc' cEd='cEe' cEf='cEg' cEh='cEi' cEj='cEk' cEl='cEm' cEn='cEo' cEp='cEq' cEr='cEs' cEt='cEu' cEv='cEw' cEx='cEy' cEz='cEA' cEB='cEC' cED='cEE' cEF='cEG' cEH='cEI' cEJ='cEK' cEL='cEM' cEN='cEO' cEP='cEQ' cER='cES' cET='cEU' cEV='cEW' cEX='cEY' cEZ='cFa' cFb='cFc' cFd='cFe' cFf='cFg' cFh='cFi' cFj='cFk' cFl='cFm' cFn='cFo' cFp='cFq' cFr='cFs' cFt='cFu' cFv='cFw' cFx='cFy' cFz='cFA' cFB='cFC' cFD='cFE' cFF='cFG' cFH='cFI' cFJ='cFK' cFL='cFM' cFN='cFO' cFP='cFQ' cFR='cFS' cFT='cFU' cFV='cFW' cFX='cFY' cFZ='cGa' cGb='cGc' cGd='cGe' cGf='cGg' cGh='cGi' cGj='cGk' cGl='cGm' cGn='cGo' cGp='cGq' cGr='cGs' cGt='cGu' cGv='cGw' cGx='cGy' cGz='cGA' cGB='cGC' cGD='cGE' cGF='cGG' cGH='cGI' cGJ='cGK' cGL='cGM' cGN='cGO' cGP='cGQ' cGR='cGS' cGT='cGU' cGV='cGW' cGX='cGY' cGZ='cHa' cHb='cHc' cHd='cHe' cHf='cHg' cHh='cHi' cHj='cHk' cHl='cHm' cHn='cHo' cHp='cHq' cHr='cHs' cHt='cHu' cHv='cHw' cHx='cHy' cHz='cHA' cHB='cHC' cHD='cHE' cHF='cHG' cHH='cHI' cHJ='cHK' cHL='cHM' cHN='cHO' cHP='cHQ' cHR='cHS' cHT='cHU' cHV='cHW' cHX='cHY' cHZ='cIa' cIb='cIc' cId='cIe' cIf='cIg' cIh='cIi' cIj='cIk' cIl='cIm' cIn='cIo' cIp='cIq' cIr='cIs' cIt='cIu' cIv='cIw' cIx='cIy' cIz='cIA' cIB='cIC' cID='cIE' cIF='cIG' cIH='cII' cIJ='cIK' cIL='cIM' cIN='cIO' cIP='cIQ' cIR='cIS' cIT='cIU' cIV='cIW' cIX='cIY' cIZ='cJa' cJb='cJc' cJd='cJe' cJf='cJg' cJh='cJi' cJj='cJk' cJl='cJm' cJn='cJo' cJp='cJq' cJr='cJs' cJt='cJu' cJv='cJw' cJx='cJy' cJz='cJA' cJB='cJC' cJD='cJE' cJF='cJG' cJH='cJI' cJJ='cJK' cJL='cJM' cJN='cJO' cJP='cJQ' cJR='cJS' cJT='cJU' cJV='cJW' cJX='cJY' cJZ='cKa' cKb='cKc' cKd='cKe' cKf='cKg' cKh='cKi' cKj='cKk' cKl='cKm' cKn='cKo' cKp='cKq' cKr='cKs' cKt='cKu' cKv='cKw' cKx='cKy' cKz='cKA' cKB='cKC' cKD='cKE' cKF='cKG' cKH='cKI' cKJ='cKK' cKL='cKM' cKN='cKO' cKP='cKQ' cKR='cKS' cKT='cKU' cKV='cKW' cKX='cKY' cKZ='cLa' cLb='cLc' cLd='cLe' cLf='cLg' cLh='cLi' cLj='cLk' cLl='cLm' cLn='cLo' cLp='cLq' cLr='cLs' cLt='cLu' cLv='cLw' cLx='cLy' cLz='cLA' cLB='cLC' cLD='cLE' cLF='cLG' cLH='cLI' cLJ='cLK' cLL='cLM' cLN='cLO' cLP='cLQ' cLR='cLS' cLT='cLU' cLV='cLW' cLX='cLY' cLZ='cMa' cMb='cMc' cMd='cMe' cMf='cMg' cMh='cMi' cMj='cMk' cMl='cMm' cMn='cMo' cMp='cMq' cMr='cMs' cMt='cMu' cMv='cMw' cMx='cMy' cMz='cMA' cMB='cMC' cMD='cME' cMF='cMG' cMH='cMI' cMJ='cMK' cML='cMM' cMN='cMO' cMP='cMQ' cMR='cMS' cMT='cMU' cMV='cMW' cMX='cMY' cMZ='cNa' cNb='cNc' cNd='cNe' cNf='cNg' cNh='cNi' cNj='cNk' cNl='cNm' cNn='cNo' cNp='cNq' cNr='cNs' cNt='cNu' cNv='cNw' cNx='cNy' cNz='cNA' cNB='cNC' cND='cNE' cNF='cNG' cNH='cNI' cNJ='cNK' cNL='cNM' cNN='cNO' cNP='cNQ' cNR='cNS' cNT='cNU' cNV='cNW' cNX='cNY' cNZ='cOa' cOb='cOc' cOd='cOe' cOf='cOg' cOh='cOi' cOj='cOk' cOl='cOm' cOn='cOo' cOp='cOq' cOr='cOs' cOt='cOu' cOv='cOw' cOx='cOy' cOz='cOA' cOB='cOC' cOD='cOE' cOF='cOG' cOH='cOI' cOJ='cOK' cOL='cOM' cON='cOO' cOP='cOQ' cOR='cOS' cOT='cOU' cOV='cOW' cOX='cOY' cOZ='cPa' cPb='cPc' cPd='cPe' cPf='cPg' cPh='cPi' cPj='cPk' cPl='cPm' cPn='cPo' cPp='cPq' cPr='cPs' cPt='cPu' cPv='cPw' cPx='cPy' cPz='cPA' cPB='cPC' cPD='cPE' cPF='cPG' cPH='cPI' cPJ='cPK' cPL='cPM' cPN='cPO' cPP='cPQ' cPR='cPS' cPT='cPU' cPV='cPW' cPX='cPY' cPZ='cQa' cQb='cQc' cQd='cQe' cQf='cQg' cQh='cQi' cQj='cQk' cQl='cQm' cQn='cQo' cQp='cQq' cQr='cQs' cQt='cQu' cQv='cQw' cQx='cQy' cQz='cQA' cQB='cQC' cQD='cQE' cQF='cQG' cQH='cQI' cQJ='cQK' cQL='cQM' cQN='cQO' cQP='cQQ' cQR='cQS' cQT='cQU' cQV='cQW' cQX='cQY' cQZ='cRa' cRb='cRc' cRd='cRe' cRf='cRg' cRh='cRi' cRj='cRk' cRl='cRm' cRn='cRo' cRp='cRq' cRr='cRs' cRt='cRu' cRv='cRw' cRx='cRy' cRz='cRA' cRB='cRC' cRD='cRE' cRF='cRG' cRH='cRI' cRJ='cRK' cRL='cRM' cRN='cRO' cRP='cRQ' cRR='cRS' cRT='cRU' cRV='cRW' cRX='cRY' cRZ='cSa' cSb='cSc' cSd='cSe' cSf='cSg' cSh='cSi' cSj='cSk' cSl='cSm' cSn='cSo' cSp='cSq' cSr='cSs' cSt='cSu' cSv='cSw' cSx='cSy' cSz='cSA' cSB='cSC' cSD='cSE' cSF='cSG' cSH='cSI' cSJ='cSK' cSL='cSM' cSN='cSO' cSP='cSQ' cSR='cSS' cST='cSU' cSV='cSW' cSX='cSY' cSZ='cTa' cTb='cTc' cTd='cTe' cTf='cTg' cTh='cTi' cTj='cTk' cTl='cTm' cTn='cTo' cTp='cTq' cTr='cTs' cTt='cTu' cTv='cTw' cTx='cTy' cTz='cTA' cTB='cTC' cTD='cTE' cTF='cTG' cTH='cTI' cTJ='cTK' cTL='cTM' cTN='cTO' cTP='cTQ' cTR='cTS' cTT='cTU' cTV='cTW' cTX='cTY' cTZ='cUa' cUb='cUc' cUd='cUe' cUf='cUg' cUh='cUi' cUj='cUk' cUl='cUm' cUn='cUo' cUp='cUq' cUr='cUs' cUt='cUu' cUv='cUw' cUx='cUy' cUz='cUA' cUB='cUC' cUD='cUE' cUF='cUG' cUH='cUI' cUJ='cUK' cUL='cUM' cUN='cUO' cUP='cUQ' cUR='cUS' cUT='cUU' cUV='cUW' cUX='cUY' cUZ='cVa' cVb='cVc' cVd='cVe' cVf='cVg' cVh='cVi' cVj='cVk' cVl='cVm' cVn='cVo' cVp='cVq' cVr='cVs' cVt='cVu' cVv='cVw' cVx='cVy' cVz='cVA' cVB='cVC' cVD='cVE' cVF='cVG' cVH='cVI' cVJ='cVK' cVL='cVM' cVN='cVO' cVP='cVQ' cVR='cVS' cVT='cVU' cVV='cVW' cVX='cVY' cVZ='cWa' cWb='cWc' cWd='cWe' cWf='cWg' cWh='cWi' cWj='cWk' cWl='cWm' cWn='cWo' cWp='cWq' cWr='cWs' cWt='cWu' cWv='cWw' cWx='cWy' cWz='cWA' cWB='cWC' cWD='cWE' cWF='cWG' cWH='cWI' cWJ='cWK' cWL='cWM' cWN='cWO' cWP='cWQ' cWR='cWS' cWT='cWU' cWV='cWW' cWX='cWY' cWZ='cXa' cXb='cXc' cXd='cXe' cXf='cXg' cXh='cXi' cXj='cXk' cXl='cXm' cXn='cXo' cXp='cXq' cXr='cXs' cXt='cXu' cXv='cXw' cXx='cXy' cXz='cXA' cXB='cXC' cXD='cXE' cXF='cXG' cXH='cXI' cXJ='cXK' cXL='cXM' cXN='cXO' cXP='cXQ' cXR='cXS' cXT='cXU' cXV='cXW' cXX='cXY' cXZ='cYa' cYb='cYc' cYd='cYe' cYf='cYg' cYh='cYi' cYj='cYk' cYl='cYm' cYn='cYo' cYp='cYq' cYr='cYs' cYt='cYu' cYv='cYw' cYx='cYy' cYz='cYA' cYB='cYC' cYD='cYE' cYF='cYG' cYH='cYI' cYJ='cYK' cYL='cYM' cYN='cYO' cYP='cYQ' cYR='cYS' cYT='cYU' cYV='cYW' cYX='cYY' cYZ='cZa' cZb='cZc' cZd='cZe' cZf='cZg' cZh='cZi' cZj='cZk' cZl='cZm' cZn='cZo' cZp='cZq' cZr='cZs' cZt='cZu' cZv='cZw' cZx='cZy' cZz='cZA' cZB='cZC' cZD='cZE' cZF='cZG' cZH='cZI' cZJ='cZK' cZL='cZM' cZN='cZO' cZP='cZQ' cZR='cZS' cZT='cZU' cZV='cZW' cZX='cZY' cZZ='daa' dab='dac' dad='dae' daf='dag' dah='dai' daj='dak' dal='dam' dan='dao' dap='daq' dar='das' dat='dau' dav='daw' dax='day' daz='daA' daB='daC' daD='daE' daF='daG' daH='daI' daJ='daK' daL='daM' daN='daO' daP='daQ' daR='daS' daT='daU' daV='daW' daX='daY' daZ='dba' dbb='dbc' dbd='dbe' dbf='dbg' dbh='dbi' dbj='dbk' dbl='dbm' dbn='dbo' dbp='dbq' dbr='dbs' dbt='dbu' dbv='dbw' dbx='dby' dbz='dbA' dbB='dbC' dbD='dbE' dbF='dbG' dbH='dbI' dbJ='dbK' dbL='dbM' dbN='dbO' dbP='dbQ' dbR='dbS' dbT='dbU' dbV='dbW' dbX='dbY' dbZ='dca' dcb='dcc' dcd='dce' dcf='dcg' dch='dci' dcj='dck' dcl='dcm' dcn='dco' dcp='dcq' dcr='dcs' dct='dcu' dcv='dcw' dcx='dcy' dcz='dcA' dcB='dcC' dcD='dcE' dcF='dcG' dcH='dcI' dcJ='dcK' dcL='dcM' dcN='dcO' dcP='dcQ' dcR='dcS' dcT='dcU' dcV='dcW' dcX='dcY' dcZ='dda' ddb='ddc' ddd='dde' ddf='ddg' ddh='ddi' ddj='ddk' ddl='ddm' ddn='ddo' ddp='ddq' ddr='dds' ddt='ddu' ddv='ddw' ddx='ddy' ddz='ddA' ddB='ddC' ddD='ddE' ddF='ddG' ddH='ddI' ddJ='ddK' ddL='ddM' ddN='ddO' ddP='ddQ' ddR='ddS' ddT='ddU' ddV='ddW' ddX='ddY' ddZ='dea' deb='dec' ded='dee' def='deg' deh='dei' dej='dek' del='dem' den='deo' dep='deq' der='des' det='deu' dev='dew' dex='dey' dez='deA' deB='deC' deD='deE' deF='deG' deH='deI' deJ='deK' deL='deM' deN='deO' deP='deQ' deR='deS' deT='deU' deV='deW' /><xsl:value-of select='ceiling(133703)'/><xsl:value-of select='ceiling(133704)'/><xsl:value-of select='ceiling(133705)'/><xsl:value-of select='ceiling(133706)'/></xsl:template>
+<xsl:template name='deX' match="/deY"><ceil deZ='dfa' dfb='dfc' dfd='dfe' dff='dfg' dfh='dfi' dfj='dfk' dfl='dfm' dfn='dfo' dfp='dfq' dfr='dfs' dft='dfu' dfv='dfw' dfx='dfy' dfz='dfA' dfB='dfC' dfD='dfE' dfF='dfG' dfH='dfI' dfJ='dfK' dfL='dfM' dfN='dfO' dfP='dfQ' dfR='dfS' dfT='dfU' dfV='dfW' dfX='dfY' dfZ='dga' dgb='dgc' dgd='dge' dgf='dgg' dgh='dgi' dgj='dgk' dgl='dgm' dgn='dgo' dgp='dgq' dgr='dgs' dgt='dgu' dgv='dgw' dgx='dgy' dgz='dgA' dgB='dgC' dgD='dgE' dgF='dgG' dgH='dgI' dgJ='dgK' dgL='dgM' dgN='dgO' dgP='dgQ' dgR='dgS' dgT='dgU' dgV='dgW' dgX='dgY' dgZ='dha' dhb='dhc' dhd='dhe' dhf='dhg' dhh='dhi' dhj='dhk' dhl='dhm' dhn='dho' dhp='dhq' dhr='dhs' dht='dhu' dhv='dhw' dhx='dhy' dhz='dhA' dhB='dhC' dhD='dhE' dhF='dhG' dhH='dhI' dhJ='dhK' dhL='dhM' dhN='dhO' dhP='dhQ' dhR='dhS' dhT='dhU' dhV='dhW' dhX='dhY' dhZ='dia' dib='dic' did='die' dif='dig' dih='dii' dij='dik' dil='dim' din='dio' dip='diq' dir='dis' dit='diu' div='diw' dix='diy' diz='diA' diB='diC' diD='diE' diF='diG' diH='diI' diJ='diK' diL='diM' diN='diO' diP='diQ' diR='diS' diT='diU' /><xsl:value-of select='ceiling(1337)'/><xsl:value-of select='ceiling(133707)'/><xsl:value-of select='ceiling(133708)'/><diV diW='diX' diY='diZ' dja='djb' djc='djd' dje='djf' djg='djh' dji='djj' djk='djl' djm='djn' djo='djp' djq='djr' djs='djt' dju='djv' djw='djx' djy='djz' djA='djB' djC='djD' djE='djF' djG='djH' djI='djJ' djK='djL' djM='djN' djO='djP' djQ='djR' djS='djT' djU='djV' djW='djX' djY='djZ' dka='dkb' dkc='dkd' dke='dkf' dkg='dkh' dki='dkj' dkk='dkl' dkm='dkn' dko='dkp' dkq='dkr' dks='dkt' dku='dkv' dkw='dkx' dky='dkz' dkA='dkB' dkC='dkD' dkE='dkF' dkG='dkH' dkI='dkJ' dkK='dkL' dkM='dkN' dkO='dkP' dkQ='dkR' dkS='dkT' dkU='dkV' dkW='dkX' dkY='dkZ' dla='dlb' dlc='dld' dle='dlf' dlg='dlh' dli='dlj' dlk='dll' dlm='dln' dlo='dlp' dlq='dlr' dls='dlt' dlu='dlv' dlw='dlx' dly='dlz' dlA='dlB' dlC='dlD' dlE='dlF' dlG='dlH' dlI='dlJ' dlK='dlL' dlM='dlN' dlO='dlP' dlQ='dlR' dlS='dlT' dlU='dlV' dlW='dlX' dlY='dlZ' dma='dmb' dmc='dmd' dme='dmf' dmg='dmh' dmi='dmj' dmk='dml' dmm='dmn' dmo='dmp' dmq='dmr' dms='dmt' dmu='dmv' dmw='dmx' dmy='dmz' dmA='dmB' dmC='dmD' dmE='dmF' dmG='dmH' dmI='dmJ' dmK='dmL' dmM='dmN' dmO='dmP' dmQ='dmR' dmS='dmT' dmU='dmV' dmW='dmX' dmY='dmZ' dna='dnb' dnc='dnd' dne='dnf' dng='dnh' dni='dnj' dnk='dnl' dnm='dnn' dno='dnp' dnq='dnr' dns='dnt' dnu='dnv' dnw='dnx' dny='dnz' dnA='dnB' dnC='dnD' dnE='dnF' dnG='dnH' dnI='dnJ' dnK='dnL' dnM='dnN' dnO='dnP' dnQ='dnR' dnS='dnT' dnU='dnV' dnW='dnX' dnY='dnZ' doa='dob' doc='dod' doe='dof' dog='doh' doi='doj' dok='dol' dom='don' doo='dop' doq='dor' dos='dot' dou='dov' dow='dox' doy='doz' doA='doB' doC='doD' doE='doF' doG='doH' doI='doJ' doK='doL' doM='doN' doO='doP' doQ='doR' doS='doT' doU='doV' doW='doX' doY='doZ' dpa='dpb' dpc='dpd' dpe='dpf' dpg='dph' dpi='dpj' dpk='dpl' dpm='dpn' dpo='dpp' dpq='dpr' dps='dpt' dpu='dpv' dpw='dpx' dpy='dpz' dpA='dpB' dpC='dpD' dpE='dpF' dpG='dpH' dpI='dpJ' dpK='dpL' dpM='dpN' dpO='dpP' dpQ='dpR' dpS='dpT' dpU='dpV' dpW='dpX' dpY='dpZ' dqa='dqb' dqc='dqd' dqe='dqf' dqg='dqh' dqi='dqj' dqk='dql' dqm='dqn' dqo='dqp' dqq='dqr' dqs='dqt' dqu='dqv' dqw='dqx' dqy='dqz' dqA='dqB' dqC='dqD' dqE='dqF' dqG='dqH' dqI='dqJ' dqK='dqL' dqM='dqN' dqO='dqP' dqQ='dqR' dqS='dqT' dqU='dqV' dqW='dqX' dqY='dqZ' dra='drb' drc='drd' dre='drf' drg='drh' dri='drj' drk='drl' drm='drn' dro='drp' drq='drr' drs='drt' dru='drv' drw='drx' dry='drz' drA='drB' drC='drD' drE='drF' drG='drH' drI='drJ' drK='drL' drM='drN' drO='drP' drQ='drR' drS='drT' drU='drV' drW='drX' drY='drZ' dsa='dsb' dsc='dsd' dse='dsf' dsg='dsh' dsi='dsj' dsk='dsl' dsm='dsn' dso='dsp' dsq='dsr' dss='dst' dsu='dsv' dsw='dsx' dsy='dsz' dsA='dsB' dsC='dsD' dsE='dsF' dsG='dsH' dsI='dsJ' dsK='dsL' dsM='dsN' dsO='dsP' dsQ='dsR' dsS='dsT' dsU='dsV' dsW='dsX' dsY='dsZ' dta='dtb' dtc='dtd' dte='dtf' dtg='dth' dti='dtj' dtk='dtl' dtm='dtn' dto='dtp' dtq='dtr' dts='dtt' dtu='dtv' dtw='dtx' dty='dtz' dtA='dtB' dtC='dtD' dtE='dtF' dtG='dtH' dtI='dtJ' dtK='dtL' dtM='dtN' dtO='dtP' dtQ='dtR' dtS='dtT' dtU='dtV' dtW='dtX' dtY='dtZ' dua='dub' duc='dud' due='duf' dug='duh' dui='duj' duk='dul' dum='dun' duo='dup' duq='dur' dus='dut' duu='duv' duw='dux' duy='duz' duA='duB' duC='duD' duE='duF' duG='duH' duI='duJ' duK='duL' duM='duN' duO='duP' duQ='duR' duS='duT' duU='duV' duW='duX' duY='duZ' dva='dvb' dvc='dvd' dve='dvf' dvg='dvh' />
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008344026969402015)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007406827652861232)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010609979082)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001393005378307274)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000386843816)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025588349409616466)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000108331572)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104126)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210413)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104136)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210414)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104146)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210415)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104156)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210416)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104166)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210417)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104176)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210418)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104186)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210419)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021046406)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010655986780146883)'/>
+        <dvi dvj='dvk' dvl='dvm' dvn='dvo' dvp='dvq' dvr='dvs' dvt='dvu' dvv='dvw' dvx='dvy' dvz='dvA' dvB='dvC' dvD='dvE' dvF='dvG' dvH='dvI' dvJ='dvK' dvL='dvM' dvN='dvO' dvP='dvQ' dvR='dvS' dvT='dvU' dvV='dvW' dvX='dvY' dvZ='dwa' dwb='dwc' dwd='dwe' dwf='dwg' dwh='dwi' dwj='dwk' dwl='dwm' dwn='dwo' dwp='dwq' dwr='dws' dwt='dwu' dwv='dww' dwx='dwy' dwz='dwA' dwB='dwC' dwD='dwE' dwF='dwG' dwH='dwI' dwJ='dwK' dwL='dwM' dwN='dwO' dwP='dwQ' dwR='dwS' dwT='dwU' dwV='dwW' dwX='dwY' dwZ='dxa' dxb='dxc' dxd='dxe' dxf='dxg' dxh='dxi' dxj='dxk' dxl='dxm' dxn='dxo' dxp='dxq' dxr='dxs' dxt='dxu' dxv='dxw' dxx='dxy' dxz='dxA' dxB='dxC' dxD='dxE' dxF='dxG' dxH='dxI' dxJ='dxK' dxL='dxM' dxN='dxO' dxP='dxQ' dxR='dxS' dxT='dxU' dxV='dxW' dxX='dxY' dxZ='dya' dyb='dyc' dyd='dye' dyf='dyg' dyh='dyi' dyj='dyk' dyl='dym' dyn='dyo' dyp='dyq' dyr='dys' dyt='dyu' dyv='dyw' />
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000142326501945645)'/>
+        <dyx dyy='dyz' dyA='dyB' dyC='dyD' dyE='dyF' dyG='dyH' dyI='dyJ' dyK='dyL' dyM='dyN' dyO='dyP' dyQ='dyR' dyS='dyT' dyU='dyV' dyW='dyX' dyY='dyZ' dza='dzb' dzc='dzd' dze='dzf' dzg='dzh' dzi='dzj' dzk='dzl' dzm='dzn' dzo='dzp' dzq='dzr' dzs='dzt' dzu='dzv' dzw='dzx' dzy='dzz' dzA='dzB' dzC='dzD' dzE='dzF' dzG='dzH' dzI='dzJ' dzK='dzL' dzM='dzN' dzO='dzP' dzQ='dzR' dzS='dzT' dzU='dzV' dzW='dzX' dzY='dzZ' dAa='dAb' dAc='dAd' dAe='dAf' dAg='dAh' dAi='dAj' dAk='dAl' dAm='dAn' dAo='dAp' dAq='dAr' dAs='dAt' dAu='dAv' dAw='dAx' dAy='dAz' dAA='dAB' dAC='dAD' dAE='dAF' dAG='dAH' dAI='dAJ' dAK='dAL' dAM='dAN' dAO='dAP' dAQ='dAR' dAS='dAT' dAU='dAV' dAW='dAX' dAY='dAZ' dBa='dBb' dBc='dBd' dBe='dBf' dBg='dBh' dBi='dBj' dBk='dBl' dBm='dBn' dBo='dBp' dBq='dBr' dBs='dBt' dBu='dBv' dBw='dBx' dBy='dBz' dBA='dBB' dBC='dBD' dBE='dBF' dBG='dBH' dBI='dBJ' dBK='dBL' dBM='dBN' dBO='dBP' dBQ='dBR' dBS='dBT' dBU='dBV' dBW='dBX' dBY='dBZ' dCa='dCb' dCc='dCd' dCe='dCf' dCg='dCh' dCi='dCj' dCk='dCl' dCm='dCn' dCo='dCp' dCq='dCr' dCs='dCt' dCu='dCv' dCw='dCx' dCy='dCz' dCA='dCB' dCC='dCD' dCE='dCF' dCG='dCH' dCI='dCJ' dCK='dCL' dCM='dCN' dCO='dCP' dCQ='dCR' dCS='dCT' dCU='dCV' dCW='dCX' dCY='dCZ' dDa='dDb' dDc='dDd' dDe='dDf' dDg='dDh' dDi='dDj' dDk='dDl' dDm='dDn' dDo='dDp' dDq='dDr' dDs='dDt' dDu='dDv' dDw='dDx' dDy='dDz' dDA='dDB' dDC='dDD' dDE='dDF' dDG='dDH' dDI='dDJ' dDK='dDL' dDM='dDN' dDO='dDP' dDQ='dDR' dDS='dDT' dDU='dDV' dDW='dDX' dDY='dDZ' dEa='dEb' dEc='dEd' dEe='dEf' dEg='dEh' dEi='dEj' dEk='dEl' dEm='dEn' dEo='dEp' dEq='dEr' dEs='dEt' dEu='dEv' dEw='dEx' dEy='dEz' dEA='dEB' dEC='dED' dEE='dEF' dEG='dEH' dEI='dEJ' dEK='dEL' dEM='dEN' dEO='dEP' dEQ='dER' dES='dET' dEU='dEV' dEW='dEX' dEY='dEZ' dFa='dFb' dFc='dFd' dFe='dFf' dFg='dFh' dFi='dFj' dFk='dFl' dFm='dFn' dFo='dFp' dFq='dFr' dFs='dFt' dFu='dFv' dFw='dFx' dFy='dFz' dFA='dFB' dFC='dFD' dFE='dFF' dFG='dFH' dFI='dFJ' dFK='dFL' dFM='dFN' dFO='dFP' dFQ='dFR' dFS='dFT' dFU='dFV' dFW='dFX' dFY='dFZ' dGa='dGb' dGc='dGd' dGe='dGf' dGg='dGh' dGi='dGj' dGk='dGl' dGm='dGn' dGo='dGp' dGq='dGr' dGs='dGt' dGu='dGv' dGw='dGx' dGy='dGz' dGA='dGB' dGC='dGD' dGE='dGF' dGG='dGH' dGI='dGJ' dGK='dGL' dGM='dGN' dGO='dGP' dGQ='dGR' dGS='dGT' dGU='dGV' dGW='dGX' dGY='dGZ' dHa='dHb' dHc='dHd' dHe='dHf' dHg='dHh' dHi='dHj' dHk='dHl' dHm='dHn' dHo='dHp' dHq='dHr' dHs='dHt' dHu='dHv' dHw='dHx' dHy='dHz' dHA='dHB' dHC='dHD' dHE='dHF' dHG='dHH' dHI='dHJ' dHK='dHL' dHM='dHN' dHO='dHP' dHQ='dHR' dHS='dHT' dHU='dHV' dHW='dHX' dHY='dHZ' dIa='dIb' dIc='dId' dIe='dIf' dIg='dIh' dIi='dIj' dIk='dIl' dIm='dIn' dIo='dIp' dIq='dIr' dIs='dIt' dIu='dIv' dIw='dIx' dIy='dIz' dIA='dIB' dIC='dID' dIE='dIF' dIG='dIH' dII='dIJ' dIK='dIL' dIM='dIN' dIO='dIP' dIQ='dIR' dIS='dIT' dIU='dIV' dIW='dIX' dIY='dIZ' dJa='dJb' dJc='dJd' dJe='dJf' dJg='dJh' dJi='dJj' dJk='dJl' dJm='dJn' dJo='dJp' dJq='dJr' dJs='dJt' dJu='dJv' dJw='dJx' dJy='dJz' dJA='dJB' dJC='dJD' dJE='dJF' dJG='dJH' dJI='dJJ' dJK='dJL' dJM='dJN' dJO='dJP' dJQ='dJR' dJS='dJT' dJU='dJV' dJW='dJX' dJY='dJZ' dKa='dKb' dKc='dKd' dKe='dKf' dKg='dKh' dKi='dKj' dKk='dKl' dKm='dKn' dKo='dKp' dKq='dKr' dKs='dKt' dKu='dKv' dKw='dKx' dKy='dKz' dKA='dKB' dKC='dKD' dKE='dKF' dKG='dKH' dKI='dKJ' dKK='dKL' dKM='dKN' dKO='dKP' dKQ='dKR' dKS='dKT' dKU='dKV' dKW='dKX' dKY='dKZ' dLa='dLb' dLc='dLd' dLe='dLf' dLg='dLh' dLi='dLj' dLk='dLl' dLm='dLn' dLo='dLp' dLq='dLr' dLs='dLt' dLu='dLv' dLw='dLx' dLy='dLz' dLA='dLB' dLC='dLD' dLE='dLF' dLG='dLH' dLI='dLJ' dLK='dLL' dLM='dLN' dLO='dLP' dLQ='dLR' dLS='dLT' dLU='dLV' dLW='dLX' dLY='dLZ' dMa='dMb' dMc='dMd' dMe='dMf' dMg='dMh' dMi='dMj' dMk='dMl' dMm='dMn' dMo='dMp' dMq='dMr' dMs='dMt' dMu='dMv' dMw='dMx' dMy='dMz' dMA='dMB' dMC='dMD' dME='dMF' dMG='dMH' dMI='dMJ' dMK='dML' dMM='dMN' dMO='dMP' dMQ='dMR' dMS='dMT' dMU='dMV' dMW='dMX' dMY='dMZ' dNa='dNb' dNc='dNd' dNe='dNf' dNg='dNh' dNi='dNj' dNk='dNl' dNm='dNn' dNo='dNp' dNq='dNr' dNs='dNt' dNu='dNv' dNw='dNx' dNy='dNz' dNA='dNB' dNC='dND' dNE='dNF' dNG='dNH' dNI='dNJ' dNK='dNL' dNM='dNN' dNO='dNP' dNQ='dNR' dNS='dNT' dNU='dNV' dNW='dNX' dNY='dNZ' dOa='dOb' dOc='dOd' dOe='dOf' dOg='dOh' dOi='dOj' dOk='dOl' dOm='dOn' dOo='dOp' dOq='dOr' dOs='dOt' dOu='dOv' dOw='dOx' dOy='dOz' dOA='dOB' dOC='dOD' dOE='dOF' dOG='dOH' dOI='dOJ' dOK='dOL' dOM='dON' dOO='dOP' dOQ='dOR' dOS='dOT' dOU='dOV' dOW='dOX' dOY='dOZ' dPa='dPb' dPc='dPd' dPe='dPf' dPg='dPh' dPi='dPj' dPk='dPl' dPm='dPn' dPo='dPp' dPq='dPr' dPs='dPt' dPu='dPv' dPw='dPx' dPy='dPz' dPA='dPB' dPC='dPD' dPE='dPF' dPG='dPH' dPI='dPJ' dPK='dPL' dPM='dPN' dPO='dPP' dPQ='dPR' dPS='dPT' dPU='dPV' dPW='dPX' dPY='dPZ' dQa='dQb' dQc='dQd' dQe='dQf' dQg='dQh' dQi='dQj' dQk='dQl' dQm='dQn' dQo='dQp' dQq='dQr' dQs='dQt' dQu='dQv' dQw='dQx' dQy='dQz' dQA='dQB' dQC='dQD' dQE='dQF' dQG='dQH' dQI='dQJ' dQK='dQL' dQM='dQN' dQO='dQP' dQQ='dQR' dQS='dQT' dQU='dQV' dQW='dQX' dQY='dQZ' dRa='dRb' dRc='dRd' dRe='dRf' dRg='dRh' dRi='dRj' dRk='dRl' dRm='dRn' dRo='dRp' dRq='dRr' dRs='dRt' dRu='dRv' dRw='dRx' dRy='dRz' dRA='dRB' dRC='dRD' dRE='dRF' dRG='dRH' dRI='dRJ' dRK='dRL' dRM='dRN' dRO='dRP' dRQ='dRR' dRS='dRT' dRU='dRV' dRW='dRX' dRY='dRZ' dSa='dSb' dSc='dSd' dSe='dSf' dSg='dSh' dSi='dSj' dSk='dSl' dSm='dSn' dSo='dSp' dSq='dSr' dSs='dSt' dSu='dSv' dSw='dSx' dSy='dSz' dSA='dSB' dSC='dSD' dSE='dSF' dSG='dSH' dSI='dSJ' dSK='dSL' dSM='dSN' dSO='dSP' dSQ='dSR' dSS='dST' dSU='dSV' dSW='dSX' dSY='dSZ' dTa='dTb' dTc='dTd' dTe='dTf' dTg='dTh' dTi='dTj' dTk='dTl' dTm='dTn' dTo='dTp' dTq='dTr' dTs='dTt' dTu='dTv' dTw='dTx' dTy='dTz' dTA='dTB' dTC='dTD' dTE='dTF' dTG='dTH' dTI='dTJ' dTK='dTL' dTM='dTN' dTO='dTP' dTQ='dTR' dTS='dTT' dTU='dTV' dTW='dTX' dTY='dTZ' dUa='dUb' dUc='dUd' dUe='dUf' dUg='dUh' dUi='dUj' dUk='dUl' dUm='dUn' dUo='dUp' dUq='dUr' dUs='dUt' dUu='dUv' dUw='dUx' dUy='dUz' dUA='dUB' dUC='dUD' dUE='dUF' dUG='dUH' dUI='dUJ' dUK='dUL' dUM='dUN' dUO='dUP' dUQ='dUR' dUS='dUT' dUU='dUV' dUW='dUX' dUY='dUZ' dVa='dVb' dVc='dVd' dVe='dVf' dVg='dVh' dVi='dVj' dVk='dVl' dVm='dVn' dVo='dVp' dVq='dVr' dVs='dVt' dVu='dVv' dVw='dVx' dVy='dVz' dVA='dVB' dVC='dVD' dVE='dVF' dVG='dVH' dVI='dVJ' dVK='dVL' dVM='dVN' dVO='dVP' dVQ='dVR' dVS='dVT' dVU='dVV' dVW='dVX' dVY='dVZ' dWa='dWb' dWc='dWd' dWe='dWf' dWg='dWh' dWi='dWj' dWk='dWl' dWm='dWn' dWo='dWp' dWq='dWr' dWs='dWt' dWu='dWv' dWw='dWx' dWy='dWz' dWA='dWB' dWC='dWD' dWE='dWF' dWG='dWH' dWI='dWJ' dWK='dWL' dWM='dWN' dWO='dWP' dWQ='dWR' dWS='dWT' dWU='dWV' dWW='dWX' dWY='dWZ' dXa='dXb' dXc='dXd' dXe='dXf' dXg='dXh' dXi='dXj' dXk='dXl' dXm='dXn' dXo='dXp' dXq='dXr' dXs='dXt' dXu='dXv' dXw='dXx' dXy='dXz' dXA='dXB' dXC='dXD' dXE='dXF' dXG='dXH' dXI='dXJ' dXK='dXL' dXM='dXN' dXO='dXP' dXQ='dXR' dXS='dXT' dXU='dXV' dXW='dXX' dXY='dXZ' dYa='dYb' dYc='dYd' dYe='dYf' dYg='dYh' dYi='dYj' dYk='dYl' dYm='dYn' dYo='dYp' dYq='dYr' dYs='dYt' dYu='dYv' dYw='dYx' dYy='dYz' dYA='dYB' dYC='dYD' dYE='dYF' dYG='dYH' dYI='dYJ' dYK='dYL' dYM='dYN' dYO='dYP' dYQ='dYR' dYS='dYT' dYU='dYV' dYW='dYX' dYY='dYZ' dZa='dZb' dZc='dZd' dZe='dZf' dZg='dZh' dZi='dZj' dZk='dZl' dZm='dZn' dZo='dZp' dZq='dZr' dZs='dZt' dZu='dZv' dZw='dZx' dZy='dZz' dZA='dZB' dZC='dZD' dZE='dZF' dZG='dZH' dZI='dZJ' dZK='dZL' dZM='dZN' dZO='dZP' dZQ='dZR' dZS='dZT' dZU='dZV' dZW='dZX' dZY='dZZ' eaa='eab' eac='ead' eae='eaf' eag='eah' eai='eaj' eak='eal' eam='ean' eao='eap' eaq='ear' eas='eat' eau='eav' eaw='eax' eay='eaz' eaA='eaB' eaC='eaD' eaE='eaF' eaG='eaH' eaI='eaJ' eaK='eaL' eaM='eaN' eaO='eaP' eaQ='eaR' eaS='eaT' eaU='eaV' eaW='eaX' eaY='eaZ' eba='ebb' ebc='ebd' ebe='ebf' ebg='ebh' ebi='ebj' ebk='ebl' ebm='ebn' ebo='ebp' ebq='ebr' ebs='ebt' ebu='ebv' ebw='ebx' eby='ebz' ebA='ebB' ebC='ebD' ebE='ebF' ebG='ebH' ebI='ebJ' ebK='ebL' ebM='ebN' ebO='ebP' ebQ='ebR' ebS='ebT' ebU='ebV' ebW='ebX' ebY='ebZ' eca='ecb' ecc='ecd' ece='ecf' ecg='ech' eci='ecj' eck='ecl' ecm='ecn' eco='ecp' ecq='ecr' ecs='ect' ecu='ecv' ecw='ecx' ecy='ecz' ecA='ecB' ecC='ecD' ecE='ecF' ecG='ecH' ecI='ecJ' ecK='ecL' ecM='ecN' ecO='ecP' ecQ='ecR' ecS='ecT' ecU='ecV' ecW='ecX' ecY='ecZ' eda='edb' edc='edd' ede='edf' edg='edh' edi='edj' edk='edl' edm='edn' edo='edp' edq='edr' eds='edt' edu='edv' edw='edx' edy='edz' edA='edB' edC='edD' edE='edF' edG='edH' edI='edJ' edK='edL' edM='edN' edO='edP' edQ='edR' edS='edT' edU='edV' edW='edX' edY='edZ' eea='eeb' eec='eed' eee='eef' eeg='eeh' eei='eej' eek='eel' eem='een' eeo='eep' eeq='eer' ees='eet' eeu='eev' eew='eex' eey='eez' eeA='eeB' eeC='eeD' eeE='eeF' eeG='eeH' eeI='eeJ' eeK='eeL' eeM='eeN' eeO='eeP' eeQ='eeR' eeS='eeT' eeU='eeV' eeW='eeX' eeY='eeZ' efa='efb' efc='efd' efe='eff' efg='efh' efi='efj' efk='efl' efm='efn' efo='efp' efq='efr' efs='eft' efu='efv' efw='efx' efy='efz' efA='efB' efC='efD' efE='efF' efG='efH' efI='efJ' efK='efL' efM='efN' efO='efP' efQ='efR' efS='efT' efU='efV' efW='efX' efY='efZ' ega='egb' egc='egd' ege='egf' egg='egh' egi='egj' egk='egl' egm='egn' ego='egp' egq='egr' egs='egt' egu='egv' egw='egx' egy='egz' egA='egB' egC='egD' egE='egF' egG='egH' egI='egJ' egK='egL' egM='egN' egO='egP' egQ='egR' egS='egT' egU='egV' egW='egX' egY='egZ' eha='ehb' ehc='ehd' ehe='ehf' ehg='ehh' ehi='ehj' ehk='ehl' ehm='ehn' eho='ehp' ehq='ehr' ehs='eht' ehu='ehv' ehw='ehx' ehy='ehz' ehA='ehB' ehC='ehD' ehE='ehF' ehG='ehH' ehI='ehJ' ehK='ehL' ehM='ehN' ehO='ehP' ehQ='ehR' ehS='ehT' ehU='ehV' ehW='ehX' ehY='ehZ' eia='eib' eic='eid' eie='eif' eig='eih' eii='eij' eik='eil' eim='ein' eio='eip' eiq='eir' eis='eit' eiu='eiv' eiw='eix' eiy='eiz' eiA='eiB' eiC='eiD' eiE='eiF' eiG='eiH' eiI='eiJ' eiK='eiL' eiM='eiN' eiO='eiP' eiQ='eiR' eiS='eiT' eiU='eiV' eiW='eiX' eiY='eiZ' eja='ejb' ejc='ejd' eje='ejf' ejg='ejh' eji='ejj' ejk='ejl' ejm='ejn' ejo='ejp' ejq='ejr' ejs='ejt' eju='ejv' ejw='ejx' ejy='ejz' ejA='ejB' ejC='ejD' ejE='ejF' ejG='ejH' ejI='ejJ' ejK='ejL' ejM='ejN' ejO='ejP' ejQ='ejR' ejS='ejT' ejU='ejV' ejW='ejX' ejY='ejZ' eka='ekb' ekc='ekd' eke='ekf' ekg='ekh' eki='ekj' ekk='ekl' ekm='ekn' eko='ekp' ekq='ekr' eks='ekt' eku='ekv' ekw='ekx' eky='ekz' ekA='ekB' ekC='ekD' ekE='ekF' ekG='ekH' ekI='ekJ' ekK='ekL' ekM='ekN' ekO='ekP' ekQ='ekR' ekS='ekT' ekU='ekV' ekW='ekX' ekY='ekZ' ela='elb' elc='eld' ele='elf' elg='elh' eli='elj' elk='ell' elm='eln' elo='elp' elq='elr' els='elt' elu='elv' elw='elx' ely='elz' elA='elB' elC='elD' elE='elF' elG='elH' elI='elJ' elK='elL' elM='elN' elO='elP' elQ='elR' elS='elT' elU='elV' elW='elX' elY='elZ' ema='emb' emc='emd' eme='emf' emg='emh' emi='emj' emk='eml' emm='emn' emo='emp' emq='emr' ems='emt' emu='emv' emw='emx' emy='emz' emA='emB' emC='emD' emE='emF' emG='emH' emI='emJ' emK='emL' emM='emN' emO='emP' emQ='emR' emS='emT' emU='emV' emW='emX' emY='emZ' ena='enb' enc='end' ene='enf' eng='enh' eni='enj' enk='enl' enm='enn' eno='enp' enq='enr' ens='ent' enu='env' enw='enx' eny='enz' enA='enB' enC='enD' enE='enF' enG='enH' enI='enJ' enK='enL' enM='enN' enO='enP' enQ='enR' enS='enT' enU='enV' enW='enX' enY='enZ' eoa='eob' eoc='eod' eoe='eof' eog='eoh' eoi='eoj' eok='eol' eom='eon' eoo='eop' eoq='eor' eos='eot' eou='eov' eow='eox' eoy='eoz' eoA='eoB' eoC='eoD' eoE='eoF' eoG='eoH' eoI='eoJ' eoK='eoL' eoM='eoN' eoO='eoP' eoQ='eoR' eoS='eoT' eoU='eoV' eoW='eoX' eoY='eoZ' epa='epb' epc='epd' epe='epf' epg='eph' epi='epj' epk='epl' epm='epn' epo='epp' epq='epr' eps='ept' epu='epv' epw='epx' epy='epz' epA='epB' epC='epD' epE='epF' epG='epH' epI='epJ' epK='epL' epM='epN' epO='epP' epQ='epR' epS='epT' epU='epV' epW='epX' epY='epZ' eqa='eqb' eqc='eqd' eqe='eqf' eqg='eqh' eqi='eqj' eqk='eql' eqm='eqn' eqo='eqp' eqq='eqr' eqs='eqt' equ='eqv' eqw='eqx' eqy='eqz' eqA='eqB' eqC='eqD' eqE='eqF' eqG='eqH' eqI='eqJ' eqK='eqL' eqM='eqN' eqO='eqP' eqQ='eqR' eqS='eqT' eqU='eqV' eqW='eqX' eqY='eqZ' era='erb' erc='erd' ere='erf' erg='erh' eri='erj' erk='erl' erm='ern' ero='erp' erq='err' ers='ert' eru='erv' erw='erx' ery='erz' erA='erB' erC='erD' erE='erF' erG='erH' erI='erJ' erK='erL' erM='erN' erO='erP' erQ='erR' erS='erT' erU='erV' erW='erX' erY='erZ' esa='esb' esc='esd' ese='esf' esg='esh' esi='esj' esk='esl' esm='esn' eso='esp' esq='esr' ess='est' esu='esv' esw='esx' esy='esz' esA='esB' esC='esD' esE='esF' esG='esH' esI='esJ' esK='esL' esM='esN' esO='esP' esQ='esR' esS='esT' esU='esV' esW='esX' esY='esZ' eta='etb' etc='etd' ete='etf' etg='eth' eti='etj' etk='etl' etm='etn' eto='etp' etq='etr' ets='ett' etu='etv' etw='etx' ety='etz' etA='etB' etC='etD' etE='etF' etG='etH' etI='etJ' etK='etL' etM='etN' etO='etP' etQ='etR' etS='etT' etU='etV' etW='etX' etY='etZ' eua='eub' euc='eud' eue='euf' eug='euh' eui='euj' euk='eul' eum='eun' euo='eup' euq='eur' eus='eut' euu='euv' euw='eux' euy='euz' euA='euB' euC='euD' euE='euF' euG='euH' euI='euJ' euK='euL' euM='euN' euO='euP' euQ='euR' euS='euT' euU='euV' euW='euX' euY='euZ' eva='evb' evc='evd' eve='evf' evg='evh' evi='evj' evk='evl' evm='evn' evo='evp' evq='evr' evs='evt' evu='evv' evw='evx' evy='evz' evA='evB' evC='evD' evE='evF' evG='evH' evI='evJ' evK='evL' evM='evN' evO='evP' evQ='evR' evS='evT' evU='evV' evW='evX' evY='evZ' ewa='ewb' ewc='ewd' ewe='ewf' ewg='ewh' ewi='ewj' ewk='ewl' ewm='ewn' ewo='ewp' ewq='ewr' ews='ewt' ewu='ewv' eww='ewx' ewy='ewz' ewA='ewB' ewC='ewD' ewE='ewF' ewG='ewH' ewI='ewJ' ewK='ewL' ewM='ewN' ewO='ewP' ewQ='ewR' ewS='ewT' ewU='ewV' ewW='ewX' ewY='ewZ' exa='exb' exc='exd' exe='exf' exg='exh' exi='exj' exk='exl' exm='exn' exo='exp' exq='exr' exs='ext' exu='exv' exw='exx' exy='exz' exA='exB' exC='exD' exE='exF' exG='exH' exI='exJ' exK='exL' exM='exN' exO='exP' exQ='exR' exS='exT' exU='exV' exW='exX' exY='exZ' eya='eyb' eyc='eyd' eye='eyf' eyg='eyh' eyi='eyj' eyk='eyl' eym='eyn' eyo='eyp' eyq='eyr' eys='eyt' eyu='eyv' eyw='eyx' eyy='eyz' eyA='eyB' eyC='eyD' eyE='eyF' eyG='eyH' eyI='eyJ' eyK='eyL' eyM='eyN' eyO='eyP' eyQ='eyR' eyS='eyT' eyU='eyV' eyW='eyX' eyY='eyZ' eza='ezb' ezc='ezd' eze='ezf' ezg='ezh' ezi='ezj' ezk='ezl' ezm='ezn' ezo='ezp' ezq='ezr' ezs='ezt' ezu='ezv' ezw='ezx' ezy='ezz' ezA='ezB' ezC='ezD' ezE='ezF' ezG='ezH' ezI='ezJ' ezK='ezL' ezM='ezN' ezO='ezP' ezQ='ezR' ezS='ezT' ezU='ezV' ezW='ezX' ezY='ezZ' eAa='eAb' eAc='eAd' eAe='eAf' eAg='eAh' eAi='eAj' eAk='eAl' eAm='eAn' eAo='eAp' eAq='eAr' eAs='eAt' eAu='eAv' eAw='eAx' eAy='eAz' eAA='eAB' eAC='eAD' eAE='eAF' eAG='eAH' eAI='eAJ' eAK='eAL' eAM='eAN' eAO='eAP' eAQ='eAR' eAS='eAT' eAU='eAV' eAW='eAX' eAY='eAZ' eBa='eBb' eBc='eBd' eBe='eBf' eBg='eBh' eBi='eBj' eBk='eBl' eBm='eBn' eBo='eBp' eBq='eBr' eBs='eBt' eBu='eBv' eBw='eBx' eBy='eBz' eBA='eBB' eBC='eBD' eBE='eBF' eBG='eBH' eBI='eBJ' eBK='eBL' eBM='eBN' eBO='eBP' eBQ='eBR' eBS='eBT' eBU='eBV' eBW='eBX' eBY='eBZ' eCa='eCb' eCc='eCd' eCe='eCf' eCg='eCh' eCi='eCj' eCk='eCl' eCm='eCn' eCo='eCp' eCq='eCr' eCs='eCt' eCu='eCv' eCw='eCx' eCy='eCz' eCA='eCB' eCC='eCD' eCE='eCF' eCG='eCH' eCI='eCJ' eCK='eCL' eCM='eCN' eCO='eCP' eCQ='eCR' eCS='eCT' eCU='eCV' eCW='eCX' eCY='eCZ' eDa='eDb' eDc='eDd' eDe='eDf' eDg='eDh' eDi='eDj' eDk='eDl' eDm='eDn' eDo='eDp' eDq='eDr' eDs='eDt' eDu='eDv' eDw='eDx' eDy='eDz' eDA='eDB' eDC='eDD' eDE='eDF' eDG='eDH' eDI='eDJ' eDK='eDL' eDM='eDN' eDO='eDP' eDQ='eDR' eDS='eDT' eDU='eDV' eDW='eDX' eDY='eDZ' eEa='eEb' eEc='eEd' eEe='eEf' eEg='eEh' eEi='eEj' eEk='eEl' eEm='eEn' eEo='eEp' eEq='eEr' eEs='eEt' eEu='eEv' eEw='eEx' eEy='eEz' eEA='eEB' eEC='eED' eEE='eEF' eEG='eEH' eEI='eEJ' eEK='eEL' eEM='eEN' eEO='eEP' eEQ='eER' eES='eET' eEU='eEV' eEW='eEX' eEY='eEZ' eFa='eFb' eFc='eFd' eFe='eFf' eFg='eFh' eFi='eFj' eFk='eFl' eFm='eFn' eFo='eFp' eFq='eFr' eFs='eFt' eFu='eFv' eFw='eFx' eFy='eFz' eFA='eFB' eFC='eFD' eFE='eFF' eFG='eFH' eFI='eFJ' eFK='eFL' eFM='eFN' eFO='eFP' eFQ='eFR' eFS='eFT' eFU='eFV' eFW='eFX' eFY='eFZ' eGa='eGb' eGc='eGd' eGe='eGf' eGg='eGh' eGi='eGj' eGk='eGl' eGm='eGn' eGo='eGp' eGq='eGr' eGs='eGt' eGu='eGv' eGw='eGx' eGy='eGz' eGA='eGB' eGC='eGD' eGE='eGF' eGG='eGH' eGI='eGJ' eGK='eGL' eGM='eGN' eGO='eGP' eGQ='eGR' eGS='eGT' eGU='eGV' eGW='eGX' eGY='eGZ' eHa='eHb' eHc='eHd' eHe='eHf' eHg='eHh' eHi='eHj' eHk='eHl' eHm='eHn' eHo='eHp' eHq='eHr' eHs='eHt' eHu='eHv' eHw='eHx' eHy='eHz' eHA='eHB' eHC='eHD' eHE='eHF' eHG='eHH' eHI='eHJ' eHK='eHL' eHM='eHN' eHO='eHP' eHQ='eHR' eHS='eHT' eHU='eHV' eHW='eHX' eHY='eHZ' eIa='eIb' eIc='eId' eIe='eIf' eIg='eIh' eIi='eIj' eIk='eIl' eIm='eIn' eIo='eIp' eIq='eIr' eIs='eIt' eIu='eIv' eIw='eIx' eIy='eIz' eIA='eIB' eIC='eID' eIE='eIF' eIG='eIH' eII='eIJ' eIK='eIL' eIM='eIN' eIO='eIP' eIQ='eIR' eIS='eIT' eIU='eIV' eIW='eIX' eIY='eIZ' eJa='eJb' eJc='eJd' eJe='eJf' eJg='eJh' eJi='eJj' eJk='eJl' eJm='eJn' eJo='eJp' eJq='eJr' eJs='eJt' eJu='eJv' eJw='eJx' eJy='eJz' eJA='eJB' eJC='eJD' eJE='eJF' eJG='eJH' eJI='eJJ' eJK='eJL' eJM='eJN' eJO='eJP' eJQ='eJR' eJS='eJT' eJU='eJV' eJW='eJX' eJY='eJZ' eKa='eKb' eKc='eKd' eKe='eKf' eKg='eKh' eKi='eKj' eKk='eKl' eKm='eKn' eKo='eKp' eKq='eKr' eKs='eKt' eKu='eKv' eKw='eKx' eKy='eKz' eKA='eKB' eKC='eKD' eKE='eKF' eKG='eKH' eKI='eKJ' eKK='eKL' eKM='eKN' eKO='eKP' eKQ='eKR' eKS='eKT' eKU='eKV' eKW='eKX' eKY='eKZ' eLa='eLb' eLc='eLd' eLe='eLf' eLg='eLh' eLi='eLj' eLk='eLl' eLm='eLn' eLo='eLp' eLq='eLr' eLs='eLt' eLu='eLv' eLw='eLx' eLy='eLz' eLA='eLB' eLC='eLD' eLE='eLF' eLG='eLH' eLI='eLJ' eLK='eLL' eLM='eLN' eLO='eLP' eLQ='eLR' eLS='eLT' eLU='eLV' eLW='eLX' eLY='eLZ' eMa='eMb' eMc='eMd' eMe='eMf' eMg='eMh' eMi='eMj' eMk='eMl' eMm='eMn' eMo='eMp' eMq='eMr' eMs='eMt' eMu='eMv' eMw='eMx' eMy='eMz' eMA='eMB' eMC='eMD' eME='eMF' eMG='eMH' eMI='eMJ' eMK='eML' eMM='eMN' eMO='eMP' eMQ='eMR' eMS='eMT' eMU='eMV' eMW='eMX' eMY='eMZ' eNa='eNb' eNc='eNd' eNe='eNf' eNg='eNh' eNi='eNj' eNk='eNl' eNm='eNn' eNo='eNp' eNq='eNr' eNs='eNt' eNu='eNv' eNw='eNx' eNy='eNz' eNA='eNB' eNC='eND' eNE='eNF' eNG='eNH' eNI='eNJ' eNK='eNL' eNM='eNN' eNO='eNP' eNQ='eNR' eNS='eNT' eNU='eNV' eNW='eNX' eNY='eNZ' eOa='eOb' eOc='eOd' eOe='eOf' eOg='eOh' eOi='eOj' eOk='eOl' eOm='eOn' eOo='eOp' eOq='eOr' eOs='eOt' eOu='eOv' eOw='eOx' eOy='eOz' eOA='eOB' eOC='eOD' eOE='eOF' eOG='eOH' eOI='eOJ' eOK='eOL' eOM='eON' eOO='eOP' eOQ='eOR' eOS='eOT' eOU='eOV' eOW='eOX' eOY='eOZ' ePa='ePb' ePc='ePd' ePe='ePf' ePg='ePh' ePi='ePj' ePk='ePl' ePm='ePn' ePo='ePp' ePq='ePr' ePs='ePt' ePu='ePv' ePw='ePx' ePy='ePz' ePA='ePB' ePC='ePD' ePE='ePF' ePG='ePH' ePI='ePJ' ePK='ePL' ePM='ePN' ePO='ePP' ePQ='ePR' ePS='ePT' ePU='ePV' ePW='ePX' ePY='ePZ' eQa='eQb' eQc='eQd' eQe='eQf' eQg='eQh' eQi='eQj' eQk='eQl' eQm='eQn' eQo='eQp' eQq='eQr' eQs='eQt' eQu='eQv' eQw='eQx' eQy='eQz' eQA='eQB' eQC='eQD' eQE='eQF' eQG='eQH' eQI='eQJ' eQK='eQL' eQM='eQN' eQO='eQP' eQQ='eQR' eQS='eQT' eQU='eQV' eQW='eQX' eQY='eQZ' eRa='eRb' eRc='eRd' eRe='eRf' eRg='eRh' eRi='eRj' eRk='eRl' eRm='eRn' eRo='eRp' eRq='eRr' eRs='eRt' eRu='eRv' eRw='eRx' eRy='eRz' eRA='eRB' eRC='eRD' eRE='eRF' eRG='eRH' eRI='eRJ' eRK='eRL' eRM='eRN' eRO='eRP' eRQ='eRR' eRS='eRT' eRU='eRV' eRW='eRX' eRY='eRZ' eSa='eSb' eSc='eSd' eSe='eSf' eSg='eSh' eSi='eSj' eSk='eSl' eSm='eSn' eSo='eSp' eSq='eSr' eSs='eSt' eSu='eSv' eSw='eSx' eSy='eSz' eSA='eSB' eSC='eSD' eSE='eSF' eSG='eSH' eSI='eSJ' eSK='eSL' eSM='eSN' eSO='eSP' eSQ='eSR' eSS='eST' eSU='eSV' eSW='eSX' eSY='eSZ' eTa='eTb' eTc='eTd' eTe='eTf' eTg='eTh' eTi='eTj' eTk='eTl' eTm='eTn' eTo='eTp' eTq='eTr' eTs='eTt' eTu='eTv' eTw='eTx' eTy='eTz' eTA='eTB' eTC='eTD' eTE='eTF' eTG='eTH' eTI='eTJ' eTK='eTL' eTM='eTN' eTO='eTP' eTQ='eTR' eTS='eTT' eTU='eTV' eTW='eTX' eTY='eTZ' eUa='eUb' eUc='eUd' eUe='eUf' eUg='eUh' eUi='eUj' eUk='eUl' eUm='eUn' eUo='eUp' eUq='eUr' eUs='eUt' eUu='eUv' eUw='eUx' eUy='eUz' eUA='eUB' eUC='eUD' eUE='eUF' eUG='eUH' eUI='eUJ' eUK='eUL' eUM='eUN' eUO='eUP' eUQ='eUR' eUS='eUT' eUU='eUV' eUW='eUX' eUY='eUZ' eVa='eVb' eVc='eVd' eVe='eVf' eVg='eVh' eVi='eVj' eVk='eVl' eVm='eVn' eVo='eVp' eVq='eVr' eVs='eVt' eVu='eVv' eVw='eVx' eVy='eVz' eVA='eVB' eVC='eVD' eVE='eVF' eVG='eVH' eVI='eVJ' eVK='eVL' eVM='eVN' eVO='eVP' eVQ='eVR' eVS='eVT' eVU='eVV' eVW='eVX' eVY='eVZ' eWa='eWb' eWc='eWd' eWe='eWf' eWg='eWh' eWi='eWj' eWk='eWl' eWm='eWn' eWo='eWp' eWq='eWr' eWs='eWt' eWu='eWv' eWw='eWx' eWy='eWz' eWA='eWB' eWC='eWD' eWE='eWF' eWG='eWH' eWI='eWJ' eWK='eWL' eWM='eWN' eWO='eWP' eWQ='eWR' eWS='eWT' eWU='eWV' eWW='eWX' eWY='eWZ' eXa='eXb' eXc='eXd' eXe='eXf' eXg='eXh' eXi='eXj' eXk='eXl' eXm='eXn' eXo='eXp' eXq='eXr' eXs='eXt' eXu='eXv' eXw='eXx' eXy='eXz' eXA='eXB' eXC='eXD' eXE='eXF' eXG='eXH' eXI='eXJ' eXK='eXL' eXM='eXN' eXO='eXP' eXQ='eXR' eXS='eXT' eXU='eXV' eXW='eXX' eXY='eXZ' eYa='eYb' eYc='eYd' eYe='eYf' eYg='eYh' eYi='eYj' eYk='eYl' eYm='eYn' eYo='eYp' eYq='eYr' eYs='eYt' eYu='eYv' eYw='eYx' eYy='eYz' eYA='eYB' eYC='eYD' eYE='eYF' eYG='eYH' eYI='eYJ' eYK='eYL' eYM='eYN' eYO='eYP' eYQ='eYR' eYS='eYT' eYU='eYV' eYW='eYX' eYY='eYZ' eZa='eZb' eZc='eZd' eZe='eZf' eZg='eZh' eZi='eZj' eZk='eZl' eZm='eZn' eZo='eZp' eZq='eZr' eZs='eZt' eZu='eZv' eZw='eZx' eZy='eZz' eZA='eZB' eZC='eZD' eZE='eZF' eZG='eZH' eZI='eZJ' eZK='eZL' eZM='eZN' eZO='eZP' eZQ='eZR' eZS='eZT' eZU='eZV' eZW='eZX' eZY='eZZ' faa='fab' fac='fad' fae='faf' fag='fah' fai='faj' fak='fal' fam='fan' fao='fap' faq='far' fas='fat' fau='fav' faw='fax' fay='faz' faA='faB' faC='faD' faE='faF' faG='faH' faI='faJ' faK='faL' faM='faN' faO='faP' faQ='faR' faS='faT' faU='faV' faW='faX' faY='faZ' fba='fbb' fbc='fbd' fbe='fbf' fbg='fbh' fbi='fbj' fbk='fbl' fbm='fbn' fbo='fbp' fbq='fbr' fbs='fbt' fbu='fbv' fbw='fbx' fby='fbz' fbA='fbB' fbC='fbD' fbE='fbF' fbG='fbH' fbI='fbJ' fbK='fbL' fbM='fbN' fbO='fbP' fbQ='fbR' fbS='fbT' fbU='fbV' fbW='fbX' fbY='fbZ' fca='fcb' fcc='fcd' fce='fcf' fcg='fch' fci='fcj' fck='fcl' fcm='fcn' fco='fcp' fcq='fcr' fcs='fct' fcu='fcv' fcw='fcx' fcy='fcz' fcA='fcB' fcC='fcD' fcE='fcF' fcG='fcH' fcI='fcJ' fcK='fcL' fcM='fcN' fcO='fcP' fcQ='fcR' fcS='fcT' fcU='fcV' fcW='fcX' fcY='fcZ' fda='fdb' fdc='fdd' fde='fdf' fdg='fdh' fdi='fdj' fdk='fdl' fdm='fdn' fdo='fdp' fdq='fdr' fds='fdt' fdu='fdv' fdw='fdx' fdy='fdz' fdA='fdB' fdC='fdD' fdE='fdF' fdG='fdH' fdI='fdJ' fdK='fdL' fdM='fdN' fdO='fdP' fdQ='fdR' fdS='fdT' fdU='fdV' fdW='fdX' fdY='fdZ' fea='feb' fec='fed' fee='fef' feg='feh' fei='fej' fek='fel' fem='fen' feo='fep' feq='fer' fes='fet' feu='fev' few='fex' fey='fez' feA='feB' feC='feD' feE='feF' feG='feH' feI='feJ' feK='feL' feM='feN' feO='feP' feQ='feR' feS='feT' feU='feV' feW='feX' feY='feZ' ffa='ffb' ffc='ffd' ffe='fff' ffg='ffh' ffi='ffj' ffk='ffl' ffm='ffn' ffo='ffp' ffq='ffr' ffs='fft' ffu='ffv' ffw='ffx' ffy='ffz' ffA='ffB' ffC='ffD' ffE='ffF' ffG='ffH' ffI='ffJ' ffK='ffL' ffM='ffN' ffO='ffP' ffQ='ffR' ffS='ffT' ffU='ffV' ffW='ffX' ffY='ffZ' fga='fgb' fgc='fgd' fge='fgf' fgg='fgh' fgi='fgj' fgk='fgl' fgm='fgn' fgo='fgp' fgq='fgr' fgs='fgt' fgu='fgv' fgw='fgx' fgy='fgz' fgA='fgB' fgC='fgD' fgE='fgF' fgG='fgH' fgI='fgJ' fgK='fgL' fgM='fgN' fgO='fgP' fgQ='fgR' fgS='fgT' fgU='fgV' fgW='fgX' fgY='fgZ' fha='fhb' fhc='fhd' fhe='fhf' fhg='fhh' fhi='fhj' fhk='fhl' fhm='fhn' fho='fhp' fhq='fhr' fhs='fht' fhu='fhv' fhw='fhx' fhy='fhz' fhA='fhB' fhC='fhD' fhE='fhF' fhG='fhH' fhI='fhJ' fhK='fhL' fhM='fhN' fhO='fhP' fhQ='fhR' fhS='fhT' fhU='fhV' fhW='fhX' fhY='fhZ' fia='fib' fic='fid' fie='fif' fig='fih' fii='fij' fik='fil' fim='fin' fio='fip' fiq='fir' fis='fit' fiu='fiv' fiw='fix' fiy='fiz' fiA='fiB' fiC='fiD' fiE='fiF' fiG='fiH' fiI='fiJ' fiK='fiL' fiM='fiN' fiO='fiP' fiQ='fiR' fiS='fiT' fiU='fiV' fiW='fiX' fiY='fiZ' fja='fjb' fjc='fjd' fje='fjf' fjg='fjh' fji='fjj' fjk='fjl' fjm='fjn' fjo='fjp' fjq='fjr' fjs='fjt' fju='fjv' fjw='fjx' fjy='fjz' fjA='fjB' fjC='fjD' fjE='fjF' fjG='fjH' fjI='fjJ' fjK='fjL' fjM='fjN' fjO='fjP' fjQ='fjR' fjS='fjT' fjU='fjV' fjW='fjX' fjY='fjZ' fka='fkb' fkc='fkd' fke='fkf' fkg='fkh' fki='fkj' fkk='fkl' fkm='fkn' fko='fkp' fkq='fkr' fks='fkt' fku='fkv' fkw='fkx' fky='fkz' fkA='fkB' fkC='fkD' fkE='fkF' fkG='fkH' fkI='fkJ' fkK='fkL' fkM='fkN' fkO='fkP' fkQ='fkR' fkS='fkT' fkU='fkV' fkW='fkX' fkY='fkZ' fla='flb' flc='fld' fle='flf' flg='flh' fli='flj' flk='fll' flm='fln' flo='flp' flq='flr' fls='flt' flu='flv' flw='flx' fly='flz' flA='flB' flC='flD' flE='flF' flG='flH' flI='flJ' flK='flL' flM='flN' flO='flP' flQ='flR' flS='flT' flU='flV' flW='flX' flY='flZ' fma='fmb' fmc='fmd' fme='fmf' fmg='fmh' fmi='fmj' fmk='fml' fmm='fmn' fmo='fmp' fmq='fmr' fms='fmt' fmu='fmv' fmw='fmx' fmy='fmz' fmA='fmB' fmC='fmD' fmE='fmF' fmG='fmH' fmI='fmJ' fmK='fmL' fmM='fmN' fmO='fmP' fmQ='fmR' fmS='fmT' fmU='fmV' fmW='fmX' fmY='fmZ' fna='fnb' fnc='fnd' fne='fnf' fng='fnh' fni='fnj' fnk='fnl' fnm='fnn' fno='fnp' fnq='fnr' fns='fnt' fnu='fnv' fnw='fnx' fny='fnz' fnA='fnB' fnC='fnD' fnE='fnF' fnG='fnH' fnI='fnJ' fnK='fnL' fnM='fnN' fnO='fnP' fnQ='fnR' fnS='fnT' fnU='fnV' fnW='fnX' fnY='fnZ' foa='fob' foc='fod' foe='fof' fog='foh' foi='foj' fok='fol' fom='fon' foo='fop' foq='for' fos='fot' fou='fov' fow='fox' foy='foz' foA='foB' foC='foD' foE='foF' foG='foH' foI='foJ' foK='foL' foM='foN' foO='foP' foQ='foR' foS='foT' foU='foV' foW='foX' foY='foZ' fpa='fpb' fpc='fpd' fpe='fpf' fpg='fph' fpi='fpj' fpk='fpl' fpm='fpn' fpo='fpp' fpq='fpr' fps='fpt' fpu='fpv' fpw='fpx' fpy='fpz' fpA='fpB' fpC='fpD' fpE='fpF' fpG='fpH' fpI='fpJ' fpK='fpL' fpM='fpN' fpO='fpP' fpQ='fpR' fpS='fpT' fpU='fpV' fpW='fpX' fpY='fpZ' fqa='fqb' fqc='fqd' fqe='fqf' fqg='fqh' fqi='fqj' fqk='fql' fqm='fqn' fqo='fqp' fqq='fqr' fqs='fqt' fqu='fqv' fqw='fqx' fqy='fqz' fqA='fqB' fqC='fqD' fqE='fqF' fqG='fqH' fqI='fqJ' fqK='fqL' fqM='fqN' fqO='fqP' fqQ='fqR' fqS='fqT' fqU='fqV' fqW='fqX' fqY='fqZ' fra='frb' frc='frd' fre='frf' frg='frh' fri='frj' frk='frl' frm='frn' fro='frp' frq='frr' frs='frt' fru='frv' frw='frx' fry='frz' frA='frB' frC='frD' frE='frF' frG='frH' frI='frJ' frK='frL' frM='frN' frO='frP' frQ='frR' frS='frT' frU='frV' frW='frX' frY='frZ' fsa='fsb' fsc='fsd' fse='fsf' fsg='fsh' fsi='fsj' fsk='fsl' fsm='fsn' fso='fsp' fsq='fsr' fss='fst' fsu='fsv' fsw='fsx' fsy='fsz' fsA='fsB' fsC='fsD' fsE='fsF' fsG='fsH' fsI='fsJ' fsK='fsL' fsM='fsN' fsO='fsP' fsQ='fsR' fsS='fsT' fsU='fsV' fsW='fsX' fsY='fsZ' fta='ftb' ftc='ftd' fte='ftf' ftg='fth' fti='ftj' ftk='ftl' ftm='ftn' fto='ftp' ftq='ftr' fts='ftt' ftu='ftv' ftw='ftx' fty='ftz' ftA='ftB' ftC='ftD' ftE='ftF' ftG='ftH' ftI='ftJ' ftK='ftL' ftM='ftN' ftO='ftP' ftQ='ftR' ftS='ftT' ftU='ftV' ftW='ftX' ftY='ftZ' fua='fub' fuc='fud' fue='fuf' fug='fuh' fui='fuj' fuk='ful' fum='fun' fuo='fup' fuq='fur' fus='fut' fuu='fuv' fuw='fux' fuy='fuz' fuA='fuB' fuC='fuD' fuE='fuF' fuG='fuH' fuI='fuJ' fuK='fuL' fuM='fuN' fuO='fuP' fuQ='fuR' fuS='fuT' fuU='fuV' fuW='fuX' fuY='fuZ' fva='fvb' fvc='fvd' fve='fvf' fvg='fvh' fvi='fvj' fvk='fvl' fvm='fvn' fvo='fvp' fvq='fvr' fvs='fvt' fvu='fvv' fvw='fvx' fvy='fvz' fvA='fvB' fvC='fvD' fvE='fvF' fvG='fvH' fvI='fvJ' fvK='fvL' fvM='fvN' fvO='fvP' fvQ='fvR' fvS='fvT' fvU='fvV' fvW='fvX' fvY='fvZ' fwa='fwb' fwc='fwd' fwe='fwf' fwg='fwh' fwi='fwj' fwk='fwl' fwm='fwn' fwo='fwp' fwq='fwr' fws='fwt' fwu='fwv' fww='fwx' fwy='fwz' fwA='fwB' fwC='fwD' fwE='fwF' fwG='fwH' fwI='fwJ' fwK='fwL' fwM='fwN' fwO='fwP' fwQ='fwR' fwS='fwT' fwU='fwV' fwW='fwX' fwY='fwZ' fxa='fxb' fxc='fxd' fxe='fxf' fxg='fxh' fxi='fxj' fxk='fxl' fxm='fxn' fxo='fxp' fxq='fxr' fxs='fxt' fxu='fxv' fxw='fxx' fxy='fxz' fxA='fxB' fxC='fxD' fxE='fxF' fxG='fxH' fxI='fxJ' fxK='fxL' fxM='fxN' fxO='fxP' fxQ='fxR' fxS='fxT' fxU='fxV' fxW='fxX' fxY='fxZ' fya='fyb' fyc='fyd' fye='fyf' fyg='fyh' fyi='fyj' fyk='fyl' fym='fyn' fyo='fyp' fyq='fyr' fys='fyt' fyu='fyv' fyw='fyx' fyy='fyz' fyA='fyB' fyC='fyD' fyE='fyF' fyG='fyH' fyI='fyJ' fyK='fyL' fyM='fyN' fyO='fyP' fyQ='fyR' fyS='fyT' fyU='fyV' fyW='fyX' fyY='fyZ' fza='fzb' fzc='fzd' fze='fzf' fzg='fzh' fzi='fzj' fzk='fzl' fzm='fzn' fzo='fzp' fzq='fzr' fzs='fzt' fzu='fzv' fzw='fzx' fzy='fzz' fzA='fzB' fzC='fzD' fzE='fzF' fzG='fzH' fzI='fzJ' fzK='fzL' fzM='fzN' fzO='fzP' fzQ='fzR' fzS='fzT' fzU='fzV' fzW='fzX' fzY='fzZ' fAa='fAb' fAc='fAd' fAe='fAf' fAg='fAh' fAi='fAj' fAk='fAl' fAm='fAn' fAo='fAp' fAq='fAr' fAs='fAt' fAu='fAv' fAw='fAx' fAy='fAz' fAA='fAB' fAC='fAD' fAE='fAF' fAG='fAH' fAI='fAJ' fAK='fAL' fAM='fAN' fAO='fAP' fAQ='fAR' fAS='fAT' fAU='fAV' fAW='fAX' fAY='fAZ' fBa='fBb' fBc='fBd' fBe='fBf' fBg='fBh' fBi='fBj' fBk='fBl' fBm='fBn' fBo='fBp' fBq='fBr' fBs='fBt' fBu='fBv' fBw='fBx' fBy='fBz' fBA='fBB' fBC='fBD' fBE='fBF' fBG='fBH' fBI='fBJ' fBK='fBL' fBM='fBN' fBO='fBP' fBQ='fBR' fBS='fBT' fBU='fBV' fBW='fBX' fBY='fBZ' fCa='fCb' fCc='fCd' fCe='fCf' fCg='fCh' fCi='fCj' fCk='fCl' fCm='fCn' fCo='fCp' fCq='fCr' fCs='fCt' fCu='fCv' fCw='fCx' fCy='fCz' fCA='fCB' fCC='fCD' fCE='fCF' fCG='fCH' fCI='fCJ' fCK='fCL' fCM='fCN' fCO='fCP' fCQ='fCR' fCS='fCT' fCU='fCV' fCW='fCX' fCY='fCZ' fDa='fDb' fDc='fDd' fDe='fDf' fDg='fDh' fDi='fDj' fDk='fDl' fDm='fDn' fDo='fDp' fDq='fDr' fDs='fDt' fDu='fDv' fDw='fDx' fDy='fDz' fDA='fDB' fDC='fDD' fDE='fDF' fDG='fDH' fDI='fDJ' fDK='fDL' fDM='fDN' fDO='fDP' fDQ='fDR' fDS='fDT' fDU='fDV' fDW='fDX' fDY='fDZ' fEa='fEb' fEc='fEd' fEe='fEf' fEg='fEh' fEi='fEj' fEk='fEl' fEm='fEn' fEo='fEp' fEq='fEr' fEs='fEt' fEu='fEv' fEw='fEx' fEy='fEz' fEA='fEB' fEC='fED' fEE='fEF' fEG='fEH' fEI='fEJ' fEK='fEL' fEM='fEN' fEO='fEP' fEQ='fER' fES='fET' fEU='fEV' fEW='fEX' fEY='fEZ' fFa='fFb' fFc='fFd' fFe='fFf' fFg='fFh' fFi='fFj' fFk='fFl' fFm='fFn' fFo='fFp' fFq='fFr' fFs='fFt' fFu='fFv' fFw='fFx' fFy='fFz' fFA='fFB' fFC='fFD' fFE='fFF' fFG='fFH' fFI='fFJ' fFK='fFL' fFM='fFN' fFO='fFP' fFQ='fFR' fFS='fFT' fFU='fFV' fFW='fFX' fFY='fFZ' fGa='fGb' fGc='fGd' fGe='fGf' fGg='fGh' fGi='fGj' fGk='fGl' fGm='fGn' fGo='fGp' fGq='fGr' fGs='fGt' fGu='fGv' fGw='fGx' fGy='fGz' fGA='fGB' fGC='fGD' fGE='fGF' fGG='fGH' fGI='fGJ' fGK='fGL' fGM='fGN' fGO='fGP' fGQ='fGR' fGS='fGT' fGU='fGV' fGW='fGX' fGY='fGZ' fHa='fHb' fHc='fHd' fHe='fHf' fHg='fHh' fHi='fHj' fHk='fHl' fHm='fHn' fHo='fHp' fHq='fHr' fHs='fHt' fHu='fHv' fHw='fHx' fHy='fHz' fHA='fHB' fHC='fHD' fHE='fHF' fHG='fHH' fHI='fHJ' fHK='fHL' fHM='fHN' fHO='fHP' fHQ='fHR' fHS='fHT' fHU='fHV' fHW='fHX' fHY='fHZ' fIa='fIb' fIc='fId' fIe='fIf' fIg='fIh' fIi='fIj' fIk='fIl' fIm='fIn' fIo='fIp' fIq='fIr' fIs='fIt' fIu='fIv' fIw='fIx' fIy='fIz' fIA='fIB' fIC='fID' fIE='fIF' fIG='fIH' fII='fIJ' fIK='fIL' fIM='fIN' fIO='fIP' fIQ='fIR' fIS='fIT' fIU='fIV' fIW='fIX' fIY='fIZ' fJa='fJb' fJc='fJd' fJe='fJf' fJg='fJh' fJi='fJj' fJk='fJl' fJm='fJn' fJo='fJp' fJq='fJr' fJs='fJt' fJu='fJv' fJw='fJx' fJy='fJz' fJA='fJB' fJC='fJD' fJE='fJF' fJG='fJH' fJI='fJJ' fJK='fJL' fJM='fJN' fJO='fJP' fJQ='fJR' fJS='fJT' fJU='fJV' fJW='fJX' fJY='fJZ' fKa='fKb' fKc='fKd' fKe='fKf' fKg='fKh' fKi='fKj' fKk='fKl' fKm='fKn' fKo='fKp' fKq='fKr' fKs='fKt' fKu='fKv' fKw='fKx' fKy='fKz' fKA='fKB' fKC='fKD' fKE='fKF' fKG='fKH' fKI='fKJ' fKK='fKL' fKM='fKN' fKO='fKP' fKQ='fKR' fKS='fKT' fKU='fKV' fKW='fKX' fKY='fKZ' fLa='fLb' fLc='fLd' fLe='fLf' fLg='fLh' fLi='fLj' fLk='fLl' fLm='fLn' fLo='fLp' fLq='fLr' fLs='fLt' fLu='fLv' fLw='fLx' fLy='fLz' fLA='fLB' fLC='fLD' fLE='fLF' fLG='fLH' fLI='fLJ' fLK='fLL' fLM='fLN' fLO='fLP' fLQ='fLR' fLS='fLT' fLU='fLV' fLW='fLX' fLY='fLZ' fMa='fMb' fMc='fMd' fMe='fMf' fMg='fMh' fMi='fMj' fMk='fMl' fMm='fMn' fMo='fMp' fMq='fMr' fMs='fMt' fMu='fMv' fMw='fMx' fMy='fMz' fMA='fMB' fMC='fMD' fME='fMF' fMG='fMH' fMI='fMJ' fMK='fML' fMM='fMN' fMO='fMP' fMQ='fMR' fMS='fMT' fMU='fMV' fMW='fMX' fMY='fMZ' fNa='fNb' fNc='fNd' fNe='fNf' fNg='fNh' fNi='fNj' fNk='fNl' fNm='fNn' fNo='fNp' fNq='fNr' fNs='fNt' fNu='fNv' fNw='fNx' fNy='fNz' fNA='fNB' fNC='fND' fNE='fNF' fNG='fNH' fNI='fNJ' fNK='fNL' fNM='fNN' fNO='fNP' fNQ='fNR' fNS='fNT' fNU='fNV' fNW='fNX' fNY='fNZ' fOa='fOb' fOc='fOd' fOe='fOf' fOg='fOh' fOi='fOj' fOk='fOl' fOm='fOn' fOo='fOp' fOq='fOr' fOs='fOt' fOu='fOv' fOw='fOx' fOy='fOz' fOA='fOB' fOC='fOD' fOE='fOF' fOG='fOH' fOI='fOJ' fOK='fOL' fOM='fON' fOO='fOP' fOQ='fOR' fOS='fOT' fOU='fOV' fOW='fOX' fOY='fOZ' fPa='fPb' fPc='fPd' fPe='fPf' fPg='fPh' fPi='fPj' fPk='fPl' fPm='fPn' fPo='fPp' fPq='fPr' fPs='fPt' fPu='fPv' fPw='fPx' fPy='fPz' fPA='fPB' fPC='fPD' fPE='fPF' fPG='fPH' fPI='fPJ' fPK='fPL' fPM='fPN' fPO='fPP' fPQ='fPR' fPS='fPT' fPU='fPV' fPW='fPX' fPY='fPZ' fQa='fQb' fQc='fQd' fQe='fQf' fQg='fQh' fQi='fQj' fQk='fQl' fQm='fQn' fQo='fQp' fQq='fQr' fQs='fQt' fQu='fQv' fQw='fQx' fQy='fQz' fQA='fQB' fQC='fQD' fQE='fQF' fQG='fQH' fQI='fQJ' fQK='fQL' fQM='fQN' fQO='fQP' fQQ='fQR' fQS='fQT' fQU='fQV' fQW='fQX' fQY='fQZ' fRa='fRb' fRc='fRd' fRe='fRf' fRg='fRh' fRi='fRj' fRk='fRl' fRm='fRn' fRo='fRp' fRq='fRr' fRs='fRt' fRu='fRv' fRw='fRx' fRy='fRz' fRA='fRB' fRC='fRD' fRE='fRF' fRG='fRH' fRI='fRJ' fRK='fRL' fRM='fRN' fRO='fRP' fRQ='fRR' fRS='fRT' fRU='fRV' fRW='fRX' fRY='fRZ' fSa='fSb' fSc='fSd' fSe='fSf' fSg='fSh' fSi='fSj' fSk='fSl' fSm='fSn' fSo='fSp' fSq='fSr' fSs='fSt' fSu='fSv' fSw='fSx' fSy='fSz' fSA='fSB' fSC='fSD' fSE='fSF' fSG='fSH' fSI='fSJ' fSK='fSL' fSM='fSN' fSO='fSP' fSQ='fSR' fSS='fST' fSU='fSV' fSW='fSX' fSY='fSZ' fTa='fTb' fTc='fTd' fTe='fTf' fTg='fTh' fTi='fTj' fTk='fTl' fTm='fTn' fTo='fTp' fTq='fTr' fTs='fTt' fTu='fTv' fTw='fTx' fTy='fTz' fTA='fTB' fTC='fTD' fTE='fTF' fTG='fTH' fTI='fTJ' fTK='fTL' fTM='fTN' fTO='fTP' fTQ='fTR' fTS='fTT' fTU='fTV' fTW='fTX' fTY='fTZ' fUa='fUb' fUc='fUd' fUe='fUf' fUg='fUh' fUi='fUj' fUk='fUl' fUm='fUn' fUo='fUp' fUq='fUr' fUs='fUt' fUu='fUv' fUw='fUx' fUy='fUz' fUA='fUB' fUC='fUD' fUE='fUF' fUG='fUH' fUI='fUJ' fUK='fUL' fUM='fUN' fUO='fUP' fUQ='fUR' fUS='fUT' fUU='fUV' fUW='fUX' fUY='fUZ' fVa='fVb' fVc='fVd' fVe='fVf' fVg='fVh' fVi='fVj' fVk='fVl' fVm='fVn' fVo='fVp' fVq='fVr' fVs='fVt' fVu='fVv' fVw='fVx' fVy='fVz' fVA='fVB' fVC='fVD' fVE='fVF' fVG='fVH' fVI='fVJ' fVK='fVL' fVM='fVN' fVO='fVP' fVQ='fVR' fVS='fVT' fVU='fVV' fVW='fVX' fVY='fVZ' fWa='fWb' fWc='fWd' fWe='fWf' fWg='fWh' fWi='fWj' fWk='fWl' fWm='fWn' fWo='fWp' fWq='fWr' fWs='fWt' fWu='fWv' fWw='fWx' fWy='fWz' fWA='fWB' fWC='fWD' fWE='fWF' fWG='fWH' fWI='fWJ' fWK='fWL' fWM='fWN' fWO='fWP' fWQ='fWR' fWS='fWT' fWU='fWV' fWW='fWX' fWY='fWZ' fXa='fXb' fXc='fXd' fXe='fXf' fXg='fXh' fXi='fXj' fXk='fXl' fXm='fXn' fXo='fXp' fXq='fXr' fXs='fXt' fXu='fXv' fXw='fXx' fXy='fXz' fXA='fXB' fXC='fXD' fXE='fXF' fXG='fXH' fXI='fXJ' fXK='fXL' fXM='fXN' fXO='fXP' fXQ='fXR' fXS='fXT' fXU='fXV' fXW='fXX' fXY='fXZ' fYa='fYb' fYc='fYd' fYe='fYf' fYg='fYh' fYi='fYj' fYk='fYl' fYm='fYn' fYo='fYp' fYq='fYr' fYs='fYt' fYu='fYv' fYw='fYx' fYy='fYz' fYA='fYB' fYC='fYD' fYE='fYF' fYG='fYH' fYI='fYJ' fYK='fYL' fYM='fYN' fYO='fYP' fYQ='fYR' fYS='fYT' fYU='fYV' fYW='fYX' fYY='fYZ' fZa='fZb' fZc='fZd' fZe='fZf' fZg='fZh' fZi='fZj' fZk='fZl' fZm='fZn' fZo='fZp' fZq='fZr' fZs='fZt' fZu='fZv' fZw='fZx' fZy='fZz' fZA='fZB' fZC='fZD' fZE='fZF' fZG='fZH' fZI='fZJ' fZK='fZL' fZM='fZN' fZO='fZP' fZQ='fZR' fZS='fZT' fZU='fZV' fZW='fZX' fZY='fZZ' gaa='gab' gac='gad' gae='gaf' gag='gah' gai='gaj' gak='gal' gam='gan' gao='gap' gaq='gar' gas='gat' gau='gav' gaw='gax' gay='gaz' gaA='gaB' gaC='gaD' gaE='gaF' gaG='gaH' gaI='gaJ' gaK='gaL' gaM='gaN' gaO='gaP' gaQ='gaR' gaS='gaT' gaU='gaV' gaW='gaX' gaY='gaZ' gba='gbb' gbc='gbd' gbe='gbf' gbg='gbh' gbi='gbj' gbk='gbl' gbm='gbn' gbo='gbp' gbq='gbr' gbs='gbt' gbu='gbv' gbw='gbx' gby='gbz' gbA='gbB' gbC='gbD' gbE='gbF' gbG='gbH' gbI='gbJ' gbK='gbL' gbM='gbN' gbO='gbP' gbQ='gbR' gbS='gbT' gbU='gbV' gbW='gbX' gbY='gbZ' gca='gcb' gcc='gcd' gce='gcf' gcg='gch' gci='gcj' gck='gcl' gcm='gcn' gco='gcp' gcq='gcr' gcs='gct' gcu='gcv' gcw='gcx' gcy='gcz' gcA='gcB' gcC='gcD' gcE='gcF' gcG='gcH' gcI='gcJ' gcK='gcL' gcM='gcN' gcO='gcP' gcQ='gcR' gcS='gcT' gcU='gcV' gcW='gcX' gcY='gcZ' gda='gdb' gdc='gdd' gde='gdf' gdg='gdh' gdi='gdj' gdk='gdl' gdm='gdn' gdo='gdp' gdq='gdr' gds='gdt' gdu='gdv' gdw='gdx' gdy='gdz' gdA='gdB' gdC='gdD' gdE='gdF' gdG='gdH' gdI='gdJ' gdK='gdL' gdM='gdN' gdO='gdP' gdQ='gdR' gdS='gdT' gdU='gdV' gdW='gdX' gdY='gdZ' gea='geb' gec='ged' gee='gef' geg='geh' gei='gej' gek='gel' gem='gen' geo='gep' geq='ger' ges='get' geu='gev' gew='gex' gey='gez' geA='geB' geC='geD' geE='geF' geG='geH' geI='geJ' geK='geL' geM='geN' geO='geP' geQ='geR' geS='geT' geU='geV' geW='geX' geY='geZ' gfa='gfb' gfc='gfd' gfe='gff' gfg='gfh' gfi='gfj' gfk='gfl' gfm='gfn' gfo='gfp' gfq='gfr' gfs='gft' gfu='gfv' gfw='gfx' gfy='gfz' gfA='gfB' gfC='gfD' gfE='gfF' gfG='gfH' gfI='gfJ' gfK='gfL' gfM='gfN' gfO='gfP' gfQ='gfR' gfS='gfT' gfU='gfV' gfW='gfX' gfY='gfZ' gga='ggb' ggc='ggd' gge='ggf' ggg='ggh' ggi='ggj' ggk='ggl' ggm='ggn' ggo='ggp' ggq='ggr' ggs='ggt' ggu='ggv' ggw='ggx' ggy='ggz' ggA='ggB' ggC='ggD' ggE='ggF' ggG='ggH' ggI='ggJ' ggK='ggL' ggM='ggN' ggO='ggP' ggQ='ggR' ggS='ggT' ggU='ggV' ggW='ggX' ggY='ggZ' gha='ghb' ghc='ghd' ghe='ghf' ghg='ghh' ghi='ghj' ghk='ghl' ghm='ghn' gho='ghp' ghq='ghr' ghs='ght' ghu='ghv' ghw='ghx' ghy='ghz' ghA='ghB' ghC='ghD' ghE='ghF' ghG='ghH' ghI='ghJ' ghK='ghL' ghM='ghN' ghO='ghP' ghQ='ghR' ghS='ghT' ghU='ghV' ghW='ghX' ghY='ghZ' gia='gib' gic='gid' gie='gif' gig='gih' gii='gij' gik='gil' gim='gin' gio='gip' giq='gir' gis='git' giu='giv' giw='gix' giy='giz' giA='giB' giC='giD' giE='giF' giG='giH' giI='giJ' giK='giL' giM='giN' giO='giP' giQ='giR' giS='giT' giU='giV' giW='giX' giY='giZ' gja='gjb' gjc='gjd' gje='gjf' gjg='gjh' gji='gjj' gjk='gjl' gjm='gjn' gjo='gjp' gjq='gjr' gjs='gjt' gju='gjv' gjw='gjx' gjy='gjz' gjA='gjB' gjC='gjD' gjE='gjF' gjG='gjH' gjI='gjJ' gjK='gjL' gjM='gjN' gjO='gjP' gjQ='gjR' gjS='gjT' gjU='gjV' gjW='gjX' gjY='gjZ' gka='gkb' gkc='gkd' gke='gkf' gkg='gkh' gki='gkj' gkk='gkl' gkm='gkn' gko='gkp' gkq='gkr' /><xsl:value-of select='ceiling(133709)'/><xsl:value-of select='ceiling(133710)'/><xsl:value-of select='ceiling(133711)'/><xsl:value-of select='ceiling(133712)'/></xsl:template>
+<xsl:template name='gks' match="/gkt"><ceil gku='gkv' gkw='gkx' gky='gkz' gkA='gkB' gkC='gkD' gkE='gkF' gkG='gkH' gkI='gkJ' gkK='gkL' gkM='gkN' gkO='gkP' gkQ='gkR' gkS='gkT' gkU='gkV' gkW='gkX' gkY='gkZ' gla='glb' glc='gld' gle='glf' glg='glh' gli='glj' glk='gll' glm='gln' glo='glp' glq='glr' gls='glt' glu='glv' glw='glx' gly='glz' glA='glB' glC='glD' glE='glF' glG='glH' glI='glJ' glK='glL' glM='glN' glO='glP' glQ='glR' glS='glT' glU='glV' glW='glX' glY='glZ' gma='gmb' gmc='gmd' gme='gmf' gmg='gmh' gmi='gmj' gmk='gml' gmm='gmn' gmo='gmp' gmq='gmr' gms='gmt' gmu='gmv' gmw='gmx' gmy='gmz' gmA='gmB' gmC='gmD' gmE='gmF' gmG='gmH' gmI='gmJ' gmK='gmL' gmM='gmN' gmO='gmP' gmQ='gmR' gmS='gmT' gmU='gmV' gmW='gmX' gmY='gmZ' gna='gnb' gnc='gnd' gne='gnf' gng='gnh' gni='gnj' gnk='gnl' gnm='gnn' gno='gnp' gnq='gnr' gns='gnt' gnu='gnv' gnw='gnx' gny='gnz' gnA='gnB' gnC='gnD' gnE='gnF' gnG='gnH' gnI='gnJ' gnK='gnL' gnM='gnN' gnO='gnP' gnQ='gnR' gnS='gnT' gnU='gnV' gnW='gnX' gnY='gnZ' goa='gob' goc='god' goe='gof' gog='goh' goi='goj' gok='gol' gom='gon' goo='gop' /><xsl:value-of select='ceiling(1337)'/><xsl:value-of select='ceiling(133713)'/><xsl:value-of select='ceiling(133714)'/><goq gor='gos' got='gou' gov='gow' gox='goy' goz='goA' goB='goC' goD='goE' goF='goG' goH='goI' goJ='goK' goL='goM' goN='goO' goP='goQ' goR='goS' goT='goU' goV='goW' goX='goY' goZ='gpa' gpb='gpc' gpd='gpe' gpf='gpg' gph='gpi' gpj='gpk' gpl='gpm' gpn='gpo' gpp='gpq' gpr='gps' gpt='gpu' gpv='gpw' gpx='gpy' gpz='gpA' gpB='gpC' gpD='gpE' gpF='gpG' gpH='gpI' gpJ='gpK' gpL='gpM' gpN='gpO' gpP='gpQ' gpR='gpS' gpT='gpU' gpV='gpW' gpX='gpY' gpZ='gqa' gqb='gqc' gqd='gqe' gqf='gqg' gqh='gqi' gqj='gqk' gql='gqm' gqn='gqo' gqp='gqq' gqr='gqs' gqt='gqu' gqv='gqw' gqx='gqy' gqz='gqA' gqB='gqC' gqD='gqE' gqF='gqG' gqH='gqI' gqJ='gqK' gqL='gqM' gqN='gqO' gqP='gqQ' gqR='gqS' gqT='gqU' gqV='gqW' gqX='gqY' gqZ='gra' grb='grc' grd='gre' grf='grg' grh='gri' grj='grk' grl='grm' grn='gro' grp='grq' grr='grs' grt='gru' grv='grw' grx='gry' grz='grA' grB='grC' grD='grE' grF='grG' grH='grI' grJ='grK' grL='grM' grN='grO' grP='grQ' grR='grS' grT='grU' grV='grW' grX='grY' grZ='gsa' gsb='gsc' gsd='gse' gsf='gsg' gsh='gsi' gsj='gsk' gsl='gsm' gsn='gso' gsp='gsq' gsr='gss' gst='gsu' gsv='gsw' gsx='gsy' gsz='gsA' gsB='gsC' gsD='gsE' gsF='gsG' gsH='gsI' gsJ='gsK' gsL='gsM' gsN='gsO' gsP='gsQ' gsR='gsS' gsT='gsU' gsV='gsW' gsX='gsY' gsZ='gta' gtb='gtc' gtd='gte' gtf='gtg' gth='gti' gtj='gtk' gtl='gtm' gtn='gto' gtp='gtq' gtr='gts' gtt='gtu' gtv='gtw' gtx='gty' gtz='gtA' gtB='gtC' gtD='gtE' gtF='gtG' gtH='gtI' gtJ='gtK' gtL='gtM' gtN='gtO' gtP='gtQ' gtR='gtS' gtT='gtU' gtV='gtW' gtX='gtY' gtZ='gua' gub='guc' gud='gue' guf='gug' guh='gui' guj='guk' gul='gum' gun='guo' gup='guq' gur='gus' gut='guu' guv='guw' gux='guy' guz='guA' guB='guC' guD='guE' guF='guG' guH='guI' guJ='guK' guL='guM' guN='guO' guP='guQ' guR='guS' guT='guU' guV='guW' guX='guY' guZ='gva' gvb='gvc' gvd='gve' gvf='gvg' gvh='gvi' gvj='gvk' gvl='gvm' gvn='gvo' gvp='gvq' gvr='gvs' gvt='gvu' gvv='gvw' gvx='gvy' gvz='gvA' gvB='gvC' gvD='gvE' gvF='gvG' gvH='gvI' gvJ='gvK' gvL='gvM' gvN='gvO' gvP='gvQ' gvR='gvS' gvT='gvU' gvV='gvW' gvX='gvY' gvZ='gwa' gwb='gwc' gwd='gwe' gwf='gwg' gwh='gwi' gwj='gwk' gwl='gwm' gwn='gwo' gwp='gwq' gwr='gws' gwt='gwu' gwv='gww' gwx='gwy' gwz='gwA' gwB='gwC' gwD='gwE' gwF='gwG' gwH='gwI' gwJ='gwK' gwL='gwM' gwN='gwO' gwP='gwQ' gwR='gwS' gwT='gwU' gwV='gwW' gwX='gwY' gwZ='gxa' gxb='gxc' gxd='gxe' gxf='gxg' gxh='gxi' gxj='gxk' gxl='gxm' gxn='gxo' gxp='gxq' gxr='gxs' gxt='gxu' gxv='gxw' gxx='gxy' gxz='gxA' gxB='gxC' gxD='gxE' gxF='gxG' gxH='gxI' gxJ='gxK' gxL='gxM' gxN='gxO' gxP='gxQ' gxR='gxS' gxT='gxU' gxV='gxW' gxX='gxY' gxZ='gya' gyb='gyc' gyd='gye' gyf='gyg' gyh='gyi' gyj='gyk' gyl='gym' gyn='gyo' gyp='gyq' gyr='gys' gyt='gyu' gyv='gyw' gyx='gyy' gyz='gyA' gyB='gyC' gyD='gyE' gyF='gyG' gyH='gyI' gyJ='gyK' gyL='gyM' gyN='gyO' gyP='gyQ' gyR='gyS' gyT='gyU' gyV='gyW' gyX='gyY' gyZ='gza' gzb='gzc' gzd='gze' gzf='gzg' gzh='gzi' gzj='gzk' gzl='gzm' gzn='gzo' gzp='gzq' gzr='gzs' gzt='gzu' gzv='gzw' gzx='gzy' gzz='gzA' gzB='gzC' gzD='gzE' gzF='gzG' gzH='gzI' gzJ='gzK' gzL='gzM' gzN='gzO' gzP='gzQ' gzR='gzS' gzT='gzU' gzV='gzW' gzX='gzY' gzZ='gAa' gAb='gAc' gAd='gAe' gAf='gAg' gAh='gAi' gAj='gAk' gAl='gAm' gAn='gAo' gAp='gAq' gAr='gAs' gAt='gAu' gAv='gAw' gAx='gAy' gAz='gAA' gAB='gAC' />
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008344026969402015)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007406827652861232)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010609979082)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001393005378307274)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000386843816)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025588349409616466)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000108331572)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104126)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210413)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104136)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210414)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104146)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210415)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104156)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210416)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104166)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210417)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104176)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210418)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104186)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210419)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021046406)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010655986780146883)'/>
+        <gAD gAE='gAF' gAG='gAH' gAI='gAJ' gAK='gAL' gAM='gAN' gAO='gAP' gAQ='gAR' gAS='gAT' gAU='gAV' gAW='gAX' gAY='gAZ' gBa='gBb' gBc='gBd' gBe='gBf' gBg='gBh' gBi='gBj' gBk='gBl' gBm='gBn' gBo='gBp' gBq='gBr' gBs='gBt' gBu='gBv' gBw='gBx' gBy='gBz' gBA='gBB' gBC='gBD' gBE='gBF' gBG='gBH' gBI='gBJ' gBK='gBL' gBM='gBN' gBO='gBP' gBQ='gBR' gBS='gBT' gBU='gBV' gBW='gBX' gBY='gBZ' gCa='gCb' gCc='gCd' gCe='gCf' gCg='gCh' gCi='gCj' gCk='gCl' gCm='gCn' gCo='gCp' gCq='gCr' gCs='gCt' gCu='gCv' gCw='gCx' gCy='gCz' gCA='gCB' gCC='gCD' gCE='gCF' gCG='gCH' gCI='gCJ' gCK='gCL' gCM='gCN' gCO='gCP' gCQ='gCR' gCS='gCT' gCU='gCV' gCW='gCX' gCY='gCZ' gDa='gDb' gDc='gDd' gDe='gDf' gDg='gDh' gDi='gDj' gDk='gDl' gDm='gDn' gDo='gDp' gDq='gDr' gDs='gDt' gDu='gDv' gDw='gDx' gDy='gDz' gDA='gDB' gDC='gDD' gDE='gDF' gDG='gDH' gDI='gDJ' gDK='gDL' gDM='gDN' gDO='gDP' gDQ='gDR' />
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000142326501945645)'/>
+        <gDS gDT='gDU' gDV='gDW' gDX='gDY' gDZ='gEa' gEb='gEc' gEd='gEe' gEf='gEg' gEh='gEi' gEj='gEk' gEl='gEm' gEn='gEo' gEp='gEq' gEr='gEs' gEt='gEu' gEv='gEw' gEx='gEy' gEz='gEA' gEB='gEC' gED='gEE' gEF='gEG' gEH='gEI' gEJ='gEK' gEL='gEM' gEN='gEO' gEP='gEQ' gER='gES' gET='gEU' gEV='gEW' gEX='gEY' gEZ='gFa' gFb='gFc' gFd='gFe' gFf='gFg' gFh='gFi' gFj='gFk' gFl='gFm' gFn='gFo' gFp='gFq' gFr='gFs' gFt='gFu' gFv='gFw' gFx='gFy' gFz='gFA' gFB='gFC' gFD='gFE' gFF='gFG' gFH='gFI' gFJ='gFK' gFL='gFM' gFN='gFO' gFP='gFQ' gFR='gFS' gFT='gFU' gFV='gFW' gFX='gFY' gFZ='gGa' gGb='gGc' gGd='gGe' gGf='gGg' gGh='gGi' gGj='gGk' gGl='gGm' gGn='gGo' gGp='gGq' gGr='gGs' gGt='gGu' gGv='gGw' gGx='gGy' gGz='gGA' gGB='gGC' gGD='gGE' gGF='gGG' gGH='gGI' gGJ='gGK' gGL='gGM' gGN='gGO' gGP='gGQ' gGR='gGS' gGT='gGU' gGV='gGW' gGX='gGY' gGZ='gHa' gHb='gHc' gHd='gHe' gHf='gHg' gHh='gHi' gHj='gHk' gHl='gHm' gHn='gHo' gHp='gHq' gHr='gHs' gHt='gHu' gHv='gHw' gHx='gHy' gHz='gHA' gHB='gHC' gHD='gHE' gHF='gHG' gHH='gHI' gHJ='gHK' gHL='gHM' gHN='gHO' gHP='gHQ' gHR='gHS' gHT='gHU' gHV='gHW' gHX='gHY' gHZ='gIa' gIb='gIc' gId='gIe' gIf='gIg' gIh='gIi' gIj='gIk' gIl='gIm' gIn='gIo' gIp='gIq' gIr='gIs' gIt='gIu' gIv='gIw' gIx='gIy' gIz='gIA' gIB='gIC' gID='gIE' gIF='gIG' gIH='gII' gIJ='gIK' gIL='gIM' gIN='gIO' gIP='gIQ' gIR='gIS' gIT='gIU' gIV='gIW' gIX='gIY' gIZ='gJa' gJb='gJc' gJd='gJe' gJf='gJg' gJh='gJi' gJj='gJk' gJl='gJm' gJn='gJo' gJp='gJq' gJr='gJs' gJt='gJu' gJv='gJw' gJx='gJy' gJz='gJA' gJB='gJC' gJD='gJE' gJF='gJG' gJH='gJI' gJJ='gJK' gJL='gJM' gJN='gJO' gJP='gJQ' gJR='gJS' gJT='gJU' gJV='gJW' gJX='gJY' gJZ='gKa' gKb='gKc' gKd='gKe' gKf='gKg' gKh='gKi' gKj='gKk' gKl='gKm' gKn='gKo' gKp='gKq' gKr='gKs' gKt='gKu' gKv='gKw' gKx='gKy' gKz='gKA' gKB='gKC' gKD='gKE' gKF='gKG' gKH='gKI' gKJ='gKK' gKL='gKM' gKN='gKO' gKP='gKQ' gKR='gKS' gKT='gKU' gKV='gKW' gKX='gKY' gKZ='gLa' gLb='gLc' gLd='gLe' gLf='gLg' gLh='gLi' gLj='gLk' gLl='gLm' gLn='gLo' gLp='gLq' gLr='gLs' gLt='gLu' gLv='gLw' gLx='gLy' gLz='gLA' gLB='gLC' gLD='gLE' gLF='gLG' gLH='gLI' gLJ='gLK' gLL='gLM' gLN='gLO' gLP='gLQ' gLR='gLS' gLT='gLU' gLV='gLW' gLX='gLY' gLZ='gMa' gMb='gMc' gMd='gMe' gMf='gMg' gMh='gMi' gMj='gMk' gMl='gMm' gMn='gMo' gMp='gMq' gMr='gMs' gMt='gMu' gMv='gMw' gMx='gMy' gMz='gMA' gMB='gMC' gMD='gME' gMF='gMG' gMH='gMI' gMJ='gMK' gML='gMM' gMN='gMO' gMP='gMQ' gMR='gMS' gMT='gMU' gMV='gMW' gMX='gMY' gMZ='gNa' gNb='gNc' gNd='gNe' gNf='gNg' gNh='gNi' gNj='gNk' gNl='gNm' gNn='gNo' gNp='gNq' gNr='gNs' gNt='gNu' gNv='gNw' gNx='gNy' gNz='gNA' gNB='gNC' gND='gNE' gNF='gNG' gNH='gNI' gNJ='gNK' gNL='gNM' gNN='gNO' gNP='gNQ' gNR='gNS' gNT='gNU' gNV='gNW' gNX='gNY' gNZ='gOa' gOb='gOc' gOd='gOe' gOf='gOg' gOh='gOi' gOj='gOk' gOl='gOm' gOn='gOo' gOp='gOq' gOr='gOs' gOt='gOu' gOv='gOw' gOx='gOy' gOz='gOA' gOB='gOC' gOD='gOE' gOF='gOG' gOH='gOI' gOJ='gOK' gOL='gOM' gON='gOO' gOP='gOQ' gOR='gOS' gOT='gOU' gOV='gOW' gOX='gOY' gOZ='gPa' gPb='gPc' gPd='gPe' gPf='gPg' gPh='gPi' gPj='gPk' gPl='gPm' gPn='gPo' gPp='gPq' gPr='gPs' gPt='gPu' gPv='gPw' gPx='gPy' gPz='gPA' gPB='gPC' gPD='gPE' gPF='gPG' gPH='gPI' gPJ='gPK' gPL='gPM' gPN='gPO' gPP='gPQ' gPR='gPS' gPT='gPU' gPV='gPW' gPX='gPY' gPZ='gQa' gQb='gQc' gQd='gQe' gQf='gQg' gQh='gQi' gQj='gQk' gQl='gQm' gQn='gQo' gQp='gQq' gQr='gQs' gQt='gQu' gQv='gQw' gQx='gQy' gQz='gQA' gQB='gQC' gQD='gQE' gQF='gQG' gQH='gQI' gQJ='gQK' gQL='gQM' gQN='gQO' gQP='gQQ' gQR='gQS' gQT='gQU' gQV='gQW' gQX='gQY' gQZ='gRa' gRb='gRc' gRd='gRe' gRf='gRg' gRh='gRi' gRj='gRk' gRl='gRm' gRn='gRo' gRp='gRq' gRr='gRs' gRt='gRu' gRv='gRw' gRx='gRy' gRz='gRA' gRB='gRC' gRD='gRE' gRF='gRG' gRH='gRI' gRJ='gRK' gRL='gRM' gRN='gRO' gRP='gRQ' gRR='gRS' gRT='gRU' gRV='gRW' gRX='gRY' gRZ='gSa' gSb='gSc' gSd='gSe' gSf='gSg' gSh='gSi' gSj='gSk' gSl='gSm' gSn='gSo' gSp='gSq' gSr='gSs' gSt='gSu' gSv='gSw' gSx='gSy' gSz='gSA' gSB='gSC' gSD='gSE' gSF='gSG' gSH='gSI' gSJ='gSK' gSL='gSM' gSN='gSO' gSP='gSQ' gSR='gSS' gST='gSU' gSV='gSW' gSX='gSY' gSZ='gTa' gTb='gTc' gTd='gTe' gTf='gTg' gTh='gTi' gTj='gTk' gTl='gTm' gTn='gTo' gTp='gTq' gTr='gTs' gTt='gTu' gTv='gTw' gTx='gTy' gTz='gTA' gTB='gTC' gTD='gTE' gTF='gTG' gTH='gTI' gTJ='gTK' gTL='gTM' gTN='gTO' gTP='gTQ' gTR='gTS' gTT='gTU' gTV='gTW' gTX='gTY' gTZ='gUa' gUb='gUc' gUd='gUe' gUf='gUg' gUh='gUi' gUj='gUk' gUl='gUm' gUn='gUo' gUp='gUq' gUr='gUs' gUt='gUu' gUv='gUw' gUx='gUy' gUz='gUA' gUB='gUC' gUD='gUE' gUF='gUG' gUH='gUI' gUJ='gUK' gUL='gUM' gUN='gUO' gUP='gUQ' gUR='gUS' gUT='gUU' gUV='gUW' gUX='gUY' gUZ='gVa' gVb='gVc' gVd='gVe' gVf='gVg' gVh='gVi' gVj='gVk' gVl='gVm' gVn='gVo' gVp='gVq' gVr='gVs' gVt='gVu' gVv='gVw' gVx='gVy' gVz='gVA' gVB='gVC' gVD='gVE' gVF='gVG' gVH='gVI' gVJ='gVK' gVL='gVM' gVN='gVO' gVP='gVQ' gVR='gVS' gVT='gVU' gVV='gVW' gVX='gVY' gVZ='gWa' gWb='gWc' gWd='gWe' gWf='gWg' gWh='gWi' gWj='gWk' gWl='gWm' gWn='gWo' gWp='gWq' gWr='gWs' gWt='gWu' gWv='gWw' gWx='gWy' gWz='gWA' gWB='gWC' gWD='gWE' gWF='gWG' gWH='gWI' gWJ='gWK' gWL='gWM' gWN='gWO' gWP='gWQ' gWR='gWS' gWT='gWU' gWV='gWW' gWX='gWY' gWZ='gXa' gXb='gXc' gXd='gXe' gXf='gXg' gXh='gXi' gXj='gXk' gXl='gXm' gXn='gXo' gXp='gXq' gXr='gXs' gXt='gXu' gXv='gXw' gXx='gXy' gXz='gXA' gXB='gXC' gXD='gXE' gXF='gXG' gXH='gXI' gXJ='gXK' gXL='gXM' gXN='gXO' gXP='gXQ' gXR='gXS' gXT='gXU' gXV='gXW' gXX='gXY' gXZ='gYa' gYb='gYc' gYd='gYe' gYf='gYg' gYh='gYi' gYj='gYk' gYl='gYm' gYn='gYo' gYp='gYq' gYr='gYs' gYt='gYu' gYv='gYw' gYx='gYy' gYz='gYA' gYB='gYC' gYD='gYE' gYF='gYG' gYH='gYI' gYJ='gYK' gYL='gYM' gYN='gYO' gYP='gYQ' gYR='gYS' gYT='gYU' gYV='gYW' gYX='gYY' gYZ='gZa' gZb='gZc' gZd='gZe' gZf='gZg' gZh='gZi' gZj='gZk' gZl='gZm' gZn='gZo' gZp='gZq' gZr='gZs' gZt='gZu' gZv='gZw' gZx='gZy' gZz='gZA' gZB='gZC' gZD='gZE' gZF='gZG' gZH='gZI' gZJ='gZK' gZL='gZM' gZN='gZO' gZP='gZQ' gZR='gZS' gZT='gZU' gZV='gZW' gZX='gZY' gZZ='haa' hab='hac' had='hae' haf='hag' hah='hai' haj='hak' hal='ham' han='hao' hap='haq' har='has' hat='hau' hav='haw' hax='hay' haz='haA' haB='haC' haD='haE' haF='haG' haH='haI' haJ='haK' haL='haM' haN='haO' haP='haQ' haR='haS' haT='haU' haV='haW' haX='haY' haZ='hba' hbb='hbc' hbd='hbe' hbf='hbg' hbh='hbi' hbj='hbk' hbl='hbm' hbn='hbo' hbp='hbq' hbr='hbs' hbt='hbu' hbv='hbw' hbx='hby' hbz='hbA' hbB='hbC' hbD='hbE' hbF='hbG' hbH='hbI' hbJ='hbK' hbL='hbM' hbN='hbO' hbP='hbQ' hbR='hbS' hbT='hbU' hbV='hbW' hbX='hbY' hbZ='hca' hcb='hcc' hcd='hce' hcf='hcg' hch='hci' hcj='hck' hcl='hcm' hcn='hco' hcp='hcq' hcr='hcs' hct='hcu' hcv='hcw' hcx='hcy' hcz='hcA' hcB='hcC' hcD='hcE' hcF='hcG' hcH='hcI' hcJ='hcK' hcL='hcM' hcN='hcO' hcP='hcQ' hcR='hcS' hcT='hcU' hcV='hcW' hcX='hcY' hcZ='hda' hdb='hdc' hdd='hde' hdf='hdg' hdh='hdi' hdj='hdk' hdl='hdm' hdn='hdo' hdp='hdq' hdr='hds' hdt='hdu' hdv='hdw' hdx='hdy' hdz='hdA' hdB='hdC' hdD='hdE' hdF='hdG' hdH='hdI' hdJ='hdK' hdL='hdM' hdN='hdO' hdP='hdQ' hdR='hdS' hdT='hdU' hdV='hdW' hdX='hdY' hdZ='hea' heb='hec' hed='hee' hef='heg' heh='hei' hej='hek' hel='hem' hen='heo' hep='heq' her='hes' het='heu' hev='hew' hex='hey' hez='heA' heB='heC' heD='heE' heF='heG' heH='heI' heJ='heK' heL='heM' heN='heO' heP='heQ' heR='heS' heT='heU' heV='heW' heX='heY' heZ='hfa' hfb='hfc' hfd='hfe' hff='hfg' hfh='hfi' hfj='hfk' hfl='hfm' hfn='hfo' hfp='hfq' hfr='hfs' hft='hfu' hfv='hfw' hfx='hfy' hfz='hfA' hfB='hfC' hfD='hfE' hfF='hfG' hfH='hfI' hfJ='hfK' hfL='hfM' hfN='hfO' hfP='hfQ' hfR='hfS' hfT='hfU' hfV='hfW' hfX='hfY' hfZ='hga' hgb='hgc' hgd='hge' hgf='hgg' hgh='hgi' hgj='hgk' hgl='hgm' hgn='hgo' hgp='hgq' hgr='hgs' hgt='hgu' hgv='hgw' hgx='hgy' hgz='hgA' hgB='hgC' hgD='hgE' hgF='hgG' hgH='hgI' hgJ='hgK' hgL='hgM' hgN='hgO' hgP='hgQ' hgR='hgS' hgT='hgU' hgV='hgW' hgX='hgY' hgZ='hha' hhb='hhc' hhd='hhe' hhf='hhg' hhh='hhi' hhj='hhk' hhl='hhm' hhn='hho' hhp='hhq' hhr='hhs' hht='hhu' hhv='hhw' hhx='hhy' hhz='hhA' hhB='hhC' hhD='hhE' hhF='hhG' hhH='hhI' hhJ='hhK' hhL='hhM' hhN='hhO' hhP='hhQ' hhR='hhS' hhT='hhU' hhV='hhW' hhX='hhY' hhZ='hia' hib='hic' hid='hie' hif='hig' hih='hii' hij='hik' hil='him' hin='hio' hip='hiq' hir='his' hit='hiu' hiv='hiw' hix='hiy' hiz='hiA' hiB='hiC' hiD='hiE' hiF='hiG' hiH='hiI' hiJ='hiK' hiL='hiM' hiN='hiO' hiP='hiQ' hiR='hiS' hiT='hiU' hiV='hiW' hiX='hiY' hiZ='hja' hjb='hjc' hjd='hje' hjf='hjg' hjh='hji' hjj='hjk' hjl='hjm' hjn='hjo' hjp='hjq' hjr='hjs' hjt='hju' hjv='hjw' hjx='hjy' hjz='hjA' hjB='hjC' hjD='hjE' hjF='hjG' hjH='hjI' hjJ='hjK' hjL='hjM' hjN='hjO' hjP='hjQ' hjR='hjS' hjT='hjU' hjV='hjW' hjX='hjY' hjZ='hka' hkb='hkc' hkd='hke' hkf='hkg' hkh='hki' hkj='hkk' hkl='hkm' hkn='hko' hkp='hkq' hkr='hks' hkt='hku' hkv='hkw' hkx='hky' hkz='hkA' hkB='hkC' hkD='hkE' hkF='hkG' hkH='hkI' hkJ='hkK' hkL='hkM' hkN='hkO' hkP='hkQ' hkR='hkS' hkT='hkU' hkV='hkW' hkX='hkY' hkZ='hla' hlb='hlc' hld='hle' hlf='hlg' hlh='hli' hlj='hlk' hll='hlm' hln='hlo' hlp='hlq' hlr='hls' hlt='hlu' hlv='hlw' hlx='hly' hlz='hlA' hlB='hlC' hlD='hlE' hlF='hlG' hlH='hlI' hlJ='hlK' hlL='hlM' hlN='hlO' hlP='hlQ' hlR='hlS' hlT='hlU' hlV='hlW' hlX='hlY' hlZ='hma' hmb='hmc' hmd='hme' hmf='hmg' hmh='hmi' hmj='hmk' hml='hmm' hmn='hmo' hmp='hmq' hmr='hms' hmt='hmu' hmv='hmw' hmx='hmy' hmz='hmA' hmB='hmC' hmD='hmE' hmF='hmG' hmH='hmI' hmJ='hmK' hmL='hmM' hmN='hmO' hmP='hmQ' hmR='hmS' hmT='hmU' hmV='hmW' hmX='hmY' hmZ='hna' hnb='hnc' hnd='hne' hnf='hng' hnh='hni' hnj='hnk' hnl='hnm' hnn='hno' hnp='hnq' hnr='hns' hnt='hnu' hnv='hnw' hnx='hny' hnz='hnA' hnB='hnC' hnD='hnE' hnF='hnG' hnH='hnI' hnJ='hnK' hnL='hnM' hnN='hnO' hnP='hnQ' hnR='hnS' hnT='hnU' hnV='hnW' hnX='hnY' hnZ='hoa' hob='hoc' hod='hoe' hof='hog' hoh='hoi' hoj='hok' hol='hom' hon='hoo' hop='hoq' hor='hos' hot='hou' hov='how' hox='hoy' hoz='hoA' hoB='hoC' hoD='hoE' hoF='hoG' hoH='hoI' hoJ='hoK' hoL='hoM' hoN='hoO' hoP='hoQ' hoR='hoS' hoT='hoU' hoV='hoW' hoX='hoY' hoZ='hpa' hpb='hpc' hpd='hpe' hpf='hpg' hph='hpi' hpj='hpk' hpl='hpm' hpn='hpo' hpp='hpq' hpr='hps' hpt='hpu' hpv='hpw' hpx='hpy' hpz='hpA' hpB='hpC' hpD='hpE' hpF='hpG' hpH='hpI' hpJ='hpK' hpL='hpM' hpN='hpO' hpP='hpQ' hpR='hpS' hpT='hpU' hpV='hpW' hpX='hpY' hpZ='hqa' hqb='hqc' hqd='hqe' hqf='hqg' hqh='hqi' hqj='hqk' hql='hqm' hqn='hqo' hqp='hqq' hqr='hqs' hqt='hqu' hqv='hqw' hqx='hqy' hqz='hqA' hqB='hqC' hqD='hqE' hqF='hqG' hqH='hqI' hqJ='hqK' hqL='hqM' hqN='hqO' hqP='hqQ' hqR='hqS' hqT='hqU' hqV='hqW' hqX='hqY' hqZ='hra' hrb='hrc' hrd='hre' hrf='hrg' hrh='hri' hrj='hrk' hrl='hrm' hrn='hro' hrp='hrq' hrr='hrs' hrt='hru' hrv='hrw' hrx='hry' hrz='hrA' hrB='hrC' hrD='hrE' hrF='hrG' hrH='hrI' hrJ='hrK' hrL='hrM' hrN='hrO' hrP='hrQ' hrR='hrS' hrT='hrU' hrV='hrW' hrX='hrY' hrZ='hsa' hsb='hsc' hsd='hse' hsf='hsg' hsh='hsi' hsj='hsk' hsl='hsm' hsn='hso' hsp='hsq' hsr='hss' hst='hsu' hsv='hsw' hsx='hsy' hsz='hsA' hsB='hsC' hsD='hsE' hsF='hsG' hsH='hsI' hsJ='hsK' hsL='hsM' hsN='hsO' hsP='hsQ' hsR='hsS' hsT='hsU' hsV='hsW' hsX='hsY' hsZ='hta' htb='htc' htd='hte' htf='htg' hth='hti' htj='htk' htl='htm' htn='hto' htp='htq' htr='hts' htt='htu' htv='htw' htx='hty' htz='htA' htB='htC' htD='htE' htF='htG' htH='htI' htJ='htK' htL='htM' htN='htO' htP='htQ' htR='htS' htT='htU' htV='htW' htX='htY' htZ='hua' hub='huc' hud='hue' huf='hug' huh='hui' huj='huk' hul='hum' hun='huo' hup='huq' hur='hus' hut='huu' huv='huw' hux='huy' huz='huA' huB='huC' huD='huE' huF='huG' huH='huI' huJ='huK' huL='huM' huN='huO' huP='huQ' huR='huS' huT='huU' huV='huW' huX='huY' huZ='hva' hvb='hvc' hvd='hve' hvf='hvg' hvh='hvi' hvj='hvk' hvl='hvm' hvn='hvo' hvp='hvq' hvr='hvs' hvt='hvu' hvv='hvw' hvx='hvy' hvz='hvA' hvB='hvC' hvD='hvE' hvF='hvG' hvH='hvI' hvJ='hvK' hvL='hvM' hvN='hvO' hvP='hvQ' hvR='hvS' hvT='hvU' hvV='hvW' hvX='hvY' hvZ='hwa' hwb='hwc' hwd='hwe' hwf='hwg' hwh='hwi' hwj='hwk' hwl='hwm' hwn='hwo' hwp='hwq' hwr='hws' hwt='hwu' hwv='hww' hwx='hwy' hwz='hwA' hwB='hwC' hwD='hwE' hwF='hwG' hwH='hwI' hwJ='hwK' hwL='hwM' hwN='hwO' hwP='hwQ' hwR='hwS' hwT='hwU' hwV='hwW' hwX='hwY' hwZ='hxa' hxb='hxc' hxd='hxe' hxf='hxg' hxh='hxi' hxj='hxk' hxl='hxm' hxn='hxo' hxp='hxq' hxr='hxs' hxt='hxu' hxv='hxw' hxx='hxy' hxz='hxA' hxB='hxC' hxD='hxE' hxF='hxG' hxH='hxI' hxJ='hxK' hxL='hxM' hxN='hxO' hxP='hxQ' hxR='hxS' hxT='hxU' hxV='hxW' hxX='hxY' hxZ='hya' hyb='hyc' hyd='hye' hyf='hyg' hyh='hyi' hyj='hyk' hyl='hym' hyn='hyo' hyp='hyq' hyr='hys' hyt='hyu' hyv='hyw' hyx='hyy' hyz='hyA' hyB='hyC' hyD='hyE' hyF='hyG' hyH='hyI' hyJ='hyK' hyL='hyM' hyN='hyO' hyP='hyQ' hyR='hyS' hyT='hyU' hyV='hyW' hyX='hyY' hyZ='hza' hzb='hzc' hzd='hze' hzf='hzg' hzh='hzi' hzj='hzk' hzl='hzm' hzn='hzo' hzp='hzq' hzr='hzs' hzt='hzu' hzv='hzw' hzx='hzy' hzz='hzA' hzB='hzC' hzD='hzE' hzF='hzG' hzH='hzI' hzJ='hzK' hzL='hzM' hzN='hzO' hzP='hzQ' hzR='hzS' hzT='hzU' hzV='hzW' hzX='hzY' hzZ='hAa' hAb='hAc' hAd='hAe' hAf='hAg' hAh='hAi' hAj='hAk' hAl='hAm' hAn='hAo' hAp='hAq' hAr='hAs' hAt='hAu' hAv='hAw' hAx='hAy' hAz='hAA' hAB='hAC' hAD='hAE' hAF='hAG' hAH='hAI' hAJ='hAK' hAL='hAM' hAN='hAO' hAP='hAQ' hAR='hAS' hAT='hAU' hAV='hAW' hAX='hAY' hAZ='hBa' hBb='hBc' hBd='hBe' hBf='hBg' hBh='hBi' hBj='hBk' hBl='hBm' hBn='hBo' hBp='hBq' hBr='hBs' hBt='hBu' hBv='hBw' hBx='hBy' hBz='hBA' hBB='hBC' hBD='hBE' hBF='hBG' hBH='hBI' hBJ='hBK' hBL='hBM' hBN='hBO' hBP='hBQ' hBR='hBS' hBT='hBU' hBV='hBW' hBX='hBY' hBZ='hCa' hCb='hCc' hCd='hCe' hCf='hCg' hCh='hCi' hCj='hCk' hCl='hCm' hCn='hCo' hCp='hCq' hCr='hCs' hCt='hCu' hCv='hCw' hCx='hCy' hCz='hCA' hCB='hCC' hCD='hCE' hCF='hCG' hCH='hCI' hCJ='hCK' hCL='hCM' hCN='hCO' hCP='hCQ' hCR='hCS' hCT='hCU' hCV='hCW' hCX='hCY' hCZ='hDa' hDb='hDc' hDd='hDe' hDf='hDg' hDh='hDi' hDj='hDk' hDl='hDm' hDn='hDo' hDp='hDq' hDr='hDs' hDt='hDu' hDv='hDw' hDx='hDy' hDz='hDA' hDB='hDC' hDD='hDE' hDF='hDG' hDH='hDI' hDJ='hDK' hDL='hDM' hDN='hDO' hDP='hDQ' hDR='hDS' hDT='hDU' hDV='hDW' hDX='hDY' hDZ='hEa' hEb='hEc' hEd='hEe' hEf='hEg' hEh='hEi' hEj='hEk' hEl='hEm' hEn='hEo' hEp='hEq' hEr='hEs' hEt='hEu' hEv='hEw' hEx='hEy' hEz='hEA' hEB='hEC' hED='hEE' hEF='hEG' hEH='hEI' hEJ='hEK' hEL='hEM' hEN='hEO' hEP='hEQ' hER='hES' hET='hEU' hEV='hEW' hEX='hEY' hEZ='hFa' hFb='hFc' hFd='hFe' hFf='hFg' hFh='hFi' hFj='hFk' hFl='hFm' hFn='hFo' hFp='hFq' hFr='hFs' hFt='hFu' hFv='hFw' hFx='hFy' hFz='hFA' hFB='hFC' hFD='hFE' hFF='hFG' hFH='hFI' hFJ='hFK' hFL='hFM' hFN='hFO' hFP='hFQ' hFR='hFS' hFT='hFU' hFV='hFW' hFX='hFY' hFZ='hGa' hGb='hGc' hGd='hGe' hGf='hGg' hGh='hGi' hGj='hGk' hGl='hGm' hGn='hGo' hGp='hGq' hGr='hGs' hGt='hGu' hGv='hGw' hGx='hGy' hGz='hGA' hGB='hGC' hGD='hGE' hGF='hGG' hGH='hGI' hGJ='hGK' hGL='hGM' hGN='hGO' hGP='hGQ' hGR='hGS' hGT='hGU' hGV='hGW' hGX='hGY' hGZ='hHa' hHb='hHc' hHd='hHe' hHf='hHg' hHh='hHi' hHj='hHk' hHl='hHm' hHn='hHo' hHp='hHq' hHr='hHs' hHt='hHu' hHv='hHw' hHx='hHy' hHz='hHA' hHB='hHC' hHD='hHE' hHF='hHG' hHH='hHI' hHJ='hHK' hHL='hHM' hHN='hHO' hHP='hHQ' hHR='hHS' hHT='hHU' hHV='hHW' hHX='hHY' hHZ='hIa' hIb='hIc' hId='hIe' hIf='hIg' hIh='hIi' hIj='hIk' hIl='hIm' hIn='hIo' hIp='hIq' hIr='hIs' hIt='hIu' hIv='hIw' hIx='hIy' hIz='hIA' hIB='hIC' hID='hIE' hIF='hIG' hIH='hII' hIJ='hIK' hIL='hIM' hIN='hIO' hIP='hIQ' hIR='hIS' hIT='hIU' hIV='hIW' hIX='hIY' hIZ='hJa' hJb='hJc' hJd='hJe' hJf='hJg' hJh='hJi' hJj='hJk' hJl='hJm' hJn='hJo' hJp='hJq' hJr='hJs' hJt='hJu' hJv='hJw' hJx='hJy' hJz='hJA' hJB='hJC' hJD='hJE' hJF='hJG' hJH='hJI' hJJ='hJK' hJL='hJM' hJN='hJO' hJP='hJQ' hJR='hJS' hJT='hJU' hJV='hJW' hJX='hJY' hJZ='hKa' hKb='hKc' hKd='hKe' hKf='hKg' hKh='hKi' hKj='hKk' hKl='hKm' hKn='hKo' hKp='hKq' hKr='hKs' hKt='hKu' hKv='hKw' hKx='hKy' hKz='hKA' hKB='hKC' hKD='hKE' hKF='hKG' hKH='hKI' hKJ='hKK' hKL='hKM' hKN='hKO' hKP='hKQ' hKR='hKS' hKT='hKU' hKV='hKW' hKX='hKY' hKZ='hLa' hLb='hLc' hLd='hLe' hLf='hLg' hLh='hLi' hLj='hLk' hLl='hLm' hLn='hLo' hLp='hLq' hLr='hLs' hLt='hLu' hLv='hLw' hLx='hLy' hLz='hLA' hLB='hLC' hLD='hLE' hLF='hLG' hLH='hLI' hLJ='hLK' hLL='hLM' hLN='hLO' hLP='hLQ' hLR='hLS' hLT='hLU' hLV='hLW' hLX='hLY' hLZ='hMa' hMb='hMc' hMd='hMe' hMf='hMg' hMh='hMi' hMj='hMk' hMl='hMm' hMn='hMo' hMp='hMq' hMr='hMs' hMt='hMu' hMv='hMw' hMx='hMy' hMz='hMA' hMB='hMC' hMD='hME' hMF='hMG' hMH='hMI' hMJ='hMK' hML='hMM' hMN='hMO' hMP='hMQ' hMR='hMS' hMT='hMU' hMV='hMW' hMX='hMY' hMZ='hNa' hNb='hNc' hNd='hNe' hNf='hNg' hNh='hNi' hNj='hNk' hNl='hNm' hNn='hNo' hNp='hNq' hNr='hNs' hNt='hNu' hNv='hNw' hNx='hNy' hNz='hNA' hNB='hNC' hND='hNE' hNF='hNG' hNH='hNI' hNJ='hNK' hNL='hNM' hNN='hNO' hNP='hNQ' hNR='hNS' hNT='hNU' hNV='hNW' hNX='hNY' hNZ='hOa' hOb='hOc' hOd='hOe' hOf='hOg' hOh='hOi' hOj='hOk' hOl='hOm' hOn='hOo' hOp='hOq' hOr='hOs' hOt='hOu' hOv='hOw' hOx='hOy' hOz='hOA' hOB='hOC' hOD='hOE' hOF='hOG' hOH='hOI' hOJ='hOK' hOL='hOM' hON='hOO' hOP='hOQ' hOR='hOS' hOT='hOU' hOV='hOW' hOX='hOY' hOZ='hPa' hPb='hPc' hPd='hPe' hPf='hPg' hPh='hPi' hPj='hPk' hPl='hPm' hPn='hPo' hPp='hPq' hPr='hPs' hPt='hPu' hPv='hPw' hPx='hPy' hPz='hPA' hPB='hPC' hPD='hPE' hPF='hPG' hPH='hPI' hPJ='hPK' hPL='hPM' hPN='hPO' hPP='hPQ' hPR='hPS' hPT='hPU' hPV='hPW' hPX='hPY' hPZ='hQa' hQb='hQc' hQd='hQe' hQf='hQg' hQh='hQi' hQj='hQk' hQl='hQm' hQn='hQo' hQp='hQq' hQr='hQs' hQt='hQu' hQv='hQw' hQx='hQy' hQz='hQA' hQB='hQC' hQD='hQE' hQF='hQG' hQH='hQI' hQJ='hQK' hQL='hQM' hQN='hQO' hQP='hQQ' hQR='hQS' hQT='hQU' hQV='hQW' hQX='hQY' hQZ='hRa' hRb='hRc' hRd='hRe' hRf='hRg' hRh='hRi' hRj='hRk' hRl='hRm' hRn='hRo' hRp='hRq' hRr='hRs' hRt='hRu' hRv='hRw' hRx='hRy' hRz='hRA' hRB='hRC' hRD='hRE' hRF='hRG' hRH='hRI' hRJ='hRK' hRL='hRM' hRN='hRO' hRP='hRQ' hRR='hRS' hRT='hRU' hRV='hRW' hRX='hRY' hRZ='hSa' hSb='hSc' hSd='hSe' hSf='hSg' hSh='hSi' hSj='hSk' hSl='hSm' hSn='hSo' hSp='hSq' hSr='hSs' hSt='hSu' hSv='hSw' hSx='hSy' hSz='hSA' hSB='hSC' hSD='hSE' hSF='hSG' hSH='hSI' hSJ='hSK' hSL='hSM' hSN='hSO' hSP='hSQ' hSR='hSS' hST='hSU' hSV='hSW' hSX='hSY' hSZ='hTa' hTb='hTc' hTd='hTe' hTf='hTg' hTh='hTi' hTj='hTk' hTl='hTm' hTn='hTo' hTp='hTq' hTr='hTs' hTt='hTu' hTv='hTw' hTx='hTy' hTz='hTA' hTB='hTC' hTD='hTE' hTF='hTG' hTH='hTI' hTJ='hTK' hTL='hTM' hTN='hTO' hTP='hTQ' hTR='hTS' hTT='hTU' hTV='hTW' hTX='hTY' hTZ='hUa' hUb='hUc' hUd='hUe' hUf='hUg' hUh='hUi' hUj='hUk' hUl='hUm' hUn='hUo' hUp='hUq' hUr='hUs' hUt='hUu' hUv='hUw' hUx='hUy' hUz='hUA' hUB='hUC' hUD='hUE' hUF='hUG' hUH='hUI' hUJ='hUK' hUL='hUM' hUN='hUO' hUP='hUQ' hUR='hUS' hUT='hUU' hUV='hUW' hUX='hUY' hUZ='hVa' hVb='hVc' hVd='hVe' hVf='hVg' hVh='hVi' hVj='hVk' hVl='hVm' hVn='hVo' hVp='hVq' hVr='hVs' hVt='hVu' hVv='hVw' hVx='hVy' hVz='hVA' hVB='hVC' hVD='hVE' hVF='hVG' hVH='hVI' hVJ='hVK' hVL='hVM' hVN='hVO' hVP='hVQ' hVR='hVS' hVT='hVU' hVV='hVW' hVX='hVY' hVZ='hWa' hWb='hWc' hWd='hWe' hWf='hWg' hWh='hWi' hWj='hWk' hWl='hWm' hWn='hWo' hWp='hWq' hWr='hWs' hWt='hWu' hWv='hWw' hWx='hWy' hWz='hWA' hWB='hWC' hWD='hWE' hWF='hWG' hWH='hWI' hWJ='hWK' hWL='hWM' hWN='hWO' hWP='hWQ' hWR='hWS' hWT='hWU' hWV='hWW' hWX='hWY' hWZ='hXa' hXb='hXc' hXd='hXe' hXf='hXg' hXh='hXi' hXj='hXk' hXl='hXm' hXn='hXo' hXp='hXq' hXr='hXs' hXt='hXu' hXv='hXw' hXx='hXy' hXz='hXA' hXB='hXC' hXD='hXE' hXF='hXG' hXH='hXI' hXJ='hXK' hXL='hXM' hXN='hXO' hXP='hXQ' hXR='hXS' hXT='hXU' hXV='hXW' hXX='hXY' hXZ='hYa' hYb='hYc' hYd='hYe' hYf='hYg' hYh='hYi' hYj='hYk' hYl='hYm' hYn='hYo' hYp='hYq' hYr='hYs' hYt='hYu' hYv='hYw' hYx='hYy' hYz='hYA' hYB='hYC' hYD='hYE' hYF='hYG' hYH='hYI' hYJ='hYK' hYL='hYM' hYN='hYO' hYP='hYQ' hYR='hYS' hYT='hYU' hYV='hYW' hYX='hYY' hYZ='hZa' hZb='hZc' hZd='hZe' hZf='hZg' hZh='hZi' hZj='hZk' hZl='hZm' hZn='hZo' hZp='hZq' hZr='hZs' hZt='hZu' hZv='hZw' hZx='hZy' hZz='hZA' hZB='hZC' hZD='hZE' hZF='hZG' hZH='hZI' hZJ='hZK' hZL='hZM' hZN='hZO' hZP='hZQ' hZR='hZS' hZT='hZU' hZV='hZW' hZX='hZY' hZZ='iaa' iab='iac' iad='iae' iaf='iag' iah='iai' iaj='iak' ial='iam' ian='iao' iap='iaq' iar='ias' iat='iau' iav='iaw' iax='iay' iaz='iaA' iaB='iaC' iaD='iaE' iaF='iaG' iaH='iaI' iaJ='iaK' iaL='iaM' iaN='iaO' iaP='iaQ' iaR='iaS' iaT='iaU' iaV='iaW' iaX='iaY' iaZ='iba' ibb='ibc' ibd='ibe' ibf='ibg' ibh='ibi' ibj='ibk' ibl='ibm' ibn='ibo' ibp='ibq' ibr='ibs' ibt='ibu' ibv='ibw' ibx='iby' ibz='ibA' ibB='ibC' ibD='ibE' ibF='ibG' ibH='ibI' ibJ='ibK' ibL='ibM' ibN='ibO' ibP='ibQ' ibR='ibS' ibT='ibU' ibV='ibW' ibX='ibY' ibZ='ica' icb='icc' icd='ice' icf='icg' ich='ici' icj='ick' icl='icm' icn='ico' icp='icq' icr='ics' ict='icu' icv='icw' icx='icy' icz='icA' icB='icC' icD='icE' icF='icG' icH='icI' icJ='icK' icL='icM' icN='icO' icP='icQ' icR='icS' icT='icU' icV='icW' icX='icY' icZ='ida' idb='idc' idd='ide' idf='idg' idh='idi' idj='idk' idl='idm' idn='ido' idp='idq' idr='ids' idt='idu' idv='idw' idx='idy' idz='idA' idB='idC' idD='idE' idF='idG' idH='idI' idJ='idK' idL='idM' idN='idO' idP='idQ' idR='idS' idT='idU' idV='idW' idX='idY' idZ='iea' ieb='iec' ied='iee' ief='ieg' ieh='iei' iej='iek' iel='iem' ien='ieo' iep='ieq' ier='ies' iet='ieu' iev='iew' iex='iey' iez='ieA' ieB='ieC' ieD='ieE' ieF='ieG' ieH='ieI' ieJ='ieK' ieL='ieM' ieN='ieO' ieP='ieQ' ieR='ieS' ieT='ieU' ieV='ieW' ieX='ieY' ieZ='ifa' ifb='ifc' ifd='ife' iff='ifg' ifh='ifi' ifj='ifk' ifl='ifm' ifn='ifo' ifp='ifq' ifr='ifs' ift='ifu' ifv='ifw' ifx='ify' ifz='ifA' ifB='ifC' ifD='ifE' ifF='ifG' ifH='ifI' ifJ='ifK' ifL='ifM' ifN='ifO' ifP='ifQ' ifR='ifS' ifT='ifU' ifV='ifW' ifX='ifY' ifZ='iga' igb='igc' igd='ige' igf='igg' igh='igi' igj='igk' igl='igm' ign='igo' igp='igq' igr='igs' igt='igu' igv='igw' igx='igy' igz='igA' igB='igC' igD='igE' igF='igG' igH='igI' igJ='igK' igL='igM' igN='igO' igP='igQ' igR='igS' igT='igU' igV='igW' igX='igY' igZ='iha' ihb='ihc' ihd='ihe' ihf='ihg' ihh='ihi' ihj='ihk' ihl='ihm' ihn='iho' ihp='ihq' ihr='ihs' iht='ihu' ihv='ihw' ihx='ihy' ihz='ihA' ihB='ihC' ihD='ihE' ihF='ihG' ihH='ihI' ihJ='ihK' ihL='ihM' ihN='ihO' ihP='ihQ' ihR='ihS' ihT='ihU' ihV='ihW' ihX='ihY' ihZ='iia' iib='iic' iid='iie' iif='iig' iih='iii' iij='iik' iil='iim' iin='iio' iip='iiq' iir='iis' iit='iiu' iiv='iiw' iix='iiy' iiz='iiA' iiB='iiC' iiD='iiE' iiF='iiG' iiH='iiI' iiJ='iiK' iiL='iiM' iiN='iiO' iiP='iiQ' iiR='iiS' iiT='iiU' iiV='iiW' iiX='iiY' iiZ='ija' ijb='ijc' ijd='ije' ijf='ijg' ijh='iji' ijj='ijk' ijl='ijm' ijn='ijo' ijp='ijq' ijr='ijs' ijt='iju' ijv='ijw' ijx='ijy' ijz='ijA' ijB='ijC' ijD='ijE' ijF='ijG' ijH='ijI' ijJ='ijK' ijL='ijM' ijN='ijO' ijP='ijQ' ijR='ijS' ijT='ijU' ijV='ijW' ijX='ijY' ijZ='ika' ikb='ikc' ikd='ike' ikf='ikg' ikh='iki' ikj='ikk' ikl='ikm' ikn='iko' ikp='ikq' ikr='iks' ikt='iku' ikv='ikw' ikx='iky' ikz='ikA' ikB='ikC' ikD='ikE' ikF='ikG' ikH='ikI' ikJ='ikK' ikL='ikM' ikN='ikO' ikP='ikQ' ikR='ikS' ikT='ikU' ikV='ikW' ikX='ikY' ikZ='ila' ilb='ilc' ild='ile' ilf='ilg' ilh='ili' ilj='ilk' ill='ilm' iln='ilo' ilp='ilq' ilr='ils' ilt='ilu' ilv='ilw' ilx='ily' ilz='ilA' ilB='ilC' ilD='ilE' ilF='ilG' ilH='ilI' ilJ='ilK' ilL='ilM' ilN='ilO' ilP='ilQ' ilR='ilS' ilT='ilU' ilV='ilW' ilX='ilY' ilZ='ima' imb='imc' imd='ime' imf='img' imh='imi' imj='imk' iml='imm' imn='imo' imp='imq' imr='ims' imt='imu' imv='imw' imx='imy' imz='imA' imB='imC' imD='imE' imF='imG' imH='imI' imJ='imK' imL='imM' imN='imO' imP='imQ' imR='imS' imT='imU' imV='imW' imX='imY' imZ='ina' inb='inc' ind='ine' inf='ing' inh='ini' inj='ink' inl='inm' inn='ino' inp='inq' inr='ins' int='inu' inv='inw' inx='iny' inz='inA' inB='inC' inD='inE' inF='inG' inH='inI' inJ='inK' inL='inM' inN='inO' inP='inQ' inR='inS' inT='inU' inV='inW' inX='inY' inZ='ioa' iob='ioc' iod='ioe' iof='iog' ioh='ioi' ioj='iok' iol='iom' ion='ioo' iop='ioq' ior='ios' iot='iou' iov='iow' iox='ioy' ioz='ioA' ioB='ioC' ioD='ioE' ioF='ioG' ioH='ioI' ioJ='ioK' ioL='ioM' ioN='ioO' ioP='ioQ' ioR='ioS' ioT='ioU' ioV='ioW' ioX='ioY' ioZ='ipa' ipb='ipc' ipd='ipe' ipf='ipg' iph='ipi' ipj='ipk' ipl='ipm' ipn='ipo' ipp='ipq' ipr='ips' ipt='ipu' ipv='ipw' ipx='ipy' ipz='ipA' ipB='ipC' ipD='ipE' ipF='ipG' ipH='ipI' ipJ='ipK' ipL='ipM' ipN='ipO' ipP='ipQ' ipR='ipS' ipT='ipU' ipV='ipW' ipX='ipY' ipZ='iqa' iqb='iqc' iqd='iqe' iqf='iqg' iqh='iqi' iqj='iqk' iql='iqm' iqn='iqo' iqp='iqq' iqr='iqs' iqt='iqu' iqv='iqw' iqx='iqy' iqz='iqA' iqB='iqC' iqD='iqE' iqF='iqG' iqH='iqI' iqJ='iqK' iqL='iqM' iqN='iqO' iqP='iqQ' iqR='iqS' iqT='iqU' iqV='iqW' iqX='iqY' iqZ='ira' irb='irc' ird='ire' irf='irg' irh='iri' irj='irk' irl='irm' irn='iro' irp='irq' irr='irs' irt='iru' irv='irw' irx='iry' irz='irA' irB='irC' irD='irE' irF='irG' irH='irI' irJ='irK' irL='irM' irN='irO' irP='irQ' irR='irS' irT='irU' irV='irW' irX='irY' irZ='isa' isb='isc' isd='ise' isf='isg' ish='isi' isj='isk' isl='ism' isn='iso' isp='isq' isr='iss' ist='isu' isv='isw' isx='isy' isz='isA' isB='isC' isD='isE' isF='isG' isH='isI' isJ='isK' isL='isM' isN='isO' isP='isQ' isR='isS' isT='isU' isV='isW' isX='isY' isZ='ita' itb='itc' itd='ite' itf='itg' ith='iti' itj='itk' itl='itm' itn='ito' itp='itq' itr='its' itt='itu' itv='itw' itx='ity' itz='itA' itB='itC' itD='itE' itF='itG' itH='itI' itJ='itK' itL='itM' itN='itO' itP='itQ' itR='itS' itT='itU' itV='itW' itX='itY' itZ='iua' iub='iuc' iud='iue' iuf='iug' iuh='iui' iuj='iuk' iul='ium' iun='iuo' iup='iuq' iur='ius' iut='iuu' iuv='iuw' iux='iuy' iuz='iuA' iuB='iuC' iuD='iuE' iuF='iuG' iuH='iuI' iuJ='iuK' iuL='iuM' iuN='iuO' iuP='iuQ' iuR='iuS' iuT='iuU' iuV='iuW' iuX='iuY' iuZ='iva' ivb='ivc' ivd='ive' ivf='ivg' ivh='ivi' ivj='ivk' ivl='ivm' ivn='ivo' ivp='ivq' ivr='ivs' ivt='ivu' ivv='ivw' ivx='ivy' ivz='ivA' ivB='ivC' ivD='ivE' ivF='ivG' ivH='ivI' ivJ='ivK' ivL='ivM' ivN='ivO' ivP='ivQ' ivR='ivS' ivT='ivU' ivV='ivW' ivX='ivY' ivZ='iwa' iwb='iwc' iwd='iwe' iwf='iwg' iwh='iwi' iwj='iwk' iwl='iwm' iwn='iwo' iwp='iwq' iwr='iws' iwt='iwu' iwv='iww' iwx='iwy' iwz='iwA' iwB='iwC' iwD='iwE' iwF='iwG' iwH='iwI' iwJ='iwK' iwL='iwM' iwN='iwO' iwP='iwQ' iwR='iwS' iwT='iwU' iwV='iwW' iwX='iwY' iwZ='ixa' ixb='ixc' ixd='ixe' ixf='ixg' ixh='ixi' ixj='ixk' ixl='ixm' ixn='ixo' ixp='ixq' ixr='ixs' ixt='ixu' ixv='ixw' ixx='ixy' ixz='ixA' ixB='ixC' ixD='ixE' ixF='ixG' ixH='ixI' ixJ='ixK' ixL='ixM' ixN='ixO' ixP='ixQ' ixR='ixS' ixT='ixU' ixV='ixW' ixX='ixY' ixZ='iya' iyb='iyc' iyd='iye' iyf='iyg' iyh='iyi' iyj='iyk' iyl='iym' iyn='iyo' iyp='iyq' iyr='iys' iyt='iyu' iyv='iyw' iyx='iyy' iyz='iyA' iyB='iyC' iyD='iyE' iyF='iyG' iyH='iyI' iyJ='iyK' iyL='iyM' iyN='iyO' iyP='iyQ' iyR='iyS' iyT='iyU' iyV='iyW' iyX='iyY' iyZ='iza' izb='izc' izd='ize' izf='izg' izh='izi' izj='izk' izl='izm' izn='izo' izp='izq' izr='izs' izt='izu' izv='izw' izx='izy' izz='izA' izB='izC' izD='izE' izF='izG' izH='izI' izJ='izK' izL='izM' izN='izO' izP='izQ' izR='izS' izT='izU' izV='izW' izX='izY' izZ='iAa' iAb='iAc' iAd='iAe' iAf='iAg' iAh='iAi' iAj='iAk' iAl='iAm' iAn='iAo' iAp='iAq' iAr='iAs' iAt='iAu' iAv='iAw' iAx='iAy' iAz='iAA' iAB='iAC' iAD='iAE' iAF='iAG' iAH='iAI' iAJ='iAK' iAL='iAM' iAN='iAO' iAP='iAQ' iAR='iAS' iAT='iAU' iAV='iAW' iAX='iAY' iAZ='iBa' iBb='iBc' iBd='iBe' iBf='iBg' iBh='iBi' iBj='iBk' iBl='iBm' iBn='iBo' iBp='iBq' iBr='iBs' iBt='iBu' iBv='iBw' iBx='iBy' iBz='iBA' iBB='iBC' iBD='iBE' iBF='iBG' iBH='iBI' iBJ='iBK' iBL='iBM' iBN='iBO' iBP='iBQ' iBR='iBS' iBT='iBU' iBV='iBW' iBX='iBY' iBZ='iCa' iCb='iCc' iCd='iCe' iCf='iCg' iCh='iCi' iCj='iCk' iCl='iCm' iCn='iCo' iCp='iCq' iCr='iCs' iCt='iCu' iCv='iCw' iCx='iCy' iCz='iCA' iCB='iCC' iCD='iCE' iCF='iCG' iCH='iCI' iCJ='iCK' iCL='iCM' iCN='iCO' iCP='iCQ' iCR='iCS' iCT='iCU' iCV='iCW' iCX='iCY' iCZ='iDa' iDb='iDc' iDd='iDe' iDf='iDg' iDh='iDi' iDj='iDk' iDl='iDm' iDn='iDo' iDp='iDq' iDr='iDs' iDt='iDu' iDv='iDw' iDx='iDy' iDz='iDA' iDB='iDC' iDD='iDE' iDF='iDG' iDH='iDI' iDJ='iDK' iDL='iDM' iDN='iDO' iDP='iDQ' iDR='iDS' iDT='iDU' iDV='iDW' iDX='iDY' iDZ='iEa' iEb='iEc' iEd='iEe' iEf='iEg' iEh='iEi' iEj='iEk' iEl='iEm' iEn='iEo' iEp='iEq' iEr='iEs' iEt='iEu' iEv='iEw' iEx='iEy' iEz='iEA' iEB='iEC' iED='iEE' iEF='iEG' iEH='iEI' iEJ='iEK' iEL='iEM' iEN='iEO' iEP='iEQ' iER='iES' iET='iEU' iEV='iEW' iEX='iEY' iEZ='iFa' iFb='iFc' iFd='iFe' iFf='iFg' iFh='iFi' iFj='iFk' iFl='iFm' iFn='iFo' iFp='iFq' iFr='iFs' iFt='iFu' iFv='iFw' iFx='iFy' iFz='iFA' iFB='iFC' iFD='iFE' iFF='iFG' iFH='iFI' iFJ='iFK' iFL='iFM' iFN='iFO' iFP='iFQ' iFR='iFS' iFT='iFU' iFV='iFW' iFX='iFY' iFZ='iGa' iGb='iGc' iGd='iGe' iGf='iGg' iGh='iGi' iGj='iGk' iGl='iGm' iGn='iGo' iGp='iGq' iGr='iGs' iGt='iGu' iGv='iGw' iGx='iGy' iGz='iGA' iGB='iGC' iGD='iGE' iGF='iGG' iGH='iGI' iGJ='iGK' iGL='iGM' iGN='iGO' iGP='iGQ' iGR='iGS' iGT='iGU' iGV='iGW' iGX='iGY' iGZ='iHa' iHb='iHc' iHd='iHe' iHf='iHg' iHh='iHi' iHj='iHk' iHl='iHm' iHn='iHo' iHp='iHq' iHr='iHs' iHt='iHu' iHv='iHw' iHx='iHy' iHz='iHA' iHB='iHC' iHD='iHE' iHF='iHG' iHH='iHI' iHJ='iHK' iHL='iHM' iHN='iHO' iHP='iHQ' iHR='iHS' iHT='iHU' iHV='iHW' iHX='iHY' iHZ='iIa' iIb='iIc' iId='iIe' iIf='iIg' iIh='iIi' iIj='iIk' iIl='iIm' iIn='iIo' iIp='iIq' iIr='iIs' iIt='iIu' iIv='iIw' iIx='iIy' iIz='iIA' iIB='iIC' iID='iIE' iIF='iIG' iIH='iII' iIJ='iIK' iIL='iIM' iIN='iIO' iIP='iIQ' iIR='iIS' iIT='iIU' iIV='iIW' iIX='iIY' iIZ='iJa' iJb='iJc' iJd='iJe' iJf='iJg' iJh='iJi' iJj='iJk' iJl='iJm' iJn='iJo' iJp='iJq' iJr='iJs' iJt='iJu' iJv='iJw' iJx='iJy' iJz='iJA' iJB='iJC' iJD='iJE' iJF='iJG' iJH='iJI' iJJ='iJK' iJL='iJM' iJN='iJO' iJP='iJQ' iJR='iJS' iJT='iJU' iJV='iJW' iJX='iJY' iJZ='iKa' iKb='iKc' iKd='iKe' iKf='iKg' iKh='iKi' iKj='iKk' iKl='iKm' iKn='iKo' iKp='iKq' iKr='iKs' iKt='iKu' iKv='iKw' iKx='iKy' iKz='iKA' iKB='iKC' iKD='iKE' iKF='iKG' iKH='iKI' iKJ='iKK' iKL='iKM' iKN='iKO' iKP='iKQ' iKR='iKS' iKT='iKU' iKV='iKW' iKX='iKY' iKZ='iLa' iLb='iLc' iLd='iLe' iLf='iLg' iLh='iLi' iLj='iLk' iLl='iLm' iLn='iLo' iLp='iLq' iLr='iLs' iLt='iLu' iLv='iLw' iLx='iLy' iLz='iLA' iLB='iLC' iLD='iLE' iLF='iLG' iLH='iLI' iLJ='iLK' iLL='iLM' iLN='iLO' iLP='iLQ' iLR='iLS' iLT='iLU' iLV='iLW' iLX='iLY' iLZ='iMa' iMb='iMc' iMd='iMe' iMf='iMg' iMh='iMi' iMj='iMk' iMl='iMm' iMn='iMo' iMp='iMq' iMr='iMs' iMt='iMu' iMv='iMw' iMx='iMy' iMz='iMA' iMB='iMC' iMD='iME' iMF='iMG' iMH='iMI' iMJ='iMK' iML='iMM' iMN='iMO' iMP='iMQ' iMR='iMS' iMT='iMU' iMV='iMW' iMX='iMY' iMZ='iNa' iNb='iNc' iNd='iNe' iNf='iNg' iNh='iNi' iNj='iNk' iNl='iNm' iNn='iNo' iNp='iNq' iNr='iNs' iNt='iNu' iNv='iNw' iNx='iNy' iNz='iNA' iNB='iNC' iND='iNE' iNF='iNG' iNH='iNI' iNJ='iNK' iNL='iNM' iNN='iNO' iNP='iNQ' iNR='iNS' iNT='iNU' iNV='iNW' iNX='iNY' iNZ='iOa' iOb='iOc' iOd='iOe' iOf='iOg' iOh='iOi' iOj='iOk' iOl='iOm' iOn='iOo' iOp='iOq' iOr='iOs' iOt='iOu' iOv='iOw' iOx='iOy' iOz='iOA' iOB='iOC' iOD='iOE' iOF='iOG' iOH='iOI' iOJ='iOK' iOL='iOM' iON='iOO' iOP='iOQ' iOR='iOS' iOT='iOU' iOV='iOW' iOX='iOY' iOZ='iPa' iPb='iPc' iPd='iPe' iPf='iPg' iPh='iPi' iPj='iPk' iPl='iPm' iPn='iPo' iPp='iPq' iPr='iPs' iPt='iPu' iPv='iPw' iPx='iPy' iPz='iPA' iPB='iPC' iPD='iPE' iPF='iPG' iPH='iPI' iPJ='iPK' iPL='iPM' iPN='iPO' iPP='iPQ' iPR='iPS' iPT='iPU' iPV='iPW' iPX='iPY' iPZ='iQa' iQb='iQc' iQd='iQe' iQf='iQg' iQh='iQi' iQj='iQk' iQl='iQm' iQn='iQo' iQp='iQq' iQr='iQs' iQt='iQu' iQv='iQw' iQx='iQy' iQz='iQA' iQB='iQC' iQD='iQE' iQF='iQG' iQH='iQI' iQJ='iQK' iQL='iQM' iQN='iQO' iQP='iQQ' iQR='iQS' iQT='iQU' iQV='iQW' iQX='iQY' iQZ='iRa' iRb='iRc' iRd='iRe' iRf='iRg' iRh='iRi' iRj='iRk' iRl='iRm' iRn='iRo' iRp='iRq' iRr='iRs' iRt='iRu' iRv='iRw' iRx='iRy' iRz='iRA' iRB='iRC' iRD='iRE' iRF='iRG' iRH='iRI' iRJ='iRK' iRL='iRM' iRN='iRO' iRP='iRQ' iRR='iRS' iRT='iRU' iRV='iRW' iRX='iRY' iRZ='iSa' iSb='iSc' iSd='iSe' iSf='iSg' iSh='iSi' iSj='iSk' iSl='iSm' iSn='iSo' iSp='iSq' iSr='iSs' iSt='iSu' iSv='iSw' iSx='iSy' iSz='iSA' iSB='iSC' iSD='iSE' iSF='iSG' iSH='iSI' iSJ='iSK' iSL='iSM' iSN='iSO' iSP='iSQ' iSR='iSS' iST='iSU' iSV='iSW' iSX='iSY' iSZ='iTa' iTb='iTc' iTd='iTe' iTf='iTg' iTh='iTi' iTj='iTk' iTl='iTm' iTn='iTo' iTp='iTq' iTr='iTs' iTt='iTu' iTv='iTw' iTx='iTy' iTz='iTA' iTB='iTC' iTD='iTE' iTF='iTG' iTH='iTI' iTJ='iTK' iTL='iTM' iTN='iTO' iTP='iTQ' iTR='iTS' iTT='iTU' iTV='iTW' iTX='iTY' iTZ='iUa' iUb='iUc' iUd='iUe' iUf='iUg' iUh='iUi' iUj='iUk' iUl='iUm' iUn='iUo' iUp='iUq' iUr='iUs' iUt='iUu' iUv='iUw' iUx='iUy' iUz='iUA' iUB='iUC' iUD='iUE' iUF='iUG' iUH='iUI' iUJ='iUK' iUL='iUM' iUN='iUO' iUP='iUQ' iUR='iUS' iUT='iUU' iUV='iUW' iUX='iUY' iUZ='iVa' iVb='iVc' iVd='iVe' iVf='iVg' iVh='iVi' iVj='iVk' iVl='iVm' iVn='iVo' iVp='iVq' iVr='iVs' iVt='iVu' iVv='iVw' iVx='iVy' iVz='iVA' iVB='iVC' iVD='iVE' iVF='iVG' iVH='iVI' iVJ='iVK' iVL='iVM' iVN='iVO' iVP='iVQ' iVR='iVS' iVT='iVU' iVV='iVW' iVX='iVY' iVZ='iWa' iWb='iWc' iWd='iWe' iWf='iWg' iWh='iWi' iWj='iWk' iWl='iWm' iWn='iWo' iWp='iWq' iWr='iWs' iWt='iWu' iWv='iWw' iWx='iWy' iWz='iWA' iWB='iWC' iWD='iWE' iWF='iWG' iWH='iWI' iWJ='iWK' iWL='iWM' iWN='iWO' iWP='iWQ' iWR='iWS' iWT='iWU' iWV='iWW' iWX='iWY' iWZ='iXa' iXb='iXc' iXd='iXe' iXf='iXg' iXh='iXi' iXj='iXk' iXl='iXm' iXn='iXo' iXp='iXq' iXr='iXs' iXt='iXu' iXv='iXw' iXx='iXy' iXz='iXA' iXB='iXC' iXD='iXE' iXF='iXG' iXH='iXI' iXJ='iXK' iXL='iXM' iXN='iXO' iXP='iXQ' iXR='iXS' iXT='iXU' iXV='iXW' iXX='iXY' iXZ='iYa' iYb='iYc' iYd='iYe' iYf='iYg' iYh='iYi' iYj='iYk' iYl='iYm' iYn='iYo' iYp='iYq' iYr='iYs' iYt='iYu' iYv='iYw' iYx='iYy' iYz='iYA' iYB='iYC' iYD='iYE' iYF='iYG' iYH='iYI' iYJ='iYK' iYL='iYM' iYN='iYO' iYP='iYQ' iYR='iYS' iYT='iYU' iYV='iYW' iYX='iYY' iYZ='iZa' iZb='iZc' iZd='iZe' iZf='iZg' iZh='iZi' iZj='iZk' iZl='iZm' iZn='iZo' iZp='iZq' iZr='iZs' iZt='iZu' iZv='iZw' iZx='iZy' iZz='iZA' iZB='iZC' iZD='iZE' iZF='iZG' iZH='iZI' iZJ='iZK' iZL='iZM' iZN='iZO' iZP='iZQ' iZR='iZS' iZT='iZU' iZV='iZW' iZX='iZY' iZZ='jaa' jab='jac' jad='jae' jaf='jag' jah='jai' jaj='jak' jal='jam' jan='jao' jap='jaq' jar='jas' jat='jau' jav='jaw' jax='jay' jaz='jaA' jaB='jaC' jaD='jaE' jaF='jaG' jaH='jaI' jaJ='jaK' jaL='jaM' jaN='jaO' jaP='jaQ' jaR='jaS' jaT='jaU' jaV='jaW' jaX='jaY' jaZ='jba' jbb='jbc' jbd='jbe' jbf='jbg' jbh='jbi' jbj='jbk' jbl='jbm' jbn='jbo' jbp='jbq' jbr='jbs' jbt='jbu' jbv='jbw' jbx='jby' jbz='jbA' jbB='jbC' jbD='jbE' jbF='jbG' jbH='jbI' jbJ='jbK' jbL='jbM' jbN='jbO' jbP='jbQ' jbR='jbS' jbT='jbU' jbV='jbW' jbX='jbY' jbZ='jca' jcb='jcc' jcd='jce' jcf='jcg' jch='jci' jcj='jck' jcl='jcm' jcn='jco' jcp='jcq' jcr='jcs' jct='jcu' jcv='jcw' jcx='jcy' jcz='jcA' jcB='jcC' jcD='jcE' jcF='jcG' jcH='jcI' jcJ='jcK' jcL='jcM' jcN='jcO' jcP='jcQ' jcR='jcS' jcT='jcU' jcV='jcW' jcX='jcY' jcZ='jda' jdb='jdc' jdd='jde' jdf='jdg' jdh='jdi' jdj='jdk' jdl='jdm' jdn='jdo' jdp='jdq' jdr='jds' jdt='jdu' jdv='jdw' jdx='jdy' jdz='jdA' jdB='jdC' jdD='jdE' jdF='jdG' jdH='jdI' jdJ='jdK' jdL='jdM' jdN='jdO' jdP='jdQ' jdR='jdS' jdT='jdU' jdV='jdW' jdX='jdY' jdZ='jea' jeb='jec' jed='jee' jef='jeg' jeh='jei' jej='jek' jel='jem' jen='jeo' jep='jeq' jer='jes' jet='jeu' jev='jew' jex='jey' jez='jeA' jeB='jeC' jeD='jeE' jeF='jeG' jeH='jeI' jeJ='jeK' jeL='jeM' jeN='jeO' jeP='jeQ' jeR='jeS' jeT='jeU' jeV='jeW' jeX='jeY' jeZ='jfa' jfb='jfc' jfd='jfe' jff='jfg' jfh='jfi' jfj='jfk' jfl='jfm' jfn='jfo' jfp='jfq' jfr='jfs' jft='jfu' jfv='jfw' jfx='jfy' jfz='jfA' jfB='jfC' jfD='jfE' jfF='jfG' jfH='jfI' jfJ='jfK' jfL='jfM' jfN='jfO' jfP='jfQ' jfR='jfS' jfT='jfU' jfV='jfW' jfX='jfY' jfZ='jga' jgb='jgc' jgd='jge' jgf='jgg' jgh='jgi' jgj='jgk' jgl='jgm' jgn='jgo' jgp='jgq' jgr='jgs' jgt='jgu' jgv='jgw' jgx='jgy' jgz='jgA' jgB='jgC' jgD='jgE' jgF='jgG' jgH='jgI' jgJ='jgK' jgL='jgM' jgN='jgO' jgP='jgQ' jgR='jgS' jgT='jgU' jgV='jgW' jgX='jgY' jgZ='jha' jhb='jhc' jhd='jhe' jhf='jhg' jhh='jhi' jhj='jhk' jhl='jhm' jhn='jho' jhp='jhq' jhr='jhs' jht='jhu' jhv='jhw' jhx='jhy' jhz='jhA' jhB='jhC' jhD='jhE' jhF='jhG' jhH='jhI' jhJ='jhK' jhL='jhM' jhN='jhO' jhP='jhQ' jhR='jhS' jhT='jhU' jhV='jhW' jhX='jhY' jhZ='jia' jib='jic' jid='jie' jif='jig' jih='jii' jij='jik' jil='jim' jin='jio' jip='jiq' jir='jis' jit='jiu' jiv='jiw' jix='jiy' jiz='jiA' jiB='jiC' jiD='jiE' jiF='jiG' jiH='jiI' jiJ='jiK' jiL='jiM' jiN='jiO' jiP='jiQ' jiR='jiS' jiT='jiU' jiV='jiW' jiX='jiY' jiZ='jja' jjb='jjc' jjd='jje' jjf='jjg' jjh='jji' jjj='jjk' jjl='jjm' jjn='jjo' jjp='jjq' jjr='jjs' jjt='jju' jjv='jjw' jjx='jjy' jjz='jjA' jjB='jjC' jjD='jjE' jjF='jjG' jjH='jjI' jjJ='jjK' jjL='jjM' jjN='jjO' jjP='jjQ' jjR='jjS' jjT='jjU' jjV='jjW' jjX='jjY' jjZ='jka' jkb='jkc' jkd='jke' jkf='jkg' jkh='jki' jkj='jkk' jkl='jkm' jkn='jko' jkp='jkq' jkr='jks' jkt='jku' jkv='jkw' jkx='jky' jkz='jkA' jkB='jkC' jkD='jkE' jkF='jkG' jkH='jkI' jkJ='jkK' jkL='jkM' jkN='jkO' jkP='jkQ' jkR='jkS' jkT='jkU' jkV='jkW' jkX='jkY' jkZ='jla' jlb='jlc' jld='jle' jlf='jlg' jlh='jli' jlj='jlk' jll='jlm' jln='jlo' jlp='jlq' jlr='jls' jlt='jlu' jlv='jlw' jlx='jly' jlz='jlA' jlB='jlC' jlD='jlE' jlF='jlG' jlH='jlI' jlJ='jlK' jlL='jlM' jlN='jlO' jlP='jlQ' jlR='jlS' jlT='jlU' jlV='jlW' jlX='jlY' jlZ='jma' jmb='jmc' jmd='jme' jmf='jmg' jmh='jmi' jmj='jmk' jml='jmm' jmn='jmo' jmp='jmq' jmr='jms' jmt='jmu' jmv='jmw' jmx='jmy' jmz='jmA' jmB='jmC' jmD='jmE' jmF='jmG' jmH='jmI' jmJ='jmK' jmL='jmM' jmN='jmO' jmP='jmQ' jmR='jmS' jmT='jmU' jmV='jmW' jmX='jmY' jmZ='jna' jnb='jnc' jnd='jne' jnf='jng' jnh='jni' jnj='jnk' jnl='jnm' jnn='jno' jnp='jnq' jnr='jns' jnt='jnu' jnv='jnw' jnx='jny' jnz='jnA' jnB='jnC' jnD='jnE' jnF='jnG' jnH='jnI' jnJ='jnK' jnL='jnM' jnN='jnO' jnP='jnQ' jnR='jnS' jnT='jnU' jnV='jnW' jnX='jnY' jnZ='joa' job='joc' jod='joe' jof='jog' joh='joi' joj='jok' jol='jom' jon='joo' jop='joq' jor='jos' jot='jou' jov='jow' jox='joy' joz='joA' joB='joC' joD='joE' joF='joG' joH='joI' joJ='joK' joL='joM' joN='joO' joP='joQ' joR='joS' joT='joU' joV='joW' joX='joY' joZ='jpa' jpb='jpc' jpd='jpe' jpf='jpg' jph='jpi' jpj='jpk' jpl='jpm' jpn='jpo' jpp='jpq' jpr='jps' jpt='jpu' jpv='jpw' jpx='jpy' jpz='jpA' jpB='jpC' jpD='jpE' jpF='jpG' jpH='jpI' jpJ='jpK' jpL='jpM' /><xsl:value-of select='ceiling(133715)'/><xsl:value-of select='ceiling(133716)'/><xsl:value-of select='ceiling(133717)'/><xsl:value-of select='ceiling(133718)'/></xsl:template>
+<xsl:template name='jpN' match="/jpO"><ceil jpP='jpQ' jpR='jpS' jpT='jpU' jpV='jpW' jpX='jpY' jpZ='jqa' jqb='jqc' jqd='jqe' jqf='jqg' jqh='jqi' jqj='jqk' jql='jqm' jqn='jqo' jqp='jqq' jqr='jqs' jqt='jqu' jqv='jqw' jqx='jqy' jqz='jqA' jqB='jqC' jqD='jqE' jqF='jqG' jqH='jqI' jqJ='jqK' jqL='jqM' jqN='jqO' jqP='jqQ' jqR='jqS' jqT='jqU' jqV='jqW' jqX='jqY' jqZ='jra' jrb='jrc' jrd='jre' jrf='jrg' jrh='jri' jrj='jrk' jrl='jrm' jrn='jro' jrp='jrq' jrr='jrs' jrt='jru' jrv='jrw' jrx='jry' jrz='jrA' jrB='jrC' jrD='jrE' jrF='jrG' jrH='jrI' jrJ='jrK' jrL='jrM' jrN='jrO' jrP='jrQ' jrR='jrS' jrT='jrU' jrV='jrW' jrX='jrY' jrZ='jsa' jsb='jsc' jsd='jse' jsf='jsg' jsh='jsi' jsj='jsk' jsl='jsm' jsn='jso' jsp='jsq' jsr='jss' jst='jsu' jsv='jsw' jsx='jsy' jsz='jsA' jsB='jsC' jsD='jsE' jsF='jsG' jsH='jsI' jsJ='jsK' jsL='jsM' jsN='jsO' jsP='jsQ' jsR='jsS' jsT='jsU' jsV='jsW' jsX='jsY' jsZ='jta' jtb='jtc' jtd='jte' jtf='jtg' jth='jti' jtj='jtk' jtl='jtm' jtn='jto' jtp='jtq' jtr='jts' jtt='jtu' jtv='jtw' jtx='jty' jtz='jtA' jtB='jtC' jtD='jtE' jtF='jtG' jtH='jtI' jtJ='jtK' /><xsl:value-of select='ceiling(1337)'/><xsl:value-of select='ceiling(133719)'/><xsl:value-of select='ceiling(133720)'/><jtL jtM='jtN' jtO='jtP' jtQ='jtR' jtS='jtT' jtU='jtV' jtW='jtX' jtY='jtZ' jua='jub' juc='jud' jue='juf' jug='juh' jui='juj' juk='jul' jum='jun' juo='jup' juq='jur' jus='jut' juu='juv' juw='jux' juy='juz' juA='juB' juC='juD' juE='juF' juG='juH' juI='juJ' juK='juL' juM='juN' juO='juP' juQ='juR' juS='juT' juU='juV' juW='juX' juY='juZ' jva='jvb' jvc='jvd' jve='jvf' jvg='jvh' jvi='jvj' jvk='jvl' jvm='jvn' jvo='jvp' jvq='jvr' jvs='jvt' jvu='jvv' jvw='jvx' jvy='jvz' jvA='jvB' jvC='jvD' jvE='jvF' jvG='jvH' jvI='jvJ' jvK='jvL' jvM='jvN' jvO='jvP' jvQ='jvR' jvS='jvT' jvU='jvV' jvW='jvX' jvY='jvZ' jwa='jwb' jwc='jwd' jwe='jwf' jwg='jwh' jwi='jwj' jwk='jwl' jwm='jwn' jwo='jwp' jwq='jwr' jws='jwt' jwu='jwv' jww='jwx' jwy='jwz' jwA='jwB' jwC='jwD' jwE='jwF' jwG='jwH' jwI='jwJ' jwK='jwL' jwM='jwN' jwO='jwP' jwQ='jwR' jwS='jwT' jwU='jwV' jwW='jwX' jwY='jwZ' jxa='jxb' jxc='jxd' jxe='jxf' jxg='jxh' jxi='jxj' jxk='jxl' jxm='jxn' jxo='jxp' jxq='jxr' jxs='jxt' jxu='jxv' jxw='jxx' jxy='jxz' jxA='jxB' jxC='jxD' jxE='jxF' jxG='jxH' jxI='jxJ' jxK='jxL' jxM='jxN' jxO='jxP' jxQ='jxR' jxS='jxT' jxU='jxV' jxW='jxX' jxY='jxZ' jya='jyb' jyc='jyd' jye='jyf' jyg='jyh' jyi='jyj' jyk='jyl' jym='jyn' jyo='jyp' jyq='jyr' jys='jyt' jyu='jyv' jyw='jyx' jyy='jyz' jyA='jyB' jyC='jyD' jyE='jyF' jyG='jyH' jyI='jyJ' jyK='jyL' jyM='jyN' jyO='jyP' jyQ='jyR' jyS='jyT' jyU='jyV' jyW='jyX' jyY='jyZ' jza='jzb' jzc='jzd' jze='jzf' jzg='jzh' jzi='jzj' jzk='jzl' jzm='jzn' jzo='jzp' jzq='jzr' jzs='jzt' jzu='jzv' jzw='jzx' jzy='jzz' jzA='jzB' jzC='jzD' jzE='jzF' jzG='jzH' jzI='jzJ' jzK='jzL' jzM='jzN' jzO='jzP' jzQ='jzR' jzS='jzT' jzU='jzV' jzW='jzX' jzY='jzZ' jAa='jAb' jAc='jAd' jAe='jAf' jAg='jAh' jAi='jAj' jAk='jAl' jAm='jAn' jAo='jAp' jAq='jAr' jAs='jAt' jAu='jAv' jAw='jAx' jAy='jAz' jAA='jAB' jAC='jAD' jAE='jAF' jAG='jAH' jAI='jAJ' jAK='jAL' jAM='jAN' jAO='jAP' jAQ='jAR' jAS='jAT' jAU='jAV' jAW='jAX' jAY='jAZ' jBa='jBb' jBc='jBd' jBe='jBf' jBg='jBh' jBi='jBj' jBk='jBl' jBm='jBn' jBo='jBp' jBq='jBr' jBs='jBt' jBu='jBv' jBw='jBx' jBy='jBz' jBA='jBB' jBC='jBD' jBE='jBF' jBG='jBH' jBI='jBJ' jBK='jBL' jBM='jBN' jBO='jBP' jBQ='jBR' jBS='jBT' jBU='jBV' jBW='jBX' jBY='jBZ' jCa='jCb' jCc='jCd' jCe='jCf' jCg='jCh' jCi='jCj' jCk='jCl' jCm='jCn' jCo='jCp' jCq='jCr' jCs='jCt' jCu='jCv' jCw='jCx' jCy='jCz' jCA='jCB' jCC='jCD' jCE='jCF' jCG='jCH' jCI='jCJ' jCK='jCL' jCM='jCN' jCO='jCP' jCQ='jCR' jCS='jCT' jCU='jCV' jCW='jCX' jCY='jCZ' jDa='jDb' jDc='jDd' jDe='jDf' jDg='jDh' jDi='jDj' jDk='jDl' jDm='jDn' jDo='jDp' jDq='jDr' jDs='jDt' jDu='jDv' jDw='jDx' jDy='jDz' jDA='jDB' jDC='jDD' jDE='jDF' jDG='jDH' jDI='jDJ' jDK='jDL' jDM='jDN' jDO='jDP' jDQ='jDR' jDS='jDT' jDU='jDV' jDW='jDX' jDY='jDZ' jEa='jEb' jEc='jEd' jEe='jEf' jEg='jEh' jEi='jEj' jEk='jEl' jEm='jEn' jEo='jEp' jEq='jEr' jEs='jEt' jEu='jEv' jEw='jEx' jEy='jEz' jEA='jEB' jEC='jED' jEE='jEF' jEG='jEH' jEI='jEJ' jEK='jEL' jEM='jEN' jEO='jEP' jEQ='jER' jES='jET' jEU='jEV' jEW='jEX' jEY='jEZ' jFa='jFb' jFc='jFd' jFe='jFf' jFg='jFh' jFi='jFj' jFk='jFl' jFm='jFn' jFo='jFp' jFq='jFr' jFs='jFt' jFu='jFv' jFw='jFx' jFy='jFz' jFA='jFB' jFC='jFD' jFE='jFF' jFG='jFH' jFI='jFJ' jFK='jFL' jFM='jFN' jFO='jFP' jFQ='jFR' jFS='jFT' jFU='jFV' jFW='jFX' />
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008344026969402015)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007406827652861232)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010609979082)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001393005378307274)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000386843816)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025588349409616466)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000108331572)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104126)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210413)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104136)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210414)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104146)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210415)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104156)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210416)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104166)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210417)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104176)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210418)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022104186)'/>
+        
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002210419)'/>
+        
+        <xsl:value-of select='ceiling(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021046406)'/>
+        
+        <xsl:value-of select='ceiling(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010655986780146883)'/>
+        <jFY jFZ='jGa' jGb='jGc' jGd='jGe' jGf='jGg' jGh='jGi' jGj='jGk' jGl='jGm' jGn='jGo' jGp='jGq' jGr='jGs' jGt='jGu' jGv='jGw' jGx='jGy' jGz='jGA' jGB='jGC' jGD='jGE' jGF='jGG' jGH='jGI' jGJ='jGK' jGL='jGM' jGN='jGO' jGP='jGQ' jGR='jGS' jGT='jGU' jGV='jGW' jGX='jGY' jGZ='jHa' jHb='jHc' jHd='jHe' jHf='jHg' jHh='jHi' jHj='jHk' jHl='jHm' jHn='jHo' jHp='jHq' jHr='jHs' jHt='jHu' jHv='jHw' jHx='jHy' jHz='jHA' jHB='jHC' jHD='jHE' jHF='jHG' jHH='jHI' jHJ='jHK' jHL='jHM' jHN='jHO' jHP='jHQ' jHR='jHS' jHT='jHU' jHV='jHW' jHX='jHY' jHZ='jIa' jIb='jIc' jId='jIe' jIf='jIg' jIh='jIi' jIj='jIk' jIl='jIm' jIn='jIo' jIp='jIq' jIr='jIs' jIt='jIu' jIv='jIw' jIx='jIy' jIz='jIA' jIB='jIC' jID='jIE' jIF='jIG' jIH='jII' jIJ='jIK' jIL='jIM' jIN='jIO' jIP='jIQ' jIR='jIS' jIT='jIU' jIV='jIW' jIX='jIY' jIZ='jJa' jJb='jJc' jJd='jJe' jJf='jJg' jJh='jJi' jJj='jJk' jJl='jJm' />
+        <xsl:value-of select='ceiling(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000142326501945645)'/>
+        <jJn jJo='jJp' jJq='jJr' jJs='jJt' jJu='jJv' jJw='jJx' jJy='jJz' jJA='jJB' jJC='jJD' jJE='jJF' jJG='jJH' jJI='jJJ' jJK='jJL' jJM='jJN' jJO='jJP' jJQ='jJR' jJS='jJT' jJU='jJV' jJW='jJX' jJY='jJZ' jKa='jKb' jKc='jKd' jKe='jKf' jKg='jKh' jKi='jKj' jKk='jKl' jKm='jKn' jKo='jKp' jKq='jKr' jKs='jKt' jKu='jKv' jKw='jKx' jKy='jKz' jKA='jKB' jKC='jKD' jKE='jKF' jKG='jKH' jKI='jKJ' jKK='jKL' jKM='jKN' jKO='jKP' jKQ='jKR' jKS='jKT' jKU='jKV' jKW='jKX' jKY='jKZ' jLa='jLb' jLc='jLd' jLe='jLf' jLg='jLh' jLi='jLj' jLk='jLl' jLm='jLn' jLo='jLp' jLq='jLr' jLs='jLt' jLu='jLv' jLw='jLx' jLy='jLz' jLA='jLB' jLC='jLD' jLE='jLF' jLG='jLH' jLI='jLJ' jLK='jLL' jLM='jLN' jLO='jLP' jLQ='jLR' jLS='jLT' jLU='jLV' jLW='jLX' jLY='jLZ' jMa='jMb' jMc='jMd' jMe='jMf' jMg='jMh' jMi='jMj' jMk='jMl' jMm='jMn' jMo='jMp' jMq='jMr' jMs='jMt' jMu='jMv' jMw='jMx' jMy='jMz' jMA='jMB' jMC='jMD' jME='jMF' jMG='jMH' jMI='jMJ' jMK='jML' jMM='jMN' jMO='jMP' jMQ='jMR' jMS='jMT' jMU='jMV' jMW='jMX' jMY='jMZ' jNa='jNb' jNc='jNd' jNe='jNf' jNg='jNh' jNi='jNj' jNk='jNl' jNm='jNn' jNo='jNp' jNq='jNr' jNs='jNt' jNu='jNv' jNw='jNx' jNy='jNz' jNA='jNB' jNC='jND' jNE='jNF' jNG='jNH' jNI='jNJ' jNK='jNL' jNM='jNN' jNO='jNP' jNQ='jNR' jNS='jNT' jNU='jNV' jNW='jNX' jNY='jNZ' jOa='jOb' jOc='jOd' jOe='jOf' jOg='jOh' jOi='jOj' jOk='jOl' jOm='jOn' jOo='jOp' jOq='jOr' jOs='jOt' jOu='jOv' jOw='jOx' jOy='jOz' jOA='jOB' jOC='jOD' jOE='jOF' jOG='jOH' jOI='jOJ' jOK='jOL' jOM='jON' jOO='jOP' jOQ='jOR' jOS='jOT' jOU='jOV' jOW='jOX' jOY='jOZ' jPa='jPb' jPc='jPd' jPe='jPf' jPg='jPh' jPi='jPj' jPk='jPl' jPm='jPn' jPo='jPp' jPq='jPr' jPs='jPt' jPu='jPv' jPw='jPx' jPy='jPz' jPA='jPB' jPC='jPD' jPE='jPF' jPG='jPH' jPI='jPJ' jPK='jPL' jPM='jPN' jPO='jPP' jPQ='jPR' jPS='jPT' jPU='jPV' jPW='jPX' jPY='jPZ' jQa='jQb' jQc='jQd' jQe='jQf' jQg='jQh' jQi='jQj' jQk='jQl' jQm='jQn' jQo='jQp' jQq='jQr' jQs='jQt' jQu='jQv' jQw='jQx' jQy='jQz' jQA='jQB' jQC='jQD' jQE='jQF' jQG='jQH' jQI='jQJ' jQK='jQL' jQM='jQN' jQO='jQP' jQQ='jQR' jQS='jQT' jQU='jQV' jQW='jQX' jQY='jQZ' jRa='jRb' jRc='jRd' jRe='jRf' jRg='jRh' jRi='jRj' jRk='jRl' jRm='jRn' jRo='jRp' jRq='jRr' jRs='jRt' jRu='jRv' jRw='jRx' jRy='jRz' jRA='jRB' jRC='jRD' jRE='jRF' jRG='jRH' jRI='jRJ' jRK='jRL' jRM='jRN' jRO='jRP' jRQ='jRR' jRS='jRT' jRU='jRV' jRW='jRX' jRY='jRZ' jSa='jSb' jSc='jSd' jSe='jSf' jSg='jSh' jSi='jSj' jSk='jSl' jSm='jSn' jSo='jSp' jSq='jSr' jSs='jSt' jSu='jSv' jSw='jSx' jSy='jSz' jSA='jSB' jSC='jSD' jSE='jSF' jSG='jSH' jSI='jSJ' jSK='jSL' jSM='jSN' jSO='jSP' jSQ='jSR' jSS='jST' jSU='jSV' jSW='jSX' jSY='jSZ' jTa='jTb' jTc='jTd' jTe='jTf' jTg='jTh' jTi='jTj' jTk='jTl' jTm='jTn' jTo='jTp' jTq='jTr' jTs='jTt' jTu='jTv' jTw='jTx' jTy='jTz' jTA='jTB' jTC='jTD' jTE='jTF' jTG='jTH' jTI='jTJ' jTK='jTL' jTM='jTN' jTO='jTP' jTQ='jTR' jTS='jTT' jTU='jTV' jTW='jTX' jTY='jTZ' jUa='jUb' jUc='jUd' jUe='jUf' jUg='jUh' jUi='jUj' jUk='jUl' jUm='jUn' jUo='jUp' jUq='jUr' jUs='jUt' jUu='jUv' jUw='jUx' jUy='jUz' jUA='jUB' jUC='jUD' jUE='jUF' jUG='jUH' jUI='jUJ' jUK='jUL' jUM='jUN' jUO='jUP' jUQ='jUR' jUS='jUT' jUU='jUV' jUW='jUX' jUY='jUZ' jVa='jVb' jVc='jVd' jVe='jVf' jVg='jVh' jVi='jVj' jVk='jVl' jVm='jVn' jVo='jVp' jVq='jVr' jVs='jVt' jVu='jVv' jVw='jVx' jVy='jVz' jVA='jVB' jVC='jVD' jVE='jVF' jVG='jVH' jVI='jVJ' jVK='jVL' jVM='jVN' jVO='jVP' jVQ='jVR' jVS='jVT' jVU='jVV' jVW='jVX' jVY='jVZ' jWa='jWb' jWc='jWd' jWe='jWf' jWg='jWh' jWi='jWj' jWk='jWl' jWm='jWn' jWo='jWp' jWq='jWr' jWs='jWt' jWu='jWv' jWw='jWx' jWy='jWz' jWA='jWB' jWC='jWD' jWE='jWF' jWG='jWH' jWI='jWJ' jWK='jWL' jWM='jWN' jWO='jWP' jWQ='jWR' jWS='jWT' jWU='jWV' jWW='jWX' jWY='jWZ' jXa='jXb' jXc='jXd' jXe='jXf' jXg='jXh' jXi='jXj' jXk='jXl' jXm='jXn' jXo='jXp' jXq='jXr' jXs='jXt' jXu='jXv' jXw='jXx' jXy='jXz' jXA='jXB' jXC='jXD' jXE='jXF' jXG='jXH' jXI='jXJ' jXK='jXL' jXM='jXN' jXO='jXP' jXQ='jXR' jXS='jXT' jXU='jXV' jXW='jXX' jXY='jXZ' jYa='jYb' jYc='jYd' jYe='jYf' jYg='jYh' jYi='jYj' jYk='jYl' jYm='jYn' jYo='jYp' jYq='jYr' jYs='jYt' jYu='jYv' jYw='jYx' jYy='jYz' jYA='jYB' jYC='jYD' jYE='jYF' jYG='jYH' jYI='jYJ' jYK='jYL' jYM='jYN' jYO='jYP' jYQ='jYR' jYS='jYT' jYU='jYV' jYW='jYX' jYY='jYZ' jZa='jZb' jZc='jZd' jZe='jZf' jZg='jZh' jZi='jZj' jZk='jZl' jZm='jZn' jZo='jZp' jZq='jZr' jZs='jZt' jZu='jZv' jZw='jZx' jZy='jZz' jZA='jZB' jZC='jZD' jZE='jZF' jZG='jZH' jZI='jZJ' jZK='jZL' jZM='jZN' jZO='jZP' jZQ='jZR' jZS='jZT' jZU='jZV' jZW='jZX' jZY='jZZ' kaa='kab' kac='kad' kae='kaf' kag='kah' kai='kaj' kak='kal' kam='kan' kao='kap' kaq='kar' kas='kat' kau='kav' kaw='kax' kay='kaz' kaA='kaB' kaC='kaD' kaE='kaF' kaG='kaH' kaI='kaJ' kaK='kaL' kaM='kaN' kaO='kaP' kaQ='kaR' kaS='kaT' kaU='kaV' kaW='kaX' kaY='kaZ' kba='kbb' kbc='kbd' kbe='kbf' kbg='kbh' kbi='kbj' kbk='kbl' kbm='kbn' kbo='kbp' kbq='kbr' kbs='kbt' kbu='kbv' kbw='kbx' kby='kbz' kbA='kbB' kbC='kbD' kbE='kbF' kbG='kbH' kbI='kbJ' kbK='kbL' kbM='kbN' kbO='kbP' kbQ='kbR' kbS='kbT' kbU='kbV' kbW='kbX' kbY='kbZ' kca='kcb' kcc='kcd' kce='kcf' kcg='kch' kci='kcj' kck='kcl' kcm='kcn' kco='kcp' kcq='kcr' kcs='kct' kcu='kcv' kcw='kcx' kcy='kcz' kcA='kcB' kcC='kcD' kcE='kcF' kcG='kcH' kcI='kcJ' kcK='kcL' kcM='kcN' kcO='kcP' kcQ='kcR' kcS='kcT' kcU='kcV' kcW='kcX' kcY='kcZ' kda='kdb' kdc='kdd' kde='kdf' kdg='kdh' kdi='kdj' kdk='kdl' kdm='kdn' kdo='kdp' kdq='kdr' kds='kdt' kdu='kdv' kdw='kdx' kdy='kdz' kdA='kdB' kdC='kdD' kdE='kdF' kdG='kdH' kdI='kdJ' kdK='kdL' kdM='kdN' kdO='kdP' kdQ='kdR' kdS='kdT' kdU='kdV' kdW='kdX' kdY='kdZ' kea='keb' kec='ked' kee='kef' keg='keh' kei='kej' kek='kel' kem='ken' keo='kep' keq='ker' kes='ket' keu='kev' kew='kex' key='kez' keA='keB' keC='keD' keE='keF' keG='keH' keI='keJ' keK='keL' keM='keN' keO='keP' keQ='keR' keS='keT' keU='keV' keW='keX' keY='keZ' kfa='kfb' kfc='kfd' kfe='kff' kfg='kfh' kfi='kfj' kfk='kfl' kfm='kfn' kfo='kfp' kfq='kfr' kfs='kft' kfu='kfv' kfw='kfx' kfy='kfz' kfA='kfB' kfC='kfD' kfE='kfF' kfG='kfH' kfI='kfJ' kfK='kfL' kfM='kfN' kfO='kfP' kfQ='kfR' kfS='kfT' kfU='kfV' kfW='kfX' kfY='kfZ' kga='kgb' kgc='kgd' kge='kgf' kgg='kgh' kgi='kgj' kgk='kgl' kgm='kgn' kgo='kgp' kgq='kgr' kgs='kgt' kgu='kgv' kgw='kgx' kgy='kgz' kgA='kgB' kgC='kgD' kgE='kgF' kgG='kgH' kgI='kgJ' kgK='kgL' kgM='kgN' kgO='kgP' kgQ='kgR' kgS='kgT' kgU='kgV' kgW='kgX' kgY='kgZ' kha='khb' khc='khd' khe='khf' khg='khh' khi='khj' khk='khl' khm='khn' kho='khp' khq='khr' khs='kht' khu='khv' khw='khx' khy='khz' khA='khB' khC='khD' khE='khF' khG='khH' khI='khJ' khK='khL' khM='khN' khO='khP' khQ='khR' khS='khT' khU='khV' khW='khX' khY='khZ' kia='kib' kic='kid' kie='kif' kig='kih' kii='kij' kik='kil' kim='kin' kio='kip' kiq='kir' kis='kit' kiu='kiv' kiw='kix' kiy='kiz' kiA='kiB' kiC='kiD' kiE='kiF' kiG='kiH' kiI='kiJ' kiK='kiL' kiM='kiN' kiO='kiP' kiQ='kiR' kiS='kiT' kiU='kiV' kiW='kiX' kiY='kiZ' kja='kjb' kjc='kjd' kje='kjf' kjg='kjh' kji='kjj' kjk='kjl' kjm='kjn' kjo='kjp' kjq='kjr' kjs='kjt' kju='kjv' kjw='kjx' kjy='kjz' kjA='kjB' kjC='kjD' kjE='kjF' kjG='kjH' kjI='kjJ' kjK='kjL' kjM='kjN' kjO='kjP' kjQ='kjR' kjS='kjT' kjU='kjV' kjW='kjX' kjY='kjZ' kka='kkb' kkc='kkd' kke='kkf' kkg='kkh' kki='kkj' kkk='kkl' kkm='kkn' kko='kkp' kkq='kkr' kks='kkt' kku='kkv' kkw='kkx' kky='kkz' kkA='kkB' kkC='kkD' kkE='kkF' kkG='kkH' kkI='kkJ' kkK='kkL' kkM='kkN' kkO='kkP' kkQ='kkR' kkS='kkT' kkU='kkV' kkW='kkX' kkY='kkZ' kla='klb' klc='kld' kle='klf' klg='klh' kli='klj' klk='kll' klm='kln' klo='klp' klq='klr' kls='klt' klu='klv' klw='klx' kly='klz' klA='klB' klC='klD' klE='klF' klG='klH' klI='klJ' klK='klL' klM='klN' klO='klP' klQ='klR' klS='klT' klU='klV' klW='klX' klY='klZ' kma='kmb' kmc='kmd' kme='kmf' kmg='kmh' kmi='kmj' kmk='kml' kmm='kmn' kmo='kmp' kmq='kmr' kms='kmt' kmu='kmv' kmw='kmx' kmy='kmz' kmA='kmB' kmC='kmD' kmE='kmF' kmG='kmH' kmI='kmJ' kmK='kmL' kmM='kmN' kmO='kmP' kmQ='kmR' kmS='kmT' kmU='kmV' kmW='kmX' kmY='kmZ' kna='knb' knc='knd' kne='knf' kng='knh' kni='knj' knk='knl' knm='knn' kno='knp' knq='knr' kns='knt' knu='knv' knw='knx' kny='knz' knA='knB' knC='knD' knE='knF' knG='knH' knI='knJ' knK='knL' knM='knN' knO='knP' knQ='knR' knS='knT' knU='knV' knW='knX' knY='knZ' koa='kob' koc='kod' koe='kof' kog='koh' koi='koj' kok='kol' kom='kon' koo='kop' koq='kor' kos='kot' kou='kov' kow='kox' koy='koz' koA='koB' koC='koD' koE='koF' koG='koH' koI='koJ' koK='koL' koM='koN' koO='koP' koQ='koR' koS='koT' koU='koV' koW='koX' koY='koZ' kpa='kpb' kpc='kpd' kpe='kpf' kpg='kph' kpi='kpj' kpk='kpl' kpm='kpn' kpo='kpp' kpq='kpr' kps='kpt' kpu='kpv' kpw='kpx' kpy='kpz' kpA='kpB' kpC='kpD' kpE='kpF' kpG='kpH' kpI='kpJ' kpK='kpL' kpM='kpN' kpO='kpP' kpQ='kpR' kpS='kpT' kpU='kpV' kpW='kpX' kpY='kpZ' kqa='kqb' kqc='kqd' kqe='kqf' kqg='kqh' kqi='kqj' kqk='kql' kqm='kqn' kqo='kqp' kqq='kqr' kqs='kqt' kqu='kqv' kqw='kqx' kqy='kqz' kqA='kqB' kqC='kqD' kqE='kqF' kqG='kqH' kqI='kqJ' kqK='kqL' kqM='kqN' kqO='kqP' kqQ='kqR' kqS='kqT' kqU='kqV' kqW='kqX' kqY='kqZ' kra='krb' krc='krd' kre='krf' krg='krh' kri='krj' krk='krl' krm='krn' kro='krp' krq='krr' krs='krt' kru='krv' krw='krx' kry='krz' krA='krB' krC='krD' krE='krF' krG='krH' krI='krJ' krK='krL' krM='krN' krO='krP' krQ='krR' krS='krT' krU='krV' krW='krX' krY='krZ' ksa='ksb' ksc='ksd' kse='ksf' ksg='ksh' ksi='ksj' ksk='ksl' ksm='ksn' kso='ksp' ksq='ksr' kss='kst' ksu='ksv' ksw='ksx' ksy='ksz' ksA='ksB' ksC='ksD' ksE='ksF' ksG='ksH' ksI='ksJ' ksK='ksL' ksM='ksN' ksO='ksP' ksQ='ksR' ksS='ksT' ksU='ksV' ksW='ksX' ksY='ksZ' kta='ktb' ktc='ktd' kte='ktf' ktg='kth' kti='ktj' ktk='ktl' ktm='ktn' kto='ktp' ktq='ktr' kts='ktt' ktu='ktv' ktw='ktx' kty='ktz' ktA='ktB' ktC='ktD' ktE='ktF' ktG='ktH' ktI='ktJ' ktK='ktL' ktM='ktN' ktO='ktP' ktQ='ktR' ktS='ktT' ktU='ktV' ktW='ktX' ktY='ktZ' kua='kub' kuc='kud' kue='kuf' kug='kuh' kui='kuj' kuk='kul' kum='kun' kuo='kup' kuq='kur' kus='kut' kuu='kuv' kuw='kux' kuy='kuz' kuA='kuB' kuC='kuD' kuE='kuF' kuG='kuH' kuI='kuJ' kuK='kuL' kuM='kuN' kuO='kuP' kuQ='kuR' kuS='kuT' kuU='kuV' kuW='kuX' kuY='kuZ' kva='kvb' kvc='kvd' kve='kvf' kvg='kvh' kvi='kvj' kvk='kvl' kvm='kvn' kvo='kvp' kvq='kvr' kvs='kvt' kvu='kvv' kvw='kvx' kvy='kvz' kvA='kvB' kvC='kvD' kvE='kvF' kvG='kvH' kvI='kvJ' kvK='kvL' kvM='kvN' kvO='kvP' kvQ='kvR' kvS='kvT' kvU='kvV' kvW='kvX' kvY='kvZ' kwa='kwb' kwc='kwd' kwe='kwf' kwg='kwh' kwi='kwj' kwk='kwl' kwm='kwn' kwo='kwp' kwq='kwr' kws='kwt' kwu='kwv' kww='kwx' kwy='kwz' kwA='kwB' kwC='kwD' kwE='kwF' kwG='kwH' kwI='kwJ' kwK='kwL' kwM='kwN' kwO='kwP' kwQ='kwR' kwS='kwT' kwU='kwV' kwW='kwX' kwY='kwZ' kxa='kxb' kxc='kxd' kxe='kxf' kxg='kxh' kxi='kxj' kxk='kxl' kxm='kxn' kxo='kxp' kxq='kxr' kxs='kxt' kxu='kxv' kxw='kxx' kxy='kxz' kxA='kxB' kxC='kxD' kxE='kxF' kxG='kxH' kxI='kxJ' kxK='kxL' kxM='kxN' kxO='kxP' kxQ='kxR' kxS='kxT' kxU='kxV' kxW='kxX' kxY='kxZ' kya='kyb' kyc='kyd' kye='kyf' kyg='kyh' kyi='kyj' kyk='kyl' kym='kyn' kyo='kyp' kyq='kyr' kys='kyt' kyu='kyv' kyw='kyx' kyy='kyz' kyA='kyB' kyC='kyD' kyE='kyF' kyG='kyH' kyI='kyJ' kyK='kyL' kyM='kyN' kyO='kyP' kyQ='kyR' kyS='kyT' kyU='kyV' kyW='kyX' kyY='kyZ' kza='kzb' kzc='kzd' kze='kzf' kzg='kzh' kzi='kzj' kzk='kzl' kzm='kzn' kzo='kzp' kzq='kzr' kzs='kzt' kzu='kzv' kzw='kzx' kzy='kzz' kzA='kzB' kzC='kzD' kzE='kzF' kzG='kzH' kzI='kzJ' kzK='kzL' kzM='kzN' kzO='kzP' kzQ='kzR' kzS='kzT' kzU='kzV' kzW='kzX' kzY='kzZ' kAa='kAb' kAc='kAd' kAe='kAf' kAg='kAh' kAi='kAj' kAk='kAl' kAm='kAn' kAo='kAp' kAq='kAr' kAs='kAt' kAu='kAv' kAw='kAx' kAy='kAz' kAA='kAB' kAC='kAD' kAE='kAF' kAG='kAH' kAI='kAJ' kAK='kAL' kAM='kAN' kAO='kAP' kAQ='kAR' kAS='kAT' kAU='kAV' kAW='kAX' kAY='kAZ' kBa='kBb' kBc='kBd' kBe='kBf' kBg='kBh' kBi='kBj' kBk='kBl' kBm='kBn' kBo='kBp' kBq='kBr' kBs='kBt' kBu='kBv' kBw='kBx' kBy='kBz' kBA='kBB' kBC='kBD' kBE='kBF' kBG='kBH' kBI='kBJ' kBK='kBL' kBM='kBN' kBO='kBP' kBQ='kBR' kBS='kBT' kBU='kBV' kBW='kBX' kBY='kBZ' kCa='kCb' kCc='kCd' kCe='kCf' kCg='kCh' kCi='kCj' kCk='kCl' kCm='kCn' kCo='kCp' kCq='kCr' kCs='kCt' kCu='kCv' kCw='kCx' kCy='kCz' kCA='kCB' kCC='kCD' kCE='kCF' kCG='kCH' kCI='kCJ' kCK='kCL' kCM='kCN' kCO='kCP' kCQ='kCR' kCS='kCT' kCU='kCV' kCW='kCX' kCY='kCZ' kDa='kDb' kDc='kDd' kDe='kDf' kDg='kDh' kDi='kDj' kDk='kDl' kDm='kDn' kDo='kDp' kDq='kDr' kDs='kDt' kDu='kDv' kDw='kDx' kDy='kDz' kDA='kDB' kDC='kDD' kDE='kDF' kDG='kDH' kDI='kDJ' kDK='kDL' kDM='kDN' kDO='kDP' kDQ='kDR' kDS='kDT' kDU='kDV' kDW='kDX' kDY='kDZ' kEa='kEb' kEc='kEd' kEe='kEf' kEg='kEh' kEi='kEj' kEk='kEl' kEm='kEn' kEo='kEp' kEq='kEr' kEs='kEt' kEu='kEv' kEw='kEx' kEy='kEz' kEA='kEB' kEC='kED' kEE='kEF' kEG='kEH' kEI='kEJ' kEK='kEL' kEM='kEN' kEO='kEP' kEQ='kER' kES='kET' kEU='kEV' kEW='kEX' kEY='kEZ' kFa='kFb' kFc='kFd' kFe='kFf' kFg='kFh' kFi='kFj' kFk='kFl' kFm='kFn' kFo='kFp' kFq='kFr' kFs='kFt' kFu='kFv' kFw='kFx' kFy='kFz' kFA='kFB' kFC='kFD' kFE='kFF' kFG='kFH' kFI='kFJ' kFK='kFL' kFM='kFN' kFO='kFP' kFQ='kFR' kFS='kFT' kFU='kFV' kFW='kFX' kFY='kFZ' kGa='kGb' kGc='kGd' kGe='kGf' kGg='kGh' kGi='kGj' kGk='kGl' kGm='kGn' kGo='kGp' kGq='kGr' kGs='kGt' kGu='kGv' kGw='kGx' kGy='kGz' kGA='kGB' kGC='kGD' kGE='kGF' kGG='kGH' kGI='kGJ' kGK='kGL' kGM='kGN' kGO='kGP' kGQ='kGR' kGS='kGT' kGU='kGV' kGW='kGX' kGY='kGZ' kHa='kHb' kHc='kHd' kHe='kHf' kHg='kHh' kHi='kHj' kHk='kHl' kHm='kHn' kHo='kHp' kHq='kHr' kHs='kHt' kHu='kHv' kHw='kHx' kHy='kHz' kHA='kHB' kHC='kHD' kHE='kHF' kHG='kHH' kHI='kHJ' kHK='kHL' kHM='kHN' kHO='kHP' kHQ='kHR' kHS='kHT' kHU='kHV' kHW='kHX' kHY='kHZ' kIa='kIb' kIc='kId' kIe='kIf' kIg='kIh' kIi='kIj' kIk='kIl' kIm='kIn' kIo='kIp' kIq='kIr' kIs='kIt' kIu='kIv' kIw='kIx' kIy='kIz' kIA='kIB' kIC='kID' kIE='kIF' kIG='kIH' kII='kIJ' kIK='kIL' kIM='kIN' kIO='kIP' kIQ='kIR' kIS='kIT' kIU='kIV' kIW='kIX' kIY='kIZ' kJa='kJb' kJc='kJd' kJe='kJf' kJg='kJh' kJi='kJj' kJk='kJl' kJm='kJn' kJo='kJp' kJq='kJr' kJs='kJt' kJu='kJv' kJw='kJx' kJy='kJz' kJA='kJB' kJC='kJD' kJE='kJF' kJG='kJH' kJI='kJJ' kJK='kJL' kJM='kJN' kJO='kJP' kJQ='kJR' kJS='kJT' kJU='kJV' kJW='kJX' kJY='kJZ' kKa='kKb' kKc='kKd' kKe='kKf' kKg='kKh' kKi='kKj' kKk='kKl' kKm='kKn' kKo='kKp' kKq='kKr' kKs='kKt' kKu='kKv' kKw='kKx' kKy='kKz' kKA='kKB' kKC='kKD' kKE='kKF' kKG='kKH' kKI='kKJ' kKK='kKL' kKM='kKN' kKO='kKP' kKQ='kKR' kKS='kKT' kKU='kKV' kKW='kKX' kKY='kKZ' kLa='kLb' kLc='kLd' kLe='kLf' kLg='kLh' kLi='kLj' kLk='kLl' kLm='kLn' kLo='kLp' kLq='kLr' kLs='kLt' kLu='kLv' kLw='kLx' kLy='kLz' kLA='kLB' kLC='kLD' kLE='kLF' kLG='kLH' kLI='kLJ' kLK='kLL' kLM='kLN' kLO='kLP' kLQ='kLR' kLS='kLT' kLU='kLV' kLW='kLX' kLY='kLZ' kMa='kMb' kMc='kMd' kMe='kMf' kMg='kMh' kMi='kMj' kMk='kMl' kMm='kMn' kMo='kMp' kMq='kMr' kMs='kMt' kMu='kMv' kMw='kMx' kMy='kMz' kMA='kMB' kMC='kMD' kME='kMF' kMG='kMH' kMI='kMJ' kMK='kML' kMM='kMN' kMO='kMP' kMQ='kMR' kMS='kMT' kMU='kMV' kMW='kMX' kMY='kMZ' kNa='kNb' kNc='kNd' kNe='kNf' kNg='kNh' kNi='kNj' kNk='kNl' kNm='kNn' kNo='kNp' kNq='kNr' kNs='kNt' kNu='kNv' kNw='kNx' kNy='kNz' kNA='kNB' kNC='kND' kNE='kNF' kNG='kNH' kNI='kNJ' kNK='kNL' kNM='kNN' kNO='kNP' kNQ='kNR' kNS='kNT' kNU='kNV' kNW='kNX' kNY='kNZ' kOa='kOb' kOc='kOd' kOe='kOf' kOg='kOh' kOi='kOj' kOk='kOl' kOm='kOn' kOo='kOp' kOq='kOr' kOs='kOt' kOu='kOv' kOw='kOx' kOy='kOz' kOA='kOB' kOC='kOD' kOE='kOF' kOG='kOH' kOI='kOJ' kOK='kOL' kOM='kON' kOO='kOP' kOQ='kOR' kOS='kOT' kOU='kOV' kOW='kOX' kOY='kOZ' kPa='kPb' kPc='kPd' kPe='kPf' kPg='kPh' kPi='kPj' kPk='kPl' kPm='kPn' kPo='kPp' kPq='kPr' kPs='kPt' kPu='kPv' kPw='kPx' kPy='kPz' kPA='kPB' kPC='kPD' kPE='kPF' kPG='kPH' kPI='kPJ' kPK='kPL' kPM='kPN' kPO='kPP' kPQ='kPR' kPS='kPT' kPU='kPV' kPW='kPX' kPY='kPZ' kQa='kQb' kQc='kQd' kQe='kQf' kQg='kQh' kQi='kQj' kQk='kQl' kQm='kQn' kQo='kQp' kQq='kQr' kQs='kQt' kQu='kQv' kQw='kQx' kQy='kQz' kQA='kQB' kQC='kQD' kQE='kQF' kQG='kQH' kQI='kQJ' kQK='kQL' kQM='kQN' kQO='kQP' kQQ='kQR' kQS='kQT' kQU='kQV' kQW='kQX' kQY='kQZ' kRa='kRb' kRc='kRd' kRe='kRf' kRg='kRh' kRi='kRj' kRk='kRl' kRm='kRn' kRo='kRp' kRq='kRr' kRs='kRt' kRu='kRv' kRw='kRx' kRy='kRz' kRA='kRB' kRC='kRD' kRE='kRF' kRG='kRH' kRI='kRJ' kRK='kRL' kRM='kRN' kRO='kRP' kRQ='kRR' kRS='kRT' kRU='kRV' kRW='kRX' kRY='kRZ' kSa='kSb' kSc='kSd' kSe='kSf' kSg='kSh' kSi='kSj' kSk='kSl' kSm='kSn' kSo='kSp' kSq='kSr' kSs='kSt' kSu='kSv' kSw='kSx' kSy='kSz' kSA='kSB' kSC='kSD' kSE='kSF' kSG='kSH' kSI='kSJ' kSK='kSL' kSM='kSN' kSO='kSP' kSQ='kSR' kSS='kST' kSU='kSV' kSW='kSX' kSY='kSZ' kTa='kTb' kTc='kTd' kTe='kTf' kTg='kTh' kTi='kTj' kTk='kTl' kTm='kTn' kTo='kTp' kTq='kTr' kTs='kTt' kTu='kTv' kTw='kTx' kTy='kTz' kTA='kTB' kTC='kTD' kTE='kTF' kTG='kTH' kTI='kTJ' kTK='kTL' kTM='kTN' kTO='kTP' kTQ='kTR' kTS='kTT' kTU='kTV' kTW='kTX' kTY='kTZ' kUa='kUb' kUc='kUd' kUe='kUf' kUg='kUh' kUi='kUj' kUk='kUl' kUm='kUn' kUo='kUp' kUq='kUr' kUs='kUt' kUu='kUv' kUw='kUx' kUy='kUz' kUA='kUB' kUC='kUD' kUE='kUF' kUG='kUH' kUI='kUJ' kUK='kUL' kUM='kUN' kUO='kUP' kUQ='kUR' kUS='kUT' kUU='kUV' kUW='kUX' kUY='kUZ' kVa='kVb' kVc='kVd' kVe='kVf' kVg='kVh' kVi='kVj' kVk='kVl' kVm='kVn' kVo='kVp' kVq='kVr' kVs='kVt' kVu='kVv' kVw='kVx' kVy='kVz' kVA='kVB' kVC='kVD' kVE='kVF' kVG='kVH' kVI='kVJ' kVK='kVL' kVM='kVN' kVO='kVP' kVQ='kVR' kVS='kVT' kVU='kVV' kVW='kVX' kVY='kVZ' kWa='kWb' kWc='kWd' kWe='kWf' kWg='kWh' kWi='kWj' kWk='kWl' kWm='kWn' kWo='kWp' kWq='kWr' kWs='kWt' kWu='kWv' kWw='kWx' kWy='kWz' kWA='kWB' kWC='kWD' kWE='kWF' kWG='kWH' kWI='kWJ' kWK='kWL' kWM='kWN' kWO='kWP' kWQ='kWR' kWS='kWT' kWU='kWV' kWW='kWX' kWY='kWZ' kXa='kXb' kXc='kXd' kXe='kXf' kXg='kXh' kXi='kXj' kXk='kXl' kXm='kXn' kXo='kXp' kXq='kXr' kXs='kXt' kXu='kXv' kXw='kXx' kXy='kXz' kXA='kXB' kXC='kXD' kXE='kXF' kXG='kXH' kXI='kXJ' kXK='kXL' kXM='kXN' kXO='kXP' kXQ='kXR' kXS='kXT' kXU='kXV' kXW='kXX' kXY='kXZ' kYa='kYb' kYc='kYd' kYe='kYf' kYg='kYh' kYi='kYj' kYk='kYl' kYm='kYn' kYo='kYp' kYq='kYr' kYs='kYt' kYu='kYv' kYw='kYx' kYy='kYz' kYA='kYB' kYC='kYD' kYE='kYF' kYG='kYH' kYI='kYJ' kYK='kYL' kYM='kYN' kYO='kYP' kYQ='kYR' kYS='kYT' kYU='kYV' kYW='kYX' kYY='kYZ' kZa='kZb' kZc='kZd' kZe='kZf' kZg='kZh' kZi='kZj' kZk='kZl' kZm='kZn' kZo='kZp' kZq='kZr' kZs='kZt' kZu='kZv' kZw='kZx' kZy='kZz' kZA='kZB' kZC='kZD' kZE='kZF' kZG='kZH' kZI='kZJ' kZK='kZL' kZM='kZN' kZO='kZP' kZQ='kZR' kZS='kZT' kZU='kZV' kZW='kZX' kZY='kZZ' laa='lab' lac='lad' lae='laf' lag='lah' lai='laj' lak='lal' lam='lan' lao='lap' laq='lar' las='lat' lau='lav' law='lax' lay='laz' laA='laB' laC='laD' laE='laF' laG='laH' laI='laJ' laK='laL' laM='laN' laO='laP' laQ='laR' laS='laT' laU='laV' laW='laX' laY='laZ' lba='lbb' lbc='lbd' lbe='lbf' lbg='lbh' lbi='lbj' lbk='lbl' lbm='lbn' lbo='lbp' lbq='lbr' lbs='lbt' lbu='lbv' lbw='lbx' lby='lbz' lbA='lbB' lbC='lbD' lbE='lbF' lbG='lbH' lbI='lbJ' lbK='lbL' lbM='lbN' lbO='lbP' lbQ='lbR' lbS='lbT' lbU='lbV' lbW='lbX' lbY='lbZ' lca='lcb' lcc='lcd' lce='lcf' lcg='lch' lci='lcj' lck='lcl' lcm='lcn' lco='lcp' lcq='lcr' lcs='lct' lcu='lcv' lcw='lcx' lcy='lcz' lcA='lcB' lcC='lcD' lcE='lcF' lcG='lcH' lcI='lcJ' lcK='lcL' lcM='lcN' lcO='lcP' lcQ='lcR' lcS='lcT' lcU='lcV' lcW='lcX' lcY='lcZ' lda='ldb' ldc='ldd' lde='ldf' ldg='ldh' ldi='ldj' ldk='ldl' ldm='ldn' ldo='ldp' ldq='ldr' lds='ldt' ldu='ldv' ldw='ldx' ldy='ldz' ldA='ldB' ldC='ldD' ldE='ldF' ldG='ldH' ldI='ldJ' ldK='ldL' ldM='ldN' ldO='ldP' ldQ='ldR' ldS='ldT' ldU='ldV' ldW='ldX' ldY='ldZ' lea='leb' lec='led' lee='lef' leg='leh' lei='lej' lek='lel' lem='len' leo='lep' leq='ler' les='let' leu='lev' lew='lex' ley='lez' leA='leB' leC='leD' leE='leF' leG='leH' leI='leJ' leK='leL' leM='leN' leO='leP' leQ='leR' leS='leT' leU='leV' leW='leX' leY='leZ' lfa='lfb' lfc='lfd' lfe='lff' lfg='lfh' lfi='lfj' lfk='lfl' lfm='lfn' lfo='lfp' lfq='lfr' lfs='lft' lfu='lfv' lfw='lfx' lfy='lfz' lfA='lfB' lfC='lfD' lfE='lfF' lfG='lfH' lfI='lfJ' lfK='lfL' lfM='lfN' lfO='lfP' lfQ='lfR' lfS='lfT' lfU='lfV' lfW='lfX' lfY='lfZ' lga='lgb' lgc='lgd' lge='lgf' lgg='lgh' lgi='lgj' lgk='lgl' lgm='lgn' lgo='lgp' lgq='lgr' lgs='lgt' lgu='lgv' lgw='lgx' lgy='lgz' lgA='lgB' lgC='lgD' lgE='lgF' lgG='lgH' lgI='lgJ' lgK='lgL' lgM='lgN' lgO='lgP' lgQ='lgR' lgS='lgT' lgU='lgV' lgW='lgX' lgY='lgZ' lha='lhb' lhc='lhd' lhe='lhf' lhg='lhh' lhi='lhj' lhk='lhl' lhm='lhn' lho='lhp' lhq='lhr' lhs='lht' lhu='lhv' lhw='lhx' lhy='lhz' lhA='lhB' lhC='lhD' lhE='lhF' lhG='lhH' lhI='lhJ' lhK='lhL' lhM='lhN' lhO='lhP' lhQ='lhR' lhS='lhT' lhU='lhV' lhW='lhX' lhY='lhZ' lia='lib' lic='lid' lie='lif' lig='lih' lii='lij' lik='lil' lim='lin' lio='lip' liq='lir' lis='lit' liu='liv' liw='lix' liy='liz' liA='liB' liC='liD' liE='liF' liG='liH' liI='liJ' liK='liL' liM='liN' liO='liP' liQ='liR' liS='liT' liU='liV' liW='liX' liY='liZ' lja='ljb' ljc='ljd' lje='ljf' ljg='ljh' lji='ljj' ljk='ljl' ljm='ljn' ljo='ljp' ljq='ljr' ljs='ljt' lju='ljv' ljw='ljx' ljy='ljz' ljA='ljB' ljC='ljD' ljE='ljF' ljG='ljH' ljI='ljJ' ljK='ljL' ljM='ljN' ljO='ljP' ljQ='ljR' ljS='ljT' ljU='ljV' ljW='ljX' ljY='ljZ' lka='lkb' lkc='lkd' lke='lkf' lkg='lkh' lki='lkj' lkk='lkl' lkm='lkn' lko='lkp' lkq='lkr' lks='lkt' lku='lkv' lkw='lkx' lky='lkz' lkA='lkB' lkC='lkD' lkE='lkF' lkG='lkH' lkI='lkJ' lkK='lkL' lkM='lkN' lkO='lkP' lkQ='lkR' lkS='lkT' lkU='lkV' lkW='lkX' lkY='lkZ' lla='llb' llc='lld' lle='llf' llg='llh' lli='llj' llk='lll' llm='lln' llo='llp' llq='llr' lls='llt' llu='llv' llw='llx' lly='llz' llA='llB' llC='llD' llE='llF' llG='llH' llI='llJ' llK='llL' llM='llN' llO='llP' llQ='llR' llS='llT' llU='llV' llW='llX' llY='llZ' lma='lmb' lmc='lmd' lme='lmf' lmg='lmh' lmi='lmj' lmk='lml' lmm='lmn' lmo='lmp' lmq='lmr' lms='lmt' lmu='lmv' lmw='lmx' lmy='lmz' lmA='lmB' lmC='lmD' lmE='lmF' lmG='lmH' lmI='lmJ' lmK='lmL' lmM='lmN' lmO='lmP' lmQ='lmR' lmS='lmT' lmU='lmV' lmW='lmX' lmY='lmZ' lna='lnb' lnc='lnd' lne='lnf' lng='lnh' lni='lnj' lnk='lnl' lnm='lnn' lno='lnp' lnq='lnr' lns='lnt' lnu='lnv' lnw='lnx' lny='lnz' lnA='lnB' lnC='lnD' lnE='lnF' lnG='lnH' lnI='lnJ' lnK='lnL' lnM='lnN' lnO='lnP' lnQ='lnR' lnS='lnT' lnU='lnV' lnW='lnX' lnY='lnZ' loa='lob' loc='lod' loe='lof' log='loh' loi='loj' lok='lol' lom='lon' loo='lop' loq='lor' los='lot' lou='lov' low='lox' loy='loz' loA='loB' loC='loD' loE='loF' loG='loH' loI='loJ' loK='loL' loM='loN' loO='loP' loQ='loR' loS='loT' loU='loV' loW='loX' loY='loZ' lpa='lpb' lpc='lpd' lpe='lpf' lpg='lph' lpi='lpj' lpk='lpl' lpm='lpn' lpo='lpp' lpq='lpr' lps='lpt' lpu='lpv' lpw='lpx' lpy='lpz' lpA='lpB' lpC='lpD' lpE='lpF' lpG='lpH' lpI='lpJ' lpK='lpL' lpM='lpN' lpO='lpP' lpQ='lpR' lpS='lpT' lpU='lpV' lpW='lpX' lpY='lpZ' lqa='lqb' lqc='lqd' lqe='lqf' lqg='lqh' lqi='lqj' lqk='lql' lqm='lqn' lqo='lqp' lqq='lqr' lqs='lqt' lqu='lqv' lqw='lqx' lqy='lqz' lqA='lqB' lqC='lqD' lqE='lqF' lqG='lqH' lqI='lqJ' lqK='lqL' lqM='lqN' lqO='lqP' lqQ='lqR' lqS='lqT' lqU='lqV' lqW='lqX' lqY='lqZ' lra='lrb' lrc='lrd' lre='lrf' lrg='lrh' lri='lrj' lrk='lrl' lrm='lrn' lro='lrp' lrq='lrr' lrs='lrt' lru='lrv' lrw='lrx' lry='lrz' lrA='lrB' lrC='lrD' lrE='lrF' lrG='lrH' lrI='lrJ' lrK='lrL' lrM='lrN' lrO='lrP' lrQ='lrR' lrS='lrT' lrU='lrV' lrW='lrX' lrY='lrZ' lsa='lsb' lsc='lsd' lse='lsf' lsg='lsh' lsi='lsj' lsk='lsl' lsm='lsn' lso='lsp' lsq='lsr' lss='lst' lsu='lsv' lsw='lsx' lsy='lsz' lsA='lsB' lsC='lsD' lsE='lsF' lsG='lsH' lsI='lsJ' lsK='lsL' lsM='lsN' lsO='lsP' lsQ='lsR' lsS='lsT' lsU='lsV' lsW='lsX' lsY='lsZ' lta='ltb' ltc='ltd' lte='ltf' ltg='lth' lti='ltj' ltk='ltl' ltm='ltn' lto='ltp' ltq='ltr' lts='ltt' ltu='ltv' ltw='ltx' lty='ltz' ltA='ltB' ltC='ltD' ltE='ltF' ltG='ltH' ltI='ltJ' ltK='ltL' ltM='ltN' ltO='ltP' ltQ='ltR' ltS='ltT' ltU='ltV' ltW='ltX' ltY='ltZ' lua='lub' luc='lud' lue='luf' lug='luh' lui='luj' luk='lul' lum='lun' luo='lup' luq='lur' lus='lut' luu='luv' luw='lux' luy='luz' luA='luB' luC='luD' luE='luF' luG='luH' luI='luJ' luK='luL' luM='luN' luO='luP' luQ='luR' luS='luT' luU='luV' luW='luX' luY='luZ' lva='lvb' lvc='lvd' lve='lvf' lvg='lvh' lvi='lvj' lvk='lvl' lvm='lvn' lvo='lvp' lvq='lvr' lvs='lvt' lvu='lvv' lvw='lvx' lvy='lvz' lvA='lvB' lvC='lvD' lvE='lvF' lvG='lvH' lvI='lvJ' lvK='lvL' lvM='lvN' lvO='lvP' lvQ='lvR' lvS='lvT' lvU='lvV' lvW='lvX' lvY='lvZ' lwa='lwb' lwc='lwd' lwe='lwf' lwg='lwh' lwi='lwj' lwk='lwl' lwm='lwn' lwo='lwp' lwq='lwr' lws='lwt' lwu='lwv' lww='lwx' lwy='lwz' lwA='lwB' lwC='lwD' lwE='lwF' lwG='lwH' lwI='lwJ' lwK='lwL' lwM='lwN' lwO='lwP' lwQ='lwR' lwS='lwT' lwU='lwV' lwW='lwX' lwY='lwZ' lxa='lxb' lxc='lxd' lxe='lxf' lxg='lxh' lxi='lxj' lxk='lxl' lxm='lxn' lxo='lxp' lxq='lxr' lxs='lxt' lxu='lxv' lxw='lxx' lxy='lxz' lxA='lxB' lxC='lxD' lxE='lxF' lxG='lxH' lxI='lxJ' lxK='lxL' lxM='lxN' lxO='lxP' lxQ='lxR' lxS='lxT' lxU='lxV' lxW='lxX' lxY='lxZ' lya='lyb' lyc='lyd' lye='lyf' lyg='lyh' lyi='lyj' lyk='lyl' lym='lyn' lyo='lyp' lyq='lyr' lys='lyt' lyu='lyv' lyw='lyx' lyy='lyz' lyA='lyB' lyC='lyD' lyE='lyF' lyG='lyH' lyI='lyJ' lyK='lyL' lyM='lyN' lyO='lyP' lyQ='lyR' lyS='lyT' lyU='lyV' lyW='lyX' lyY='lyZ' lza='lzb' lzc='lzd' lze='lzf' lzg='lzh' lzi='lzj' lzk='lzl' lzm='lzn' lzo='lzp' lzq='lzr' lzs='lzt' lzu='lzv' lzw='lzx' lzy='lzz' lzA='lzB' lzC='lzD' lzE='lzF' lzG='lzH' lzI='lzJ' lzK='lzL' lzM='lzN' lzO='lzP' lzQ='lzR' lzS='lzT' lzU='lzV' lzW='lzX' lzY='lzZ' lAa='lAb' lAc='lAd' lAe='lAf' lAg='lAh' lAi='lAj' lAk='lAl' lAm='lAn' lAo='lAp' lAq='lAr' lAs='lAt' lAu='lAv' lAw='lAx' lAy='lAz' lAA='lAB' lAC='lAD' lAE='lAF' lAG='lAH' lAI='lAJ' lAK='lAL' lAM='lAN' lAO='lAP' lAQ='lAR' lAS='lAT' lAU='lAV' lAW='lAX' lAY='lAZ' lBa='lBb' lBc='lBd' lBe='lBf' lBg='lBh' lBi='lBj' lBk='lBl' lBm='lBn' lBo='lBp' lBq='lBr' lBs='lBt' lBu='lBv' lBw='lBx' lBy='lBz' lBA='lBB' lBC='lBD' lBE='lBF' lBG='lBH' lBI='lBJ' lBK='lBL' lBM='lBN' lBO='lBP' lBQ='lBR' lBS='lBT' lBU='lBV' lBW='lBX' lBY='lBZ' lCa='lCb' lCc='lCd' lCe='lCf' lCg='lCh' lCi='lCj' lCk='lCl' lCm='lCn' lCo='lCp' lCq='lCr' lCs='lCt' lCu='lCv' lCw='lCx' lCy='lCz' lCA='lCB' lCC='lCD' lCE='lCF' lCG='lCH' lCI='lCJ' lCK='lCL' lCM='lCN' lCO='lCP' lCQ='lCR' lCS='lCT' lCU='lCV' lCW='lCX' lCY='lCZ' lDa='lDb' lDc='lDd' lDe='lDf' lDg='lDh' lDi='lDj' lDk='lDl' lDm='lDn' lDo='lDp' lDq='lDr' lDs='lDt' lDu='lDv' lDw='lDx' lDy='lDz' lDA='lDB' lDC='lDD' lDE='lDF' lDG='lDH' lDI='lDJ' lDK='lDL' lDM='lDN' lDO='lDP' lDQ='lDR' lDS='lDT' lDU='lDV' lDW='lDX' lDY='lDZ' lEa='lEb' lEc='lEd' lEe='lEf' lEg='lEh' lEi='lEj' lEk='lEl' lEm='lEn' lEo='lEp' lEq='lEr' lEs='lEt' lEu='lEv' lEw='lEx' lEy='lEz' lEA='lEB' lEC='lED' lEE='lEF' lEG='lEH' lEI='lEJ' lEK='lEL' lEM='lEN' lEO='lEP' lEQ='lER' lES='lET' lEU='lEV' lEW='lEX' lEY='lEZ' lFa='lFb' lFc='lFd' lFe='lFf' lFg='lFh' lFi='lFj' lFk='lFl' lFm='lFn' lFo='lFp' lFq='lFr' lFs='lFt' lFu='lFv' lFw='lFx' lFy='lFz' lFA='lFB' lFC='lFD' lFE='lFF' lFG='lFH' lFI='lFJ' lFK='lFL' lFM='lFN' lFO='lFP' lFQ='lFR' lFS='lFT' lFU='lFV' lFW='lFX' lFY='lFZ' lGa='lGb' lGc='lGd' lGe='lGf' lGg='lGh' lGi='lGj' lGk='lGl' lGm='lGn' lGo='lGp' lGq='lGr' lGs='lGt' lGu='lGv' lGw='lGx' lGy='lGz' lGA='lGB' lGC='lGD' lGE='lGF' lGG='lGH' lGI='lGJ' lGK='lGL' lGM='lGN' lGO='lGP' lGQ='lGR' lGS='lGT' lGU='lGV' lGW='lGX' lGY='lGZ' lHa='lHb' lHc='lHd' lHe='lHf' lHg='lHh' lHi='lHj' lHk='lHl' lHm='lHn' lHo='lHp' lHq='lHr' lHs='lHt' lHu='lHv' lHw='lHx' lHy='lHz' lHA='lHB' lHC='lHD' lHE='lHF' lHG='lHH' lHI='lHJ' lHK='lHL' lHM='lHN' lHO='lHP' lHQ='lHR' lHS='lHT' lHU='lHV' lHW='lHX' lHY='lHZ' lIa='lIb' lIc='lId' lIe='lIf' lIg='lIh' lIi='lIj' lIk='lIl' lIm='lIn' lIo='lIp' lIq='lIr' lIs='lIt' lIu='lIv' lIw='lIx' lIy='lIz' lIA='lIB' lIC='lID' lIE='lIF' lIG='lIH' lII='lIJ' lIK='lIL' lIM='lIN' lIO='lIP' lIQ='lIR' lIS='lIT' lIU='lIV' lIW='lIX' lIY='lIZ' lJa='lJb' lJc='lJd' lJe='lJf' lJg='lJh' lJi='lJj' lJk='lJl' lJm='lJn' lJo='lJp' lJq='lJr' lJs='lJt' lJu='lJv' lJw='lJx' lJy='lJz' lJA='lJB' lJC='lJD' lJE='lJF' lJG='lJH' lJI='lJJ' lJK='lJL' lJM='lJN' lJO='lJP' lJQ='lJR' lJS='lJT' lJU='lJV' lJW='lJX' lJY='lJZ' lKa='lKb' lKc='lKd' lKe='lKf' lKg='lKh' lKi='lKj' lKk='lKl' lKm='lKn' lKo='lKp' lKq='lKr' lKs='lKt' lKu='lKv' lKw='lKx' lKy='lKz' lKA='lKB' lKC='lKD' lKE='lKF' lKG='lKH' lKI='lKJ' lKK='lKL' lKM='lKN' lKO='lKP' lKQ='lKR' lKS='lKT' lKU='lKV' lKW='lKX' lKY='lKZ' lLa='lLb' lLc='lLd' lLe='lLf' lLg='lLh' lLi='lLj' lLk='lLl' lLm='lLn' lLo='lLp' lLq='lLr' lLs='lLt' lLu='lLv' lLw='lLx' lLy='lLz' lLA='lLB' lLC='lLD' lLE='lLF' lLG='lLH' lLI='lLJ' lLK='lLL' lLM='lLN' lLO='lLP' lLQ='lLR' lLS='lLT' lLU='lLV' lLW='lLX' lLY='lLZ' lMa='lMb' lMc='lMd' lMe='lMf' lMg='lMh' lMi='lMj' lMk='lMl' lMm='lMn' lMo='lMp' lMq='lMr' lMs='lMt' lMu='lMv' lMw='lMx' lMy='lMz' lMA='lMB' lMC='lMD' lME='lMF' lMG='lMH' lMI='lMJ' lMK='lML' lMM='lMN' lMO='lMP' lMQ='lMR' lMS='lMT' lMU='lMV' lMW='lMX' lMY='lMZ' lNa='lNb' lNc='lNd' lNe='lNf' lNg='lNh' lNi='lNj' lNk='lNl' lNm='lNn' lNo='lNp' lNq='lNr' lNs='lNt' lNu='lNv' lNw='lNx' lNy='lNz' lNA='lNB' lNC='lND' lNE='lNF' lNG='lNH' lNI='lNJ' lNK='lNL' lNM='lNN' lNO='lNP' lNQ='lNR' lNS='lNT' lNU='lNV' lNW='lNX' lNY='lNZ' lOa='lOb' lOc='lOd' lOe='lOf' lOg='lOh' lOi='lOj' lOk='lOl' lOm='lOn' lOo='lOp' lOq='lOr' lOs='lOt' lOu='lOv' lOw='lOx' lOy='lOz' lOA='lOB' lOC='lOD' lOE='lOF' lOG='lOH' lOI='lOJ' lOK='lOL' lOM='lON' lOO='lOP' lOQ='lOR' lOS='lOT' lOU='lOV' lOW='lOX' lOY='lOZ' lPa='lPb' lPc='lPd' lPe='lPf' lPg='lPh' lPi='lPj' lPk='lPl' lPm='lPn' lPo='lPp' lPq='lPr' lPs='lPt' lPu='lPv' lPw='lPx' lPy='lPz' lPA='lPB' lPC='lPD' lPE='lPF' lPG='lPH' lPI='lPJ' lPK='lPL' lPM='lPN' lPO='lPP' lPQ='lPR' lPS='lPT' lPU='lPV' lPW='lPX' lPY='lPZ' lQa='lQb' lQc='lQd' lQe='lQf' lQg='lQh' lQi='lQj' lQk='lQl' lQm='lQn' lQo='lQp' lQq='lQr' lQs='lQt' lQu='lQv' lQw='lQx' lQy='lQz' lQA='lQB' lQC='lQD' lQE='lQF' lQG='lQH' lQI='lQJ' lQK='lQL' lQM='lQN' lQO='lQP' lQQ='lQR' lQS='lQT' lQU='lQV' lQW='lQX' lQY='lQZ' lRa='lRb' lRc='lRd' lRe='lRf' lRg='lRh' lRi='lRj' lRk='lRl' lRm='lRn' lRo='lRp' lRq='lRr' lRs='lRt' lRu='lRv' lRw='lRx' lRy='lRz' lRA='lRB' lRC='lRD' lRE='lRF' lRG='lRH' lRI='lRJ' lRK='lRL' lRM='lRN' lRO='lRP' lRQ='lRR' lRS='lRT' lRU='lRV' lRW='lRX' lRY='lRZ' lSa='lSb' lSc='lSd' lSe='lSf' lSg='lSh' lSi='lSj' lSk='lSl' lSm='lSn' lSo='lSp' lSq='lSr' lSs='lSt' lSu='lSv' lSw='lSx' lSy='lSz' lSA='lSB' lSC='lSD' lSE='lSF' lSG='lSH' lSI='lSJ' lSK='lSL' lSM='lSN' lSO='lSP' lSQ='lSR' lSS='lST' lSU='lSV' lSW='lSX' lSY='lSZ' lTa='lTb' lTc='lTd' lTe='lTf' lTg='lTh' lTi='lTj' lTk='lTl' lTm='lTn' lTo='lTp' lTq='lTr' lTs='lTt' lTu='lTv' lTw='lTx' lTy='lTz' lTA='lTB' lTC='lTD' lTE='lTF' lTG='lTH' lTI='lTJ' lTK='lTL' lTM='lTN' lTO='lTP' lTQ='lTR' lTS='lTT' lTU='lTV' lTW='lTX' lTY='lTZ' lUa='lUb' lUc='lUd' lUe='lUf' lUg='lUh' lUi='lUj' lUk='lUl' lUm='lUn' lUo='lUp' lUq='lUr' lUs='lUt' lUu='lUv' lUw='lUx' lUy='lUz' lUA='lUB' lUC='lUD' lUE='lUF' lUG='lUH' lUI='lUJ' lUK='lUL' lUM='lUN' lUO='lUP' lUQ='lUR' lUS='lUT' lUU='lUV' lUW='lUX' lUY='lUZ' lVa='lVb' lVc='lVd' lVe='lVf' lVg='lVh' lVi='lVj' lVk='lVl' lVm='lVn' lVo='lVp' lVq='lVr' lVs='lVt' lVu='lVv' lVw='lVx' lVy='lVz' lVA='lVB' lVC='lVD' lVE='lVF' lVG='lVH' lVI='lVJ' lVK='lVL' lVM='lVN' lVO='lVP' lVQ='lVR' lVS='lVT' lVU='lVV' lVW='lVX' lVY='lVZ' lWa='lWb' lWc='lWd' lWe='lWf' lWg='lWh' lWi='lWj' lWk='lWl' lWm='lWn' lWo='lWp' lWq='lWr' lWs='lWt' lWu='lWv' lWw='lWx' lWy='lWz' lWA='lWB' lWC='lWD' lWE='lWF' lWG='lWH' lWI='lWJ' lWK='lWL' lWM='lWN' lWO='lWP' lWQ='lWR' lWS='lWT' lWU='lWV' lWW='lWX' lWY='lWZ' lXa='lXb' lXc='lXd' lXe='lXf' lXg='lXh' lXi='lXj' lXk='lXl' lXm='lXn' lXo='lXp' lXq='lXr' lXs='lXt' lXu='lXv' lXw='lXx' lXy='lXz' lXA='lXB' lXC='lXD' lXE='lXF' lXG='lXH' lXI='lXJ' lXK='lXL' lXM='lXN' lXO='lXP' lXQ='lXR' lXS='lXT' lXU='lXV' lXW='lXX' lXY='lXZ' lYa='lYb' lYc='lYd' lYe='lYf' lYg='lYh' lYi='lYj' lYk='lYl' lYm='lYn' lYo='lYp' lYq='lYr' lYs='lYt' lYu='lYv' lYw='lYx' lYy='lYz' lYA='lYB' lYC='lYD' lYE='lYF' lYG='lYH' lYI='lYJ' lYK='lYL' lYM='lYN' lYO='lYP' lYQ='lYR' lYS='lYT' lYU='lYV' lYW='lYX' lYY='lYZ' lZa='lZb' lZc='lZd' lZe='lZf' lZg='lZh' lZi='lZj' lZk='lZl' lZm='lZn' lZo='lZp' lZq='lZr' lZs='lZt' lZu='lZv' lZw='lZx' lZy='lZz' lZA='lZB' lZC='lZD' lZE='lZF' lZG='lZH' lZI='lZJ' lZK='lZL' lZM='lZN' lZO='lZP' lZQ='lZR' lZS='lZT' lZU='lZV' lZW='lZX' lZY='lZZ' maa='mab' mac='mad' mae='maf' mag='mah' mai='maj' mak='mal' mam='man' mao='map' maq='mar' mas='mat' mau='mav' maw='max' may='maz' maA='maB' maC='maD' maE='maF' maG='maH' maI='maJ' maK='maL' maM='maN' maO='maP' maQ='maR' maS='maT' maU='maV' maW='maX' maY='maZ' mba='mbb' mbc='mbd' mbe='mbf' mbg='mbh' mbi='mbj' mbk='mbl' mbm='mbn' mbo='mbp' mbq='mbr' mbs='mbt' mbu='mbv' mbw='mbx' mby='mbz' mbA='mbB' mbC='mbD' mbE='mbF' mbG='mbH' mbI='mbJ' mbK='mbL' mbM='mbN' mbO='mbP' mbQ='mbR' mbS='mbT' mbU='mbV' mbW='mbX' mbY='mbZ' mca='mcb' mcc='mcd' mce='mcf' mcg='mch' mci='mcj' mck='mcl' mcm='mcn' mco='mcp' mcq='mcr' mcs='mct' mcu='mcv' mcw='mcx' mcy='mcz' mcA='mcB' mcC='mcD' mcE='mcF' mcG='mcH' mcI='mcJ' mcK='mcL' mcM='mcN' mcO='mcP' mcQ='mcR' mcS='mcT' mcU='mcV' mcW='mcX' mcY='mcZ' mda='mdb' mdc='mdd' mde='mdf' mdg='mdh' mdi='mdj' mdk='mdl' mdm='mdn' mdo='mdp' mdq='mdr' mds='mdt' mdu='mdv' mdw='mdx' mdy='mdz' mdA='mdB' mdC='mdD' mdE='mdF' mdG='mdH' mdI='mdJ' mdK='mdL' mdM='mdN' mdO='mdP' mdQ='mdR' mdS='mdT' mdU='mdV' mdW='mdX' mdY='mdZ' mea='meb' mec='med' mee='mef' meg='meh' mei='mej' mek='mel' mem='men' meo='mep' meq='mer' mes='met' meu='mev' mew='mex' mey='mez' meA='meB' meC='meD' meE='meF' meG='meH' meI='meJ' meK='meL' meM='meN' meO='meP' meQ='meR' meS='meT' meU='meV' meW='meX' meY='meZ' mfa='mfb' mfc='mfd' mfe='mff' mfg='mfh' mfi='mfj' mfk='mfl' mfm='mfn' mfo='mfp' mfq='mfr' mfs='mft' mfu='mfv' mfw='mfx' mfy='mfz' mfA='mfB' mfC='mfD' mfE='mfF' mfG='mfH' mfI='mfJ' mfK='mfL' mfM='mfN' mfO='mfP' mfQ='mfR' mfS='mfT' mfU='mfV' mfW='mfX' mfY='mfZ' mga='mgb' mgc='mgd' mge='mgf' mgg='mgh' mgi='mgj' mgk='mgl' mgm='mgn' mgo='mgp' mgq='mgr' mgs='mgt' mgu='mgv' mgw='mgx' mgy='mgz' mgA='mgB' mgC='mgD' mgE='mgF' mgG='mgH' mgI='mgJ' mgK='mgL' mgM='mgN' mgO='mgP' mgQ='mgR' mgS='mgT' mgU='mgV' mgW='mgX' mgY='mgZ' mha='mhb' mhc='mhd' mhe='mhf' mhg='mhh' mhi='mhj' mhk='mhl' mhm='mhn' mho='mhp' mhq='mhr' mhs='mht' mhu='mhv' mhw='mhx' mhy='mhz' mhA='mhB' mhC='mhD' mhE='mhF' mhG='mhH' mhI='mhJ' mhK='mhL' mhM='mhN' mhO='mhP' mhQ='mhR' mhS='mhT' mhU='mhV' mhW='mhX' mhY='mhZ' mia='mib' mic='mid' mie='mif' mig='mih' mii='mij' mik='mil' mim='min' mio='mip' miq='mir' mis='mit' miu='miv' miw='mix' miy='miz' miA='miB' miC='miD' miE='miF' miG='miH' miI='miJ' miK='miL' miM='miN' miO='miP' miQ='miR' miS='miT' miU='miV' miW='miX' miY='miZ' mja='mjb' mjc='mjd' mje='mjf' mjg='mjh' mji='mjj' mjk='mjl' mjm='mjn' mjo='mjp' mjq='mjr' mjs='mjt' mju='mjv' mjw='mjx' mjy='mjz' mjA='mjB' mjC='mjD' mjE='mjF' mjG='mjH' mjI='mjJ' mjK='mjL' mjM='mjN' mjO='mjP' mjQ='mjR' mjS='mjT' mjU='mjV' mjW='mjX' mjY='mjZ' mka='mkb' mkc='mkd' mke='mkf' mkg='mkh' mki='mkj' mkk='mkl' mkm='mkn' mko='mkp' mkq='mkr' mks='mkt' mku='mkv' mkw='mkx' mky='mkz' mkA='mkB' mkC='mkD' mkE='mkF' mkG='mkH' mkI='mkJ' mkK='mkL' mkM='mkN' mkO='mkP' mkQ='mkR' mkS='mkT' mkU='mkV' mkW='mkX' mkY='mkZ' mla='mlb' mlc='mld' mle='mlf' mlg='mlh' mli='mlj' mlk='mll' mlm='mln' mlo='mlp' mlq='mlr' mls='mlt' mlu='mlv' mlw='mlx' mly='mlz' mlA='mlB' mlC='mlD' mlE='mlF' mlG='mlH' mlI='mlJ' mlK='mlL' mlM='mlN' mlO='mlP' mlQ='mlR' mlS='mlT' mlU='mlV' mlW='mlX' mlY='mlZ' mma='mmb' mmc='mmd' mme='mmf' mmg='mmh' mmi='mmj' mmk='mml' mmm='mmn' mmo='mmp' mmq='mmr' mms='mmt' mmu='mmv' mmw='mmx' mmy='mmz' mmA='mmB' mmC='mmD' mmE='mmF' mmG='mmH' mmI='mmJ' mmK='mmL' mmM='mmN' mmO='mmP' mmQ='mmR' mmS='mmT' mmU='mmV' mmW='mmX' mmY='mmZ' mna='mnb' mnc='mnd' mne='mnf' mng='mnh' mni='mnj' mnk='mnl' mnm='mnn' mno='mnp' mnq='mnr' mns='mnt' mnu='mnv' mnw='mnx' mny='mnz' mnA='mnB' mnC='mnD' mnE='mnF' mnG='mnH' mnI='mnJ' mnK='mnL' mnM='mnN' mnO='mnP' mnQ='mnR' mnS='mnT' mnU='mnV' mnW='mnX' mnY='mnZ' moa='mob' moc='mod' moe='mof' mog='moh' moi='moj' mok='mol' mom='mon' moo='mop' moq='mor' mos='mot' mou='mov' mow='mox' moy='moz' moA='moB' moC='moD' moE='moF' moG='moH' moI='moJ' moK='moL' moM='moN' moO='moP' moQ='moR' moS='moT' moU='moV' moW='moX' moY='moZ' mpa='mpb' mpc='mpd' mpe='mpf' mpg='mph' mpi='mpj' mpk='mpl' mpm='mpn' mpo='mpp' mpq='mpr' mps='mpt' mpu='mpv' mpw='mpx' mpy='mpz' mpA='mpB' mpC='mpD' mpE='mpF' mpG='mpH' mpI='mpJ' mpK='mpL' mpM='mpN' mpO='mpP' mpQ='mpR' mpS='mpT' mpU='mpV' mpW='mpX' mpY='mpZ' mqa='mqb' mqc='mqd' mqe='mqf' mqg='mqh' mqi='mqj' mqk='mql' mqm='mqn' mqo='mqp' mqq='mqr' mqs='mqt' mqu='mqv' mqw='mqx' mqy='mqz' mqA='mqB' mqC='mqD' mqE='mqF' mqG='mqH' mqI='mqJ' mqK='mqL' mqM='mqN' mqO='mqP' mqQ='mqR' mqS='mqT' mqU='mqV' mqW='mqX' mqY='mqZ' mra='mrb' mrc='mrd' mre='mrf' mrg='mrh' mri='mrj' mrk='mrl' mrm='mrn' mro='mrp' mrq='mrr' mrs='mrt' mru='mrv' mrw='mrx' mry='mrz' mrA='mrB' mrC='mrD' mrE='mrF' mrG='mrH' mrI='mrJ' mrK='mrL' mrM='mrN' mrO='mrP' mrQ='mrR' mrS='mrT' mrU='mrV' mrW='mrX' mrY='mrZ' msa='msb' msc='msd' mse='msf' msg='msh' msi='msj' msk='msl' msm='msn' mso='msp' msq='msr' mss='mst' msu='msv' msw='msx' msy='msz' msA='msB' msC='msD' msE='msF' msG='msH' msI='msJ' msK='msL' msM='msN' msO='msP' msQ='msR' msS='msT' msU='msV' msW='msX' msY='msZ' mta='mtb' mtc='mtd' mte='mtf' mtg='mth' mti='mtj' mtk='mtl' mtm='mtn' mto='mtp' mtq='mtr' mts='mtt' mtu='mtv' mtw='mtx' mty='mtz' mtA='mtB' mtC='mtD' mtE='mtF' mtG='mtH' mtI='mtJ' mtK='mtL' mtM='mtN' mtO='mtP' mtQ='mtR' mtS='mtT' mtU='mtV' mtW='mtX' mtY='mtZ' mua='mub' muc='mud' mue='muf' mug='muh' mui='muj' muk='mul' mum='mun' muo='mup' muq='mur' mus='mut' muu='muv' muw='mux' muy='muz' muA='muB' muC='muD' muE='muF' muG='muH' muI='muJ' muK='muL' muM='muN' muO='muP' muQ='muR' muS='muT' muU='muV' muW='muX' muY='muZ' mva='mvb' mvc='mvd' mve='mvf' mvg='mvh' /><xsl:value-of select='ceiling(133721)'/><xsl:value-of select='ceiling(133722)'/><xsl:value-of select='ceiling(133723)'/><xsl:value-of select='ceiling(133724)'/></xsl:template>
+        
+        <!--
+	   * Licensed to the Apache Software Foundation (ASF) under one
+	   * or more contributor license agreements. See the NOTICE file
+	   * distributed with this work for additional information
+	   * regarding copyright ownership. The ASF licenses this file
+	   * to you 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.
+         -->
+</xsl:stylesheet>
diff --git a/test/tests/2.7.3_release/jira_xalanj_2584.xml b/test/tests/2.7.3_release/jira_xalanj_2584.xml
new file mode 100644
index 0000000..bf35cb1
--- /dev/null
+++ b/test/tests/2.7.3_release/jira_xalanj_2584.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root/>
\ No newline at end of file
diff --git a/test/tests/2.7.3_release/jira_xalanj_2584.xsl b/test/tests/2.7.3_release/jira_xalanj_2584.xsl
new file mode 100644
index 0000000..c24cc8d
--- /dev/null
+++ b/test/tests/2.7.3_release/jira_xalanj_2584.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org"
+                xmlns:date="http://exslt.org/dates-and-times"
+                extension-element-prefixes="date exsl"
+                version="1.0">
+                
+    <!-- FileName   :  jira_xalanj_2584.xsl -->
+    <!-- Author     :  Mukul Gandhi -->
+    <!-- Purpose    :  Please see the jira issue XALANJ-2584, for more details 
+                       about this test. -->                
+    
+    <xsl:template match="/">
+      <xsl:element name="root">
+        <xsl:value-of select="date:date(root/@anAttribute)"/>
+      </xsl:element>
+    </xsl:template>
+    
+    <!--
+       * Licensed to the Apache Software Foundation (ASF) under one
+       * or more contributor license agreements. See the NOTICE file
+       * distributed with this work for additional information
+       * regarding copyright ownership. The ASF licenses this file
+       * to you 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.
+    -->
+    
+</xsl:stylesheet>
+
+
+
diff --git a/test/tests/2.7.3_release/jira_xalanj_2623.xml b/test/tests/2.7.3_release/jira_xalanj_2623.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/2.7.3_release/jira_xalanj_2623.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/2.7.3_release/jira_xalanj_2623.xsd b/test/tests/2.7.3_release/jira_xalanj_2623.xsd
new file mode 100644
index 0000000..1506cba
--- /dev/null
+++ b/test/tests/2.7.3_release/jira_xalanj_2623.xsd
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+   <xs:element name="doc" type="xs:dateTime"/>
+	
+</xs:schema>
+
+
diff --git a/test/tests/2.7.3_release/jira_xalanj_2623.xsl b/test/tests/2.7.3_release/jira_xalanj_2623.xsl
new file mode 100644
index 0000000..7f924b2
--- /dev/null
+++ b/test/tests/2.7.3_release/jira_xalanj_2623.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:date="http://exslt.org/dates-and-times"
+                exclude-result-prefixes="date">
+ 
+<xsl:output method="xml"/>
+
+  <!-- FileName   :  jira_xalanj_2623.xsl -->
+  <!-- Author     :  Mukul Gandhi -->
+  <!-- Purpose    :  Test for the date-time() extension function. Please see the jira 
+                     issue XALANJ-2623, for more details about this test. -->
+
+<xsl:template match="/">
+  <xsl:variable name="date" select="date:date-time()"/>
+  <doc><xsl:value-of select="$date"/></doc>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept-gold/collation/collation01.XalanJ-C.out b/test/tests/accept-gold/collation/collation01.XalanJ-C.out
new file mode 100644
index 0000000..09cd9df
--- /dev/null
+++ b/test/tests/accept-gold/collation/collation01.XalanJ-C.out
@@ -0,0 +1,41 @@
+<out>
+  
+    &#945;aaa
+    &#946;bbb
+    &#947;ccc
+    &#948;ddd
+    &#949;eee
+    &#950;fff
+    &#951;ggg
+    &#952;hhh
+    &#953;iii
+    &#954;jjj
+    &#955;kkk
+    &#956;lll
+    &#957;mmm
+    &#958;nnn
+    &#959;ooo
+    &#960;ppp
+    &#961;qqq
+    &#962;rrr
+    &#963;sss
+    &#964;ttt
+    &#965;uuu
+    &#966;vvv
+    &#967;www
+    &#968;xxx
+    &#969;yyy
+    &#945;&#945;zzz
+    &#945;&#946;aab
+    &#945;&#947;aac
+    &#945;&#948;aad
+    &#945;&#949;aae
+    &#945;&#950;aaf
+    &#945;&#951;aag
+  
+  
+    &#945;ddd
+    &#946;eee
+    &#947;fff
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/collation/collation01.out b/test/tests/accept-gold/collation/collation01.out
new file mode 100644
index 0000000..9818b7e
--- /dev/null
+++ b/test/tests/accept-gold/collation/collation01.out
@@ -0,0 +1,41 @@
+<out>
+  
+    &#945;aaa
+    &#946;bbb
+    &#947;ccc
+    &#948;ddd
+    &#949;eee
+    &#987;fff
+    &#950;ggg
+    &#951;hhh
+    &#952;iii
+    &#953;jjj
+    &#953;&#945;kkk
+    &#953;&#946;lll
+    &#953;&#947;mmm
+    &#953;&#948;nnn
+    &#953;&#949;ooo
+    &#953;&#987;ppp
+    &#953;&#950;qqq
+    &#953;&#951;rrr
+    &#953;&#952;sss
+    &#954;ttt
+    &#954;&#945;uuu
+    &#954;&#946;vvv
+    &#954;&#947;www
+    &#954;&#948;xxx
+    &#954;&#949;yyy
+    &#954;&#987;zzz
+    &#954;&#950;aab
+    &#954;&#951;aac
+    &#954;&#952;aad
+    &#955;aae
+    &#955;&#945;aaf
+    &#955;&#946;aag
+  
+  
+    &#945;ddd
+    &#946;eee
+    &#947;fff
+  
+</out>
diff --git a/test/tests/accept-gold/collation/collation02.XalanJ-C.out b/test/tests/accept-gold/collation/collation02.XalanJ-C.out
new file mode 100644
index 0000000..3a835de
--- /dev/null
+++ b/test/tests/accept-gold/collation/collation02.XalanJ-C.out
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (B) aaa
+    (C) bbb
+    (D) ccc
+    (E) ddd
+    (F) eee
+    (G) fff
+    (H) ggg
+    (I) hhh
+    (J) iii
+    (K) jjj
+    (L) kkk
+    (M) lll
+    (N) mmm
+    (O) nnn
+    (P) ooo
+    (Q) ppp
+    (R) qqq
+    (S) rrr
+    (T) sss
+    (U) ttt
+    (V) uuu
+  
+  
+    (B) ddd
+    (C) eee
+    (D) fff
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/collation/collation02.out b/test/tests/accept-gold/collation/collation02.out
new file mode 100644
index 0000000..4e4e643
--- /dev/null
+++ b/test/tests/accept-gold/collation/collation02.out
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+    (4) ddd
+    (5) eee
+    (6) fff
+    (7) ggg
+    (8) hhh
+    (9) iii
+    (10) jjj
+    (11) kkk
+    (12) lll
+    (13) mmm
+    (14) nnn
+    (15) ooo
+    (16) ppp
+    (17) qqq
+    (18) rrr
+    (19) sss
+    (20) ttt
+    (21) uuu
+  
+  
+    (1) ddd
+    (2) eee
+    (3) fff
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/entref/entref01.out b/test/tests/accept-gold/entref/entref01.out
new file mode 100644
index 0000000..7c38e74
--- /dev/null
+++ b/test/tests/accept-gold/entref/entref01.out
@@ -0,0 +1,17 @@
+<out>
+
+    1. "&amp;"   <A HREF="&"></A>
+    2. "&lt;"    <A href="<"></A>
+    3. "&gt;"    <A href=">"></A>
+    4. """  <A href="%22"></A>
+    5. "'"  <A href="'"></A>
+    6. "&copy;"  <A HREF="%C2%A9"></A>	
+    7. "#"  <A href="#"></A>	
+    8. "&yen;"  <A href="%C2%A5"></A>	
+    9. " "  <A href=" "></A><img src="Test 31 Gif.gif">
+   10."%"  <A href="%"></A>	
+   11."	"  <A href="%09"></A>	
+   12."&#127;"  <A href="%7F"></A>	
+   13."&Ntilde;"  <A href="%C3%91"></A>	
+   14."Œ"  <A href="%C5%92"></A><A href="phnix.html">test1</A><A href="ph%C3%85%C2%92nix.html">test2</A>
+</out>
diff --git a/test/tests/accept-gold/entref/entref02.out b/test/tests/accept-gold/entref/entref02.out
new file mode 100644
index 0000000..fbb5b35
--- /dev/null
+++ b/test/tests/accept-gold/entref/entref02.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>,
+<a> a</a><b>	b</b><c>&#13;c</c><d>
+d</d></out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/entref/entref03.out b/test/tests/accept-gold/entref/entref03.out
new file mode 100644
index 0000000..3f971ee
--- /dev/null
+++ b/test/tests/accept-gold/entref/entref03.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> a. 
+	 , ,	
+    		, 
+    &#13;		, 
+    
+			<end>		This will not be stripped.	</end>,
+	<end2/></out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/generated/generated01.XalanJ-C.out b/test/tests/accept-gold/generated/generated01.XalanJ-C.out
new file mode 100644
index 0000000..f9222af
--- /dev/null
+++ b/test/tests/accept-gold/generated/generated01.XalanJ-C.out
@@ -0,0 +1,24 @@
+<HTML>
+<P>Reference numbers should match the titles, links should work.</P>
+<HR>
+<H1 id="N65540">1. Introduction</H1>
+    Introduction
+    <P>For more information see the <A href="#N65578">3. Expressions</A> section.</P>
+    
+<P>(alternate id link: id3)</P>
+  
+<HR>
+<H1 id="N65559">2. Stylesheet Structure</H1>
+    Stylesheet Structure
+    <P>For more information see the <A href="#N65540">1. Introduction</A> section.</P>
+    
+<P>(alternate id link: id1)</P>
+  
+<HR>
+<H1 id="N65578">3. Expressions</H1>
+    Expressions
+    <P>For more information see the <A href="#N65559">2. Stylesheet Structure</A> section.</P>
+    
+<P>(alternate id link: id2)</P>
+  
+</HTML>
diff --git a/test/tests/accept-gold/generated/generated01.out b/test/tests/accept-gold/generated/generated01.out
new file mode 100644
index 0000000..0cc9b64
--- /dev/null
+++ b/test/tests/accept-gold/generated/generated01.out
@@ -0,0 +1,24 @@
+<HTML>
+<P>Reference numbers should match the titles, links should work.</P>
+<HR>
+<H1 id="N10004">1. Introduction</H1>
+    Introduction
+    <P>For more information see the <A href="#N1002A">3. Expressions</A> section.</P>
+    
+<P>(alternate id link: id3)</P>
+  
+<HR>
+<H1 id="N10017">2. Stylesheet Structure</H1>
+    Stylesheet Structure
+    <P>For more information see the <A href="#N10004">1. Introduction</A> section.</P>
+    
+<P>(alternate id link: id1)</P>
+  
+<HR>
+<H1 id="N1002A">3. Expressions</H1>
+    Expressions
+    <P>For more information see the <A href="#N10017">2. Stylesheet Structure</A> section.</P>
+    
+<P>(alternate id link: id2)</P>
+  
+</HTML>
diff --git a/test/tests/accept-gold/generated/generated02.XalanJ-C.out b/test/tests/accept-gold/generated/generated02.XalanJ-C.out
new file mode 100644
index 0000000..3616b6e
--- /dev/null
+++ b/test/tests/accept-gold/generated/generated02.XalanJ-C.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>N65537,N65539,N65540,N65541,;N65542,;N65543,;N65544,;N65545,;N65546,N65547,N65548,;N65549,N65550,N65551,;N65552,;;N65553,;;N65554,;</out>
diff --git a/test/tests/accept-gold/generated/generated02.out b/test/tests/accept-gold/generated/generated02.out
new file mode 100644
index 0000000..97cb173
--- /dev/null
+++ b/test/tests/accept-gold/generated/generated02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>N10001,N10003,N10004,N10005,;N10006,;N10007,;N10008,;N10009,;N1000A,N1000B,N1000C,;N1000D,N1000E,N1000F,;N10010,;;N10011,;;N10012,;</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/generated/generated03.XalanJ-C.out b/test/tests/accept-gold/generated/generated03.XalanJ-C.out
new file mode 100644
index 0000000..00eb27f
--- /dev/null
+++ b/test/tests/accept-gold/generated/generated03.XalanJ-C.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><values>3A-Hello,  3B-Shirt,  3B-Overt,  3C-GoodBye,  3D-Tie,  3D-Sly,  </values>
+<ids>N196612,  N262148,  N262151,  N327684,  N393220,  N393223,  </ids></out>
diff --git a/test/tests/accept-gold/generated/generated03.out b/test/tests/accept-gold/generated/generated03.out
new file mode 100644
index 0000000..ffec933
--- /dev/null
+++ b/test/tests/accept-gold/generated/generated03.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><values>3A-Hello,  3B-Shirt,  3B-Overt,  3C-GoodBye,  3D-Tie,  3D-Sly,  </values>
+<ids>N30004,  N40004,  N40007,  N50004,  N60004,  N60007,  </ids></out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/outputaccept/outputaccept01.out b/test/tests/accept-gold/outputaccept/outputaccept01.out
new file mode 100644
index 0000000..ec78cca
--- /dev/null
+++ b/test/tests/accept-gold/outputaccept/outputaccept01.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+attribute 1 attribute 2
+</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spacing/spacing01.out b/test/tests/accept-gold/spacing/spacing01.out
new file mode 100644
index 0000000..38ceef0
--- /dev/null
+++ b/test/tests/accept-gold/spacing/spacing01.out
@@ -0,0 +1 @@
+<HTML><a href="Good Job"></a></HTML>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spacing/spacing02.out b/test/tests/accept-gold/spacing/spacing02.out
new file mode 100644
index 0000000..801102e
--- /dev/null
+++ b/test/tests/accept-gold/spacing/spacing02.out
@@ -0,0 +1,22 @@
+<html lang="en">
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Sales Results By Division</title>
+</head>
+<body>
+<table border="1">
+<tr>
+<th>Division</th><th>Revenue</th><th>Growth</th><th>Bonus</th>
+</tr>
+<tr>
+<td><em>North</em></td><td>10</td><td>9</td><td>7</td>
+</tr>
+<tr>
+<td><em>West</em></td><td>6</td><td style="color:red">-1.5</td><td>2</td>
+</tr>
+<tr>
+<td><em>South</em></td><td>4</td><td>3</td><td>4</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/test/tests/accept-gold/spec11/spec1101.out b/test/tests/accept-gold/spec11/spec1101.out
new file mode 100644
index 0000000..6ef2f14
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1101.out
@@ -0,0 +1,3 @@
+<?xml version="1.1" encoding="UTF-8"?><out>

+      Hello World!

+    </out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spec11/spec1102.out b/test/tests/accept-gold/spec11/spec1102.out
new file mode 100644
index 0000000..9d89f99
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1102.out
@@ -0,0 +1 @@
+<?xml version="1.1" encoding="UTF-8"?><out>&#8;&#31;</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spec11/spec1103.out b/test/tests/accept-gold/spec11/spec1103.out
new file mode 100644
index 0000000..c2481ee
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1103.out
@@ -0,0 +1 @@
+<?xml version="1.1" encoding="UTF-8"?><out>&#130;&#143;</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spec11/spec1104.out b/test/tests/accept-gold/spec11/spec1104.out
new file mode 100644
index 0000000..545c6a5
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1104.out
@@ -0,0 +1 @@
+<?xml version="1.1" encoding="UTF-8"?><out>&#133;&#8232;</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spec11/spec1105.out b/test/tests/accept-gold/spec11/spec1105.out
new file mode 100644
index 0000000..90ef0de
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1105.out
@@ -0,0 +1,5 @@
+<?xml version="1.1" encoding="UTF-8"?>

+<out/>

+<!-- This is a comment 
 -->

+<?hellopi hello 
   …   ?>

+

diff --git a/test/tests/accept-gold/spec11/spec1106.out b/test/tests/accept-gold/spec11/spec1106.out
new file mode 100644
index 0000000..2642ebe
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1106.out
@@ -0,0 +1 @@
+<?xml version="1.1" encoding="UTF-8"?><out>These are not spacees: &#8232; &#133;</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spec11/spec1107.out b/test/tests/accept-gold/spec11/spec1107.out
new file mode 100644
index 0000000..4789bd1
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1107.out
@@ -0,0 +1 @@
+<?xml version="1.1" encoding="UTF-8"?><out/>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spec11/spec1108.out b/test/tests/accept-gold/spec11/spec1108.out
new file mode 100644
index 0000000..cbb16ce
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1108.out
@@ -0,0 +1,7 @@
+<?xml version="1.1" encoding="UTF-8"?><Countries>

+<Country>  Canada</Country>

+<Country>   USA</Country>

+<Country>UK  </Country>

+<Country/>

+<Country> &#8232; </Country>

+</Countries>
\ No newline at end of file
diff --git a/test/tests/accept-gold/spec11/spec1109.out b/test/tests/accept-gold/spec11/spec1109.out
new file mode 100644
index 0000000..d774a52
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1109.out
@@ -0,0 +1,2 @@
+<?xml version="1.1" encoding="UTF-8"?>

+<pre:out xmlns:pre="http://example.org/preÀ"/>

diff --git a/test/tests/accept-gold/spec11/spec1110.out b/test/tests/accept-gold/spec11/spec1110.out
new file mode 100644
index 0000000..0f6630a
--- /dev/null
+++ b/test/tests/accept-gold/spec11/spec1110.out
@@ -0,0 +1,2 @@
+<?xml version="1.1" encoding="UTF-8"?>

+<out xmlns:pre="http://example.org/pre¢"/>

diff --git a/test/tests/accept-gold/systemproperty/systemproperty01.XalanJ-C.out b/test/tests/accept-gold/systemproperty/systemproperty01.XalanJ-C.out
new file mode 100644
index 0000000..58d6d40
--- /dev/null
+++ b/test/tests/accept-gold/systemproperty/systemproperty01.XalanJ-C.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1.0</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/systemproperty/systemproperty01.out b/test/tests/accept-gold/systemproperty/systemproperty01.out
new file mode 100644
index 0000000..58d6d40
--- /dev/null
+++ b/test/tests/accept-gold/systemproperty/systemproperty01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1.0</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/systemproperty/systemproperty02.XalanJ-C.out b/test/tests/accept-gold/systemproperty/systemproperty02.XalanJ-C.out
new file mode 100644
index 0000000..3364a3c
--- /dev/null
+++ b/test/tests/accept-gold/systemproperty/systemproperty02.XalanJ-C.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Apache Software Foundation (Xalan XSLTC)</out>
\ No newline at end of file
diff --git a/test/tests/accept-gold/systemproperty/systemproperty02.out b/test/tests/accept-gold/systemproperty/systemproperty02.out
new file mode 100644
index 0000000..ef2321c
--- /dev/null
+++ b/test/tests/accept-gold/systemproperty/systemproperty02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Apache Software Foundation</out>
\ No newline at end of file
diff --git a/test/tests/accept/collation/collation01.xml b/test/tests/accept/collation/collation01.xml
new file mode 100644
index 0000000..044d5b7
--- /dev/null
+++ b/test/tests/accept/collation/collation01.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>zzz</note>
+    <note>aab</note>
+    <note>aac</note>
+    <note>aad</note>
+    <note>aae</note>
+    <note>aaf</note>
+    <note>aag</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/collation/collation01.xsl b/test/tests/accept/collation/collation01.xsl
new file mode 100644
index 0000000..b699820
--- /dev/null
+++ b/test/tests/accept/collation/collation01.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: collation01 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of greek-numeral "traditional" sequence. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[6]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[5]/text()[6]" -->
+  <!-- Scenario: operation="standard-HTML" -->
+  <!-- Discretionary: number-greek-trad="true" -->
+
+<xsl:output method="html" encoding="ISO-8859-1" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="&#x03b1;" letter-value="traditional"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/collation/collation02.xml b/test/tests/accept/collation/collation02.xml
new file mode 100644
index 0000000..86cffad
--- /dev/null
+++ b/test/tests/accept/collation/collation02.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
diff --git a/test/tests/accept/collation/collation02.xsl b/test/tests/accept/collation/collation02.xsl
new file mode 100644
index 0000000..4dfd417
--- /dev/null
+++ b/test/tests/accept/collation/collation02.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: collation02 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of unrecognized alphabetic format code; should just give digits. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[6]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Discretionary: number-arbitrary-alpha="false" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(B) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/entref/entref01.xml b/test/tests/accept/entref/entref01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/accept/entref/entref01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/entref/entref01.xsl b/test/tests/accept/entref/entref01.xsl
new file mode 100644
index 0000000..b591d8c
--- /dev/null
+++ b/test/tests/accept/entref/entref01.xsl
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="html"/>
+
+
+
+  <!-- FileName: entref01 -->
+
+  <!-- Document: http://www.w3.org/TR/xslt -->
+
+  <!-- DocVersion: 19991116 -->
+
+  <!-- Section: 16.2 HTML Output Method -->
+
+  <!-- Purpose: ESC of non-ASCII chars in URI attribute	values using method 
+
+       cited in Section B.2.1 of HTML 4.0 Spec. -->
+
+
+
+<xsl:template match="/">
+
+  <out>
+
+
+
+    1. "&amp;"   <A HREF="&amp;"/>
+
+    2. "&lt;"    <A href="&lt;"/>
+
+    3. "&gt;"    <A href="&gt;"/>
+
+    4. "&quot;"  <A href="&quot;"/>
+
+    5. "&apos;"  <A href="&apos;"/>
+
+    6. "&#169;"  <A HREF="&#169;"/>	<!-- Copyright -->
+
+    7. "&#035;"  <A href="&#035;"/>	<!-- Hashmark -->
+
+    8. "&#165;"  <A href="&#165;"/>	<!-- yen      -->
+
+    9. "&#032;"  <A href="&#032;"/>	<img src="Test 31 Gif.gif"/>
+
+   10."&#037;"  <A href="&#037;"/>	<!-- percent -->
+
+   11."&#009;"  <A href="&#009;"/>	<!-- tab    -->
+
+   12."&#127;"  <A href="&#127;"/>	<!-- delete  -->
+
+   13."&#209;"  <A href="&#209;"/>	<!-- N-tilde -->
+
+   14."&#338;"  <A href="&#338;"/>  <!-- OE Ligature -->
+
+   <A href="phnix.html">test1</A>
+
+      <A href="phŒnix.html">test2</A> 
+
+  </out>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/entref/entref02.xml b/test/tests/accept/entref/entref02.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/accept/entref/entref02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/entref/entref02.xsl b/test/tests/accept/entref/entref02.xsl
new file mode 100644
index 0000000..7ee5a80
--- /dev/null
+++ b/test/tests/accept/entref/entref02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: entref02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test use of whitespace character entities. -->
+
+<xsl:template match="/">
+<out>,
+<a>&#32;a</a><b>&#09;b</b><c>&#13;c</c><d>&#10;d</d>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/entref/entref03.xml b/test/tests/accept/entref/entref03.xml
new file mode 100644
index 0000000..977fcc2
--- /dev/null
+++ b/test/tests/accept/entref/entref03.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc/>
\ No newline at end of file
diff --git a/test/tests/accept/entref/entref03.xsl b/test/tests/accept/entref/entref03.xsl
new file mode 100644
index 0000000..ae63f22
--- /dev/null
+++ b/test/tests/accept/entref/entref03.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: entref03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This is a general test of whitespace handling.
+    It verifies the handling of the special whitespace
+    characters (space, tab, CR, LF) In different situations.
+       1. within xsl:text where they should not be stripped,
+       2. within LREs <end2> where they may be stripped. -->
+
+<xsl:template match="/">
+  <out>
+	<xsl:text> a. <!-- This -->
+	 ,</xsl:text>
+    <xsl:text>&#32;</xsl:text>,	<!-- Contains space -->
+    <xsl:text>&#09;	</xsl:text>, <!-- Contains tab and 1 tab -->
+    <xsl:text>&#13;		</xsl:text>, <!-- Contains CR and 2 tabs -->
+    <xsl:text>&#10;			</xsl:text> <!-- Contains NL and 3 tabs -->
+
+
+
+
+	 
+
+
+	<end>		This will not be stripped.	</end>,
+	<end2>&#32;	&#09;	&#13;	&#10;     </end2>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/generated/generated01.xml b/test/tests/accept/generated/generated01.xml
new file mode 100644
index 0000000..0842db4
--- /dev/null
+++ b/test/tests/accept/generated/generated01.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <div id="id1">
+    <title>Introduction</title>
+    <p>For more information see the <divref>Expressions</divref> section.</p>
+    <p>(alternate id link: <keydivref>id3</keydivref>)</p>
+  </div>
+  
+  <div id="id2">
+    <title>Stylesheet Structure</title>
+    <p>For more information see the <divref>Introduction</divref> section.</p>
+    <p>(alternate id link: <keydivref>id1</keydivref>)</p>
+  </div>
+  
+  <div id="id3">
+    <title>Expressions</title>
+    <p>For more information see the <divref>Stylesheet Structure</divref> section.</p>
+    <p>(alternate id link: <keydivref>id2</keydivref>)</p>
+  </div>
+</doc>
diff --git a/test/tests/accept/generated/generated01.xsl b/test/tests/accept/generated/generated01.xsl
new file mode 100644
index 0000000..593c5f5
--- /dev/null
+++ b/test/tests/accept/generated/generated01.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: generated01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Build links using keys and generate-id(). -->
+
+<xsl:output method="html" indent="yes"/>
+
+<xsl:key name="titles" match="div" use="title"/>
+<xsl:key name="id" match="@id" use="@id"/>
+
+<xsl:template match="doc">
+  <HTML><P>Reference numbers should match the titles, links should work.</P>
+    <xsl:for-each select="div">
+      <HR/>
+      <H1 id="{generate-id(.)}">
+        <xsl:number level="multiple" count="div" format="1.1. "/>
+        <xsl:value-of select="title"/></H1>
+      <xsl:apply-templates/>
+    </xsl:for-each>
+  </HTML>
+</xsl:template>
+
+<xsl:template match="p">
+  <P><xsl:apply-templates/></P>
+</xsl:template>
+
+<xsl:template match="divref">
+  <A href="#{generate-id(key('titles', .))}">
+    <xsl:for-each select="key('titles', .)">
+      <xsl:number level="multiple" count="div" format="1.1. "/>
+    </xsl:for-each>
+    <xsl:value-of select="."/>
+  </A>
+</xsl:template> 
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/generated/generated02.xml b/test/tests/accept/generated/generated02.xml
new file mode 100644
index 0000000..30a9829
--- /dev/null
+++ b/test/tests/accept/generated/generated02.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc att="top" cat="top">
+  <?a-pi some data?>
+  <!-- This is the 1st comment -->
+  <begin bat="fob">text-in-begin1
+    <inner blat="blob">inner-text<!-- This is the 2nd comment --></inner>
+    text-in-begin2
+  </begin>
+  text-in-doc
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/generated/generated02.xsl b/test/tests/accept/generated/generated02.xsl
new file mode 100644
index 0000000..1aee885
--- /dev/null
+++ b/test/tests/accept/generated/generated02.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: generated02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 Miscellaneous Additional Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of generate-id() with display of actual IDs -->
+  <!-- Exact strings will vary by processor. All should meet the constraints of XML names.
+    Use this test to catch unexplained changes in the naming scheme. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="generate-id(doc)"/><xsl:text>,</xsl:text>
+    <xsl:apply-templates select="doc/@*"/>
+    <xsl:apply-templates select="doc/child::node()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:value-of select="generate-id(.)"/><xsl:text>,</xsl:text>
+  <xsl:apply-templates select="./@*"/>
+  <xsl:apply-templates select="./child::node()"/><xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:value-of select="generate-id(.)"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/generated/generated03.xml b/test/tests/accept/generated/generated03.xml
new file mode 100644
index 0000000..003f9b2
--- /dev/null
+++ b/test/tests/accept/generated/generated03.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <a/>
+  <a>generated03a.xml</a><!-- Hello -->
+  <a>generated03b.xml</a><!-- Shirt, Overt -->
+  <a>generated03c.xml</a><!-- GoodBye -->
+  <a>generated03d.xml</a><!-- Tie, Sly -->
+  <x/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/generated/generated03.xsl b/test/tests/accept/generated/generated03.xsl
new file mode 100644
index 0000000..750c757
--- /dev/null
+++ b/test/tests/accept/generated/generated03.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: generated03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test generate-id() when nodes are coming from different documents. -->
+  <!-- Elaboration: All IDs should be distinct. The first for-each prints out info about the document
+    and node value. The second loop prints out the ID. Exact strings will vary by processor. All should
+    meet the constraints of XML names. Use this test to catch unexplained changes in the naming scheme. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+   <values>
+    <xsl:for-each select="document(a)//body">
+      <xsl:value-of select="."/><xsl:text>,  </xsl:text>
+    </xsl:for-each></values>
+    <xsl:text>&#10;</xsl:text>
+   <ids>
+    <xsl:for-each select="document(a)//body">
+      <xsl:value-of select="generate-id(.)"/><xsl:text>,  </xsl:text>
+    </xsl:for-each></ids>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/generated/generated03a.xml b/test/tests/accept/generated/generated03a.xml
new file mode 100644
index 0000000..add55ae
--- /dev/null
+++ b/test/tests/accept/generated/generated03a.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <body>3A-Hello</body>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/generated/generated03b.xml b/test/tests/accept/generated/generated03b.xml
new file mode 100644
index 0000000..0f34a90
--- /dev/null
+++ b/test/tests/accept/generated/generated03b.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <body>3B-Shirt</body>
+  <body>3B-Overt</body>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/generated/generated03c.xml b/test/tests/accept/generated/generated03c.xml
new file mode 100644
index 0000000..fbd2baa
--- /dev/null
+++ b/test/tests/accept/generated/generated03c.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<outer>
+  <body>3C-GoodBye</body>
+</outer>
\ No newline at end of file
diff --git a/test/tests/accept/generated/generated03d.xml b/test/tests/accept/generated/generated03d.xml
new file mode 100644
index 0000000..d355872
--- /dev/null
+++ b/test/tests/accept/generated/generated03d.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<outer>
+  <body>3D-Tie</body>
+  <body>3D-Sly</body>
+</outer>
\ No newline at end of file
diff --git a/test/tests/accept/outputaccept/outputaccept01.xml b/test/tests/accept/outputaccept/outputaccept01.xml
new file mode 100644
index 0000000..687ea69
--- /dev/null
+++ b/test/tests/accept/outputaccept/outputaccept01.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc attr1="attribute 1 " attr2="attribute 2">
+  <sub1>
+    <child1>child number 1</child1>
+  </sub1>
+  <sub2>
+    <child2>child number 2</child2>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/outputaccept/outputaccept01.xsl b/test/tests/accept/outputaccept/outputaccept01.xsl
new file mode 100644
index 0000000..161bd87
--- /dev/null
+++ b/test/tests/accept/outputaccept/outputaccept01.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: outputaccept01 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using the attribute axis -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression006 in NIST suite -->
+
+<xsl:template match="/">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select="doc">
+      <xsl:apply-templates select="attribute::attr1|attribute::attr2"/>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text></out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spacing/spacing01.xml b/test/tests/accept/spacing/spacing01.xml
new file mode 100644
index 0000000..f45fee6
--- /dev/null
+++ b/test/tests/accept/spacing/spacing01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc> 
+  <link desc="Edit Accounts" value="Good Job">Link</link>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/spacing/spacing01.xsl b/test/tests/accept/spacing/spacing01.xsl
new file mode 100644
index 0000000..fab0f6e
--- /dev/null
+++ b/test/tests/accept/spacing/spacing01.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: spacing01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use of Curly brace to set value of HTML attributes. Predicate and quotes inside. -->
+
+<xsl:output method="html" indent="no"/>
+
+<xsl:template match="doc">
+<HTML>
+  <a href="{./link[@desc='Edit Accounts']/@value}"></a>
+</HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spacing/spacing02.xml b/test/tests/accept/spacing/spacing02.xml
new file mode 100644
index 0000000..5ae9dec
--- /dev/null
+++ b/test/tests/accept/spacing/spacing02.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?> 
+<sales>
+  <division id="North">
+    <revenue>10</revenue>
+    <growth>9</growth>
+    <bonus>7</bonus>
+  </division>
+  <division id="South">
+    <revenue>4</revenue>
+    <growth>3</growth>
+    <bonus>4</bonus>
+  </division>
+  <division id="West">
+    <revenue>6</revenue>
+    <growth>-1.5</growth>
+    <bonus>2</bonus>
+  </division>
+</sales>
diff --git a/test/tests/accept/spacing/spacing02.xsl b/test/tests/accept/spacing/spacing02.xsl
new file mode 100644
index 0000000..24457a7
--- /dev/null
+++ b/test/tests/accept/spacing/spacing02.xsl
@@ -0,0 +1,69 @@
+<html xsl:version="1.0"
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+      lang="en">
+
+  <!-- FileName: spacing02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 LRE as Stylesheet -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Do everything inside an HTML element, including for-each and if structures. -->
+
+<head>
+  <title>Sales Results By Division</title>
+</head>
+<body>
+  <table border="1">
+    <tr>
+      <th>Division</th>
+      <th>Revenue</th>
+      <th>Growth</th>
+      <th>Bonus</th>
+    </tr>
+    <xsl:for-each select="sales/division">
+      <!-- order the result by revenue -->
+      <xsl:sort select="revenue" data-type="number" order="descending"/>
+      <tr>
+        <td>
+          <em><xsl:value-of select="@id"/></em>
+        </td>
+        <td>
+          <xsl:value-of select="revenue"/>
+        </td>
+        <td>
+          <!-- highlight negative growth in red -->
+          <xsl:if test="growth &lt; 0">
+            <xsl:attribute name="style">
+              <xsl:text>color:red</xsl:text>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:value-of select="growth"/>
+        </td>
+        <td>
+          <xsl:value-of select="bonus"/>
+        </td>
+      </tr>
+    </xsl:for-each>
+  </table>
+</body>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+
+</html>
diff --git a/test/tests/accept/spec11/spec1101.xml b/test/tests/accept/spec11/spec1101.xml
new file mode 100644
index 0000000..02da693
--- /dev/null
+++ b/test/tests/accept/spec11/spec1101.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<input />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1101.xsl b/test/tests/accept/spec11/spec1101.xsl
new file mode 100644
index 0000000..3ab4266
--- /dev/null
+++ b/test/tests/accept/spec11/spec1101.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+  <!-- FileName: spec1101.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  version="1.0">
+  <xsl:output method="xml" version="1.1" />
+  <xsl:template match="/">
+    <out>
+      Hello World!
+    </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1102.xml b/test/tests/accept/spec11/spec1102.xml
new file mode 100644
index 0000000..2bfe4d3
--- /dev/null
+++ b/test/tests/accept/spec11/spec1102.xml
@@ -0,0 +1,2 @@
+<?xml version="1.1"?>
+<doc />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1102.xsl b/test/tests/accept/spec11/spec1102.xsl
new file mode 100644
index 0000000..3c17709
--- /dev/null
+++ b/test/tests/accept/spec11/spec1102.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.1" ?>
+
+  <!-- FileName: spec1102.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                To ensure that Control Characters in C0 range are output as
+                Numeric Character Reference (NCR).
+  -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.1" encoding="UTF-8" />
+  <xsl:template match="/">
+    <out>&#x08;&#x1F;</out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1103.xml b/test/tests/accept/spec11/spec1103.xml
new file mode 100644
index 0000000..2bfe4d3
--- /dev/null
+++ b/test/tests/accept/spec11/spec1103.xml
@@ -0,0 +1,2 @@
+<?xml version="1.1"?>
+<doc />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1103.xsl b/test/tests/accept/spec11/spec1103.xsl
new file mode 100644
index 0000000..f1cd972
--- /dev/null
+++ b/test/tests/accept/spec11/spec1103.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.1" ?>
+
+  <!-- FileName: spec1103.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                To ensure that Control Characters in C1 range are output as
+                Numeric Character Reference (NCR).
+  -->
+  
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.1" encoding="UTF-8" />
+  <xsl:template match="/">
+    <out>&#x82;&#x8F;</out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1104.xml b/test/tests/accept/spec11/spec1104.xml
new file mode 100644
index 0000000..2bfe4d3
--- /dev/null
+++ b/test/tests/accept/spec11/spec1104.xml
@@ -0,0 +1,2 @@
+<?xml version="1.1"?>
+<doc />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1104.xsl b/test/tests/accept/spec11/spec1104.xsl
new file mode 100644
index 0000000..f796bc7
--- /dev/null
+++ b/test/tests/accept/spec11/spec1104.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.1"?>
+
+  <!-- FileName: spec1104.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                When NEL (0x0085) and LSEP (0x2028) appear as Numeric 
+                Character Reference (NCR), they must be output as NCR.
+  -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.1" encoding="UTF-8" />
+  <xsl:template match="/">
+    <out>&#x85;&#x2028;</out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1105.xml b/test/tests/accept/spec11/spec1105.xml
new file mode 100644
index 0000000..2bfe4d3
--- /dev/null
+++ b/test/tests/accept/spec11/spec1105.xml
@@ -0,0 +1,2 @@
+<?xml version="1.1"?>
+<doc />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1105.xsl b/test/tests/accept/spec11/spec1105.xsl
new file mode 100644
index 0000000..0312257
--- /dev/null
+++ b/test/tests/accept/spec11/spec1105.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.1"?>
+
+  <!-- FileName: spec1105.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                When NEL (0x0085) and LSEP (0x2028) appear as Numeric 
+                Character Reference (NCR) within a Comment or a Processing
+                Instruction, they must be output as actual value.
+  -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.1" encoding="UTF-8" 
+              indent="yes"/>
+  <xsl:template match="/">
+    <out/>
+    <xsl:comment> This is a comment &#x2028; </xsl:comment>
+    <xsl:processing-instruction name="hellopi"> hello &#x2028;   &#x85;   </xsl:processing-instruction>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1106.xml b/test/tests/accept/spec11/spec1106.xml
new file mode 100644
index 0000000..2bfe4d3
--- /dev/null
+++ b/test/tests/accept/spec11/spec1106.xml
@@ -0,0 +1,2 @@
+<?xml version="1.1"?>
+<doc />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1106.xsl b/test/tests/accept/spec11/spec1106.xsl
new file mode 100644
index 0000000..97ea2ee
--- /dev/null
+++ b/test/tests/accept/spec11/spec1106.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.1"?>
+
+  <!-- FileName: spec1106.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                When NEL (0x0085) and LSEP (0x2028) appear as Numeric 
+                Character Reference (NCR), they must not be treated as whitespaces.
+  -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.1" encoding="UTF-8" />
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="normalize-space('  These are   not   spacees: &#x2028;   &#x0085;')" />
+    </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1107.xml b/test/tests/accept/spec11/spec1107.xml
new file mode 100644
index 0000000..2bfe4d3
--- /dev/null
+++ b/test/tests/accept/spec11/spec1107.xml
@@ -0,0 +1,2 @@
+<?xml version="1.1"?>
+<doc />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1107.xsl b/test/tests/accept/spec11/spec1107.xsl
new file mode 100644
index 0000000..d45e955
--- /dev/null
+++ b/test/tests/accept/spec11/spec1107.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.1"?>
+
+  <!-- FileName: spec1107.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                When NEL (0x0085 / …) and LSEP (0x2028 / 
) appear as actual value
+                they must be treated as a linefeed.  XML parser normailize them
+                to a linefeed.(0xA).
+  -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.1" encoding="UTF-8" />
+  <xsl:template match="/">
+    <out>
   … </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1108.xml b/test/tests/accept/spec11/spec1108.xml
new file mode 100644
index 0000000..231f18a
--- /dev/null
+++ b/test/tests/accept/spec11/spec1108.xml
@@ -0,0 +1,8 @@
+<?xml version="1.1"?>
+<Countries>
+<Country>  Canada</Country>
+<Country>   USA</Country>
+<Country>UK  </Country>
+<Country>  </Country>
+<Country> &#x2028; </Country>
+</Countries>
diff --git a/test/tests/accept/spec11/spec1108.xsl b/test/tests/accept/spec11/spec1108.xsl
new file mode 100644
index 0000000..625db53
--- /dev/null
+++ b/test/tests/accept/spec11/spec1108.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.1"?>
+
+  <!-- FileName: spec1108.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                When NEL (0x0085) and LSEP (0x2028) appear as Numeric 
+                Character Reference (NCR), they must not be treated as whitespaces.
+  -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+     version="1.0">
+
+  <xsl:output method="xml" version="1.1" />
+  <xsl:strip-space elements="Country" />
+
+  <xsl:template match="@*|node()">
+   <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+   </xsl:copy>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1109.xml b/test/tests/accept/spec11/spec1109.xml
new file mode 100644
index 0000000..2bfe4d3
--- /dev/null
+++ b/test/tests/accept/spec11/spec1109.xml
@@ -0,0 +1,2 @@
+<?xml version="1.1"?>
+<doc />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1109.xsl b/test/tests/accept/spec11/spec1109.xsl
new file mode 100644
index 0000000..1f00bd7
--- /dev/null
+++ b/test/tests/accept/spec11/spec1109.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.1"?>
+  <!-- FileName: spec1109.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                namespace attribute of <xsl:element> element can be an IRI. 
+  -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+                version="1.0">
+  <xsl:output method="xml" version="1.1" indent="yes"/>
+
+  <xsl:template match="/">
+    <xsl:element name="pre:out"  
+                 namespace="http://example.org/pre&#xC0;">
+    </xsl:element>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/spec11/spec1110.xml b/test/tests/accept/spec11/spec1110.xml
new file mode 100644
index 0000000..2bfe4d3
--- /dev/null
+++ b/test/tests/accept/spec11/spec1110.xml
@@ -0,0 +1,2 @@
+<?xml version="1.1"?>
+<doc />
\ No newline at end of file
diff --git a/test/tests/accept/spec11/spec1110.xsl b/test/tests/accept/spec11/spec1110.xsl
new file mode 100644
index 0000000..fc90a39
--- /dev/null
+++ b/test/tests/accept/spec11/spec1110.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.1"?>
+  <!-- FileName: spec1110.xsl -->
+  <!-- Purpose: To output a document with method 'xml' and version '1.1'. 
+                namespace can be an IRI. 
+  -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.1" indent="yes" />
+  <xsl:template match="/">
+    <out xmlns:pre="http://example.org/pre&#xA2;">
+      <xsl:copy-of select="indoc/ch1/ch2"/>
+    </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/systemproperty/systemproperty01.xml b/test/tests/accept/systemproperty/systemproperty01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/accept/systemproperty/systemproperty01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/systemproperty/systemproperty01.xsl b/test/tests/accept/systemproperty/systemproperty01.xsl
new file mode 100644
index 0000000..f13a07f
--- /dev/null
+++ b/test/tests/accept/systemproperty/systemproperty01.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: systemproperty01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Test the xsl:version system property -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="system-property('xsl:version')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/accept/systemproperty/systemproperty02.xml b/test/tests/accept/systemproperty/systemproperty02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/accept/systemproperty/systemproperty02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/accept/systemproperty/systemproperty02.xsl b/test/tests/accept/systemproperty/systemproperty02.xsl
new file mode 100644
index 0000000..77b5112
--- /dev/null
+++ b/test/tests/accept/systemproperty/systemproperty02.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: systemproperty02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Test the xsl:vendor system property -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="system-property('xsl:vendor')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api-gold/Minitest-xalanj2.out b/test/tests/api-gold/Minitest-xalanj2.out
new file mode 100644
index 0000000..2e328b1
--- /dev/null
+++ b/test/tests/api-gold/Minitest-xalanj2.out
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<!-- Create an simplified output tree for each family -->
+   <Families>
+<Smith>
+<Parents>
+<Father>Lew Smith</Father>
+<Mother>Ruth Smith</Mother>
+</Parents>
+<Children number="5">
+<Male name="Andy" wife="Suzie" kids="2">
+<Kids>
+<Grandkid>Julie</Grandkid>
+<Grandkid>Daniel</Grandkid>
+</Kids>Andy</Male>
+<Male name="Thomas" wife="Margaret" kids="2">
+<Kids>
+<Grandkid>Joshua</Grandkid>
+<Grandkid>Lauren</Grandkid>
+</Kids>Thomas</Male>
+<Male name="Henry" wife="Elizbeth" kids="2">
+<Kids>
+<Grandkid>Nathaniel</Grandkid>
+<Grandkid>Samual</Grandkid>
+</Kids>Henry</Male>
+<Male name="Bruce" wife="Betsy" kids="3">
+<Kids>
+<Grandkid>Benjamin</Grandkid>
+<Grandkid>Lucy</Grandkid>
+<Grandkid>Jake</Grandkid>
+</Kids>Bruce</Male>
+<Male name="Joseph" wife="Lilla" kids="0">Joseph</Male>
+</Children>
+</Smith>
+</Families>
+The Smith
+The parents are: Lewis and Ruth Smith
+They have 9 grandchildren: Julie, Nathaniel, Joshua, Daniel, Samual, Lauren, Benjamin, Lucy, and Jake
+&#13;Andy Smith's phone number is 483-23-5432.
+He is 45. Andy is married to Suzie.
+Their children are Jules:9, and Daniel:8
+&#13;Bruce Smith's phone number is 213.457.2190.
+He is 38. Bruce is married to Betsy.
+Their children are Ben:5, Lucy:2, and Jake:1
+&#13;Henry Smith's phone number is 417.645.4954.
+He is 40. Henry is married to Beth.
+Their children are Nate:8, and Sam:7
+&#13;Joe Smith's phone number is 781.665.0539.
+He is 34. Joseph is married to Lilla.
+They have no kids
+			
+&#13;Tom Smith's phone number is 508.257.2754.
+He is 30. Thomas is married to Maggy.
+Their children are Joshua:7, and Lauren:5
+<!-- Create an simplified output tree for each family -->
+   <Families>
+<Westons>
+<Parents>
+<Father>Melvin Weston</Father>
+<Mother>Liz Harris</Mother>
+</Parents>
+<Children number="2">
+<Female name="Caroline" husband="" kids="0">Caroline</Female>
+<Female name="Betsy" husband="Bruce" kids="3">
+<Kids>
+<Grandkid>Benjamin</Grandkid>
+<Grandkid>Lucy</Grandkid>
+<Grandkid>Jake</Grandkid>
+</Kids>Betsy</Female>
+</Children>
+</Westons>
+</Families>
+The Westons
+The parents are: Melvin and Liz Harris
+They have 3 grandchildren: Benjamin, Lucy, and Jake
+&#13;Betsy Weston's phone number is 213.457.2190.
+She is 34. Betsy is married to Bruce.
+Their children are Ben:5, Lucy:2, and Jake:1
+&#13;Caroline Weston's phone number is 715.264.8205.
+She is 37. Caroline is not married. 
+		
+	</out>
diff --git a/test/tests/api-gold/MinitestParam.out b/test/tests/api-gold/MinitestParam.out
new file mode 100644
index 0000000..3e4b3ed
--- /dev/null
+++ b/test/tests/api-gold/MinitestParam.out
@@ -0,0 +1,3 @@
+
+ :param1s: 1234 :param2s: default2s :param3s: 
+ :param1n: new-param1n-value :param2n: 'default2n' :param3n: default3n
diff --git a/test/tests/api-gold/MinitestPerf.out b/test/tests/api-gold/MinitestPerf.out
new file mode 100644
index 0000000..2e328b1
--- /dev/null
+++ b/test/tests/api-gold/MinitestPerf.out
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<!-- Create an simplified output tree for each family -->
+   <Families>
+<Smith>
+<Parents>
+<Father>Lew Smith</Father>
+<Mother>Ruth Smith</Mother>
+</Parents>
+<Children number="5">
+<Male name="Andy" wife="Suzie" kids="2">
+<Kids>
+<Grandkid>Julie</Grandkid>
+<Grandkid>Daniel</Grandkid>
+</Kids>Andy</Male>
+<Male name="Thomas" wife="Margaret" kids="2">
+<Kids>
+<Grandkid>Joshua</Grandkid>
+<Grandkid>Lauren</Grandkid>
+</Kids>Thomas</Male>
+<Male name="Henry" wife="Elizbeth" kids="2">
+<Kids>
+<Grandkid>Nathaniel</Grandkid>
+<Grandkid>Samual</Grandkid>
+</Kids>Henry</Male>
+<Male name="Bruce" wife="Betsy" kids="3">
+<Kids>
+<Grandkid>Benjamin</Grandkid>
+<Grandkid>Lucy</Grandkid>
+<Grandkid>Jake</Grandkid>
+</Kids>Bruce</Male>
+<Male name="Joseph" wife="Lilla" kids="0">Joseph</Male>
+</Children>
+</Smith>
+</Families>
+The Smith
+The parents are: Lewis and Ruth Smith
+They have 9 grandchildren: Julie, Nathaniel, Joshua, Daniel, Samual, Lauren, Benjamin, Lucy, and Jake
+&#13;Andy Smith's phone number is 483-23-5432.
+He is 45. Andy is married to Suzie.
+Their children are Jules:9, and Daniel:8
+&#13;Bruce Smith's phone number is 213.457.2190.
+He is 38. Bruce is married to Betsy.
+Their children are Ben:5, Lucy:2, and Jake:1
+&#13;Henry Smith's phone number is 417.645.4954.
+He is 40. Henry is married to Beth.
+Their children are Nate:8, and Sam:7
+&#13;Joe Smith's phone number is 781.665.0539.
+He is 34. Joseph is married to Lilla.
+They have no kids
+			
+&#13;Tom Smith's phone number is 508.257.2754.
+He is 30. Thomas is married to Maggy.
+Their children are Joshua:7, and Lauren:5
+<!-- Create an simplified output tree for each family -->
+   <Families>
+<Westons>
+<Parents>
+<Father>Melvin Weston</Father>
+<Mother>Liz Harris</Mother>
+</Parents>
+<Children number="2">
+<Female name="Caroline" husband="" kids="0">Caroline</Female>
+<Female name="Betsy" husband="Bruce" kids="3">
+<Kids>
+<Grandkid>Benjamin</Grandkid>
+<Grandkid>Lucy</Grandkid>
+<Grandkid>Jake</Grandkid>
+</Kids>Betsy</Female>
+</Children>
+</Westons>
+</Families>
+The Westons
+The parents are: Melvin and Liz Harris
+They have 3 grandchildren: Benjamin, Lucy, and Jake
+&#13;Betsy Weston's phone number is 213.457.2190.
+She is 34. Betsy is married to Bruce.
+Their children are Ben:5, Lucy:2, and Jake:1
+&#13;Caroline Weston's phone number is 715.264.8205.
+She is 37. Caroline is not married. 
+		
+	</out>
diff --git a/test/tests/api-gold/ThreadOutput.out b/test/tests/api-gold/ThreadOutput.out
new file mode 100644
index 0000000..d4fc4a3
--- /dev/null
+++ b/test/tests/api-gold/ThreadOutput.out
@@ -0,0 +1,15 @@
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<SCRIPT>
+        
+        document.write("<P>Hi Oren");
+        if((2 < 5) & (6 < 3))
+        {
+          ...
+        }
+        
+      </SCRIPT>
+</HEAD>
+<BODY></BODY>
+</HTML>
diff --git a/test/tests/api-gold/dtm/DTM_testcase1.out b/test/tests/api-gold/dtm/DTM_testcase1.out
new file mode 100644
index 0000000..2c48a01
--- /dev/null
+++ b/test/tests/api-gold/dtm/DTM_testcase1.out
@@ -0,0 +1,106 @@
+ *** DOCUMENT PROPERTIES: *** 
+DocURI="null" SystemID="null"
+StandAlone="null" DocVersion="null"
+
+ *** DOCUMENT DATA: *** 
+65536: DOCUMENT  : #document" E-Type=9 Level=1 Value=null
+	Prefix= "" Name= "" URI= "null" Parent=-1 1stChild=65537 NextSib=-1
+65537: ELEMENT bdd:dummyDocument : bdd:dummyDocument" E-Type=14 Level=2 Value=null
+	Prefix= "bdd" Name= "dummyDocument" URI= "www.bdd.org" Parent=65536 1stChild=65541 NextSib=-1
+	NAMESPACES:
+	65538: NAMESPACE xml : xmlns:xml" E-Type=15 Level=3 Value="http://www.w3.org/XML/1998/namespace"
+		Prefix= "" Name= "xml" URI= "null" Parent=65537 1stChild=-1 NextSib=65539
+	65539: NAMESPACE bdd : xmlns:bdd" E-Type=16 Level=3 Value="www.bdd.org"
+		Prefix= "" Name= "bdd" URI= "null" Parent=65537 1stChild=-1 NextSib=65540
+	ATTRIBUTES:
+	65540: ATTRIBUTE version : version" E-Type=17 Level=3 Value="99"
+		Prefix= "" Name= "version" URI= "null" Parent=65537 1stChild=-1 NextSib=-1
+65541: COMMENT  : #comment" E-Type=8 Level=3 Value=" Default test document "
+	Prefix= "" Name= "" URI= "null" Parent=65537 1stChild=-1 NextSib=65542
+65542: TEXT  : #text" E-Type=3 Level=3 Value="	&  "
+	Prefix= "" Name= "" URI= "null" Parent=65537 1stChild=-1 NextSib=65543
+65543: PROCESSING_INSTRUCTION api : api" E-Type=18 Level=3 Value="attrib1="yes" attrib2="no""
+	Prefix= "" Name= "api" URI= "null" Parent=65537 1stChild=-1 NextSib=65544
+65544: ELEMENT A : A" E-Type=19 Level=3 Value=null
+	Prefix= "" Name= "A" URI= "null" Parent=65537 1stChild=65545 NextSib=65550
+65545: ELEMENT B : B" E-Type=20 Level=4 Value=null
+	Prefix= "" Name= "B" URI= "null" Parent=65544 1stChild=65549 NextSib=-1
+	ATTRIBUTES:
+	65546: ATTRIBUTE hat : hat" E-Type=21 Level=5 Value="new"
+		Prefix= "" Name= "hat" URI= "null" Parent=65545 1stChild=-1 NextSib=65547
+	65547: ATTRIBUTE car : car" E-Type=22 Level=5 Value="Honda"
+		Prefix= "" Name= "car" URI= "null" Parent=65545 1stChild=-1 NextSib=65548
+	65548: ATTRIBUTE dog : dog" E-Type=23 Level=5 Value="Boxer"
+		Prefix= "" Name= "dog" URI= "null" Parent=65545 1stChild=-1 NextSib=-1
+65549: TEXT  : #text" E-Type=3 Level=5 Value="Life is good"
+	Prefix= "" Name= "" URI= "null" Parent=65545 1stChild=-1 NextSib=-1
+65550: ELEMENT C : C" E-Type=24 Level=3 Value=null
+	Prefix= "" Name= "C" URI= "null" Parent=65537 1stChild=65551 NextSib=65555
+65551: TEXT  : #text" E-Type=3 Level=4 Value="My Anaconda"
+	Prefix= "" Name= "" URI= "null" Parent=65550 1stChild=-1 NextSib=65552
+65552: ELEMENT xyz:D : xyz:D" E-Type=25 Level=4 Value=null
+	Prefix= "xyz" Name= "D" URI= "www.xyz.org" Parent=65550 1stChild=-1 NextSib=65554
+	NAMESPACES:
+	65553: NAMESPACE xyz : xmlns:xyz" E-Type=26 Level=5 Value="www.xyz.org"
+		Prefix= "" Name= "xyz" URI= "null" Parent=65552 1stChild=-1 NextSib=-1
+65554: TEXT  : #text" E-Type=3 Level=4 Value="Words"
+	Prefix= "" Name= "" URI= "null" Parent=65550 1stChild=-1 NextSib=-1
+65555: TEXT  : #text" E-Type=3 Level=3 Value="
+  	   Want a more interesting docuent, provide the URI on the command line!
+   "
+	Prefix= "" Name= "" URI= "null" Parent=65537 1stChild=-1 NextSib=65556
+65556: ELEMENT Sub-Doc : Sub-Doc" E-Type=27 Level=3 Value=null
+	Prefix= "" Name= "Sub-Doc" URI= "null" Parent=65537 1stChild=65560 NextSib=-1
+	NAMESPACES:
+	65557: NAMESPACE d : xmlns:d" E-Type=28 Level=4 Value="www.d.com"
+		Prefix= "" Name= "d" URI= "null" Parent=65556 1stChild=-1 NextSib=65558
+	ATTRIBUTES:
+	65558: ATTRIBUTE a1 : a1" E-Type=29 Level=4 Value="hello"
+		Prefix= "" Name= "a1" URI= "null" Parent=65556 1stChild=-1 NextSib=65559
+	65559: ATTRIBUTE a2 : a2" E-Type=30 Level=4 Value="goodbye"
+		Prefix= "" Name= "a2" URI= "null" Parent=65556 1stChild=-1 NextSib=-1
+65560: COMMENT  : #comment" E-Type=8 Level=4 Value=" Default test Subdocument "
+	Prefix= "" Name= "" URI= "null" Parent=65556 1stChild=-1 NextSib=65561
+65561: PROCESSING_INSTRUCTION api : api" E-Type=18 Level=4 Value="a1="yes" a2="no""
+	Prefix= "" Name= "api" URI= "null" Parent=65556 1stChild=-1 NextSib=65562
+65562: ELEMENT A : A" E-Type=19 Level=4 Value=null
+	Prefix= "" Name= "A" URI= "null" Parent=65556 1stChild=65563 NextSib=65572
+65563: COMMENT  : #comment" E-Type=8 Level=5 Value=" A Subtree "
+	Prefix= "" Name= "" URI= "null" Parent=65562 1stChild=-1 NextSib=65564
+65564: ELEMENT B : B" E-Type=20 Level=5 Value=null
+	Prefix= "" Name= "B" URI= "null" Parent=65562 1stChild=65565 NextSib=-1
+65565: ELEMENT C : C" E-Type=24 Level=6 Value=null
+	Prefix= "" Name= "C" URI= "null" Parent=65564 1stChild=65566 NextSib=-1
+65566: ELEMENT D : D" E-Type=31 Level=7 Value=null
+	Prefix= "" Name= "D" URI= "null" Parent=65565 1stChild=65567 NextSib=-1
+65567: ELEMENT E : E" E-Type=32 Level=8 Value=null
+	Prefix= "" Name= "E" URI= "null" Parent=65566 1stChild=65568 NextSib=-1
+65568: ELEMENT f:F : f:F" E-Type=33 Level=9 Value=null
+	Prefix= "f" Name= "F" URI= "www.f.com" Parent=65567 1stChild=-1 NextSib=-1
+	NAMESPACES:
+	65569: NAMESPACE f : xmlns:f" E-Type=34 Level=10 Value="www.f.com"
+		Prefix= "" Name= "f" URI= "null" Parent=65568 1stChild=-1 NextSib=65570
+	ATTRIBUTES:
+	65570: ATTRIBUTE a1 : a1" E-Type=29 Level=10 Value="down"
+		Prefix= "" Name= "a1" URI= "null" Parent=65568 1stChild=-1 NextSib=65571
+	65571: ATTRIBUTE a2 : a2" E-Type=30 Level=10 Value="up"
+		Prefix= "" Name= "a2" URI= "null" Parent=65568 1stChild=-1 NextSib=-1
+65572: ELEMENT Aa : Aa" E-Type=35 Level=4 Value=null
+	Prefix= "" Name= "Aa" URI= "null" Parent=65556 1stChild=-1 NextSib=65573
+65573: ELEMENT Ab : Ab" E-Type=36 Level=4 Value=null
+	Prefix= "" Name= "Ab" URI= "null" Parent=65556 1stChild=-1 NextSib=65574
+65574: ELEMENT Ac : Ac" E-Type=37 Level=4 Value=null
+	Prefix= "" Name= "Ac" URI= "null" Parent=65556 1stChild=65575 NextSib=65576
+65575: ELEMENT Ac1 : Ac1" E-Type=38 Level=5 Value=null
+	Prefix= "" Name= "Ac1" URI= "null" Parent=65574 1stChild=-1 NextSib=-1
+65576: ELEMENT Ad:Ad : Ad:Ad" E-Type=39 Level=4 Value=null
+	Prefix= "Ad" Name= "Ad" URI= "www.Ad.com" Parent=65556 1stChild=65580 NextSib=-1
+	NAMESPACES:
+	65577: NAMESPACE Ad : xmlns:Ad" E-Type=40 Level=5 Value="www.Ad.com"
+		Prefix= "" Name= "Ad" URI= "null" Parent=65576 1stChild=-1 NextSib=65578
+	65578: NAMESPACE y : xmlns:y" E-Type=41 Level=5 Value="www.y.com"
+		Prefix= "" Name= "y" URI= "null" Parent=65576 1stChild=-1 NextSib=65579
+	65579: NAMESPACE z : xmlns:z" E-Type=42 Level=5 Value="www.z.com"
+		Prefix= "" Name= "z" URI= "null" Parent=65576 1stChild=-1 NextSib=-1
+65580: ELEMENT Ad1 : Ad1" E-Type=43 Level=5 Value=null
+	Prefix= "" Name= "Ad1" URI= "null" Parent=65576 1stChild=-1 NextSib=-1
diff --git a/test/tests/api-gold/dtm/Iter_testcase1.out b/test/tests/api-gold/dtm/Iter_testcase1.out
new file mode 100644
index 0000000..02df49f
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase1.out
@@ -0,0 +1,8 @@
+#### CHILD from Document, Reverse Axis:false
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase10.out b/test/tests/api-gold/dtm/Iter_testcase10.out
new file mode 100644
index 0000000..b21e43a
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase10.out
@@ -0,0 +1,8 @@
+#### DESCENDANTORSELF from A, Reverse Axis:false
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase11.out b/test/tests/api-gold/dtm/Iter_testcase11.out
new file mode 100644
index 0000000..38be371
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase11.out
@@ -0,0 +1,8 @@
+#### ANCESTOR from F, Reverse Axis:true
+ 65536: DOCUMENT #document  Level=1 	Value=null
+ 65537: ELEMENT Document  Level=2 	Value=null
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase12.out b/test/tests/api-gold/dtm/Iter_testcase12.out
new file mode 100644
index 0000000..404ee52
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase12.out
@@ -0,0 +1,9 @@
+#### ANCESTORORSELF from F, Reverse Axis:true
+ 65536: DOCUMENT #document  Level=1 	Value=null
+ 65537: ELEMENT Document  Level=2 	Value=null
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase2.out b/test/tests/api-gold/dtm/Iter_testcase2.out
new file mode 100644
index 0000000..59942eb
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase2.out
@@ -0,0 +1,2 @@
+#### PARENT from Ad, Reverse Axis:false
+ 65537: ELEMENT Document  Level=2 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase3.out b/test/tests/api-gold/dtm/Iter_testcase3.out
new file mode 100644
index 0000000..8632573
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase3.out
@@ -0,0 +1,2 @@
+#### SELF from Ad, Reverse Axis:false
+ 65558: ELEMENT Ad  Level=3 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase4.out b/test/tests/api-gold/dtm/Iter_testcase4.out
new file mode 100644
index 0000000..f28ad2b
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase4.out
@@ -0,0 +1,6 @@
+#### NAMESPACE from Ad, Reverse Axis:false
+ 65538: NAMESPACE xmlns:xml  Level=3 	Value="http://www.w3.org/XML/1998/namespace"
+ 65539: NAMESPACE xmlns:d  Level=3 	Value="www.d.com"
+ 65559: NAMESPACE xmlns:Ad  Level=4 	Value="www.Ad.com"
+ 65560: NAMESPACE xmlns:y  Level=4 	Value="www.y.com"
+ 65561: NAMESPACE xmlns:z  Level=4 	Value="www.z.com"
diff --git a/test/tests/api-gold/dtm/Iter_testcase5.out b/test/tests/api-gold/dtm/Iter_testcase5.out
new file mode 100644
index 0000000..e9a7fea
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase5.out
@@ -0,0 +1,14 @@
+#### PRECEDING from Ad, Reverse Axis:true
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65557: ELEMENT Ac1  Level=4 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase6.out b/test/tests/api-gold/dtm/Iter_testcase6.out
new file mode 100644
index 0000000..54803b9
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase6.out
@@ -0,0 +1,7 @@
+#### PRECEDINGSIBLING from Ad, Reverse Axis:true
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase7.out b/test/tests/api-gold/dtm/Iter_testcase7.out
new file mode 100644
index 0000000..6f333f7
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase7.out
@@ -0,0 +1,7 @@
+#### FOLLOWING from A, Reverse Axis:false
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65557: ELEMENT Ac1  Level=4 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
+ 65562: ELEMENT Ad1  Level=4 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase8.out b/test/tests/api-gold/dtm/Iter_testcase8.out
new file mode 100644
index 0000000..6e5664c
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase8.out
@@ -0,0 +1,5 @@
+#### FOLLOWINGSIBLING from A, Reverse Axis:false
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
diff --git a/test/tests/api-gold/dtm/Iter_testcase9.out b/test/tests/api-gold/dtm/Iter_testcase9.out
new file mode 100644
index 0000000..da4d028
--- /dev/null
+++ b/test/tests/api-gold/dtm/Iter_testcase9.out
@@ -0,0 +1,7 @@
+#### DESCENDANT from A, Reverse Axis:false
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase1.out b/test/tests/api-gold/dtm/Trav_testcase1.out
new file mode 100644
index 0000000..b93186a
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase1.out
@@ -0,0 +1,8 @@
+#### CHILD from Document
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase10.out b/test/tests/api-gold/dtm/Trav_testcase10.out
new file mode 100644
index 0000000..7657b11
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase10.out
@@ -0,0 +1,7 @@
+#### DESCENDANT from A
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase11.out b/test/tests/api-gold/dtm/Trav_testcase11.out
new file mode 100644
index 0000000..ccf870e
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase11.out
@@ -0,0 +1,8 @@
+#### DESCENDANTORSELF from A
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase12.out b/test/tests/api-gold/dtm/Trav_testcase12.out
new file mode 100644
index 0000000..f15987f
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase12.out
@@ -0,0 +1,8 @@
+#### ANCESTOR from F
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65537: ELEMENT Document  Level=2 	Value=null
+ 65536: DOCUMENT #document  Level=1 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase13.out b/test/tests/api-gold/dtm/Trav_testcase13.out
new file mode 100644
index 0000000..871a303
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase13.out
@@ -0,0 +1,9 @@
+#### ANCESTORORSELF from F
+ 65550: ELEMENT F  Level=8 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65537: ELEMENT Document  Level=2 	Value=null
+ 65536: DOCUMENT #document  Level=1 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase14.out b/test/tests/api-gold/dtm/Trav_testcase14.out
new file mode 100644
index 0000000..cc45bf9
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase14.out
@@ -0,0 +1,5 @@
+#### ALL-FROM-NODE from F
+ 65550: ELEMENT F  Level=8 	Value=null
+ 65551: NAMESPACE xmlns:f  Level=9 	Value="www.f.com"
+ 65552: ATTRIBUTE a1  Level=9 	Value="down"
+ 65553: ATTRIBUTE a2  Level=9 	Value="up"
diff --git a/test/tests/api-gold/dtm/Trav_testcase15.out b/test/tests/api-gold/dtm/Trav_testcase15.out
new file mode 100644
index 0000000..c028029
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase15.out
@@ -0,0 +1,3 @@
+#### ATTRIBUTE from Document
+ 65540: ATTRIBUTE a1  Level=3 	Value="hello"
+ 65541: ATTRIBUTE a2  Level=3 	Value="goodbye"
diff --git a/test/tests/api-gold/dtm/Trav_testcase16.out b/test/tests/api-gold/dtm/Trav_testcase16.out
new file mode 100644
index 0000000..9b86a1f
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase16.out
@@ -0,0 +1,28 @@
+#### ALL(absolute) from F(root)
+ 65536: DOCUMENT #document  Level=1 	Value=null
+ 65537: ELEMENT Document  Level=2 	Value=null
+ 65538: NAMESPACE xmlns:xml  Level=3 	Value="http://www.w3.org/XML/1998/namespace"
+ 65539: NAMESPACE xmlns:d  Level=3 	Value="www.d.com"
+ 65540: ATTRIBUTE a1  Level=3 	Value="hello"
+ 65541: ATTRIBUTE a2  Level=3 	Value="goodbye"
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
+ 65551: NAMESPACE xmlns:f  Level=9 	Value="www.f.com"
+ 65552: ATTRIBUTE a1  Level=9 	Value="down"
+ 65553: ATTRIBUTE a2  Level=9 	Value="up"
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65557: ELEMENT Ac1  Level=4 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
+ 65559: NAMESPACE xmlns:Ad  Level=4 	Value="www.Ad.com"
+ 65560: NAMESPACE xmlns:y  Level=4 	Value="www.y.com"
+ 65561: NAMESPACE xmlns:z  Level=4 	Value="www.z.com"
+ 65562: ELEMENT Ad1  Level=4 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase17.out b/test/tests/api-gold/dtm/Trav_testcase17.out
new file mode 100644
index 0000000..653a56d
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase17.out
@@ -0,0 +1,17 @@
+#### DESCENDANTSFROMROOT(abs) from F(root)
+ 65537: ELEMENT Document  Level=2 	Value=null
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65557: ELEMENT Ac1  Level=4 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
+ 65562: ELEMENT Ad1  Level=4 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase18.out b/test/tests/api-gold/dtm/Trav_testcase18.out
new file mode 100644
index 0000000..3305a09
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase18.out
@@ -0,0 +1,18 @@
+#### DESCENDANTSORSELFFROMROOT(abs) from F(root)
+ 65536: DOCUMENT #document  Level=1 	Value=null
+ 65537: ELEMENT Document  Level=2 	Value=null
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65557: ELEMENT Ac1  Level=4 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
+ 65562: ELEMENT Ad1  Level=4 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase19.out b/test/tests/api-gold/dtm/Trav_testcase19.out
new file mode 100644
index 0000000..39f62da
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase19.out
@@ -0,0 +1,11 @@
+#### ALL-FROM-NODE from A
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
+ 65551: NAMESPACE xmlns:f  Level=9 	Value="www.f.com"
+ 65552: ATTRIBUTE a1  Level=9 	Value="down"
+ 65553: ATTRIBUTE a2  Level=9 	Value="up"
diff --git a/test/tests/api-gold/dtm/Trav_testcase2.out b/test/tests/api-gold/dtm/Trav_testcase2.out
new file mode 100644
index 0000000..4740daa
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase2.out
@@ -0,0 +1,2 @@
+#### PARENT from Ad
+ 65537: ELEMENT Document  Level=2 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase20.out b/test/tests/api-gold/dtm/Trav_testcase20.out
new file mode 100644
index 0000000..84ce035
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase20.out
@@ -0,0 +1,2 @@
+#### ALL-FROM-NODE from #comment
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
diff --git a/test/tests/api-gold/dtm/Trav_testcase3.out b/test/tests/api-gold/dtm/Trav_testcase3.out
new file mode 100644
index 0000000..7086b3b
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase3.out
@@ -0,0 +1,2 @@
+#### SELF from Ad
+ 65558: ELEMENT Ad  Level=3 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase4.out b/test/tests/api-gold/dtm/Trav_testcase4.out
new file mode 100644
index 0000000..76e1172
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase4.out
@@ -0,0 +1,6 @@
+#### NAMESPACE from Ad
+ 65538: NAMESPACE xmlns:xml  Level=3 	Value="http://www.w3.org/XML/1998/namespace"
+ 65539: NAMESPACE xmlns:d  Level=3 	Value="www.d.com"
+ 65559: NAMESPACE xmlns:Ad  Level=4 	Value="www.Ad.com"
+ 65560: NAMESPACE xmlns:y  Level=4 	Value="www.y.com"
+ 65561: NAMESPACE xmlns:z  Level=4 	Value="www.z.com"
diff --git a/test/tests/api-gold/dtm/Trav_testcase5.out b/test/tests/api-gold/dtm/Trav_testcase5.out
new file mode 100644
index 0000000..13c868b
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase5.out
@@ -0,0 +1,4 @@
+#### NAMESPACEDECLS from Ad
+ 65559: NAMESPACE xmlns:Ad  Level=4 	Value="www.Ad.com"
+ 65560: NAMESPACE xmlns:y  Level=4 	Value="www.y.com"
+ 65561: NAMESPACE xmlns:z  Level=4 	Value="www.z.com"
diff --git a/test/tests/api-gold/dtm/Trav_testcase6.out b/test/tests/api-gold/dtm/Trav_testcase6.out
new file mode 100644
index 0000000..957159d
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase6.out
@@ -0,0 +1,14 @@
+#### PRECEDING from Ad
+ 65557: ELEMENT Ac1  Level=4 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65550: ELEMENT F  Level=8 	Value=null
+ 65549: ELEMENT E  Level=7 	Value=null
+ 65548: ELEMENT D  Level=6 	Value=null
+ 65547: ELEMENT C  Level=5 	Value=null
+ 65546: ELEMENT B  Level=4 	Value=null
+ 65545: COMMENT #comment  Level=4 	Value=" A Subtree "
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
diff --git a/test/tests/api-gold/dtm/Trav_testcase7.out b/test/tests/api-gold/dtm/Trav_testcase7.out
new file mode 100644
index 0000000..61d080b
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase7.out
@@ -0,0 +1,7 @@
+#### PRECEDINGSIBLING from Ad
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65544: ELEMENT A  Level=3 	Value=null
+ 65543: PROCESSING_INSTRUCTION api  Level=3 	Value="a1="yes" a2="no""
+ 65542: COMMENT #comment  Level=3 	Value=" Default test document "
diff --git a/test/tests/api-gold/dtm/Trav_testcase8.out b/test/tests/api-gold/dtm/Trav_testcase8.out
new file mode 100644
index 0000000..dfe3a45
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase8.out
@@ -0,0 +1,7 @@
+#### FOLLOWING from A
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65557: ELEMENT Ac1  Level=4 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
+ 65562: ELEMENT Ad1  Level=4 	Value=null
diff --git a/test/tests/api-gold/dtm/Trav_testcase9.out b/test/tests/api-gold/dtm/Trav_testcase9.out
new file mode 100644
index 0000000..5506513
--- /dev/null
+++ b/test/tests/api-gold/dtm/Trav_testcase9.out
@@ -0,0 +1,5 @@
+#### FOLLOWINGSIBLING from A
+ 65554: ELEMENT Aa  Level=3 	Value=null
+ 65555: ELEMENT Ab  Level=3 	Value=null
+ 65556: ELEMENT Ac  Level=3 	Value=null
+ 65558: ELEMENT Ad  Level=3 	Value=null
diff --git a/test/tests/api-gold/err/ErrorListenerTest.out b/test/tests/api-gold/err/ErrorListenerTest.out
new file mode 100644
index 0000000..aba7b4f
--- /dev/null
+++ b/test/tests/api-gold/err/ErrorListenerTest.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list-out name="list1">
+  <item-out>warning(TransformerException)</item-out>
+  <item-out>error(TransformerException)</item-out>
+  <item-out>fatalError(TransformerException)</item-out>
+  <list-out name="list2">
+    <item-out>ErrorListener API's</item-out>
+    <item-out>Defined Above</item-out>
+  </list-out>
+</list-out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/EmbeddedFragment.out b/test/tests/api-gold/trax/EmbeddedFragment.out
new file mode 100644
index 0000000..80954dc
--- /dev/null
+++ b/test/tests/api-gold/trax/EmbeddedFragment.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Hello
+	
+Goodbye
+	
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/EmbeddedRelative0.out b/test/tests/api-gold/trax/EmbeddedRelative0.out
new file mode 100644
index 0000000..82116e7
--- /dev/null
+++ b/test/tests/api-gold/trax/EmbeddedRelative0.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<embedded-relative-level0>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  
+</embedded-relative-level0>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/EmbeddedRelative1.out b/test/tests/api-gold/trax/EmbeddedRelative1.out
new file mode 100644
index 0000000..171ae87
--- /dev/null
+++ b/test/tests/api-gold/trax/EmbeddedRelative1.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<embedded-relative-level1>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  
+</embedded-relative-level1>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/EmbeddedRelative2.out b/test/tests/api-gold/trax/EmbeddedRelative2.out
new file mode 100644
index 0000000..5f3e82f
--- /dev/null
+++ b/test/tests/api-gold/trax/EmbeddedRelative2.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<embedded-relative-level2>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  
+</embedded-relative-level2>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/EmbeddedType.out b/test/tests/api-gold/trax/EmbeddedType.out
new file mode 100644
index 0000000..c88beb6
--- /dev/null
+++ b/test/tests/api-gold/trax/EmbeddedType.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<embedded-type><item>Xalan-J 1.x</item><item>Xalan-J 2.x</item><item>Xalan-C 1.x</item></embedded-type>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_1.out b/test/tests/api-gold/trax/ExamplesTest_1.out
new file mode 100644
index 0000000..05c0f75
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_1.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_10.out b/test/tests/api-gold/trax/ExamplesTest_10.out
new file mode 100644
index 0000000..0df2f85
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<out><some-text>default param value, text from my-var in inc2.xslMyBar</some-text></out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_11.out b/test/tests/api-gold/trax/ExamplesTest_11.out
new file mode 100644
index 0000000..b7b63f1
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_11.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document creation-date="971255692078" file-name="test" file-path="work" xmlns:bar="http://apache.org/bar" xmlns:foo="http://apache.org/foo">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_12.out b/test/tests/api-gold/trax/ExamplesTest_12.out
new file mode 100644
index 0000000..d1bebf9
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_12.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>hello to you!, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_13.out b/test/tests/api-gold/trax/ExamplesTest_13.out
new file mode 100644
index 0000000..01da02d
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_13.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar>
+<param-val>default param value, text from my-var in inc2.xsl</param-val>
+<data>MyBar</data>
+</bar>
+</foo:document>
diff --git a/test/tests/api-gold/trax/ExamplesTest_14.out b/test/tests/api-gold/trax/ExamplesTest_14.out
new file mode 100644
index 0000000..d1bebf9
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_14.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>hello to you!, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_15.out b/test/tests/api-gold/trax/ExamplesTest_15.out
new file mode 100644
index 0000000..db56de2
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_15.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar>
+<param-val>hello to me!, text from my-var in inc2.xsl</param-val>
+<data>MyBar</data>
+</bar>
+</foo:document>
diff --git a/test/tests/api-gold/trax/ExamplesTest_16.out b/test/tests/api-gold/trax/ExamplesTest_16.out
new file mode 100644
index 0000000..01da02d
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_16.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar>
+<param-val>default param value, text from my-var in inc2.xsl</param-val>
+<data>MyBar</data>
+</bar>
+</foo:document>
diff --git a/test/tests/api-gold/trax/ExamplesTest_17.out b/test/tests/api-gold/trax/ExamplesTest_17.out
new file mode 100644
index 0000000..05c0f75
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_17.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_18.out b/test/tests/api-gold/trax/ExamplesTest_18.out
new file mode 100644
index 0000000..e14e3d8
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_18.out
@@ -0,0 +1,8 @@
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+
+<foo:document xmlns:foo="http://apache.org/foo" creation-date="971255692078" file-name="test" file-path="work">
+<bar>
+<param-val>default param value, text from my-var in inc2.xsl</param-val>
+<data>MyBar</data>
+</bar>
+</foo:document>
diff --git a/test/tests/api-gold/trax/ExamplesTest_19.out b/test/tests/api-gold/trax/ExamplesTest_19.out
new file mode 100644
index 0000000..8f5c46e
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_19.out
@@ -0,0 +1,6 @@
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl">
+<foo:document creation-date="971255692078" file-name="test" file-path="work" xmlns:bar="http://apache.org/bar" xmlns:foo="http://apache.org/foo">
+
+<bar:element>MyBar</bar:element>
+
+</foo:document>
diff --git a/test/tests/api-gold/trax/ExamplesTest_2.out b/test/tests/api-gold/trax/ExamplesTest_2.out
new file mode 100644
index 0000000..05c0f75
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_2.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_3.out b/test/tests/api-gold/trax/ExamplesTest_3.out
new file mode 100644
index 0000000..05c0f75
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_3.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_4.out b/test/tests/api-gold/trax/ExamplesTest_4.out
new file mode 100644
index 0000000..05c0f75
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_4.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_5.out b/test/tests/api-gold/trax/ExamplesTest_5.out
new file mode 100644
index 0000000..05c0f75
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_5.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_6.out b/test/tests/api-gold/trax/ExamplesTest_6.out
new file mode 100644
index 0000000..3612754
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_6.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBaz</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_7.out b/test/tests/api-gold/trax/ExamplesTest_7.out
new file mode 100644
index 0000000..ce37d00
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_7.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_8.out b/test/tests/api-gold/trax/ExamplesTest_8.out
new file mode 100644
index 0000000..82eb92b
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_8.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/ExamplesTest_9.out b/test/tests/api-gold/trax/ExamplesTest_9.out
new file mode 100644
index 0000000..82eb92b
--- /dev/null
+++ b/test/tests/api-gold/trax/ExamplesTest_9.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/OutputPropertiesHTML.out b/test/tests/api-gold/trax/OutputPropertiesHTML.out
new file mode 100644
index 0000000..ea164d0
--- /dev/null
+++ b/test/tests/api-gold/trax/OutputPropertiesHTML.out
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "this-is-doctype-public" "this-is-doctype-system">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<TITLE>title-tag:text</TITLE>xsl:text within HEAD tag</HEAD>
+<BODY>
+<P>P-tag:beginCDATA? or not?</P>
+<UL>
+<ul-tag>
+      
+<li-tag number="1">li-tag:one</li-tag>
+      
+<li-tag value="two">li-tag:two</li-tag>
+    
+</ul-tag>
+</UL><P>Fake 'p' element</P><P>@ &nbsp; ~ &copy; &Egrave;</P>
+</BODY>
+</HTML>
diff --git a/test/tests/api-gold/trax/SystemIdImpInclHttp.out b/test/tests/api-gold/trax/SystemIdImpInclHttp.out
new file mode 100644
index 0000000..b439a51
--- /dev/null
+++ b/test/tests/api-gold/trax/SystemIdImpInclHttp.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <include-list-level-http><import-list-level-http>
+    <matched-by-main>Above Should be include-list then import-list</matched-by-main>
+    <matched-by-main>This is SystemIdImpIncl.xml, used for setSystemId testing Note that different settings of systemIds will have different expected results!</matched-by-main>
+    <matched-by-import-level-http>Should be matched-by-import</matched-by-import-level-http>
+    <matched-by-include-level-http>Should be matched-by-include</matched-by-include-level-http>
+    <matched-by-import-also-level-http>Should be matched-by-import-also</matched-by-import-also-level-http>
+    <include-list-level-http><import-list-level-http>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+    </import-list-level-http></include-list-level-http>
+  </import-list-level-http></include-list-level-http>
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/SystemIdImpInclLevel0.out b/test/tests/api-gold/trax/SystemIdImpInclLevel0.out
new file mode 100644
index 0000000..cb0ee08
--- /dev/null
+++ b/test/tests/api-gold/trax/SystemIdImpInclLevel0.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <include-list-level0><import-list-level0>
+    <matched-by-main>Above Should be include-list then import-list</matched-by-main>
+    <matched-by-main>This is SystemIdImpIncl.xml, used for setSystemId testing Note that different settings of systemIds will have different expected results!</matched-by-main>
+    <matched-by-import-level0>Should be matched-by-import</matched-by-import-level0>
+    <matched-by-include-level0>Should be matched-by-include</matched-by-include-level0>
+    <matched-by-import-also-level0>Should be matched-by-import-also</matched-by-import-also-level0>
+    <include-list-level0><import-list-level0>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+    </import-list-level0></include-list-level0>
+  </import-list-level0></include-list-level0>
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/SystemIdImpInclLevel1.out b/test/tests/api-gold/trax/SystemIdImpInclLevel1.out
new file mode 100644
index 0000000..ef9b548
--- /dev/null
+++ b/test/tests/api-gold/trax/SystemIdImpInclLevel1.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <include-list-level1><import-list-level1>
+    <matched-by-main>Above Should be include-list then import-list</matched-by-main>
+    <matched-by-main>This is SystemIdImpIncl.xml, used for setSystemId testing Note that different settings of systemIds will have different expected results!</matched-by-main>
+    <matched-by-import-level1>Should be matched-by-import</matched-by-import-level1>
+    <matched-by-include-level1>Should be matched-by-include</matched-by-include-level1>
+    <matched-by-import-also-level1>Should be matched-by-import-also</matched-by-import-also-level1>
+    <include-list-level1><import-list-level1>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+    </import-list-level1></include-list-level1>
+  </import-list-level1></include-list-level1>
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/SystemIdImpInclLevel2.out b/test/tests/api-gold/trax/SystemIdImpInclLevel2.out
new file mode 100644
index 0000000..3f05524
--- /dev/null
+++ b/test/tests/api-gold/trax/SystemIdImpInclLevel2.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <include-list-level2><import-list-level2>
+    <matched-by-main>Above Should be include-list then import-list</matched-by-main>
+    <matched-by-main>This is SystemIdImpIncl.xml, used for setSystemId testing Note that different settings of systemIds will have different expected results!</matched-by-main>
+    <matched-by-import-level2>Should be matched-by-import</matched-by-import-level2>
+    <matched-by-include-level2>Should be matched-by-include</matched-by-include-level2>
+    <matched-by-import-also-level2>Should be matched-by-import-also</matched-by-import-also-level2>
+    <include-list-level2><import-list-level2>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+    </import-list-level2></include-list-level2>
+  </import-list-level2></include-list-level2>
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/SystemIdTest.out b/test/tests/api-gold/trax/SystemIdTest.out
new file mode 100644
index 0000000..371313d
--- /dev/null
+++ b/test/tests/api-gold/trax/SystemIdTest.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Filename: SystemIdTest.xml --><list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/TransformerAPIOutputFormatUTF16.out b/test/tests/api-gold/trax/TransformerAPIOutputFormatUTF16.out
new file mode 100644
index 0000000..9453ae4
--- /dev/null
+++ b/test/tests/api-gold/trax/TransformerAPIOutputFormatUTF16.out
Binary files differ
diff --git a/test/tests/api-gold/trax/TransformerAPIOutputFormatUTF8.out b/test/tests/api-gold/trax/TransformerAPIOutputFormatUTF8.out
new file mode 100644
index 0000000..b98246b
--- /dev/null
+++ b/test/tests/api-gold/trax/TransformerAPIOutputFormatUTF8.out
@@ -0,0 +1,9 @@
+<!DOCTYPE out PUBLIC "this-is-doctype-public" "this-is-doctype-system">
+<out>
+<cdataHere><![CDATA[CDATA? or not?]]></cdataHere>foo<cdataHere><![CDATA[CDATA? or not?]]></cdataHere>
+<out2>bar<selector>
+    <item number="1">one</item>
+    <item value="two">2</item>
+  </selector>
+</out2>
+</out>
diff --git a/test/tests/api-gold/trax/TransformerAPIParam.out b/test/tests/api-gold/trax/TransformerAPIParam.out
new file mode 100644
index 0000000..4b88cba
--- /dev/null
+++ b/test/tests/api-gold/trax/TransformerAPIParam.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+ :param1s:'test-param-1s' :param2s:default2s :param3s:
+ :param1n:1234 :param2n:'default2n' :param3n:default3n
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/TransformerAPIVar.out b/test/tests/api-gold/trax/TransformerAPIVar.out
new file mode 100644
index 0000000..b9b1f40
--- /dev/null
+++ b/test/tests/api-gold/trax/TransformerAPIVar.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<item>TransformerAPIVar-original</item>
+<item>Text and:TransformerAPIVar-original</item>
+</out>
diff --git a/test/tests/api-gold/trax/TransformerAPIVar2.out b/test/tests/api-gold/trax/TransformerAPIVar2.out
new file mode 100644
index 0000000..e56d4fe
--- /dev/null
+++ b/test/tests/api-gold/trax/TransformerAPIVar2.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<item>TransformerAPIVar2-changed</item>
+<item>Text and:TransformerAPIVar2-changed</item>
+</out>
diff --git a/test/tests/api-gold/trax/URIResolverTest.out b/test/tests/api-gold/trax/URIResolverTest.out
new file mode 100644
index 0000000..95174cb
--- /dev/null
+++ b/test/tests/api-gold/trax/URIResolverTest.out
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><head>Various document() calls: 
+  
+    
+  
+, 
+  
+    
+  
+, 
+  
+    
+  
+.</head>
+  <include-list-level1><import-list-level1>
+    <matched-by-main>Above Should be include-list then import-list</matched-by-main>
+    <matched-by-main>This is URIResolverTest.xml!</matched-by-main>
+    <matched-by-import-level1>Should be matched-by-import</matched-by-import-level1>
+    <matched-by-include-level1>Should be matched-by-include</matched-by-include-level1>
+    <matched-by-import-also-level1>Should be matched-by-import-also</matched-by-import-also-level1>
+    <include-list-level1><import-list-level1>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+    </import-list-level1></include-list-level1>
+  </import-list-level1></include-list-level1>
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/baz.out b/test/tests/api-gold/trax/baz.out
new file mode 100644
index 0000000..3612754
--- /dev/null
+++ b/test/tests/api-gold/trax/baz.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBaz</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/dom/DOMImpIncl.out b/test/tests/api-gold/trax/dom/DOMImpIncl.out
new file mode 100644
index 0000000..25b5938
--- /dev/null
+++ b/test/tests/api-gold/trax/dom/DOMImpIncl.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <include-list><import-list>
+    <matched-by-main>Above Should be include-list then import-list</matched-by-main>
+    <matched-by-import>Should be matched-by-import</matched-by-import>
+    <matched-by-include>Should be matched-by-include</matched-by-include>
+    <matched-by-import-also>Should be matched-by-import-also</matched-by-import-also>
+    <include-list><import-list>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+    </import-list></include-list>
+  </import-list></include-list>
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/dom/DOMTest.out b/test/tests/api-gold/trax/dom/DOMTest.out
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api-gold/trax/dom/DOMTest.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/dom/DOMTest2.out b/test/tests/api-gold/trax/dom/DOMTest2.out
new file mode 100644
index 0000000..c0b53c4
--- /dev/null
+++ b/test/tests/api-gold/trax/dom/DOMTest2.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><a><b/><list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list><c/></a>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/embeddedIdentity.out b/test/tests/api-gold/trax/embeddedIdentity.out
new file mode 100644
index 0000000..6db77af
--- /dev/null
+++ b/test/tests/api-gold/trax/embeddedIdentity.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="identity.xsl"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/foo.out b/test/tests/api-gold/trax/foo.out
new file mode 100644
index 0000000..49bb113
--- /dev/null
+++ b/test/tests/api-gold/trax/foo.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?><foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/fooSAX.out b/test/tests/api-gold/trax/fooSAX.out
new file mode 100644
index 0000000..3404ebf
--- /dev/null
+++ b/test/tests/api-gold/trax/fooSAX.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?><foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/fooSAX2.out b/test/tests/api-gold/trax/fooSAX2.out
new file mode 100644
index 0000000..3727b0e
--- /dev/null
+++ b/test/tests/api-gold/trax/fooSAX2.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?><foo:document xmlns:foo="http://apache.org/foo" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>default param value, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/identity.out b/test/tests/api-gold/trax/identity.out
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api-gold/trax/identity.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/output.out b/test/tests/api-gold/trax/output.out
new file mode 100644
index 0000000..a8bf5ff
--- /dev/null
+++ b/test/tests/api-gold/trax/output.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar>
+<param-val>default param value, text from my-var in inc2.xsl</param-val>
+<data>MyBar</data>
+</bar>
+</foo:document>
diff --git a/test/tests/api-gold/trax/param1.out b/test/tests/api-gold/trax/param1.out
new file mode 100644
index 0000000..bf88127
--- /dev/null
+++ b/test/tests/api-gold/trax/param1.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?><foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar><param-val>hello to you!, text from my-var in inc2.xsl</param-val><data>MyBar</data></bar>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/param2.out b/test/tests/api-gold/trax/param2.out
new file mode 100644
index 0000000..f0a2257
--- /dev/null
+++ b/test/tests/api-gold/trax/param2.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document xmlns:foo="http://apache.org/foo" xmlns:bar="http://apache.org/bar" file-name="test" file-path="work" creation-date="971255692078">
+<bar>
+<param-val>hello to me!, text from my-var in inc2.xsl</param-val>
+<data>MyBar</data>
+</bar>
+</foo:document>
diff --git a/test/tests/api-gold/trax/sax/SAXImpIncl.out b/test/tests/api-gold/trax/sax/SAXImpIncl.out
new file mode 100644
index 0000000..25b5938
--- /dev/null
+++ b/test/tests/api-gold/trax/sax/SAXImpIncl.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <include-list><import-list>
+    <matched-by-main>Above Should be include-list then import-list</matched-by-main>
+    <matched-by-import>Should be matched-by-import</matched-by-import>
+    <matched-by-include>Should be matched-by-include</matched-by-include>
+    <matched-by-import-also>Should be matched-by-import-also</matched-by-import-also>
+    <include-list><import-list>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+    </import-list></include-list>
+  </import-list></include-list>
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/sax/SAXTest.out b/test/tests/api-gold/trax/sax/SAXTest.out
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api-gold/trax/sax/SAXTest.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/sax/SAXdtd.out b/test/tests/api-gold/trax/sax/SAXdtd.out
new file mode 100644
index 0000000..bf9357d
--- /dev/null
+++ b/test/tests/api-gold/trax/sax/SAXdtd.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><head>Testing © entities an-xsl-entity here</head><list>
+  <item>Xalan-J© 1.x</item>
+  <item>Xalan-Jan-xml-entity 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan this is a CDATA section blah&lt;?&lt;!/&gt;blah documentation</item>
+    <item>Xalan  tests</item>
+  </list>
+</list></out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/sax/cities-indent-no.out b/test/tests/api-gold/trax/sax/cities-indent-no.out
new file mode 100644
index 0000000..f1bc8a1
--- /dev/null
+++ b/test/tests/api-gold/trax/sax/cities-indent-no.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<countries><country name="France"><city>Paris</city><city>Nice</city><city>Lyon</city></country><country name="Italia"><city>Roma</city><city>Milano</city><city>Firenze</city><city>Napoli</city></country><country name="Espana"><city>Madrid</city><city>Barcelona</city></country></countries>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/sax/cities-method-text.out b/test/tests/api-gold/trax/sax/cities-method-text.out
new file mode 100644
index 0000000..e0aa6f7
--- /dev/null
+++ b/test/tests/api-gold/trax/sax/cities-method-text.out
@@ -0,0 +1 @@
+ParisNiceLyonRomaMilanoFirenzeNapoliMadridBarcelona
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/sax/cities.out b/test/tests/api-gold/trax/sax/cities.out
new file mode 100644
index 0000000..bbfcc22
--- /dev/null
+++ b/test/tests/api-gold/trax/sax/cities.out
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<countries>
+<country name="France">
+<city>Paris</city>
+<city>Nice</city>
+<city>Lyon</city>
+</country>
+<country name="Italia">
+<city>Roma</city>
+<city>Milano</city>
+<city>Firenze</city>
+<city>Napoli</city>
+</country>
+<country name="Espana">
+<city>Madrid</city>
+<city>Barcelona</city>
+</country>
+</countries>
diff --git a/test/tests/api-gold/trax/sax/citiesSerialized.out b/test/tests/api-gold/trax/sax/citiesSerialized.out
new file mode 100644
index 0000000..df8dc27
--- /dev/null
+++ b/test/tests/api-gold/trax/sax/citiesSerialized.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<countries><country name="France"><city>Paris</city><city>Nice</city><city>Lyon</city></country><country name="Italia"><city>Roma</city><city>Milano</city><city>Firenze</city><city>Napoli</city></country><country name="Espana"><city>Madrid</city><city>Barcelona</city></country></countries>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/stream/StreamImpIncl.out b/test/tests/api-gold/trax/stream/StreamImpIncl.out
new file mode 100644
index 0000000..25b5938
--- /dev/null
+++ b/test/tests/api-gold/trax/stream/StreamImpIncl.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <include-list><import-list>
+    <matched-by-main>Above Should be include-list then import-list</matched-by-main>
+    <matched-by-import>Should be matched-by-import</matched-by-import>
+    <matched-by-include>Should be matched-by-include</matched-by-include>
+    <matched-by-import-also>Should be matched-by-import-also</matched-by-import-also>
+    <include-list><import-list>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+      <matched-by-main>Should be matched-by-main</matched-by-main>
+    </import-list></include-list>
+  </import-list></include-list>
+</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/trax/stream/StreamOutputFormat.out b/test/tests/api-gold/trax/stream/StreamOutputFormat.out
new file mode 100644
index 0000000..8220224
--- /dev/null
+++ b/test/tests/api-gold/trax/stream/StreamOutputFormat.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE out PUBLIC "this-is-doctype-public" "this-is-doctype-system">
+<out>
+<cdataHere><![CDATA[CDATA? or not?]]></cdataHere>foo<cdataHere><![CDATA[CDATA? or not?]]></cdataHere>
+<out2>bar<selector>
+    <item number="1">one</item>
+    <item value="two">2</item>
+  </selector>
+</out2>
+</out>
diff --git a/test/tests/api-gold/xalanj1/EmbeddedReuseTest1.out b/test/tests/api-gold/xalanj1/EmbeddedReuseTest1.out
new file mode 100644
index 0000000..8bc6424
--- /dev/null
+++ b/test/tests/api-gold/xalanj1/EmbeddedReuseTest1.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xml" href="EmbeddedReuseTest1.xsl"?><list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj1/ParamTest1.out b/test/tests/api-gold/xalanj1/ParamTest1.out
new file mode 100644
index 0000000..2defa1a
--- /dev/null
+++ b/test/tests/api-gold/xalanj1/ParamTest1.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<outp>ABC,<B>ABC</B>; DEF,<B>DEF</B>; GHI,<B>GHI</B>; </outp>:
+   <outs>s1val,s1val; s2val,s2val; s3val,s3val; </outs>:
+   <outt>true,false,false,false,notset</outt>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj1/StylesheetReuseTest1.out b/test/tests/api-gold/xalanj1/StylesheetReuseTest1.out
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api-gold/xalanj1/StylesheetReuseTest1.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/OutputEntities.out b/test/tests/api-gold/xalanj2/OutputEntities.out
new file mode 100644
index 0000000..215edcc
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/OutputEntities.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>&OutputEntityReplaced;</out>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/OutputSettingsXML-12.out b/test/tests/api-gold/xalanj2/OutputSettingsXML-12.out
new file mode 100644
index 0000000..a329915
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/OutputSettingsXML-12.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE out PUBLIC "this-is-doctype-public" "this-is-doctype-system">
+<out>
+            <header>
+                        <title>title-tag:text</title>xsl:text within head tag</header>
+            <document>
+                        <p>P-tag:beginCDATA? or not?</p>
+                        <ul>
+                                    <ul-tag>
+      <li-tag number="1">li-tag:one</li-tag>
+      <li-tag value="two">li-tag:two</li-tag>
+    </ul-tag>
+                        </ul><p>fake 'p' element</p>
+                        <entities>" &amp; &lt; &gt;</entities>
+            </document>
+</out>
diff --git a/test/tests/api-gold/xalanj2/OutputSettingsXML-2.out b/test/tests/api-gold/xalanj2/OutputSettingsXML-2.out
new file mode 100644
index 0000000..6afcba3
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/OutputSettingsXML-2.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE out PUBLIC "this-is-doctype-public" "this-is-doctype-system">
+<out>
+  <header>
+    <title>title-tag:text</title>xsl:text within head tag</header>
+  <document>
+    <p>P-tag:beginCDATA? or not?</p>
+    <ul>
+      <ul-tag>
+      <li-tag number="1">li-tag:one</li-tag>
+      <li-tag value="two">li-tag:two</li-tag>
+    </ul-tag>
+    </ul><p>fake 'p' element</p>
+    <entities>" &amp; &lt; &gt;</entities>
+  </document>
+</out>
diff --git a/test/tests/api-gold/xalanj2/OutputSettingsXML.out b/test/tests/api-gold/xalanj2/OutputSettingsXML.out
new file mode 100644
index 0000000..fce71b5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/OutputSettingsXML.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE out PUBLIC "this-is-doctype-public" "this-is-doctype-system">
+<out>
+<header>
+<title>title-tag:text</title>xsl:text within head tag</header>
+<document>
+<p>P-tag:beginCDATA? or not?</p>
+<ul>
+<ul-tag>
+      <li-tag number="1">li-tag:one</li-tag>
+      <li-tag value="two">li-tag:two</li-tag>
+    </ul-tag>
+</ul><p>fake 'p' element</p>
+<entities>" &amp; &lt; &gt;</entities>
+</document>
+</out>
diff --git a/test/tests/api-gold/xalanj2/SecureProcessingTest.out b/test/tests/api-gold/xalanj2/SecureProcessingTest.out
new file mode 100644
index 0000000..c52f702
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/SecureProcessingTest.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?>6
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_1.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_1.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_1.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_10.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_10.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_10.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_11.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_11.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_11.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_12.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_12.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_12.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_13.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_13.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_13.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_14.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_14.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_14.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_15.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_15.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_15.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_16.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_16.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_16.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_17.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_17.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_17.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_18.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_18.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_18.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_19.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_19.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_19.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_2.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_2.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_2.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_20.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_20.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_20.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_21.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_21.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_21.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_22.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_22.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_22.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_23.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_23.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_23.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_24.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_24.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_24.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_25.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_25.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_25.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_26.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_26.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_26.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_27.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_27.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_27.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_28.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_28.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_28.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_29.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_29.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_29.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_3.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_3.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_3.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_30.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_30.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_30.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_31.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_31.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_31.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_32.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_32.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_32.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_33.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_33.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_33.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_34.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_34.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_34.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_35.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_35.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_35.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_36.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_36.out
new file mode 100644
index 0000000..0fc09a4
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_36.out
@@ -0,0 +1 @@
+http://somebody.elses.extension
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_37.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_37.out
new file mode 100644
index 0000000..201b5eb
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_37.out
@@ -0,0 +1 @@
+http://www.w3.org/XML/1998/namespace
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_38.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_38.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_38.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_39.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_39.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_39.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_4.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_4.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_4.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_40.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_40.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_40.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_41.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_41.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_41.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_42.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_42.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_42.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_43.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_43.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_43.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_44.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_44.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_44.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_45.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_45.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_45.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_46.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_46.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_46.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_47.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_47.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_47.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_48.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_48.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_48.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_49.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_49.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_49.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_5.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_5.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_5.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_50.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_50.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_50.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_51.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_51.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_51.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_52.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_52.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_52.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_53.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_53.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_53.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_54.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_54.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_54.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_55.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_55.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_55.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_56.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_56.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_56.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_57.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_57.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_57.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_58.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_58.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_58.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_59.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_59.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_59.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_6.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_6.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_6.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_60.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_60.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_60.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_61.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_61.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_61.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_62.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_62.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_62.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_63.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_63.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_63.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_64.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_64.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_64.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_65.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_65.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_65.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_7.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_7.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_7.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_8.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_8.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_8.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI1_9.out b/test/tests/api-gold/xalanj2/TestXPathAPI1_9.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI1_9.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_1.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_1.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_1.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_10.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_10.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_10.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_11.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_11.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_11.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_12.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_12.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_12.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_13.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_13.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_13.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_14.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_14.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_14.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_15.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_15.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_15.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_16.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_16.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_16.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_17.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_17.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_17.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_18.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_18.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_18.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_19.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_19.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_19.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_2.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_2.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_2.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_20.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_20.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_20.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_21.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_21.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_21.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_22.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_22.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_22.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_23.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_23.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_23.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_24.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_24.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_24.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_25.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_25.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_25.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_26.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_26.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_26.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_27.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_27.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_27.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_28.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_28.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_28.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_29.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_29.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_29.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_3.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_3.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_3.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_30.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_30.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_30.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_31.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_31.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_31.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_32.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_32.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_32.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_33.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_33.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_33.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_34.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_34.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_34.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_35.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_35.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_35.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_36.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_36.out
new file mode 100644
index 0000000..0fc09a4
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_36.out
@@ -0,0 +1 @@
+http://somebody.elses.extension
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_37.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_37.out
new file mode 100644
index 0000000..201b5eb
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_37.out
@@ -0,0 +1 @@
+http://www.w3.org/XML/1998/namespace
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_38.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_38.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_38.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_39.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_39.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_39.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_4.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_4.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_4.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_40.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_40.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_40.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_41.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_41.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_41.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_42.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_42.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_42.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_43.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_43.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_43.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_44.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_44.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_44.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_45.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_45.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_45.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_46.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_46.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_46.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_47.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_47.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_47.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_48.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_48.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_48.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_49.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_49.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_49.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_5.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_5.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_5.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_50.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_50.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_50.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_51.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_51.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_51.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_52.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_52.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_52.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_53.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_53.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_53.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_54.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_54.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_54.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_55.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_55.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_55.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_56.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_56.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_56.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_57.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_57.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_57.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_58.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_58.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_58.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_59.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_59.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_59.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_6.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_6.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_6.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_60.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_60.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_60.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_61.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_61.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_61.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_62.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_62.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_62.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_63.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_63.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_63.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_64.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_64.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_64.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_65.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_65.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_65.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_7.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_7.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_7.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_8.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_8.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_8.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI2_9.out b/test/tests/api-gold/xalanj2/TestXPathAPI2_9.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI2_9.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_1.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_1.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_1.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_10.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_10.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_10.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_11.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_11.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_11.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_12.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_12.out
new file mode 100644
index 0000000..0fc09a4
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_12.out
@@ -0,0 +1 @@
+http://somebody.elses.extension
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_13.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_13.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_13.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_14.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_14.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_14.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_15.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_15.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_15.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_16.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_16.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_16.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_17.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_17.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_17.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_18.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_18.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_18.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_19.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_19.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_19.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_2.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_2.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_2.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_20.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_20.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_20.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_21.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_21.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_21.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_22.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_22.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_22.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_23.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_23.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_23.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_24.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_24.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_24.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_3.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_3.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_3.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_4.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_4.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_4.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_5.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_5.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_5.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_6.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_6.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_6.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_7.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_7.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_7.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_8.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_8.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_8.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI3_9.out b/test/tests/api-gold/xalanj2/TestXPathAPI3_9.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI3_9.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_1.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_1.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_1.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_10.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_10.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_10.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_11.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_11.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_11.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_12.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_12.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_12.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_13.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_13.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_13.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_14.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_14.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_14.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_15.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_15.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_15.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_16.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_16.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_16.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_17.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_17.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_17.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_18.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_18.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_18.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_19.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_19.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_19.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_2.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_2.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_2.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_20.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_20.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_20.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_21.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_21.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_21.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_22.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_22.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_22.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_23.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_23.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_23.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_24.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_24.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_24.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_25.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_25.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_25.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_26.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_26.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_26.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_27.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_27.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_27.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_28.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_28.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_28.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_29.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_29.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_29.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_3.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_3.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_3.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_30.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_30.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_30.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_31.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_31.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_31.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_32.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_32.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_32.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_33.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_33.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_33.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_34.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_34.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_34.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_35.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_35.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_35.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_36.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_36.out
new file mode 100644
index 0000000..0fc09a4
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_36.out
@@ -0,0 +1 @@
+http://somebody.elses.extension
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_37.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_37.out
new file mode 100644
index 0000000..201b5eb
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_37.out
@@ -0,0 +1 @@
+http://www.w3.org/XML/1998/namespace
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_38.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_38.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_38.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_39.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_39.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_39.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_4.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_4.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_4.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_40.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_40.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_40.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_41.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_41.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_41.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_42.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_42.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_42.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_43.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_43.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_43.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_44.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_44.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_44.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_45.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_45.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_45.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_46.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_46.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_46.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_47.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_47.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_47.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_48.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_48.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_48.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_49.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_49.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_49.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_5.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_5.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_5.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_50.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_50.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_50.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_51.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_51.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_51.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_52.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_52.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_52.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_53.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_53.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_53.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_54.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_54.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_54.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_55.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_55.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_55.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_56.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_56.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_56.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_57.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_57.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_57.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_58.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_58.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_58.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_59.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_59.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_59.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_6.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_6.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_6.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_60.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_60.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_60.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_61.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_61.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_61.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_62.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_62.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_62.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_63.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_63.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_63.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_64.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_64.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_64.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_65.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_65.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_65.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_7.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_7.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_7.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_8.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_8.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_8.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI4_9.out b/test/tests/api-gold/xalanj2/TestXPathAPI4_9.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI4_9.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI5_1.out b/test/tests/api-gold/xalanj2/TestXPathAPI5_1.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI5_1.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI6_1.out b/test/tests/api-gold/xalanj2/TestXPathAPI6_1.out
new file mode 100644
index 0000000..44a7d2f
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI6_1.out
@@ -0,0 +1,51 @@
+<map:sitemap xmlns:map="http://apache.org/xalan/test/sitemap"> 
+
+<!-- =========================== Components ================================ --> 
+
+	<map:components> 
+
+		<map:generators default="file"> 
+  			<map:generator label="content" name="file" src="FileGenerator"/> 
+   			<map:generator label="content" name="directory" src="DirectoryGenerator"/>    			
+		</map:generators> 
+ 
+		<map:transformers default="xslt"> 
+   			<map:transformer name="xslt" src="TraxTransformer">
+				<use-browser-capabilities-db>false</use-browser-capabilities-db>
+			</map:transformer> 			
+		</map:transformers> 
+
+		<map:readers default="resource"> 
+			<map:reader name="resource" src="ResourceReader"/> 
+		</map:readers> 
+   
+		<map:serializers default="html"> 
+   			<map:serializer name="links" src="LinkSerializer"/>
+   			<map:serializer mime-type="text/xml" name="xml" src="XMLSerializer"/> 
+   			<map:serializer mime-type="text/html" name="html" src="HTMLSerializer"/> 
+   			<map:serializer mime-type="application/pdf" name="fo2pdf" src="FOPSerializer"/>   			 
+		</map:serializers>
+
+  		<map:selectors default="browser">
+   			<map:selector name="browser" src="BrowserSelectorFactory">
+                                <!-- # NOTE: The appearance indicates the search order. This is very important since
+                                     #       some words may be found in more than one browser description. (MSIE is
+                                     #       presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...")
+                                -->
+				<browser name="explorer" useragent="MSIE"/>				
+				<browser name="mozilla5" useragent="Mozilla/5"/>
+				<browser name="mozilla5" useragent="Netscape6/"/>
+				<browser name="netscape" useragent="Mozilla"/>
+  			</map:selector>
+ 		</map:selectors>
+
+		<map:matchers default="wildcard">
+   			<map:matcher name="wildcard" src="WildcardURIMatcherFactory"/>			
+		</map:matchers>
+
+     		<map:actions>
+  		</map:actions>
+
+	</map:components> 	
+    
+</map:sitemap>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/TestXPathAPI7_1.out b/test/tests/api-gold/xalanj2/TestXPathAPI7_1.out
new file mode 100644
index 0000000..c41ab8e
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/TestXPathAPI7_1.out
@@ -0,0 +1 @@
+<test id="a" name="TestA"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_1.out b/test/tests/api-gold/xalanj2/XPathAPITest_1.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_1.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_10.out b/test/tests/api-gold/xalanj2/XPathAPITest_10.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_10.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_100.out b/test/tests/api-gold/xalanj2/XPathAPITest_100.out
new file mode 100644
index 0000000..0fc09a4
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_100.out
@@ -0,0 +1 @@
+http://somebody.elses.extension
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_101.out b/test/tests/api-gold/xalanj2/XPathAPITest_101.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_101.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_102.out b/test/tests/api-gold/xalanj2/XPathAPITest_102.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_102.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_103.out b/test/tests/api-gold/xalanj2/XPathAPITest_103.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_103.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_104.out b/test/tests/api-gold/xalanj2/XPathAPITest_104.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_104.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_105.out b/test/tests/api-gold/xalanj2/XPathAPITest_105.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_105.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_106.out b/test/tests/api-gold/xalanj2/XPathAPITest_106.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_106.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_107.out b/test/tests/api-gold/xalanj2/XPathAPITest_107.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_107.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_108.out b/test/tests/api-gold/xalanj2/XPathAPITest_108.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_108.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_109.out b/test/tests/api-gold/xalanj2/XPathAPITest_109.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_109.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_11.out b/test/tests/api-gold/xalanj2/XPathAPITest_11.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_11.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_110.out b/test/tests/api-gold/xalanj2/XPathAPITest_110.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_110.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_111.out b/test/tests/api-gold/xalanj2/XPathAPITest_111.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_111.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_112.out b/test/tests/api-gold/xalanj2/XPathAPITest_112.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_112.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_113.out b/test/tests/api-gold/xalanj2/XPathAPITest_113.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_113.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_114.out b/test/tests/api-gold/xalanj2/XPathAPITest_114.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_114.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_115.out b/test/tests/api-gold/xalanj2/XPathAPITest_115.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_115.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_116.out b/test/tests/api-gold/xalanj2/XPathAPITest_116.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_116.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_117.out b/test/tests/api-gold/xalanj2/XPathAPITest_117.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_117.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_118.out b/test/tests/api-gold/xalanj2/XPathAPITest_118.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_118.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_119.out b/test/tests/api-gold/xalanj2/XPathAPITest_119.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_119.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_12.out b/test/tests/api-gold/xalanj2/XPathAPITest_12.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_12.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_120.out b/test/tests/api-gold/xalanj2/XPathAPITest_120.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_120.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_121.out b/test/tests/api-gold/xalanj2/XPathAPITest_121.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_121.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_122.out b/test/tests/api-gold/xalanj2/XPathAPITest_122.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_122.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_123.out b/test/tests/api-gold/xalanj2/XPathAPITest_123.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_123.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_124.out b/test/tests/api-gold/xalanj2/XPathAPITest_124.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_124.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_125.out b/test/tests/api-gold/xalanj2/XPathAPITest_125.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_125.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_126.out b/test/tests/api-gold/xalanj2/XPathAPITest_126.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_126.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_127.out b/test/tests/api-gold/xalanj2/XPathAPITest_127.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_127.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_128.out b/test/tests/api-gold/xalanj2/XPathAPITest_128.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_128.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_129.out b/test/tests/api-gold/xalanj2/XPathAPITest_129.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_129.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_13.out b/test/tests/api-gold/xalanj2/XPathAPITest_13.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_13.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_130.out b/test/tests/api-gold/xalanj2/XPathAPITest_130.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_130.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_131.out b/test/tests/api-gold/xalanj2/XPathAPITest_131.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_131.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_132.out b/test/tests/api-gold/xalanj2/XPathAPITest_132.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_132.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_133.out b/test/tests/api-gold/xalanj2/XPathAPITest_133.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_133.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_134.out b/test/tests/api-gold/xalanj2/XPathAPITest_134.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_134.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_135.out b/test/tests/api-gold/xalanj2/XPathAPITest_135.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_135.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_136.out b/test/tests/api-gold/xalanj2/XPathAPITest_136.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_136.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_137.out b/test/tests/api-gold/xalanj2/XPathAPITest_137.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_137.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_138.out b/test/tests/api-gold/xalanj2/XPathAPITest_138.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_138.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_139.out b/test/tests/api-gold/xalanj2/XPathAPITest_139.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_139.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_14.out b/test/tests/api-gold/xalanj2/XPathAPITest_14.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_14.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_140.out b/test/tests/api-gold/xalanj2/XPathAPITest_140.out
new file mode 100644
index 0000000..0fc09a4
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_140.out
@@ -0,0 +1 @@
+http://somebody.elses.extension
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_141.out b/test/tests/api-gold/xalanj2/XPathAPITest_141.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_141.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_142.out b/test/tests/api-gold/xalanj2/XPathAPITest_142.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_142.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_143.out b/test/tests/api-gold/xalanj2/XPathAPITest_143.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_143.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_144.out b/test/tests/api-gold/xalanj2/XPathAPITest_144.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_144.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_145.out b/test/tests/api-gold/xalanj2/XPathAPITest_145.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_145.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_146.out b/test/tests/api-gold/xalanj2/XPathAPITest_146.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_146.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_147.out b/test/tests/api-gold/xalanj2/XPathAPITest_147.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_147.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_148.out b/test/tests/api-gold/xalanj2/XPathAPITest_148.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_148.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_149.out b/test/tests/api-gold/xalanj2/XPathAPITest_149.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_149.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_15.out b/test/tests/api-gold/xalanj2/XPathAPITest_15.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_15.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_150.out b/test/tests/api-gold/xalanj2/XPathAPITest_150.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_150.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_151.out b/test/tests/api-gold/xalanj2/XPathAPITest_151.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_151.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_152.out b/test/tests/api-gold/xalanj2/XPathAPITest_152.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_152.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_153.out b/test/tests/api-gold/xalanj2/XPathAPITest_153.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_153.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_154.out b/test/tests/api-gold/xalanj2/XPathAPITest_154.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_154.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_155.out b/test/tests/api-gold/xalanj2/XPathAPITest_155.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_155.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_156.out b/test/tests/api-gold/xalanj2/XPathAPITest_156.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_156.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_157.out b/test/tests/api-gold/xalanj2/XPathAPITest_157.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_157.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_158.out b/test/tests/api-gold/xalanj2/XPathAPITest_158.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_158.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_159.out b/test/tests/api-gold/xalanj2/XPathAPITest_159.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_159.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_16.out b/test/tests/api-gold/xalanj2/XPathAPITest_16.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_16.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_160.out b/test/tests/api-gold/xalanj2/XPathAPITest_160.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_160.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_161.out b/test/tests/api-gold/xalanj2/XPathAPITest_161.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_161.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_162.out b/test/tests/api-gold/xalanj2/XPathAPITest_162.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_162.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_163.out b/test/tests/api-gold/xalanj2/XPathAPITest_163.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_163.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_164.out b/test/tests/api-gold/xalanj2/XPathAPITest_164.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_164.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_165.out b/test/tests/api-gold/xalanj2/XPathAPITest_165.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_165.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_166.out b/test/tests/api-gold/xalanj2/XPathAPITest_166.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_166.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_167.out b/test/tests/api-gold/xalanj2/XPathAPITest_167.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_167.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_168.out b/test/tests/api-gold/xalanj2/XPathAPITest_168.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_168.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_169.out b/test/tests/api-gold/xalanj2/XPathAPITest_169.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_169.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_17.out b/test/tests/api-gold/xalanj2/XPathAPITest_17.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_17.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_170.out b/test/tests/api-gold/xalanj2/XPathAPITest_170.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_170.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_171.out b/test/tests/api-gold/xalanj2/XPathAPITest_171.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_171.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_172.out b/test/tests/api-gold/xalanj2/XPathAPITest_172.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_172.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_173.out b/test/tests/api-gold/xalanj2/XPathAPITest_173.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_173.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_174.out b/test/tests/api-gold/xalanj2/XPathAPITest_174.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_174.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_175.out b/test/tests/api-gold/xalanj2/XPathAPITest_175.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_175.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_176.out b/test/tests/api-gold/xalanj2/XPathAPITest_176.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_176.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_177.out b/test/tests/api-gold/xalanj2/XPathAPITest_177.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_177.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_178.out b/test/tests/api-gold/xalanj2/XPathAPITest_178.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_178.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_179.out b/test/tests/api-gold/xalanj2/XPathAPITest_179.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_179.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_18.out b/test/tests/api-gold/xalanj2/XPathAPITest_18.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_18.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_180.out b/test/tests/api-gold/xalanj2/XPathAPITest_180.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_180.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_181.out b/test/tests/api-gold/xalanj2/XPathAPITest_181.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_181.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_182.out b/test/tests/api-gold/xalanj2/XPathAPITest_182.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_182.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_183.out b/test/tests/api-gold/xalanj2/XPathAPITest_183.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_183.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_184.out b/test/tests/api-gold/xalanj2/XPathAPITest_184.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_184.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_185.out b/test/tests/api-gold/xalanj2/XPathAPITest_185.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_185.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_186.out b/test/tests/api-gold/xalanj2/XPathAPITest_186.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_186.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_187.out b/test/tests/api-gold/xalanj2/XPathAPITest_187.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_187.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_188.out b/test/tests/api-gold/xalanj2/XPathAPITest_188.out
new file mode 100644
index 0000000..0fc09a4
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_188.out
@@ -0,0 +1 @@
+http://somebody.elses.extension
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_189.out b/test/tests/api-gold/xalanj2/XPathAPITest_189.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_189.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_19.out b/test/tests/api-gold/xalanj2/XPathAPITest_19.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_19.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_190.out b/test/tests/api-gold/xalanj2/XPathAPITest_190.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_190.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_191.out b/test/tests/api-gold/xalanj2/XPathAPITest_191.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_191.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_192.out b/test/tests/api-gold/xalanj2/XPathAPITest_192.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_192.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_193.out b/test/tests/api-gold/xalanj2/XPathAPITest_193.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_193.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_194.out b/test/tests/api-gold/xalanj2/XPathAPITest_194.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_194.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_195.out b/test/tests/api-gold/xalanj2/XPathAPITest_195.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_195.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_196.out b/test/tests/api-gold/xalanj2/XPathAPITest_196.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_196.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_197.out b/test/tests/api-gold/xalanj2/XPathAPITest_197.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_197.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_198.out b/test/tests/api-gold/xalanj2/XPathAPITest_198.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_198.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_199.out b/test/tests/api-gold/xalanj2/XPathAPITest_199.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_199.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_2.out b/test/tests/api-gold/xalanj2/XPathAPITest_2.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_2.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_20.out b/test/tests/api-gold/xalanj2/XPathAPITest_20.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_20.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_200.out b/test/tests/api-gold/xalanj2/XPathAPITest_200.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_200.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_201.out b/test/tests/api-gold/xalanj2/XPathAPITest_201.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_201.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_202.out b/test/tests/api-gold/xalanj2/XPathAPITest_202.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_202.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_203.out b/test/tests/api-gold/xalanj2/XPathAPITest_203.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_203.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_204.out b/test/tests/api-gold/xalanj2/XPathAPITest_204.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_204.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_205.out b/test/tests/api-gold/xalanj2/XPathAPITest_205.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_205.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_206.out b/test/tests/api-gold/xalanj2/XPathAPITest_206.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_206.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_207.out b/test/tests/api-gold/xalanj2/XPathAPITest_207.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_207.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_208.out b/test/tests/api-gold/xalanj2/XPathAPITest_208.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_208.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_209.out b/test/tests/api-gold/xalanj2/XPathAPITest_209.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_209.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_21.out b/test/tests/api-gold/xalanj2/XPathAPITest_21.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_21.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_210.out b/test/tests/api-gold/xalanj2/XPathAPITest_210.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_210.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_211.out b/test/tests/api-gold/xalanj2/XPathAPITest_211.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_211.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_212.out b/test/tests/api-gold/xalanj2/XPathAPITest_212.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_212.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_213.out b/test/tests/api-gold/xalanj2/XPathAPITest_213.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_213.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_214.out b/test/tests/api-gold/xalanj2/XPathAPITest_214.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_214.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_215.out b/test/tests/api-gold/xalanj2/XPathAPITest_215.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_215.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_216.out b/test/tests/api-gold/xalanj2/XPathAPITest_216.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_216.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_217.out b/test/tests/api-gold/xalanj2/XPathAPITest_217.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_217.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_218.out b/test/tests/api-gold/xalanj2/XPathAPITest_218.out
new file mode 100644
index 0000000..44a7d2f
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_218.out
@@ -0,0 +1,51 @@
+<map:sitemap xmlns:map="http://apache.org/xalan/test/sitemap"> 
+
+<!-- =========================== Components ================================ --> 
+
+	<map:components> 
+
+		<map:generators default="file"> 
+  			<map:generator label="content" name="file" src="FileGenerator"/> 
+   			<map:generator label="content" name="directory" src="DirectoryGenerator"/>    			
+		</map:generators> 
+ 
+		<map:transformers default="xslt"> 
+   			<map:transformer name="xslt" src="TraxTransformer">
+				<use-browser-capabilities-db>false</use-browser-capabilities-db>
+			</map:transformer> 			
+		</map:transformers> 
+
+		<map:readers default="resource"> 
+			<map:reader name="resource" src="ResourceReader"/> 
+		</map:readers> 
+   
+		<map:serializers default="html"> 
+   			<map:serializer name="links" src="LinkSerializer"/>
+   			<map:serializer mime-type="text/xml" name="xml" src="XMLSerializer"/> 
+   			<map:serializer mime-type="text/html" name="html" src="HTMLSerializer"/> 
+   			<map:serializer mime-type="application/pdf" name="fo2pdf" src="FOPSerializer"/>   			 
+		</map:serializers>
+
+  		<map:selectors default="browser">
+   			<map:selector name="browser" src="BrowserSelectorFactory">
+                                <!-- # NOTE: The appearance indicates the search order. This is very important since
+                                     #       some words may be found in more than one browser description. (MSIE is
+                                     #       presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...")
+                                -->
+				<browser name="explorer" useragent="MSIE"/>				
+				<browser name="mozilla5" useragent="Mozilla/5"/>
+				<browser name="mozilla5" useragent="Netscape6/"/>
+				<browser name="netscape" useragent="Mozilla"/>
+  			</map:selector>
+ 		</map:selectors>
+
+		<map:matchers default="wildcard">
+   			<map:matcher name="wildcard" src="WildcardURIMatcherFactory"/>			
+		</map:matchers>
+
+     		<map:actions>
+  		</map:actions>
+
+	</map:components> 	
+    
+</map:sitemap>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_219.out b/test/tests/api-gold/xalanj2/XPathAPITest_219.out
new file mode 100644
index 0000000..c41ab8e
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_219.out
@@ -0,0 +1 @@
+<test id="a" name="TestA"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_22.out b/test/tests/api-gold/xalanj2/XPathAPITest_22.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_22.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_23.out b/test/tests/api-gold/xalanj2/XPathAPITest_23.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_23.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_24.out b/test/tests/api-gold/xalanj2/XPathAPITest_24.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_24.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_25.out b/test/tests/api-gold/xalanj2/XPathAPITest_25.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_25.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_26.out b/test/tests/api-gold/xalanj2/XPathAPITest_26.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_26.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_27.out b/test/tests/api-gold/xalanj2/XPathAPITest_27.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_27.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_28.out b/test/tests/api-gold/xalanj2/XPathAPITest_28.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_28.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_29.out b/test/tests/api-gold/xalanj2/XPathAPITest_29.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_29.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_3.out b/test/tests/api-gold/xalanj2/XPathAPITest_3.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_3.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_30.out b/test/tests/api-gold/xalanj2/XPathAPITest_30.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_30.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_31.out b/test/tests/api-gold/xalanj2/XPathAPITest_31.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_31.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_32.out b/test/tests/api-gold/xalanj2/XPathAPITest_32.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_32.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_33.out b/test/tests/api-gold/xalanj2/XPathAPITest_33.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_33.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_34.out b/test/tests/api-gold/xalanj2/XPathAPITest_34.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_34.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_35.out b/test/tests/api-gold/xalanj2/XPathAPITest_35.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_35.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_36.out b/test/tests/api-gold/xalanj2/XPathAPITest_36.out
new file mode 100644
index 0000000..0fc09a4
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_36.out
@@ -0,0 +1 @@
+http://somebody.elses.extension
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_37.out b/test/tests/api-gold/xalanj2/XPathAPITest_37.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_37.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_38.out b/test/tests/api-gold/xalanj2/XPathAPITest_38.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_38.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_39.out b/test/tests/api-gold/xalanj2/XPathAPITest_39.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_39.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_4.out b/test/tests/api-gold/xalanj2/XPathAPITest_4.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_4.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_40.out b/test/tests/api-gold/xalanj2/XPathAPITest_40.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_40.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_41.out b/test/tests/api-gold/xalanj2/XPathAPITest_41.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_41.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_42.out b/test/tests/api-gold/xalanj2/XPathAPITest_42.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_42.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_43.out b/test/tests/api-gold/xalanj2/XPathAPITest_43.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_43.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_44.out b/test/tests/api-gold/xalanj2/XPathAPITest_44.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_44.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_45.out b/test/tests/api-gold/xalanj2/XPathAPITest_45.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_45.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_46.out b/test/tests/api-gold/xalanj2/XPathAPITest_46.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_46.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_47.out b/test/tests/api-gold/xalanj2/XPathAPITest_47.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_47.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_48.out b/test/tests/api-gold/xalanj2/XPathAPITest_48.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_48.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_49.out b/test/tests/api-gold/xalanj2/XPathAPITest_49.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_49.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_5.out b/test/tests/api-gold/xalanj2/XPathAPITest_5.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_5.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_50.out b/test/tests/api-gold/xalanj2/XPathAPITest_50.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_50.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_51.out b/test/tests/api-gold/xalanj2/XPathAPITest_51.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_51.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_52.out b/test/tests/api-gold/xalanj2/XPathAPITest_52.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_52.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_53.out b/test/tests/api-gold/xalanj2/XPathAPITest_53.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_53.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_54.out b/test/tests/api-gold/xalanj2/XPathAPITest_54.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_54.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_55.out b/test/tests/api-gold/xalanj2/XPathAPITest_55.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_55.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_56.out b/test/tests/api-gold/xalanj2/XPathAPITest_56.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_56.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_57.out b/test/tests/api-gold/xalanj2/XPathAPITest_57.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_57.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_58.out b/test/tests/api-gold/xalanj2/XPathAPITest_58.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_58.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_59.out b/test/tests/api-gold/xalanj2/XPathAPITest_59.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_59.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_6.out b/test/tests/api-gold/xalanj2/XPathAPITest_6.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_6.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_60.out b/test/tests/api-gold/xalanj2/XPathAPITest_60.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_60.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_61.out b/test/tests/api-gold/xalanj2/XPathAPITest_61.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_61.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_62.out b/test/tests/api-gold/xalanj2/XPathAPITest_62.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_62.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_63.out b/test/tests/api-gold/xalanj2/XPathAPITest_63.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_63.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_64.out b/test/tests/api-gold/xalanj2/XPathAPITest_64.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_64.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_65.out b/test/tests/api-gold/xalanj2/XPathAPITest_65.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_65.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_66.out b/test/tests/api-gold/xalanj2/XPathAPITest_66.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_66.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_67.out b/test/tests/api-gold/xalanj2/XPathAPITest_67.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_67.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_68.out b/test/tests/api-gold/xalanj2/XPathAPITest_68.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_68.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_69.out b/test/tests/api-gold/xalanj2/XPathAPITest_69.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_69.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_7.out b/test/tests/api-gold/xalanj2/XPathAPITest_7.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_7.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_70.out b/test/tests/api-gold/xalanj2/XPathAPITest_70.out
new file mode 100644
index 0000000..3d8b4e2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_70.out
@@ -0,0 +1,2 @@
+
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_71.out b/test/tests/api-gold/xalanj2/XPathAPITest_71.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_71.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_72.out b/test/tests/api-gold/xalanj2/XPathAPITest_72.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_72.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_73.out b/test/tests/api-gold/xalanj2/XPathAPITest_73.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_73.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_74.out b/test/tests/api-gold/xalanj2/XPathAPITest_74.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_74.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_75.out b/test/tests/api-gold/xalanj2/XPathAPITest_75.out
new file mode 100644
index 0000000..8ccb5a8
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_75.out
@@ -0,0 +1,2 @@
+ 
+  
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_76.out b/test/tests/api-gold/xalanj2/XPathAPITest_76.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_76.out
@@ -0,0 +1 @@
+
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_77.out b/test/tests/api-gold/xalanj2/XPathAPITest_77.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_77.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_78.out b/test/tests/api-gold/xalanj2/XPathAPITest_78.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_78.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_79.out b/test/tests/api-gold/xalanj2/XPathAPITest_79.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_79.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_8.out b/test/tests/api-gold/xalanj2/XPathAPITest_8.out
new file mode 100644
index 0000000..b0dac65
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_8.out
@@ -0,0 +1,2 @@
+
+    
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_80.out b/test/tests/api-gold/xalanj2/XPathAPITest_80.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_80.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_81.out b/test/tests/api-gold/xalanj2/XPathAPITest_81.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_81.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_82.out b/test/tests/api-gold/xalanj2/XPathAPITest_82.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_82.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_83.out b/test/tests/api-gold/xalanj2/XPathAPITest_83.out
new file mode 100644
index 0000000..c9dbf9b
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_83.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_84.out b/test/tests/api-gold/xalanj2/XPathAPITest_84.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_84.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_85.out b/test/tests/api-gold/xalanj2/XPathAPITest_85.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_85.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_86.out b/test/tests/api-gold/xalanj2/XPathAPITest_86.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_86.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_87.out b/test/tests/api-gold/xalanj2/XPathAPITest_87.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_87.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_88.out b/test/tests/api-gold/xalanj2/XPathAPITest_88.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_88.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_89.out b/test/tests/api-gold/xalanj2/XPathAPITest_89.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_89.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_9.out b/test/tests/api-gold/xalanj2/XPathAPITest_9.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_9.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_90.out b/test/tests/api-gold/xalanj2/XPathAPITest_90.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_90.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_91.out b/test/tests/api-gold/xalanj2/XPathAPITest_91.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_91.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_92.out b/test/tests/api-gold/xalanj2/XPathAPITest_92.out
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_92.out
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_93.out b/test/tests/api-gold/xalanj2/XPathAPITest_93.out
new file mode 100644
index 0000000..59ef8d1
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_93.out
@@ -0,0 +1 @@
+a1
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_94.out b/test/tests/api-gold/xalanj2/XPathAPITest_94.out
new file mode 100644
index 0000000..12b98c2
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_94.out
@@ -0,0 +1 @@
+a2
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_95.out b/test/tests/api-gold/xalanj2/XPathAPITest_95.out
new file mode 100644
index 0000000..952c754
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_95.out
@@ -0,0 +1 @@
+<!-- -->
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_96.out b/test/tests/api-gold/xalanj2/XPathAPITest_96.out
new file mode 100644
index 0000000..fd87017
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_96.out
@@ -0,0 +1,7 @@
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test"/>
+  <b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_97.out b/test/tests/api-gold/xalanj2/XPathAPITest_97.out
new file mode 100644
index 0000000..78ef5f5
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_97.out
@@ -0,0 +1 @@
+<a test="test"/>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_98.out b/test/tests/api-gold/xalanj2/XPathAPITest_98.out
new file mode 100644
index 0000000..aac86a0
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_98.out
@@ -0,0 +1,4 @@
+<b attr1="a1" attr2="a2" xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
\ No newline at end of file
diff --git a/test/tests/api-gold/xalanj2/XPathAPITest_99.out b/test/tests/api-gold/xalanj2/XPathAPITest_99.out
new file mode 100644
index 0000000..b2fa034
--- /dev/null
+++ b/test/tests/api-gold/xalanj2/XPathAPITest_99.out
@@ -0,0 +1,2 @@
+<a>
+    </a>
\ No newline at end of file
diff --git a/test/tests/api/Minitest.xml b/test/tests/api/Minitest.xml
new file mode 100644
index 0000000..66fd59f
--- /dev/null
+++ b/test/tests/api/Minitest.xml
@@ -0,0 +1,262 @@
+<?xml version="1.0"?>
+<!-- Filename: Minitest.xml -->
+<!-- Author: Paul_Dick@lotus.com -->
+<!-- Author: Shane_Curcuru@lotus.com updated for Minitest use Dec-00 -->
+
+<Family_Geneologies>
+	<Family Surname= "The Smith">
+		<Parents>
+			<Father First="Lewis" MI="R" Last="Smith">Lew Smith</Father> 
+			<Mother First="Ruth" MI="C" Last="Smith">Ruth Smith</Mother> 
+			<GrandKids>
+				<gkid>1</gkid>
+				<gkid>2</gkid>
+				<gkid>3</gkid>
+				<gkid>4</gkid>
+				<gkid>5</gkid>
+				<gkid>6</gkid>
+				<gkid>7</gkid>
+				<gkid>8</gkid>
+				<gkid>9</gkid>
+			</GrandKids>
+		</Parents>
+		<Children>
+			<Child>
+				<Basic_Information>
+					<Name First="Andy" MI="A" Last="Smith">Andy Smith</Name>
+					<Address Street="32 Stonefield Dr" Town="Princton" State="NJ" Zip="07642">Stonefield Dr</Address>
+					<Phone>
+						<Home>483-23-5432</Home>
+						<Work/>
+						<Fax/>
+						<Celluar/>					  
+					</Phone>
+					<Social_Security>012-23-1234</Social_Security>
+				</Basic_Information>
+				<Personal_Information>
+					<Sex>Male</Sex>
+					<Age>45</Age>
+					<Married Kids="2">Yes</Married>
+					<Family_Information>
+						<Wife>
+							<Name First="Suzie" MI="A" Last="Smith">Suzie</Name>
+							<Age>45</Age>
+						</Wife>
+						<Kids>
+							<Kid ID="1">
+								<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+								<Age>9</Age></Kid>
+							<Kid ID="4">
+								<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+								<Age>8</Age></Kid></Kids>
+					</Family_Information>
+				</Personal_Information>
+				<Education>
+					<PA What="Physican Assistant" From="Hannamen College" When="'84">PA</PA>
+					<BS What="Organic Chemistry" From="Ohio Weslyean University" When="'78">BS</BS>
+				</Education>
+			</Child>
+<Child>
+<Basic_Information>
+<Name First="Thomas" MI="B" Last="Smith">Tom Smith</Name>
+<Address Street="47 Pondside Lane" Town="Needham" State="MA" Zip="04532">Pondside Lane</Address>
+<Phone>
+<Home>508.257.2754</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>274-76-2971</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>30</Age>
+<Married Kids="2">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Margaret" MI="A" Last="Young">Maggy</Name>
+<Age>39</Age>
+</Wife>
+<Kids>
+<Kid ID="3">
+<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+<Age>7</Age></Kid>
+<Kid ID="6">
+<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+<Age>5</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education What="Finance" From="Boston University" When="'81">BA</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Henry" MI="M" Last="Smith">Henry Smith</Name>
+<Address Street="25 Lakeview" Town="Pittsfield" State="MA" Zip="98623">Lakeview</Address>
+<Phone>
+<Home>417.645.4954</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>231-45-3590</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>40</Age>
+<Married Kids="2">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Elizbeth" MI="Q" Last="Smith">Beth</Name>
+<Age>40</Age>
+</Wife>
+<Kids>
+<Kid ID="2">
+<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+<Age>8</Age></Kid>
+<Kid ID="5">
+<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+<Age>7</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MBA In="Technology MBA" From="Northeastern University" When="'96">MBA</MBA>
+<BA In="Applied Physics &amp; Math" From="Mass Institute of Technology" When="'82">BA</BA>
+</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Bruce" MI="E" Last="Smith">Bruce Smith</Name>
+<Address Street="36 Strawberry Lane" Town="North Attleboro" State="MA" Zip="73564">Strawberry Lane</Address>
+<Phone>
+<Work>617.432.5607</Work>
+<Home>213.457.2190</Home>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>675-00-4312</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>38</Age>
+<Married Kids="1">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Betsy" MI="A" Last="Smith">Betsy</Name>
+<Age>34</Age>
+</Wife>
+<Kids>
+<Kid ID="7">
+<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+<Age>5</Age></Kid>
+<Kid ID="8">
+<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+<Age>2</Age></Kid>
+<Kid ID="9">
+<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+<Age>1</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education What="Computer Science &amp; Psychology" From="University of Maine" When="'84">BA</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Joseph" MI="A" Last="Smith">Joe Smith</Name>
+<Address Street="85 Green St." Town="Melrose" State="MA" Zip="02176">Green St.</Address>
+<Phone>
+<Home>781.665.0539</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>425-46-6982</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>34</Age>
+<Married Kids="0">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Lilla" MI="A" Last="Smith">Lilla</Name>
+<Age>38</Age>
+</Wife>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MA What="Education" From="Boston College" When="'92">MA</MA>
+<BA What="Political Science" From="University of Maine" When="'89">BA</BA>
+</Education>
+</Child>
+</Children>
+</Family>
+<Family Surname= "The Westons">
+<Parents>
+<Father First="Melvin" MI="O" Last="Weston">Melvin Weston</Father> 
+<Mother First="Elizabeth" MI="A" Last="Harris">Liz Harris</Mother> 
+<GrandKids>
+<gkid>7</gkid>
+<gkid>8</gkid>
+<gkid>9</gkid>
+</GrandKids>
+</Parents>
+<Children>
+<Child>
+<Basic_Information>
+<Name First="Caroline" MI="A" Last="Weston">Caroline Weston</Name>
+<Address Street="Finchly Road" Town="Hanover" State="NH" Zip="23765">Finchly Road</Address>
+<Phone>
+<Home>715.264.8205</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>09-46-8791</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>37</Age>
+<Married >No</Married>
+<Family_Information>
+</Family_Information>
+</Personal_Information>
+<Education What="Administrator" From="Cathrine Gibbs" When="'80">Assoc</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Betsy" MI="A" Last="Weston">Betsy Weston</Name>
+<Address Street="36 Strawberry Lane" Town="North Attleboro" State="MA" Zip="73564">Strawberry Lane</Address>
+<Phone>
+<Work>617.432.5607</Work>
+<Home>213.457.2190</Home>
+<Celluar/>
+</Phone>
+<Social_Security>123-46-9876</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>34</Age>
+<Married Kids="1">Yes</Married>
+<Family_Information>
+<Husband>
+<Name First="Bruce" MI="E" Last="Smith">Bruce</Name>
+<Age>38</Age>
+</Husband>
+<Kids>
+<Kid ID="7">
+<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+<Age>5</Age></Kid>
+<Kid ID="8">
+<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+<Age>2</Age></Kid>
+<Kid ID="9">
+<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+<Age>1</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MA What="Exercise Physiology" From="Indiania University" When="'89">MA</MA>
+<BS What="Kinetics" From="Leeds Poloytechnical" When="'87">BS</BS>
+</Education>
+</Child>
+</Children>
+</Family>
+</Family_Geneologies>
\ No newline at end of file
diff --git a/test/tests/api/Minitest.xsl b/test/tests/api/Minitest.xsl
new file mode 100644
index 0000000..34eb07e
--- /dev/null
+++ b/test/tests/api/Minitest.xsl
@@ -0,0 +1,123 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:smith="url://the.smith.family"
+				xmlns:weston="url://the.weston.family"
+				exclude-result-prefixes="smith weston">
+
+<!-- Filename: Minitest.xsl -->
+<!-- Author: Paul_Dick@lotus.com -->
+<!-- Author: Shane_Curcuru@lotus.com updated for Minitest use Dec-00 -->
+
+<xsl:import href="impincl/MinitestImport.xsl"/>
+<xsl:include href="impincl/MinitestInclude.xsl"/>
+
+<xsl:strip-space elements="Family_Geneologies Kids Males"/>
+<xsl:output method="xml" indent="yes"/>
+<xsl:variable name="root" select="'Families'"/>
+
+<!-- Root xsl:template - start processing here -->
+<xsl:key name="KidInfo" match="Kid" use="@ID"/>
+
+<xsl:template match="Family_Geneologies">
+  <out>
+     <xsl:apply-templates select="Family"/>  
+  </out>
+</xsl:template>
+ 
+
+<xsl:template match="Family">
+<xsl:text>&#10;</xsl:text>
+
+	<xsl:call-template name="tree">
+	   <xsl:with-param name="Surname" select="@Surname"/>
+	</xsl:call-template><xsl:text>&#10;</xsl:text>
+
+	<xsl:value-of select="@Surname" />
+
+    <xsl:apply-templates select="Parents">
+	   <xsl:with-param name="Surname" select="@Surname"/>
+	</xsl:apply-templates>
+
+	<xsl:apply-templates select="Children/Child">
+	   <xsl:sort select="Basic_Information/Name/@First"/>
+	</xsl:apply-templates>
+
+</xsl:template>
+
+<xsl:template match="Child">
+	<xsl:text>&#10;&#13;</xsl:text>
+	<xsl:value-of select=".//Name"/>'s phone number is <xsl:value-of select=".//Phone/Home"/><xsl:text>.</xsl:text>
+	<xsl:if test='Personal_Information/Sex[.="Male"]' ><xsl:text/>
+He is <xsl:value-of select="Personal_Information/Age"/><xsl:text>. </xsl:text>
+	</xsl:if>
+	<xsl:if test='Personal_Information/Sex[.="Female"]' >
+She is <xsl:value-of select="Personal_Information/Age"/><xsl:text>. </xsl:text>
+	</xsl:if>
+	<xsl:apply-templates select="Personal_Information/Married"/> 
+</xsl:template>
+					
+<xsl:template match ="Personal_Information/Married">
+  <xsl:variable name="spouse" select="following-sibling::*/Wife/Name | following-sibling::*/child::Husband/child::Name"/>  
+	<xsl:if test='.="Yes"' >
+		<xsl:value-of select="ancestor::Child/Basic_Information/Name/@First"/> is married to <xsl:value-of select="$spouse"/>
+		<xsl:text>.</xsl:text> 
+		<xsl:choose>
+			<xsl:when test="./@Kids > 0">
+Their children are <xsl:text/>
+				<xsl:for-each select="following-sibling::*/child::Kids/child::Kid">
+				   <!--xsl:value-of select="."/-->
+				   <xsl:choose>
+						<xsl:when test="(position()=last())">
+							<xsl:value-of select="Name"/>:<xsl:value-of select="Age"/></xsl:when>
+						<xsl:otherwise>
+				   			<xsl:value-of select="Name"/>:<xsl:value-of select="Age"/><xsl:text>, </xsl:text></xsl:otherwise>
+				   </xsl:choose>
+				   <xsl:if test="(position()=last()-1)">and </xsl:if>
+				</xsl:for-each>
+			</xsl:when>
+			<xsl:when test="./@Kids = 0">
+They have no kids
+			</xsl:when>
+		</xsl:choose>											
+	</xsl:if>
+	<xsl:if test='.="No"'>
+		<xsl:value-of select="ancestor::Child/child::Basic_Information/child::Name/@First"/> is not married. 
+		<!-- The following is another way to print out the same message
+		<xsl:value-of select="../..//Basic_Information/Name/@First"/> is not married   -->
+	</xsl:if>
+</xsl:template>
+
+<xsl:template match ="Parents">
+   <xsl:param name="Surname" select="'Default'"/>
+The parents are: <xsl:value-of select="Father/@First"/> and <xsl:value-of select="Mother"/>
+    <xsl:choose>
+       <xsl:when test="contains($Surname,'Dicks')">
+          <xsl:apply-templates select="GrandKids" mode="document"/>
+	   </xsl:when>
+	   <xsl:otherwise>
+          <xsl:apply-templates select="GrandKids" mode="orginal"/>
+	   </xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/MinitestParam.xml b/test/tests/api/MinitestParam.xml
new file mode 100644
index 0000000..f9b5151
--- /dev/null
+++ b/test/tests/api/MinitestParam.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <selector>
+    <item number="1">one</item>
+    <item value="two">2</item>
+  </selector>
+</doc>
diff --git a/test/tests/api/MinitestParam.xsl b/test/tests/api/MinitestParam.xsl
new file mode 100644
index 0000000..d45ae92
--- /dev/null
+++ b/test/tests/api/MinitestParam.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="text" />
+
+<!-- Note: params must match various projects' Minitest.java tests -->
+<!-- params with select=value -->
+  <xsl:param name="param1s" select="'default1s'"/>
+  <xsl:param name="param2s" select="'default2s'"/>
+  <xsl:param name="param3s" select="default3s"/>
+
+<!-- params with node values -->
+  <xsl:param name="param1n">'default1n'</xsl:param>
+  <xsl:param name="param2n">'default2n'</xsl:param>
+  <xsl:param name="param3n">default3n</xsl:param>
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text> :param1s: </xsl:text><xsl:value-of select="$param1s"/>
+      <xsl:text> :param2s: </xsl:text><xsl:value-of select="$param2s"/>
+      <xsl:text> :param3s: </xsl:text><xsl:value-of select="$param3s"/>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text> :param1n: </xsl:text><xsl:value-of select="$param1n"/>
+      <xsl:text> :param2n: </xsl:text><xsl:value-of select="$param2n"/>
+      <xsl:text> :param3n: </xsl:text><xsl:value-of select="$param3n"/>
+      <xsl:text>&#10;</xsl:text>
+    </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/MinitestPerf.xml b/test/tests/api/MinitestPerf.xml
new file mode 100644
index 0000000..66fd59f
--- /dev/null
+++ b/test/tests/api/MinitestPerf.xml
@@ -0,0 +1,262 @@
+<?xml version="1.0"?>
+<!-- Filename: Minitest.xml -->
+<!-- Author: Paul_Dick@lotus.com -->
+<!-- Author: Shane_Curcuru@lotus.com updated for Minitest use Dec-00 -->
+
+<Family_Geneologies>
+	<Family Surname= "The Smith">
+		<Parents>
+			<Father First="Lewis" MI="R" Last="Smith">Lew Smith</Father> 
+			<Mother First="Ruth" MI="C" Last="Smith">Ruth Smith</Mother> 
+			<GrandKids>
+				<gkid>1</gkid>
+				<gkid>2</gkid>
+				<gkid>3</gkid>
+				<gkid>4</gkid>
+				<gkid>5</gkid>
+				<gkid>6</gkid>
+				<gkid>7</gkid>
+				<gkid>8</gkid>
+				<gkid>9</gkid>
+			</GrandKids>
+		</Parents>
+		<Children>
+			<Child>
+				<Basic_Information>
+					<Name First="Andy" MI="A" Last="Smith">Andy Smith</Name>
+					<Address Street="32 Stonefield Dr" Town="Princton" State="NJ" Zip="07642">Stonefield Dr</Address>
+					<Phone>
+						<Home>483-23-5432</Home>
+						<Work/>
+						<Fax/>
+						<Celluar/>					  
+					</Phone>
+					<Social_Security>012-23-1234</Social_Security>
+				</Basic_Information>
+				<Personal_Information>
+					<Sex>Male</Sex>
+					<Age>45</Age>
+					<Married Kids="2">Yes</Married>
+					<Family_Information>
+						<Wife>
+							<Name First="Suzie" MI="A" Last="Smith">Suzie</Name>
+							<Age>45</Age>
+						</Wife>
+						<Kids>
+							<Kid ID="1">
+								<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+								<Age>9</Age></Kid>
+							<Kid ID="4">
+								<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+								<Age>8</Age></Kid></Kids>
+					</Family_Information>
+				</Personal_Information>
+				<Education>
+					<PA What="Physican Assistant" From="Hannamen College" When="'84">PA</PA>
+					<BS What="Organic Chemistry" From="Ohio Weslyean University" When="'78">BS</BS>
+				</Education>
+			</Child>
+<Child>
+<Basic_Information>
+<Name First="Thomas" MI="B" Last="Smith">Tom Smith</Name>
+<Address Street="47 Pondside Lane" Town="Needham" State="MA" Zip="04532">Pondside Lane</Address>
+<Phone>
+<Home>508.257.2754</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>274-76-2971</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>30</Age>
+<Married Kids="2">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Margaret" MI="A" Last="Young">Maggy</Name>
+<Age>39</Age>
+</Wife>
+<Kids>
+<Kid ID="3">
+<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+<Age>7</Age></Kid>
+<Kid ID="6">
+<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+<Age>5</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education What="Finance" From="Boston University" When="'81">BA</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Henry" MI="M" Last="Smith">Henry Smith</Name>
+<Address Street="25 Lakeview" Town="Pittsfield" State="MA" Zip="98623">Lakeview</Address>
+<Phone>
+<Home>417.645.4954</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>231-45-3590</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>40</Age>
+<Married Kids="2">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Elizbeth" MI="Q" Last="Smith">Beth</Name>
+<Age>40</Age>
+</Wife>
+<Kids>
+<Kid ID="2">
+<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+<Age>8</Age></Kid>
+<Kid ID="5">
+<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+<Age>7</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MBA In="Technology MBA" From="Northeastern University" When="'96">MBA</MBA>
+<BA In="Applied Physics &amp; Math" From="Mass Institute of Technology" When="'82">BA</BA>
+</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Bruce" MI="E" Last="Smith">Bruce Smith</Name>
+<Address Street="36 Strawberry Lane" Town="North Attleboro" State="MA" Zip="73564">Strawberry Lane</Address>
+<Phone>
+<Work>617.432.5607</Work>
+<Home>213.457.2190</Home>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>675-00-4312</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>38</Age>
+<Married Kids="1">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Betsy" MI="A" Last="Smith">Betsy</Name>
+<Age>34</Age>
+</Wife>
+<Kids>
+<Kid ID="7">
+<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+<Age>5</Age></Kid>
+<Kid ID="8">
+<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+<Age>2</Age></Kid>
+<Kid ID="9">
+<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+<Age>1</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education What="Computer Science &amp; Psychology" From="University of Maine" When="'84">BA</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Joseph" MI="A" Last="Smith">Joe Smith</Name>
+<Address Street="85 Green St." Town="Melrose" State="MA" Zip="02176">Green St.</Address>
+<Phone>
+<Home>781.665.0539</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>425-46-6982</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>34</Age>
+<Married Kids="0">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Lilla" MI="A" Last="Smith">Lilla</Name>
+<Age>38</Age>
+</Wife>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MA What="Education" From="Boston College" When="'92">MA</MA>
+<BA What="Political Science" From="University of Maine" When="'89">BA</BA>
+</Education>
+</Child>
+</Children>
+</Family>
+<Family Surname= "The Westons">
+<Parents>
+<Father First="Melvin" MI="O" Last="Weston">Melvin Weston</Father> 
+<Mother First="Elizabeth" MI="A" Last="Harris">Liz Harris</Mother> 
+<GrandKids>
+<gkid>7</gkid>
+<gkid>8</gkid>
+<gkid>9</gkid>
+</GrandKids>
+</Parents>
+<Children>
+<Child>
+<Basic_Information>
+<Name First="Caroline" MI="A" Last="Weston">Caroline Weston</Name>
+<Address Street="Finchly Road" Town="Hanover" State="NH" Zip="23765">Finchly Road</Address>
+<Phone>
+<Home>715.264.8205</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>09-46-8791</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>37</Age>
+<Married >No</Married>
+<Family_Information>
+</Family_Information>
+</Personal_Information>
+<Education What="Administrator" From="Cathrine Gibbs" When="'80">Assoc</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Betsy" MI="A" Last="Weston">Betsy Weston</Name>
+<Address Street="36 Strawberry Lane" Town="North Attleboro" State="MA" Zip="73564">Strawberry Lane</Address>
+<Phone>
+<Work>617.432.5607</Work>
+<Home>213.457.2190</Home>
+<Celluar/>
+</Phone>
+<Social_Security>123-46-9876</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>34</Age>
+<Married Kids="1">Yes</Married>
+<Family_Information>
+<Husband>
+<Name First="Bruce" MI="E" Last="Smith">Bruce</Name>
+<Age>38</Age>
+</Husband>
+<Kids>
+<Kid ID="7">
+<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+<Age>5</Age></Kid>
+<Kid ID="8">
+<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+<Age>2</Age></Kid>
+<Kid ID="9">
+<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+<Age>1</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MA What="Exercise Physiology" From="Indiania University" When="'89">MA</MA>
+<BS What="Kinetics" From="Leeds Poloytechnical" When="'87">BS</BS>
+</Education>
+</Child>
+</Children>
+</Family>
+</Family_Geneologies>
\ No newline at end of file
diff --git a/test/tests/api/MinitestPerf.xsl b/test/tests/api/MinitestPerf.xsl
new file mode 100644
index 0000000..34eb07e
--- /dev/null
+++ b/test/tests/api/MinitestPerf.xsl
@@ -0,0 +1,123 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:smith="url://the.smith.family"
+				xmlns:weston="url://the.weston.family"
+				exclude-result-prefixes="smith weston">
+
+<!-- Filename: Minitest.xsl -->
+<!-- Author: Paul_Dick@lotus.com -->
+<!-- Author: Shane_Curcuru@lotus.com updated for Minitest use Dec-00 -->
+
+<xsl:import href="impincl/MinitestImport.xsl"/>
+<xsl:include href="impincl/MinitestInclude.xsl"/>
+
+<xsl:strip-space elements="Family_Geneologies Kids Males"/>
+<xsl:output method="xml" indent="yes"/>
+<xsl:variable name="root" select="'Families'"/>
+
+<!-- Root xsl:template - start processing here -->
+<xsl:key name="KidInfo" match="Kid" use="@ID"/>
+
+<xsl:template match="Family_Geneologies">
+  <out>
+     <xsl:apply-templates select="Family"/>  
+  </out>
+</xsl:template>
+ 
+
+<xsl:template match="Family">
+<xsl:text>&#10;</xsl:text>
+
+	<xsl:call-template name="tree">
+	   <xsl:with-param name="Surname" select="@Surname"/>
+	</xsl:call-template><xsl:text>&#10;</xsl:text>
+
+	<xsl:value-of select="@Surname" />
+
+    <xsl:apply-templates select="Parents">
+	   <xsl:with-param name="Surname" select="@Surname"/>
+	</xsl:apply-templates>
+
+	<xsl:apply-templates select="Children/Child">
+	   <xsl:sort select="Basic_Information/Name/@First"/>
+	</xsl:apply-templates>
+
+</xsl:template>
+
+<xsl:template match="Child">
+	<xsl:text>&#10;&#13;</xsl:text>
+	<xsl:value-of select=".//Name"/>'s phone number is <xsl:value-of select=".//Phone/Home"/><xsl:text>.</xsl:text>
+	<xsl:if test='Personal_Information/Sex[.="Male"]' ><xsl:text/>
+He is <xsl:value-of select="Personal_Information/Age"/><xsl:text>. </xsl:text>
+	</xsl:if>
+	<xsl:if test='Personal_Information/Sex[.="Female"]' >
+She is <xsl:value-of select="Personal_Information/Age"/><xsl:text>. </xsl:text>
+	</xsl:if>
+	<xsl:apply-templates select="Personal_Information/Married"/> 
+</xsl:template>
+					
+<xsl:template match ="Personal_Information/Married">
+  <xsl:variable name="spouse" select="following-sibling::*/Wife/Name | following-sibling::*/child::Husband/child::Name"/>  
+	<xsl:if test='.="Yes"' >
+		<xsl:value-of select="ancestor::Child/Basic_Information/Name/@First"/> is married to <xsl:value-of select="$spouse"/>
+		<xsl:text>.</xsl:text> 
+		<xsl:choose>
+			<xsl:when test="./@Kids > 0">
+Their children are <xsl:text/>
+				<xsl:for-each select="following-sibling::*/child::Kids/child::Kid">
+				   <!--xsl:value-of select="."/-->
+				   <xsl:choose>
+						<xsl:when test="(position()=last())">
+							<xsl:value-of select="Name"/>:<xsl:value-of select="Age"/></xsl:when>
+						<xsl:otherwise>
+				   			<xsl:value-of select="Name"/>:<xsl:value-of select="Age"/><xsl:text>, </xsl:text></xsl:otherwise>
+				   </xsl:choose>
+				   <xsl:if test="(position()=last()-1)">and </xsl:if>
+				</xsl:for-each>
+			</xsl:when>
+			<xsl:when test="./@Kids = 0">
+They have no kids
+			</xsl:when>
+		</xsl:choose>											
+	</xsl:if>
+	<xsl:if test='.="No"'>
+		<xsl:value-of select="ancestor::Child/child::Basic_Information/child::Name/@First"/> is not married. 
+		<!-- The following is another way to print out the same message
+		<xsl:value-of select="../..//Basic_Information/Name/@First"/> is not married   -->
+	</xsl:if>
+</xsl:template>
+
+<xsl:template match ="Parents">
+   <xsl:param name="Surname" select="'Default'"/>
+The parents are: <xsl:value-of select="Father/@First"/> and <xsl:value-of select="Mother"/>
+    <xsl:choose>
+       <xsl:when test="contains($Surname,'Dicks')">
+          <xsl:apply-templates select="GrandKids" mode="document"/>
+	   </xsl:when>
+	   <xsl:otherwise>
+          <xsl:apply-templates select="GrandKids" mode="orginal"/>
+	   </xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/ThreadOutput.xml b/test/tests/api/ThreadOutput.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/api/ThreadOutput.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/ThreadOutput.xsl b/test/tests/api/ThreadOutput.xsl
new file mode 100644
index 0000000..7def2b0
--- /dev/null
+++ b/test/tests/api/ThreadOutput.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Test for SCRIPT handling -->
+
+<xsl:template match="/">
+  <HTML>
+    <HEAD>
+      <SCRIPT>
+        <![CDATA[
+        document.write("<P>Hi Oren");
+        if((2 < 5) & (6 < 3))
+        {
+          ...
+        }
+        ]]>
+      </SCRIPT>
+    </HEAD>
+    <BODY/>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/err/ErrorListenerTest.xml b/test/tests/api/err/ErrorListenerTest.xml
new file mode 100644
index 0000000..8189844
--- /dev/null
+++ b/test/tests/api/err/ErrorListenerTest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list name="list1">
+  <item>warning(TransformerException)</item>
+  <item>error(TransformerException)</item>
+  <item>fatalError(TransformerException)</item>
+  <list name="list2">
+    <item>ErrorListener API's</item>
+    <item>Defined Above</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/err/ErrorListenerTest.xsl b/test/tests/api/err/ErrorListenerTest.xsl
new file mode 100644
index 0000000..27b955b
--- /dev/null
+++ b/test/tests/api/err/ErrorListenerTest.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+<!-- FileName: ErrorListenerTest -->
+<!-- Creator: shane_curcuru@lotus.com -->
+<!-- Purpose: Various tests that ErrorListeners get called for illegal stylesheets. -->
+<!-- ExpectedMessage: TBD -->
+<!-- ExpectedError: TBD -->
+<!-- ExpectedFatalError: xsl:decimal-format names must be unique. Name "myminus" has been duplicated -->
+
+<!-- duplicating decimal-format names is illegal, but shouldn't 
+     affect other processing in the stylesheet, so it should be 
+     recoverable, allowing processing to continue.
+--> 
+<xsl:decimal-format name="myminus" minus-sign='_' />
+<xsl:decimal-format name="myminus" minus-sign='`' />
+
+<xsl:template match="list">
+  <list-out>
+    <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+    <xsl:message terminate="no">ExpectedMessage from:<xsl:value-of select="@name"/></xsl:message>
+    <xsl:apply-templates/>
+  </list-out>
+</xsl:template>
+
+<xsl:template match="item">
+  <item-out>
+    <xsl:value-of select="."/>
+  </item-out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/impincl/EmbeddedRelative.xsl b/test/tests/api/impincl/EmbeddedRelative.xsl
new file mode 100644
index 0000000..8521407
--- /dev/null
+++ b/test/tests/api/impincl/EmbeddedRelative.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Filename: EmbeddedRelative.xsl -->
+  <xsl:template match="/list">
+    <embedded-relative-level0>
+      <xsl:apply-templates select="@*|node()"/>
+    </embedded-relative-level0>
+  </xsl:template>
+
+  <xsl:template match="item">
+      <xsl:copy>
+        <xsl:apply-templates select="@*|node()"/>
+      </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/impincl/MinitestDocument.xml b/test/tests/api/impincl/MinitestDocument.xml
new file mode 100644
index 0000000..836af62
--- /dev/null
+++ b/test/tests/api/impincl/MinitestDocument.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<GrandKids>
+	<gkid>1</gkid>
+	<gkid>2</gkid>
+	<gkid>3</gkid>
+	<gkid>4</gkid>
+	<gkid>5</gkid>
+	<gkid>6</gkid>
+	<gkid>7</gkid>
+	<gkid>8</gkid>
+	<gkid>9</gkid>
+</GrandKids>
diff --git a/test/tests/api/impincl/MinitestImport.xsl b/test/tests/api/impincl/MinitestImport.xsl
new file mode 100644
index 0000000..0d01ffc
--- /dev/null
+++ b/test/tests/api/impincl/MinitestImport.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Filename: MinitestImport.xsl -->
+<!-- Author: Paul_Dick@lotus.com -->
+
+
+<xsl:template match="GrandKids" mode="orginal">
+They have <xsl:value-of select="count(*)"/> grandchildren: <xsl:text/>
+	<xsl:for-each select="gkid">
+		<xsl:value-of select="key('KidInfo',(.))/Name/@First"/>
+		<xsl:if test="not(position()=last())">, </xsl:if>
+		<xsl:if test="(position()=last()-1)">and </xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template match="GrandKids" mode="document">
+They should have <xsl:value-of select="count(document('MinitestDocument.xml')/GrandKids/gkid)"/> grandchildren: <xsl:text/>
+	<xsl:for-each select="gkid">
+		<xsl:value-of select="key('KidInfo',.)/Name/@First"/>
+		<xsl:if test="not(position()=last())">, </xsl:if>
+		<xsl:if test="(position()=last()-1)">and </xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template match="GrandKids" mode="doc">
+They got <xsl:value-of select="count(document('MinitestDocument.xml')/GrandKids/gkid)"/> grandchildren: <xsl:text/>
+	<xsl:for-each select="document('MinitestDocument.xml')/GrandKids/gkid">
+		<xsl:value-of select="key('KidInfo',(.))/Name/@First"/>
+		<xsl:if test="not(position()=last())">, </xsl:if>
+		<xsl:if test="(position()=last()-1)">and </xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/impincl/MinitestInclude.xsl b/test/tests/api/impincl/MinitestInclude.xsl
new file mode 100644
index 0000000..c64f85f
--- /dev/null
+++ b/test/tests/api/impincl/MinitestInclude.xsl
@@ -0,0 +1,86 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Filename: MinitestInclude.xsl -->
+<!-- Author: Paul_Dick@lotus.com -->
+
+<xsl:template name="tree">
+   <xsl:param name="Surname" select="Default"/>
+
+   <xsl:comment> Create an simplified output tree for each family </xsl:comment><xsl:text>&#10;   </xsl:text>
+   <xsl:element name="{$root}">
+   <xsl:element name="{substring-after($Surname,'The ')}">
+
+       <!-- Start with the Parents.-->
+	   <xsl:element name="Parents">
+	   <xsl:for-each select="Parents/Father | Parents/Mother">
+		  <xsl:element name="{name(.)}">
+		     <xsl:value-of select="."/>
+		  </xsl:element>
+	   </xsl:for-each>
+	   </xsl:element>
+
+	   <!-- Then the Children. -->
+       <xsl:element name="Children">
+	   <xsl:attribute name="number">
+	      <xsl:value-of select="count(Children/Child)"/>
+	   </xsl:attribute>
+	   <xsl:for-each select="Children/Child">
+		     <xsl:element name="{Personal_Information/Sex}">
+
+			  <xsl:attribute name="name">
+			     <xsl:value-of select="Basic_Information/Name/@First"/>
+			  </xsl:attribute>
+			  <xsl:choose>
+			  <xsl:when test="Personal_Information/Sex='Male'">
+				<xsl:attribute name="wife">
+					<xsl:value-of select="Personal_Information/Family_Information/Wife/Name/@First"/>
+				</xsl:attribute>
+			  </xsl:when>
+			  <xsl:when test="Personal_Information/Sex='Female'">
+				<xsl:attribute name="husband">
+					<xsl:value-of select="Personal_Information/Family_Information/Husband/Name/@First"/>
+				</xsl:attribute>
+			  </xsl:when>
+			  </xsl:choose>
+
+			  <xsl:attribute name="kids">
+				  <xsl:value-of select="count(Personal_Information/Family_Information/Kids/Kid)"/>
+			  </xsl:attribute>				
+
+			  <xsl:if test="count(Personal_Information/Family_Information/Kids/Kid)">
+			     <xsl:element name="Kids">
+			        <xsl:for-each select="Personal_Information/Family_Information/Kids/Kid">
+			           <xsl:element name="Grandkid"><xsl:value-of select="Name/@First"/></xsl:element>
+			        </xsl:for-each>
+			     </xsl:element>
+			  </xsl:if>
+			   
+			  <xsl:value-of select="Basic_Information/Name/@First"/>
+			 </xsl:element>
+	   </xsl:for-each>
+	   </xsl:element>
+
+   </xsl:element>
+   </xsl:element>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/impincl/SystemIdImport.xsl b/test/tests/api/impincl/SystemIdImport.xsl
new file mode 100644
index 0000000..bc0d53d
--- /dev/null
+++ b/test/tests/api/impincl/SystemIdImport.xsl
@@ -0,0 +1,44 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SystemIdInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests with differen systemId's. -->
+
+<xsl:template match="list">
+  <import-list-level0>
+    <xsl:apply-templates/>
+  </import-list-level0>
+</xsl:template>
+
+<xsl:template match="item[@match-by='import']">
+  <matched-by-import-level0>
+    <xsl:value-of select="." />
+  </matched-by-import-level0>
+</xsl:template>
+
+<xsl:template match="item">
+  <matched-by-import-also-level0>
+    <xsl:value-of select="." />
+  </matched-by-import-also-level0>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/impincl/SystemIdInclude.xsl b/test/tests/api/impincl/SystemIdInclude.xsl
new file mode 100644
index 0000000..3031ab5
--- /dev/null
+++ b/test/tests/api/impincl/SystemIdInclude.xsl
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SystemIdInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests with differen systemId's. -->
+
+<xsl:template match="list">
+  <include-list-level0>
+    <xsl:apply-imports/>
+  </include-list-level0>
+</xsl:template>
+
+<xsl:template match="item[@match-by='include']">
+  <matched-by-include-level0>
+    <xsl:value-of select="." />
+  </matched-by-include-level0>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/EmbeddedFragment.xml b/test/tests/api/trax/EmbeddedFragment.xml
new file mode 100644
index 0000000..6b03da9
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedFragment.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?> 
+<?xml-stylesheet type="text/xsl" href="#style1"?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA | head | body)*>
+
+<!ELEMENT head (#PCDATA | xsl:stylesheet)*>
+<!ELEMENT body (#PCDATA|para)*>
+
+<!ELEMENT xsl:stylesheet (#PCDATA | xsl:key | xsl:template)*>
+<!ATTLIST xsl:stylesheet 
+		  id ID #REQUIRED
+		  xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform"
+		  version NMTOKEN #REQUIRED>
+
+<!ELEMENT xsl:key EMPTY>
+<!ATTLIST xsl:key
+    name NMTOKENS #REQUIRED
+    match CDATA #REQUIRED
+    use CDATA #REQUIRED>
+
+<!ELEMENT xsl:template (#PCDATA | out)*>
+<!ATTLIST xsl:template  match CDATA #IMPLIED>
+
+<!ELEMENT out (#PCDATA | xsl:value-of | xsl:text)*>
+
+<!ELEMENT xsl:value-of EMPTY>
+<!ATTLIST xsl:value-of select CDATA #REQUIRED>
+
+<!ELEMENT xsl:text (#PCDATA)>
+
+<!ELEMENT para (#PCDATA)*>
+<!ATTLIST para id ID #REQUIRED>
+]>
+
+<doc>
+  <head>
+	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                id="style1">
+
+	<!-- FileName: EmbeddedFragment/embed01 -->
+	<!-- Document: http://www.w3.org/TR/xslt -->
+	<!-- DocVersion: 19991116 -->
+	<!-- Section: 2.7 Embedding Stylesheets. -->
+	<!-- Purpose: General test of embedded stylesheet using fragment identifier -->
+
+	  <xsl:key name="test" match="para" use="@id"/>
+
+		<xsl:template match="/">
+  			<out>
+    			<xsl:value-of select="doc/body/para"/>
+				<xsl:value-of select="key('test','foey')"/><xsl:text>&#10;</xsl:text>
+  			</out>
+		</xsl:template>
+	</xsl:stylesheet>
+  </head>
+
+  <body>
+  	<para id="foo">
+Hello
+	</para>
+	<para id="foey">
+Goodbye
+	</para>
+  </body>
+</doc>
diff --git a/test/tests/api/trax/EmbeddedImpIncl.xml b/test/tests/api/trax/EmbeddedImpIncl.xml
new file mode 100644
index 0000000..2f0c319
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedImpIncl.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xml" href="EmbeddedImpIncl.xsl"?>
+<doc>
+  <list>
+    <item>Above Should be include-list then import-list</item>
+    <item>This is EmbeddedImpIncl.xml, used for setSystemId testing Note that different settings of systemIds will have different expected results!</item>
+    <item match-by="import">Should be matched-by-import</item>
+    <item match-by="include">Should be matched-by-include</item>
+    <item match-by="main">Should be matched-by-import-also</item>
+    <list>
+      <item>Should be matched-by-main</item>
+      <item>Should be matched-by-main</item>
+    </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/EmbeddedImpIncl.xsl b/test/tests/api/trax/EmbeddedImpIncl.xsl
new file mode 100644
index 0000000..d18c09b
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedImpIncl.xsl
@@ -0,0 +1,48 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: EmbeddedImpIncl.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests with differen systemId's. -->
+  <!-- This is EmbeddedImpIncl.xsl, used for setSystemId testing Note that different settings of systemIds will have different expected results! -->
+  <!-- We re-use the stylesheets from the SystemId test here -->
+<xsl:import href="impincl/SystemIdImport.xsl"/>
+<xsl:include href="impincl/SystemIdInclude.xsl"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+<xsl:template match="list" priority="-1">
+ <main-list>
+  <xsl:apply-templates/>
+ </main-list>
+</xsl:template>
+
+<xsl:template match="item[not(@match-by)]">
+  <matched-by-main>
+    <xsl:value-of select="." />
+  </matched-by-main>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/EmbeddedMediaTitle.xml b/test/tests/api/trax/EmbeddedMediaTitle.xml
new file mode 100644
index 0000000..c20da09
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedMediaTitle.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet media="foo/media" title="foo-title" type="text/xsl" href="impincl/EmbeddedRelative.xsl"?>
+<?xml-stylesheet media="bar/media" title="bar-title" type="text/xml" href="../impincl/EmbeddedRelative.xsl"?>
+<?xml-stylesheet media="alt/media" alternate="no" title="alt-title" type="application/xml+xslt" href="NotFoundAlternate.xsl"?>
+<?xml-stylesheet media="alt/media" alternate="yes" title="alt-title" type="application/xml+xslt" href="systemid/impincl/EmbeddedRelative.xsl"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/EmbeddedRelative.xml b/test/tests/api/trax/EmbeddedRelative.xml
new file mode 100644
index 0000000..3980beb
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedRelative.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="impincl/EmbeddedRelative.xsl"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/EmbeddedType-application-xml-xslt.xml b/test/tests/api/trax/EmbeddedType-application-xml-xslt.xml
new file mode 100644
index 0000000..d35daf7
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedType-application-xml-xslt.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="not/valid" href="file-not-found.xsl"?>
+<?xml-stylesheet type="application/xml+xslt" href="EmbeddedType.xsl"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/EmbeddedType-text-xml.xml b/test/tests/api/trax/EmbeddedType-text-xml.xml
new file mode 100644
index 0000000..3a0d9fe
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedType-text-xml.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="not/valid" href="file-not-found.xsl"?>
+<?xml-stylesheet type="text/xml" href="EmbeddedType.xsl"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/EmbeddedType-text-xsl.xml b/test/tests/api/trax/EmbeddedType-text-xsl.xml
new file mode 100644
index 0000000..f631e72
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedType-text-xsl.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="not/valid" href="file-not-found.xsl"?>
+<?xml-stylesheet type="text/xsl" href="EmbeddedType.xsl"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/EmbeddedType.xsl b/test/tests/api/trax/EmbeddedType.xsl
new file mode 100644
index 0000000..72da673
--- /dev/null
+++ b/test/tests/api/trax/EmbeddedType.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Filename: EmbeddedType.xsl -->
+<!-- Explicitly only matches on /list so we don't get top-level PI's -->
+  <xsl:template match="/list">
+    <embedded-type>
+      <xsl:apply-templates select="item"/>
+    </embedded-type>
+  </xsl:template>
+
+  <xsl:template match="item">
+    <xsl:copy-of select="."/>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/OutputPropertiesHTML.xml b/test/tests/api/trax/OutputPropertiesHTML.xml
new file mode 100644
index 0000000..4985d62
--- /dev/null
+++ b/test/tests/api/trax/OutputPropertiesHTML.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html-tag>
+  <head-tag>
+    <title-tag text="title-tag:text"/>
+  </head-tag>
+  <body-tag>
+    <p-tag>P-tag:begin<cdataHere>CDATA? or not?</cdataHere></p-tag>
+    <ul-tag>
+      <li-tag number="1">li-tag:one</li-tag>
+      <li-tag value="two">li-tag:two</li-tag>
+    </ul-tag>
+  </body-tag>
+</html-tag>
diff --git a/test/tests/api/trax/OutputPropertiesHTML.xsl b/test/tests/api/trax/OutputPropertiesHTML.xsl
new file mode 100644
index 0000000..05d5a7d
--- /dev/null
+++ b/test/tests/api/trax/OutputPropertiesHTML.xsl
@@ -0,0 +1,70 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: OutputPropertiesHTML.xsl -->
+  <!-- Purpose: Legal HTML output for use with OutputPropertiesTest.java -->
+
+<!-- Include various XSLT spec xsl:output attrs -->
+<xsl:output method="html"
+            version="123.45"
+            standalone="yes"
+            doctype-public="this-is-doctype-public"
+            doctype-system="this-is-doctype-system"
+            cdata-section-elements="cdataHere"
+            indent="yes"
+            media-type="text/test/xml"
+            omit-xml-declaration="yes" />
+
+<xsl:template match="/">
+  <HTML>
+  <xsl:apply-templates/>
+  </HTML>
+</xsl:template>
+
+<xsl:template match="html-tag">
+    <HEAD>
+      <xsl:element name="TITLE"><xsl:value-of select="head-tag/title-tag/@text"/></xsl:element>
+      <xsl:text>xsl:text within HEAD tag</xsl:text>
+    </HEAD>
+    <BODY>
+    <xsl:apply-templates select="body-tag"/>
+    <xsl:text disable-output-escaping="yes">&lt;P>Fake 'p' element&lt;/P></xsl:text>
+    <!-- Some HTML elements below, just for fun -->
+    <P>&#064; &#160; &#126; &#169; &#200;</P>
+    </BODY>
+</xsl:template>
+
+<xsl:template match="body-tag">
+    <xsl:apply-templates select="p-tag | ul-tag"/>
+</xsl:template>
+
+<xsl:template match="p-tag">
+  <xsl:element name="P">
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+ 
+<xsl:template match="ul-tag">
+  <UL>
+    <xsl:copy-of select="."/>
+  </UL>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/ParameterTest.xml b/test/tests/api/trax/ParameterTest.xml
new file mode 100644
index 0000000..851d099
--- /dev/null
+++ b/test/tests/api/trax/ParameterTest.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!-- Testing xsl:param-->
+<doc filename="ParameterTest.xml">
+  <item number="1">1</item>
+  <item number="2">2</item>
+  <item number="3">3</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/ParameterTest.xsl b/test/tests/api/trax/ParameterTest.xsl
new file mode 100644
index 0000000..c9df75e
--- /dev/null
+++ b/test/tests/api/trax/ParameterTest.xsl
@@ -0,0 +1,78 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ParameterTest.xsl -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Functional test of various usages of parameters in transforms -->
+
+<!-- Declare one of each flavor of common global param statements -->
+<xsl:param name="p1">
+    <B>ABC</B>
+</xsl:param>
+
+<xsl:param name="p2"><B>DEF</B></xsl:param>
+
+<xsl:param name="t1">notset</xsl:param>
+
+<xsl:param name="s1" select="'s1val'">
+</xsl:param>
+
+<xsl:param name="s2" select="'s2val'"></xsl:param>
+
+<xsl:template match="doc">
+  <xsl:param name="p3"><B>GHI</B></xsl:param>
+  <xsl:param name="s3" select="'s3val'"></xsl:param>
+
+  <outp>
+    <xsl:value-of select="$p1"/><xsl:text>,</xsl:text><xsl:copy-of select="$p1"/><xsl:text>; </xsl:text>
+    <xsl:value-of select="$p2"/><xsl:text>,</xsl:text><xsl:copy-of select="$p2"/><xsl:text>; </xsl:text>
+    <xsl:value-of select="$p3"/><xsl:text>,</xsl:text><xsl:copy-of select="$p3"/><xsl:text>; </xsl:text>
+  </outp>
+  <xsl:text>:
+  </xsl:text>
+  <outs>
+    <xsl:value-of select="$s1"/><xsl:text>,</xsl:text><xsl:copy-of select="$s1"/><xsl:text>; </xsl:text>
+    <xsl:value-of select="$s2"/><xsl:text>,</xsl:text><xsl:copy-of select="$s2"/><xsl:text>; </xsl:text>
+    <xsl:value-of select="$s3"/><xsl:text>,</xsl:text><xsl:copy-of select="$s3"/><xsl:text>; </xsl:text>
+  </outs>
+  <xsl:text>:
+  </xsl:text>
+
+  <outt>
+    <xsl:value-of select="$t1='notset'"/><xsl:text>-notset,</xsl:text>
+    <xsl:value-of select="$t1=''"/><xsl:text>-blank,</xsl:text>
+    <xsl:value-of select="$t1='a'"/><xsl:text>-a,</xsl:text>
+    <xsl:value-of select="$t1='1'"/><xsl:text>-1,</xsl:text>
+    <xsl:value-of select="$t1"/>
+  </outt>
+  <xsl:apply-templates/>
+
+  <!-- @todo Should also call a template and pass a param as well -->
+</xsl:template>
+
+<xsl:template match="item[text() = '2']">
+  <xsl:text>Item-2-found</xsl:text>
+</xsl:template>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/ParameterTest2.xml b/test/tests/api/trax/ParameterTest2.xml
new file mode 100644
index 0000000..1e68556
--- /dev/null
+++ b/test/tests/api/trax/ParameterTest2.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!-- Testing xsl:param-->
+<doc filename="ParameterTest2.xml">
+  <item number="1.1">11</item>
+  <item number="2.2">22</item>
+  <item number="3.3">33</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/ParameterTest2.xsl b/test/tests/api/trax/ParameterTest2.xsl
new file mode 100644
index 0000000..0231daf
--- /dev/null
+++ b/test/tests/api/trax/ParameterTest2.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" indent="yes"/>
+  <!-- FileName: ParameterTest2.xsl -->
+  <!-- Purpose: Reproduce Bugzilla1611 -->
+
+<xsl:variable name="globalVarAttr" select="/doc/@filename" />
+
+<xsl:template match="/">
+  <out>
+    <globalVarAttr><xsl:value-of select="$globalVarAttr"/><xsl:text>:</xsl:text><xsl:copy-of select="$globalVarAttr"/></globalVarAttr>
+  </out>
+</xsl:template>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/SystemIdImpIncl.xml b/test/tests/api/trax/SystemIdImpIncl.xml
new file mode 100644
index 0000000..234d027
--- /dev/null
+++ b/test/tests/api/trax/SystemIdImpIncl.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list>
+    <item>Above Should be include-list then import-list</item>
+    <item>This is SystemIdImpIncl.xml, used for setSystemId testing Note that different settings of systemIds will have different expected results!</item>
+    <item match-by="import">Should be matched-by-import</item>
+    <item match-by="include">Should be matched-by-include</item>
+    <item match-by="main">Should be matched-by-import-also</item>
+    <list>
+      <item>Should be matched-by-main</item>
+      <item>Should be matched-by-main</item>
+    </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/SystemIdImpIncl.xsl b/test/tests/api/trax/SystemIdImpIncl.xsl
new file mode 100644
index 0000000..ffb46af
--- /dev/null
+++ b/test/tests/api/trax/SystemIdImpIncl.xsl
@@ -0,0 +1,48 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SystemIdImpIncl.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests with differen systemId's. -->
+  <!-- This is SystemIdImpIncl.xsl, used for setSystemId testing Note that different settings of systemIds will have different expected results! -->
+
+<xsl:import href="impincl/SystemIdImport.xsl"/>
+<xsl:include href="impincl/SystemIdInclude.xsl"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+<xsl:template match="list" priority="-1">
+ <main-list>
+  <xsl:apply-templates/>
+ </main-list>
+</xsl:template>
+
+<xsl:template match="item[not(@match-by)]">
+  <matched-by-main>
+    <xsl:value-of select="." />
+  </matched-by-main>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/SystemIdTest.xml b/test/tests/api/trax/SystemIdTest.xml
new file mode 100644
index 0000000..6d80927
--- /dev/null
+++ b/test/tests/api/trax/SystemIdTest.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Filename: SystemIdTest.xml -->
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/SystemIdTest.xsl b/test/tests/api/trax/SystemIdTest.xsl
new file mode 100644
index 0000000..4b86a37
--- /dev/null
+++ b/test/tests/api/trax/SystemIdTest.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Filename: SystemIdTest.xsl -->
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/TransformerAPIHTMLFormat.xml b/test/tests/api/trax/TransformerAPIHTMLFormat.xml
new file mode 100644
index 0000000..b626c91
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIHTMLFormat.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html-tag>
+  <head-tag>
+    <title-tag text="title-tag:text"/>
+  </head-tag>
+  <body-tag>
+    <p-tag>P-tag:begin<cdataHere>CDATA? or not?</cdataHere><br-tag/><hr-tag/></p-tag>
+    <ul-tag>
+      <li-tag number="1">li-tag:one</li-tag>
+      <li-tag value="two">li-tag:two</li-tag>
+    </ul-tag>
+  </body-tag>
+</html-tag>
diff --git a/test/tests/api/trax/TransformerAPIHTMLFormat.xsl b/test/tests/api/trax/TransformerAPIHTMLFormat.xsl
new file mode 100644
index 0000000..7a87999
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIHTMLFormat.xsl
@@ -0,0 +1,75 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: TransformerAPIHTMLFormat.xsl -->
+  <!-- Purpose: Legal HTML output for use with OutputPropertiesTest.java -->
+
+<!-- Include various XSLT spec xsl:output attrs -->
+<xsl:output method="html"
+            media-type="text/test/xml"
+            omit-xml-declaration="yes" />
+
+<xsl:template match="/">
+  <HTML>
+  <xsl:apply-templates/>
+  </HTML>
+</xsl:template>
+
+<xsl:template match="html-tag">
+    <HEAD>
+      <xsl:element name="TITLE"><xsl:value-of select="head-tag/title-tag/@text"/></xsl:element>
+      <xsl:text>xsl:text within HEAD tag</xsl:text>
+    </HEAD>
+    <BODY>
+    <xsl:apply-templates select="body-tag"/>
+    <xsl:text disable-output-escaping="yes">&lt;P>Fake 'p' element&lt;/P></xsl:text>
+    <!-- Some HTML elements below, just for fun -->
+    <P>&#064; &#160; &#126; &#169; &#200;</P>
+    </BODY>
+</xsl:template>
+
+<xsl:template match="body-tag">
+    <xsl:apply-templates select="p-tag | ul-tag"/>
+</xsl:template>
+
+<xsl:template match="p-tag">
+  <xsl:element name="P">
+    <xsl:value-of select="."/>
+    <xsl:apply-templates select="br-tag | hr-tag"/>
+  </xsl:element>
+</xsl:template>
+ 
+<xsl:template match="ul-tag">
+  <UL>
+    <xsl:copy-of select="."/>
+  </UL>
+</xsl:template>
+
+<xsl:template match="br-tag">
+  <BR/>
+</xsl:template>
+
+<xsl:template match="hr-tag">
+  <HR></HR>
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/TransformerAPIOutputFormat.xml b/test/tests/api/trax/TransformerAPIOutputFormat.xml
new file mode 100644
index 0000000..63da208
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIOutputFormat.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <cdataHere>CDATA? or not?</cdataHere>
+  <selector>
+    <item number="1">one</item>
+    <item value="two">2</item>
+  </selector>
+</doc>
diff --git a/test/tests/api/trax/TransformerAPIOutputFormat.xsl b/test/tests/api/trax/TransformerAPIOutputFormat.xsl
new file mode 100644
index 0000000..bf735a3
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIOutputFormat.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- Include all XSLT spec xsl:output attrs -->
+<xsl:output method="xml"
+            version="123.45"
+            encoding="UTF-16"
+            standalone="yes"
+            doctype-public="this-is-doctype-public"
+            doctype-system="this-is-doctype-system"
+            cdata-section-elements="cdataHere"
+            indent="yes"
+            media-type="text/test/xml"
+            omit-xml-declaration="yes" />
+
+  <xsl:template match="doc">
+    <out>
+      <cdataHere>CDATA? or not?</cdataHere>
+      <xsl:text>foo</xsl:text>
+      <xsl:copy-of select="cdataHere" />
+      <out2>
+        <xsl:text>bar</xsl:text>
+        <xsl:copy-of select="selector" />
+      </out2>
+    </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/TransformerAPIParam.xml b/test/tests/api/trax/TransformerAPIParam.xml
new file mode 100644
index 0000000..f9b5151
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIParam.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <selector>
+    <item number="1">one</item>
+    <item value="two">2</item>
+  </selector>
+</doc>
diff --git a/test/tests/api/trax/TransformerAPIParam.xsl b/test/tests/api/trax/TransformerAPIParam.xsl
new file mode 100644
index 0000000..4ce2d52
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIParam.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- params with select=value -->
+  <xsl:param name="param1s" select="'default1s'"/>
+  <xsl:param name="param2s" select="'default2s'"/>
+  <xsl:param name="param3s" select="default3s"/>
+<!-- params with node values -->
+  <xsl:param name="param1n">'default1n'</xsl:param>
+  <xsl:param name="param2n">'default2n'</xsl:param>
+  <xsl:param name="param3n">default3n</xsl:param>
+  <xsl:template match="doc">
+    <out><xsl:text>&#10;</xsl:text>
+      <xsl:text> :param1s:</xsl:text><xsl:value-of select="$param1s"/>
+      <xsl:text> :param2s:</xsl:text><xsl:value-of select="$param2s"/>
+      <xsl:text> :param3s:</xsl:text><xsl:value-of select="$param3s"/>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text> :param1n:</xsl:text><xsl:value-of select="$param1n"/>
+      <xsl:text> :param2n:</xsl:text><xsl:value-of select="$param2n"/>
+      <xsl:text> :param3n:</xsl:text><xsl:value-of select="$param3n"/>
+      <xsl:text>&#10;</xsl:text>
+    </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/TransformerAPIVar.xml b/test/tests/api/trax/TransformerAPIVar.xml
new file mode 100644
index 0000000..19e1472
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIVar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <body>
+    <list>
+      <item>TransformerAPIVar-original</item>
+    </list>
+  </body>
+</doc>
diff --git a/test/tests/api/trax/TransformerAPIVar.xsl b/test/tests/api/trax/TransformerAPIVar.xsl
new file mode 100644
index 0000000..60b4d3d
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIVar.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+	
+  <xsl:variable name="globalVar" select="/doc/body/list/item"/>
+	
+  <xsl:template match="/">
+    <out>
+      <item><xsl:value-of select="$globalVar"/></item>
+      <item>Text and:<xsl:value-of select="$globalVar"/></item>
+    </out>
+  </xsl:template>
+	
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/TransformerAPIVar2.xml b/test/tests/api/trax/TransformerAPIVar2.xml
new file mode 100644
index 0000000..00c6508
--- /dev/null
+++ b/test/tests/api/trax/TransformerAPIVar2.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <body>
+    <list>
+      <item>TransformerAPIVar2-changed</item>
+    </list>
+  </body>
+</doc>
diff --git a/test/tests/api/trax/TransformerFactoryAPIModern.css b/test/tests/api/trax/TransformerFactoryAPIModern.css
new file mode 100644
index 0000000..c80556d
--- /dev/null
+++ b/test/tests/api/trax/TransformerFactoryAPIModern.css
@@ -0,0 +1,6 @@
+       ARTICLE { font-family: sans-serif; background: white; color: black }
+       AUTHOR { margin: 1em; color: red }
+       HEADLINE { text-align: right; margin-bottom: 2em }
+       PARA { line-height: 1.5; margin-left: 15% }
+       INSTRUMENT { color: blue }
+
diff --git a/test/tests/api/trax/TransformerFactoryAPIModern.xml b/test/tests/api/trax/TransformerFactoryAPIModern.xml
new file mode 100644
index 0000000..9744261
--- /dev/null
+++ b/test/tests/api/trax/TransformerFactoryAPIModern.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="TransformerFactoryAPIModern.css" title="Modern" media="screen"
+         type="text/css"?>
+       <ARTICLE>
+         <HEADLINE>Fredrick the Great meets Bach</HEADLINE>
+         <AUTHOR>Johann Nikolaus Forkel</AUTHOR>
+         <PARA>
+           One evening, just as he was getting his 
+           <INSTRUMENT>flute</INSTRUMENT> ready and his
+           musicians were assembled, an officer brought him a list of
+           the strangers who had arrived.
+         </PARA>
+       </ARTICLE>
diff --git a/test/tests/api/trax/URIResolverTest.xml b/test/tests/api/trax/URIResolverTest.xml
new file mode 100644
index 0000000..f37499b
--- /dev/null
+++ b/test/tests/api/trax/URIResolverTest.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list>
+    <item>Above Should be include-list then import-list</item>
+    <item>This is URIResolverTest.xml!</item>
+    <item match-by="import">Should be matched-by-import</item>
+    <item match-by="include">Should be matched-by-include</item>
+    <item match-by="main">Should be matched-by-import-also</item>
+    <list>
+      <item>Should be matched-by-main</item>
+      <item>Should be matched-by-main</item>
+    </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/URIResolverTest.xsl b/test/tests/api/trax/URIResolverTest.xsl
new file mode 100644
index 0000000..3c52554
--- /dev/null
+++ b/test/tests/api/trax/URIResolverTest.xsl
@@ -0,0 +1,59 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: URIResolverTest.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Various kinds of URIs need to be resolved from this stylesheet. -->
+
+<xsl:import href="impincl/SystemIdImport.xsl"/>
+<xsl:include href="impincl/SystemIdInclude.xsl"/>
+
+<xsl:template match="doc">
+ <out>
+  <head>
+   <xsl:variable name="resolvedURI1" select="document('../impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:template[@match='list']"/>
+   <xsl:variable name="resolvedURI2" select="document('impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:template[@match='list']"/>
+   <xsl:variable name="resolvedURI3" select="document('systemid/impincl/SystemIdImport.xsl')/xsl:stylesheet/xsl:template[@match='list']"/>
+   <xsl:text>Various document() calls: </xsl:text>
+   <xsl:value-of select="$resolvedURI1"/>
+   <xsl:text>, </xsl:text>
+   <xsl:value-of select="$resolvedURI2"/>
+   <xsl:text>, </xsl:text>
+   <xsl:value-of select="$resolvedURI3"/>
+   <xsl:text>.</xsl:text>
+  </head>
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+<xsl:template match="list" priority="-1">
+ <main-list>
+  <xsl:apply-templates/>
+ </main-list>
+</xsl:template>
+
+<xsl:template match="item[not(@match-by)]">
+  <matched-by-main>
+    <xsl:value-of select="." />
+  </matched-by-main>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/dom/DOMImpIncl.xml b/test/tests/api/trax/dom/DOMImpIncl.xml
new file mode 100644
index 0000000..d5d4f5e
--- /dev/null
+++ b/test/tests/api/trax/dom/DOMImpIncl.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list>
+    <item>Above Should be include-list then import-list</item>
+    <item match-by="import">Should be matched-by-import</item>
+    <item match-by="include">Should be matched-by-include</item>
+    <item match-by="main">Should be matched-by-import-also</item>
+    <list>
+      <item>Should be matched-by-main</item>
+      <item>Should be matched-by-main</item>
+    </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/dom/DOMImpIncl.xsl b/test/tests/api/trax/dom/DOMImpIncl.xsl
new file mode 100644
index 0000000..e3167bc
--- /dev/null
+++ b/test/tests/api/trax/dom/DOMImpIncl.xsl
@@ -0,0 +1,47 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: StreamImpIncl.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
+
+<xsl:import href="impincl/SimpleImport.xsl"/>
+<xsl:include href="impincl/SimpleInclude.xsl"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+<xsl:template match="list" priority="-1">
+ <main-list>
+  <xsl:apply-templates/>
+ </main-list>
+</xsl:template>
+
+<xsl:template match="item[not(@match-by)]">
+  <matched-by-main>
+    <xsl:value-of select="." />
+  </matched-by-main>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/dom/DOMTest.xml b/test/tests/api/trax/dom/DOMTest.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/trax/dom/DOMTest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/dom/DOMTest.xsl b/test/tests/api/trax/dom/DOMTest.xsl
new file mode 100644
index 0000000..28bb7c2
--- /dev/null
+++ b/test/tests/api/trax/dom/DOMTest.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/dom/impincl/SimpleImport.xsl b/test/tests/api/trax/dom/impincl/SimpleImport.xsl
new file mode 100644
index 0000000..ee5ac2f
--- /dev/null
+++ b/test/tests/api/trax/dom/impincl/SimpleImport.xsl
@@ -0,0 +1,44 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SimpleImport.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
+
+<xsl:template match="list">
+  <import-list>
+    <xsl:apply-templates/>
+  </import-list>
+</xsl:template>
+
+<xsl:template match="item[@match-by='import']">
+  <matched-by-import>
+    <xsl:value-of select="." />
+  </matched-by-import>
+</xsl:template>
+
+<xsl:template match="item">
+  <matched-by-import-also>
+    <xsl:value-of select="." />
+  </matched-by-import-also>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/dom/impincl/SimpleInclude.xsl b/test/tests/api/trax/dom/impincl/SimpleInclude.xsl
new file mode 100644
index 0000000..d2a49a0
--- /dev/null
+++ b/test/tests/api/trax/dom/impincl/SimpleInclude.xsl
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SimpleInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
+
+<xsl:template match="list">
+  <include-list>
+    <xsl:apply-imports/>
+  </include-list>
+</xsl:template>
+
+<xsl:template match="item[@match-by='include']">
+  <matched-by-include>
+    <xsl:value-of select="." />
+  </matched-by-include>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/embeddedIdentity.xml b/test/tests/api/trax/embeddedIdentity.xml
new file mode 100644
index 0000000..6db77af
--- /dev/null
+++ b/test/tests/api/trax/embeddedIdentity.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="identity.xsl"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/identity.xml b/test/tests/api/trax/identity.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/trax/identity.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/identity.xsl b/test/tests/api/trax/identity.xsl
new file mode 100644
index 0000000..28bb7c2
--- /dev/null
+++ b/test/tests/api/trax/identity.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/impincl/EmbeddedRelative.xsl b/test/tests/api/trax/impincl/EmbeddedRelative.xsl
new file mode 100644
index 0000000..7f22ae3
--- /dev/null
+++ b/test/tests/api/trax/impincl/EmbeddedRelative.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Filename: EmbeddedRelative.xsl -->
+  <xsl:template match="/list">
+    <embedded-relative-level1>
+      <xsl:apply-templates select="@*|node()"/>
+    </embedded-relative-level1>
+  </xsl:template>
+
+  <xsl:template match="item">
+      <xsl:copy>
+        <xsl:apply-templates select="@*|node()"/>
+      </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/impincl/SystemIdImport.xsl b/test/tests/api/trax/impincl/SystemIdImport.xsl
new file mode 100644
index 0000000..5df9811
--- /dev/null
+++ b/test/tests/api/trax/impincl/SystemIdImport.xsl
@@ -0,0 +1,44 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SystemIdInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests with differen systemId's. -->
+
+<xsl:template match="list">
+  <import-list-level1>
+    <xsl:apply-templates/>
+  </import-list-level1>
+</xsl:template>
+
+<xsl:template match="item[@match-by='import']">
+  <matched-by-import-level1>
+    <xsl:value-of select="." />
+  </matched-by-import-level1>
+</xsl:template>
+
+<xsl:template match="item">
+  <matched-by-import-also-level1>
+    <xsl:value-of select="." />
+  </matched-by-import-also-level1>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/impincl/SystemIdInclude.xsl b/test/tests/api/trax/impincl/SystemIdInclude.xsl
new file mode 100644
index 0000000..c49f138
--- /dev/null
+++ b/test/tests/api/trax/impincl/SystemIdInclude.xsl
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SystemIdInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests with differen systemId's. -->
+
+<xsl:template match="list">
+  <include-list-level1>
+    <xsl:apply-imports/>
+  </include-list-level1>
+</xsl:template>
+
+<xsl:template match="item[@match-by='include']">
+  <matched-by-include-level1>
+    <xsl:value-of select="." />
+  </matched-by-include-level1>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/sax/SAXImpIncl.xml b/test/tests/api/trax/sax/SAXImpIncl.xml
new file mode 100644
index 0000000..d5d4f5e
--- /dev/null
+++ b/test/tests/api/trax/sax/SAXImpIncl.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list>
+    <item>Above Should be include-list then import-list</item>
+    <item match-by="import">Should be matched-by-import</item>
+    <item match-by="include">Should be matched-by-include</item>
+    <item match-by="main">Should be matched-by-import-also</item>
+    <list>
+      <item>Should be matched-by-main</item>
+      <item>Should be matched-by-main</item>
+    </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/sax/SAXImpIncl.xsl b/test/tests/api/trax/sax/SAXImpIncl.xsl
new file mode 100644
index 0000000..237b3f4
--- /dev/null
+++ b/test/tests/api/trax/sax/SAXImpIncl.xsl
@@ -0,0 +1,47 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SAXImpIncl.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for SAXSource/SAXResult APIs. -->
+
+<xsl:import href="impincl/SimpleImport.xsl"/>
+<xsl:include href="impincl/SimpleInclude.xsl"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+<xsl:template match="list" priority="-1">
+ <main-list>
+  <xsl:apply-templates/>
+ </main-list>
+</xsl:template>
+
+<xsl:template match="item[not(@match-by)]">
+  <matched-by-main>
+    <xsl:value-of select="." />
+  </matched-by-main>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/sax/SAXTest.xml b/test/tests/api/trax/sax/SAXTest.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/trax/sax/SAXTest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/sax/SAXTest.xsl b/test/tests/api/trax/sax/SAXTest.xsl
new file mode 100644
index 0000000..28bb7c2
--- /dev/null
+++ b/test/tests/api/trax/sax/SAXTest.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/sax/SAXdtd.dtd b/test/tests/api/trax/sax/SAXdtd.dtd
new file mode 100644
index 0000000..16cac3a
--- /dev/null
+++ b/test/tests/api/trax/sax/SAXdtd.dtd
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Cheap dtd for testing LexicalHandler events -->
+<!ENTITY nbsp   "&#160;" >
+<!ENTITY cent   "&#162;" >
+<!ENTITY pound  "&#163;" >
+<!ENTITY curren "&#164;" >
+<!ENTITY yen    "&#165;" >
+<!ENTITY copy   "&#169;" >
+<!ENTITY test-ent   "an-xsl-entity" >
diff --git a/test/tests/api/trax/sax/SAXdtd.xml b/test/tests/api/trax/sax/SAXdtd.xml
new file mode 100644
index 0000000..04bb315
--- /dev/null
+++ b/test/tests/api/trax/sax/SAXdtd.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE list 
+[
+  <!ENTITY copy   "&#169;" >
+  <!ENTITY test-ent   "an-xml-entity" >
+  <!ELEMENT list (item* | list*)>
+  <!ATTLIST list 
+            name CDATA #IMPLIED
+  >
+  <!ELEMENT item (#PCDATA)>
+]>
+
+<list>
+  <item>Xalan-J&copy; 1.x</item>
+  <item>Xalan-J&test-ent; 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan <![CDATA[this is a CDATA section blah<?<!/>blah]]> documentation</item>
+    <item>Xalan <!-- This is a comment --> tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/trax/sax/SAXdtd.xsl b/test/tests/api/trax/sax/SAXdtd.xsl
new file mode 100644
index 0000000..077bf46
--- /dev/null
+++ b/test/tests/api/trax/sax/SAXdtd.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?> 
+<!DOCTYPE SAXDTD SYSTEM "SAXdtd.dtd">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Use different encoding to see entities better -->
+<xsl:output method="xml" encoding="ISO-8859-1"/>
+
+  <xsl:template match="/">
+    <out>
+      <head>Testing &copy; entities &test-ent; here</head>
+      <xsl:apply-templates/>
+    </out>
+  </xsl:template>
+
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/sax/cities.xml b/test/tests/api/trax/sax/cities.xml
new file mode 100644
index 0000000..f73db96
--- /dev/null
+++ b/test/tests/api/trax/sax/cities.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" standalone="yes" ?>
+<cities>
+	<city name="Paris" country="France"/>
+	<city name="Roma" country="Italia"/>
+	<city name="Nice" country="France"/>
+	<city name="Madrid" country="Espana"/>
+	<city name="Milano" country="Italia"/>
+	<city name="Firenze" country="Italia"/>
+	<city name="Napoli" country="Italia"/>
+	<city name="Lyon" country="France"/>
+	<city name="Barcelona" country="Espana"/>
+</cities>
+
diff --git a/test/tests/api/trax/sax/cities.xsl b/test/tests/api/trax/sax/cities.xsl
new file mode 100644
index 0000000..adac6cd
--- /dev/null
+++ b/test/tests/api/trax/sax/cities.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" indent="yes"/>
+<xsl:template match="/">
+<xsl:variable name="unique-countries"
+	select="/cities
+		/city[not(@country=preceding-sibling::city/@country)]
+		/@country"
+/>
+    <countries>
+	<xsl:for-each select="$unique-countries">
+	  <country name="{.}">
+		<xsl:for-each select="//city[@country=current()]">
+		  <city><xsl:value-of select="@name"/></city>
+		</xsl:for-each>
+	  </country> 
+	</xsl:for-each>
+    </countries>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/sax/impincl/SimpleImport.xsl b/test/tests/api/trax/sax/impincl/SimpleImport.xsl
new file mode 100644
index 0000000..ee5ac2f
--- /dev/null
+++ b/test/tests/api/trax/sax/impincl/SimpleImport.xsl
@@ -0,0 +1,44 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SimpleImport.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
+
+<xsl:template match="list">
+  <import-list>
+    <xsl:apply-templates/>
+  </import-list>
+</xsl:template>
+
+<xsl:template match="item[@match-by='import']">
+  <matched-by-import>
+    <xsl:value-of select="." />
+  </matched-by-import>
+</xsl:template>
+
+<xsl:template match="item">
+  <matched-by-import-also>
+    <xsl:value-of select="." />
+  </matched-by-import-also>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/sax/impincl/SimpleInclude.xsl b/test/tests/api/trax/sax/impincl/SimpleInclude.xsl
new file mode 100644
index 0000000..d2a49a0
--- /dev/null
+++ b/test/tests/api/trax/sax/impincl/SimpleInclude.xsl
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SimpleInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
+
+<xsl:template match="list">
+  <include-list>
+    <xsl:apply-imports/>
+  </include-list>
+</xsl:template>
+
+<xsl:template match="item[@match-by='include']">
+  <matched-by-include>
+    <xsl:value-of select="." />
+  </matched-by-include>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/sax/impincl/citiesinclude.xsl b/test/tests/api/trax/sax/impincl/citiesinclude.xsl
new file mode 100644
index 0000000..0e72f8f
--- /dev/null
+++ b/test/tests/api/trax/sax/impincl/citiesinclude.xsl
@@ -0,0 +1,23 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+	<xsl:include href="../cities.xsl"/>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/stream/StreamImpIncl.xml b/test/tests/api/trax/stream/StreamImpIncl.xml
new file mode 100644
index 0000000..d5d4f5e
--- /dev/null
+++ b/test/tests/api/trax/stream/StreamImpIncl.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list>
+    <item>Above Should be include-list then import-list</item>
+    <item match-by="import">Should be matched-by-import</item>
+    <item match-by="include">Should be matched-by-include</item>
+    <item match-by="main">Should be matched-by-import-also</item>
+    <list>
+      <item>Should be matched-by-main</item>
+      <item>Should be matched-by-main</item>
+    </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/stream/StreamImpIncl.xsl b/test/tests/api/trax/stream/StreamImpIncl.xsl
new file mode 100644
index 0000000..e3167bc
--- /dev/null
+++ b/test/tests/api/trax/stream/StreamImpIncl.xsl
@@ -0,0 +1,47 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: StreamImpIncl.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
+
+<xsl:import href="impincl/SimpleImport.xsl"/>
+<xsl:include href="impincl/SimpleInclude.xsl"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+<xsl:template match="list" priority="-1">
+ <main-list>
+  <xsl:apply-templates/>
+ </main-list>
+</xsl:template>
+
+<xsl:template match="item[not(@match-by)]">
+  <matched-by-main>
+    <xsl:value-of select="." />
+  </matched-by-main>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/stream/StreamOutputFormat.xml b/test/tests/api/trax/stream/StreamOutputFormat.xml
new file mode 100644
index 0000000..63da208
--- /dev/null
+++ b/test/tests/api/trax/stream/StreamOutputFormat.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <cdataHere>CDATA? or not?</cdataHere>
+  <selector>
+    <item number="1">one</item>
+    <item value="two">2</item>
+  </selector>
+</doc>
diff --git a/test/tests/api/trax/stream/StreamOutputFormat.xsl b/test/tests/api/trax/stream/StreamOutputFormat.xsl
new file mode 100644
index 0000000..dc4f802
--- /dev/null
+++ b/test/tests/api/trax/stream/StreamOutputFormat.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- Include all XSLT spec xsl:output attrs -->
+<xsl:output method="xml"
+            version="123.45"
+            encoding="UTF-8"
+            standalone="yes"
+            doctype-public="this-is-doctype-public"
+            doctype-system="this-is-doctype-system"
+            cdata-section-elements="cdataHere"
+            indent="yes"
+            media-type="text/test/xml"
+            omit-xml-declaration="no" />
+
+  <xsl:template match="doc">
+    <out>
+      <cdataHere>CDATA? or not?</cdataHere>
+      <xsl:text>foo</xsl:text>
+      <xsl:copy-of select="cdataHere" />
+      <out2>
+        <xsl:text>bar</xsl:text>
+        <xsl:copy-of select="selector" />
+      </out2>
+    </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/stream/impincl/SimpleImport.xsl b/test/tests/api/trax/stream/impincl/SimpleImport.xsl
new file mode 100644
index 0000000..ee5ac2f
--- /dev/null
+++ b/test/tests/api/trax/stream/impincl/SimpleImport.xsl
@@ -0,0 +1,44 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SimpleImport.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
+
+<xsl:template match="list">
+  <import-list>
+    <xsl:apply-templates/>
+  </import-list>
+</xsl:template>
+
+<xsl:template match="item[@match-by='import']">
+  <matched-by-import>
+    <xsl:value-of select="." />
+  </matched-by-import>
+</xsl:template>
+
+<xsl:template match="item">
+  <matched-by-import-also>
+    <xsl:value-of select="." />
+  </matched-by-import-also>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/stream/impincl/SimpleInclude.xsl b/test/tests/api/trax/stream/impincl/SimpleInclude.xsl
new file mode 100644
index 0000000..d2a49a0
--- /dev/null
+++ b/test/tests/api/trax/stream/impincl/SimpleInclude.xsl
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SimpleInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests for StreamSource APIs. -->
+
+<xsl:template match="list">
+  <include-list>
+    <xsl:apply-imports/>
+  </include-list>
+</xsl:template>
+
+<xsl:template match="item[@match-by='include']">
+  <matched-by-include>
+    <xsl:value-of select="." />
+  </matched-by-include>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/systemid/impincl/EmbeddedRelative.xsl b/test/tests/api/trax/systemid/impincl/EmbeddedRelative.xsl
new file mode 100644
index 0000000..a2e8550
--- /dev/null
+++ b/test/tests/api/trax/systemid/impincl/EmbeddedRelative.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Filename: EmbeddedRelative.xsl -->
+  <xsl:template match="/list">
+    <embedded-relative-level2>
+      <xsl:apply-templates select="@*|node()"/>
+    </embedded-relative-level2>
+  </xsl:template>
+
+  <xsl:template match="item">
+      <xsl:copy>
+        <xsl:apply-templates select="@*|node()"/>
+      </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/systemid/impincl/SystemIdImport.xsl b/test/tests/api/trax/systemid/impincl/SystemIdImport.xsl
new file mode 100644
index 0000000..bfc38b9
--- /dev/null
+++ b/test/tests/api/trax/systemid/impincl/SystemIdImport.xsl
@@ -0,0 +1,44 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SystemIdInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests with differen systemId's. -->
+
+<xsl:template match="list">
+  <import-list-level2>
+    <xsl:apply-templates/>
+  </import-list-level2>
+</xsl:template>
+
+<xsl:template match="item[@match-by='import']">
+  <matched-by-import-level2>
+    <xsl:value-of select="." />
+  </matched-by-import-level2>
+</xsl:template>
+
+<xsl:template match="item">
+  <matched-by-import-also-level2>
+    <xsl:value-of select="." />
+  </matched-by-import-also-level2>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/systemid/impincl/SystemIdInclude.xsl b/test/tests/api/trax/systemid/impincl/SystemIdInclude.xsl
new file mode 100644
index 0000000..8ab2c53
--- /dev/null
+++ b/test/tests/api/trax/systemid/impincl/SystemIdInclude.xsl
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: SystemIdInclude.xsl -->
+  <!-- Author: shane_curcuru@lotus.com -->
+  <!-- Purpose: Basic import and include tests with differen systemId's. -->
+
+<xsl:template match="list">
+  <include-list-level2>
+    <xsl:apply-imports/>
+  </include-list-level2>
+</xsl:template>
+
+<xsl:template match="item[@match-by='include']">
+  <matched-by-include-level2>
+    <xsl:value-of select="." />
+  </matched-by-include-level2>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/xml/baz.xml b/test/tests/api/trax/xml/baz.xml
new file mode 100644
index 0000000..9ecf473
--- /dev/null
+++ b/test/tests/api/trax/xml/baz.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0'?>
+<foo:document 
+		  xmlns:foo="http://apache.org/foo"
+		  xmlns:bar="http://apache.org/bar">
+<bar:element>MyBaz</bar:element>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api/trax/xml/foo.xml b/test/tests/api/trax/xml/foo.xml
new file mode 100644
index 0000000..79597ab
--- /dev/null
+++ b/test/tests/api/trax/xml/foo.xml
@@ -0,0 +1,10 @@
+<?xml version='1.0'?>
+<?xml-stylesheet type="text/xsl" href="../xsl/foo.xsl"?>
+<foo:document 
+		  xmlns:foo="http://apache.org/foo"
+		  xmlns:bar="http://apache.org/bar"
+		  file-name="test"
+         file-path="work"
+		  creation-date="971255692078">
+<bar:element>MyBar</bar:element>
+</foo:document>
\ No newline at end of file
diff --git a/test/tests/api/trax/xml/subdir1/foo2.xml b/test/tests/api/trax/xml/subdir1/foo2.xml
new file mode 100644
index 0000000..5708ae4
--- /dev/null
+++ b/test/tests/api/trax/xml/subdir1/foo2.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0'?>
+<doc>text in foo2.xml</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/xml/subdir1/subdir2/foo3.xml b/test/tests/api/trax/xml/subdir1/subdir2/foo3.xml
new file mode 100644
index 0000000..77da1f0
--- /dev/null
+++ b/test/tests/api/trax/xml/subdir1/subdir2/foo3.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0'?>
+<doc>text in foo3.xml</doc>
\ No newline at end of file
diff --git a/test/tests/api/trax/xsl/baz.xsl b/test/tests/api/trax/xsl/baz.xsl
new file mode 100644
index 0000000..ecec1ab
--- /dev/null
+++ b/test/tests/api/trax/xsl/baz.xsl
@@ -0,0 +1,37 @@
+<xsl:stylesheet 
+      xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
+    
+  <!-- same as foo.xsl but doesn't include the param because of a bug -->  
+  <xsl:template match="/">
+    <out>
+      <xsl:apply-templates/>
+    </out>
+  </xsl:template>
+      
+  <xsl:template 
+      match="@*|*|text()|processing-instruction()">
+    <xsl:copy>
+      <xsl:apply-templates 
+         select="@*|*|text()|processing-instruction()"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/xsl/foo.xsl b/test/tests/api/trax/xsl/foo.xsl
new file mode 100644
index 0000000..2fde57a
--- /dev/null
+++ b/test/tests/api/trax/xsl/foo.xsl
@@ -0,0 +1,46 @@
+<xsl:stylesheet 
+      xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'
+      xmlns:bar="http://apache.org/bar"
+      exclude-result-prefixes="bar">
+      
+  <xsl:include href="inc1/inc1.xsl"/>
+      
+  <xsl:param name="a-param">default param value</xsl:param>
+  
+  <xsl:template match="bar:element">
+    <bar>
+      <param-val>
+        <xsl:value-of select="$a-param"/><xsl:text>, </xsl:text>
+        <xsl:value-of select="$my-var"/>
+      </param-val>
+      <data><xsl:apply-templates/></data>
+    </bar>
+  </xsl:template>
+      
+  <xsl:template 
+      match="@*|*|text()|processing-instruction()">
+    <xsl:copy>
+      <xsl:apply-templates 
+         select="@*|*|text()|processing-instruction()"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/xsl/foo2.xsl b/test/tests/api/trax/xsl/foo2.xsl
new file mode 100644
index 0000000..fbeb9ff
--- /dev/null
+++ b/test/tests/api/trax/xsl/foo2.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:bar="http://apache.org/bar">
+  
+  <xsl:template match="bar">
+    <out>
+      <xsl:value-of select="."/>
+    </out>
+  </xsl:template>
+  
+  <xsl:template match="text()">
+  </xsl:template>  
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/xsl/foo3.xsl b/test/tests/api/trax/xsl/foo3.xsl
new file mode 100644
index 0000000..655e6db
--- /dev/null
+++ b/test/tests/api/trax/xsl/foo3.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  
+  <xsl:template match="out">
+    <out>
+      <xsl:apply-templates/>
+    </out>
+  </xsl:template>
+  
+  <xsl:template match="text()">
+    <some-text><xsl:value-of select="."/></some-text>
+  </xsl:template>  
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/xsl/inc1/inc1.xsl b/test/tests/api/trax/xsl/inc1/inc1.xsl
new file mode 100644
index 0000000..64b472b
--- /dev/null
+++ b/test/tests/api/trax/xsl/inc1/inc1.xsl
@@ -0,0 +1,25 @@
+<xsl:stylesheet 
+      xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
+      
+  <xsl:include href="inc2/inc2.xsl"/>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/trax/xsl/inc1/inc2/inc2.xsl b/test/tests/api/trax/xsl/inc1/inc2/inc2.xsl
new file mode 100644
index 0000000..79f63c1
--- /dev/null
+++ b/test/tests/api/trax/xsl/inc1/inc2/inc2.xsl
@@ -0,0 +1,23 @@
+<xsl:stylesheet 
+      xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
+  <xsl:variable name="my-var" select="'text from my-var in inc2.xsl'"/>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj1/EmbeddedReuseTest1.xml b/test/tests/api/xalanj1/EmbeddedReuseTest1.xml
new file mode 100644
index 0000000..3e70728
--- /dev/null
+++ b/test/tests/api/xalanj1/EmbeddedReuseTest1.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xml" href="EmbeddedReuseTest1.xsl"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj1/EmbeddedReuseTest1.xsl b/test/tests/api/xalanj1/EmbeddedReuseTest1.xsl
new file mode 100644
index 0000000..a0a6d55
--- /dev/null
+++ b/test/tests/api/xalanj1/EmbeddedReuseTest1.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <embedded-reuse-test>
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+    </embedded-reuse-test>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj1/ParamTest1.xml b/test/tests/api/xalanj1/ParamTest1.xml
new file mode 100644
index 0000000..cfcd376
--- /dev/null
+++ b/test/tests/api/xalanj1/ParamTest1.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!-- Testing xsl:param-->
+<doc>
+  <item>1</item>
+  <item>2</item>
+  <item>3</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/xalanj1/ParamTest1.xsl b/test/tests/api/xalanj1/ParamTest1.xsl
new file mode 100644
index 0000000..bf6548a
--- /dev/null
+++ b/test/tests/api/xalanj1/ParamTest1.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ParamTest1.xsl -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Verify xsl:param in stylesheet root, either set or not set via setStylesheetParam -->
+
+<xsl:param name="p1">
+    <B>ABC</B>
+</xsl:param>
+<xsl:param name="p2">
+    <B>DEF</B>
+</xsl:param>
+
+<xsl:param name="t1">notset</xsl:param>
+
+
+<xsl:param name="s1" select="'s1val'">
+</xsl:param>
+<xsl:param name="s2" select="'s2val'">
+</xsl:param>
+
+<xsl:template match="doc">
+  <xsl:param name="p3">
+    <B>GHI</B>
+  </xsl:param>
+  <xsl:param name="s3" select="'s3val'">
+  </xsl:param>
+   <outp>
+     <xsl:value-of select="$p1"/><xsl:text>,</xsl:text><xsl:copy-of select="$p1"/><xsl:text>; </xsl:text>
+     <xsl:value-of select="$p2"/><xsl:text>,</xsl:text><xsl:copy-of select="$p2"/><xsl:text>; </xsl:text>
+     <xsl:value-of select="$p3"/><xsl:text>,</xsl:text><xsl:copy-of select="$p3"/><xsl:text>; </xsl:text>
+   </outp>
+   <xsl:text>:
+   </xsl:text>
+   <outs>
+     <xsl:value-of select="$s1"/><xsl:text>,</xsl:text><xsl:copy-of select="$s1"/><xsl:text>; </xsl:text>
+     <xsl:value-of select="$s2"/><xsl:text>,</xsl:text><xsl:copy-of select="$s2"/><xsl:text>; </xsl:text>
+     <xsl:value-of select="$s3"/><xsl:text>,</xsl:text><xsl:copy-of select="$s3"/><xsl:text>; </xsl:text>
+   </outs>
+   <xsl:text>:
+   </xsl:text>
+   <outt>
+     <xsl:value-of select="$t1='notset'"/><xsl:text>,</xsl:text>
+     <xsl:value-of select="$t1=''"/><xsl:text>,</xsl:text>
+     <xsl:value-of select="$t1='a'"/><xsl:text>,</xsl:text>
+     <xsl:value-of select="$t1='1'"/><xsl:text>,</xsl:text>
+     <xsl:value-of select="$t1"/>
+   </outt>
+   
+</xsl:template>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj1/ProblemListenerTest1.xml b/test/tests/api/xalanj1/ProblemListenerTest1.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/api/xalanj1/ProblemListenerTest1.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/xalanj1/ProblemListenerTest1.xsl b/test/tests/api/xalanj1/ProblemListenerTest1.xsl
new file mode 100644
index 0000000..2dbff94
--- /dev/null
+++ b/test/tests/api/xalanj1/ProblemListenerTest1.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MESSAGEerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 Messages -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:message at top level, which is illegal. -->
+  <!-- ExpectedException: (StylesheetHandler) xsl:message not allowed inside a stylesheet! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:message not allowed inside a stylesheet! -->
+
+<xsl:message terminate="no">This should not appear</xsl:message>
+
+<xsl:template match="/">
+ <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj1/StylesheetReuseTest1.xml b/test/tests/api/xalanj1/StylesheetReuseTest1.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/xalanj1/StylesheetReuseTest1.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj1/StylesheetReuseTest1.xsl b/test/tests/api/xalanj1/StylesheetReuseTest1.xsl
new file mode 100644
index 0000000..28bb7c2
--- /dev/null
+++ b/test/tests/api/xalanj1/StylesheetReuseTest1.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/DTMDumpTest.xml b/test/tests/api/xalanj2/DTMDumpTest.xml
new file mode 100644
index 0000000..e5649b5
--- /dev/null
+++ b/test/tests/api/xalanj2/DTMDumpTest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item name="J1">Xalan-J 1.x</item>
+  <item name="J2">Xalan-J 2.x</item>
+  <item name="C1">Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/DTMDumpTest.xsl b/test/tests/api/xalanj2/DTMDumpTest.xsl
new file mode 100644
index 0000000..f1a6f3c
--- /dev/null
+++ b/test/tests/api/xalanj2/DTMDumpTest.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:java="http://xml.apache.org/xslt/java"
+                version="1.0">
+
+<xsl:output method="xml" indent="yes"/>
+                
+  <xsl:param name="rtf">
+    <selfrtf>
+      <paramitem name="P1"/>
+      <paramitem>param2 content</paramitem>
+    </selfrtf>
+  </xsl:param>
+
+  <xsl:template match="/list">
+  <xsl:variable name="selfdoc" select="document('')//selfrtf"/>
+    <out>
+      <global>
+        <dumpdtm><xsl:value-of select="java:org.apache.qetest.xalanj2.DTMDumpTest.dumpDTM($rtf)"/></dumpdtm>
+        <dumpdtm><xsl:value-of select="java:org.apache.qetest.xalanj2.DTMDumpTest.dumpDTM($selfdoc)"/></dumpdtm>
+      </global>
+      <xsl:apply-templates select="item | list"/> 
+    </out>
+  </xsl:template>
+ 
+  <xsl:template match="item">
+    <item> 
+      <value-of><xsl:value-of select="."/></value-of>
+      <dumpdtm><xsl:value-of select="java:org.apache.qetest.xalanj2.DTMDumpTest.dumpDTM(.)"/></dumpdtm>
+    </item> 
+  </xsl:template>
+ 
+  <xsl:template match="list">
+    <list> 
+      <value-of><xsl:value-of select="."/></value-of>
+      <dumpdtm><xsl:value-of select="java:org.apache.qetest.xalanj2.DTMDumpTest.dumpDTM(.)"/></dumpdtm>
+    </list> 
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/OutputEntities.ent b/test/tests/api/xalanj2/OutputEntities.ent
new file mode 100644
index 0000000..1b1bd26
--- /dev/null
+++ b/test/tests/api/xalanj2/OutputEntities.ent
@@ -0,0 +1,6 @@
+# This file must be encoded in UTF-8; see org.apache.xalan.serialize.CharInfo
+quot 34
+amp 38
+lt 60
+gt 62
+OutputEntityReplaced 125
diff --git a/test/tests/api/xalanj2/OutputEntities.xsl b/test/tests/api/xalanj2/OutputEntities.xsl
new file mode 100644
index 0000000..b57813e
--- /dev/null
+++ b/test/tests/api/xalanj2/OutputEntities.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  version="1.0"
+  xmlns:xalan="http://xml.apache.org/xslt">
+
+<xsl:output xalan:entities="OutputEntities.ent"/>   
+  <xsl:template match="/">
+    <out>&#125;</out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/OutputSettingsXML.xml b/test/tests/api/xalanj2/OutputSettingsXML.xml
new file mode 100644
index 0000000..4985d62
--- /dev/null
+++ b/test/tests/api/xalanj2/OutputSettingsXML.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html-tag>
+  <head-tag>
+    <title-tag text="title-tag:text"/>
+  </head-tag>
+  <body-tag>
+    <p-tag>P-tag:begin<cdataHere>CDATA? or not?</cdataHere></p-tag>
+    <ul-tag>
+      <li-tag number="1">li-tag:one</li-tag>
+      <li-tag value="two">li-tag:two</li-tag>
+    </ul-tag>
+  </body-tag>
+</html-tag>
diff --git a/test/tests/api/xalanj2/OutputSettingsXML.xsl b/test/tests/api/xalanj2/OutputSettingsXML.xsl
new file mode 100644
index 0000000..8499995
--- /dev/null
+++ b/test/tests/api/xalanj2/OutputSettingsXML.xsl
@@ -0,0 +1,66 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <!-- FileName: OutputSettingsXML.xsl -->
+  <!-- Purpose: Legal XML output for use with OutputSettingsTest.java -->
+
+<!-- Include various XSLT spec xsl:output attrs -->
+<xsl:output method="xml"
+            doctype-public="this-is-doctype-public"
+            doctype-system="this-is-doctype-system"
+            cdata-section-elements="cdataHere"
+            indent="yes" />
+
+<xsl:template match="/">
+  <out>
+  <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="html-tag">
+    <header>
+      <xsl:element name="title"><xsl:value-of select="head-tag/title-tag/@text"/></xsl:element>
+      <xsl:text>xsl:text within head tag</xsl:text>
+    </header>
+    <document>
+      <xsl:apply-templates select="body-tag"/>
+      <xsl:text disable-output-escaping="yes">&lt;p>fake 'p' element&lt;/p></xsl:text>
+      <!-- all xml elements below, just for fun -->
+      <entities>&#034; &#038; &#060; &#062;</entities>
+    </document>
+</xsl:template>
+
+<xsl:template match="body-tag">
+    <xsl:apply-templates select="p-tag | ul-tag"/>
+</xsl:template>
+
+<xsl:template match="p-tag">
+  <xsl:element name="p">
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+ 
+<xsl:template match="ul-tag">
+  <ul>
+    <xsl:copy-of select="."/>
+  </ul>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/RootTemplate.xml b/test/tests/api/xalanj2/RootTemplate.xml
new file mode 100644
index 0000000..572b67b
--- /dev/null
+++ b/test/tests/api/xalanj2/RootTemplate.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/RootTemplate.xsl b/test/tests/api/xalanj2/RootTemplate.xsl
new file mode 100644
index 0000000..70ddb46
--- /dev/null
+++ b/test/tests/api/xalanj2/RootTemplate.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- Matching on root - possible problems with transformState? -->
+  <xsl:template match="/">
+    <out/>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/SecureProcessingTest.xml b/test/tests/api/xalanj2/SecureProcessingTest.xml
new file mode 100644
index 0000000..bf9ebcd
--- /dev/null
+++ b/test/tests/api/xalanj2/SecureProcessingTest.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <num>2</num>
+  <num>4</num>
+  <num>6</num>
+</doc>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/SecureProcessingTest.xsl b/test/tests/api/xalanj2/SecureProcessingTest.xsl
new file mode 100644
index 0000000..40ff564
--- /dev/null
+++ b/test/tests/api/xalanj2/SecureProcessingTest.xsl
@@ -0,0 +1,26 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:math="http://exslt.org/math">
+  <xsl:template match="/">
+    <xsl:value-of select="math:max(/doc/num)"/>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/TraceListenerTest.xml b/test/tests/api/xalanj2/TraceListenerTest.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/xalanj2/TraceListenerTest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/TraceListenerTest.xsl b/test/tests/api/xalanj2/TraceListenerTest.xsl
new file mode 100644
index 0000000..5a07143
--- /dev/null
+++ b/test/tests/api/xalanj2/TraceListenerTest.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:template match="/">
+    <doc>
+      <mode-none>
+        <xsl:apply-templates select="item" /><!-- ElemTemplateElement[xsl:apply-templates;L7;C46;select=itemtest=item; -->
+      </mode-none>
+      <mode-ala>
+        <xsl:apply-templates select="list" mode="ala" /><!-- selected:ElemTemplateElement[xsl:apply-templates;L10;C57;select=list -->
+      </mode-ala>
+    </doc>
+  </xsl:template>
+
+  <xsl:template match="item">
+    <pie>
+      <xsl:copy/>
+    </pie>
+  </xsl:template>
+
+  <xsl:template match="list" mode="ala">
+    <icecream>text-literal-chars<xsl:text>xsl-text-content</xsl:text><xsl:copy-of select="."/><!-- ElemTemplateElement[xsl:copy-of;L22;C96;select=.select=.; -->
+    </icecream>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/TraceListenerTest2.xml b/test/tests/api/xalanj2/TraceListenerTest2.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/xalanj2/TraceListenerTest2.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/TraceListenerTest2.xsl b/test/tests/api/xalanj2/TraceListenerTest2.xsl
new file mode 100644
index 0000000..294a9b7
--- /dev/null
+++ b/test/tests/api/xalanj2/TraceListenerTest2.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:template match="/">
+    <doc>
+      <mode-none>
+        <xsl:apply-templates select="list" />
+      </mode-none>
+    </doc>
+  </xsl:template>
+
+  <xsl:template match="item">
+    <pie>
+      <xsl:copy/>
+    </pie>
+  </xsl:template>
+
+  <xsl:template match="list">
+    <out-list>
+      <xsl:for-each select="item">
+        <out-item>
+          <xsl:value-of select="."/>
+        </out-item>
+      </xsl:for-each>
+    <xsl:apply-templates select="list" />
+    </out-list>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/TransformState99a.xml b/test/tests/api/xalanj2/TransformState99a.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformState99a.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/TransformState99a.xsl b/test/tests/api/xalanj2/TransformState99a.xsl
new file mode 100644
index 0000000..49ac774
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformState99a.xsl
@@ -0,0 +1,84 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- xsl-comment-1 Filename: TransformState99a.xsl -->
+
+
+
+
+
+<xsl:variable name="variable1" select="variable-1-value"/>
+<xsl:param name="param1" select="param-1-value-default"/>
+
+
+  <xsl:template match="/" name="template-1-root">
+    <doc>
+      <mode-header>
+        <xsl:text>xsl-text-1</xsl:text>
+        <xsl:value-of select="$variable1" />
+        <xsl:value-of select="$param1" />
+        <xsl:element name="xsl-element-1">
+          <xsl:attribute name="xsl-attribute-1">xsl-attribute-1-value</xsl:attribute>xsl-element-content-newline
+        </xsl:element>
+      </mode-header>
+      <mode-none><xsl:apply-templates select="list" /></mode-none>
+      <mode-ala><xsl:call-template name="apple" /></mode-ala>
+    </doc>
+  </xsl:template>
+
+  <xsl:template match="item">
+    <pie><xsl:copy/></pie>
+  </xsl:template>
+
+
+
+
+
+
+
+  <xsl:template match="pies-are-good" name="apple">
+<!-- Note formatting is important, this apply-templates must end on col 99; line number must match expected -->
+<!-- This should be line # 40 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <apple>
+                                                                <xsl:value-of select="count(.)" />
+      <xsl:apply-templates select="list" mode="ala" />
+    </apple>
+  </xsl:template>
+
+
+
+  <xsl:template match="list" mode="ala" name="list-ala-mode" >
+<!-- This should be line # 50 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <icecream>text-literal-chars<xsl:text>xsl-text-2a</xsl:text>   <xsl:copy-of select="item[2]"/>
+    </icecream>
+  </xsl:template>
+     
+
+
+
+
+  <xsl:template match="list" name="list-no-mode" >
+<!-- This should be line # 60 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <icemilk>text-literal-chars<xsl:text>xsl-text-3a</xsl:text>    <xsl:copy-of select="item[2]"/>
+    </icemilk>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/TransformState99b.xml b/test/tests/api/xalanj2/TransformState99b.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformState99b.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/TransformState99b.xsl b/test/tests/api/xalanj2/TransformState99b.xsl
new file mode 100644
index 0000000..6b5c435
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformState99b.xsl
@@ -0,0 +1,84 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- xsl-comment-1 Filename: TransformState99b.xsl -->
+<!-- xsl:include should be on line 5 in this file -->
+<xsl:include href="TransformState99binc.xsl" />
+
+
+
+<xsl:variable name="variable1" select="variable-1-value"/>
+<xsl:param name="param1" select="param-1-value-default"/>
+
+
+  <xsl:template match="/" name="template-1-root">
+    <doc>
+      <mode-header>
+        <xsl:text>xsl-text-1</xsl:text>
+        <xsl:value-of select="$variable1" />
+        <xsl:value-of select="$param1" />
+        <xsl:element name="xsl-element-1">
+          <xsl:attribute name="xsl-attribute-1">xsl-attribute-1-value</xsl:attribute>xsl-element-content-newline
+        </xsl:element>
+      </mode-header>
+      <mode-none><xsl:apply-templates select="list" /></mode-none>
+      <mode-ala><xsl:call-template name="apple" /></mode-ala>
+    </doc>
+  </xsl:template>
+
+  <xsl:template match="item">
+    <pie><xsl:copy/></pie>
+  </xsl:template>
+
+
+
+
+
+
+
+
+
+<!-- This should be line # 40 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+
+
+
+
+
+
+
+
+  <xsl:template match="list" mode="ala" name="list-ala-mode" >
+<!-- This should be line # 50 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <icecream>text-literal-chars<xsl:text>xsl-text-2a</xsl:text>   <xsl:copy-of select="item[2]"/>
+    </icecream>
+  </xsl:template>
+     
+
+
+
+
+  <xsl:template match="list" name="list-no-mode" >
+<!-- This should be line # 60 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <icemilk>text-literal-chars<xsl:text>xsl-text-3a</xsl:text>    <xsl:copy-of select="item[2]"/>
+    </icemilk>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/TransformState99binc.xsl b/test/tests/api/xalanj2/TransformState99binc.xsl
new file mode 100644
index 0000000..bcffa3a
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformState99binc.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- xsl-comment-1 Filename: TransformState99binc.xsl -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <xsl:template match="pies-are-good" name="apple">
+<!-- Note formatting is important, this apply-templates must end on col 99; line number must match expected -->
+<!-- This should be line # 25 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <apple>
+                                                                <xsl:value-of select="count(.)" />
+      <xsl:apply-templates select="list" mode="ala" />
+    </apple>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/TransformState99c.xml b/test/tests/api/xalanj2/TransformState99c.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformState99c.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/TransformState99c.xsl b/test/tests/api/xalanj2/TransformState99c.xsl
new file mode 100644
index 0000000..a3acce3
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformState99c.xsl
@@ -0,0 +1,84 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- xsl-comment-1 Filename: TransformState99c.xsl -->
+<!-- xsl:include should be on line 5 in this file -->
+<xsl:include href="TransformState99cimp.xsl" />
+
+
+
+<xsl:variable name="variable1" select="variable-1-value"/>
+<xsl:param name="param1" select="param-1-value-default"/>
+
+
+  <xsl:template match="/" name="template-1-root">
+    <doc>
+      <mode-header>
+        <xsl:text>xsl-text-1</xsl:text>
+        <xsl:value-of select="$variable1" />
+        <xsl:value-of select="$param1" />
+        <xsl:element name="xsl-element-1">
+          <xsl:attribute name="xsl-attribute-1">xsl-attribute-1-value</xsl:attribute>xsl-element-content-newline
+        </xsl:element>
+      </mode-header>
+      <mode-none><xsl:apply-templates select="list" /></mode-none>
+      <mode-ala><xsl:call-template name="apple" /></mode-ala>
+    </doc>
+  </xsl:template>
+
+  <xsl:template match="item">
+    <pie><xsl:copy/></pie>
+  </xsl:template>
+
+
+
+
+
+
+
+
+
+<!-- This should be line # 40 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+
+
+
+
+
+
+
+
+  <xsl:template match="list" mode="ala" name="list-ala-mode" >
+<!-- This should be line # 50 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <icecream>text-literal-chars<xsl:text>xsl-text-2a</xsl:text>   <xsl:copy-of select="item[2]"/>
+    </icecream>
+  </xsl:template>
+     
+
+
+
+
+  <xsl:template match="list" name="list-no-mode" >
+<!-- This should be line # 60 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <icemilk>text-literal-chars<xsl:text>xsl-text-3a</xsl:text>    <xsl:copy-of select="item[2]"/>
+    </icemilk>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/TransformState99cimp.xsl b/test/tests/api/xalanj2/TransformState99cimp.xsl
new file mode 100644
index 0000000..10d8ce7
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformState99cimp.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- xsl-comment-1 Filename: TransformState99cimp.xsl -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <xsl:template match="pies-are-good" name="apple">
+<!-- Note formatting is important, this apply-templates must end on col 99; line number must match expected -->
+<!-- This should be line # 30 in the file! 4567-50-234567-60-234567-70-234567-80-234567-90-23456-99 -->
+    <apple>
+                                                                <xsl:value-of select="count(.)" />
+      <xsl:apply-templates select="list" mode="ala" />
+    </apple>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/TransformStateAPITest.xml b/test/tests/api/xalanj2/TransformStateAPITest.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformStateAPITest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/TransformStateAPITest.xsl b/test/tests/api/xalanj2/TransformStateAPITest.xsl
new file mode 100644
index 0000000..56803ea
--- /dev/null
+++ b/test/tests/api/xalanj2/TransformStateAPITest.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- xsl-comment-1 Filename: TransformStateAPITest.xsl -->
+
+
+<xsl:variable name="variable1" select="variable-1-value"/>
+<xsl:param name="param1" select="param-1-value-default"/>
+
+
+  <xsl:template match="/" name="template-1-root">
+    <doc>
+      <mode-header>
+        <xsl:text>xsl-text-1</xsl:text>
+        <xsl:value-of select="$variable1" />
+        <xsl:value-of select="$param1" />
+        <xsl:element name="xsl-element-1">
+          <xsl:attribute name="xsl-attribute-1">xsl-attribute-1-value</xsl:attribute>xsl-element-content-newline
+        </xsl:element>
+      </mode-header>
+      <mode-none><xsl:apply-templates select="item" /></mode-none>
+      <mode-ala><xsl:call-template name="apple" /></mode-ala>
+    </doc>
+  </xsl:template>
+
+  <xsl:template match="item">
+    <pie><xsl:copy/></pie>
+  </xsl:template>
+
+  <xsl:template name="apple">
+    <apple><xsl:apply-templates select="list" mode="ala" /></apple>
+  </xsl:template>
+
+  <xsl:template match="list" mode="ala">
+    <icecream>text-literal-chars<xsl:text>xsl-text-2a</xsl:text><xsl:copy-of select="."/></icecream>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/identity.xml b/test/tests/api/xalanj2/identity.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/api/xalanj2/identity.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/api/xalanj2/identity.xsl b/test/tests/api/xalanj2/identity.xsl
new file mode 100644
index 0000000..28bb7c2
--- /dev/null
+++ b/test/tests/api/xalanj2/identity.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/api/xalanj2/testXPath.xml b/test/tests/api/xalanj2/testXPath.xml
new file mode 100644
index 0000000..6f92a76
--- /dev/null
+++ b/test/tests/api/xalanj2/testXPath.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc xmlns:ext="http://somebody.elses.extension">
+  <a test="test" />
+  <b attr1="a1" attr2="a2"   
+  xmlns:java="http://xml.apache.org/xslt/java">
+    <a>
+    </a> 
+  </b>
+</doc><!-- -->         
diff --git a/test/tests/api/xalanj2/testXPath2.xml b/test/tests/api/xalanj2/testXPath2.xml
new file mode 100644
index 0000000..ddb7359
--- /dev/null
+++ b/test/tests/api/xalanj2/testXPath2.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+ 
+<map:sitemap xmlns:map="http://apache.org/xalan/test/sitemap"> 
+
+<!-- =========================== Components ================================ --> 
+
+	<map:components> 
+
+		<map:generators default="file"> 
+  			<map:generator name="file"        src="FileGenerator" label="content"/> 
+   			<map:generator name="directory"   src="DirectoryGenerator" label="content"/>    			
+		</map:generators> 
+ 
+		<map:transformers default="xslt"> 
+   			<map:transformer     name="xslt"      src="TraxTransformer">
+				<use-browser-capabilities-db>false</use-browser-capabilities-db>
+			</map:transformer> 			
+		</map:transformers> 
+
+		<map:readers default="resource"> 
+			<map:reader name="resource" src="ResourceReader" /> 
+		</map:readers> 
+   
+		<map:serializers default="html"> 
+   			<map:serializer name="links"                               src="LinkSerializer"/>
+   			<map:serializer name="xml"	mime-type="text/xml"      	src="XMLSerializer"/> 
+   			<map:serializer name="html"    	mime-type="text/html"       	src="HTMLSerializer"/> 
+   			<map:serializer name="fo2pdf"  	mime-type="application/pdf" 	src="FOPSerializer"/>   			 
+		</map:serializers>
+
+  		<map:selectors default="browser">
+   			<map:selector name="browser" src="BrowserSelectorFactory">
+                                <!-- # NOTE: The appearance indicates the search order. This is very important since
+                                     #       some words may be found in more than one browser description. (MSIE is
+                                     #       presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...")
+                                -->
+				<browser name="explorer" useragent="MSIE"/>				
+				<browser name="mozilla5" useragent="Mozilla/5"/>
+				<browser name="mozilla5" useragent="Netscape6/"/>
+				<browser name="netscape" useragent="Mozilla"/>
+  			</map:selector>
+ 		</map:selectors>
+
+		<map:matchers default="wildcard">
+   			<map:matcher name="wildcard"        src="WildcardURIMatcherFactory"/>			
+		</map:matchers>
+
+     		<map:actions>
+  		</map:actions>
+
+	</map:components> 	
+    
+</map:sitemap>
+
+<!-- end of file -->
diff --git a/test/tests/api/xalanj2/testXPath3.xml b/test/tests/api/xalanj2/testXPath3.xml
new file mode 100644
index 0000000..fc035c1
--- /dev/null
+++ b/test/tests/api/xalanj2/testXPath3.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+ <!DOCTYPE doc [
+   <!ELEMENT doc (test*)>
+   <!ELEMENT test EMPTY>
+   <!ATTLIST test id   ID    #REQUIRED
+                  name CDATA #REQUIRED
+   >
+ ]>
+ <doc>
+   <test id="a" name="TestA"/>
+   <test id="b" name="TestB"/>
+ </doc>   
diff --git a/test/tests/bugzilla/Bugzilla1009.xsl b/test/tests/bugzilla/Bugzilla1009.xsl
new file mode 100644
index 0000000..8879bd8
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla1009.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- 
+Bugzilla1009: Malformed attribute expression lacks line/column information 
+http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1009
+bevan.arps@clear.net.nz (Bevan Arps)
+-->
+
+  <xsl:template match="doc">
+    <out>
+	<!-- Below line causes error due to unclosed '{', but:
+		 error is not helpful either on cmd line or programmatically -->
+	<link ref="{foo(bar)"></link>
+    </out>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla1110.java b/test/tests/bugzilla/Bugzilla1110.java
new file mode 100644
index 0000000..45ea942
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla1110.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+// REPLACE_imports needed for reproducing the bug
+import java.io.StringReader;
+import org.apache.xerces.parsers.DOMParser;
+import org.apache.xpath.XPath;
+import org.apache.xpath.XPathAPI;
+import org.apache.xpath.objects.XObject;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+import org.xml.sax.InputSource;
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ * @author kent@hauN.org
+ * @author shane_curcuru@lotus.com
+ */
+public class Bugzilla1110 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla1110"; }
+
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     * Many Bugzilla tests won't bother with a datalet; they'll 
+     * just have the data to reproduce the bug encoded by default.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla1110");
+        logger.logMsg(Logger.STATUSMSG, "User reports: I expect the following program prints ' e1\n null\n'.");
+        logger.logMsg(Logger.STATUSMSG, "User reports: But it actually prints ' null\n e1\n'.");
+        
+        try
+        {
+            DOMParser domp = new DOMParser();
+            final String docStr = 
+            "<!DOCTYPE doc []>\n"
+            +"<doc>\n"
+            +"   <e1>\n"
+            +"      <e2/>\n"
+            +"   </e1>\n"
+            +"</doc>\n";
+
+            logger.logMsg(Logger.STATUSMSG, "---- about to parse document");
+            logger.logMsg(Logger.STATUSMSG, docStr);
+            logger.logMsg(Logger.STATUSMSG, "----");
+            domp.parse(new InputSource(new StringReader(docStr)));
+            Document doc = domp.getDocument();
+
+            final String xpathStr = "(//.)[self::e1]";
+            logger.logMsg(Logger.STATUSMSG, "about to eval '" + xpathStr + "'");
+            XObject xobj = XPathAPI.eval(doc, xpathStr);
+            if (xobj.getType() != XObject.CLASS_NODESET) {
+                logger.checkFail("XObject returned is NOT a nodeset, is:" + xobj.str());
+            } else {
+                NodeIterator iter = xobj.nodeset();
+                logger.logMsg(Logger.STATUSMSG, "XObject returned Class is: " + iter.getClass().getName());
+                logger.logMsg(Logger.STATUSMSG, "---- XObject returned value is");
+
+                Node n = iter.nextNode();
+                logger.logMsg(Logger.STATUSMSG, n == null ? " null" : " " + n.getNodeName());
+                n = iter.nextNode();
+                logger.logMsg(Logger.STATUSMSG, n == null ? " null" : " " + n.getNodeName());
+                while ((n = iter.nextNode()) != null)
+                {
+                    logger.logMsg(Logger.STATUSMSG, " " + n.getNodeName());
+                }
+                iter.detach();
+                logger.logMsg(Logger.WARNINGMSG, "NOTE: still need to validate expected error!");
+            }            
+        } 
+        catch (Throwable t)
+        {
+            logger.logThrowable(Logger.ERRORMSG, t, "execute threw");
+            logger.checkFail("execute threw: " + t.toString());
+        }
+    }
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=NNNN">
+     * Link to Bugzilla report</a>
+     * @return REPLACE_Bugzilla1110_description.
+     */
+    public String getDescription()
+    {
+        return "REPLACE_Bugzilla1110_description";
+    }
+
+}  // end of class Bugzilla1110
+
diff --git a/test/tests/bugzilla/Bugzilla1251.java b/test/tests/bugzilla/Bugzilla1251.java
new file mode 100644
index 0000000..aed5790
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla1251.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+// imports needed for reproducing the bug
+import javax.xml.transform.ErrorListener;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamSource;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ *
+ * Reported-by: slobo@matavnet.hu
+ */
+public class Bugzilla1251 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla1251"; }
+
+    /**
+     * Reproduce a Bugzilla bug report.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#1251: TransformerHandler with SAXResult mishandles exceptions");
+
+        try {
+            logger.logMsg(Logger.STATUSMSG, "Using an identity transformer should work...");
+            SAXTransformerFactory f = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
+            TransformerHandler th = f.newTransformerHandler();
+            th.setResult(new SAXResult(new Bugzilla1251Handler(logger, "CH1")));
+            Transformer t = th.getTransformer();
+            t.setErrorListener(new Bugzilla1251Handler(logger, "EL1"));
+            th.startDocument();
+            th.startElement("","foo","foo",new AttributesImpl());
+            th.endElement("","foo","foo");
+            th.endDocument();
+        } catch(Throwable t) {
+            logger.checkFail("Should not have thrown exception!");
+            logger.logThrowable(Logger.ERRORMSG, t, "Should not have thrown exception!");
+        }
+
+        try {
+            logger.logMsg(Logger.STATUSMSG, "But using a real transformer does not...");
+            SAXTransformerFactory f = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
+            TransformerHandler th = f.newTransformerHandler(new StreamSource("identity.xsl"));
+            th.setResult(new SAXResult(new Bugzilla1251Handler(logger, "CH2")));
+            Transformer t = th.getTransformer();
+            t.setErrorListener(new Bugzilla1251Handler(logger, "EL2"));
+            th.startDocument();
+            th.startElement("","foo","foo",new AttributesImpl());
+            th.endElement("","foo","foo");
+            th.endDocument();
+        } catch(Throwable t) {
+            logger.checkFail("Should not have thrown exception!");
+            logger.logThrowable(Logger.ERRORMSG, t, "Should not have thrown exception!");
+        }
+	}
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1251">
+     * Link to Bugzilla</a>
+     * @return TransformerHandler with SAXResult mishandles exceptions.
+     */
+    public String getDescription()
+    {
+        return "TransformerHandler with SAXResult mishandles exceptions";
+    }
+
+    class Bugzilla1251Handler extends DefaultHandler implements ErrorListener {
+
+        private Logger m_logger = null;
+        private String m_id = null; // Not strictly needed, I've over-instrumented this a bit -sc
+        private int m_ctr = 0;
+        public Bugzilla1251Handler(Logger l, String id) {
+            m_logger = l;
+            m_id = id;
+        }
+
+        // Moved to separate class: for main() method, see Bugzilla1251.execute()
+            public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
+                m_logger.logMsg(Logger.STATUSMSG, "Entering(" + m_id + ") startElement(" 
+                                + namespaceURI + ", "
+                                + localName + ", "
+                                + qName + ", "
+                                + ") and throwing an Exception..");
+                m_ctr++;
+                if (m_ctr > 1)
+                    m_logger.checkFail("Entered(" + m_id + ") startElement more than once! " + m_ctr);
+
+                // This is really what's being tested: if a Handler 
+                //  throws an exception, does Xalan propagate it 
+                //  to the correct places?
+                throw new SAXException("Should stop processing");
+            }
+
+            public void warning(TransformerException e) throws TransformerException 
+            {
+                m_logger.checkPass("Entering(" + m_id + ") warning()");
+                m_logger.logThrowable(Logger.WARNINGMSG, e, "Entering(" + m_id + ") warning()");
+                //throw e;
+            }
+
+            public void error(TransformerException e) throws TransformerException {
+                m_logger.checkPass("Entering(" + m_id + ") error()");
+                m_logger.logThrowable(Logger.WARNINGMSG, e, "Entering(" + m_id + ") error()");
+                //throw e;
+            }
+
+            public void fatalError(TransformerException e) throws TransformerException {
+                m_logger.checkPass("Entering(" + m_id + ") fatalError()");
+                m_logger.logThrowable(Logger.WARNINGMSG, e, "Entering(" + m_id + ") fatalError()");
+                //throw e;
+            }
+    }
+
+}  // end of class BugzillaTestlet
+
diff --git a/test/tests/bugzilla/Bugzilla1266.java b/test/tests/bugzilla/Bugzilla1266.java
new file mode 100644
index 0000000..7d61088
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla1266.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+// REPLACE_imports needed for reproducing the bug
+import org.apache.qetest.*;
+import org.apache.qetest.trax.*;
+import org.apache.qetest.xsl.*;
+
+// Import all relevant TRAX packages
+import javax.xml.transform.*;
+import javax.xml.transform.dom.*;
+import javax.xml.transform.sax.*;
+import javax.xml.transform.stream.*;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParserFactory;
+
+// Needed SAX, DOM, JAXP classes
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+import org.w3c.dom.Node;
+
+// java classes
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Properties;
+
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ *
+ * @author shane_curcuru@lotus.com
+ * @author wjboukni@eos.ncsu.edu
+ */
+public class Bugzilla1266 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla1266"; }
+
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     * Many Bugzilla tests won't bother with a datalet; they'll 
+     * just have the data to reproduce the bug encoded by default.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#1266");
+        LoggingErrorListener loggingErrorListener = new LoggingErrorListener(logger);
+        loggingErrorListener.setThrowWhen(LoggingErrorListener.THROW_NEVER);
+        logger.logMsg(Logger.STATUSMSG, "loggingErrorListener originally setup:" + loggingErrorListener.getQuickCounters());
+
+        TransformerFactory factory = null;
+        Templates templates = null;
+        Transformer transformer = null;
+        try
+        {
+            factory = TransformerFactory.newInstance();
+            logger.logMsg(Logger.STATUSMSG, "About to factory.newTemplates(" + QetestUtils.filenameToURL("identity.xsl") + ")");
+            templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL("identity.xsl")));
+            transformer = templates.newTransformer();
+
+            // Set the errorListener and validate it
+            transformer.setErrorListener(loggingErrorListener);
+            if (transformer.getErrorListener() == loggingErrorListener)
+                logger.checkPass("set/getErrorListener on transformer");
+            else
+                logger.checkFail("set/getErrorListener on transformer");
+
+            logger.logMsg(Logger.STATUSMSG, "Reproduce Bugzilla1266 - warning due to bad output props not propagated");
+            logger.logMsg(Logger.STATUSMSG, "transformer.setOutputProperty(encoding, illegal-encoding-value)");
+            transformer.setOutputProperty("encoding", "illegal-encoding-value");
+
+            logger.logMsg(Logger.STATUSMSG, "about to transform(...)");
+            transformer.transform(new StreamSource(QetestUtils.filenameToURL("identity.xml")), 
+                                  new StreamResult("Bugzilla1266.out"));
+            logger.logMsg(Logger.STATUSMSG, "after transform(...)");
+            logger.logMsg(Logger.STATUSMSG, "loggingErrorListener after transform:" + loggingErrorListener.getQuickCounters());
+
+            // Validate that one warning (about illegal-encoding-value) should have been reported
+            int[] errCtr = loggingErrorListener.getCounters();
+            if (errCtr[LoggingErrorListener.TYPE_WARNING] > 0)
+                logger.checkPass("At least one Warning listned to for illegal-encoding-value");
+            else
+                logger.checkFail("At least one Warning listned to for illegal-encoding-value");
+                
+            // Validate the actual output file as well: in this case, 
+            //  the stylesheet should still work
+            CheckService fileChecker = new XHTFileCheckService();
+            fileChecker.check(logger, 
+                    new File("Bugzilla1266.out"), 
+                    new File("identity.gold"), 
+                    "transform of good xsl w/bad output props into: " + "Bugzilla1266.out");
+            
+        }
+        catch (Throwable t)
+        {
+            logger.checkFail("Bugzilla1266 unexpectedly threw: " + t.toString());
+            logger.logThrowable(Logger.ERRORMSG, t, "Bugzilla1266 unexpectedly threw");
+        }
+
+	}
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1266">
+     * Link to Bugzilla report</a>
+     * @return Warning Event not being fired from Transformer when using invalid Encoding String.
+     */
+    public String getDescription()
+    {
+        return "Warning Event not being fired from Transformer when using invalid Encoding String";
+    }
+
+}  // end of class Bugzilla1266
+
diff --git a/test/tests/bugzilla/Bugzilla1283.java b/test/tests/bugzilla/Bugzilla1283.java
new file mode 100644
index 0000000..e78a661
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla1283.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.trax.LoggingErrorListener;
+
+// REPLACE_imports needed for reproducing the bug
+import javax.xml.transform.*;
+import javax.xml.transform.stream.*;
+import java.io.File;
+
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ *
+ * @author Antti.Valtokari@iocore.fi
+ * @author shane_curcuru@lotus.com
+ */
+public class Bugzilla1283 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla1283"; }
+
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     */
+    public void execute(Datalet d)
+    {
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#1283 Xalan hangs if javax.xml.transform.TransformerException thrown when invoked through JAXP");
+        logger.logMsg(Logger.CRITICALMSG, "WARNING! THIS TEST MAY HANG! (i.e. don't run in automation)");
+        try
+        {
+            TransformerFactory transformerFactory = TransformerFactory.newInstance();
+            Source transformerSource = new StreamSource(new File("identity.xsl"));
+            Transformer transformer =
+              transformerFactory.newTransformer(transformerSource);
+            // Use nifty utility from testxsl.jar
+            LoggingErrorListener loggingErrorListener = new LoggingErrorListener(logger);
+            transformer.setErrorListener(loggingErrorListener); // default is to throw when fatalError
+
+            Source input = new StreamSource(new File("error.xml"));
+            Result output = new StreamResult(new File("Bugzilla1283.out"));
+            logger.logMsg(Logger.STATUSMSG, "About to transform error.xml into Bugzilla1283.out");
+            transformer.transform(input, output);
+            logger.checkFail("Transform should have had fatalError which threw Exception");
+        }
+        catch (Exception e)
+        {
+            logger.logThrowable(Logger.ERRORMSG, e, "Transform properly had fatalError and threw");
+            logger.checkPass("Transform properly had fatalError and threw: " + e.toString());
+        }
+        logger.logMsg(Logger.CRITICALMSG, "Bug occours now: system hangs");
+        logger.checkPass("if we got here, we didn't hang!");
+    }
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1283">
+     * Link to Bugzilla report</a>
+     * @return Xalan hangs if javax.xml.transform.TransformerException thrown when invoked through JAXP.
+     */
+    public String getDescription()
+    {
+        return "Xalan hangs if javax.xml.transform.TransformerException thrown when invoked through JAXP";
+    }
+
+}  // end of class Bugzilla1283
+
diff --git a/test/tests/bugzilla/Bugzilla1288.java b/test/tests/bugzilla/Bugzilla1288.java
new file mode 100644
index 0000000..60bdffb
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla1288.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+import javax.xml.transform.*;
+import javax.xml.transform.dom.*;
+import javax.xml.transform.stream.*;
+import org.apache.xalan.stree.DocumentImpl;
+import org.apache.xalan.extensions.ExpressionContext;
+import org.xml.sax.InputSource;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import java.io.File;
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ * @author rylsky@hotmail.com (Vladimir Rylsky)
+ * @author shane_curcuru@lotus.com
+ */
+public class Bugzilla1288 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla1288"; }
+
+    /**
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#1288 TreeWalker.traverse goes to infinite loop (with extension)");
+        // Just transform the stylesheet:
+        logger.logMsg(Logger.CRITICALMSG, "WARNING! THIS TEST MAY HANG! (i.e. don't run in automation)");
+        try
+        {
+            TransformerFactory transformerFactory = TransformerFactory.newInstance();
+            Source transformerSource = new StreamSource(new File("Bugzilla1288.xsl"));
+            Transformer transformer = transformerFactory.newTransformer(transformerSource);
+            Source input = new StreamSource(new File("identity.xml"));
+            Result output = new StreamResult(new File("Bugzilla1288.out"));
+            logger.logMsg(Logger.STATUSMSG, "About to transform error.xml into Bugzilla1288.out");
+            transformer.transform(input, output);
+            logger.checkPass("Transform completed and returned (crash test)");
+            logger.logMsg(Logger.STATUSMSG, "To-do: validate output!");
+        }
+        catch (Exception e)
+        {
+            logger.checkFail("Transform threw: " + e.toString());
+            logger.logThrowable(Logger.ERRORMSG, e, "Transform threw");
+        }
+        logger.checkAmbiguous("Bug occours now: system hangs");
+	}
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1288">
+     * Link to Bugzilla report</a>
+     * @return TreeWalker.traverse goes to infinite loop (with extension).
+     */
+    public String getDescription()
+    {
+        return "TreeWalker.traverse goes to infinite loop (with extension)";
+    }
+
+    /* Extension function used in stylesheet */
+    public Node run(ExpressionContext processor, Node context)
+    {
+      Document x_doc = null;
+      Element n_tool;
+
+      // Note must call public constructor! -sc
+      x_doc = new DocumentImpl(1024);
+
+      n_tool = (Element)x_doc.appendChild(x_doc.createElement("TOOL_NAME"));
+      n_tool.setAttribute("date", "date-string-here" /* new Date().toString() */);
+
+      Node n_result = n_tool.appendChild(x_doc.createElement("result"));
+
+      if (context != null)
+      {
+        try
+        {
+          Transformer copier = TransformerFactory.newInstance().newTransformer();
+          copier.transform(new DOMSource(n_tool), new DOMResult(context));
+        }
+        catch (TransformerException ex)
+        {
+          ex.printStackTrace();
+        }
+      }
+
+      return n_tool;
+     }    
+}  // end of class Bugzilla1288
diff --git a/test/tests/bugzilla/Bugzilla1288.xsl b/test/tests/bugzilla/Bugzilla1288.xsl
new file mode 100644
index 0000000..7e79cc8
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla1288.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:extension1288="MyCounter"
+                extension-element-prefixes="extension1288"
+                version="1.0">
+
+  <lxslt:component prefix="extension1288"
+                   elements="" functions="read">
+    <lxslt:script lang="javaclass" src="Bugzilla1288"/>
+  </lxslt:component>
+
+  <!-- XSL variable declaration -->
+  <xsl:variable name="var">
+  <history/>
+  </xsl:variable>
+
+  <!-- Extension function call -->
+  <xsl:template match="/">
+    <out>
+      <p>Extension output below:</p>
+      <xsl:variable name="result" select="extension1288:run($var)"/>
+      <xsl:copy-of select="$var"/>
+      <p>Extension output above:</p>
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla1330.xsl b/test/tests/bugzilla/Bugzilla1330.xsl
new file mode 100644
index 0000000..6c14ec7
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla1330.xsl
@@ -0,0 +1,46 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+    xmlns:lxslt="http://xml.apache.org/xslt"
+    xmlns:redirect="org.apache.xalan.lib.Redirect"
+    extension-element-prefixes="redirect">
+
+  <lxslt:component prefix="redirect" elements="write open close" functions="">
+    <lxslt:script lang="javaclass" src="org.apache.xalan.lib.Redirect"/>
+  </lxslt:component>  
+
+  <xsl:param name="redirectOutputName" select="'Redirect1330.out'"/>
+    
+  <xsl:template match="doc">
+    <out>
+      <xsl:message>Your main output document should have a main-doc-comment and a main-doc-elem</xsl:message>
+      <xsl:comment>main-doc-comment</xsl:comment>
+        <redirect:write select="$redirectOutputName">
+          <out>
+            <xsl:message>Your redirected document <xsl:value-of select="$redirectOutputName"/> should have a redirect-doc-comment and a redirect-doc-elem</xsl:message>
+            <xsl:comment>redirect-doc-comment</xsl:comment>
+            <redirect-doc-elem/>
+          </out>
+        </redirect:write>
+      <main-doc-elem/>
+    </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla2925.java b/test/tests/bugzilla/Bugzilla2925.java
new file mode 100644
index 0000000..5deae93
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla2925.java
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.xsl.XHTFileCheckService;
+import org.apache.qetest.CheckService;
+
+import org.w3c.dom.*;
+
+import javax.xml.parsers.*;
+import javax.xml.transform.*;
+import javax.xml.transform.stream.*;
+
+import org.apache.xalan.templates.*;
+import org.apache.xalan.extensions.*;
+import org.apache.xalan.transformer.*;
+import org.apache.xpath.*;
+import org.apache.xpath.objects.*;
+
+import org.apache.xml.dtm.*;
+import org.apache.xml.dtm.ref.*;
+import org.apache.xml.dtm.ref.sax2dtm.*;
+
+import org.apache.xpath.XPathContext.XPathExpressionContext;
+import org.apache.xpath.axes.OneStepIterator;
+
+import java.io.File;
+
+/**
+ * Testlet for reproducing
+ * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2925">bug #2925</a>
+ * @author scott_boag@lotus.com
+ */
+public class Bugzilla2925 extends TestletImpl
+{
+
+  // Initialize our classname for TestletImpl's main() method - must be updated!
+  static
+  {
+    thisClassName = "Bugzilla2925";
+  }
+
+  /**
+   * Write Minimal code to reproduce your Bugzilla bug report.
+   * Many Bugzilla tests won't bother with a datalet; they'll
+   * just have the data to reproduce the bug encoded by default.
+   * @param d (optional) Datalet to use as data point for the test.
+   *
+   * NEEDSDOC @param datalet
+   */
+  public void execute(Datalet datalet)
+  {
+
+    // Use logger.logMsg(...) instead of System.out.println(...)
+    logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#2925");
+
+    try
+    {
+      TransformerFactory tf = TransformerFactory.newInstance();
+      Transformer t = tf.newTransformer(new StreamSource("Bugzilla2925.xsl"));
+      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+
+      dbf.setNamespaceAware(true);
+
+      DocumentBuilder db = dbf.newDocumentBuilder();
+      Document doc = db.parse("Bugzilla2925Params.xml");
+
+      t.setParameter("stylesheets", doc.getDocumentElement());
+      t.transform(new StreamSource("bugzilla2925.xml"),
+                  new StreamResult("bugzilla2925.xsr")
+                  // new StreamResult(System.err)
+                  );
+
+      // If we get here, attempt to validate the contents of 
+      //  the outputFile created
+      CheckService fileChecker = new XHTFileCheckService();
+
+      if (Logger.PASS_RESULT
+              != fileChecker.check(logger, new File("bugzilla2925.xsr"),
+                                   new File("bugzilla2925.out"),
+                                   getDescription())){}
+    }
+    catch (Exception e)
+    {
+      logger.checkFail(e.getMessage());
+    }
+    
+    // Optional: use the Datalet d if supplied
+    // Call code to reproduce the bug here
+    // Call logger.checkFail("desc") (like Junit's assert(true, "desc")
+    //  or logger.checkPass("desc")  (like Junit's assert(false, "desc")
+    //  to report the actual bug fail/pass status
+  }
+  
+  public static DTM dtmTest(org.apache.xalan.extensions.ExpressionContext exprContext, 
+                     String relativeURI)
+  {
+    XPathExpressionContext xpathExprContext = (XPathExpressionContext)exprContext;
+    DTMManager dtmMgr = xpathExprContext.getDTMManager();
+    
+    DTM dtm = dtmMgr.getDTM(new StreamSource(relativeURI), true, null, false, true);
+    // System.err.println("Returning a DTM: "+dtm);
+    // ((DTMDefaultBase)dtm).dumpDTM();
+    return dtm;
+  }
+  
+  public static DTMAxisIterator DTMAxisIteratorTest(
+                     org.apache.xalan.extensions.ExpressionContext exprContext, 
+                     String relativeURI)
+  {
+    XPathExpressionContext xpathExprContext = (XPathExpressionContext)exprContext;
+    DTMManager dtmMgr = xpathExprContext.getDTMManager();
+    
+    DTM dtm = dtmMgr.getDTM(new StreamSource(relativeURI), true, null, false, true);
+    // System.err.println("Returning a DTM: "+dtm);
+    // ((DTMDefaultBase)dtm).dumpDTM();
+    
+    DTMAxisIterator iter = dtm.getAxisIterator(Axis.SELF);
+    iter.setStartNode(dtm.getDocument());
+        
+    return iter;
+  }
+  
+  public static DTMIterator DTMIteratorTest(
+                     org.apache.xalan.extensions.ExpressionContext exprContext, 
+                     String relativeURI)
+      throws Exception
+  {
+    XPathExpressionContext xpathExprContext = (XPathExpressionContext)exprContext;
+    DTMManager dtmMgr = xpathExprContext.getDTMManager();
+    
+    DTM dtm = dtmMgr.getDTM(new StreamSource(relativeURI), true, null, false, true);
+    // System.err.println("Returning a DTM: "+dtm);
+    // ((DTMDefaultBase)dtm).dumpDTM();
+    
+/***************************
+// Comment out compile error: Bugzilla2925.java:141: Wrong number of arguments in constructor.
+    DTMIterator iterator = new OneStepIterator(dtm.getAxisIterator(Axis.SELF));
+    iterator.setRoot(dtm.getDocument(), xpathExprContext.getXPathContext());
+
+    return iterator;
+// Comment out compile error: Bugzilla2925.java:141: Wrong number of arguments in constructor.
+***************************/
+    return null;
+  }
+
+
+
+  /**
+   * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2925">
+   * Link to Bugzilla report</a>
+   * @return "Parameter set from DOM Node, broken".
+   */
+  public String getDescription()
+  {
+    return "http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2925";
+  }
+}  // end of class Bugzilla2925
+
diff --git a/test/tests/bugzilla/Bugzilla2925.out b/test/tests/bugzilla/Bugzilla2925.out
new file mode 100644
index 0000000..02b7cd2
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla2925.out
@@ -0,0 +1,98 @@
+<TEMPLATES>
+===== Test java:getNodeName from RTF param. =====
+CONFIG_DATA
+===== Test xsl:copy-of of RTF param. =====
+<CONFIG_DATA>
+	<RegisterAccount>
+		<STYLESHEETS>
+			<SUCCESS>
+				<XSL_SHEET MEDIA="NS4">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGCOMPLETE.XSL</XSL_SHEET>
+			</SUCCESS>
+			<ERROR>
+				<XSL_SHEET MEDIA="NS4">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGISTER1.XSL</XSL_SHEET>
+			</ERROR>
+		</STYLESHEETS>
+	</RegisterAccount>
+</CONFIG_DATA>
+===== Test return of xalan:nodeset of RTF param. =====
+<CONFIG_DATA>
+	<RegisterAccount>
+		<STYLESHEETS>
+			<SUCCESS>
+				<XSL_SHEET MEDIA="NS4">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGCOMPLETE.XSL</XSL_SHEET>
+			</SUCCESS>
+			<ERROR>
+				<XSL_SHEET MEDIA="NS4">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGISTER1.XSL</XSL_SHEET>
+			</ERROR>
+		</STYLESHEETS>
+	</RegisterAccount>
+</CONFIG_DATA>
+===== Test return of DTM from extension. =====
+<CONFIG_DATA>
+	<RegisterAccount>
+		<STYLESHEETS>
+			<SUCCESS>
+				<XSL_SHEET MEDIA="NS4">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGCOMPLETE.XSL</XSL_SHEET>
+			</SUCCESS>
+			<ERROR>
+				<XSL_SHEET MEDIA="NS4">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGISTER1.XSL</XSL_SHEET>
+			</ERROR>
+		</STYLESHEETS>
+	</RegisterAccount>
+</CONFIG_DATA>
+===== Test return of DTMAxisIterator from extension. =====
+<CONFIG_DATA>
+	<RegisterAccount>
+		<STYLESHEETS>
+			<SUCCESS>
+				<XSL_SHEET MEDIA="NS4">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGCOMPLETE.XSL</XSL_SHEET>
+			</SUCCESS>
+			<ERROR>
+				<XSL_SHEET MEDIA="NS4">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGISTER1.XSL</XSL_SHEET>
+			</ERROR>
+		</STYLESHEETS>
+	</RegisterAccount>
+</CONFIG_DATA>
+===== Test return of DTMIterator from extension. =====
+<CONFIG_DATA>
+	<RegisterAccount>
+		<STYLESHEETS>
+			<SUCCESS>
+				<XSL_SHEET MEDIA="NS4">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGCOMPLETE.XSL</XSL_SHEET>
+			</SUCCESS>
+			<ERROR>
+				<XSL_SHEET MEDIA="NS4">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGISTER1.XSL</XSL_SHEET>
+			</ERROR>
+		</STYLESHEETS>
+	</RegisterAccount>
+</CONFIG_DATA></TEMPLATES>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla2925.xml b/test/tests/bugzilla/Bugzilla2925.xml
new file mode 100644
index 0000000..354e12a
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla2925.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
diff --git a/test/tests/bugzilla/Bugzilla2925.xsl b/test/tests/bugzilla/Bugzilla2925.xsl
new file mode 100644
index 0000000..16703cb
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla2925.xsl
@@ -0,0 +1,69 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+     xmlns:sql="org.apache.xalan.lib.sql.XConnection" 
+     xmlns:xalan="http://xml.apache.org/xalan" 
+     exclude-result-prefixes="xalan java" 
+     extension-element-prefixes="sql"
+     xmlns:java="http://xml.apache.org/xslt/java">
+        <xsl:output method="xml" omit-xml-declaration="yes" standalone="yes"/>
+
+        <!-- Varaible that will be replaced by the XSL Dynamic Query Processor -->
+        <xsl:param name="stylesheets">
+                <STYLESHEETS>
+                        <SUCCESS>
+                                <XSL_SHEET MEDIA="ns">success1.xsl</XSL_SHEET>
+                                <XSL_SHEET MEDIA="ie">success2.xsl</XSL_SHEET>
+                                <XSL_SHEET MEDIA="123">success3.xsl</XSL_SHEET>
+                        </SUCCESS>
+                        <ERROR>
+                                <XSL_SHEET MEDIA="456">error1.xsl</XSL_SHEET>
+                                <XSL_SHEET MEDIA="789">error2.xsl</XSL_SHEET>
+                                <XSL_SHEET MEDIA="000">error3.xsl</XSL_SHEET>
+                        </ERROR>
+                </STYLESHEETS>
+        </xsl:param>
+
+        <xsl:template match="/">
+                <!-- P911X Response Element -->
+                <xsl:element name="TEMPLATES">
+                    <!--xsl:copy-of select="xalan:nodeset($stylesheets)"/-->
+                    <!-- This is a test to make sure we can still call methods on the 
+                             passed in node. -->
+                    <xsl:text>&#10;===== Test java:getNodeName from RTF param. =====&#10;</xsl:text>
+                    <xsl:value-of select="java:getNodeName($stylesheets)" />
+
+                    <xsl:text>&#10;===== Test xsl:copy-of of RTF param. =====&#10;</xsl:text>
+                    <xsl:copy-of select="$stylesheets"/>
+                    
+                    <xsl:text>&#10;===== Test return of xalan:nodeset of RTF param. =====&#10;</xsl:text>
+                    <xsl:copy-of select="xalan:nodeset($stylesheets)"/>
+                    
+                    <xsl:text>&#10;===== Test return of DTM from extension. =====&#10;</xsl:text>
+                    <xsl:copy-of select="java:Bugzilla2925.dtmTest('Bugzilla2925Params.xml')"/>
+                    
+                    <xsl:text>&#10;===== Test return of DTMAxisIterator from extension. =====&#10;</xsl:text>
+                    <xsl:copy-of select="java:Bugzilla2925.DTMAxisIteratorTest('Bugzilla2925Params.xml')"/>
+                    
+                    <xsl:text>&#10;===== Test return of DTMIterator from extension. =====&#10;</xsl:text>
+                    <xsl:copy-of select="java:Bugzilla2925.DTMIteratorTest('Bugzilla2925Params.xml')"/>
+                </xsl:element>
+        </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla2925Params.xml b/test/tests/bugzilla/Bugzilla2925Params.xml
new file mode 100644
index 0000000..96559aa
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla2925Params.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG_DATA>
+	<RegisterAccount>
+		<STYLESHEETS>
+			<SUCCESS>
+				<XSL_SHEET MEDIA="NS4">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGCOMPLETE.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGCOMPLETE.XSL</XSL_SHEET>
+			</SUCCESS>
+			<ERROR>
+				<XSL_SHEET MEDIA="NS4">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="IE3">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="WML">REGISTER1.XSL</XSL_SHEET>
+				<XSL_SHEET MEDIA="default">REGISTER1.XSL</XSL_SHEET>
+			</ERROR>
+		</STYLESHEETS>
+	</RegisterAccount>
+</CONFIG_DATA>
diff --git a/test/tests/bugzilla/Bugzilla2945.out b/test/tests/bugzilla/Bugzilla2945.out
new file mode 100644
index 0000000..c809991
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla2945.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+   
+   Item of main, , 
+   Item of aux, , , myNode, 
diff --git a/test/tests/bugzilla/Bugzilla2945.xml b/test/tests/bugzilla/Bugzilla2945.xml
new file mode 100644
index 0000000..3d2477b
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla2945.xml
@@ -0,0 +1,11 @@
+<myDoc>
+   <myNode id="tools">
+        <myItem>Item of tools</myItem>
+   </myNode>
+   <myNode id="main">
+        <myItem>Item of main</myItem>
+   </myNode>
+   <myNode id="aux">
+        <myItem>Item of aux</myItem>
+   </myNode>
+</myDoc>
diff --git a/test/tests/bugzilla/Bugzilla2945.xsl b/test/tests/bugzilla/Bugzilla2945.xsl
new file mode 100644
index 0000000..51cb7f9
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla2945.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" 
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+     xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+
+<xsl:template match="/">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="myNode">
+  <xsl:apply-templates select="myItem"/>
+</xsl:template>
+
+<xsl:template match="myItem">
+  <xsl:variable name="nodeSet" select="ancestor::myNode[@id='main'] |ancestor::myNode[@id='aux']"/>
+  <xsl:if test="$nodeSet">
+    <xsl:value-of select="normalize-space($nodeSet)"/>
+	<xsl:for-each select="preceding::* | dummy">
+		<xsl:text>, </xsl:text><xsl:value-of select="name(preceding-sibling::* | dummy)"/>
+	</xsl:for-each>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla3001.out b/test/tests/bugzilla/Bugzilla3001.out
new file mode 100644
index 0000000..5440814
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3001.out
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/TR/REC-html40">
+  <head>
+    <title>My Title</title>
+  </head>
+  <body><a xmlns:html="http://www.w3.org/TR/REC-html40" name="prefix_1"/>
+    <div>
+      <div>
+        <table>
+          <tr>
+            <td>
+              <h1>My Title</h1>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla3001.xml b/test/tests/bugzilla/Bugzilla3001.xml
new file mode 100644
index 0000000..691de2e
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3001.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" ?>
+<html xmlns="http://www.w3.org/TR/REC-html40">
+  <head>
+    <title>My Title</title>
+  </head>
+  <body>
+    <div>
+      <div>
+        <table>
+          <tr>
+            <td>
+              <h1><a name="prefix_1">My Title</a></h1>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </div>
+  </body>
+</html>
diff --git a/test/tests/bugzilla/Bugzilla3001.xsl b/test/tests/bugzilla/Bugzilla3001.xsl
new file mode 100644
index 0000000..e7b1517
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3001.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding='iso-8859-1'?>
+
+<!-- this stylesheet looks the first a element (html anchor) whose
+     name attribute starts with the string 'prefix_', then copies this
+     anchor to the beginning of the document (right after the body
+     start tag) and removes the anchor element from the original
+     place. the rest of the input is copied identically. -->
+
+<xsl:stylesheet version="1.0" 
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html="http://www.w3.org/TR/REC-html40" >
+
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template name="beginning-of-body" >
+    <xsl:variable name="first-anchor" select="//html:a[starts-with
+(@name, 'prefix_')][1]/@name" />
+    <xsl:if test="$first-anchor" >
+      <a name="{$first-anchor}" />
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="//html:a[starts-with(@name, 'prefix_')][not
+(preceding::html:a[starts-with(@name, 'prefix_')])]" > 
+    <xsl:apply-templates select="node()" />
+  </xsl:template>
+
+  <xsl:template match="html:body" >
+    <xsl:copy>
+      <xsl:call-template name="beginning-of-body" />
+      <xsl:apply-templates select="@*|node()" />
+    </xsl:copy>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla3031.out b/test/tests/bugzilla/Bugzilla3031.out
new file mode 100644
index 0000000..e88336e
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3031.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<first worksCorrectly="YES"><bang>
+    <bat>1</bat>
+  </bang><bang>
+    <bat>3</bat>
+  </bang></first><second worksCorrectly="YES! (should do the same thing)"><bang>
+    <bat>1</bat>
+  </bang><bang>
+    <bat>3</bat>
+  </bang></second>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla3031.xml b/test/tests/bugzilla/Bugzilla3031.xml
new file mode 100644
index 0000000..3583061
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3031.xml
@@ -0,0 +1,11 @@
+<foo>
+  <bar>1</bar>
+  <bar>2</bar>
+  <bar>3</bar>
+  <bang>
+    <bat>1</bat>
+  </bang>
+  <bang>
+    <bat>3</bat>
+  </bang>
+</foo>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla3031.xsl b/test/tests/bugzilla/Bugzilla3031.xsl
new file mode 100644
index 0000000..52f99ca
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3031.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:transform version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:template match="/">
+    <first worksCorrectly="YES">
+      <xsl:for-each select="/foo/bar">
+        <xsl:for-each select="/foo/bang[bat=current()]">
+          <xsl:copy-of select="."/>
+        </xsl:for-each>
+      </xsl:for-each>
+    </first>
+    <second worksCorrectly="YES! (should do the same thing)">
+      <xsl:for-each select="/foo/bar">
+        <xsl:for-each select="/foo/bang[bat[.=current()]]">
+          <xsl:copy-of select="."/>
+        </xsl:for-each>
+      </xsl:for-each>
+    </second>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/bugzilla/Bugzilla3060.out b/test/tests/bugzilla/Bugzilla3060.out
new file mode 100644
index 0000000..ad398b7
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3060.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="foo">
+  Text
+</out>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla3060.xml b/test/tests/bugzilla/Bugzilla3060.xml
new file mode 100644
index 0000000..f3ae0a0
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3060.xml
@@ -0,0 +1,3 @@
+<foo:bar xmlns:foo="foo">
+  <a>Text</a>
+</foo:bar>
diff --git a/test/tests/bugzilla/Bugzilla3060.xsl b/test/tests/bugzilla/Bugzilla3060.xsl
new file mode 100644
index 0000000..df043b9
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3060.xsl
@@ -0,0 +1,27 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+            xmlns:foo="foo" >
+
+  <xsl:template match="foo:bar">
+    <out><xsl:apply-templates /></out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla3265.out b/test/tests/bugzilla/Bugzilla3265.out
new file mode 100644
index 0000000..a92bf5d
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3265.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test>
+   
+     
+     
+     
+   
+
+   <out value="1"/><out value="2"/><out value="3"/>
+
+</test>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla3265.xml b/test/tests/bugzilla/Bugzilla3265.xml
new file mode 100644
index 0000000..ec15f2b
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3265.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+
+<root>
+   <enumeration>
+     <item value="1" />
+     <item value="2" />
+     <item value="3" />
+   </enumeration>
+
+   <reference ref="enumeration/item" />
+
+</root>
diff --git a/test/tests/bugzilla/Bugzilla3265.xsl b/test/tests/bugzilla/Bugzilla3265.xsl
new file mode 100644
index 0000000..0786087
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3265.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                              xmlns:xalan="http://xml.apache.org/xalan"
+                              exclude-result-prefixes="xalan">
+
+   <!-- This stylesheet tests the evaluate extension function for the 
+        case where the expression to be evaluated contains a top-level variable -->
+
+   <xsl:variable name="this" select="root" />
+
+   <xsl:template match="root">
+      <test>
+         <xsl:apply-templates/>
+      </test>
+   </xsl:template>
+
+   <xsl:template match="reference">
+      <xsl:variable name="var-ref" select="concat('$this/', @ref)" />
+      <xsl:for-each select="xalan:evaluate($var-ref)">
+         <out value="{@value}" />
+      </xsl:for-each>
+   </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla3489.xml b/test/tests/bugzilla/Bugzilla3489.xml
new file mode 100644
index 0000000..436a1b5
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3489.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" ?> 
+<!-- Reproducing Bugzilla 3489 -->
+- <workspace banner-image="http://jakarta.apache.org/images/jakarta-logo.gif" banner-link="http://jakarta.apache.org" logdir="o:\desproto\ichannel/log" build-sequence="bulk" version="0.2" basedir="o:\desproto\ichannel" viewdir="../../.." outputdir="o:\desproto\ichannel\build\results\sb_desproto">
+  <property name="build.sysclasspath" value="only" /> 
+  <property name="deprecation" value="no" /> 
+  <property name="lib.ext" value="${lib.ext}" /> 
+  <property name="build.number" value="Nightly.Build" /> 
+  <property name="build.author" value="Unknown" /> 
+  <property name="implementation.version" value="X.X.X" /> 
+- <project name="activation" defined-in="activation" srcdir="./lib/javamail" tag="">
+  <description>Activation</description> 
+  <jar name="activation-1.0.1.jar" /> 
+  <home>o:\desproto\ichannel/./lib/javamail</home> 
+  </project>
+- <project name="crimson" defined-in="crimson" srcdir="./lib/crimson" tag="">
+  <description>crimson</description> 
+  <jar name="crimson.jar" /> 
+  <home>o:\desproto\ichannel/./lib/crimson</home> 
+  </project>
+- <project name="ecs" defined-in="ecs" srcdir="./lib/ecs" tag="">
+  <description>ecs</description> 
+  <jar name="ecs-1.4.1.jar" /> 
+  <home>o:\desproto\ichannel/./lib/ecs</home> 
+  </project>
+- <project name="httpclient" defined-in="httpclient" srcdir="./lib/http-client" tag="">
+  <description>http client</description> 
+  <jar name="http-client.jar" /> 
+  <home>o:\desproto\ichannel/./lib/http-client</home> 
+  </project>
+- <project name="javamail" defined-in="javamail" srcdir="./lib/javamail" tag="">
+  <description>javamail</description> 
+  <jar name="mail-1.2.jar" /> 
+  <home>o:\desproto\ichannel/./lib/javamail</home> 
+  </project>
+- <project name="jaxp" defined-in="jaxp" srcdir="./lib/crimson" tag="">
+  <description>jaxp</description> 
+  <jar name="jaxp.jar" /> 
+  <home>o:\desproto\ichannel/./lib/crimson</home> 
+  </project>
+- <project name="jcert" defined-in="jcert" srcdir="./lib/jsse" tag="">
+  <description>jcert</description> 
+  <jar name="jcert.jar" /> 
+  <home>o:\desproto\ichannel/./lib/jsse</home> 
+  </project>
+- <project name="jdbc20-stdext" defined-in="jdbc20-stdext" srcdir="./lib/jdbc-ext" tag="">
+  <description>jdbc20-stdext</description> 
+  <jar name="jdbc2_0-stdext.jar" /> 
+  <home>o:\desproto\ichannel/./lib/jdbc-ext</home> 
+  </project>
+- <project name="jnet" defined-in="jnet" srcdir="./lib/jsse" tag="">
+  <description>jnet</description> 
+  <jar name="jnet.jar" /> 
+  <home>o:\desproto\ichannel/./lib/jsse</home> 
+  </project>
+- <project name="jsse" defined-in="jsse" srcdir="./lib/jsse" tag="">
+  <description>jsse</description> 
+  <jar name="jsse.jar" /> 
+  <home>o:\desproto\ichannel/./lib/jsse</home> 
+  </project>
+- <project name="junit" defined-in="junit" srcdir="./lib/junit" tag="">
+  <description>Junit</description> 
+  <jar name="junit.jar" /> 
+  <home>o:\desproto\ichannel/./lib/junit</home> 
+  </project>
+- <project name="log4j" defined-in="log4j" srcdir="./lib/log4j" tag="">
+  <description>log4j</description> 
+  <jar name="log4j-1.1.jar" /> 
+  <home>o:\desproto\ichannel/./lib/log4j</home> 
+  </project>
+- <project name="oracle-jdbc" defined-in="oracle-jdbc" srcdir="./lib/oracle" tag="">
+  <description>oracle-jdbc</description> 
+  <jar name="classes12.jar" /> 
+  <home>o:\desproto\ichannel/./lib/oracle</home> 
+  </project>
+- <project name="servlet" defined-in="servlet" srcdir="./lib/servlet" tag="">
+  <description>servlet</description> 
+  <jar name="servlet.jar" /> 
+  <home>o:\desproto\ichannel/./lib/servlet</home> 
+  </project>
+- <project name="turbine" defined-in="turbine" srcdir="./lib/turbine/turbine-2.2b1" tag="">
+  <description>Jakarta Turbine</description> 
+  <jar name="turbine-2.2b1.jar" /> 
+  <home>o:\desproto\ichannel/./lib/turbine/turbine-2.2b1</home> 
+  </project>
+- <project name="velocity" defined-in="velocity" srcdir="./lib/velocity" tag="">
+  <description>Jakarta Velocity</description> 
+  <jar name="velocity-1.2-dev.jar" /> 
+  <home>o:\desproto\ichannel/./lib/velocity</home> 
+  </project>
+- <project name="village" defined-in="village" srcdir="./lib/village" tag="">
+  <description>village</description> 
+  <jar name="village-1.5.1.jar" /> 
+  <home>o:\desproto\ichannel/./lib/village</home> 
+  </project>
+- <project name="xerces" defined-in="xerces" srcdir="./lib/xerces" tag="">
+  <description>xerces</description> 
+  <jar name="xerces.jar" /> 
+  <home>o:\desproto\ichannel/./lib/xerces</home> 
+  </project>
+- <project name="waf" defined-in="imediation-waf" srcdir="./projects/waf" tag="">
+  <description>Web Application Framework</description> 
+  <depend project="village" /> 
+  <depend project="turbine" /> 
+  <depend project="velocity" /> 
+  <depend project="servlet" /> 
+  <depend project="ecs" /> 
+  <depend project="activation" /> 
+  <depend project="jdbc20-stdext" /> 
+  <ant buildpath="build/build.xml" buildfile="build/build.xml" target="dist" /> 
+  <jar name="./target/dist/waf.jar" /> 
+  <home>o:\desproto\ichannel/./projects/waf</home> 
+  </project>
+  </workspace>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla3489.xsl b/test/tests/bugzilla/Bugzilla3489.xsl
new file mode 100644
index 0000000..a4bbf61
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3489.xsl
@@ -0,0 +1,297 @@
+<xsl:stylesheet version="1.0"
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	    xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
+		extension-element-prefixes="redirect">		
+<!-- Reproducing Bugzilla 3489 -->
+	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
+	<xsl:strip-space elements="*"/>
+	<xsl:param name="output-dir"/>
+	<xsl:template match="*|@*"/>
+	<xsl:template match="/workspace">
+		<xsl:apply-templates/>
+	</xsl:template>
+	
+	
+	<xsl:template match="/workspace/project">
+		<xsl:variable name="basedir" select="/workspace/@basedir"/>
+		<xsl:variable name="outputdir" select="/workspace/@outputdir"/>
+		<xsl:variable name="cvsdir">
+		  <xsl:value-of select="concat(/workspace/@cvsdir, '/')"/>
+		  <xsl:choose>
+		    <xsl:when test="cvs/@module">
+		      <xsl:value-of select="cvs/@module"/>
+		    </xsl:when>
+		    <xsl:otherwise>
+		      <xsl:value-of select="@srcdir"/>
+		    </xsl:otherwise>
+		  </xsl:choose>
+		</xsl:variable>
+		<xsl:message terminate="no">
+		  <xsl:value-of select="concat('Creating Gump buildfile for ', @name)"/>
+		</xsl:message>
+		
+		<redirect:write file="{$outputdir}/{@name}-gumpbuild.xml">
+			<project name="{@name} Gump build file" default="gumpify" basedir="{$basedir}/{@srcdir}">
+				
+				<!-- initialize time stamp and replace it in the html page -->
+				<target name="init">
+					<tstamp>
+						<format property="TIMESTAMP" pattern="HH:mm:ss"/>
+					</tstamp>
+					<replace file="{$outputdir}/status.xml" token="TAG-{@name}-TIME" value="${{TIMESTAMP}}"/>
+					<touch file="{$outputdir}/{@name}.FAILED"/>
+					
+					<!--style in="{$basedir}/status.xml" 
+						out="{$basedir}/{@name}.html"
+						destdir="{$basedir}"
+						style="{$basedir}/source-index-style.xsl">
+						<param name="filename" expression="{@name}.xml"/>
+					</style-->
+				</target>
+				
+				<!-- check for all dependencies -->
+				<target name="dependency-check">
+					<xsl:apply-templates select="depend" mode="dependency-check"/>
+				</target>
+				
+				<!-- generate the dependency failure targets -->
+				<xsl:apply-templates select="depend" mode="failed-dependency"/>
+				
+				<!-- generate the main target that does everything -->
+				<target name="gumpify" depends="init,dependency-check" unless="dependency-failure">
+					<available file="{$cvsdir}" property="cvsmodule.{@name}.present"/>
+					<echo message="In GUMP project: {@name}"/>
+					<xsl:if test="cvs">
+						<antcall target="cvscheckout"/>
+						<!--<antcall target="cvsupdate"/>-->
+						<copy todir="{$basedir}/{@srcdir}">
+							<fileset dir="{$cvsdir}"/>
+						</copy>
+					</xsl:if>
+					<replace file="{$outputdir}/status.xml" token="TAG-{@name}-CVS-TIME" value="${{TIMESTAMP}}"/>
+					<antcall target="build"/>
+					<antcall target="status-pages"/>
+					<move file="{$outputdir}/{@name}.FAILED" tofile="{$outputdir}/{@name}.SUCCESS"/>
+				</target>
+				
+				<xsl:apply-templates select="cvs">
+					<xsl:with-param name="target" select="'cvscheckout'"/>
+					<xsl:with-param name="command" select="'-z3 checkout -P'"/>
+				</xsl:apply-templates>
+				
+				<xsl:apply-templates select="cvs">
+					<xsl:with-param name="target" select="'cvsupdate'"/>
+					<xsl:with-param name="command" select="'-z3 update -P -d -A'"/>
+				</xsl:apply-templates>
+				
+				<!-- build targets -->
+				<target name="build" depends="init">
+					<xsl:apply-templates select="ant | script"/>
+				</target>
+				
+				<!-- called if the build went fine it sets the status to SUCCESS in the html file -->
+				<target name="status-pages">
+				<replace file="{$outputdir}/status.xml" token="TAG-{@name}-STATUS" value="SUCCESS"/>				
+				  <!-- <style in="" out="{/workspace/@basedir}/{@name}.html" style="" destdir="{/workspace/@basedir}"/> -->
+				</target>
+			</project>
+		</redirect:write>
+	</xsl:template>
+	
+	
+	<!-- ===========================================================================================
+		Execute a Ant build file/target as specified by the project
+		 =========================================================================================== -->
+	<xsl:template match="/workspace/project/ant">
+		<!-- Ant build file directory -->
+		<xsl:variable name="build.dir">
+			<xsl:value-of select="concat(/workspace/@basedir, '/', ../@srcdir)"/>
+			<xsl:if test="@basedir">
+				<xsl:value-of select="concat('/', @basedir)"/>
+			</xsl:if>
+		</xsl:variable>
+		
+		<!-- copy project files -->
+		<!--copy todir="{/workspace/@basedir}/{../@srcdir}">
+			<fileset dir="{/workspace/@viewdir}/{../@srcdir}"/>
+		</copy-->		
+		
+		<!-- execute the target needed to build the project -->
+		<java classname="org.apache.tools.ant.Main" fork="yes" failonerror="yes"
+			output="{/workspace/@outputdir}/{../@name}-buildresult.txt"
+			dir="{$build.dir}">
+			
+			<!-- transmit the worspace's properties -->
+			<xsl:for-each select="/workspace/property">
+				<arg value="-D{@name}={@value}"/>
+			</xsl:for-each>	
+					
+			<!-- a buildfile might be specified otherwise Ant will use its default -->
+			<xsl:if test="@buildfile">
+				<arg line="-buildfile {$build.dir}/{@buildfile}"/>
+			</xsl:if>
+			<arg line="-listener org.apache.tools.ant.XmlLogger -Dant.home={/workspace/@basedir}/dtools/ant -DXmlLogger.file={/workspace/@outputdir}/{../@name}-buildresult.xml"/>
+
+			<!-- specific target name to perform the build -->
+			<xsl:if test="@target">
+				<arg value="{@target}"/>
+			</xsl:if>
+			<xsl:apply-templates select="property"/>
+			
+			<!-- Do the classpath thing here -->
+			<classpath>
+				<xsl:for-each select="../depend | ../option">
+					<xsl:variable name="name" select="@project"/>
+					<xsl:for-each select="/workspace/project[@name=$name]/jar">
+						<pathelement location="{../home}/{@name}"/>
+					</xsl:for-each>
+				</xsl:for-each>
+				<pathelement path="${{java.class.path}}"/>
+			</classpath>
+		</java>
+	</xsl:template>
+	
+	
+	<!-- ===========================================================================================
+		Execute a script
+		 =========================================================================================== -->	
+	<xsl:template match="/workspace/project/script">
+		<xsl:variable name="script.dir" select="concat(/workspace/@basedir, '/', ../@srcdir)"/>
+		<xsl:variable name="script.sh" select="concat($script.dir, '/', ../@name, '.sh')"/>
+		<chmod perm="ugo+rx" file="{$script.sh}"/>
+		<exec dir="{$script.dir}" executable="{$script.sh}"
+			output="{/workspace/@outputdir}/{../@name}-buildresult.txt"/>
+	</xsl:template>
+	
+	
+	<!-- ===========================================================================================
+		CVS stuff, not sure what it is doing
+		 =========================================================================================== -->		
+	<xsl:template match="/workspace/project/cvs">
+		<xsl:param name="target"/>
+		<xsl:param name="command"/>
+		<xsl:variable name="repo" select="@repository"/>
+		<xsl:variable name="cvsmodule.present" select="concat('cvsmodule.', ../@name, '.present')"/>
+		<target name="{$target}">
+			<xsl:if test="$target='cvscheckout'">
+				<xsl:attribute name="unless">
+					<xsl:value-of select="$cvsmodule.present"/>
+				</xsl:attribute>
+			</xsl:if>
+			<xsl:if test="$target='cvsupdate'">
+				<xsl:attribute name="if">
+					<xsl:value-of select="$cvsmodule.present"/>
+				</xsl:attribute>
+			</xsl:if>
+			<replace file="{/workspace/@outputdir}/status.xml" token="TAG-{../@name}-CVS-TIME" value="${TIMESTAMP}"/>
+			<cvs command="{$command}" quiet="true">
+				<xsl:attribute name="cvsroot">
+					<xsl:value-of select="/workspace/cvs-repository/tree[@name=$repo]/@root"/>
+					<xsl:if test="@dir">
+						<xsl:value-of select="concat('/', @dir)"/>
+					</xsl:if>
+				</xsl:attribute>
+				<xsl:attribute name="dest">
+					<xsl:value-of select="/workspace/@cvsdir"/>
+				</xsl:attribute>
+				<xsl:attribute name="package">
+					<xsl:choose>
+						<xsl:when test="@module">
+							<xsl:value-of select="@module"/>
+						</xsl:when>
+						<xsl:otherwise>
+							<xsl:value-of select="../@name"/>
+						</xsl:otherwise>
+					</xsl:choose>
+				</xsl:attribute>
+				<xsl:if test="@tag">
+					<xsl:attribute name="tag">
+						<xsl:value-of select="@tag"/>
+					</xsl:attribute>
+				</xsl:if>
+				<xsl:attribute name="output">
+					<xsl:value-of select="concat(/workspace/@outputdir, '/', ../@name, '-cvsresult.txt')"/>
+				</xsl:attribute>
+			</cvs>
+			<replace file="{/workspace/@outputdir}/status.xml" token="TAG-{../@name}-CVS-STATUS" value="SUCCESS"/>
+		</target>
+	</xsl:template>
+	
+	
+	<!-- ===========================================================================================
+		Check for a dependency availability and immediately call its
+		dependency-check related target.
+		 =========================================================================================== -->	
+	<xsl:template match="/workspace/project/depend" mode="dependency-check">
+		<xsl:variable name="project" select="@project"/>
+		<xsl:variable name="dependfilename" select="concat(/workspace/@outputdir, '/', $project, '.SUCCESS')"/>
+		<available file="{$dependfilename}" property="dependency.{$project}.present"/>
+		<antcall target="{$project}-dependency"/>
+	</xsl:template>
+	
+	
+	<!-- ===========================================================================================
+		Target called only if the related property is not set (ie the dependency
+		is not verified) since it will fail and replace its tag status by a Prereq
+		information in the html index file.
+		 =========================================================================================== -->	
+	<xsl:template match="/workspace/project/depend" mode="failed-dependency">
+		<xsl:variable name="failed-project" select="@project"/>
+		<target name="{$failed-project}-dependency" unless="dependency.{$failed-project}.present">
+			<echo message="PREREQ Failure: Project depends on {$failed-project}"/>
+			<available file="{/workspace/@outputdir}/{../@name}.FAILED" property="dependency-failure"/>
+			<replace file="{/workspace/@outputdir}/status.xml" token="TAG-{../@name}-STATUS" value="Prereq Failure: {$failed-project}"/>
+			<fail message="PREREQ Failure: Dependency on {$failed-project} could not be satisfied."/>
+		</target>
+	</xsl:template>
+
+
+	<xsl:template match="/workspace/project/ant/property">
+		<arg>
+			<xsl:attribute name="value">
+				<xsl:text>-D</xsl:text>
+				<xsl:value-of select="@name"/>
+				<xsl:text>=</xsl:text>
+				<xsl:choose>
+					<xsl:when test="@value">
+						<xsl:value-of select="@value"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:if test="@reference and @project">
+			              <xsl:variable name="projname" select="@project"/>
+			              <xsl:variable name="refname" select="@reference"/>
+			              <xsl:choose>
+			                <xsl:when test="@id">
+			                  <xsl:variable name="propid" select="@id"/>
+			                  <xsl:value-of select="/workspace/project[@name=$projname]/*[name()=$refname and @id=$propid]"/>
+			                </xsl:when>
+			                <xsl:otherwise>
+			                  <xsl:value-of select="/workspace/project[@name=$name]/*[name()=$refname]"/>
+			                </xsl:otherwise>
+			              </xsl:choose>
+						</xsl:if>
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:attribute>
+		</arg>
+	</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla3514.xml b/test/tests/bugzilla/Bugzilla3514.xml
new file mode 100644
index 0000000..0f67c65
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3514.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<foo>
+    <x id="A1"> <z> 3</z></x>
+    <x id="A2"> <z>11</z></x>
+    <x id="A3"> <z>13</z></x>
+    <x id="A4"> <z> 7</z></x>
+    <x id="A5"> <z> 1</z></x>
+    <x id="A6"> <z> 5</z></x>
+    <x id="A7"> <z> 0</z></x>
+    <x id="A8"> <z>16</z></x>
+    <x id="A9"> <z>13</z></x>
+    <x id="A10"><z>11</z></x>
+    <x id="A11"><z> 3</z></x>
+    <x id="A12"><z> 6</z></x>
+    <x id="A13"><z> 2</z></x>
+    <x id="A14"><z> 7</z></x>
+    <x id="A15"><z> 1</z></x>
+    <x id="A16"><z>13</z></x>
+    <x id="A17"><z>10</z></x>
+    <x id="A18"><z> 2</z></x>
+    <x id="A19"><z>14</z></x>
+    <x id="A20"><z>11</z></x>
+    <x id="A21"><z> 3</z></x>
+    <x id="A22"><z>11</z></x>
+    <x id="A23"><z>13</z></x>
+    <x id="A24"><z> 7</z></x>
+    <x id="A25"><z> 1</z></x>
+    <x id="A26"><z> 5</z></x>
+    <x id="A27"><z> 0</z></x>
+    <x id="A28"><z>16</z></x>
+    <x id="A29"><z> 0</z></x>
+    <x id="A30"><z>11</z></x>
+    <x id="A31"><z> 9</z></x>
+    <x id="A32"><z> 3</z></x>
+    <x id="A33"><z> 4</z></x>
+    <x id="A34"><z> 7</z></x>
+    <x id="A35"><z> 1</z></x>
+    <x id="A36"><z> 8</z></x>
+    <x id="A37"><z>10</z></x>
+    <x id="A38"><z> 2</z></x>
+    <x id="A39"><z>17</z></x>
+    <x id="A40"><z>11</z></x>
+</foo>
diff --git a/test/tests/bugzilla/Bugzilla3514.xsl b/test/tests/bugzilla/Bugzilla3514.xsl
new file mode 100644
index 0000000..24e20e5
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla3514.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" ?> 
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- "computational (recursive) template is very slow compared to xalan 1.2.2" c.mallwitz@intershop.de -->
+  <xsl:template match="/">
+    <foo>
+    <xsl:call-template name="func1">
+      <xsl:with-param name="list" select="//x" /> 
+    </xsl:call-template>
+    </foo>
+  </xsl:template>
+
+  <xsl:template name="func1">
+    <xsl:param name="list" /> 
+    <xsl:choose>
+      <xsl:when test="$list">
+        <xsl:call-template name="func1">
+          <xsl:with-param name="list" select="$list[position()!=1]" /> 
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>0</xsl:otherwise> 
+    </xsl:choose>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla4056.xml b/test/tests/bugzilla/Bugzilla4056.xml
new file mode 100644
index 0000000..0192c96
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla4056.xml
@@ -0,0 +1,30 @@
+<NewsML><NewsEnvelope><DateAndTime/></NewsEnvelope><NewsItem Duid="NewsItem" xml:space="preserve"><Identification><NewsIdentifier><ProviderId>reuters.com</ProviderId><DateId>20011009</DateId><NewsItemId>nWEL37400</NewsItemId><RevisionId PreviousRevision="1" Update="U">2</RevisionId><PublicIdentifier>urn:newsml:reuters.com:20011009:nWEL37400</PublicIdentifier></NewsIdentifier></Identification><NewsManagement><NewsItemType FormalName="News"/><FirstCreated>20011009T120921-0700</FirstCreated><ThisRevisionCreated>20011009T120921-0700</ThisRevisionCreated><Status FormalName="Usable"/></NewsManagement><NewsComponent Essential="yes"><TopicSet FormalName="ReutersMetaData"><Topic Duid="providedby"><TopicType FormalName="providedby"/><Property FormalName="Code" Value="NDS"/></Topic><Topic Duid="companies"><TopicType FormalName="companies"/><Property FormalName="Code" Value=".NZ40"/><Property FormalName="Code" Value="FBU.NZ"/><Property FormalName="Code" Value="FFS.NZ"/><Property FormalName="Code" Value="TEL.NZ"/><Property FormalName="Code" Value="TRH.NZ"/></Topic><Topic Duid="nameditem"><TopicType FormalName="nameditem"/><Property FormalName="Code" Value="NZ/ADR"/></Topic><Topic Duid="topics"><TopicType FormalName="topics"/><Property FormalName="Code" Value="NZ"/><Property FormalName="Code" Value="ASIA"/><Property FormalName="Code" Value="STX"/><Property FormalName="Code" Value="US"/><Property FormalName="Code" Value="LEN"/><Property FormalName="Code" Value="RTRS"/></Topic><Topic Duid="products"><TopicType FormalName="products"/><Property FormalName="Code" Value="ND"/><Property FormalName="Code" Value="E"/><Property FormalName="Code" Value="RNP"/><Property FormalName="Code" Value="DNP"/><Property FormalName="Code" Value="PCO"/><Property FormalName="Code" Value="PCU"/></Topic><Topic Duid="headline_pes"><TopicType FormalName="headline_pes"/><Property FormalName="Code" Value="511 376 408 416 433 443 458"/></Topic><Topic Duid="story_pes"><TopicType FormalName="story_pes"/><Property FormalName="Code" Value="511 376 408 416 433 443 458"/></Topic></TopicSet><Role FormalName="main"/><NewsLines><HeadLine>NZx Morning Call-NZ ADRs flat, Telecom  <Origin Href="QuoteRef">TEL.NZ</Origin>  slips</HeadLine></NewsLines><AdministrativeMetadata><Source><Party FormalName="RTRS"/></Source></AdministrativeMetadata><DescriptiveMetadata><Language FormalName="EN"/></DescriptiveMetadata><ContentItem Duid="story1"><DataContent>
+<pre>    WELLINGTON, Oct 10 (Reuters) - Prices of 
+selected New Zealand 
+stocks listed in the United States, and the change from their 
+close on the previous New Zealand and U.S. trading days. 
+    All columns are shown converted to New Zealand shares and 
+currency except the first column which shows the ADR priced in 
+U.S. dollars: 
+                         ADR      -----------Converted-------- 
+                        Price     Price    Change vs    Volume 
+ Company:                USD       NZD     NZ close      (000) 
+ FCL Building <Origin Href="QuoteRef">FLB.N</Origin>     11.16      2.71      
+nil           30  
+ FCL Forests  <Origin Href="QuoteRef">FFS.N</Origin>      1.00      0.24      
+nil          115  
+ Telecom      <Origin Href="QuoteRef">NZT.N</Origin>     14.28      4.33       -
+4          125  
+ Tranz Rail  <Origin Href="QuoteRef">TNZR.O</Origin>      untraded 
+    NOTE- The above rates were at 8:00 a.m. (NZT) when the Dow 
+Jones Industrial Average  <Origin Href="QuoteRef">.DJI</Origin>  was down 23 
+points at 9,045. They 
+are based on a conversion rate of NZ$=$0.4124. 
+    On the New York Stock Exchange, Telecom American Depositary 
+Receipts are traded in bundles of eight ordinary shares, while 
+Fletcher Building and Forests shares are traded in bundles of 10. 
+    On the Nasdaq exchange, Tranz Rail ADSs are traded in bundles 
+of three ordinary shares. 
+    ((Wellington newsroom, tel +64 +4 471-4277, fax +64 +4 473 
+6212, wellington.newsroom@reuters.com)) 
+</pre></DataContent></ContentItem></NewsComponent></NewsItem></NewsML>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla4056.xsl b/test/tests/bugzilla/Bugzilla4056.xsl
new file mode 100644
index 0000000..44f483f
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla4056.xsl
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<!-- Bugzilla#4056 See also whitespace20.xsl for similar test of xml:space -->
+<!-- $RCSfile: Bugzilla4056.xsl,v $ $Revision$ $Date$ -->
+<xsl:stylesheet 
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
+ version="1.0"
+  xmlns:java="http://xml.apache.org/xslt/java"
+  exclude-result-prefixes="java">
+  <xsl:strip-space elements="*"/>
+
+  <xsl:template match="NewsML">
+	<xsl:apply-templates select="NewsItem"/>
+  </xsl:template>
+
+  <xsl:template match="NewsItem">
+    <EVENT xml:space="preserve">
+	  <xsl:attribute name="event-id"><xsl:value-of select="Identification/NewsIdentifier/PublicIdentifier"/>:<xsl:value-of select="Identification/NewsIdentifier/RevisionId"/></xsl:attribute>
+	  <DIR name="content">
+		<STRING name="headline">
+		  <xsl:choose>
+			<xsl:when test="string-length( NewsComponent/NewsLines/HeadLine )>0">
+			  <xsl:apply-templates select="NewsComponent/NewsLines/HeadLine/descendant-or-self::text()"/>
+		  </xsl:when>
+		  <xsl:otherwise>
+			<xsl:apply-templates select="NewsComponent/NewsLines/NewsLine[NewsLineType/@FormalName='alert'][1]/NewsLineText/descendant-or-self::text()"/>
+		  </xsl:otherwise>
+		</xsl:choose>
+		</STRING>
+		<STRING name="story">
+		  <xsl:apply-templates select="NewsComponent/ContentItem/DataContent/descendant-or-self::text()"/>
+		</STRING>
+	  </DIR>
+	  <DIR name="meta">
+		<xsl:apply-templates select="NewsComponent/TopicSet[@FormalName='ReutersMetaData']/Topic/Property[@FormalName='Code']" mode="meta"/>
+		
+		<STRING name="provider"><xsl:value-of select="Identification/NewsIdentifier/ProviderId"/></STRING>
+		<STRING name="any"><xsl:value-of select="Identification/NewsIdentifier/ProviderId"/></STRING>
+		
+		<xsl:variable name="attribution" select="NewsComponent/AdministrativeMetadata/Source/Party/@FormalName"/>
+		<xsl:if test="$attribution">
+		  <STRING name="attribution"><xsl:value-of select="$attribution"/></STRING>
+		  <STRING name="any"><xsl:value-of select="$attribution"/></STRING>
+		</xsl:if>
+
+		<xsl:variable name="language" select="NewsComponent/DescriptiveMetadata/Language[1]/@FormalName"/>
+		<xsl:if test="$language">
+		  <STRING name="language"><xsl:value-of select="$language"/></STRING>
+		  <STRING name="any"><xsl:value-of select="$language"/></STRING>
+		</xsl:if>
+	  </DIR>
+	  <DIR name="teasers">
+		<STRING name="teaser0"/>
+		<STRING name="teaser1"/>
+		<STRING name="teaser2"/>
+		<STRING name="teaser3"/>
+		<STRING name="teaser4"/>
+	  </DIR>
+	</EVENT>
+  </xsl:template>
+
+  <xsl:template match="Property" mode="meta">
+	<STRING name="{../TopicType/@FormalName}"><xsl:value-of select="@Value"/></STRING>
+	<STRING name="any"><xsl:value-of select="@Value"/></STRING>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla4218.xsl b/test/tests/bugzilla/Bugzilla4218.xsl
new file mode 100644
index 0000000..4c53acc
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla4218.xsl
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- Reproduce Bugzilla#4218, apply this to identity.xml or any file -->  
+<!--
+The following stylesheet puts out <out>abcabc</out>, which is absolutely
+incorrect.  If you uncomment the commented value-of and variable, it results
+"Variable accessed before it is bound!" error message.  The bug seems to be
+related to the inner call-template... it looks like something in the stack
+frame is not being restored???
+-->
+<xsl:template match="/">
+    <out>
+      <xsl:variable name="v1" select="'abc-should-appear-once'"/>
+      <xsl:variable name="v2" select="'def-should-appear-once'"/>
+     
+      <xsl:variable name="v3" select="'ghi-should-appear-once'"/>
+     
+      <xsl:call-template name="test-template">
+        <xsl:with-param name="p1">
+          <xsl:call-template name="xyz-template">
+            <xsl:with-param name="p1" select="$v1"/>
+          </xsl:call-template>
+          <xsl:value-of select="$v2"/>
+          <!-- Comment this in, to get error message: 
+               Variable accessed before it is bound! 
+               See Bugzilla4218a.xsl -->
+          <!-- xsl:value-of select="$v3"/ -->
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="test-template">
+    <xsl:param name="p1" select="'error'"/>
+    <test-template><xsl:value-of select="$p1"/></test-template>
+  </xsl:template>
+ 
+  <xsl:template name="xyz-template">
+    <xsl:param name="p1" select="'error'"/>
+    <xyz-template><xsl:value-of select="$p1"/></xyz-template>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla4218a.xsl b/test/tests/bugzilla/Bugzilla4218a.xsl
new file mode 100644
index 0000000..2663ef9
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla4218a.xsl
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- Reproduce Bugzilla#4218, apply this to identity.xml or any file -->  
+<!--
+The following stylesheet puts out <out>abcabc</out>, which is absolutely
+incorrect.  If you uncomment the commented value-of and variable, it results
+"Variable accessed before it is bound!" error message.  The bug seems to be
+related to the inner call-template... it looks like something in the stack
+frame is not being restored???
+-->
+<xsl:template match="/">
+    <out>
+      <xsl:variable name="v1" select="'abc-should-appear-once'"/>
+      <xsl:variable name="v2" select="'def-should-appear-once'"/>
+     
+      <!-- Comment this in, along with the value-of below,
+           to get error message: Variable accessed before it is bound! 
+           See Bugzilla4218.xsl -->
+      <xsl:variable name="v3" select="'ghi-should-appear-once'"/>
+     
+      <xsl:call-template name="test-template">
+        <xsl:with-param name="p1">
+          <xsl:call-template name="xyz-template">
+            <xsl:with-param name="p1" select="$v1"/>
+          </xsl:call-template>
+          <xsl:value-of select="$v2"/>
+          <!-- Comment this in along with the v3 variable above to
+               get error message! See Bugzilla4218.xsl -->
+          <xsl:value-of select="$v3"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="test-template">
+    <xsl:param name="p1" select="'error'"/>
+    <test-template><xsl:value-of select="$p1"/></test-template>
+  </xsl:template>
+ 
+  <xsl:template name="xyz-template">
+    <xsl:param name="p1" select="'error'"/>
+    <xyz-template><xsl:value-of select="$p1"/></xyz-template>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla4286.java b/test/tests/bugzilla/Bugzilla4286.java
new file mode 100644
index 0000000..d449550
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla4286.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+import javax.xml.transform.*;
+import javax.xml.transform.stream.*;
+import java.io.File;
+import java.io.StringWriter;
+
+/**
+ * For not well formed XML document, the Transformer hangs(May be due to threading issues)
+ * @author manoranjan_das@hotmail.com
+ * @author shane_curcuru@lotus.com
+ */
+public class Bugzilla4286 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla4286"; }
+
+    /**
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#4286 For not well formed XML document, the Transformer hangs");
+        logger.logMsg(Logger.CRITICALMSG, "WARNING! THIS TEST MAY HANG! (i.e. don't run in automation)");
+        try
+        {
+            TransformerFactory transformerFactory = TransformerFactory.newInstance();
+            Transformer transformer = transformerFactory.newTransformer(new StreamSource("identity.xsl"));
+            StringWriter stringWriter = new StringWriter();
+            logger.logMsg(Logger.STATUSMSG, "About to transform error.xml into StringWriter");
+            transformer.transform(new StreamSource(new File("error.xml")), 
+                                  new StreamResult(stringWriter));
+            logger.checkPass("Transform completed and returned (crash test)");
+            logger.logMsg(Logger.STATUSMSG, "To-do: validate output!");
+            logger.logMsg(Logger.STATUSMSG, "StringWriter is: " + stringWriter.toString());
+        }
+        catch (TransformerException te)
+        {
+            // Since the XML is invalid, we should get a TransformerException
+            logger.logThrowable(Logger.ERRORMSG, te, "Transform threw expected");
+            logger.checkPass("Transform threw expected: " + te.toString());
+        }
+        catch (Exception e)
+        {
+            logger.logThrowable(Logger.ERRORMSG, e, "Transform threw non-expected");
+            logger.checkFail("Transform threw non-expected: " + e.toString());
+        }
+        logger.logMsg(Logger.CRITICALMSG, "Bug occours now: system hangs");
+	}
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4286">
+     * Link to Bugzilla report</a>
+     * @return For not well formed XML document, the Transformer hangs.
+     */
+    public String getDescription()
+    {
+        return "#4286 For not well formed XML document, the Transformer hangs";
+    }
+
+}  // end of class Bugzilla4286
diff --git a/test/tests/bugzilla/Bugzilla4336.java b/test/tests/bugzilla/Bugzilla4336.java
new file mode 100644
index 0000000..90a2214
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla4336.java
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+// REPLACE_imports needed for reproducing the bug
+import java.io.*;
+import org.w3c.dom.*;
+import javax.xml.parsers.*;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+import org.xml.sax.SAXException;
+import org.apache.xpath.XPathAPI;
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ *
+ * @author geuer-pollmann@nue.et-inf.uni-siegen.de
+ */
+public class Bugzilla4336 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla4336"; }
+
+    static final String _nodeSetInput1 = "<?xml version=\"1.0\"?>\n"
+                                        + "<!DOCTYPE doc [\n"
+                                        + "<!ELEMENT doc (n+)>\n"
+                                        + "<!ELEMENT n (#PCDATA)>\n" + "]>\n"
+                                        + "<!-- full document with decl -->"
+                                        + "<doc><n>1</n></doc>";
+
+    static final String _xpath = "(.//. | .//@* | .//namespace::*)";
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#4336: Xalan 2.2.D11 adds a strange Attribute");
+
+        // Comment out ref to Xerces 1.x class for upcoming Xerces 2.x checkin
+        // When running via 'build bugzilla.classes bugzilla', the Xerces 
+        //  version will already be reported by the test harness
+        // logger.logMsg(Logger.STATUSMSG, "Apache Xerces "
+        //              + org.apache.xerces.framework.Version.fVersion);
+        logger.logMsg(Logger.STATUSMSG, "Apache Xalan  "
+                      + org.apache.xalan.Version.getVersion());
+        try
+        {
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+
+            dfactory.setValidating(false);
+            dfactory.setNamespaceAware(true);
+
+            DocumentBuilder db = dfactory.newDocumentBuilder();
+            Document document =
+            db.parse(new ByteArrayInputStream(_nodeSetInput1.getBytes()));
+            NodeList nl = XPathAPI.selectNodeList(document, _xpath);
+
+            for (int i = 0; i < nl.getLength(); i++) 
+            {
+                logger.logMsg(Logger.STATUSMSG, i + " " 
+                              + getNodeTypeString(nl.item(i)) + " " + nl.item(i));
+
+                if (nl.item(i).getNodeType() == Node.ATTRIBUTE_NODE) 
+                {
+                    Attr a = (Attr) nl.item(i);
+
+                    logger.logMsg(Logger.STATUSMSG, i + " " + a.getNodeName() + " "
+                                       + a.getNodeValue());
+                    logger.logMsg(Logger.STATUSMSG, i + " specified " + a.getSpecified());
+                    logger.logMsg(Logger.STATUSMSG, i + " owner document: " + a.getOwnerDocument());
+                }
+            }
+        } 
+        catch (Throwable t)
+        {
+            logger.logThrowable(Logger.ERRORMSG, t, "Iterating document");
+            logger.checkFail("Iterating document threw: " + t.toString());
+        }
+   	}
+
+    static String[] nodeTypeString = new String[]{ "", "ELEMENT", "ATTRIBUTE",
+                                      "TEXT_NODE", "CDATA_SECTION",
+                                      "ENTITY_REFERENCE", "ENTITY",
+                                      "PROCESSING_INSTRUCTION",
+                                      "COMMENT", "DOCUMENT",
+                                      "DOCUMENT_TYPE",
+                                      "DOCUMENT_FRAGMENT",
+                                      "NOTATION" };
+
+    public static String getNodeTypeString(short nodeType) 
+    {
+        if ((nodeType > 0) && (nodeType < 13)) 
+        {
+            return nodeTypeString[nodeType];
+        } else 
+        {
+            return "";
+        }
+    }
+
+    public static String getNodeTypeString(Node n) 
+    {
+        return getNodeTypeString(n.getNodeType());
+    }
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4336">
+     * Link to Bugzilla report</a>
+     * @return Xalan 2.2.D11 adds a strange Attribute.
+     */
+    public String getDescription()
+    {
+        return "Xalan 2.2.D11 adds a strange Attribute";
+    }
+
+}  // end of class Bugzilla4336
+
diff --git a/test/tests/bugzilla/Bugzilla5609.gold b/test/tests/bugzilla/Bugzilla5609.gold
new file mode 100644
index 0000000..2669330
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla5609.gold
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+<body>Hello 9115 World</body>
+</html>
diff --git a/test/tests/bugzilla/Bugzilla5609.java b/test/tests/bugzilla/Bugzilla5609.java
new file mode 100644
index 0000000..b17ad26
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla5609.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+// REPLACE_imports needed for reproducing the bug
+import org.apache.qetest.CheckService;
+import org.apache.qetest.xsl.XHTFileCheckService;
+
+import javax.xml.transform.*;
+import javax.xml.transform.stream.*;
+import java.io.File;
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ * @author howejr77@yahoo.com
+ * @author shane_curcuru@us.ibm.com
+ */
+public class Bugzilla5609 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla5609"; }
+
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     * Many Bugzilla tests won't bother with a datalet; they'll 
+     * just have the data to reproduce the bug encoded by default.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#5609: Global Variable Initialization across Multiple Transformations");
+        CheckService fileChecker = new XHTFileCheckService();
+        try
+        {
+            // Reproduce bug as-is: re-using transformer with global variable decl uses wrong value
+            TransformerFactory factory = TransformerFactory.newInstance();
+            logger.logMsg(Logger.STATUSMSG, "About to newTransformer(Bugzilla5609.xsl)");
+            Transformer transformer = factory.newTransformer(new StreamSource(new File("Bugzilla5609.xsl")));
+            logger.logMsg(Logger.STATUSMSG, "About to transform#1 Bugzilla5609.xml into .out");
+            transformer.transform(new StreamSource(new File("Bugzilla5609.xml")), 
+                                  new StreamResult(new File("Bugzilla5609.out")));
+            fileChecker.check(logger, 
+                    new File("Bugzilla5609.out"), 
+                    new File("Bugzilla5609.gold"), 
+                    "transform#1 into Bugzilla5609.out");
+
+
+            logger.logMsg(Logger.STATUSMSG, "About to transform#2 ParamBugzilla5609a.xml into .out");
+            transformer.transform(new StreamSource(new File("Bugzilla5609a.xml")), 
+                                  new StreamResult(new File("Bugzilla5609a.out")));
+            fileChecker.check(logger, 
+                    new File("Bugzilla5609a.out"), 
+                    new File("Bugzilla5609a.gold"), 
+                    "transform#2 into Bugzilla5609a.out; but is wrong var num is used");
+            
+        } 
+        catch (Throwable t)
+        {
+            logger.logThrowable(Logger.WARNINGMSG, t, "Bugzilla#5609 threw");
+            logger.checkErr("Bugzilla#5609 threw " + t.toString());
+        }
+
+        try
+        {
+            // Reproduce bug when getting single transformer from templates
+            TransformerFactory factory = TransformerFactory.newInstance();
+            logger.logMsg(Logger.STATUSMSG, "About to newTemplates(Bugzilla5609.xsl)");
+            Templates templates = factory.newTemplates(new StreamSource(new File("Bugzilla5609.xsl")));
+            logger.logMsg(Logger.STATUSMSG, "About to Templates.newTransformer()");
+            Transformer transformer = templates.newTransformer();
+            logger.logMsg(Logger.STATUSMSG, "About to transform#1 Bugzilla5609.xml into .out");
+            transformer.transform(new StreamSource(new File("Bugzilla5609.xml")), 
+                                  new StreamResult(new File("Bugzilla5609.out")));
+            fileChecker.check(logger, 
+                    new File("Bugzilla5609.out"), 
+                    new File("Bugzilla5609.gold"), 
+                    "transform#1 into Bugzilla5609.out");
+
+
+            logger.logMsg(Logger.STATUSMSG, "About to transform#2 Bugzilla5609a.xml into .out");
+            transformer.transform(new StreamSource(new File("Bugzilla5609a.xml")), 
+                                  new StreamResult(new File("Bugzilla5609a.out")));
+            fileChecker.check(logger, 
+                    new File("Bugzilla5609a.out"), 
+                    new File("Bugzilla5609a.gold"), 
+                    "transform#2 into Bugzilla5609a.out; but is wrong var num is used");
+            
+        } 
+        catch (Throwable t)
+        {
+            logger.logThrowable(Logger.WARNINGMSG, t, "Bugzilla#5609 threw");
+            logger.checkErr("Bugzilla#5609 threw " + t.toString());
+        }
+	}
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5609">
+     * Link to Bugzilla report</a>
+     * @return Global Variable Initialization across Multiple Transformations.
+     */
+    public String getDescription()
+    {
+        return "Global Variable Initialization across Multiple Transformations";
+    }
+
+}  // end of class Bugzilla5609
+
diff --git a/test/tests/bugzilla/Bugzilla5609.xml b/test/tests/bugzilla/Bugzilla5609.xml
new file mode 100644
index 0000000..2019421
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla5609.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Adjustments>
+  <PageData>
+    <HiddenForm>
+      <Region>9115</Region>
+    </HiddenForm>
+  </PageData>
+</Adjustments>
diff --git a/test/tests/bugzilla/Bugzilla5609.xsl b/test/tests/bugzilla/Bugzilla5609.xsl
new file mode 100644
index 0000000..8f3499a
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla5609.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+	
+  <xsl:variable name="regionNumber" select="/Adjustments/PageData/HiddenForm/Region"/>
+	
+  <xsl:template match="/">
+    <html>
+      <body>Hello <xsl:value-of select="$regionNumber"/> World</body>
+    </html>
+  </xsl:template>
+	
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla5609a.xml b/test/tests/bugzilla/Bugzilla5609a.xml
new file mode 100644
index 0000000..caaecc1
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla5609a.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Adjustments>
+  <PageData>
+    <HiddenForm>
+      <Region>9111</Region>
+    </HiddenForm>
+  </PageData>
+</Adjustments>
+
diff --git a/test/tests/bugzilla/Bugzilla6181.java b/test/tests/bugzilla/Bugzilla6181.java
new file mode 100644
index 0000000..957911a
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6181.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Properties;
+
+import javax.xml.transform.*;
+import javax.xml.transform.stream.*;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.traversal.NodeIterator;
+
+import org.apache.xalan.extensions.XSLProcessorContext;
+import org.apache.xalan.templates.ElemExtensionCall;
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ * @author jwalters@computer.org
+ * @author shane_curcuru@us.ibm.com
+ */
+public class Bugzilla6181 extends TestletImpl
+{
+
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla6181"; }
+    
+    /** Cheap-o validation for extension call */
+    static int extCounter = 0;
+
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     * Many Bugzilla tests won't bother with a datalet; they'll 
+     * just have the data to reproduce the bug encoded by default.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#6181");
+
+        logger.logMsg(logger.STATUSMSG, "extCounter(before) = " + extCounter);    
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+
+            // Simply transform our stylesheet..
+            Transformer transformer = factory.newTransformer(new StreamSource("Bugzilla6181.xsl"));
+            transformer.transform(new StreamSource("Bugzilla6181.xml"), 
+                    new StreamResult("Bugzilla6181.output"));
+            logger.checkPass("Crash test: produced unvalidated output into: Bugzilla6181.output");
+        } 
+        catch (Throwable t)
+        {
+            logger.logThrowable(logger.ERRORMSG, t, "Unexpected exception");
+            logger.checkErr("Unexpected exception: " + t.toString());
+        }
+        // Then see how many times we've been called    
+        logger.logMsg(logger.STATUSMSG, "extCounter(after) = " + extCounter);    
+        
+	}
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6181">
+     * Link to Bugzilla report</a>
+     * @return Problems with value-of and extension function.
+     */
+    public String getDescription()
+    {
+        return "Problems with value-of and extension function";
+    }
+
+  private String makeString( NodeIterator it ) {
+    String source = null;
+    StringBuffer sourceBuf = new StringBuffer();
+	Node n;
+	while((n = it.nextNode()) != null) {
+      sourceBuf.append( n.getNodeValue() );
+    }
+    return sourceBuf.toString();
+  }
+
+  //  initcap
+  //  Handles function nn:initcap(<XPath-Expr>)
+  //
+  public String initcap( NodeIterator it ) {
+    String source = makeString( it );
+    extCounter++;
+    logger.logMsg(logger.INFOMSG, "initcap(ni) called with: " + source);
+    //  Now do the initcap thing and return it...
+    if( source.length() > 1 ) {
+      return source.substring(0,1).toUpperCase() + source.substring( 1 );
+    }
+    return "";
+  }
+
+  private String makeString( DocumentFragment fragment ) {
+      NodeList nodes = fragment.getChildNodes();
+      StringBuffer sourceBuf = new StringBuffer();
+      for( int i = 0; i < nodes.getLength(); ++i ) {
+        String s = nodes.item(i).getNodeValue();
+        if( s != null ) sourceBuf.append( s );
+      }
+      return sourceBuf.toString();
+  }
+
+  //  initcap
+  //  Handles function nn:initcap(<XPath-Expr>)
+  //
+  public String initcap( DocumentFragment fragment ) {
+    try {
+      String source = makeString( fragment );
+      extCounter++;
+      logger.logMsg(logger.INFOMSG, "initcap(f) called with: " + source);
+      //  Now do the initcap thing and return it...
+      if( source.length() > 1 ) {
+        return source.substring(0,1).toUpperCase() + source.substring( 1 );
+      }
+    } catch( Exception e ) {
+      e.printStackTrace();
+    }
+    return "";
+  }
+
+}
diff --git a/test/tests/bugzilla/Bugzilla6181.xml b/test/tests/bugzilla/Bugzilla6181.xml
new file mode 100644
index 0000000..d94de5c
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6181.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- jwalters@computer.org (Jay Walters) -->
+<!-- Note: bug did not have .dtd attached; skipping
+    <!DOCTYPE application SYSTEM "intermediate.dtd">
+-->
+<application name="cart" package="com.netnumina.cart">
+    <component datasource="cartDs" name="cart" package="com.netnumina.cart">
+        <dependent id="xmi.9" name="Address" plural="Addresses" smart-type="Object">
+            <description/>
+            <fields>
+                <field fkey="true" idref="xmi.2" name="orderId" type="int"/>
+                <field key="1" name="addressId" type="int"/>
+                <field name="street_1" type="String"/>
+                <field name="street_2" type="String"/>
+                <field name="postalCode" type="String"/>
+                <field descr="6" list="2" name="city" type="String"/>
+                <field descr="7" list="3" name="state" type="String"/>
+            </fields>
+            <associations>
+                <parent idref="xmi.2" name="undefined">
+                    <fields>
+                        <field key="1" name="orderId" type="int"/>
+                    </fields>
+                </parent>
+            </associations>
+        </dependent>
+        <entity id="xmi.2" name="Order" plural="Orders" type="bmp">
+            <description/>
+            <fields>
+                <field descr="1" key="1" list="1" name="orderId" type="int"/>
+                <field descr="2" list="2" name="orderDate" type="Date"/>
+            </fields>
+            <constructors/>
+            <methods/>
+            <associations>
+                <child idref="xmi.9" name="shipTo" smart-type="Object">
+                    <fields>
+                        <field key="1" name="orderId" type="int"/>
+                    </fields>
+                </child>
+            </associations>
+        </entity>
+    </component>
+</application>
diff --git a/test/tests/bugzilla/Bugzilla6181.xsl b/test/tests/bugzilla/Bugzilla6181.xsl
new file mode 100644
index 0000000..14a29ef
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6181.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+  - Title:   action.xsl
+  - Purpose: An XSL stylesheet for processing an intermediate XML file
+  -          and generating the action classes required for our simple UI
+  -          for each entity in the file.
+  -
+  - $Revision$
+  - $Date$
+  - $Author$
+  -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+		xmlns:lxslt="http://xml.apache.org/xslt"
+		xmlns:ns="Bugzilla6181"
+		extension-element-prefixes="ns"
+                version="1.0"
+                exclude-result-prefixes="#default">
+<xsl:output method="text" indent="no"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates select="//component/dependent"/>
+</xsl:template>
+
+<xsl:template match="dependent">
+	<xsl:variable name="parentName" select="id(associations/parent/@idref)/@name"/>
+	<xsl:variable name="parentName2">
+      <xsl:value-of select="id(associations/parent/@idref)/@name"/>
+    </xsl:variable>
+
+	<xsl:value-of select="$parentName"/>EditForm parentForm = (<xsl:value-of select="$parentName"/>EditForm) session.getAttribute( "<xsl:value-of select='ns:initcap($parentName)'/>EditForm" );
+
+  	    <xsl:value-of select="$parentName2"/>Proxy sessionProxy = new <xsl:value-of select="ns:initcap($parentName2)"/>Proxy();
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla6312.java b/test/tests/bugzilla/Bugzilla6312.java
new file mode 100644
index 0000000..feb2908
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6312.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TemplatesHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ *
+ * @author dims@yahoo.com 
+ * @author shane_curcuru@us.ibm.com
+ */
+public class Bugzilla6312 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla6312"; }
+
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     * Many Bugzilla tests won't bother with a datalet; they'll 
+     * just have the data to reproduce the bug encoded by default.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#6312");
+
+        // Set the TransformerFactory system property to generate and use a translet.
+        // Note: To make this sample more flexible, load properties from a properties file.    
+        // The setting for the Xalan Transformer is "org.apache.xalan.processor.TransformerFactoryImpl"
+        String key = "javax.xml.transform.TransformerFactory";
+        String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl";
+        Properties props = System.getProperties();
+        props.put(key, value);
+        System.setProperties(props);    
+
+        String xslInURI = "Bugzilla6312.xsl";
+        String xmlInURI = "Bugzilla6312.xml";
+        String htmlOutURI = "Bugzilla6312.output";
+        try
+        {
+            // Instantiate the TransformerFactory, and use it along with a SteamSource
+            // XSL stylesheet to create a Transformer.
+            SAXTransformerFactory tFactory = (SAXTransformerFactory)TransformerFactory.newInstance();
+
+            //Transformer transformer = tFactory.newTransformer(new StreamSource(xslInURI));
+            TemplatesHandler templatesHandler = tFactory.newTemplatesHandler();
+            SAXParserFactory sFactory = SAXParserFactory.newInstance();
+            sFactory.setNamespaceAware(true);
+            XMLReader reader = sFactory.newSAXParser().getXMLReader();
+            reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
+            reader.setContentHandler(templatesHandler);
+            reader.parse(new InputSource(xslInURI));
+
+            // Perform the transformation from a StreamSource to a StreamResult;
+            templatesHandler.getTemplates().newTransformer().transform(new StreamSource(xmlInURI),
+                                new StreamResult(new FileOutputStream(htmlOutURI)));  
+
+            logger.logMsg(logger.STATUSMSG, "Successfully created " + htmlOutURI);
+            logger.checkPass("Crash test: didn't throw exception (note: output file contents not validated");
+        } 
+        catch (Throwable t)
+        {
+            logger.logThrowable(logger.ERRORMSG, t, "Unexpected exception");
+            logger.checkErr("Unexpected exception: " + t.toString());
+        }
+        
+	}
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6312">
+     * Link to Bugzilla report</a>
+     * @return Problems with using JAXPTransletOneTransformation if we use XMLReader/TemplatesHandler.
+     */
+    public String getDescription()
+    {
+        return "Problems with using JAXPTransletOneTransformation if we use XMLReader/TemplatesHandler";
+    }
+
+}  // end of class Bugzilla6312
+
diff --git a/test/tests/bugzilla/Bugzilla6312.xml b/test/tests/bugzilla/Bugzilla6312.xml
new file mode 100644
index 0000000..7448f93
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6312.xml
@@ -0,0 +1,176 @@
+<?xml version="1.0"?>
+
+<todo title="Things To Do" project="XSLTC" major-version="1">
+
+  <devs>
+   <person name="Jacek Ambroziak" email="jacek_ambroziak@yahoo.com" id="JA" expertise="code">
+     Inventor, architect, former lead developer and evangelist.
+   </person>  
+   <person name="Tom Amiro" email="Tom.Amiro@Sun.COM" id="TA" expertise="testing">
+     Testing.
+   </person>  
+   <person name="Morten J&#216;rgensen" email="morten@xml.apache.org" id="MJ" expertise="code, doc">
+     Lead developer - key contributor on design documentation, ID/Keys, performance, JAXP, and continuing development in general.
+   </person>
+   <person name="G. Todd Miller" email="Glenn.Miller@Sun.COM" id="TM" expertise="code">
+     Developer - key contributor on TrAX.
+   </person>
+   <person name="Santiago Pericas-Geertsen" email="santiago@cs.bu.edu" id="SP" expertise="code">
+     Developer - key contributor on compilation strategy.
+   </person>
+  </devs>
+ 
+  <actions>
+
+   <target-release-description>
+    <date>09/??/01</date>
+    <level>????</level>
+    <goal type="conformance">XSLT 1.0 compliant 100%.</goal>
+    <goal type="performance">Maintain current level.</goal>
+    <goal type="stability"> Stable, reasonable.</goal>
+    <goal type="api">API Complete.</goal>
+    <goal type="documentation">Documentation functionally complete.</goal>
+   </target-release-description>
+   
+  <action context="test, packages:org.apache.xalan.xsltc"
+          category="tests"
+          who="TA, Shane"
+          priority="high">
+     Modify Xalan test enviroment to test XSLTC as a component of XalanJ2.
+   </action>       
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="feature"
+          who="MJ"
+          priority="high">
+       Finish the implementation of id() and key() in patterns.   
+   </action>       
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="bug"
+          who="??"
+          priority="high">
+      Continue to improve the handling of name spaces. There are a number of
+      bugs that are independent of the lack of namespace nodes.  
+     (bugzilla 1411, 1506, 1518, 2582, 2801, 2857, 2859, 2863, 2535, 2954, 2840)    
+   </action>       
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="bug"
+          who="??"
+          priority="high">
+    Fix bugs that impact the XSLTMark performance benchmark.
+    (bugzilla 1376, 1498, 1512, 1532, 2351, 2517, 2553, 3065, 3066).          
+   </action>
+        
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="bugs"
+          who="TM"
+          priority="high">
+       Fix bugs reflecting positional problems (1410, 1532, 2939).          
+   </action>
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="bug"
+          who="TM"
+          priority="high">
+      Fix bugs on dealing with XPATH/Axes expressions (1498, 2551, 2553, 2572, 2932).          
+   </action>       
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="bug"
+          who="??"
+          priority="medium">
+      Fix bugs involving template selection (1397, 2749, 2582, 2585, 2695, 2749, 2754, 2886, 2937).
+   </action>
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="bug"
+          who="??"
+          priority="medium">
+      Fix bugs affecting numbering (2901, 2931).
+   </action>
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="bug"
+          who="??"
+          priority="medium">
+      Fix bugs affecting comment and processing-intruction nodes (2599, 2834, 2858).
+   </action>
+
+  <action context="code, packages:org.apache.xalan.xsltc"
+          category="feature"
+          who="MJ"
+          priority="low">
+     Implement name space nodes (bugzilla 1379).
+   </action>       
+
+  <action context="code, packages:????"
+          category="feature, integration with Xalan"
+          who="??"
+          priority="medium">
+      Implement an extension to support the redirection of output to multiple
+      output files from within a stylesheet (equivalent to xalan:redirect or
+      saxon:output).  Note: Task may be implemented as a result of integrating Xsltc and Xalan 
+     and using shared code.
+   </action>       
+
+
+  <action context="code, packages:????"
+          category="feature, integration with Xalan"
+          who="??"
+          priority="medium">
+     Implement a node-set extension to convert result tree fragments to
+     node-sets. This enables sorting and grouping of nodes assigned to a tree 
+     variable. Note: Task may be implemented as a result of integrating Xsltc and Xalan 
+     and using shared code.
+   </action>       
+
+
+  <action context="code, packages:????"
+          category="feature, integration with Xalan"
+          who="??"
+          priority="medium">
+      Add support for nonstatic external Java functions.  
+      Note: Task may be implemented as a result of integrating Xsltc and Xalan 
+      and using shared code.
+   </action>       
+
+
+  <action context="code, packages:????"
+          category="feature, integration with Xalan"
+          who="??"
+          priority="medium">
+    Fix bugs affecting the correctness of ouput 
+    (1439, 1504, 1512, 1516, 1520, 1525, 2517, 2520, 2578, 2948, 2951, 2952, 2954, 3005, 3065).
+     Note: Task may be implemented as a result of integrating Xsltc and Xalan 
+     and using shared code.
+   </action>       
+
+  <action context="code, AST"
+          category="architecture"
+          who="??"
+          priority="medium">
+    Use SAX to build the AST. The DOM builder
+   (the real DOM builder, not our quasi-DOM builder) receives SAX
+   events when it builds the DOM. The compiler.Parser class could
+   possible receive these SAX events directly, and thereby eliminating
+   the need for a DOM (saves loads of time and memory).
+   </action>
+   
+   <action context="code, DOM"
+           category="architecture"
+           who="??"
+           priority="medium">
+      Consider building a DOM-2-'DOM' converter, perhaps by adding 
+      a second DOM builder inner class to our DOM. Then we would have 
+      one SAX DOM builder and one DOM DOM builder. I don't know if
+      JAXP lets you supply the stylesheet as a DOM. If it doesn't, 
+      we should assign this task a very low priority. There is no
+      point in spending a lot of time on this if JAXP users will 
+      never be able to use this functionality.
+    </action>       
+
+  </actions>
+</todo>
diff --git a/test/tests/bugzilla/Bugzilla6312.xsl b/test/tests/bugzilla/Bugzilla6312.xsl
new file mode 100644
index 0000000..7151750
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6312.xsl
@@ -0,0 +1,165 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:variable name="title" select="concat(todo/@project, ' ', todo/@major-version)"/>
+  <xsl:template match="/">
+    <HTML>
+      <HEAD>
+         <TITLE><xsl:value-of select="$title"/></TITLE>
+      </HEAD>
+      <BODY>
+
+        <H2><xsl:value-of select="concat($title, ': ', todo/@title)"/></H2>
+        <p><font size="-1">See a 
+          <xsl:element name="a">
+            <xsl:attribute name="href">#developer-list</xsl:attribute>
+            <xsl:text>list of developers/initials.</xsl:text>
+          </xsl:element>
+        </font></p>
+        <font size="-1"><p>Planned releases: 
+            <BR/><xsl:for-each select="todo/actions/target-release-description">
+              <xsl:element name="a">
+                <xsl:attribute name="href">#release-date-<xsl:value-of select="date"/></xsl:attribute>
+                <xsl:value-of select="date"/>
+              </xsl:element><xsl:text> </xsl:text><xsl:text> </xsl:text>
+            </xsl:for-each>
+            <xsl:element name="a">
+                <xsl:attribute name="href">#release-date-completed</xsl:attribute>
+                <xsl:text>Completed</xsl:text>
+              </xsl:element>
+
+        </p></font>
+        <xsl:for-each select="todo">
+          <xsl:for-each select="actions">
+              <xsl:for-each select="target-release-description">
+                <p>
+                  <xsl:apply-templates/>
+                </p>
+              </xsl:for-each>
+              <xsl:for-each select="action">
+                <xsl:if test="normalize-space(.)">
+                  <p>
+                   <xsl:number/>) <xsl:apply-templates/>
+                   <xsl:if test="@*">
+                    <BR/>
+                   </xsl:if>
+                   <xsl:apply-templates select="@*"/>
+                  </p>
+                </xsl:if>
+            </xsl:for-each>
+            <HR/>
+          </xsl:for-each>
+
+          <xsl:for-each select="completed">
+              <xsl:element name="a">
+                <xsl:attribute name="name">release-date-completed</xsl:attribute>
+                <H3>Completed: </H3>
+              </xsl:element>
+            <xsl:for-each select="action">
+              <xsl:if test="normalize-space(.)">
+                <p>
+                 <xsl:number/>) <xsl:apply-templates/>
+                 <xsl:if test="@*">
+                  <BR/>
+                 </xsl:if>
+                 <xsl:apply-templates select="@*"/>
+                </p>
+              </xsl:if>
+          </xsl:for-each>
+          <HR/>
+        </xsl:for-each>
+
+        <xsl:call-template name="developer-list"/>
+       </xsl:for-each>
+
+      </BODY>
+    </HTML>
+  </xsl:template>
+
+  <xsl:template match="action/@*">
+  <!-- Add link to the who attributes to corresponding item in developer-list -->
+    <b><xsl:value-of select="name(.)"/>:</b><xsl:text> </xsl:text>
+      <xsl:choose>
+        <xsl:when test="name(.)='who'">
+          <xsl:element name="a">
+            <xsl:attribute name="href">#personref-<xsl:value-of select="."/></xsl:attribute>
+            <xsl:value-of select="."/>
+          </xsl:element>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="."/>
+        </xsl:otherwise>
+      </xsl:choose>
+    <xsl:if test="not (position()=last())">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="target-release-description/date">
+      <xsl:element name="a">
+        <xsl:attribute name="name">release-date-<xsl:value-of select="."/></xsl:attribute>
+        <b><xsl:text>For release: </xsl:text><xsl:value-of select="."/></b>
+      </xsl:element>
+    
+  </xsl:template>
+
+  <xsl:template match="issue">
+    <BR/><b>Issue </b><xsl:text>[</xsl:text><xsl:value-of select="@id"/>
+    <xsl:text>]: </xsl:text>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="target-release-description/level">
+    <xsl:text>, </xsl:text><xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="target-release-description/goal">
+    <BR/><b>Goal </b><xsl:text>[</xsl:text><xsl:value-of select="@type"/>
+    <xsl:text>]: </xsl:text>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+
+  <xsl:template name="developer-list">
+    <H3>
+      <xsl:element name="a">
+        <xsl:attribute name="name">developer-list</xsl:attribute>
+        <xsl:text>Developers:</xsl:text>
+      </xsl:element>
+    </H3>
+    <p>A list of some of people currently working on working on <xsl:value-of select="/todo/@project"/>:</p>
+    <ul>
+    <xsl:for-each select="devs/person">
+      <li>
+        <a href="mailto:{@email}">
+          <xsl:value-of select="@name"/>
+        </a>
+         <xsl:element name="a">
+           <xsl:attribute name="name"><xsl:text>personref-</xsl:text><xsl:value-of select="@id"/></xsl:attribute>
+           <xsl:text> (</xsl:text><xsl:value-of select="@id"/><xsl:text>)</xsl:text>
+         </xsl:element>
+         <BR/><xsl:value-of select="."/>
+      </li>
+    </xsl:for-each>
+    </ul>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla6328.xml b/test/tests/bugzilla/Bugzilla6328.xml
new file mode 100644
index 0000000..a7b5426
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6328.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <item num="1">This is a string</item>
+  <item num="2"> This is a string </item><!-- Spaces on each end -->
+  <item num="3">	This is a string	</item><!-- Tabs on each end -->
+  <item num="4">This	 is	 a	 string</item><!-- is tab space a -->
+  <item num="5">This  		is 	a	string 	 	 </item><!-- is space tab a -->
+  <item num="6">This  		is 
+  	a	string 	 	 </item><!-- Lots of misc whitespace and linefeed -->
+  <item num="7">This is &amp;a string</item>
+  <item num="8">This is &lt;a string</item>
+  <item num="9">This is &gt;a string</item>
+  <item num="10">This is &quot;a string</item>
+  <item num="11">This is &apos;a string</item>
+  <item num="12">This is &#169;a string</item>	<!-- Copyright -->
+  <item num="13">This is &#035;a string</item>	<!-- Hashmark -->
+  <item num="14">This is &#165;a string</item>	<!-- yen      -->
+  <item num="15">This is &#032;a string</item>
+  <item num="16">This is &#037;a string</item>	<!-- percent -->
+  <item num="17">This is &#009;a string</item>	<!-- tab    -->
+  <item num="18">This is &#127;a string</item>	<!-- delete  -->
+  <item num="19">This is &#209;a string</item>	<!-- N-tilde -->
+  <item num="20">This is &#338;a string</item>  <!-- OE Ligature -->
+  <item num="21">This is                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 a string</item>  <!-- manymany spaces -->
+</doc>
diff --git a/test/tests/bugzilla/Bugzilla6328.xsl b/test/tests/bugzilla/Bugzilla6328.xsl
new file mode 100644
index 0000000..f83c7ac
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6328.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="item">
+  <item>
+    <xsl:attribute name="num"><xsl:value-of select="@num"/></xsl:attribute>
+    <text><xsl:value-of select="."/></text>
+    <normalized><xsl:value-of select="normalize-space(.)"/></normalized>
+  </item>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/Bugzilla6329.java b/test/tests/bugzilla/Bugzilla6329.java
new file mode 100644
index 0000000..c9d125f
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6329.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+import java.io.ByteArrayInputStream;
+import org.apache.xpath.CachedXPathAPI;
+import org.w3c.dom.*;
+import javax.xml.parsers.*;
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ *
+ * @author geuerp@apache.org
+ * @author shane_curcuru@us.ibm.com
+ */
+public class Bugzilla6329 extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "Bugzilla6329"; }
+
+    /**
+     * The following program tries to select all nodes in the document using an
+     * XPath expression but the XPath misses the CDATA section.
+     * User reported output is:
+     * <PRE>
+     * Xerces-J 2.0.0
+     * Xalan Java 2.2.0
+     * 0 (DOCUMENT): [#document: null]
+     * 1 (ELEMENT): [svg: null]
+     * 2 (ATTRIBUTE): onload="thisInit()"
+     * 3 (ATTRIBUTE): width="106.786pt"
+     * 4 (ATTRIBUTE): xml:space="preserve"
+     * 5 (ATTRIBUTE): org.apache.xml.dtm.ref.dom2dtm.DOM2DTMdefaultNamespaceDeclarationNode@5b699b
+     * 6 (TEXT_NODE): [#text:
+     * ]
+     * 7 (ELEMENT): [style: null]
+     * 8 (ATTRIBUTE): type="text/css"
+     * 9 (ATTRIBUTE): xml:space=""
+     * 10 (TEXT_NODE): [#text:
+     * ]
+     * 11 (TEXT_NODE): [#text:
+     * ]
+     * </PRE>
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#6329");
+
+        String input =
+        "<svg  width='106.786pt' xml:space='preserve' onload='thisInit()'>\n" +
+        "<style type='text/css' xml:space=''>\n" +
+        "<![CDATA[\n" +
+        "    @font-face{font-family:'RussellSquare-Oblique';src:url(Arial.cef)}\n" +
+        "]]>\n" +
+        "</style>\n" +
+        "</svg>\n";
+
+        // Note: please avoid calling these directly, or at least use 
+        //    reflection to find the classes: they do change with 
+        //    different Xerces and Xalan builds! -sc
+        //logger.logMsg(logger.STATUSMSG, org.apache.xerces.impl.Version.fVersion);
+        //logger.logMsg(logger.STATUSMSG, org.apache.xalan.processor.XSLProcessorVersion.S_VERSION);
+
+        try
+        {
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true);
+
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            Document doc = db.parse(new ByteArrayInputStream(input.getBytes()));
+            CachedXPathAPI xp = new CachedXPathAPI();
+            logger.logMsg(logger.STATUSMSG, "User case: xp.selectNodeList(doc, (//. | //@* | //namespace::*))");
+            NodeList nl = xp.selectNodeList(doc, "(//. | //@* | //namespace::*)");
+
+            for (int i = 0; i < nl.getLength(); i++) 
+            {
+                // logger.logMsg(logger.STATUSMSG, i + " parent: " + nl.item(i).getParentNode());
+                // logger.logMsg(logger.STATUSMSG, i + " ("+org.apache.xml.security.utils.XMLUtils.getNodeTypeString(nl.item(i))+"): " + nl.item(i));
+                logger.logMsg(logger.STATUSMSG, i + ": " + nl.item(i));
+            }
+
+            logger.logMsg(logger.STATUSMSG, "dave case: xp.selectNodeList(doc, (//.))");
+            nl = xp.selectNodeList(doc, "(//.)");
+
+            for (int i = 0; i < nl.getLength(); i++) 
+            {
+                // logger.logMsg(logger.STATUSMSG, i + " parent: " + nl.item(i).getParentNode());
+                // logger.logMsg(logger.STATUSMSG, i + " ("+org.apache.xml.security.utils.XMLUtils.getNodeTypeString(nl.item(i))+"): " + nl.item(i));
+                logger.logMsg(logger.STATUSMSG, i + ": " + nl.item(i));
+            }
+
+
+            logger.checkAmbiguous("Test needs manual validation! (But Joe hints it may be invalid)");
+        } 
+        catch (Throwable t)
+        {
+            logger.logThrowable(logger.ERRORMSG, t, "Unexpected exception");
+            logger.checkErr("Unexpected exception: " + t.toString());
+        }
+    }
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6329">
+     * Link to Bugzilla report</a>
+     * @return XPath does not catch CDATA Nodes.
+     */
+    public String getDescription()
+    {
+        return "XPath does not catch CDATA Nodes";
+    }
+
+}  // end of class Bugzilla6329
+
diff --git a/test/tests/bugzilla/Bugzilla6337.xml b/test/tests/bugzilla/Bugzilla6337.xml
new file mode 100644
index 0000000..f029fb5
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6337.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="broken.xsl"?>
+<report>
+  <colData colId="F">1</colData>
+  <colData colId="L">5</colData>
+  <colData colId="F">1</colData>
+  <colData colId="L">5</colData>
+  <colData colId="L">2</colData> <!-- If you delete this line it works -->
+  <colData colId="F">2</colData> 
+  <colData colId="L">5</colData>
+  <colData colId="F">2</colData>
+</report>
\ No newline at end of file
diff --git a/test/tests/bugzilla/Bugzilla6337.xsl b/test/tests/bugzilla/Bugzilla6337.xsl
new file mode 100644
index 0000000..4e8dc77
--- /dev/null
+++ b/test/tests/bugzilla/Bugzilla6337.xsl
@@ -0,0 +1,41 @@
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0" >
+
+<!-- User mark@ssglimited.com (Mark Peterson) claims in Xalan-J 2.2.0:
+The XSL file, below, should make $flights= {"1","2"}, but it contains {"1"} - 
+when using the XML example file shown below.
+xml-xalan CVS 11-Feb-02 9AM returns <out>1<br/></out> -sc
+-->
+
+<xsl:variable name="flights" select="/report/colData[@colId='F' and not(.=preceding::colData)]"/>
+
+<xsl:template match="/report">
+<out>
+    <xsl:for-each select="$flights">
+        <xsl:value-of select="." /><br />
+    </xsl:for-each>
+</out>
+</xsl:template>
+
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/BugzillaNNNN.java b/test/tests/bugzilla/BugzillaNNNN.java
new file mode 100644
index 0000000..7a8f426
--- /dev/null
+++ b/test/tests/bugzilla/BugzillaNNNN.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+
+// REPLACE_imports needed for reproducing the bug
+
+
+/**
+ * Testlet for reproducing Bugzilla reported bugs.
+ *
+ * INSTRUCTIONS:
+ * <ul>Given your Bugzilla bugnumber:
+ * <li>Save this file under a different name like 
+ * Bugzilla<i>bugnumber</li> and search-and-replace 
+ * 'NNNN' to your Bugzilla bugnumber</li>
+ * <li>Search-and-replace all REPLACE_* strings with something appropriate</li>
+ * <li>javac BugzillaNNNN.java</li>
+ * <li>java BugzillaNNNN</li>
+ * <li>Attach the .java file to your Bugzilla report (or, checkin 
+ * to xml-xalan/test/tests/Bugzilla if committer)</li>
+ * </ul>
+ * Using this common format may allow us in the future to automate 
+ * verifying Bugzilla bugs to prevent regressions!
+ * @author REPLACE_your_email_address
+ */
+public class BugzillaNNNN extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "BugzillaNNNN"; }
+
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     * Many Bugzilla tests won't bother with a datalet; they'll 
+     * just have the data to reproduce the bug encoded by default.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#NNNN");
+
+        // Optional: use the Datalet d if supplied
+
+        // Call code to reproduce the bug here
+
+        // Call logger.checkFail("desc") (like Junit's assert(true, "desc")
+        //  or logger.checkPass("desc")  (like Junit's assert(false, "desc")
+        //  to report the actual bug fail/pass status
+	}
+
+    /**
+     * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=NNNN">
+     * Link to Bugzilla report</a>
+     * @return REPLACE_BugzillaNNNN_description.
+     */
+    public String getDescription()
+    {
+        return "REPLACE_BugzillaNNNN_description";
+    }
+
+}  // end of class BugzillaNNNN
+
diff --git a/test/tests/bugzilla/BugzillaNNNN.xml b/test/tests/bugzilla/BugzillaNNNN.xml
new file mode 100644
index 0000000..57d70df
--- /dev/null
+++ b/test/tests/bugzilla/BugzillaNNNN.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<!-- Use this to reproduce stylesheet bugs; just change NNNN to be the bug number -->
+<doc>
+  <list>
+    <item>one</item>
+    <item>two</item>
+    <item>three</item>
+  </list>  
+</doc>
diff --git a/test/tests/bugzilla/BugzillaNNNN.xsl b/test/tests/bugzilla/BugzillaNNNN.xsl
new file mode 100644
index 0000000..0e81664
--- /dev/null
+++ b/test/tests/bugzilla/BugzillaNNNN.xsl
@@ -0,0 +1,35 @@
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0" >
+
+<!-- Use this to reproduce stylesheet bugs; just change NNNN to be the bug number -->
+<xsl:template match="/">
+  <out>
+    <title>
+      <xsl:text>Reproducing Bugzilla#NNNN: oops!</xsl:text>
+    </title>    
+    <xsl:apply-templates />
+  </out>
+</xsl:template>
+
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/BugzillaNodeInfo.java b/test/tests/bugzilla/BugzillaNodeInfo.java
new file mode 100644
index 0000000..6056af6
--- /dev/null
+++ b/test/tests/bugzilla/BugzillaNodeInfo.java
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+// Common Qetest / Xalan testing imports
+import org.apache.qetest.Datalet;
+import org.apache.qetest.Logger;
+import org.apache.qetest.TestletImpl;
+import org.apache.qetest.CheckService;
+import org.apache.qetest.xsl.XHTFileCheckService;
+
+import org.apache.xalan.processor.TransformerFactoryImpl;
+import org.apache.xalan.transformer.TransformerImpl;
+import org.apache.xalan.transformer.XalanProperties;
+import javax.xml.transform.*;
+import javax.xml.transform.stream.*;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.BufferedReader;
+import java.io.IOException;
+
+/**
+ * Custom Testlet for testing NodeInfo extension.
+ *
+ * @author shane_curcuru@us.ibm.com
+ */
+public class BugzillaNodeInfo extends TestletImpl
+{
+    // Initialize our classname for TestletImpl's main() method - must be updated!
+    static { thisClassName = "BugzillaNodeInfo"; }
+
+    /**
+     * Write Minimal code to reproduce your Bugzilla bug report.
+     * Many Bugzilla tests won't bother with a datalet; they'll 
+     * just have the data to reproduce the bug encoded by default.
+     * @param d (optional) Datalet to use as data point for the test.
+     */
+    public void execute(Datalet d)
+	{
+        // Use logger.logMsg(...) instead of System.out.println(...)
+        logger.logMsg(Logger.STATUSMSG, getDescription());
+
+        String xslName = "BugzillaNodeInfo.xsl";
+        String xmlName = "BugzillaNodeInfo.xml";
+        String outputName = "BugzillaNodeInfo.output";
+        String goldName = "BugzillaNodeInfo.gold";
+        try
+        {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            // Must set on both the factory impl..
+            TransformerFactoryImpl factoryImpl = (TransformerFactoryImpl)factory;
+            factoryImpl.setAttribute(XalanProperties.SOURCE_LOCATION, Boolean.TRUE);
+            
+            Transformer transformer = factory.newTransformer(new StreamSource(xslName));
+            // ..and the transformer impl
+            TransformerImpl impl = ((TransformerImpl) transformer);
+            impl.setProperty(XalanProperties.SOURCE_LOCATION, Boolean.TRUE);
+            transformer.transform(new StreamSource(xmlName), 
+                                  new StreamResult(outputName));
+        } 
+        catch (Throwable t)
+        {
+            logger.logThrowable(logger.ERRORMSG, t, "Unexpectedly threw");
+            logger.checkErr("Unexpectedly threw: " + t.toString());
+            return;
+        }    
+    
+        // CheckService fileChecker = new XHTFileCheckService();
+        // fileChecker.check(logger,
+        //                   new File(outputName), 
+        //                   new File(goldName), 
+        //                  getDescription());
+        // Since the gold data isn't nailed down yet, do a simple validation
+        // Just ensure the systemId of the xml file was included somewhere in the file
+        checkFileContains(outputName, xmlName, "NodeInfo got partial systemID correct");
+	}
+
+
+    /**
+     * Checks and reports if a file contains a certain string 
+     * (all within one line).
+     *
+     * @param fName local path/name of file to check
+     * @param checkStr String to look for in the file
+     * @param comment to log with the check() call
+     * @return true if pass, false otherwise
+     */
+    protected boolean checkFileContains(String fName, String checkStr,
+                                        String comment)
+    {
+        boolean passFail = false;
+        File f = new File(fName);
+
+        if (!f.exists())
+        {
+            logger.checkFail("checkFileContains(" + fName
+                               + ") does not exist: " + comment);
+            return false;
+        }
+
+        try
+        {
+            FileReader fr = new FileReader(f);
+            BufferedReader br = new BufferedReader(fr);
+
+            for (;;)
+            {
+                String inbuf = br.readLine();
+                if (inbuf == null)
+                    break;
+
+                if (inbuf.indexOf(checkStr) >= 0)
+                {
+                    passFail = true;
+                    logger.logMsg(logger.TRACEMSG, 
+                        "checkFileContains passes with line: " + inbuf);
+                    break;
+                }
+            }
+        }
+        catch (IOException ioe)
+        {
+            logger.checkFail("checkFileContains(" + fName + ") threw: "
+                               + ioe.toString() + " for: " + comment);
+
+            return false;
+        }
+
+        if (passFail)
+        {
+            logger.checkPass(comment);
+        }
+        else
+        {
+            logger.logMsg(logger.ERRORMSG, "checkFileContains failed to find: " + checkStr);
+            logger.checkFail(comment);
+        }
+        return passFail;
+    }
+
+
+    /**
+     * @return Xalan custom extension NodeInfo.
+     */
+    public String getDescription()
+    {
+        return "Xalan custom extension NodeInfo";
+    }
+
+}  // end of class BugzillaNodeInfo
+
diff --git a/test/tests/bugzilla/BugzillaNodeInfo.xml b/test/tests/bugzilla/BugzillaNodeInfo.xml
new file mode 100644
index 0000000..32d3d59
--- /dev/null
+++ b/test/tests/bugzilla/BugzillaNodeInfo.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <!-- NOTE: when editing this file, you may need to update gold line/col values below! -->
+  <elem line="4" col="29" />
+  <elem line="5" col="41" multi="true" >
+    <subelem line="6" col="34" />
+  </elem>
+</doc>
\ No newline at end of file
diff --git a/test/tests/bugzilla/BugzillaNodeInfo.xsl b/test/tests/bugzilla/BugzillaNodeInfo.xsl
new file mode 100644
index 0000000..0127463
--- /dev/null
+++ b/test/tests/bugzilla/BugzillaNodeInfo.xsl
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:java="http://xml.apache.org/xslt/java"
+                xmlns:xalan="http://xml.apache.org/xalan"
+                exclude-result-prefixes="java">
+
+  <!-- FileName: javaNodeInfo01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Testing Xalan custom extension "NodeInfo", implemented in lib/NodeInfo.java. -->
+ 
+  <xsl:strip-space elements="*"/>
+  <xsl:output indent="yes"/>
+             
+<xsl:template match="/">
+  <out>
+    <xsl:variable name="rtf">
+      <docelem>
+        <elem1/>
+        <elem2>
+          <elem3>content</elem3>
+        </elem2>
+      </docelem>
+    </xsl:variable>
+    <global>
+      <xsl:element name="lineNumber">
+        <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.lineNumber()"/>
+      </xsl:element>
+      <xsl:element name="columnNumber">
+        <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.columnNumber()"/>
+      </xsl:element>
+      <xsl:element name="systemId">
+        <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.systemId()"/>
+      </xsl:element>
+      <xsl:element name="publicId">
+        <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.publicId()"/>
+      </xsl:element>
+    </global>
+    <rtf>
+      <xsl:element name="lineNumber">
+        <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.lineNumber((xalan:nodeset($rtf)))"/>
+      </xsl:element>
+      <xsl:element name="columnNumber">
+        <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.columnNumber((xalan:nodeset($rtf)))"/>
+      </xsl:element>
+      <xsl:element name="systemId">
+        <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.systemId((xalan:nodeset($rtf)))"/>
+      </xsl:element>
+      <xsl:element name="publicId">
+        <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.publicId((xalan:nodeset($rtf)))"/>
+      </xsl:element>
+    </rtf>
+    <elems>
+      <xsl:apply-templates />
+    </elems>
+  </out>
+</xsl:template>
+<xsl:template match="elem | subelem">
+  <elem>
+    <xsl:element name="lineNumber">
+      <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.lineNumber(.)"/>
+    </xsl:element>
+    <xsl:element name="columnNumber">
+      <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.columnNumber(.)"/>
+    </xsl:element>
+    <xsl:element name="systemId">
+      <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.systemId(.)"/>
+    </xsl:element>
+    <xsl:element name="publicId">
+      <xsl:value-of select="java:org.apache.xalan.lib.NodeInfo.publicId(.)"/>
+    </xsl:element>
+  </elem>
+  <xsl:apply-templates />
+</xsl:template>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/bugzilla.bat b/test/tests/bugzilla/bugzilla.bat
new file mode 100755
index 0000000..03f56ee
--- /dev/null
+++ b/test/tests/bugzilla/bugzilla.bat
@@ -0,0 +1,31 @@
+@echo off
+if "%1" == "" goto usage
+@echo Simple wrapper to execute a single Bugzilla test #%1
+
+@rem Always attempt Java first, since it might do additional validation
+if exist Bugzilla%1.java goto dojava
+if exist Bugzilla%1.xsl goto doxsl
+goto error
+
+:dojava
+@echo javac -classpath ..\..\..\java\build\xalan.jar;..\..\..\java\bin\xml-apis.jar;..\..\..\java\bin\xercesImpl.jar;..\..\java\build\testxsl.jar;%CLASSPATH% -d build Bugzilla%1.java
+javac -classpath ..\..\..\java\build\xalan.jar;..\..\..\java\bin\xml-apis.jar;..\..\..\java\bin\xercesImpl.jar;..\..\java\build\testxsl.jar;%CLASSPATH% -d build Bugzilla%1.java
+
+@echo java -classpath build;..\..\..\java\build\xalan.jar;..\..\..\java\bin\xml-apis.jar;..\..\..\java\bin\xercesImpl.jar;..\..\java\build\testxsl.jar;%CLASSPATH% Bugzilla%1
+java -classpath build;..\..\..\java\build\xalan.jar;..\..\..\java\bin\xml-apis.jar;..\..\..\java\bin\xercesImpl.jar;..\..\java\build\testxsl.jar;%CLASSPATH% Bugzilla%1
+goto end
+
+:doxsl
+@echo java -classpath ..\..\..\java\build\xalan.jar;..\..\..\java\bin\xml-apis.jar;..\..\..\java\bin\xercesImpl.jar;%CLASSPATH% org.apache.xalan.xslt.Process -in Bugzilla%1.xml -xsl Bugzilla%1.xsl -out Bugzilla%1.output -v -edump
+java -classpath ..\..\..\java\build\xalan.jar;..\..\..\java\bin\xml-apis.jar;..\..\..\java\bin\xercesImpl.jar;%CLASSPATH% org.apache.xalan.xslt.Process -in Bugzilla%1.xml -xsl Bugzilla%1.xsl -out Bugzilla%1.output -v -edump
+@echo Output is in Bugzilla%1.output
+dir Bugzilla%1.output
+goto end
+
+:error
+@echo ERROR! Could not find file Bugzilla%1.java/xsl
+:usage
+@echo %0: compile and run a single BugzillaNNNN testlet/stylesheet
+@echo Usage: bugzilla NNNN    (NNNN is the number of the bug)
+
+:end
\ No newline at end of file
diff --git a/test/tests/bugzilla/bugzilla6284.xml b/test/tests/bugzilla/bugzilla6284.xml
new file mode 100644
index 0000000..abe97ca
--- /dev/null
+++ b/test/tests/bugzilla/bugzilla6284.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<Nodes>
+   <Black number="1" at="R4"/>
+   <Black number="2" at="R4"/>
+</Nodes>
\ No newline at end of file
diff --git a/test/tests/bugzilla/bugzilla6284.xsl b/test/tests/bugzilla/bugzilla6284.xsl
new file mode 100644
index 0000000..f586d9d
--- /dev/null
+++ b/test/tests/bugzilla/bugzilla6284.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: bugzilla6284 -->
+  <!-- Creator: David Marston, from Daniel Gilder's bug report -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:variable name="lastMove">
+  <xsl:for-each select="/Nodes/Black">
+    <xsl:message>Position: <xsl:value-of select="position()"/></xsl:message>
+    <xsl:if test="position()=1">
+      <xsl:value-of select="@number"/>
+    </xsl:if>
+  </xsl:for-each>
+</xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <title>
+      <xsl:text>Reproducing Bugzilla#6284: predicate/global variable/position()</xsl:text>
+    </title>
+    <xsl:text>
+</xsl:text>
+    <xsl:for-each select="/Nodes/Black[@number &lt;= $lastMove]">
+      <duplicate><!-- Should get one of these -->
+        <xsl:text>found a duplicate at </xsl:text>
+        <xsl:value-of select="position()"/>
+      </duplicate>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+    <last><!-- Should be 1 -->
+      <xsl:value-of select="$lastMove"/>
+    </last>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/bugzilla/error.xml b/test/tests/bugzilla/error.xml
new file mode 100644
index 0000000..a4e0162
--- /dev/null
+++ b/test/tests/bugzilla/error.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <title name="title-name-attr">title-content</title>
+  <list>
+    <item version="1">Xalan-J 1.x</item>
+    <item version="2">Xalan-J 2.x</item>
+    <item version="1">Xalan-C 1.x</item>
+    <list-bad-tag>
+      <item>Xalan documentation</item>
+      <item>Xalan tests</item>
+    </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/bugzilla/identity.xml b/test/tests/bugzilla/identity.xml
new file mode 100644
index 0000000..8246608
--- /dev/null
+++ b/test/tests/bugzilla/identity.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <title name="title-name-attr">title-content</title>
+  <list>
+    <item version="1">Xalan-J 1.x</item>
+    <item version="2">Xalan-J 2.x</item>
+    <item version="1">Xalan-C 1.x</item>
+    <list>
+      <item>Xalan documentation</item>
+      <item>Xalan tests</item>
+    </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/bugzilla/identity.xsl b/test/tests/bugzilla/identity.xsl
new file mode 100644
index 0000000..28bb7c2
--- /dev/null
+++ b/test/tests/bugzilla/identity.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi-gold/domcomtests/domcomtests01.out b/test/tests/capi-gold/domcomtests/domcomtests01.out
new file mode 100644
index 0000000..cab0cc0
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests01.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com"><cnn:data attr1="What in the world">DANIEL</cnn:data><espn:data xmlns:espn2="http://www.espn2.com" xmlns:espn="http://www.espn.com" espn2:attr1="hello">ESPN and ESPN2</espn:data><data2 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data2>
+This is a test
+</root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests02.out b/test/tests/capi-gold/domcomtests/domcomtests02.out
new file mode 100644
index 0000000..6ca1184
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests02.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This is a comment --><root xmlns:cnn="http://www.cnn.com"><data1 attr2="goodbye" attr1="hello">BEN</data1><data2 attr2="hello" attr1="goodbye"><cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2><data4 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data4>
+This is a test
+</root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests03.out b/test/tests/capi-gold/domcomtests/domcomtests03.out
new file mode 100644
index 0000000..a3e4fad
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests03.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com"><data1 attr2="goodbye" attr1="hello">BEN</data1><data2 attr2="hello" attr1="goodbye"><cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2><data4 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data4>
+This is a test
+</root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests04.out b/test/tests/capi-gold/domcomtests/domcomtests04.out
new file mode 100644
index 0000000..a588648
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests04.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com"><data1 attr2="goodbye" attr1="hello">BEN</data1><data2 attr2="hello" attr1="goodbye" attr3="xyz"><cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2><data4 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data4>
+This is a test
+</root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests05.out b/test/tests/capi-gold/domcomtests/domcomtests05.out
new file mode 100644
index 0000000..814b7bb
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests05.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com"><data1 attr2="goodbye" attr99="hello">BEN</data1><data2 attr2="hello" attr1="goodbye"><cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2><data4 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data4>
+This is a test
+</root>
diff --git a/test/tests/capi-gold/domcomtests/domcomtests06.out b/test/tests/capi-gold/domcomtests/domcomtests06.out
new file mode 100644
index 0000000..ecf3bf1
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests06.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com" ><data1 attr2="goodbye" attr1="hellothere">BEN</data1><data2 attr2="hello" attr1="goodbye"><cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2><data4 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data4>
+This is a test
+</root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests07.out b/test/tests/capi-gold/domcomtests/domcomtests07.out
new file mode 100644
index 0000000..c8aa7a4
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests07.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com" ><data1 attr2="goodbye" attr1="hello">Ben-Herr</data1><data2 attr2="hello" attr1="goodbye"><cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2><data4 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data4>
+This is a test
+</root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests08.out b/test/tests/capi-gold/domcomtests/domcomtests08.out
new file mode 100644
index 0000000..f462653
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com"><data1 attr2="goodbye" attr1="hello"><data2 attr2="hello" attr1="goodbye"><data3 attr2="goodbye" attr1="hello"><data4 attr2="hello" attr1="goodbye"><data5 attr2="goodbye" attr1="hello"><data6 attr2="hello" attr1="goodbye"><data7 attr2="goodbye" attr1="hello"><data8 attr2="hello" attr1="goodbye"><data9 attr2="goodbye" attr1="hello"><data10 attr2="hello" attr1="goodbye"><data11 attr2="goodbye" attr1="hello"><data12 attr2="hello" attr1="goodbye"><data13 attr1="What in the world"><data14 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data14></data13></data12></data11></data10></data9></data8></data7></data6></data5></data4></data3></data2></data1></root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests09.out b/test/tests/capi-gold/domcomtests/domcomtests09.out
new file mode 100644
index 0000000..d1e230c
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com"><data1 attr2="goodbye" attr1="hello"/><data2 attr2="hello" attr1="goodbye"/><data3 attr2="goodbye" attr1="hello"/><data4 attr2="hello" attr1="goodbye"/><data5 attr2="goodbye" attr1="hello"/><data6 attr2="hello" attr1="goodbye"/><data7 attr2="goodbye" attr1="hello"/><data8 attr2="hello" attr1="goodbye"/><data9 attr2="goodbye" attr1="hello"/><data10 attr2="hello" attr1="goodbye"/><data11 attr2="goodbye" attr1="hello"/><data12 attr2="hello" attr1="goodbye"/><data13 attr1="What in the world"/><data14 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data14></root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests10.out b/test/tests/capi-gold/domcomtests/domcomtests10.out
new file mode 100644
index 0000000..d1e230c
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com"><data1 attr2="goodbye" attr1="hello"/><data2 attr2="hello" attr1="goodbye"/><data3 attr2="goodbye" attr1="hello"/><data4 attr2="hello" attr1="goodbye"/><data5 attr2="goodbye" attr1="hello"/><data6 attr2="hello" attr1="goodbye"/><data7 attr2="goodbye" attr1="hello"/><data8 attr2="hello" attr1="goodbye"/><data9 attr2="goodbye" attr1="hello"/><data10 attr2="hello" attr1="goodbye"/><data11 attr2="goodbye" attr1="hello"/><data12 attr2="hello" attr1="goodbye"/><data13 attr1="What in the world"/><data14 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data14></root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests11.out b/test/tests/capi-gold/domcomtests/domcomtests11.out
new file mode 100644
index 0000000..f462653
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:cnn="http://www.cnn.com"><data1 attr2="goodbye" attr1="hello"><data2 attr2="hello" attr1="goodbye"><data3 attr2="goodbye" attr1="hello"><data4 attr2="hello" attr1="goodbye"><data5 attr2="goodbye" attr1="hello"><data6 attr2="hello" attr1="goodbye"><data7 attr2="goodbye" attr1="hello"><data8 attr2="hello" attr1="goodbye"><data9 attr2="goodbye" attr1="hello"><data10 attr2="hello" attr1="goodbye"><data11 attr2="goodbye" attr1="hello"><data12 attr2="hello" attr1="goodbye"><data13 attr1="What in the world"><data14 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data14></data13></data12></data11></data10></data9></data8></data7></data6></data5></data4></data3></data2></data1></root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests12.out b/test/tests/capi-gold/domcomtests/domcomtests12.out
new file mode 100644
index 0000000..c81a8b9
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests12.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root><data1 attr2="goodbye" attr1="hello">BEN</data1><data2 attr2="hello" attr1="goodbye"><data3 attr1="What in the world">DANIEL</data3></data2><data4 cnn:attr2="eybdoog" attr1="olleh" xmlns:cnn="http://www.cnn.com">DICK</data4>
+This is a test
+</root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests13.out b/test/tests/capi-gold/domcomtests/domcomtests13.out
new file mode 100644
index 0000000..c755059
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests13.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root><cnn:data xmlns:cnn="http://www.cnn.org" attr1="What in the world">DANIEL</cnn:data><espn:data xmlns:espn2="http://www.espn2.com" xmlns:espn="http://www.espn.com" espn2:attr1="hello">ESPN and ESPN2</espn:data><data2 xmlns:xyz="http://www.xyz.com" xyz:attr2="eybdoog" attr1="olleh">DICK</data2>
+This is a test
+</root>
diff --git a/test/tests/capi-gold/domcomtests/domcomtests14.out b/test/tests/capi-gold/domcomtests/domcomtests14.out
new file mode 100644
index 0000000..028e610
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests14.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root><data1 attr2="goodbye" attr1="hello"><data2 attr2="hello" attr1="goodbye"><data3 attr1="What in the world">DANIEL</data3></data2><cnn:data4 xmlns:cnn="http://www.cnn.com" cnn:attr2="eybdoog" attr1="olleh">DICK</cnn:data4></data1>
+This is a test
+</root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests15.out b/test/tests/capi-gold/domcomtests/domcomtests15.out
new file mode 100644
index 0000000..9c597ba
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root><data1 attr2="goodbye" attr1="hello"/><data2 attr2="hello" attr1="goodbye"/></root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/domcomtests/domcomtests16.out b/test/tests/capi-gold/domcomtests/domcomtests16.out
new file mode 100644
index 0000000..9c597ba
--- /dev/null
+++ b/test/tests/capi-gold/domcomtests/domcomtests16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root><data1 attr2="goodbye" attr1="hello"/><data2 attr2="hello" attr1="goodbye"/></root>
\ No newline at end of file
diff --git a/test/tests/capi-gold/params/params01.out b/test/tests/capi-gold/params/params01.out
new file mode 100644
index 0000000..eeef189
--- /dev/null
+++ b/test/tests/capi-gold/params/params01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>testing 1 2 3; defaultvalue</out>
\ No newline at end of file
diff --git a/test/tests/capi-gold/params/params02.out b/test/tests/capi-gold/params/params02.out
new file mode 100644
index 0000000..467f6d5
--- /dev/null
+++ b/test/tests/capi-gold/params/params02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>A B C D E default6</out>
\ No newline at end of file
diff --git a/test/tests/capi-gold/params/params04.out b/test/tests/capi-gold/params/params04.out
new file mode 100644
index 0000000..74742e8
--- /dev/null
+++ b/test/tests/capi-gold/params/params04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>defaultvalue</out>
\ No newline at end of file
diff --git a/test/tests/capi-gold/params/params05.out b/test/tests/capi-gold/params/params05.out
new file mode 100644
index 0000000..3ff0aa6
--- /dev/null
+++ b/test/tests/capi-gold/params/params05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>testing 1 2 3</out>
\ No newline at end of file
diff --git a/test/tests/capi-gold/params/params06.out b/test/tests/capi-gold/params/params06.out
new file mode 100644
index 0000000..3ff0aa6
--- /dev/null
+++ b/test/tests/capi-gold/params/params06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>testing 1 2 3</out>
\ No newline at end of file
diff --git a/test/tests/capi-gold/params/params07.out b/test/tests/capi-gold/params/params07.out
new file mode 100644
index 0000000..80954dc
--- /dev/null
+++ b/test/tests/capi-gold/params/params07.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Hello
+	
+Goodbye
+	
+</out>
\ No newline at end of file
diff --git a/test/tests/capi-gold/params/params08.out b/test/tests/capi-gold/params/params08.out
new file mode 100644
index 0000000..a46551d
--- /dev/null
+++ b/test/tests/capi-gold/params/params08.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Hello down there.
+</out>
diff --git a/test/tests/capi-gold/smoke/capi01.out b/test/tests/capi-gold/smoke/capi01.out
new file mode 100644
index 0000000..11e920e
--- /dev/null
+++ b/test/tests/capi-gold/smoke/capi01.out
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<Families>
+<Smith>
+<Parents>
+<Father>Lew Smith</Father>
+<Mother>Ruth Smith</Mother>
+</Parents>
+<Children number="5">
+<Male name="Andy" wife="Suzie" kids="2">
+<Kids>
+<Grandkid>Julie</Grandkid>
+<Grandkid>Daniel</Grandkid>
+</Kids>Andy</Male>
+<Male name="Thomas" wife="Margaret" kids="2">
+<Kids>
+<Grandkid>Joshua</Grandkid>
+<Grandkid>Lauren</Grandkid>
+</Kids>Thomas</Male>
+<Male name="Henry" wife="Elizbeth" kids="2">
+<Kids>
+<Grandkid>Nathaniel</Grandkid>
+<Grandkid>Samual</Grandkid>
+</Kids>Henry</Male>
+<Male name="Bruce" wife="Betsy" kids="3">
+<Kids>
+<Grandkid>Benjamin</Grandkid>
+<Grandkid>Lucy</Grandkid>
+<Grandkid>Jake</Grandkid>
+</Kids>Bruce</Male>
+<Male name="Joseph" wife="Lilla" kids="0">Joseph</Male>
+</Children>
+</Smith>
+</Families>
+The Smith
+The parents are: Lewis and Ruth Smith
+They have 9 grandchildren: Julie, Nathaniel, Joshua, Daniel, Samual, Lauren, Benjamin, Lucy, and Jake
+&#13;Andy Smith's phone number is 483-23-5432.
+He is 45. Andy is married to Suzie.
+Their children are Jules:9, and Daniel:8
+&#13;Bruce Smith's phone number is 213.457.2190.
+He is 38. Bruce is married to Betsy.
+Their children are Ben:5, Lucy:2, and Jake:1
+&#13;Henry Smith's phone number is 417.645.4954.
+He is 40. Henry is married to Beth.
+Their children are Nate:8, and Sam:7
+&#13;Joe Smith's phone number is 781.665.0539.
+He is 34. Joseph is married to Lilla.
+They have no kids
+			
+&#13;Tom Smith's phone number is 508.257.2754.
+He is 30. Thomas is married to Maggy.
+Their children are Joshua:7, and Lauren:5
+<Families>
+<Westons>
+<Parents>
+<Father>Melvin Weston</Father>
+<Mother>Liz Harris</Mother>
+</Parents>
+<Children number="2">
+<Female name="Caroline" husband="" kids="0">Caroline</Female>
+<Female name="Betsy" husband="Bruce" kids="3">
+<Kids>
+<Grandkid>Benjamin</Grandkid>
+<Grandkid>Lucy</Grandkid>
+<Grandkid>Jake</Grandkid>
+</Kids>Betsy</Female>
+</Children>
+</Westons>
+</Families>
+The Westons
+The parents are: Melvin and Liz Harris
+They have 3 grandchildren: Benjamin, Lucy, and Jake
+&#13;Betsy Weston's phone number is 213.457.2190.
+She is 34. Betsy is married to Bruce.
+Their children are Ben:5, Lucy:2, and Jake:1
+&#13;Caroline Weston's phone number is 715.264.8205.
+She is 37. Caroline is not married. 
+		
+	</out>
diff --git a/test/tests/capi-gold/smoke/smoke01.out b/test/tests/capi-gold/smoke/smoke01.out
new file mode 100644
index 0000000..11e920e
--- /dev/null
+++ b/test/tests/capi-gold/smoke/smoke01.out
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<Families>
+<Smith>
+<Parents>
+<Father>Lew Smith</Father>
+<Mother>Ruth Smith</Mother>
+</Parents>
+<Children number="5">
+<Male name="Andy" wife="Suzie" kids="2">
+<Kids>
+<Grandkid>Julie</Grandkid>
+<Grandkid>Daniel</Grandkid>
+</Kids>Andy</Male>
+<Male name="Thomas" wife="Margaret" kids="2">
+<Kids>
+<Grandkid>Joshua</Grandkid>
+<Grandkid>Lauren</Grandkid>
+</Kids>Thomas</Male>
+<Male name="Henry" wife="Elizbeth" kids="2">
+<Kids>
+<Grandkid>Nathaniel</Grandkid>
+<Grandkid>Samual</Grandkid>
+</Kids>Henry</Male>
+<Male name="Bruce" wife="Betsy" kids="3">
+<Kids>
+<Grandkid>Benjamin</Grandkid>
+<Grandkid>Lucy</Grandkid>
+<Grandkid>Jake</Grandkid>
+</Kids>Bruce</Male>
+<Male name="Joseph" wife="Lilla" kids="0">Joseph</Male>
+</Children>
+</Smith>
+</Families>
+The Smith
+The parents are: Lewis and Ruth Smith
+They have 9 grandchildren: Julie, Nathaniel, Joshua, Daniel, Samual, Lauren, Benjamin, Lucy, and Jake
+&#13;Andy Smith's phone number is 483-23-5432.
+He is 45. Andy is married to Suzie.
+Their children are Jules:9, and Daniel:8
+&#13;Bruce Smith's phone number is 213.457.2190.
+He is 38. Bruce is married to Betsy.
+Their children are Ben:5, Lucy:2, and Jake:1
+&#13;Henry Smith's phone number is 417.645.4954.
+He is 40. Henry is married to Beth.
+Their children are Nate:8, and Sam:7
+&#13;Joe Smith's phone number is 781.665.0539.
+He is 34. Joseph is married to Lilla.
+They have no kids
+			
+&#13;Tom Smith's phone number is 508.257.2754.
+He is 30. Thomas is married to Maggy.
+Their children are Joshua:7, and Lauren:5
+<Families>
+<Westons>
+<Parents>
+<Father>Melvin Weston</Father>
+<Mother>Liz Harris</Mother>
+</Parents>
+<Children number="2">
+<Female name="Caroline" husband="" kids="0">Caroline</Female>
+<Female name="Betsy" husband="Bruce" kids="3">
+<Kids>
+<Grandkid>Benjamin</Grandkid>
+<Grandkid>Lucy</Grandkid>
+<Grandkid>Jake</Grandkid>
+</Kids>Betsy</Female>
+</Children>
+</Westons>
+</Families>
+The Westons
+The parents are: Melvin and Liz Harris
+They have 3 grandchildren: Benjamin, Lucy, and Jake
+&#13;Betsy Weston's phone number is 213.457.2190.
+She is 34. Betsy is married to Bruce.
+Their children are Ben:5, Lucy:2, and Jake:1
+&#13;Caroline Weston's phone number is 715.264.8205.
+She is 37. Caroline is not married. 
+		
+	</out>
diff --git a/test/tests/capi/domcomtests/domcomtests01.xml b/test/tests/capi/domcomtests/domcomtests01.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests01.xsl b/test/tests/capi/domcomtests/domcomtests01.xsl
new file mode 100644
index 0000000..082a084
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests01.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<cnn:data attr1="What in the world">DANIEL</cnn:data>
+<espn:data xmlns:espn="http://www.espn.com" espn2:attr1="hello" xmlns:espn2="http://www.espn2.com">ESPN and ESPN2</espn:data>
+<data2 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">DICK</data2>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests02.xml b/test/tests/capi/domcomtests/domcomtests02.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests02.xsl b/test/tests/capi/domcomtests/domcomtests02.xsl
new file mode 100644
index 0000000..214e9fc
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests02.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">BEN</data1>
+<data2 attr1="goodbye" attr2="hello">
+<cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2>
+<data4 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">DICK</data4>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests03.xml b/test/tests/capi/domcomtests/domcomtests03.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests03.xsl b/test/tests/capi/domcomtests/domcomtests03.xsl
new file mode 100644
index 0000000..67c8e7a
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests03.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<roo>
+<data1 attr1="hello" attr2="goodbye">BEN</data1>
+<data2 attr1="goodbye" attr2="hello">
+<cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2>
+<data4 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">DICK</data4>
+This is a test
+</roo>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests04.xml b/test/tests/capi/domcomtests/domcomtests04.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests04.xsl b/test/tests/capi/domcomtests/domcomtests04.xsl
new file mode 100644
index 0000000..214e9fc
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests04.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">BEN</data1>
+<data2 attr1="goodbye" attr2="hello">
+<cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2>
+<data4 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">DICK</data4>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests05.xml b/test/tests/capi/domcomtests/domcomtests05.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests05.xsl b/test/tests/capi/domcomtests/domcomtests05.xsl
new file mode 100644
index 0000000..002aabb
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests05.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">BEN</data1>
+<data2 attr2="hello">
+<cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2>
+<data4 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">DICK</data4>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests06.xml b/test/tests/capi/domcomtests/domcomtests06.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests06.xsl b/test/tests/capi/domcomtests/domcomtests06.xsl
new file mode 100644
index 0000000..214e9fc
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests06.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">BEN</data1>
+<data2 attr1="goodbye" attr2="hello">
+<cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2>
+<data4 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">DICK</data4>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests07.xml b/test/tests/capi/domcomtests/domcomtests07.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests07.xsl b/test/tests/capi/domcomtests/domcomtests07.xsl
new file mode 100644
index 0000000..214e9fc
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests07.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">BEN</data1>
+<data2 attr1="goodbye" attr2="hello">
+<cnn:data3 attr1="What in the world">DANIEL</cnn:data3></data2>
+<data4 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">DICK</data4>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests08.xml b/test/tests/capi/domcomtests/domcomtests08.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests08.xsl b/test/tests/capi/domcomtests/domcomtests08.xsl
new file mode 100644
index 0000000..588b66d
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests08.xsl
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+	
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">
+<data2 attr1="goodbye" attr2="hello">
+<data3 attr1="hello" attr2="goodbye">
+<data4 attr1="goodbye" attr2="hello">
+<data5 attr1="hello" attr2="goodbye">
+<data6 attr1="goodbye" attr2="hello">
+<data7 attr1="hello" attr2="goodbye">
+<data8 attr1="goodbye" attr2="hello">
+<data9 attr1="hello" attr2="bad">
+<data10 attr1="goodbye" attr2="hello">
+<data11 attr1="hello" attr2="goodbye">
+<data12 attr1="goodbye" attr2="hello">
+<data13 attr1="What in the world">
+<data14 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">Duck</data14>
+</data13>
+</data12>
+</data11>
+</data10>
+</data9>
+</data8>
+</data7>
+</data6>
+</data5>
+</data4>
+</data3>
+</data2>
+</data1>
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests09.xml b/test/tests/capi/domcomtests/domcomtests09.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests09.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests09.xsl b/test/tests/capi/domcomtests/domcomtests09.xsl
new file mode 100644
index 0000000..570f065
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests09.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye"/>
+<data2 attr1="goodbye" attr2="hello"/>
+<data3 attr1="hello" attr2="goodbye"/>
+<data4 attr1="goodbye" attr2="hello"/>
+<data5 attr1="hello" attr2="goodbye"/>
+<data6 attr1="goodbye" attr2="hello"/>
+<data7 attr1="hello" attr2="goodbye"/>
+<data8 attr1="goodbye" attr2="hello"/>
+<data9 attr1="hello" attr2="bad"/>
+<data10 attr1="goodbye" attr2="hello"/>
+<data11 attr1="hello" attr2="goodbye"/>
+<data12 attr1="goodbye" attr2="hello"/>
+<data13 attr1="What in the world"/>
+<data14 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">Duck</data14>
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests10.xml b/test/tests/capi/domcomtests/domcomtests10.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests10.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests10.xsl b/test/tests/capi/domcomtests/domcomtests10.xsl
new file mode 100644
index 0000000..8939e9e
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests10.xsl
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">
+<data2 attr1="goodbye" attr2="hello">
+<data3 attr1="hello" attr2="goodbye">
+<data4 attr1="goodbye" attr2="hello">
+<data5 attr1="hello" attr2="goodbye">
+<data6 attr1="goodbye" attr2="hello">
+<data7 attr1="hello" attr2="goodbye">
+<data8 attr1="goodbye" attr2="hello">
+<data9 attr1="hello" attr2="goodby">
+<data10 attr1="goodbye" attr2="hello">
+<data11 attr1="hello" attr2="goodbye">
+<data12 attr1="goodbye" attr2="hello">
+<data13 attr1="What in the world">
+<data14 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">Duck</data14>
+</data13>
+</data12>
+</data11>
+</data10>
+</data9>
+</data8>
+</data7>
+</data6>
+</data5>
+</data4>
+</data3>
+</data2>
+</data1>
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests11.xml b/test/tests/capi/domcomtests/domcomtests11.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests11.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests11.xsl b/test/tests/capi/domcomtests/domcomtests11.xsl
new file mode 100644
index 0000000..dfe439b
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests11.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.cnn.com">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye"/>
+<data2 attr1="goodbye" attr2="hello"/>
+<data3 attr1="hello" attr2="goodbye"/>
+<data4 attr1="goodbye" attr2="hello"/>
+<data5 attr1="hello" attr2="goodbye"/>
+<data6 attr1="goodbye" attr2="hello"/>
+<data7 attr1="hello" attr2="goodbye"/>
+<data8 attr1="goodbye" attr2="hello"/>
+<data9 attr1="hello" attr2="goodby"/>
+<data10 attr1="goodbye" attr2="hello"/>
+<data11 attr1="hello" attr2="goodbye"/>
+<data12 attr1="goodbye" attr2="hello"/>
+<data13 attr1="What in the world"/>
+<data14 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">Duck</data14>
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests12.xml b/test/tests/capi/domcomtests/domcomtests12.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests12.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests12.xsl b/test/tests/capi/domcomtests/domcomtests12.xsl
new file mode 100644
index 0000000..e0d795d
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests12.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.bad.com"
+				exclude-result-prefixes="cnn">
+	
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">BEN</data1>
+<data2 attr1="goodbye" attr2="hello">
+<data3 attr1="What in the world">DANIEL</data3></data2>
+<data4 attr1="olleh" cnn:attr2="eybdoog">DICK</data4>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests13.xml b/test/tests/capi/domcomtests/domcomtests13.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests13.xsl b/test/tests/capi/domcomtests/domcomtests13.xsl
new file mode 100644
index 0000000..7ed1a24
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests13.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:tnt="http://www.cnn.org"
+				exclude-result-prefixes="tnt">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName: dtod -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<tnt:data attr1="What in the world">DANIEL</tnt:data>
+<espn:data xmlns:espn="http://www.espn.com" espn2:attr1="hello" xmlns:espn2="http://www.espn2.com">ESPN and ESPN2</espn:data>
+<data2 attr1="olleh" xyz:attr2="eybdoog" xmlns:xyz="http://www.xyz.com">DICK</data2>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests14.xml b/test/tests/capi/domcomtests/domcomtests14.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests14.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests14.xsl b/test/tests/capi/domcomtests/domcomtests14.xsl
new file mode 100644
index 0000000..7b6681a
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests14.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:cnn="http://www.bad.com"
+				exclude-result-prefixes="cnn">
+	
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye">
+<data2 attr1="goodbye" attr2="hello">
+<data3 attr1="What in the world">DANIEL</data3></data2>
+<cnn:data4 attr1="olleh" cnn:attr2="eybdoog">DICK</cnn:data4>
+</data1>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests15.xml b/test/tests/capi/domcomtests/domcomtests15.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests15.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests15.xsl b/test/tests/capi/domcomtests/domcomtests15.xsl
new file mode 100644
index 0000000..5e90a9f
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests15.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+	
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye"/>
+<data2 attr1="goodbye" attr2="hello"/>
+<extraNode/>
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/domcomtests/domcomtests16.xml b/test/tests/capi/domcomtests/domcomtests16.xml
new file mode 100644
index 0000000..105ddce
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests16.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <element/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/domcomtests/domcomtests16.xsl b/test/tests/capi/domcomtests/domcomtests16.xsl
new file mode 100644
index 0000000..e922e40
--- /dev/null
+++ b/test/tests/capi/domcomtests/domcomtests16.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+	
+<xsl:output method="xml"/>
+
+  <!-- FileName:  -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test has no exceptions. -->
+
+<xsl:template match="/">
+<root>
+<data1 attr1="hello" attr2="goodbye"/>
+<data2 attr1="goodbye" attr2="hello"/>
+This is a test
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/params/params01.xml b/test/tests/capi/params/params01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/capi/params/params01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/params/params01.xsl b/test/tests/capi/params/params01.xsl
new file mode 100644
index 0000000..805ba23
--- /dev/null
+++ b/test/tests/capi/params/params01.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableman01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Test of passing a parameter to a stylesheet. Run from
+     special bat file which contains the following additional option
+     -param input 'testing 123'. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:param name="input" select="'defaultvalue'"/>
+<xsl:param name="input2" select="'defaultvalue'"/><!-- DON'T set externally -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="$input"/><xsl:text>; </xsl:text>
+    <xsl:value-of select="$input2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/params/params02.xml b/test/tests/capi/params/params02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/capi/params/params02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/params/params02.xsl b/test/tests/capi/params/params02.xsl
new file mode 100644
index 0000000..989facc
--- /dev/null
+++ b/test/tests/capi/params/params02.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableman02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose:  Test setting several parameters externally. Run from
+       special bat file which contains the following additional options
+       -param in1 'A' -param in2 'B' -param in3 'C' etc.
+       Suggest setting 1-5, so you see default on 6. -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="in1" select="'default1'"/>
+<xsl:param name="in2" select="'default2'"/>
+<xsl:param name="in3" select="'default3'"/>
+<xsl:param name="in4" select="'default4'"/>
+<xsl:param name="in5" select="'default5'"/>
+<xsl:param name="in6" select="'default6'"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="$in1"/>
+    <xsl:value-of select="$in2"/>
+    <xsl:value-of select="$in3"/>
+    <xsl:value-of select="$in4"/>
+    <xsl:value-of select="$in5"/>
+    <xsl:value-of select="$in6"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/params/params03.xml b/test/tests/capi/params/params03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/capi/params/params03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/params/params03.xsl b/test/tests/capi/params/params03.xsl
new file mode 100644
index 0000000..2b5b088
--- /dev/null
+++ b/test/tests/capi/params/params03.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+		xmlns:xyz="http://www.lotus.com">
+
+  <!-- FileName: variableman03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose:  Test external setting of parameter that has a QName. Run from
+       special bat file which contains the following additional option
+       -param xyz:in1 "'DATA'". -->
+  <!-- Author: Paul Dick -->
+
+<xsl:param name="xyz:in1" select="'default1'"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="$xyz:in1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/params/params04.xml b/test/tests/capi/params/params04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/capi/params/params04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/params/params04.xsl b/test/tests/capi/params/params04.xsl
new file mode 100644
index 0000000..4f7c44f
--- /dev/null
+++ b/test/tests/capi/params/params04.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableman04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Show that top-level xsl:variable is unaffected by an attempt to set
+     it externally. Run from special bat file which contains the following additional option
+     -param input 'testing'. -->
+  <!-- Author: David Marston -->
+
+<xsl:variable name="input" select="'defaultvalue'"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="$input"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/params/params05.xml b/test/tests/capi/params/params05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/capi/params/params05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/params/params05.xsl b/test/tests/capi/params/params05.xsl
new file mode 100644
index 0000000..70fc77c
--- /dev/null
+++ b/test/tests/capi/params/params05.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableman05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Test external setting of top-level param, then passing value to top-level variable
+     via value-of. Run from special bat file which contains the following additional option
+     -param input 'testing'. -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="input" select="defaultvalue"/>
+
+<xsl:variable name="tata" select="$input"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="$tata"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/params/params06.xml b/test/tests/capi/params/params06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/capi/params/params06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/capi/params/params06.xsl b/test/tests/capi/params/params06.xsl
new file mode 100644
index 0000000..8ff5154
--- /dev/null
+++ b/test/tests/capi/params/params06.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableman06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Test external setting of top-level param, then passing value to top-level variable
+     via value-of. Show that order of these top-level elements doesn't matter. Run from special
+     bat file which contains the following additional option
+     -param input 'testing'. -->
+  <!-- Author: David Marston -->
+
+<xsl:variable name="tata" select="$input"/>
+
+<xsl:param name="input" select="defaultvalue"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="$tata"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/params/params07.xsl b/test/tests/capi/params/params07.xsl
new file mode 100644
index 0000000..818dd4b
--- /dev/null
+++ b/test/tests/capi/params/params07.xsl
@@ -0,0 +1,84 @@
+<?xml version="1.0"?> 
+<?xml-stylesheet type="text/xsl" href="#style1-23.34.123456789_345"?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA | head | body)*>
+
+<!ELEMENT head (#PCDATA | xsl:stylesheet)*>
+<!ELEMENT body (#PCDATA|para)*>
+
+<!ELEMENT xsl:stylesheet (#PCDATA | xsl:key | xsl:template)*>
+<!ATTLIST xsl:stylesheet 
+		  id ID #REQUIRED
+		  xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform"
+		  version NMTOKEN #REQUIRED>
+
+<!ELEMENT xsl:key EMPTY>
+<!ATTLIST xsl:key
+    name NMTOKENS #REQUIRED
+    match CDATA #REQUIRED
+    use CDATA #REQUIRED>
+
+<!ELEMENT xsl:template (#PCDATA | out)*>
+<!ATTLIST xsl:template  match CDATA #IMPLIED>
+
+<!ELEMENT out (#PCDATA | xsl:value-of | xsl:text)*>
+
+<!ELEMENT xsl:value-of EMPTY>
+<!ATTLIST xsl:value-of select CDATA #REQUIRED>
+
+<!ELEMENT xsl:text (#PCDATA)>
+
+<!ELEMENT para (#PCDATA)*>
+<!ATTLIST para id ID #REQUIRED>
+]>
+
+<doc>
+  <head>
+	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                id="style1-23.34.123456789_345">
+
+	<!-- FileName: embed01 -->
+	<!-- Document: http://www.w3.org/TR/xslt -->
+	<!-- DocVersion: 19991116 -->
+	<!-- Section: 2.7 Embedding Stylesheets. -->
+	<!-- Purpose: General test of embedded stylesheet using fragment identifier -->
+
+	  <xsl:key name="test" match="para" use="@id"/>
+
+		<xsl:template match="/">
+  			<out>
+    			<xsl:value-of select="doc/body/para"/>
+				<xsl:value-of select="key('test','foey')"/><xsl:text>&#10;</xsl:text>
+  			</out>
+		</xsl:template>
+	</xsl:stylesheet>
+  </head>
+
+  <body>
+  	<para id="foo">
+Hello
+	</para>
+	<para id="foey">
+Goodbye
+	</para>
+  </body>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</doc>
diff --git a/test/tests/capi/params/params08.xsl b/test/tests/capi/params/params08.xsl
new file mode 100644
index 0000000..8627035
--- /dev/null
+++ b/test/tests/capi/params/params08.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="foo.xsl"?>
+
+  <!-- FileName: embed02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.7 Embedding Stylesheets. -->
+  <!-- Purpose: Minimal test of embedded stylesheet -->
+
+<doc>
+<head>
+</head>
+<body>
+<para id="foo">
+Hello down there.
+</para>
+</body>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</doc>
diff --git a/test/tests/capi/smoke/capi01.xml b/test/tests/capi/smoke/capi01.xml
new file mode 100644
index 0000000..f3d8de2
--- /dev/null
+++ b/test/tests/capi/smoke/capi01.xml
@@ -0,0 +1,259 @@
+<?xml version="1.0"?>
+<!--This is my first attempt at creating a xml document -->
+<Family_Geneologies>
+	<Family Surname= "The Smith">
+		<Parents>
+			<Father First="Lewis" MI="R" Last="Smith">Lew Smith</Father> 
+			<Mother First="Ruth" MI="C" Last="Smith">Ruth Smith</Mother> 
+			<GrandKids>
+				<gkid>1</gkid>
+				<gkid>2</gkid>
+				<gkid>3</gkid>
+				<gkid>4</gkid>
+				<gkid>5</gkid>
+				<gkid>6</gkid>
+				<gkid>7</gkid>
+				<gkid>8</gkid>
+				<gkid>9</gkid>
+			</GrandKids>
+		</Parents>
+		<Children>
+			<Child>
+				<Basic_Information>
+					<Name First="Andy" MI="A" Last="Smith">Andy Smith</Name>
+					<Address Street="32 Stonefield Dr" Town="Princton" State="NJ" Zip="07642">Stonefield Dr</Address>
+					<Phone>
+						<Home>483-23-5432</Home>
+						<Work/>
+						<Fax/>
+						<Celluar/>					  
+					</Phone>
+					<Social_Security>012-23-1234</Social_Security>
+				</Basic_Information>
+				<Personal_Information>
+					<Sex>Male</Sex>
+					<Age>45</Age>
+					<Married Kids="2">Yes</Married>
+					<Family_Information>
+						<Wife>
+							<Name First="Suzie" MI="A" Last="Smith">Suzie</Name>
+							<Age>45</Age>
+						</Wife>
+						<Kids>
+							<Kid ID="1">
+								<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+								<Age>9</Age></Kid>
+							<Kid ID="4">
+								<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+								<Age>8</Age></Kid></Kids>
+					</Family_Information>
+				</Personal_Information>
+				<Education>
+					<PA What="Physican Assistant" From="Hannamen College" When="'84">PA</PA>
+					<BS What="Organic Chemistry" From="Ohio Weslyean University" When="'78">BS</BS>
+				</Education>
+			</Child>
+<Child>
+<Basic_Information>
+<Name First="Thomas" MI="B" Last="Smith">Tom Smith</Name>
+<Address Street="47 Pondside Lane" Town="Needham" State="MA" Zip="04532">Pondside Lane</Address>
+<Phone>
+<Home>508.257.2754</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>274-76-2971</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>30</Age>
+<Married Kids="2">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Margaret" MI="A" Last="Young">Maggy</Name>
+<Age>39</Age>
+</Wife>
+<Kids>
+<Kid ID="3">
+<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+<Age>7</Age></Kid>
+<Kid ID="6">
+<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+<Age>5</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education What="Finance" From="Boston University" When="'81">BA</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Henry" MI="M" Last="Smith">Henry Smith</Name>
+<Address Street="25 Lakeview" Town="Pittsfield" State="MA" Zip="98623">Lakeview</Address>
+<Phone>
+<Home>417.645.4954</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>231-45-3590</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>40</Age>
+<Married Kids="2">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Elizbeth" MI="Q" Last="Smith">Beth</Name>
+<Age>40</Age>
+</Wife>
+<Kids>
+<Kid ID="2">
+<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+<Age>8</Age></Kid>
+<Kid ID="5">
+<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+<Age>7</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MBA In="Technology MBA" From="Northeastern University" When="'96">MBA</MBA>
+<BA In="Applied Physics &amp; Math" From="Mass Institute of Technology" When="'82">BA</BA>
+</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Bruce" MI="E" Last="Smith">Bruce Smith</Name>
+<Address Street="36 Strawberry Lane" Town="North Attleboro" State="MA" Zip="73564">Strawberry Lane</Address>
+<Phone>
+<Work>617.432.5607</Work>
+<Home>213.457.2190</Home>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>675-00-4312</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>38</Age>
+<Married Kids="1">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Betsy" MI="A" Last="Smith">Betsy</Name>
+<Age>34</Age>
+</Wife>
+<Kids>
+<Kid ID="7">
+<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+<Age>5</Age></Kid>
+<Kid ID="8">
+<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+<Age>2</Age></Kid>
+<Kid ID="9">
+<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+<Age>1</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education What="Computer Science &amp; Psychology" From="University of Maine" When="'84">BA</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Joseph" MI="A" Last="Smith">Joe Smith</Name>
+<Address Street="85 Green St." Town="Melrose" State="MA" Zip="02176">Green St.</Address>
+<Phone>
+<Home>781.665.0539</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>425-46-6982</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>34</Age>
+<Married Kids="0">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Lilla" MI="A" Last="Smith">Lilla</Name>
+<Age>38</Age>
+</Wife>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MA What="Education" From="Boston College" When="'92">MA</MA>
+<BA What="Political Science" From="University of Maine" When="'89">BA</BA>
+</Education>
+</Child>
+</Children>
+</Family>
+<Family Surname= "The Westons">
+<Parents>
+<Father First="Melvin" MI="O" Last="Weston">Melvin Weston</Father> 
+<Mother First="Elizabeth" MI="A" Last="Harris">Liz Harris</Mother> 
+<GrandKids>
+<gkid>7</gkid>
+<gkid>8</gkid>
+<gkid>9</gkid>
+</GrandKids>
+</Parents>
+<Children>
+<Child>
+<Basic_Information>
+<Name First="Caroline" MI="A" Last="Weston">Caroline Weston</Name>
+<Address Street="Finchly Road" Town="Hanover" State="NH" Zip="23765">Finchly Road</Address>
+<Phone>
+<Home>715.264.8205</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>09-46-8791</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>37</Age>
+<Married >No</Married>
+<Family_Information>
+</Family_Information>
+</Personal_Information>
+<Education What="Administrator" From="Cathrine Gibbs" When="'80">Assoc</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Betsy" MI="A" Last="Weston">Betsy Weston</Name>
+<Address Street="36 Strawberry Lane" Town="North Attleboro" State="MA" Zip="73564">Strawberry Lane</Address>
+<Phone>
+<Work>617.432.5607</Work>
+<Home>213.457.2190</Home>
+<Celluar/>
+</Phone>
+<Social_Security>123-46-9876</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>34</Age>
+<Married Kids="1">Yes</Married>
+<Family_Information>
+<Husband>
+<Name First="Bruce" MI="E" Last="Smith">Bruce</Name>
+<Age>38</Age>
+</Husband>
+<Kids>
+<Kid ID="7">
+<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+<Age>5</Age></Kid>
+<Kid ID="8">
+<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+<Age>2</Age></Kid>
+<Kid ID="9">
+<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+<Age>1</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MA What="Exercise Physiology" From="Indiania University" When="'89">MA</MA>
+<BS What="Kinetics" From="Leeds Poloytechnical" When="'87">BS</BS>
+</Education>
+</Child>
+</Children>
+</Family>
+</Family_Geneologies>
\ No newline at end of file
diff --git a/test/tests/capi/smoke/capi01.xsl b/test/tests/capi/smoke/capi01.xsl
new file mode 100644
index 0000000..c834d06
--- /dev/null
+++ b/test/tests/capi/smoke/capi01.xsl
@@ -0,0 +1,120 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:dick="http://www.dicks.com"
+				xmlns:weston="http://www.weston.com"
+				exclude-result-prefixes="dick weston">
+
+<xsl:import href="smokesubdir/famimp.xsl"/>
+<xsl:include href="smokesubdir/faminc.xsl"/>
+
+<xsl:output indent="yes"/>
+
+<xsl:strip-space elements="Family_Geneologies Kids Males"/>
+<xsl:variable name="root" select="'Families'"/>
+
+<!-- Root xsl:template - start processing here -->
+<xsl:key name="KidInfo" match="Kid" use="@ID"/>
+
+<xsl:template match="Family_Geneologies">
+  <out>
+     <xsl:apply-templates select="Family"/>  
+  </out>
+</xsl:template>
+ 
+
+<xsl:template match="Family">
+<xsl:text>&#10;</xsl:text>
+
+	<xsl:call-template name="tree">
+	   <xsl:with-param name="Surname" select="@Surname"/>
+	</xsl:call-template><xsl:text>&#10;</xsl:text>
+
+	<xsl:value-of select="@Surname" />
+
+    <xsl:apply-templates select="Parents">
+	   <xsl:with-param name="Surname" select="@Surname"/>
+	</xsl:apply-templates>
+
+	<xsl:apply-templates select="Children/Child">
+	   <xsl:sort select="Basic_Information/Name/@First"/>
+	</xsl:apply-templates>
+
+</xsl:template>
+
+<xsl:template match="Child">
+	<xsl:text>&#10;&#13;</xsl:text>
+	<xsl:value-of select=".//Name"/>'s phone number is <xsl:value-of select=".//Phone/Home"/><xsl:text>.</xsl:text>
+	<xsl:if test='Personal_Information/Sex[.="Male"]' ><xsl:text/>
+He is <xsl:value-of select="Personal_Information/Age"/><xsl:text>. </xsl:text>
+	</xsl:if>
+	<xsl:if test='Personal_Information/Sex[.="Female"]' >
+She is <xsl:value-of select="Personal_Information/Age"/><xsl:text>. </xsl:text>
+	</xsl:if>
+	<xsl:apply-templates select="Personal_Information/Married"/> 
+</xsl:template>
+					
+<xsl:template match ="Personal_Information/Married">
+  <xsl:variable name="spouse" select="following-sibling::*/Wife/Name | following-sibling::*/child::Husband/child::Name"/>  
+	<xsl:if test='.="Yes"' >
+		<xsl:value-of select="ancestor::Child/Basic_Information/Name/@First"/> is married to <xsl:value-of select="$spouse"/>
+		<xsl:text>.</xsl:text> 
+		<xsl:choose>
+			<xsl:when test="./@Kids > 0">
+Their children are <xsl:text/>
+				<xsl:for-each select="following-sibling::*/child::Kids/child::Kid">
+				   <!--xsl:value-of select="."/-->
+				   <xsl:choose>
+						<xsl:when test="(position()=last())">
+							<xsl:value-of select="Name"/>:<xsl:value-of select="Age"/></xsl:when>
+						<xsl:otherwise>
+				   			<xsl:value-of select="Name"/>:<xsl:value-of select="Age"/><xsl:text>, </xsl:text></xsl:otherwise>
+				   </xsl:choose>
+				   <xsl:if test="(position()=last()-1)">and </xsl:if>
+				</xsl:for-each>
+			</xsl:when>
+			<xsl:when test="./@Kids = 0">
+They have no kids
+			</xsl:when>
+		</xsl:choose>											
+	</xsl:if>
+	<xsl:if test='.="No"'>
+		<xsl:value-of select="ancestor::Child/child::Basic_Information/child::Name/@First"/> is not married. 
+		<!-- The following is another way to print out the same message
+		<xsl:value-of select="../..//Basic_Information/Name/@First"/> is not married   -->
+	</xsl:if>
+</xsl:template>
+
+<xsl:template match ="Parents">
+   <xsl:param name="Surname" select="'Default'"/>
+The parents are: <xsl:value-of select="Father/@First"/> and <xsl:value-of select="Mother"/>
+    <xsl:choose>
+       <xsl:when test="contains($Surname,'Dicks')">
+          <xsl:apply-templates select="GrandKids" mode="document"/>
+	   </xsl:when>
+	   <xsl:otherwise>
+          <xsl:apply-templates select="GrandKids" mode="orginal"/>
+	   </xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/smoke/smoke01.xml b/test/tests/capi/smoke/smoke01.xml
new file mode 100644
index 0000000..f3d8de2
--- /dev/null
+++ b/test/tests/capi/smoke/smoke01.xml
@@ -0,0 +1,259 @@
+<?xml version="1.0"?>
+<!--This is my first attempt at creating a xml document -->
+<Family_Geneologies>
+	<Family Surname= "The Smith">
+		<Parents>
+			<Father First="Lewis" MI="R" Last="Smith">Lew Smith</Father> 
+			<Mother First="Ruth" MI="C" Last="Smith">Ruth Smith</Mother> 
+			<GrandKids>
+				<gkid>1</gkid>
+				<gkid>2</gkid>
+				<gkid>3</gkid>
+				<gkid>4</gkid>
+				<gkid>5</gkid>
+				<gkid>6</gkid>
+				<gkid>7</gkid>
+				<gkid>8</gkid>
+				<gkid>9</gkid>
+			</GrandKids>
+		</Parents>
+		<Children>
+			<Child>
+				<Basic_Information>
+					<Name First="Andy" MI="A" Last="Smith">Andy Smith</Name>
+					<Address Street="32 Stonefield Dr" Town="Princton" State="NJ" Zip="07642">Stonefield Dr</Address>
+					<Phone>
+						<Home>483-23-5432</Home>
+						<Work/>
+						<Fax/>
+						<Celluar/>					  
+					</Phone>
+					<Social_Security>012-23-1234</Social_Security>
+				</Basic_Information>
+				<Personal_Information>
+					<Sex>Male</Sex>
+					<Age>45</Age>
+					<Married Kids="2">Yes</Married>
+					<Family_Information>
+						<Wife>
+							<Name First="Suzie" MI="A" Last="Smith">Suzie</Name>
+							<Age>45</Age>
+						</Wife>
+						<Kids>
+							<Kid ID="1">
+								<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+								<Age>9</Age></Kid>
+							<Kid ID="4">
+								<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+								<Age>8</Age></Kid></Kids>
+					</Family_Information>
+				</Personal_Information>
+				<Education>
+					<PA What="Physican Assistant" From="Hannamen College" When="'84">PA</PA>
+					<BS What="Organic Chemistry" From="Ohio Weslyean University" When="'78">BS</BS>
+				</Education>
+			</Child>
+<Child>
+<Basic_Information>
+<Name First="Thomas" MI="B" Last="Smith">Tom Smith</Name>
+<Address Street="47 Pondside Lane" Town="Needham" State="MA" Zip="04532">Pondside Lane</Address>
+<Phone>
+<Home>508.257.2754</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>274-76-2971</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>30</Age>
+<Married Kids="2">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Margaret" MI="A" Last="Young">Maggy</Name>
+<Age>39</Age>
+</Wife>
+<Kids>
+<Kid ID="3">
+<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+<Age>7</Age></Kid>
+<Kid ID="6">
+<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+<Age>5</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education What="Finance" From="Boston University" When="'81">BA</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Henry" MI="M" Last="Smith">Henry Smith</Name>
+<Address Street="25 Lakeview" Town="Pittsfield" State="MA" Zip="98623">Lakeview</Address>
+<Phone>
+<Home>417.645.4954</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>231-45-3590</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>40</Age>
+<Married Kids="2">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Elizbeth" MI="Q" Last="Smith">Beth</Name>
+<Age>40</Age>
+</Wife>
+<Kids>
+<Kid ID="2">
+<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+<Age>8</Age></Kid>
+<Kid ID="5">
+<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+<Age>7</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MBA In="Technology MBA" From="Northeastern University" When="'96">MBA</MBA>
+<BA In="Applied Physics &amp; Math" From="Mass Institute of Technology" When="'82">BA</BA>
+</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Bruce" MI="E" Last="Smith">Bruce Smith</Name>
+<Address Street="36 Strawberry Lane" Town="North Attleboro" State="MA" Zip="73564">Strawberry Lane</Address>
+<Phone>
+<Work>617.432.5607</Work>
+<Home>213.457.2190</Home>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>675-00-4312</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>38</Age>
+<Married Kids="1">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Betsy" MI="A" Last="Smith">Betsy</Name>
+<Age>34</Age>
+</Wife>
+<Kids>
+<Kid ID="7">
+<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+<Age>5</Age></Kid>
+<Kid ID="8">
+<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+<Age>2</Age></Kid>
+<Kid ID="9">
+<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+<Age>1</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education What="Computer Science &amp; Psychology" From="University of Maine" When="'84">BA</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Joseph" MI="A" Last="Smith">Joe Smith</Name>
+<Address Street="85 Green St." Town="Melrose" State="MA" Zip="02176">Green St.</Address>
+<Phone>
+<Home>781.665.0539</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>425-46-6982</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>34</Age>
+<Married Kids="0">Yes</Married>
+<Family_Information>
+<Wife>
+<Name First="Lilla" MI="A" Last="Smith">Lilla</Name>
+<Age>38</Age>
+</Wife>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MA What="Education" From="Boston College" When="'92">MA</MA>
+<BA What="Political Science" From="University of Maine" When="'89">BA</BA>
+</Education>
+</Child>
+</Children>
+</Family>
+<Family Surname= "The Westons">
+<Parents>
+<Father First="Melvin" MI="O" Last="Weston">Melvin Weston</Father> 
+<Mother First="Elizabeth" MI="A" Last="Harris">Liz Harris</Mother> 
+<GrandKids>
+<gkid>7</gkid>
+<gkid>8</gkid>
+<gkid>9</gkid>
+</GrandKids>
+</Parents>
+<Children>
+<Child>
+<Basic_Information>
+<Name First="Caroline" MI="A" Last="Weston">Caroline Weston</Name>
+<Address Street="Finchly Road" Town="Hanover" State="NH" Zip="23765">Finchly Road</Address>
+<Phone>
+<Home>715.264.8205</Home>
+<Work/>
+<Fax/>
+<Celluar/>
+</Phone>
+<Social_Security>09-46-8791</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>37</Age>
+<Married >No</Married>
+<Family_Information>
+</Family_Information>
+</Personal_Information>
+<Education What="Administrator" From="Cathrine Gibbs" When="'80">Assoc</Education>
+</Child>
+<Child>
+<Basic_Information>
+<Name First="Betsy" MI="A" Last="Weston">Betsy Weston</Name>
+<Address Street="36 Strawberry Lane" Town="North Attleboro" State="MA" Zip="73564">Strawberry Lane</Address>
+<Phone>
+<Work>617.432.5607</Work>
+<Home>213.457.2190</Home>
+<Celluar/>
+</Phone>
+<Social_Security>123-46-9876</Social_Security>
+</Basic_Information>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>34</Age>
+<Married Kids="1">Yes</Married>
+<Family_Information>
+<Husband>
+<Name First="Bruce" MI="E" Last="Smith">Bruce</Name>
+<Age>38</Age>
+</Husband>
+<Kids>
+<Kid ID="7">
+<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+<Age>5</Age></Kid>
+<Kid ID="8">
+<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+<Age>2</Age></Kid>
+<Kid ID="9">
+<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+<Age>1</Age></Kid></Kids>
+</Family_Information>
+</Personal_Information>
+<Education>
+<MA What="Exercise Physiology" From="Indiania University" When="'89">MA</MA>
+<BS What="Kinetics" From="Leeds Poloytechnical" When="'87">BS</BS>
+</Education>
+</Child>
+</Children>
+</Family>
+</Family_Geneologies>
\ No newline at end of file
diff --git a/test/tests/capi/smoke/smoke01.xsl b/test/tests/capi/smoke/smoke01.xsl
new file mode 100644
index 0000000..9f7c95d
--- /dev/null
+++ b/test/tests/capi/smoke/smoke01.xsl
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+
+<!-- This is THE Smoke Test -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:dick="http://www.dicks.com"
+				xmlns:weston="http://www.weston.com"
+				exclude-result-prefixes="dick weston">
+
+<xsl:import href="smokesubdir/famimp.xsl"/>
+<xsl:include href="smokesubdir/faminc.xsl"/>
+
+<xsl:output indent="yes"/>
+
+<xsl:strip-space elements="Family_Geneologies Kids Males"/>
+<xsl:variable name="root" select="'Families'"/>
+
+<!-- Root xsl:template - start processing here -->
+<xsl:key name="KidInfo" match="Kid" use="@ID"/>
+
+<xsl:template match="Family_Geneologies">
+  <out>
+     <xsl:apply-templates select="Family"/>  
+  </out>
+</xsl:template>
+ 
+
+<xsl:template match="Family">
+<xsl:text>&#10;</xsl:text>
+
+	<xsl:call-template name="tree">
+	   <xsl:with-param name="Surname" select="@Surname"/>
+	</xsl:call-template><xsl:text>&#10;</xsl:text>
+
+	<xsl:value-of select="@Surname" />
+
+    <xsl:apply-templates select="Parents">
+	   <xsl:with-param name="Surname" select="@Surname"/>
+	</xsl:apply-templates>
+
+	<xsl:apply-templates select="Children/Child">
+	   <xsl:sort select="Basic_Information/Name/@First"/>
+	</xsl:apply-templates>
+
+</xsl:template>
+
+<xsl:template match="Child">
+	<xsl:text>&#10;&#13;</xsl:text>
+	<xsl:value-of select=".//Name"/>'s phone number is <xsl:value-of select=".//Phone/Home"/><xsl:text>.</xsl:text>
+	<xsl:if test='Personal_Information/Sex[.="Male"]' ><xsl:text/>
+He is <xsl:value-of select="Personal_Information/Age"/><xsl:text>. </xsl:text>
+	</xsl:if>
+	<xsl:if test='Personal_Information/Sex[.="Female"]' >
+She is <xsl:value-of select="Personal_Information/Age"/><xsl:text>. </xsl:text>
+	</xsl:if>
+	<xsl:apply-templates select="Personal_Information/Married"/> 
+</xsl:template>
+					
+<xsl:template match ="Personal_Information/Married">
+  <xsl:variable name="spouse" select="following-sibling::*/Wife/Name | following-sibling::*/child::Husband/child::Name"/>  
+	<xsl:if test='.="Yes"' >
+		<xsl:value-of select="ancestor::Child/Basic_Information/Name/@First"/> is married to <xsl:value-of select="$spouse"/>
+		<xsl:text>.</xsl:text> 
+		<xsl:choose>
+			<xsl:when test="./@Kids > 0">
+Their children are <xsl:text/>
+				<xsl:for-each select="following-sibling::*/child::Kids/child::Kid">
+				   <!--xsl:value-of select="."/-->
+				   <xsl:choose>
+						<xsl:when test="(position()=last())">
+							<xsl:value-of select="Name"/>:<xsl:value-of select="Age"/></xsl:when>
+						<xsl:otherwise>
+				   			<xsl:value-of select="Name"/>:<xsl:value-of select="Age"/><xsl:text>, </xsl:text></xsl:otherwise>
+				   </xsl:choose>
+				   <xsl:if test="(position()=last()-1)">and </xsl:if>
+				</xsl:for-each>
+			</xsl:when>
+			<xsl:when test="./@Kids = 0">
+They have no kids
+			</xsl:when>
+		</xsl:choose>											
+	</xsl:if>
+	<xsl:if test='.="No"'>
+		<xsl:value-of select="ancestor::Child/child::Basic_Information/child::Name/@First"/> is not married. 
+		<!-- The following is another way to print out the same message
+		<xsl:value-of select="../..//Basic_Information/Name/@First"/> is not married   -->
+	</xsl:if>
+</xsl:template>
+
+<xsl:template match ="Parents">
+   <xsl:param name="Surname" select="'Default'"/>
+The parents are: <xsl:value-of select="Father/@First"/> and <xsl:value-of select="Mother"/>
+    <xsl:choose>
+       <xsl:when test="contains($Surname,'Dicks')">
+          <xsl:apply-templates select="GrandKids" mode="document"/>
+	   </xsl:when>
+	   <xsl:otherwise>
+          <xsl:apply-templates select="GrandKids" mode="orginal"/>
+	   </xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/smoke/smokesubdir/famimp.xsl b/test/tests/capi/smoke/smokesubdir/famimp.xsl
new file mode 100644
index 0000000..e8c01e6
--- /dev/null
+++ b/test/tests/capi/smoke/smokesubdir/famimp.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+<xsl:template match="GrandKids" mode="orginal">
+They have <xsl:value-of select="count(*)"/> grandchildren: <xsl:text/>
+	<xsl:for-each select="gkid">
+		<xsl:value-of select="key('KidInfo',(.))/Name/@First"/>
+		<xsl:if test="not(position()=last())">, </xsl:if>
+		<xsl:if test="(position()=last()-1)">and </xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template match="GrandKids" mode="document">
+They should have <xsl:value-of select="count(document('grandkids.xml')/GrandKids/gkid)"/> grandchildren: <xsl:text/>
+	<xsl:for-each select="gkid">
+		<xsl:value-of select="key('KidInfo',.)/Name/@First"/>
+		<xsl:if test="not(position()=last())">, </xsl:if>
+		<xsl:if test="(position()=last()-1)">and </xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template match="GrandKids" mode="doc">
+They got <xsl:value-of select="count(document('grandkids.xml')/GrandKids/gkid)"/> grandchildren: <xsl:text/>
+	<xsl:for-each select="document('grandkids.xml')/GrandKids/gkid">
+		<xsl:value-of select="key('KidInfo',(.))/Name/@First"/>
+		<xsl:if test="not(position()=last())">, </xsl:if>
+		<xsl:if test="(position()=last()-1)">and </xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/smoke/smokesubdir/faminc.xsl b/test/tests/capi/smoke/smokesubdir/faminc.xsl
new file mode 100644
index 0000000..086cb69
--- /dev/null
+++ b/test/tests/capi/smoke/smokesubdir/faminc.xsl
@@ -0,0 +1,82 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template name="tree">
+   <xsl:param name="Surname" select="Default"/>
+
+   <xsl:element name="{$root}">
+   <xsl:element name="{substring-after($Surname,'The ')}">
+
+       <!-- Start with the Parents.-->
+	   <xsl:element name="Parents">
+	   <xsl:for-each select="Parents/Father | Parents/Mother">
+		  <xsl:element name="{name(.)}">
+		     <xsl:value-of select="."/>
+		  </xsl:element>
+	   </xsl:for-each>
+	   </xsl:element>
+
+	   <!-- Then the Children. -->
+       <xsl:element name="Children">
+	   <xsl:attribute name="number">
+	      <xsl:value-of select="count(Children/Child)"/>
+	   </xsl:attribute>
+	   <xsl:for-each select="Children/Child">
+		     <xsl:element name="{Personal_Information/Sex}">
+
+			  <xsl:attribute name="name">
+			     <xsl:value-of select="Basic_Information/Name/@First"/>
+			  </xsl:attribute>
+			  <xsl:choose>
+			  <xsl:when test="Personal_Information/Sex='Male'">
+				<xsl:attribute name="wife">
+					<xsl:value-of select="Personal_Information/Family_Information/Wife/Name/@First"/>
+				</xsl:attribute>
+			  </xsl:when>
+			  <xsl:when test="Personal_Information/Sex='Female'">
+				<xsl:attribute name="husband">
+					<xsl:value-of select="Personal_Information/Family_Information/Husband/Name/@First"/>
+				</xsl:attribute>
+			  </xsl:when>
+			  </xsl:choose>
+
+			  <xsl:attribute name="kids">
+				  <xsl:value-of select="count(Personal_Information/Family_Information/Kids/Kid)"/>
+			  </xsl:attribute>				
+
+			  <xsl:if test="count(Personal_Information/Family_Information/Kids/Kid)">
+			     <xsl:element name="Kids">
+			        <xsl:for-each select="Personal_Information/Family_Information/Kids/Kid">
+			           <xsl:element name="Grandkid"><xsl:value-of select="Name/@First"/></xsl:element>
+			        </xsl:for-each>
+			     </xsl:element>
+			  </xsl:if>
+			   
+			  <xsl:value-of select="Basic_Information/Name/@First"/>
+			 </xsl:element>
+	   </xsl:for-each>
+	   </xsl:element>
+
+   </xsl:element>
+   </xsl:element>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/capi/smoke/smokesubdir/grandkids.xml b/test/tests/capi/smoke/smokesubdir/grandkids.xml
new file mode 100644
index 0000000..836af62
--- /dev/null
+++ b/test/tests/capi/smoke/smokesubdir/grandkids.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<GrandKids>
+	<gkid>1</gkid>
+	<gkid>2</gkid>
+	<gkid>3</gkid>
+	<gkid>4</gkid>
+	<gkid>5</gkid>
+	<gkid>6</gkid>
+	<gkid>7</gkid>
+	<gkid>8</gkid>
+	<gkid>9</gkid>
+</GrandKids>
diff --git a/test/tests/conf-fail/output78.xml b/test/tests/conf-fail/output78.xml
new file mode 100644
index 0000000..98265d1
--- /dev/null
+++ b/test/tests/conf-fail/output78.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 

+<doc>

+  <foo>a</foo>

+</doc>
\ No newline at end of file
diff --git a/test/tests/conf-fail/output78.xsl b/test/tests/conf-fail/output78.xsl
new file mode 100644
index 0000000..8fb0e29
--- /dev/null
+++ b/test/tests/conf-fail/output78.xsl
Binary files differ
diff --git a/test/tests/conf-fail/output79.xml b/test/tests/conf-fail/output79.xml
new file mode 100644
index 0000000..dcae8f0
--- /dev/null
+++ b/test/tests/conf-fail/output79.xml
Binary files differ
diff --git a/test/tests/conf-fail/output79.xsl b/test/tests/conf-fail/output79.xsl
new file mode 100644
index 0000000..2c413e7
--- /dev/null
+++ b/test/tests/conf-fail/output79.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>

+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

+

+  <!-- FileName: output79 -->

+  <!-- Document: http://www.w3.org/TR/xslt -->

+  <!-- DocVersion: 19991116 -->

+  <!-- Section: 16.1 XML Output Method -->

+  <!-- Purpose: Test ISO-8859-6 encoding. -->

+

+<xsl:output encoding="ISO-8859-6"/>

+

+<xsl:template match="doc">

+  <out><xsl:text>&#10;</xsl:text>

+     <xsl:for-each select="test">

+		<xsl:value-of select="."/><xsl:text>&#10;</xsl:text>	

+     </xsl:for-each>

+  </out>

+</xsl:template>

+

+

+  <!--

+   * Licensed to the Apache Software Foundation (ASF) under one

+   * or more contributor license agreements. See the NOTICE file

+   * distributed with this work for additional information

+   * regarding copyright ownership. The ASF licenses this file

+   * to you 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.

+  -->

+

+</xsl:stylesheet>

diff --git a/test/tests/conf-gold/attribset/attribset01.out b/test/tests/conf-gold/attribset/attribset01.out
new file mode 100644
index 0000000..ddb20ae
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset02.out b/test/tests/conf-gold/attribset/attribset02.out
new file mode 100644
index 0000000..0f046b8
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 color="black" text-decoration="underline"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset03.out b/test/tests/conf-gold/attribset/attribset03.out
new file mode 100644
index 0000000..0791323
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test color="black" text-decoration="underline"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset04.out b/test/tests/conf-gold/attribset/attribset04.out
new file mode 100644
index 0000000..f7635e7
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset04.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+	<out><foo color="black" text-decoration="underline"/></out>
diff --git a/test/tests/conf-gold/attribset/attribset05.out b/test/tests/conf-gold/attribset/attribset05.out
new file mode 100644
index 0000000..85b1292
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 font-size="14pt" text-decoration="underline" color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset06.out b/test/tests/conf-gold/attribset/attribset06.out
new file mode 100644
index 0000000..fa9cce7
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 font-size="14pt" text-decoration="none" color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset07.out b/test/tests/conf-gold/attribset/attribset07.out
new file mode 100644
index 0000000..ddb20ae
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset08.out b/test/tests/conf-gold/attribset/attribset08.out
new file mode 100644
index 0000000..bd7ada8
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test font-size="14pt" text-decoration="none" color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset09.out b/test/tests/conf-gold/attribset/attribset09.out
new file mode 100644
index 0000000..2a4d034
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset09.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+	<out><foo font-size="14pt" text-decoration="none" color="black"/></out>
diff --git a/test/tests/conf-gold/attribset/attribset10.out b/test/tests/conf-gold/attribset/attribset10.out
new file mode 100644
index 0000000..ff55e52
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test font-size="14pt" color="black" text-decoration="none"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset11.out b/test/tests/conf-gold/attribset/attribset11.out
new file mode 100644
index 0000000..6a8aae4
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 color="black" font-size="10pt" font-weight="bold"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset12.out b/test/tests/conf-gold/attribset/attribset12.out
new file mode 100644
index 0000000..7d1ff44
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 color="black" font-size="24pt" font-weight="bold"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset13.out b/test/tests/conf-gold/attribset/attribset13.out
new file mode 100644
index 0000000..5553a75
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://ped.test.com" test1="LRE Attribute" ped:test2="LRE Attribute"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset14.out b/test/tests/conf-gold/attribset/attribset14.out
new file mode 100644
index 0000000..d10d81d
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ped:Out xmlns:ped="http://ped.test.com" test1="xsl:element Attribute" ped:test2="xsl:element Attribute"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset15.out b/test/tests/conf-gold/attribset/attribset15.out
new file mode 100644
index 0000000..3587d63
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://ped.test.com" xmlns:this="http://www.this.com" Att1="First" ped:Att2="Second"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset16.out b/test/tests/conf-gold/attribset/attribset16.out
new file mode 100644
index 0000000..626adcc
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset16.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:ped="http://ped.test.com">
+<Out xmlns:ns0="http://www.ns0.com" ns0:Attr0="Hello" Attr1="Whatsup" ped:Attr2="Goodbye"/></root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset17.out b/test/tests/conf-gold/attribset/attribset17.out
new file mode 100644
index 0000000..cc2d17e
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset17.out
@@ -0,0 +1,6 @@
+
+<HTML>
+<Form>Zoneone
+<Input Type="checkbox" CHECKED>
+</Form>
+</HTML> 
diff --git a/test/tests/conf-gold/attribset/attribset18.out b/test/tests/conf-gold/attribset/attribset18.out
new file mode 100644
index 0000000..f1cfab9
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset18.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:bdd="http://www.bdd.com" xmlns:ped="http://www.ped.com">
+<Out attr1="Hello" ped:attr1="Test2-OK" bdd:attr1="Test1-OK" attr2="Goodbye"/></root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset19.out b/test/tests/conf-gold/attribset/attribset19.out
new file mode 100644
index 0000000..c6b90f6
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out><Element1 Att1="OK"/></Out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset20.out b/test/tests/conf-gold/attribset/attribset20.out
new file mode 100644
index 0000000..2282f3b
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset20.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a
+  b
+
+  c
+  d
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset21.out b/test/tests/conf-gold/attribset/attribset21.out
new file mode 100644
index 0000000..d1a28e2
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset21.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <out><test format="bold"/></out>
diff --git a/test/tests/conf-gold/attribset/attribset22.out b/test/tests/conf-gold/attribset/attribset22.out
new file mode 100644
index 0000000..e27b48d
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out attr1="x&#10;&#9;  y"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset23.out b/test/tests/conf-gold/attribset/attribset23.out
new file mode 100644
index 0000000..1f5bc39
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root><Out xmlns:ns0="whatever" ns0:xsl="http://www.w3.org/1999/XSL/Transform"/></root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset24.out b/test/tests/conf-gold/attribset/attribset24.out
new file mode 100644
index 0000000..16e35cb
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:bdd="http://bdd.test.com"><jam xmlns:bdd="http://xyz.com" bdd:attr="jaminben"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset25.out b/test/tests/conf-gold/attribset/attribset25.out
new file mode 100644
index 0000000..2cd055e
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out test1="XYZ"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset26.out b/test/tests/conf-gold/attribset/attribset26.out
new file mode 100644
index 0000000..ce3a231
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset27.out b/test/tests/conf-gold/attribset/attribset27.out
new file mode 100644
index 0000000..fcc8dd5
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out font-size="14pt" color="black" text-decoration="none"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset28.out b/test/tests/conf-gold/attribset/attribset28.out
new file mode 100644
index 0000000..7f16e59
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc color="green"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset29.out b/test/tests/conf-gold/attribset/attribset29.out
new file mode 100644
index 0000000..3da5f5e
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out font-size="14pt" color="black" text-decoration="underline"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset30.out b/test/tests/conf-gold/attribset/attribset30.out
new file mode 100644
index 0000000..69ca341
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 format="bold"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset31.out b/test/tests/conf-gold/attribset/attribset31.out
new file mode 100644
index 0000000..b5a4a59
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><element1 font-size="14pt" color="black" text-decoration="none"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset32.out b/test/tests/conf-gold/attribset/attribset32.out
new file mode 100644
index 0000000..fefad67
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><element1 font-size="14pt" color="black" text-decoration="underline"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset33.out b/test/tests/conf-gold/attribset/attribset33.out
new file mode 100644
index 0000000..2aef4ae
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test font-size="14pt" text-decoration="underline" color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset34.out b/test/tests/conf-gold/attribset/attribset34.out
new file mode 100644
index 0000000..7e38642
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset34.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><element1 color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset35.out b/test/tests/conf-gold/attribset/attribset35.out
new file mode 100644
index 0000000..26839a3
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out><Element1 Att1="OK"><?my-pi type="text/css"?><Element2/></Element1></Out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset36.out b/test/tests/conf-gold/attribset/attribset36.out
new file mode 100644
index 0000000..b61421e
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out><Element1 Att1="OK"><!--Should not break--><Element2/></Element1></Out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset37.out b/test/tests/conf-gold/attribset/attribset37.out
new file mode 100644
index 0000000..7c1a210
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset37.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test color="green" text-decoration="underline"/>
+  <foocopy color="green" text-decoration="underline" font-size="14pt">a</foocopy>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset38.out b/test/tests/conf-gold/attribset/attribset38.out
new file mode 100644
index 0000000..7c1a210
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset38.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test color="green" text-decoration="underline"/>
+  <foocopy color="green" text-decoration="underline" font-size="14pt">a</foocopy>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset39.out b/test/tests/conf-gold/attribset/attribset39.out
new file mode 100644
index 0000000..eb0c718
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test _a_color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset40.out b/test/tests/conf-gold/attribset/attribset40.out
new file mode 100644
index 0000000..abb582e
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:bdd="http://bdd.test.com"><bdd:jam xmlns:ns0="http://xyz.com" ns0:attr="jaminben"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset41.out b/test/tests/conf-gold/attribset/attribset41.out
new file mode 100755
index 0000000..3f6fd0b
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset41.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out Alice="intoxicated" rabbithole="deep" wife="thumbelina" follow="yellowbrickroad" location="Wonderland"/>
+
diff --git a/test/tests/conf-gold/attribset/attribset42.out b/test/tests/conf-gold/attribset/attribset42.out
new file mode 100755
index 0000000..921db78
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out alice="intoxicated" rabbithole="deep" follow="theleader" location="Wonderland"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset43.out b/test/tests/conf-gold/attribset/attribset43.out
new file mode 100644
index 0000000..898b13e
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out follow="theleader" rabbithole="shallow" alice="intoxicated" location="Wonderland"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset44.out b/test/tests/conf-gold/attribset/attribset44.out
new file mode 100644
index 0000000..0883097
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out test="correct"/>
diff --git a/test/tests/conf-gold/attribset/attribset45.out b/test/tests/conf-gold/attribset/attribset45.out
new file mode 100644
index 0000000..307e764
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo baz="two"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset46.out b/test/tests/conf-gold/attribset/attribset46.out
new file mode 100644
index 0000000..f7be20c
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo baz="two" foo="ten" poo="twenty"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset47.out b/test/tests/conf-gold/attribset/attribset47.out
new file mode 100644
index 0000000..ddb20ae
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset48.out b/test/tests/conf-gold/attribset/attribset48.out
new file mode 100644
index 0000000..ddb20ae
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset48.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test1 color="black"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribset/attribset49.out b/test/tests/conf-gold/attribset/attribset49.out
new file mode 100644
index 0000000..c1fc1c0
--- /dev/null
+++ b/test/tests/conf-gold/attribset/attribset49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><e NoContent="" String0t="" String0v="" String0f=""/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate01.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate01.out
new file mode 100644
index 0000000..95b041b
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out test="hello"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate02.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate02.out
new file mode 100644
index 0000000..a1e6689
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out width="300" src="/images/headquarters.jpg"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate03.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate03.out
new file mode 100644
index 0000000..4d408a8
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out test="{"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate04.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate04.out
new file mode 100644
index 0000000..1fadd58
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out test="}"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate05.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate05.out
new file mode 100644
index 0000000..42c3459
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate05.out
@@ -0,0 +1 @@
+<HTML><a href="/cgi-bin/app?p_parm1=Out1"></a></HTML>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate06.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate06.out
new file mode 100644
index 0000000..945c0fa
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out y="before0after"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate08.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate08.out
new file mode 100644
index 0000000..c23bbea
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate08.out
@@ -0,0 +1,2 @@
+
+<out value="Consulta de Informaci&oacute;n">Consulta de Informaci&oacute;n</out>
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate09.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate09.out
new file mode 100644
index 0000000..3b30458
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><setvar value="" name="From"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate10.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate10.out
new file mode 100644
index 0000000..bfcafcf
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out z="BeforeFrontBackAfter"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate11.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate11.out
new file mode 100644
index 0000000..034ecae
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out z="BeforetrueAfter"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate12.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate12.out
new file mode 100644
index 0000000..36aeddd
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out style="{font:helvetica}"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/attribvaltemplate/attribvaltemplate13.out b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate13.out
new file mode 100644
index 0000000..a91ed38
--- /dev/null
+++ b/test/tests/conf-gold/attribvaltemplate/attribvaltemplate13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out href="pfu"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes01.out b/test/tests/conf-gold/axes/axes01.out
new file mode 100644
index 0000000..0e1b7d4
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-north north near-north </out>
diff --git a/test/tests/conf-gold/axes/axes02.out b/test/tests/conf-gold/axes/axes02.out
new file mode 100644
index 0000000..3da2000
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-north north near-north center </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes03.out b/test/tests/conf-gold/axes/axes03.out
new file mode 100644
index 0000000..931d5e6
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center-attr-1 center-attr-2 center-attr-3 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes04.out b/test/tests/conf-gold/axes/axes04.out
new file mode 100644
index 0000000..b83baed
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-south-east near-south near-south-west </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes05.out b/test/tests/conf-gold/axes/axes05.out
new file mode 100644
index 0000000..d48d22a
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-south-east near-south south far-south near-south-west </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes06.out b/test/tests/conf-gold/axes/axes06.out
new file mode 100644
index 0000000..3a9e66d
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center near-south-east near-south south far-south near-south-west </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes07.out b/test/tests/conf-gold/axes/axes07.out
new file mode 100644
index 0000000..d42edf5
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes07.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-east,
+east,
+far-east,
+way-out-yonder-east,
+out-yonder-east,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes08.out b/test/tests/conf-gold/axes/axes08.out
new file mode 100644
index 0000000..ea04704
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>way-out-yonder-westout-yonder-westfar-westwestnear-west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes09.out b/test/tests/conf-gold/axes/axes09.out
new file mode 100644
index 0000000..21c82c0
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes09.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-east,
+east,
+far-east,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes10.out b/test/tests/conf-gold/axes/axes10.out
new file mode 100644
index 0000000..7914d58
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-westwestnear-west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes100.out b/test/tests/conf-gold/axes/axes100.out
new file mode 100644
index 0000000..db15e78
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes100.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-north north near-north center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes101.out b/test/tests/conf-gold/axes/axes101.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes101.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes102.out b/test/tests/conf-gold/axes/axes102.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes102.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes103.out b/test/tests/conf-gold/axes/axes103.out
new file mode 100644
index 0000000..0ddfd40
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes103.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> north-north-west1 north-north-west2 far-west west near-west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes104.out b/test/tests/conf-gold/axes/axes104.out
new file mode 100644
index 0000000..8bb4d55
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes104.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>  Comment-2   Comment-3   Comment-4 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes105.out b/test/tests/conf-gold/axes/axes105.out
new file mode 100644
index 0000000..004555d
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes105.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> #text #text #text #text #text #text #text #text #text #text #text #text #text #text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes106.out b/test/tests/conf-gold/axes/axes106.out
new file mode 100644
index 0000000..5b77e85
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes106.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> pi-2 pi-3 pi-4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes107.out b/test/tests/conf-gold/axes/axes107.out
new file mode 100644
index 0000000..6a6d5b0
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes107.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>##north-north-west1##north-north-west2####a-pi#####a-pi###far-west##west##near-west####a-pi#</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes108.out b/test/tests/conf-gold/axes/axes108.out
new file mode 100644
index 0000000..fd01091
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes108.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> Comment-5 Comment-6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes109.out b/test/tests/conf-gold/axes/axes109.out
new file mode 100644
index 0000000..86ffbdb
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes109.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> d1 d2 c2 b2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes11.out b/test/tests/conf-gold/axes/axes11.out
new file mode 100644
index 0000000..158276e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-north</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes110.out b/test/tests/conf-gold/axes/axes110.out
new file mode 100644
index 0000000..e806ba9
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes110.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> pi-5 pi-6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes111.out b/test/tests/conf-gold/axes/axes111.out
new file mode 100644
index 0000000..cc7464d
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes111.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>##near-south-west####a-pi##near-south####a-pi##south##far-south####near-south-east###near-east##east##far-east####north-north-east1##north-north-east2#</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes112.out b/test/tests/conf-gold/axes/axes112.out
new file mode 100644
index 0000000..0cb1dbd
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes112.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> #text #text #text #text #text #text #text #text #text #text #text #text #text #text #text #text #text #text #text #text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes113.out b/test/tests/conf-gold/axes/axes113.out
new file mode 100644
index 0000000..6131acf
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes113.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>matched on node 36: 
+     Axis: parent::*:  22,
+     Axis: following::*:  37,38,23,39,3A,46,56,3B,24,3C,3D,3E,
+     Axis: following-sibling::*:  37,38,
+     Axis: preceding::*:  21,31,41,32,33,34,35,
+     Axis: preceding-sibling::*:  34,35,
+     Axis: child::*:  42,43,44,45,
+     Axis: descendant::*:  42,51,43,52,44,53,45,54,55,
+     Axis: descendant-or-self::*:  36,42,51,43,52,44,53,45,54,55,
+     Axis: ancestor::*:  11,22,
+     Axis: ancestor-or-self::*:  11,22,36,
+     Axis: attribute::* (sorted):  a1: 1, a2: 2, id: 36, </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes114.out b/test/tests/conf-gold/axes/axes114.out
new file mode 100644
index 0000000..9973026
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes114.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a, c</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes115.out b/test/tests/conf-gold/axes/axes115.out
new file mode 100644
index 0000000..9973026
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes115.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a, c</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes116.out b/test/tests/conf-gold/axes/axes116.out
new file mode 100644
index 0000000..0d625ba
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes116.out
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+ <out>
+  
+DS   1. AC: north
+DS   2. AD: near-north
+DS   3. BC: north
+DS   4. BD: near-north
+NDS  5. CC: north
+NDS  6. CD: near-north
+NDS  7. CE: near-north
+NDS  8. DC: near-north
+NDS  9. DD: far-west
+
+NDS 10. ACC: north
+NDS 11. ACE: near-north
+NDS 12. ADC: near-north
+NDS 13. BCC: north
+NDS 14. BCE: near-north
+NDS 15. BDC: far-west
+NDS 16. BDE: far-west
+NDS 17. CCC: north
+NDS 18. CCE: near-north
+NDS 19. CDC: near-north
+NDS 20. CDE: far-west
+NDS 21. CEC: near-north
+NDS 22. CEE: far-west
+NDS 23. DCC: near-north
+NDS 24. DCE: far-west
+NDS 25. DDC: far-west
+
+DS  26. CC: north
+DS  27. CD: near-north
+DS  28. CE: near-north
+DS  29. DC: near-north
+DS  30. DD: far-west
+
+DS  31. ACC: north
+DS  32. ACE: near-north
+DS  33. ADC: near-north
+DS  34. BCC: north
+DS  35. BCE: near-north
+DS  36. BDC: far-west
+DS  37. BDE: far-west
+DS  38. CCC: north
+DS  39. CCE: near-north
+DS  40. CDC: near-north
+DS  41. CDE: far-west
+DS  42. CEC: near-north
+DS  43. CEE: far-west
+DS  44. DCC: near-north
+DS  45. DCE: far-west
+DS  46. DDC: far-west</out>
diff --git a/test/tests/conf-gold/axes/axes117.out b/test/tests/conf-gold/axes/axes117.out
new file mode 100644
index 0000000..cf5e7c3
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes117.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out>
+<all-attribs>16</all-attribs>
+<all-titles>12</all-titles>
+<all-sect-attribs>14</all-sect-attribs>
+<all-sect-titles>11</all-sect-titles>
+<chap-attribs>16</chap-attribs>
+<chap-titles>12</chap-titles>
+<sect-1-attribs>5</sect-1-attribs>
+<sect-1-titles>3</sect-1-titles>
+<sect-2-attribs>4</sect-2-attribs>
+<sect-2-titles>4</sect-2-titles>
+<sect-3-attribs>5</sect-3-attribs>
+<sect-3-titles>4</sect-3-titles>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes119.out b/test/tests/conf-gold/axes/axes119.out
new file mode 100644
index 0000000..3da2000
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes119.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-north north near-north center </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes12.out b/test/tests/conf-gold/axes/axes12.out
new file mode 100644
index 0000000..a95d87e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes120.out b/test/tests/conf-gold/axes/axes120.out
new file mode 100644
index 0000000..3464376
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes120.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:a="name-a" xmlns:b="name-b" xmlns:c="namc-c">
+
+<a:root/>
+	<a>name-a</a>,
+	<xml>http://www.w3.org/XML/1998/namespace</xml>,
+
+<b:sub/>
+	<a>name-a</a>,
+	<b>name-b</b>,
+	<xml>http://www.w3.org/XML/1998/namespace</xml>,
+
+<c:sub/>
+	<a>name-a</a>,
+	<c>name-c</c>,
+	<xml>http://www.w3.org/XML/1998/namespace</xml>,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes121.out b/test/tests/conf-gold/axes/axes121.out
new file mode 100644
index 0000000..0b7516f
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes121.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-north north near-north far-west west near-west center
+near-south south near-south-west near-east east far-east </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes122.out b/test/tests/conf-gold/axes/axes122.out
new file mode 100644
index 0000000..7cb8833
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes122.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>From root: 5
+From doc: 5= e, a, a; 
+From baz: 5= e, e, a, e, a; 
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes123.out b/test/tests/conf-gold/axes/axes123.out
new file mode 100644
index 0000000..158276e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes123.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-north</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes124.out b/test/tests/conf-gold/axes/axes124.out
new file mode 100644
index 0000000..2d996ce
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes124.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Center Comment</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes125.out b/test/tests/conf-gold/axes/axes125.out
new file mode 100644
index 0000000..0399716
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes125.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> (D
+  ), connection (),  (C
+  ),  (S
+    ), </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes126.out b/test/tests/conf-gold/axes/axes126.out
new file mode 100644
index 0000000..2f07903
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes126.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> (D
+  ),  ( Comment 1 ),  (
+  ), connection (),  (C
+  ), a-pi (pi-1),  (
+  ),  (S
+    ),  ( Comment 2 ),  (
+    ), a-pi (pi-2),  (
+    ), </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes127.out b/test/tests/conf-gold/axes/axes127.out
new file mode 100644
index 0000000..44a5f6d
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes127.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> (I
+  ),  (X
+  ), connection (),  (C
+), </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes128.out b/test/tests/conf-gold/axes/axes128.out
new file mode 100644
index 0000000..2f07903
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes128.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> (D
+  ),  ( Comment 1 ),  (
+  ), connection (),  (C
+  ), a-pi (pi-1),  (
+  ),  (S
+    ),  ( Comment 2 ),  (
+    ), a-pi (pi-2),  (
+    ), </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes129.out b/test/tests/conf-gold/axes/axes129.out
new file mode 100644
index 0000000..d41fa9e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes129.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<ns-count count="0" attr="x"/>
+<ns-count count="0" attr="test:y"/>
+<ns-count count="0" attr="jad:z"/>
+</out>
diff --git a/test/tests/conf-gold/axes/axes13.out b/test/tests/conf-gold/axes/axes13.out
new file mode 100644
index 0000000..8191565
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes13.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>doc/foo/baz/is new
+doc/foo/baz/is new but has text
+doc/foo/baz/is not new
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes130.out b/test/tests/conf-gold/axes/axes130.out
new file mode 100644
index 0000000..ba9e36e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes130.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<any-node>true</any-node>
+<any-elem>false</any-elem>
+<any-text>false</any-text>
+<named>false</named>
+</out>
diff --git a/test/tests/conf-gold/axes/axes131.out b/test/tests/conf-gold/axes/axes131.out
new file mode 100644
index 0000000..93422dc
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes131.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<child number="1">
+<grandchild number="1" descendantaxiscount="1" descendantorselfaxiscount="2"/>
+<grandchild number="2" descendantaxiscount="3" descendantorselfaxiscount="4"/>
+</child>
+<child number="2">
+<grandchild number="1" descendantaxiscount="3" descendantorselfaxiscount="4"/>
+</child>
+<child number="3">
+<grandchild number="1" descendantaxiscount="1" descendantorselfaxiscount="2"/>
+</child>
+<child number="4">
+<grandchild number="1" descendantaxiscount="0" descendantorselfaxiscount="1"/>
+</child>
+<child number="5">
+<grandchild number="1" descendantaxiscount="0" descendantorselfaxiscount="1"/>
+<grandchild number="2" descendantaxiscount="0" descendantorselfaxiscount="1"/>
+</child>
+<child number="6">
+</child>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes14.out b/test/tests/conf-gold/axes/axes14.out
new file mode 100644
index 0000000..9973026
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a, c</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes15.out b/test/tests/conf-gold/axes/axes15.out
new file mode 100644
index 0000000..6912526
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes15.out
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out>From root: 
+ancestors: 
+preceding: 
+self: 
+descendant: a b c d e f g h i j k l m n o p 
+following: 
+------------------------------------------------
+<From-a>
+ancestors: 
+preceding: 
+self: a 
+descendant: b c d e f g h i j k l m n o p 
+following: </From-a>
+------------------------------------------------
+<From-b>
+ancestors: a 
+preceding: 
+self: b 
+descendant: c d e f g h i j 
+following: k l m n o p </From-b>
+------------------------------------------------
+<From-c>
+ancestors: a b 
+preceding: 
+self: c 
+descendant: 
+following: d e f g h i j k l m n o p </From-c>
+------------------------------------------------
+<From-d>
+ancestors: a b 
+preceding: c 
+self: d 
+descendant: e f 
+following: g h i j k l m n o p </From-d>
+------------------------------------------------
+<From-e>
+ancestors: a b d 
+preceding: c 
+self: e 
+descendant: 
+following: f g h i j k l m n o p </From-e>
+------------------------------------------------
+<From-f>
+ancestors: a b d 
+preceding: c e 
+self: f 
+descendant: 
+following: g h i j k l m n o p </From-f>
+------------------------------------------------
+<From-g>
+ancestors: a b 
+preceding: c d e f 
+self: g 
+descendant: h i j 
+following: k l m n o p </From-g>
+------------------------------------------------
+<From-h>
+ancestors: a b g 
+preceding: c d e f 
+self: h 
+descendant: i j 
+following: k l m n o p </From-h>
+------------------------------------------------
+<From-i>
+ancestors: a b g h 
+preceding: c d e f 
+self: i 
+descendant: 
+following: j k l m n o p </From-i>
+------------------------------------------------
+<From-j>
+ancestors: a b g h 
+preceding: c d e f i 
+self: j 
+descendant: 
+following: k l m n o p </From-j>
+------------------------------------------------
+<From-k>
+ancestors: a 
+preceding: b c d e f g h i j 
+self: k 
+descendant: l m n o p 
+following: </From-k>
+------------------------------------------------
+<From-l>
+ancestors: a k 
+preceding: b c d e f g h i j 
+self: l 
+descendant: m n 
+following: o p </From-l>
+------------------------------------------------
+<From-m>
+ancestors: a k l 
+preceding: b c d e f g h i j 
+self: m 
+descendant: 
+following: n o p </From-m>
+------------------------------------------------
+<From-n>
+ancestors: a k l 
+preceding: b c d e f g h i j m 
+self: n 
+descendant: 
+following: o p </From-n>
+------------------------------------------------
+<From-o>
+ancestors: a k 
+preceding: b c d e f g h i j l m n 
+self: o 
+descendant: 
+following: p </From-o>
+------------------------------------------------
+<From-p>
+ancestors: a k 
+preceding: b c d e f g h i j l m n o 
+self: p 
+descendant: 
+following: </From-p></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes16.out b/test/tests/conf-gold/axes/axes16.out
new file mode 100644
index 0000000..e5d0763
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-north</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes17.out b/test/tests/conf-gold/axes/axes17.out
new file mode 100644
index 0000000..a95d87e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes18.out b/test/tests/conf-gold/axes/axes18.out
new file mode 100644
index 0000000..d856ac3
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center-attr-2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes19.out b/test/tests/conf-gold/axes/axes19.out
new file mode 100644
index 0000000..931d5e6
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center-attr-1 center-attr-2 center-attr-3 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes20.out b/test/tests/conf-gold/axes/axes20.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes21.out b/test/tests/conf-gold/axes/axes21.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes22.out b/test/tests/conf-gold/axes/axes22.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes23.out b/test/tests/conf-gold/axes/axes23.out
new file mode 100644
index 0000000..fbb185c
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-south</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes24.out b/test/tests/conf-gold/axes/axes24.out
new file mode 100644
index 0000000..fbb185c
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-south</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes25.out b/test/tests/conf-gold/axes/axes25.out
new file mode 100644
index 0000000..06fb9bf
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>south</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes26.out b/test/tests/conf-gold/axes/axes26.out
new file mode 100644
index 0000000..fbb185c
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-south</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes27.out b/test/tests/conf-gold/axes/axes27.out
new file mode 100644
index 0000000..a95d87e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes28.out b/test/tests/conf-gold/axes/axes28.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes29.out b/test/tests/conf-gold/axes/axes29.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes30.out b/test/tests/conf-gold/axes/axes30.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes31.out b/test/tests/conf-gold/axes/axes31.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes32.out b/test/tests/conf-gold/axes/axes32.out
new file mode 100644
index 0000000..137ddc8
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes33.out b/test/tests/conf-gold/axes/axes33.out
new file mode 100644
index 0000000..137ddc8
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes34.out b/test/tests/conf-gold/axes/axes34.out
new file mode 100644
index 0000000..82b3ba6
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes34.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes35.out b/test/tests/conf-gold/axes/axes35.out
new file mode 100644
index 0000000..82b3ba6
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes36.out b/test/tests/conf-gold/axes/axes36.out
new file mode 100644
index 0000000..158276e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-north</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes37.out b/test/tests/conf-gold/axes/axes37.out
new file mode 100644
index 0000000..158276e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-north</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes38.out b/test/tests/conf-gold/axes/axes38.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes39.out b/test/tests/conf-gold/axes/axes39.out
new file mode 100644
index 0000000..158276e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-north</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes40.out b/test/tests/conf-gold/axes/axes40.out
new file mode 100644
index 0000000..a95d87e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes41.out b/test/tests/conf-gold/axes/axes41.out
new file mode 100644
index 0000000..a95d87e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes42.out b/test/tests/conf-gold/axes/axes42.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes43.out b/test/tests/conf-gold/axes/axes43.out
new file mode 100644
index 0000000..a95d87e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes44.out b/test/tests/conf-gold/axes/axes44.out
new file mode 100644
index 0000000..d856ac3
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center-attr-2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes45.out b/test/tests/conf-gold/axes/axes45.out
new file mode 100644
index 0000000..d856ac3
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center-attr-2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes46.out b/test/tests/conf-gold/axes/axes46.out
new file mode 100644
index 0000000..6308fc3
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>22</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes47.out b/test/tests/conf-gold/axes/axes47.out
new file mode 100644
index 0000000..3f1ae69
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>cbaacbaa</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes48.out b/test/tests/conf-gold/axes/axes48.out
new file mode 100644
index 0000000..06fb9bf
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes48.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>south</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes49.out b/test/tests/conf-gold/axes/axes49.out
new file mode 100644
index 0000000..9c8fee3
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>south far-south </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes50.out b/test/tests/conf-gold/axes/axes50.out
new file mode 100644
index 0000000..9c8fee3
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes50.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>south far-south </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes51.out b/test/tests/conf-gold/axes/axes51.out
new file mode 100644
index 0000000..d48d22a
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-south-east near-south south far-south near-south-west </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes52.out b/test/tests/conf-gold/axes/axes52.out
new file mode 100644
index 0000000..d48d22a
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes52.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-south-east near-south south far-south near-south-west </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes53.out b/test/tests/conf-gold/axes/axes53.out
new file mode 100644
index 0000000..d48d22a
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-south-east near-south south far-south near-south-west </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes54.out b/test/tests/conf-gold/axes/axes54.out
new file mode 100644
index 0000000..b83baed
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-south-east near-south near-south-west </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes55.out b/test/tests/conf-gold/axes/axes55.out
new file mode 100644
index 0000000..d48d22a
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-south-east near-south south far-south near-south-west </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes56.out b/test/tests/conf-gold/axes/axes56.out
new file mode 100644
index 0000000..5c406e1
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xxchild xxchild childofxx xxsub xxsubsub </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes57.out b/test/tests/conf-gold/axes/axes57.out
new file mode 100644
index 0000000..5cad23b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes57.out
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test for source tree depth
+Level A
+Level B
+Level C
+Level D
+Level E
+Level F
+Level G
+Level H
+Level I
+Level J
+Level K
+Level L
+Level M
+Level N
+Level O
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes58.out b/test/tests/conf-gold/axes/axes58.out
new file mode 100644
index 0000000..65170ec
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes58.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="http://www.ped.com">x y z ay az by bz </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes59.out b/test/tests/conf-gold/axes/axes59.out
new file mode 100644
index 0000000..24c8e2e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes59.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>doc #1: 
+<bdd>http://buster.com</bdd><ext>http://somebody.elses.extension</ext><jad>http://administrator.com</jad><java>http://xml.apache.org/xslt/java</java><ped>http://tester.com</ped><xml>http://www.w3.org/XML/1998/namespace</xml>
+doc #2: 
+<xml>http://www.w3.org/XML/1998/namespace</xml>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes60.out b/test/tests/conf-gold/axes/axes60.out
new file mode 100644
index 0000000..931d5e6
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes60.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center-attr-1 center-attr-2 center-attr-3 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes61.out b/test/tests/conf-gold/axes/axes61.out
new file mode 100644
index 0000000..8b90925
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>far-west west near-west center near-east east far-east </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes62.out b/test/tests/conf-gold/axes/axes62.out
new file mode 100644
index 0000000..24c7644
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes62.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<ped>http://tester.com</ped>
+<bdd>http://buster.com</bdd>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes63.out b/test/tests/conf-gold/axes/axes63.out
new file mode 100644
index 0000000..a95d87e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes64.out b/test/tests/conf-gold/axes/axes64.out
new file mode 100644
index 0000000..a95d87e
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes64.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes65.out b/test/tests/conf-gold/axes/axes65.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes65.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes66.out b/test/tests/conf-gold/axes/axes66.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes66.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes67.out b/test/tests/conf-gold/axes/axes67.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes67.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes68.out b/test/tests/conf-gold/axes/axes68.out
new file mode 100644
index 0000000..c2f7789
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes68.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><docs><xml>http://www.w3.org/XML/1998/namespace</xml></docs>
+  <doc><ext>http://somebody.elses.extension</ext><xml>http://www.w3.org/XML/1998/namespace</xml></doc>
+    <section><ext>http://somebody.elses.extension</ext><foo>http://foo.com</foo><xml>http://www.w3.org/XML/1998/namespace</xml></section>
+      <inner><ext>http://somebody.elses.extension</ext><foo>http://foo.com</foo><whiz>http://whiz.com/special/page</whiz><xml>http://www.w3.org/XML/1998/namespace</xml></inner>
+    
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes69.out b/test/tests/conf-gold/axes/axes69.out
new file mode 100644
index 0000000..32c4766
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes69.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+From far-west: west near-west center near-east east far-east
+From west: near-west center near-east east far-east
+From near-west: center near-east east far-east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes70.out b/test/tests/conf-gold/axes/axes70.out
new file mode 100644
index 0000000..6849e54
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes70.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> west near-west center near-east east far-east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes71.out b/test/tests/conf-gold/axes/axes71.out
new file mode 100644
index 0000000..44c671d
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes71.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> near-west center near-east east far-east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes72.out b/test/tests/conf-gold/axes/axes72.out
new file mode 100644
index 0000000..b2e3095
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes72.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes73.out b/test/tests/conf-gold/axes/axes73.out
new file mode 100644
index 0000000..2815091
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes73.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes74.out b/test/tests/conf-gold/axes/axes74.out
new file mode 100644
index 0000000..a722bc6
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes74.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+From near-east: far-west west near-west center
+From east: far-west west near-west center near-east
+From far-east: far-west west near-west center near-east east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes75.out b/test/tests/conf-gold/axes/axes75.out
new file mode 100644
index 0000000..70b8416
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes75.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-west west near-west center near-east east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes76.out b/test/tests/conf-gold/axes/axes76.out
new file mode 100644
index 0000000..8cb9d71
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes76.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-west west near-west center near-east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes77.out b/test/tests/conf-gold/axes/axes77.out
new file mode 100644
index 0000000..4aeb4ce
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes77.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes78.out b/test/tests/conf-gold/axes/axes78.out
new file mode 100644
index 0000000..ad7d5d6
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes78.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes79.out b/test/tests/conf-gold/axes/axes79.out
new file mode 100644
index 0000000..fc6bcd6
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes79.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>north-north-west2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes80.out b/test/tests/conf-gold/axes/axes80.out
new file mode 100644
index 0000000..ab1fe93
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes80.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> north-north-east1 north-north-east2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes81.out b/test/tests/conf-gold/axes/axes81.out
new file mode 100644
index 0000000..137ddc8
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes81.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes82.out b/test/tests/conf-gold/axes/axes82.out
new file mode 100644
index 0000000..e2c362b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes82.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-north north-north-west1 north-north-west2 north near-north far-west west near-west center near-south-west near-south south far-south near-south-east near-east east far-east north-north-east1 north-north-east2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes83.out b/test/tests/conf-gold/axes/axes83.out
new file mode 100644
index 0000000..0f065c9
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes83.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-north north near-north center near-south south</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes84.out b/test/tests/conf-gold/axes/axes84.out
new file mode 100644
index 0000000..bda36c2
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes84.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-north north near-north center near-south</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes85.out b/test/tests/conf-gold/axes/axes85.out
new file mode 100644
index 0000000..bda36c2
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes85.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-north north near-north center near-south</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes86.out b/test/tests/conf-gold/axes/axes86.out
new file mode 100644
index 0000000..60cf83c
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes86.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> north-north-west1 north-north-west2 far-west west near-west near-east east far-east north-north-east1 north-north-east2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes87.out b/test/tests/conf-gold/axes/axes87.out
new file mode 100644
index 0000000..db15e78
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes87.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-north north near-north center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes88.out b/test/tests/conf-gold/axes/axes88.out
new file mode 100644
index 0000000..1ad445f
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes88.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> near-south-west near-south south far-south near-south-east near-east east far-east north-north-east1 north-north-east2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes89.out b/test/tests/conf-gold/axes/axes89.out
new file mode 100644
index 0000000..0ddfd40
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes89.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> north-north-west1 north-north-west2 far-west west near-west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes90.out b/test/tests/conf-gold/axes/axes90.out
new file mode 100644
index 0000000..058d7ee
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes90.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-west west near-west near-east east far-east</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes91.out b/test/tests/conf-gold/axes/axes91.out
new file mode 100644
index 0000000..2e475ff
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes91.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> north-north-east2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes92.out b/test/tests/conf-gold/axes/axes92.out
new file mode 100644
index 0000000..035a482
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes92.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> near-north near-south-west</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes93.out b/test/tests/conf-gold/axes/axes93.out
new file mode 100644
index 0000000..ebcfdc0
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes93.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> center-attr-1 center-attr-2 center-attr-3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes94.out b/test/tests/conf-gold/axes/axes94.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes94.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes95.out b/test/tests/conf-gold/axes/axes95.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes95.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes96.out b/test/tests/conf-gold/axes/axes96.out
new file mode 100644
index 0000000..9a32557
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes96.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes97.out b/test/tests/conf-gold/axes/axes97.out
new file mode 100644
index 0000000..db15e78
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes97.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> far-north north near-north center</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes98.out b/test/tests/conf-gold/axes/axes98.out
new file mode 100644
index 0000000..0d9866b
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes98.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    1. center-attr-1 center-attr-2 center-attr-3
+
+    2. center-attr-1 center-attr-2 center-attr-3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/axes/axes99.out b/test/tests/conf-gold/axes/axes99.out
new file mode 100644
index 0000000..ebcfdc0
--- /dev/null
+++ b/test/tests/conf-gold/axes/axes99.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> center-attr-1 center-attr-2 center-attr-3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean01.out b/test/tests/conf-gold/boolean/boolean01.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean02.out b/test/tests/conf-gold/boolean/boolean02.out
new file mode 100644
index 0000000..50fe65c
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean03.out b/test/tests/conf-gold/boolean/boolean03.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean04.out b/test/tests/conf-gold/boolean/boolean04.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean05.out b/test/tests/conf-gold/boolean/boolean05.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean06.out b/test/tests/conf-gold/boolean/boolean06.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean07.out b/test/tests/conf-gold/boolean/boolean07.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean08.out b/test/tests/conf-gold/boolean/boolean08.out
new file mode 100644
index 0000000..dbb73d3
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true, true, true, true, false, false, </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean09.out b/test/tests/conf-gold/boolean/boolean09.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean10.out b/test/tests/conf-gold/boolean/boolean10.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean11.out b/test/tests/conf-gold/boolean/boolean11.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean12.out b/test/tests/conf-gold/boolean/boolean12.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean13.out b/test/tests/conf-gold/boolean/boolean13.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean14.out b/test/tests/conf-gold/boolean/boolean14.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean15.out b/test/tests/conf-gold/boolean/boolean15.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean16.out b/test/tests/conf-gold/boolean/boolean16.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean17.out b/test/tests/conf-gold/boolean/boolean17.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean18.out b/test/tests/conf-gold/boolean/boolean18.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean19.out b/test/tests/conf-gold/boolean/boolean19.out
new file mode 100644
index 0000000..1ab2a08
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean20.out b/test/tests/conf-gold/boolean/boolean20.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean21.out b/test/tests/conf-gold/boolean/boolean21.out
new file mode 100644
index 0000000..1ab2a08
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean22.out b/test/tests/conf-gold/boolean/boolean22.out
new file mode 100644
index 0000000..1ab2a08
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean23.out b/test/tests/conf-gold/boolean/boolean23.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean24.out b/test/tests/conf-gold/boolean/boolean24.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean25.out b/test/tests/conf-gold/boolean/boolean25.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean26.out b/test/tests/conf-gold/boolean/boolean26.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean27.out b/test/tests/conf-gold/boolean/boolean27.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean28.out b/test/tests/conf-gold/boolean/boolean28.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean29.out b/test/tests/conf-gold/boolean/boolean29.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean30.out b/test/tests/conf-gold/boolean/boolean30.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean31.out b/test/tests/conf-gold/boolean/boolean31.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean32.out b/test/tests/conf-gold/boolean/boolean32.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean33.out b/test/tests/conf-gold/boolean/boolean33.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean34.out b/test/tests/conf-gold/boolean/boolean34.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean34.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean35.out b/test/tests/conf-gold/boolean/boolean35.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean36.out b/test/tests/conf-gold/boolean/boolean36.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean37.out b/test/tests/conf-gold/boolean/boolean37.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean38.out b/test/tests/conf-gold/boolean/boolean38.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean39.out b/test/tests/conf-gold/boolean/boolean39.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean40.out b/test/tests/conf-gold/boolean/boolean40.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean41.out b/test/tests/conf-gold/boolean/boolean41.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean42.out b/test/tests/conf-gold/boolean/boolean42.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean43.out b/test/tests/conf-gold/boolean/boolean43.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean44.out b/test/tests/conf-gold/boolean/boolean44.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean45.out b/test/tests/conf-gold/boolean/boolean45.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean46.out b/test/tests/conf-gold/boolean/boolean46.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean47.out b/test/tests/conf-gold/boolean/boolean47.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean48.out b/test/tests/conf-gold/boolean/boolean48.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean48.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean49.out b/test/tests/conf-gold/boolean/boolean49.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean50.out b/test/tests/conf-gold/boolean/boolean50.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean50.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean51.out b/test/tests/conf-gold/boolean/boolean51.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean52.out b/test/tests/conf-gold/boolean/boolean52.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean52.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean53.out b/test/tests/conf-gold/boolean/boolean53.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean54.out b/test/tests/conf-gold/boolean/boolean54.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean55.out b/test/tests/conf-gold/boolean/boolean55.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean56.out b/test/tests/conf-gold/boolean/boolean56.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean57.out b/test/tests/conf-gold/boolean/boolean57.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean57.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean58.out b/test/tests/conf-gold/boolean/boolean58.out
new file mode 100644
index 0000000..86418ab
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean58.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>truefalse truetrue</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean59.out b/test/tests/conf-gold/boolean/boolean59.out
new file mode 100644
index 0000000..8223deb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean59.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>falsetrue falsetrue</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean60.out b/test/tests/conf-gold/boolean/boolean60.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean60.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean61.out b/test/tests/conf-gold/boolean/boolean61.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean62.out b/test/tests/conf-gold/boolean/boolean62.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean62.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean63.out b/test/tests/conf-gold/boolean/boolean63.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean64.out b/test/tests/conf-gold/boolean/boolean64.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean64.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean65.out b/test/tests/conf-gold/boolean/boolean65.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean65.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean66.out b/test/tests/conf-gold/boolean/boolean66.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean66.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean67.out b/test/tests/conf-gold/boolean/boolean67.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean67.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean68.out b/test/tests/conf-gold/boolean/boolean68.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean68.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean69.out b/test/tests/conf-gold/boolean/boolean69.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean69.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean70.out b/test/tests/conf-gold/boolean/boolean70.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean70.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean71.out b/test/tests/conf-gold/boolean/boolean71.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean71.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean72.out b/test/tests/conf-gold/boolean/boolean72.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean72.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean73.out b/test/tests/conf-gold/boolean/boolean73.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean73.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean74.out b/test/tests/conf-gold/boolean/boolean74.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean74.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean75.out b/test/tests/conf-gold/boolean/boolean75.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean75.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean76.out b/test/tests/conf-gold/boolean/boolean76.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean76.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean77.out b/test/tests/conf-gold/boolean/boolean77.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean77.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean78.out b/test/tests/conf-gold/boolean/boolean78.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean78.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean79.out b/test/tests/conf-gold/boolean/boolean79.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean79.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean80.out b/test/tests/conf-gold/boolean/boolean80.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean80.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean81.out b/test/tests/conf-gold/boolean/boolean81.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean81.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean82.out b/test/tests/conf-gold/boolean/boolean82.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean82.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean83.out b/test/tests/conf-gold/boolean/boolean83.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean83.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean84.out b/test/tests/conf-gold/boolean/boolean84.out
new file mode 100644
index 0000000..d353225
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean84.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><e>true</e><ne>false</ne><n>true</n><nn>false</nn>
+<e>true</e><ne>false</ne><n>true</n><nn>false</nn></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean85.out b/test/tests/conf-gold/boolean/boolean85.out
new file mode 100644
index 0000000..75c2e3e
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean85.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><e>true</e><ne>false</ne><n>false</n><nn>true</nn>
+<e>true</e><ne>false</ne><n>false</n><nn>true</nn></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean86.out b/test/tests/conf-gold/boolean/boolean86.out
new file mode 100644
index 0000000..d9af9e5
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean86.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><e>false</e><ne>true</ne><n>true</n><nn>false</nn>
+<e>false</e><ne>true</ne><n>true</n><nn>false</nn></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean87.out b/test/tests/conf-gold/boolean/boolean87.out
new file mode 100644
index 0000000..31d9119
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean87.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><nt>true</nt><nnt>false</nnt><tn>true</tn><tnn>false</tnn>
+<et>false</et><ent>true</ent><te>false</te><tne>true</tne></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean88.out b/test/tests/conf-gold/boolean/boolean88.out
new file mode 100644
index 0000000..f876828
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean88.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><es>true</es><ns>false</ns><se>true</se><sn>false</sn></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean89.out b/test/tests/conf-gold/boolean/boolean89.out
new file mode 100644
index 0000000..9a3f17f
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean89.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><en>true</en><nn>false</nn><ne>true</ne><nn>false</nn></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/boolean/boolean90.out b/test/tests/conf-gold/boolean/boolean90.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/boolean/boolean90.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional01.out b/test/tests/conf-gold/conditional/conditional01.out
new file mode 100644
index 0000000..7ca5066
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional01.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Male: John
+Female: Jane
+Who knows?: Hermaphrodite
+Who knows?: Prince</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional02.out b/test/tests/conf-gold/conditional/conditional02.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional03.out b/test/tests/conf-gold/conditional/conditional03.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional04.out b/test/tests/conf-gold/conditional/conditional04.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional05.out b/test/tests/conf-gold/conditional/conditional05.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional06.out b/test/tests/conf-gold/conditional/conditional06.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional07.out b/test/tests/conf-gold/conditional/conditional07.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional08.out b/test/tests/conf-gold/conditional/conditional08.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional09.out b/test/tests/conf-gold/conditional/conditional09.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional10.out b/test/tests/conf-gold/conditional/conditional10.out
new file mode 100644
index 0000000..1d9b875
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>number string</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional11.out b/test/tests/conf-gold/conditional/conditional11.out
new file mode 100644
index 0000000..3c022ea
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>StringConstant</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional12.out b/test/tests/conf-gold/conditional/conditional12.out
new file mode 100644
index 0000000..4aa1b04
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found b  Found b  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional13.out b/test/tests/conf-gold/conditional/conditional13.out
new file mode 100644
index 0000000..ac36c7a
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>not_b not_b not_b </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional14.out b/test/tests/conf-gold/conditional/conditional14.out
new file mode 100644
index 0000000..7aa0140
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional14.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Harry, he is 45 years old.
+Tom, he is 30 years old.
+Dick, he is 40 years old.
+Paulette, she is 38 years old.
+Peter, he is 34 years old.
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional15.out b/test/tests/conf-gold/conditional/conditional15.out
new file mode 100644
index 0000000..42f0c3c
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Success1Success2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional16.out b/test/tests/conf-gold/conditional/conditional16.out
new file mode 100644
index 0000000..67bc4ca
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional16.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+
+
+John Smith
+Joe Smith
+
+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional17.out b/test/tests/conf-gold/conditional/conditional17.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional18.out b/test/tests/conf-gold/conditional/conditional18.out
new file mode 100644
index 0000000..19215b1
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found b!</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional19.out b/test/tests/conf-gold/conditional/conditional19.out
new file mode 100644
index 0000000..04bd883
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>TREE: *A+B+B+C-B+C+D|*A+B+C:C:C+D+E-*A+B+C+D:D+E-D+E-C:C+D-C-B+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional20.out b/test/tests/conf-gold/conditional/conditional20.out
new file mode 100644
index 0000000..c14a945
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found the first one.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional21.out b/test/tests/conf-gold/conditional/conditional21.out
new file mode 100644
index 0000000..57e6436
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test executed successfully.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional22.out b/test/tests/conf-gold/conditional/conditional22.out
new file mode 100644
index 0000000..57e6436
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test executed successfully.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conditional/conditional23.out b/test/tests/conf-gold/conditional/conditional23.out
new file mode 100644
index 0000000..aacff7c
--- /dev/null
+++ b/test/tests/conf-gold/conditional/conditional23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test executed successfully</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres01.out b/test/tests/conf-gold/conflictres/conflictres01.out
new file mode 100644
index 0000000..5be3bf3
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-of-qualified-name</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres02.out b/test/tests/conf-gold/conflictres/conflictres02.out
new file mode 100644
index 0000000..5848eb2
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-of-wildcard</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres03.out b/test/tests/conf-gold/conflictres/conflictres03.out
new file mode 100644
index 0000000..6cd1286
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-of-node-type</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres04.out b/test/tests/conf-gold/conflictres/conflictres04.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres05.out b/test/tests/conf-gold/conflictres/conflictres05.out
new file mode 100644
index 0000000..2448cc0
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match of non-simple '/'</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres06.out b/test/tests/conf-gold/conflictres/conflictres06.out
new file mode 100644
index 0000000..647f82f
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-on-node-name,Match-predicated-node-name</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres07.out b/test/tests/conf-gold/conflictres/conflictres07.out
new file mode 100644
index 0000000..0866d7f
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-of-non-simple '/'</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres08.out b/test/tests/conf-gold/conflictres/conflictres08.out
new file mode 100644
index 0000000..d5e5aae
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-of-non-simple '[...]'</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres09.out b/test/tests/conf-gold/conflictres/conflictres09.out
new file mode 100644
index 0000000..d082300
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>In Include: Testing 1 2 3 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres10.out b/test/tests/conf-gold/conflictres/conflictres10.out
new file mode 100644
index 0000000..6e17881
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres10.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  Second Match-of-wildcard
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres11.out b/test/tests/conf-gold/conflictres/conflictres11.out
new file mode 100644
index 0000000..aded69c
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-of-node,Match-of-text,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres12.out b/test/tests/conf-gold/conflictres/conflictres12.out
new file mode 100644
index 0000000..7ac5265
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres12.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    Child,
+    Child,Descendant,
+    Descendant,
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres13.out b/test/tests/conf-gold/conflictres/conflictres13.out
new file mode 100644
index 0000000..7780dd8
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres13.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a:
+    b:c-Wildcard-middle,
+    b:d-Wildcard-last,
+    e:c-Wildcard-middle,
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres14.out b/test/tests/conf-gold/conflictres/conflictres14.out
new file mode 100644
index 0000000..4df9b59
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres14.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a:
+    b:c-Wildcard-last,
+    d:c-Two-wildcards,
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres15.out b/test/tests/conf-gold/conflictres/conflictres15.out
new file mode 100644
index 0000000..2dc05b2
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres15.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a:
+    b:c-Grandchild,
+    b:c-Grandchild,d:e:
+    e:c-Grandchild,
+    e:b:c-Descendant,
+    e:c-Grandchild,d:
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres16.out b/test/tests/conf-gold/conflictres/conflictres16.out
new file mode 100644
index 0000000..f94d17d
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-wildcard,Match-predicated-wildcard,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres17.out b/test/tests/conf-gold/conflictres/conflictres17.out
new file mode 100644
index 0000000..d52ec7d
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match-wildcard,Match-wildcard,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres18.out b/test/tests/conf-gold/conflictres/conflictres18.out
new file mode 100644
index 0000000..00345bc
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres18.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a: Found x1 attribute,x2-Wildcard,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres19.out b/test/tests/conf-gold/conflictres/conflictres19.out
new file mode 100644
index 0000000..98904e0
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres19.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a...
+got x1 attribute,x2-Wildcard,got ped:x3 attribute,ped:x4-Qualified-wildcard,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres20.out b/test/tests/conf-gold/conflictres/conflictres20.out
new file mode 100644
index 0000000..db8e648
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres20.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a-Wildcard,
+  ped:a-Qualified-wildcard,
+  found ped:b,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres21.out b/test/tests/conf-gold/conflictres/conflictres21.out
new file mode 100644
index 0000000..26117c0
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Specific-text,Any-text,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres22.out b/test/tests/conf-gold/conflictres/conflictres22.out
new file mode 100644
index 0000000..3b15e3d
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Specific-comment,Any-comment,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres23.out b/test/tests/conf-gold/conflictres/conflictres23.out
new file mode 100644
index 0000000..a97d5e8
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres23.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  Any-PI:a-pi
+  PI-named-b:some data
+  PI-by-content:b-pi
+  PI-by-content:c-pi
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres24.out b/test/tests/conf-gold/conflictres/conflictres24.out
new file mode 100644
index 0000000..fea3591
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>This template should be matched.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres25.out b/test/tests/conf-gold/conflictres/conflictres25.out
new file mode 100644
index 0000000..df5f1d2
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a: x1-Wildcard,Found x2 attribute</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres26.out b/test/tests/conf-gold/conflictres/conflictres26.out
new file mode 100644
index 0000000..a701b42
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a: x1-Wildcard,x2-Wildcard,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres27.out b/test/tests/conf-gold/conflictres/conflictres27.out
new file mode 100644
index 0000000..2c5ef64
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres27.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Matched * on doc;
+Matched * on a;
+Matched * on b;
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres28.out b/test/tests/conf-gold/conflictres/conflictres28.out
new file mode 100644
index 0000000..7601b10
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres28.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Matched node() on doc;
+Matched node() on a;
+Matched node() on b;
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres29.out b/test/tests/conf-gold/conflictres/conflictres29.out
new file mode 100644
index 0000000..6eb5162
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a: x1-node(),Found x2 attribute</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres30.out b/test/tests/conf-gold/conflictres/conflictres30.out
new file mode 100644
index 0000000..4244011
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a: x1-Star,Found x2 attribute</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres31.out b/test/tests/conf-gold/conflictres/conflictres31.out
new file mode 100644
index 0000000..86b96c7
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Correct - Matched "*[@x1]"</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres32.out b/test/tests/conf-gold/conflictres/conflictres32.out
new file mode 100644
index 0000000..5176b20
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a: Correct - Matched "@*[name()='x1']"</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres33.out b/test/tests/conf-gold/conflictres/conflictres33.out
new file mode 100644
index 0000000..3a64153
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Correct - Matched "node()[@x1]" </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres34.out b/test/tests/conf-gold/conflictres/conflictres34.out
new file mode 100644
index 0000000..a97d5e8
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres34.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  Any-PI:a-pi
+  PI-named-b:some data
+  PI-by-content:b-pi
+  PI-by-content:c-pi
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres35.out b/test/tests/conf-gold/conflictres/conflictres35.out
new file mode 100644
index 0000000..7df5150
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres35.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a:
+    b-Child,c:
+    b-Child,c:d:e:
+    e:c:
+    e:b-Descendant,
+    e:c:d:
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres36.out b/test/tests/conf-gold/conflictres/conflictres36.out
new file mode 100644
index 0000000..5e1e77e
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres36.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a:b:c-Wildcard-last,
+b:d-Wildcard-last,
+d:c-Wildcard-in-middle,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/conflictres/conflictres37.out b/test/tests/conf-gold/conflictres/conflictres37.out
new file mode 100755
index 0000000..6e1b377
--- /dev/null
+++ b/test/tests/conf-gold/conflictres/conflictres37.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
+  <OutWithForm>with form attribute</OutWithForm>
+  <OutWithoutForm>no form attribute</OutWithoutForm>
+  <General>not in xf namespace</General>
+</out>
diff --git a/test/tests/conf-gold/copy/copy01.out b/test/tests/conf-gold/copy/copy01.out
new file mode 100644
index 0000000..bc4a999
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy01.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy02.out b/test/tests/conf-gold/copy/copy02.out
new file mode 100644
index 0000000..e7a36b3
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy02.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+</OL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy03.out b/test/tests/conf-gold/copy/copy03.out
new file mode 100644
index 0000000..bc4a999
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy03.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy04.out b/test/tests/conf-gold/copy/copy04.out
new file mode 100644
index 0000000..c0559e1
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy04.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><fonts>
+<b>
+<font face="Arial">item3</font>
+</b>
+<i>
+<font face="Default Serif" size="18">item4</font>
+</i>
+</fonts></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy05.out b/test/tests/conf-gold/copy/copy05.out
new file mode 100644
index 0000000..a85c72b
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>test</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy06.out b/test/tests/conf-gold/copy/copy06.out
new file mode 100644
index 0000000..7304ebf
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>32</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy07.out b/test/tests/conf-gold/copy/copy07.out
new file mode 100644
index 0000000..041704c
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><histogram misc="0" name="load-times" type="int"/><INPUT type="text" OnDBLClick="retreive( )" testapos="JSFunction('val1','val2')"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy08.out b/test/tests/conf-gold/copy/copy08.out
new file mode 100644
index 0000000..d67685d
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Please <b>BOLD THIS</b> now.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy09.out b/test/tests/conf-gold/copy/copy09.out
new file mode 100644
index 0000000..0845664
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy09.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+<Out xmlns:ns0="http://www.ns0.com" ns0:Attr0="Hello" Attr1="Whatsup" ped:Attr2="Goodbye" xmlns:ped="http://ped.test.com"/>
+<Out2 xmlns:bdd="http://bdd.test.com" xmlns:ped="http://ped.test.com">
+      <Out3 xmlns:jad="http://jad.test.com"/>
+   </Out2>
+</root>
diff --git a/test/tests/conf-gold/copy/copy10.out b/test/tests/conf-gold/copy/copy10.out
new file mode 100644
index 0000000..571bb2e
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy10.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><d level="3">Hello
+        <e level="4">Success</e>
+        <!-- Me, too -->
+      </d>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy11.out b/test/tests/conf-gold/copy/copy11.out
new file mode 100644
index 0000000..2351bc4
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy11.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><d level="1"><!-- doc1 --></d><d level="3">Hello
+        <e level="4">Success</e>
+        <!-- Me, too -->
+      </d><d level="2">More</d>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy12.out b/test/tests/conf-gold/copy/copy12.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy13.out b/test/tests/conf-gold/copy/copy13.out
new file mode 100644
index 0000000..c4e3b25
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy13.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc>
+  <b>
+    <!-- set a font this time -->
+    <font face="Arial">item3</font>
+  </b>
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy14.out b/test/tests/conf-gold/copy/copy14.out
new file mode 100644
index 0000000..5313c84
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy14.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc>
+  <b>
+    <?a-pi some data?>
+    <font face="Arial">item3</font>
+  </b>
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy15.out b/test/tests/conf-gold/copy/copy15.out
new file mode 100644
index 0000000..811ead1
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>yes1me2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy16.out b/test/tests/conf-gold/copy/copy16.out
new file mode 100644
index 0000000..24efd38
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>WXY</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy17.out b/test/tests/conf-gold/copy/copy17.out
new file mode 100644
index 0000000..bc4a999
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy17.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy18.out b/test/tests/conf-gold/copy/copy18.out
new file mode 100644
index 0000000..132de4d
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy18.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <item x="100000"/>
+  <item x="2" z="4"/>
+  <item x="33333"/>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy19.out b/test/tests/conf-gold/copy/copy19.out
new file mode 100644
index 0000000..80b15fa
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<out>abcdèfgh</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy20.out b/test/tests/conf-gold/copy/copy20.out
new file mode 100644
index 0000000..267d4a7
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>abcdæfgh</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy21.out b/test/tests/conf-gold/copy/copy21.out
new file mode 100644
index 0000000..99e8c1f
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy21.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test>
+<extEnt attr="x"><sub2>z</sub2></extEnt></test>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy22.out b/test/tests/conf-gold/copy/copy22.out
new file mode 100644
index 0000000..4d8c528
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<test>abcdE¾Efgh</test>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy23.out b/test/tests/conf-gold/copy/copy23.out
new file mode 100644
index 0000000..5b901da
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy23.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc>
+  <simple>abcde</simple>
+  <coded>ab&lt;P&gt;&amp;nbsp;&lt;/P&gt;de</coded>
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy24.out b/test/tests/conf-gold/copy/copy24.out
new file mode 100644
index 0000000..ef2ca14
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy24.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><?a-pi some data?>...
+<?a-pi some data?><?pi-2 another?>...
+<doc><!-- This is a comment -->
+  test
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy25.out b/test/tests/conf-gold/copy/copy25.out
new file mode 100644
index 0000000..baed85b
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><a attr="w" dim="h" size="l" h="17" w="37"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy26.out b/test/tests/conf-gold/copy/copy26.out
new file mode 100644
index 0000000..477b23e
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><node4 ax="by+c">bar4</node4><node4 ax="by+c">bar4</node4></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy27.out b/test/tests/conf-gold/copy/copy27.out
new file mode 100644
index 0000000..9de98ab
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy27.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<results><usual-result><node attr="8"/></usual-result>
+<exotic-result>
+  <node xmlns:xsl="http://www.w3.org/1999/XSL/Transform" attr="8"/>
+</exotic-result></results>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy28.out b/test/tests/conf-gold/copy/copy28.out
new file mode 100644
index 0000000..6769876
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy28.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc>
+  <simple>abcde</simple>
+  <empty/>
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy29.out b/test/tests/conf-gold/copy/copy29.out
new file mode 100644
index 0000000..1d114b3
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy29.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc name="foo">
+  <!-- This is a comment -->
+    test&lt; 
+  <?a-pi some data?>
+</doc>
+<doc name="foo">
+  <!-- This is a comment -->
+    test&lt; 
+  <?a-pi some data?>
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy30.out b/test/tests/conf-gold/copy/copy30.out
new file mode 100644
index 0000000..c2af9c5
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><a level="1" origin="Albany">1a2</a><a level="2" origin="Albany">2a3</a><a level="3" origin="Albany">2xa2</a><a level="3" origin="Albany">2xa3</a></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy31.out b/test/tests/conf-gold/copy/copy31.out
new file mode 100644
index 0000000..d307e71
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy31.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><root xmlns:ped="http://ped.test.com">
+  <Out xmlns:ns0="http://www.ns0.com" ns0:Attr0="Hello" Attr1="Whatsup" ped:Attr2="Goodbye"/>
+  <Out2 xmlns:bdd="http://bdd.test.com"/><!-- Unused namespace decl -->
+</root></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy32.out b/test/tests/conf-gold/copy/copy32.out
new file mode 100644
index 0000000..7444d9e
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy32.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><!-- Comment-1 -->
+<!-- Comment-2 -->
+<!-- Comment-3 -->
+<!-- Comment-4 -->
+<!-- Comment-5 -->
+<!-- Comment-6 -->
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy33.out b/test/tests/conf-gold/copy/copy33.out
new file mode 100644
index 0000000..3356ae5
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy33.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><?a-pi pi-2?>
+<?a-pi pi-3?>
+<?a-pi pi-4?>
+<?a-pi pi-5?>
+<?a-pi pi-6?>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy34.out b/test/tests/conf-gold/copy/copy34.out
new file mode 100644
index 0000000..25b860a
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy34.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <OL place="inner">
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+  </OL>
+</OL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy35.out b/test/tests/conf-gold/copy/copy35.out
new file mode 100644
index 0000000..25b860a
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy35.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <OL place="inner">
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+  </OL>
+</OL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy36.out b/test/tests/conf-gold/copy/copy36.out
new file mode 100644
index 0000000..351d7ae
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy36.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Leave line-breaks as-is --><OUTLINE xmlns:xlink="http://www.w3.org/1999/xlink"><NODE type="book" xlink:href="hello.htm" xlink:type="simple"><LABEL>Hello, world!
+</LABEL></NODE></OUTLINE>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy37.out b/test/tests/conf-gold/copy/copy37.out
new file mode 100644
index 0000000..583a160
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy37.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <car color="red" make="honda">
+    <plate>HJU-789</plate>
+  </car>
+  <car color="silver" make="honda">
+    <plate>HXU-000</plate>
+  </car>
+  <car color="black" make="honda">
+    <plate>ZXU-040</plate>
+  </car>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy38.out b/test/tests/conf-gold/copy/copy38.out
new file mode 100644
index 0000000..33e088e
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy38.out
@@ -0,0 +1 @@
+<html><body><h1>Matches in Group A</h1><h2>Brazil versus Scotland</h2><table border="1"><tr><td><b>Date</b></td><td><b>Home Team</b></td><td><b>Away Team</b></td><td><b>Result</b></td></tr><tr><td>10-Jun-98&nbsp;</td><td>Brazil&nbsp;</td><td>Scotland&nbsp;</td><td>2-1&nbsp;</td></tr></table><h2>Morocco versus Norway</h2><table border="1"><tr><td><b>Date</b></td><td><b>Home Team</b></td><td><b>Away Team</b></td><td><b>Result</b></td></tr><tr><td>10-Jun-98&nbsp;</td><td>Morocco&nbsp;</td><td>Norway&nbsp;</td><td>2-2&nbsp;</td></tr></table><h2>Scotland versus Norway</h2><table border="1"><tr><td><b>Date</b></td><td><b>Home Team</b></td><td><b>Away Team</b></td><td><b>Result</b></td></tr><tr><td>16-Jun-98&nbsp;</td><td>Scotland&nbsp;</td><td>Norway&nbsp;</td><td>1-1&nbsp;</td></tr></table><h2>Brazil versus Morocco</h2><table border="1"><tr><td><b>Date</b></td><td><b>Home Team</b></td><td><b>Away Team</b></td><td><b>Result</b></td></tr><tr><td>16-Jun-98&nbsp;</td><td>Brazil&nbsp;</td><td>Morocco&nbsp;</td><td>3-0&nbsp;</td></tr></table><h2>Brazil versus Norway</h2><table border="1"><tr><td><b>Date</b></td><td><b>Home Team</b></td><td><b>Away Team</b></td><td><b>Result</b></td></tr><tr><td>23-Jun-98&nbsp;</td><td>Brazil&nbsp;</td><td>Norway&nbsp;</td><td>1-2&nbsp;</td></tr></table><h2>Scotland versus Morocco</h2><table border="1"><tr><td><b>Date</b></td><td><b>Home Team</b></td><td><b>Away Team</b></td><td><b>Result</b></td></tr><tr><td>23-Jun-98&nbsp;</td><td>Scotland&nbsp;</td><td>Morocco&nbsp;</td><td>0-3&nbsp;</td></tr></table></body></html>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy39.out b/test/tests/conf-gold/copy/copy39.out
new file mode 100644
index 0000000..bc4a999
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy39.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy40.out b/test/tests/conf-gold/copy/copy40.out
new file mode 100644
index 0000000..2af71f6
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy40.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><a level="1" data="1a2"/>
+<a level="2" data="2a3"/>
+<a level="3" data="2xa2"/>
+<a level="3" data="2xa3"/>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy41.out b/test/tests/conf-gold/copy/copy41.out
new file mode 100644
index 0000000..b8939fb
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- XYZ --><out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy42.out b/test/tests/conf-gold/copy/copy42.out
new file mode 100644
index 0000000..81d4cb8
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy42.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><a3 x="a3-5" ordering="2">
+        <a4 x="a4-5">2</a4>
+      </a3><a3 x="a3-2" ordering="3">
+        <a4 x="a4-2">3</a4>
+      </a3><a3 x="a3-7" ordering="5">
+        <a4 x="a4-8">5</a4>
+      </a3><a3 x="a3-1" ordering="7">
+        <a4 x="a4-1">7</a4>
+      </a3><a3 x="a3-6" ordering="8">
+        <a4 x="a4-6">8</a4>
+        <a4 x="a4-7">8x</a4>
+      </a3><a3 x="a3-3" ordering="9">
+        <a4 x="a4-3">9</a4>
+      </a3></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy43.out b/test/tests/conf-gold/copy/copy43.out
new file mode 100644
index 0000000..bc4a999
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy43.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy44.out b/test/tests/conf-gold/copy/copy44.out
new file mode 100644
index 0000000..007f15d
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy44.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:joes="http://joes.com" xmlns:foo="http://foo.test.com"><union>
+<bar xmlns:yow="http://yow.test.com">18 Generic Ave.</bar><bar xmlns:huh="http://unknown.com">12 Slammin Ave.</bar><joes:bar>17 Generic Ave.</joes:bar></union></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy45.out b/test/tests/conf-gold/copy/copy45.out
new file mode 100644
index 0000000..37f0755
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<out><rtf>abc<in x="yz">def</in>ghi</rtf></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy46.out b/test/tests/conf-gold/copy/copy46.out
new file mode 100644
index 0000000..87c07fa
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:huh="http://unknown.com" xmlns:joes="http://joes.com" xmlns:foo="http://foo.test.com"><star><bar xmlns:yow="http://yow.test.com">18 Generic Ave.</bar><foo:bar>157 Fourth St.</foo:bar><wonder:bar xmlns:wonder="http://wonder.com">777 Broadway</wonder:bar><bar>12 Slammin Ave.</bar><joes:bar>17 Generic Ave.</joes:bar></star></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy47.out b/test/tests/conf-gold/copy/copy47.out
new file mode 100644
index 0000000..0e955c1
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy47.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="http://foo.test.com"><union>
+<bar>18 Generic Ave.</bar><foo:bar>157 Fourth St.</foo:bar><bar xmlns:huh="http://unknown.com">12 Slammin Ave.</bar></union></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy48.out b/test/tests/conf-gold/copy/copy48.out
new file mode 100644
index 0000000..a8d98b4
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy48.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:joes="http://joes.com"><union>
+<foo:bar xmlns:foo="http://foo.test.com">157 Fourth St.</foo:bar><joes:bar xmlns:foo="http://foo.test.com">17 Generic Ave.</joes:bar></union></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy49.out b/test/tests/conf-gold/copy/copy49.out
new file mode 100644
index 0000000..d447fc1
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document id="1" class="mobile" xml:lang="en"/>
diff --git a/test/tests/conf-gold/copy/copy50.out b/test/tests/conf-gold/copy/copy50.out
new file mode 100644
index 0000000..332b21c
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy50.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test2 test2="test2">
+    <test3 test3="test3"/>
+  </test2>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy51.out b/test/tests/conf-gold/copy/copy51.out
new file mode 100644
index 0000000..74e5087
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:a="name-a" xmlns:b="name-b"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy52.out b/test/tests/conf-gold/copy/copy52.out
new file mode 100644
index 0000000..2e61412
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy52.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><?b-pi pi-2?>
+<?b-pi pi-4?>
+<?b-pi pi-6?>
+<?b-pi pi-8?>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy53.out b/test/tests/conf-gold/copy/copy53.out
new file mode 100644
index 0000000..1d64e9d
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><?b-pi pi-2?><?b-pi pi-4?><?b-pi pi-6?><?b-pi pi-8?></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy54.out b/test/tests/conf-gold/copy/copy54.out
new file mode 100644
index 0000000..0b3f50a
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy54.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><?b-pi pi-4?>
+<?b-pi pi-6?>
+<?b-pi pi-8?>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy55.out b/test/tests/conf-gold/copy/copy55.out
new file mode 100644
index 0000000..38645b2
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy55.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://example.org/defn/" xmlns:tns="http://hello.org/base" xmlns:ns1="http://hello.org/plug" xmlns:ns2="http://hello.org/types">
+  <types>
+    <!-- Below: default + tns changed, ns1 unaffected, ns2 same, xsi new -->
+    <schema targetNamespace="http://hello.org/types" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://hello.org/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+      <complexType name="Hobbies">
+        <sequence>
+          <element name="name" type="tns:Name"/>
+          <element name="detail" type="string"/>
+          <element name="places" type="ns2:collection"/>
+          <element name="hobby" type="ns2:vector"/>
+        </sequence>
+      </complexType>
+    </schema>
+  </types>
+</definitions>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy56.out b/test/tests/conf-gold/copy/copy56.out
new file mode 100644
index 0000000..aaced12
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out attr1=""/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy57.out b/test/tests/conf-gold/copy/copy57.out
new file mode 100644
index 0000000..2a9f8d4
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy57.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out attr1="D1D3D2"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy58.out b/test/tests/conf-gold/copy/copy58.out
new file mode 100644
index 0000000..7d9f72d
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy58.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out attr1="T1T2"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy59.out b/test/tests/conf-gold/copy/copy59.out
new file mode 100644
index 0000000..7f427f0
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy59.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><!--foo--><!-- --></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy60.out b/test/tests/conf-gold/copy/copy60.out
new file mode 100644
index 0000000..3de621b
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy60.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><?pi1 foo?><?pi2?></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy61.out b/test/tests/conf-gold/copy/copy61.out
new file mode 100644
index 0000000..b52085a
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><child/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/copy/copy62.out b/test/tests/conf-gold/copy/copy62.out
new file mode 100644
index 0000000..b52085a
--- /dev/null
+++ b/test/tests/conf-gold/copy/copy62.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><child/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/dflt/dflt01.out b/test/tests/conf-gold/dflt/dflt01.out
new file mode 100644
index 0000000..14143c1
--- /dev/null
+++ b/test/tests/conf-gold/dflt/dflt01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>attr on doc elem</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/dflt/dflt02.out b/test/tests/conf-gold/dflt/dflt02.out
new file mode 100644
index 0000000..baa3022
--- /dev/null
+++ b/test/tests/conf-gold/dflt/dflt02.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1node:,
+2node:near-east,
+3node:,
+4node:east,
+5node:,
+6node:far-east,
+7node:,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/dflt/dflt03.out b/test/tests/conf-gold/dflt/dflt03.out
new file mode 100644
index 0000000..07f7b82
--- /dev/null
+++ b/test/tests/conf-gold/dflt/dflt03.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  WentNearSouth
+    WentSouth
+      WentFarSouthBackToSouth
+    BackToNearSouth
+  BackToCentral
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/dflt/dflt04.out b/test/tests/conf-gold/dflt/dflt04.out
new file mode 100644
index 0000000..07f7b82
--- /dev/null
+++ b/test/tests/conf-gold/dflt/dflt04.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  WentNearSouth
+    WentSouth
+      WentFarSouthBackToSouth
+    BackToNearSouth
+  BackToCentral
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/embed/embed01.out b/test/tests/conf-gold/embed/embed01.out
new file mode 100644
index 0000000..80954dc
--- /dev/null
+++ b/test/tests/conf-gold/embed/embed01.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Hello
+	
+Goodbye
+	
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/embed/embed02.out b/test/tests/conf-gold/embed/embed02.out
new file mode 100644
index 0000000..a46551d
--- /dev/null
+++ b/test/tests/conf-gold/embed/embed02.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Hello down there.
+</out>
diff --git a/test/tests/conf-gold/embed/embed03.out b/test/tests/conf-gold/embed/embed03.out
new file mode 100644
index 0000000..c02eb3f
--- /dev/null
+++ b/test/tests/conf-gold/embed/embed03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><title>Expense Report Summary</title></head><body><p>Total Amount: 153</p></body></html>
\ No newline at end of file
diff --git a/test/tests/conf-gold/embed/embed04.out b/test/tests/conf-gold/embed/embed04.out
new file mode 100644
index 0000000..c02eb3f
--- /dev/null
+++ b/test/tests/conf-gold/embed/embed04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><title>Expense Report Summary</title></head><body><p>Total Amount: 153</p></body></html>
\ No newline at end of file
diff --git a/test/tests/conf-gold/embed/embed07.out b/test/tests/conf-gold/embed/embed07.out
new file mode 100644
index 0000000..ec5b17a
--- /dev/null
+++ b/test/tests/conf-gold/embed/embed07.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<transform>
+Hello
+
+Goodbye
+</transform>
\ No newline at end of file
diff --git a/test/tests/conf-gold/expression/expression01.out b/test/tests/conf-gold/expression/expression01.out
new file mode 100644
index 0000000..c38ff12
--- /dev/null
+++ b/test/tests/conf-gold/expression/expression01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>en</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/expression/expression02.out b/test/tests/conf-gold/expression/expression02.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/expression/expression02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/expression/expression03.out b/test/tests/conf-gold/expression/expression03.out
new file mode 100644
index 0000000..d0dcb67
--- /dev/null
+++ b/test/tests/conf-gold/expression/expression03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>en-us</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/expression/expression04.out b/test/tests/conf-gold/expression/expression04.out
new file mode 100644
index 0000000..c38ff12
--- /dev/null
+++ b/test/tests/conf-gold/expression/expression04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>en</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/expression/expression05.out b/test/tests/conf-gold/expression/expression05.out
new file mode 100644
index 0000000..737caa4
--- /dev/null
+++ b/test/tests/conf-gold/expression/expression05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>EN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/expression/expression06.out b/test/tests/conf-gold/expression/expression06.out
new file mode 100644
index 0000000..de8d9be
--- /dev/null
+++ b/test/tests/conf-gold/expression/expression06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1:en, 2:en, 3:EN, 4:en-us</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/extend/extend01.out b/test/tests/conf-gold/extend/extend01.out
new file mode 100644
index 0000000..b27e492
--- /dev/null
+++ b/test/tests/conf-gold/extend/extend01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>THIS FALLBACK OK !! </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/extend/extend02.out b/test/tests/conf-gold/extend/extend02.out
new file mode 100644
index 0000000..ded270f
--- /dev/null
+++ b/test/tests/conf-gold/extend/extend02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Fallback: extension was not found.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/extend/extend03.out b/test/tests/conf-gold/extend/extend03.out
new file mode 100644
index 0000000..4232cbf
--- /dev/null
+++ b/test/tests/conf-gold/extend/extend03.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+element xsl:value-of IS defined
+function document() IS defined
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/extend/extend04.out b/test/tests/conf-gold/extend/extend04.out
new file mode 100644
index 0000000..4a24d64
--- /dev/null
+++ b/test/tests/conf-gold/extend/extend04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>XYZ</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/extend/extend05.out b/test/tests/conf-gold/extend/extend05.out
new file mode 100755
index 0000000..d8b27ad
--- /dev/null
+++ b/test/tests/conf-gold/extend/extend05.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>&nbsp;</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey01.out b/test/tests/conf-gold/idkey/idkey01.out
new file mode 100644
index 0000000..5dfaf30
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey01.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<towns state="NH">Amherst, Auburn, Bristol, Enfield, Grafton, Hudson, Lincoln, Manchester, Newport, Pittsfield, Rochester, Salem, Washington</towns>
+<towns state="MA">Amherst, Auburn, Cambridge, Grafton, Hudson, Lincoln, Manchester, Pittsfield, Rochester, Salem, Springfield</towns>
+<towns state="ME">Auburn, Bristol, Cambridge, Enfield, Hudson, Lincoln, Manchester, Newport, Pittsfield, Springfield, Washington</towns>
+<towns state="RI">Bristol, Lincoln, Newport</towns>
+<towns state="CT">Bristol, Enfield, Manchester, Washington</towns>
+<towns state="VT">Bristol, Cambridge, Grafton, Manchester, Newport, Pittsfield, Rochester, Springfield, Washington</towns>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey02.out b/test/tests/conf-gold/idkey/idkey02.out
new file mode 100644
index 0000000..e977549
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Intro Section,SS Section,Exp Section</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey03.out b/test/tests/conf-gold/idkey/idkey03.out
new file mode 100644
index 0000000..9c50d4c
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Intro_Section,SS_Section,Exp_Section,Pat_Section</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey04.out b/test/tests/conf-gold/idkey/idkey04.out
new file mode 100644
index 0000000..bb01043
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>c</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey05.out b/test/tests/conf-gold/idkey/idkey05.out
new file mode 100644
index 0000000..21c72d5
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Intro Section,Intro Section,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey06.out b/test/tests/conf-gold/idkey/idkey06.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey07.out b/test/tests/conf-gold/idkey/idkey07.out
new file mode 100644
index 0000000..5203777
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Success</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey08.out b/test/tests/conf-gold/idkey/idkey08.out
new file mode 100644
index 0000000..14d792e
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Intro Section,Exp Section,SS Section,Num Section</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey09.out b/test/tests/conf-gold/idkey/idkey09.out
new file mode 100644
index 0000000..368910d
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey09.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+  
+  
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey10.out b/test/tests/conf-gold/idkey/idkey10.out
new file mode 100644
index 0000000..7662cd6
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>Intro Section.SS Section.Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey11.out b/test/tests/conf-gold/idkey/idkey11.out
new file mode 100644
index 0000000..7662cd6
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>Intro Section.SS Section.Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey12.out b/test/tests/conf-gold/idkey/idkey12.out
new file mode 100644
index 0000000..ecb0f80
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>Intro Section.SS Section.Exp Section.SS Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey13.out b/test/tests/conf-gold/idkey/idkey13.out
new file mode 100644
index 0000000..f585586
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey13.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>4 divisions:
+  Intro Section.SS Section.
+  The next key finds two divisions:
+  Exp Section.Second Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey15.out b/test/tests/conf-gold/idkey/idkey15.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey16.out b/test/tests/conf-gold/idkey/idkey16.out
new file mode 100644
index 0000000..f78f46c
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey16.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>Intro Section.SS Section.Exp Section.
+Intro Section.SS Section.Exp Section.
+SS Section.Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey17.out b/test/tests/conf-gold/idkey/idkey17.out
new file mode 100644
index 0000000..7662cd6
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>Intro Section.SS Section.Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey18.out b/test/tests/conf-gold/idkey/idkey18.out
new file mode 100644
index 0000000..dce4819
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey18.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+Blah blah blah.
+Blah blah blah.
+For details, see --location of the XSLT spec--.
+Blah blah blah.
+For details, see --location of the XML spec--.
+Blah blah blah.
+Blah blah blah.
+For details, see --location of the XPath spec--.
+Blah blah blah.
+</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey19.out b/test/tests/conf-gold/idkey/idkey19.out
new file mode 100644
index 0000000..84de9df
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:baz="http://xsl.lotus.com/ns1">Intro Section. SS Section. Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey20.out b/test/tests/conf-gold/idkey/idkey20.out
new file mode 100644
index 0000000..6ac272b
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>Intro Section. SS Section. Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey21.out b/test/tests/conf-gold/idkey/idkey21.out
new file mode 100644
index 0000000..5d3016b
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey21.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+  The next key finds three divisions:
+  SS Section.Second Exp Section.SP Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey22.out b/test/tests/conf-gold/idkey/idkey22.out
new file mode 100644
index 0000000..1014132
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey22.out
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  Test for id selection and pattern matching...
+  Next line should read: -*id17*-    
+  
+  -*id17*-
+
+  Next line should read: (*id14*)    
+  
+  (*id14*)
+
+  Next line should read: -*id4*-     
+  
+  -*id4*-
+
+  Next line should read: +*id9*+     
+  
+  +*id9*+
+
+  Next line should read: (*id13*)    
+  
+  (*id13*)
+
+  Next line should read: -*id6*-     
+  
+  -*id6*-
+
+  Next line should read: @*id19*@    
+  
+  @*id19*@
+
+  Next line should read: %*id12*%    
+  
+  %*id12*%
+
+  Next line should read: !*id11*!    
+  
+  !*id11*!
+
+  Next line should read: [*id3*] \*id5*\ =*id16*=  
+  
+  [*id3*]
+
+  \*id5*\
+
+  =*id16*=
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey23.out b/test/tests/conf-gold/idkey/idkey23.out
new file mode 100644
index 0000000..077fbf0
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<P/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey24.out b/test/tests/conf-gold/idkey/idkey24.out
new file mode 100644
index 0000000..15a8dca
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<n>bcd</n>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey25.out b/test/tests/conf-gold/idkey/idkey25.out
new file mode 100644
index 0000000..f75d632
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey25.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+  Using keyspace bigspace...
+  Intro Section.SS Section.Exp Section.</root>
diff --git a/test/tests/conf-gold/idkey/idkey26.out b/test/tests/conf-gold/idkey/idkey26.out
new file mode 100644
index 0000000..24efd38
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>WXY</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey27.out b/test/tests/conf-gold/idkey/idkey27.out
new file mode 100644
index 0000000..b37d537
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Intro Section,SS Section,Exp Section,Untitled Section,Sort Section</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey28.out b/test/tests/conf-gold/idkey/idkey28.out
new file mode 100644
index 0000000..b37d537
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Intro Section,SS Section,Exp Section,Untitled Section,Sort Section</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey29.out b/test/tests/conf-gold/idkey/idkey29.out
new file mode 100644
index 0000000..c3c08bb
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Introduction,Stylesheet Structure,Expressions,(none),Sorting</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey30.out b/test/tests/conf-gold/idkey/idkey30.out
new file mode 100644
index 0000000..476ffd8
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Number of IDs accumulated: 18</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey31.out b/test/tests/conf-gold/idkey/idkey31.out
new file mode 100644
index 0000000..b305353
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Number of IDs accumulated: 4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey32.out b/test/tests/conf-gold/idkey/idkey32.out
new file mode 100644
index 0000000..c546a53
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey32.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Birthdays in chronological order...
+Ginny: Jan 22
+Lisa: March 31
+Bill: Apr 4
+Linda: Apr 22
+Frida: July 5
+Marie: September 9
+Harry: Sep 16
+Pedro: November 2
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey33.out b/test/tests/conf-gold/idkey/idkey33.out
new file mode 100644
index 0000000..ebf1106
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey33.out
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Birthdays as found...
+Linda: Apr 22
+Marie: September 9
+Lisa: March 31
+Harry: Sep 16
+Ginny: Jan 22
+Pedro: November 2
+Bill: Apr 4
+Frida: July 5
+
+Birthdays in chronological order...
+Ginny: Jan 22
+Lisa: March 31
+Bill: Apr 4
+Linda: Apr 22
+Frida: July 5
+Marie: September 9
+Harry: Sep 16
+Pedro: November 2
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey34.out b/test/tests/conf-gold/idkey/idkey34.out
new file mode 100644
index 0000000..6eef573
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey34.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Intro Section.
+Body of Intro.
+Intro to SS subsection.
+Body of SS Intro.
+Intro to Appendix.
+Body of App1.
+Body of App2.
+Body of App3sub.
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey35.out b/test/tests/conf-gold/idkey/idkey35.out
new file mode 100644
index 0000000..357a859
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey35.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found target p: Intro Section.
+Found target p: Body of Intro.
+Found target p: Intro to SS subsection.
+Found target p: Body of SS Intro.
+Found target p: Intro to Appendix.
+Found target p: Body of App1.
+Found target p: Body of App2.
+Found target p: Body of App3sub.
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey36.out b/test/tests/conf-gold/idkey/idkey36.out
new file mode 100644
index 0000000..03d0283
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey36.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+bigspace...Intro Section.SS Section.Exp Section.
+smallspace...Intro Section.SS Section.Exp Section.
+filterspace...SS Section.Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey37.out b/test/tests/conf-gold/idkey/idkey37.out
new file mode 100644
index 0000000..4705318
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey37.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<other>a</other>
+<big>b</big>
+<other>c</other>
+<big>d</big>
+<other>e</other></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey38.out b/test/tests/conf-gold/idkey/idkey38.out
new file mode 100644
index 0000000..abff968
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey38.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<big>a</big>
+<big>b</big>
+<other>c</other>
+<bigD>d</bigD>
+<other>e</other></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey39.out b/test/tests/conf-gold/idkey/idkey39.out
new file mode 100644
index 0000000..4705318
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey39.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<other>a</other>
+<big>b</big>
+<other>c</other>
+<big>d</big>
+<other>e</other></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey40.out b/test/tests/conf-gold/idkey/idkey40.out
new file mode 100644
index 0000000..d584f24
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey40.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<other>
+    *id1*
+    </other>
+<other>*id2*
+      </other>
+<other>*id3*</other>
+<other>*id4*</other>
+<other>*id5*</other>
+<bee>id6</bee>
+<other>*id7*</other>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey41.out b/test/tests/conf-gold/idkey/idkey41.out
new file mode 100644
index 0000000..32b49ba
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey41.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<other>
+    *id1*
+    </other>
+<x>id2</x>
+<x>id3</x>
+<x>id4</x>
+<x>id5</x>
+<other>*id6*</other>
+<other>*id7*</other>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey42.out b/test/tests/conf-gold/idkey/idkey42.out
new file mode 100644
index 0000000..855a3b0
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey42.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<other>
+    *id1*
+    </other>
+<x>id2</x>
+<x>id3</x>
+<bee>id4</bee>
+<x>id5</x>
+<other>*id6*</other>
+<other>*id7*</other>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey43.out b/test/tests/conf-gold/idkey/idkey43.out
new file mode 100644
index 0000000..855a3b0
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey43.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<other>
+    *id1*
+    </other>
+<x>id2</x>
+<x>id3</x>
+<bee>id4</bee>
+<x>id5</x>
+<other>*id6*</other>
+<other>*id7*</other>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey44.out b/test/tests/conf-gold/idkey/idkey44.out
new file mode 100644
index 0000000..abb5c29
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey44.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<Name>Julie</Name>
+<Name>Daniel</Name>
+<Name>Joshua</Name>
+<Name>Lauren</Name>
+<Name>Nathaniel</Name>
+<Name>Samual</Name>
+<Name>Benjamin</Name>
+<Name>Lucy</Name>
+<Name>Jake</Name>
+<Name>Jeffery</Name>
+<Name>Christopher</Name>
+<J-Name>Jabriella</J-Name></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey45.out b/test/tests/conf-gold/idkey/idkey45.out
new file mode 100644
index 0000000..fdc5ebc
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey45.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<J-NAME>Julie</J-NAME>
+<Name>Daniel</Name>
+<J-NAME>Joshua</J-NAME>
+<Name>Lauren</Name>
+<Name>Nathaniel</Name>
+<Name>Samual</Name>
+<Name>Benjamin</Name>
+<Name>Lucy</Name>
+<J-NAME>Jake</J-NAME>
+<J-NAME>Jeffery</J-NAME>
+<Name>Christopher</Name>
+<J-NAME>Jabriella</J-NAME>
+<Name>Eric</Name>
+<J-NAME>Johnathan</J-NAME></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey46.out b/test/tests/conf-gold/idkey/idkey46.out
new file mode 100644
index 0000000..d0f4e19
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey46.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<No-Match>Julie</No-Match>
+<No-Match>Daniel</No-Match>
+<No-Match>Joshua</No-Match>
+<No-Match>Lauren</No-Match>
+<Simple-Match>Nathaniel</Simple-Match>
+<Simple-Match>Samual</Simple-Match>
+<No-Match>Benjamin</No-Match>
+<No-Match>Lucy</No-Match>
+<No-Match>Jake</No-Match>
+<No-Match>Jeffery</No-Match>
+<No-Match>Christopher</No-Match>
+<No-Match>Jabriella</No-Match>
+<Simple-Match>Eric</Simple-Match>
+<Simple-Match>Johnathan</Simple-Match></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey47.out b/test/tests/conf-gold/idkey/idkey47.out
new file mode 100644
index 0000000..e34c2e9
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey47.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<No-Match>Julie</No-Match>
+<No-Match>Daniel</No-Match>
+<No-Match>Joshua</No-Match>
+<No-Match>Lauren</No-Match>
+<No-Match>Nathaniel</No-Match>
+<No-Match>Samual</No-Match>
+<No-Match>Benjamin</No-Match>
+<No-Match>Lucy</No-Match>
+<No-Match>Jake</No-Match>
+<No-Match>Jeffery</No-Match>
+<Simple-Match>Christopher</Simple-Match>
+<Simple-Match>Jabriella</Simple-Match>
+<No-Match>Robert</No-Match>
+<Simple-Match>Eric</Simple-Match>
+<Simple-Match>Johnathan</Simple-Match></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey48.out b/test/tests/conf-gold/idkey/idkey48.out
new file mode 100644
index 0000000..4d5d5ae
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey48.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<No-Match>Julie</No-Match>
+<No-Match>Daniel</No-Match>
+<No-Match>Joshua</No-Match>
+<No-Match>Lauren</No-Match>
+<No-Match>Nathaniel</No-Match>
+<No-Match>Samual</No-Match>
+<No-Match>Benjamin</No-Match>
+<No-Match>Lucy</No-Match>
+<No-Match>Jake</No-Match>
+<No-Match>Jeffery</No-Match>
+<Complex-Match>Christopher</Complex-Match>
+<No-Match>Jabriella</No-Match>
+<No-Match>Robert</No-Match>
+<No-Match>Eric</No-Match>
+<Complex-Match>Johnathan</Complex-Match></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey49.out b/test/tests/conf-gold/idkey/idkey49.out
new file mode 100644
index 0000000..650bc52
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Number of IDs accumulated: 35</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey50.out b/test/tests/conf-gold/idkey/idkey50.out
new file mode 100644
index 0000000..d83751a
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey50.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <bound>HTTP- http://schemas.xmlsoap.org/wsdl/http/</bound>
+  <bound>SOAP- http://schemas.xmlsoap.org/wsdl/soap/</bound>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey51.out b/test/tests/conf-gold/idkey/idkey51.out
new file mode 100644
index 0000000..5203777
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Success</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey52.out b/test/tests/conf-gold/idkey/idkey52.out
new file mode 100644
index 0000000..fd3ffee
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey52.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+Blah blah blah.
+Blah blah blah.
+For details, see 
+  Got a bibref for XSLT...
+  .
+Blah blah blah.
+For details, see 
+  Got a bibref for XML...
+  .
+Blah blah blah.
+Blah blah blah.
+For details, see 
+  Got a bibref for XPath...
+  .
+Blah blah blah.
+  idkey52a.xml
+  idkey52b.xml
+</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey53.out b/test/tests/conf-gold/idkey/idkey53.out
new file mode 100644
index 0000000..6ac272b
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>Intro Section. SS Section. Exp Section.</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey54.out b/test/tests/conf-gold/idkey/idkey54.out
new file mode 100644
index 0000000..0c7e904
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Intro Section. SS Section. Exp Section.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey55.out b/test/tests/conf-gold/idkey/idkey55.out
new file mode 100644
index 0000000..0fce7db
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey55.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<item>b is at position 1</item>
+<item>c is at position 2</item>
+<item>d is at position 3</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey56.out b/test/tests/conf-gold/idkey/idkey56.out
new file mode 100644
index 0000000..9344dce
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey56.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<item>a is at position 1</item>
+<item>c is at position 2</item>
+<item>d is at position 3</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey57.out b/test/tests/conf-gold/idkey/idkey57.out
new file mode 100644
index 0000000..0a4df6b
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey57.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>WYZ</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey58.out b/test/tests/conf-gold/idkey/idkey58.out
new file mode 100644
index 0000000..172192f
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey58.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>WXZ</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey59.out b/test/tests/conf-gold/idkey/idkey59.out
new file mode 100644
index 0000000..2bc756e
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey59.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<h1>Coordinate 25 (4 hits, 3 sections):</h1>
+<title>Introduction</title>
+<title>Expressions</title>
+<title>Numbers</title>
+<h1>Coordinate 39 (1 hit):</h1>
+<title>Introduction</title>
+<h1>Coordinate 44 (2 hits, 2 sections):</h1>
+<title>Expressions</title>
+<title>Numbers</title>
+<h1>Coordinate 75 (2 hits, 2 sections):</h1>
+<title>Structure</title>
+<title>Numbers</title>
+</out>
diff --git a/test/tests/conf-gold/idkey/idkey60.out b/test/tests/conf-gold/idkey/idkey60.out
new file mode 100644
index 0000000..d3257e9
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey60.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<match-l1-v>Text from doc/l1/v</match-l1-v>
+<match-v>Text from doc/l1/l2/v</match-v>
+<match-v>Text from doc/l1/l2/l3/v</match-v>
+<match-l1-l2-w>Text from doc/l1/l2/w</match-l1-l2-w></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey61.out b/test/tests/conf-gold/idkey/idkey61.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey62.out b/test/tests/conf-gold/idkey/idkey62.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey62.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/idkey/idkey63.out b/test/tests/conf-gold/idkey/idkey63.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/idkey/idkey63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl01.out b/test/tests/conf-gold/impincl/impincl01.out
new file mode 100644
index 0000000..ed53c70
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl01.out
@@ -0,0 +1,6 @@
+<out>
+		 
+ From Imported stylesheet: Text of one-tag
+		 
+ From Included stylesheet: Text of two-tag
+</out>
diff --git a/test/tests/conf-gold/impincl/impincl02.out b/test/tests/conf-gold/impincl/impincl02.out
new file mode 100644
index 0000000..f784ff3
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><good-match sheet="f"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl03.out b/test/tests/conf-gold/impincl/impincl03.out
new file mode 100644
index 0000000..2d7a9f4
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl03.out
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>!From m!!From n!!From o!!From p!
+  
+  Main stylesheet - title:
+  Testing import/include nesting
+  
+  m-author:  
+  Joe Jones
+  
+  p-publisher: 
+  Conformance Press
+  
+  o-overview: 
+  testing-import
+  
+    
+  n-contents of first chapter:  
+  know XSL
+    love XSL
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl04.out b/test/tests/conf-gold/impincl/impincl04.out
new file mode 100644
index 0000000..ea5b480
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl04.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  Included xsl file's relative URI is resolved 
+  relative to the base URI of the xsl:include 
+  element 
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl05.out b/test/tests/conf-gold/impincl/impincl05.out
new file mode 100644
index 0000000..556d620
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl05.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  MAIN title matched...
+  C-title: Testing:import-precedence
+  E-title: Testing:import-precedence
+  B-author: Joe Jones,
+  D-overview: testing-import
+  C-chapters: 
+    E-chapter 1: know xsl
+    E-chapter 2: love xsl
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl06.out b/test/tests/conf-gold/impincl/impincl06.out
new file mode 100644
index 0000000..e915016
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl06.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  MAIN title matched...
+  B-author: Joe Jones,
+  D-overview: testing-include
+  C-chapters: 
+    MAIN chapter 1: know xsl
+    MAIN chapter 2: love xsl
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl07.out b/test/tests/conf-gold/impincl/impincl07.out
new file mode 100644
index 0000000..71584b4
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl07.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  MAIN title matched...
+  D-title: Testing:import-precedence
+  B-author: Joe Jones,
+  B-author: Milt Hinton,
+  D-overview: testing-import
+  C-chapters: 
+    E-chapter 1: know xsl
+    E-chapter 2: love xsl
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl08.out b/test/tests/conf-gold/impincl/impincl08.out
new file mode 100644
index 0000000..56f3399
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>DocBook bug regressed successfully</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl09.out b/test/tests/conf-gold/impincl/impincl09.out
new file mode 100644
index 0000000..dd2935e
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test xmlns="www.lotus.com" color="black" text-decoration="underline" test=""/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl10.out b/test/tests/conf-gold/impincl/impincl10.out
new file mode 100644
index 0000000..91f1a26
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl10.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <div style="border: solid red"><pre>Example of apply-imports</pre></div>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl11.out b/test/tests/conf-gold/impincl/impincl11.out
new file mode 100644
index 0000000..2bf67f1
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl11.out
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>!From ss2!!From ss3!!From ss4!!From ss5!!From ss6!
+  
+  Main stylesheet - title:
+  Testing import/include nesting
+  
+  m-author:  
+  Joe Jones
+  
+  p-publisher: 
+  Conformance Press
+  
+  o-overview: 
+  testing-import
+  
+  q-price: 
+  25.85
+  
+    
+  n-contents of first chapter:  
+  know XSL
+    love XSL
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl12.out b/test/tests/conf-gold/impincl/impincl12.out
new file mode 100644
index 0000000..65dc044
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl12.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  MAIN title: Testing include
+  E-title: Testing include
+  MAIN author: Joe Jones
+  C-chapters: 
+    E-chapter 1: know xsl
+    E-chapter 2: love xsl
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl13.out b/test/tests/conf-gold/impincl/impincl13.out
new file mode 100644
index 0000000..718beaa
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl13.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  MAIN title: Testing include
+  MAIN author: Joe Jones
+  IMPORT author: Joe Jones
+<y>IMPORT overview: testing apply-imports from include</y></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl14.out b/test/tests/conf-gold/impincl/impincl14.out
new file mode 100644
index 0000000..50a599e
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl14.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  C-title: Testing:apply-imports
+  E-title: Testing:apply-imports</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl15.out b/test/tests/conf-gold/impincl/impincl15.out
new file mode 100644
index 0000000..f1ef90e
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl15.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <div style="border: solid green"><pre>Example of apply-imports</pre></div>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl16.out b/test/tests/conf-gold/impincl/impincl16.out
new file mode 100644
index 0000000..91bc040
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl16.out
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>@val=yes
+9
+44
+51
+77
+114
+The node containing 117 is qqe
+118
+154
+176
+187
+209
+224
+Middle: 250
+255
+A century node is yyl
+355
+374
+390
+426
+494
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl17.out b/test/tests/conf-gold/impincl/impincl17.out
new file mode 100644
index 0000000..d1af015
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl17.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+  On node whose id is i5 -nodes to apply: 1
+NO BUG
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl18.out b/test/tests/conf-gold/impincl/impincl18.out
new file mode 100644
index 0000000..9dc4814
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl18.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<result>
+    Before apply-imports
+      This is from the XML Source Document.
+    After apply-imports
+  </result>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl19.out b/test/tests/conf-gold/impincl/impincl19.out
new file mode 100644
index 0000000..3190ec4
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl19.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+From Stylesheet: Hello
+In Frag-Subdir: Hello
+In Fragments: Hello
+In ImpIncl: Hello</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl20.out b/test/tests/conf-gold/impincl/impincl20.out
new file mode 100644
index 0000000..77a0abc
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl20.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match on / in top xsl
+<A><D>
+  match on bar in top xsl
+</D></A></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl21.out b/test/tests/conf-gold/impincl/impincl21.out
new file mode 100644
index 0000000..9130dfd
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl21.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match on /doc in top xsl
+<A><D>foo - match on bar in top xsl</D></A>
+<A><B><C>goo - match on bar in top xsl</C></B></A>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl22.out b/test/tests/conf-gold/impincl/impincl22.out
new file mode 100644
index 0000000..ab43522
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><best-match/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl23.out b/test/tests/conf-gold/impincl/impincl23.out
new file mode 100644
index 0000000..5a119ee
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><good-match/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl24.out b/test/tests/conf-gold/impincl/impincl24.out
new file mode 100644
index 0000000..b92de1c
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl24.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <div style="border: solid red"><pre>border should be red</pre></div>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl25.out b/test/tests/conf-gold/impincl/impincl25.out
new file mode 100644
index 0000000..5b491f8
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl25.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match on /doc in top xsl
+  <C>foo - match on bar in top xsl</C>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl26.out b/test/tests/conf-gold/impincl/impincl26.out
new file mode 100644
index 0000000..7d42326
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl26.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Match on /doc in top xsl
+  <B>outer<D>outer Switching to middle...
+<A>middle<C>middle Switching to inner...
+<top>inner<D>inner</D></top></C></A></D></B>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl27.out b/test/tests/conf-gold/impincl/impincl27.out
new file mode 100644
index 0000000..f9e4c86
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><num>1</num><num>2</num></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl28.out b/test/tests/conf-gold/impincl/impincl28.out
new file mode 100644
index 0000000..80d9c25
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><main-t>top</main-t><div><imp-t>default</imp-t></div><imp-b>top</imp-b></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/impincl/impincl29.out b/test/tests/conf-gold/impincl/impincl29.out
new file mode 100644
index 0000000..75df6d6
--- /dev/null
+++ b/test/tests/conf-gold/impincl/impincl29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><div><imp-t>default</imp-t></div><imp-b>top</imp-b></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre01.out b/test/tests/conf-gold/lre/lre01.out
new file mode 100644
index 0000000..2c03cb5
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://www.test.com" ped:attr="test" english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre02.out b/test/tests/conf-gold/lre/lre02.out
new file mode 100644
index 0000000..e37af31
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://tester.com" xmlns="www.lotus.com" english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre03.out b/test/tests/conf-gold/lre/lre03.out
new file mode 100644
index 0000000..c0896ce
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:bdd="http://buster.com" xmlns="www.lotus.com" english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre04.out b/test/tests/conf-gold/lre/lre04.out
new file mode 100644
index 0000000..d02cf49
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre04.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:jad="http://administrator.com" xmlns:bdd="http://buster.com" x="by the corner">
+<sits x="little jack horner"/>
+<minding x="his peas and queues"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre05.out b/test/tests/conf-gold/lre/lre05.out
new file mode 100644
index 0000000..029a05d
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre05.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<main><foo/>
+  <sub-element-in-main xmlns:ped="http://tester.com"/>
+  <sub-element-in-import xmlns:ped="http://tester.com"/>
+  <sub-element-in-include xmlns:ped="http://tester.com"/>
+</main>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre06.out b/test/tests/conf-gold/lre/lre06.out
new file mode 100644
index 0000000..6837d51
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out f="All Done" e="C33" d="B22" c="3" b="B22" a="A1"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre07.out b/test/tests/conf-gold/lre/lre07.out
new file mode 100644
index 0000000..349f71a
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre08.out b/test/tests/conf-gold/lre/lre08.out
new file mode 100644
index 0000000..e2b40a2
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><Out1/><Out2/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre09.out b/test/tests/conf-gold/lre/lre09.out
new file mode 100644
index 0000000..365b343
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out AtTrib-0.01="Mix-d.Char5">Text-A<Sub-Elem2.0/>teXt.B</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre10.out b/test/tests/conf-gold/lre/lre10.out
new file mode 100644
index 0000000..815b0c3
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ext="http://somebody.elses.extension" ext:size="big" english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre11.out b/test/tests/conf-gold/lre/lre11.out
new file mode 100644
index 0000000..6a5e86a
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:bdd="http://buster.com" xmlns:ped="http://tester.com" xmlns="www.lotus.com" english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre12.out b/test/tests/conf-gold/lre/lre12.out
new file mode 100644
index 0000000..3e2515d
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre12.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      This should be directly inside the out element.
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre13.out b/test/tests/conf-gold/lre/lre13.out
new file mode 100644
index 0000000..50139b5
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre13.out
@@ -0,0 +1,2 @@
+
+  This should be directly at the top.
diff --git a/test/tests/conf-gold/lre/lre14.out b/test/tests/conf-gold/lre/lre14.out
new file mode 100644
index 0000000..67e533d
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><all>XYZ</all></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre15.out b/test/tests/conf-gold/lre/lre15.out
new file mode 100644
index 0000000..90b194f
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre15.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:jad="http://administrator.com" xmlns:ljh="http://buster.com" x="by the corner">
+<jad:output1/>
+<jad:output2>
+<jad:output2a/>
+</jad:output2>
+<ljh:output1/>
+<ljh:output2>
+<ljh:output2a/>
+</ljh:output2>
+</out>
diff --git a/test/tests/conf-gold/lre/lre16.out b/test/tests/conf-gold/lre/lre16.out
new file mode 100644
index 0000000..0163162
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>$var</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre17.out b/test/tests/conf-gold/lre/lre17.out
new file mode 100644
index 0000000..7e4be95
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sits xmlns:ljh="http://buster.com" x="little jack horner"/>
diff --git a/test/tests/conf-gold/lre/lre18.out b/test/tests/conf-gold/lre/lre18.out
new file mode 100644
index 0000000..508e044
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre18.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<minding xmlns:ped="http://tester.com" x="his peas and queues">
+<jad:output1 xmlns:jad="http://administrator.com"/>
+<jad:output2 xmlns:jad="http://administrator.com">
+<jad:output2a/>
+</jad:output2>
+<ljh:output1 xmlns:ljh="http://buster.com"/>
+<ljh:output2 xmlns:ljh="http://buster.com">
+<ljh:output2a/>
+</ljh:output2>
+</minding>
diff --git a/test/tests/conf-gold/lre/lre19.out b/test/tests/conf-gold/lre/lre19.out
new file mode 100644
index 0000000..ac45be0
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre19.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:_ped="http://www.ped.com">
+<_an_elem xmlns="http://www.ped.com"/>
+<_ped:_an_elem/></root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre20.out b/test/tests/conf-gold/lre/lre20.out
new file mode 100644
index 0000000..5e0773d
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://tester.com" english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre21.out b/test/tests/conf-gold/lre/lre21.out
new file mode 100644
index 0000000..5e0773d
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://tester.com" english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre22.out b/test/tests/conf-gold/lre/lre22.out
new file mode 100644
index 0000000..0ea54a7
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ped:out xmlns:ped="http://tester.com" ped:english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/lre/lre23.out b/test/tests/conf-gold/lre/lre23.out
new file mode 100644
index 0000000..6982bc1
--- /dev/null
+++ b/test/tests/conf-gold/lre/lre23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bdd:out xmlns:bdd="http://buster.com" bdd:english="to leave"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match01.out b/test/tests/conf-gold/match/match01.out
new file mode 100644
index 0000000..007092a
--- /dev/null
+++ b/test/tests/conf-gold/match/match01.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  cba
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match02.out b/test/tests/conf-gold/match/match02.out
new file mode 100644
index 0000000..fb5312d
--- /dev/null
+++ b/test/tests/conf-gold/match/match02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>num6 num2 num4 num3 num1 num5 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match03.out b/test/tests/conf-gold/match/match03.out
new file mode 100644
index 0000000..2a90619
--- /dev/null
+++ b/test/tests/conf-gold/match/match03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>num4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match04.out b/test/tests/conf-gold/match/match04.out
new file mode 100644
index 0000000..54fdefd
--- /dev/null
+++ b/test/tests/conf-gold/match/match04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>b b </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match05.out b/test/tests/conf-gold/match/match05.out
new file mode 100644
index 0000000..a0aa831
--- /dev/null
+++ b/test/tests/conf-gold/match/match05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>b b h </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match06.out b/test/tests/conf-gold/match/match06.out
new file mode 100644
index 0000000..b72e574
--- /dev/null
+++ b/test/tests/conf-gold/match/match06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a c h </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match07.out b/test/tests/conf-gold/match/match07.out
new file mode 100644
index 0000000..b72e574
--- /dev/null
+++ b/test/tests/conf-gold/match/match07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a c h </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match08.out b/test/tests/conf-gold/match/match08.out
new file mode 100644
index 0000000..0848191
--- /dev/null
+++ b/test/tests/conf-gold/match/match08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>11 121 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match09.out b/test/tests/conf-gold/match/match09.out
new file mode 100644
index 0000000..b99cc06
--- /dev/null
+++ b/test/tests/conf-gold/match/match09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>foo foo </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match10.out b/test/tests/conf-gold/match/match10.out
new file mode 100644
index 0000000..969ebd1
--- /dev/null
+++ b/test/tests/conf-gold/match/match10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>h</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match11.out b/test/tests/conf-gold/match/match11.out
new file mode 100644
index 0000000..e120c07
--- /dev/null
+++ b/test/tests/conf-gold/match/match11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a = B</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match12.out b/test/tests/conf-gold/match/match12.out
new file mode 100644
index 0000000..e912023
--- /dev/null
+++ b/test/tests/conf-gold/match/match12.out
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test for source tree depth
+Found an A node
+Found a B node
+Found a C node
+Found a D node
+Found an E node
+Found an F node
+Found a G node
+Found an H node
+Found an I node
+Found a J node
+Found a K node
+Found an L node
+Found an M node
+Found an N node
+Found an O node
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match13.out b/test/tests/conf-gold/match/match13.out
new file mode 100644
index 0000000..dfdd7ec
--- /dev/null
+++ b/test/tests/conf-gold/match/match13.out
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>9
+44
+51
+77
+114
+118
+154
+176
+187
+209
+224
+255
+355
+374
+390
+426
+494
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match14.out b/test/tests/conf-gold/match/match14.out
new file mode 100644
index 0000000..a5aaa42
--- /dev/null
+++ b/test/tests/conf-gold/match/match14.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  Passed: a
+  Failed: b
+  Passed: c
+  Failed: d
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match15.out b/test/tests/conf-gold/match/match15.out
new file mode 100644
index 0000000..f277088
--- /dev/null
+++ b/test/tests/conf-gold/match/match15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test Executed Successfully.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match16.out b/test/tests/conf-gold/match/match16.out
new file mode 100644
index 0000000..a595bc7
--- /dev/null
+++ b/test/tests/conf-gold/match/match16.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out>
+<first>hello</first><other/>
+<first>goodbye</first><other/><other/>
+<first>aloha</first>
+<first>shalom</first><other/><other/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match17.out b/test/tests/conf-gold/match/match17.out
new file mode 100644
index 0000000..716a649
--- /dev/null
+++ b/test/tests/conf-gold/match/match17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12 132 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match18.out b/test/tests/conf-gold/match/match18.out
new file mode 100644
index 0000000..716a649
--- /dev/null
+++ b/test/tests/conf-gold/match/match18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12 132 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match19.out b/test/tests/conf-gold/match/match19.out
new file mode 100644
index 0000000..ff15acb
--- /dev/null
+++ b/test/tests/conf-gold/match/match19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>112 13 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match20.out b/test/tests/conf-gold/match/match20.out
new file mode 100644
index 0000000..b5fd167
--- /dev/null
+++ b/test/tests/conf-gold/match/match20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>g i k </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match21.out b/test/tests/conf-gold/match/match21.out
new file mode 100644
index 0000000..a07e396
--- /dev/null
+++ b/test/tests/conf-gold/match/match21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>i </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match22.out b/test/tests/conf-gold/match/match22.out
new file mode 100644
index 0000000..a07e396
--- /dev/null
+++ b/test/tests/conf-gold/match/match22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>i </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match23.out b/test/tests/conf-gold/match/match23.out
new file mode 100644
index 0000000..5600fc7
--- /dev/null
+++ b/test/tests/conf-gold/match/match23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>k </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match24.out b/test/tests/conf-gold/match/match24.out
new file mode 100644
index 0000000..5600fc7
--- /dev/null
+++ b/test/tests/conf-gold/match/match24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>k </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match25.out b/test/tests/conf-gold/match/match25.out
new file mode 100644
index 0000000..5600fc7
--- /dev/null
+++ b/test/tests/conf-gold/match/match25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>k </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match26.out b/test/tests/conf-gold/match/match26.out
new file mode 100644
index 0000000..99fff64
--- /dev/null
+++ b/test/tests/conf-gold/match/match26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>c </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match27.out b/test/tests/conf-gold/match/match27.out
new file mode 100644
index 0000000..0765e51
--- /dev/null
+++ b/test/tests/conf-gold/match/match27.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<foundX level="2"/><foundX level="4"/><foundX level="6"/>
+<found-X level="2"/><found-X level="4"/><found-X level="6"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match28.out b/test/tests/conf-gold/match/match28.out
new file mode 100644
index 0000000..2d40ae8
--- /dev/null
+++ b/test/tests/conf-gold/match/match28.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<foundX level="4"/>
+<found-X level="4"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match29.out b/test/tests/conf-gold/match/match29.out
new file mode 100644
index 0000000..12592bf
--- /dev/null
+++ b/test/tests/conf-gold/match/match29.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<foundX level="4"/><foundX level="6"/>
+<found-X level="4"/><found-X level="6"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match30.out b/test/tests/conf-gold/match/match30.out
new file mode 100644
index 0000000..2b21155
--- /dev/null
+++ b/test/tests/conf-gold/match/match30.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<match>Rule doc/l1/v2; value of matched node:  doc-l1-v2</match>
+<match>Rule doc/child::l1/x2; value of matched node:  doc-l1-x2</match>
+<match>Rule doc/l1//v3; value of matched node:  doc-l1-l2-v3</match>
+<match>Rule doc//l2/w3; value of matched node:  doc-l1-l2-w3</match>
+<match>Rule doc/child::l1//x3; value of matched node:  doc-l1-l2-x3</match>
+<match>Rule doc//child::l2/y3; value of matched node:  doc-l1-l2-y3</match>
+<match>Rule doc//l2//v4; value of matched node:  doc-l1-l2-l3-v4</match>
+<match>Rule doc//child::l2//x4; value of matched node:  doc-l1-l2-l3-x4</match></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match31.out b/test/tests/conf-gold/match/match31.out
new file mode 100644
index 0000000..80bf146
--- /dev/null
+++ b/test/tests/conf-gold/match/match31.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<match>Rule doc/l1/v2; value of matched node:  doc-l1-v2</match>
+<match>Rule doc/l1/child::x2; value of matched node:  doc-l1-x2</match>
+<match>Rule doc/l1//v3; value of matched node:  doc-l1-l2-v3</match>
+<match>Rule doc//l2/w3; value of matched node:  doc-l1-l2-w3</match>
+<match>Rule doc/l1//child::x3; value of matched node:  doc-l1-l2-x3</match>
+<match>Rule doc//l2/child::y3; value of matched node:  doc-l1-l2-y3</match>
+<match>Rule doc//l2//v4; value of matched node:  doc-l1-l2-l3-v4</match>
+<match>Rule doc//l2//child::x4; value of matched node:  doc-l1-l2-l3-x4</match></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match32.out b/test/tests/conf-gold/match/match32.out
new file mode 100644
index 0000000..ed82511
--- /dev/null
+++ b/test/tests/conf-gold/match/match32.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<match>Rule doc/l1/v2; value of matched node:  doc-l1-v2</match>
+<match>Rule doc/child::l1/child::x2; value of matched node:  doc-l1-x2</match>
+<match>Rule doc/l1//v3; value of matched node:  doc-l1-l2-v3</match>
+<match>Rule doc//l2/w3; value of matched node:  doc-l1-l2-w3</match>
+<match>Rule doc/child::l1//child::x3; value of matched node:  doc-l1-l2-x3</match>
+<match>Rule doc//child::l2/child::y3; value of matched node:  doc-l1-l2-y3</match>
+<match>Rule doc//l2//v4; value of matched node:  doc-l1-l2-l3-v4</match>
+<match>Rule doc//child::l2//child::x4; value of matched node:  doc-l1-l2-l3-x4</match></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match33.out b/test/tests/conf-gold/match/match33.out
new file mode 100644
index 0000000..100fa39
--- /dev/null
+++ b/test/tests/conf-gold/match/match33.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out><name>John Doe</name><name>Jane Doe</name></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/match/match34.out b/test/tests/conf-gold/match/match34.out
new file mode 100644
index 0000000..5f20a8d
--- /dev/null
+++ b/test/tests/conf-gold/match/match34.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out><attribute>name</attribute></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math01.out b/test/tests/conf-gold/math/math01.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/math/math01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math02.out b/test/tests/conf-gold/math/math02.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/math/math02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math03.out b/test/tests/conf-gold/math/math03.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/math/math03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math04.out b/test/tests/conf-gold/math/math04.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/math/math04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math05.out b/test/tests/conf-gold/math/math05.out
new file mode 100644
index 0000000..b995918
--- /dev/null
+++ b/test/tests/conf-gold/math/math05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>10</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math06.out b/test/tests/conf-gold/math/math06.out
new file mode 100644
index 0000000..dcbeb26
--- /dev/null
+++ b/test/tests/conf-gold/math/math06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math07.out b/test/tests/conf-gold/math/math07.out
new file mode 100644
index 0000000..88887af
--- /dev/null
+++ b/test/tests/conf-gold/math/math07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>9</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math08.out b/test/tests/conf-gold/math/math08.out
new file mode 100644
index 0000000..c108d97
--- /dev/null
+++ b/test/tests/conf-gold/math/math08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2,40</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math09.out b/test/tests/conf-gold/math/math09.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/math/math09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math10.out b/test/tests/conf-gold/math/math10.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/math/math10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math100.out b/test/tests/conf-gold/math/math100.out
new file mode 100644
index 0000000..11c5c59
--- /dev/null
+++ b/test/tests/conf-gold/math/math100.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>5,44,9</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math101.out b/test/tests/conf-gold/math/math101.out
new file mode 100644
index 0000000..bf1ba60
--- /dev/null
+++ b/test/tests/conf-gold/math/math101.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>15,2,2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math102.out b/test/tests/conf-gold/math/math102.out
new file mode 100644
index 0000000..fdd8f80
--- /dev/null
+++ b/test/tests/conf-gold/math/math102.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>17</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math103.out b/test/tests/conf-gold/math/math103.out
new file mode 100644
index 0000000..eeb135d
--- /dev/null
+++ b/test/tests/conf-gold/math/math103.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math104.out b/test/tests/conf-gold/math/math104.out
new file mode 100644
index 0000000..11ec3d7
--- /dev/null
+++ b/test/tests/conf-gold/math/math104.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0 is a number
+1 is a number
+2 is a number
+-1 is a number
+0.0001 is a number
+five is not a number
+NaN is not a number
+ is not a number
+. is not a number
+0. is a number
+.0 is a number
+-0 is a number
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math105.out b/test/tests/conf-gold/math/math105.out
new file mode 100644
index 0000000..d26dc4e
--- /dev/null
+++ b/test/tests/conf-gold/math/math105.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>9876543210</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math11.out b/test/tests/conf-gold/math/math11.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/math/math11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math110.out b/test/tests/conf-gold/math/math110.out
new file mode 100644
index 0000000..28a9656
--- /dev/null
+++ b/test/tests/conf-gold/math/math110.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1.75|1.75|true|
+1.75|true|
+0.0004|0.0004|true|
+0.0004|true|
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math111.out b/test/tests/conf-gold/math/math111.out
new file mode 100644
index 0000000..a3c0707
--- /dev/null
+++ b/test/tests/conf-gold/math/math111.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+	<pos>0</pos><neg>0</neg>
+	<pos>0.4</pos><neg>-0.4</neg>
+	<pos>4</pos><neg>-4</neg>
+	<pos>0.04</pos><neg>-0.04</neg>
+	<pos>0.004</pos><neg>-0.004</neg>
+	<pos>0.0004</pos><neg>-0.0004</neg>
+	<pos>0.0000000000001</pos><neg>-0.0000000000001</neg>
+	<pos>0.0000000000000000000000000001</pos><neg>-0.0000000000000000000000000001</neg>
+	<pos>0.0000000000001000000000000001</pos><neg>-0.0000000000001000000000000001</neg>
+	<pos>0.0012</pos><neg>-0.0012</neg>
+	<pos>0.012</pos><neg>-0.012</neg>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math12.out b/test/tests/conf-gold/math/math12.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math13.out b/test/tests/conf-gold/math/math13.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/math/math13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math14.out b/test/tests/conf-gold/math/math14.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/math/math14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math15.out b/test/tests/conf-gold/math/math15.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/math/math15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math16.out b/test/tests/conf-gold/math/math16.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math17.out b/test/tests/conf-gold/math/math17.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/math/math17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math18.out b/test/tests/conf-gold/math/math18.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/math/math18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math19.out b/test/tests/conf-gold/math/math19.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math20.out b/test/tests/conf-gold/math/math20.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math21.out b/test/tests/conf-gold/math/math21.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/math/math21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math22.out b/test/tests/conf-gold/math/math22.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/math/math22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math23.out b/test/tests/conf-gold/math/math23.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/math/math23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math24.out b/test/tests/conf-gold/math/math24.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/math/math24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math25.out b/test/tests/conf-gold/math/math25.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/math/math25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math26.out b/test/tests/conf-gold/math/math26.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math27.out b/test/tests/conf-gold/math/math27.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math28.out b/test/tests/conf-gold/math/math28.out
new file mode 100644
index 0000000..4666d6f
--- /dev/null
+++ b/test/tests/conf-gold/math/math28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math29.out b/test/tests/conf-gold/math/math29.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math30.out b/test/tests/conf-gold/math/math30.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math31.out b/test/tests/conf-gold/math/math31.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math32.out b/test/tests/conf-gold/math/math32.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/math/math32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math33.out b/test/tests/conf-gold/math/math33.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math34.out b/test/tests/conf-gold/math/math34.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math34.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math35.out b/test/tests/conf-gold/math/math35.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/math/math35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math36.out b/test/tests/conf-gold/math/math36.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/math/math36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math37.out b/test/tests/conf-gold/math/math37.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math38.out b/test/tests/conf-gold/math/math38.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math39.out b/test/tests/conf-gold/math/math39.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math40.out b/test/tests/conf-gold/math/math40.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/math/math40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math41.out b/test/tests/conf-gold/math/math41.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/math/math41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math42.out b/test/tests/conf-gold/math/math42.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/math/math42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math43.out b/test/tests/conf-gold/math/math43.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/math/math43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math44.out b/test/tests/conf-gold/math/math44.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/math/math44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math45.out b/test/tests/conf-gold/math/math45.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math46.out b/test/tests/conf-gold/math/math46.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math47.out b/test/tests/conf-gold/math/math47.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math48.out b/test/tests/conf-gold/math/math48.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math48.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math49.out b/test/tests/conf-gold/math/math49.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math50.out b/test/tests/conf-gold/math/math50.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/math/math50.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math51.out b/test/tests/conf-gold/math/math51.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math52.out b/test/tests/conf-gold/math/math52.out
new file mode 100644
index 0000000..e096fcb
--- /dev/null
+++ b/test/tests/conf-gold/math/math52.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math53.out b/test/tests/conf-gold/math/math53.out
new file mode 100644
index 0000000..dcbeb26
--- /dev/null
+++ b/test/tests/conf-gold/math/math53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math54.out b/test/tests/conf-gold/math/math54.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/math/math54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math55.out b/test/tests/conf-gold/math/math55.out
new file mode 100644
index 0000000..dcbeb26
--- /dev/null
+++ b/test/tests/conf-gold/math/math55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math56.out b/test/tests/conf-gold/math/math56.out
new file mode 100644
index 0000000..3bcc546
--- /dev/null
+++ b/test/tests/conf-gold/math/math56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>8</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math57.out b/test/tests/conf-gold/math/math57.out
new file mode 100644
index 0000000..88887af
--- /dev/null
+++ b/test/tests/conf-gold/math/math57.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>9</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math58.out b/test/tests/conf-gold/math/math58.out
new file mode 100644
index 0000000..b995918
--- /dev/null
+++ b/test/tests/conf-gold/math/math58.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>10</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math59.out b/test/tests/conf-gold/math/math59.out
new file mode 100644
index 0000000..b995918
--- /dev/null
+++ b/test/tests/conf-gold/math/math59.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>10</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math60.out b/test/tests/conf-gold/math/math60.out
new file mode 100644
index 0000000..e096fcb
--- /dev/null
+++ b/test/tests/conf-gold/math/math60.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math61.out b/test/tests/conf-gold/math/math61.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/math/math61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math62.out b/test/tests/conf-gold/math/math62.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/math/math62.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math63.out b/test/tests/conf-gold/math/math63.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/math/math63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math64.out b/test/tests/conf-gold/math/math64.out
new file mode 100644
index 0000000..b995918
--- /dev/null
+++ b/test/tests/conf-gold/math/math64.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>10</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math65.out b/test/tests/conf-gold/math/math65.out
new file mode 100644
index 0000000..b995918
--- /dev/null
+++ b/test/tests/conf-gold/math/math65.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>10</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math66.out b/test/tests/conf-gold/math/math66.out
new file mode 100644
index 0000000..6c2771a
--- /dev/null
+++ b/test/tests/conf-gold/math/math66.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math67.out b/test/tests/conf-gold/math/math67.out
new file mode 100644
index 0000000..6c2771a
--- /dev/null
+++ b/test/tests/conf-gold/math/math67.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math68.out b/test/tests/conf-gold/math/math68.out
new file mode 100644
index 0000000..3bcc546
--- /dev/null
+++ b/test/tests/conf-gold/math/math68.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>8</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math69.out b/test/tests/conf-gold/math/math69.out
new file mode 100644
index 0000000..3bcc546
--- /dev/null
+++ b/test/tests/conf-gold/math/math69.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>8</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math70.out b/test/tests/conf-gold/math/math70.out
new file mode 100644
index 0000000..eeb135d
--- /dev/null
+++ b/test/tests/conf-gold/math/math70.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math71.out b/test/tests/conf-gold/math/math71.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math71.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math72.out b/test/tests/conf-gold/math/math72.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/math/math72.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math73.out b/test/tests/conf-gold/math/math73.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math73.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math74.out b/test/tests/conf-gold/math/math74.out
new file mode 100644
index 0000000..b995918
--- /dev/null
+++ b/test/tests/conf-gold/math/math74.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>10</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math75.out b/test/tests/conf-gold/math/math75.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math75.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math76.out b/test/tests/conf-gold/math/math76.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/math/math76.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math77.out b/test/tests/conf-gold/math/math77.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/math/math77.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math78.out b/test/tests/conf-gold/math/math78.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/math/math78.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math79.out b/test/tests/conf-gold/math/math79.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/math/math79.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math80.out b/test/tests/conf-gold/math/math80.out
new file mode 100644
index 0000000..e096fcb
--- /dev/null
+++ b/test/tests/conf-gold/math/math80.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math81.out b/test/tests/conf-gold/math/math81.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math81.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math82.out b/test/tests/conf-gold/math/math82.out
new file mode 100644
index 0000000..e096fcb
--- /dev/null
+++ b/test/tests/conf-gold/math/math82.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math83.out b/test/tests/conf-gold/math/math83.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/math/math83.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math84.out b/test/tests/conf-gold/math/math84.out
new file mode 100644
index 0000000..4d96780
--- /dev/null
+++ b/test/tests/conf-gold/math/math84.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<h>8</h><h>7</h>
+15
+8
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math85.out b/test/tests/conf-gold/math/math85.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/math/math85.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math86.out b/test/tests/conf-gold/math/math86.out
new file mode 100644
index 0000000..0960d74
--- /dev/null
+++ b/test/tests/conf-gold/math/math86.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>24,63</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math87.out b/test/tests/conf-gold/math/math87.out
new file mode 100644
index 0000000..f3c376e
--- /dev/null
+++ b/test/tests/conf-gold/math/math87.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>60,6,2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math88.out b/test/tests/conf-gold/math/math88.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/math/math88.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math89.out b/test/tests/conf-gold/math/math89.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/math/math89.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math90.out b/test/tests/conf-gold/math/math90.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/math/math90.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math91.out b/test/tests/conf-gold/math/math91.out
new file mode 100644
index 0000000..a0d7272
--- /dev/null
+++ b/test/tests/conf-gold/math/math91.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN,NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math92.out b/test/tests/conf-gold/math/math92.out
new file mode 100644
index 0000000..a0d7272
--- /dev/null
+++ b/test/tests/conf-gold/math/math92.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN,NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math93.out b/test/tests/conf-gold/math/math93.out
new file mode 100644
index 0000000..a0d7272
--- /dev/null
+++ b/test/tests/conf-gold/math/math93.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN,NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math94.out b/test/tests/conf-gold/math/math94.out
new file mode 100644
index 0000000..5015737
--- /dev/null
+++ b/test/tests/conf-gold/math/math94.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN,NaN,NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math95.out b/test/tests/conf-gold/math/math95.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/math/math95.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math96.out b/test/tests/conf-gold/math/math96.out
new file mode 100644
index 0000000..e47a197
--- /dev/null
+++ b/test/tests/conf-gold/math/math96.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-17</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math97.out b/test/tests/conf-gold/math/math97.out
new file mode 100644
index 0000000..9c8b38f
--- /dev/null
+++ b/test/tests/conf-gold/math/math97.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>200,17,27</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math98.out b/test/tests/conf-gold/math/math98.out
new file mode 100644
index 0000000..97c9291
--- /dev/null
+++ b/test/tests/conf-gold/math/math98.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>40,77,60</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/math/math99.out b/test/tests/conf-gold/math/math99.out
new file mode 100644
index 0000000..7bb6ced
--- /dev/null
+++ b/test/tests/conf-gold/math/math99.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>17,24,39</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs01.out b/test/tests/conf-gold/mdocs/mdocs01.out
new file mode 100644
index 0000000..a1faf21
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs01.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out>ok</out>
diff --git a/test/tests/conf-gold/mdocs/mdocs02.out b/test/tests/conf-gold/mdocs/mdocs02.out
new file mode 100644
index 0000000..ae3d64d
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs02.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <out><outer>
+  <body>GoodBye</body>
+</outer></out>
diff --git a/test/tests/conf-gold/mdocs/mdocs03.out b/test/tests/conf-gold/mdocs/mdocs03.out
new file mode 100644
index 0000000..13aa768
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs03.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out><doc>
+	<body/>
+</doc></out>
diff --git a/test/tests/conf-gold/mdocs/mdocs04.out b/test/tests/conf-gold/mdocs/mdocs04.out
new file mode 100644
index 0000000..6c1cd83
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs04.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out><doc>
+	<body>Hello</body>
+</doc><outer>
+	<body>GoodBye</body>
+</outer></out>
diff --git a/test/tests/conf-gold/mdocs/mdocs05.out b/test/tests/conf-gold/mdocs/mdocs05.out
new file mode 100644
index 0000000..4ab8d5b
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs05.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>CompUSA Inc.
+  14951
+  N. Dallas Pkwy
+  Dallas, 
+  TX 
+  75240
+
+  1-800-666-2000
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs06.out b/test/tests/conf-gold/mdocs/mdocs06.out
new file mode 100644
index 0000000..5378056
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs06.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  top, Done with doc
+top, Done with outer
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs07.out b/test/tests/conf-gold/mdocs/mdocs07.out
new file mode 100644
index 0000000..a3a9232
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><body>Hello</body><body>Shirt</body><body>Overt</body><body>GoodBye</body><body>Tie</body><body>Sly</body></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs08.out b/test/tests/conf-gold/mdocs/mdocs08.out
new file mode 100644
index 0000000..fa150bb
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs08.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out>
+  1 Hello 
+  2 ok
+  1 GoodBye 
+  2 ok</out>
diff --git a/test/tests/conf-gold/mdocs/mdocs09.out b/test/tests/conf-gold/mdocs/mdocs09.out
new file mode 100644
index 0000000..6c00c41
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs09.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<ped:test xmlns:ped="ped.com" attrib="yeha" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bdd="bdd.com">YEE-HA</ped:test>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs10.out b/test/tests/conf-gold/mdocs/mdocs10.out
new file mode 100644
index 0000000..adf4429
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs10.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><b>Ye ha - performed document(File URL) correctly!</b>
+<a/><a>mdocs04a.xml</a><a>mdocs06a.xml</a><a>mdocs04b.xml</a><a>mdocs06b.xml</a></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs11.out b/test/tests/conf-gold/mdocs/mdocs11.out
new file mode 100644
index 0000000..3d01572
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs11.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <out>Width of body 1 is 66
+Width of body 2 is 72
+Width of body 3 is 80
+Width of body 4 is 96
+Width of body 5 is 132
+</out>
diff --git a/test/tests/conf-gold/mdocs/mdocs12.out b/test/tests/conf-gold/mdocs/mdocs12.out
new file mode 100644
index 0000000..5607414
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs12.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+
+  <ped:test xmlns:ped="ped.com" attrib="yeha" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">YEE-HA</ped:test>
+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs13.out b/test/tests/conf-gold/mdocs/mdocs13.out
new file mode 100644
index 0000000..5607414
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs13.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+
+  <ped:test xmlns:ped="ped.com" attrib="yeha" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">YEE-HA</ped:test>
+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs14.out b/test/tests/conf-gold/mdocs/mdocs14.out
new file mode 100644
index 0000000..effeaec
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs14.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+  <body>
+    <table>
+      <tr><td>xxx</td></tr>
+      <tr><td>XML<table>
+  <foo><b>zzz</b></foo>
+</table></td></tr>
+      <tr><td>xxx</td></tr>
+    </table>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs15.out b/test/tests/conf-gold/mdocs/mdocs15.out
new file mode 100644
index 0000000..206825e
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs15.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <out><doc>
+  <body/>
+</doc></out>
diff --git a/test/tests/conf-gold/mdocs/mdocs16.out b/test/tests/conf-gold/mdocs/mdocs16.out
new file mode 100644
index 0000000..1365fbd
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs16.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<key>TableofContents</key>
+<lang>en</lang>
+<var>Table of Contents</var>
+<text>Table of Contents</text>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs17.out b/test/tests/conf-gold/mdocs/mdocs17.out
new file mode 100644
index 0000000..0c60b56
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs17.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<month>January - 35215 miles earned.</month>
+<month>February - 92731 miles earned.</month>
+<month>March - 76725 miles earned.</month>
+<month>April - 31781 miles earned.</month>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs18.out b/test/tests/conf-gold/mdocs/mdocs18.out
new file mode 100644
index 0000000..e2c1322
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs18.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>5 body nodes:
+1. B-Dry
+2. A-Flirt
+3. B-Pie
+4. A-Skirt
+5. B-Why
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/mdocs/mdocs19.out b/test/tests/conf-gold/mdocs/mdocs19.out
new file mode 100644
index 0000000..02d4d10
--- /dev/null
+++ b/test/tests/conf-gold/mdocs/mdocs19.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message01.out b/test/tests/conf-gold/message/message01.out
new file mode 100644
index 0000000..9aa81f1
--- /dev/null
+++ b/test/tests/conf-gold/message/message01.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message02.out b/test/tests/conf-gold/message/message02.out
new file mode 100644
index 0000000..819c942
--- /dev/null
+++ b/test/tests/conf-gold/message/message02.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  If we got this far, we did not terminate.
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message03.out b/test/tests/conf-gold/message/message03.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message04.out b/test/tests/conf-gold/message/message04.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message05.out b/test/tests/conf-gold/message/message05.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message06.out b/test/tests/conf-gold/message/message06.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message07.out b/test/tests/conf-gold/message/message07.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message08.out b/test/tests/conf-gold/message/message08.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message09.out b/test/tests/conf-gold/message/message09.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message10.out b/test/tests/conf-gold/message/message10.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message11.out b/test/tests/conf-gold/message/message11.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message12.out b/test/tests/conf-gold/message/message12.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message13.out b/test/tests/conf-gold/message/message13.out
new file mode 100644
index 0000000..112ee22
--- /dev/null
+++ b/test/tests/conf-gold/message/message13.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message14.out b/test/tests/conf-gold/message/message14.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message15.out b/test/tests/conf-gold/message/message15.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/message/message15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/message/message16.out b/test/tests/conf-gold/message/message16.out
new file mode 100644
index 0000000..e33281b
--- /dev/null
+++ b/test/tests/conf-gold/message/message16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>X</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes01.out b/test/tests/conf-gold/modes/modes01.out
new file mode 100644
index 0000000..2063e94
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>mode-a:a-text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes02.out b/test/tests/conf-gold/modes/modes02.out
new file mode 100644
index 0000000..7ada621
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes02.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  mode-b: no-mode:brown-fox</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes03.out b/test/tests/conf-gold/modes/modes03.out
new file mode 100644
index 0000000..82677b8
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a-text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes04.out b/test/tests/conf-gold/modes/modes04.out
new file mode 100644
index 0000000..acbf385
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>no-mode:a-text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes05.out b/test/tests/conf-gold/modes/modes05.out
new file mode 100644
index 0000000..2063e94
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>mode-a:a-text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes06.out b/test/tests/conf-gold/modes/modes06.out
new file mode 100644
index 0000000..f9c4359
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="http://foo.com">mode-foo:a:a-text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes07.out b/test/tests/conf-gold/modes/modes07.out
new file mode 100644
index 0000000..8d9f108
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="http://foo.com">mode-a:a-text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes08.out b/test/tests/conf-gold/modes/modes08.out
new file mode 100644
index 0000000..6c909a2
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes08.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+modeA: a-text
+modeB: a-texta attribute
+modeC: a-text
+modeD: a-texta attribute
+modeE: a-text
+modeA: b-text
+modeB: b-text
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes09.out b/test/tests/conf-gold/modes/modes09.out
new file mode 100644
index 0000000..ee9619b
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes09.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  -a
+  -b
+  -c
+  $
+  #6
+  -h
+  #9
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes10.out b/test/tests/conf-gold/modes/modes10.out
new file mode 100644
index 0000000..8d74acd
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes10.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found doc...Scanned doc
+modeless text: 
+  
+Found x, no mode: content
+    why
+  
+mode a text: content
+    Scanned y
+modeless text: why
+mode a text: 
+  modeless text: 
+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes11.out b/test/tests/conf-gold/modes/modes11.out
new file mode 100644
index 0000000..8fbd1af
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> This test executed properly. </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes12.out b/test/tests/conf-gold/modes/modes12.out
new file mode 100644
index 0000000..288196c
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Processing-Instruction 1 type="text/xml"</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes13.out b/test/tests/conf-gold/modes/modes13.out
new file mode 100644
index 0000000..14d98d2
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes13.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  This is the child number 1.
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes14.out b/test/tests/conf-gold/modes/modes14.out
new file mode 100644
index 0000000..d46f3e4
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>attribute1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes15.out b/test/tests/conf-gold/modes/modes15.out
new file mode 100644
index 0000000..0ea5064
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes15.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+ -Any child of root sss-
+
+ +Any descendant of root sss+
+
+ -Any child of any sss-
+
+ +Any descendant of root sss+
+
+ -Any child of any sss-
+
+ +Any descendant of root sss+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes16.out b/test/tests/conf-gold/modes/modes16.out
new file mode 100644
index 0000000..b69bd87
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>mode-moo:a, a-text</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/modes/modes17.out b/test/tests/conf-gold/modes/modes17.out
new file mode 100644
index 0000000..59ff9b2
--- /dev/null
+++ b/test/tests/conf-gold/modes/modes17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>_1st_mode: mode-a:lazy-dog</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate01.out b/test/tests/conf-gold/namedtemplate/namedtemplate01.out
new file mode 100644
index 0000000..e0ef260
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>test,pvar2 default data</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate02.out b/test/tests/conf-gold/namedtemplate/namedtemplate02.out
new file mode 100644
index 0000000..6a3f9d1
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate02.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Call-template,top-level-a,top-level-a,
+Apply-templates,top-level-a,sub-level-a,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate03.out b/test/tests/conf-gold/namedtemplate/namedtemplate03.out
new file mode 100644
index 0000000..8125566
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>doc,def-text-2,doc,a,doc,b,doc,c,doc,d,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate04.out b/test/tests/conf-gold/namedtemplate/namedtemplate04.out
new file mode 100644
index 0000000..e077391
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate04.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="http://foo.com">
+  foo:a
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate05.out b/test/tests/conf-gold/namedtemplate/namedtemplate05.out
new file mode 100644
index 0000000..84d560c
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate05.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="http://foo.com">
+  a
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate06.out b/test/tests/conf-gold/namedtemplate/namedtemplate06.out
new file mode 100644
index 0000000..96dd3f1
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>top-level-a in ntmp1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate07.out b/test/tests/conf-gold/namedtemplate/namedtemplate07.out
new file mode 100644
index 0000000..3854f39
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate07.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+
+  1.showstopper
+
+  1.high
+   2.high
+
+  1.medium
+   2.medium
+
+  1.low
+   2.low</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate08.out b/test/tests/conf-gold/namedtemplate/namedtemplate08.out
new file mode 100644
index 0000000..1369535
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate08.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>found A,555,found B,999,
+Back to template 2.
+Back to first template.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate09.out b/test/tests/conf-gold/namedtemplate/namedtemplate09.out
new file mode 100644
index 0000000..aceffc4
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><in1>0<in2>1<in3>2<in4>3<in5>4<in6>5 - all the way in</in6></in5></in4></in3></in2></in1></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate10.out b/test/tests/conf-gold/namedtemplate/namedtemplate10.out
new file mode 100644
index 0000000..7cf86bf
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate10.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <p>AAA AAA AAA </p>
+  <p>BBB BBB </p>
+  <p>CCC CCC CCC CCC CCC </p>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate11.out b/test/tests/conf-gold/namedtemplate/namedtemplate11.out
new file mode 100644
index 0000000..505ed06
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>This template got passed XYZ</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate12.out b/test/tests/conf-gold/namedtemplate/namedtemplate12.out
new file mode 100644
index 0000000..c1b06db
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate12.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  A. item1
+  B. item2
+  OL!
+    a. subitem1
+    b. subitem2
+    OL!
+      a. subsubitem
+    
+    c. subitem3
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate13.out b/test/tests/conf-gold/namedtemplate/namedtemplate13.out
new file mode 100644
index 0000000..24ae843
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate13.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Looking for doc...X1=hasDocBelow
+Looking for croc...X1=noLowerNode
+Looking for bloc...X1=hasBlocBelow</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate14.out b/test/tests/conf-gold/namedtemplate/namedtemplate14.out
new file mode 100644
index 0000000..e0ef260
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>test,pvar2 default data</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate15.out b/test/tests/conf-gold/namedtemplate/namedtemplate15.out
new file mode 100644
index 0000000..a85c72b
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>test</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate16.out b/test/tests/conf-gold/namedtemplate/namedtemplate16.out
new file mode 100644
index 0000000..ea375de
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate16.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  hoo:a
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate17.out b/test/tests/conf-gold/namedtemplate/namedtemplate17.out
new file mode 100644
index 0000000..508f09e
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Template from ntimpb has been called.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate18.out b/test/tests/conf-gold/namedtemplate/namedtemplate18.out
new file mode 100644
index 0000000..2a9b51c
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Template from MAIN has been called.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namedtemplate/namedtemplate19.out b/test/tests/conf-gold/namedtemplate/namedtemplate19.out
new file mode 100644
index 0000000..8b28f7d
--- /dev/null
+++ b/test/tests/conf-gold/namedtemplate/namedtemplate19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Template from ntimpc has been called.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace01.out b/test/tests/conf-gold/namespace/namespace01.out
new file mode 100644
index 0000000..f03c30e
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace01.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:anamespace="foo.com">
+<p anamespace:Attr1="true"/>
+<p xmlns:ns0="baz.com" ns0:Attr2="true"/>
+<p Attr3="true"/>
+</out>
diff --git a/test/tests/conf-gold/namespace/namespace02.out b/test/tests/conf-gold/namespace/namespace02.out
new file mode 100644
index 0000000..11c64e7
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace02.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:anamespace="foo.com">
+<test xmlns="foo.com">
+<inner xmlns=""/>
+</test>
+<later/>
+<anamespace:anelement/>
+</out>
diff --git a/test/tests/conf-gold/namespace/namespace03.out b/test/tests/conf-gold/namespace/namespace03.out
new file mode 100644
index 0000000..3aff224
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace03.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <out xmlns:space="http://fictitious.com">The foo element....
+    <foo L="winner1" space:Q="winner2"/></out>
diff --git a/test/tests/conf-gold/namespace/namespace04.out b/test/tests/conf-gold/namespace/namespace04.out
new file mode 100644
index 0000000..2bfb9aa
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<foo xmlns:bogus="http://bogus"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace05.out b/test/tests/conf-gold/namespace/namespace05.out
new file mode 100644
index 0000000..3685bae
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace05.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Testing 1 2 3 
+2 x 4
+quos
+bo</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace06.out b/test/tests/conf-gold/namespace/namespace06.out
new file mode 100644
index 0000000..5ea57cf
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace06.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:lotus="http://www.lotus.com" xmlns:foo="http://foo.com"><doc>
+<a>
+<b/>
+</a>
+<c/>
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace07.out b/test/tests/conf-gold/namespace/namespace07.out
new file mode 100644
index 0000000..9edcc77
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">b</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace08.out b/test/tests/conf-gold/namespace/namespace08.out
new file mode 100644
index 0000000..459a86b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>name|at1|namespace-uri||local-name|at1|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace09.out b/test/tests/conf-gold/namespace/namespace09.out
new file mode 100644
index 0000000..7b55f5e
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">attrib2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace10.out b/test/tests/conf-gold/namespace/namespace10.out
new file mode 100644
index 0000000..e933e27
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace100.out b/test/tests/conf-gold/namespace/namespace100.out
new file mode 100644
index 0000000..25c682f
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace100.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><az:foo xmlns:az="barz.com"><yyy xmlns:p2="barz.com"/></az:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace101.out b/test/tests/conf-gold/namespace/namespace101.out
new file mode 100644
index 0000000..6cc5ada
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace101.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="http://www.test.com" xmlns="testguys.com"><inner/></out>
diff --git a/test/tests/conf-gold/namespace/namespace102.out b/test/tests/conf-gold/namespace/namespace102.out
new file mode 100644
index 0000000..344be6d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace102.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><foo xmlns=""><yyy/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace103.out b/test/tests/conf-gold/namespace/namespace103.out
new file mode 100644
index 0000000..85d6d54
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace103.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><foo xmlns="other.com"><yyy/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace104.out b/test/tests/conf-gold/namespace/namespace104.out
new file mode 100644
index 0000000..344be6d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace104.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><foo xmlns=""><yyy/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace105.out b/test/tests/conf-gold/namespace/namespace105.out
new file mode 100644
index 0000000..2193997
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace105.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><foo xmlns=""><yyy xmlns="other.com"/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace106.out b/test/tests/conf-gold/namespace/namespace106.out
new file mode 100644
index 0000000..7da2a7d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace106.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><yyy/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace107.out b/test/tests/conf-gold/namespace/namespace107.out
new file mode 100644
index 0000000..9c134ef
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace107.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="www.test.com" xmlns="testguys.com"><inner xmlns="www.test.com"><yyy xmlns="testguys.com"/></inner></out>
diff --git a/test/tests/conf-gold/namespace/namespace108.out b/test/tests/conf-gold/namespace/namespace108.out
new file mode 100644
index 0000000..10bc239
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace108.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="www.test.com" xmlns="testguys.com"><inner><yyy/></inner></out>
diff --git a/test/tests/conf-gold/namespace/namespace109.out b/test/tests/conf-gold/namespace/namespace109.out
new file mode 100644
index 0000000..a7c7ce0
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace109.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="www.test.com" xmlns="testguys.com"><inner xmlns="other.com"><yyy xmlns="testguys.com"/></inner></out>
diff --git a/test/tests/conf-gold/namespace/namespace11.out b/test/tests/conf-gold/namespace/namespace11.out
new file mode 100644
index 0000000..25d3b13
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace11.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+	0 http://xsl.lotus.com/ns2:
+	1 http://xsl.lotus.com/ns1:
+	2 http://xsl.lotus.com/ns1:
+	3 :
+	4 http://xsl.lotus.com/ns2:
+	5 http://xsl.lotus.com/ns1:
+	6 :
+	7 :
+ </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace110.out b/test/tests/conf-gold/namespace/namespace110.out
new file mode 100644
index 0000000..2cf756b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace110.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><ouch:foo xmlns:ouch="&quot;"><yyy/></ouch:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace111.out b/test/tests/conf-gold/namespace/namespace111.out
new file mode 100644
index 0000000..a47b044
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace111.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="abc"><foo><yyy xmlns=""/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace112.out b/test/tests/conf-gold/namespace/namespace112.out
new file mode 100644
index 0000000..7f701b9
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace112.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="abc"><foo><yyy xmlns="other.com"/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace113.out b/test/tests/conf-gold/namespace/namespace113.out
new file mode 100644
index 0000000..48b6499
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace113.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ixsl:stylesheet xmlns:ixsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <ixsl:template match="foo"><ixsl:text>Recognized foo</ixsl:text></ixsl:template>
+  <ixsl:template match="bar"><ixsl:text>Recognized bar</ixsl:text></ixsl:template>
+</ixsl:stylesheet>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace115.out b/test/tests/conf-gold/namespace/namespace115.out
new file mode 100644
index 0000000..8024b71
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace115.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="www.test.com"><inner xmlns="www.test.com"><yyy xmlns="other.com"/></inner></out>
diff --git a/test/tests/conf-gold/namespace/namespace116.out b/test/tests/conf-gold/namespace/namespace116.out
new file mode 100644
index 0000000..5245882
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace116.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="foo.com"><foo:pq Attr1="true"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace117.out b/test/tests/conf-gold/namespace/namespace117.out
new file mode 100644
index 0000000..47085cf
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace117.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:bee="bee.com" bee:see="true"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace119.out b/test/tests/conf-gold/namespace/namespace119.out
new file mode 100644
index 0000000..6fcea05
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace119.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out Attr0="whatever"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace12.out b/test/tests/conf-gold/namespace/namespace12.out
new file mode 100644
index 0000000..cf715db
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">http://xsl.lotus.com/ns2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace120.out b/test/tests/conf-gold/namespace/namespace120.out
new file mode 100644
index 0000000..94e13df
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace120.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="base.test" xmlns:p1="xyz"><p1:foo xmlns:p1="new"><yyy xmlns:p1="xyz"/></p1:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace121.out b/test/tests/conf-gold/namespace/namespace121.out
new file mode 100644
index 0000000..9bab93e
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace121.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="base.test" xmlns:p1="xyz"><p1:foo xmlns:p1="base.test"><yyy xmlns:p1="xyz"/></p1:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace122.out b/test/tests/conf-gold/namespace/namespace122.out
new file mode 100644
index 0000000..9f1e506
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace122.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="base.test" xmlns:p1="xyz"><p1:foo><yyy/></p1:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace123.out b/test/tests/conf-gold/namespace/namespace123.out
new file mode 100644
index 0000000..c8ad118
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace123.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="base.test" xmlns:p1="xyz"><baz:foo xmlns:baz="base.test"><yyy/></baz:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace124.out b/test/tests/conf-gold/namespace/namespace124.out
new file mode 100644
index 0000000..fb7b590
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace124.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="base.test" xmlns:p1="xyz"><baz:foo xmlns:baz="xyz"><yyy/></baz:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace125.out b/test/tests/conf-gold/namespace/namespace125.out
new file mode 100644
index 0000000..4e2c741
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace125.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="default.com"><inner Attr1="true"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace126.out b/test/tests/conf-gold/namespace/namespace126.out
new file mode 100644
index 0000000..43b94ce
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace126.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="default.com"><inner Attr0="true"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace127.out b/test/tests/conf-gold/namespace/namespace127.out
new file mode 100644
index 0000000..9da0bd4
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace127.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="default.com"><inner xmlns:ns0="testguys.com" ns0:Attr0="true"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace128.out b/test/tests/conf-gold/namespace/namespace128.out
new file mode 100644
index 0000000..320bdb3
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace128.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="default.com"><inner xmlns:ns0="default.com" ns0:Attr0="true"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace13.out b/test/tests/conf-gold/namespace/namespace13.out
new file mode 100644
index 0000000..8c3adff
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace13.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Testing 1 2 3 
+	Orginal xmlns:ped quos
+	Included xmlns:jad quos
+	Imported xmlns:xsl quos</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace130.out b/test/tests/conf-gold/namespace/namespace130.out
new file mode 100644
index 0000000..b0dd2ef
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace130.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="default.com"><inner xmlns:p="default.com" p:attr2="true"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace131.out b/test/tests/conf-gold/namespace/namespace131.out
new file mode 100644
index 0000000..3d33eb5
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace131.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="default.com"><inner xmlns:p="testguys.com" p:attr2="true"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace132.out b/test/tests/conf-gold/namespace/namespace132.out
new file mode 100644
index 0000000..3bf148d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace132.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:pfix="party.com"><inner pfix:nuts="pecan"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace134.out b/test/tests/conf-gold/namespace/namespace134.out
new file mode 100644
index 0000000..cc62feb
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace134.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:pfix="party.com"><inner xmlns:other="party.com" other:nuts="almond"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace137.out b/test/tests/conf-gold/namespace/namespace137.out
new file mode 100644
index 0000000..8c1d4fd
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace137.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><literalName xmlns="http://literalURI"><hello xmlns=""/></literalName></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace138.out b/test/tests/conf-gold/namespace/namespace138.out
new file mode 100644
index 0000000..147d222
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace138.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:n="http://ns.test.com">
+<n:x>from stylesheet</n:x>
+<e xmlns="http://literalURI"><n:a xmlns:n="http://example.com">content</n:a></e></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace139.out b/test/tests/conf-gold/namespace/namespace139.out
new file mode 100644
index 0000000..9ce71d7
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace139.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:s="http://example.com" xmlns:n="http://ns.test.com">
+<n:x>from stylesheet</n:x>
+<e xmlns="http://literalURI"><n:a xmlns:n="http://example.com">content</n:a></e></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace14.out b/test/tests/conf-gold/namespace/namespace14.out
new file mode 100644
index 0000000..d69b741
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace14.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Testing 1 2 3 
+2 x 4
+quos
+unchanged</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace140.out b/test/tests/conf-gold/namespace/namespace140.out
new file mode 100644
index 0000000..3869b91
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace140.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:someprefix="http://someURI">
+<elementName/>
+<elementName xmlns="http://literalURI"/>
+<someprefix:elementName/>
+<someprefix:elementName xmlns:someprefix="http://literalURI"/>
+</out>
diff --git a/test/tests/conf-gold/namespace/namespace141.out b/test/tests/conf-gold/namespace/namespace141.out
new file mode 100644
index 0000000..4e140da
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace141.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<literalName xmlns="http://literalURI">
+<hello1 xmlns=""/><hello2><hiya xmlns=""/></hello2>
+<hello3 xmlns="http://literalURI2"><yo1 xmlns="http://literalURI"/><yo2 xmlns=""/></hello3>
+<hello4 xmlns=""><hey/></hello4></literalName></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace142.out b/test/tests/conf-gold/namespace/namespace142.out
new file mode 100644
index 0000000..8f5b832
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace142.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1 namespace node qualifies:
+name||namespace-uri||local-name||</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace15.out b/test/tests/conf-gold/namespace/namespace15.out
new file mode 100644
index 0000000..acb915b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace15.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:help="xsl.lotus.com/help">
+Testing 1 2 3 quos</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace16.out b/test/tests/conf-gold/namespace/namespace16.out
new file mode 100644
index 0000000..eba63f6
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Testing 1 2 3 quos</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace17.out b/test/tests/conf-gold/namespace/namespace17.out
new file mode 100644
index 0000000..73d973c
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace17.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<p xmlns:ns0="foo.com" ns0:test="true"/>
+</out>
diff --git a/test/tests/conf-gold/namespace/namespace18.out b/test/tests/conf-gold/namespace/namespace18.out
new file mode 100644
index 0000000..8da0a46
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><p xmlns:ns0="foo2.com" ns0:test="true"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace19.out b/test/tests/conf-gold/namespace/namespace19.out
new file mode 100644
index 0000000..0510436
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace19.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<axsl:template match="h1"><axsl:apply-templates/></axsl:template>
+</axsl:stylesheet>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace20.out b/test/tests/conf-gold/namespace/namespace20.out
new file mode 100644
index 0000000..17a475b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace20.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:bdd="bdd.com" xmlns="bubba.com">
+<ped:test xmlns:ped="ped.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
+<test xmlns="ped.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ped="ped.com"/>
+<bdd:test xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ped="ped.com"/>
+<test>Test5</test><test xmlns="missing.com">Test6</test>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace21.out b/test/tests/conf-gold/namespace/namespace21.out
new file mode 100644
index 0000000..4d5a982
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="http://www.w3.org/TR/REC-html40" xmlns:em="http://www.psol.com/xtension/1.0">www.psol.com</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace22.out b/test/tests/conf-gold/namespace/namespace22.out
new file mode 100644
index 0000000..5a4114b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace22.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="spacename.com">
+<middle/><element2/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace23.out b/test/tests/conf-gold/namespace/namespace23.out
new file mode 100644
index 0000000..77176b3
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace23.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bogus:stylesheet xmlns:ped="www.ped.com" xmlns:lotus="http://www.lotus.com" xmlns:bogus="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<bogus:template match="/">
+<out>
+		Yeee ha
+      </out>
+</bogus:template>
+</bogus:stylesheet>
diff --git a/test/tests/conf-gold/namespace/namespace24.out b/test/tests/conf-gold/namespace/namespace24.out
new file mode 100644
index 0000000..48f6a5b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace24.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias" version="1.0">
+<axsl:template xmlns:axsl="http://www.w3.org/1999/XSL/Transform" match="h1"><axsl:apply-templates/></axsl:template>
+</axsl:stylesheet>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace25.out b/test/tests/conf-gold/namespace/namespace25.out
new file mode 100644
index 0000000..158e88d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<foo:stuff xmlns:foo="bbb"><foo:stuff xmlns:foo="ccc"/></foo:stuff>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace26.out b/test/tests/conf-gold/namespace/namespace26.out
new file mode 100644
index 0000000..e74f224
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">doc</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace27.out b/test/tests/conf-gold/namespace/namespace27.out
new file mode 100644
index 0000000..cf715db
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">http://xsl.lotus.com/ns2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace28.out b/test/tests/conf-gold/namespace/namespace28.out
new file mode 100644
index 0000000..87cea16
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xml=xml</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace29.out b/test/tests/conf-gold/namespace/namespace29.out
new file mode 100644
index 0000000..5cc9aa1
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>name|a-pi|namespace-uri||local-name|a-pi|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace30.out b/test/tests/conf-gold/namespace/namespace30.out
new file mode 100644
index 0000000..927bcb0
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace30.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+name||namespace-uri||local-name||
+name||namespace-uri||local-name||</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace31.out b/test/tests/conf-gold/namespace/namespace31.out
new file mode 100644
index 0000000..7e246da
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace31.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+name||namespace-uri||local-name||
+name||namespace-uri||local-name||
+name||namespace-uri||local-name||
+name||namespace-uri||local-name||
+name||namespace-uri||local-name||</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace32.out b/test/tests/conf-gold/namespace/namespace32.out
new file mode 100644
index 0000000..02231c2
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace32.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xsi,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace33.out b/test/tests/conf-gold/namespace/namespace33.out
new file mode 100644
index 0000000..e882a09
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace33.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Namespaces for docs:|;
+  Namespaces for doc:|;|;
+    Namespaces for section:|;|;|;
+      Namespaces for inner:|;|;|;|;
+    
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace34.out b/test/tests/conf-gold/namespace/namespace34.out
new file mode 100644
index 0000000..d9b76e9
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace34.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace35.out b/test/tests/conf-gold/namespace/namespace35.out
new file mode 100644
index 0000000..6df5702
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<axsl:template xmlns:axsl="http://www.w3.org/1999/XSL/Transform" match="/"/>
diff --git a/test/tests/conf-gold/namespace/namespace36.out b/test/tests/conf-gold/namespace/namespace36.out
new file mode 100644
index 0000000..dc04d9b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="abc"><yyy xmlns=""/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace37.out b/test/tests/conf-gold/namespace/namespace37.out
new file mode 100644
index 0000000..be97503
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="xyz"><foo xmlns="abc"><yyy xmlns="xyz"/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace38.out b/test/tests/conf-gold/namespace/namespace38.out
new file mode 100644
index 0000000..be97503
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="xyz"><foo xmlns="abc"><yyy xmlns="xyz"/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace39.out b/test/tests/conf-gold/namespace/namespace39.out
new file mode 100644
index 0000000..3839d51
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz="xyz"><baz:foo xmlns:baz="abc"><baz:yyy xmlns:baz="xyz"/></baz:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace40.out b/test/tests/conf-gold/namespace/namespace40.out
new file mode 100644
index 0000000..7da2a7d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><yyy/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace41.out b/test/tests/conf-gold/namespace/namespace41.out
new file mode 100644
index 0000000..27a2022
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo><yyy/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace42.out b/test/tests/conf-gold/namespace/namespace42.out
new file mode 100644
index 0000000..7da2a7d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><yyy/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace43.out b/test/tests/conf-gold/namespace/namespace43.out
new file mode 100644
index 0000000..7da2a7d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><yyy/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace44.out b/test/tests/conf-gold/namespace/namespace44.out
new file mode 100644
index 0000000..8035412
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace44.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<one xmlns:fiscus="http://www.fiscus.de" fiscus:objectID="1">
+  <two fiscus:objectID="2">
+    <three fiscus:objectID="3">drei</three>
+  </two>
+</one>
diff --git a/test/tests/conf-gold/namespace/namespace45.out b/test/tests/conf-gold/namespace/namespace45.out
new file mode 100644
index 0000000..8035412
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace45.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<one xmlns:fiscus="http://www.fiscus.de" fiscus:objectID="1">
+  <two fiscus:objectID="2">
+    <three fiscus:objectID="3">drei</three>
+  </two>
+</one>
diff --git a/test/tests/conf-gold/namespace/namespace46.out b/test/tests/conf-gold/namespace/namespace46.out
new file mode 100644
index 0000000..8514fa6
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace46.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<one xmlns:ns0="http://www.fiscus.de" ns0:objectID="1">
+  <two ns0:objectID="2">
+    <three ns0:objectID="3">drei</three>
+  </two>
+</one>
diff --git a/test/tests/conf-gold/namespace/namespace47.out b/test/tests/conf-gold/namespace/namespace47.out
new file mode 100644
index 0000000..65738d2
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="bug"><yyy xmlns=""/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace48.out b/test/tests/conf-gold/namespace/namespace48.out
new file mode 100644
index 0000000..4573c9b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace48.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:err="www.error.com"><yyy/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace49.out b/test/tests/conf-gold/namespace/namespace49.out
new file mode 100644
index 0000000..e2fe1cd
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace49.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="http://www.test.com"><inner/></out>
diff --git a/test/tests/conf-gold/namespace/namespace50.out b/test/tests/conf-gold/namespace/namespace50.out
new file mode 100644
index 0000000..084d104
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace50.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="http://www.test.com"><inner xmlns="http://www.test.com"/></out>
diff --git a/test/tests/conf-gold/namespace/namespace51.out b/test/tests/conf-gold/namespace/namespace51.out
new file mode 100644
index 0000000..18eb26a
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace51.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="http://www.test.com"><inner xmlns="http://www.bdd.com"/></out>
diff --git a/test/tests/conf-gold/namespace/namespace52.out b/test/tests/conf-gold/namespace/namespace52.out
new file mode 100644
index 0000000..c059e01
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace52.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://www.ped.com"><Out2/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace53.out b/test/tests/conf-gold/namespace/namespace53.out
new file mode 100644
index 0000000..adeb26f
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://www.ped.com"><Out1 xmlns="http://www.ped.com"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace54.out b/test/tests/conf-gold/namespace/namespace54.out
new file mode 100644
index 0000000..97c6569
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ped="http://www.ped.com"><Out3 xmlns="http://www.bdd.com"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace55.out b/test/tests/conf-gold/namespace/namespace55.out
new file mode 100644
index 0000000..208c6aa
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><p2:foo xmlns:p2="other.com"><yyy xmlns="other.com" xmlns:p2="barz.com"/></p2:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace56.out b/test/tests/conf-gold/namespace/namespace56.out
new file mode 100644
index 0000000..6636970
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><q:foo xmlns:q="http://testguys.com"><yyy/></q:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace57.out b/test/tests/conf-gold/namespace/namespace57.out
new file mode 100644
index 0000000..3271260
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace57.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="abc"><foo><yyy/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace58.out b/test/tests/conf-gold/namespace/namespace58.out
new file mode 100644
index 0000000..f87bbdb
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace58.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="http://testguys.com"><q:foo xmlns:q="http://testguys.com"><yyy/></q:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace59.out b/test/tests/conf-gold/namespace/namespace59.out
new file mode 100644
index 0000000..647a247
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace59.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="http://testguys.com"><q:foo xmlns:q="http://other.com"><yyy/></q:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace60.out b/test/tests/conf-gold/namespace/namespace60.out
new file mode 100644
index 0000000..25ced27
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace60.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><yyy/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace61.out b/test/tests/conf-gold/namespace/namespace61.out
new file mode 100644
index 0000000..7355ff1
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><foo xmlns=""><yyy xmlns="testguys.com"/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace62.out b/test/tests/conf-gold/namespace/namespace62.out
new file mode 100644
index 0000000..f094028
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace62.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="test.com"><yyy xmlns:p2="barz.com"/></foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace63.out b/test/tests/conf-gold/namespace/namespace63.out
new file mode 100644
index 0000000..d7062e1
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="http://testguys.com"><q:foo xmlns:q="http://testguys.com"><yyy xmlns="other.com"/></q:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace64.out b/test/tests/conf-gold/namespace/namespace64.out
new file mode 100644
index 0000000..fc43c5e
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace64.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:p1="testguys.com"><p1:foo><yyy/></p1:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace65.out b/test/tests/conf-gold/namespace/namespace65.out
new file mode 100644
index 0000000..096f7ae
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace65.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz="xyz"><baz:foo><baz:yyy/></baz:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace66.out b/test/tests/conf-gold/namespace/namespace66.out
new file mode 100644
index 0000000..4bf55c8
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace66.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:p1="xyz"><baz:foo xmlns:baz="xyz"><yyy/></baz:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace67.out b/test/tests/conf-gold/namespace/namespace67.out
new file mode 100644
index 0000000..c2dbfa4
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace67.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:p1="testguys.com" xmlns="zilch.com"><p1:foo><yyy/></p1:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace68.out b/test/tests/conf-gold/namespace/namespace68.out
new file mode 100644
index 0000000..b8cd823
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace68.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="abc"><foo><yyy/></foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace69.out b/test/tests/conf-gold/namespace/namespace69.out
new file mode 100644
index 0000000..f08231a
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace69.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><p2:foo xmlns:p2="barz.com"><yyy/></p2:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace70.out b/test/tests/conf-gold/namespace/namespace70.out
new file mode 100644
index 0000000..cc08d6a
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace70.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>boo</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace71.out b/test/tests/conf-gold/namespace/namespace71.out
new file mode 100644
index 0000000..27a2022
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace71.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo><yyy/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace72.out b/test/tests/conf-gold/namespace/namespace72.out
new file mode 100644
index 0000000..b6c49aa
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace72.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="zebie"><yyy xmlns=""/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace73.out b/test/tests/conf-gold/namespace/namespace73.out
new file mode 100644
index 0000000..7da2a7d
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace73.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><yyy/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace74.out b/test/tests/conf-gold/namespace/namespace74.out
new file mode 100644
index 0000000..94640cc
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace74.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><abc:foo xmlns:abc="zebie"><yyy/></abc:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace75.out b/test/tests/conf-gold/namespace/namespace75.out
new file mode 100644
index 0000000..f898fa7
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace75.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="test.com"><yyy/></foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace77.out b/test/tests/conf-gold/namespace/namespace77.out
new file mode 100644
index 0000000..e26486f
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace77.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="test.com"><yyy/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace78.out b/test/tests/conf-gold/namespace/namespace78.out
new file mode 100644
index 0000000..fe66f5c
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace78.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="abc.com"><yyy xmlns="test.com"/></foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace79.out b/test/tests/conf-gold/namespace/namespace79.out
new file mode 100644
index 0000000..a24e6a3
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace79.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><yyy xmlns="test.com"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace80.out b/test/tests/conf-gold/namespace/namespace80.out
new file mode 100644
index 0000000..9dd5651
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace80.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><p2:foo xmlns:p2="barz.com"><yyy xmlns="other.com"/></p2:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace81.out b/test/tests/conf-gold/namespace/namespace81.out
new file mode 100644
index 0000000..9bfa7e7
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace81.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><wxyz:foo xmlns:wxyz="test.com"><yyy xmlns="test.com"/></wxyz:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace82.out b/test/tests/conf-gold/namespace/namespace82.out
new file mode 100644
index 0000000..18e11e3
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace82.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><wxyz:foo xmlns:wxyz="abc.com"><yyy xmlns="test.com"/></wxyz:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace83.out b/test/tests/conf-gold/namespace/namespace83.out
new file mode 100644
index 0000000..ff7723b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace83.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><p2:foo xmlns:p2="testguys.com"><yyy xmlns:p2="barz.com"/></p2:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace84.out b/test/tests/conf-gold/namespace/namespace84.out
new file mode 100644
index 0000000..644c5c3
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace84.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="testguys.com"><pre:foo xmlns:pre="testguys.com"><yyy xmlns:p2="barz.com"/></pre:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace86.out b/test/tests/conf-gold/namespace/namespace86.out
new file mode 100644
index 0000000..6a5ac66
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace86.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:p1="xyz"><p2:foo xmlns:p2="xyz"><yyy xmlns:p2="other.com"/></p2:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace87.out b/test/tests/conf-gold/namespace/namespace87.out
new file mode 100644
index 0000000..fcbce3a
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace87.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="http://testguys.com"><wxyz:foo xmlns:wxyz="test.com"><yyy xmlns="test.com"/></wxyz:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace88.out b/test/tests/conf-gold/namespace/namespace88.out
new file mode 100644
index 0000000..768114c
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace88.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out xmlns:ped="www.test.com"><inner xmlns="www.test.com"><yyy xmlns=""/></inner></out>
diff --git a/test/tests/conf-gold/namespace/namespace89.out b/test/tests/conf-gold/namespace/namespace89.out
new file mode 100644
index 0000000..4d5c5ec
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace89.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><b:mid xmlns:b="barz.com"><a:inner xmlns:a="foo.com"/></b:mid></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace90.out b/test/tests/conf-gold/namespace/namespace90.out
new file mode 100644
index 0000000..c4f1116
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace90.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:p1="xyz"><p1:foo xmlns:p1="barz.com"><yyy xmlns:p1="xyz" xmlns:p2="barz.com"/></p1:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace91.out b/test/tests/conf-gold/namespace/namespace91.out
new file mode 100644
index 0000000..1973619
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace91.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo><yyy xmlns:p2="barz.com"/></foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace92.out b/test/tests/conf-gold/namespace/namespace92.out
new file mode 100644
index 0000000..1973619
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace92.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo><yyy xmlns:p2="barz.com"/></foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace93.out b/test/tests/conf-gold/namespace/namespace93.out
new file mode 100644
index 0000000..cbecbb8
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace93.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="testguys.com"><yyy xmlns="" xmlns:p2="barz.com"/></foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace94.out b/test/tests/conf-gold/namespace/namespace94.out
new file mode 100644
index 0000000..64205e6
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace94.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo xmlns="barz.com"><yyy xmlns="" xmlns:p2="barz.com"/></foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace95.out b/test/tests/conf-gold/namespace/namespace95.out
new file mode 100644
index 0000000..2960d0b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace95.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><p2:foo xmlns:p2="barz.com"><yyy/></p2:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace96.out b/test/tests/conf-gold/namespace/namespace96.out
new file mode 100644
index 0000000..65423f2
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace96.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:p1="testguys.com"><p1:foo xmlns:p1="other.com"><yyy xmlns="other.com" xmlns:p1="testguys.com"/></p1:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace97.out b/test/tests/conf-gold/namespace/namespace97.out
new file mode 100644
index 0000000..c8ac883
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace97.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:p1="testguys.com"><p1:foo><yyy xmlns="other.com"/></p1:foo></out>
diff --git a/test/tests/conf-gold/namespace/namespace98.out b/test/tests/conf-gold/namespace/namespace98.out
new file mode 100644
index 0000000..2960d0b
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace98.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><p2:foo xmlns:p2="barz.com"><yyy/></p2:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/namespace/namespace99.out b/test/tests/conf-gold/namespace/namespace99.out
new file mode 100644
index 0000000..f3554be
--- /dev/null
+++ b/test/tests/conf-gold/namespace/namespace99.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><p2:foo xmlns:p2="barz.com"><yyy xmlns:p2="testguys.com"/></p2:foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node01.out b/test/tests/conf-gold/node/node01.out
new file mode 100644
index 0000000..b3f137e
--- /dev/null
+++ b/test/tests/conf-gold/node/node01.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  test
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node02.out b/test/tests/conf-gold/node/node02.out
new file mode 100644
index 0000000..7224ce0
--- /dev/null
+++ b/test/tests/conf-gold/node/node02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found-comment<!-- This is a comment --></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node03.out b/test/tests/conf-gold/node/node03.out
new file mode 100644
index 0000000..755d625
--- /dev/null
+++ b/test/tests/conf-gold/node/node03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found-pi:a-pi<?a-pi some data?>Found-pi:a-pi<?a-pi some data?></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node04.out b/test/tests/conf-gold/node/node04.out
new file mode 100644
index 0000000..594d400
--- /dev/null
+++ b/test/tests/conf-gold/node/node04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">a</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node05.out b/test/tests/conf-gold/node/node05.out
new file mode 100644
index 0000000..92cfecb
--- /dev/null
+++ b/test/tests/conf-gold/node/node05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">http://xsl.lotus.com/ns1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node06.out b/test/tests/conf-gold/node/node06.out
new file mode 100644
index 0000000..e74f224
--- /dev/null
+++ b/test/tests/conf-gold/node/node06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">doc</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node07.out b/test/tests/conf-gold/node/node07.out
new file mode 100644
index 0000000..c3adb14
--- /dev/null
+++ b/test/tests/conf-gold/node/node07.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Testing 1 2 3 quos
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node08.out b/test/tests/conf-gold/node/node08.out
new file mode 100644
index 0000000..1cd7117
--- /dev/null
+++ b/test/tests/conf-gold/node/node08.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+A
+B-C
+TextNode_between_F_and_G
+Yahoo
+SecondNode_after_H
+</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node09.out b/test/tests/conf-gold/node/node09.out
new file mode 100644
index 0000000..f794ee6
--- /dev/null
+++ b/test/tests/conf-gold/node/node09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> This is a comment </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node10.out b/test/tests/conf-gold/node/node10.out
new file mode 100644
index 0000000..a19e5a1
--- /dev/null
+++ b/test/tests/conf-gold/node/node10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found-pi...some data</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node11.out b/test/tests/conf-gold/node/node11.out
new file mode 100644
index 0000000..f778b9a
--- /dev/null
+++ b/test/tests/conf-gold/node/node11.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>A:attT:
+  P:a-piT:
+  C: This is the 1st comment T:
+  text-in-doc
+  E:innerA:blatT:
+    inner-text
+    C: This is the 2nd comment T:
+    E:subT:subtext
+T:
+  
+T:
+  text-in-doc2
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node12.out b/test/tests/conf-gold/node/node12.out
new file mode 100644
index 0000000..6014a04
--- /dev/null
+++ b/test/tests/conf-gold/node/node12.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ATTRIBUTES:A-att
+TEXT:T-
+  T-
+  T-
+  text-in-doc
+  T-
+  text-in-doc2
+  T-
+
+COMMENTS:C- This is the 1st comment 
+PIs:P-mypi
+CHILDREN:E-inner
+A:blatT:
+    inner-text
+    C: This is the 2nd comment T:
+    E:subT:subtext
+T:
+  --End of child inner
+E-inner2
+A:blatT:
+    E:subT:subtext
+T:final-text
+  --End of child inner2
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node13.out b/test/tests/conf-gold/node/node13.out
new file mode 100644
index 0000000..f5f8b52
--- /dev/null
+++ b/test/tests/conf-gold/node/node13.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Comments on the root node:
+ First comment 
+ Third comment 
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node14.out b/test/tests/conf-gold/node/node14.out
new file mode 100644
index 0000000..6cf0893
--- /dev/null
+++ b/test/tests/conf-gold/node/node14.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Root-level processing instructions:
+a-pi
+c-pi
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node15.out b/test/tests/conf-gold/node/node15.out
new file mode 100644
index 0000000..8cc66b4
--- /dev/null
+++ b/test/tests/conf-gold/node/node15.out
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>A:att
+  N-content:
+  ,
+N-named:a-pi...,
+N-content:
+  ,
+N-content: This is the 1st comment ,
+N-content:
+  text-in-doc
+  ,
+N-named:inner...A:blat
+  N-content:
+    inner-text
+    ,
+N-content: This is the 2nd comment ,
+N-content:
+    ,
+N-named:sub...N-content:subtext,
+,
+N-content:
+  ,
+,
+N-content:
+  text-in-doc2
+,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node16.out b/test/tests/conf-gold/node/node16.out
new file mode 100644
index 0000000..931d5e6
--- /dev/null
+++ b/test/tests/conf-gold/node/node16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center-attr-1 center-attr-2 center-attr-3 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node17.out b/test/tests/conf-gold/node/node17.out
new file mode 100644
index 0000000..3daa449
--- /dev/null
+++ b/test/tests/conf-gold/node/node17.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <NSlist xml="http://www.w3.org/XML/1998/namespace" ext="http://somebody.elses.extension" java="http://xml.apache.org/xslt/java" ped="http://tester.com" bdd="http://buster.com" jad="http://administrator.com"/>
diff --git a/test/tests/conf-gold/node/node18.out b/test/tests/conf-gold/node/node18.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/node/node18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node19.out b/test/tests/conf-gold/node/node19.out
new file mode 100644
index 0000000..931d5e6
--- /dev/null
+++ b/test/tests/conf-gold/node/node19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>center-attr-1 center-attr-2 center-attr-3 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node20.out b/test/tests/conf-gold/node/node20.out
new file mode 100644
index 0000000..d29000d
--- /dev/null
+++ b/test/tests/conf-gold/node/node20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-north, north, far-north, Root Node</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/node/node21.out b/test/tests/conf-gold/node/node21.out
new file mode 100644
index 0000000..4d611f4
--- /dev/null
+++ b/test/tests/conf-gold/node/node21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Root Node; far-north, north, near-north, </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat01.out b/test/tests/conf-gold/numberformat/numberformat01.out
new file mode 100644
index 0000000..aac7cc7
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>087,504.481200</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat02.out b/test/tests/conf-gold/numberformat/numberformat02.out
new file mode 100644
index 0000000..2add9b2
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1,235,464.8812</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat03.out b/test/tests/conf-gold/numberformat/numberformat03.out
new file mode 100644
index 0000000..40dcffa
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-102,136.4812</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat04.out b/test/tests/conf-gold/numberformat/numberformat04.out
new file mode 100644
index 0000000..2d1ed53
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-087,504.4812</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat05.out b/test/tests/conf-gold/numberformat/numberformat05.out
new file mode 100644
index 0000000..0064d08
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>48.57%</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat06.out b/test/tests/conf-gold/numberformat/numberformat06.out
new file mode 100644
index 0000000..cff0d52
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<out>485.7&#8240;</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat07.out b/test/tests/conf-gold/numberformat/numberformat07.out
new file mode 100644
index 0000000..135b869
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>$95.4857</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat08.out b/test/tests/conf-gold/numberformat/numberformat08.out
new file mode 100644
index 0000000..95da672
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>PREFIX185.2812SUFFIX</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat09.out b/test/tests/conf-gold/numberformat/numberformat09.out
new file mode 100644
index 0000000..66e9d8d
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>000.931|486</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat11.out b/test/tests/conf-gold/numberformat/numberformat11.out
new file mode 100644
index 0000000..9bc7660
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>+26,931.4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat12.out b/test/tests/conf-gold/numberformat/numberformat12.out
new file mode 100644
index 0000000..6b1b5d6
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-26,931.4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat13.out b/test/tests/conf-gold/numberformat/numberformat13.out
new file mode 100644
index 0000000..6b1b5d6
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-26,931.4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat14.out b/test/tests/conf-gold/numberformat/numberformat14.out
new file mode 100644
index 0000000..1d0fce3
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>off-the-scale</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat15.out b/test/tests/conf-gold/numberformat/numberformat15.out
new file mode 100644
index 0000000..7a68967
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>non-numeric</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat16.out b/test/tests/conf-gold/numberformat/numberformat16.out
new file mode 100644
index 0000000..42266cf
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>485.7m</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat17.out b/test/tests/conf-gold/numberformat/numberformat17.out
new file mode 100644
index 0000000..6b1b5d6
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-26,931.4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat18.out b/test/tests/conf-gold/numberformat/numberformat18.out
new file mode 100644
index 0000000..f2b2e3b
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>_26,931.4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat19.out b/test/tests/conf-gold/numberformat/numberformat19.out
new file mode 100644
index 0000000..613f14f
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>_26,931.4  -42,857.1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat20.out b/test/tests/conf-gold/numberformat/numberformat20.out
new file mode 100644
index 0000000..9d4a6cb
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:foo="http://foo.com">1*234!567</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat21.out b/test/tests/conf-gold/numberformat/numberformat21.out
new file mode 100644
index 0000000..7b3d7ba
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-26.931,4  _42,857.1  -73,816.9</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat22.out b/test/tests/conf-gold/numberformat/numberformat22.out
new file mode 100644
index 0000000..7b3d7ba
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-26.931,4  _42,857.1  -73,816.9</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat23.out b/test/tests/conf-gold/numberformat/numberformat23.out
new file mode 100644
index 0000000..7b3d7ba
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-26.931,4  _42,857.1  -73,816.9</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat24.out b/test/tests/conf-gold/numberformat/numberformat24.out
new file mode 100644
index 0000000..7b3d7ba
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-26.931,4  _42,857.1  -73,816.9</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat25.out b/test/tests/conf-gold/numberformat/numberformat25.out
new file mode 100644
index 0000000..2df2b50
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>931</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat26.out b/test/tests/conf-gold/numberformat/numberformat26.out
new file mode 100644
index 0000000..80e4f7b
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>7 654 321,4857</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat27.out b/test/tests/conf-gold/numberformat/numberformat27.out
new file mode 100644
index 0000000..1f32713
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat27.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>All three should be the same...
+087,504.481200
+087,504.481200
+087,504.481200</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat28.out b/test/tests/conf-gold/numberformat/numberformat28.out
new file mode 100644
index 0000000..2d1ed53
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-087,504.4812</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat29.out b/test/tests/conf-gold/numberformat/numberformat29.out
new file mode 100644
index 0000000..f2b2e3b
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>_26,931.4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat30.out b/test/tests/conf-gold/numberformat/numberformat30.out
new file mode 100644
index 0000000..bc62392
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat30.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>All three should have two prefixes...
+--26,931.4
+_-26,931.4
+__26,931.4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat31.out b/test/tests/conf-gold/numberformat/numberformat31.out
new file mode 100644
index 0000000..f2b2e3b
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>_26,931.4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat32.out b/test/tests/conf-gold/numberformat/numberformat32.out
new file mode 100644
index 0000000..27d21b9
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>48.57c</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat34.out b/test/tests/conf-gold/numberformat/numberformat34.out
new file mode 100644
index 0000000..e7b8311
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat34.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>#e,ada,cab.afagaa0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat35.out b/test/tests/conf-gold/numberformat/numberformat35.out
new file mode 100644
index 0000000..8a898cc
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>9,87,65,43,21.00</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat36.out b/test/tests/conf-gold/numberformat/numberformat36.out
new file mode 100644
index 0000000..68e1b0e
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>239236.59</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat37.out b/test/tests/conf-gold/numberformat/numberformat37.out
new file mode 100644
index 0000000..7f1b9f9
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Infinity</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat38.out b/test/tests/conf-gold/numberformat/numberformat38.out
new file mode 100644
index 0000000..844b583
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NaN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat39.out b/test/tests/conf-gold/numberformat/numberformat39.out
new file mode 100644
index 0000000..fbbb71c
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-Infinity</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat40.out b/test/tests/conf-gold/numberformat/numberformat40.out
new file mode 100644
index 0000000..f827a67
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-huge</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat41.out b/test/tests/conf-gold/numberformat/numberformat41.out
new file mode 100644
index 0000000..706eef9
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat41.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<foo>not a number, -13.2</foo>
+<baz>not a number, -13.2</baz></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat42.out b/test/tests/conf-gold/numberformat/numberformat42.out
new file mode 100644
index 0000000..11f0929
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>not a number, 3.2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat43.out b/test/tests/conf-gold/numberformat/numberformat43.out
new file mode 100644
index 0000000..e437b4c
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat43.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<one>not a number, -13.2</one>
+<sub>not a number, -13.2</sub></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat44.out b/test/tests/conf-gold/numberformat/numberformat44.out
new file mode 100644
index 0000000..e31554a
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat44.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<main>not a number, -13.2</main>
+<sub>not a number, -13.2</sub></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat45.out b/test/tests/conf-gold/numberformat/numberformat45.out
new file mode 100644
index 0000000..3794d2d
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat45.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<one>012.345,67, -98.765,432</one>
+<sub>012.345,67, -98.765,432</sub></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numberformat/numberformat46.out b/test/tests/conf-gold/numberformat/numberformat46.out
new file mode 100644
index 0000000..3794d2d
--- /dev/null
+++ b/test/tests/conf-gold/numberformat/numberformat46.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<one>012.345,67, -98.765,432</one>
+<sub>012.345,67, -98.765,432</sub></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering01.out b/test/tests/conf-gold/numbering/numbering01.out
new file mode 100644
index 0000000..f38c111
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering01.out
@@ -0,0 +1,601 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1. Test for source tree numbering
+1. First Chapter
+1. First Section In first Chapter
+1. First Subsection in first Section In first Chapter
+1. Second Subsection in first Section In first Chapter
+1. Third Subsection in first Section In first Chapter
+1. Fourth Subsection in first Section In first Chapter
+1. Fifth Subsection in first Section In first Chapter
+1. Second Section In first Chapter
+1. First Subsection in second Section In first Chapter
+1. Second Subsection in second Section In first Chapter
+1. Third Subsection in second Section In first Chapter
+1. Fourth Subsection in second Section In first Chapter
+1. Fifth Subsection in second Section In first Chapter
+1. Sixth Subsection in second Section In first Chapter
+1. Seventh Subsection in second Section In first Chapter
+1. Eighth Subsection in second Section In first Chapter
+1. Ninth Subsection in second Section In first Chapter
+1. Tenth Subsection in second Section In first Chapter
+1. Eleventh Subsection in second Section In first Chapter
+1. Twelveth Subsection in second Section In first Chapter
+1. Thirteenth Subsection in second Section In first Chapter
+1. Fourteenth Subsection in second Section In first Chapter
+1. Third Section In first Chapter
+1. First Subsection in third Section In first Chapter
+1. Second Subsection in third Section In first Chapter
+1. Third Subsection in third Section In first Chapter
+1. Fourth Subsection in third Section In first Chapter
+1. Fifth Subsection in third Section In first Chapter
+1. Sixth Subsection in third Section In first Chapter
+1. Seventh Subsection in third Section In first Chapter
+1. Eighth Subsection in third Section In first Chapter
+1. Ninth Subsection in third Section In first Chapter
+1. Tenth Subsection in third Section In first Chapter
+1. Eleventh Subsection in third Section In first Chapter
+1. Twelveth Subsection in third Section In first Chapter
+1. Thirteenth Subsection in third Section In first Chapter
+1. Fourteenth Subsection in third Section In first Chapter
+1. Fifthteenth Subsection in third Section In first Chapter
+1. Sixteenth Subsection in third Section In first Chapter
+1. Seventeenth Subsection in third Section In first Chapter
+1. Eighteenth Subsection in third Section In first Chapter
+1. Nineteenth Subsection in third Section In first Chapter
+1. Twentieth Subsection in third Section In first Chapter
+1. Twenty-first Subsection in third Section In first Chapter
+1. Twenty-second Subsection in third Section In first Chapter
+1. Twenty-third Subsection in third Section In first Chapter
+1. Twenty-fourth Subsection in third Section In first Chapter
+1. Twenty-fifth Subsection in third Section In first Chapter
+1. Twenty-sixth Subsection in third Section In first Chapter
+1. Twenty-seventh Subsection in third Section In first Chapter
+1. Twenty-eighth Subsection in third Section In first Chapter
+1. Twenty-ninth Subsection in third Section In first Chapter
+1. Thirtieth Subsection in third Section In first Chapter
+1. Thirty-first Subsection in third Section In first Chapter
+1. Thirty-second Subsection in third Section In first Chapter
+1. Thirty-third Subsection in third Section In first Chapter
+1. Thirty-fourth Subsection in third Section In first Chapter
+1. Thirty-fifth Subsection in third Section In first Chapter
+1. Thirty-sixth Subsection in third Section In first Chapter
+1. Thirty-seventh Subsection in third Section In first Chapter
+1. Thirty-eighth Subsection in third Section In first Chapter
+1. Thirty-ninth Subsection in third Section In first Chapter
+1. Fortieth Subsection in third Section In first Chapter
+1. Forty-first Subsection in third Section In first Chapter
+1. Forty-second Subsection in third Section In first Chapter
+1. Forty-third Subsection in third Section In first Chapter
+1. Forty-fourth Subsection in third Section In first Chapter
+1. Forty-fifth Subsection in third Section In first Chapter
+1. Forty-sixth Subsection in third Section In first Chapter
+1. Forty-seventh Subsection in third Section In first Chapter
+1. Forty-eighth Subsection in third Section In first Chapter
+1. Forty-ninth Subsection in third Section In first Chapter
+1. Fourth Section In first Chapter
+1. First Subsection in fourth Section In first Chapter
+1. Second Subsection in fourth Section In first Chapter
+1. Third Subsection in fourth Section In first Chapter
+1. Fourth Subsection in fourth Section In first Chapter
+1. Fifth Subsection in fourth Section In first Chapter
+1. Sixth Subsection in fourth Section In first Chapter
+1. Seventh Subsection in fourth Section In first Chapter
+1. Eighth Subsection in fourth Section In first Chapter
+1. Ninth Subsection in fourth Section In first Chapter
+1. Tenth Subsection in fourth Section In first Chapter
+1. Eleventh Subsection in fourth Section In first Chapter
+1. Twelveth Subsection in fourth Section In first Chapter
+1. Thirteenth Subsection in fourth Section In first Chapter
+1. Fourteenth Subsection in fourth Section In first Chapter
+1. Second Chapter
+1. First Section In second Chapter
+1. First Subsection in first Section In second Chapter
+1. Second Subsection in first Section In second Chapter
+1. Third Subsection in first Section In second Chapter
+1. Fourth Subsection in first Section In second Chapter
+1. Fifth Subsection in first Section In second Chapter
+1. Second Section In second Chapter
+1. First Subsection in second Section In second Chapter
+1. Second Subsection in second Section In second Chapter
+1. Third Subsection in second Section In second Chapter
+1. Fourth Subsection in second Section In second Chapter
+1. Fifth Subsection in second Section In second Chapter
+1. Sixth Subsection in second Section In second Chapter
+1. Seventh Subsection in second Section In second Chapter
+1. Eighth Subsection in second Section In second Chapter
+1. Ninth Subsection in second Section In second Chapter
+1. Tenth Subsection in second Section In second Chapter
+1. Eleventh Subsection in second Section In second Chapter
+1. Twelveth Subsection in second Section In second Chapter
+1. Thirteenth Subsection in second Section In second Chapter
+1. Fourteenth Subsection in second Section In second Chapter
+1. Third Section In second Chapter
+1. First Subsection in third Section In second Chapter
+1. Second Subsection in third Section In second Chapter
+1. Third Subsection in third Section In second Chapter
+1. Fourth Subsection in third Section In second Chapter
+1. Fifth Subsection in third Section In second Chapter
+1. Sixth Subsection in third Section In second Chapter
+1. Seventh Subsection in third Section In second Chapter
+1. Eighth Subsection in third Section In second Chapter
+1. Ninth Subsection in third Section In second Chapter
+1. Tenth Subsection in third Section In second Chapter
+1. Eleventh Subsection in third Section In second Chapter
+1. Twelveth Subsection in third Section In second Chapter
+1. Thirteenth Subsection in third Section In second Chapter
+1. Fourteenth Subsection in third Section In second Chapter
+1. Fifthteenth Subsection in third Section In second Chapter
+1. Sixteenth Subsection in third Section In second Chapter
+1. Seventeenth Subsection in third Section In second Chapter
+1. Eighteenth Subsection in third Section In second Chapter
+1. Nineteenth Subsection in third Section In second Chapter
+1. Twentieth Subsection in third Section In second Chapter
+1. Twenty-first Subsection in third Section In second Chapter
+1. Twenty-second Subsection in third Section In second Chapter
+1. Twenty-third Subsection in third Section In second Chapter
+1. Twenty-fourth Subsection in third Section In second Chapter
+1. Twenty-fifth Subsection in third Section In second Chapter
+1. Twenty-sixth Subsection in third Section In second Chapter
+1. Twenty-seventh Subsection in third Section In second Chapter
+1. Twenty-eighth Subsection in third Section In second Chapter
+1. Twenty-ninth Subsection in third Section In second Chapter
+1. Thirtieth Subsection in third Section In second Chapter
+1. Thirty-first Subsection in third Section In second Chapter
+1. Thirty-second Subsection in third Section In second Chapter
+1. Thirty-third Subsection in third Section In second Chapter
+1. Thirty-fourth Subsection in third Section In second Chapter
+1. Thirty-fifth Subsection in third Section In second Chapter
+1. Thirty-sixth Subsection in third Section In second Chapter
+1. Thirty-seventh Subsection in third Section In second Chapter
+1. Thirty-eighth Subsection in third Section In second Chapter
+1. Thirty-ninth Subsection in third Section In second Chapter
+1. Fortieth Subsection in third Section In second Chapter
+1. Forty-first Subsection in third Section In second Chapter
+1. Forty-second Subsection in third Section In second Chapter
+1. Forty-third Subsection in third Section In second Chapter
+1. Forty-fourth Subsection in third Section In second Chapter
+1. Forty-fifth Subsection in third Section In second Chapter
+1. Forty-sixth Subsection in third Section In second Chapter
+1. Forty-seventh Subsection in third Section In second Chapter
+1. Forty-eighth Subsection in third Section In second Chapter
+1. Forty-ninth Subsection in third Section In second Chapter
+1. Fouth Section In second Chapter
+1. First Subsection in fourth Section In second Chapter
+1. Second Subsection in fourth Section In second Chapter
+1. Third Subsection in fourth Section In second Chapter
+1. Fourth Subsection in fourth Section In second Chapter
+1. Fifth Subsection in fourth Section In second Chapter
+1. Sixth Subsection in fourth Section In second Chapter
+1. Seventh Subsection in fourth Section In second Chapter
+1. Eighth Subsection in fourth Section In second Chapter
+1. Ninth Subsection in fourth Section In second Chapter
+1. Tenth Subsection in fourth Section In second Chapter
+1. Eleventh Subsection in fourth Section In second Chapter
+1. Twelveth Subsection in fourth Section In second Chapter
+1. Thirteenth Subsection in fourth Section In second Chapter
+1. Fourteenth Subsection in fourth Section In second Chapter
+1. Third Chapter
+1. First Section In third Chapter
+1. First Subsection in first Section In third Chapter
+1. Fourth Chapter
+1. First Section In fourth Chapter
+1. First Subsection in first Section In fourth Chapter
+1. Fifth Chapter
+1. First Section In fifth Chapter
+1. First Subsection in first Section In fifth Chapter
+1. Sixth Chapter
+1. First Section In sixth Chapter
+1. First Subsection in first Section In sixth Chapter
+1. Seventh Chapter
+1. First Section In seventh Chapter
+1. First Subsection in first Section In seventh Chapter
+1. Eighth Chapter
+1. First Section In eighth Chapter
+1. First Subsection in first Section In eighth Chapter
+1. Ninth Chapter
+1. First Section In ninth Chapter
+1. First Subsection in first Section In ninth Chapter
+1. Tenth Chapter
+1. First Section In tenth Chapter
+1. First Subsection in first Section In tenth Chapter
+1. Eleventh Chapter
+1. First Section In eleventh Chapter
+1. First Subsection in first Section In eleventh Chapter
+1. Twelvth Chapter
+1. First Section In twelvth Chapter
+1. First Subsection in first Section In twelvth Chapter
+1. Thirteenth Chapter
+1. First Section In thirteenth Chapter
+1. First Subsection in first Section In thirteenth Chapter
+1. Fourteenth Chapter
+1. First Section In fourteenth Chapter
+1. First Subsection in first Section In fourteenth Chapter
+1. Second Subsection in first Section In fourteenth Chapter
+1. Third Subsection in first Section In fourteenth Chapter
+1. Fourth Subsection in first Section In fourteenth Chapter
+1. Fifth Subsection in first Section In fourteenth Chapter
+1. Second Section In fourteenth Chapter
+1. First Subsection in second Section In fourteenth Chapter
+1. Second Subsection in second Section In fourteenth Chapter
+1. Third Subsection in second Section In fourteenth Chapter
+1. Fourth Subsection in second Section In fourteenth Chapter
+1. Fifth Subsection in second Section In fourteenth Chapter
+1. Sixth Subsection in second Section In fourteenth Chapter
+1. Seventh Subsection in second Section In fourteenth Chapter
+1. Eighth Subsection in second Section In fourteenth Chapter
+1. Ninth Subsection in second Section In fourteenth Chapter
+1. Tenth Subsection in second Section In fourteenth Chapter
+1. Eleventh Subsection in second Section In fourteenth Chapter
+1. Twelveth Subsection in second Section In fourteenth Chapter
+1. Thirteenth Subsection in second Section In fourteenth Chapter
+1. Fourteenth Subsection in second Section In fourteenth Chapter
+1. Third Section In fourteenth Chapter
+1. First Subsection in third Section In fourteenth Chapter
+1. Second Subsection in third Section In fourteenth Chapter
+1. Third Subsection in third Section In fourteenth Chapter
+1. Fourth Subsection in third Section In fourteenth Chapter
+1. Fifth Subsection in third Section In fourteenth Chapter
+1. Sixth Subsection in third Section In fourteenth Chapter
+1. Seventh Subsection in third Section In fourteenth Chapter
+1. Eighth Subsection in third Section In fourteenth Chapter
+1. Ninth Subsection in third Section In fourteenth Chapter
+1. Tenth Subsection in third Section In fourteenth Chapter
+1. Eleventh Subsection in third Section In fourteenth Chapter
+1. Twelveth Subsection in third Section In fourteenth Chapter
+1. Thirteenth Subsection in third Section In fourteenth Chapter
+1. Fourteenth Subsection in third Section In fourteenth Chapter
+1. Fifthteenth Subsection in third Section In fourteenth Chapter
+1. Sixteenth Subsection in third Section In fourteenth Chapter
+1. Seventeenth Subsection in third Section In fourteenth Chapter
+1. Eighteenth Subsection in third Section In fourteenth Chapter
+1. Nineteenth Subsection in third Section In fourteenth Chapter
+1. Twentieth Subsection in third Section In fourteenth Chapter
+1. Twenty-first Subsection in third Section In fourteenth Chapter
+1. Twenty-second Subsection in third Section In fourteenth Chapter
+1. Twenty-third Subsection in third Section In fourteenth Chapter
+1. Twenty-fourth Subsection in third Section In fourteenth Chapter
+1. Twenty-fifth Subsection in third Section In fourteenth Chapter
+1. Twenty-sixth Subsection in third Section In fourteenth Chapter
+1. Twenty-seventh Subsection in third Section In fourteenth Chapter
+1. Twenty-eighth Subsection in third Section In fourteenth Chapter
+1. Twenty-ninth Subsection in third Section In fourteenth Chapter
+1. Thirtieth Subsection in third Section In fourteenth Chapter
+1. Thirty-first Subsection in third Section In fourteenth Chapter
+1. Thirty-second Subsection in third Section In fourteenth Chapter
+1. Thirty-third Subsection in third Section In fourteenth Chapter
+1. Thirty-fourth Subsection in third Section In fourteenth Chapter
+1. Thirty-fifth Subsection in third Section In fourteenth Chapter
+1. Thirty-sixth Subsection in third Section In fourteenth Chapter
+1. Thirty-seventh Subsection in third Section In fourteenth Chapter
+1. Thirty-eighth Subsection in third Section In fourteenth Chapter
+1. Thirty-ninth Subsection in third Section In fourteenth Chapter
+1. Fortieth Subsection in third Section In fourteenth Chapter
+1. Forty-first Subsection in third Section In fourteenth Chapter
+1. Forty-second Subsection in third Section In fourteenth Chapter
+1. Forty-third Subsection in third Section In fourteenth Chapter
+1. Forty-fourth Subsection in third Section In fourteenth Chapter
+1. Forty-fifth Subsection in third Section In fourteenth Chapter
+1. Forty-sixth Subsection in third Section In fourteenth Chapter
+1. Forty-seventh Subsection in third Section In fourteenth Chapter
+1. Forty-eighth Subsection in third Section In fourteenth Chapter
+1. Forty-ninth Subsection in third Section In fourteenth Chapter
+1. Fourth Section In fourteenth Chapter
+1. First Subsection in fourth Section In fourteenth Chapter
+1. Second Subsection in fourth Section In fourteenth Chapter
+1. Third Subsection in fourth Section In fourteenth Chapter
+1. Fourth Subsection in fourth Section In fourteenth Chapter
+1. Fifth Subsection in fourth Section In fourteenth Chapter
+1. Sixth Subsection in fourth Section In fourteenth Chapter
+1. Seventh Subsection in fourth Section In fourteenth Chapter
+1. Eighth Subsection in fourth Section In fourteenth Chapter
+1. Ninth Subsection in fourth Section In fourteenth Chapter
+1. Tenth Subsection in fourth Section In fourteenth Chapter
+1. Eleventh Subsection in fourth Section In fourteenth Chapter
+1. Twelveth Subsection in fourth Section In fourteenth Chapter
+1. Thirteenth Subsection in fourth Section In fourteenth Chapter
+1. Fourteenth Subsection in fourth Section In fourteenth Chapter
+1. First Appendix
+1. First Section In first Appendix
+1. First Subsection in first Section In first Appendix
+1. Second Subsection in first Section In first Appendix
+1. Third Subsection in first Section In first Appendix
+1. Fourth Subsection in first Section In first Appendix
+1. Fifth Subsection in first Section In first Appendix
+1. Second Section In first Appendix
+1. First Subsection in second Section In first Appendix
+1. Second Subsection in second Section In first Appendix
+1. Third Subsection in second Section In first Appendix
+1. Fourth Subsection in second Section In first Appendix
+1. Fifth Subsection in second Section In first Appendix
+1. Sixth Subsection in second Section In first Appendix
+1. Seventh Subsection in second Section In first Appendix
+1. Eighth Subsection in second Section In first Appendix
+1. Ninth Subsection in second Section In first Appendix
+1. Tenth Subsection in second Section In first Appendix
+1. Eleventh Subsection in second Section In first Appendix
+1. Twelveth Subsection in second Section In first Appendix
+1. Thirteenth Subsection in second Section In first Appendix
+1. Fourteenth Subsection in second Section In first Appendix
+1. Third Section In first Appendix
+1. First Subsection in third Section In first Appendix
+1. Second Subsection in third Section In first Appendix
+1. Third Subsection in third Section In first Appendix
+1. Fourth Subsection in third Section In first Appendix
+1. Fifth Subsection in third Section In first Appendix
+1. Sixth Subsection in third Section In first Appendix
+1. Seventh Subsection in third Section In first Appendix
+1. Eighth Subsection in third Section In first Appendix
+1. Ninth Subsection in third Section In first Appendix
+1. Tenth Subsection in third Section In first Appendix
+1. Eleventh Subsection in third Section In first Appendix
+1. Twelveth Subsection in third Section In first Appendix
+1. Thirteenth Subsection in third Section In first Appendix
+1. Fourteenth Subsection in third Section In first Appendix
+1. Fifthteenth Subsection in third Section In first Appendix
+1. Sixteenth Subsection in third Section In first Appendix
+1. Seventeenth Subsection in third Section In first Appendix
+1. Eighteenth Subsection in third Section In first Appendix
+1. Nineteenth Subsection in third Section In first Appendix
+1. Twentieth Subsection in third Section In first Appendix
+1. Twenty-first Subsection in third Section In first Appendix
+1. Twenty-second Subsection in third Section In first Appendix
+1. Twenty-third Subsection in third Section In first Appendix
+1. Twenty-fourth Subsection in third Section In first Appendix
+1. Twenty-fifth Subsection in third Section In first Appendix
+1. Twenty-sixth Subsection in third Section In first Appendix
+1. Twenty-seventh Subsection in third Section In first Appendix
+1. Twenty-eighth Subsection in third Section In first Appendix
+1. Twenty-ninth Subsection in third Section In first Appendix
+1. Thirtieth Subsection in third Section In first Appendix
+1. Thirty-first Subsection in third Section In first Appendix
+1. Thirty-second Subsection in third Section In first Appendix
+1. Thirty-third Subsection in third Section In first Appendix
+1. Thirty-fourth Subsection in third Section In first Appendix
+1. Thirty-fifth Subsection in third Section In first Appendix
+1. Thirty-sixth Subsection in third Section In first Appendix
+1. Thirty-seventh Subsection in third Section In first Appendix
+1. Thirty-eighth Subsection in third Section In first Appendix
+1. Thirty-ninth Subsection in third Section In first Appendix
+1. Fortieth Subsection in third Section In first Appendix
+1. Forty-first Subsection in third Section In first Appendix
+1. Forty-second Subsection in third Section In first Appendix
+1. Forty-third Subsection in third Section In first Appendix
+1. Forty-fourth Subsection in third Section In first Appendix
+1. Forty-fifth Subsection in third Section In first Appendix
+1. Forty-sixth Subsection in third Section In first Appendix
+1. Forty-seventh Subsection in third Section In first Appendix
+1. Forty-eighth Subsection in third Section In first Appendix
+1. Forty-ninth Subsection in third Section In first Appendix
+1. Fourth Section In first Appendix
+1. First Subsection in fourth Section In first Appendix
+1. Second Subsection in fourth Section In first Appendix
+1. Third Subsection in fourth Section In first Appendix
+1. Fourth Subsection in fourth Section In first Appendix
+1. Fifth Subsection in fourth Section In first Appendix
+1. Sixth Subsection in fourth Section In first Appendix
+1. Seventh Subsection in fourth Section In first Appendix
+1. Eighth Subsection in fourth Section In first Appendix
+1. Ninth Subsection in fourth Section In first Appendix
+1. Tenth Subsection in fourth Section In first Appendix
+1. Eleventh Subsection in fourth Section In first Appendix
+1. Twelveth Subsection in fourth Section In first Appendix
+1. Thirteenth Subsection in fourth Section In first Appendix
+1. Fourteenth Subsection in fourth Section In first Appendix
+1. Second Appendix
+1. First Section In second Appendix
+1. First Subsection in first Section In second Appendix
+1. Second Subsection in first Section In second Appendix
+1. Third Subsection in first Section In second Appendix
+1. Fourth Subsection in first Section In second Appendix
+1. Fifth Subsection in first Section In second Appendix
+1. Second Section In second Appendix
+1. First Subsection in second Section In second Appendix
+1. Second Subsection in second Section In second Appendix
+1. Third Subsection in second Section In second Appendix
+1. Fourth Subsection in second Section In second Appendix
+1. Fifth Subsection in second Section In second Appendix
+1. Sixth Subsection in second Section In second Appendix
+1. Seventh Subsection in second Section In second Appendix
+1. Eighth Subsection in second Section In second Appendix
+1. Ninth Subsection in second Section In second Appendix
+1. Tenth Subsection in second Section In second Appendix
+1. Eleventh Subsection in second Section In second Appendix
+1. Twelveth Subsection in second Section In second Appendix
+1. Thirteenth Subsection in second Section In second Appendix
+1. Fourteenth Subsection in second Section In second Appendix
+1. Third Section In second Appendix
+1. First Subsection in third Section In second Appendix
+1. Second Subsection in third Section In second Appendix
+1. Third Subsection in third Section In second Appendix
+1. Fourth Subsection in third Section In second Appendix
+1. Fifth Subsection in third Section In second Appendix
+1. Sixth Subsection in third Section In second Appendix
+1. Seventh Subsection in third Section In second Appendix
+1. Eighth Subsection in third Section In second Appendix
+1. Ninth Subsection in third Section In second Appendix
+1. Tenth Subsection in third Section In second Appendix
+1. Eleventh Subsection in third Section In second Appendix
+1. Twelveth Subsection in third Section In second Appendix
+1. Thirteenth Subsection in third Section In second Appendix
+1. Fourteenth Subsection in third Section In second Appendix
+1. Fifthteenth Subsection in third Section In second Appendix
+1. Sixteenth Subsection in third Section In second Appendix
+1. Seventeenth Subsection in third Section In second Appendix
+1. Eighteenth Subsection in third Section In second Appendix
+1. Nineteenth Subsection in third Section In second Appendix
+1. Twentieth Subsection in third Section In second Appendix
+1. Twenty-first Subsection in third Section In second Appendix
+1. Twenty-second Subsection in third Section In second Appendix
+1. Twenty-third Subsection in third Section In second Appendix
+1. Twenty-fourth Subsection in third Section In second Appendix
+1. Twenty-fifth Subsection in third Section In second Appendix
+1. Twenty-sixth Subsection in third Section In second Appendix
+1. Twenty-seventh Subsection in third Section In second Appendix
+1. Twenty-eighth Subsection in third Section In second Appendix
+1. Twenty-ninth Subsection in third Section In second Appendix
+1. Thirtieth Subsection in third Section In second Appendix
+1. Thirty-first Subsection in third Section In second Appendix
+1. Thirty-second Subsection in third Section In second Appendix
+1. Thirty-third Subsection in third Section In second Appendix
+1. Thirty-fourth Subsection in third Section In second Appendix
+1. Thirty-fifth Subsection in third Section In second Appendix
+1. Thirty-sixth Subsection in third Section In second Appendix
+1. Thirty-seventh Subsection in third Section In second Appendix
+1. Thirty-eighth Subsection in third Section In second Appendix
+1. Thirty-ninth Subsection in third Section In second Appendix
+1. Fortieth Subsection in third Section In second Appendix
+1. Forty-first Subsection in third Section In second Appendix
+1. Forty-second Subsection in third Section In second Appendix
+1. Forty-third Subsection in third Section In second Appendix
+1. Forty-fourth Subsection in third Section In second Appendix
+1. Forty-fifth Subsection in third Section In second Appendix
+1. Forty-sixth Subsection in third Section In second Appendix
+1. Forty-seventh Subsection in third Section In second Appendix
+1. Forty-eighth Subsection in third Section In second Appendix
+1. Forty-ninth Subsection in third Section In second Appendix
+1. Fiftieth Subsection in third Section In second Appendix
+1. Fifty-first Subsection in third Section In second Appendix
+1. Fifty-second Subsection in third Section In second Appendix
+1. Fifty-third Subsection in third Section In second Appendix
+1. Fifty-fourth Subsection in third Section In second Appendix
+1. Fifty-fifth Subsection in third Section In second Appendix
+1. Fifty-sixth Subsection in third Section In second Appendix
+1. Fifty-seventh Subsection in third Section In second Appendix
+1. Fifty-eighth Subsection in third Section In second Appendix
+1. Fifty-ninth Subsection in third Section In second Appendix
+1. Fourth Section In second Appendix
+1. First Subsection in fourth Section In second Appendix
+1. Second Subsection in fourth Section In second Appendix
+1. Third Subsection in fourth Section In second Appendix
+1. Fourth Subsection in fourth Section In second Appendix
+1. Fifth Subsection in fourth Section In second Appendix
+1. Sixth Subsection in fourth Section In second Appendix
+1. Seventh Subsection in fourth Section In second Appendix
+1. Eighth Subsection in fourth Section In second Appendix
+1. Ninth Subsection in fourth Section In second Appendix
+1. Tenth Subsection in fourth Section In second Appendix
+1. Eleventh Subsection in fourth Section In second Appendix
+1. Twelveth Subsection in fourth Section In second Appendix
+1. Thirteenth Subsection in fourth Section In second Appendix
+1. Fourteenth Subsection in fourth Section In second Appendix
+1. Third Appendix
+1. First Section In third Appendix
+1. First Subsection in first Section In third Appendix
+1. Fourth Appendix
+1. First Section In fourth Appendix
+1. First Subsection in first Section In fourth Appendix
+1. Fifth Appendix
+1. First Section In fifth Appendix
+1. First Subsection in first Section In fifth Appendix
+1. Sixth Appendix
+1. First Section In sixth Appendix
+1. First Subsection in first Section In sixth Appendix
+1. Seventh Appendix
+1. First Section In seventh Appendix
+1. First Subsection in first Section In seventh Appendix
+1. Eighth Appendix
+1. First Section In eighth Appendix
+1. First Subsection in first Section In eighth Appendix
+1. Ninth Appendix
+1. First Section In ninth Appendix
+1. First Subsection in first Section In ninth Appendix
+1. Tenth Appendix
+1. First Section In tenth Appendix
+1. First Subsection in first Section In tenth Appendix
+1. Eleventh Appendix
+1. First Section In eleventh Appendix
+1. First Subsection in first Section In eleventh Appendix
+1. Twelvth Appendix
+1. First Section In twelvth Appendix
+1. First Subsection in first Section In twelvth Appendix
+1. Thirteenth Appendix
+1. First Section In thirteenth Appendix
+1. First Subsection in first Section In thirteenth Appendix
+1. Fourteenth Appendix
+1. First Section In fourteenth Appendix
+1. First Subsection in first Section In fourteenth Appendix
+1. Second Subsection in first Section In fourteenth Appendix
+1. Third Subsection in first Section In fourteenth Appendix
+1. Fourth Subsection in first Section In fourteenth Appendix
+1. Fifth Subsection in first Section In fourteenth Appendix
+1. Second Section In fourteenth Appendix
+1. First Subsection in second Section In fourteenth Appendix
+1. Second Subsection in second Section In fourteenth Appendix
+1. Third Subsection in second Section In fourteenth Appendix
+1. Fourth Subsection in second Section In fourteenth Appendix
+1. Fifth Subsection in second Section In fourteenth Appendix
+1. Sixth Subsection in second Section In fourteenth Appendix
+1. Seventh Subsection in second Section In fourteenth Appendix
+1. Eighth Subsection in second Section In fourteenth Appendix
+1. Ninth Subsection in second Section In fourteenth Appendix
+1. Tenth Subsection in second Section In fourteenth Appendix
+1. Eleventh Subsection in second Section In fourteenth Appendix
+1. Twelveth Subsection in second Section In fourteenth Appendix
+1. Thirteenth Subsection in second Section In fourteenth Appendix
+1. Fourteenth Subsection in second Section In fourteenth Appendix
+1. Third Section In fourteenth Appendix
+1. First Subsection in third Section In fourteenth Appendix
+1. Second Subsection in third Section In fourteenth Appendix
+1. Third Subsection in third Section In fourteenth Appendix
+1. Fourth Subsection in third Section In fourteenth Appendix
+1. Fifth Subsection in third Section In fourteenth Appendix
+1. Sixth Subsection in third Section In fourteenth Appendix
+1. Seventh Subsection in third Section In fourteenth Appendix
+1. Eighth Subsection in third Section In fourteenth Appendix
+1. Ninth Subsection in third Section In fourteenth Appendix
+1. Tenth Subsection in third Section In fourteenth Appendix
+1. Eleventh Subsection in third Section In fourteenth Appendix
+1. Twelveth Subsection in third Section In fourteenth Appendix
+1. Thirteenth Subsection in third Section In fourteenth Appendix
+1. Fourteenth Subsection in third Section In fourteenth Appendix
+1. Fifthteenth Subsection in third Section In fourteenth Appendix
+1. Sixteenth Subsection in third Section In fourteenth Appendix
+1. Seventeenth Subsection in third Section In fourteenth Appendix
+1. Eighteenth Subsection in third Section In fourteenth Appendix
+1. Nineteenth Subsection in third Section In fourteenth Appendix
+1. Twentieth Subsection in third Section In fourteenth Appendix
+1. Twenty-first Subsection in third Section In fourteenth Appendix
+1. Twenty-second Subsection in third Section In fourteenth Appendix
+1. Twenty-third Subsection in third Section In fourteenth Appendix
+1. Twenty-fourth Subsection in third Section In fourteenth Appendix
+1. Twenty-fifth Subsection in third Section In fourteenth Appendix
+1. Twenty-sixth Subsection in third Section In fourteenth Appendix
+1. Twenty-seventh Subsection in third Section In fourteenth Appendix
+1. Twenty-eighth Subsection in third Section In fourteenth Appendix
+1. Twenty-ninth Subsection in third Section In fourteenth Appendix
+1. Thirtieth Subsection in third Section In fourteenth Appendix
+1. Thirty-first Subsection in third Section In fourteenth Appendix
+1. Thirty-second Subsection in third Section In fourteenth Appendix
+1. Thirty-third Subsection in third Section In fourteenth Appendix
+1. Thirty-fourth Subsection in third Section In fourteenth Appendix
+1. Thirty-fifth Subsection in third Section In fourteenth Appendix
+1. Thirty-sixth Subsection in third Section In fourteenth Appendix
+1. Thirty-seventh Subsection in third Section In fourteenth Appendix
+1. Thirty-eighth Subsection in third Section In fourteenth Appendix
+1. Thirty-ninth Subsection in third Section In fourteenth Appendix
+1. Fortieth Subsection in third Section In fourteenth Appendix
+1. Forty-first Subsection in third Section In fourteenth Appendix
+1. Forty-second Subsection in third Section In fourteenth Appendix
+1. Forty-third Subsection in third Section In fourteenth Appendix
+1. Forty-fourth Subsection in third Section In fourteenth Appendix
+1. Forty-fifth Subsection in third Section In fourteenth Appendix
+1. Forty-sixth Subsection in third Section In fourteenth Appendix
+1. Forty-seventh Subsection in third Section In fourteenth Appendix
+1. Forty-eighth Subsection in third Section In fourteenth Appendix
+1. Forty-ninth Subsection in third Section In fourteenth Appendix
+1. Fourth Section In fourteenth Appendix
+1. First Subsection in fourth Section In fourteenth Appendix
+1. Second Subsection in fourth Section In fourteenth Appendix
+1. Third Subsection in fourth Section In fourteenth Appendix
+1. Fourth Subsection in fourth Section In fourteenth Appendix
+1. Fifth Subsection in fourth Section In fourteenth Appendix
+1. Sixth Subsection in fourth Section In fourteenth Appendix
+1. Seventh Subsection in fourth Section In fourteenth Appendix
+1. Eighth Subsection in fourth Section In fourteenth Appendix
+1. Ninth Subsection in fourth Section In fourteenth Appendix
+1. Tenth Subsection in fourth Section In fourteenth Appendix
+1. Eleventh Subsection in fourth Section In fourteenth Appendix
+1. Twelveth Subsection in fourth Section In fourteenth Appendix
+1. Thirteenth Subsection in fourth Section In fourteenth Appendix
+1. Fourteenth Subsection in fourth Section In fourteenth Appendix
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering02.out b/test/tests/conf-gold/numbering/numbering02.out
new file mode 100644
index 0000000..1500c1e
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering02.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1. aaa
+2. bbb
+3. ccc
+4. ddd
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering03.out b/test/tests/conf-gold/numbering/numbering03.out
new file mode 100644
index 0000000..a4cca5e
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering03.out
@@ -0,0 +1,601 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test for source tree numbering
+1. First Chapter
+1.1. First Section In first Chapter
+1.1.1. First Subsection in first Section In first Chapter
+1.1.2. Second Subsection in first Section In first Chapter
+1.1.3. Third Subsection in first Section In first Chapter
+1.1.4. Fourth Subsection in first Section In first Chapter
+1.1.5. Fifth Subsection in first Section In first Chapter
+1.2. Second Section In first Chapter
+1.2.1. First Subsection in second Section In first Chapter
+1.2.2. Second Subsection in second Section In first Chapter
+1.2.3. Third Subsection in second Section In first Chapter
+1.2.4. Fourth Subsection in second Section In first Chapter
+1.2.5. Fifth Subsection in second Section In first Chapter
+1.2.6. Sixth Subsection in second Section In first Chapter
+1.2.7. Seventh Subsection in second Section In first Chapter
+1.2.8. Eighth Subsection in second Section In first Chapter
+1.2.9. Ninth Subsection in second Section In first Chapter
+1.2.10. Tenth Subsection in second Section In first Chapter
+1.2.11. Eleventh Subsection in second Section In first Chapter
+1.2.12. Twelveth Subsection in second Section In first Chapter
+1.2.13. Thirteenth Subsection in second Section In first Chapter
+1.2.14. Fourteenth Subsection in second Section In first Chapter
+1.3. Third Section In first Chapter
+1.3.1. First Subsection in third Section In first Chapter
+1.3.2. Second Subsection in third Section In first Chapter
+1.3.3. Third Subsection in third Section In first Chapter
+1.3.4. Fourth Subsection in third Section In first Chapter
+1.3.5. Fifth Subsection in third Section In first Chapter
+1.3.6. Sixth Subsection in third Section In first Chapter
+1.3.7. Seventh Subsection in third Section In first Chapter
+1.3.8. Eighth Subsection in third Section In first Chapter
+1.3.9. Ninth Subsection in third Section In first Chapter
+1.3.10. Tenth Subsection in third Section In first Chapter
+1.3.11. Eleventh Subsection in third Section In first Chapter
+1.3.12. Twelveth Subsection in third Section In first Chapter
+1.3.13. Thirteenth Subsection in third Section In first Chapter
+1.3.14. Fourteenth Subsection in third Section In first Chapter
+1.3.15. Fifthteenth Subsection in third Section In first Chapter
+1.3.16. Sixteenth Subsection in third Section In first Chapter
+1.3.17. Seventeenth Subsection in third Section In first Chapter
+1.3.18. Eighteenth Subsection in third Section In first Chapter
+1.3.19. Nineteenth Subsection in third Section In first Chapter
+1.3.20. Twentieth Subsection in third Section In first Chapter
+1.3.21. Twenty-first Subsection in third Section In first Chapter
+1.3.22. Twenty-second Subsection in third Section In first Chapter
+1.3.23. Twenty-third Subsection in third Section In first Chapter
+1.3.24. Twenty-fourth Subsection in third Section In first Chapter
+1.3.25. Twenty-fifth Subsection in third Section In first Chapter
+1.3.26. Twenty-sixth Subsection in third Section In first Chapter
+1.3.27. Twenty-seventh Subsection in third Section In first Chapter
+1.3.28. Twenty-eighth Subsection in third Section In first Chapter
+1.3.29. Twenty-ninth Subsection in third Section In first Chapter
+1.3.30. Thirtieth Subsection in third Section In first Chapter
+1.3.31. Thirty-first Subsection in third Section In first Chapter
+1.3.32. Thirty-second Subsection in third Section In first Chapter
+1.3.33. Thirty-third Subsection in third Section In first Chapter
+1.3.34. Thirty-fourth Subsection in third Section In first Chapter
+1.3.35. Thirty-fifth Subsection in third Section In first Chapter
+1.3.36. Thirty-sixth Subsection in third Section In first Chapter
+1.3.37. Thirty-seventh Subsection in third Section In first Chapter
+1.3.38. Thirty-eighth Subsection in third Section In first Chapter
+1.3.39. Thirty-ninth Subsection in third Section In first Chapter
+1.3.40. Fortieth Subsection in third Section In first Chapter
+1.3.41. Forty-first Subsection in third Section In first Chapter
+1.3.42. Forty-second Subsection in third Section In first Chapter
+1.3.43. Forty-third Subsection in third Section In first Chapter
+1.3.44. Forty-fourth Subsection in third Section In first Chapter
+1.3.45. Forty-fifth Subsection in third Section In first Chapter
+1.3.46. Forty-sixth Subsection in third Section In first Chapter
+1.3.47. Forty-seventh Subsection in third Section In first Chapter
+1.3.48. Forty-eighth Subsection in third Section In first Chapter
+1.3.49. Forty-ninth Subsection in third Section In first Chapter
+1.4. Fourth Section In first Chapter
+1.4.1. First Subsection in fourth Section In first Chapter
+1.4.2. Second Subsection in fourth Section In first Chapter
+1.4.3. Third Subsection in fourth Section In first Chapter
+1.4.4. Fourth Subsection in fourth Section In first Chapter
+1.4.5. Fifth Subsection in fourth Section In first Chapter
+1.4.6. Sixth Subsection in fourth Section In first Chapter
+1.4.7. Seventh Subsection in fourth Section In first Chapter
+1.4.8. Eighth Subsection in fourth Section In first Chapter
+1.4.9. Ninth Subsection in fourth Section In first Chapter
+1.4.10. Tenth Subsection in fourth Section In first Chapter
+1.4.11. Eleventh Subsection in fourth Section In first Chapter
+1.4.12. Twelveth Subsection in fourth Section In first Chapter
+1.4.13. Thirteenth Subsection in fourth Section In first Chapter
+1.4.14. Fourteenth Subsection in fourth Section In first Chapter
+2. Second Chapter
+2.1. First Section In second Chapter
+2.1.1. First Subsection in first Section In second Chapter
+2.1.2. Second Subsection in first Section In second Chapter
+2.1.3. Third Subsection in first Section In second Chapter
+2.1.4. Fourth Subsection in first Section In second Chapter
+2.1.5. Fifth Subsection in first Section In second Chapter
+2.2. Second Section In second Chapter
+2.2.1. First Subsection in second Section In second Chapter
+2.2.2. Second Subsection in second Section In second Chapter
+2.2.3. Third Subsection in second Section In second Chapter
+2.2.4. Fourth Subsection in second Section In second Chapter
+2.2.5. Fifth Subsection in second Section In second Chapter
+2.2.6. Sixth Subsection in second Section In second Chapter
+2.2.7. Seventh Subsection in second Section In second Chapter
+2.2.8. Eighth Subsection in second Section In second Chapter
+2.2.9. Ninth Subsection in second Section In second Chapter
+2.2.10. Tenth Subsection in second Section In second Chapter
+2.2.11. Eleventh Subsection in second Section In second Chapter
+2.2.12. Twelveth Subsection in second Section In second Chapter
+2.2.13. Thirteenth Subsection in second Section In second Chapter
+2.2.14. Fourteenth Subsection in second Section In second Chapter
+2.3. Third Section In second Chapter
+2.3.1. First Subsection in third Section In second Chapter
+2.3.2. Second Subsection in third Section In second Chapter
+2.3.3. Third Subsection in third Section In second Chapter
+2.3.4. Fourth Subsection in third Section In second Chapter
+2.3.5. Fifth Subsection in third Section In second Chapter
+2.3.6. Sixth Subsection in third Section In second Chapter
+2.3.7. Seventh Subsection in third Section In second Chapter
+2.3.8. Eighth Subsection in third Section In second Chapter
+2.3.9. Ninth Subsection in third Section In second Chapter
+2.3.10. Tenth Subsection in third Section In second Chapter
+2.3.11. Eleventh Subsection in third Section In second Chapter
+2.3.12. Twelveth Subsection in third Section In second Chapter
+2.3.13. Thirteenth Subsection in third Section In second Chapter
+2.3.14. Fourteenth Subsection in third Section In second Chapter
+2.3.15. Fifthteenth Subsection in third Section In second Chapter
+2.3.16. Sixteenth Subsection in third Section In second Chapter
+2.3.17. Seventeenth Subsection in third Section In second Chapter
+2.3.18. Eighteenth Subsection in third Section In second Chapter
+2.3.19. Nineteenth Subsection in third Section In second Chapter
+2.3.20. Twentieth Subsection in third Section In second Chapter
+2.3.21. Twenty-first Subsection in third Section In second Chapter
+2.3.22. Twenty-second Subsection in third Section In second Chapter
+2.3.23. Twenty-third Subsection in third Section In second Chapter
+2.3.24. Twenty-fourth Subsection in third Section In second Chapter
+2.3.25. Twenty-fifth Subsection in third Section In second Chapter
+2.3.26. Twenty-sixth Subsection in third Section In second Chapter
+2.3.27. Twenty-seventh Subsection in third Section In second Chapter
+2.3.28. Twenty-eighth Subsection in third Section In second Chapter
+2.3.29. Twenty-ninth Subsection in third Section In second Chapter
+2.3.30. Thirtieth Subsection in third Section In second Chapter
+2.3.31. Thirty-first Subsection in third Section In second Chapter
+2.3.32. Thirty-second Subsection in third Section In second Chapter
+2.3.33. Thirty-third Subsection in third Section In second Chapter
+2.3.34. Thirty-fourth Subsection in third Section In second Chapter
+2.3.35. Thirty-fifth Subsection in third Section In second Chapter
+2.3.36. Thirty-sixth Subsection in third Section In second Chapter
+2.3.37. Thirty-seventh Subsection in third Section In second Chapter
+2.3.38. Thirty-eighth Subsection in third Section In second Chapter
+2.3.39. Thirty-ninth Subsection in third Section In second Chapter
+2.3.40. Fortieth Subsection in third Section In second Chapter
+2.3.41. Forty-first Subsection in third Section In second Chapter
+2.3.42. Forty-second Subsection in third Section In second Chapter
+2.3.43. Forty-third Subsection in third Section In second Chapter
+2.3.44. Forty-fourth Subsection in third Section In second Chapter
+2.3.45. Forty-fifth Subsection in third Section In second Chapter
+2.3.46. Forty-sixth Subsection in third Section In second Chapter
+2.3.47. Forty-seventh Subsection in third Section In second Chapter
+2.3.48. Forty-eighth Subsection in third Section In second Chapter
+2.3.49. Forty-ninth Subsection in third Section In second Chapter
+2.4. Fouth Section In second Chapter
+2.4.1. First Subsection in fourth Section In second Chapter
+2.4.2. Second Subsection in fourth Section In second Chapter
+2.4.3. Third Subsection in fourth Section In second Chapter
+2.4.4. Fourth Subsection in fourth Section In second Chapter
+2.4.5. Fifth Subsection in fourth Section In second Chapter
+2.4.6. Sixth Subsection in fourth Section In second Chapter
+2.4.7. Seventh Subsection in fourth Section In second Chapter
+2.4.8. Eighth Subsection in fourth Section In second Chapter
+2.4.9. Ninth Subsection in fourth Section In second Chapter
+2.4.10. Tenth Subsection in fourth Section In second Chapter
+2.4.11. Eleventh Subsection in fourth Section In second Chapter
+2.4.12. Twelveth Subsection in fourth Section In second Chapter
+2.4.13. Thirteenth Subsection in fourth Section In second Chapter
+2.4.14. Fourteenth Subsection in fourth Section In second Chapter
+3. Third Chapter
+3.1. First Section In third Chapter
+3.1.1. First Subsection in first Section In third Chapter
+4. Fourth Chapter
+4.1. First Section In fourth Chapter
+4.1.1. First Subsection in first Section In fourth Chapter
+5. Fifth Chapter
+5.1. First Section In fifth Chapter
+5.1.1. First Subsection in first Section In fifth Chapter
+6. Sixth Chapter
+6.1. First Section In sixth Chapter
+6.1.1. First Subsection in first Section In sixth Chapter
+7. Seventh Chapter
+7.1. First Section In seventh Chapter
+7.1.1. First Subsection in first Section In seventh Chapter
+8. Eighth Chapter
+8.1. First Section In eighth Chapter
+8.1.1. First Subsection in first Section In eighth Chapter
+9. Ninth Chapter
+9.1. First Section In ninth Chapter
+9.1.1. First Subsection in first Section In ninth Chapter
+10. Tenth Chapter
+10.1. First Section In tenth Chapter
+10.1.1. First Subsection in first Section In tenth Chapter
+11. Eleventh Chapter
+11.1. First Section In eleventh Chapter
+11.1.1. First Subsection in first Section In eleventh Chapter
+12. Twelvth Chapter
+12.1. First Section In twelvth Chapter
+12.1.1. First Subsection in first Section In twelvth Chapter
+13. Thirteenth Chapter
+13.1. First Section In thirteenth Chapter
+13.1.1. First Subsection in first Section In thirteenth Chapter
+14. Fourteenth Chapter
+14.1. First Section In fourteenth Chapter
+14.1.1. First Subsection in first Section In fourteenth Chapter
+14.1.2. Second Subsection in first Section In fourteenth Chapter
+14.1.3. Third Subsection in first Section In fourteenth Chapter
+14.1.4. Fourth Subsection in first Section In fourteenth Chapter
+14.1.5. Fifth Subsection in first Section In fourteenth Chapter
+14.2. Second Section In fourteenth Chapter
+14.2.1. First Subsection in second Section In fourteenth Chapter
+14.2.2. Second Subsection in second Section In fourteenth Chapter
+14.2.3. Third Subsection in second Section In fourteenth Chapter
+14.2.4. Fourth Subsection in second Section In fourteenth Chapter
+14.2.5. Fifth Subsection in second Section In fourteenth Chapter
+14.2.6. Sixth Subsection in second Section In fourteenth Chapter
+14.2.7. Seventh Subsection in second Section In fourteenth Chapter
+14.2.8. Eighth Subsection in second Section In fourteenth Chapter
+14.2.9. Ninth Subsection in second Section In fourteenth Chapter
+14.2.10. Tenth Subsection in second Section In fourteenth Chapter
+14.2.11. Eleventh Subsection in second Section In fourteenth Chapter
+14.2.12. Twelveth Subsection in second Section In fourteenth Chapter
+14.2.13. Thirteenth Subsection in second Section In fourteenth Chapter
+14.2.14. Fourteenth Subsection in second Section In fourteenth Chapter
+14.3. Third Section In fourteenth Chapter
+14.3.1. First Subsection in third Section In fourteenth Chapter
+14.3.2. Second Subsection in third Section In fourteenth Chapter
+14.3.3. Third Subsection in third Section In fourteenth Chapter
+14.3.4. Fourth Subsection in third Section In fourteenth Chapter
+14.3.5. Fifth Subsection in third Section In fourteenth Chapter
+14.3.6. Sixth Subsection in third Section In fourteenth Chapter
+14.3.7. Seventh Subsection in third Section In fourteenth Chapter
+14.3.8. Eighth Subsection in third Section In fourteenth Chapter
+14.3.9. Ninth Subsection in third Section In fourteenth Chapter
+14.3.10. Tenth Subsection in third Section In fourteenth Chapter
+14.3.11. Eleventh Subsection in third Section In fourteenth Chapter
+14.3.12. Twelveth Subsection in third Section In fourteenth Chapter
+14.3.13. Thirteenth Subsection in third Section In fourteenth Chapter
+14.3.14. Fourteenth Subsection in third Section In fourteenth Chapter
+14.3.15. Fifthteenth Subsection in third Section In fourteenth Chapter
+14.3.16. Sixteenth Subsection in third Section In fourteenth Chapter
+14.3.17. Seventeenth Subsection in third Section In fourteenth Chapter
+14.3.18. Eighteenth Subsection in third Section In fourteenth Chapter
+14.3.19. Nineteenth Subsection in third Section In fourteenth Chapter
+14.3.20. Twentieth Subsection in third Section In fourteenth Chapter
+14.3.21. Twenty-first Subsection in third Section In fourteenth Chapter
+14.3.22. Twenty-second Subsection in third Section In fourteenth Chapter
+14.3.23. Twenty-third Subsection in third Section In fourteenth Chapter
+14.3.24. Twenty-fourth Subsection in third Section In fourteenth Chapter
+14.3.25. Twenty-fifth Subsection in third Section In fourteenth Chapter
+14.3.26. Twenty-sixth Subsection in third Section In fourteenth Chapter
+14.3.27. Twenty-seventh Subsection in third Section In fourteenth Chapter
+14.3.28. Twenty-eighth Subsection in third Section In fourteenth Chapter
+14.3.29. Twenty-ninth Subsection in third Section In fourteenth Chapter
+14.3.30. Thirtieth Subsection in third Section In fourteenth Chapter
+14.3.31. Thirty-first Subsection in third Section In fourteenth Chapter
+14.3.32. Thirty-second Subsection in third Section In fourteenth Chapter
+14.3.33. Thirty-third Subsection in third Section In fourteenth Chapter
+14.3.34. Thirty-fourth Subsection in third Section In fourteenth Chapter
+14.3.35. Thirty-fifth Subsection in third Section In fourteenth Chapter
+14.3.36. Thirty-sixth Subsection in third Section In fourteenth Chapter
+14.3.37. Thirty-seventh Subsection in third Section In fourteenth Chapter
+14.3.38. Thirty-eighth Subsection in third Section In fourteenth Chapter
+14.3.39. Thirty-ninth Subsection in third Section In fourteenth Chapter
+14.3.40. Fortieth Subsection in third Section In fourteenth Chapter
+14.3.41. Forty-first Subsection in third Section In fourteenth Chapter
+14.3.42. Forty-second Subsection in third Section In fourteenth Chapter
+14.3.43. Forty-third Subsection in third Section In fourteenth Chapter
+14.3.44. Forty-fourth Subsection in third Section In fourteenth Chapter
+14.3.45. Forty-fifth Subsection in third Section In fourteenth Chapter
+14.3.46. Forty-sixth Subsection in third Section In fourteenth Chapter
+14.3.47. Forty-seventh Subsection in third Section In fourteenth Chapter
+14.3.48. Forty-eighth Subsection in third Section In fourteenth Chapter
+14.3.49. Forty-ninth Subsection in third Section In fourteenth Chapter
+14.4. Fourth Section In fourteenth Chapter
+14.4.1. First Subsection in fourth Section In fourteenth Chapter
+14.4.2. Second Subsection in fourth Section In fourteenth Chapter
+14.4.3. Third Subsection in fourth Section In fourteenth Chapter
+14.4.4. Fourth Subsection in fourth Section In fourteenth Chapter
+14.4.5. Fifth Subsection in fourth Section In fourteenth Chapter
+14.4.6. Sixth Subsection in fourth Section In fourteenth Chapter
+14.4.7. Seventh Subsection in fourth Section In fourteenth Chapter
+14.4.8. Eighth Subsection in fourth Section In fourteenth Chapter
+14.4.9. Ninth Subsection in fourth Section In fourteenth Chapter
+14.4.10. Tenth Subsection in fourth Section In fourteenth Chapter
+14.4.11. Eleventh Subsection in fourth Section In fourteenth Chapter
+14.4.12. Twelveth Subsection in fourth Section In fourteenth Chapter
+14.4.13. Thirteenth Subsection in fourth Section In fourteenth Chapter
+14.4.14. Fourteenth Subsection in fourth Section In fourteenth Chapter
+A. First Appendix
+A.1. First Section In first Appendix
+A.1.1. First Subsection in first Section In first Appendix
+A.1.2. Second Subsection in first Section In first Appendix
+A.1.3. Third Subsection in first Section In first Appendix
+A.1.4. Fourth Subsection in first Section In first Appendix
+A.1.5. Fifth Subsection in first Section In first Appendix
+A.2. Second Section In first Appendix
+A.2.1. First Subsection in second Section In first Appendix
+A.2.2. Second Subsection in second Section In first Appendix
+A.2.3. Third Subsection in second Section In first Appendix
+A.2.4. Fourth Subsection in second Section In first Appendix
+A.2.5. Fifth Subsection in second Section In first Appendix
+A.2.6. Sixth Subsection in second Section In first Appendix
+A.2.7. Seventh Subsection in second Section In first Appendix
+A.2.8. Eighth Subsection in second Section In first Appendix
+A.2.9. Ninth Subsection in second Section In first Appendix
+A.2.10. Tenth Subsection in second Section In first Appendix
+A.2.11. Eleventh Subsection in second Section In first Appendix
+A.2.12. Twelveth Subsection in second Section In first Appendix
+A.2.13. Thirteenth Subsection in second Section In first Appendix
+A.2.14. Fourteenth Subsection in second Section In first Appendix
+A.3. Third Section In first Appendix
+A.3.1. First Subsection in third Section In first Appendix
+A.3.2. Second Subsection in third Section In first Appendix
+A.3.3. Third Subsection in third Section In first Appendix
+A.3.4. Fourth Subsection in third Section In first Appendix
+A.3.5. Fifth Subsection in third Section In first Appendix
+A.3.6. Sixth Subsection in third Section In first Appendix
+A.3.7. Seventh Subsection in third Section In first Appendix
+A.3.8. Eighth Subsection in third Section In first Appendix
+A.3.9. Ninth Subsection in third Section In first Appendix
+A.3.10. Tenth Subsection in third Section In first Appendix
+A.3.11. Eleventh Subsection in third Section In first Appendix
+A.3.12. Twelveth Subsection in third Section In first Appendix
+A.3.13. Thirteenth Subsection in third Section In first Appendix
+A.3.14. Fourteenth Subsection in third Section In first Appendix
+A.3.15. Fifthteenth Subsection in third Section In first Appendix
+A.3.16. Sixteenth Subsection in third Section In first Appendix
+A.3.17. Seventeenth Subsection in third Section In first Appendix
+A.3.18. Eighteenth Subsection in third Section In first Appendix
+A.3.19. Nineteenth Subsection in third Section In first Appendix
+A.3.20. Twentieth Subsection in third Section In first Appendix
+A.3.21. Twenty-first Subsection in third Section In first Appendix
+A.3.22. Twenty-second Subsection in third Section In first Appendix
+A.3.23. Twenty-third Subsection in third Section In first Appendix
+A.3.24. Twenty-fourth Subsection in third Section In first Appendix
+A.3.25. Twenty-fifth Subsection in third Section In first Appendix
+A.3.26. Twenty-sixth Subsection in third Section In first Appendix
+A.3.27. Twenty-seventh Subsection in third Section In first Appendix
+A.3.28. Twenty-eighth Subsection in third Section In first Appendix
+A.3.29. Twenty-ninth Subsection in third Section In first Appendix
+A.3.30. Thirtieth Subsection in third Section In first Appendix
+A.3.31. Thirty-first Subsection in third Section In first Appendix
+A.3.32. Thirty-second Subsection in third Section In first Appendix
+A.3.33. Thirty-third Subsection in third Section In first Appendix
+A.3.34. Thirty-fourth Subsection in third Section In first Appendix
+A.3.35. Thirty-fifth Subsection in third Section In first Appendix
+A.3.36. Thirty-sixth Subsection in third Section In first Appendix
+A.3.37. Thirty-seventh Subsection in third Section In first Appendix
+A.3.38. Thirty-eighth Subsection in third Section In first Appendix
+A.3.39. Thirty-ninth Subsection in third Section In first Appendix
+A.3.40. Fortieth Subsection in third Section In first Appendix
+A.3.41. Forty-first Subsection in third Section In first Appendix
+A.3.42. Forty-second Subsection in third Section In first Appendix
+A.3.43. Forty-third Subsection in third Section In first Appendix
+A.3.44. Forty-fourth Subsection in third Section In first Appendix
+A.3.45. Forty-fifth Subsection in third Section In first Appendix
+A.3.46. Forty-sixth Subsection in third Section In first Appendix
+A.3.47. Forty-seventh Subsection in third Section In first Appendix
+A.3.48. Forty-eighth Subsection in third Section In first Appendix
+A.3.49. Forty-ninth Subsection in third Section In first Appendix
+A.4. Fourth Section In first Appendix
+A.4.1. First Subsection in fourth Section In first Appendix
+A.4.2. Second Subsection in fourth Section In first Appendix
+A.4.3. Third Subsection in fourth Section In first Appendix
+A.4.4. Fourth Subsection in fourth Section In first Appendix
+A.4.5. Fifth Subsection in fourth Section In first Appendix
+A.4.6. Sixth Subsection in fourth Section In first Appendix
+A.4.7. Seventh Subsection in fourth Section In first Appendix
+A.4.8. Eighth Subsection in fourth Section In first Appendix
+A.4.9. Ninth Subsection in fourth Section In first Appendix
+A.4.10. Tenth Subsection in fourth Section In first Appendix
+A.4.11. Eleventh Subsection in fourth Section In first Appendix
+A.4.12. Twelveth Subsection in fourth Section In first Appendix
+A.4.13. Thirteenth Subsection in fourth Section In first Appendix
+A.4.14. Fourteenth Subsection in fourth Section In first Appendix
+B. Second Appendix
+B.1. First Section In second Appendix
+B.1.1. First Subsection in first Section In second Appendix
+B.1.2. Second Subsection in first Section In second Appendix
+B.1.3. Third Subsection in first Section In second Appendix
+B.1.4. Fourth Subsection in first Section In second Appendix
+B.1.5. Fifth Subsection in first Section In second Appendix
+B.2. Second Section In second Appendix
+B.2.1. First Subsection in second Section In second Appendix
+B.2.2. Second Subsection in second Section In second Appendix
+B.2.3. Third Subsection in second Section In second Appendix
+B.2.4. Fourth Subsection in second Section In second Appendix
+B.2.5. Fifth Subsection in second Section In second Appendix
+B.2.6. Sixth Subsection in second Section In second Appendix
+B.2.7. Seventh Subsection in second Section In second Appendix
+B.2.8. Eighth Subsection in second Section In second Appendix
+B.2.9. Ninth Subsection in second Section In second Appendix
+B.2.10. Tenth Subsection in second Section In second Appendix
+B.2.11. Eleventh Subsection in second Section In second Appendix
+B.2.12. Twelveth Subsection in second Section In second Appendix
+B.2.13. Thirteenth Subsection in second Section In second Appendix
+B.2.14. Fourteenth Subsection in second Section In second Appendix
+B.3. Third Section In second Appendix
+B.3.1. First Subsection in third Section In second Appendix
+B.3.2. Second Subsection in third Section In second Appendix
+B.3.3. Third Subsection in third Section In second Appendix
+B.3.4. Fourth Subsection in third Section In second Appendix
+B.3.5. Fifth Subsection in third Section In second Appendix
+B.3.6. Sixth Subsection in third Section In second Appendix
+B.3.7. Seventh Subsection in third Section In second Appendix
+B.3.8. Eighth Subsection in third Section In second Appendix
+B.3.9. Ninth Subsection in third Section In second Appendix
+B.3.10. Tenth Subsection in third Section In second Appendix
+B.3.11. Eleventh Subsection in third Section In second Appendix
+B.3.12. Twelveth Subsection in third Section In second Appendix
+B.3.13. Thirteenth Subsection in third Section In second Appendix
+B.3.14. Fourteenth Subsection in third Section In second Appendix
+B.3.15. Fifthteenth Subsection in third Section In second Appendix
+B.3.16. Sixteenth Subsection in third Section In second Appendix
+B.3.17. Seventeenth Subsection in third Section In second Appendix
+B.3.18. Eighteenth Subsection in third Section In second Appendix
+B.3.19. Nineteenth Subsection in third Section In second Appendix
+B.3.20. Twentieth Subsection in third Section In second Appendix
+B.3.21. Twenty-first Subsection in third Section In second Appendix
+B.3.22. Twenty-second Subsection in third Section In second Appendix
+B.3.23. Twenty-third Subsection in third Section In second Appendix
+B.3.24. Twenty-fourth Subsection in third Section In second Appendix
+B.3.25. Twenty-fifth Subsection in third Section In second Appendix
+B.3.26. Twenty-sixth Subsection in third Section In second Appendix
+B.3.27. Twenty-seventh Subsection in third Section In second Appendix
+B.3.28. Twenty-eighth Subsection in third Section In second Appendix
+B.3.29. Twenty-ninth Subsection in third Section In second Appendix
+B.3.30. Thirtieth Subsection in third Section In second Appendix
+B.3.31. Thirty-first Subsection in third Section In second Appendix
+B.3.32. Thirty-second Subsection in third Section In second Appendix
+B.3.33. Thirty-third Subsection in third Section In second Appendix
+B.3.34. Thirty-fourth Subsection in third Section In second Appendix
+B.3.35. Thirty-fifth Subsection in third Section In second Appendix
+B.3.36. Thirty-sixth Subsection in third Section In second Appendix
+B.3.37. Thirty-seventh Subsection in third Section In second Appendix
+B.3.38. Thirty-eighth Subsection in third Section In second Appendix
+B.3.39. Thirty-ninth Subsection in third Section In second Appendix
+B.3.40. Fortieth Subsection in third Section In second Appendix
+B.3.41. Forty-first Subsection in third Section In second Appendix
+B.3.42. Forty-second Subsection in third Section In second Appendix
+B.3.43. Forty-third Subsection in third Section In second Appendix
+B.3.44. Forty-fourth Subsection in third Section In second Appendix
+B.3.45. Forty-fifth Subsection in third Section In second Appendix
+B.3.46. Forty-sixth Subsection in third Section In second Appendix
+B.3.47. Forty-seventh Subsection in third Section In second Appendix
+B.3.48. Forty-eighth Subsection in third Section In second Appendix
+B.3.49. Forty-ninth Subsection in third Section In second Appendix
+B.3.50. Fiftieth Subsection in third Section In second Appendix
+B.3.51. Fifty-first Subsection in third Section In second Appendix
+B.3.52. Fifty-second Subsection in third Section In second Appendix
+B.3.53. Fifty-third Subsection in third Section In second Appendix
+B.3.54. Fifty-fourth Subsection in third Section In second Appendix
+B.3.55. Fifty-fifth Subsection in third Section In second Appendix
+B.3.56. Fifty-sixth Subsection in third Section In second Appendix
+B.3.57. Fifty-seventh Subsection in third Section In second Appendix
+B.3.58. Fifty-eighth Subsection in third Section In second Appendix
+B.3.59. Fifty-ninth Subsection in third Section In second Appendix
+B.4. Fourth Section In second Appendix
+B.4.1. First Subsection in fourth Section In second Appendix
+B.4.2. Second Subsection in fourth Section In second Appendix
+B.4.3. Third Subsection in fourth Section In second Appendix
+B.4.4. Fourth Subsection in fourth Section In second Appendix
+B.4.5. Fifth Subsection in fourth Section In second Appendix
+B.4.6. Sixth Subsection in fourth Section In second Appendix
+B.4.7. Seventh Subsection in fourth Section In second Appendix
+B.4.8. Eighth Subsection in fourth Section In second Appendix
+B.4.9. Ninth Subsection in fourth Section In second Appendix
+B.4.10. Tenth Subsection in fourth Section In second Appendix
+B.4.11. Eleventh Subsection in fourth Section In second Appendix
+B.4.12. Twelveth Subsection in fourth Section In second Appendix
+B.4.13. Thirteenth Subsection in fourth Section In second Appendix
+B.4.14. Fourteenth Subsection in fourth Section In second Appendix
+C. Third Appendix
+C.1. First Section In third Appendix
+C.1.1. First Subsection in first Section In third Appendix
+D. Fourth Appendix
+D.1. First Section In fourth Appendix
+D.1.1. First Subsection in first Section In fourth Appendix
+E. Fifth Appendix
+E.1. First Section In fifth Appendix
+E.1.1. First Subsection in first Section In fifth Appendix
+F. Sixth Appendix
+F.1. First Section In sixth Appendix
+F.1.1. First Subsection in first Section In sixth Appendix
+G. Seventh Appendix
+G.1. First Section In seventh Appendix
+G.1.1. First Subsection in first Section In seventh Appendix
+H. Eighth Appendix
+H.1. First Section In eighth Appendix
+H.1.1. First Subsection in first Section In eighth Appendix
+I. Ninth Appendix
+I.1. First Section In ninth Appendix
+I.1.1. First Subsection in first Section In ninth Appendix
+J. Tenth Appendix
+J.1. First Section In tenth Appendix
+J.1.1. First Subsection in first Section In tenth Appendix
+K. Eleventh Appendix
+K.1. First Section In eleventh Appendix
+K.1.1. First Subsection in first Section In eleventh Appendix
+L. Twelvth Appendix
+L.1. First Section In twelvth Appendix
+L.1.1. First Subsection in first Section In twelvth Appendix
+M. Thirteenth Appendix
+M.1. First Section In thirteenth Appendix
+M.1.1. First Subsection in first Section In thirteenth Appendix
+N. Fourteenth Appendix
+N.1. First Section In fourteenth Appendix
+N.1.1. First Subsection in first Section In fourteenth Appendix
+N.1.2. Second Subsection in first Section In fourteenth Appendix
+N.1.3. Third Subsection in first Section In fourteenth Appendix
+N.1.4. Fourth Subsection in first Section In fourteenth Appendix
+N.1.5. Fifth Subsection in first Section In fourteenth Appendix
+N.2. Second Section In fourteenth Appendix
+N.2.1. First Subsection in second Section In fourteenth Appendix
+N.2.2. Second Subsection in second Section In fourteenth Appendix
+N.2.3. Third Subsection in second Section In fourteenth Appendix
+N.2.4. Fourth Subsection in second Section In fourteenth Appendix
+N.2.5. Fifth Subsection in second Section In fourteenth Appendix
+N.2.6. Sixth Subsection in second Section In fourteenth Appendix
+N.2.7. Seventh Subsection in second Section In fourteenth Appendix
+N.2.8. Eighth Subsection in second Section In fourteenth Appendix
+N.2.9. Ninth Subsection in second Section In fourteenth Appendix
+N.2.10. Tenth Subsection in second Section In fourteenth Appendix
+N.2.11. Eleventh Subsection in second Section In fourteenth Appendix
+N.2.12. Twelveth Subsection in second Section In fourteenth Appendix
+N.2.13. Thirteenth Subsection in second Section In fourteenth Appendix
+N.2.14. Fourteenth Subsection in second Section In fourteenth Appendix
+N.3. Third Section In fourteenth Appendix
+N.3.1. First Subsection in third Section In fourteenth Appendix
+N.3.2. Second Subsection in third Section In fourteenth Appendix
+N.3.3. Third Subsection in third Section In fourteenth Appendix
+N.3.4. Fourth Subsection in third Section In fourteenth Appendix
+N.3.5. Fifth Subsection in third Section In fourteenth Appendix
+N.3.6. Sixth Subsection in third Section In fourteenth Appendix
+N.3.7. Seventh Subsection in third Section In fourteenth Appendix
+N.3.8. Eighth Subsection in third Section In fourteenth Appendix
+N.3.9. Ninth Subsection in third Section In fourteenth Appendix
+N.3.10. Tenth Subsection in third Section In fourteenth Appendix
+N.3.11. Eleventh Subsection in third Section In fourteenth Appendix
+N.3.12. Twelveth Subsection in third Section In fourteenth Appendix
+N.3.13. Thirteenth Subsection in third Section In fourteenth Appendix
+N.3.14. Fourteenth Subsection in third Section In fourteenth Appendix
+N.3.15. Fifthteenth Subsection in third Section In fourteenth Appendix
+N.3.16. Sixteenth Subsection in third Section In fourteenth Appendix
+N.3.17. Seventeenth Subsection in third Section In fourteenth Appendix
+N.3.18. Eighteenth Subsection in third Section In fourteenth Appendix
+N.3.19. Nineteenth Subsection in third Section In fourteenth Appendix
+N.3.20. Twentieth Subsection in third Section In fourteenth Appendix
+N.3.21. Twenty-first Subsection in third Section In fourteenth Appendix
+N.3.22. Twenty-second Subsection in third Section In fourteenth Appendix
+N.3.23. Twenty-third Subsection in third Section In fourteenth Appendix
+N.3.24. Twenty-fourth Subsection in third Section In fourteenth Appendix
+N.3.25. Twenty-fifth Subsection in third Section In fourteenth Appendix
+N.3.26. Twenty-sixth Subsection in third Section In fourteenth Appendix
+N.3.27. Twenty-seventh Subsection in third Section In fourteenth Appendix
+N.3.28. Twenty-eighth Subsection in third Section In fourteenth Appendix
+N.3.29. Twenty-ninth Subsection in third Section In fourteenth Appendix
+N.3.30. Thirtieth Subsection in third Section In fourteenth Appendix
+N.3.31. Thirty-first Subsection in third Section In fourteenth Appendix
+N.3.32. Thirty-second Subsection in third Section In fourteenth Appendix
+N.3.33. Thirty-third Subsection in third Section In fourteenth Appendix
+N.3.34. Thirty-fourth Subsection in third Section In fourteenth Appendix
+N.3.35. Thirty-fifth Subsection in third Section In fourteenth Appendix
+N.3.36. Thirty-sixth Subsection in third Section In fourteenth Appendix
+N.3.37. Thirty-seventh Subsection in third Section In fourteenth Appendix
+N.3.38. Thirty-eighth Subsection in third Section In fourteenth Appendix
+N.3.39. Thirty-ninth Subsection in third Section In fourteenth Appendix
+N.3.40. Fortieth Subsection in third Section In fourteenth Appendix
+N.3.41. Forty-first Subsection in third Section In fourteenth Appendix
+N.3.42. Forty-second Subsection in third Section In fourteenth Appendix
+N.3.43. Forty-third Subsection in third Section In fourteenth Appendix
+N.3.44. Forty-fourth Subsection in third Section In fourteenth Appendix
+N.3.45. Forty-fifth Subsection in third Section In fourteenth Appendix
+N.3.46. Forty-sixth Subsection in third Section In fourteenth Appendix
+N.3.47. Forty-seventh Subsection in third Section In fourteenth Appendix
+N.3.48. Forty-eighth Subsection in third Section In fourteenth Appendix
+N.3.49. Forty-ninth Subsection in third Section In fourteenth Appendix
+N.4. Fourth Section In fourteenth Appendix
+N.4.1. First Subsection in fourth Section In fourteenth Appendix
+N.4.2. Second Subsection in fourth Section In fourteenth Appendix
+N.4.3. Third Subsection in fourth Section In fourteenth Appendix
+N.4.4. Fourth Subsection in fourth Section In fourteenth Appendix
+N.4.5. Fifth Subsection in fourth Section In fourteenth Appendix
+N.4.6. Sixth Subsection in fourth Section In fourteenth Appendix
+N.4.7. Seventh Subsection in fourth Section In fourteenth Appendix
+N.4.8. Eighth Subsection in fourth Section In fourteenth Appendix
+N.4.9. Ninth Subsection in fourth Section In fourteenth Appendix
+N.4.10. Tenth Subsection in fourth Section In fourteenth Appendix
+N.4.11. Eleventh Subsection in fourth Section In fourteenth Appendix
+N.4.12. Twelveth Subsection in fourth Section In fourteenth Appendix
+N.4.13. Thirteenth Subsection in fourth Section In fourteenth Appendix
+N.4.14. Fourteenth Subsection in fourth Section In fourteenth Appendix
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering04.out b/test/tests/conf-gold/numbering/numbering04.out
new file mode 100644
index 0000000..66a2e02
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering04.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+  
+  
+    (1) ddd
+    (2) eee
+    (3) fff
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering05.out b/test/tests/conf-gold/numbering/numbering05.out
new file mode 100644
index 0000000..6d55e86
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering05.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+1.1.1 
+
+2.1.1 
+
+2.1.2 
+
+2.2.1 
+
+2.2.2 
+
+2.2.3 
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering06.out b/test/tests/conf-gold/numbering/numbering06.out
new file mode 100644
index 0000000..66a2e02
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering06.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+  
+  
+    (1) ddd
+    (2) eee
+    (3) fff
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering07.out b/test/tests/conf-gold/numbering/numbering07.out
new file mode 100644
index 0000000..c7a69bb
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering07.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    A aaa
+    B bbb
+    C ccc
+  
+  
+    A ddd
+    B eee
+    C fff
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering08.out b/test/tests/conf-gold/numbering/numbering08.out
new file mode 100644
index 0000000..d4cb670
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering08.out
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  Test for source tree numbering
+  
+    01. First Chapter
+    
+      01-001. First Section In first Chapter
+      01-001-001. First Subsection in first Section In first Chapter
+      01-001-002. Second Subsection in first Section In first Chapter
+      01-001-003. Third Subsection in first Section In first Chapter
+      01-001-004. Fourth Subsection in first Section In first Chapter
+      01-001-005. Fifth Subsection in first Section In first Chapter
+    
+    
+      01-002. Second Section In first Chapter
+      01-002-001. First Subsection in second Section In first Chapter
+      01-002-002. Second Subsection in second Section In first Chapter
+      01-002-003. Third Subsection in second Section In first Chapter
+      01-002-004. Fourth Subsection in second Section In first Chapter
+      01-002-005. Fifth Subsection in second Section In first Chapter
+      01-002-006. Sixth Subsection in second Section In first Chapter
+      01-002-007. Seventh Subsection in second Section In first Chapter
+      01-002-008. Eighth Subsection in second Section In first Chapter
+      01-002-009. Ninth Subsection in second Section In first Chapter
+      01-002-010. Tenth Subsection in second Section In first Chapter
+      01-002-011. Eleventh Subsection in second Section In first Chapter
+    
+    
+      01-003. Third Section In first Chapter
+      01-003-001. First Subsection in third Section In first Chapter
+      01-003-002. Second Subsection in third Section In first Chapter
+      01-003-003. Third Subsection in third Section In first Chapter
+      01-003-004. Fourth Subsection in third Section In first Chapter
+      01-003-005. Fifth Subsection in third Section In first Chapter
+    
+    
+      01-004. Fourth Section In first Chapter
+      01-004-001. First Subsection in fourth Section In first Chapter
+      01-004-002. Second Subsection in fourth Section In first Chapter
+      01-004-003. Third Subsection in fourth Section In first Chapter
+      01-004-004. Fourth Subsection in fourth Section In first Chapter
+      01-004-005. Fifth Subsection in fourth Section In first Chapter
+      01-004-006. Sixth Subsection in fourth Section In first Chapter
+      01-004-007. Seventh Subsection in fourth Section In first Chapter
+      01-004-008. Eighth Subsection in fourth Section In first Chapter
+      01-004-009. Ninth Subsection in fourth Section In first Chapter
+      01-004-010. Tenth Subsection in fourth Section In first Chapter
+      01-004-011. Eleventh Subsection in fourth Section In first Chapter
+    
+  
+  
+    02. Second Chapter
+    
+      02-001. First Section In second Chapter
+      02-001-001. First Subsection in first Section In second Chapter
+      02-001-002. Second Subsection in first Section In second Chapter
+      02-001-003. Third Subsection in first Section In second Chapter
+      02-001-004. Fourth Subsection in first Section In second Chapter
+      02-001-005. Fifth Subsection in first Section In second Chapter
+    
+    
+      02-002. Second Section In second Chapter
+      02-002-001. First Subsection in second Section In second Chapter
+      02-002-002. Second Subsection in second Section In second Chapter
+      02-002-003. Third Subsection in second Section In second Chapter
+      02-002-004. Fourth Subsection in second Section In second Chapter
+      02-002-005. Fifth Subsection in second Section In second Chapter
+      02-002-006. Sixth Subsection in second Section In second Chapter
+      02-002-007. Seventh Subsection in second Section In second Chapter
+      02-002-008. Eighth Subsection in second Section In second Chapter
+      02-002-009. Ninth Subsection in second Section In second Chapter
+    
+    
+      02-003. Third Section In second Chapter
+      02-003-001. First Subsection in third Section In second Chapter
+      02-003-002. Second Subsection in third Section In second Chapter
+      02-003-003. Third Subsection in third Section In second Chapter
+      02-003-004. Fourth Subsection in third Section In second Chapter
+      02-003-005. Fifth Subsection in third Section In second Chapter
+      02-003-006. Sixth Subsection in third Section In second Chapter
+      02-003-007. Seventh Subsection in third Section In second Chapter
+      02-003-008. Eighth Subsection in third Section In second Chapter
+      02-003-009. Ninth Subsection in third Section In second Chapter
+      02-003-010. Tenth Subsection in third Section In second Chapter
+      02-003-011. Eleventh Subsection in third Section In second Chapter
+      02-003-012. Twelveth Subsection in third Section In second Chapter
+    
+    
+      02-004. Fouth Section In second Chapter
+      02-004-001. First Subsection in fourth Section In second Chapter
+      02-004-002. Second Subsection in fourth Section In second Chapter
+      02-004-003. Third Subsection in fourth Section In second Chapter
+      02-004-004. Fourth Subsection in fourth Section In second Chapter
+      02-004-005. Fifth Subsection in fourth Section In second Chapter
+      02-004-006. Sixth Subsection in fourth Section In second Chapter
+      02-004-007. Seventh Subsection in fourth Section In second Chapter
+    
+  
+  
+    03. Third Chapter
+    
+      03-001. First Section In third Chapter
+      03-001-001. First Subsection in first Section In third Chapter
+    
+  
+  
+    04. Fourth Chapter
+    
+      04-001. First Section In fourth Chapter
+      04-001-001. First Subsection in first Section In fourth Chapter
+    
+  
+  
+    05. Fifth Chapter
+    
+      05-001. First Section In fifth Chapter
+      05-001-001. First Subsection in first Section In fifth Chapter
+    
+  
+  
+    A. First Appendix
+    
+      A-001. First Section In first Appendix
+      A-001-001. First Subsection in first Section In first Appendix
+      A-001-002. Second Subsection in first Section In first Appendix
+      A-001-003. Third Subsection in first Section In first Appendix
+      A-001-004. Fourth Subsection in first Section In first Appendix
+      A-001-005. Fifth Subsection in first Section In first Appendix
+    
+    
+      A-002. Second Section In first Appendix
+      A-002-001. First Subsection in second Section In first Appendix
+      A-002-002. Second Subsection in second Section In first Appendix
+      A-002-003. Third Subsection in second Section In first Appendix
+      A-002-004. Fourth Subsection in second Section In first Appendix
+      A-002-005. Fifth Subsection in second Section In first Appendix
+      A-002-006. Sixth Subsection in second Section In first Appendix
+      A-002-007. Seventh Subsection in second Section In first Appendix
+      A-002-008. Eighth Subsection in second Section In first Appendix
+      A-002-009. Ninth Subsection in second Section In first Appendix
+      A-002-010. Tenth Subsection in second Section In first Appendix
+      A-002-011. Eleventh Subsection in second Section In first Appendix
+      A-002-012. Twelveth Subsection in second Section In first Appendix
+      A-002-013. Thirteenth Subsection in second Section In first Appendix
+      A-002-014. Fourteenth Subsection in second Section In first Appendix
+    
+    
+      A-003. Third Section In first Appendix
+      A-003-001. First Subsection in third Section In first Appendix
+      A-003-002. Second Subsection in third Section In first Appendix
+      A-003-003. Third Subsection in third Section In first Appendix
+      A-003-004. Fourth Subsection in third Section In first Appendix
+      A-003-005. Fifth Subsection in third Section In first Appendix
+      A-003-006. Sixth Subsection in third Section In first Appendix
+      A-003-007. Seventh Subsection in third Section In first Appendix
+      A-003-008. Eighth Subsection in third Section In first Appendix
+      A-003-009. Ninth Subsection in third Section In first Appendix
+      A-003-010. Tenth Subsection in third Section In first Appendix
+      A-003-011. Eleventh Subsection in third Section In first Appendix
+    
+  
+  
+    B. Second Appendix
+    
+      B-001. First Section In second Appendix
+      B-001-001. First Subsection in first Section In second Appendix
+      B-001-002. Second Subsection in first Section In second Appendix
+      B-001-003. Third Subsection in first Section In second Appendix
+      B-001-004. Fourth Subsection in first Section In second Appendix
+      B-001-005. Fifth Subsection in first Section In second Appendix
+    
+    
+      B-002. Second Section In second Appendix
+      B-002-001. First Subsection in second Section In second Appendix
+      B-002-002. Second Subsection in second Section In second Appendix
+      B-002-003. Third Subsection in second Section In second Appendix
+      B-002-004. Fourth Subsection in second Section In second Appendix
+      B-002-005. Fifth Subsection in second Section In second Appendix
+      B-002-006. Sixth Subsection in second Section In second Appendix
+      B-002-007. Seventh Subsection in second Section In second Appendix
+    
+    
+      B-003. Third Section In second Appendix
+      B-003-001. First Subsection in third Section In second Appendix
+      B-003-002. Second Subsection in third Section In second Appendix
+      B-003-003. Third Subsection in third Section In second Appendix
+      B-003-004. Fourth Subsection in third Section In second Appendix
+      B-003-005. Fifth Subsection in third Section In second Appendix
+      B-003-006. Sixth Subsection in third Section In second Appendix
+      B-003-007. Seventh Subsection in third Section In second Appendix
+      B-003-008. Eighth Subsection in third Section In second Appendix
+      B-003-009. Ninth Subsection in third Section In second Appendix
+      B-003-010. Tenth Subsection in third Section In second Appendix
+    
+    
+      B-004. Fourth Section In second Appendix
+      B-004-001. First Subsection in fourth Section In second Appendix
+      B-004-002. Second Subsection in fourth Section In second Appendix
+      B-004-003. Third Subsection in fourth Section In second Appendix
+      B-004-004. Fourth Subsection in fourth Section In second Appendix
+      B-004-005. Fifth Subsection in fourth Section In second Appendix
+      B-004-006. Sixth Subsection in fourth Section In second Appendix
+      B-004-007. Seventh Subsection in fourth Section In second Appendix
+      B-004-008. Eighth Subsection in fourth Section In second Appendix
+    
+  
+  
+    C. Third Appendix
+    
+      C-001. First Section In third Appendix
+      C-001-001. First Subsection in first Section In third Appendix
+    
+  
+  
+    D. Fourth Appendix
+    
+      D-001. First Section In fourth Appendix
+      D-001-001. First Subsection in first Section In fourth Appendix
+    
+  
+  
+    E. Fifth Appendix
+    
+      E-001. First Section In fifth Appendix
+      E-001-001. First Subsection in first Section In fifth Appendix
+    
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering09.out b/test/tests/conf-gold/numbering/numbering09.out
new file mode 100644
index 0000000..a410a29
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering09.out
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  (1) aaa
+(2) bbb
+(3) ccc
+(4) ddd
+(5) eee
+(6) fff
+(7) ggg
+(8) hhh
+(9) iii
+(10) jjj
+(11) kkk
+(12) lll
+(13) mmm
+(14) nnn
+(15) ooo
+(16) ppp
+(17) qqq
+(18) rrr
+(19) sss
+(20) ttt
+(21) uuu
+(22) vvv
+(23) www
+(24) xxx
+(25) yyy
+(26) aab
+(27) bbb
+(28) ccb
+(29) ddb
+(30) eeb
+(31) ffb
+(32) ggb
+(33) hhb
+(34) iib
+(35) jjb
+(36) kkb
+(37) llb
+(38) mmb
+(39) nnb
+(40) oob
+(41) ppb
+(42) qqb
+(43) rrb
+(44) ssb
+(45) ttb
+(46) uub
+(47) vvb
+(48) wwb
+(49) xxb
+(50) yyb
+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering10.out b/test/tests/conf-gold/numbering/numbering10.out
new file mode 100644
index 0000000..94995f3
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering10.out
@@ -0,0 +1,601 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test for source tree numbering
+I. First Chapter
+I.A. First Section In first Chapter
+I.A.1. First Subsection in first Section In first Chapter
+I.A.2. Second Subsection in first Section In first Chapter
+I.A.3. Third Subsection in first Section In first Chapter
+I.A.4. Fourth Subsection in first Section In first Chapter
+I.A.5. Fifth Subsection in first Section In first Chapter
+I.B. Second Section In first Chapter
+I.B.1. First Subsection in second Section In first Chapter
+I.B.2. Second Subsection in second Section In first Chapter
+I.B.3. Third Subsection in second Section In first Chapter
+I.B.4. Fourth Subsection in second Section In first Chapter
+I.B.5. Fifth Subsection in second Section In first Chapter
+I.B.6. Sixth Subsection in second Section In first Chapter
+I.B.7. Seventh Subsection in second Section In first Chapter
+I.B.8. Eighth Subsection in second Section In first Chapter
+I.B.9. Ninth Subsection in second Section In first Chapter
+I.B.10. Tenth Subsection in second Section In first Chapter
+I.B.11. Eleventh Subsection in second Section In first Chapter
+I.B.12. Twelveth Subsection in second Section In first Chapter
+I.B.13. Thirteenth Subsection in second Section In first Chapter
+I.B.14. Fourteenth Subsection in second Section In first Chapter
+I.C. Third Section In first Chapter
+I.C.1. First Subsection in third Section In first Chapter
+I.C.2. Second Subsection in third Section In first Chapter
+I.C.3. Third Subsection in third Section In first Chapter
+I.C.4. Fourth Subsection in third Section In first Chapter
+I.C.5. Fifth Subsection in third Section In first Chapter
+I.C.6. Sixth Subsection in third Section In first Chapter
+I.C.7. Seventh Subsection in third Section In first Chapter
+I.C.8. Eighth Subsection in third Section In first Chapter
+I.C.9. Ninth Subsection in third Section In first Chapter
+I.C.10. Tenth Subsection in third Section In first Chapter
+I.C.11. Eleventh Subsection in third Section In first Chapter
+I.C.12. Twelveth Subsection in third Section In first Chapter
+I.C.13. Thirteenth Subsection in third Section In first Chapter
+I.C.14. Fourteenth Subsection in third Section In first Chapter
+I.C.15. Fifthteenth Subsection in third Section In first Chapter
+I.C.16. Sixteenth Subsection in third Section In first Chapter
+I.C.17. Seventeenth Subsection in third Section In first Chapter
+I.C.18. Eighteenth Subsection in third Section In first Chapter
+I.C.19. Nineteenth Subsection in third Section In first Chapter
+I.C.20. Twentieth Subsection in third Section In first Chapter
+I.C.21. Twenty-first Subsection in third Section In first Chapter
+I.C.22. Twenty-second Subsection in third Section In first Chapter
+I.C.23. Twenty-third Subsection in third Section In first Chapter
+I.C.24. Twenty-fourth Subsection in third Section In first Chapter
+I.C.25. Twenty-fifth Subsection in third Section In first Chapter
+I.C.26. Twenty-sixth Subsection in third Section In first Chapter
+I.C.27. Twenty-seventh Subsection in third Section In first Chapter
+I.C.28. Twenty-eighth Subsection in third Section In first Chapter
+I.C.29. Twenty-ninth Subsection in third Section In first Chapter
+I.C.30. Thirtieth Subsection in third Section In first Chapter
+I.C.31. Thirty-first Subsection in third Section In first Chapter
+I.C.32. Thirty-second Subsection in third Section In first Chapter
+I.C.33. Thirty-third Subsection in third Section In first Chapter
+I.C.34. Thirty-fourth Subsection in third Section In first Chapter
+I.C.35. Thirty-fifth Subsection in third Section In first Chapter
+I.C.36. Thirty-sixth Subsection in third Section In first Chapter
+I.C.37. Thirty-seventh Subsection in third Section In first Chapter
+I.C.38. Thirty-eighth Subsection in third Section In first Chapter
+I.C.39. Thirty-ninth Subsection in third Section In first Chapter
+I.C.40. Fortieth Subsection in third Section In first Chapter
+I.C.41. Forty-first Subsection in third Section In first Chapter
+I.C.42. Forty-second Subsection in third Section In first Chapter
+I.C.43. Forty-third Subsection in third Section In first Chapter
+I.C.44. Forty-fourth Subsection in third Section In first Chapter
+I.C.45. Forty-fifth Subsection in third Section In first Chapter
+I.C.46. Forty-sixth Subsection in third Section In first Chapter
+I.C.47. Forty-seventh Subsection in third Section In first Chapter
+I.C.48. Forty-eighth Subsection in third Section In first Chapter
+I.C.49. Forty-ninth Subsection in third Section In first Chapter
+I.D. Fourth Section In first Chapter
+I.D.1. First Subsection in fourth Section In first Chapter
+I.D.2. Second Subsection in fourth Section In first Chapter
+I.D.3. Third Subsection in fourth Section In first Chapter
+I.D.4. Fourth Subsection in fourth Section In first Chapter
+I.D.5. Fifth Subsection in fourth Section In first Chapter
+I.D.6. Sixth Subsection in fourth Section In first Chapter
+I.D.7. Seventh Subsection in fourth Section In first Chapter
+I.D.8. Eighth Subsection in fourth Section In first Chapter
+I.D.9. Ninth Subsection in fourth Section In first Chapter
+I.D.10. Tenth Subsection in fourth Section In first Chapter
+I.D.11. Eleventh Subsection in fourth Section In first Chapter
+I.D.12. Twelveth Subsection in fourth Section In first Chapter
+I.D.13. Thirteenth Subsection in fourth Section In first Chapter
+I.D.14. Fourteenth Subsection in fourth Section In first Chapter
+II. Second Chapter
+II.A. First Section In second Chapter
+II.A.1. First Subsection in first Section In second Chapter
+II.A.2. Second Subsection in first Section In second Chapter
+II.A.3. Third Subsection in first Section In second Chapter
+II.A.4. Fourth Subsection in first Section In second Chapter
+II.A.5. Fifth Subsection in first Section In second Chapter
+II.B. Second Section In second Chapter
+II.B.1. First Subsection in second Section In second Chapter
+II.B.2. Second Subsection in second Section In second Chapter
+II.B.3. Third Subsection in second Section In second Chapter
+II.B.4. Fourth Subsection in second Section In second Chapter
+II.B.5. Fifth Subsection in second Section In second Chapter
+II.B.6. Sixth Subsection in second Section In second Chapter
+II.B.7. Seventh Subsection in second Section In second Chapter
+II.B.8. Eighth Subsection in second Section In second Chapter
+II.B.9. Ninth Subsection in second Section In second Chapter
+II.B.10. Tenth Subsection in second Section In second Chapter
+II.B.11. Eleventh Subsection in second Section In second Chapter
+II.B.12. Twelveth Subsection in second Section In second Chapter
+II.B.13. Thirteenth Subsection in second Section In second Chapter
+II.B.14. Fourteenth Subsection in second Section In second Chapter
+II.C. Third Section In second Chapter
+II.C.1. First Subsection in third Section In second Chapter
+II.C.2. Second Subsection in third Section In second Chapter
+II.C.3. Third Subsection in third Section In second Chapter
+II.C.4. Fourth Subsection in third Section In second Chapter
+II.C.5. Fifth Subsection in third Section In second Chapter
+II.C.6. Sixth Subsection in third Section In second Chapter
+II.C.7. Seventh Subsection in third Section In second Chapter
+II.C.8. Eighth Subsection in third Section In second Chapter
+II.C.9. Ninth Subsection in third Section In second Chapter
+II.C.10. Tenth Subsection in third Section In second Chapter
+II.C.11. Eleventh Subsection in third Section In second Chapter
+II.C.12. Twelveth Subsection in third Section In second Chapter
+II.C.13. Thirteenth Subsection in third Section In second Chapter
+II.C.14. Fourteenth Subsection in third Section In second Chapter
+II.C.15. Fifthteenth Subsection in third Section In second Chapter
+II.C.16. Sixteenth Subsection in third Section In second Chapter
+II.C.17. Seventeenth Subsection in third Section In second Chapter
+II.C.18. Eighteenth Subsection in third Section In second Chapter
+II.C.19. Nineteenth Subsection in third Section In second Chapter
+II.C.20. Twentieth Subsection in third Section In second Chapter
+II.C.21. Twenty-first Subsection in third Section In second Chapter
+II.C.22. Twenty-second Subsection in third Section In second Chapter
+II.C.23. Twenty-third Subsection in third Section In second Chapter
+II.C.24. Twenty-fourth Subsection in third Section In second Chapter
+II.C.25. Twenty-fifth Subsection in third Section In second Chapter
+II.C.26. Twenty-sixth Subsection in third Section In second Chapter
+II.C.27. Twenty-seventh Subsection in third Section In second Chapter
+II.C.28. Twenty-eighth Subsection in third Section In second Chapter
+II.C.29. Twenty-ninth Subsection in third Section In second Chapter
+II.C.30. Thirtieth Subsection in third Section In second Chapter
+II.C.31. Thirty-first Subsection in third Section In second Chapter
+II.C.32. Thirty-second Subsection in third Section In second Chapter
+II.C.33. Thirty-third Subsection in third Section In second Chapter
+II.C.34. Thirty-fourth Subsection in third Section In second Chapter
+II.C.35. Thirty-fifth Subsection in third Section In second Chapter
+II.C.36. Thirty-sixth Subsection in third Section In second Chapter
+II.C.37. Thirty-seventh Subsection in third Section In second Chapter
+II.C.38. Thirty-eighth Subsection in third Section In second Chapter
+II.C.39. Thirty-ninth Subsection in third Section In second Chapter
+II.C.40. Fortieth Subsection in third Section In second Chapter
+II.C.41. Forty-first Subsection in third Section In second Chapter
+II.C.42. Forty-second Subsection in third Section In second Chapter
+II.C.43. Forty-third Subsection in third Section In second Chapter
+II.C.44. Forty-fourth Subsection in third Section In second Chapter
+II.C.45. Forty-fifth Subsection in third Section In second Chapter
+II.C.46. Forty-sixth Subsection in third Section In second Chapter
+II.C.47. Forty-seventh Subsection in third Section In second Chapter
+II.C.48. Forty-eighth Subsection in third Section In second Chapter
+II.C.49. Forty-ninth Subsection in third Section In second Chapter
+II.D. Fouth Section In second Chapter
+II.D.1. First Subsection in fourth Section In second Chapter
+II.D.2. Second Subsection in fourth Section In second Chapter
+II.D.3. Third Subsection in fourth Section In second Chapter
+II.D.4. Fourth Subsection in fourth Section In second Chapter
+II.D.5. Fifth Subsection in fourth Section In second Chapter
+II.D.6. Sixth Subsection in fourth Section In second Chapter
+II.D.7. Seventh Subsection in fourth Section In second Chapter
+II.D.8. Eighth Subsection in fourth Section In second Chapter
+II.D.9. Ninth Subsection in fourth Section In second Chapter
+II.D.10. Tenth Subsection in fourth Section In second Chapter
+II.D.11. Eleventh Subsection in fourth Section In second Chapter
+II.D.12. Twelveth Subsection in fourth Section In second Chapter
+II.D.13. Thirteenth Subsection in fourth Section In second Chapter
+II.D.14. Fourteenth Subsection in fourth Section In second Chapter
+III. Third Chapter
+III.A. First Section In third Chapter
+III.A.1. First Subsection in first Section In third Chapter
+IV. Fourth Chapter
+IV.A. First Section In fourth Chapter
+IV.A.1. First Subsection in first Section In fourth Chapter
+V. Fifth Chapter
+V.A. First Section In fifth Chapter
+V.A.1. First Subsection in first Section In fifth Chapter
+VI. Sixth Chapter
+VI.A. First Section In sixth Chapter
+VI.A.1. First Subsection in first Section In sixth Chapter
+VII. Seventh Chapter
+VII.A. First Section In seventh Chapter
+VII.A.1. First Subsection in first Section In seventh Chapter
+VIII. Eighth Chapter
+VIII.A. First Section In eighth Chapter
+VIII.A.1. First Subsection in first Section In eighth Chapter
+IX. Ninth Chapter
+IX.A. First Section In ninth Chapter
+IX.A.1. First Subsection in first Section In ninth Chapter
+X. Tenth Chapter
+X.A. First Section In tenth Chapter
+X.A.1. First Subsection in first Section In tenth Chapter
+XI. Eleventh Chapter
+XI.A. First Section In eleventh Chapter
+XI.A.1. First Subsection in first Section In eleventh Chapter
+XII. Twelvth Chapter
+XII.A. First Section In twelvth Chapter
+XII.A.1. First Subsection in first Section In twelvth Chapter
+XIII. Thirteenth Chapter
+XIII.A. First Section In thirteenth Chapter
+XIII.A.1. First Subsection in first Section In thirteenth Chapter
+XIV. Fourteenth Chapter
+XIV.A. First Section In fourteenth Chapter
+XIV.A.1. First Subsection in first Section In fourteenth Chapter
+XIV.A.2. Second Subsection in first Section In fourteenth Chapter
+XIV.A.3. Third Subsection in first Section In fourteenth Chapter
+XIV.A.4. Fourth Subsection in first Section In fourteenth Chapter
+XIV.A.5. Fifth Subsection in first Section In fourteenth Chapter
+XIV.B. Second Section In fourteenth Chapter
+XIV.B.1. First Subsection in second Section In fourteenth Chapter
+XIV.B.2. Second Subsection in second Section In fourteenth Chapter
+XIV.B.3. Third Subsection in second Section In fourteenth Chapter
+XIV.B.4. Fourth Subsection in second Section In fourteenth Chapter
+XIV.B.5. Fifth Subsection in second Section In fourteenth Chapter
+XIV.B.6. Sixth Subsection in second Section In fourteenth Chapter
+XIV.B.7. Seventh Subsection in second Section In fourteenth Chapter
+XIV.B.8. Eighth Subsection in second Section In fourteenth Chapter
+XIV.B.9. Ninth Subsection in second Section In fourteenth Chapter
+XIV.B.10. Tenth Subsection in second Section In fourteenth Chapter
+XIV.B.11. Eleventh Subsection in second Section In fourteenth Chapter
+XIV.B.12. Twelveth Subsection in second Section In fourteenth Chapter
+XIV.B.13. Thirteenth Subsection in second Section In fourteenth Chapter
+XIV.B.14. Fourteenth Subsection in second Section In fourteenth Chapter
+XIV.C. Third Section In fourteenth Chapter
+XIV.C.1. First Subsection in third Section In fourteenth Chapter
+XIV.C.2. Second Subsection in third Section In fourteenth Chapter
+XIV.C.3. Third Subsection in third Section In fourteenth Chapter
+XIV.C.4. Fourth Subsection in third Section In fourteenth Chapter
+XIV.C.5. Fifth Subsection in third Section In fourteenth Chapter
+XIV.C.6. Sixth Subsection in third Section In fourteenth Chapter
+XIV.C.7. Seventh Subsection in third Section In fourteenth Chapter
+XIV.C.8. Eighth Subsection in third Section In fourteenth Chapter
+XIV.C.9. Ninth Subsection in third Section In fourteenth Chapter
+XIV.C.10. Tenth Subsection in third Section In fourteenth Chapter
+XIV.C.11. Eleventh Subsection in third Section In fourteenth Chapter
+XIV.C.12. Twelveth Subsection in third Section In fourteenth Chapter
+XIV.C.13. Thirteenth Subsection in third Section In fourteenth Chapter
+XIV.C.14. Fourteenth Subsection in third Section In fourteenth Chapter
+XIV.C.15. Fifthteenth Subsection in third Section In fourteenth Chapter
+XIV.C.16. Sixteenth Subsection in third Section In fourteenth Chapter
+XIV.C.17. Seventeenth Subsection in third Section In fourteenth Chapter
+XIV.C.18. Eighteenth Subsection in third Section In fourteenth Chapter
+XIV.C.19. Nineteenth Subsection in third Section In fourteenth Chapter
+XIV.C.20. Twentieth Subsection in third Section In fourteenth Chapter
+XIV.C.21. Twenty-first Subsection in third Section In fourteenth Chapter
+XIV.C.22. Twenty-second Subsection in third Section In fourteenth Chapter
+XIV.C.23. Twenty-third Subsection in third Section In fourteenth Chapter
+XIV.C.24. Twenty-fourth Subsection in third Section In fourteenth Chapter
+XIV.C.25. Twenty-fifth Subsection in third Section In fourteenth Chapter
+XIV.C.26. Twenty-sixth Subsection in third Section In fourteenth Chapter
+XIV.C.27. Twenty-seventh Subsection in third Section In fourteenth Chapter
+XIV.C.28. Twenty-eighth Subsection in third Section In fourteenth Chapter
+XIV.C.29. Twenty-ninth Subsection in third Section In fourteenth Chapter
+XIV.C.30. Thirtieth Subsection in third Section In fourteenth Chapter
+XIV.C.31. Thirty-first Subsection in third Section In fourteenth Chapter
+XIV.C.32. Thirty-second Subsection in third Section In fourteenth Chapter
+XIV.C.33. Thirty-third Subsection in third Section In fourteenth Chapter
+XIV.C.34. Thirty-fourth Subsection in third Section In fourteenth Chapter
+XIV.C.35. Thirty-fifth Subsection in third Section In fourteenth Chapter
+XIV.C.36. Thirty-sixth Subsection in third Section In fourteenth Chapter
+XIV.C.37. Thirty-seventh Subsection in third Section In fourteenth Chapter
+XIV.C.38. Thirty-eighth Subsection in third Section In fourteenth Chapter
+XIV.C.39. Thirty-ninth Subsection in third Section In fourteenth Chapter
+XIV.C.40. Fortieth Subsection in third Section In fourteenth Chapter
+XIV.C.41. Forty-first Subsection in third Section In fourteenth Chapter
+XIV.C.42. Forty-second Subsection in third Section In fourteenth Chapter
+XIV.C.43. Forty-third Subsection in third Section In fourteenth Chapter
+XIV.C.44. Forty-fourth Subsection in third Section In fourteenth Chapter
+XIV.C.45. Forty-fifth Subsection in third Section In fourteenth Chapter
+XIV.C.46. Forty-sixth Subsection in third Section In fourteenth Chapter
+XIV.C.47. Forty-seventh Subsection in third Section In fourteenth Chapter
+XIV.C.48. Forty-eighth Subsection in third Section In fourteenth Chapter
+XIV.C.49. Forty-ninth Subsection in third Section In fourteenth Chapter
+XIV.D. Fourth Section In fourteenth Chapter
+XIV.D.1. First Subsection in fourth Section In fourteenth Chapter
+XIV.D.2. Second Subsection in fourth Section In fourteenth Chapter
+XIV.D.3. Third Subsection in fourth Section In fourteenth Chapter
+XIV.D.4. Fourth Subsection in fourth Section In fourteenth Chapter
+XIV.D.5. Fifth Subsection in fourth Section In fourteenth Chapter
+XIV.D.6. Sixth Subsection in fourth Section In fourteenth Chapter
+XIV.D.7. Seventh Subsection in fourth Section In fourteenth Chapter
+XIV.D.8. Eighth Subsection in fourth Section In fourteenth Chapter
+XIV.D.9. Ninth Subsection in fourth Section In fourteenth Chapter
+XIV.D.10. Tenth Subsection in fourth Section In fourteenth Chapter
+XIV.D.11. Eleventh Subsection in fourth Section In fourteenth Chapter
+XIV.D.12. Twelveth Subsection in fourth Section In fourteenth Chapter
+XIV.D.13. Thirteenth Subsection in fourth Section In fourteenth Chapter
+XIV.D.14. Fourteenth Subsection in fourth Section In fourteenth Chapter
+A. First Appendix
+A.1. First Section In first Appendix
+A.1.i. First Subsection in first Section In first Appendix
+A.1.ii. Second Subsection in first Section In first Appendix
+A.1.iii. Third Subsection in first Section In first Appendix
+A.1.iv. Fourth Subsection in first Section In first Appendix
+A.1.v. Fifth Subsection in first Section In first Appendix
+A.2. Second Section In first Appendix
+A.2.i. First Subsection in second Section In first Appendix
+A.2.ii. Second Subsection in second Section In first Appendix
+A.2.iii. Third Subsection in second Section In first Appendix
+A.2.iv. Fourth Subsection in second Section In first Appendix
+A.2.v. Fifth Subsection in second Section In first Appendix
+A.2.vi. Sixth Subsection in second Section In first Appendix
+A.2.vii. Seventh Subsection in second Section In first Appendix
+A.2.viii. Eighth Subsection in second Section In first Appendix
+A.2.ix. Ninth Subsection in second Section In first Appendix
+A.2.x. Tenth Subsection in second Section In first Appendix
+A.2.xi. Eleventh Subsection in second Section In first Appendix
+A.2.xii. Twelveth Subsection in second Section In first Appendix
+A.2.xiii. Thirteenth Subsection in second Section In first Appendix
+A.2.xiv. Fourteenth Subsection in second Section In first Appendix
+A.3. Third Section In first Appendix
+A.3.i. First Subsection in third Section In first Appendix
+A.3.ii. Second Subsection in third Section In first Appendix
+A.3.iii. Third Subsection in third Section In first Appendix
+A.3.iv. Fourth Subsection in third Section In first Appendix
+A.3.v. Fifth Subsection in third Section In first Appendix
+A.3.vi. Sixth Subsection in third Section In first Appendix
+A.3.vii. Seventh Subsection in third Section In first Appendix
+A.3.viii. Eighth Subsection in third Section In first Appendix
+A.3.ix. Ninth Subsection in third Section In first Appendix
+A.3.x. Tenth Subsection in third Section In first Appendix
+A.3.xi. Eleventh Subsection in third Section In first Appendix
+A.3.xii. Twelveth Subsection in third Section In first Appendix
+A.3.xiii. Thirteenth Subsection in third Section In first Appendix
+A.3.xiv. Fourteenth Subsection in third Section In first Appendix
+A.3.xv. Fifthteenth Subsection in third Section In first Appendix
+A.3.xvi. Sixteenth Subsection in third Section In first Appendix
+A.3.xvii. Seventeenth Subsection in third Section In first Appendix
+A.3.xviii. Eighteenth Subsection in third Section In first Appendix
+A.3.xix. Nineteenth Subsection in third Section In first Appendix
+A.3.xx. Twentieth Subsection in third Section In first Appendix
+A.3.xxi. Twenty-first Subsection in third Section In first Appendix
+A.3.xxii. Twenty-second Subsection in third Section In first Appendix
+A.3.xxiii. Twenty-third Subsection in third Section In first Appendix
+A.3.xxiv. Twenty-fourth Subsection in third Section In first Appendix
+A.3.xxv. Twenty-fifth Subsection in third Section In first Appendix
+A.3.xxvi. Twenty-sixth Subsection in third Section In first Appendix
+A.3.xxvii. Twenty-seventh Subsection in third Section In first Appendix
+A.3.xxviii. Twenty-eighth Subsection in third Section In first Appendix
+A.3.xxix. Twenty-ninth Subsection in third Section In first Appendix
+A.3.xxx. Thirtieth Subsection in third Section In first Appendix
+A.3.xxxi. Thirty-first Subsection in third Section In first Appendix
+A.3.xxxii. Thirty-second Subsection in third Section In first Appendix
+A.3.xxxiii. Thirty-third Subsection in third Section In first Appendix
+A.3.xxxiv. Thirty-fourth Subsection in third Section In first Appendix
+A.3.xxxv. Thirty-fifth Subsection in third Section In first Appendix
+A.3.xxxvi. Thirty-sixth Subsection in third Section In first Appendix
+A.3.xxxvii. Thirty-seventh Subsection in third Section In first Appendix
+A.3.xxxviii. Thirty-eighth Subsection in third Section In first Appendix
+A.3.xxxix. Thirty-ninth Subsection in third Section In first Appendix
+A.3.xl. Fortieth Subsection in third Section In first Appendix
+A.3.xli. Forty-first Subsection in third Section In first Appendix
+A.3.xlii. Forty-second Subsection in third Section In first Appendix
+A.3.xliii. Forty-third Subsection in third Section In first Appendix
+A.3.xliv. Forty-fourth Subsection in third Section In first Appendix
+A.3.xlv. Forty-fifth Subsection in third Section In first Appendix
+A.3.xlvi. Forty-sixth Subsection in third Section In first Appendix
+A.3.xlvii. Forty-seventh Subsection in third Section In first Appendix
+A.3.xlviii. Forty-eighth Subsection in third Section In first Appendix
+A.3.xlix. Forty-ninth Subsection in third Section In first Appendix
+A.4. Fourth Section In first Appendix
+A.4.i. First Subsection in fourth Section In first Appendix
+A.4.ii. Second Subsection in fourth Section In first Appendix
+A.4.iii. Third Subsection in fourth Section In first Appendix
+A.4.iv. Fourth Subsection in fourth Section In first Appendix
+A.4.v. Fifth Subsection in fourth Section In first Appendix
+A.4.vi. Sixth Subsection in fourth Section In first Appendix
+A.4.vii. Seventh Subsection in fourth Section In first Appendix
+A.4.viii. Eighth Subsection in fourth Section In first Appendix
+A.4.ix. Ninth Subsection in fourth Section In first Appendix
+A.4.x. Tenth Subsection in fourth Section In first Appendix
+A.4.xi. Eleventh Subsection in fourth Section In first Appendix
+A.4.xii. Twelveth Subsection in fourth Section In first Appendix
+A.4.xiii. Thirteenth Subsection in fourth Section In first Appendix
+A.4.xiv. Fourteenth Subsection in fourth Section In first Appendix
+B. Second Appendix
+B.1. First Section In second Appendix
+B.1.i. First Subsection in first Section In second Appendix
+B.1.ii. Second Subsection in first Section In second Appendix
+B.1.iii. Third Subsection in first Section In second Appendix
+B.1.iv. Fourth Subsection in first Section In second Appendix
+B.1.v. Fifth Subsection in first Section In second Appendix
+B.2. Second Section In second Appendix
+B.2.i. First Subsection in second Section In second Appendix
+B.2.ii. Second Subsection in second Section In second Appendix
+B.2.iii. Third Subsection in second Section In second Appendix
+B.2.iv. Fourth Subsection in second Section In second Appendix
+B.2.v. Fifth Subsection in second Section In second Appendix
+B.2.vi. Sixth Subsection in second Section In second Appendix
+B.2.vii. Seventh Subsection in second Section In second Appendix
+B.2.viii. Eighth Subsection in second Section In second Appendix
+B.2.ix. Ninth Subsection in second Section In second Appendix
+B.2.x. Tenth Subsection in second Section In second Appendix
+B.2.xi. Eleventh Subsection in second Section In second Appendix
+B.2.xii. Twelveth Subsection in second Section In second Appendix
+B.2.xiii. Thirteenth Subsection in second Section In second Appendix
+B.2.xiv. Fourteenth Subsection in second Section In second Appendix
+B.3. Third Section In second Appendix
+B.3.i. First Subsection in third Section In second Appendix
+B.3.ii. Second Subsection in third Section In second Appendix
+B.3.iii. Third Subsection in third Section In second Appendix
+B.3.iv. Fourth Subsection in third Section In second Appendix
+B.3.v. Fifth Subsection in third Section In second Appendix
+B.3.vi. Sixth Subsection in third Section In second Appendix
+B.3.vii. Seventh Subsection in third Section In second Appendix
+B.3.viii. Eighth Subsection in third Section In second Appendix
+B.3.ix. Ninth Subsection in third Section In second Appendix
+B.3.x. Tenth Subsection in third Section In second Appendix
+B.3.xi. Eleventh Subsection in third Section In second Appendix
+B.3.xii. Twelveth Subsection in third Section In second Appendix
+B.3.xiii. Thirteenth Subsection in third Section In second Appendix
+B.3.xiv. Fourteenth Subsection in third Section In second Appendix
+B.3.xv. Fifthteenth Subsection in third Section In second Appendix
+B.3.xvi. Sixteenth Subsection in third Section In second Appendix
+B.3.xvii. Seventeenth Subsection in third Section In second Appendix
+B.3.xviii. Eighteenth Subsection in third Section In second Appendix
+B.3.xix. Nineteenth Subsection in third Section In second Appendix
+B.3.xx. Twentieth Subsection in third Section In second Appendix
+B.3.xxi. Twenty-first Subsection in third Section In second Appendix
+B.3.xxii. Twenty-second Subsection in third Section In second Appendix
+B.3.xxiii. Twenty-third Subsection in third Section In second Appendix
+B.3.xxiv. Twenty-fourth Subsection in third Section In second Appendix
+B.3.xxv. Twenty-fifth Subsection in third Section In second Appendix
+B.3.xxvi. Twenty-sixth Subsection in third Section In second Appendix
+B.3.xxvii. Twenty-seventh Subsection in third Section In second Appendix
+B.3.xxviii. Twenty-eighth Subsection in third Section In second Appendix
+B.3.xxix. Twenty-ninth Subsection in third Section In second Appendix
+B.3.xxx. Thirtieth Subsection in third Section In second Appendix
+B.3.xxxi. Thirty-first Subsection in third Section In second Appendix
+B.3.xxxii. Thirty-second Subsection in third Section In second Appendix
+B.3.xxxiii. Thirty-third Subsection in third Section In second Appendix
+B.3.xxxiv. Thirty-fourth Subsection in third Section In second Appendix
+B.3.xxxv. Thirty-fifth Subsection in third Section In second Appendix
+B.3.xxxvi. Thirty-sixth Subsection in third Section In second Appendix
+B.3.xxxvii. Thirty-seventh Subsection in third Section In second Appendix
+B.3.xxxviii. Thirty-eighth Subsection in third Section In second Appendix
+B.3.xxxix. Thirty-ninth Subsection in third Section In second Appendix
+B.3.xl. Fortieth Subsection in third Section In second Appendix
+B.3.xli. Forty-first Subsection in third Section In second Appendix
+B.3.xlii. Forty-second Subsection in third Section In second Appendix
+B.3.xliii. Forty-third Subsection in third Section In second Appendix
+B.3.xliv. Forty-fourth Subsection in third Section In second Appendix
+B.3.xlv. Forty-fifth Subsection in third Section In second Appendix
+B.3.xlvi. Forty-sixth Subsection in third Section In second Appendix
+B.3.xlvii. Forty-seventh Subsection in third Section In second Appendix
+B.3.xlviii. Forty-eighth Subsection in third Section In second Appendix
+B.3.xlix. Forty-ninth Subsection in third Section In second Appendix
+B.3.l. Fiftieth Subsection in third Section In second Appendix
+B.3.li. Fifty-first Subsection in third Section In second Appendix
+B.3.lii. Fifty-second Subsection in third Section In second Appendix
+B.3.liii. Fifty-third Subsection in third Section In second Appendix
+B.3.liv. Fifty-fourth Subsection in third Section In second Appendix
+B.3.lv. Fifty-fifth Subsection in third Section In second Appendix
+B.3.lvi. Fifty-sixth Subsection in third Section In second Appendix
+B.3.lvii. Fifty-seventh Subsection in third Section In second Appendix
+B.3.lviii. Fifty-eighth Subsection in third Section In second Appendix
+B.3.lix. Fifty-ninth Subsection in third Section In second Appendix
+B.4. Fourth Section In second Appendix
+B.4.i. First Subsection in fourth Section In second Appendix
+B.4.ii. Second Subsection in fourth Section In second Appendix
+B.4.iii. Third Subsection in fourth Section In second Appendix
+B.4.iv. Fourth Subsection in fourth Section In second Appendix
+B.4.v. Fifth Subsection in fourth Section In second Appendix
+B.4.vi. Sixth Subsection in fourth Section In second Appendix
+B.4.vii. Seventh Subsection in fourth Section In second Appendix
+B.4.viii. Eighth Subsection in fourth Section In second Appendix
+B.4.ix. Ninth Subsection in fourth Section In second Appendix
+B.4.x. Tenth Subsection in fourth Section In second Appendix
+B.4.xi. Eleventh Subsection in fourth Section In second Appendix
+B.4.xii. Twelveth Subsection in fourth Section In second Appendix
+B.4.xiii. Thirteenth Subsection in fourth Section In second Appendix
+B.4.xiv. Fourteenth Subsection in fourth Section In second Appendix
+C. Third Appendix
+C.1. First Section In third Appendix
+C.1.i. First Subsection in first Section In third Appendix
+D. Fourth Appendix
+D.1. First Section In fourth Appendix
+D.1.i. First Subsection in first Section In fourth Appendix
+E. Fifth Appendix
+E.1. First Section In fifth Appendix
+E.1.i. First Subsection in first Section In fifth Appendix
+F. Sixth Appendix
+F.1. First Section In sixth Appendix
+F.1.i. First Subsection in first Section In sixth Appendix
+G. Seventh Appendix
+G.1. First Section In seventh Appendix
+G.1.i. First Subsection in first Section In seventh Appendix
+H. Eighth Appendix
+H.1. First Section In eighth Appendix
+H.1.i. First Subsection in first Section In eighth Appendix
+I. Ninth Appendix
+I.1. First Section In ninth Appendix
+I.1.i. First Subsection in first Section In ninth Appendix
+J. Tenth Appendix
+J.1. First Section In tenth Appendix
+J.1.i. First Subsection in first Section In tenth Appendix
+K. Eleventh Appendix
+K.1. First Section In eleventh Appendix
+K.1.i. First Subsection in first Section In eleventh Appendix
+L. Twelvth Appendix
+L.1. First Section In twelvth Appendix
+L.1.i. First Subsection in first Section In twelvth Appendix
+M. Thirteenth Appendix
+M.1. First Section In thirteenth Appendix
+M.1.i. First Subsection in first Section In thirteenth Appendix
+N. Fourteenth Appendix
+N.1. First Section In fourteenth Appendix
+N.1.i. First Subsection in first Section In fourteenth Appendix
+N.1.ii. Second Subsection in first Section In fourteenth Appendix
+N.1.iii. Third Subsection in first Section In fourteenth Appendix
+N.1.iv. Fourth Subsection in first Section In fourteenth Appendix
+N.1.v. Fifth Subsection in first Section In fourteenth Appendix
+N.2. Second Section In fourteenth Appendix
+N.2.i. First Subsection in second Section In fourteenth Appendix
+N.2.ii. Second Subsection in second Section In fourteenth Appendix
+N.2.iii. Third Subsection in second Section In fourteenth Appendix
+N.2.iv. Fourth Subsection in second Section In fourteenth Appendix
+N.2.v. Fifth Subsection in second Section In fourteenth Appendix
+N.2.vi. Sixth Subsection in second Section In fourteenth Appendix
+N.2.vii. Seventh Subsection in second Section In fourteenth Appendix
+N.2.viii. Eighth Subsection in second Section In fourteenth Appendix
+N.2.ix. Ninth Subsection in second Section In fourteenth Appendix
+N.2.x. Tenth Subsection in second Section In fourteenth Appendix
+N.2.xi. Eleventh Subsection in second Section In fourteenth Appendix
+N.2.xii. Twelveth Subsection in second Section In fourteenth Appendix
+N.2.xiii. Thirteenth Subsection in second Section In fourteenth Appendix
+N.2.xiv. Fourteenth Subsection in second Section In fourteenth Appendix
+N.3. Third Section In fourteenth Appendix
+N.3.i. First Subsection in third Section In fourteenth Appendix
+N.3.ii. Second Subsection in third Section In fourteenth Appendix
+N.3.iii. Third Subsection in third Section In fourteenth Appendix
+N.3.iv. Fourth Subsection in third Section In fourteenth Appendix
+N.3.v. Fifth Subsection in third Section In fourteenth Appendix
+N.3.vi. Sixth Subsection in third Section In fourteenth Appendix
+N.3.vii. Seventh Subsection in third Section In fourteenth Appendix
+N.3.viii. Eighth Subsection in third Section In fourteenth Appendix
+N.3.ix. Ninth Subsection in third Section In fourteenth Appendix
+N.3.x. Tenth Subsection in third Section In fourteenth Appendix
+N.3.xi. Eleventh Subsection in third Section In fourteenth Appendix
+N.3.xii. Twelveth Subsection in third Section In fourteenth Appendix
+N.3.xiii. Thirteenth Subsection in third Section In fourteenth Appendix
+N.3.xiv. Fourteenth Subsection in third Section In fourteenth Appendix
+N.3.xv. Fifthteenth Subsection in third Section In fourteenth Appendix
+N.3.xvi. Sixteenth Subsection in third Section In fourteenth Appendix
+N.3.xvii. Seventeenth Subsection in third Section In fourteenth Appendix
+N.3.xviii. Eighteenth Subsection in third Section In fourteenth Appendix
+N.3.xix. Nineteenth Subsection in third Section In fourteenth Appendix
+N.3.xx. Twentieth Subsection in third Section In fourteenth Appendix
+N.3.xxi. Twenty-first Subsection in third Section In fourteenth Appendix
+N.3.xxii. Twenty-second Subsection in third Section In fourteenth Appendix
+N.3.xxiii. Twenty-third Subsection in third Section In fourteenth Appendix
+N.3.xxiv. Twenty-fourth Subsection in third Section In fourteenth Appendix
+N.3.xxv. Twenty-fifth Subsection in third Section In fourteenth Appendix
+N.3.xxvi. Twenty-sixth Subsection in third Section In fourteenth Appendix
+N.3.xxvii. Twenty-seventh Subsection in third Section In fourteenth Appendix
+N.3.xxviii. Twenty-eighth Subsection in third Section In fourteenth Appendix
+N.3.xxix. Twenty-ninth Subsection in third Section In fourteenth Appendix
+N.3.xxx. Thirtieth Subsection in third Section In fourteenth Appendix
+N.3.xxxi. Thirty-first Subsection in third Section In fourteenth Appendix
+N.3.xxxii. Thirty-second Subsection in third Section In fourteenth Appendix
+N.3.xxxiii. Thirty-third Subsection in third Section In fourteenth Appendix
+N.3.xxxiv. Thirty-fourth Subsection in third Section In fourteenth Appendix
+N.3.xxxv. Thirty-fifth Subsection in third Section In fourteenth Appendix
+N.3.xxxvi. Thirty-sixth Subsection in third Section In fourteenth Appendix
+N.3.xxxvii. Thirty-seventh Subsection in third Section In fourteenth Appendix
+N.3.xxxviii. Thirty-eighth Subsection in third Section In fourteenth Appendix
+N.3.xxxix. Thirty-ninth Subsection in third Section In fourteenth Appendix
+N.3.xl. Fortieth Subsection in third Section In fourteenth Appendix
+N.3.xli. Forty-first Subsection in third Section In fourteenth Appendix
+N.3.xlii. Forty-second Subsection in third Section In fourteenth Appendix
+N.3.xliii. Forty-third Subsection in third Section In fourteenth Appendix
+N.3.xliv. Forty-fourth Subsection in third Section In fourteenth Appendix
+N.3.xlv. Forty-fifth Subsection in third Section In fourteenth Appendix
+N.3.xlvi. Forty-sixth Subsection in third Section In fourteenth Appendix
+N.3.xlvii. Forty-seventh Subsection in third Section In fourteenth Appendix
+N.3.xlviii. Forty-eighth Subsection in third Section In fourteenth Appendix
+N.3.xlix. Forty-ninth Subsection in third Section In fourteenth Appendix
+N.4. Fourth Section In fourteenth Appendix
+N.4.i. First Subsection in fourth Section In fourteenth Appendix
+N.4.ii. Second Subsection in fourth Section In fourteenth Appendix
+N.4.iii. Third Subsection in fourth Section In fourteenth Appendix
+N.4.iv. Fourth Subsection in fourth Section In fourteenth Appendix
+N.4.v. Fifth Subsection in fourth Section In fourteenth Appendix
+N.4.vi. Sixth Subsection in fourth Section In fourteenth Appendix
+N.4.vii. Seventh Subsection in fourth Section In fourteenth Appendix
+N.4.viii. Eighth Subsection in fourth Section In fourteenth Appendix
+N.4.ix. Ninth Subsection in fourth Section In fourteenth Appendix
+N.4.x. Tenth Subsection in fourth Section In fourteenth Appendix
+N.4.xi. Eleventh Subsection in fourth Section In fourteenth Appendix
+N.4.xii. Twelveth Subsection in fourth Section In fourteenth Appendix
+N.4.xiii. Thirteenth Subsection in fourth Section In fourteenth Appendix
+N.4.xiv. Fourteenth Subsection in fourth Section In fourteenth Appendix
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering11.out b/test/tests/conf-gold/numbering/numbering11.out
new file mode 100644
index 0000000..0a21b3a
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering11.out
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+  
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+    (4) ddd
+    (5) eee
+    (6) fff
+    (7) ggg
+    (8) hhh
+    (9) iii
+    (10) jjj
+    (11) kkk
+    (12) lll
+    (13) mmm
+    (14) nnn
+    (15) ooo
+    (16) ppp
+    (17) qqq
+    (18) rrr
+    (19) sss
+    (20) ttt
+    (21) uuu
+    (22) vvv
+    (23) www
+    (24) xxx
+    (25) yyy
+    (26) aab
+    (27) bbb
+    (28) ccb
+    (29) ddb
+    (30) eeb
+    (31) ffb
+    (32) ggb
+    (33) hhb
+    (34) iib
+    (35) jjb
+    (36) kkb
+    (37) llb
+    (38) mmb
+    (39) nnb
+    (40) oob
+    (41) ppb
+    (42) qqb
+    (43) rrb
+    (44) ssb
+    (45) ttb
+    (46) uub
+    (47) vvb
+    (48) wwb
+    (49) xxb
+    (50) yyb
+    (51) aac
+    (52) bbc
+    (53) ccc
+    (54) ddc
+    (55) eec
+    (56) ffc
+    (57) ggc
+    (58) hhc
+    (59) iic
+    (60) jjc
+    (61) kkc
+    (62) llc
+    (63) mmc
+    (64) nnc
+    (65) ooc
+    (66) ppc
+    (67) qqc
+    (68) rrc
+    (69) ssc
+    (70) ttc
+    (71) uuc
+    (72) vvc
+    (73) wwc
+    (74) xxc
+    (75) yyc
+    (76) aad
+    (77) bbd
+    (78) ccd
+    (79) ddd
+    (80) eed
+    (81) ffd
+    (82) ggd
+    (83) hhd
+    (84) iid
+    (85) jjd
+    (86) kkd
+    (87) lld
+    (88) mmd
+    (89) nnd
+    (90) ood
+    (91) ppd
+    (92) qqd
+    (93) rrd
+    (94) ssd
+    (95) ttd
+    (96) uud
+    (97) vvd
+    (98) wwd
+    (99) xxd
+    (1,00) yyd
+    (1,01) aae
+    (1,02) bbe
+    (1,03) cce
+    (1,04) dde
+    (1,05) eee
+    (1,06) ffe
+    (1,07) gge
+    (1,08) hhe
+    (1,09) iie
+    (1,10) jje
+    (1,11) kke
+    (1,12) lle
+    (1,13) mme
+    (1,14) nne
+    (1,15) ooe
+    (1,16) ppe
+    (1,17) qqe
+    (1,18) rre
+    (1,19) sse
+    (1,20) tte
+    (1,21) uue
+    (1,22) vve
+    (1,23) wwe
+    (1,24) xxe
+    (1,25) yye
+    (1,26) aaf
+    (1,27) bbf
+    (1,28) ccf
+    (1,29) ddf
+    (1,30) eef
+    (1,31) fff
+    (1,32) ggf
+    (1,33) hhf
+    (1,34) iif
+    (1,35) jjf
+    (1,36) kkf
+    (1,37) llf
+    (1,38) mmf
+    (1,39) nnf
+    (1,40) oof
+    (1,41) ppf
+    (1,42) qqf
+    (1,43) rrf
+    (1,44) ssf
+    (1,45) ttf
+    (1,46) uuf
+    (1,47) vvf
+    (1,48) wwf
+    (1,49) xxf
+    (1,50) yyf
+    (1,51) aag
+    (1,52) bbg
+    (1,53) ccg
+    (1,54) ddg
+    (1,55) eeg
+    (1,56) ffg
+    (1,57) ggg
+    (1,58) hhg
+    (1,59) iig
+    (1,60) jjg
+    (1,61) kkg
+    (1,62) llg
+    (1,63) mmg
+    (1,64) nng
+    (1,65) oog
+    (1,66) ppg
+    (1,67) qqg
+    (1,68) rrg
+    (1,69) ssg
+    (1,70) ttg
+    (1,71) uug
+    (1,72) vvg
+    (1,73) wwg
+    (1,74) xxg
+    (1,75) yyg
+    (1,76) aah
+    (1,77) bbh
+    (1,78) cch
+    (1,79) ddh
+    (1,80) eeh
+    (1,81) ffh
+    (1,82) ggh
+    (1,83) hhh
+    (1,84) iih
+    (1,85) jjh
+    (1,86) kkh
+    (1,87) llh
+    (1,88) mmh
+    (1,89) nnh
+    (1,90) ooh
+    (1,91) pph
+    (1,92) qqh
+    (1,93) rrh
+    (1,94) ssh
+    (1,95) tth
+    (1,96) uuh
+    (1,97) vvh
+    (1,98) wwh
+    (1,99) xxh
+    (2,00) yyh
+    (2,01) aai
+    (2,02) bbi
+    (2,03) cci
+    (2,04) ddi
+    (2,05) eei
+    (2,06) ffi
+    (2,07) ggi
+    (2,08) hhi
+    (2,09) iii
+    (2,10) jji
+    (2,11) kki
+    (2,12) lli
+    (2,13) mmi
+    (2,14) nni
+    (2,15) ooi
+    (2,16) ppi
+    (2,17) qqi
+    (2,18) rri
+    (2,19) ssi
+    (2,20) tti
+    (2,21) uui
+    (2,22) vvi
+    (2,23) wwi
+    (2,24) xxi
+    (2,25) yyi
+    (2,26) aaj
+    (2,27) bbj
+    (2,28) ccj
+    (2,29) ddj
+    (2,30) eej
+    (2,31) ffj
+    (2,32) ggj
+    (2,33) hhj
+    (2,34) iij
+    (2,35) jjj
+    (2,36) kkj
+    (2,37) llj
+    (2,38) mmj
+    (2,39) nnj
+    (2,40) ooj
+    (2,41) ppj
+    (2,42) qqj
+    (2,43) rrj
+    (2,44) ssj
+    (2,45) ttj
+    (2,46) uuj
+    (2,47) vvj
+    (2,48) wwj
+    (2,49) xxj
+    (2,50) yyj
+    (2,51) aak
+    (2,52) bbk
+    (2,53) cck
+    (2,54) ddk
+    (2,55) eek
+    (2,56) ffk
+    (2,57) ggk
+    (2,58) hhk
+    (2,59) iik
+    (2,60) jjk
+    (2,61) kkk
+    (2,62) llk
+    (2,63) mmk
+    (2,64) nnk
+    (2,65) ook
+    (2,66) ppk
+    (2,67) qqk
+    (2,68) rrk
+    (2,69) ssk
+    (2,70) ttk
+    (2,71) uuk
+    (2,72) vvk
+    (2,73) wwk
+    (2,74) xxk
+    (2,75) yyk
+    (2,76) aal
+    (2,77) bbl
+    (2,78) ccl
+    (2,79) ddl
+    (2,80) eel
+    (2,81) ffl
+    (2,82) ggl
+    (2,83) hhl
+    (2,84) iil
+    (2,85) jjl
+    (2,86) kkl
+    (2,87) lll
+    (2,88) mml
+    (2,89) nnl
+    (2,90) ool
+    (2,91) ppl
+    (2,92) qql
+    (2,93) rrl
+    (2,94) ssl
+    (2,95) ttl
+    (2,96) uul
+    (2,97) vvl
+    (2,98) wwl
+    (2,99) xxl
+    (3,00) yyl
+    (3,01) aam
+    (3,02) bbm
+    (3,03) ccm
+    (3,04) ddm
+    (3,05) eem
+    (3,06) ffm
+    (3,07) ggm
+    (3,08) hhm
+    (3,09) iim
+    (3,10) jjm
+    (3,11) kkm
+    (3,12) llm
+    (3,13) mmm
+    (3,14) nnm
+    (3,15) oom
+    (3,16) ppm
+    (3,17) qqm
+    (3,18) rrm
+    (3,19) ssm
+    (3,20) ttm
+    (3,21) uum
+    (3,22) vvm
+    (3,23) wwm
+    (3,24) xxm
+    (3,25) yym
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering12.out b/test/tests/conf-gold/numbering/numbering12.out
new file mode 100644
index 0000000..708742c
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering12.out
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (A) aaa
+    (B) bbb
+    (C) ccc
+    (D) ddd
+    (E) eee
+    (F) fff
+    (G) ggg
+    (H) hhh
+    (I) iii
+    (J) jjj
+    (K) kkk
+    (L) lll
+    (M) mmm
+    (N) nnn
+    (O) ooo
+    (P) ppp
+    (Q) qqq
+    (R) rrr
+    (S) sss
+    (T) ttt
+    (U) uuu
+  
+  
+    (A) ddd
+    (B) eee
+    (C) fff
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering13.out b/test/tests/conf-gold/numbering/numbering13.out
new file mode 100644
index 0000000..0d7bf1f
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering13.out
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (I) aaa
+    (II) bbb
+    (III) ccc
+    (IV) ddd
+    (V) eee
+    (VI) fff
+    (VII) ggg
+    (VIII) hhh
+    (IX) iii
+    (X) jjj
+    (XI) kkk
+    (XII) lll
+    (XIII) mmm
+    (XIV) nnn
+    (XV) ooo
+    (XVI) ppp
+    (XVII) qqq
+    (XVIII) rrr
+    (XIX) sss
+    (XX) ttt
+    (XXI) uuu
+  
+  
+    (I) ddd
+    (II) eee
+    (III) fff
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering14.out b/test/tests/conf-gold/numbering/numbering14.out
new file mode 100644
index 0000000..d3e6d27
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering14.out
@@ -0,0 +1,41 @@
+<out>
+  
+    &#945;aaa
+    &#946;bbb
+    &#947;ccc
+    &#948;ddd
+    &#949;eee
+    &#950;fff
+    &#951;ggg
+    &#952;hhh
+    &#953;iii
+    &#954;jjj
+    &#955;kkk
+    &#956;lll
+    &#957;mmm
+    &#958;nnn
+    &#959;ooo
+    &#960;ppp
+    &#961;qqq
+    &#962;rrr
+    &#963;sss
+    &#964;ttt
+    &#965;uuu
+    &#966;vvv
+    &#967;www
+    &#968;xxx
+    &#969;yyy
+    &#945;&#945;zzz
+    &#945;&#946;aab
+    &#945;&#947;aac
+    &#945;&#948;aad
+    &#945;&#949;aae
+    &#945;&#950;aaf
+    &#945;&#951;aag
+  
+  
+    &#945;ddd
+    &#946;eee
+    &#947;fff
+  
+</out>
diff --git a/test/tests/conf-gold/numbering/numbering17.out b/test/tests/conf-gold/numbering/numbering17.out
new file mode 100644
index 0000000..afaa9e6
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering17.out
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+  0aaa
+(I) bbb
+(II) ccc
+(III) ddd
+(IV) eee
+(V) fff
+(VI) ggg
+(VII) hhh
+(VIII) iii
+(IX) jjj
+(X) kkk
+(XLIX) lll
+(L) mmm
+(LI) nnn
+(LII) ooo
+(LIII) ppp
+(LIV) qqq
+(LV) rrr
+(LVI) sss
+(LVII) ttt
+(LVIII) uuu
+(LIX) vvv
+(LX) www
+(XCIX) xxx
+(C) yyy
+(CI) aab
+(CII) bbb
+(CIII) ccb
+(CIV) ddb
+(CV) eeb
+(CVI) ffb
+(CVII) ggb
+(CVIII) hhb
+(CIX) iib
+(CX) jjb
+(CXLIX) kkb
+(CL) llb
+(CLI) mmb
+(CLII) nnb
+(CLIII) oob
+(CLIV) ppb
+(CLV) qqb
+(CLVI) rrb
+(CLVII) ssb
+(CLVIII) ttb
+(CLIX) uub
+(CLX) vvb
+(CXCIX) wwb
+(CC) xxb
+(CCI) yyb
+(CCII) aac
+(CCIII) bbc
+(CCIV) ccc
+(CCV) ddc
+(CCVI) eec
+(CCVII) ffc
+(CCVIII) ggc
+(CCIX) hhc
+(CCX) iic
+(CCXLIX) jjc
+(CCL) kkc
+(CCLI) llc
+(CCLII) mmc
+(CCLIII) nnc
+(CCLIV) ooc
+(CCLV) ppc
+(CCLVI) qqc
+(CCLVII) rrc
+(CCLVIII) ssc
+(CCLIX) ttc
+(CCLX) uuc
+(CCXCIX) vvc
+(CCC) wwc
+(CCCI) xxc
+(CCCII) yyc
+(CCCIII) aad
+(CCCIV) bbd
+(CCCV) ccd
+(CCCVI) ddd
+(CCCVII) eed
+(CCCVIII) ffd
+(CCCIX) ggd
+(CCCX) hhd
+(CCCXLIX) iid
+(CCCL) jjd
+(CCCLI) kkd
+(CCCLII) lld
+(CCCLIII) mmd
+(CCCLIV) nnd
+(CCCLV) ood
+(CCCLVI) ppd
+(CCCLVII) qqd
+(CCCLVIII) rrd
+(CCCLIX) ssd
+(CCCLX) ttd
+(CCCXCIX) uud
+(CD) vvd
+(CDI) wwd
+(CDII) xxd
+(CDIII) yyd
+(CDIV) aae
+(CDV) bbe
+(CDVI) cce
+(CDVII) dde
+(CDVIII) eee
+(CDIX) ffe
+(CDX) gge
+(CDXLIX) hhe
+(CDL) iie
+(CDLI) jje
+(CDLII) kke
+(CDLIII) lle
+(CDLIV) mme
+(CDLV) nne
+(CDLVI) ooe
+(CDLVII) ppe
+(CDLVIII) qqe
+(CDLIX) rre
+(CDLX) sse
+(CDXCIX) tte
+(D) uue
+(DI) vve
+(DII) wwe
+(DIII) xxe
+(DIV) yye
+(DV) aaf
+(DVI) bbf
+(DVII) ccf
+(DVIII) ddf
+(DIX) eef
+(DX) fff
+(DXLIX) ggf
+(DL) hhf
+(DLI) iif
+(DLII) jjf
+(DLIII) kkf
+(DLIV) llf
+(DLV) mmf
+(DLVI) nnf
+(DLVII) oof
+(DLVIII) ppf
+(DLIX) qqf
+(DLX) rrf
+(DXCIX) ssf
+(DC) ttf
+(DCI) uuf
+(DCII) vvf
+(DCIII) wwf
+(DCIV) xxf
+(DCV) yyf
+(DCVI) aag
+(DCVII) bbg
+(DCVIII) ccg
+(DCIX) ddg
+(DCX) eeg
+(DCXLIX) ffg
+(DCL) ggg
+(DCLI) hhg
+(DCLII) iig
+(DCLIII) jjg
+(DCLIV) kkg
+(DCLV) llg
+(DCLVI) mmg
+(DCLVII) nng
+(DCLVIII) oog
+(DCLIX) ppg
+(DCLX) qqg
+(DCXCIX) rrg
+(DCC) ssg
+(DCCI) ttg
+(DCCII) uug
+(DCCIII) vvg
+(DCCIV) wwg
+(DCCV) xxg
+(DCCVI) yyg
+(DCCVII) aah
+(DCCVIII) bbh
+(DCCIX) cch
+(DCCX) ddh
+(DCCXLIX) eeh
+(DCCL) ffh
+(DCCLI) ggh
+(DCCLII) hhh
+(DCCLIII) iih
+(DCCLIV) jjh
+(DCCLV) kkh
+(DCCLVI) llh
+(DCCLVII) mmh
+(DCCLVIII) nnh
+(DCCLIX) ooh
+(DCCLX) pph
+(DCCXCIX) qqh
+(DCCC) rrh
+(DCCCI) ssh
+(DCCCII) tth
+(DCCCIII) uuh
+(DCCCIV) vvh
+(DCCCV) wwh
+(DCCCVI) xxh
+(DCCCVII) yyh
+(DCCCVIII) aai
+(DCCCIX) bbi
+(DCCCX) cci
+(DCCCXLIX) ddi
+(DCCCL) eei
+(DCCCLI) ffi
+(DCCCLII) ggi
+(DCCCLIII) hhi
+(DCCCLIV) iii
+(DCCCLV) jji
+(DCCCLVI) kki
+(DCCCLVII) lli
+(DCCCLVIII) mmi
+(DCCCLIX) nni
+(DCCCLX) ooi
+(DCCCXCIX) ppi
+(CM) qqi
+(CMI) rri
+(CMII) ssi
+(CMIII) tti
+(CMIV) uui
+(CMV) vvi
+(CMVI) wwi
+(CMVII) xxi
+(CMVIII) yyi
+(CMIX) aaj
+(CMX) bbj
+(CMXLIX) ccj
+(CML) ddj
+(CMLI) eej
+(CMLII) ffj
+(CMLIII) ggj
+(CMLIV) hhj
+(CMLV) iij
+(CMLVI) jjj
+(CMLVII) kkj
+(CMLVIII) llj
+(CMLIX) mmj
+(CMLX) nnj
+(CMXCIX) ooj
+(M) ppj
+(MI) qqj
+(MII) rrj
+(MIII) ssj
+(MIV) ttj
+(MV) uuj
+(MVI) vvj
+(MVII) wwj
+(MVIII) xxj
+(MIX) yyj
+(MX) aak
+(MXLIX) bbk
+(ML) cck
+(MLI) ddk
+(MLII) eek
+(MLIII) ffk
+(MLIV) ggk
+(MLV) hhk
+(MLVI) iik
+(MLVII) jjk
+(MLVIII) kkk
+(MLIX) llk
+(MLX) mmk
+(MXCIX) nnk
+(MC) ook
+(MCI) ppk
+(MCII) qqk
+(MCIII) rrk
+(MCIV) ssk
+(MCV) ttk
+(MCVI) uuk
+(MCVII) vvk
+(MCVIII) wwk
+(MCIX) xxk
+(MCX) yyk
+(MCXLIX) aal
+(MCL) bbl
+(MCLI) ccl
+(MCLII) ddl
+(MCLIII) eel
+(MCLIV) ffl
+(MCLV) ggl
+(MCLVI) hhl
+(MCLVII) iil
+(MCLVIII) jjl
+(MCLIX) kkl
+(MCLX) lll
+(MCXCIX) mml
+(MCC) nnl
+(MCCI) ool
+(MCCII) ppl
+(MCCIII) qql
+(MCCIV) rrl
+(MCCV) ssl
+(MCCVI) ttl
+(MCCVII) uul
+(MCCVIII) vvl
+(MCCIX) wwl
+(MCCX) xxl
+(MCCXLIX) yyl
+(MCCL) aam
+(MCCLI) bbm
+(MCCLII) ccm
+(MCCLIII) ddm
+(MCCLIV) eem
+(MCCLV) ffm
+(MCCLVI) ggm
+(MCCLVII) hhm
+(MCCLVIII) iim
+(MCCLIX) jjm
+(MCCLX) kkm
+(MCCXCIX) llm
+(MCCC) mmm
+(MCCCI) nnm
+(MCCCII) oom
+(MCCCIII) ppm
+(MCCCIV) qqm
+(MCCCV) rrm
+(MCCCVI) ssm
+(MCCCVII) ttm
+(MCCCVIII) uum
+(MCCCIX) vvm
+(MCCCX) wwm
+(MCCCXLIX) xxm
+(MCCCL) yym
+(MCCCLI) aan
+(MCCCLII) bbn
+(MCCCLIII) ccn
+(MCCCLIV) ddn
+(MCCCLV) een
+(MCCCLVI) ffn
+(MCCCLVII) ggn
+(MCCCLVIII) hhn
+(MCCCLIX) iin
+(MCCCLX) jjn
+(MCCCXCIX) kkn
+(MCD) lln
+(MCDI) mmn
+(MCDII) nnn
+(MCDIII) oon
+(MCDIV) ppn
+(MCDV) qqn
+(MCDVI) rrn
+(MCDVII) ssn
+(MCDVIII) ttn
+(MCDIX) uun
+(MCDX) vvn
+(MCDXLIX) wwn
+(MCDL) xxn
+(MCDLI) yyn
+(MCDLII) aao
+(MCDLIII) bbo
+(MCDLIV) cco
+(MCDLV) ddo
+(MCDLVI) eeo
+(MCDLVII) ffo
+(MCDLVIII) ggo
+(MCDLIX) hho
+(MCDLX) iio
+(MCDXCIX) jjo
+(MD) kko
+(MDI) llo
+(MDII) mmo
+(MDIII) nno
+(MDIV) ooo
+(MDV) ppo
+(MDVI) qqo
+(MDVII) rro
+(MDVIII) sso
+(MDIX) tto
+(MDX) uuo
+(MDXLIX) vvo
+(MDL) wwo
+(MDLI) xxo
+(MDLII) yyo
+(MDLIII) aap
+(MDLIV) bbp
+(MDLV) ccp
+(MDLVI) ddp
+(MDLVII) eep
+(MDLVIII) ffp
+(MDLIX) ggp
+(MDLX) hhp
+(MDXCIX) iip
+(MDC) jjp
+(MDCI) kkp
+(MDCII) llp
+(MDCIII) mmp
+(MDCIV) nnp
+(MDCV) oop
+(MDCVI) ppp
+(MDCVII) qqp
+(MDCVIII) rrp
+(MDCIX) ssp
+(MDCX) ttp
+(MDCXLIX) uup
+(MDCL) vvp
+(MDCLI) wwp
+(MDCLII) xxp
+(MDCLIII) yyp
+(MDCLIV) aaq
+(MDCLV) bbq
+(MDCLVI) ccq
+(MDCLVII) ddq
+(MDCLVIII) eeq
+(MDCLIX) ffq
+(MDCLX) ggq
+(MDCXCIX) hhq
+(MDCC) iiq
+(MDCCI) jjq
+(MDCCII) kkq
+(MDCCIII) llq
+(MDCCIV) mmq
+(MDCCV) nnq
+(MDCCVI) ooq
+(MDCCVII) ppq
+(MDCCVIII) qqq
+(MDCCIX) rrq
+(MDCCX) ssq
+(MDCCXLIX) ttq
+(MDCCL) uuq
+(MDCCLI) vvq
+(MDCCLII) wwq
+(MDCCLIII) xxq
+(MDCCLIV) yyq
+(MDCCLV) aar
+(MDCCLVI) bbr
+(MDCCLVII) ccr
+(MDCCLVIII) ddr
+(MDCCLIX) eer
+(MDCCLX) ffr
+(MDCCXCIX) ggr
+(MDCCC) hhr
+(MDCCCI) iir
+(MDCCCII) jjr
+(MDCCCIII) kkr
+(MDCCCIV) llr
+(MDCCCV) mmr
+(MDCCCVI) nnr
+(MDCCCVII) oor
+(MDCCCVIII) ppr
+(MDCCCIX) qqr
+(MDCCCX) rrr
+(MDCCCXLIX) ssr
+(MDCCCL) ttr
+(MDCCCLI) uur
+(MDCCCLII) vvr
+(MDCCCLIII) wwr
+(MDCCCLIV) xxr
+(MDCCCLV) yyr
+(MDCCCLVI) aas
+(MDCCCLVII) bbs
+(MDCCCLVIII) ccs
+(MDCCCLIX) dds
+(MDCCCLX) ees
+(MDCCCXCIX) ffs
+(MCM) ggs
+(MCMI) hhs
+(MCMII) iis
+(MCMIII) jjs
+(MCMIV) kks
+(MCMV) lls
+(MCMVI) mms
+(MCMVII) nns
+(MCMVIII) oos
+(MCMIX) pps
+(MCMX) qqs
+(MCMXLIX) rrs
+(MCML) sss
+(MCMLI) tts
+(MCMLII) uus
+(MCMLIII) vvs
+(MCMLIV) wws
+(MCMLV) xxs
+(MCMLVI) yys
+(MCMLVII) aat
+(MCMLVIII) bbt
+(MCMLIX) cct
+(MCMLX) ddt
+(MCMXCIX) eet
+(MM) fft
+(MMI) ggt
+(MMII) hht
+(MMIII) iit
+(MMIV) jjt
+(MMV) kkt
+(MMVI) llt
+(MMVII) mmt
+(MMVIII) nnt
+(MMIX) oot
+(MMX) ppt
+(MMXLIX) qqt
+(MML) rrt
+(MMLI) sst
+(MMLII) ttt
+(MMLIII) uut
+(MMLIV) vvt
+(MMLV) wwt
+(MMLVI) xxt
+(MMLVII) yyt
+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering18.out b/test/tests/conf-gold/numbering/numbering18.out
new file mode 100644
index 0000000..e8afee7
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering18.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  (1) aaa
+  (2) bbb
+  (3) ccc
+  
+    (1) ddd
+    (2) eee
+    (3) fff
+  
+  (4) ggg
+  (5) hhh
+  (6) iii
+  
+    (1) jjj
+    (2) kkk
+    (3) lll
+  
+  (4) mmm
+  (5) nnn
+  (6) ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering19.out b/test/tests/conf-gold/numbering/numbering19.out
new file mode 100644
index 0000000..66d0c86
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering19.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  (1) aaa
+  (2) bbb
+  (3) ccc
+  
+    (1) ddd
+    (2) eee
+    (3) fff
+  
+  (4) ggg
+  (5) hhh
+  (6) iii
+  
+    (1) jjj
+    (2) kkk
+    (3) lll
+  
+  (7) mmm
+  (8) nnn
+  (9) ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering20.out b/test/tests/conf-gold/numbering/numbering20.out
new file mode 100644
index 0000000..66d0c86
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering20.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  (1) aaa
+  (2) bbb
+  (3) ccc
+  
+    (1) ddd
+    (2) eee
+    (3) fff
+  
+  (4) ggg
+  (5) hhh
+  (6) iii
+  
+    (1) jjj
+    (2) kkk
+    (3) lll
+  
+  (7) mmm
+  (8) nnn
+  (9) ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering21.out b/test/tests/conf-gold/numbering/numbering21.out
new file mode 100644
index 0000000..6b129e1
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering21.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (1) bbb
+    (1) ccc
+    (2) ddd
+    (3) eee
+  
+  
+    (0) fff
+    (1) ggg
+    (2) hhh
+  
+  
+    (1) aaa
+    (2) bbb
+    (2) ccc
+    (3) ddd
+    (3) eee
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering22.out b/test/tests/conf-gold/numbering/numbering22.out
new file mode 100644
index 0000000..a711251
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering22.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    bbb
+    ccc
+    (2) ddd
+    (3) eee
+  
+  
+    fff
+    (1) ggg
+    (2) hhh
+  
+  
+    (1) aaa
+    (2) bbb
+    ccc
+    (3) ddd
+    eee
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering23.out b/test/tests/conf-gold/numbering/numbering23.out
new file mode 100644
index 0000000..a997ae0
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering23.out
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    Note 01 of 20
+    Note 02 of 20
+    Note 03 of 20
+    Note 04 of 20
+    Note 05 of 20
+    Note 06 of 20
+    Note 07 of 20
+    Note 08 of 20
+    Note 09 of 20
+    Note 10 of 20
+    Note 11 of 20
+    Note 12 of 20
+    Note 13 of 20
+    Note 14 of 20
+    Note 15 of 20
+    Note 16 of 20
+    Note 17 of 20
+    Note 18 of 20
+    Note 19 of 20
+    Note 20 of 20
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering24.out b/test/tests/conf-gold/numbering/numbering24.out
new file mode 100644
index 0000000..b11342e
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering24.out
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+-20-ttt
+-19-sss
+-18-rrr
+-17-qqq
+-16-ppp
+-15-ooo
+-14-nnn
+-13-mmm
+-12-lll
+-11-kkk
+-10-jjj
+-9-iii
+-8-hhh
+-7-ggg
+-6-fff
+-5-eee
+-4-ddd
+-3-ccc
+-2-bbb
+-1-aaa
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering25.out b/test/tests/conf-gold/numbering/numbering25.out
new file mode 100644
index 0000000..3219616
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering25.out
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <list>
+(20) ttt
+(19) sss
+(18) rrr
+(17) qqq
+(16) ppp
+(15) ooo
+(14) nnn
+(13) mmm
+(12) lll
+(11) kkk
+(10) jjj
+(9) iii
+(8) hhh
+(7) ggg
+(6) fff
+(5) eee
+(4) ddd
+(3) ccc
+(2) bbb
+(1) aaa
+</list>
+  <list>
+(3) www
+(2) vvv
+(1) uuu
+</list>
+  <list>
+(3) zzz
+(2) yyy
+(1) xxx
+</list>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering26.out b/test/tests/conf-gold/numbering/numbering26.out
new file mode 100644
index 0000000..3396ed3
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering26.out
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+-1-ttt
+-2-sss
+-3-rrr
+-4-qqq
+-5-ppp
+-6-ooo
+-7-nnn
+-8-mmm
+-9-lll
+-10-kkk
+-11-jjj
+-12-iii
+-13-hhh
+-14-ggg
+-15-fff
+-16-eee
+-17-ddd
+-18-ccc
+-19-bbb
+-20-aaa
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering27.out b/test/tests/conf-gold/numbering/numbering27.out
new file mode 100644
index 0000000..c7e2619
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering27.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+1: Level A
+1+1: Level B
+1+2: Level B
+1+2-1: Level C
+1+3: Level B
+1+3-1: Level C
+1+3-1+1: Level D
+2: Level A
+2+1: Level B
+2+1-1: Level C
+2+1-1+1: Level D
+2+1-1+1-1: Level E
+3: Level A
+3+1: Level B
+3+1-1: Level C
+3+1-1+1: Level D
+3+1-1+1-1: Level E
+3+1-1+2: Level D
+3+1-1+2-1: Level E
+3+1-2: Level C
+3+1-2+1: Level D
+3+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering28.out b/test/tests/conf-gold/numbering/numbering28.out
new file mode 100644
index 0000000..2cf8167
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering28.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+1: Level A
+1: Level B
+2: Level B
+1: Level C
+3: Level B
+1: Level C
+1: Level D
+2: Level A
+1: Level B
+1: Level C
+1: Level D
+1: Level E
+3: Level A
+1: Level B
+1: Level C
+1: Level D
+1: Level E
+2: Level D
+1: Level E
+2: Level C
+1: Level D
+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering29.out b/test/tests/conf-gold/numbering/numbering29.out
new file mode 100644
index 0000000..69ccc1c
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering29.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0: Test for source tree numbering
+1: Level A
+2: Level B
+3: Level B
+4: Level C
+5: Level B
+6: Level C
+7: Level D
+8: Level A
+9: Level B
+10: Level C
+11: Level D
+12: Level E
+13: Level A
+14: Level B
+15: Level C
+16: Level D
+17: Level E
+18: Level D
+19: Level E
+20: Level C
+21: Level D
+22: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering30.out b/test/tests/conf-gold/numbering/numbering30.out
new file mode 100644
index 0000000..05ac7ac
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering30.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+1: Level A
+1+1: Level B
+1+2: Level B
+1+2-1: Level C
+1+3: Level B
+1+3-1: Level C
+1+3-1-1: Level D
+2: Level A
+2+1: Level B
+2+1-1: Level C
+2+1-1-1: Level D
+2+1-1-1-1: Level E
+3: Level A
+3+1: Level B
+3+1-1: Level C
+3+1-1-1: Level D
+3+1-1-1-1: Level E
+3+1-1-2: Level D
+3+1-1-2-1: Level E
+3+1-2: Level C
+3+1-2-1: Level D
+3+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering31.out b/test/tests/conf-gold/numbering/numbering31.out
new file mode 100644
index 0000000..2ad85d9
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering31.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+A.: Level A
+A.A.: Level B
+A.B.: Level B
+A.B.A.: Level C
+A.C.: Level B
+A.C.A.: Level C
+A.C.A.A.: Level D
+B.: Level A
+B.A.: Level B
+B.A.A.: Level C
+B.A.A.A.: Level D
+B.A.A.A.A.: Level E
+C.: Level A
+C.A.: Level B
+C.A.A.: Level C
+C.A.A.A.: Level D
+C.A.A.A.A.: Level E
+C.A.A.B.: Level D
+C.A.A.B.A.: Level E
+C.A.B.: Level C
+C.A.B.A.: Level D
+C.B.: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering32.out b/test/tests/conf-gold/numbering/numbering32.out
new file mode 100644
index 0000000..db44259
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering32.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+A: Level A
+A.a: Level B
+A.b: Level B
+A.b+a: Level C
+A.c: Level B
+A.c+a: Level C
+A.c+a+a: Level D
+B: Level A
+B.a: Level B
+B.a+a: Level C
+B.a+a+a: Level D
+B.a+a+a+a: Level E
+C: Level A
+C.a: Level B
+C.a+a: Level C
+C.a+a+a: Level D
+C.a+a+a+a: Level E
+C.a+a+b: Level D
+C.a+a+b+a: Level E
+C.a+b: Level C
+C.a+b+a: Level D
+C.b: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering33.out b/test/tests/conf-gold/numbering/numbering33.out
new file mode 100644
index 0000000..04d5503
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering33.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+A+: Level A
+A.A+: Level B
+A.B+: Level B
+A.B.A+: Level C
+A.C+: Level B
+A.C.A+: Level C
+A.C.A.A+: Level D
+B+: Level A
+B.A+: Level B
+B.A.A+: Level C
+B.A.A.A+: Level D
+B.A.A.A.A+: Level E
+C+: Level A
+C.A+: Level B
+C.A.A+: Level C
+C.A.A.A+: Level D
+C.A.A.A.A+: Level E
+C.A.A.B+: Level D
+C.A.A.B.A+: Level E
+C.A.B+: Level C
+C.A.B.A+: Level D
+C.B+: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering34.out b/test/tests/conf-gold/numbering/numbering34.out
new file mode 100644
index 0000000..b2c45ff
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering34.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+.A: Level A
+.A+a: Level B
+.A+b: Level B
+.A+b 1: Level C
+.A+c: Level B
+.A+c 1: Level C
+.A+c 1 1: Level D
+.B: Level A
+.B+a: Level B
+.B+a 1: Level C
+.B+a 1 1: Level D
+.B+a 1 1 1: Level E
+.C: Level A
+.C+a: Level B
+.C+a 1: Level C
+.C+a 1 1: Level D
+.C+a 1 1 1: Level E
+.C+a 1 2: Level D
+.C+a 1 2 1: Level E
+.C+a 2: Level C
+.C+a 2 1: Level D
+.C+b: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering35.out b/test/tests/conf-gold/numbering/numbering35.out
new file mode 100644
index 0000000..c9455e5
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering35.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+*1*: Level A
+*1+1*: Level B
+*1+2*: Level B
+*1+2+1*: Level C
+*1+3*: Level B
+*1+3+1*: Level C
+*1+3+1+1*: Level D
+*2*: Level A
+*2+1*: Level B
+*2+1+1*: Level C
+*2+1+1+1*: Level D
+*2+1+1+1+1*: Level E
+*3*: Level A
+*3+1*: Level B
+*3+1+1*: Level C
+*3+1+1+1*: Level D
+*3+1+1+1+1*: Level E
+*3+1+1+2*: Level D
+*3+1+1+2+1*: Level E
+*3+1+2*: Level C
+*3+1+2+1*: Level D
+*3+2*: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering36.out b/test/tests/conf-gold/numbering/numbering36.out
new file mode 100644
index 0000000..5c3f3a2
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering36.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+*1: Level A
+*1+1: Level B
+*1+2: Level B
+*1+2*1: Level C
+*1+3: Level B
+*1+3*1: Level C
+*1+3*1*1: Level D
+*2: Level A
+*2+1: Level B
+*2+1*1: Level C
+*2+1*1*1: Level D
+*2+1*1*1*1: Level E
+*3: Level A
+*3+1: Level B
+*3+1*1: Level C
+*3+1*1*1: Level D
+*3+1*1*1*1: Level E
+*3+1*1*2: Level D
+*3+1*1*2*1: Level E
+*3+1*2: Level C
+*3+1*2*1: Level D
+*3+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering37.out b/test/tests/conf-gold/numbering/numbering37.out
new file mode 100644
index 0000000..cbae516
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering37.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+...A...: Level A
+...A.A...: Level B
+...A.B...: Level B
+...A.B.A...: Level C
+...A.C...: Level B
+...A.C.A...: Level C
+...A.C.A.A...: Level D
+...B...: Level A
+...B.A...: Level B
+...B.A.A...: Level C
+...B.A.A.A...: Level D
+...B.A.A.A.A...: Level E
+...C...: Level A
+...C.A...: Level B
+...C.A.A...: Level C
+...C.A.A.A...: Level D
+...C.A.A.A.A...: Level E
+...C.A.A.B...: Level D
+...C.A.A.B.A...: Level E
+...C.A.B...: Level C
+...C.A.B.A...: Level D
+...C.B...: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering38.out b/test/tests/conf-gold/numbering/numbering38.out
new file mode 100644
index 0000000..e313801
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering38.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+..I..: Level A
+..I.A..: Level B
+..I.B..: Level B
+..I.B.A..: Level C
+..I.C..: Level B
+..I.C.A..: Level C
+..I.C.A.A..: Level D
+..II..: Level A
+..II.A..: Level B
+..II.A.A..: Level C
+..II.A.A.A..: Level D
+..II.A.A.A.A..: Level E
+..III..: Level A
+..III.A..: Level B
+..III.A.A..: Level C
+..III.A.A.A..: Level D
+..III.A.A.A.A..: Level E
+..III.A.A.B..: Level D
+..III.A.A.B.A..: Level E
+..III.A.B..: Level C
+..III.A.B.A..: Level D
+..III.B..: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering39.out b/test/tests/conf-gold/numbering/numbering39.out
new file mode 100644
index 0000000..9e490c3
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering39.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+**A**: Level A
+**A.A**: Level B
+**A.B**: Level B
+**A.B.A**: Level C
+**A.C**: Level B
+**A.C.A**: Level C
+**A.C.A.A**: Level D
+**B**: Level A
+**B.A**: Level B
+**B.A.A**: Level C
+**B.A.A.A**: Level D
+**B.A.A.A.A**: Level E
+**C**: Level A
+**C.A**: Level B
+**C.A.A**: Level C
+**C.A.A.A**: Level D
+**C.A.A.A.A**: Level E
+**C.A.A.B**: Level D
+**C.A.A.B.A**: Level E
+**C.A.B**: Level C
+**C.A.B.A**: Level D
+**C.B**: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering40.out b/test/tests/conf-gold/numbering/numbering40.out
new file mode 100644
index 0000000..63050e4
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering40.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+*%A|+: Level A
+*%A.A|+: Level B
+*%A.B|+: Level B
+*%A.B.A|+: Level C
+*%A.C|+: Level B
+*%A.C.A|+: Level C
+*%A.C.A.A|+: Level D
+*%B|+: Level A
+*%B.A|+: Level B
+*%B.A.A|+: Level C
+*%B.A.A.A|+: Level D
+*%B.A.A.A.A|+: Level E
+*%C|+: Level A
+*%C.A|+: Level B
+*%C.A.A|+: Level C
+*%C.A.A.A|+: Level D
+*%C.A.A.A.A|+: Level E
+*%C.A.A.B|+: Level D
+*%C.A.A.B.A|+: Level E
+*%C.A.B|+: Level C
+*%C.A.B.A|+: Level D
+*%C.B|+: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering41.out b/test/tests/conf-gold/numbering/numbering41.out
new file mode 100644
index 0000000..15b072d
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering41.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+*%A+?: Level A
+*%A|a+?: Level B
+*%A|b+?: Level B
+*%A|b|a+?: Level C
+*%A|c+?: Level B
+*%A|c|a+?: Level C
+*%A|c|a|a+?: Level D
+*%B+?: Level A
+*%B|a+?: Level B
+*%B|a|a+?: Level C
+*%B|a|a|a+?: Level D
+*%B|a|a|a|a+?: Level E
+*%C+?: Level A
+*%C|a+?: Level B
+*%C|a|a+?: Level C
+*%C|a|a|a+?: Level D
+*%C|a|a|a|a+?: Level E
+*%C|a|a|b+?: Level D
+*%C|a|a|b|a+?: Level E
+*%C|a|b+?: Level C
+*%C|a|b|a+?: Level D
+*%C|b+?: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering42.out b/test/tests/conf-gold/numbering/numbering42.out
new file mode 100644
index 0000000..81e74e9
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering42.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+(1.): Level A
+(1.1.): Level B
+(1.2.): Level B
+(1.2.1.): Level C
+(1.3.): Level B
+(1.3.1.): Level C
+(1.3.1.1.): Level D
+(2.): Level A
+(2.1.): Level B
+(2.1.1.): Level C
+(2.1.1.1.): Level D
+(2.1.1.1.1.): Level E
+(3.): Level A
+(3.1.): Level B
+(3.1.1.): Level C
+(3.1.1.1.): Level D
+(3.1.1.1.1.): Level E
+(3.1.1.2.): Level D
+(3.1.1.2.1.): Level E
+(3.1.2.): Level C
+(3.1.2.1.): Level D
+(3.2.): Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering43.out b/test/tests/conf-gold/numbering/numbering43.out
new file mode 100644
index 0000000..ff3719e
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering43.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+(A): Level A
+(A*1): Level B
+(A*2): Level B
+(A*2*1): Level C
+(A*3): Level B
+(A*3*1): Level C
+(A*3*1*1): Level D
+(B): Level A
+(B*1): Level B
+(B*1*1): Level C
+(B*1*1*1): Level D
+(B*1*1*1*1): Level E
+(C): Level A
+(C*1): Level B
+(C*1*1): Level C
+(C*1*1*1): Level D
+(C*1*1*1*1): Level E
+(C*1*1*2): Level D
+(C*1*1*2*1): Level E
+(C*1*2): Level C
+(C*1*2*1): Level D
+(C*2): Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering44.out b/test/tests/conf-gold/numbering/numbering44.out
new file mode 100644
index 0000000..925bd72
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering44.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+(A?): Level A
+(A*1?): Level B
+(A*2?): Level B
+(A*2*1?): Level C
+(A*3?): Level B
+(A*3*1?): Level C
+(A*3*1*1?): Level D
+(B?): Level A
+(B*1?): Level B
+(B*1*1?): Level C
+(B*1*1*1?): Level D
+(B*1*1*1*1?): Level E
+(C?): Level A
+(C*1?): Level B
+(C*1*1?): Level C
+(C*1*1*1?): Level D
+(C*1*1*1*1?): Level E
+(C*1*1*2?): Level D
+(C*1*1*2*1?): Level E
+(C*1*2?): Level C
+(C*1*2*1?): Level D
+(C*2?): Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering45.out b/test/tests/conf-gold/numbering/numbering45.out
new file mode 100644
index 0000000..df37479
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering45.out
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  A-(1) aaa
+B-(1) bbb
+C-(2) ccc
+D-(2) ddd
+E-(3) eee
+F-(3) fff
+G-(4) ggg
+H-(4) hhh
+I-(5) iii
+J-(5) jjj
+K-(6) kkk
+L-(6) lll
+M-(7) mmm
+N-(7) nnn
+O-(8) ooo
+P-(8) ppp
+Q-(9) qqq
+R-(9) rrr
+S-(10) sss
+T-(10) ttt
+U-(11) uuu
+V-(11) vvv
+W-(12) www
+X-(12) xxx
+Y-(13) yyy
+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering46.out b/test/tests/conf-gold/numbering/numbering46.out
new file mode 100644
index 0000000..e9477c4
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering46.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+(A): Level A
+(A--1): Level B
+(A--2): Level B
+(A--2--1): Level C
+(A--3): Level B
+(A--3--1): Level C
+(A--3--1--1): Level D
+(B): Level A
+(B--1): Level B
+(B--1--1): Level C
+(B--1--1--1): Level D
+(B--1--1--1--1): Level E
+(C): Level A
+(C--1): Level B
+(C--1--1): Level C
+(C--1--1--1): Level D
+(C--1--1--1--1): Level E
+(C--1--1--2): Level D
+(C--1--1--2--1): Level E
+(C--1--2): Level C
+(C--1--2--1): Level D
+(C--2): Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering47.out b/test/tests/conf-gold/numbering/numbering47.out
new file mode 100644
index 0000000..2cf8167
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering47.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+1: Level A
+1: Level B
+2: Level B
+1: Level C
+3: Level B
+1: Level C
+1: Level D
+2: Level A
+1: Level B
+1: Level C
+1: Level D
+1: Level E
+3: Level A
+1: Level B
+1: Level C
+1: Level D
+1: Level E
+2: Level D
+1: Level E
+2: Level C
+1: Level D
+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering48.out b/test/tests/conf-gold/numbering/numbering48.out
new file mode 100644
index 0000000..e8b31eb
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering48.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+1: Level A
+1: Level B
+1: Level B
+1: Level C
+1: Level B
+1: Level C
+1: Level D
+2: Level A
+2: Level B
+2: Level C
+2: Level D
+2: Level E
+3: Level A
+3: Level B
+3: Level C
+3: Level D
+3: Level E
+3: Level D
+3: Level E
+3: Level C
+3: Level D
+3: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering49.out b/test/tests/conf-gold/numbering/numbering49.out
new file mode 100644
index 0000000..fedc756
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering49.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0: Test for source tree numbering
+0: Level A
+0: Level B
+0: Level B
+0: Level C
+0: Level B
+0: Level C
+0: Level D
+0: Level A
+0: Level B
+0: Level C
+0: Level D
+1: Level E
+1: Level A
+1: Level B
+1: Level C
+1: Level D
+2: Level E
+2: Level D
+3: Level E
+3: Level C
+3: Level D
+3: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering50.out b/test/tests/conf-gold/numbering/numbering50.out
new file mode 100644
index 0000000..e8b31eb
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering50.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+1: Level A
+1: Level B
+1: Level B
+1: Level C
+1: Level B
+1: Level C
+1: Level D
+2: Level A
+2: Level B
+2: Level C
+2: Level D
+2: Level E
+3: Level A
+3: Level B
+3: Level C
+3: Level D
+3: Level E
+3: Level D
+3: Level E
+3: Level C
+3: Level D
+3: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering51.out b/test/tests/conf-gold/numbering/numbering51.out
new file mode 100644
index 0000000..461899e
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering51.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: Test for source tree numbering
+2: Level A
+3: Level B
+4: Level B
+5: Level C
+6: Level B
+7: Level C
+8: Level D
+9: Level A
+10: Level B
+11: Level C
+12: Level D
+13: Level E
+14: Level A
+15: Level B
+16: Level C
+17: Level D
+18: Level E
+19: Level D
+20: Level E
+21: Level C
+22: Level D
+23: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering52.out b/test/tests/conf-gold/numbering/numbering52.out
new file mode 100644
index 0000000..16e0dd6
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering52.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: aaa
+: bbb
+2: ccc
+1: ddd
+: eee
+2: fff
+: ggg
+3: hhh
+: iii
+1: jjj
+: kkk
+2: lll
+4: mmm
+: nnn
+5: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering53.out b/test/tests/conf-gold/numbering/numbering53.out
new file mode 100644
index 0000000..abe8137
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering53.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: aaa
+2: bbb
+3: ccc
+1: ddd
+2: eee
+3: fff
+4: ggg
+5: hhh
+6: iii
+1: jjj
+2: kkk
+3: lll
+7: mmm
+8: nnn
+9: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering54.out b/test/tests/conf-gold/numbering/numbering54.out
new file mode 100644
index 0000000..abe8137
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering54.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: aaa
+2: bbb
+3: ccc
+1: ddd
+2: eee
+3: fff
+4: ggg
+5: hhh
+6: iii
+1: jjj
+2: kkk
+3: lll
+7: mmm
+8: nnn
+9: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering55.out b/test/tests/conf-gold/numbering/numbering55.out
new file mode 100644
index 0000000..abe8137
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering55.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: aaa
+2: bbb
+3: ccc
+1: ddd
+2: eee
+3: fff
+4: ggg
+5: hhh
+6: iii
+1: jjj
+2: kkk
+3: lll
+7: mmm
+8: nnn
+9: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering56.out b/test/tests/conf-gold/numbering/numbering56.out
new file mode 100644
index 0000000..b372b96
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering56.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: aaa
+: bbb
+: ccc
+1: ddd
+1: eee
+1: fff
+: ggg
+: hhh
+: iii
+2: jjj
+2: kkk
+2: lll
+: mmm
+: nnn
+: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering57.out b/test/tests/conf-gold/numbering/numbering57.out
new file mode 100644
index 0000000..24bacde
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering57.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: aaa
+: bbb
+: ccc
+1: ddd
+2: eee
+3: fff
+: ggg
+: hhh
+: iii
+1: jjj
+2: kkk
+3: lll
+: mmm
+: nnn
+: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering58.out b/test/tests/conf-gold/numbering/numbering58.out
new file mode 100644
index 0000000..16e0dd6
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering58.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: aaa
+: bbb
+2: ccc
+1: ddd
+: eee
+2: fff
+: ggg
+3: hhh
+: iii
+1: jjj
+: kkk
+2: lll
+4: mmm
+: nnn
+5: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering59.out b/test/tests/conf-gold/numbering/numbering59.out
new file mode 100644
index 0000000..e2dcfbf
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering59.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (1) bbb
+    (1) ccc
+    (2) ddd
+    (3) eee
+  
+  (3) fff
+  (4) ggg
+  (5) hhh
+  
+    (6) iii
+    (7) jjj
+    (7) kkk
+    (8) lll
+    (8) mmm
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering60.out b/test/tests/conf-gold/numbering/numbering60.out
new file mode 100644
index 0000000..74973cf
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering60.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (1) bbb
+    (1) ccc
+    (2) ddd
+    (3) eee
+  
+  (3) fff
+  (4) ggg
+  (5) hhh
+  
+    (1) iii
+    (2) jjj
+    (2) kkk
+    (3) lll
+    (3) mmm
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering61.out b/test/tests/conf-gold/numbering/numbering61.out
new file mode 100644
index 0000000..dc84831
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering61.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0: Test for source tree numbering
+1: Level A
+2: Level B
+3: Level B
+0: Level C
+1: Level B
+0: Level C
+1: Level D
+2: Level A
+3: Level B
+0: Level C
+1: Level D
+2: Level E
+3: Level A
+4: Level B
+0: Level C
+1: Level D
+2: Level E
+3: Level D
+4: Level E
+0: Level C
+1: Level D
+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering62.out b/test/tests/conf-gold/numbering/numbering62.out
new file mode 100644
index 0000000..138961f
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering62.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+: Level A
+: Level B
+: Level B
+1: Level C
+: Level B
+1: Level C
+1: Level D
+: Level A
+: Level B
+1: Level C
+1: Level D
+1: Level E
+: Level A
+: Level B
+1: Level C
+1: Level D
+1: Level E
+1: Level D
+1: Level E
+2: Level C
+2: Level D
+: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering63.out b/test/tests/conf-gold/numbering/numbering63.out
new file mode 100644
index 0000000..2cf8167
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering63.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+1: Level A
+1: Level B
+2: Level B
+1: Level C
+3: Level B
+1: Level C
+1: Level D
+2: Level A
+1: Level B
+1: Level C
+1: Level D
+1: Level E
+3: Level A
+1: Level B
+1: Level C
+1: Level D
+1: Level E
+2: Level D
+1: Level E
+2: Level C
+1: Level D
+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering64.out b/test/tests/conf-gold/numbering/numbering64.out
new file mode 100644
index 0000000..abe8137
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering64.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: aaa
+2: bbb
+3: ccc
+1: ddd
+2: eee
+3: fff
+4: ggg
+5: hhh
+6: iii
+1: jjj
+2: kkk
+3: lll
+7: mmm
+8: nnn
+9: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering65.out b/test/tests/conf-gold/numbering/numbering65.out
new file mode 100644
index 0000000..ff3cd06
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering65.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+: Level A
+1: Level B
+2: Level B
+2-1: Level C
+3: Level B
+3-1: Level C
+3-1-1: Level D
+: Level A
+1: Level B
+1-1: Level C
+1-1-1: Level D
+1-1-1-1: Level E
+: Level A
+1: Level B
+1-1: Level C
+1-1-1: Level D
+1-1-1-1: Level E
+1-1-2: Level D
+1-1-2-1: Level E
+1-2: Level C
+1-2-1: Level D
+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering66.out b/test/tests/conf-gold/numbering/numbering66.out
new file mode 100644
index 0000000..68c1ed0
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering66.out
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>First Chapter
+A. First Section In first Chapter
+A.1. First Subsection in first Section In first Chapter
+A. Second Subsection in first Section In first Chapter
+A. Third Subsection in first Section In first Chapter
+A. Fourth Subsection in first Section In first Chapter
+A. Fifth Subsection in first Section In first Chapter
+B. Second Section In first Chapter
+B.1. First Subsection in second Section In first Chapter
+B. Second Subsection in second Section In first Chapter
+B. Third Subsection in second Section In first Chapter
+B. Fourth Subsection in second Section In first Chapter
+B. Fifth Subsection in second Section In first Chapter
+C. Third Section In first Chapter
+C.1. First Subsection in third Section In first Chapter
+C. Second Subsection in third Section In first Chapter
+C. Third Subsection in third Section In first Chapter
+D. Fourth Section In first Chapter
+D.1. First Subsection in fourth Section In first Chapter
+D. Second Subsection in fourth Section In first Chapter
+D. Third Subsection in fourth Section In first Chapter
+D. Fourth Subsection in fourth Section In first Chapter
+Second Chapter
+A. First Section In second Chapter
+A.1. First Subsection in first Section In second Chapter
+A. Second Subsection in first Section In second Chapter
+B. Second Section In second Chapter
+B.1. First Subsection in second Section In second Chapter
+B. Second Subsection in second Section In second Chapter
+B. Third Subsection in second Section In second Chapter
+B. Fourth Subsection in second Section In second Chapter
+C. Third Section In second Chapter
+C.1. First Subsection in third Section In second Chapter
+C. Second Subsection in third Section In second Chapter
+C. Third Subsection in third Section In second Chapter
+C. Fourth Subsection in third Section In second Chapter
+C. Fifth Subsection in third Section In second Chapter
+D. Fouth Section In second Chapter
+D.1. First Subsection in fourth Section In second Chapter
+D. Second Subsection in fourth Section In second Chapter
+Third Chapter
+A. First Section In third Chapter
+A.1. First Subsection in first Section In third Chapter
+Fourth Chapter
+A. First Section In fourth Chapter
+A.1. First Subsection in first Section In fourth Chapter
+Fifth Chapter
+A. First Section In fifth Chapter
+A.1. First Subsection in first Section In fifth Chapter
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering67.out b/test/tests/conf-gold/numbering/numbering67.out
new file mode 100644
index 0000000..c903aa4
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering67.out
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: Test for source tree numbering
+2: Level A
+1: Level B
+1: Level B, again
+2: Level C
+1: Level B
+2: Level C
+1: Level D
+2: Level C
+3: Level A
+1: Level B
+2: Level C
+1: Level D
+2: Level E
+3: Level A
+1: Level B
+2: Level C
+1: Level D
+2: Level E
+3: Level E, again
+1: Level D
+2: Level E
+3: Level C
+1: Level D
+1: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering68.out b/test/tests/conf-gold/numbering/numbering68.out
new file mode 100644
index 0000000..88f1645
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering68.out
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0: Test for source tree numbering
+0: Level A
+0: Level B
+0: Level B, again
+0: Level C
+0: Level B
+0: Level C
+0: Level D
+0: Level C
+0: Level C, again
+0: Level A
+0: Level B
+0: Level C
+0: Level D
+1: Level E
+1: Level A
+0: Level B
+0: Level C
+0: Level D
+1: Level E
+2: Level E, again
+0: Level D
+1: Level E
+1: Level C
+0: Level D
+0: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering69.out b/test/tests/conf-gold/numbering/numbering69.out
new file mode 100644
index 0000000..9ccce55
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering69.out
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0: Test for source tree numbering
+0: Level A
+0: Level B
+0: Level B, again
+1: Level C
+0: Level B
+1: Level C
+0: Level D
+1: Level C
+2: Level C, again
+2: Level A
+0: Level B
+1: Level C
+0: Level D
+1: Level E
+1: Level A
+0: Level B
+1: Level C
+0: Level D
+1: Level E
+2: Level E, again
+0: Level D
+1: Level E
+2: Level C
+0: Level D
+0: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering70.out b/test/tests/conf-gold/numbering/numbering70.out
new file mode 100644
index 0000000..74973cf
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering70.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (1) bbb
+    (1) ccc
+    (2) ddd
+    (3) eee
+  
+  (3) fff
+  (4) ggg
+  (5) hhh
+  
+    (1) iii
+    (2) jjj
+    (2) kkk
+    (3) lll
+    (3) mmm
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering71.out b/test/tests/conf-gold/numbering/numbering71.out
new file mode 100644
index 0000000..81dd40d
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering71.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    bbb
+    ccc
+    (2) ddd
+    (3) eee
+  
+  fff
+  (1) ggg
+  (2) hhh
+  
+    (1) iii
+    (2) jjj
+    kkk
+    (3) lll
+    mmm
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering72.out b/test/tests/conf-gold/numbering/numbering72.out
new file mode 100644
index 0000000..f33939a
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering72.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+    (4) ddd
+    (5) eee
+  
+  (1) fff
+  (2) ggg
+  (3) hhh
+  
+    (1) iii
+    (2) jjj
+    (3) kkk
+    (4) lll
+    (5) mmm
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering73.out b/test/tests/conf-gold/numbering/numbering73.out
new file mode 100644
index 0000000..f33939a
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering73.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+    (4) ddd
+    (5) eee
+  
+  (1) fff
+  (2) ggg
+  (3) hhh
+  
+    (1) iii
+    (2) jjj
+    (3) kkk
+    (4) lll
+    (5) mmm
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering74.out b/test/tests/conf-gold/numbering/numbering74.out
new file mode 100644
index 0000000..8e54fea
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering74.out
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  (1) Citation before first chapter
+  
+    aaa
+    (2) Citation 1 in first chapter
+    bbb
+    ccc
+    ddd
+    (6) Citation 2 in first chapter
+    eee
+    (8) Citation 3 in first chapter
+  
+  fff
+  ggg
+  hhh
+  (5) Citation between chapters
+  
+    iii
+    jjj
+    kkk
+    (4) Citation 1 in second chapter
+    (5) Citation 2 in second chapter
+  
+  (6) Citation after last chapter
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering75.out b/test/tests/conf-gold/numbering/numbering75.out
new file mode 100644
index 0000000..abe8137
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering75.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: aaa
+2: bbb
+3: ccc
+1: ddd
+2: eee
+3: fff
+4: ggg
+5: hhh
+6: iii
+1: jjj
+2: kkk
+3: lll
+7: mmm
+8: nnn
+9: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering76.out b/test/tests/conf-gold/numbering/numbering76.out
new file mode 100644
index 0000000..abe8137
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering76.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1: aaa
+2: bbb
+3: ccc
+1: ddd
+2: eee
+3: fff
+4: ggg
+5: hhh
+6: iii
+1: jjj
+2: kkk
+3: lll
+7: mmm
+8: nnn
+9: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering77.out b/test/tests/conf-gold/numbering/numbering77.out
new file mode 100644
index 0000000..313cb53
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering77.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+1: Level A
+: Level B
+: Level B
+1: Level C
+: Level B
+1: Level C
+1-1: Level D
+2: Level A
+: Level B
+1: Level C
+1-1: Level D
+1-1-1: Level E
+3: Level A
+: Level B
+1: Level C
+1-1: Level D
+1-1-1: Level E
+1-2: Level D
+1-2-1: Level E
+2: Level C
+2-1: Level D
+: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering78.out b/test/tests/conf-gold/numbering/numbering78.out
new file mode 100644
index 0000000..715ff24
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering78.out
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+: Level A
+1: Level B
+: Level C
+1: Level D
+1: Level E
+1-1: Level E, again
+1: Level E, again
+: Level A
+1: Level B
+: Level C
+1: Level D
+1: Level E
+1-1: Level E, again
+2: Level D
+2: Level E
+2-1: Level E, again
+2: Level E, again
+: Level C
+1: Level D
+2: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering79.out b/test/tests/conf-gold/numbering/numbering79.out
new file mode 100644
index 0000000..2108a93
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering79.out
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+  NaNaaa
+NaNbbb
+NaNccc
+NaNddd
+NaNeee
+NaNfff
+NaNggg
+NaNhhh
+NaNiii
+NaNjjj
+NaNkkk
+NaNlll
+NaNmmm
+NaNnnn
+NaNooo
+NaNppp
+NaNqqq
+NaNrrr
+NaNsss
+NaNttt
+NaNuuu
+NaNvvv
+NaNwww
+NaNxxx
+NaNyyy
+NaNaab
+NaNbbb
+NaNccb
+NaNddb
+NaNeeb
+NaNffb
+NaNggb
+NaNhhb
+NaNiib
+NaNjjb
+NaNkkb
+NaNllb
+NaNmmb
+NaNnnb
+NaNoob
+NaNppb
+NaNqqb
+NaNrrb
+NaNssb
+NaNttb
+NaNuub
+NaNvvb
+NaNwwb
+NaNxxb
+NaNyyb
+
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering80.out b/test/tests/conf-gold/numbering/numbering80.out
new file mode 100644
index 0000000..fc38eca
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering80.out
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+  
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+    (4) ddd
+    (5) eee
+    (6) fff
+    (7) ggg
+    (8) hhh
+    (9) iii
+    (10) jjj
+    (11) kkk
+    (12) lll
+    (13) mmm
+    (14) nnn
+    (15) ooo
+    (16) ppp
+    (17) qqq
+    (18) rrr
+    (19) sss
+    (20) ttt
+    (21) uuu
+    (22) vvv
+    (23) www
+    (24) xxx
+    (25) yyy
+    (26) aab
+    (27) bbb
+    (28) ccb
+    (29) ddb
+    (30) eeb
+    (31) ffb
+    (32) ggb
+    (33) hhb
+    (34) iib
+    (35) jjb
+    (36) kkb
+    (37) llb
+    (38) mmb
+    (39) nnb
+    (40) oob
+    (41) ppb
+    (42) qqb
+    (43) rrb
+    (44) ssb
+    (45) ttb
+    (46) uub
+    (47) vvb
+    (48) wwb
+    (49) xxb
+    (50) yyb
+    (51) aac
+    (52) bbc
+    (53) ccc
+    (54) ddc
+    (55) eec
+    (56) ffc
+    (57) ggc
+    (58) hhc
+    (59) iic
+    (60) jjc
+    (61) kkc
+    (62) llc
+    (63) mmc
+    (64) nnc
+    (65) ooc
+    (66) ppc
+    (67) qqc
+    (68) rrc
+    (69) ssc
+    (70) ttc
+    (71) uuc
+    (72) vvc
+    (73) wwc
+    (74) xxc
+    (75) yyc
+    (76) aad
+    (77) bbd
+    (78) ccd
+    (79) ddd
+    (80) eed
+    (81) ffd
+    (82) ggd
+    (83) hhd
+    (84) iid
+    (85) jjd
+    (86) kkd
+    (87) lld
+    (88) mmd
+    (89) nnd
+    (90) ood
+    (91) ppd
+    (92) qqd
+    (93) rrd
+    (94) ssd
+    (95) ttd
+    (96) uud
+    (97) vvd
+    (98) wwd
+    (99) xxd
+    (100) yyd
+    (101) aae
+    (102) bbe
+    (103) cce
+    (104) dde
+    (105) eee
+    (106) ffe
+    (107) gge
+    (108) hhe
+    (109) iie
+    (110) jje
+    (111) kke
+    (112) lle
+    (113) mme
+    (114) nne
+    (115) ooe
+    (116) ppe
+    (117) qqe
+    (118) rre
+    (119) sse
+    (120) tte
+    (121) uue
+    (122) vve
+    (123) wwe
+    (124) xxe
+    (125) yye
+    (126) aaf
+    (127) bbf
+    (128) ccf
+    (129) ddf
+    (130) eef
+    (131) fff
+    (132) ggf
+    (133) hhf
+    (134) iif
+    (135) jjf
+    (136) kkf
+    (137) llf
+    (138) mmf
+    (139) nnf
+    (140) oof
+    (141) ppf
+    (142) qqf
+    (143) rrf
+    (144) ssf
+    (145) ttf
+    (146) uuf
+    (147) vvf
+    (148) wwf
+    (149) xxf
+    (150) yyf
+    (151) aag
+    (152) bbg
+    (153) ccg
+    (154) ddg
+    (155) eeg
+    (156) ffg
+    (157) ggg
+    (158) hhg
+    (159) iig
+    (160) jjg
+    (161) kkg
+    (162) llg
+    (163) mmg
+    (164) nng
+    (165) oog
+    (166) ppg
+    (167) qqg
+    (168) rrg
+    (169) ssg
+    (170) ttg
+    (171) uug
+    (172) vvg
+    (173) wwg
+    (174) xxg
+    (175) yyg
+    (176) aah
+    (177) bbh
+    (178) cch
+    (179) ddh
+    (180) eeh
+    (181) ffh
+    (182) ggh
+    (183) hhh
+    (184) iih
+    (185) jjh
+    (186) kkh
+    (187) llh
+    (188) mmh
+    (189) nnh
+    (190) ooh
+    (191) pph
+    (192) qqh
+    (193) rrh
+    (194) ssh
+    (195) tth
+    (196) uuh
+    (197) vvh
+    (198) wwh
+    (199) xxh
+    (200) yyh
+    (201) aai
+    (202) bbi
+    (203) cci
+    (204) ddi
+    (205) eei
+    (206) ffi
+    (207) ggi
+    (208) hhi
+    (209) iii
+    (210) jji
+    (211) kki
+    (212) lli
+    (213) mmi
+    (214) nni
+    (215) ooi
+    (216) ppi
+    (217) qqi
+    (218) rri
+    (219) ssi
+    (220) tti
+    (221) uui
+    (222) vvi
+    (223) wwi
+    (224) xxi
+    (225) yyi
+    (226) aaj
+    (227) bbj
+    (228) ccj
+    (229) ddj
+    (230) eej
+    (231) ffj
+    (232) ggj
+    (233) hhj
+    (234) iij
+    (235) jjj
+    (236) kkj
+    (237) llj
+    (238) mmj
+    (239) nnj
+    (240) ooj
+    (241) ppj
+    (242) qqj
+    (243) rrj
+    (244) ssj
+    (245) ttj
+    (246) uuj
+    (247) vvj
+    (248) wwj
+    (249) xxj
+    (250) yyj
+    (251) aak
+    (252) bbk
+    (253) cck
+    (254) ddk
+    (255) eek
+    (256) ffk
+    (257) ggk
+    (258) hhk
+    (259) iik
+    (260) jjk
+    (261) kkk
+    (262) llk
+    (263) mmk
+    (264) nnk
+    (265) ook
+    (266) ppk
+    (267) qqk
+    (268) rrk
+    (269) ssk
+    (270) ttk
+    (271) uuk
+    (272) vvk
+    (273) wwk
+    (274) xxk
+    (275) yyk
+    (276) aal
+    (277) bbl
+    (278) ccl
+    (279) ddl
+    (280) eel
+    (281) ffl
+    (282) ggl
+    (283) hhl
+    (284) iil
+    (285) jjl
+    (286) kkl
+    (287) lll
+    (288) mml
+    (289) nnl
+    (290) ool
+    (291) ppl
+    (292) qql
+    (293) rrl
+    (294) ssl
+    (295) ttl
+    (296) uul
+    (297) vvl
+    (298) wwl
+    (299) xxl
+    (300) yyl
+    (301) aam
+    (302) bbm
+    (303) ccm
+    (304) ddm
+    (305) eem
+    (306) ffm
+    (307) ggm
+    (308) hhm
+    (309) iim
+    (310) jjm
+    (311) kkm
+    (312) llm
+    (313) mmm
+    (314) nnm
+    (315) oom
+    (316) ppm
+    (317) qqm
+    (318) rrm
+    (319) ssm
+    (320) ttm
+    (321) uum
+    (322) vvm
+    (323) wwm
+    (324) xxm
+    (325) yym
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering81.out b/test/tests/conf-gold/numbering/numbering81.out
new file mode 100644
index 0000000..fc38eca
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering81.out
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+  
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+    (4) ddd
+    (5) eee
+    (6) fff
+    (7) ggg
+    (8) hhh
+    (9) iii
+    (10) jjj
+    (11) kkk
+    (12) lll
+    (13) mmm
+    (14) nnn
+    (15) ooo
+    (16) ppp
+    (17) qqq
+    (18) rrr
+    (19) sss
+    (20) ttt
+    (21) uuu
+    (22) vvv
+    (23) www
+    (24) xxx
+    (25) yyy
+    (26) aab
+    (27) bbb
+    (28) ccb
+    (29) ddb
+    (30) eeb
+    (31) ffb
+    (32) ggb
+    (33) hhb
+    (34) iib
+    (35) jjb
+    (36) kkb
+    (37) llb
+    (38) mmb
+    (39) nnb
+    (40) oob
+    (41) ppb
+    (42) qqb
+    (43) rrb
+    (44) ssb
+    (45) ttb
+    (46) uub
+    (47) vvb
+    (48) wwb
+    (49) xxb
+    (50) yyb
+    (51) aac
+    (52) bbc
+    (53) ccc
+    (54) ddc
+    (55) eec
+    (56) ffc
+    (57) ggc
+    (58) hhc
+    (59) iic
+    (60) jjc
+    (61) kkc
+    (62) llc
+    (63) mmc
+    (64) nnc
+    (65) ooc
+    (66) ppc
+    (67) qqc
+    (68) rrc
+    (69) ssc
+    (70) ttc
+    (71) uuc
+    (72) vvc
+    (73) wwc
+    (74) xxc
+    (75) yyc
+    (76) aad
+    (77) bbd
+    (78) ccd
+    (79) ddd
+    (80) eed
+    (81) ffd
+    (82) ggd
+    (83) hhd
+    (84) iid
+    (85) jjd
+    (86) kkd
+    (87) lld
+    (88) mmd
+    (89) nnd
+    (90) ood
+    (91) ppd
+    (92) qqd
+    (93) rrd
+    (94) ssd
+    (95) ttd
+    (96) uud
+    (97) vvd
+    (98) wwd
+    (99) xxd
+    (100) yyd
+    (101) aae
+    (102) bbe
+    (103) cce
+    (104) dde
+    (105) eee
+    (106) ffe
+    (107) gge
+    (108) hhe
+    (109) iie
+    (110) jje
+    (111) kke
+    (112) lle
+    (113) mme
+    (114) nne
+    (115) ooe
+    (116) ppe
+    (117) qqe
+    (118) rre
+    (119) sse
+    (120) tte
+    (121) uue
+    (122) vve
+    (123) wwe
+    (124) xxe
+    (125) yye
+    (126) aaf
+    (127) bbf
+    (128) ccf
+    (129) ddf
+    (130) eef
+    (131) fff
+    (132) ggf
+    (133) hhf
+    (134) iif
+    (135) jjf
+    (136) kkf
+    (137) llf
+    (138) mmf
+    (139) nnf
+    (140) oof
+    (141) ppf
+    (142) qqf
+    (143) rrf
+    (144) ssf
+    (145) ttf
+    (146) uuf
+    (147) vvf
+    (148) wwf
+    (149) xxf
+    (150) yyf
+    (151) aag
+    (152) bbg
+    (153) ccg
+    (154) ddg
+    (155) eeg
+    (156) ffg
+    (157) ggg
+    (158) hhg
+    (159) iig
+    (160) jjg
+    (161) kkg
+    (162) llg
+    (163) mmg
+    (164) nng
+    (165) oog
+    (166) ppg
+    (167) qqg
+    (168) rrg
+    (169) ssg
+    (170) ttg
+    (171) uug
+    (172) vvg
+    (173) wwg
+    (174) xxg
+    (175) yyg
+    (176) aah
+    (177) bbh
+    (178) cch
+    (179) ddh
+    (180) eeh
+    (181) ffh
+    (182) ggh
+    (183) hhh
+    (184) iih
+    (185) jjh
+    (186) kkh
+    (187) llh
+    (188) mmh
+    (189) nnh
+    (190) ooh
+    (191) pph
+    (192) qqh
+    (193) rrh
+    (194) ssh
+    (195) tth
+    (196) uuh
+    (197) vvh
+    (198) wwh
+    (199) xxh
+    (200) yyh
+    (201) aai
+    (202) bbi
+    (203) cci
+    (204) ddi
+    (205) eei
+    (206) ffi
+    (207) ggi
+    (208) hhi
+    (209) iii
+    (210) jji
+    (211) kki
+    (212) lli
+    (213) mmi
+    (214) nni
+    (215) ooi
+    (216) ppi
+    (217) qqi
+    (218) rri
+    (219) ssi
+    (220) tti
+    (221) uui
+    (222) vvi
+    (223) wwi
+    (224) xxi
+    (225) yyi
+    (226) aaj
+    (227) bbj
+    (228) ccj
+    (229) ddj
+    (230) eej
+    (231) ffj
+    (232) ggj
+    (233) hhj
+    (234) iij
+    (235) jjj
+    (236) kkj
+    (237) llj
+    (238) mmj
+    (239) nnj
+    (240) ooj
+    (241) ppj
+    (242) qqj
+    (243) rrj
+    (244) ssj
+    (245) ttj
+    (246) uuj
+    (247) vvj
+    (248) wwj
+    (249) xxj
+    (250) yyj
+    (251) aak
+    (252) bbk
+    (253) cck
+    (254) ddk
+    (255) eek
+    (256) ffk
+    (257) ggk
+    (258) hhk
+    (259) iik
+    (260) jjk
+    (261) kkk
+    (262) llk
+    (263) mmk
+    (264) nnk
+    (265) ook
+    (266) ppk
+    (267) qqk
+    (268) rrk
+    (269) ssk
+    (270) ttk
+    (271) uuk
+    (272) vvk
+    (273) wwk
+    (274) xxk
+    (275) yyk
+    (276) aal
+    (277) bbl
+    (278) ccl
+    (279) ddl
+    (280) eel
+    (281) ffl
+    (282) ggl
+    (283) hhl
+    (284) iil
+    (285) jjl
+    (286) kkl
+    (287) lll
+    (288) mml
+    (289) nnl
+    (290) ool
+    (291) ppl
+    (292) qql
+    (293) rrl
+    (294) ssl
+    (295) ttl
+    (296) uul
+    (297) vvl
+    (298) wwl
+    (299) xxl
+    (300) yyl
+    (301) aam
+    (302) bbm
+    (303) ccm
+    (304) ddm
+    (305) eem
+    (306) ffm
+    (307) ggm
+    (308) hhm
+    (309) iim
+    (310) jjm
+    (311) kkm
+    (312) llm
+    (313) mmm
+    (314) nnm
+    (315) oom
+    (316) ppm
+    (317) qqm
+    (318) rrm
+    (319) ssm
+    (320) ttm
+    (321) uum
+    (322) vvm
+    (323) wwm
+    (324) xxm
+    (325) yym
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering82.out b/test/tests/conf-gold/numbering/numbering82.out
new file mode 100644
index 0000000..fbdb139
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering82.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: Test for source tree numbering
+: Level A
+: Level B
+: Level B
+: Level C
+: Level B
+: Level C
+: Level D
+: Level A
+: Level B
+: Level C
+: Level D
+: Level E
+: Level A
+: Level B
+: Level C
+: Level D
+: Level E
+: Level D
+: Level E
+: Level C
+: Level D
+: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering83.out b/test/tests/conf-gold/numbering/numbering83.out
new file mode 100644
index 0000000..f5ce2eb
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering83.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0: Test for source tree numbering
+0: Level A
+0: Level B
+0: Level B
+0: Level C
+0: Level B
+0: Level C
+0: Level D
+0: Level A
+0: Level B
+0: Level C
+0: Level D
+0: Level E
+0: Level A
+0: Level B
+0: Level C
+0: Level D
+0: Level E
+0: Level D
+0: Level E
+0: Level C
+0: Level D
+0: Level B
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering84.out b/test/tests/conf-gold/numbering/numbering84.out
new file mode 100644
index 0000000..7dade9b
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering84.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>: aaa
+: bbb
+: ccc
+: ddd
+: eee
+: fff
+: ggg
+: hhh
+: iii
+: jjj
+: kkk
+: lll
+: mmm
+: nnn
+: ooo
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering85.out b/test/tests/conf-gold/numbering/numbering85.out
new file mode 100644
index 0000000..47c1d25
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering85.out
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><o>1</o>
+<o>01</o>
+<o>A</o>
+<o>a</o>
+<o>I</o>
+
+<s>vii</s>
+<s>7</s>
+<s>07</s>
+<s>G</s>
+<s>g</s>
+<s>VII</s>
+
+<n>99</n>
+<n>99</n>
+<n>CU</n>
+<n>cu</n>
+<n>XCIX</n>
+
+<h>c</h>
+<h>100</h>
+<h>100</h>
+<h>CV</h>
+<h>cv</h>
+<h>C</h>
+
+<t>02</t>
+<t>2</t>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering86.out b/test/tests/conf-gold/numbering/numbering86.out
new file mode 100644
index 0000000..c279bf6
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering86.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:z="z.test.com">
+  
+    <znote number="1">aaa</znote>
+    <znote number="2">bbb</znote>
+    <znote number="3">ccc</znote>
+  
+  
+    <znote number="1">ddd</znote>
+    <znote number="2">eee</znote>
+    <znote number="3">fff</znote>
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering87.out b/test/tests/conf-gold/numbering/numbering87.out
new file mode 100644
index 0000000..6164975
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering87.out
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:z="z.test.com">
+  
+    <chapter-note number="1">aaa</chapter-note>
+    <znote number="1">bbb</znote>
+    <znote number="2">ccc</znote>
+  
+  
+    <znote number="3">ddd</znote>
+    <chapter-note number="1">eee</chapter-note>
+    <znote number="4">fff</znote>
+  
+  
+    <znote number="5">ggg</znote>
+    <znote number="6">hhh</znote>
+    <chapter-note number="1">iii</chapter-note>
+  
+  
+    <znote number="7">jjj</znote>
+    <znote number="8">kkk</znote>
+    <chapter-note number="1">lll</chapter-note>
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering88.out b/test/tests/conf-gold/numbering/numbering88.out
new file mode 100644
index 0000000..d606e59
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering88.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <chap number="1" position="2">aaa<sel number="1" position="1"/></chap>
+  <chap number="2" position="4">zzz<sel number="2" position="1"/></chap>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering89.out b/test/tests/conf-gold/numbering/numbering89.out
new file mode 100644
index 0000000..fb77eff
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering89.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <chap number="1" position="2">aaa
+<text number="1" position="1"/><sel number="1" position="2"/>
+<text number="2" position="3"/><sel number="2" position="4"/>
+<text number="3" position="5"/></chap>
+  <chap number="2" position="4">zzz
+<text number="1" position="1"/><sel number="1" position="2"/>
+<text number="2" position="3"/><sel number="2" position="4"/>
+<text number="3" position="5"/></chap>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering90.out b/test/tests/conf-gold/numbering/numbering90.out
new file mode 100644
index 0000000..81dd40d
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering90.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    bbb
+    ccc
+    (2) ddd
+    (3) eee
+  
+  fff
+  (1) ggg
+  (2) hhh
+  
+    (1) iii
+    (2) jjj
+    kkk
+    (3) lll
+    mmm
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering91.out b/test/tests/conf-gold/numbering/numbering91.out
new file mode 100644
index 0000000..3351a91
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering91.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  (no) a
+  (1) b
+  (no) c
+  (2) d
+  (no) e
+  (no) f
+  (3) g
+  (no) h
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering92.out b/test/tests/conf-gold/numbering/numbering92.out
new file mode 100644
index 0000000..449f57e
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering92.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    <znote number="1">aaa</znote>
+    <znote number="2">bbb</znote>
+    <znote number="3">ccc</znote>
+  
+  
+    <znote number="1">ddd</znote>
+    <znote number="2">eee</znote>
+    <znote number="3">fff</znote>
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering93.out b/test/tests/conf-gold/numbering/numbering93.out
new file mode 100644
index 0000000..7a718d7
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering93.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    <bnote number="1">aaa</bnote>
+    <bnote number="2">bbb</bnote>
+    <bnote number="3">ccc</bnote>
+  
+  
+    <bnote number="1">ddd</bnote>
+    <bnote number="2">eee</bnote>
+    <bnote number="3">fff</bnote>
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering94.out b/test/tests/conf-gold/numbering/numbering94.out
new file mode 100644
index 0000000..7f30e28
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering94.out
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+  
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+    (4) ddd
+    (5) eee
+    (6) fff
+    (7) ggg
+    (8) hhh
+    (9) iii
+    (10) jjj
+    (11) kkk
+    (12) lll
+    (13) mmm
+    (14) nnn
+    (15) ooo
+    (16) ppp
+    (17) qqq
+    (18) rrr
+    (19) sss
+    (20) ttt
+    (21) uuu
+    (22) vvv
+    (23) www
+    (24) xxx
+    (25) yyy
+    (26) aab
+    (27) bbb
+    (28) ccb
+    (29) ddb
+    (30) eeb
+    (31) ffb
+    (32) ggb
+    (33) hhb
+    (34) iib
+    (35) jjb
+    (36) kkb
+    (37) llb
+    (38) mmb
+    (39) nnb
+    (40) oob
+    (41) ppb
+    (42) qqb
+    (43) rrb
+    (44) ssb
+    (45) ttb
+    (46) uub
+    (47) vvb
+    (48) wwb
+    (49) xxb
+    (50) yyb
+    (51) aac
+    (52) bbc
+    (53) ccc
+    (54) ddc
+    (55) eec
+    (56) ffc
+    (57) ggc
+    (58) hhc
+    (59) iic
+    (60) jjc
+    (61) kkc
+    (62) llc
+    (63) mmc
+    (64) nnc
+    (65) ooc
+    (66) ppc
+    (67) qqc
+    (68) rrc
+    (69) ssc
+    (70) ttc
+    (71) uuc
+    (72) vvc
+    (73) wwc
+    (74) xxc
+    (75) yyc
+    (76) aad
+    (77) bbd
+    (78) ccd
+    (79) ddd
+    (80) eed
+    (81) ffd
+    (82) ggd
+    (83) hhd
+    (84) iid
+    (85) jjd
+    (86) kkd
+    (87) lld
+    (88) mmd
+    (89) nnd
+    (90) ood
+    (91) ppd
+    (92) qqd
+    (93) rrd
+    (94) ssd
+    (95) ttd
+    (96) uud
+    (97) vvd
+    (98) wwd
+    (99) xxd
+    (1:00) yyd
+    (1:01) aae
+    (1:02) bbe
+    (1:03) cce
+    (1:04) dde
+    (1:05) eee
+    (1:06) ffe
+    (1:07) gge
+    (1:08) hhe
+    (1:09) iie
+    (1:10) jje
+    (1:11) kke
+    (1:12) lle
+    (1:13) mme
+    (1:14) nne
+    (1:15) ooe
+    (1:16) ppe
+    (1:17) qqe
+    (1:18) rre
+    (1:19) sse
+    (1:20) tte
+    (1:21) uue
+    (1:22) vve
+    (1:23) wwe
+    (1:24) xxe
+    (1:25) yye
+    (1:26) aaf
+    (1:27) bbf
+    (1:28) ccf
+    (1:29) ddf
+    (1:30) eef
+    (1:31) fff
+    (1:32) ggf
+    (1:33) hhf
+    (1:34) iif
+    (1:35) jjf
+    (1:36) kkf
+    (1:37) llf
+    (1:38) mmf
+    (1:39) nnf
+    (1:40) oof
+    (1:41) ppf
+    (1:42) qqf
+    (1:43) rrf
+    (1:44) ssf
+    (1:45) ttf
+    (1:46) uuf
+    (1:47) vvf
+    (1:48) wwf
+    (1:49) xxf
+    (1:50) yyf
+    (1:51) aag
+    (1:52) bbg
+    (1:53) ccg
+    (1:54) ddg
+    (1:55) eeg
+    (1:56) ffg
+    (1:57) ggg
+    (1:58) hhg
+    (1:59) iig
+    (1:60) jjg
+    (1:61) kkg
+    (1:62) llg
+    (1:63) mmg
+    (1:64) nng
+    (1:65) oog
+    (1:66) ppg
+    (1:67) qqg
+    (1:68) rrg
+    (1:69) ssg
+    (1:70) ttg
+    (1:71) uug
+    (1:72) vvg
+    (1:73) wwg
+    (1:74) xxg
+    (1:75) yyg
+    (1:76) aah
+    (1:77) bbh
+    (1:78) cch
+    (1:79) ddh
+    (1:80) eeh
+    (1:81) ffh
+    (1:82) ggh
+    (1:83) hhh
+    (1:84) iih
+    (1:85) jjh
+    (1:86) kkh
+    (1:87) llh
+    (1:88) mmh
+    (1:89) nnh
+    (1:90) ooh
+    (1:91) pph
+    (1:92) qqh
+    (1:93) rrh
+    (1:94) ssh
+    (1:95) tth
+    (1:96) uuh
+    (1:97) vvh
+    (1:98) wwh
+    (1:99) xxh
+    (2:00) yyh
+    (2:01) aai
+    (2:02) bbi
+    (2:03) cci
+    (2:04) ddi
+    (2:05) eei
+    (2:06) ffi
+    (2:07) ggi
+    (2:08) hhi
+    (2:09) iii
+    (2:10) jji
+    (2:11) kki
+    (2:12) lli
+    (2:13) mmi
+    (2:14) nni
+    (2:15) ooi
+    (2:16) ppi
+    (2:17) qqi
+    (2:18) rri
+    (2:19) ssi
+    (2:20) tti
+    (2:21) uui
+    (2:22) vvi
+    (2:23) wwi
+    (2:24) xxi
+    (2:25) yyi
+    (2:26) aaj
+    (2:27) bbj
+    (2:28) ccj
+    (2:29) ddj
+    (2:30) eej
+    (2:31) ffj
+    (2:32) ggj
+    (2:33) hhj
+    (2:34) iij
+    (2:35) jjj
+    (2:36) kkj
+    (2:37) llj
+    (2:38) mmj
+    (2:39) nnj
+    (2:40) ooj
+    (2:41) ppj
+    (2:42) qqj
+    (2:43) rrj
+    (2:44) ssj
+    (2:45) ttj
+    (2:46) uuj
+    (2:47) vvj
+    (2:48) wwj
+    (2:49) xxj
+    (2:50) yyj
+    (2:51) aak
+    (2:52) bbk
+    (2:53) cck
+    (2:54) ddk
+    (2:55) eek
+    (2:56) ffk
+    (2:57) ggk
+    (2:58) hhk
+    (2:59) iik
+    (2:60) jjk
+    (2:61) kkk
+    (2:62) llk
+    (2:63) mmk
+    (2:64) nnk
+    (2:65) ook
+    (2:66) ppk
+    (2:67) qqk
+    (2:68) rrk
+    (2:69) ssk
+    (2:70) ttk
+    (2:71) uuk
+    (2:72) vvk
+    (2:73) wwk
+    (2:74) xxk
+    (2:75) yyk
+    (2:76) aal
+    (2:77) bbl
+    (2:78) ccl
+    (2:79) ddl
+    (2:80) eel
+    (2:81) ffl
+    (2:82) ggl
+    (2:83) hhl
+    (2:84) iil
+    (2:85) jjl
+    (2:86) kkl
+    (2:87) lll
+    (2:88) mml
+    (2:89) nnl
+    (2:90) ool
+    (2:91) ppl
+    (2:92) qql
+    (2:93) rrl
+    (2:94) ssl
+    (2:95) ttl
+    (2:96) uul
+    (2:97) vvl
+    (2:98) wwl
+    (2:99) xxl
+    (3:00) yyl
+    (3:01) aam
+    (3:02) bbm
+    (3:03) ccm
+    (3:04) ddm
+    (3:05) eem
+    (3:06) ffm
+    (3:07) ggm
+    (3:08) hhm
+    (3:09) iim
+    (3:10) jjm
+    (3:11) kkm
+    (3:12) llm
+    (3:13) mmm
+    (3:14) nnm
+    (3:15) oom
+    (3:16) ppm
+    (3:17) qqm
+    (3:18) rrm
+    (3:19) ssm
+    (3:20) ttm
+    (3:21) uum
+    (3:22) vvm
+    (3:23) wwm
+    (3:24) xxm
+    (3:25) yym
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/numbering/numbering95.out b/test/tests/conf-gold/numbering/numbering95.out
new file mode 100644
index 0000000..a2a3047
--- /dev/null
+++ b/test/tests/conf-gold/numbering/numbering95.out
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+  
+  
+    (1) aaa
+    (2) bbb
+    (3) ccc
+    (4) ddd
+    (5) eee
+    (6) fff
+    (7) ggg
+    (8) hhh
+    (9) iii
+    (10) jjj
+    (11) kkk
+    (12) lll
+    (13) mmm
+    (14) nnn
+    (15) ooo
+    (16) ppp
+    (17) qqq
+    (18) rrr
+    (19) sss
+    (20) ttt
+    (21) uuu
+    (22) vvv
+    (23) www
+    (24) xxx
+    (25) yyy
+    (26) aab
+    (27) bbb
+    (28) ccb
+    (29) ddb
+    (30) eeb
+    (31) ffb
+    (32) ggb
+    (33) hhb
+    (34) iib
+    (35) jjb
+    (36) kkb
+    (37) llb
+    (38) mmb
+    (39) nnb
+    (40) oob
+    (41) ppb
+    (42) qqb
+    (43) rrb
+    (44) ssb
+    (45) ttb
+    (46) uub
+    (47) vvb
+    (48) wwb
+    (49) xxb
+    (50) yyb
+    (51) aac
+    (52) bbc
+    (53) ccc
+    (54) ddc
+    (55) eec
+    (56) ffc
+    (57) ggc
+    (58) hhc
+    (59) iic
+    (60) jjc
+    (61) kkc
+    (62) llc
+    (63) mmc
+    (64) nnc
+    (65) ooc
+    (66) ppc
+    (67) qqc
+    (68) rrc
+    (69) ssc
+    (70) ttc
+    (71) uuc
+    (72) vvc
+    (73) wwc
+    (74) xxc
+    (75) yyc
+    (76) aad
+    (77) bbd
+    (78) ccd
+    (79) ddd
+    (80) eed
+    (81) ffd
+    (82) ggd
+    (83) hhd
+    (84) iid
+    (85) jjd
+    (86) kkd
+    (87) lld
+    (88) mmd
+    (89) nnd
+    (90) ood
+    (91) ppd
+    (92) qqd
+    (93) rrd
+    (94) ssd
+    (95) ttd
+    (96) uud
+    (97) vvd
+    (98) wwd
+    (99) xxd
+    (1 00) yyd
+    (1 01) aae
+    (1 02) bbe
+    (1 03) cce
+    (1 04) dde
+    (1 05) eee
+    (1 06) ffe
+    (1 07) gge
+    (1 08) hhe
+    (1 09) iie
+    (1 10) jje
+    (1 11) kke
+    (1 12) lle
+    (1 13) mme
+    (1 14) nne
+    (1 15) ooe
+    (1 16) ppe
+    (1 17) qqe
+    (1 18) rre
+    (1 19) sse
+    (1 20) tte
+    (1 21) uue
+    (1 22) vve
+    (1 23) wwe
+    (1 24) xxe
+    (1 25) yye
+    (1 26) aaf
+    (1 27) bbf
+    (1 28) ccf
+    (1 29) ddf
+    (1 30) eef
+    (1 31) fff
+    (1 32) ggf
+    (1 33) hhf
+    (1 34) iif
+    (1 35) jjf
+    (1 36) kkf
+    (1 37) llf
+    (1 38) mmf
+    (1 39) nnf
+    (1 40) oof
+    (1 41) ppf
+    (1 42) qqf
+    (1 43) rrf
+    (1 44) ssf
+    (1 45) ttf
+    (1 46) uuf
+    (1 47) vvf
+    (1 48) wwf
+    (1 49) xxf
+    (1 50) yyf
+    (1 51) aag
+    (1 52) bbg
+    (1 53) ccg
+    (1 54) ddg
+    (1 55) eeg
+    (1 56) ffg
+    (1 57) ggg
+    (1 58) hhg
+    (1 59) iig
+    (1 60) jjg
+    (1 61) kkg
+    (1 62) llg
+    (1 63) mmg
+    (1 64) nng
+    (1 65) oog
+    (1 66) ppg
+    (1 67) qqg
+    (1 68) rrg
+    (1 69) ssg
+    (1 70) ttg
+    (1 71) uug
+    (1 72) vvg
+    (1 73) wwg
+    (1 74) xxg
+    (1 75) yyg
+    (1 76) aah
+    (1 77) bbh
+    (1 78) cch
+    (1 79) ddh
+    (1 80) eeh
+    (1 81) ffh
+    (1 82) ggh
+    (1 83) hhh
+    (1 84) iih
+    (1 85) jjh
+    (1 86) kkh
+    (1 87) llh
+    (1 88) mmh
+    (1 89) nnh
+    (1 90) ooh
+    (1 91) pph
+    (1 92) qqh
+    (1 93) rrh
+    (1 94) ssh
+    (1 95) tth
+    (1 96) uuh
+    (1 97) vvh
+    (1 98) wwh
+    (1 99) xxh
+    (2 00) yyh
+    (2 01) aai
+    (2 02) bbi
+    (2 03) cci
+    (2 04) ddi
+    (2 05) eei
+    (2 06) ffi
+    (2 07) ggi
+    (2 08) hhi
+    (2 09) iii
+    (2 10) jji
+    (2 11) kki
+    (2 12) lli
+    (2 13) mmi
+    (2 14) nni
+    (2 15) ooi
+    (2 16) ppi
+    (2 17) qqi
+    (2 18) rri
+    (2 19) ssi
+    (2 20) tti
+    (2 21) uui
+    (2 22) vvi
+    (2 23) wwi
+    (2 24) xxi
+    (2 25) yyi
+    (2 26) aaj
+    (2 27) bbj
+    (2 28) ccj
+    (2 29) ddj
+    (2 30) eej
+    (2 31) ffj
+    (2 32) ggj
+    (2 33) hhj
+    (2 34) iij
+    (2 35) jjj
+    (2 36) kkj
+    (2 37) llj
+    (2 38) mmj
+    (2 39) nnj
+    (2 40) ooj
+    (2 41) ppj
+    (2 42) qqj
+    (2 43) rrj
+    (2 44) ssj
+    (2 45) ttj
+    (2 46) uuj
+    (2 47) vvj
+    (2 48) wwj
+    (2 49) xxj
+    (2 50) yyj
+    (2 51) aak
+    (2 52) bbk
+    (2 53) cck
+    (2 54) ddk
+    (2 55) eek
+    (2 56) ffk
+    (2 57) ggk
+    (2 58) hhk
+    (2 59) iik
+    (2 60) jjk
+    (2 61) kkk
+    (2 62) llk
+    (2 63) mmk
+    (2 64) nnk
+    (2 65) ook
+    (2 66) ppk
+    (2 67) qqk
+    (2 68) rrk
+    (2 69) ssk
+    (2 70) ttk
+    (2 71) uuk
+    (2 72) vvk
+    (2 73) wwk
+    (2 74) xxk
+    (2 75) yyk
+    (2 76) aal
+    (2 77) bbl
+    (2 78) ccl
+    (2 79) ddl
+    (2 80) eel
+    (2 81) ffl
+    (2 82) ggl
+    (2 83) hhl
+    (2 84) iil
+    (2 85) jjl
+    (2 86) kkl
+    (2 87) lll
+    (2 88) mml
+    (2 89) nnl
+    (2 90) ool
+    (2 91) ppl
+    (2 92) qql
+    (2 93) rrl
+    (2 94) ssl
+    (2 95) ttl
+    (2 96) uul
+    (2 97) vvl
+    (2 98) wwl
+    (2 99) xxl
+    (3 00) yyl
+    (3 01) aam
+    (3 02) bbm
+    (3 03) ccm
+    (3 04) ddm
+    (3 05) eem
+    (3 06) ffm
+    (3 07) ggm
+    (3 08) hhm
+    (3 09) iim
+    (3 10) jjm
+    (3 11) kkm
+    (3 12) llm
+    (3 13) mmm
+    (3 14) nnm
+    (3 15) oom
+    (3 16) ppm
+    (3 17) qqm
+    (3 18) rrm
+    (3 19) ssm
+    (3 20) ttm
+    (3 21) uum
+    (3 22) vvm
+    (3 23) wwm
+    (3 24) xxm
+    (3 25) yym
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/Test 31 Gif.gif b/test/tests/conf-gold/output/Test 31 Gif.gif
new file mode 100644
index 0000000..7c11fb8
--- /dev/null
+++ b/test/tests/conf-gold/output/Test 31 Gif.gif
Binary files differ
diff --git a/test/tests/conf-gold/output/output01.out b/test/tests/conf-gold/output/output01.out
new file mode 100644
index 0000000..d4fc4a3
--- /dev/null
+++ b/test/tests/conf-gold/output/output01.out
@@ -0,0 +1,15 @@
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<SCRIPT>
+        
+        document.write("<P>Hi Oren");
+        if((2 < 5) & (6 < 3))
+        {
+          ...
+        }
+        
+      </SCRIPT>
+</HEAD>
+<BODY></BODY>
+</HTML>
diff --git a/test/tests/conf-gold/output/output02.out b/test/tests/conf-gold/output/output02.out
new file mode 100644
index 0000000..f9c3639
--- /dev/null
+++ b/test/tests/conf-gold/output/output02.out
@@ -0,0 +1,11 @@
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<STYLE>
+        
+        <>&
+        
+      </STYLE>
+</HEAD>
+<BODY></BODY>
+</HTML>
diff --git a/test/tests/conf-gold/output/output03.out b/test/tests/conf-gold/output/output03.out
new file mode 100644
index 0000000..b963ec1
--- /dev/null
+++ b/test/tests/conf-gold/output/output03.out
@@ -0,0 +1,3 @@
+<HTML>
+<BODY><P>&nbsp;</P></BODY>
+</HTML>
diff --git a/test/tests/conf-gold/output/output04.out b/test/tests/conf-gold/output/output04.out
new file mode 100644
index 0000000..e4593e0
--- /dev/null
+++ b/test/tests/conf-gold/output/output04.out
@@ -0,0 +1,7 @@
+<HTML>
+<P>@</P>
+<P>&nbsp;</P>
+<P>~</P>
+<P>&copy;</P>
+<P>&Egrave;</P>
+</HTML>
diff --git a/test/tests/conf-gold/output/output05.out b/test/tests/conf-gold/output/output05.out
new file mode 100644
index 0000000..1a94397
--- /dev/null
+++ b/test/tests/conf-gold/output/output05.out
@@ -0,0 +1,16 @@
+<HTML>
+<TABLE>
+<tr>
+<td><img src="image1.gif"></td>
+</tr>
+<tr>
+<td><img src="image2.gif"></td>
+</tr>
+<tr>
+<td><applet code="clock.class"></applet></td>
+</tr>
+<tr>
+<td><object></object></td>
+</tr>
+</TABLE>
+</HTML>
diff --git a/test/tests/conf-gold/output/output06.out b/test/tests/conf-gold/output/output06.out
new file mode 100644
index 0000000..721bb7e
--- /dev/null
+++ b/test/tests/conf-gold/output/output06.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out><P>&nbsp;</P></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output07.out b/test/tests/conf-gold/output/output07.out
new file mode 100644
index 0000000..bc73d9c
--- /dev/null
+++ b/test/tests/conf-gold/output/output07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>&lt;P&gt;&amp;nbsp;&lt;/P&gt;</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output08.out b/test/tests/conf-gold/output/output08.out
new file mode 100644
index 0000000..8fbd78b
--- /dev/null
+++ b/test/tests/conf-gold/output/output08.out
@@ -0,0 +1,6 @@
+<HTML>
+<BODY>
+<P>&lt;P&gt;&amp;nbsp;&lt;/P&gt;</P>
+<P><P>&nbsp;</P></P>
+</BODY>
+</HTML>
diff --git a/test/tests/conf-gold/output/output09.out b/test/tests/conf-gold/output/output09.out
new file mode 100644
index 0000000..7516866
--- /dev/null
+++ b/test/tests/conf-gold/output/output09.out
@@ -0,0 +1,3 @@
+<HTML>
+<BODY>@ ~ ! +@ ~ ! +</BODY>
+</HTML>
diff --git a/test/tests/conf-gold/output/output10.out b/test/tests/conf-gold/output/output10.out
new file mode 100644
index 0000000..721bb7e
--- /dev/null
+++ b/test/tests/conf-gold/output/output10.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out><P>&nbsp;</P></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output100.out b/test/tests/conf-gold/output/output100.out
new file mode 100644
index 0000000..c07a60b
--- /dev/null
+++ b/test/tests/conf-gold/output/output100.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>should NOT be wrapped</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output101.out b/test/tests/conf-gold/output/output101.out
new file mode 100644
index 0000000..fafb46e
--- /dev/null
+++ b/test/tests/conf-gold/output/output101.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="http://baz.com"><![CDATA[should be wrapped]]></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output102.out b/test/tests/conf-gold/output/output102.out
new file mode 100644
index 0000000..a203ad2
--- /dev/null
+++ b/test/tests/conf-gold/output/output102.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<baz:out xmlns:baz="http://baz.com"><![CDATA[should be wrapped]]></baz:out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output103.out b/test/tests/conf-gold/output/output103.out
new file mode 100644
index 0000000..a203ad2
--- /dev/null
+++ b/test/tests/conf-gold/output/output103.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<baz:out xmlns:baz="http://baz.com"><![CDATA[should be wrapped]]></baz:out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output104.out b/test/tests/conf-gold/output/output104.out
new file mode 100644
index 0000000..a203ad2
--- /dev/null
+++ b/test/tests/conf-gold/output/output104.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<baz:out xmlns:baz="http://baz.com"><![CDATA[should be wrapped]]></baz:out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output105.out b/test/tests/conf-gold/output/output105.out
new file mode 100644
index 0000000..fafb46e
--- /dev/null
+++ b/test/tests/conf-gold/output/output105.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns="http://baz.com"><![CDATA[should be wrapped]]></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output106.out b/test/tests/conf-gold/output/output106.out
new file mode 100644
index 0000000..a203ad2
--- /dev/null
+++ b/test/tests/conf-gold/output/output106.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<baz:out xmlns:baz="http://baz.com"><![CDATA[should be wrapped]]></baz:out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output107.out b/test/tests/conf-gold/output/output107.out
new file mode 100644
index 0000000..a203ad2
--- /dev/null
+++ b/test/tests/conf-gold/output/output107.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<baz:out xmlns:baz="http://baz.com"><![CDATA[should be wrapped]]></baz:out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output109.out b/test/tests/conf-gold/output/output109.out
new file mode 100644
index 0000000..3386842
--- /dev/null
+++ b/test/tests/conf-gold/output/output109.out
@@ -0,0 +1 @@
+onetwo
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output11.out b/test/tests/conf-gold/output/output11.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/output/output11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output110.out b/test/tests/conf-gold/output/output110.out
new file mode 100644
index 0000000..c152966
--- /dev/null
+++ b/test/tests/conf-gold/output/output110.out
@@ -0,0 +1 @@
+|Here is my LRE|
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output111.out b/test/tests/conf-gold/output/output111.out
new file mode 100644
index 0000000..eab9102
--- /dev/null
+++ b/test/tests/conf-gold/output/output111.out
@@ -0,0 +1 @@
+|Here is my element|
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output112.out b/test/tests/conf-gold/output/output112.out
new file mode 100644
index 0000000..3386842
--- /dev/null
+++ b/test/tests/conf-gold/output/output112.out
@@ -0,0 +1 @@
+onetwo
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output113.out b/test/tests/conf-gold/output/output113.out
new file mode 100644
index 0000000..3386842
--- /dev/null
+++ b/test/tests/conf-gold/output/output113.out
@@ -0,0 +1 @@
+onetwo
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output114.out b/test/tests/conf-gold/output/output114.out
new file mode 100644
index 0000000..a3d013d
--- /dev/null
+++ b/test/tests/conf-gold/output/output114.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><!----></out>
diff --git a/test/tests/conf-gold/output/output12.out b/test/tests/conf-gold/output/output12.out
new file mode 100644
index 0000000..b122330
--- /dev/null
+++ b/test/tests/conf-gold/output/output12.out
@@ -0,0 +1 @@
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output13.out b/test/tests/conf-gold/output/output13.out
new file mode 100644
index 0000000..1bbbcc6
--- /dev/null
+++ b/test/tests/conf-gold/output/output13.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE out SYSTEM "out.dtd">
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output14.out b/test/tests/conf-gold/output/output14.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/output/output14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output15.out b/test/tests/conf-gold/output/output15.out
new file mode 100644
index 0000000..809e62c
--- /dev/null
+++ b/test/tests/conf-gold/output/output15.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE out PUBLIC "-//BOAG//DTD Websites V1.3//EN" "out.dtd">
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output16.out b/test/tests/conf-gold/output/output16.out
new file mode 100644
index 0000000..5f960c5
--- /dev/null
+++ b/test/tests/conf-gold/output/output16.out
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML SYSTEM "html.dtd">
+<HTML></HTML>
diff --git a/test/tests/conf-gold/output/output17.out b/test/tests/conf-gold/output/output17.out
new file mode 100644
index 0000000..99f1478
--- /dev/null
+++ b/test/tests/conf-gold/output/output17.out
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML></HTML>
diff --git a/test/tests/conf-gold/output/output18.out b/test/tests/conf-gold/output/output18.out
new file mode 100644
index 0000000..321d85b
--- /dev/null
+++ b/test/tests/conf-gold/output/output18.out
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "html.dtd">
+<HTML></HTML>
diff --git a/test/tests/conf-gold/output/output19.out b/test/tests/conf-gold/output/output19.out
new file mode 100644
index 0000000..1bc05e4
--- /dev/null
+++ b/test/tests/conf-gold/output/output19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<out><test>Testing</test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output20.out b/test/tests/conf-gold/output/output20.out
new file mode 100644
index 0000000..6dd12a3
--- /dev/null
+++ b/test/tests/conf-gold/output/output20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="SHIFT_JIS"?>
+<out><test>Testing</test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output21.out b/test/tests/conf-gold/output/output21.out
new file mode 100644
index 0000000..6575ea6
--- /dev/null
+++ b/test/tests/conf-gold/output/output21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="BIG5"?>
+<out><test>Testing</test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output22.out b/test/tests/conf-gold/output/output22.out
new file mode 100644
index 0000000..452a24a
--- /dev/null
+++ b/test/tests/conf-gold/output/output22.out
@@ -0,0 +1 @@
+L–¤£nÁÂÃÄÅÆÇÈÉÑÒÓÔÕÖ×ØÙâãäåæçèé@ðñòóôõö÷øù@‚ƒ„…†‡ˆ‰‘’“”•–—˜™¢£¤¥¦§¨©La–¤£n
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output23.out b/test/tests/conf-gold/output/output23.out
new file mode 100644
index 0000000..f3bb151
--- /dev/null
+++ b/test/tests/conf-gold/output/output23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-2022-JP"?>
+<out><test>Testing</test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output24.out b/test/tests/conf-gold/output/output24.out
new file mode 100644
index 0000000..b74c401
--- /dev/null
+++ b/test/tests/conf-gold/output/output24.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    1. "¥"  <A attr="¥"/>
+    2. """  <A attr="&quot;"/>
+    3. "&lt;"    <A attr="&lt;"/>
+    4. "&gt;"    <A attr="&gt;"/>
+    5. "&amp;"   <A attr="&amp;"/>
+    6. "#"  <A attr="#"/>
+    7. "'"  <A attr="'"/>
+    8. " "  <A attr=" "/><img src="Test 31 Gif.gif"/>
+    9. "©"  <A attr="©"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output25.out b/test/tests/conf-gold/output/output25.out
new file mode 100644
index 0000000..c56676a
--- /dev/null
+++ b/test/tests/conf-gold/output/output25.out
@@ -0,0 +1,16 @@
+We are aware of the following bugs (SPR ID# and description):
+DMAN4H3TBV: Test harness needs robustness review for L1T, L2T, L2D setups. ( lre01)
+DMAN4H3VML: Attribute values fail to override in DOM scenario. ( nspc03)
+DMAN4H429H: Torture test of format-number obtains garbage. ( numberformat10)
+DMAN4H6RZ2: Use of position() inside for-each loop has different behavior under TX scenario. ( pos10)
+EFAR4H2RQ6: LotusXSL: include a batch file that will combine the JAR files. ( )
+PDIK4D2JJ7: The escaping of quotes in inlined JavaScript died again. ( )
+PDIK4D2JP5: Escaping of attribute quotes wasn't being done correctly when method="html".. ( outp31)
+PDIK4D2JPR: Equality comparisons with nodesets and other nodesets, strings, and numbers not to spec.. ( )
+PDIK4DJS4Q: cdata-section-elements not outputing literal result element correctly. ( outp42,outp43,outp46)
+PDIK4DRPKM: Use of 9/5 in a xpath expression generates a cryptic error message. ( spr02)
+PDIK4E6MR3: Concat() does not check for number of arguments.. ( str105)
+PDIK4E6NZE: Stylesheet should not contain more then 1 template with the same name.. ( ntmp06)
+PDIK4ERNDJ: Errors messages are overly verbose. Simplify where possible.. ( )
+PDIK4EUNA6: "xsl:element" created element does not acquire namespace prefixes from stylesheet.. ( lre07)
+
diff --git a/test/tests/conf-gold/output/output26.out b/test/tests/conf-gold/output/output26.out
new file mode 100644
index 0000000..914318b
--- /dev/null
+++ b/test/tests/conf-gold/output/output26.out
@@ -0,0 +1 @@
+¬two¬222¬©2000
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output27.out b/test/tests/conf-gold/output/output27.out
new file mode 100644
index 0000000..29981b4
--- /dev/null
+++ b/test/tests/conf-gold/output/output27.out
@@ -0,0 +1,5 @@
+<HTML>
+<BODY>
+<out>a</out>
+</BODY>
+</HTML>
diff --git a/test/tests/conf-gold/output/output28.out b/test/tests/conf-gold/output/output28.out
new file mode 100644
index 0000000..2ede005
--- /dev/null
+++ b/test/tests/conf-gold/output/output28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<out><example><![CDATA[this character: ]]>&#10052;<![CDATA[ is a snowflake.]]></example></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output29.out b/test/tests/conf-gold/output/output29.out
new file mode 100644
index 0000000..a73f572
--- /dev/null
+++ b/test/tests/conf-gold/output/output29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[]]]]></example></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output30.out b/test/tests/conf-gold/output/output30.out
new file mode 100644
index 0000000..3cc32be
--- /dev/null
+++ b/test/tests/conf-gold/output/output30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[]]]]><![CDATA[>]]></example></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output32.out b/test/tests/conf-gold/output/output32.out
new file mode 100644
index 0000000..f4293e1
--- /dev/null
+++ b/test/tests/conf-gold/output/output32.out
@@ -0,0 +1 @@
+<HTML><Q cite="b%C3%AB.xml"></Q></HTML>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output33.out b/test/tests/conf-gold/output/output33.out
new file mode 100644
index 0000000..5ccf129
--- /dev/null
+++ b/test/tests/conf-gold/output/output33.out
@@ -0,0 +1 @@
+<HTML><area tabindex="2"><base><basefont><br><col><frame><hr width="100"><img><input><isindex><link><meta><param></HTML>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output34.out b/test/tests/conf-gold/output/output34.out
new file mode 100644
index 0000000..fccf6b7
--- /dev/null
+++ b/test/tests/conf-gold/output/output34.out
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML SYSTEM "html">
+<HTML><Area><bAse><BaseFont><Br><Col><framE><Hr><IMG><inPut><isIndex><liNk><metA><Param></HTML>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output35.out b/test/tests/conf-gold/output/output35.out
new file mode 100644
index 0000000..290fb35
--- /dev/null
+++ b/test/tests/conf-gold/output/output35.out
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<HTML>
+<Option selected></Option>
+</HTML>
diff --git a/test/tests/conf-gold/output/output36.out b/test/tests/conf-gold/output/output36.out
new file mode 100644
index 0000000..0f55d1b
--- /dev/null
+++ b/test/tests/conf-gold/output/output36.out
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<HTML><?my-pi href="book.css" type="text/css">
+</HTML>
diff --git a/test/tests/conf-gold/output/output37.out b/test/tests/conf-gold/output/output37.out
new file mode 100644
index 0000000..bec8c3c
--- /dev/null
+++ b/test/tests/conf-gold/output/output37.out
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<HTML>
+<Body bgcolor="&{randomrbg};"></Body>
+</HTML>
diff --git a/test/tests/conf-gold/output/output38.out b/test/tests/conf-gold/output/output38.out
new file mode 100644
index 0000000..d35425b
--- /dev/null
+++ b/test/tests/conf-gold/output/output38.out
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<Body>Hi</Body>
+</HEAD>
+</HTML>
diff --git a/test/tests/conf-gold/output/output39.out b/test/tests/conf-gold/output/output39.out
new file mode 100644
index 0000000..f33e0ac
--- /dev/null
+++ b/test/tests/conf-gold/output/output39.out
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<HTML><Body></Body></HTML>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output40.out b/test/tests/conf-gold/output/output40.out
new file mode 100644
index 0000000..3ee3bab
--- /dev/null
+++ b/test/tests/conf-gold/output/output40.out
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<root>
+<Out> this tests nothing </Out>
+<Out> this tests something </Out>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<Body></Body>
+</HEAD>
+</root>
diff --git a/test/tests/conf-gold/output/output41.out b/test/tests/conf-gold/output/output41.out
new file mode 100644
index 0000000..0a0fab4
--- /dev/null
+++ b/test/tests/conf-gold/output/output41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<example><![CDATA[]]]]><![CDATA[>]]></example>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output42.out b/test/tests/conf-gold/output/output42.out
new file mode 100644
index 0000000..924c438
--- /dev/null
+++ b/test/tests/conf-gold/output/output42.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[<foo>]]></example>
+<example><![CDATA[>>>HELLO<<<]]></example>
+<test><![CDATA[>>>HELLO<<<]]></test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output43.out b/test/tests/conf-gold/output/output43.out
new file mode 100644
index 0000000..1456a19
--- /dev/null
+++ b/test/tests/conf-gold/output/output43.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example>&gt;&gt;&gt;SHOULD NOT BE WRAPPED WITH cdata section&lt;&lt;&lt;</example>
+<test><![CDATA[>>>SHOULD BE WRAPPED WITH cdata section<<<]]></test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output44.out b/test/tests/conf-gold/output/output44.out
new file mode 100644
index 0000000..c6fb8d4
--- /dev/null
+++ b/test/tests/conf-gold/output/output44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<example>SHOULD have XML Declaration</example>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output45.out b/test/tests/conf-gold/output/output45.out
new file mode 100644
index 0000000..b912300
--- /dev/null
+++ b/test/tests/conf-gold/output/output45.out
@@ -0,0 +1 @@
+<example>SHOULD NOT have XML Declaration</example>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output46.out b/test/tests/conf-gold/output/output46.out
new file mode 100644
index 0000000..7bdb587
--- /dev/null
+++ b/test/tests/conf-gold/output/output46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[<foo>]]></example><plain>bar &amp; ban</plain><test><![CDATA[!>]]></test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output47.out b/test/tests/conf-gold/output/output47.out
new file mode 100644
index 0000000..0346693
--- /dev/null
+++ b/test/tests/conf-gold/output/output47.out
@@ -0,0 +1 @@
+<out>This is &lt;b&gt;BOLD1&lt;/b&gt; text.</out>
diff --git a/test/tests/conf-gold/output/output48.out b/test/tests/conf-gold/output/output48.out
new file mode 100644
index 0000000..0efcdf6
--- /dev/null
+++ b/test/tests/conf-gold/output/output48.out
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<root>
+ Please <b>BOLD THIS</b> now.
+ </root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output49.out b/test/tests/conf-gold/output/output49.out
new file mode 100644
index 0000000..a3b3f9b
--- /dev/null
+++ b/test/tests/conf-gold/output/output49.out
@@ -0,0 +1,5 @@
+<HTML>
+<foo name="<abcd>"></foo>
+<h1 title="<contacts>">People</h1>
+<frame name="z<this>z">
+</HTML>
diff --git a/test/tests/conf-gold/output/output50.out b/test/tests/conf-gold/output/output50.out
new file mode 100644
index 0000000..dcd8a42
--- /dev/null
+++ b/test/tests/conf-gold/output/output50.out
@@ -0,0 +1 @@
+<out>This is <b>BOLD1</b> text.</out>
diff --git a/test/tests/conf-gold/output/output51.out b/test/tests/conf-gold/output/output51.out
new file mode 100644
index 0000000..71f5648
--- /dev/null
+++ b/test/tests/conf-gold/output/output51.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+<Out>Test of indent</Out>
+<Out>Test of indent</Out>
+</root>
diff --git a/test/tests/conf-gold/output/output52.out b/test/tests/conf-gold/output/output52.out
new file mode 100644
index 0000000..452c394
--- /dev/null
+++ b/test/tests/conf-gold/output/output52.out
@@ -0,0 +1,5 @@
+<html>
+<body>
+<a href="#"><img src="image.jpg"></a>
+</body>
+</html>
diff --git a/test/tests/conf-gold/output/output53.out b/test/tests/conf-gold/output/output53.out
new file mode 100644
index 0000000..57f2cfe
--- /dev/null
+++ b/test/tests/conf-gold/output/output53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out><!--This should be inserted as-is.--></Out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output54.out b/test/tests/conf-gold/output/output54.out
new file mode 100644
index 0000000..68d0d37
--- /dev/null
+++ b/test/tests/conf-gold/output/output54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out><!--bcde--></Out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output55.out b/test/tests/conf-gold/output/output55.out
new file mode 100644
index 0000000..5c0212d
--- /dev/null
+++ b/test/tests/conf-gold/output/output55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out><!--comment fodder--></Out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output56.out b/test/tests/conf-gold/output/output56.out
new file mode 100644
index 0000000..c77dcca
--- /dev/null
+++ b/test/tests/conf-gold/output/output56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out><!--foo--></Out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output57.out b/test/tests/conf-gold/output/output57.out
new file mode 100644
index 0000000..9fd1057
--- /dev/null
+++ b/test/tests/conf-gold/output/output57.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Out><!--Comment content--></Out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output58.out b/test/tests/conf-gold/output/output58.out
new file mode 100644
index 0000000..34811bd
--- /dev/null
+++ b/test/tests/conf-gold/output/output58.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!--This should be inserted as-is.-->
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output59.out b/test/tests/conf-gold/output/output59.out
new file mode 100644
index 0000000..fdb93a1
--- /dev/null
+++ b/test/tests/conf-gold/output/output59.out
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<?my-pi href="book.css" type="text/css">
+<HTML>
+   Literal output
+ </HTML>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output60.out b/test/tests/conf-gold/output/output60.out
new file mode 100644
index 0000000..060663f
--- /dev/null
+++ b/test/tests/conf-gold/output/output60.out
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+<html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Sales Results By Division</title></head><body><table border="1"><tr><th>Division</th><th>Revenue</th><th>Growth</th><th>Bonus</th></tr><tr><td><em>North</em></td><td>10</td><td>9</td><td>7</td></tr><tr><td><em>West</em></td><td>6</td><td style="color:red">-1.5</td><td>2</td></tr><tr><td><em>South</em></td><td>4</td><td>3</td><td>4</td></tr></table></body></html>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output61.out b/test/tests/conf-gold/output/output61.out
new file mode 100644
index 0000000..721bb7e
--- /dev/null
+++ b/test/tests/conf-gold/output/output61.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out><P>&nbsp;</P></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output62.out b/test/tests/conf-gold/output/output62.out
new file mode 100644
index 0000000..2f32e29
--- /dev/null
+++ b/test/tests/conf-gold/output/output62.out
@@ -0,0 +1 @@
+<out><P>&nbsp;</P></out>
diff --git a/test/tests/conf-gold/output/output63.out b/test/tests/conf-gold/output/output63.out
new file mode 100644
index 0000000..08d5654
--- /dev/null
+++ b/test/tests/conf-gold/output/output63.out
@@ -0,0 +1,10 @@
+<HTML xmlns="http://www.w3.org/TR/REC-html40">
+<jsp:setProperty xmlns:jsp="http://www.w3.org/jsp" value="blah" property="blah" name="blah"/>
+<P/>
+<p/>
+<P/>
+<hr size="8"/>
+<hr size="8"/>
+<br/>
+<br/>
+</HTML>
diff --git a/test/tests/conf-gold/output/output64.out b/test/tests/conf-gold/output/output64.out
new file mode 100644
index 0000000..5387f36
--- /dev/null
+++ b/test/tests/conf-gold/output/output64.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML1.1//EN" "wml_11.xml">
+<wml>
+  a
+</wml>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output65.out b/test/tests/conf-gold/output/output65.out
new file mode 100644
index 0000000..21d6909
--- /dev/null
+++ b/test/tests/conf-gold/output/output65.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">a</html>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output66.out b/test/tests/conf-gold/output/output66.out
new file mode 100644
index 0000000..3e4f5ee
--- /dev/null
+++ b/test/tests/conf-gold/output/output66.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<root>Standalone set to no</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output67.out b/test/tests/conf-gold/output/output67.out
new file mode 100644
index 0000000..2492912
--- /dev/null
+++ b/test/tests/conf-gold/output/output67.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<root>Standalone set to yes</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output68.out b/test/tests/conf-gold/output/output68.out
new file mode 100644
index 0000000..1f0cb88
--- /dev/null
+++ b/test/tests/conf-gold/output/output68.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><!--XYZ--></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output69.out b/test/tests/conf-gold/output/output69.out
new file mode 100644
index 0000000..fc55cd4
--- /dev/null
+++ b/test/tests/conf-gold/output/output69.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><?my-pi XYZ?></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output70.out b/test/tests/conf-gold/output/output70.out
new file mode 100644
index 0000000..3c72fb2
--- /dev/null
+++ b/test/tests/conf-gold/output/output70.out
@@ -0,0 +1,9 @@
+<HTML>
+    Inside double quotes:
+    1. """  <A href="%22"></A>
+    2. "'"  <A href="'"></A>
+    Inside single quotes:
+    3. '"'  <A href="%22"></A>
+    4. '''  <A href="'"></A>
+    NOTE: hrefs always have the double quotes.
+  </HTML>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output71.out b/test/tests/conf-gold/output/output71.out
new file mode 100644
index 0000000..29981b4
--- /dev/null
+++ b/test/tests/conf-gold/output/output71.out
@@ -0,0 +1,5 @@
+<HTML>
+<BODY>
+<out>a</out>
+</BODY>
+</HTML>
diff --git a/test/tests/conf-gold/output/output72.out b/test/tests/conf-gold/output/output72.out
new file mode 100644
index 0000000..90ae0d7
--- /dev/null
+++ b/test/tests/conf-gold/output/output72.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <out><?my-pi href="book.css" type="text/css"?><?mytag Hello
+	 ? >
+  ?></out>
diff --git a/test/tests/conf-gold/output/output73.out b/test/tests/conf-gold/output/output73.out
new file mode 100644
index 0000000..1855512
--- /dev/null
+++ b/test/tests/conf-gold/output/output73.out
@@ -0,0 +1,6 @@
+<HTML>

+<HEAD>

+<META http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">

+</HEAD>

+<body>Hiragana ‚Ÿ ‚¯ ‚¿ ‚Ï ‚ß ‚ï</body>

+</HTML>

diff --git a/test/tests/conf-gold/output/output74.out b/test/tests/conf-gold/output/output74.out
new file mode 100644
index 0000000..a9a65a2
--- /dev/null
+++ b/test/tests/conf-gold/output/output74.out
@@ -0,0 +1,7 @@
+<html>
+<out1 attrib1="_<Whoa-No>_" attrib2="<<<P>>>"></out1>
+<out2 attrib3="_<Whoa-Yes>_" attrib4="<<<P>>>"></out2>
+<h1 title="_<Yes-Contacts>_">People</h1>
+<frame scrolling="yes" name="_<this>_">
+<out3><<<P>>></out3>
+</html>
diff --git a/test/tests/conf-gold/output/output75.out b/test/tests/conf-gold/output/output75.out
new file mode 100644
index 0000000..fcffe51
--- /dev/null
+++ b/test/tests/conf-gold/output/output75.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><xml>
+<out1 attrib1="_&lt;Whoa-No&gt;_" attrib2="&lt;&lt;&lt;P&gt;&gt;&gt;"/>
+<out2 attrib3="_&lt;Whoa-Yes&gt;_" attrib4="&lt;&lt;&lt;P&gt;&gt;&gt;"/>
+<out3><<<P>>></out3>
+</xml>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output76.out b/test/tests/conf-gold/output/output76.out
new file mode 100644
index 0000000..934ed79
--- /dev/null
+++ b/test/tests/conf-gold/output/output76.out
@@ -0,0 +1,15 @@
+a@
+     b@
+     c@
+     d@
+     e@
+     f@
+     g@
+     A-
+     B-
+     C-
+     D-
+     E-
+     F-
+     G-
+     
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output77.out b/test/tests/conf-gold/output/output77.out
new file mode 100644
index 0000000..85df70c
--- /dev/null
+++ b/test/tests/conf-gold/output/output77.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test>Testing</test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output78.out b/test/tests/conf-gold/output/output78.out
new file mode 100644
index 0000000..3b53c92
--- /dev/null
+++ b/test/tests/conf-gold/output/output78.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-6"?>
+<out><test>0626:&#1574;</test><test>062a:&#1578;</test></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output79.out b/test/tests/conf-gold/output/output79.out
new file mode 100644
index 0000000..33eb66e
--- /dev/null
+++ b/test/tests/conf-gold/output/output79.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-6"?>
+<out>
+0626:&#1574;
+062a:&#1578;
+C6:?
+CA:E
+0900-091f:&#2304;&#2305;&#2306;&#2307;&#2308;&#2309;&#2310;&#2311;&#2312;&#2313;&#2314;&#2315;&#2316;&#2317;&#2318;&#2319;&#2320;&#2321;&#2322;&#2323;&#2324;&#2325;&#2326;&#2327;&#2328;&#2329;&#2330;&#2331;&#2332;&#2333;&#2334;&#2335;
+0c90-0c9f:&#3216;&#3217;&#3218;&#3219;&#3220;&#3221;&#3222;&#3223;&#3224;&#3225;&#3226;&#3227;&#3228;&#3229;&#3230;&#3231;
+ff00:ff0f&#65280;&#65281;&#65282;&#65283;&#65284;&#65285;&#65286;&#65287;&#65288;&#65289;&#65290;&#65291;&#65292;&#65293;&#65294;&#65295;
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output80.out b/test/tests/conf-gold/output/output80.out
new file mode 100644
index 0000000..dcae8f0
--- /dev/null
+++ b/test/tests/conf-gold/output/output80.out
Binary files differ
diff --git a/test/tests/conf-gold/output/output81.out b/test/tests/conf-gold/output/output81.out
new file mode 100644
index 0000000..a22c32c
--- /dev/null
+++ b/test/tests/conf-gold/output/output81.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><?_a_pi foo?></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output82.out b/test/tests/conf-gold/output/output82.out
new file mode 100644
index 0000000..48060fb
--- /dev/null
+++ b/test/tests/conf-gold/output/output82.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
+<html lang="ja" xml:lang="ja">
+<head>
+<title>test</title>
+</head>
+<body>test</body>
+</html>
diff --git a/test/tests/conf-gold/output/output84.out b/test/tests/conf-gold/output/output84.out
new file mode 100644
index 0000000..c75f61a
--- /dev/null
+++ b/test/tests/conf-gold/output/output84.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xml:lang="en-US"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output85.out b/test/tests/conf-gold/output/output85.out
new file mode 100644
index 0000000..c75f61a
--- /dev/null
+++ b/test/tests/conf-gold/output/output85.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xml:lang="en-US"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output86.out b/test/tests/conf-gold/output/output86.out
new file mode 100644
index 0000000..81cee26
--- /dev/null
+++ b/test/tests/conf-gold/output/output86.out
@@ -0,0 +1 @@
+ÿtwoÿ222ÿ©2000
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output87.out b/test/tests/conf-gold/output/output87.out
new file mode 100644
index 0000000..d9910cb
--- /dev/null
+++ b/test/tests/conf-gold/output/output87.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<a><![CDATA[phoenix]]></a>
+<b><![CDATA[phony]]></b>
+<c><![CDATA[phonograph]]></c>
+<d><![CDATA[philibuster]]></d>
+<e>phrenology</e></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output88.out b/test/tests/conf-gold/output/output88.out
new file mode 100644
index 0000000..891f9ff
--- /dev/null
+++ b/test/tests/conf-gold/output/output88.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc>
+  <a><![CDATA[phoenix]]></a>
+  <b><![CDATA[phony]]></b>
+  <c><![CDATA[phonograph]]></c>
+  <d><![CDATA[philibuster]]></d>
+  <e>phrenology</e>
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output89.out b/test/tests/conf-gold/output/output89.out
new file mode 100644
index 0000000..bc3efe4
--- /dev/null
+++ b/test/tests/conf-gold/output/output89.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><!--This cannot be inserted as- -is.--></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output90.out b/test/tests/conf-gold/output/output90.out
new file mode 100644
index 0000000..a73314e
--- /dev/null
+++ b/test/tests/conf-gold/output/output90.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><!--This needs a space after- --></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output91.out b/test/tests/conf-gold/output/output91.out
new file mode 100644
index 0000000..f149e73
--- /dev/null
+++ b/test/tests/conf-gold/output/output91.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><![CDATA[foo]]></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output92.out b/test/tests/conf-gold/output/output92.out
new file mode 100644
index 0000000..f24ba03
--- /dev/null
+++ b/test/tests/conf-gold/output/output92.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[Text that should be enclosed]]></example></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output93.out b/test/tests/conf-gold/output/output93.out
new file mode 100644
index 0000000..c00b38b
--- /dev/null
+++ b/test/tests/conf-gold/output/output93.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[this is a section]]></example></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output94.out b/test/tests/conf-gold/output/output94.out
new file mode 100644
index 0000000..c7e819a
--- /dev/null
+++ b/test/tests/conf-gold/output/output94.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[this is a section]]><!--Comment in between--><![CDATA[another section]]></example></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output95.out b/test/tests/conf-gold/output/output95.out
new file mode 100644
index 0000000..9f1740c
--- /dev/null
+++ b/test/tests/conf-gold/output/output95.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[should be wrapped]]></example></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output96.out b/test/tests/conf-gold/output/output96.out
new file mode 100644
index 0000000..7a98a4f
--- /dev/null
+++ b/test/tests/conf-gold/output/output96.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><example><![CDATA[a section]]><sub>descendant text node</sub><![CDATA[one more section]]></example></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output97.out b/test/tests/conf-gold/output/output97.out
new file mode 100644
index 0000000..0402d31
--- /dev/null
+++ b/test/tests/conf-gold/output/output97.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><![CDATA[a section]]><sub>descendant text node</sub><![CDATA[one more]]></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output98.out b/test/tests/conf-gold/output/output98.out
new file mode 100644
index 0000000..7741107
--- /dev/null
+++ b/test/tests/conf-gold/output/output98.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<baz:out xmlns:baz="http://baz.com"><![CDATA[foo]]></baz:out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/output/output99.out b/test/tests/conf-gold/output/output99.out
new file mode 100644
index 0000000..079ca04
--- /dev/null
+++ b/test/tests/conf-gold/output/output99.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<baz:out xmlns:baz="http://baz.com">should NOT be wrapped</baz:out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position01.out b/test/tests/conf-gold/position/position01.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/position/position01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position02.out b/test/tests/conf-gold/position/position02.out
new file mode 100644
index 0000000..3cf72b8
--- /dev/null
+++ b/test/tests/conf-gold/position/position02.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4
+  1
+  2
+  3
+  4
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position03.out b/test/tests/conf-gold/position/position03.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/position/position03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position04.out b/test/tests/conf-gold/position/position04.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/position/position04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position05.out b/test/tests/conf-gold/position/position05.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/position/position05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position06.out b/test/tests/conf-gold/position/position06.out
new file mode 100644
index 0000000..3bcc546
--- /dev/null
+++ b/test/tests/conf-gold/position/position06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>8</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position07.out b/test/tests/conf-gold/position/position07.out
new file mode 100644
index 0000000..969ebd1
--- /dev/null
+++ b/test/tests/conf-gold/position/position07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>h</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position08.out b/test/tests/conf-gold/position/position08.out
new file mode 100644
index 0000000..5f28138
--- /dev/null
+++ b/test/tests/conf-gold/position/position08.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  1,
+  2,
+  3,
+  4
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position09.out b/test/tests/conf-gold/position/position09.out
new file mode 100644
index 0000000..5e4f738
--- /dev/null
+++ b/test/tests/conf-gold/position/position09.out
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  
+    1,
+    2,
+    3,
+  
+  
+    4,
+    5,
+    6,
+  
+  
+    7,
+    8,
+    9,
+  
+  
+    
+    
+    
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position10.out b/test/tests/conf-gold/position/position10.out
new file mode 100644
index 0000000..0df292b
--- /dev/null
+++ b/test/tests/conf-gold/position/position10.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1_6 2_2 3_4 4_3 5_1 6_5 
+  Now, sort the data...    
+    1_1 2_2 3_3 4_4 5_5 6_6 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position100.out b/test/tests/conf-gold/position/position100.out
new file mode 100644
index 0000000..67447d1
--- /dev/null
+++ b/test/tests/conf-gold/position/position100.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6 nodes on this axis:
+Root Node
+E: far-north
+E: north
+E: near-north
+E: center
+T:  Still Level-4
+           
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position101.out b/test/tests/conf-gold/position/position101.out
new file mode 100644
index 0000000..5118304
--- /dev/null
+++ b/test/tests/conf-gold/position/position101.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6 nodes on this axis:
+Root Node
+E: far-north
+E: north
+E: near-north
+E: center
+C:  Comment-4 
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position102.out b/test/tests/conf-gold/position/position102.out
new file mode 100644
index 0000000..d60937c
--- /dev/null
+++ b/test/tests/conf-gold/position/position102.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<local>Item a1 is in position 1</local>
+<local>Item a2 is in position 2</local>
+<local>Item a3 is in position 3</local>
+<direct>Item b1 is in position 1</direct>
+<direct>Item b2 is in position 2</direct>
+<direct>Item b3 is in position 3</direct>
+<apply level="main">Item c1 is in position 1</apply>
+<apply level="import">Item c1 is in position 1</apply>
+<apply level="main">Item c2 is in position 2</apply>
+<apply level="import">Item c2 is in position 2</apply>
+<apply level="main">Item c3 is in position 3</apply>
+<apply level="import">Item c3 is in position 3</apply></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position103.out b/test/tests/conf-gold/position/position103.out
new file mode 100644
index 0000000..b4f612f
--- /dev/null
+++ b/test/tests/conf-gold/position/position103.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1, 1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position104.out b/test/tests/conf-gold/position/position104.out
new file mode 100644
index 0000000..63e7d27
--- /dev/null
+++ b/test/tests/conf-gold/position/position104.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>must, XSLT</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position105.out b/test/tests/conf-gold/position/position105.out
new file mode 100644
index 0000000..501c956
--- /dev/null
+++ b/test/tests/conf-gold/position/position105.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>must, must</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position106.out b/test/tests/conf-gold/position/position106.out
new file mode 100644
index 0000000..5203777
--- /dev/null
+++ b/test/tests/conf-gold/position/position106.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Success</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position107.out b/test/tests/conf-gold/position/position107.out
new file mode 100644
index 0000000..55f1b0b
--- /dev/null
+++ b/test/tests/conf-gold/position/position107.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>last preceding: north-west1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position108.out b/test/tests/conf-gold/position/position108.out
new file mode 100644
index 0000000..a4d14ee
--- /dev/null
+++ b/test/tests/conf-gold/position/position108.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>last following: north-east2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position109.out b/test/tests/conf-gold/position/position109.out
new file mode 100644
index 0000000..c06f3f4
--- /dev/null
+++ b/test/tests/conf-gold/position/position109.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>north-west1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position11.out b/test/tests/conf-gold/position/position11.out
new file mode 100644
index 0000000..22b8863
--- /dev/null
+++ b/test/tests/conf-gold/position/position11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a, b, c, d, e, f</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position110.out b/test/tests/conf-gold/position/position110.out
new file mode 100644
index 0000000..c02e632
--- /dev/null
+++ b/test/tests/conf-gold/position/position110.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>north-east2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position111.out b/test/tests/conf-gold/position/position111.out
new file mode 100644
index 0000000..3223f6c
--- /dev/null
+++ b/test/tests/conf-gold/position/position111.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> OK OK OK OK OK</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position112.out b/test/tests/conf-gold/position/position112.out
new file mode 100644
index 0000000..c0169e6
--- /dev/null
+++ b/test/tests/conf-gold/position/position112.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>near-south-west, near-south, </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position113.out b/test/tests/conf-gold/position/position113.out
new file mode 100644
index 0000000..8e32818
--- /dev/null
+++ b/test/tests/conf-gold/position/position113.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>north, near-north, </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position12.out b/test/tests/conf-gold/position/position12.out
new file mode 100644
index 0000000..17a0947
--- /dev/null
+++ b/test/tests/conf-gold/position/position12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false,true,false,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position13.out b/test/tests/conf-gold/position/position13.out
new file mode 100644
index 0000000..d19be37
--- /dev/null
+++ b/test/tests/conf-gold/position/position13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true,true,true,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position14.out b/test/tests/conf-gold/position/position14.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/position/position14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position15.out b/test/tests/conf-gold/position/position15.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/position/position15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position16.out b/test/tests/conf-gold/position/position16.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position17.out b/test/tests/conf-gold/position/position17.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position18.out b/test/tests/conf-gold/position/position18.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position19.out b/test/tests/conf-gold/position/position19.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/position/position19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position20.out b/test/tests/conf-gold/position/position20.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position21.out b/test/tests/conf-gold/position/position21.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position22.out b/test/tests/conf-gold/position/position22.out
new file mode 100644
index 0000000..5d91c56
--- /dev/null
+++ b/test/tests/conf-gold/position/position22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>A</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position23.out b/test/tests/conf-gold/position/position23.out
new file mode 100644
index 0000000..482861d
--- /dev/null
+++ b/test/tests/conf-gold/position/position23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>C</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position24.out b/test/tests/conf-gold/position/position24.out
new file mode 100644
index 0000000..c06b85a
--- /dev/null
+++ b/test/tests/conf-gold/position/position24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true,true,true,true,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position25.out b/test/tests/conf-gold/position/position25.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position26.out b/test/tests/conf-gold/position/position26.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position27.out b/test/tests/conf-gold/position/position27.out
new file mode 100644
index 0000000..af3b53d
--- /dev/null
+++ b/test/tests/conf-gold/position/position27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>First: a+bc-Middle: d-ef+Last: g</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position28.out b/test/tests/conf-gold/position/position28.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/position/position28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position29.out b/test/tests/conf-gold/position/position29.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position30.out b/test/tests/conf-gold/position/position30.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position31.out b/test/tests/conf-gold/position/position31.out
new file mode 100644
index 0000000..fc324a7
--- /dev/null
+++ b/test/tests/conf-gold/position/position31.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  Group: 1
+     left front bracket
+     momentary button
+     toggle button
+     source select dial
+  Group: 2
+     power switch button
+     main panel light
+     selector light
+  Group: 1
+     right front bracket
+  Group: 2
+     top inner bracket
+  Group: 1
+     output select dial
+  Group: 3
+     frequency dial
+     voltage dial
+  Group: 1
+     power light
+  Group: 2
+     safety light
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position32.out b/test/tests/conf-gold/position/position32.out
new file mode 100644
index 0000000..aece7c9
--- /dev/null
+++ b/test/tests/conf-gold/position/position32.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+3
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position33.out b/test/tests/conf-gold/position/position33.out
new file mode 100644
index 0000000..d49647b
--- /dev/null
+++ b/test/tests/conf-gold/position/position33.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+1
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position34.out b/test/tests/conf-gold/position/position34.out
new file mode 100644
index 0000000..a040594
--- /dev/null
+++ b/test/tests/conf-gold/position/position34.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+2
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position35.out b/test/tests/conf-gold/position/position35.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position36.out b/test/tests/conf-gold/position/position36.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position37.out b/test/tests/conf-gold/position/position37.out
new file mode 100644
index 0000000..8a6c603
--- /dev/null
+++ b/test/tests/conf-gold/position/position37.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1. 1
+2. 2
+3. under2
+4. under3
+5. under4.5
+6. under5
+7. under6.5
+8. 7
+9. under7
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position38.out b/test/tests/conf-gold/position/position38.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/position/position38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position39.out b/test/tests/conf-gold/position/position39.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position40.out b/test/tests/conf-gold/position/position40.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position41.out b/test/tests/conf-gold/position/position41.out
new file mode 100644
index 0000000..4f6fd38
--- /dev/null
+++ b/test/tests/conf-gold/position/position41.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>From the x node...
+under2
+under3
+under4.5
+under5
+under6
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position42.out b/test/tests/conf-gold/position/position42.out
new file mode 100644
index 0000000..bb46ab7
--- /dev/null
+++ b/test/tests/conf-gold/position/position42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>7</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position43.out b/test/tests/conf-gold/position/position43.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position44.out b/test/tests/conf-gold/position/position44.out
new file mode 100644
index 0000000..c831c3b
--- /dev/null
+++ b/test/tests/conf-gold/position/position44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>5</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position45.out b/test/tests/conf-gold/position/position45.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/position/position45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position46.out b/test/tests/conf-gold/position/position46.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position47.out b/test/tests/conf-gold/position/position47.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position48.out b/test/tests/conf-gold/position/position48.out
new file mode 100644
index 0000000..684ff60
--- /dev/null
+++ b/test/tests/conf-gold/position/position48.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Order should be cfdaegb...
+    cfdaegb</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position49.out b/test/tests/conf-gold/position/position49.out
new file mode 100644
index 0000000..5e57fad
--- /dev/null
+++ b/test/tests/conf-gold/position/position49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><B>4</B></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position50.out b/test/tests/conf-gold/position/position50.out
new file mode 100644
index 0000000..6fb47ef
--- /dev/null
+++ b/test/tests/conf-gold/position/position50.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><B>3</B></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position51.out b/test/tests/conf-gold/position/position51.out
new file mode 100644
index 0000000..5305e38
--- /dev/null
+++ b/test/tests/conf-gold/position/position51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><B>1</B></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position52.out b/test/tests/conf-gold/position/position52.out
new file mode 100644
index 0000000..c831c3b
--- /dev/null
+++ b/test/tests/conf-gold/position/position52.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>5</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position53.out b/test/tests/conf-gold/position/position53.out
new file mode 100644
index 0000000..dcbeb26
--- /dev/null
+++ b/test/tests/conf-gold/position/position53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position54.out b/test/tests/conf-gold/position/position54.out
new file mode 100644
index 0000000..dcbeb26
--- /dev/null
+++ b/test/tests/conf-gold/position/position54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position55.out b/test/tests/conf-gold/position/position55.out
new file mode 100644
index 0000000..969ebd1
--- /dev/null
+++ b/test/tests/conf-gold/position/position55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>h</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position56.out b/test/tests/conf-gold/position/position56.out
new file mode 100644
index 0000000..ccd495c
--- /dev/null
+++ b/test/tests/conf-gold/position/position56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>g</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position57.out b/test/tests/conf-gold/position/position57.out
new file mode 100644
index 0000000..ccd495c
--- /dev/null
+++ b/test/tests/conf-gold/position/position57.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>g</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position58.out b/test/tests/conf-gold/position/position58.out
new file mode 100644
index 0000000..898c141
--- /dev/null
+++ b/test/tests/conf-gold/position/position58.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>e</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position59.out b/test/tests/conf-gold/position/position59.out
new file mode 100644
index 0000000..898c141
--- /dev/null
+++ b/test/tests/conf-gold/position/position59.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>e</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position60.out b/test/tests/conf-gold/position/position60.out
new file mode 100644
index 0000000..ebccdec
--- /dev/null
+++ b/test/tests/conf-gold/position/position60.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>34</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position61.out b/test/tests/conf-gold/position/position61.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/position/position61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position62.out b/test/tests/conf-gold/position/position62.out
new file mode 100644
index 0000000..d063df7
--- /dev/null
+++ b/test/tests/conf-gold/position/position62.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>234</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position63.out b/test/tests/conf-gold/position/position63.out
new file mode 100644
index 0000000..c17ace7
--- /dev/null
+++ b/test/tests/conf-gold/position/position63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>123</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position64.out b/test/tests/conf-gold/position/position64.out
new file mode 100644
index 0000000..609a7f3
--- /dev/null
+++ b/test/tests/conf-gold/position/position64.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>134</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position65.out b/test/tests/conf-gold/position/position65.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/position/position65.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position66.out b/test/tests/conf-gold/position/position66.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/position/position66.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position67.out b/test/tests/conf-gold/position/position67.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position67.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position68.out b/test/tests/conf-gold/position/position68.out
new file mode 100644
index 0000000..f33d4cd
--- /dev/null
+++ b/test/tests/conf-gold/position/position68.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>MSFT13,IBM23,Lotus33</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position69.out b/test/tests/conf-gold/position/position69.out
new file mode 100644
index 0000000..680d712
--- /dev/null
+++ b/test/tests/conf-gold/position/position69.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+IBM13,Lotus23,MSFT33
+IBM13,Lotus23,MSFT33
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position70.out b/test/tests/conf-gold/position/position70.out
new file mode 100644
index 0000000..a63300e
--- /dev/null
+++ b/test/tests/conf-gold/position/position70.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>A(1):attC(2): This is the 1st comment T(3):
+  text-in-doc
+  E(4):innerT(1):
+    inner-text
+    C(2): This is the 2nd comment E(3):subT(1):subtext
+T(4):
+    text-after
+  
+T(5):
+  text-in-doc2
+  E(6):inner2A(1):blatE(1):subT(1):subtext
+T(2):final-text
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position71.out b/test/tests/conf-gold/position/position71.out
new file mode 100644
index 0000000..5df5736
--- /dev/null
+++ b/test/tests/conf-gold/position/position71.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found PI: b-pi</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position72.out b/test/tests/conf-gold/position/position72.out
new file mode 100644
index 0000000..a276b48
--- /dev/null
+++ b/test/tests/conf-gold/position/position72.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>HERE
+            1.4
+            1.3
+          1.2
+        1.1
+      1
+    OUTER
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position73.out b/test/tests/conf-gold/position/position73.out
new file mode 100644
index 0000000..e2c5948
--- /dev/null
+++ b/test/tests/conf-gold/position/position73.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1. OUTER
+  2. 1
+    3. 1.1
+      4. 1.2
+        5. 1.3
+          6. 1.4
+            7. HERE
+            </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position74.out b/test/tests/conf-gold/position/position74.out
new file mode 100644
index 0000000..e53a13c
--- /dev/null
+++ b/test/tests/conf-gold/position/position74.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>HERE
+1. we 2. found
+              3. the 4. rest
+                5. of
+                  6. the 7. tree</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position75.out b/test/tests/conf-gold/position/position75.out
new file mode 100644
index 0000000..98b46ab
--- /dev/null
+++ b/test/tests/conf-gold/position/position75.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>B2,
+    B2,
+    B2;
+    A5,
+    A5;
+     This is the 2nd comment ,
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position76.out b/test/tests/conf-gold/position/position76.out
new file mode 100644
index 0000000..6904b06
--- /dev/null
+++ b/test/tests/conf-gold/position/position76.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xml</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position77.out b/test/tests/conf-gold/position/position77.out
new file mode 100644
index 0000000..88b7849
--- /dev/null
+++ b/test/tests/conf-gold/position/position77.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>immediate11
+====== tickers ======
+MSFT13,IBM23,Lotus33
+====== sectors ======
+unitedstates12,automotive22</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position78.out b/test/tests/conf-gold/position/position78.out
new file mode 100644
index 0000000..6855d22
--- /dev/null
+++ b/test/tests/conf-gold/position/position78.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>There are 5 preceding text nodes
+Position 1 is Item-3B
+      Position 2 is Item-3A
+      Position 3 is Item-2A
+    Position 4 is Item-1B
+  Position 5 is Item-1A
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position79.out b/test/tests/conf-gold/position/position79.out
new file mode 100644
index 0000000..9e21bfe
--- /dev/null
+++ b/test/tests/conf-gold/position/position79.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>There are 5 preceding text nodes
+Position 1 is Item-1A
+  Position 2 is Item-1B
+  Position 3 is Item-2A
+    Position 4 is Item-3A
+      Position 5 is Item-3B
+      </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position80.out b/test/tests/conf-gold/position/position80.out
new file mode 100644
index 0000000..f20f365
--- /dev/null
+++ b/test/tests/conf-gold/position/position80.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      Title= BBB<name last-of="2">section</name>
+      Title= CCC<name last-of="1">section</name>
+      Title= YYY<name last-of="1">section</name>
+      Title= ZZZ<name last-of="2">section</name></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position81.out b/test/tests/conf-gold/position/position81.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/position/position81.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position82.out b/test/tests/conf-gold/position/position82.out
new file mode 100644
index 0000000..dcbeb26
--- /dev/null
+++ b/test/tests/conf-gold/position/position82.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position83.out b/test/tests/conf-gold/position/position83.out
new file mode 100644
index 0000000..1c8c0ae
--- /dev/null
+++ b/test/tests/conf-gold/position/position83.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      Title= BBB<name last-of="2">section</name>
+      Title= CCC<name last-of="3">section</name>
+      Title= EEE<name last-of="4">section</name></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position84.out b/test/tests/conf-gold/position/position84.out
new file mode 100644
index 0000000..b33b95a
--- /dev/null
+++ b/test/tests/conf-gold/position/position84.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      Title= AAA<name first-of="4">title</name>
+      Title= BBB<name first-of="4">section</name>
+      Title= CCC<name first-of="5">section</name>
+      Title= DDD<name first-of="3">section</name>
+      Title= EEE<name first-of="3">section</name></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position85.out b/test/tests/conf-gold/position/position85.out
new file mode 100644
index 0000000..452f8d9
--- /dev/null
+++ b/test/tests/conf-gold/position/position85.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a, a, c, c, c</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position86.out b/test/tests/conf-gold/position/position86.out
new file mode 100644
index 0000000..cefaed6
--- /dev/null
+++ b/test/tests/conf-gold/position/position86.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out><footnote>hello</footnote>
+<footnote>goodbye</footnote>
+<footnote>aloha</footnote>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position87.out b/test/tests/conf-gold/position/position87.out
new file mode 100644
index 0000000..e3fd7d1
--- /dev/null
+++ b/test/tests/conf-gold/position/position87.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out><greeting>ahoy</greeting>
+<greeting>sayonara</greeting>
+<greeting>yo</greeting>
+<greeting>ciao</greeting>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position88.out b/test/tests/conf-gold/position/position88.out
new file mode 100644
index 0000000..59967f9
--- /dev/null
+++ b/test/tests/conf-gold/position/position88.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out><greeting>ahoy</greeting>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position89.out b/test/tests/conf-gold/position/position89.out
new file mode 100644
index 0000000..98b02bf
--- /dev/null
+++ b/test/tests/conf-gold/position/position89.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out><greeting>sayonara</greeting>
+<greeting>yo</greeting>
+<greeting>ciao</greeting>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position90.out b/test/tests/conf-gold/position/position90.out
new file mode 100644
index 0000000..ee7e6c3
--- /dev/null
+++ b/test/tests/conf-gold/position/position90.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out><greeting>aloha</greeting>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position91.out b/test/tests/conf-gold/position/position91.out
new file mode 100644
index 0000000..acd7242
--- /dev/null
+++ b/test/tests/conf-gold/position/position91.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<out>
+<noted>subsection A2c</noted></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position92.out b/test/tests/conf-gold/position/position92.out
new file mode 100644
index 0000000..40e308b
--- /dev/null
+++ b/test/tests/conf-gold/position/position92.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><x1>1</x1>
+<x6>2</x6>
+<xL>10</xL></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position93.out b/test/tests/conf-gold/position/position93.out
new file mode 100644
index 0000000..2ccc4b4
--- /dev/null
+++ b/test/tests/conf-gold/position/position93.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<a4>4th</a4>
+<a2>2nd</a2>
+<a1>1st</a1>
+<a3>3rd</a3>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position94.out b/test/tests/conf-gold/position/position94.out
new file mode 100644
index 0000000..80b3ab8
--- /dev/null
+++ b/test/tests/conf-gold/position/position94.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+In a, position() is 1 and last() is 2
+In b number 1, $a.pos=1 and $a.last=2
+In b number 2, $a.pos=1 and $a.last=2
+
+In a, position() is 2 and last() is 2
+In b number 1, $a.pos=2 and $a.last=2
+In b number 2, $a.pos=2 and $a.last=2
+In b number 3, $a.pos=2 and $a.last=2
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position95.out b/test/tests/conf-gold/position/position95.out
new file mode 100644
index 0000000..0021ddd
--- /dev/null
+++ b/test/tests/conf-gold/position/position95.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+a is at position 1
+a1 is at position 2
+b is at position 3
+b2 is at position 5
+c is at position 6
+c1 is at position 7
+c2 is at position 8
+c4 is at position 10</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position96.out b/test/tests/conf-gold/position/position96.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/position/position96.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position97.out b/test/tests/conf-gold/position/position97.out
new file mode 100644
index 0000000..33aa618
--- /dev/null
+++ b/test/tests/conf-gold/position/position97.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<tr row="1"><td side="left">a1</td><td side="right">a3</td></tr>
+<tr row="2"><td side="left"/><td side="right"/></tr>
+<tr row="3"><td side="left"/><td side="right"/></tr>
+<tr row="4"><td side="left"/><td side="right"/></tr>
+<tr row="5"><td side="left"/><td side="right"/></tr>
+<tr row="6"><td side="left"/><td side="right"/></tr>
+<tr row="7"><td side="left"/><td side="right"/></tr>
+<tr row="8"><td side="left"/><td side="right"/></tr>
+<tr row="9"><td side="left"/><td side="right"/></tr>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position98.out b/test/tests/conf-gold/position/position98.out
new file mode 100644
index 0000000..25af912
--- /dev/null
+++ b/test/tests/conf-gold/position/position98.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6 nodes on this axis:
+Root Node
+E: far-north
+E: north
+E: near-north
+E: center
+A: center-attr-3
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/position/position99.out b/test/tests/conf-gold/position/position99.out
new file mode 100644
index 0000000..91e593e
--- /dev/null
+++ b/test/tests/conf-gold/position/position99.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>5 nodes on this axis:
+Root Node
+E: far-north
+E: north
+E: near-north
+E: center
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate01.out b/test/tests/conf-gold/predicate/predicate01.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate02.out b/test/tests/conf-gold/predicate/predicate02.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate03.out b/test/tests/conf-gold/predicate/predicate03.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate04.out b/test/tests/conf-gold/predicate/predicate04.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate05.out b/test/tests/conf-gold/predicate/predicate05.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate06.out b/test/tests/conf-gold/predicate/predicate06.out
new file mode 100644
index 0000000..787b80b
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate06.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2
+    target
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate07.out b/test/tests/conf-gold/predicate/predicate07.out
new file mode 100644
index 0000000..ccfd2f2
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1234</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate08.out b/test/tests/conf-gold/predicate/predicate08.out
new file mode 100644
index 0000000..ccfd2f2
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1234</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate09.out b/test/tests/conf-gold/predicate/predicate09.out
new file mode 100644
index 0000000..c17ace7
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>123</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate10.out b/test/tests/conf-gold/predicate/predicate10.out
new file mode 100644
index 0000000..ccfd2f2
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1234</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate11.out b/test/tests/conf-gold/predicate/predicate11.out
new file mode 100644
index 0000000..787b80b
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate11.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2
+    target
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate12.out b/test/tests/conf-gold/predicate/predicate12.out
new file mode 100644
index 0000000..78e04fe
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate12.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12
+    target
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate13.out b/test/tests/conf-gold/predicate/predicate13.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate14.out b/test/tests/conf-gold/predicate/predicate14.out
new file mode 100644
index 0000000..9e40b2c
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1235</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate15.out b/test/tests/conf-gold/predicate/predicate15.out
new file mode 100644
index 0000000..238bffc
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>13</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate16.out b/test/tests/conf-gold/predicate/predicate16.out
new file mode 100644
index 0000000..9e40b2c
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1235</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate17.out b/test/tests/conf-gold/predicate/predicate17.out
new file mode 100644
index 0000000..e0b4675
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate17.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2
+    child2
+  3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate18.out b/test/tests/conf-gold/predicate/predicate18.out
new file mode 100644
index 0000000..9b33221
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>f</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate19.out b/test/tests/conf-gold/predicate/predicate19.out
new file mode 100644
index 0000000..b575e25
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>abcdq</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate20.out b/test/tests/conf-gold/predicate/predicate20.out
new file mode 100644
index 0000000..787b80b
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate20.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2
+    target
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate21.out b/test/tests/conf-gold/predicate/predicate21.out
new file mode 100644
index 0000000..99b9834
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4missed</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate22.out b/test/tests/conf-gold/predicate/predicate22.out
new file mode 100644
index 0000000..99b9834
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4missed</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate23.out b/test/tests/conf-gold/predicate/predicate23.out
new file mode 100644
index 0000000..c17ace7
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>123</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate24.out b/test/tests/conf-gold/predicate/predicate24.out
new file mode 100644
index 0000000..c17ace7
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>123</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate25.out b/test/tests/conf-gold/predicate/predicate25.out
new file mode 100644
index 0000000..c17ace7
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>123</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate26.out b/test/tests/conf-gold/predicate/predicate26.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate27.out b/test/tests/conf-gold/predicate/predicate27.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate28.out b/test/tests/conf-gold/predicate/predicate28.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate29.out b/test/tests/conf-gold/predicate/predicate29.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate30.out b/test/tests/conf-gold/predicate/predicate30.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate31.out b/test/tests/conf-gold/predicate/predicate31.out
new file mode 100644
index 0000000..c17ace7
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>123</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate32.out b/test/tests/conf-gold/predicate/predicate32.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate33.out b/test/tests/conf-gold/predicate/predicate33.out
new file mode 100644
index 0000000..c17ace7
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>123</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate34.out b/test/tests/conf-gold/predicate/predicate34.out
new file mode 100644
index 0000000..c17ace7
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate34.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>123</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate35.out b/test/tests/conf-gold/predicate/predicate35.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate36.out b/test/tests/conf-gold/predicate/predicate36.out
new file mode 100644
index 0000000..ccfd2f2
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1234</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate37.out b/test/tests/conf-gold/predicate/predicate37.out
new file mode 100644
index 0000000..3c22cec
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>( This is a B )</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate38.out b/test/tests/conf-gold/predicate/predicate38.out
new file mode 100644
index 0000000..378c4ec
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate38.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<predicate1>1 is 4,5,6,</predicate1>
+<predicate2>2 is 10,11,12,</predicate2>
+</out>
diff --git a/test/tests/conf-gold/predicate/predicate39.out b/test/tests/conf-gold/predicate/predicate39.out
new file mode 100644
index 0000000..ff30b93
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Text from child1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate40.out b/test/tests/conf-gold/predicate/predicate40.out
new file mode 100644
index 0000000..2d7e38f
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Text from child2 of second element (correct execution)</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate41.out b/test/tests/conf-gold/predicate/predicate41.out
new file mode 100644
index 0000000..2d7e38f
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Text from child2 of second element (correct execution)</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate42.out b/test/tests/conf-gold/predicate/predicate42.out
new file mode 100644
index 0000000..2d7e38f
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Text from child2 of second element (correct execution)</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate43.out b/test/tests/conf-gold/predicate/predicate43.out
new file mode 100644
index 0000000..c276d0f
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate43.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Text from first element (correct execution)
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate44.out b/test/tests/conf-gold/predicate/predicate44.out
new file mode 100644
index 0000000..aacff7c
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test executed successfully</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate45.out b/test/tests/conf-gold/predicate/predicate45.out
new file mode 100644
index 0000000..aacff7c
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test executed successfully</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate46.out b/test/tests/conf-gold/predicate/predicate46.out
new file mode 100644
index 0000000..aacff7c
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test executed successfully</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate47.out b/test/tests/conf-gold/predicate/predicate47.out
new file mode 100644
index 0000000..aacff7c
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test executed successfully</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate48.out b/test/tests/conf-gold/predicate/predicate48.out
new file mode 100755
index 0000000..80345ab
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate48.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>(a and b)</test-info><test-output>c d e f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate49.out b/test/tests/conf-gold/predicate/predicate49.out
new file mode 100755
index 0000000..569da14
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>((a or b) and c)</test-info><test-output>6 7 a b e f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate50.out b/test/tests/conf-gold/predicate/predicate50.out
new file mode 100755
index 0000000..0ad3b31
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate50.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>(a and (b or c) and d)</test-info><test-output>b d f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate51.out b/test/tests/conf-gold/predicate/predicate51.out
new file mode 100755
index 0000000..80d907c
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>(a and b or c and d)</test-info><test-output>3 7 b c d e f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate52.out b/test/tests/conf-gold/predicate/predicate52.out
new file mode 100755
index 0000000..642f84a
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate52.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>((a and b) or (c and d))</test-info><test-output>3 7 b c d e f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate53.out b/test/tests/conf-gold/predicate/predicate53.out
new file mode 100755
index 0000000..2b23629
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>(a or (b and c) or d)</test-info><test-output>1 3 5 6 7 8 9 a b c d e f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate54.out b/test/tests/conf-gold/predicate/predicate54.out
new file mode 100755
index 0000000..ff8c952
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>((a or b) and (c or d))</test-info><test-output>5 6 7 9 a b d e f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate55.out b/test/tests/conf-gold/predicate/predicate55.out
new file mode 100755
index 0000000..8246f6e
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>(a or b and c or d)</test-info><test-output>1 3 5 6 7 8 9 a b c d e f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate56.out b/test/tests/conf-gold/predicate/predicate56.out
new file mode 100755
index 0000000..2bbe74c
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><test-info>(a or b or c)</test-info><test-output>2 3 4 5 6 7 8 9 a b c d e f </test-output></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate57.out b/test/tests/conf-gold/predicate/predicate57.out
new file mode 100644
index 0000000..73d5fde
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate57.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>tr nodes: 8, tr nodes with 3 td children: 2
+<nodes>2.1, 2.2, 2.3
+  7.1, 7.2, 7.3
+  </nodes></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/predicate/predicate58.out b/test/tests/conf-gold/predicate/predicate58.out
new file mode 100644
index 0000000..1aebc68
--- /dev/null
+++ b/test/tests/conf-gold/predicate/predicate58.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>has ex: 2
+has ex, eq null: 1
+has ex, measure null: 4
+has ex, neq null: 1
+has ex, measure non-null: 1
+not has ex: 3
+not has ex, eq null: 4
+not has ex, measure null: 1
+has why, eq value: 1
+has why, neq value: 1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/processorinfo/processorinfo03.out b/test/tests/conf-gold/processorinfo/processorinfo03.out
new file mode 100644
index 0000000..1588e9d
--- /dev/null
+++ b/test/tests/conf-gold/processorinfo/processorinfo03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Xalan_URL_found</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri01.out b/test/tests/conf-gold/reluri/reluri01.out
new file mode 100644
index 0000000..f044734
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri01.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Case of: import, import, import import
+  importing level1_import1.xsl
+  
+		 
+  From stylesheet level1_import1.xsl: Text of one-tag
+  importing level2_import1.xsl
+
+		 
+  From stylesheet level2_import1.xsl: Text of two-tag
+  importing level3_import1.xsl
+
+		 
+  From  stylesheet level3_import1.xsl: Text of three-tag
+  importing final_imported.xsl
+
+		 
+  From stylesheet final_imported.xsl: Text of four-tag
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri02.out b/test/tests/conf-gold/reluri/reluri02.out
new file mode 100644
index 0000000..f363108
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri02.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Case of: import, import, include, import
+  importing level1_import2.xsl
+  
+		 
+  From stylesheet level1_import2.xsl: Text of one-tag
+  importing level2_include1.xsl
+
+		 
+  From stylesheet level2_include1.xsl: Text of two-tag
+  Including level3_import1.xsl
+
+		 
+  From  stylesheet level3_import1.xsl: Text of three-tag
+  importing final_imported.xsl
+
+		 
+  From stylesheet final_imported.xsl: Text of four-tag
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri03.out b/test/tests/conf-gold/reluri/reluri03.out
new file mode 100644
index 0000000..759ad7f
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri03.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Case of: import, include, import, import
+  importing level1_include1.xsl
+  
+		 
+  From stylesheet level1_include1.xsl: Text of one-tag
+  Including level2_import2.xsl 
+
+		 
+  From stylesheet level2_import2.xsl: Text of two-tag
+  importing level3_import1.xsl
+
+		 
+  From  stylesheet level3_import1.xsl: Text of three-tag
+  importing final_imported.xsl
+
+		 
+  From stylesheet final_imported.xsl: Text of four-tag
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri04.out b/test/tests/conf-gold/reluri/reluri04.out
new file mode 100644
index 0000000..f71696b
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri04.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Case of: import, include, include, import
+  importing level1_include2.xsl
+  
+		 
+  From stylesheet level1_include2.xsl: Text of one-tag
+  Including level2_include2.xsl
+
+		 
+  From stylesheet level2_include2.xsl: Text of two-tag
+  Including level3_import1.xsl
+
+		 
+  From  stylesheet level3_import1.xsl: Text of three-tag
+  importing final_imported.xsl
+
+		 
+  From stylesheet final_imported.xsl: Text of four-tag
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri05.out b/test/tests/conf-gold/reluri/reluri05.out
new file mode 100644
index 0000000..75713b6
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri05.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Case of: include, import, import, include
+  Including level1_import3.xsl
+  
+		 
+  From stylesheet level1_import3.xsl: Text of one-tag
+  importing level2_import3.xsl
+
+		 
+  From stylesheet level2_import3.xsl: Text of two-tag
+  importing level3_include1.xsl
+
+		 
+  From stylesheet level3_include1.xsl: Text of three-tag
+  Including final_included.xsl
+
+		 
+  From stylesheet final_included.xsl: Text of four-tag
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri06.out b/test/tests/conf-gold/reluri/reluri06.out
new file mode 100644
index 0000000..dbfc32c
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri06.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Case of: include, import, include, include
+  Including level1_import4.xsl
+  
+		 
+  From stylesheet level1_import4.xsl: Text of one-tag
+  importing level2_include3.xsl
+
+		 
+  From stylesheet level2_include3.xsl: Text of two-tag
+  Including level3_include1.xsl
+
+		 
+  From stylesheet level3_include1.xsl: Text of three-tag
+  Including final_included.xsl
+
+		 
+  From stylesheet final_included.xsl: Text of four-tag
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri07.out b/test/tests/conf-gold/reluri/reluri07.out
new file mode 100644
index 0000000..eb3856e
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri07.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Case of: include, include, import, include
+  Including level1_include3.xsl
+  
+		 
+  From stylesheet level1_include3.xsl: Text of one-tag
+  Including level2_import4.xsl
+
+		 
+  From stylesheet level2_import4.xsl: Text of two-tag
+  importing level3_include1.xsl
+
+		 
+  From stylesheet level3_include1.xsl: Text of three-tag
+  Including final_included.xsl
+
+		 
+  From stylesheet final_included.xsl: Text of four-tag
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri08.out b/test/tests/conf-gold/reluri/reluri08.out
new file mode 100644
index 0000000..53b8308
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri08.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Case of: include, include, include, include
+  Including level1_include4.xsl
+  
+		 
+  From stylesheet level1_include4.xsl: Text of one-tag
+  Including level2_include4.xsl
+
+		 
+  From stylesheet level2_include4.xsl: Text of two-tag
+  Including level3_include1.xsl
+
+		 
+  From stylesheet level3_include1.xsl: Text of three-tag
+  Including final_included.xsl
+
+		 
+  From stylesheet final_included.xsl: Text of four-tag
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/reluri/reluri09.out b/test/tests/conf-gold/reluri/reluri09.out
new file mode 100644
index 0000000..8350f60
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri09.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<out>
+<first>
+	<body>Watching the game, having a bud</body>
+</first>
+</out>
diff --git a/test/tests/conf-gold/reluri/reluri10.out b/test/tests/conf-gold/reluri/reluri10.out
new file mode 100644
index 0000000..0628e6a
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri10.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<body>Watching the game, having a bud</body>
+</out>
diff --git a/test/tests/conf-gold/reluri/reluri11.out b/test/tests/conf-gold/reluri/reluri11.out
new file mode 100644
index 0000000..0628e6a
--- /dev/null
+++ b/test/tests/conf-gold/reluri/reluri11.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<body>Watching the game, having a bud</body>
+</out>
diff --git a/test/tests/conf-gold/select/select01.out b/test/tests/conf-gold/select/select01.out
new file mode 100644
index 0000000..a85c72b
--- /dev/null
+++ b/test/tests/conf-gold/select/select01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>test</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select02.out b/test/tests/conf-gold/select/select02.out
new file mode 100644
index 0000000..3961b13
--- /dev/null
+++ b/test/tests/conf-gold/select/select02.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select03.out b/test/tests/conf-gold/select/select03.out
new file mode 100644
index 0000000..f3526da
--- /dev/null
+++ b/test/tests/conf-gold/select/select03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item type="x">c</item> <item type="y">d</item> </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select04.out b/test/tests/conf-gold/select/select04.out
new file mode 100644
index 0000000..e624b94
--- /dev/null
+++ b/test/tests/conf-gold/select/select04.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  This should come out fasolatido:
+  fasolatido
+  This should come out doremifasolatido:
+  doremifasolatido
+  This should come out do-do-remi-mi1-mi2fasolatido-fa--so-:
+  do-do-remi-mi1-mi2fasolatido-fa--so-
+  This should come out solatidoG#:
+  solatidoG#
+  This should come out relatidoABb:
+  relatidoABb
+  This should come out domitiACD:
+  domitiACD</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select05.out b/test/tests/conf-gold/select/select05.out
new file mode 100644
index 0000000..b9f0a48
--- /dev/null
+++ b/test/tests/conf-gold/select/select05.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>At the root, should say the name is ():
+  
+    We are way inside.
+  
+  name of parent is (inside)
+  
+  name of parent is (document-element)
+  
+  name of parent is ()
+  
+  
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select06.out b/test/tests/conf-gold/select/select06.out
new file mode 100644
index 0000000..e67d535
--- /dev/null
+++ b/test/tests/conf-gold/select/select06.out
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      Inside an A node
+      Finished C node: A1B2C1Finished C node: A1B2C2Finished C node: A1B2C3|
+            |
+            Finished C node: A1B3C4
+      Inside an A node
+      |
+            A2B4C5D3E1,Finished C node: A2B4C5
+      Inside an A node
+      |
+            A3B5C6D4E2,|
+            A3B5C6D5E3,Finished C node: A3B5C6|
+            |
+            A3B5C7D7E4,A3B5C7D7E5,A3B5C7D7E6,|
+            Finished C node: A3B5C7|
+            A3B9C8D9E7,Finished C node: A3B9C8</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select07.out b/test/tests/conf-gold/select/select07.out
new file mode 100644
index 0000000..6b584e8
--- /dev/null
+++ b/test/tests/conf-gold/select/select07.out
@@ -0,0 +1 @@
+content
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select08.out b/test/tests/conf-gold/select/select08.out
new file mode 100644
index 0000000..f5bf11a
--- /dev/null
+++ b/test/tests/conf-gold/select/select08.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Got a foo node;Got some other node;
+Got some other node;
+Got a wiz node;Got a foo node;</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select09.out b/test/tests/conf-gold/select/select09.out
new file mode 100644
index 0000000..f5bf11a
--- /dev/null
+++ b/test/tests/conf-gold/select/select09.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Got a foo node;Got some other node;
+Got some other node;
+Got a wiz node;Got a foo node;</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select10.out b/test/tests/conf-gold/select/select10.out
new file mode 100644
index 0000000..a31274a
--- /dev/null
+++ b/test/tests/conf-gold/select/select10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Felix,Sylvester,TopCat,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select11.out b/test/tests/conf-gold/select/select11.out
new file mode 100644
index 0000000..d68b44c
--- /dev/null
+++ b/test/tests/conf-gold/select/select11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Anne,Elissa,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select12.out b/test/tests/conf-gold/select/select12.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/select/select12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select13.out b/test/tests/conf-gold/select/select13.out
new file mode 100644
index 0000000..70bb43a
--- /dev/null
+++ b/test/tests/conf-gold/select/select13.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> Top comment 
+ Upper Middle comment 
+ Lower Middle comment 
+ Bottom comment 
+Found the tag...
+item1
+item2
+item3
+subitem1
+subitem2
+subsubitem
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select14.out b/test/tests/conf-gold/select/select14.out
new file mode 100644
index 0000000..3f43832
--- /dev/null
+++ b/test/tests/conf-gold/select/select14.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>preceding sibling number 1
+following sibling number 3
+cousin 3
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select15.out b/test/tests/conf-gold/select/select15.out
new file mode 100644
index 0000000..87ac535
--- /dev/null
+++ b/test/tests/conf-gold/select/select15.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>OK
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select16.out b/test/tests/conf-gold/select/select16.out
new file mode 100644
index 0000000..87ac535
--- /dev/null
+++ b/test/tests/conf-gold/select/select16.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>OK
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select17.out b/test/tests/conf-gold/select/select17.out
new file mode 100644
index 0000000..9a8421b
--- /dev/null
+++ b/test/tests/conf-gold/select/select17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><!-- Good --></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select18.out b/test/tests/conf-gold/select/select18.out
new file mode 100644
index 0000000..9a8421b
--- /dev/null
+++ b/test/tests/conf-gold/select/select18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><!-- Good --></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select19.out b/test/tests/conf-gold/select/select19.out
new file mode 100644
index 0000000..d3dfee4
--- /dev/null
+++ b/test/tests/conf-gold/select/select19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>36</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select20.out b/test/tests/conf-gold/select/select20.out
new file mode 100644
index 0000000..d3dfee4
--- /dev/null
+++ b/test/tests/conf-gold/select/select20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>36</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select21.out b/test/tests/conf-gold/select/select21.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/select/select21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select22.out b/test/tests/conf-gold/select/select22.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/select/select22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select23.out b/test/tests/conf-gold/select/select23.out
new file mode 100644
index 0000000..98105e8
--- /dev/null
+++ b/test/tests/conf-gold/select/select23.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>15</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select24.out b/test/tests/conf-gold/select/select24.out
new file mode 100644
index 0000000..98105e8
--- /dev/null
+++ b/test/tests/conf-gold/select/select24.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>15</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select25.out b/test/tests/conf-gold/select/select25.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/select/select25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select26.out b/test/tests/conf-gold/select/select26.out
new file mode 100644
index 0000000..98105e8
--- /dev/null
+++ b/test/tests/conf-gold/select/select26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>15</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select27.out b/test/tests/conf-gold/select/select27.out
new file mode 100644
index 0000000..1439485
--- /dev/null
+++ b/test/tests/conf-gold/select/select27.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>20</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select28.out b/test/tests/conf-gold/select/select28.out
new file mode 100644
index 0000000..1439485
--- /dev/null
+++ b/test/tests/conf-gold/select/select28.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>20</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select29.out b/test/tests/conf-gold/select/select29.out
new file mode 100644
index 0000000..0ac751f
--- /dev/null
+++ b/test/tests/conf-gold/select/select29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>40</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select30.out b/test/tests/conf-gold/select/select30.out
new file mode 100644
index 0000000..83fa197
--- /dev/null
+++ b/test/tests/conf-gold/select/select30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>45</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select31.out b/test/tests/conf-gold/select/select31.out
new file mode 100644
index 0000000..b0497da
--- /dev/null
+++ b/test/tests/conf-gold/select/select31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>y9</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select32.out b/test/tests/conf-gold/select/select32.out
new file mode 100644
index 0000000..2be9edb
--- /dev/null
+++ b/test/tests/conf-gold/select/select32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>wxy</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select33.out b/test/tests/conf-gold/select/select33.out
new file mode 100644
index 0000000..bb46ab7
--- /dev/null
+++ b/test/tests/conf-gold/select/select33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>7</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select34.out b/test/tests/conf-gold/select/select34.out
new file mode 100644
index 0000000..f75df01
--- /dev/null
+++ b/test/tests/conf-gold/select/select34.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>16</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select35.out b/test/tests/conf-gold/select/select35.out
new file mode 100644
index 0000000..dcbeb26
--- /dev/null
+++ b/test/tests/conf-gold/select/select35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>6</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select36.out b/test/tests/conf-gold/select/select36.out
new file mode 100644
index 0000000..c831c3b
--- /dev/null
+++ b/test/tests/conf-gold/select/select36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>5</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select37.out b/test/tests/conf-gold/select/select37.out
new file mode 100644
index 0000000..a38c1a0
--- /dev/null
+++ b/test/tests/conf-gold/select/select37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>3</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select38.out b/test/tests/conf-gold/select/select38.out
new file mode 100644
index 0000000..526cacd
--- /dev/null
+++ b/test/tests/conf-gold/select/select38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>24</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select39.out b/test/tests/conf-gold/select/select39.out
new file mode 100644
index 0000000..73115b4
--- /dev/null
+++ b/test/tests/conf-gold/select/select39.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  30
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select40.out b/test/tests/conf-gold/select/select40.out
new file mode 100644
index 0000000..73e50aa
--- /dev/null
+++ b/test/tests/conf-gold/select/select40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>11</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select41.out b/test/tests/conf-gold/select/select41.out
new file mode 100644
index 0000000..f2ffc47
--- /dev/null
+++ b/test/tests/conf-gold/select/select41.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+child1
+    child2
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select42.out b/test/tests/conf-gold/select/select42.out
new file mode 100644
index 0000000..f2ffc47
--- /dev/null
+++ b/test/tests/conf-gold/select/select42.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+child1
+    child2
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select43.out b/test/tests/conf-gold/select/select43.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/select/select43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select44.out b/test/tests/conf-gold/select/select44.out
new file mode 100644
index 0000000..01f527e
--- /dev/null
+++ b/test/tests/conf-gold/select/select44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1,1,1sub,2.5,3,3,4sub,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select45.out b/test/tests/conf-gold/select/select45.out
new file mode 100644
index 0000000..8a1674e
--- /dev/null
+++ b/test/tests/conf-gold/select/select45.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Carmelo Montanez
+    Mary Brady
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select47.out b/test/tests/conf-gold/select/select47.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/select/select47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select48.out b/test/tests/conf-gold/select/select48.out
new file mode 100644
index 0000000..8a1674e
--- /dev/null
+++ b/test/tests/conf-gold/select/select48.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Carmelo Montanez
+    Mary Brady
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select49.out b/test/tests/conf-gold/select/select49.out
new file mode 100644
index 0000000..2931eff
--- /dev/null
+++ b/test/tests/conf-gold/select/select49.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+descendant number 1
+    descendant number 2
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select50.out b/test/tests/conf-gold/select/select50.out
new file mode 100644
index 0000000..0cee024
--- /dev/null
+++ b/test/tests/conf-gold/select/select50.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    descendant number 1
+  
+    descendant number 2
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select51.out b/test/tests/conf-gold/select/select51.out
new file mode 100644
index 0000000..8a1674e
--- /dev/null
+++ b/test/tests/conf-gold/select/select51.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Carmelo Montanez
+    Mary Brady
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select52.out b/test/tests/conf-gold/select/select52.out
new file mode 100644
index 0000000..112ee22
--- /dev/null
+++ b/test/tests/conf-gold/select/select52.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select53.out b/test/tests/conf-gold/select/select53.out
new file mode 100644
index 0000000..f60a135
--- /dev/null
+++ b/test/tests/conf-gold/select/select53.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+preceding sibling number 1
+    following sibling number 3
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select54.out b/test/tests/conf-gold/select/select54.out
new file mode 100644
index 0000000..3221b1b
--- /dev/null
+++ b/test/tests/conf-gold/select/select54.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+book1
+    book3
+    book5
+    book9
+    book11
+    book13
+    book15
+    article 1
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select55.out b/test/tests/conf-gold/select/select55.out
new file mode 100644
index 0000000..4a740cc
--- /dev/null
+++ b/test/tests/conf-gold/select/select55.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+book2
+    book4
+    book6
+    book8
+    book10
+    book12
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select56.out b/test/tests/conf-gold/select/select56.out
new file mode 100644
index 0000000..75157a3
--- /dev/null
+++ b/test/tests/conf-gold/select/select56.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Carmelo Montanez
+    David Marston
+    Mary Brady
+    Lynne Rosenthal
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select57.out b/test/tests/conf-gold/select/select57.out
new file mode 100644
index 0000000..a23018a
--- /dev/null
+++ b/test/tests/conf-gold/select/select57.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Carmelo Montanez
+    David Marston
+    Mary Brady
+    Five
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select58.out b/test/tests/conf-gold/select/select58.out
new file mode 100644
index 0000000..c29ae31
--- /dev/null
+++ b/test/tests/conf-gold/select/select58.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+David Marston
+    Mary Brady
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select59.out b/test/tests/conf-gold/select/select59.out
new file mode 100644
index 0000000..a3cf30c
--- /dev/null
+++ b/test/tests/conf-gold/select/select59.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+EFGJKNOP,
+EFGJKNOP,
+EFGJKNOP,
+EFGJKNOP,
+EFGJKNOP,
+EFGJKNOP,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select60.out b/test/tests/conf-gold/select/select60.out
new file mode 100644
index 0000000..f2ffc47
--- /dev/null
+++ b/test/tests/conf-gold/select/select60.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+child1
+    child2
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select61.out b/test/tests/conf-gold/select/select61.out
new file mode 100644
index 0000000..22e76e8
--- /dev/null
+++ b/test/tests/conf-gold/select/select61.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+self content number 1
+    self content number 2
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select62.out b/test/tests/conf-gold/select/select62.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/select/select62.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select63.out b/test/tests/conf-gold/select/select63.out
new file mode 100644
index 0000000..526a664
--- /dev/null
+++ b/test/tests/conf-gold/select/select63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2A2B45</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select64.out b/test/tests/conf-gold/select/select64.out
new file mode 100644
index 0000000..302a8a8
--- /dev/null
+++ b/test/tests/conf-gold/select/select64.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+article 1
+    book14
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select65.out b/test/tests/conf-gold/select/select65.out
new file mode 100644
index 0000000..6aae583
--- /dev/null
+++ b/test/tests/conf-gold/select/select65.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Text for variable
+    Text for location Path
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select66.out b/test/tests/conf-gold/select/select66.out
new file mode 100644
index 0000000..e6f7f3f
--- /dev/null
+++ b/test/tests/conf-gold/select/select66.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+child number 1
+    child number 2
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select67.out b/test/tests/conf-gold/select/select67.out
new file mode 100644
index 0000000..3c2b911
--- /dev/null
+++ b/test/tests/conf-gold/select/select67.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>We are inside.
+  xsl:template
+  We are generic.
+  inside
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select68.out b/test/tests/conf-gold/select/select68.out
new file mode 100644
index 0000000..581432b
--- /dev/null
+++ b/test/tests/conf-gold/select/select68.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>That template.
+  We got inside.
+  okay</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select69.out b/test/tests/conf-gold/select/select69.out
new file mode 100644
index 0000000..775d97d
--- /dev/null
+++ b/test/tests/conf-gold/select/select69.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  1-butternut|light|
+  2-|extreme|
+  3-butternut||
+  4-sport||heavy|
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select70.out b/test/tests/conf-gold/select/select70.out
new file mode 100644
index 0000000..3961b13
--- /dev/null
+++ b/test/tests/conf-gold/select/select70.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  a
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select71.out b/test/tests/conf-gold/select/select71.out
new file mode 100644
index 0000000..45f29be
--- /dev/null
+++ b/test/tests/conf-gold/select/select71.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    <dup1/><dup2/><south/><east/><west/>,
+    <dup1/><dup2/><south/><east/><west/>,
+    <dup1/><dup2/><south/><east/><west/>,
+    <dup1/><dup2/><south/><east/><west/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select72.out b/test/tests/conf-gold/select/select72.out
new file mode 100644
index 0000000..400c1f9
--- /dev/null
+++ b/test/tests/conf-gold/select/select72.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Count of node-set: 1
+Count of union: 1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select73.out b/test/tests/conf-gold/select/select73.out
new file mode 100644
index 0000000..c08fd42
--- /dev/null
+++ b/test/tests/conf-gold/select/select73.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<out>
+<e>1. adresse1 </e><e>2. AFTER</e>
+<e>1. adéresse2 </e><e>2. after</e>
+<e>1. adresse3 </e>
+<e>1. BEFORE </e><e>2. adresse4</e>
+<e>1. before </e><e>2. adéresse5</e></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select74.out b/test/tests/conf-gold/select/select74.out
new file mode 100644
index 0000000..dc52a1f
--- /dev/null
+++ b/test/tests/conf-gold/select/select74.out
@@ -0,0 +1,18 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Customers</title>
+</head>
+<body>
+<table>
+<tbody>
+<tr>
+<th>William</th><td>pc10</td><td>pc20</td>
+</tr>
+<tr>
+<th>Harry</th><td>pc21</td><td>pc22</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/test/tests/conf-gold/select/select75.out b/test/tests/conf-gold/select/select75.out
new file mode 100644
index 0000000..a4838fb
--- /dev/null
+++ b/test/tests/conf-gold/select/select75.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+Comment found: Front comment 
+Comment found: Back comment 
+...Back to top...
+Comment found: First comment 
+Comment found: Last comment 
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select76.out b/test/tests/conf-gold/select/select76.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/select/select76.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select77.out b/test/tests/conf-gold/select/select77.out
new file mode 100644
index 0000000..cecef84
--- /dev/null
+++ b/test/tests/conf-gold/select/select77.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>calling...</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select78.out b/test/tests/conf-gold/select/select78.out
new file mode 100644
index 0000000..8f54118
--- /dev/null
+++ b/test/tests/conf-gold/select/select78.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<match>x = x</match>
+<match>y = y</match></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select79.out b/test/tests/conf-gold/select/select79.out
new file mode 100644
index 0000000..39367b6
--- /dev/null
+++ b/test/tests/conf-gold/select/select79.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<content from="x" size="1">alpha omega</content>
+<content from="y" size="1">alpha omega</content></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select80.out b/test/tests/conf-gold/select/select80.out
new file mode 100644
index 0000000..54acd6d
--- /dev/null
+++ b/test/tests/conf-gold/select/select80.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Found the tag...
+item3,subsubitem-early,subitem1,
+Found the tag...
+item3,subsubitem-early,subitem1,
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select81.out b/test/tests/conf-gold/select/select81.out
new file mode 100644
index 0000000..c918aad
--- /dev/null
+++ b/test/tests/conf-gold/select/select81.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><rel>
+  Hello
+  There
+  World
+</rel><abs>
+  Hello
+  There
+  World
+</abs></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select82.out b/test/tests/conf-gold/select/select82.out
new file mode 100644
index 0000000..76d605e
--- /dev/null
+++ b/test/tests/conf-gold/select/select82.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><list>doc|a|b|bb|bbb|c|</list></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select83.out b/test/tests/conf-gold/select/select83.out
new file mode 100644
index 0000000..1050603
--- /dev/null
+++ b/test/tests/conf-gold/select/select83.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><list>
+Node doc has on-doc in @x
+Node a has on-a in @x
+Node b has on-b in @x
+Node bbb has on-bbb in @x
+Node c has on-c in @x</list></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select84.out b/test/tests/conf-gold/select/select84.out
new file mode 100644
index 0000000..c08d045
--- /dev/null
+++ b/test/tests/conf-gold/select/select84.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><list>
+Node doc has on-doc in @d
+Node a has on-a in @aa
+Node b has on-b in @x
+Node bb has on-bb in @y
+Node bbb has on-bbb in @z
+Node c has on-c in @cc</list></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select85.out b/test/tests/conf-gold/select/select85.out
new file mode 100644
index 0000000..788804c
--- /dev/null
+++ b/test/tests/conf-gold/select/select85.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<in>ch1</in>
+<in>ch1</in>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/select/select86.out b/test/tests/conf-gold/select/select86.out
new file mode 100644
index 0000000..e513617
--- /dev/null
+++ b/test/tests/conf-gold/select/select86.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<apply>1</apply>
+<for1>1</for1>
+<for2>ok</for2>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort-alphabet-english.out b/test/tests/conf-gold/sort/sort-alphabet-english.out
new file mode 100644
index 0000000..6cde11c
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort-alphabet-english.out
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<root>

+<p>lang: en</p>

+<ul>

+<li>A</li>

+<li>C</li>

+<li>D</li>

+<li>E</li>

+<li>F</li>

+<li>G</li>

+<li>H</li>

+<li>I</li>

+<li>J</li>

+<li>K</li>

+<li>L</li>

+<li>M</li>

+<li>N</li>

+<li>O</li>

+<li>P</li>

+<li>Q</li>

+<li>R</li>

+<li>S</li>

+<li>T</li>

+<li>U</li>

+<li>V</li>

+<li>W</li>

+<li>X</li>

+<li>Y</li>

+<li>Z</li>

+</ul>

+</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort-alphabet-polish.out b/test/tests/conf-gold/sort/sort-alphabet-polish.out
new file mode 100644
index 0000000..180cd86
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort-alphabet-polish.out
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<root>

+<p>lang: pl</p>

+<ul>

+<li>A</li>

+<li>Ą</li>

+<li>B</li>

+<li>C</li>

+<li>Ć</li>

+<li>D</li>

+<li>E</li>

+<li>Ę</li>

+<li>F</li>

+<li>G</li>

+<li>H</li>

+<li>I</li>

+<li>J</li>

+<li>K</li>

+<li>L</li>

+<li>Ł</li>

+<li>M</li>

+<li>N</li>

+<li>Ń</li>

+<li>O</li>

+<li>Ó</li>

+<li>P</li>

+<li>R</li>

+<li>S</li>

+<li>Ś</li>

+<li>T</li>

+<li>U</li>

+<li>W</li>

+<li>Y</li>

+<li>Z</li>

+<li>Ź</li>

+<li>Ż</li>

+</ul>

+</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort-alphabet-russian.out b/test/tests/conf-gold/sort/sort-alphabet-russian.out
new file mode 100644
index 0000000..8cbe9a6
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort-alphabet-russian.out
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<root>

+<p>lang: ru</p>

+<ul>

+<li>А</li>

+<li>Б</li>

+<li>В</li>

+<li>Г</li>

+<li>Д</li>

+<li>Е</li>

+<li>Ё</li>

+<li>Ж</li>

+<li>З</li>

+<li>И</li>

+<li>Й</li>

+<li>К</li>

+<li>Л</li>

+<li>М</li>

+<li>Н</li>

+<li>О</li>

+<li>П</li>

+<li>Р</li>

+<li>С</li>

+<li>Т</li>

+<li>У</li>

+<li>Ф</li>

+<li>Х</li>

+<li>Ц</li>

+<li>Ч</li>

+<li>Ш</li>

+<li>Щ</li>

+<li>Ъ</li>

+<li>Ы</li>

+<li>Ь</li>

+<li>Э</li>

+<li>Ю</li>

+<li>Я</li>

+</ul>

+</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort01.out b/test/tests/conf-gold/sort/sort01.out
new file mode 100644
index 0000000..e24487b
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort01.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    Default (ascending) order....
+    Hello 617-939-5938 -47 -13 0 1 002 3 04 5 0008 23 40 69 82 99 100 666 777 803.05 803.23 803.33333332 803.33333333 1001001001 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort02.out b/test/tests/conf-gold/sort/sort02.out
new file mode 100644
index 0000000..c96e790
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort02.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>002</item>
+<item>04</item>
+<item>document</item>
+<item>elements</item>
+<item>mechanism</item>
+<item>must</item>
+<item>namespaces</item>
+<item>prefix</item>
+<item>processors</item>
+<item>recognize</item>
+<item>recognized</item>
+<item>specified</item>
+<item>to</item>
+<item>URI</item>
+<item>use</item>
+<item>XML</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort03.out b/test/tests/conf-gold/sort/sort03.out
new file mode 100644
index 0000000..2f7d30d
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Vincent Quint; Stephen Deach; Sharon Adler; Scott Boag; Randy Waki; Paul Grosso; Nisheeth Ranjan; Mickey Kimchi; Jonathan Abcde; Jonathan Cdef; Jonathan Defg; Jonathan Efgh; Jonathan Fghi; Jonathan Ghij; Jonathan Marsh; Jonathan Robie; Joe Lapp; Jeff Caruso; James Clark; Henry Thompson; Gregg Reynolds; Eduardo Gutentag; Dwayne Dicks; Doug Rand; Don Day; Chris Maden; Boris Moore; Alex Milowski; </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort04.out b/test/tests/conf-gold/sort/sort04.out
new file mode 100644
index 0000000..7d088df
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Adobe Systems Inc. ArborText Bitstream Bubba Corporation Bubba Corporation Bubba Corporation Bubba Corporation Bubba Corporation Bubba Corporation Datalogics Enigma, Inc. HCRC Language Technology Group, University of Edinburgh IBM Inso Corporation Invited Expert Lotus Development Corporation Microsoft Corporation Netscape Corporation Novell O'Reilly and Associates, Inc. RivCom Silicon Graphics SoftQuad, Inc. Sun Microsystems Inc. Texcel Veo Systems, Inc. W3C Mon, 5 Jan 1998 webMethods </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort05.out b/test/tests/conf-gold/sort/sort05.out
new file mode 100644
index 0000000..054fc0b
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Abcde Jonathan; Adler Sharon; Boag Scott; Caruso Jeff; Cdef Jonathan; Clark James; Day Don; Deach Stephen; Defg Jonathan; Dicks Dwayne; Efgh Jonathan; Fghi Jonathan; Ghij Jonathan; Grosso Paul; Gutentag Eduardo; Kimchi Mickey; Lapp Joe; Maden Chris; Marsh Jonathan; Milowski Alex; Moore Boris; Quint Vincent; Rand Doug; Ranjan Nisheeth; Reynolds Gregg; Robie Jonathan; Thompson Henry; Waki Randy; </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort06.out b/test/tests/conf-gold/sort/sort06.out
new file mode 100644
index 0000000..b2e0b22
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Alex Milowski; Boris Moore; Chris Maden; Don Day; Doug Rand; Dwayne Dicks; Eduardo Gutentag; Gregg Reynolds; Henry Thompson; James Clark; Jeff Caruso; Joe Lapp; Jonathan Abcde; Jonathan Cdef; Jonathan Defg; Jonathan Efgh; Jonathan Fghi; Jonathan Ghij; Jonathan Marsh; Jonathan Robie; Mickey Kimchi; Nisheeth Ranjan; Paul Grosso; Randy Waki; Scott Boag; Sharon Adler; Stephen Deach; Vincent Quint; </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort07.out b/test/tests/conf-gold/sort/sort07.out
new file mode 100644
index 0000000..5262121
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort07.out
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>O'Reilly &amp; Associates, Inc.:  
+Silicon Graphics:  
+HCRC Language Technology Group, University of Edinburgh:  
+Invited Expert:  
+webMethods:  
+Novell:  
+Datalogics:  
+Texcel:  
+Inso Corporation: Anders Berglund
+Bitstream: Andrew Greene
+Microsoft Corporation: Chris Wilson
+Bubba Corporation: Chris Wilson
+Bubba Corporation: Chris Wilson
+Bubba Corporation: Chris Wilson
+Bubba Corporation: Chris Wilson
+Bubba Corporation: Chris Wilson
+Bubba Corporation: Chris Wilson
+W3C: Chris Lilley
+RivCom: Daniel Rivers-Moore
+Sun Microsystems Inc.: Jon Bosak
+SoftQuad, Inc.: Lauren Wood
+Veo Systems, Inc.: Murray Maloney
+ArborText: Norm Walsh
+Lotus Development Corporation: Robert Pernett
+Enigma, Inc.: Ronnen Armon
+IBM: Sanjiva Weerawarana
+Adobe Systems Inc.: Steve Zilles
+Netscape Corporation: Vidur Apparao
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort08.out b/test/tests/conf-gold/sort/sort08.out
new file mode 100644
index 0000000..62f2cc3
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort08.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    Ascending order....
+    a!b|a!b |a!b!|a!c|a!cd|ab|ab |a b|ab!|ab%|abc|abcd|abd|ac |a c|ac!|a c%|acc|a  d|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort09.out b/test/tests/conf-gold/sort/sort09.out
new file mode 100644
index 0000000..4aa1200
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort09.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    Descending order....
+    1001001001 803.33333333 803.33333332 803.23 803.05 777 666 100 99 82 69 40 23 0008 5 04 3 002 1 0 -13 -47 Hello 617-939-5938 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort10.out b/test/tests/conf-gold/sort/sort10.out
new file mode 100644
index 0000000..3c21be1
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort10.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XML</item>
+<item>use</item>
+<item>URI</item>
+<item>to</item>
+<item>specified</item>
+<item>recognized</item>
+<item>recognize</item>
+<item>processors</item>
+<item>prefix</item>
+<item>namespaces</item>
+<item>must</item>
+<item>mechanism</item>
+<item>elements</item>
+<item>document</item>
+<item>04</item>
+<item>002</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort11.out b/test/tests/conf-gold/sort/sort11.out
new file mode 100644
index 0000000..511c024
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort11.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>.01</item>
+<item>.0100</item>
+<item>.0101</item>
+<item>.0110</item>
+<item>0.01</item>
+<item>0.0100</item>
+<item>002</item>
+<item>02.0</item>
+<item>04</item>
+<item>2</item>
+<item>2.0</item>
+<item>4</item>
+<item>4.0</item>
+<item>4.000</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort12.out b/test/tests/conf-gold/sort/sort12.out
new file mode 100644
index 0000000..cfc6564
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort12.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>.01</item>
+<item>.0100</item>
+<item>0.01</item>
+<item>0.0100</item>
+<item>.0101</item>
+<item>.0110</item>
+<item>2</item>
+<item>02.0</item>
+<item>2.0</item>
+<item>002</item>
+<item>4.0</item>
+<item>4</item>
+<item>4.000</item>
+<item>04</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort13.out b/test/tests/conf-gold/sort/sort13.out
new file mode 100644
index 0000000..ee7ace4
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort13.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    Ascending order....
+    First|p2|1.0.9|00k|1.u|0.5.9|1-m|0.5s|Last|0|0.5|1|1.0| 1.1|007|7|11|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort14.out b/test/tests/conf-gold/sort/sort14.out
new file mode 100644
index 0000000..a0486a4
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort14.out
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>document</item>
+<item>elements</item>
+<item>mechanism</item>
+<item>must</item>
+<item>Namespaces</item>
+<item>prefix</item>
+<item>preFIX</item>
+<item>processors</item>
+<item>recognize</item>
+<item>recognized</item>
+<item>specified</item>
+<item>to</item>
+<item>URI</item>
+<item>use</item>
+<item>XML</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort15.out b/test/tests/conf-gold/sort/sort15.out
new file mode 100644
index 0000000..65e7b68
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort15.out
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>document</item>
+<item>elements</item>
+<item>mechanism</item>
+<item>must</item>
+<item>Namespaces</item>
+<item>preFIX</item>
+<item>prefix</item>
+<item>processors</item>
+<item>recognize</item>
+<item>recognized</item>
+<item>specified</item>
+<item>to</item>
+<item>URI</item>
+<item>use</item>
+<item>XML</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort16.out b/test/tests/conf-gold/sort/sort16.out
new file mode 100644
index 0000000..a0486a4
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort16.out
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>document</item>
+<item>elements</item>
+<item>mechanism</item>
+<item>must</item>
+<item>Namespaces</item>
+<item>prefix</item>
+<item>preFIX</item>
+<item>processors</item>
+<item>recognize</item>
+<item>recognized</item>
+<item>specified</item>
+<item>to</item>
+<item>URI</item>
+<item>use</item>
+<item>XML</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort20.out b/test/tests/conf-gold/sort/sort20.out
new file mode 100644
index 0000000..1569814
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>-47 -13 0 1 002 3 04 5 0008 23 40 69 82 99 100 666 777 803.05 803.23 803.33333332 803.33333333 1001001001 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort21.out b/test/tests/conf-gold/sort/sort21.out
new file mode 100644
index 0000000..f9381b6
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>g,f,e,d,c,b,a,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort22.out b/test/tests/conf-gold/sort/sort22.out
new file mode 100644
index 0000000..70bb67f
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort22.out
@@ -0,0 +1 @@
+ua3,yb7,zc5,xd2,ve1,tf4,wg6,
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort23.out b/test/tests/conf-gold/sort/sort23.out
new file mode 100644
index 0000000..5d0dd37
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort23.out
@@ -0,0 +1 @@
+8,12,15,18,20,21,24,
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort24.out b/test/tests/conf-gold/sort/sort24.out
new file mode 100644
index 0000000..d645f39
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort24.out
@@ -0,0 +1 @@
+a44a|b2|c6666c|d|e555e|f77777f|g3g|
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort25.out b/test/tests/conf-gold/sort/sort25.out
new file mode 100644
index 0000000..9c32054
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort25.out
@@ -0,0 +1 @@
+gfedcba
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort26.out b/test/tests/conf-gold/sort/sort26.out
new file mode 100644
index 0000000..1a90039
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort26.out
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+  
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+    
+Jonathan Abcde; 
+  Chair: Sharon Adler; Anders Berglund; Scott Boag; Jeff Caruso; Jonathan Cdef; James Clark; Don Day; Stephen Deach; Jonathan Defg; Dwayne Dicks; Jonathan Efgh; Jonathan Fghi; Jonathan Ghij; Paul Grosso; Eduardo Gutentag; Mickey Kimchi; Joe Lapp; Chris Maden; Jonathan Marsh; Alex Milowski; Boris Moore; 
+  W3C: Vincent Quint; Vincent Quint; Doug Rand; Nisheeth Ranjan; Gregg Reynolds; Jonathan Robie; Henry Thompson; Randy Waki; 
+  Chair: Steve Zilles; </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort27.out b/test/tests/conf-gold/sort/sort27.out
new file mode 100644
index 0000000..860fa9c
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort27.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  b
+-d-e-
+  f
+  -h-
+  i
+  -
+  j
+  -</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort28.out b/test/tests/conf-gold/sort/sort28.out
new file mode 100644
index 0000000..e66151e
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort28.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  j
+  -
+  f
+  -
+  i
+  -
+  b
+-h-e-d-</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort29.out b/test/tests/conf-gold/sort/sort29.out
new file mode 100644
index 0000000..89e5e8f
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort29.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>First,Second,Third,Fourth,Fifth,Sixth,Seventh,</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort30.out b/test/tests/conf-gold/sort/sort30.out
new file mode 100644
index 0000000..e835dfa
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort30.out
@@ -0,0 +1 @@
+First,Second,Third,Fourth,Fifth,Sixth,Seventh,
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort31.out b/test/tests/conf-gold/sort/sort31.out
new file mode 100644
index 0000000..e835dfa
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort31.out
@@ -0,0 +1 @@
+First,Second,Third,Fourth,Fifth,Sixth,Seventh,
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort32.out b/test/tests/conf-gold/sort/sort32.out
new file mode 100644
index 0000000..1641a36
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort32.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    Ascending order....
+    bogus|0.5|1|1.0|1.1|007|7|11|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort33.out b/test/tests/conf-gold/sort/sort33.out
new file mode 100644
index 0000000..ab74f48
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort33.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    Descending order....
+    11|007|7|1.1|1|1.0|0.5|bogus|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort34.out b/test/tests/conf-gold/sort/sort34.out
new file mode 100644
index 0000000..a0486a4
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort34.out
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>document</item>
+<item>elements</item>
+<item>mechanism</item>
+<item>must</item>
+<item>Namespaces</item>
+<item>prefix</item>
+<item>preFIX</item>
+<item>processors</item>
+<item>recognize</item>
+<item>recognized</item>
+<item>specified</item>
+<item>to</item>
+<item>URI</item>
+<item>use</item>
+<item>XML</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort35.out b/test/tests/conf-gold/sort/sort35.out
new file mode 100644
index 0000000..d549a9d
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort35.out
@@ -0,0 +1 @@
+tf4,ua3,ve1,wg6,xd2,yb7,zc5,
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort36.out b/test/tests/conf-gold/sort/sort36.out
new file mode 100644
index 0000000..4f100cd
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort36.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Memos by thread:
+A1: Thread A;
+A3: Re: Thread A;
+A5: Re: Thread A;
+A7: Re: Thread A;
+A10: Re: Thread A;
+B2: Thread B;
+B4: Re: Thread B;
+B9: Re: Thread B;
+C6: Thread C;
+C8: Re: Thread C;
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort37.out b/test/tests/conf-gold/sort/sort37.out
new file mode 100644
index 0000000..32b57e7
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort37.out
@@ -0,0 +1 @@
+ve1,xd2,ua3,tf4,zc5,wg6,yb7,
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort38.out b/test/tests/conf-gold/sort/sort38.out
new file mode 100644
index 0000000..284ed4e
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort38.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    Ascending order....
+    First|p2|1.0.9|00k|1.u|1-m|0.5s|Last|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort39.out b/test/tests/conf-gold/sort/sort39.out
new file mode 100644
index 0000000..bec4344
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort39.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  <row><COLUMN1>ABC</COLUMN1><COLUMN2>ABC2</COLUMN2></row>
+  <row><COLUMN1>AEI</COLUMN1><COLUMN2>AEI2</COLUMN2></row>
+  <row><COLUMN1>DEF</COLUMN1><COLUMN2>DEF2</COLUMN2></row>
+  <row><COLUMN1>DHL</COLUMN1><COLUMN2>DHL2</COLUMN2></row>
+  <row><COLUMN1>GHI</COLUMN1><COLUMN2>GHI2</COLUMN2></row>
+  <row><COLUMN1>JHF</COLUMN1><COLUMN2>JHF2</COLUMN2></row>
+  <row><COLUMN1>JKL</COLUMN1><COLUMN2>JKL2</COLUMN2></row>
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort40.out b/test/tests/conf-gold/sort/sort40.out
new file mode 100644
index 0000000..4aa1200
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort40.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    Descending order....
+    1001001001 803.33333333 803.33333332 803.23 803.05 777 666 100 99 82 69 40 23 0008 5 04 3 002 1 0 -13 -47 Hello 617-939-5938 </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/sort/sort41.out b/test/tests/conf-gold/sort/sort41.out
new file mode 100755
index 0000000..e0ba484
--- /dev/null
+++ b/test/tests/conf-gold/sort/sort41.out
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Birthdays as found...
+Linda: Apr 22
+Marie: September 9
+Lisa: March 31
+Harry: Sep 16
+Ginny: Jan 22
+Pedro: November 2
+Bill: Apr 4
+Frida: July 5
+
+Birthdays in chronological order...
+Pedro: November 2
+Bill: Apr 4
+Frida: July 5
+Marie: September 9
+Harry: Sep 16
+Linda: Apr 22
+Ginny: Jan 22
+Lisa: March 31
+</out>
diff --git a/test/tests/conf-gold/string/string01.out b/test/tests/conf-gold/string/string01.out
new file mode 100644
index 0000000..2fc91f4
--- /dev/null
+++ b/test/tests/conf-gold/string/string01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>14</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string02.out b/test/tests/conf-gold/string/string02.out
new file mode 100644
index 0000000..4c38967
--- /dev/null
+++ b/test/tests/conf-gold/string/string02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>4</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string04.out b/test/tests/conf-gold/string/string04.out
new file mode 100644
index 0000000..e65f2ba
--- /dev/null
+++ b/test/tests/conf-gold/string/string04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>27 12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string05.out b/test/tests/conf-gold/string/string05.out
new file mode 100644
index 0000000..6940bbf
--- /dev/null
+++ b/test/tests/conf-gold/string/string05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string06.out b/test/tests/conf-gold/string/string06.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string07.out b/test/tests/conf-gold/string/string07.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string08.out b/test/tests/conf-gold/string/string08.out
new file mode 100644
index 0000000..d4d99eb
--- /dev/null
+++ b/test/tests/conf-gold/string/string08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1999</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string09.out b/test/tests/conf-gold/string/string09.out
new file mode 100644
index 0000000..9b79d97
--- /dev/null
+++ b/test/tests/conf-gold/string/string09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>04/01</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string10.out b/test/tests/conf-gold/string/string10.out
new file mode 100644
index 0000000..e8fda85
--- /dev/null
+++ b/test/tests/conf-gold/string/string10.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ab cd ef
+This is a normalized text node from the source document.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string100.out b/test/tests/conf-gold/string/string100.out
new file mode 100644
index 0000000..361e523
--- /dev/null
+++ b/test/tests/conf-gold/string/string100.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>cd34</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string101.out b/test/tests/conf-gold/string/string101.out
new file mode 100644
index 0000000..361e523
--- /dev/null
+++ b/test/tests/conf-gold/string/string101.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>cd34</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string102.out b/test/tests/conf-gold/string/string102.out
new file mode 100644
index 0000000..08c0c52
--- /dev/null
+++ b/test/tests/conf-gold/string/string102.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>bc23</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string103.out b/test/tests/conf-gold/string/string103.out
new file mode 100644
index 0000000..1b9902f
--- /dev/null
+++ b/test/tests/conf-gold/string/string103.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a34</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string104.out b/test/tests/conf-gold/string/string104.out
new file mode 100644
index 0000000..9f3830c
--- /dev/null
+++ b/test/tests/conf-gold/string/string104.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>falsely</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string105.out b/test/tests/conf-gold/string/string105.out
new file mode 100644
index 0000000..43218c3
--- /dev/null
+++ b/test/tests/conf-gold/string/string105.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+a
+b
+c
+d
+what's up
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string106.out b/test/tests/conf-gold/string/string106.out
new file mode 100644
index 0000000..ce7e33b
--- /dev/null
+++ b/test/tests/conf-gold/string/string106.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1000</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string107.out b/test/tests/conf-gold/string/string107.out
new file mode 100644
index 0000000..8b63486
--- /dev/null
+++ b/test/tests/conf-gold/string/string107.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+    
+      b
+      c
+      d
+      e
+    
+    
+      w
+      x
+      y
+      z
+    
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string108.out b/test/tests/conf-gold/string/string108.out
new file mode 100644
index 0000000..da0bd5a
--- /dev/null
+++ b/test/tests/conf-gold/string/string108.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>01</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string109.out b/test/tests/conf-gold/string/string109.out
new file mode 100644
index 0000000..2c54c1f
--- /dev/null
+++ b/test/tests/conf-gold/string/string109.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>01.0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string11.out b/test/tests/conf-gold/string/string11.out
new file mode 100644
index 0000000..9c86fec
--- /dev/null
+++ b/test/tests/conf-gold/string/string11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>BAr</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string110.out b/test/tests/conf-gold/string/string110.out
new file mode 100644
index 0000000..dd255f7
--- /dev/null
+++ b/test/tests/conf-gold/string/string110.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>25%</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string111.out b/test/tests/conf-gold/string/string111.out
new file mode 100644
index 0000000..412de7d
--- /dev/null
+++ b/test/tests/conf-gold/string/string111.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>PED</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string112.out b/test/tests/conf-gold/string/string112.out
new file mode 100644
index 0000000..4e3cd4d
--- /dev/null
+++ b/test/tests/conf-gold/string/string112.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>PEDIA</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string113.out b/test/tests/conf-gold/string/string113.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string113.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string114.out b/test/tests/conf-gold/string/string114.out
new file mode 100644
index 0000000..10dcd85
--- /dev/null
+++ b/test/tests/conf-gold/string/string114.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>defghi</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string115.out b/test/tests/conf-gold/string/string115.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string115.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string116.out b/test/tests/conf-gold/string/string116.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string116.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string117.out b/test/tests/conf-gold/string/string117.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string117.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string118.out b/test/tests/conf-gold/string/string118.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string118.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string119.out b/test/tests/conf-gold/string/string119.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string119.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string12.out b/test/tests/conf-gold/string/string12.out
new file mode 100644
index 0000000..dcd5524
--- /dev/null
+++ b/test/tests/conf-gold/string/string12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xyz</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string120.out b/test/tests/conf-gold/string/string120.out
new file mode 100644
index 0000000..630aa1a
--- /dev/null
+++ b/test/tests/conf-gold/string/string120.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>cdef</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string121.out b/test/tests/conf-gold/string/string121.out
new file mode 100644
index 0000000..d8ca318
--- /dev/null
+++ b/test/tests/conf-gold/string/string121.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>bar_fly</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string122.out b/test/tests/conf-gold/string/string122.out
new file mode 100644
index 0000000..b9ea4d5
--- /dev/null
+++ b/test/tests/conf-gold/string/string122.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+b
+c
+d
+e</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string123.out b/test/tests/conf-gold/string/string123.out
new file mode 100644
index 0000000..4e1cab2
--- /dev/null
+++ b/test/tests/conf-gold/string/string123.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>TestingString</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string124.out b/test/tests/conf-gold/string/string124.out
new file mode 100644
index 0000000..0df866e
--- /dev/null
+++ b/test/tests/conf-gold/string/string124.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+   Found match of entity
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string125.out b/test/tests/conf-gold/string/string125.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string125.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string126.out b/test/tests/conf-gold/string/string126.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string126.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string127.out b/test/tests/conf-gold/string/string127.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string127.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string128.out b/test/tests/conf-gold/string/string128.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string128.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string129.out b/test/tests/conf-gold/string/string129.out
new file mode 100644
index 0000000..3dd81d9
--- /dev/null
+++ b/test/tests/conf-gold/string/string129.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
diff --git a/test/tests/conf-gold/string/string13.out b/test/tests/conf-gold/string/string13.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/string/string13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string130.out b/test/tests/conf-gold/string/string130.out
new file mode 100644
index 0000000..3f6388d
--- /dev/null
+++ b/test/tests/conf-gold/string/string130.out
@@ -0,0 +1 @@
+<HTML>true</HTML>
diff --git a/test/tests/conf-gold/string/string131.out b/test/tests/conf-gold/string/string131.out
new file mode 100644
index 0000000..fdd8f80
--- /dev/null
+++ b/test/tests/conf-gold/string/string131.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>17</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string132.out b/test/tests/conf-gold/string/string132.out
new file mode 100644
index 0000000..82af66d
--- /dev/null
+++ b/test/tests/conf-gold/string/string132.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><set>Positive numbers:
+1,12,123,1234,12345,123456,1234567,12345678,123456789,1234567890</set><set>
+12345678901,123456789012,1234567890123,12345678901234,123456789012345</set><set>
+1234567890123456,12345678901234568,123456789012345680</set><set>
+Negative numbers:
+-1,-12,-123,-1234,-12345,-123456,-1234567,-12345678,-123456789,-1234567890</set><set>
+-12345678901,-123456789012,-1234567890123,-12345678901234,-123456789012345</set><set>
+-1234567890123456,-12345678901234568,-123456789012345680</set></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string133.out b/test/tests/conf-gold/string/string133.out
new file mode 100644
index 0000000..73d7ec5
--- /dev/null
+++ b/test/tests/conf-gold/string/string133.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><set>Positive numbers:
+0.1,0.01,0.012,0.0123,0.01234,0.012345,0.0123456,0.01234567</set><set>
+0.012345678,0.0123456789,0.10123456789,0.101234567892,0.1012345678923</set><set>
+0.10123456789234,0.101234567892345,0.1012345678923456,0.10123456789234567</set><set>
+0.10123456789234568,0.10123456789234568,0.10123456789234568</set><set>
+Negative numbers:
+-0.1,-0.01,-0.012,-0.0123,-0.01234,-0.012345,-0.0123456,-0.01234567</set><set>
+-0.012345678,-0.0123456789,-0.10123456789,-0.101234567892,-0.1012345678923</set><set>
+-0.10123456789234,-0.101234567892345,-0.1012345678923456,-0.10123456789234567</set><set>
+-0.10123456789234568,-0.10123456789234568,-0.10123456789234568
+</set></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string134.out b/test/tests/conf-gold/string/string134.out
new file mode 100644
index 0000000..bc23dca
--- /dev/null
+++ b/test/tests/conf-gold/string/string134.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><set>Positive numbers:
+9.87654321012345,98.7654321012345,987.654321012345,9876.54321012345</set><set>
+98765.4321012345,987654.321012345,9876543.21012345,98765432.1012345</set><set>
+987654321.012345,9876543210.12345,98765432101.2345,987654321012.345</set><set>
+9876543210123.45,98765432101234.5</set><set>
+Negative numbers:
+-9.87654321012345,-98.7654321012345,-987.654321012345,-9876.54321012345</set><set>
+-98765.4321012345,-987654.321012345,-9876543.21012345,-98765432.1012345</set><set>
+-987654321.012345,-9876543210.12345,-98765432101.2345,-987654321012.345</set><set>
+-9876543210123.45,-98765432101234.5
+</set></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string135.out b/test/tests/conf-gold/string/string135.out
new file mode 100644
index 0000000..5a6b4c8
--- /dev/null
+++ b/test/tests/conf-gold/string/string135.out
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><set>Positive numbers:
+0.123456789,0.0123456789,0.00123456789,0.000123456789,0.0000123456789</set><set>
+0.00000123456789,0.000000123456789,0.0000000123456789</set><set>
+0.00000000123456789,0.000000000123456789,0.0000000000123456789</set><set>
+0.00000000000123456789,0.000000000000123456789,0.0000000000000123456789</set><set>
+0.00000000000000123456789,0.000000000000000123456789</set><set>
+0.0000000000000000123456789,0.00000000000000000123456789</set><set>
+0.000000000000000000123456789,0.0000000000000000000123456789</set><set>
+0.00000000000000000000123456789,0.000000000000000000000123456789</set><set>
+0.0000000000000000000000123456789,0.00000000000000000000000123456789</set><set>
+0.000000000000000000000000123456789,0.0000000000000000000000000123456789</set><set>
+0.00000000000000000000000000123456789,0.000000000000000000000000000123456789</set><set>
+0.0000000000000000000000000000123456789</set><set>
+0.00000000000000000000000000000123456789</set><set>
+0.000000000000000000000000000000123456789</set><set>
+0.0000000000000000000000000000000123456789</set><set>
+0.00000000000000000000000000000000123456789</set><set>
+0.000000000000000000000000000000000123456789</set><set>
+0.0000000000000000000000000000000000123456789</set><set>
+0.00000000000000000000000000000000000123456789</set><set>
+0.000000000000000000000000000000000000123456789</set><set>
+0.0000000000000000000000000000000000000123456789</set><set>
+0.00000000000000000000000000000000000000123456789</set><set>
+0.000000000000000000000000000000000000000123456789</set><set>
+0.0000000000000000000000000000000000000000123456789</set><set>
+Negative numbers:
+-0.123456789,-0.0123456789,-0.00123456789,-0.000123456789,-0.0000123456789</set><set>
+-0.00000123456789,-0.000000123456789,-0.0000000123456789</set><set>
+-0.00000000123456789,-0.000000000123456789,-0.0000000000123456789</set><set>
+-0.00000000000123456789,-0.000000000000123456789,-0.0000000000000123456789</set><set>
+-0.00000000000000123456789,-0.000000000000000123456789</set><set>
+-0.0000000000000000123456789,-0.00000000000000000123456789</set><set>
+-0.000000000000000000123456789,-0.0000000000000000000123456789</set><set>
+-0.00000000000000000000123456789,-0.000000000000000000000123456789</set><set>
+-0.0000000000000000000000123456789,-0.00000000000000000000000123456789</set><set>
+-0.000000000000000000000000123456789,-0.0000000000000000000000000123456789</set><set>
+-0.00000000000000000000000000123456789,-0.000000000000000000000000000123456789</set><set>
+-0.0000000000000000000000000000123456789</set><set>
+-0.00000000000000000000000000000123456789</set><set>
+-0.000000000000000000000000000000123456789</set><set>
+-0.0000000000000000000000000000000123456789</set><set>
+-0.00000000000000000000000000000000123456789</set><set>
+-0.000000000000000000000000000000000123456789</set><set>
+-0.0000000000000000000000000000000000123456789</set><set>
+-0.00000000000000000000000000000000000123456789</set><set>
+-0.000000000000000000000000000000000000123456789</set><set>
+-0.0000000000000000000000000000000000000123456789</set><set>
+-0.00000000000000000000000000000000000000123456789</set><set>
+-0.000000000000000000000000000000000000000123456789</set><set>
+-0.0000000000000000000000000000000000000000123456789</set><set>
+</set></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string136.out b/test/tests/conf-gold/string/string136.out
new file mode 100644
index 0000000..7ad5b73
--- /dev/null
+++ b/test/tests/conf-gold/string/string136.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>abrtor</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string137.out b/test/tests/conf-gold/string/string137.out
new file mode 100644
index 0000000..36b1997
--- /dev/null
+++ b/test/tests/conf-gold/string/string137.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>b*rb*r*t*</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string138.out b/test/tests/conf-gold/string/string138.out
new file mode 100644
index 0000000..8acc09a
--- /dev/null
+++ b/test/tests/conf-gold/string/string138.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>QUA-lit+y</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string139.out b/test/tests/conf-gold/string/string139.out
new file mode 100644
index 0000000..bd95ecd
--- /dev/null
+++ b/test/tests/conf-gold/string/string139.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>quan"ti'ty</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string14.out b/test/tests/conf-gold/string/string14.out
new file mode 100644
index 0000000..5c4c842
--- /dev/null
+++ b/test/tests/conf-gold/string/string14.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      b
+      c
+      d
+      e
+    </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string140.out b/test/tests/conf-gold/string/string140.out
new file mode 100644
index 0000000..a86f280
--- /dev/null
+++ b/test/tests/conf-gold/string/string140.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<A size="103">a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="103">a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="103">a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="103">a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="103">a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="103">a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="103">a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="103">a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="104">a! b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="105">a!! b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="106">a!!! b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A>
+<A size="107">a!!!! b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</A></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string141.out b/test/tests/conf-gold/string/string141.out
new file mode 100644
index 0000000..79d6ee7
--- /dev/null
+++ b/test/tests/conf-gold/string/string141.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>t1t2t3t4t5t6t7t8t9t10t11t12t13t14t15t16t17t18t19t20t21t22t23t24t25t26t27t28t29t30t31t32t33t34t35t36t37t38t39t40t41t42t43t44t45t46t47t48t49t50t51t52t53t54t55t56t57t58t59t60t61t62t63t64t65t66t67t68t69t70t71t72t73t74t75t76t77t78t79t80t81t82t83t84t85t86t87t88t89t90t91t92t93t94t95t96t97t98t99t100t101t102t103t104t105t106t107t108t109t110t111t112t113t114t115t116t117t118t119t120t121t122t123t124t125t126t127t128t129t130t131t132t133t134t135t136t137t138t139t140t141t142t143t144t145t146t147t148t149t150t151t152t153t154t155t156t157t158t159t160t161t162t163t164t165t166t167t168t169t170t171t172t173t174t175t176t177t178t179t180t181t182t183t184t185t186t187t188t189t190t191t192t193t194t195t196t197t198t199t200t201t202t203t204t205t206t207t208t209t210t211t212t213t214t215t216t217t218t219t220t221t222t223t224t225t226t227t228t229t230t231t232t233t234t235t236t237t238t239t240t241t242t243t244t245t246t247t248t249t250t251t252t253t254t255t256t257t258t259t260t261t262t263t264t265t266t267t268t269t270t271t272t273t274t275t276t277t278t279t280t281t282t283t284t285t286t287t288t289t290t291t292t293t294t295t296t297t298t299t300t301t302t303t304t305t306t307t308t309t310t311t312t313t314t315t316t317t318t319t320t321t322t323t324t325t326t327t328t329t330t331t332t333t334t335t336t337t338t339t340t341t342t343t344t345t346t347t348t349t350t351t352t353t354t355t356t357t358t359t360t361t362t363t364t365t366t367t368t369t370t371t372t373t374t375t376t377t378t379t380t381t382t383t384t385t386t387t388t389t390t391t392t393t394t395t396t397t398t399t400t401t402t403t404t405t406t407t408t409t410t411t412t413t414t415t416t417t418t419t420t421t422t423t424t425t426t427t428t429t430t431t432t433t434t435t436t437t438t439t440t441t442t443t444t445t446t447t448t449t450t451t452t453t454t455t456t457t458t459t460t461t462t463t464t465t466t467t468t469t470t471t472t473t474t475t476t477t478t479t480t481t482t483t484t485t486t487t488t489t490t491t492t493t494t495t496t497t498t499t500t501t502t503t504t505t506t507t508t509t510t511t512t513t514t515t516t517t518t519t520t521t522t523t524t525t526t527t528t529t530t531t532t533t534t535t536t537t538t539t540t541t542t543t544t545t546t547t548t549t550t551t552t553t554t555t556t557t558t559t560t561t562t563t564t565t566t567t568t569t570t571t572t573t574t575t576t577t578t579t580t581t582t583t584t585t586t587t588t589t590t591t592t593t594t595t596t597t598t599t600t601t602t603t604t605t606t607t608t609t610t611t612t613t614t615t616t617t618t619t620t621t622t623t624t625t626t627t628t629t630t631t632t633t634t635t636t637t638t639t640t641t642t643t644t645t646t647t648t649t650t651t652t653t654t655t656t657t658t659t660t661t662t663t664t665t666t667t668t669t670t671t672t673t674t675t676t677t678t679t680t681t682t683t684t685t686t687t688t689t690t691t692t693t694t695t696t697t698t699t700t701t702t703t704t705t706t707t708t709t710t711t712t713t714t715t716t717t718t719t720t721t722t723t724t725t726t727t728t729t730t731t732t733t734t735t736t737t738t739t740t741t742t743t744t745t746t747t748t749t750t751t752t753t754t755t756t757t758t759t760t761t762t763t764t765t766t767t768t769t770t771t772t773t774t775t776t777t778t779t780t781t782t783t784t785t786t787t788t789t790t791t792t793t794t795t796t797t798t799t800t801t802t803t804t805t806t807t808t809t810t811t812t813t814t815t816t817t818t819t820t821t822t823t824t825t826t827t828t829t830t831t832t833t834t835t836t837t838t839t840t841t842t843t844t845t846t847t848t849t850t851t852t853t854t855t856t857t858t859t860t861t862t863t864t865t866t867t868t869t870t871t872t873t874t875t876t877t878t879t880t881t882t883t884t885t886t887t888t889t890t891t892t893t894t895t896t897t898t899t900t901t902t903t904t905t906t907t908t909t910t911t912t913t914t915t916t917t918t919t920t921t922t923t924t925t926t927t928t929t930t931t932t933t934t935t936t937t938t939t940t941t942t943t944t945t946t947t948t949t950t951t952t953t954t955t956t957t958t959t960t961t962t963t964t965t966t967t968t969t970t971t972t973t974t975t976t977t978t979t980t981t982t983t984t985t986t987t988t989t990t991t992t993t994t995t996t997t998t999t1000</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string142.out b/test/tests/conf-gold/string/string142.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/string/string142.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string143.out b/test/tests/conf-gold/string/string143.out
new file mode 100644
index 0000000..d60d854
--- /dev/null
+++ b/test/tests/conf-gold/string/string143.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ABCDE</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string15.out b/test/tests/conf-gold/string/string15.out
new file mode 100644
index 0000000..d4d99eb
--- /dev/null
+++ b/test/tests/conf-gold/string/string15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1999</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string16.out b/test/tests/conf-gold/string/string16.out
new file mode 100644
index 0000000..d063df7
--- /dev/null
+++ b/test/tests/conf-gold/string/string16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>234</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string17.out b/test/tests/conf-gold/string/string17.out
new file mode 100644
index 0000000..da9ffc4
--- /dev/null
+++ b/test/tests/conf-gold/string/string17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string18.out b/test/tests/conf-gold/string/string18.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string19.out b/test/tests/conf-gold/string/string19.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string20.out b/test/tests/conf-gold/string/string20.out
new file mode 100644
index 0000000..89dd448
--- /dev/null
+++ b/test/tests/conf-gold/string/string20.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>12345</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string21.out b/test/tests/conf-gold/string/string21.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string22.out b/test/tests/conf-gold/string/string22.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string22.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string30.out b/test/tests/conf-gold/string/string30.out
new file mode 100644
index 0000000..e933e27
--- /dev/null
+++ b/test/tests/conf-gold/string/string30.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string31.out b/test/tests/conf-gold/string/string31.out
new file mode 100644
index 0000000..92cfecb
--- /dev/null
+++ b/test/tests/conf-gold/string/string31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">http://xsl.lotus.com/ns1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string32.out b/test/tests/conf-gold/string/string32.out
new file mode 100644
index 0000000..40db993
--- /dev/null
+++ b/test/tests/conf-gold/string/string32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">ns1:a</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string33.out b/test/tests/conf-gold/string/string33.out
new file mode 100644
index 0000000..40db993
--- /dev/null
+++ b/test/tests/conf-gold/string/string33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">ns1:a</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string34.out b/test/tests/conf-gold/string/string34.out
new file mode 100644
index 0000000..9edcc77
--- /dev/null
+++ b/test/tests/conf-gold/string/string34.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">b</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string35.out b/test/tests/conf-gold/string/string35.out
new file mode 100644
index 0000000..e933e27
--- /dev/null
+++ b/test/tests/conf-gold/string/string35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1"/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string36.out b/test/tests/conf-gold/string/string36.out
new file mode 100644
index 0000000..dcf976a
--- /dev/null
+++ b/test/tests/conf-gold/string/string36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:baz2="http://xsl.lotus.com/ns2" xmlns:baz1="http://xsl.lotus.com/ns1">ns1:attrib2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string37.out b/test/tests/conf-gold/string/string37.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string38.out b/test/tests/conf-gold/string/string38.out
new file mode 100644
index 0000000..52c2c81
--- /dev/null
+++ b/test/tests/conf-gold/string/string38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>0</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string39.out b/test/tests/conf-gold/string/string39.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/string/string39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string40.out b/test/tests/conf-gold/string/string40.out
new file mode 100644
index 0000000..a85c72b
--- /dev/null
+++ b/test/tests/conf-gold/string/string40.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>test</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string41.out b/test/tests/conf-gold/string/string41.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string42.out b/test/tests/conf-gold/string/string42.out
new file mode 100644
index 0000000..6940bbf
--- /dev/null
+++ b/test/tests/conf-gold/string/string42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Test</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string43.out b/test/tests/conf-gold/string/string43.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string44.out b/test/tests/conf-gold/string/string44.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string45.out b/test/tests/conf-gold/string/string45.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string46.out b/test/tests/conf-gold/string/string46.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string46.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string47.out b/test/tests/conf-gold/string/string47.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string48.out b/test/tests/conf-gold/string/string48.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string48.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string49.out b/test/tests/conf-gold/string/string49.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string49.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string50.out b/test/tests/conf-gold/string/string50.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string50.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string51.out b/test/tests/conf-gold/string/string51.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string52.out b/test/tests/conf-gold/string/string52.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string52.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string53.out b/test/tests/conf-gold/string/string53.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string54.out b/test/tests/conf-gold/string/string54.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string55.out b/test/tests/conf-gold/string/string55.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string56.out b/test/tests/conf-gold/string/string56.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string56.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string57.out b/test/tests/conf-gold/string/string57.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string57.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string58.out b/test/tests/conf-gold/string/string58.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string58.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string59.out b/test/tests/conf-gold/string/string59.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string59.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string60.out b/test/tests/conf-gold/string/string60.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string60.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string61.out b/test/tests/conf-gold/string/string61.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string62.out b/test/tests/conf-gold/string/string62.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string62.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string63.out b/test/tests/conf-gold/string/string63.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string64.out b/test/tests/conf-gold/string/string64.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string64.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string65.out b/test/tests/conf-gold/string/string65.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string65.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string66.out b/test/tests/conf-gold/string/string66.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/string/string66.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string67.out b/test/tests/conf-gold/string/string67.out
new file mode 100644
index 0000000..345fcfb
--- /dev/null
+++ b/test/tests/conf-gold/string/string67.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>false</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string68.out b/test/tests/conf-gold/string/string68.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string68.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string69.out b/test/tests/conf-gold/string/string69.out
new file mode 100644
index 0000000..737caa4
--- /dev/null
+++ b/test/tests/conf-gold/string/string69.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>EN</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string70.out b/test/tests/conf-gold/string/string70.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string70.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string71.out b/test/tests/conf-gold/string/string71.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string71.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string72.out b/test/tests/conf-gold/string/string72.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string72.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string73.out b/test/tests/conf-gold/string/string73.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string73.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string74.out b/test/tests/conf-gold/string/string74.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string74.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string75.out b/test/tests/conf-gold/string/string75.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string75.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string76.out b/test/tests/conf-gold/string/string76.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string76.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string77.out b/test/tests/conf-gold/string/string77.out
new file mode 100644
index 0000000..4348c4d
--- /dev/null
+++ b/test/tests/conf-gold/string/string77.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>YCLOPEDIA</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string78.out b/test/tests/conf-gold/string/string78.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string78.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string79.out b/test/tests/conf-gold/string/string79.out
new file mode 100644
index 0000000..db0a28f
--- /dev/null
+++ b/test/tests/conf-gold/string/string79.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>999/04/01</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string80.out b/test/tests/conf-gold/string/string80.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string80.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string81.out b/test/tests/conf-gold/string/string81.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string81.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string82.out b/test/tests/conf-gold/string/string82.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string82.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string83.out b/test/tests/conf-gold/string/string83.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string83.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string84.out b/test/tests/conf-gold/string/string84.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/string/string84.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string85.out b/test/tests/conf-gold/string/string85.out
new file mode 100644
index 0000000..719a6e7
--- /dev/null
+++ b/test/tests/conf-gold/string/string85.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>This is a normalized string.This is a test</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string86.out b/test/tests/conf-gold/string/string86.out
new file mode 100644
index 0000000..3fcab2b
--- /dev/null
+++ b/test/tests/conf-gold/string/string86.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>This is a normalized string.</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string87.out b/test/tests/conf-gold/string/string87.out
new file mode 100644
index 0000000..d21ac3f
--- /dev/null
+++ b/test/tests/conf-gold/string/string87.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>BAR</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string88.out b/test/tests/conf-gold/string/string88.out
new file mode 100644
index 0000000..d8060bf
--- /dev/null
+++ b/test/tests/conf-gold/string/string88.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>bar</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string89.out b/test/tests/conf-gold/string/string89.out
new file mode 100644
index 0000000..b50be5e
--- /dev/null
+++ b/test/tests/conf-gold/string/string89.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>BAT,B`B</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string90.out b/test/tests/conf-gold/string/string90.out
new file mode 100644
index 0000000..9c86fec
--- /dev/null
+++ b/test/tests/conf-gold/string/string90.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>BAr</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string91.out b/test/tests/conf-gold/string/string91.out
new file mode 100644
index 0000000..ebc6f45
--- /dev/null
+++ b/test/tests/conf-gold/string/string91.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>baR</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string92.out b/test/tests/conf-gold/string/string92.out
new file mode 100644
index 0000000..4e9ca0f
--- /dev/null
+++ b/test/tests/conf-gold/string/string92.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>heIIT</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string93.out b/test/tests/conf-gold/string/string93.out
new file mode 100644
index 0000000..81bf632
--- /dev/null
+++ b/test/tests/conf-gold/string/string93.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>HEiit</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string94.out b/test/tests/conf-gold/string/string94.out
new file mode 100644
index 0000000..15499f5
--- /dev/null
+++ b/test/tests/conf-gold/string/string94.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>HELLO</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string95.out b/test/tests/conf-gold/string/string95.out
new file mode 100644
index 0000000..e2af256
--- /dev/null
+++ b/test/tests/conf-gold/string/string95.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>AAA</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string96.out b/test/tests/conf-gold/string/string96.out
new file mode 100644
index 0000000..dff6274
--- /dev/null
+++ b/test/tests/conf-gold/string/string96.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xxAAAxxxx</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string97.out b/test/tests/conf-gold/string/string97.out
new file mode 100644
index 0000000..5820467
--- /dev/null
+++ b/test/tests/conf-gold/string/string97.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>abcdef</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string98.out b/test/tests/conf-gold/string/string98.out
new file mode 100644
index 0000000..2f635c0
--- /dev/null
+++ b/test/tests/conf-gold/string/string98.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ab</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/string/string99.out b/test/tests/conf-gold/string/string99.out
new file mode 100644
index 0000000..5820467
--- /dev/null
+++ b/test/tests/conf-gold/string/string99.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>abcdef</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable01.out b/test/tests/conf-gold/variable/variable01.out
new file mode 100644
index 0000000..ac16d0f
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ABC</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable02.out b/test/tests/conf-gold/variable/variable02.out
new file mode 100644
index 0000000..b5f50c1
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ABC,<B>ABC</B></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable03.out b/test/tests/conf-gold/variable/variable03.out
new file mode 100644
index 0000000..a85c72b
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>test</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable04.out b/test/tests/conf-gold/variable/variable04.out
new file mode 100644
index 0000000..c5a530f
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>test, Default text in pvar2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable05.out b/test/tests/conf-gold/variable/variable05.out
new file mode 100644
index 0000000..5649532
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>value,<B>value</B></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable06.out b/test/tests/conf-gold/variable/variable06.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable07.out b/test/tests/conf-gold/variable/variable07.out
new file mode 100644
index 0000000..0eac2db
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable08.out b/test/tests/conf-gold/variable/variable08.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable09.out b/test/tests/conf-gold/variable/variable09.out
new file mode 100644
index 0000000..f7883af
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>2</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable10.out b/test/tests/conf-gold/variable/variable10.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable10.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable11.out b/test/tests/conf-gold/variable/variable11.out
new file mode 100644
index 0000000..91cff0c
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable11.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>main stylesheet, should have highest precedence</out>
diff --git a/test/tests/conf-gold/variable/variable12.out b/test/tests/conf-gold/variable/variable12.out
new file mode 100644
index 0000000..ac16d0f
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable12.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ABC</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable13.out b/test/tests/conf-gold/variable/variable13.out
new file mode 100644
index 0000000..aab54c5
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ABC_25</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable14.out b/test/tests/conf-gold/variable/variable14.out
new file mode 100644
index 0000000..df87f42
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable14.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<foo>Test</foo>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable15.out b/test/tests/conf-gold/variable/variable15.out
new file mode 100644
index 0000000..9d430ab
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>$all contains XYZ</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable16.out b/test/tests/conf-gold/variable/variable16.out
new file mode 100644
index 0000000..9d430ab
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable16.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>$all contains XYZ</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable17.out b/test/tests/conf-gold/variable/variable17.out
new file mode 100644
index 0000000..f25def2
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable17.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>$children contains 1</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable18.out b/test/tests/conf-gold/variable/variable18.out
new file mode 100644
index 0000000..43373ce
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable18.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><foo>defaultVal</foo></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable19.out b/test/tests/conf-gold/variable/variable19.out
new file mode 100644
index 0000000..a5d573f
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable19.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>begin root template, $var=level0
+begin doc template, $var=level1
+begin a template, $var=first
+in b template, $var=level3
+end a template, $var=first
+begin a template, $var=second
+in b template, $var=level3
+end a template, $var=second
+end doc template, $var=level1
+end root template, $var=level0
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable20.out b/test/tests/conf-gold/variable/variable20.out
new file mode 100644
index 0000000..f36fd85
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable20.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>begin doc template, $var=level1
+inside for-each, $var=first
+inside for-each, $var=second
+end doc template, $var=level1
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable21.out b/test/tests/conf-gold/variable/variable21.out
new file mode 100644
index 0000000..29a8711
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable21.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>serialize</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable22.out b/test/tests/conf-gold/variable/variable22.out
new file mode 100644
index 0000000..77df8ce
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable22.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  In final: main stylesheet, should have highest precedence
+  
+  In middle: main stylesheet, should have highest precedence
+    
+  In main: main stylesheet, should have highest precedence
+  
+</out>
diff --git a/test/tests/conf-gold/variable/variable23.out b/test/tests/conf-gold/variable/variable23.out
new file mode 100644
index 0000000..78431b5
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable23.out
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>10: ....5....|
+20: ....5....|....5....|
+30: ....5....|....5....|....5....|
+40: ....5....|....5....|....5....|....5....|
+50: ....5....|....5....|....5....|....5....|....5....|
+60: ....5....|....5....|....5....|....5....|....5....|....5....|
+70: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+80: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+90: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+100: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+110: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+120: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+130: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+140: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+150: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+160: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+170: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+180: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+190: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+200: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+210: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+220: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+230: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+240: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+250: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+260: ....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|....5....|
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable24.out b/test/tests/conf-gold/variable/variable24.out
new file mode 100644
index 0000000..330456c
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable24.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc>
+  <a pos="first">
+    <b/>
+  </a>
+  <a pos="second">
+    <b/>
+  </a>
+</doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable25.out b/test/tests/conf-gold/variable/variable25.out
new file mode 100644
index 0000000..e0837be
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable25.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Tommy</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable26.out b/test/tests/conf-gold/variable/variable26.out
new file mode 100644
index 0000000..b66c817
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable26.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>It is global!</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable27.out b/test/tests/conf-gold/variable/variable27.out
new file mode 100644
index 0000000..9e8ecdf
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable27.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  In final: main stylesheet, should have highest precedence
+  
+  In middle: main stylesheet, should have highest precedence
+    
+  On the side: main stylesheet, should have highest precedence
+      
+  In main: main stylesheet, should have highest precedence
+    
+  
+</out>
diff --git a/test/tests/conf-gold/variable/variable28.out b/test/tests/conf-gold/variable/variable28.out
new file mode 100644
index 0000000..8dc7181
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable28.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  In middle: main stylesheet, should have highest precedence
+  
+  In main: main stylesheet, should have highest precedence
+    
+  In final: main stylesheet, should have highest precedence
+      
+  In main again: main stylesheet, should have highest precedence
+    
+  
+</out>
diff --git a/test/tests/conf-gold/variable/variable29.out b/test/tests/conf-gold/variable/variable29.out
new file mode 100644
index 0000000..eeb318a
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable29.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  In final: set in var29side, should have highest precedence
+  
+  On the side: set in var29side, should have highest precedence
+    
+  In main: set in var29side, should have highest precedence
+      
+  Side again: set in var29side, should have highest precedence
+    
+  
+</out>
diff --git a/test/tests/conf-gold/variable/variable30.out b/test/tests/conf-gold/variable/variable30.out
new file mode 100644
index 0000000..46e1a21
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable30.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+  In final: value set in var30mid, should have highest precedence
+  
+  In main: value set in var30mid, should have highest precedence
+    
+  In middle: value set in var30mid, should have highest precedence
+      
+  In main again: value set in var30mid, should have highest precedence
+    
+  
+</out>
diff --git a/test/tests/conf-gold/variable/variable31.out b/test/tests/conf-gold/variable/variable31.out
new file mode 100644
index 0000000..b465b0d
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable31.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>titi</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable32.out b/test/tests/conf-gold/variable/variable32.out
new file mode 100644
index 0000000..b465b0d
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable32.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>titi</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable33.out b/test/tests/conf-gold/variable/variable33.out
new file mode 100644
index 0000000..b465b0d
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable33.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>titi</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable34.out b/test/tests/conf-gold/variable/variable34.out
new file mode 100644
index 0000000..d292a82
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable34.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+a= GotIt
+b= GotIt
+c= GotIt
+d= GotIt
+e= GotIt</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable35.out b/test/tests/conf-gold/variable/variable35.out
new file mode 100644
index 0000000..fc8b8a5
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>templ, titi</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable36.out b/test/tests/conf-gold/variable/variable36.out
new file mode 100644
index 0000000..8f5c13d
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable36.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>true</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable37.out b/test/tests/conf-gold/variable/variable37.out
new file mode 100644
index 0000000..5203777
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable37.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Success</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable38.out b/test/tests/conf-gold/variable/variable38.out
new file mode 100644
index 0000000..fdd8f80
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable38.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>17</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable39.out b/test/tests/conf-gold/variable/variable39.out
new file mode 100644
index 0000000..0869a9e
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable39.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><main><first type="text">junk</first><second type="fetched">content</second><third type="comment"><!--remarks--></third></main></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable40.out b/test/tests/conf-gold/variable/variable40.out
new file mode 100644
index 0000000..1e75ba1
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable40.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>begin+more+end,
+  a,begin-junk;
+  +more+
+  d,wrongendbad
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable41.out b/test/tests/conf-gold/variable/variable41.out
new file mode 100644
index 0000000..d93a73c
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable41.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>$z contains the comment </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable42.out b/test/tests/conf-gold/variable/variable42.out
new file mode 100644
index 0000000..8ea4738
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable42.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>$z contains <doc status="replacement"/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable43.out b/test/tests/conf-gold/variable/variable43.out
new file mode 100644
index 0000000..f00943d
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable43.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><doc><item>198</item></doc></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable44.out b/test/tests/conf-gold/variable/variable44.out
new file mode 100644
index 0000000..9655dd0
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable44.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>first</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable45.out b/test/tests/conf-gold/variable/variable45.out
new file mode 100644
index 0000000..913aad3
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable45.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>200, Default reptile</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable46.out b/test/tests/conf-gold/variable/variable46.out
new file mode 100644
index 0000000..21e649f
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable46.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><b>First element</b>
+  Second element
+  <FORM METHOD="post"><input size="30" type="length"/></FORM></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable47.out b/test/tests/conf-gold/variable/variable47.out
new file mode 100644
index 0000000..3854c64
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable47.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><OK-too/><OK/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable48.out b/test/tests/conf-gold/variable/variable48.out
new file mode 100644
index 0000000..755bf10
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable48.out
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc Value="top, id=id0">
+  <a Value="top, id=id1">
+    *id1*
+    <a Value="top, id=id2">*id2*
+      <a Value="top, id=id3">*id3*<from>top, id2</from></a>
+      <b Value="top, id=id4">*id4*<from>top, id2</from></b>
+      <c Value="top, id=id5">*id5*<from>top, id2</from></c>
+    <from>top, id1</from></a>
+    <b Value="top, id=id6">*id6*<from>top, id1</from></b>
+    <c Value="top, id=id7">*id7*<from>top, id1</from></c>
+  <from>top, id0</from></a>
+  <b Value="top, id=id8">
+    *id8*
+    <a Value="top, id=id9">*id9*<from>top, id8</from></a>
+    <b Value="top, id=id10">*id10*
+      <a Value="top, id=id11">*id11*<from>top, id10</from></a>
+      <b Value="top, id=id12">*id12*<from>top, id10</from></b>
+      <c Value="top, id=id13">*id13*<from>top, id10</from></c>
+    <from>top, id8</from></b>
+    <c Value="top, id=id14">*id14*<from>top, id8</from></c>
+  <from>top, id0</from></b>
+  <c Value="top, id=id15">
+    *id15*
+    <a Value="top, id=id16">*id16*<from>top, id15</from></a>
+    <b Value="top, id=id17">*id17*<from>top, id15</from></b>
+    <c Value="top, id=id18">*id18*
+      <a Value="top, id=id19">*id19*<from>top, id18</from></a>
+    <from>top, id15</from></c>
+  <from>top, id0</from></c>
+<from>top, root</from></doc>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable49.out b/test/tests/conf-gold/variable/variable49.out
new file mode 100644
index 0000000..8431796
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable49.out
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>id0,  id0
+id1,  id1
+id2,  id2
+id3,  id3
+id4,  id4
+id5,  id5
+id6,  id6
+id7,  id7
+
+== apply above, call below ==
+id0,  id0
+id1,  id1
+id2,  id2
+id3,  id3
+id4,  id4
+id5,  id5
+id6,  id6
+id7,  id7
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable50.out b/test/tests/conf-gold/variable/variable50.out
new file mode 100644
index 0000000..02ced74
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable50.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a
+b
+c
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable51.out b/test/tests/conf-gold/variable/variable51.out
new file mode 100644
index 0000000..d4dffde
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable51.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Passed!</out>
diff --git a/test/tests/conf-gold/variable/variable52.out b/test/tests/conf-gold/variable/variable52.out
new file mode 100644
index 0000000..f96f044
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable52.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<list m="ByReference">10/20/30/</list>
+<list m="ByValue">10/20/30/</list>
+<list m="ByReference">10-20-30-</list>
+<list m="ByValue">10-20-30-</list>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable53.out b/test/tests/conf-gold/variable/variable53.out
new file mode 100644
index 0000000..fb4d068
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable53.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a b c d k l m n w x y z </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable54.out b/test/tests/conf-gold/variable/variable54.out
new file mode 100644
index 0000000..12025dd
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable54.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>(1)(2)(3)(4)(5)(6)</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable55.out b/test/tests/conf-gold/variable/variable55.out
new file mode 100644
index 0000000..fcb3088
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable55.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Wizard</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable56.out b/test/tests/conf-gold/variable/variable56.out
new file mode 100644
index 0000000..66ea645
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable56.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<outer bar="outer">
+<inner bar="inner"/>
+</outer>
diff --git a/test/tests/conf-gold/variable/variable57.out b/test/tests/conf-gold/variable/variable57.out
new file mode 100644
index 0000000..6fbac6f
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable57.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><size>1</size>
+<list>test,</list></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable58.out b/test/tests/conf-gold/variable/variable58.out
new file mode 100644
index 0000000..158058f
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable58.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><size>4</size>
+<list>first,second,third,fourth,</list></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable59.out b/test/tests/conf-gold/variable/variable59.out
new file mode 100644
index 0000000..24324bb
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable59.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><size>0</size>
+<list/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable60.out b/test/tests/conf-gold/variable/variable60.out
new file mode 100644
index 0000000..6eea596
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable60.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><a>foo</a><b content="the same">foo</b></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable61.out b/test/tests/conf-gold/variable/variable61.out
new file mode 100644
index 0000000..5a06c10
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable61.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><list>17,</list></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable62.out b/test/tests/conf-gold/variable/variable62.out
new file mode 100644
index 0000000..5cb0023
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable62.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<list from="2nd" proportion="531/920">62,440,29,</list>
+<list from="3rd" proportion="172/920">16,45,78,33,</list>
+<list from="1st" proportion="217/920">35,44,12,98,28,</list></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable63.out b/test/tests/conf-gold/variable/variable63.out
new file mode 100644
index 0000000..63ef4b2
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable63.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>(1)(2)(3)</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable64.out b/test/tests/conf-gold/variable/variable64.out
new file mode 100644
index 0000000..4ec0ac2
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable64.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><before>ax="attrib-ax"</before>
+<after>ax="attrib-ax"</after></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable65.out b/test/tests/conf-gold/variable/variable65.out
new file mode 100644
index 0000000..4ec0ac2
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable65.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><before>ax="attrib-ax"</before>
+<after>ax="attrib-ax"</after></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable66.out b/test/tests/conf-gold/variable/variable66.out
new file mode 100644
index 0000000..4ec0ac2
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable66.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><before>ax="attrib-ax"</before>
+<after>ax="attrib-ax"</after></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable67.out b/test/tests/conf-gold/variable/variable67.out
new file mode 100644
index 0000000..8d2c302
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable67.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<out><Start>okay</Start>
+(Before) okay
+(Between) okay
+(After) okay
+<End>okay</End></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable68.out b/test/tests/conf-gold/variable/variable68.out
new file mode 100644
index 0000000..f259d75
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable68.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NotSet: equals empty
+String: not empty
+nString: equals empty
+Node: not empty
+nNode: neither</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable69.out b/test/tests/conf-gold/variable/variable69.out
new file mode 100644
index 0000000..f259d75
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable69.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>NotSet: equals empty
+String: not empty
+nString: equals empty
+Node: not empty
+nNode: neither</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/variable/variable70.out b/test/tests/conf-gold/variable/variable70.out
new file mode 100644
index 0000000..ff07785
--- /dev/null
+++ b/test/tests/conf-gold/variable/variable70.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>the value of bar is bar</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/ver/ver01.out b/test/tests/conf-gold/ver/ver01.out
new file mode 100644
index 0000000..7b02066
--- /dev/null
+++ b/test/tests/conf-gold/ver/ver01.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      Choosing, based on value of version property.
+      
+          We are not allowed to use the 8.5 feature.
+          </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/ver/ver02.out b/test/tests/conf-gold/ver/ver02.out
new file mode 100644
index 0000000..8f83a19
--- /dev/null
+++ b/test/tests/conf-gold/ver/ver02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>39</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/ver/ver03.out b/test/tests/conf-gold/ver/ver03.out
new file mode 100644
index 0000000..8f83a19
--- /dev/null
+++ b/test/tests/conf-gold/ver/ver03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>39</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/ver/ver04.out b/test/tests/conf-gold/ver/ver04.out
new file mode 100644
index 0000000..8f83a19
--- /dev/null
+++ b/test/tests/conf-gold/ver/ver04.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>39</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/ver/ver05.out b/test/tests/conf-gold/ver/ver05.out
new file mode 100644
index 0000000..9b86aad
--- /dev/null
+++ b/test/tests/conf-gold/ver/ver05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xsl:choose when test="system-property('xsl:version') &gt;= 1.1"<choose>Hey! 1.1 features are not supported!</choose></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/ver/ver06.out b/test/tests/conf-gold/ver/ver06.out
new file mode 100644
index 0000000..8be6fa7
--- /dev/null
+++ b/test/tests/conf-gold/ver/ver06.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xsl:choose when test="system-property('xsl:version') &gt;= 1.2"<choose>Hey! 1.2 features are not supported!</choose></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/ver/ver07.out b/test/tests/conf-gold/ver/ver07.out
new file mode 100644
index 0000000..7eee0ae
--- /dev/null
+++ b/test/tests/conf-gold/ver/ver07.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>xsl:choose when test="system-property('xsl:version') &gt;= 2.0"<choose>Hey! 2.0 features are not supported!</choose></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/ver/ver08.out b/test/tests/conf-gold/ver/ver08.out
new file mode 100644
index 0000000..7333fde
--- /dev/null
+++ b/test/tests/conf-gold/ver/ver08.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+	<out1>xsl ok</out1><out2>xsl ok</out2><out3>xsl ok</out3>	
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace01.out b/test/tests/conf-gold/whitespace/whitespace01.out
new file mode 100644
index 0000000..e11765d
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace01.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ab
+         c
+                d
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace02.out b/test/tests/conf-gold/whitespace/whitespace02.out
new file mode 100644
index 0000000..27a2332
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>abcd</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace03.out b/test/tests/conf-gold/whitespace/whitespace03.out
new file mode 100644
index 0000000..27a2332
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>abcd</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace04.out b/test/tests/conf-gold/whitespace/whitespace04.out
new file mode 100644
index 0000000..19b2c8b
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace04.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ab
+	c
+	d
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace05.out b/test/tests/conf-gold/whitespace/whitespace05.out
new file mode 100644
index 0000000..2f635c0
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace05.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>ab</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace06.out b/test/tests/conf-gold/whitespace/whitespace06.out
new file mode 100644
index 0000000..fa781a3
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace06.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ns1="ns1">ab
+         c
+                d
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace07.out b/test/tests/conf-gold/whitespace/whitespace07.out
new file mode 100644
index 0000000..fa781a3
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace07.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:ns1="ns1">ab
+         c
+                d
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace08.out b/test/tests/conf-gold/whitespace/whitespace08.out
new file mode 100644
index 0000000..7ecade4
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace08.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace09.out b/test/tests/conf-gold/whitespace/whitespace09.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace09.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace10.out b/test/tests/conf-gold/whitespace/whitespace10.out
new file mode 100644
index 0000000..d3181f5
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace10.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      x
+      </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace11.out b/test/tests/conf-gold/whitespace/whitespace11.out
new file mode 100644
index 0000000..d3181f5
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace11.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+      x
+      </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace12.out b/test/tests/conf-gold/whitespace/whitespace12.out
new file mode 100644
index 0000000..f387263
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace12.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>Position:1,Last:3
+Position:2,Last:3
+Position:3,Last:3
+</out>
diff --git a/test/tests/conf-gold/whitespace/whitespace13.out b/test/tests/conf-gold/whitespace/whitespace13.out
new file mode 100644
index 0000000..5c20dd4
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace13.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out> test </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace15.out b/test/tests/conf-gold/whitespace/whitespace15.out
new file mode 100644
index 0000000..1c8661b
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace15.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out/>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace17.out b/test/tests/conf-gold/whitespace/whitespace17.out
new file mode 100644
index 0000000..4b0d4da
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace17.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<foo>a</foo>
+</doc>
diff --git a/test/tests/conf-gold/whitespace/whitespace18.out b/test/tests/conf-gold/whitespace/whitespace18.out
new file mode 100644
index 0000000..df89e66
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace18.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+a|b|c|d|e|f|g|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace19.out b/test/tests/conf-gold/whitespace/whitespace19.out
new file mode 100644
index 0000000..4ddb7d7
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace19.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>a|b|c|d|e|f|g|</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace20.out b/test/tests/conf-gold/whitespace/whitespace20.out
new file mode 100644
index 0000000..5b09500
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace20.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+<out/>
+<out xml:space="default"/>
+<out xml:space="preserve"> 	</out>
+<out xml:space="default"/>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace21.out b/test/tests/conf-gold/whitespace/whitespace21.out
new file mode 100644
index 0000000..b3d7675
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace21.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>x
+    y
+    
+    <z/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace22.out b/test/tests/conf-gold/whitespace/whitespace22.out
new file mode 100644
index 0000000..4426d1a
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace22.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>cd
+         a
+                b
+  </out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace23.out b/test/tests/conf-gold/whitespace/whitespace23.out
new file mode 100644
index 0000000..9c8d66b
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace23.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><a href="value xx">value xx</a>
+<a href="value">value</a>
+<a href="value zz">value zz</a>
+<a href="value yy">value yy</a>
+<a href="value xx">value xx</a>
+<a href="value">value</a>
+<a href="value zz">value zz</a>
+<a href="value yy">value yy</a>
+</out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace35.out b/test/tests/conf-gold/whitespace/whitespace35.out
new file mode 100644
index 0000000..7dc9985
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace35.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><abc/><def/><ghi/><jkl/></out>
\ No newline at end of file
diff --git a/test/tests/conf-gold/whitespace/whitespace36.out b/test/tests/conf-gold/whitespace/whitespace36.out
new file mode 100644
index 0000000..9aa81f1
--- /dev/null
+++ b/test/tests/conf-gold/whitespace/whitespace36.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out/>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset01.xml b/test/tests/conf/attribset/attribset01.xml
new file mode 100644
index 0000000..984f313
--- /dev/null
+++ b/test/tests/conf/attribset/attribset01.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<doc>
+  <section index="section1" index2="atr2val">
+    <section index="subSection1.1">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+  </section>
+  <section index="section2">
+    <p>Hello2</p>
+    <section index="subSection2.1">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+    <section index="subSection2.2">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+    <p>Hello2 again.</p>
+    <section index="subSection2.3">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+  </section>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset01.xsl b/test/tests/conf/attribset/attribset01.xsl
new file mode 100644
index 0000000..5cca368
--- /dev/null
+++ b/test/tests/conf/attribset/attribset01.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Set attribute of a LRE from single attribute set. -->
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="set1"></test1>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset02.xml b/test/tests/conf/attribset/attribset02.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset02.xsl b/test/tests/conf/attribset/attribset02.xsl
new file mode 100644
index 0000000..02df884
--- /dev/null
+++ b/test/tests/conf/attribset/attribset02.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Set attributes of a LRE from multiple attribute sets. -->
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="set1 set2"></test1>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset03.xml b/test/tests/conf/attribset/attribset03.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset03.xsl b/test/tests/conf/attribset/attribset03.xsl
new file mode 100644
index 0000000..bf3ce04
--- /dev/null
+++ b/test/tests/conf/attribset/attribset03.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:element with multiple attribute sets. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="set1 set2"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset04.xml b/test/tests/conf/attribset/attribset04.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset04.xsl b/test/tests/conf/attribset/attribset04.xsl
new file mode 100644
index 0000000..1f1d43c
--- /dev/null
+++ b/test/tests/conf/attribset/attribset04.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:copy with multiple attribute sets, no conflicts. -->
+
+<xsl:template match="foo">
+  <out>
+    <xsl:copy use-attribute-sets="set1 set2"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset05.xml b/test/tests/conf/attribset/attribset05.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset05.xsl b/test/tests/conf/attribset/attribset05.xsl
new file mode 100644
index 0000000..7a18395
--- /dev/null
+++ b/test/tests/conf/attribset/attribset05.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Set attributes of a LRE using attribute sets that inherit. -->
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="set1"></test1>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset06.xml b/test/tests/conf/attribset/attribset06.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset06.xsl b/test/tests/conf/attribset/attribset06.xsl
new file mode 100644
index 0000000..0de27e9
--- /dev/null
+++ b/test/tests/conf/attribset/attribset06.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Set attributes of a LRE using attribute sets that 
+       inherit, plus add overlapping attribute with xsl:attribute. -->
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="set1">
+      <xsl:attribute name="text-decoration">none</xsl:attribute>
+    </test1>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset07.xml b/test/tests/conf/attribset/attribset07.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset07.xsl b/test/tests/conf/attribset/attribset07.xsl
new file mode 100644
index 0000000..3f38860
--- /dev/null
+++ b/test/tests/conf/attribset/attribset07.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Paragraph: 3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Set attributes of a LRE using attribute sets that 
+       inherit, but have overlapping attributes. -->
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="set1">
+    </test1>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="color">blue</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="color">green</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset08.xml b/test/tests/conf/attribset/attribset08.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset08.xsl b/test/tests/conf/attribset/attribset08.xsl
new file mode 100644
index 0000000..e3e43a2
--- /dev/null
+++ b/test/tests/conf/attribset/attribset08.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:element with attribute sets that inherit, plus add overlapping attribute with xsl:attribute. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="set1">
+      <xsl:attribute name="text-decoration">none</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset09.xml b/test/tests/conf/attribset/attribset09.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset09.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset09.xsl b/test/tests/conf/attribset/attribset09.xsl
new file mode 100644
index 0000000..7937baf
--- /dev/null
+++ b/test/tests/conf/attribset/attribset09.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:copy with attribute sets that inherit, plus add overlapping attribute with xsl:attribute. -->
+
+<xsl:template match="foo">
+  <out>
+    <xsl:copy use-attribute-sets="set1">
+      <xsl:attribute name="text-decoration">none</xsl:attribute>
+    </xsl:copy>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset10.xml b/test/tests/conf/attribset/attribset10.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset10.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset10.xsl b/test/tests/conf/attribset/attribset10.xsl
new file mode 100644
index 0000000..68a6361
--- /dev/null
+++ b/test/tests/conf/attribset/attribset10.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Set attributes of an LRE, using attribute sets whose 
+       names overlap, plus add overlapping attribute with xsl:attribute. -->
+
+<xsl:template match="/">
+  <out>
+    <test xsl:use-attribute-sets="set1">
+      <xsl:attribute name="text-decoration">none</xsl:attribute>
+    </test>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset11.xml b/test/tests/conf/attribset/attribset11.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset11.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset11.xsl b/test/tests/conf/attribset/attribset11.xsl
new file mode 100644
index 0000000..21f11bd
--- /dev/null
+++ b/test/tests/conf/attribset/attribset11.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- SECTION: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: Paul Dick -->
+  <!-- PURPOSE: Set attributes of an LRE, using one attribute set with 
+       multiple attributes, and one overriding LRE attribute. -->
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="set1" font-size="10pt"></test1>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset12.xml b/test/tests/conf/attribset/attribset12.xml
new file mode 100644
index 0000000..c88dd2d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset12.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset12.xsl b/test/tests/conf/attribset/attribset12.xsl
new file mode 100644
index 0000000..22b784a
--- /dev/null
+++ b/test/tests/conf/attribset/attribset12.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Paragraph: 3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Set attributes of an LRE, using one attribute set with 
+       multiple attributes, and one overriding LRE attribute, and one 
+       overriding xsl:attribute attribute. -->
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="set1" font-size="10pt">
+      <xsl:attribute name="font-size">24pt</xsl:attribute>
+    </test1>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset13.xml b/test/tests/conf/attribset/attribset13.xml
new file mode 100644
index 0000000..977fcc2
--- /dev/null
+++ b/test/tests/conf/attribset/attribset13.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset13.xsl b/test/tests/conf/attribset/attribset13.xsl
new file mode 100644
index 0000000..9f130b9
--- /dev/null
+++ b/test/tests/conf/attribset/attribset13.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:ped="http://ped.test.com">
+
+  <!-- FileName: attribset13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Creating attribute for Literal Result Element. The expanded-name of 
+       the attribute to be created is specified by a required name attribute and an 
+       optional namespace attribute -->
+
+<xsl:template match="doc">
+  <out>
+	<xsl:attribute name="test1">LRE Attribute</xsl:attribute>
+	<xsl:attribute name="test2" namespace="http://ped.test.com">LRE Attribute</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset14.xml b/test/tests/conf/attribset/attribset14.xml
new file mode 100644
index 0000000..977fcc2
--- /dev/null
+++ b/test/tests/conf/attribset/attribset14.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset14.xsl b/test/tests/conf/attribset/attribset14.xsl
new file mode 100644
index 0000000..0e2d8cb
--- /dev/null
+++ b/test/tests/conf/attribset/attribset14.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:ped="http://ped.test.com">
+
+  <!-- FileName: attribset14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:element with attribute having a namespace. The expanded-name of 
+       the attribute to be created is specified by a required name attribute and an 
+       optional namespace attribute -->
+
+<xsl:template match="doc">
+  <xsl:element name="ped:Out">
+    <xsl:attribute name="test1">xsl:element Attribute</xsl:attribute>
+    <xsl:attribute name="test2" namespace="http://ped.test.com">xsl:element Attribute</xsl:attribute>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset16.xml b/test/tests/conf/attribset/attribset16.xml
new file mode 100644
index 0000000..621c483
--- /dev/null
+++ b/test/tests/conf/attribset/attribset16.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<docs>
+  <a href="http://www.ns0.com">Attr0</a>
+  <b href="">Attr1</b>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset16.xsl b/test/tests/conf/attribset/attribset16.xsl
new file mode 100644
index 0000000..6ee3dff
--- /dev/null
+++ b/test/tests/conf/attribset/attribset16.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:ped="http://ped.test.com">
+
+  <!-- FileName: attribset16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: The namespace attribute is interpreted as an attribute value template. -->
+
+<xsl:template match="/">
+ <root><xsl:text>&#10;</xsl:text>
+  <Out>
+	<xsl:attribute name="{docs/a}" namespace="{docs/a/@href}">Hello</xsl:attribute>
+	<xsl:attribute name="{docs/b}" namespace="{docs/b/@href}">Whatsup</xsl:attribute>
+	<xsl:attribute name="Attr2" namespace="http://ped.test.com">Goodbye</xsl:attribute>
+  </Out>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset17.xml b/test/tests/conf/attribset/attribset17.xml
new file mode 100644
index 0000000..a7db9aa
--- /dev/null
+++ b/test/tests/conf/attribset/attribset17.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<ticket>
+<input>
+<zoneone checked="1">Zoneone
+</zoneone>
+</input> 
+</ticket> 
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset17.xsl b/test/tests/conf/attribset/attribset17.xsl
new file mode 100644
index 0000000..7d92af7
--- /dev/null
+++ b/test/tests/conf/attribset/attribset17.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html"/>
+
+  <!-- FileName: attribset17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Verify that 'checked' attribute of HTML element input is correctly set. -->
+
+<xsl:template match="ticket/input">
+<HTML>
+  <Form>
+	<xsl:value-of select="zoneone"/> 
+	<Input Type="checkbox">
+	  <xsl:if test="zoneone/@checked='1'">
+	    <xsl:attribute name="CHECKED">CHECKED</xsl:attribute>
+      </xsl:if>
+    </Input>
+  </Form>
+</HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset18.xml b/test/tests/conf/attribset/attribset18.xml
new file mode 100644
index 0000000..effb08f
--- /dev/null
+++ b/test/tests/conf/attribset/attribset18.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc> 
+</doc> 
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset18.xsl b/test/tests/conf/attribset/attribset18.xsl
new file mode 100644
index 0000000..aea408d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset18.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="http://www.ped.com"
+                xmlns:bdd="http://www.bdd.com">
+
+  <!-- FileName: attribset18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Verify adding an attribute to an element replaces any
+       existing attribute of that element with the same expanded name. -->
+
+<xsl:template match="/">
+ <root><xsl:text>&#10;</xsl:text>
+   <Out>
+      <xsl:attribute name="attr1">Wrong</xsl:attribute>
+      <xsl:attribute name="ped:attr1">Wrong</xsl:attribute>
+      <xsl:attribute name="bdd:attr1">Wrong</xsl:attribute>
+      <xsl:attribute name="attr2">Wrong</xsl:attribute>
+	  <xsl:attribute name="bdd:attr1">Test1-OK</xsl:attribute>
+      <xsl:attribute name="ped:attr1">Test2-OK</xsl:attribute>
+      <xsl:attribute name="attr1">Hello</xsl:attribute>
+      <xsl:attribute name="attr2">Test2</xsl:attribute>
+      <xsl:attribute name="attr2">Goodbye</xsl:attribute>
+   </Out>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset19.xml b/test/tests/conf/attribset/attribset19.xml
new file mode 100644
index 0000000..effb08f
--- /dev/null
+++ b/test/tests/conf/attribset/attribset19.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc> 
+</doc> 
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset19.xsl b/test/tests/conf/attribset/attribset19.xsl
new file mode 100644
index 0000000..7c5e5d9
--- /dev/null
+++ b/test/tests/conf/attribset/attribset19.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Verify adding an attribute to an element after children
+       have been added to it is an error. The attributes can be ignored.-->
+
+<xsl:template match="doc">
+   <Out>
+      <xsl:element name="Element1">
+   	     <xsl:attribute name="Att1">OK</xsl:attribute>
+   	  </xsl:element>	  
+   	  <xsl:attribute name="Att1">Wrong</xsl:attribute>
+   	  <xsl:attribute name="Att1">Still-Wrong</xsl:attribute>
+   </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset20.xml b/test/tests/conf/attribset/attribset20.xml
new file mode 100644
index 0000000..3ba2ebf
--- /dev/null
+++ b/test/tests/conf/attribset/attribset20.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<docs>
+<doc xmlns:ped="http://www.ped.com">
+  <foo ped:att1="a"/>
+  <outer xml:att1="b"/>
+</doc>
+<doc xmlns:ped="http://www.ped.com">
+  <inner ped:att1="c"/>
+  <foo xml:att1="d"/>
+</doc>
+</docs>
+   
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset20.xsl b/test/tests/conf/attribset/attribset20.xsl
new file mode 100644
index 0000000..193a368
--- /dev/null
+++ b/test/tests/conf/attribset/attribset20.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:ped="http://www.ped.com" 
+      exclude-result-prefixes="ped">
+
+  <!-- FileName: attribset20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for selecting attributes with xml namespace prefix. -->
+
+<xsl:template match="/docs">
+  <out>
+    <xsl:for-each select="doc">
+      <xsl:apply-templates/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+	  <xsl:value-of select="@ped:att1"/>
+	  <xsl:value-of select="@xml:att1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset21.xml b/test/tests/conf/attribset/attribset21.xml
new file mode 100644
index 0000000..75dbb71
--- /dev/null
+++ b/test/tests/conf/attribset/attribset21.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+ <test>a</test>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset21.xsl b/test/tests/conf/attribset/attribset21.xsl
new file mode 100644
index 0000000..6a06f38
--- /dev/null
+++ b/test/tests/conf/attribset/attribset21.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Purpose: Use xsl:copy with a single attribute set. -->
+  <!-- Author: Carmelo Montanez --><!-- ResultTree002 in NIST suite -->
+
+<xsl:template match="test">
+  <out>
+    <xsl:copy use-attribute-sets="set1"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="format">bold</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset22.xml b/test/tests/conf/attribset/attribset22.xml
new file mode 100644
index 0000000..d9455e7
--- /dev/null
+++ b/test/tests/conf/attribset/attribset22.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<docs>
+<doc1>
+	<a level="1">A1</a>
+	<b level="1">B2</b>
+	<c level="1">C3</c>
+</doc1>
+<doc2>
+	<a level="2">A1</a>
+	<b level="2">B2</b>
+	<c level="2">C3</c>
+	<doc3>
+		<a level="Out1">A1</a>
+		<bat level="3">Out2</bat>
+		<cat level="3">C33</cat>
+	</doc3>
+</doc2>
+</docs> 
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset22.xsl b/test/tests/conf/attribset/attribset22.xsl
new file mode 100644
index 0000000..ad4d577
--- /dev/null
+++ b/test/tests/conf/attribset/attribset22.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Verify that attributes that contain text nodes with 
+       a newline, the output must contain a character reference. -->
+
+<xsl:template match="/">
+   <Out>
+      <xsl:attribute name="attr1">x
+	  y</xsl:attribute>
+   </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset24.xml b/test/tests/conf/attribset/attribset24.xml
new file mode 100644
index 0000000..f3a8619
--- /dev/null
+++ b/test/tests/conf/attribset/attribset24.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+  <b>bdd:attr</b>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset24.xsl b/test/tests/conf/attribset/attribset24.xsl
new file mode 100644
index 0000000..35d269b
--- /dev/null
+++ b/test/tests/conf/attribset/attribset24.xsl
@@ -0,0 +1,39 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+            xmlns:bdd="http://bdd.test.com">
+
+  <!-- FileName: attribset24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: The attribute must be in the designated namespace, even if the prefix has
+    to be reset or ignored. -->
+
+<xsl:template match="/">
+  <out>
+    <jam>
+      <xsl:attribute name="{docs/b}" namespace="http://xyz.com">jaminben</xsl:attribute>
+    </jam>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset25.xml b/test/tests/conf/attribset/attribset25.xml
new file mode 100644
index 0000000..3a89cad
--- /dev/null
+++ b/test/tests/conf/attribset/attribset25.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+<a>X</a>
+<a>Y</a>
+<a>Z</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset25.xsl b/test/tests/conf/attribset/attribset25.xsl
new file mode 100644
index 0000000..398d519
--- /dev/null
+++ b/test/tests/conf/attribset/attribset25.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use xsl:element with for-each inside xsl:attribute -->
+
+<xsl:template match="docs">
+  <xsl:element name="out">
+    <xsl:attribute name="test1">
+      <xsl:for-each select="a">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:attribute>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset26.xml b/test/tests/conf/attribset/attribset26.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset26.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset26.xsl b/test/tests/conf/attribset/attribset26.xsl
new file mode 100644
index 0000000..6dac3ef
--- /dev/null
+++ b/test/tests/conf/attribset/attribset26.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Paragraph: 3 -->
+  <!-- Purpose: Use xsl:copy with multiple attribute sets that inherit,
+    but have conflicts. -->
+  <!-- Author: Carmelo Montanez --><!-- ResultTree004 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:copy use-attribute-sets="set1"/>
+</xsl:template>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="color">blue</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="color">green</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset27.xml b/test/tests/conf/attribset/attribset27.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset27.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset27.xsl b/test/tests/conf/attribset/attribset27.xsl
new file mode 100644
index 0000000..b0721a6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset27.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Purpose: Use xsl:copy with multiple attribute sets with conflicting set name,
+    then reset one attribute with xsl:attribute. -->
+  <!-- Author: Carmelo Montanez --><!-- ResultTree004 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy use-attribute-sets="set1">
+      <xsl:attribute name="text-decoration">none</xsl:attribute>
+    </xsl:copy>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset28.xml b/test/tests/conf/attribset/attribset28.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset28.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset28.xsl b/test/tests/conf/attribset/attribset28.xsl
new file mode 100644
index 0000000..543e768
--- /dev/null
+++ b/test/tests/conf/attribset/attribset28.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Paragraph: 3 -->
+  <!-- Purpose: Use xsl:copy with multiple attribute sets in a list that have conflicts. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:copy use-attribute-sets="set1 set2 set3"/>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set2">
+  <xsl:attribute name="color">blue</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="color">green</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset29.xml b/test/tests/conf/attribset/attribset29.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset29.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset29.xsl b/test/tests/conf/attribset/attribset29.xsl
new file mode 100644
index 0000000..d072f1a
--- /dev/null
+++ b/test/tests/conf/attribset/attribset29.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Purpose: Use xsl:copy with multiple attribute sets in "merge" scenario. -->
+  <!-- Author: Carmelo Montanez --><!-- simplified from ResultTree004 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy use-attribute-sets="set1"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset30.xml b/test/tests/conf/attribset/attribset30.xml
new file mode 100644
index 0000000..b7ff1b7
--- /dev/null
+++ b/test/tests/conf/attribset/attribset30.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> <doc>
+  <test>a</test>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset30.xsl b/test/tests/conf/attribset/attribset30.xsl
new file mode 100644
index 0000000..e4d8a0a
--- /dev/null
+++ b/test/tests/conf/attribset/attribset30.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: attribset30 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 7.1.4 -->
+<!-- Purpose: Set attributes of an element created with xsl:element from single attribute set. -->
+<!-- Author: Carmelo Montanez --><!-- ResultTree007 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test1" use-attribute-sets="set1"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="format">bold</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset31.xml b/test/tests/conf/attribset/attribset31.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset31.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset31.xsl b/test/tests/conf/attribset/attribset31.xsl
new file mode 100644
index 0000000..73ec900
--- /dev/null
+++ b/test/tests/conf/attribset/attribset31.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset31 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Purpose: Use xsl:element with multiple attribute sets with conflicting names
+    (merge scenario), plus local override with xsl:attribute. -->
+  <!-- Author: Carmelo Montanez --><!-- ResultTree008 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="element1" use-attribute-sets="set1">
+      <xsl:attribute name="text-decoration">none</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset32.xml b/test/tests/conf/attribset/attribset32.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset32.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset32.xsl b/test/tests/conf/attribset/attribset32.xsl
new file mode 100644
index 0000000..d421a06
--- /dev/null
+++ b/test/tests/conf/attribset/attribset32.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset32 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Purpose: Use xsl:element with multiple attribute sets with conflicting set names. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="element1" use-attribute-sets="set1"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset33.xml b/test/tests/conf/attribset/attribset33.xml
new file mode 100644
index 0000000..acb837d
--- /dev/null
+++ b/test/tests/conf/attribset/attribset33.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset33.xsl b/test/tests/conf/attribset/attribset33.xsl
new file mode 100644
index 0000000..c71136b
--- /dev/null
+++ b/test/tests/conf/attribset/attribset33.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset33 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Purpose: Use xsl:element with multiple attribute sets that inherit. -->
+  <!-- Author: Carmelo Montanez --><!-- ResultTree005 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="set1"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset34.xml b/test/tests/conf/attribset/attribset34.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset34.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset34.xsl b/test/tests/conf/attribset/attribset34.xsl
new file mode 100644
index 0000000..d214564
--- /dev/null
+++ b/test/tests/conf/attribset/attribset34.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset34 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Paragraph: 3 -->
+  <!-- Author: Carmelo Montanez --><!-- ResultTree006 in NIST suite -->
+  <!-- Purpose: Use xsl:element with multiple attribute sets that 
+       inherit, but have overlapping attributes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="element1" use-attribute-sets="set1"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="color">blue</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3">
+  <xsl:attribute name="color">green</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset35.xml b/test/tests/conf/attribset/attribset35.xml
new file mode 100644
index 0000000..effb08f
--- /dev/null
+++ b/test/tests/conf/attribset/attribset35.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc> 
+</doc> 
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset35.xsl b/test/tests/conf/attribset/attribset35.xsl
new file mode 100644
index 0000000..4fef557
--- /dev/null
+++ b/test/tests/conf/attribset/attribset35.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Verify adding an attribute to an element after a PI has
+       been added to it is an error. The attributes can be ignored.
+       The spec doesn't explicitly say this is disallowed, as it does
+       for child elements, but it makes sense to have the same treatment. -->
+
+<xsl:template match="doc">
+  <Out>
+    <xsl:element name="Element1">
+      <xsl:attribute name="Att1">OK</xsl:attribute>
+      <xsl:processing-instruction name="my-pi">type="text/css"</xsl:processing-instruction>
+      <xsl:attribute name="AttX">Wrong</xsl:attribute>
+      <xsl:element name="Element2"/>
+    </xsl:element>	  
+  </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset36.xml b/test/tests/conf/attribset/attribset36.xml
new file mode 100644
index 0000000..effb08f
--- /dev/null
+++ b/test/tests/conf/attribset/attribset36.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc> 
+</doc> 
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset36.xsl b/test/tests/conf/attribset/attribset36.xsl
new file mode 100644
index 0000000..945c118
--- /dev/null
+++ b/test/tests/conf/attribset/attribset36.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Verify adding an attribute to an element after a comment has
+       been added to it is an error. The attributes can be ignored.
+       The spec doesn't explicitly say this is disallowed, as it does
+       for child elements, but it makes sense to have the same treatment. -->
+
+<xsl:template match="doc">
+  <Out>
+    <xsl:element name="Element1">
+      <xsl:attribute name="Att1">OK</xsl:attribute>
+      <xsl:comment>Should not break</xsl:comment>
+      <xsl:attribute name="AttX">Wrong</xsl:attribute>
+      <xsl:element name="Element2"/>
+    </xsl:element>
+  </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset37.xml b/test/tests/conf/attribset/attribset37.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset37.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset37.xsl b/test/tests/conf/attribset/attribset37.xsl
new file mode 100644
index 0000000..779f239
--- /dev/null
+++ b/test/tests/conf/attribset/attribset37.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AttribSet37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Purpose: Set some attributes from an imported definition. -->
+  <!-- Creator: David Marston -->
+
+<xsl:import href="impattset37a.xsl"/><!-- defines colorset -->
+<xsl:import href="impattset37t.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="colorset decoset"/>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="decoset">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset38.xml b/test/tests/conf/attribset/attribset38.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset38.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset38.xsl b/test/tests/conf/attribset/attribset38.xsl
new file mode 100644
index 0000000..41feee0
--- /dev/null
+++ b/test/tests/conf/attribset/attribset38.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AttribSet38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Purpose: Set some attributes from an imported definition. -->
+  <!-- Creator: David Marston -->
+
+<xsl:import href="inclattset38a.xsl"/><!-- defines colorset -->
+<xsl:import href="inclattset38t.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="colorset decoset"/>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="decoset">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset39.xml b/test/tests/conf/attribset/attribset39.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/attribset/attribset39.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset39.xsl b/test/tests/conf/attribset/attribset39.xsl
new file mode 100644
index 0000000..8cb7feb
--- /dev/null
+++ b/test/tests/conf/attribset/attribset39.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset39 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of leading underscore in names. -->
+
+<xsl:attribute-set name="_a_set">
+  <xsl:attribute name="_a_color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:template match="/">
+  <out>
+    <test xsl:use-attribute-sets="_a_set" />
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset40.xml b/test/tests/conf/attribset/attribset40.xml
new file mode 100644
index 0000000..f3a8619
--- /dev/null
+++ b/test/tests/conf/attribset/attribset40.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+  <b>bdd:attr</b>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset40.xsl b/test/tests/conf/attribset/attribset40.xsl
new file mode 100644
index 0000000..684d6ab
--- /dev/null
+++ b/test/tests/conf/attribset/attribset40.xsl
@@ -0,0 +1,39 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+            xmlns:bdd="http://bdd.test.com">
+
+  <!-- FileName: attribset40 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: The attribute must be in the designated namespace, even if the prefix has
+    to be reset or ignored. -->
+
+<xsl:template match="/">
+  <out>
+    <bdd:jam>
+      <xsl:attribute name="{docs/b}" namespace="http://xyz.com">jaminben</xsl:attribute>
+    </bdd:jam>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset41.xml b/test/tests/conf/attribset/attribset41.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/attribset/attribset41.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset41.xsl b/test/tests/conf/attribset/attribset41.xsl
new file mode 100644
index 0000000..9359e46
--- /dev/null
+++ b/test/tests/conf/attribset/attribset41.xsl
@@ -0,0 +1,57 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output indent="yes"/>
+
+  <!-- FileName: attribset41 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: Morten Jorgensen -->
+  <!-- Purpose: Test inheritance of attribute sets. A literal result element
+                is referring an attribute set that is defined by two separate
+                <xsl:attribute-set.../> elements with the same name. Both
+                these elements have a use-attribute-sets attribute, which
+                means that we have a single attribute set that inherits from
+                two other attribute sets. -->
+
+<xsl:template match="/">
+  <out xsl:use-attribute-sets="child">
+    <xsl:attribute name="location">Wonderland</xsl:attribute>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="child" use-attribute-sets="rabbit">
+  <xsl:attribute name="follow">yellowbrickroad</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="child" use-attribute-sets="alice">
+  <xsl:attribute name="wife">thumbelina</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="rabbit">
+  <xsl:attribute name="rabbithole">deep</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="alice">
+  <xsl:attribute name="Alice">intoxicated</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset42.xml b/test/tests/conf/attribset/attribset42.xml
new file mode 100644
index 0000000..5af1b22
--- /dev/null
+++ b/test/tests/conf/attribset/attribset42.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+
+<doc>
+  <foo>a</foo>
+</doc>
diff --git a/test/tests/conf/attribset/attribset42.xsl b/test/tests/conf/attribset/attribset42.xsl
new file mode 100644
index 0000000..f2242c5
--- /dev/null
+++ b/test/tests/conf/attribset/attribset42.xsl
@@ -0,0 +1,61 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output indent="yes"/>
+
+  <!-- FileName: attribset42 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: Morten Jorgensen -->
+  <!-- Purpose: Test inheritance of attribute sets. A literal result element
+                is referring an attribute set that is defined by two separate
+                <xsl:attribute-set.../> elements with the same name. Both
+                these elements have a use-attribute-sets attribute, which
+                means that we have a single attribute set that inherits from
+                two other attribute sets. Both parents attribute sets have
+                attributes that are overridden by the child.-->
+
+<xsl:template match="/">
+  <out xsl:use-attribute-sets="child">
+    <xsl:attribute name="location">Wonderland</xsl:attribute>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="child" use-attribute-sets="alice">
+  <xsl:attribute name="follow">yellowbrickroad</xsl:attribute>
+  <xsl:attribute name="rabbithole">shallow</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="child" use-attribute-sets="rabbit">
+  <xsl:attribute name="follow">theleader</xsl:attribute>
+  <xsl:attribute name="alice">intoxicated</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="rabbit">
+  <xsl:attribute name="rabbithole">deep</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="alice">
+  <xsl:attribute name="alice">ondrugs</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset43.xml b/test/tests/conf/attribset/attribset43.xml
new file mode 100644
index 0000000..3a7c1d7
--- /dev/null
+++ b/test/tests/conf/attribset/attribset43.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset43.xsl b/test/tests/conf/attribset/attribset43.xsl
new file mode 100644
index 0000000..7bb2871
--- /dev/null
+++ b/test/tests/conf/attribset/attribset43.xsl
@@ -0,0 +1,49 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset43 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: David Marston, based on a test by Morten Jorgensen -->
+  <!-- Purpose: Test inheritance of attribute sets. A xsl:element instruction
+                is referring an attribute set that is defined by two separate
+                xsl:attribute-set elements with the same name. -->
+
+<xsl:output indent="yes"/>
+
+<xsl:template match="/">
+  <xsl:element name="out" use-attribute-sets="child">
+    <xsl:attribute name="location">Wonderland</xsl:attribute>
+  </xsl:element>
+</xsl:template>
+
+<xsl:attribute-set name="child">
+  <xsl:attribute name="follow">yellowbrickroad</xsl:attribute>
+  <xsl:attribute name="rabbithole">shallow</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="child">
+  <xsl:attribute name="follow">theleader</xsl:attribute>
+  <xsl:attribute name="alice">intoxicated</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset44.xml b/test/tests/conf/attribset/attribset44.xml
new file mode 100644
index 0000000..8e39ecb
--- /dev/null
+++ b/test/tests/conf/attribset/attribset44.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
diff --git a/test/tests/conf/attribset/attribset44.xsl b/test/tests/conf/attribset/attribset44.xsl
new file mode 100644
index 0000000..a3c4cec
--- /dev/null
+++ b/test/tests/conf/attribset/attribset44.xsl
@@ -0,0 +1,43 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset44 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Only top-level variables and params are visible within
+     the declaration of an attribute set. -->
+
+<xsl:output indent="yes"/>
+
+<xsl:variable name="foo" select="'correct'"/>
+
+<xsl:template match="/">
+  <xsl:variable name="foo" select="'incorrect'"/>
+  <out xsl:use-attribute-sets="attrs"/>
+</xsl:template>
+
+<xsl:attribute-set name="attrs">
+  <xsl:attribute name="test"><xsl:value-of select="$foo"/></xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset45.xml b/test/tests/conf/attribset/attribset45.xml
new file mode 100644
index 0000000..4b79688
--- /dev/null
+++ b/test/tests/conf/attribset/attribset45.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset45.xsl b/test/tests/conf/attribset/attribset45.xsl
new file mode 100644
index 0000000..e06e186
--- /dev/null
+++ b/test/tests/conf/attribset/attribset45.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" ?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="impattset45a.xsl" /> 
+<xsl:import href="impattset45b.xsl" /> 
+
+
+<!-- FileName: attribset45 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 12.1 -->
+<!-- Creator: Richard Titmuss (richard@rockingfrog.com) -->
+<!-- Purpose: Basic test of import precedence with attribute sets -->
+
+
+<xsl:template match="/">
+<out>
+	<foo xsl:use-attribute-sets="bar" /> 
+</out> 
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset46.xml b/test/tests/conf/attribset/attribset46.xml
new file mode 100644
index 0000000..4b79688
--- /dev/null
+++ b/test/tests/conf/attribset/attribset46.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset46.xsl b/test/tests/conf/attribset/attribset46.xsl
new file mode 100644
index 0000000..48a59f2
--- /dev/null
+++ b/test/tests/conf/attribset/attribset46.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" ?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="impattset46a.xsl" /> 
+<xsl:import href="impattset46b.xsl" /> 
+
+
+<!-- FileName: attribset45 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 12.1 -->
+<!-- Creator: Paul Dick  -->
+<!-- Purpose: Basic test of import precedence based on Richard Titmuss's test
+     with attribute sets. Here the imported attribute sets have additional non-
+     conflicting attributes as well.  -->
+
+
+<xsl:template match="/">
+<out>
+	<foo xsl:use-attribute-sets="bar" /> 
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset47.xml b/test/tests/conf/attribset/attribset47.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/attribset/attribset47.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset47.xsl b/test/tests/conf/attribset/attribset47.xsl
new file mode 100644
index 0000000..913cf49
--- /dev/null
+++ b/test/tests/conf/attribset/attribset47.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+    xmlns:ap="attribco.com"
+    exclude-result-prefixes="ap">
+
+  <!-- FileName: attribset47 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test attribute set with a qualified name. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:attribute-set name="ap:set">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="ap:set"></test1>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset48.xml b/test/tests/conf/attribset/attribset48.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/attribset/attribset48.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset48.xsl b/test/tests/conf/attribset/attribset48.xsl
new file mode 100644
index 0000000..3771274
--- /dev/null
+++ b/test/tests/conf/attribset/attribset48.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+    xmlns:ap="attribco.com"
+    xmlns:as="attribco.com"
+    exclude-result-prefixes="ap as">
+
+  <!-- FileName: attribset47 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 Named Attribute Sets -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test attribute set with a qualified name, different prefix. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:attribute-set name="ap:set">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="as:set"></test1>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/attribset49.xml b/test/tests/conf/attribset/attribset49.xml
new file mode 100644
index 0000000..effb08f
--- /dev/null
+++ b/test/tests/conf/attribset/attribset49.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc> 
+</doc> 
\ No newline at end of file
diff --git a/test/tests/conf/attribset/attribset49.xsl b/test/tests/conf/attribset/attribset49.xsl
new file mode 100644
index 0000000..a90d016
--- /dev/null
+++ b/test/tests/conf/attribset/attribset49.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset49 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Attempt to set an empty or null attribute in various ways. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="e">
+      <xsl:attribute name="NoContent"/>
+      <xsl:attribute name="String0t"><xsl:text></xsl:text></xsl:attribute>
+      <xsl:attribute name="String0v"><xsl:value-of select="''"/></xsl:attribute>
+      <xsl:attribute name="String0f"><xsl:value-of select="substring('x',2,1)"/></xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/impattset37a.xsl b/test/tests/conf/attribset/impattset37a.xsl
new file mode 100644
index 0000000..a091262
--- /dev/null
+++ b/test/tests/conf/attribset/impattset37a.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpAttSet37a -->
+  <!-- Purpose: Holds attribute-set definition to be imported. -->
+
+<xsl:attribute-set name="colorset">
+  <xsl:attribute name="color">green</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/impattset37t.xsl b/test/tests/conf/attribset/impattset37t.xsl
new file mode 100644
index 0000000..f75fd05
--- /dev/null
+++ b/test/tests/conf/attribset/impattset37t.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpAttSet37t -->
+  <!-- Purpose: Holds template and attribute-set definition to be imported. -->
+
+<xsl:template match="doc">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:element name="foocopy" use-attribute-sets="colorset decoset fontset">
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:attribute-set name="fontset">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/impattset45a.xsl b/test/tests/conf/attribset/impattset45a.xsl
new file mode 100644
index 0000000..acbf20a
--- /dev/null
+++ b/test/tests/conf/attribset/impattset45a.xsl
@@ -0,0 +1,27 @@
+<?xml version="1.0" ?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:attribute-set name="bar">
+	<xsl:attribute name="baz">one</xsl:attribute> 
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/impattset45b.xsl b/test/tests/conf/attribset/impattset45b.xsl
new file mode 100644
index 0000000..b0d4d14
--- /dev/null
+++ b/test/tests/conf/attribset/impattset45b.xsl
@@ -0,0 +1,27 @@
+<?xml version="1.0" ?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:attribute-set name="bar">
+	<xsl:attribute name="baz">two</xsl:attribute>  
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/impattset46a.xsl b/test/tests/conf/attribset/impattset46a.xsl
new file mode 100644
index 0000000..189ded0
--- /dev/null
+++ b/test/tests/conf/attribset/impattset46a.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0" ?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:attribute-set name="bar">
+	<xsl:attribute name="baz">one</xsl:attribute>
+	<xsl:attribute name="foo">ten</xsl:attribute> 
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/impattset46b.xsl b/test/tests/conf/attribset/impattset46b.xsl
new file mode 100644
index 0000000..555de14
--- /dev/null
+++ b/test/tests/conf/attribset/impattset46b.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0" ?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:attribute-set name="bar">
+	<xsl:attribute name="baz">two</xsl:attribute>
+	<xsl:attribute name="poo">twenty</xsl:attribute>  
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/inclattset38a.xsl b/test/tests/conf/attribset/inclattset38a.xsl
new file mode 100644
index 0000000..a9f61e7
--- /dev/null
+++ b/test/tests/conf/attribset/inclattset38a.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: InclAttSet38a -->
+  <!-- Purpose: Holds attribute-set definition to be included. -->
+
+<xsl:attribute-set name="colorset">
+  <xsl:attribute name="color">green</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribset/inclattset38t.xsl b/test/tests/conf/attribset/inclattset38t.xsl
new file mode 100644
index 0000000..5061c85
--- /dev/null
+++ b/test/tests/conf/attribset/inclattset38t.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: InclAttSet38t -->
+  <!-- Purpose: Holds template and attribute-set definition to be included. -->
+
+<xsl:template match="doc">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:element name="foocopy" use-attribute-sets="colorset decoset fontset">
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:attribute-set name="fontset">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate01.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate01.xml
new file mode 100644
index 0000000..42e6637
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate01.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>hello</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate01.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate01.xsl
new file mode 100644
index 0000000..f286601
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate01.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of single attribute value template (AVT). -->
+
+<xsl:template match="doc">
+  <out test="{.}"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate02.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate02.xml
new file mode 100644
index 0000000..61cc820
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate02.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<photograph>
+  <href>headquarters.jpg</href>
+  <size width="300"/>
+</photograph>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate02.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate02.xsl
new file mode 100644
index 0000000..ad82825
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test two AVTs with literal element between them
+       (based on example in the spec). -->
+
+<xsl:template match="photograph">
+  <xsl:variable name="image-dir">/images</xsl:variable>
+  <out src="{$image-dir}/{href}" width="{size/@width}"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate03.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate03.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate03.xsl
new file mode 100644
index 0000000..61b9ccf
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate03.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of left curly brace escape. -->
+
+<xsl:template match="doc">
+  <out test="{{"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate04.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate04.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate04.xsl
new file mode 100644
index 0000000..fa03fe6
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate04.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of right curly brace escape. -->
+
+<xsl:template match="doc">
+  <out test="}}"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate05.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate05.xml
new file mode 100644
index 0000000..7ff316d
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate05.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<docs>
+<doc1>
+	<a level="1">A1</a>
+	<b level="1">B2</b>
+	<c level="1">C3</c>
+</doc1>
+<doc2>
+	<a level="2">A1</a>
+	<b level="2">B2</b>
+	<c level="2">C3</c>
+	<doc3>
+		<a level="Out1">A1</a>
+		<bat level="3">Out2</bat>
+		<cat level="3">C33</cat>
+	</doc3>
+</doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate05.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate05.xsl
new file mode 100644
index 0000000..9864ac4
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate05.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use of Curly brace to set value of HTML attribute. -->
+
+<xsl:output method="html" indent="no"/>
+
+<xsl:template match="/">
+<HTML>
+  <a href="/cgi-bin/app?p_parm1={.//doc2/doc3/a/@level}"></a>
+</HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate06.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate06.xml
new file mode 100644
index 0000000..63421b6
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate06.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<response indice="1"/>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate06.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate06.xsl
new file mode 100644
index 0000000..2379b8f
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate06.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: fginestrini@3di.it -->
+  <!-- Purpose: Evaluation of numeric expression in AVT, surrounded by strings. -->
+
+<xsl:template match="response">
+  <out y="before{@indice - 1}after"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate08.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate08.xml
new file mode 100644
index 0000000..75ce1fe
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate08.xml
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='iso-8859-1'?>
+<doc>
+<problem code="70" title="Consulta de Información"/>
+</doc>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate08.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate08.xsl
new file mode 100644
index 0000000..942ea95
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate08.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html"/>
+
+  <!-- FileName: attribvaltemplate08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Compare the results of attribute value generated by AVT vs.
+       xsl:value-of, with the output specified to be HTML. -->
+
+<xsl:template match="doc/problem">
+ <out value="{@title}">
+	<xsl:value-of select="@title"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate09.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate09.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate09.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate09.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate09.xsl
new file mode 100644
index 0000000..a11b569
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate09.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Purpose: Testing generation of null attribute.
+     Bug: if $From was null, it was not outputting the attribute. -->
+  <!-- Author: Geoff Crowther -->
+
+<xsl:param name="From"/>
+
+<xsl:template match="/">
+  <out>
+    <setvar name="From" value="{$From}"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate10.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate10.xml
new file mode 100644
index 0000000..a257db8
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate10.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc a="Front" b="Back" />
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate10.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate10.xsl
new file mode 100644
index 0000000..651b680
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate10.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Evaluation of string expression in AVT, surrounded by fixed strings. -->
+
+<xsl:template match="doc">
+  <out z="Before{concat(@a,@b)}After"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate11.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate11.xml
new file mode 100644
index 0000000..ca8c850
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate11.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc a="fools" b="foo" />
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate11.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate11.xsl
new file mode 100644
index 0000000..3565c7f
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate11.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Evaluation of boolean expression in AVT, surrounded by fixed strings. -->
+
+<xsl:template match="doc">
+  <out z="Before{starts-with(@a,@b)}After"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate12.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate12.xml
new file mode 100644
index 0000000..6ae5309
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate12.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc xmlns:font="xyz">
+  <font:helvetica>pfu</font:helvetica>
+  <helvetica>dfu</helvetica>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate12.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate12.xsl
new file mode 100644
index 0000000..a2109e3
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate12.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplate12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Double braces to neutralize AVT processing, including colon. -->
+
+<xsl:template match="doc">
+  <out style="{{font:helvetica}}"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate13.xml b/test/tests/conf/attribvaltemplate/attribvaltemplate13.xml
new file mode 100644
index 0000000..4c8dbef
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate13.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc xmlns:http="xyz">
+  <http:val>pfu</http:val>
+  <val>dfu</val>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/attribvaltemplate/attribvaltemplate13.xsl b/test/tests/conf/attribvaltemplate/attribvaltemplate13.xsl
new file mode 100644
index 0000000..5b821f2
--- /dev/null
+++ b/test/tests/conf/attribvaltemplate/attribvaltemplate13.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:http="xyz"
+  exclude-result-prefixes="http">
+
+  <!-- FileName: attribvaltemplate12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use of colon in AVT expression to signify namespaced element. -->
+
+<xsl:template match="doc">
+  <out href="{http:val}"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes01.xml b/test/tests/conf/axes/axes01.xml
new file mode 100644
index 0000000..ae47bae
--- /dev/null
+++ b/test/tests/conf/axes/axes01.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+	<north>
+		<near-north>
+			<far-west/>
+			<west/>
+			<near-west/>
+			<center>
+				<near-south>
+					<south>
+						<far-south/>
+					</south>
+				</near-south>
+			</center>
+				<near-east/>
+				<east/>
+				<far-east/>
+		</near-north>
+	</north>
+</far-north>
diff --git a/test/tests/conf/axes/axes01.xsl b/test/tests/conf/axes/axes01.xsl
new file mode 100644
index 0000000..c6dbb34
--- /dev/null
+++ b/test/tests/conf/axes/axes01.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output indent="yes"/>
+
+  <!-- FileName: AXES01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Traverse the ancestor::* axis -->
+  <!-- Elaboration: First, jump to the center (via for-each so that we don't have interfering
+    templates, which is less of a problem for ancestor than other axes), then apply-templates
+    on all members of the axis under test. Also, demonstrate the statement in XSLT 5.4 that
+    "The selected set of nodes is processed in document order, unless a sorting specification
+    is present." -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="ancestor::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes02.xml b/test/tests/conf/axes/axes02.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes02.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes02.xsl b/test/tests/conf/axes/axes02.xsl
new file mode 100644
index 0000000..aa3473e
--- /dev/null
+++ b/test/tests/conf/axes/axes02.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'ancestor-or-self::*' Axis Identifier -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="ancestor-or-self::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes03.xml b/test/tests/conf/axes/axes03.xml
new file mode 100644
index 0000000..df95bdd
--- /dev/null
+++ b/test/tests/conf/axes/axes03.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes03.xsl b/test/tests/conf/axes/axes03.xsl
new file mode 100644
index 0000000..7789047
--- /dev/null
+++ b/test/tests/conf/axes/axes03.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'attribute::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="attribute::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes04.xml b/test/tests/conf/axes/axes04.xml
new file mode 100644
index 0000000..de854ef
--- /dev/null
+++ b/test/tests/conf/axes/axes04.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+    <near-south-east/>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+    <near-south-west/>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes04.xsl b/test/tests/conf/axes/axes04.xsl
new file mode 100644
index 0000000..be2197b
--- /dev/null
+++ b/test/tests/conf/axes/axes04.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'child::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="child::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes05.xml b/test/tests/conf/axes/axes05.xml
new file mode 100644
index 0000000..de854ef
--- /dev/null
+++ b/test/tests/conf/axes/axes05.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+    <near-south-east/>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+    <near-south-west/>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes05.xsl b/test/tests/conf/axes/axes05.xsl
new file mode 100644
index 0000000..b535dd0
--- /dev/null
+++ b/test/tests/conf/axes/axes05.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'descendant::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="descendant::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes06.xml b/test/tests/conf/axes/axes06.xml
new file mode 100644
index 0000000..de854ef
--- /dev/null
+++ b/test/tests/conf/axes/axes06.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+    <near-south-east/>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+    <near-south-west/>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes06.xsl b/test/tests/conf/axes/axes06.xsl
new file mode 100644
index 0000000..f871b2a
--- /dev/null
+++ b/test/tests/conf/axes/axes06.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'descendant-or-self::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="descendant-or-self::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes07.xml b/test/tests/conf/axes/axes07.xml
new file mode 100644
index 0000000..ab3a766
--- /dev/null
+++ b/test/tests/conf/axes/axes07.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+	<way-out-yonder-west/>
+	<out-yonder-west/>
+	<north>
+		<near-north>
+			<far-west/>
+			<west/>
+			<near-west/>
+			<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+				<near-south-east/>
+				<near-south>
+					<south>
+						<far-south/>
+					</south>
+				</near-south>
+				<near-south-west/>
+			</center>
+			<near-east/>
+			<east/>
+			<far-east/>
+		</near-north>
+	</north>
+	<way-out-yonder-east/>
+	<out-yonder-east/>
+</far-north>
diff --git a/test/tests/conf/axes/axes07.xsl b/test/tests/conf/axes/axes07.xsl
new file mode 100644
index 0000000..128047e
--- /dev/null
+++ b/test/tests/conf/axes/axes07.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'following::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following::*"/>
+    </xsl:for-each>
+  </out> 
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>,
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes08.xml b/test/tests/conf/axes/axes08.xml
new file mode 100644
index 0000000..3440d63
--- /dev/null
+++ b/test/tests/conf/axes/axes08.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+<way-out-yonder-west/>
+<out-yonder-west/>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+<way-out-yonder-east/>
+<out-yonder-east/>
+</far-north>
diff --git a/test/tests/conf/axes/axes08.xsl b/test/tests/conf/axes/axes08.xsl
new file mode 100644
index 0000000..fc9e94f
--- /dev/null
+++ b/test/tests/conf/axes/axes08.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'preceding::*' Axis Identifier with wildcard. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes09.xml b/test/tests/conf/axes/axes09.xml
new file mode 100644
index 0000000..a1c857e
--- /dev/null
+++ b/test/tests/conf/axes/axes09.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?> 
+<far-north>
+	<way-out-yonder-west/>
+	<out-yonder-west/>
+	<north>
+		<near-north>
+			<far-west/>
+			<west/>
+			<near-west/>
+			<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+				<near-south-east/>
+				<near-south>
+					<south>
+						<far-south/>
+					</south>
+				</near-south>
+				<near-south-west/>
+			</center>
+			<near-east/>hello
+			<east/>whatsup
+			<far-east/>goodbye
+		</near-north>
+	</north>
+	<way-out-yonder-east/>
+	<out-yonder-east/>
+</far-north>
diff --git a/test/tests/conf/axes/axes09.xsl b/test/tests/conf/axes/axes09.xsl
new file mode 100644
index 0000000..ab1d91a
--- /dev/null
+++ b/test/tests/conf/axes/axes09.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'following-sibling::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following-sibling::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+   <xsl:value-of select="name(.)"/>,
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes10.xml b/test/tests/conf/axes/axes10.xml
new file mode 100644
index 0000000..2788578
--- /dev/null
+++ b/test/tests/conf/axes/axes10.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+<way-out-yonder-west/>
+<out-yonder-west/>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+    <near-south-east/>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+    <near-south-west/>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+ <way-out-yonder-east/>
+ <out-yonder-east/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes10.xsl b/test/tests/conf/axes/axes10.xsl
new file mode 100644
index 0000000..3936b3c
--- /dev/null
+++ b/test/tests/conf/axes/axes10.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'preceding-sibling::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding-sibling::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes100.xml b/test/tests/conf/axes/axes100.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes100.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes100.xsl b/test/tests/conf/axes/axes100.xsl
new file mode 100644
index 0000000..fbb2b14
--- /dev/null
+++ b/test/tests/conf/axes/axes100.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes100 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor-or-self::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes101.xml b/test/tests/conf/axes/axes101.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes101.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes101.xsl b/test/tests/conf/axes/axes101.xsl
new file mode 100644
index 0000000..7f961ee
--- /dev/null
+++ b/test/tests/conf/axes/axes101.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes101 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/preceding-sibling::node()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes102.xml b/test/tests/conf/axes/axes102.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes102.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes102.xsl b/test/tests/conf/axes/axes102.xsl
new file mode 100644
index 0000000..4b1b2b1
--- /dev/null
+++ b/test/tests/conf/axes/axes102.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes102 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/following-sibling::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes103.xml b/test/tests/conf/axes/axes103.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes103.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes103.xsl b/test/tests/conf/axes/axes103.xsl
new file mode 100644
index 0000000..ed98189
--- /dev/null
+++ b/test/tests/conf/axes/axes103.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes103 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor::*/near-north/*[4]/@*/preceding::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes104.xml b/test/tests/conf/axes/axes104.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes104.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes104.xsl b/test/tests/conf/axes/axes104.xsl
new file mode 100644
index 0000000..ea8319d
--- /dev/null
+++ b/test/tests/conf/axes/axes104.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes104 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor::*/near-north/*[4]/@*/preceding::comment()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:text> </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes105.xml b/test/tests/conf/axes/axes105.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes105.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes105.xsl b/test/tests/conf/axes/axes105.xsl
new file mode 100644
index 0000000..f73f6e3
--- /dev/null
+++ b/test/tests/conf/axes/axes105.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes105 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor::*/near-north/*[4]/@*/preceding::text()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:value-of select="' #text'"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes106.xml b/test/tests/conf/axes/axes106.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes106.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes106.xsl b/test/tests/conf/axes/axes106.xsl
new file mode 100644
index 0000000..d6c3d7b
--- /dev/null
+++ b/test/tests/conf/axes/axes106.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes106 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor::*/near-north/*[4]/@*/preceding::processing-instruction()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  <xsl:text> </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes107.xml b/test/tests/conf/axes/axes107.xml
new file mode 100644
index 0000000..ba6202a
--- /dev/null
+++ b/test/tests/conf/axes/axes107.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	<!-- Comment-3 --> Level-3
+	<?a-pi pi-3?>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+	  <!-- Comment-4 --> Level-4
+	  <?a-pi pi-4?>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+		<!-- Comment-5 --> Level-5
+		<?a-pi pi-5?>
+        <near-south>
+		  <!-- Comment-6 --> Level-6
+		  <?a-pi pi-6?>
+          <south attr1="First" attr2="Last">
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes107.xsl b/test/tests/conf/axes/axes107.xsl
new file mode 100644
index 0000000..13e1214
--- /dev/null
+++ b/test/tests/conf/axes/axes107.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes107 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. Note that
+       namespace nodes should not be included on the preceeding axis,
+       and specifically that the implied declaration of xml: should
+       not appear in the output. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor::*/near-north/*[4]/@*/preceding::node()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>#</xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes108.xml b/test/tests/conf/axes/axes108.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes108.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes108.xsl b/test/tests/conf/axes/axes108.xsl
new file mode 100644
index 0000000..23cebff
--- /dev/null
+++ b/test/tests/conf/axes/axes108.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes108 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/following::comment()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:text> </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes109.xml b/test/tests/conf/axes/axes109.xml
new file mode 100644
index 0000000..a92c2ef
--- /dev/null
+++ b/test/tests/conf/axes/axes109.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<a>
+ <b>
+  <c x="x">
+   <d1/>
+   <d2 x="bad"/>
+  </c>
+  <c2/>
+ </b>
+ <b2/>
+</a>
diff --git a/test/tests/conf/axes/axes109.xsl b/test/tests/conf/axes/axes109.xsl
new file mode 100644
index 0000000..ab9d7f1
--- /dev/null
+++ b/test/tests/conf/axes/axes109.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes109 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests following axis starting from an attribute. -->
+  <!-- Author: Scott Boag -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//c/@x">
+      <xsl:apply-templates select="following::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes11.xml b/test/tests/conf/axes/axes11.xml
new file mode 100644
index 0000000..4f334b6
--- /dev/null
+++ b/test/tests/conf/axes/axes11.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<far-north>
+<way-out-yonder-west/>
+<out-yonder-west/>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes11.xsl b/test/tests/conf/axes/axes11.xsl
new file mode 100644
index 0000000..65235f8
--- /dev/null
+++ b/test/tests/conf/axes/axes11.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'parent::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="parent::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes110.xml b/test/tests/conf/axes/axes110.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes110.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes110.xsl b/test/tests/conf/axes/axes110.xsl
new file mode 100644
index 0000000..7ea74d0
--- /dev/null
+++ b/test/tests/conf/axes/axes110.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes110 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/following::processing-instruction()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  <xsl:text> </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes111.xml b/test/tests/conf/axes/axes111.xml
new file mode 100644
index 0000000..ba6202a
--- /dev/null
+++ b/test/tests/conf/axes/axes111.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	<!-- Comment-3 --> Level-3
+	<?a-pi pi-3?>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+	  <!-- Comment-4 --> Level-4
+	  <?a-pi pi-4?>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+		<!-- Comment-5 --> Level-5
+		<?a-pi pi-5?>
+        <near-south>
+		  <!-- Comment-6 --> Level-6
+		  <?a-pi pi-6?>
+          <south attr1="First" attr2="Last">
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes111.xsl b/test/tests/conf/axes/axes111.xsl
new file mode 100644
index 0000000..96877e4
--- /dev/null
+++ b/test/tests/conf/axes/axes111.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes111 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor::*/near-north/*[4]/@*/following::node()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>#</xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes112.xml b/test/tests/conf/axes/axes112.xml
new file mode 100644
index 0000000..d839bf3
--- /dev/null
+++ b/test/tests/conf/axes/axes112.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes112.xsl b/test/tests/conf/axes/axes112.xsl
new file mode 100644
index 0000000..84e5679
--- /dev/null
+++ b/test/tests/conf/axes/axes112.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes112 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axis followed
+       by additional relative-location-path steps. -->
+  <!-- Creator: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/following::text()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text> #text</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes113.xml b/test/tests/conf/axes/axes113.xml
new file mode 100644
index 0000000..21d9dad
--- /dev/null
+++ b/test/tests/conf/axes/axes113.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" ?>
+
+<a id="11">
+   <a id="21">
+      <a id="31">
+          <a id="41"/>
+      </a>
+      <a id="32" />
+      <a id="33" />
+   </a>
+   <a id="22">
+      <a id="34" />
+      <a id="35" />
+      <a id="36" a1="1" a2="2">
+         <a id="42"  >
+            <a id="51" />
+         </a>
+         <a id="43" >
+            <a id="52" />
+         </a>
+         <a id="44" >
+            <a id="53"/>
+         </a>
+         <a id="45" >
+            <a id="54" />
+            <a id="55" />
+         </a>
+      </a>
+      <a id="37" />
+      <a id="38" />
+   </a>
+   <a id="23">
+      <a id="39" />
+      <a id="3A" >
+         <a id="46">
+            <a id="56"/>
+         </a>
+      </a>
+      <a id="3B" />
+   </a>
+   <a id="24">
+      <a id="3C" />
+      <a id="3D" />
+      <a id="3E" />
+   </a>
+</a>
diff --git a/test/tests/conf/axes/axes113.xsl b/test/tests/conf/axes/axes113.xsl
new file mode 100644
index 0000000..76fd4f8
--- /dev/null
+++ b/test/tests/conf/axes/axes113.xsl
@@ -0,0 +1,111 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes113 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Comprehensive test of all axes -->
+  <!-- Author: Dave Haffner -->
+
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="//a[@id='36']">
+<out>
+   <xsl:text>matched on node </xsl:text>
+   <xsl:value-of select="./@id"/>
+   <xsl:text>: </xsl:text>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="parent::*" />
+      <xsl:with-param name="axisName" select="'parent::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="following::*" />
+      <xsl:with-param name="axisName" select="'following::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="following-sibling::*" />
+      <xsl:with-param name="axisName" select="'following-sibling::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="preceding::*" />
+      <xsl:with-param name="axisName" select="'preceding::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="preceding-sibling::*" />
+      <xsl:with-param name="axisName" select="'preceding-sibling::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="child::*" />
+      <xsl:with-param name="axisName" select="'child::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="descendant::*" />
+      <xsl:with-param name="axisName" select="'descendant::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="descendant-or-self::*" />
+      <xsl:with-param name="axisName" select="'descendant-or-self::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="ancestor::*" />
+      <xsl:with-param name="axisName" select="'ancestor::*'" />
+   </xsl:call-template>
+
+   <xsl:call-template name="displayNodes">
+      <xsl:with-param name="nodeList" select="ancestor-or-self::*" />
+      <xsl:with-param name="axisName" select="'ancestor-or-self::*'" />
+   </xsl:call-template>
+
+  <!-- Special handling for attribute axis. -->
+  <xsl:text>&#10;     Axis: attribute::* (sorted):  </xsl:text>
+  <xsl:for-each select="attribute::*" >
+    <xsl:sort select="name()"/>
+    <xsl:value-of select="name()"/>
+    <xsl:text>: </xsl:text>
+    <xsl:value-of select="."/>
+    <xsl:text>, </xsl:text>
+  </xsl:for-each>
+</out>
+</xsl:template>
+
+<xsl:template name="displayNodes">
+   <xsl:param name="nodeList" select="/.."/>
+   <xsl:param name="axisName" select="''" />
+     Axis: <xsl:value-of select="$axisName"/>
+     <xsl:text>:  </xsl:text>
+        <xsl:for-each select="$nodeList" >
+            <xsl:value-of select="@id"/>
+            <xsl:text>,</xsl:text>
+        </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes114.xml b/test/tests/conf/axes/axes114.xml
new file mode 100644
index 0000000..a4b9dd7
--- /dev/null
+++ b/test/tests/conf/axes/axes114.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo att1="c">
+     <foo att1="b">
+        <foo att1="a"/>
+     </foo>
+  </foo>
+  <baz/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes114.xsl b/test/tests/conf/axes/axes114.xsl
new file mode 100644
index 0000000..e928fd1
--- /dev/null
+++ b/test/tests/conf/axes/axes114.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES114 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for preceding::foo[1] vs. (preceding::foo)[1], as discussed in
+     the first NOTE in section 3.3 -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//baz">
+      <xsl:value-of select="preceding::foo[1]/@att1"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(preceding::foo)[1]/@att1"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes115.xml b/test/tests/conf/axes/axes115.xml
new file mode 100644
index 0000000..732dc37
--- /dev/null
+++ b/test/tests/conf/axes/axes115.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo att1="c"/>
+  <foo att1="b"/>
+  <foo att1="a"/>
+  <baz/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes115.xsl b/test/tests/conf/axes/axes115.xsl
new file mode 100644
index 0000000..a5d1069
--- /dev/null
+++ b/test/tests/conf/axes/axes115.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES115 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for preceding-sibling::foo[1] vs. (preceding-sibling::foo)[1], similar
+     to the treatment of preceding:: in the first NOTE in section 3.3 -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//baz">
+      <xsl:value-of select="preceding-sibling::foo[1]/@att1"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(preceding-sibling::foo)[1]/@att1"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes116.xml b/test/tests/conf/axes/axes116.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes116.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes116.xsl b/test/tests/conf/axes/axes116.xsl
new file mode 100644
index 0000000..5f4a313
--- /dev/null
+++ b/test/tests/conf/axes/axes116.xsl
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES116 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for likely optimizations of descendant patterns to make sure they're done correctly. -->
+
+
+<xsl:template match="north">
+  <out>
+  <!-- DS meands the location path is optimizable as a single descendant iterator. -->
+DS   1. AC: <xsl:value-of select="name(/descendant-or-self::north)"/>
+DS   2. AD: <xsl:value-of select="name(/descendant::near-north)"/>
+DS   3. BC: <xsl:value-of select="name(self::node()/descendant-or-self::north)"/>
+DS   4. BD: <xsl:value-of select="name(self::node()/descendant::near-north)"/>
+NDS  5. CC: <xsl:value-of select="name(descendant-or-self::north/descendant-or-self::north)"/>
+NDS  6. CD: <xsl:value-of select="name(descendant-or-self::north/descendant::near-north)"/>
+NDS  7. CE: <xsl:value-of select="name(descendant-or-self::north/child::near-north)"/>
+NDS  8. DC: <xsl:value-of select="name(descendant::near-north/descendant-or-self::near-north)"/>
+NDS  9. DD: <xsl:value-of select="name(descendant::near-north/descendant::far-west)"/>
+
+NDS 10. ACC: <xsl:value-of select="name(/descendant-or-self::north/descendant-or-self::north)"/>
+NDS 11. ACE: <xsl:value-of select="name(/descendant-or-self::north/child::near-north)"/>
+NDS 12. ADC: <xsl:value-of select="name(/descendant::near-north/descendant-or-self::near-north)"/>
+NDS 13. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::north/descendant-or-self::north)"/>
+NDS 14. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::north/child::near-north)"/>
+NDS 15. BDC: <xsl:value-of select="name(self::node()/descendant::near-north/descendant-or-self::far-west)"/>
+NDS 16. BDE: <xsl:value-of select="name(self::node()/descendant::near-north/child::far-west)"/>
+NDS 17. CCC: <xsl:value-of select="name(descendant-or-self::north/descendant-or-self::north/descendant-or-self::north)"/>
+NDS 18. CCE: <xsl:value-of select="name(descendant-or-self::north/descendant-or-self::north/child::near-north)"/>
+NDS 19. CDC: <xsl:value-of select="name(descendant-or-self::north/descendant::near-north/descendant-or-self::near-north)"/>
+NDS 20. CDE: <xsl:value-of select="name(descendant-or-self::north/descendant::near-north/child::far-west)"/>
+NDS 21. CEC: <xsl:value-of select="name(descendant-or-self::north/child::near-north/descendant-or-self::near-north)"/>
+NDS 22. CEE: <xsl:value-of select="name(descendant-or-self::north/child::near-north/child::far-west)"/>
+NDS 23. DCC: <xsl:value-of select="name(descendant::near-north/descendant-or-self::near-north/descendant-or-self::near-north)"/>
+NDS 24. DCE: <xsl:value-of select="name(descendant::near-north/descendant-or-self::near-north/child::far-west)"/>
+NDS 25. DDC: <xsl:value-of select="name(descendant::near-north/descendant::far-west/descendant-or-self::far-west)"/>
+
+DS  26. CC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::north)"/>
+DS  27. CD: <xsl:value-of select="name(descendant-or-self::node()/descendant::near-north)"/>
+DS  28. CE: <xsl:value-of select="name(descendant-or-self::node()/child::near-north)"/>
+DS  29. DC: <xsl:value-of select="name(descendant::node()/descendant-or-self::near-north)"/>
+DS  30. DD: <xsl:value-of select="name(descendant::node()/descendant::far-west)"/>
+
+DS  31. ACC: <xsl:value-of select="name(/descendant-or-self::node()/descendant-or-self::north)"/>
+DS  32. ACE: <xsl:value-of select="name(/descendant-or-self::node()/child::near-north)"/>
+DS  33. ADC: <xsl:value-of select="name(/descendant::node()/descendant-or-self::near-north)"/>
+DS  34. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::node()/descendant-or-self::north)"/>
+DS  35. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::node()/child::near-north)"/>
+DS  36. BDC: <xsl:value-of select="name(self::node()/descendant::node()/descendant-or-self::far-west)"/>
+DS  37. BDE: <xsl:value-of select="name(self::node()/descendant::node()/child::far-west)"/>
+DS  38. CCC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/descendant-or-self::north)"/>
+DS  39. CCE: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/child::near-north)"/>
+DS  40. CDC: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/descendant-or-self::near-north)"/>
+DS  41. CDE: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/child::far-west)"/>
+DS  42. CEC: <xsl:value-of select="name(descendant-or-self::node()/child::node()/descendant-or-self::near-north)"/>
+DS  43. CEE: <xsl:value-of select="name(descendant-or-self::node()/child::node()/child::far-west)"/>
+DS  44. DCC: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/descendant-or-self::near-north)"/>
+DS  45. DCE: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/child::far-west)"/>
+DS  46. DDC: <xsl:value-of select="name(descendant::node()/descendant::node()/descendant-or-self::far-west)"/>
+
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes117.xml b/test/tests/conf/axes/axes117.xml
new file mode 100644
index 0000000..1f3cd70
--- /dev/null
+++ b/test/tests/conf/axes/axes117.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<chapter title="A" x="0">
+  <section title="A1" x="1">
+    <subsection title="A1a" x="2">hello</subsection>
+    <subsection title="A1b">ahoy</subsection>
+  </section>
+  <section title="A2">
+    <subsection title="A2a">goodbye</subsection>
+    <subsection title="A2b">sayonara</subsection>
+    <subsection title="A2c">adios</subsection>
+  </section>
+  <section title="A3">
+    <subsection title="A3a">aloha</subsection>
+    <subsection title="A3b">
+      <footnote x="3">A3b-1</footnote>
+      <footnote>A3b-2</footnote>
+    </subsection>
+    <subsection title="A3c">shalom</subsection>
+  </section>
+</chapter>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes117.xsl b/test/tests/conf/axes/axes117.xsl
new file mode 100644
index 0000000..d26ce7d
--- /dev/null
+++ b/test/tests/conf/axes/axes117.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: axes116 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of //@ sequences -->
+
+<xsl:output method="xml" encoding="utf-8"/>
+
+<xsl:template match="/">
+  <out><xsl:text>&#10;</xsl:text>
+    <all-attribs><xsl:value-of select="count(//@*)"/></all-attribs><xsl:text>&#10;</xsl:text>
+    <all-titles><xsl:value-of select="count(//@title)"/></all-titles><xsl:text>&#10;</xsl:text>
+    <all-sect-attribs><xsl:value-of select="count(//section//@*)"/></all-sect-attribs><xsl:text>&#10;</xsl:text>
+    <all-sect-titles><xsl:value-of select="count(//section//@title)"/></all-sect-titles><xsl:text>&#10;</xsl:text>
+    <!-- The above two, respectively, must equal the sums of sect-*-attribs and sect-*-titles below. -->
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <chap-attribs><xsl:value-of select="count(.//@*)"/></chap-attribs><xsl:text>&#10;</xsl:text>
+  <chap-titles><xsl:value-of select="count(.//@title)"/></chap-titles><xsl:text>&#10;</xsl:text>
+  <!-- Rather than iterate, we want to have a sub-element name lead the path expression. -->
+  <sect-1-attribs><xsl:value-of select="count(section[1]//@*)"/></sect-1-attribs><xsl:text>&#10;</xsl:text>
+  <sect-1-titles><xsl:value-of select="count(section[1]//@title)"/></sect-1-titles><xsl:text>&#10;</xsl:text>
+  <sect-2-attribs><xsl:value-of select="count(section[2]//@*)"/></sect-2-attribs><xsl:text>&#10;</xsl:text>
+  <sect-2-titles><xsl:value-of select="count(section[2]//@title)"/></sect-2-titles><xsl:text>&#10;</xsl:text>
+  <sect-3-attribs><xsl:value-of select="count(section[3]//@*)"/></sect-3-attribs><xsl:text>&#10;</xsl:text>
+  <sect-3-titles><xsl:value-of select="count(section[3]//@title)"/></sect-3-titles><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes119.xml b/test/tests/conf/axes/axes119.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes119.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes119.xsl b/test/tests/conf/axes/axes119.xsl
new file mode 100644
index 0000000..c584db8
--- /dev/null
+++ b/test/tests/conf/axes/axes119.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes119 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try 'ancestor-or-self::*' after walking down to it. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="/far-north/north/near-north/center/ancestor-or-self::*"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes12.xml b/test/tests/conf/axes/axes12.xml
new file mode 100644
index 0000000..2788578
--- /dev/null
+++ b/test/tests/conf/axes/axes12.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+<way-out-yonder-west/>
+<out-yonder-west/>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+    <near-south-east/>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+    <near-south-west/>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+ <way-out-yonder-east/>
+ <out-yonder-east/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes12.xsl b/test/tests/conf/axes/axes12.xsl
new file mode 100644
index 0000000..ece9c32
--- /dev/null
+++ b/test/tests/conf/axes/axes12.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'self::*' Axis Identifier. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes120.xml b/test/tests/conf/axes/axes120.xml
new file mode 100644
index 0000000..331a171
--- /dev/null
+++ b/test/tests/conf/axes/axes120.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<a:root xmlns:a="name-a">
+  <b:sub xmlns:b="name-b"/>
+  <c:sub xmlns:c="name-c"/>
+</a:root>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes120.xsl b/test/tests/conf/axes/axes120.xsl
new file mode 100644
index 0000000..6b4a063
--- /dev/null
+++ b/test/tests/conf/axes/axes120.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  				xmlns:a="name-a"
+  				xmlns:b="name-b"
+  				xmlns:c="namc-c">
+
+  <!-- FileName: axes120 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Axes-->
+  <!-- Creator: Paul Dick (Revision of axes118) -->
+  <!-- Purpose: Check that namespace nodes exist separately on each element. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>&#010;</xsl:text>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a:root">
+  <xsl:for-each select="self::node()|child::*"><xsl:text>&#010;</xsl:text>
+    <xsl:element name="{name(.)}"/><xsl:text>&#010;</xsl:text>
+  	<xsl:for-each select="namespace::*">
+    	<xsl:sort select="name(.)"/><xsl:text>&#09;</xsl:text>
+    	<xsl:element name="{name(.)}"><xsl:value-of select="."/></xsl:element><xsl:text>,&#010;</xsl:text>
+  	</xsl:for-each>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- To suppress empty lines -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes121.xml b/test/tests/conf/axes/axes121.xml
new file mode 100644
index 0000000..23cfbce
--- /dev/null
+++ b/test/tests/conf/axes/axes121.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<far-north>
+  <north>north-text1
+    <near-north>
+      <far-west/>
+      <west><!-- Western comment --></west>
+      <near-west/>
+      <center>center-text1
+        <near-south>
+          <south>south-text</south>
+        </near-south>
+        <near-south-west/>center-text2
+      </center>
+      <near-east/>
+      <east><!-- Eastern comment --></east>
+      <far-east/>
+    </near-north>north-text2
+  </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes121.xsl b/test/tests/conf/axes/axes121.xsl
new file mode 100644
index 0000000..e8ca131
--- /dev/null
+++ b/test/tests/conf/axes/axes121.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES121 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Creator: David Marston -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for '/descendant::*' to select all elements (excluding root node).
+    No text or comments should be picked up. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="/descendant::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:choose>
+        <xsl:when test="name(.)='center'">
+          <xsl:text>&#10;</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text> </xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes122.xml b/test/tests/conf/axes/axes122.xml
new file mode 100644
index 0000000..62e8a5d
--- /dev/null
+++ b/test/tests/conf/axes/axes122.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc att1="e">
+  <foo att1="d">
+     <foo att1="c">
+        <foo att1="b">
+           <baz att1="a"/>
+        </foo>
+     </foo>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes122.xsl b/test/tests/conf/axes/axes122.xsl
new file mode 100644
index 0000000..875fa5f
--- /dev/null
+++ b/test/tests/conf/axes/axes122.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES122 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for last() on two-step paths, contrasting descendant-or-self with ancestor-or-self. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>From root: </xsl:text>
+    <xsl:value-of select="count(descendant-or-self::*/@att1)"/><xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="doc"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:text>From doc: </xsl:text>
+  <xsl:value-of select="count(descendant-or-self::*/@att1)"/><xsl:text>= </xsl:text>
+  <xsl:value-of select="descendant-or-self::*/@att1[last()]"/><xsl:text>, </xsl:text>
+  <xsl:value-of select="descendant-or-self::*[last()]/@att1"/><xsl:text>, </xsl:text>
+  <xsl:value-of select="(descendant-or-self::*/@att1)[last()]"/><xsl:text>; &#10;</xsl:text>
+  <!-- Now reposition on the lowest node and look upward. -->
+  <xsl:for-each select="//baz">
+    <xsl:text>From baz: </xsl:text>
+    <xsl:value-of select="count(ancestor-or-self::*/@att1)"/><xsl:text>= </xsl:text>
+      <xsl:value-of select="ancestor-or-self::*/@att1[last()]"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(ancestor-or-self::*)/@att1[last()]"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(ancestor-or-self::*/@att1)[last()]"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(ancestor::*|self::*)/@att1[last()]"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="((ancestor::*|self::*)/@att1)[last()]"/><xsl:text>; &#10;</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes123.xml b/test/tests/conf/axes/axes123.xml
new file mode 100644
index 0000000..b87fc35
--- /dev/null
+++ b/test/tests/conf/axes/axes123.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+           <near-south>
+              <south>
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes123.xsl b/test/tests/conf/axes/axes123.xsl
new file mode 100644
index 0000000..0634b0e
--- /dev/null
+++ b/test/tests/conf/axes/axes123.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes123 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates from an attribute using parent axis. -->
+  <!-- This is a twist on axes96, where the context node is an element. -->
+  <!-- Creator: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center/@center-attr-1">
+      <xsl:apply-templates select="../.."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes124.xml b/test/tests/conf/axes/axes124.xml
new file mode 100644
index 0000000..d6cc247
--- /dev/null
+++ b/test/tests/conf/axes/axes124.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <!--Center Comment-->
+           <near-south-west/>
+           <near-south>
+              <south>
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes124.xsl b/test/tests/conf/axes/axes124.xsl
new file mode 100644
index 0000000..beeb944
--- /dev/null
+++ b/test/tests/conf/axes/axes124.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes123 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates from a comment using parent axis. -->
+  <!-- Creator: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center/comment()">
+      <xsl:apply-templates select=".."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- suppress whitespace-only nodes -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes125.xml b/test/tests/conf/axes/axes125.xml
new file mode 100644
index 0000000..8d322d8
--- /dev/null
+++ b/test/tests/conf/axes/axes125.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc xmlns:ext="http://somebody.elses.extension">D
+  <connection xmlns:woo="http://woo.com" a="bad"/>C
+  <section xmlns:foo="http://foo.com" b="bad">S
+    <inner xmlns:whiz="http://whiz.com/special/page"/>I
+  </section>X
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes125.xsl b/test/tests/conf/axes/axes125.xsl
new file mode 100644
index 0000000..eab02e5
--- /dev/null
+++ b/test/tests/conf/axes/axes125.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes125 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that preceding::node() doesn't get namespace or attribute nodes -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//inner/preceding::node()">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text> (</xsl:text>
+      <xsl:value-of select="."/>
+      <xsl:text>), </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes126.xml b/test/tests/conf/axes/axes126.xml
new file mode 100644
index 0000000..a7dd644
--- /dev/null
+++ b/test/tests/conf/axes/axes126.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>D
+  <!-- Comment 1 -->
+  <connection/>C
+  <?a-pi pi-1?>
+  <section>S
+    <!-- Comment 2 -->
+    <?a-pi pi-2?>
+    <inner/>I
+  </section>X
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes126.xsl b/test/tests/conf/axes/axes126.xsl
new file mode 100644
index 0000000..ad8696c
--- /dev/null
+++ b/test/tests/conf/axes/axes126.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes126 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that preceding::node() does get comment or PI nodes -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//inner/preceding::node()">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text> (</xsl:text>
+      <xsl:value-of select="."/>
+      <xsl:text>), </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes127.xml b/test/tests/conf/axes/axes127.xml
new file mode 100644
index 0000000..02e2133
--- /dev/null
+++ b/test/tests/conf/axes/axes127.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc xmlns:ext="http://somebody.elses.extension">D
+  <section xmlns:foo="http://foo.com" b="bad">S
+    <inner xmlns:whiz="http://whiz.com/special/page"/>I
+  </section>X
+  <connection xmlns:woo="http://woo.com" a="bad"/>C
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes127.xsl b/test/tests/conf/axes/axes127.xsl
new file mode 100644
index 0000000..be643ce
--- /dev/null
+++ b/test/tests/conf/axes/axes127.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes127 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that following::node() doesn't get namespace or attribute nodes -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//inner/following::node()">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text> (</xsl:text>
+      <xsl:value-of select="."/>
+      <xsl:text>), </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes128.xml b/test/tests/conf/axes/axes128.xml
new file mode 100644
index 0000000..a7dd644
--- /dev/null
+++ b/test/tests/conf/axes/axes128.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>D
+  <!-- Comment 1 -->
+  <connection/>C
+  <?a-pi pi-1?>
+  <section>S
+    <!-- Comment 2 -->
+    <?a-pi pi-2?>
+    <inner/>I
+  </section>X
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes128.xsl b/test/tests/conf/axes/axes128.xsl
new file mode 100644
index 0000000..19beee4
--- /dev/null
+++ b/test/tests/conf/axes/axes128.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes128 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that preceding::node() does get comment and PI nodes -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//inner/preceding::node()">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text> (</xsl:text>
+      <xsl:value-of select="."/>
+      <xsl:text>), </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes129.xml b/test/tests/conf/axes/axes129.xml
new file mode 100644
index 0000000..5639551
--- /dev/null
+++ b/test/tests/conf/axes/axes129.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<docs xmlns:test="http://tester.com">
+  <doc x="x" test:y="y" jad:z="z" xmlns:jad="http://administrator.com"/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes129.xsl b/test/tests/conf/axes/axes129.xsl
new file mode 100644
index 0000000..4c90198
--- /dev/null
+++ b/test/tests/conf/axes/axes129.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes129 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Axes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check the namespace axis starting from an attribute; should be empty -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="yes" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+    <xsl:apply-templates select="@*">
+        <xsl:sort select="local-name(.)" data-type="text"/>
+    </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="doc/@*">
+  <ns-count attr="{name(.)}" count="{count(namespace::*)}"/>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- To suppress empty lines -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes13.xml b/test/tests/conf/axes/axes13.xml
new file mode 100644
index 0000000..ae19822
--- /dev/null
+++ b/test/tests/conf/axes/axes13.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo new="true"><baz>is new</baz></foo>
+  <foo new="true">xyz<baz>is new but has text</baz></foo>
+  <foo new="false"><baz>is not new</baz></foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes13.xsl b/test/tests/conf/axes/axes13.xsl
new file mode 100644
index 0000000..265eca4
--- /dev/null
+++ b/test/tests/conf/axes/axes13.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for ancestor::*[...][...] and index of ancestors. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:choose>
+    <xsl:when test="ancestor::*[@new='true'][not(text())]">
+      <xsl:value-of select="name(ancestor::*[3])"/><xsl:text>/</xsl:text>
+      <xsl:value-of select="name(ancestor::*[2])"/><xsl:text>/</xsl:text>
+      <xsl:value-of select="name(ancestor::*[1])"/><xsl:text>/</xsl:text>
+      <xsl:value-of select="."/><xsl:text>&#010;</xsl:text>
+    </xsl:when>
+    <xsl:when test="ancestor::*[2][@new]">
+      <xsl:value-of select="name(ancestor::*[3])"/><xsl:text>/</xsl:text>
+      <xsl:value-of select="name(ancestor::*[2])"/><xsl:text>/</xsl:text>
+      <xsl:value-of select="name(ancestor::*[1])"/><xsl:text>/</xsl:text>
+      <xsl:value-of select="."/><xsl:text>&#010;</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes130.xml b/test/tests/conf/axes/axes130.xml
new file mode 100644
index 0000000..131b584
--- /dev/null
+++ b/test/tests/conf/axes/axes130.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<north>
+  <center center-attr="here">
+     <south/>
+  </center>
+</north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes130.xsl b/test/tests/conf/axes/axes130.xsl
new file mode 100644
index 0000000..2592dd9
--- /dev/null
+++ b/test/tests/conf/axes/axes130.xsl
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes130 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'self::' axis on an attribute -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="yes" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:choose>
+    <xsl:when test="self::node()">
+      <any-node>true</any-node>
+    </xsl:when>
+    <xsl:otherwise>
+      <any-node>false</any-node>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:choose>
+    <!-- FALSE: principal node type of self is element -->
+    <xsl:when test="self::*">
+      <any-elem>true</any-elem>
+    </xsl:when>
+    <xsl:otherwise>
+      <any-elem>false</any-elem>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:choose>
+    <xsl:when test="self::text()">
+      <any-text>true</any-text>
+    </xsl:when>
+    <xsl:otherwise>
+      <any-text>false</any-text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:choose>
+    <!-- FALSE: principal node type of self is element -->
+    <xsl:when test="self::center-attr">
+      <named>true</named>
+    </xsl:when>
+    <xsl:otherwise>
+      <named>false</named>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes131.xml b/test/tests/conf/axes/axes131.xml
new file mode 100644
index 0000000..3145cf8
--- /dev/null
+++ b/test/tests/conf/axes/axes131.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <child><grandchild><greatgrandchild/></grandchild><grandchild><greatgrandchild><greatgreatgreatgrandchild/></greatgrandchild><greatgrandchild/></grandchild></child>
+  <child><grandchild><greatgrandchild/><greatgrandchild/><greatgrandchild/></grandchild></child>
+  <child><grandchild><greatgrandchild/></grandchild></child>
+  <child><grandchild/></child>
+  <child><grandchild/><grandchild/></child>
+  <child/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes131.xsl b/test/tests/conf/axes/axes131.xsl
new file mode 100644
index 0000000..6cb6ba9
--- /dev/null
+++ b/test/tests/conf/axes/axes131.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: axes131 -->
+<!-- Document: http://www.w3.org/TR/xpath -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 2.2 -->
+<!-- Creator: Henry Zongaro -->
+<!-- Purpose: Test for descendant axis when siblings have some children or
+     the context node has no siblings. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="child">
+      <xsl:text>&#10;</xsl:text>
+      <child number="{position()}">
+        <xsl:for-each select="grandchild">
+          <xsl:text>&#10;</xsl:text>
+          <grandchild number="{position()}">
+            <xsl:attribute name="descendantaxiscount"><xsl:value-of select="count(descendant::*)"/></xsl:attribute>
+            <xsl:attribute name="descendantorselfaxiscount"><xsl:value-of select="count(descendant-or-self::*)"/></xsl:attribute>
+          </grandchild>
+        </xsl:for-each>
+        <xsl:text>&#10;</xsl:text>
+      </child>
+    </xsl:for-each>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes14.xml b/test/tests/conf/axes/axes14.xml
new file mode 100644
index 0000000..ff9a91c
--- /dev/null
+++ b/test/tests/conf/axes/axes14.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo att1="c">
+     <foo att1="b">
+        <foo att1="a">
+           <baz/>
+        </foo>
+     </foo>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes14.xsl b/test/tests/conf/axes/axes14.xsl
new file mode 100644
index 0000000..fc29e64
--- /dev/null
+++ b/test/tests/conf/axes/axes14.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for ancestor-or-self::*[@att1][1]/@att1 vs. (ancestor-or-self::*)[@att1][1]/@att1. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//baz">
+      <xsl:value-of select="ancestor-or-self::*[@att1][1]/@att1"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(ancestor-or-self::*)[@att1][1]/@att1"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes15.xml b/test/tests/conf/axes/axes15.xml
new file mode 100644
index 0000000..efb1783
--- /dev/null
+++ b/test/tests/conf/axes/axes15.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?> 
+<a>  
+  <b att="hey">
+    <c att="these"/>
+    <d>
+       <e/>
+       <f att="should"/>
+    </d>
+    <g>
+       <h>
+           <i/>
+           <j att="not"/>
+       </h>
+    </g>
+  </b>
+  <k>
+    <l>
+      <m att="show"/>
+      <n att="up"/>
+    </l>
+    <o att="in"/>
+    <p att="the output"/>
+  </k>
+</a>
diff --git a/test/tests/conf/axes/axes15.xsl b/test/tests/conf/axes/axes15.xsl
new file mode 100644
index 0000000..6c1b6f4
--- /dev/null
+++ b/test/tests/conf/axes/axes15.xsl
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for completion of tree using all axes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>From root: 
+</xsl:text>
+    <xsl:call-template name="show-four-directions"/>
+    <xsl:for-each select="descendant-or-self::*">
+       <xsl:text>
+------------------------------------------------
+</xsl:text>
+<xsl:variable name="ename">
+       <xsl:text>From-</xsl:text>
+       <xsl:value-of select="name()"/>
+</xsl:variable>
+<xsl:element name="{$ename}"><xsl:text>&#10;</xsl:text>
+       <xsl:call-template name="show-four-directions"/>
+</xsl:element>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template name="show-four-directions">
+  <xsl:text>ancestors: </xsl:text>
+  <xsl:for-each select="ancestor::*">
+    <xsl:value-of select="name()"/><xsl:text> </xsl:text>
+  </xsl:for-each><xsl:text>
+</xsl:text>
+  <xsl:text>preceding: </xsl:text>
+  <xsl:for-each select="preceding::*">
+    <xsl:value-of select="name()"/><xsl:text> </xsl:text>
+  </xsl:for-each><xsl:text>
+</xsl:text>
+  <xsl:text>self: </xsl:text>
+  <xsl:for-each select="self::*">
+    <xsl:value-of select="name()"/><xsl:text> </xsl:text>
+  </xsl:for-each><xsl:text>
+</xsl:text>
+  <xsl:text>descendant: </xsl:text>
+  <xsl:for-each select="descendant::*">
+    <xsl:value-of select="name()"/><xsl:text> </xsl:text>
+  </xsl:for-each><xsl:text>
+</xsl:text>
+  <xsl:text>following: </xsl:text>
+  <xsl:for-each select="following::*">
+    <xsl:value-of select="name()"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes16.xml b/test/tests/conf/axes/axes16.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes16.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes16.xsl b/test/tests/conf/axes/axes16.xsl
new file mode 100644
index 0000000..8cfe37d
--- /dev/null
+++ b/test/tests/conf/axes/axes16.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'ancestor::' Axis Identifier with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="ancestor::*[3]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes17.xml b/test/tests/conf/axes/axes17.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes17.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes17.xsl b/test/tests/conf/axes/axes17.xsl
new file mode 100644
index 0000000..dbaac72
--- /dev/null
+++ b/test/tests/conf/axes/axes17.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'ancestor-or-self::' Axis Identifier with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="ancestor-or-self::*[1]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes18.xml b/test/tests/conf/axes/axes18.xml
new file mode 100644
index 0000000..df95bdd
--- /dev/null
+++ b/test/tests/conf/axes/axes18.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes18.xsl b/test/tests/conf/axes/axes18.xsl
new file mode 100644
index 0000000..e6564e6
--- /dev/null
+++ b/test/tests/conf/axes/axes18.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'attribute::' Axis Identifier with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="attribute::*[2]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes19.xml b/test/tests/conf/axes/axes19.xml
new file mode 100644
index 0000000..a8c16ea
--- /dev/null
+++ b/test/tests/conf/axes/axes19.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes19.xsl b/test/tests/conf/axes/axes19.xsl
new file mode 100644
index 0000000..b2ecc20
--- /dev/null
+++ b/test/tests/conf/axes/axes19.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for '@*' abbreviated syntax. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes20.xml b/test/tests/conf/axes/axes20.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes20.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes20.xsl b/test/tests/conf/axes/axes20.xsl
new file mode 100644
index 0000000..92f848b
--- /dev/null
+++ b/test/tests/conf/axes/axes20.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for '@*' abbreviated syntax with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*[2]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes21.xml b/test/tests/conf/axes/axes21.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes21.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes21.xsl b/test/tests/conf/axes/axes21.xsl
new file mode 100644
index 0000000..bc2cdd5
--- /dev/null
+++ b/test/tests/conf/axes/axes21.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'child::' Axis Identifier with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="child::*[2]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes22.xml b/test/tests/conf/axes/axes22.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes22.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes22.xsl b/test/tests/conf/axes/axes22.xsl
new file mode 100644
index 0000000..9b2c2d7
--- /dev/null
+++ b/test/tests/conf/axes/axes22.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'child::' Axis Identifier with element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="child::near-south-west"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes23.xml b/test/tests/conf/axes/axes23.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes23.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes23.xsl b/test/tests/conf/axes/axes23.xsl
new file mode 100644
index 0000000..9f5d641
--- /dev/null
+++ b/test/tests/conf/axes/axes23.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES23 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'descendant::' Axis Identifier with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="descendant::*[3]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes24.xml b/test/tests/conf/axes/axes24.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes24.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes24.xsl b/test/tests/conf/axes/axes24.xsl
new file mode 100644
index 0000000..9def801
--- /dev/null
+++ b/test/tests/conf/axes/axes24.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'descendant::' Axis Identifier with specified element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="descendant::far-south"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes25.xml b/test/tests/conf/axes/axes25.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes25.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes25.xsl b/test/tests/conf/axes/axes25.xsl
new file mode 100644
index 0000000..864f139
--- /dev/null
+++ b/test/tests/conf/axes/axes25.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES25 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'descendant-or-self::' Axis Identifier with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="descendant-or-self::*[3]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes26.xml b/test/tests/conf/axes/axes26.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes26.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes26.xsl b/test/tests/conf/axes/axes26.xsl
new file mode 100644
index 0000000..b6f0c35
--- /dev/null
+++ b/test/tests/conf/axes/axes26.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES26 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'descendant-or-self::' Axis Identifier with specified element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="descendant-or-self::far-south"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes27.xml b/test/tests/conf/axes/axes27.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes27.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes27.xsl b/test/tests/conf/axes/axes27.xsl
new file mode 100644
index 0000000..ecb6b87
--- /dev/null
+++ b/test/tests/conf/axes/axes27.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES27 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'descendant-or-self::' Axis Identifier with self specified. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="descendant-or-self::center"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes28.xml b/test/tests/conf/axes/axes28.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes28.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes28.xsl b/test/tests/conf/axes/axes28.xsl
new file mode 100644
index 0000000..2343095
--- /dev/null
+++ b/test/tests/conf/axes/axes28.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES28 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'following::' Axis Identifier with wildcard and index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following::*[4]"/>
+    </xsl:for-each>
+  </out> 
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes29.xml b/test/tests/conf/axes/axes29.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes29.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes29.xsl b/test/tests/conf/axes/axes29.xsl
new file mode 100644
index 0000000..b9e65b7
--- /dev/null
+++ b/test/tests/conf/axes/axes29.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES29 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'following::' Axis Identifier with specified element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following::out-yonder-east"/>
+    </xsl:for-each>
+  </out> 
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes30.xml b/test/tests/conf/axes/axes30.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes30.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes30.xsl b/test/tests/conf/axes/axes30.xsl
new file mode 100644
index 0000000..805197f
--- /dev/null
+++ b/test/tests/conf/axes/axes30.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES30 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'preceding::' Axis Identifier with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding::*[4]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes31.xml b/test/tests/conf/axes/axes31.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes31.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes31.xsl b/test/tests/conf/axes/axes31.xsl
new file mode 100644
index 0000000..98baed5
--- /dev/null
+++ b/test/tests/conf/axes/axes31.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES31 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'preceding::' Axis Identifier with specified element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding::out-yonder-west"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes32.xml b/test/tests/conf/axes/axes32.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes32.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes32.xsl b/test/tests/conf/axes/axes32.xsl
new file mode 100644
index 0000000..154bce6
--- /dev/null
+++ b/test/tests/conf/axes/axes32.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES32 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'following-sibling::' Axis Identifier with index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following-sibling::*[2]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes33.xml b/test/tests/conf/axes/axes33.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes33.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes33.xsl b/test/tests/conf/axes/axes33.xsl
new file mode 100644
index 0000000..4234b87
--- /dev/null
+++ b/test/tests/conf/axes/axes33.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES33 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'following-sibling::' Axis Identifier with specified element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following-sibling::east"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes34.xml b/test/tests/conf/axes/axes34.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes34.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes34.xsl b/test/tests/conf/axes/axes34.xsl
new file mode 100644
index 0000000..4d6f7d9
--- /dev/null
+++ b/test/tests/conf/axes/axes34.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES34 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'preceding-sibling::' Axis Identifier with wildcard and index. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding-sibling::*[2]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes35.xml b/test/tests/conf/axes/axes35.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes35.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes35.xsl b/test/tests/conf/axes/axes35.xsl
new file mode 100644
index 0000000..c36f647
--- /dev/null
+++ b/test/tests/conf/axes/axes35.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES35 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'preceding-sibling::' Axis Identifier with specified element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding-sibling::west"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes36.xml b/test/tests/conf/axes/axes36.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes36.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes36.xsl b/test/tests/conf/axes/axes36.xsl
new file mode 100644
index 0000000..0b9b1cf
--- /dev/null
+++ b/test/tests/conf/axes/axes36.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES36 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'parent::' Axis Identifier using specified element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="parent::near-north"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes37.xml b/test/tests/conf/axes/axes37.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes37.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes37.xsl b/test/tests/conf/axes/axes37.xsl
new file mode 100644
index 0000000..6fd463c
--- /dev/null
+++ b/test/tests/conf/axes/axes37.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES37 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'parent::' Axis Identifier using index (not that it's practical). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="parent::*[1]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes38.xml b/test/tests/conf/axes/axes38.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes38.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes38.xsl b/test/tests/conf/axes/axes38.xsl
new file mode 100644
index 0000000..1b86e84
--- /dev/null
+++ b/test/tests/conf/axes/axes38.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES38 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'parent::' Axis Identifier using specified element name that is not found. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="parent::foo"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes39.xml b/test/tests/conf/axes/axes39.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes39.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes39.xsl b/test/tests/conf/axes/axes39.xsl
new file mode 100644
index 0000000..110f965
--- /dev/null
+++ b/test/tests/conf/axes/axes39.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES39 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for abbreviated '..' syntax. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select=".."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes40.xml b/test/tests/conf/axes/axes40.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes40.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes40.xsl b/test/tests/conf/axes/axes40.xsl
new file mode 100644
index 0000000..14646f6
--- /dev/null
+++ b/test/tests/conf/axes/axes40.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES40 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'self::' Axis Identifier with specified element name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::center"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes41.xml b/test/tests/conf/axes/axes41.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes41.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes41.xsl b/test/tests/conf/axes/axes41.xsl
new file mode 100644
index 0000000..0719348
--- /dev/null
+++ b/test/tests/conf/axes/axes41.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES41 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'self::' Axis Identifier with index (not that it's practical). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::*[1]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes42.xml b/test/tests/conf/axes/axes42.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes42.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes42.xsl b/test/tests/conf/axes/axes42.xsl
new file mode 100644
index 0000000..1425d4f
--- /dev/null
+++ b/test/tests/conf/axes/axes42.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES42 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for 'self::' Axis Identifier with specified element name that is not found. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::foo"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes43.xml b/test/tests/conf/axes/axes43.xml
new file mode 100644
index 0000000..3816cf2
--- /dev/null
+++ b/test/tests/conf/axes/axes43.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes43.xsl b/test/tests/conf/axes/axes43.xsl
new file mode 100644
index 0000000..f6cb20a
--- /dev/null
+++ b/test/tests/conf/axes/axes43.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES43 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for abbreviated '.' syntax. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes44.xml b/test/tests/conf/axes/axes44.xml
new file mode 100644
index 0000000..5f63252
--- /dev/null
+++ b/test/tests/conf/axes/axes44.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south>
+<south>
+<far-south/>>
+</south>
+</near-south>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes44.xsl b/test/tests/conf/axes/axes44.xsl
new file mode 100644
index 0000000..af76e41
--- /dev/null
+++ b/test/tests/conf/axes/axes44.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES44 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'attribute::' Axis Identifier with name of attribute. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="attribute::center-attr-2"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes45.xml b/test/tests/conf/axes/axes45.xml
new file mode 100644
index 0000000..b241bff
--- /dev/null
+++ b/test/tests/conf/axes/axes45.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?> 
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south>
+<south>
+<far-south/>>
+</south>
+</near-south>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes45.xsl b/test/tests/conf/axes/axes45.xsl
new file mode 100644
index 0000000..7634097
--- /dev/null
+++ b/test/tests/conf/axes/axes45.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES45 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for '@' to select an attribute, with name of attribute. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@center-attr-2"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes46.xml b/test/tests/conf/axes/axes46.xml
new file mode 100644
index 0000000..3bbe620
--- /dev/null
+++ b/test/tests/conf/axes/axes46.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north length="11" width="22">
+<far-west/>
+<west/>
+<near-west/>
+<center>
+<near-south>
+<south>
+<far-south/>>
+</south>
+</near-south>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes46.xsl b/test/tests/conf/axes/axes46.xsl
new file mode 100644
index 0000000..05dd653
--- /dev/null
+++ b/test/tests/conf/axes/axes46.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES46 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for '..' and an attribute of parent node. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="../@width"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes47.xml b/test/tests/conf/axes/axes47.xml
new file mode 100644
index 0000000..b3a652f
--- /dev/null
+++ b/test/tests/conf/axes/axes47.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<docs>
+<doc>
+  <foo att1="c">
+    <foo att1="b">
+      <foo att1="a">
+        <baz att1="wrong"/>
+      </foo>
+    </foo>
+  </foo>
+</doc>
+<doc>
+  <inner att1="wrong">
+    <foo att1="a">
+      <baz att1="wrong"/>
+    </foo>
+  </inner>
+</doc>
+</docs>
+   
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes47.xsl b/test/tests/conf/axes/axes47.xsl
new file mode 100644
index 0000000..7542266
--- /dev/null
+++ b/test/tests/conf/axes/axes47.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES47 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for '..//name' and an attribute. -->
+
+<xsl:template match="/docs">
+  <out>
+    <xsl:for-each select="doc">
+      <xsl:apply-templates select="..//foo"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="@att1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes48.xml b/test/tests/conf/axes/axes48.xml
new file mode 100644
index 0000000..517106c
--- /dev/null
+++ b/test/tests/conf/axes/axes48.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes48.xsl b/test/tests/conf/axes/axes48.xsl
new file mode 100644
index 0000000..6d3faf6
--- /dev/null
+++ b/test/tests/conf/axes/axes48.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES48 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for two 'child::' Axis Identifiers in succession. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="child::*/child::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes49.xml b/test/tests/conf/axes/axes49.xml
new file mode 100644
index 0000000..517106c
--- /dev/null
+++ b/test/tests/conf/axes/axes49.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes49.xsl b/test/tests/conf/axes/axes49.xsl
new file mode 100644
index 0000000..a1d1555
--- /dev/null
+++ b/test/tests/conf/axes/axes49.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES49 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'child::*' followed by 'descendant::*' (i.e., all grandchildren and below). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="child::*/descendant::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes50.xml b/test/tests/conf/axes/axes50.xml
new file mode 100644
index 0000000..517106c
--- /dev/null
+++ b/test/tests/conf/axes/axes50.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes50.xsl b/test/tests/conf/axes/axes50.xsl
new file mode 100644
index 0000000..cadda1c
--- /dev/null
+++ b/test/tests/conf/axes/axes50.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES50 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'descendant::*' followed by 'child::*' (i.e., all grandchildren and below). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="descendant::*/child::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes51.xml b/test/tests/conf/axes/axes51.xml
new file mode 100644
index 0000000..517106c
--- /dev/null
+++ b/test/tests/conf/axes/axes51.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes51.xsl b/test/tests/conf/axes/axes51.xsl
new file mode 100644
index 0000000..57d4154
--- /dev/null
+++ b/test/tests/conf/axes/axes51.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES51 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for '//' followed by 'child::*' (i.e., all grandchildren). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//near-north">
+      <xsl:apply-templates select="center//child::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes52.xml b/test/tests/conf/axes/axes52.xml
new file mode 100644
index 0000000..517106c
--- /dev/null
+++ b/test/tests/conf/axes/axes52.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes52.xsl b/test/tests/conf/axes/axes52.xsl
new file mode 100644
index 0000000..667faa2
--- /dev/null
+++ b/test/tests/conf/axes/axes52.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES52 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Creator: David Marston -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Test for '//' followed by 'descendant::*' (i.e., all children and below). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//near-north">
+      <xsl:apply-templates select="center//descendant::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes53.xml b/test/tests/conf/axes/axes53.xml
new file mode 100644
index 0000000..517106c
--- /dev/null
+++ b/test/tests/conf/axes/axes53.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes53.xsl b/test/tests/conf/axes/axes53.xsl
new file mode 100644
index 0000000..a87a66d
--- /dev/null
+++ b/test/tests/conf/axes/axes53.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES53 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for named node followed by 'descendant::*' (i.e., all children and below). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//near-north">
+      <xsl:apply-templates select="center/descendant::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes54.xml b/test/tests/conf/axes/axes54.xml
new file mode 100644
index 0000000..517106c
--- /dev/null
+++ b/test/tests/conf/axes/axes54.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes54.xsl b/test/tests/conf/axes/axes54.xsl
new file mode 100644
index 0000000..58913a5
--- /dev/null
+++ b/test/tests/conf/axes/axes54.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES54 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for named node followed by 'child::*' (i.e., all children). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//near-north">
+      <xsl:apply-templates select="center/child::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes55.xml b/test/tests/conf/axes/axes55.xml
new file mode 100644
index 0000000..517106c
--- /dev/null
+++ b/test/tests/conf/axes/axes55.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes55.xsl b/test/tests/conf/axes/axes55.xsl
new file mode 100644
index 0000000..a80ae5d
--- /dev/null
+++ b/test/tests/conf/axes/axes55.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES55 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for '//*' (i.e., all descendants, but elements only). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//near-north">
+      <xsl:apply-templates select="center//*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes56.xml b/test/tests/conf/axes/axes56.xml
new file mode 100644
index 0000000..ff871fd
--- /dev/null
+++ b/test/tests/conf/axes/axes56.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>
+    <asub>
+      <asubsub>
+        <yy/>
+      </asubsub>
+    </asub>
+  </a>
+  <b>
+    <bsub>
+      <xx>
+        <xxchild/>
+      </xx>
+    </bsub>
+  </b>
+  <xx>here</xx>
+  <d>
+    <dsub>
+      <dsubsub>
+        <xx/>
+      </dsubsub>
+    </dsub>
+  </d>
+  <e>
+    <esub>
+      <xx>
+        <xxchild/>
+      </xx>
+    </esub>
+    <esubsib>
+      <sibchild/>
+    </esubsib>
+  </e>
+  <xx>
+    <childofxx/>
+  </xx>
+  <xx>
+    <xxsub>
+      <xxsubsub/>
+    </xxsub>
+  </xx>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes56.xsl b/test/tests/conf/axes/axes56.xsl
new file mode 100644
index 0000000..a429b02
--- /dev/null
+++ b/test/tests/conf/axes/axes56.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES56 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that combination of // and descendant specifies node can be anywhere in ancestry. -->
+
+<xsl:template match="doc">
+  <out>
+
+  <xsl:for-each select="//xx/descendant::*">
+    <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes57.xml b/test/tests/conf/axes/axes57.xml
new file mode 100644
index 0000000..914036c
--- /dev/null
+++ b/test/tests/conf/axes/axes57.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<doc>
+ <title>Test for source tree depth</title>
+ <a>
+  <title>Level A</title>
+  <b>
+   <title>Level B</title>
+   <c>
+    <title>Level C</title>
+    <d>
+     <title>Level D</title>
+     <e>
+      <title>Level E</title>
+      <f>
+       <title>Level F</title>
+       <g>
+        <title>Level G</title>
+        <h>
+         <title>Level H</title>
+         <i>
+          <title>Level I</title>
+          <j>
+           <title>Level J</title>
+           <k>
+            <title>Level K</title>
+            <l>
+             <title>Level L</title>
+             <m>
+              <title>Level M</title>
+              <n>
+               <title>Level N</title>
+               <o>
+                <title>Level O</title>
+               </o>
+              </n>
+             </m>
+            </l>
+           </k>
+          </j>
+         </i>
+        </h>
+       </g>
+      </f>
+     </e>
+    </d>
+   </c>
+  </b>
+ </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes57.xsl b/test/tests/conf/axes/axes57.xsl
new file mode 100644
index 0000000..f887ed7
--- /dev/null
+++ b/test/tests/conf/axes/axes57.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES57 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that // goes down at least 15 levels. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="//title">
+      <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes58.xml b/test/tests/conf/axes/axes58.xml
new file mode 100644
index 0000000..37c879c
--- /dev/null
+++ b/test/tests/conf/axes/axes58.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<docs>
+<doc x="x " y="y " z="z "/>
+<doc y="ay " z="az "  xmlns:foo="http://foo.com"/>
+<doc y="by " z="bz "  
+	 xmlns:ext="http://somebody.elses.extension" 
+	 xmlns:java="http://xml.apache.org/xslt/java" 
+	 xmlns:ped="http://tester.com" 
+	 xmlns:bdd="http://buster.com" 
+	 xmlns:jad="http://administrator.com"
+	 xmlns="http://www.ped.com"/>
+</docs>
diff --git a/test/tests/conf/axes/axes58.xsl b/test/tests/conf/axes/axes58.xsl
new file mode 100644
index 0000000..c58f076
--- /dev/null
+++ b/test/tests/conf/axes/axes58.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:foo="http://www.ped.com">
+
+  <!-- FileName: axes58 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Axes-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Check the attribute:: axis. The foo:doc selection is necessary
+       to pick up the last doc, cuz, I change the default namespace. -->
+
+<xsl:template match="docs">
+ <out>
+    <xsl:for-each select="doc">
+      <xsl:apply-templates select="attribute::*"/>
+    </xsl:for-each>
+    <xsl:for-each select="foo:doc">
+      <xsl:apply-templates select="attribute::*"/>
+    </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes59.xml b/test/tests/conf/axes/axes59.xml
new file mode 100644
index 0000000..8939b29
--- /dev/null
+++ b/test/tests/conf/axes/axes59.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<docs>
+  <doc x="x" y="y" z="z"
+    xmlns:ext="http://somebody.elses.extension"
+    xmlns:java="http://xml.apache.org/xslt/java"
+    xmlns:ped="http://tester.com"
+    xmlns:bdd="http://buster.com"
+    xmlns:jad="http://administrator.com"/>
+  <doc x="ax" y="ay" z="az"/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes59.xsl b/test/tests/conf/axes/axes59.xsl
new file mode 100644
index 0000000..2825335
--- /dev/null
+++ b/test/tests/conf/axes/axes59.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes59 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Axes-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Step through names on the namespace axis. Ensure attributes aren't counted. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:text>doc #</xsl:text>
+  <xsl:number level="single" count="doc" from="docs"/>
+  <xsl:text>: &#010;</xsl:text>
+  <xsl:for-each select="namespace::*">
+    <xsl:sort select="name(.)"/>
+    <xsl:element name="{name(.)}"><xsl:value-of select="."/></xsl:element>
+  </xsl:for-each>
+  <xsl:text>&#010;</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- To suppress empty lines -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes60.xml b/test/tests/conf/axes/axes60.xml
new file mode 100644
index 0000000..ad8374b
--- /dev/null
+++ b/test/tests/conf/axes/axes60.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/conf/axes/axes60.xsl b/test/tests/conf/axes/axes60.xsl
new file mode 100644
index 0000000..98420fd
--- /dev/null
+++ b/test/tests/conf/axes/axes60.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes60 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for 'attribute::*' in match pattern. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="attribute::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="attribute::*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes61.xml b/test/tests/conf/axes/axes61.xml
new file mode 100644
index 0000000..a8c16ea
--- /dev/null
+++ b/test/tests/conf/axes/axes61.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes61.xsl b/test/tests/conf/axes/axes61.xsl
new file mode 100644
index 0000000..1206b4d
--- /dev/null
+++ b/test/tests/conf/axes/axes61.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes61 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for 'child::*' in match pattern. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//near-north">
+      <xsl:apply-templates select="child::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="child::*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes62.xml b/test/tests/conf/axes/axes62.xml
new file mode 100644
index 0000000..f8f4819
--- /dev/null
+++ b/test/tests/conf/axes/axes62.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc
+    xmlns:ext="http://somebody.elses.extension"
+    xmlns:java="http://xml.apache.org/xslt/java"
+    xmlns:ped="http://tester.com"
+    xmlns:bdd="http://buster.com"/>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes62.xsl b/test/tests/conf/axes/axes62.xsl
new file mode 100644
index 0000000..8f07638
--- /dev/null
+++ b/test/tests/conf/axes/axes62.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:bdd="http://bdd.lotus.com"
+                exclude-result-prefixes="bdd">
+
+  <!-- FileName: axes62 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Axes-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use a NameTest on the namespace axis. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="doc"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:for-each select="namespace::ped">
+    <xsl:element name="{name(.)}"><xsl:value-of select="."/></xsl:element>
+  </xsl:for-each>
+  <xsl:text>&#10;</xsl:text>
+  <!-- Do the same when the prefix is also declared here in the stylesheet. Shouldn't conflict. -->
+  <xsl:for-each select="namespace::bdd">
+    <xsl:element name="{name(.)}"><xsl:value-of select="."/></xsl:element>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes63.xml b/test/tests/conf/axes/axes63.xml
new file mode 100644
index 0000000..81816c2
--- /dev/null
+++ b/test/tests/conf/axes/axes63.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <way-out-yonder-west/>
+  <out-yonder-west/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-east/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-west/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <way-out-yonder-east/>
+  <out-yonder-east/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes63.xsl b/test/tests/conf/axes/axes63.xsl
new file mode 100644
index 0000000..c687ed5
--- /dev/null
+++ b/test/tests/conf/axes/axes63.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES63 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'self::' Axis Identifier with child predicate -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::*[near-south]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes64.xml b/test/tests/conf/axes/axes64.xml
new file mode 100644
index 0000000..81816c2
--- /dev/null
+++ b/test/tests/conf/axes/axes64.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <way-out-yonder-west/>
+  <out-yonder-west/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-east/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-west/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <way-out-yonder-east/>
+  <out-yonder-east/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes64.xsl b/test/tests/conf/axes/axes64.xsl
new file mode 100644
index 0000000..1f66537
--- /dev/null
+++ b/test/tests/conf/axes/axes64.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES64 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'self::' Axis Identifier with attribute predicate -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::*[@center-attr-2]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes65.xml b/test/tests/conf/axes/axes65.xml
new file mode 100644
index 0000000..9e605e3
--- /dev/null
+++ b/test/tests/conf/axes/axes65.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <north>
+    <center>found</center>
+  </north>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes65.xsl b/test/tests/conf/axes/axes65.xsl
new file mode 100644
index 0000000..3c15108
--- /dev/null
+++ b/test/tests/conf/axes/axes65.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES65 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'self::text()' being empty when it should be -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::text()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes66.xml b/test/tests/conf/axes/axes66.xml
new file mode 100644
index 0000000..5fa3cf6
--- /dev/null
+++ b/test/tests/conf/axes/axes66.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <north>
+    <center><!-- found --></center>
+  </north>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes66.xsl b/test/tests/conf/axes/axes66.xsl
new file mode 100644
index 0000000..838aa0c
--- /dev/null
+++ b/test/tests/conf/axes/axes66.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES66 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'self::comment()' being empty when it should be -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::comment()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes67.xml b/test/tests/conf/axes/axes67.xml
new file mode 100644
index 0000000..b3b663f
--- /dev/null
+++ b/test/tests/conf/axes/axes67.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <north>
+    <center><?a-pi some data?></center>
+  </north>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes67.xsl b/test/tests/conf/axes/axes67.xsl
new file mode 100644
index 0000000..524f8bc
--- /dev/null
+++ b/test/tests/conf/axes/axes67.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES67 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'self::processing-instruction()' being empty when it should be -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="self::processing-instruction()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes68.xml b/test/tests/conf/axes/axes68.xml
new file mode 100644
index 0000000..71a300e
--- /dev/null
+++ b/test/tests/conf/axes/axes68.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<docs>
+  <doc xmlns:ext="http://somebody.elses.extension">
+    <section xmlns:foo="http://foo.com">
+      <inner xmlns:whiz="http://whiz.com/special/page"/>
+    </section>
+  </doc>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes68.xsl b/test/tests/conf/axes/axes68.xsl
new file mode 100644
index 0000000..7815530
--- /dev/null
+++ b/test/tests/conf/axes/axes68.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes68 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Axes-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check that namespace axis includes all namespaces in scope. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:element name="{name(.)}">
+     <xsl:for-each select="namespace::*">
+		<xsl:sort select="name(.)"/>
+        <xsl:element name="{name(.)}"><xsl:value-of select="."/></xsl:element>
+     </xsl:for-each>
+  </xsl:element>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes69.xml b/test/tests/conf/axes/axes69.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes69.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes69.xsl b/test/tests/conf/axes/axes69.xsl
new file mode 100644
index 0000000..1f23853
--- /dev/null
+++ b/test/tests/conf/axes/axes69.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES69 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for preceding-sibling:: and following-sibling:: with explicit iteration. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:for-each select="preceding-sibling::*"><xsl:text>
+From </xsl:text><xsl:value-of select="name(.)"/><xsl:text>:</xsl:text>
+        <xsl:apply-templates select="following-sibling::*"/>
+      </xsl:for-each>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes70.xml b/test/tests/conf/axes/axes70.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes70.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes70.xsl b/test/tests/conf/axes/axes70.xsl
new file mode 100644
index 0000000..49a2f07
--- /dev/null
+++ b/test/tests/conf/axes/axes70.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES70 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for preceding-sibling:: and following-sibling:: conjoined. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding-sibling::*/following-sibling::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes71.xml b/test/tests/conf/axes/axes71.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes71.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes71.xsl b/test/tests/conf/axes/axes71.xsl
new file mode 100644
index 0000000..9a9096a
--- /dev/null
+++ b/test/tests/conf/axes/axes71.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES71 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for preceding-sibling:: and following-sibling:: conjoined,
+       with positional predicate on the first axis. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding-sibling::*[2]/following-sibling::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes72.xml b/test/tests/conf/axes/axes72.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes72.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes72.xsl b/test/tests/conf/axes/axes72.xsl
new file mode 100644
index 0000000..61bf86f
--- /dev/null
+++ b/test/tests/conf/axes/axes72.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES72 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for preceding-sibling:: and following-sibling:: conjoined,
+       with positional predicates on both axes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding-sibling::*[2]/following-sibling::*[4]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes73.xml b/test/tests/conf/axes/axes73.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes73.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes73.xsl b/test/tests/conf/axes/axes73.xsl
new file mode 100644
index 0000000..b62151b
--- /dev/null
+++ b/test/tests/conf/axes/axes73.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES73 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test where we bounce "horizontally" across the tree, using positions. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding-sibling::*[2]/following-sibling::*[4]/preceding-sibling::*[5]/following-sibling::*[4]/following-sibling::*[2]"/>
+      <!-- Nodes in order: west, east, far-west, near-east, far-east -->
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes74.xml b/test/tests/conf/axes/axes74.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes74.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes74.xsl b/test/tests/conf/axes/axes74.xsl
new file mode 100644
index 0000000..81874fb
--- /dev/null
+++ b/test/tests/conf/axes/axes74.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES74 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for following-sibling:: and preceding-sibling:: with explicit iteration. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:for-each select="following-sibling::*"><xsl:text>
+From </xsl:text><xsl:value-of select="name(.)"/><xsl:text>:</xsl:text>
+        <xsl:apply-templates select="preceding-sibling::*"/>
+      </xsl:for-each>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes75.xml b/test/tests/conf/axes/axes75.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes75.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes75.xsl b/test/tests/conf/axes/axes75.xsl
new file mode 100644
index 0000000..26628f3
--- /dev/null
+++ b/test/tests/conf/axes/axes75.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES75 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for following-sibling:: and preceding-sibling:: conjoined. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following-sibling::*/preceding-sibling::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes76.xml b/test/tests/conf/axes/axes76.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes76.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes76.xsl b/test/tests/conf/axes/axes76.xsl
new file mode 100644
index 0000000..9d41240
--- /dev/null
+++ b/test/tests/conf/axes/axes76.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES76 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for following-sibling:: and preceding-sibling:: conjoined,
+       with positional predicate on the first axis. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following-sibling::*[2]/preceding-sibling::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes77.xml b/test/tests/conf/axes/axes77.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes77.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes77.xsl b/test/tests/conf/axes/axes77.xsl
new file mode 100644
index 0000000..def6aca
--- /dev/null
+++ b/test/tests/conf/axes/axes77.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES77 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for following-sibling:: and preceding-sibling:: conjoined,
+       with positional predicates on both axes. Reverse document order applies. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following-sibling::*[2]/preceding-sibling::*[4]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes78.xml b/test/tests/conf/axes/axes78.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes78.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes78.xsl b/test/tests/conf/axes/axes78.xsl
new file mode 100644
index 0000000..902125b
--- /dev/null
+++ b/test/tests/conf/axes/axes78.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES78 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test where we bounce "horizontally" across the tree, using positions. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following-sibling::*[2]/preceding-sibling::*[4]/following-sibling::*[5]/preceding-sibling::*[4]/preceding-sibling::*[2]"/>
+      <!-- Nodes in order: east, west, far-east, near-west, far-west -->
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes79.xml b/test/tests/conf/axes/axes79.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes79.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes79.xsl b/test/tests/conf/axes/axes79.xsl
new file mode 100644
index 0000000..21a6882
--- /dev/null
+++ b/test/tests/conf/axes/axes79.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES79 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for following::, parent, and child conjoined, with positional predicates. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following::*[4]/../*[2]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes80.xml b/test/tests/conf/axes/axes80.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes80.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes80.xsl b/test/tests/conf/axes/axes80.xsl
new file mode 100644
index 0000000..196aed6
--- /dev/null
+++ b/test/tests/conf/axes/axes80.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES80 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for preceding::, parent, and following:: conjoined, with positional predicates. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding::*[2]/../following::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes81.xml b/test/tests/conf/axes/axes81.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes81.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes81.xsl b/test/tests/conf/axes/axes81.xsl
new file mode 100644
index 0000000..e8126e7
--- /dev/null
+++ b/test/tests/conf/axes/axes81.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES81 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test for preceding::, parent, descendant::, and following-sibling:: conjoined,
+       with positional predicates and a node test. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding::*[2]/../descendant::*[10]/following-sibling::east"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes82.xml b/test/tests/conf/axes/axes82.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes82.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes82.xsl b/test/tests/conf/axes/axes82.xsl
new file mode 100644
index 0000000..7bc3030
--- /dev/null
+++ b/test/tests/conf/axes/axes82.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES82 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test simple notation to select entire tree. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="//*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes83.xml b/test/tests/conf/axes/axes83.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes83.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes83.xsl b/test/tests/conf/axes/axes83.xsl
new file mode 100644
index 0000000..88d1bea
--- /dev/null
+++ b/test/tests/conf/axes/axes83.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES83 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compound test selecting everything that has children. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="//ancestor::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes84.xml b/test/tests/conf/axes/axes84.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes84.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes84.xsl b/test/tests/conf/axes/axes84.xsl
new file mode 100644
index 0000000..4af924d
--- /dev/null
+++ b/test/tests/conf/axes/axes84.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES84 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Purpose: Compound test going "vertically" in the tree. -->
+  <!-- Creator: David Marston -->
+  <!-- The expression selects the set of all grandparents.
+       "//*[count(ancestor::*) &gt;= 2]" is the set of all grandchildren. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="//*[count(ancestor::*) &gt;= 2]/../parent::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes85.xml b/test/tests/conf/axes/axes85.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes85.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes85.xsl b/test/tests/conf/axes/axes85.xsl
new file mode 100644
index 0000000..14bf655
--- /dev/null
+++ b/test/tests/conf/axes/axes85.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES85 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Alternate test to select the set of all grandparents. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="//*[count(./*/*) &gt; 0]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes86.xml b/test/tests/conf/axes/axes86.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes86.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes86.xsl b/test/tests/conf/axes/axes86.xsl
new file mode 100644
index 0000000..9016303
--- /dev/null
+++ b/test/tests/conf/axes/axes86.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES86 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test to select the set of all aunts, great-aunts, etc. but exclude ancestors. -->
+  <!-- "ancestor::*[count(child::*) &gt; 1]" is the set of all ancestors with other children. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="ancestor::*[count(child::*) &gt; 1]/*[not(. = current()/ancestor-or-self::*)]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes87.xml b/test/tests/conf/axes/axes87.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes87.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes87.xsl b/test/tests/conf/axes/axes87.xsl
new file mode 100644
index 0000000..aec4fbc
--- /dev/null
+++ b/test/tests/conf/axes/axes87.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES87 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Traverse ancestor:: starting from attributes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes88.xml b/test/tests/conf/axes/axes88.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes88.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes88.xsl b/test/tests/conf/axes/axes88.xsl
new file mode 100644
index 0000000..e379b1a
--- /dev/null
+++ b/test/tests/conf/axes/axes88.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES88 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Traverse following:: starting from attributes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/following::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes89.xml b/test/tests/conf/axes/axes89.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes89.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes89.xsl b/test/tests/conf/axes/axes89.xsl
new file mode 100644
index 0000000..658f9e6
--- /dev/null
+++ b/test/tests/conf/axes/axes89.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES89 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Traverse preceding:: starting from attributes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/preceding::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes90.xml b/test/tests/conf/axes/axes90.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes90.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes90.xsl b/test/tests/conf/axes/axes90.xsl
new file mode 100644
index 0000000..e5013e2
--- /dev/null
+++ b/test/tests/conf/axes/axes90.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES90 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for union of preceding-sibling:: and following-sibling:: -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="preceding-sibling::*|following-sibling::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes91.xml b/test/tests/conf/axes/axes91.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes91.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes91.xsl b/test/tests/conf/axes/axes91.xsl
new file mode 100644
index 0000000..b4a0aec
--- /dev/null
+++ b/test/tests/conf/axes/axes91.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES91 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for steps beyond union of two axes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="(preceding-sibling::*|following-sibling::*)/ancestor::*[last()]/*[last()]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes92.xml b/test/tests/conf/axes/axes92.xml
new file mode 100644
index 0000000..ccf84ba
--- /dev/null
+++ b/test/tests/conf/axes/axes92.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/axes/axes92.xsl b/test/tests/conf/axes/axes92.xsl
new file mode 100644
index 0000000..ac50b6d
--- /dev/null
+++ b/test/tests/conf/axes/axes92.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: AXES92 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for union of two relative-location-paths -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select=".//near-south/preceding-sibling::*|following-sibling::east/ancestor-or-self::*[2]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes93.xml b/test/tests/conf/axes/axes93.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes93.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes93.xsl b/test/tests/conf/axes/axes93.xsl
new file mode 100644
index 0000000..1f19fde
--- /dev/null
+++ b/test/tests/conf/axes/axes93.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes93 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes
+       followed by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes94.xml b/test/tests/conf/axes/axes94.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes94.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes94.xsl b/test/tests/conf/axes/axes94.xsl
new file mode 100644
index 0000000..167b127
--- /dev/null
+++ b/test/tests/conf/axes/axes94.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes94 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes followed
+       by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/child::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes95.xml b/test/tests/conf/axes/axes95.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes95.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes95.xsl b/test/tests/conf/axes/axes95.xsl
new file mode 100644
index 0000000..7c5ad75
--- /dev/null
+++ b/test/tests/conf/axes/axes95.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes95 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes followed
+       by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/descendant::node()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes96.xml b/test/tests/conf/axes/axes96.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes96.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes96.xsl b/test/tests/conf/axes/axes96.xsl
new file mode 100644
index 0000000..25d2d98
--- /dev/null
+++ b/test/tests/conf/axes/axes96.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes96 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes followed
+       by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/parent::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes97.xml b/test/tests/conf/axes/axes97.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes97.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes97.xsl b/test/tests/conf/axes/axes97.xsl
new file mode 100644
index 0000000..4870989
--- /dev/null
+++ b/test/tests/conf/axes/axes97.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes97 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes followed
+       by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/ancestor::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes98.xml b/test/tests/conf/axes/axes98.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes98.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes98.xsl b/test/tests/conf/axes/axes98.xsl
new file mode 100644
index 0000000..91c805a
--- /dev/null
+++ b/test/tests/conf/axes/axes98.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes98 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes followed
+       by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    1.<xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/self::node()"/>
+    </xsl:for-each>
+
+    2.<xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/."/>
+    </xsl:for-each>
+
+  </out>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/axes/axes99.xml b/test/tests/conf/axes/axes99.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/axes/axes99.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/axes/axes99.xsl b/test/tests/conf/axes/axes99.xsl
new file mode 100644
index 0000000..72a7755
--- /dev/null
+++ b/test/tests/conf/axes/axes99.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: axes99 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Tests apply-templates starting with a attribute axes followed
+       by additional relative-location-path steps. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="@*/descendant-or-self::node()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="@* | * | node()">
+  <xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean01.xml b/test/tests/conf/boolean/boolean01.xml
new file mode 100644
index 0000000..572b67b
--- /dev/null
+++ b/test/tests/conf/boolean/boolean01.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean01.xsl b/test/tests/conf/boolean/boolean01.xsl
new file mode 100644
index 0000000..429be52
--- /dev/null
+++ b/test/tests/conf/boolean/boolean01.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of true() -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="true()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean02.xml b/test/tests/conf/boolean/boolean02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean02.xsl b/test/tests/conf/boolean/boolean02.xsl
new file mode 100644
index 0000000..89add08
--- /dev/null
+++ b/test/tests/conf/boolean/boolean02.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "and" operator with both values true -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="true() and true()"/><xsl:text>,</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean03.xml b/test/tests/conf/boolean/boolean03.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/boolean/boolean03.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean03.xsl b/test/tests/conf/boolean/boolean03.xsl
new file mode 100644
index 0000000..7f0f31c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean03.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "or" operator with two true values -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="true() or true()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean04.xml b/test/tests/conf/boolean/boolean04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean04.xsl b/test/tests/conf/boolean/boolean04.xsl
new file mode 100644
index 0000000..e59c565
--- /dev/null
+++ b/test/tests/conf/boolean/boolean04.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "not" operator with true value. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="not(true())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean05.xml b/test/tests/conf/boolean/boolean05.xml
new file mode 100644
index 0000000..6230877
--- /dev/null
+++ b/test/tests/conf/boolean/boolean05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean05.xsl b/test/tests/conf/boolean/boolean05.xsl
new file mode 100644
index 0000000..232d8ea
--- /dev/null
+++ b/test/tests/conf/boolean/boolean05.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean() function - conversion of empty string. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="boolean('')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean06.xml b/test/tests/conf/boolean/boolean06.xml
new file mode 100644
index 0000000..6230877
--- /dev/null
+++ b/test/tests/conf/boolean/boolean06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean06.xsl b/test/tests/conf/boolean/boolean06.xsl
new file mode 100644
index 0000000..4e5e79a
--- /dev/null
+++ b/test/tests/conf/boolean/boolean06.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of ">" operator with false expected value. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1>2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean07.xml b/test/tests/conf/boolean/boolean07.xml
new file mode 100644
index 0000000..6230877
--- /dev/null
+++ b/test/tests/conf/boolean/boolean07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean07.xsl b/test/tests/conf/boolean/boolean07.xsl
new file mode 100644
index 0000000..6fd9cb9
--- /dev/null
+++ b/test/tests/conf/boolean/boolean07.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of ">=" operators with expected false result. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1>=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean08.xml b/test/tests/conf/boolean/boolean08.xml
new file mode 100644
index 0000000..4905bd6
--- /dev/null
+++ b/test/tests/conf/boolean/boolean08.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+<p xml:lang="en"/>
+<p xml:lang="EN"/>
+<p xml:lang="en-gb"/>
+<p xml:lang="EN-GB"/>
+<p xml:lang="TH"/>
+<p/>
+<span xml:lang="en">
+<p/>
+</span>
+</doc>
diff --git a/test/tests/conf/boolean/boolean08.xsl b/test/tests/conf/boolean/boolean08.xsl
new file mode 100644
index 0000000..30a3ed7
--- /dev/null
+++ b/test/tests/conf/boolean/boolean08.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of lang() function -->
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="doc/p"/></out>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:value-of select="lang('en')"/><xsl:text>, </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean09.xml b/test/tests/conf/boolean/boolean09.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean09.xsl b/test/tests/conf/boolean/boolean09.xsl
new file mode 100644
index 0000000..dbc23da
--- /dev/null
+++ b/test/tests/conf/boolean/boolean09.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of false() function -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean10.xml b/test/tests/conf/boolean/boolean10.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean10.xsl b/test/tests/conf/boolean/boolean10.xsl
new file mode 100644
index 0000000..9f1e2be
--- /dev/null
+++ b/test/tests/conf/boolean/boolean10.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of the '=' operator for true. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean11.xml b/test/tests/conf/boolean/boolean11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean11.xsl b/test/tests/conf/boolean/boolean11.xsl
new file mode 100644
index 0000000..59520fc
--- /dev/null
+++ b/test/tests/conf/boolean/boolean11.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of '=' operator for false. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean12.xml b/test/tests/conf/boolean/boolean12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean12.xsl b/test/tests/conf/boolean/boolean12.xsl
new file mode 100644
index 0000000..843bf2c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean12.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of '=' operator on two numbers, one having decimal point and zeroes after -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1 = 1.00"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean13.xml b/test/tests/conf/boolean/boolean13.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean13.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean13.xsl b/test/tests/conf/boolean/boolean13.xsl
new file mode 100644
index 0000000..b5fbd2a
--- /dev/null
+++ b/test/tests/conf/boolean/boolean13.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of '=' operator with positive and negative zero. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="0 = -0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean14.xml b/test/tests/conf/boolean/boolean14.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean14.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean14.xsl b/test/tests/conf/boolean/boolean14.xsl
new file mode 100644
index 0000000..2aedb7a
--- /dev/null
+++ b/test/tests/conf/boolean/boolean14.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of '=' operator with one number with leading zero, one not. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1 = '001'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean15.xml b/test/tests/conf/boolean/boolean15.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean15.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean15.xsl b/test/tests/conf/boolean/boolean15.xsl
new file mode 100644
index 0000000..a0a9fdd
--- /dev/null
+++ b/test/tests/conf/boolean/boolean15.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOL15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of '=' operator, true value compared against a non-empty string. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="true()='0'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean16.xml b/test/tests/conf/boolean/boolean16.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean16.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean16.xsl b/test/tests/conf/boolean/boolean16.xsl
new file mode 100644
index 0000000..020915b
--- /dev/null
+++ b/test/tests/conf/boolean/boolean16.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of '=' operator, false value compared against an empty string. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false()=''"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean17.xml b/test/tests/conf/boolean/boolean17.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean17.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean17.xsl b/test/tests/conf/boolean/boolean17.xsl
new file mode 100644
index 0000000..dec5c59
--- /dev/null
+++ b/test/tests/conf/boolean/boolean17.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of '=' operator, true value compared against a non-zero number. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="true()=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean18.xml b/test/tests/conf/boolean/boolean18.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean18.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean18.xsl b/test/tests/conf/boolean/boolean18.xsl
new file mode 100644
index 0000000..7057b90
--- /dev/null
+++ b/test/tests/conf/boolean/boolean18.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of '=' operator, false value compared against zero. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false()=0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean19.xml b/test/tests/conf/boolean/boolean19.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean19.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean19.xsl b/test/tests/conf/boolean/boolean19.xsl
new file mode 100644
index 0000000..ce3804f
--- /dev/null
+++ b/test/tests/conf/boolean/boolean19.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "and" operator with both values false -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false() and false()"/><xsl:text>,</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean20.xml b/test/tests/conf/boolean/boolean20.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean20.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean20.xsl b/test/tests/conf/boolean/boolean20.xsl
new file mode 100644
index 0000000..c6fa3f2
--- /dev/null
+++ b/test/tests/conf/boolean/boolean20.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Booleans -->
+  <!-- Purpose: Test of boolean "and" operator with two strings;
+       strings are evaluated to True if there length > 1.    -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="'foo' and 'fop'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean21.xml b/test/tests/conf/boolean/boolean21.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean21.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean21.xsl b/test/tests/conf/boolean/boolean21.xsl
new file mode 100644
index 0000000..03e96b9
--- /dev/null
+++ b/test/tests/conf/boolean/boolean21.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "and" operator with one value true and one value false -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="true() and false()"/><xsl:text>,</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean22.xml b/test/tests/conf/boolean/boolean22.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean22.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean22.xsl b/test/tests/conf/boolean/boolean22.xsl
new file mode 100644
index 0000000..ab968da
--- /dev/null
+++ b/test/tests/conf/boolean/boolean22.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "and" operator with one value false and one value true -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false() and true()"/><xsl:text>,</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean23.xml b/test/tests/conf/boolean/boolean23.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean23.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean23.xsl b/test/tests/conf/boolean/boolean23.xsl
new file mode 100644
index 0000000..4ea5c21
--- /dev/null
+++ b/test/tests/conf/boolean/boolean23.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean23 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "and" operator with two strings that look like numbers -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="'1' and '0'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean24.xml b/test/tests/conf/boolean/boolean24.xml
new file mode 100644
index 0000000..fe5bd36
--- /dev/null
+++ b/test/tests/conf/boolean/boolean24.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean24.xsl b/test/tests/conf/boolean/boolean24.xsl
new file mode 100644
index 0000000..8a27fc0
--- /dev/null
+++ b/test/tests/conf/boolean/boolean24.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "or" operator with true first, then false -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="true() or false()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean25.xml b/test/tests/conf/boolean/boolean25.xml
new file mode 100644
index 0000000..fe5bd36
--- /dev/null
+++ b/test/tests/conf/boolean/boolean25.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean25.xsl b/test/tests/conf/boolean/boolean25.xsl
new file mode 100644
index 0000000..b027458
--- /dev/null
+++ b/test/tests/conf/boolean/boolean25.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean25 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "or" operator, false first, then true -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="false() or true()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean26.xml b/test/tests/conf/boolean/boolean26.xml
new file mode 100644
index 0000000..fe5bd36
--- /dev/null
+++ b/test/tests/conf/boolean/boolean26.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean26.xsl b/test/tests/conf/boolean/boolean26.xsl
new file mode 100644
index 0000000..e595ea8
--- /dev/null
+++ b/test/tests/conf/boolean/boolean26.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean26 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "or" operator with two false values -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="false() or false()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean27.xml b/test/tests/conf/boolean/boolean27.xml
new file mode 100644
index 0000000..fe5bd36
--- /dev/null
+++ b/test/tests/conf/boolean/boolean27.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean27.xsl b/test/tests/conf/boolean/boolean27.xsl
new file mode 100644
index 0000000..e9205f0
--- /dev/null
+++ b/test/tests/conf/boolean/boolean27.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean27 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "or" operator, numeric vs. empty string -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="0 or ''"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean28.xml b/test/tests/conf/boolean/boolean28.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/boolean/boolean28.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean28.xsl b/test/tests/conf/boolean/boolean28.xsl
new file mode 100644
index 0000000..a9b2419
--- /dev/null
+++ b/test/tests/conf/boolean/boolean28.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean28 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "not" operator on a false -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="not(false())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean29.xml b/test/tests/conf/boolean/boolean29.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/boolean/boolean29.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean29.xsl b/test/tests/conf/boolean/boolean29.xsl
new file mode 100644
index 0000000..fb9f83c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean29.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean29 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "not" operator on a true expression -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="not(false() = false())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean30.xml b/test/tests/conf/boolean/boolean30.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/boolean/boolean30.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean30.xsl b/test/tests/conf/boolean/boolean30.xsl
new file mode 100644
index 0000000..3590467
--- /dev/null
+++ b/test/tests/conf/boolean/boolean30.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean30 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "not" operator on a false expression -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="not(true() = false())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean31.xml b/test/tests/conf/boolean/boolean31.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/boolean/boolean31.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean31.xsl b/test/tests/conf/boolean/boolean31.xsl
new file mode 100644
index 0000000..24ca76f
--- /dev/null
+++ b/test/tests/conf/boolean/boolean31.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean31 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "not" operator on an empty string -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="not('')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean32.xml b/test/tests/conf/boolean/boolean32.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/boolean/boolean32.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean32.xsl b/test/tests/conf/boolean/boolean32.xsl
new file mode 100644
index 0000000..29bf629
--- /dev/null
+++ b/test/tests/conf/boolean/boolean32.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean32 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of boolean "not" operator on a string -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="not('0')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean33.xml b/test/tests/conf/boolean/boolean33.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean33.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean33.xsl b/test/tests/conf/boolean/boolean33.xsl
new file mode 100644
index 0000000..74dc947
--- /dev/null
+++ b/test/tests/conf/boolean/boolean33.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean33 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting a non-empty string to true -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean('0')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean34.xml b/test/tests/conf/boolean/boolean34.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean34.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean34.xsl b/test/tests/conf/boolean/boolean34.xsl
new file mode 100644
index 0000000..cb92456
--- /dev/null
+++ b/test/tests/conf/boolean/boolean34.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean34 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting a zero to false -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean(0)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean35.xml b/test/tests/conf/boolean/boolean35.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean35.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean35.xsl b/test/tests/conf/boolean/boolean35.xsl
new file mode 100644
index 0000000..a678f51
--- /dev/null
+++ b/test/tests/conf/boolean/boolean35.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean35 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting a -0 to false -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean(-0)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean36.xml b/test/tests/conf/boolean/boolean36.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean36.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean36.xsl b/test/tests/conf/boolean/boolean36.xsl
new file mode 100644
index 0000000..5473550
--- /dev/null
+++ b/test/tests/conf/boolean/boolean36.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean36 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting a non-zero number to true -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean(1)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean37.xml b/test/tests/conf/boolean/boolean37.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean37.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean37.xsl b/test/tests/conf/boolean/boolean37.xsl
new file mode 100644
index 0000000..0759bfe
--- /dev/null
+++ b/test/tests/conf/boolean/boolean37.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean37 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting a problem expression to true -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean(1 div 0)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean38.xml b/test/tests/conf/boolean/boolean38.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean38.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean38.xsl b/test/tests/conf/boolean/boolean38.xsl
new file mode 100644
index 0000000..5191877
--- /dev/null
+++ b/test/tests/conf/boolean/boolean38.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.1 -->
+  <!-- Purpose: Display a problem expression -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="0 div 0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean39.xml b/test/tests/conf/boolean/boolean39.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean39.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean39.xsl b/test/tests/conf/boolean/boolean39.xsl
new file mode 100644
index 0000000..8c83b18
--- /dev/null
+++ b/test/tests/conf/boolean/boolean39.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean39 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting a problem expression -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean(0 div 0)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean40.xml b/test/tests/conf/boolean/boolean40.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean40.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean40.xsl b/test/tests/conf/boolean/boolean40.xsl
new file mode 100644
index 0000000..275eecd
--- /dev/null
+++ b/test/tests/conf/boolean/boolean40.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean40 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting a node-set to true -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean(doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean41.xml b/test/tests/conf/boolean/boolean41.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean41.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean41.xsl b/test/tests/conf/boolean/boolean41.xsl
new file mode 100644
index 0000000..02ff528
--- /dev/null
+++ b/test/tests/conf/boolean/boolean41.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean41 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting an empty node-set to false -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean(foo)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean42.xml b/test/tests/conf/boolean/boolean42.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean42.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean42.xsl b/test/tests/conf/boolean/boolean42.xsl
new file mode 100644
index 0000000..d8ef5b6
--- /dev/null
+++ b/test/tests/conf/boolean/boolean42.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean42 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting a result tree fragment -->
+
+<xsl:variable name="ResultTreeFragTest">
+  <xsl:value-of select="doc"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean($ResultTreeFragTest)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean43.xml b/test/tests/conf/boolean/boolean43.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean43.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean43.xsl b/test/tests/conf/boolean/boolean43.xsl
new file mode 100644
index 0000000..311a2f5
--- /dev/null
+++ b/test/tests/conf/boolean/boolean43.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean43 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of boolean() function, converting an empty result tree fragment -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:variable name="emptyResultTreeFragTest"></xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean($emptyResultTreeFragTest)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean44.xml b/test/tests/conf/boolean/boolean44.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean44.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean44.xsl b/test/tests/conf/boolean/boolean44.xsl
new file mode 100644
index 0000000..a86e66e
--- /dev/null
+++ b/test/tests/conf/boolean/boolean44.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean44 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of ">" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1>1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean45.xml b/test/tests/conf/boolean/boolean45.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean45.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean45.xsl b/test/tests/conf/boolean/boolean45.xsl
new file mode 100644
index 0000000..0ae90a7
--- /dev/null
+++ b/test/tests/conf/boolean/boolean45.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean45 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of ">" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2>1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean46.xml b/test/tests/conf/boolean/boolean46.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean46.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean46.xsl b/test/tests/conf/boolean/boolean46.xsl
new file mode 100644
index 0000000..44ee090
--- /dev/null
+++ b/test/tests/conf/boolean/boolean46.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean46 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of "<" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1&#60;2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean47.xml b/test/tests/conf/boolean/boolean47.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean47.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean47.xsl b/test/tests/conf/boolean/boolean47.xsl
new file mode 100644
index 0000000..9b3cd00
--- /dev/null
+++ b/test/tests/conf/boolean/boolean47.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean47 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of "<" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1&#60;1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean48.xml b/test/tests/conf/boolean/boolean48.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean48.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean48.xsl b/test/tests/conf/boolean/boolean48.xsl
new file mode 100644
index 0000000..27a31b9
--- /dev/null
+++ b/test/tests/conf/boolean/boolean48.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean48 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of "<" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2&#60;1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean49.xml b/test/tests/conf/boolean/boolean49.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean49.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean49.xsl b/test/tests/conf/boolean/boolean49.xsl
new file mode 100644
index 0000000..e9d8300
--- /dev/null
+++ b/test/tests/conf/boolean/boolean49.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean49 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of ">" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="'2'>'1'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean50.xml b/test/tests/conf/boolean/boolean50.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean50.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean50.xsl b/test/tests/conf/boolean/boolean50.xsl
new file mode 100644
index 0000000..1205934
--- /dev/null
+++ b/test/tests/conf/boolean/boolean50.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean50 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of ">" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="0 > -0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean51.xml b/test/tests/conf/boolean/boolean51.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean51.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean51.xsl b/test/tests/conf/boolean/boolean51.xsl
new file mode 100644
index 0000000..5916d20
--- /dev/null
+++ b/test/tests/conf/boolean/boolean51.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean51 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of "<=" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2>=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean52.xml b/test/tests/conf/boolean/boolean52.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean52.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean52.xsl b/test/tests/conf/boolean/boolean52.xsl
new file mode 100644
index 0000000..ffca37e
--- /dev/null
+++ b/test/tests/conf/boolean/boolean52.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean52 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of ">=" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2>=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean53.xml b/test/tests/conf/boolean/boolean53.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean53.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean53.xsl b/test/tests/conf/boolean/boolean53.xsl
new file mode 100644
index 0000000..a823a07
--- /dev/null
+++ b/test/tests/conf/boolean/boolean53.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean53 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of "<=" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1&#60;=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean54.xml b/test/tests/conf/boolean/boolean54.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean54.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean54.xsl b/test/tests/conf/boolean/boolean54.xsl
new file mode 100644
index 0000000..f13aa4e
--- /dev/null
+++ b/test/tests/conf/boolean/boolean54.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean54 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of "<=" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1&#60;=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean55.xml b/test/tests/conf/boolean/boolean55.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean55.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean55.xsl b/test/tests/conf/boolean/boolean55.xsl
new file mode 100644
index 0000000..9c3a1cc
--- /dev/null
+++ b/test/tests/conf/boolean/boolean55.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean55 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of "<=" operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2&#60;=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean56.xml b/test/tests/conf/boolean/boolean56.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean56.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean56.xsl b/test/tests/conf/boolean/boolean56.xsl
new file mode 100644
index 0000000..939239d
--- /dev/null
+++ b/test/tests/conf/boolean/boolean56.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean56 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that "and" doesn't bother with right operand if left is false -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false() and 1 div 0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean57.xml b/test/tests/conf/boolean/boolean57.xml
new file mode 100644
index 0000000..fe5bd36
--- /dev/null
+++ b/test/tests/conf/boolean/boolean57.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean57.xsl b/test/tests/conf/boolean/boolean57.xsl
new file mode 100644
index 0000000..b4b578c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean57.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean57 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that "or" doesn't evaluate right operand if left is true -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="true() or 1 div 0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean58.xml b/test/tests/conf/boolean/boolean58.xml
new file mode 100644
index 0000000..e8bf4c4
--- /dev/null
+++ b/test/tests/conf/boolean/boolean58.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <av>
+    <a>
+      <b>b</b>
+      <c>c</c>
+      <d>d</d>
+      <e>e</e>
+    </a>
+    <v>
+      <w>w</w>
+      <x>x</x>
+      <y>y</y>
+      <z>z</z>
+    </v>
+    <a>
+      <b>fe</b>
+      <c>fi</c>
+      <d>fo</d>
+      <e>fu</e>
+    </a>
+    <v>
+      <w>fee</w>
+      <x>fii</x>
+      <y>foo</y>
+      <z>fom</z>
+    </v>
+    <j>foo</j>
+    <j>foo</j>
+    <j>foo</j>
+    <j>foo</j>
+  </av>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean58.xsl b/test/tests/conf/boolean/boolean58.xsl
new file mode 100644
index 0000000..a6b591a
--- /dev/null
+++ b/test/tests/conf/boolean/boolean58.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean58 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: If $x is bound to a node-set, then $x="foo" does not 
+       mean the same as not($x!="foo"): the former is true if and only 
+       if some node in $x has the string-value foo; the latter is true if 
+       and only if all nodes in $x have the string-value foo. -->
+
+<xsl:template match="doc">
+	<out>
+
+	  <xsl:variable name="x" select="av//*"/>
+	  <xsl:value-of select="$x='foo'"/>
+	  <xsl:value-of select="not($x!='foo')"/><xsl:text> </xsl:text>
+
+	  <xsl:variable name="y" select="av//j"/>
+	  <xsl:value-of select="$y='foo'"/>
+	  <xsl:value-of select="not($y!='foo')"/>
+
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean59.xml b/test/tests/conf/boolean/boolean59.xml
new file mode 100644
index 0000000..f634c12
--- /dev/null
+++ b/test/tests/conf/boolean/boolean59.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <avj>
+    <a>
+      <b>fe</b>
+      <c>fi</c>
+      <d>fo</d>
+      <e>fu</e>
+    </a>
+    <v>
+      <w>fee</w>
+      <x>fii</x>
+      <y>foo</y>
+      <z>fom</z>
+    </v>
+    <j>foo</j>
+    <j>foo</j>
+    <j>foo</j>
+    <j>foo</j>
+  </avj>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean59.xsl b/test/tests/conf/boolean/boolean59.xsl
new file mode 100644
index 0000000..c92c466
--- /dev/null
+++ b/test/tests/conf/boolean/boolean59.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean59 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test =, !=, and not, comparing node-set to string, where node-set is empty. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="x" select="avj//k"/><!-- empty -->
+    <xsl:value-of select="$x='foo'"/>
+    <xsl:value-of select="not($x='foo')"/><xsl:text> </xsl:text>
+    <xsl:value-of select="$x!='foo'"/>
+    <xsl:value-of select="not($x!='foo')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean60.xml b/test/tests/conf/boolean/boolean60.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean60.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean60.xsl b/test/tests/conf/boolean/boolean60.xsl
new file mode 100644
index 0000000..aed3a09
--- /dev/null
+++ b/test/tests/conf/boolean/boolean60.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean60 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of the '!=' operator returning false on two numbers. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1!=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean61.xml b/test/tests/conf/boolean/boolean61.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean61.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean61.xsl b/test/tests/conf/boolean/boolean61.xsl
new file mode 100644
index 0000000..0e8948f
--- /dev/null
+++ b/test/tests/conf/boolean/boolean61.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean61 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of the '!=' operator returning true on two numbers. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1!=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean62.xml b/test/tests/conf/boolean/boolean62.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean62.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean62.xsl b/test/tests/conf/boolean/boolean62.xsl
new file mode 100644
index 0000000..138bd62
--- /dev/null
+++ b/test/tests/conf/boolean/boolean62.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean62 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '!=' operator on two numbers, one having decimal point and zeroes after -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="1 != 1.00"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean63.xml b/test/tests/conf/boolean/boolean63.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean63.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean63.xsl b/test/tests/conf/boolean/boolean63.xsl
new file mode 100644
index 0000000..719657d
--- /dev/null
+++ b/test/tests/conf/boolean/boolean63.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean63 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '!=' operator on two booleans, false first. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false()!=true()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean64.xml b/test/tests/conf/boolean/boolean64.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean64.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean64.xsl b/test/tests/conf/boolean/boolean64.xsl
new file mode 100644
index 0000000..573dceb
--- /dev/null
+++ b/test/tests/conf/boolean/boolean64.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean64 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '!=' operator on two booleans, true first. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="true()!=false()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean65.xml b/test/tests/conf/boolean/boolean65.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean65.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean65.xsl b/test/tests/conf/boolean/boolean65.xsl
new file mode 100644
index 0000000..cf4c6a2
--- /dev/null
+++ b/test/tests/conf/boolean/boolean65.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean65 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '!=' operator on two booleans that are equal, so false should result. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false()!=false()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean66.xml b/test/tests/conf/boolean/boolean66.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean66.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean66.xsl b/test/tests/conf/boolean/boolean66.xsl
new file mode 100644
index 0000000..121248f
--- /dev/null
+++ b/test/tests/conf/boolean/boolean66.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean66 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '!=' operator on two strings that are equal, so false should result. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="'ace' != 'ace'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean67.xml b/test/tests/conf/boolean/boolean67.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean67.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean67.xsl b/test/tests/conf/boolean/boolean67.xsl
new file mode 100644
index 0000000..f5615f0
--- /dev/null
+++ b/test/tests/conf/boolean/boolean67.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean67 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '!=' operator on two strings that are unequal, so true should result. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="'ace' != 'abc'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean68.xml b/test/tests/conf/boolean/boolean68.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean68.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean68.xsl b/test/tests/conf/boolean/boolean68.xsl
new file mode 100644
index 0000000..c05241d
--- /dev/null
+++ b/test/tests/conf/boolean/boolean68.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean68 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '!=' operator on two strings that are unequal, but only in leading spaces. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="'H' != '  H'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean69.xml b/test/tests/conf/boolean/boolean69.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean69.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean69.xsl b/test/tests/conf/boolean/boolean69.xsl
new file mode 100644
index 0000000..108d423
--- /dev/null
+++ b/test/tests/conf/boolean/boolean69.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean69 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '!=' operator on two strings that are unequal, but only in trailing spaces. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="'H' != 'H  '"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean70.xml b/test/tests/conf/boolean/boolean70.xml
new file mode 100644
index 0000000..af9d49b
--- /dev/null
+++ b/test/tests/conf/boolean/boolean70.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <j l='12' w='33'>first</j>
+  <j l='17' w='45'>second</j>
+  <j l='16' w='78'>third</j>
+  <j l='12' w='33'>fourth</j>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean70.xsl b/test/tests/conf/boolean/boolean70.xsl
new file mode 100644
index 0000000..bc24f81
--- /dev/null
+++ b/test/tests/conf/boolean/boolean70.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean70 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test = on two node-sets, where both are the same. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="j[@l='12'] = j[@w='33']"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean71.xml b/test/tests/conf/boolean/boolean71.xml
new file mode 100644
index 0000000..af9d49b
--- /dev/null
+++ b/test/tests/conf/boolean/boolean71.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <j l='12' w='33'>first</j>
+  <j l='17' w='45'>second</j>
+  <j l='16' w='78'>third</j>
+  <j l='12' w='33'>fourth</j>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean71.xsl b/test/tests/conf/boolean/boolean71.xsl
new file mode 100644
index 0000000..411a0e7
--- /dev/null
+++ b/test/tests/conf/boolean/boolean71.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean71 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test = on two disjoint node-sets. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="j[@l='12'] = j[@l='17']"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean72.xml b/test/tests/conf/boolean/boolean72.xml
new file mode 100644
index 0000000..b74ac9c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean72.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <j l='12' w='45'>first</j>
+  <j l='17' w='45'>second</j>
+  <j l='16' w='78'>third</j>
+  <j l='12' w='33'>fourth</j>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean72.xsl b/test/tests/conf/boolean/boolean72.xsl
new file mode 100644
index 0000000..041ed27
--- /dev/null
+++ b/test/tests/conf/boolean/boolean72.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean72 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test = on two node-sets that have one node in common. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="j[@l='12'] = j[@w='45']"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean73.xml b/test/tests/conf/boolean/boolean73.xml
new file mode 100644
index 0000000..af9d49b
--- /dev/null
+++ b/test/tests/conf/boolean/boolean73.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <j l='12' w='33'>first</j>
+  <j l='17' w='45'>second</j>
+  <j l='16' w='78'>third</j>
+  <j l='12' w='33'>fourth</j>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean73.xsl b/test/tests/conf/boolean/boolean73.xsl
new file mode 100644
index 0000000..04a5e0c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean73.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean73 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test != on two node-sets, where both are the same. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="j[@l='12'] != j[@w='33']"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean74.xml b/test/tests/conf/boolean/boolean74.xml
new file mode 100644
index 0000000..af9d49b
--- /dev/null
+++ b/test/tests/conf/boolean/boolean74.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <j l='12' w='33'>first</j>
+  <j l='17' w='45'>second</j>
+  <j l='16' w='78'>third</j>
+  <j l='12' w='33'>fourth</j>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean74.xsl b/test/tests/conf/boolean/boolean74.xsl
new file mode 100644
index 0000000..889a3fe
--- /dev/null
+++ b/test/tests/conf/boolean/boolean74.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean74 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test != on two disjoint node-sets. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="j[@l='12'] != j[@l='17']"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean75.xml b/test/tests/conf/boolean/boolean75.xml
new file mode 100644
index 0000000..b74ac9c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean75.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <j l='12' w='45'>first</j>
+  <j l='17' w='45'>second</j>
+  <j l='16' w='78'>third</j>
+  <j l='12' w='33'>fourth</j>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean75.xsl b/test/tests/conf/boolean/boolean75.xsl
new file mode 100644
index 0000000..f24706c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean75.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean75 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test != on two node-sets that have one node in common. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="j[@l='12'] != j[@w='45']"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean76.xml b/test/tests/conf/boolean/boolean76.xml
new file mode 100644
index 0000000..b74ac9c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean76.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <j l='12' w='45'>first</j>
+  <j l='17' w='45'>second</j>
+  <j l='16' w='78'>third</j>
+  <j l='12' w='33'>fourth</j>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean76.xsl b/test/tests/conf/boolean/boolean76.xsl
new file mode 100644
index 0000000..a2e2a7f
--- /dev/null
+++ b/test/tests/conf/boolean/boolean76.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean76 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test != on two node-sets that have their only node in common. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="j[@l='16'] != j[@w='78']"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean77.xml b/test/tests/conf/boolean/boolean77.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean77.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean77.xsl b/test/tests/conf/boolean/boolean77.xsl
new file mode 100644
index 0000000..5b29780
--- /dev/null
+++ b/test/tests/conf/boolean/boolean77.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean77 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of "<" operator comparing two real numbers, true result -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1.9999999 &lt; 2.0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean78.xml b/test/tests/conf/boolean/boolean78.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean78.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean78.xsl b/test/tests/conf/boolean/boolean78.xsl
new file mode 100644
index 0000000..ac1b8c0
--- /dev/null
+++ b/test/tests/conf/boolean/boolean78.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean78 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of "<" operator comparing two real numbers, false result -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2.0000001 &lt; 2.0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean79.xml b/test/tests/conf/boolean/boolean79.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean79.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean79.xsl b/test/tests/conf/boolean/boolean79.xsl
new file mode 100644
index 0000000..e531831
--- /dev/null
+++ b/test/tests/conf/boolean/boolean79.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean79 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of "<" operator comparing real to integer, true result -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1.9999999 &lt; 2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean80.xml b/test/tests/conf/boolean/boolean80.xml
new file mode 100644
index 0000000..7a839bf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean80.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean80.xsl b/test/tests/conf/boolean/boolean80.xsl
new file mode 100644
index 0000000..679ef0d
--- /dev/null
+++ b/test/tests/conf/boolean/boolean80.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean80 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of "<" operator comparing  real to integer, false result -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2 &lt; 2.0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean81.xml b/test/tests/conf/boolean/boolean81.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean81.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean81.xsl b/test/tests/conf/boolean/boolean81.xsl
new file mode 100644
index 0000000..b66b64c
--- /dev/null
+++ b/test/tests/conf/boolean/boolean81.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean81 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '=' operator with one number with leading zero, one not. Reverse order of boolean14.-->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="'001' = 1"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean82.xml b/test/tests/conf/boolean/boolean82.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean82.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean82.xsl b/test/tests/conf/boolean/boolean82.xsl
new file mode 100644
index 0000000..6f7f3b0
--- /dev/null
+++ b/test/tests/conf/boolean/boolean82.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean82 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '=' operator, false value compared against zero. Reverse order of boolean18. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="0=false()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean83.xml b/test/tests/conf/boolean/boolean83.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/boolean/boolean83.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean83.xsl b/test/tests/conf/boolean/boolean83.xsl
new file mode 100644
index 0000000..545a819
--- /dev/null
+++ b/test/tests/conf/boolean/boolean83.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean83 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of '=' operator, boolean to string. Reverse order of boolean15. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="'0'=true()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean84.xml b/test/tests/conf/boolean/boolean84.xml
new file mode 100644
index 0000000..a509ff5
--- /dev/null
+++ b/test/tests/conf/boolean/boolean84.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <avj>
+    <good>
+      <b>12</b>
+      <c>34</c>
+      <d>56</d>
+      <e>78</e>
+    </good>
+  </avj>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean84.xsl b/test/tests/conf/boolean/boolean84.xsl
new file mode 100644
index 0000000..b08453d
--- /dev/null
+++ b/test/tests/conf/boolean/boolean84.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean84 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test =, !=, and not, comparing node-set to number. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="x" select="avj/good/*"/>
+    <e><xsl:value-of select="$x=34"/></e>
+    <ne><xsl:value-of select="not($x=34)"/></ne>
+    <n><xsl:value-of select="$x!=34"/></n>
+    <nn><xsl:value-of select="not($x!=34)"/></nn><xsl:text>
+</xsl:text><!-- Now reverse the order of the comparands -->
+    <e><xsl:value-of select="34=$x"/></e>
+    <ne><xsl:value-of select="not(34=$x)"/></ne>
+    <n><xsl:value-of select="34!=$x"/></n>
+    <nn><xsl:value-of select="not(34!=$x)"/></nn>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean85.xml b/test/tests/conf/boolean/boolean85.xml
new file mode 100644
index 0000000..45f6adf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean85.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <avj>
+    <bool>
+      <b>true</b>
+      <c></c>
+      <d>false?</d>
+      <e>1</e>
+      <f>0</f>
+    </bool>
+  </avj>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean85.xsl b/test/tests/conf/boolean/boolean85.xsl
new file mode 100644
index 0000000..7e9ebef
--- /dev/null
+++ b/test/tests/conf/boolean/boolean85.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean85 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test =, !=, and not, comparing node-set to boolean. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="x" select="avj/bool/*"/>
+    <e><xsl:value-of select="$x=true()"/></e>
+    <ne><xsl:value-of select="not($x=true())"/></ne>
+    <n><xsl:value-of select="$x!=true()"/></n>
+    <nn><xsl:value-of select="not($x!=true())"/></nn><xsl:text>
+</xsl:text><!-- Now reverse the order of the comparands -->
+    <e><xsl:value-of select="true()=$x"/></e>
+    <ne><xsl:value-of select="not(true()=$x)"/></ne>
+    <n><xsl:value-of select="true()!=$x"/></n>
+    <nn><xsl:value-of select="not(true()!=$x)"/></nn>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean86.xml b/test/tests/conf/boolean/boolean86.xml
new file mode 100644
index 0000000..45f6adf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean86.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <avj>
+    <bool>
+      <b>true</b>
+      <c></c>
+      <d>false?</d>
+      <e>1</e>
+      <f>0</f>
+    </bool>
+  </avj>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean86.xsl b/test/tests/conf/boolean/boolean86.xsl
new file mode 100644
index 0000000..05ff573
--- /dev/null
+++ b/test/tests/conf/boolean/boolean86.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean86 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test =, !=, and not, comparing empty node-set to boolean. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="x" select="avj/none"/><!-- empty -->
+    <e><xsl:value-of select="$x=true()"/></e>
+    <ne><xsl:value-of select="not($x=true())"/></ne>
+    <n><xsl:value-of select="$x!=true()"/></n>
+    <nn><xsl:value-of select="not($x!=true())"/></nn><xsl:text>
+</xsl:text><!-- Now reverse the order of the comparands -->
+    <e><xsl:value-of select="true()=$x"/></e>
+    <ne><xsl:value-of select="not(true()=$x)"/></ne>
+    <n><xsl:value-of select="true()!=$x"/></n>
+    <nn><xsl:value-of select="not(true()!=$x)"/></nn>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean87.xml b/test/tests/conf/boolean/boolean87.xml
new file mode 100644
index 0000000..45f6adf
--- /dev/null
+++ b/test/tests/conf/boolean/boolean87.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <avj>
+    <bool>
+      <b>true</b>
+      <c></c>
+      <d>false?</d>
+      <e>1</e>
+      <f>0</f>
+    </bool>
+  </avj>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean87.xsl b/test/tests/conf/boolean/boolean87.xsl
new file mode 100644
index 0000000..82eb260
--- /dev/null
+++ b/test/tests/conf/boolean/boolean87.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean87 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test = and !=, comparing RTF to boolean. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:variable name="normalRTF">
+  <xsl:value-of select="/doc/avj"/>
+</xsl:variable>
+<xsl:variable name="emptyRTF"></xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <nt><xsl:value-of select="$normalRTF=true()"/></nt>
+    <nnt><xsl:value-of select="$normalRTF!=true()"/></nnt>
+    <tn><xsl:value-of select="true()=$normalRTF"/></tn>
+    <tnn><xsl:value-of select="true()!=$normalRTF"/></tnn><xsl:text>
+</xsl:text>
+    <et><xsl:value-of select="$emptyRTF=true()"/></et>
+    <ent><xsl:value-of select="$emptyRTF!=true()"/></ent>
+    <te><xsl:value-of select="true()=$emptyRTF"/></te>
+    <tne><xsl:value-of select="true()!=$emptyRTF"/></tne>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean88.xml b/test/tests/conf/boolean/boolean88.xml
new file mode 100644
index 0000000..6208637
--- /dev/null
+++ b/test/tests/conf/boolean/boolean88.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <str>found</str>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean88.xsl b/test/tests/conf/boolean/boolean88.xsl
new file mode 100644
index 0000000..8c0b8e5
--- /dev/null
+++ b/test/tests/conf/boolean/boolean88.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean88 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test = and !=, comparing RTF to string. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:variable name="stringRTF">
+  <xsl:value-of select="/doc/str"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <es><xsl:value-of select="$stringRTF='found'"/></es>
+    <ns><xsl:value-of select="$stringRTF!='found'"/></ns>
+    <se><xsl:value-of select="'found'=$stringRTF"/></se>
+    <sn><xsl:value-of select="'found'!=$stringRTF"/></sn>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean89.xml b/test/tests/conf/boolean/boolean89.xml
new file mode 100644
index 0000000..77c37cc
--- /dev/null
+++ b/test/tests/conf/boolean/boolean89.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <num>17</num>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean89.xsl b/test/tests/conf/boolean/boolean89.xsl
new file mode 100644
index 0000000..d406997
--- /dev/null
+++ b/test/tests/conf/boolean/boolean89.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean89 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test = and !=, comparing RTF to string. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:variable name="numericRTF">
+  <xsl:value-of select="/doc/num"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <en><xsl:value-of select="$numericRTF=17"/></en>
+    <nn><xsl:value-of select="$numericRTF!=17"/></nn>
+    <ne><xsl:value-of select="17=$numericRTF"/></ne>
+    <nn><xsl:value-of select="17!=$numericRTF"/></nn>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/boolean/boolean90.xml b/test/tests/conf/boolean/boolean90.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/conf/boolean/boolean90.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/boolean/boolean90.xsl b/test/tests/conf/boolean/boolean90.xsl
new file mode 100644
index 0000000..662ab48
--- /dev/null
+++ b/test/tests/conf/boolean/boolean90.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: boolean90 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean() on string "1". -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="boolean('1')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/cconf.xml b/test/tests/conf/cconf.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/cconf.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/cconf.xsl b/test/tests/conf/cconf.xsl
new file mode 100644
index 0000000..b2da647
--- /dev/null
+++ b/test/tests/conf/cconf.xsl
@@ -0,0 +1,120 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
+<xsl:param name="testfile" select="'No_file'"/>
+
+<xsl:variable name="Results" select="document($testfile)"/>
+<xsl:variable name="drive" select="document($testfile)/resultsfile/testfile/RunResults/@BaseDrive"/>
+
+<xsl:template match="/">
+<html>
+ <head>
+  <base href="{$drive}:"/>
+ </head>
+
+  <xsl:apply-templates select="$Results/resultsfile/testfile/RunResults"/>
+
+  <!-- This table displays the list of tests that failed. -->
+  <TABLE frame="box" border="1" rules="groups" width="95%" cellspacing="2" cellpadding="5">
+  <CAPTION align="center"><b><xsl:text>Failed Cases:</xsl:text></b></CAPTION>
+    <!-- fake row to establish widths -->
+    <TR><TD width="20%"></TD><TD width="80%"></TD></TR>
+    <xsl:apply-templates select="$Results/resultsfile/testfile/Test_Dir"/>
+  </TABLE>
+
+  <!-- This table displays the list of tests without gold files. -->
+  <TABLE frame="box" border="1" rules="groups" width="95%" cellspacing="2" cellpadding="5">
+  <CAPTION align="center"><b>The following testcases were missing gold files:</b></CAPTION>
+    <!-- fake row to establish widths -->
+    <TR><TD width="20%"></TD><TD width="80%"></TD></TR>
+    <xsl:apply-templates select="$Results/resultsfile/testfile/Test_Dir" mode="ambg"/>
+  </TABLE>
+
+</html>
+</xsl:template>
+
+<xsl:template match="RunResults">
+	<TABLE frame="box" border="1" rules="groups" width="95%" cellspacing="2" cellpadding="5"> 
+	<CAPTION align="center" fontsize="15"><b>C++ Test Results</b></CAPTION>
+	  <tr>
+		<!-- td rowspan="1" colspan="1"></td -->
+		<th align="center">RunID</th>
+		<th align="center">Xerces</th>
+		<th align="center">TestBase</th>
+		<th align="center">Source</th>
+		<th align="center">Pass</th>
+		<th align="center">Fail</th>
+		<th align="center">Missing Gold</th>
+  	  </tr>
+	<tr>
+	<td align="center"><b><xsl:value-of select="@UniqRunid"/></b></td>
+	<td align="center"><b><xsl:value-of select="@Xerces-Version"/></b></td>
+	<td align="center"><b><xsl:value-of select="@TestBase"/></b></td>
+	<td align="center"><b><xsl:value-of select="@xmlFormat"/></b></td>
+	<td align="center"><b><xsl:value-of select="@Passed"/></b></td>
+	<td align="center" bgcolor="red"><b><xsl:value-of select="@Failed"/></b></td>
+	<td align="center"><b><xsl:value-of select="@No_Gold_Files"/></b></td>
+	</tr>
+	</TABLE>
+</xsl:template>
+
+<xsl:template match="Test_Dir">
+	<xsl:for-each select="Testcase">
+		<xsl:if test="@result='FAIL'">
+			<tr>
+			<td bgcolor="red"><xsl:value-of select="@desc"/></td>
+			<td><xsl:value-of select="@reason"/></td>
+			</tr>
+			<tr>
+			<td align="center">At Node:</td>
+			<td><xsl:value-of select="@atNode"/></td>
+			</tr>
+			<tr>
+			<td align="center">Expected:</td>
+			<td><xsl:value-of select="exp"/></td>
+			</tr>
+			<tr>
+			<td align="center">Actual:</td>
+			<td><xsl:value-of select="act"/></td>
+			</tr>
+			<tr>
+			<td align="center">links</td>
+			<td><a href="{xml}" target="new">xml,  </a><a href="{xsl}" target="new">xsl,  </a>
+				<a href="{result}" target="new">result,  </a><a href="{gold}" target="new">gold</a></td>
+			</tr>
+		</xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+
+<xsl:template match="Test_Dir" mode="ambg">
+	<xsl:for-each select="Testcase">
+		<xsl:if test="@result='AMBG'">
+		  <tr>
+			<td><xsl:value-of select="@desc"/></td>
+		  </tr>
+		</xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional01.xml b/test/tests/conf/conditional/conditional01.xml
new file mode 100644
index 0000000..0c75a0f
--- /dev/null
+++ b/test/tests/conf/conditional/conditional01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <person><sex>M</sex><name>John</name></person>
+  <person><sex>F</sex><name>Jane</name></person>
+  <person><sex>H</sex><name>Hermaphrodite</name></person>
+  <person><sex>12</sex><name>Prince</name></person>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional01.xsl b/test/tests/conf/conditional/conditional01.xsl
new file mode 100644
index 0000000..70b1602
--- /dev/null
+++ b/test/tests/conf/conditional/conditional01.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Purpose: General test of choose, with otherwise -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="person">
+      <xsl:choose>
+        <xsl:when test="sex='M'">&#xa;Male: </xsl:when>
+        <xsl:when test="sex='F'">&#xa;Female: </xsl:when>
+        <xsl:otherwise>&#xa;Who knows?: </xsl:otherwise>
+      </xsl:choose>
+      <xsl:value-of select="name"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional02.xml b/test/tests/conf/conditional/conditional02.xml
new file mode 100644
index 0000000..f586d46
--- /dev/null
+++ b/test/tests/conf/conditional/conditional02.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <critter type="dog"><name>Lassie</name></critter>
+  <critter type="dog"><name>Wishbone</name></critter>
+  <critter type="cat"><name>Felix</name></critter>
+  <critter type="cat"><name>Silvester</name></critter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional02.xsl b/test/tests/conf/conditional/conditional02.xsl
new file mode 100644
index 0000000..efc73d1
--- /dev/null
+++ b/test/tests/conf/conditional/conditional02.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Purpose: Test choose with no matches and missing otherwise clause. -->
+  <!-- No expected output. -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="critter">
+      <xsl:choose>
+        <xsl:when test="@type='horse'">&#xa;Horse: </xsl:when>
+        <xsl:when test="@type='cow'">&#xa;Cow: </xsl:when>
+      </xsl:choose>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional03.xml b/test/tests/conf/conditional/conditional03.xml
new file mode 100644
index 0000000..c7ea354
--- /dev/null
+++ b/test/tests/conf/conditional/conditional03.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <critter><name>Lassie</name></critter>
+  <critter><name>Wishbone</name></critter>
+  <critter><name>Felix</name></critter>
+  <critter><name>Silvester</name></critter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional03.xsl b/test/tests/conf/conditional/conditional03.xsl
new file mode 100644
index 0000000..58bcce5
--- /dev/null
+++ b/test/tests/conf/conditional/conditional03.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for "when" testing on nonexsisent attribute node. -->
+  <!-- No errors or output expected. -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="critter">
+      <xsl:choose>
+        <xsl:when test="@type='horse'">&#xa;Horse: </xsl:when>
+        <xsl:when test="@type='cow'">&#xa;Cow: </xsl:when>
+      </xsl:choose>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional04.xml b/test/tests/conf/conditional/conditional04.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conf/conditional/conditional04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional04.xsl b/test/tests/conf/conditional/conditional04.xsl
new file mode 100644
index 0000000..6012bd2
--- /dev/null
+++ b/test/tests/conf/conditional/conditional04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:when by itself, success. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="foo">1</xsl:when>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional05.xml b/test/tests/conf/conditional/conditional05.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conf/conditional/conditional05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional05.xsl b/test/tests/conf/conditional/conditional05.xsl
new file mode 100644
index 0000000..32a8438
--- /dev/null
+++ b/test/tests/conf/conditional/conditional05.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test two xsl:when elements without xsl:otherwise, one succeeding. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="blah">2</xsl:when>
+      <xsl:when test="foo">1</xsl:when>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional06.xml b/test/tests/conf/conditional/conditional06.xml
new file mode 100644
index 0000000..664eb12
--- /dev/null
+++ b/test/tests/conf/conditional/conditional06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <blah>found</blah>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional06.xsl b/test/tests/conf/conditional/conditional06.xsl
new file mode 100644
index 0000000..339dfc5
--- /dev/null
+++ b/test/tests/conf/conditional/conditional06.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Purpose: Test two xsl:when, no xsl:otherwise, second matches. -->
+  <!-- Creator: David Marston -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="yada">1</xsl:when>
+      <xsl:when test="blah">2</xsl:when>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional07.xml b/test/tests/conf/conditional/conditional07.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/conditional/conditional07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional07.xsl b/test/tests/conf/conditional/conditional07.xsl
new file mode 100644
index 0000000..47b17cd
--- /dev/null
+++ b/test/tests/conf/conditional/conditional07.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test single when by itself, fail. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="blah">2</xsl:when>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional08.xml b/test/tests/conf/conditional/conditional08.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conf/conditional/conditional08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional08.xsl b/test/tests/conf/conditional/conditional08.xsl
new file mode 100644
index 0000000..8a53f2b
--- /dev/null
+++ b/test/tests/conf/conditional/conditional08.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test failing when with xsl:otherwise. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="blah">1</xsl:when>
+      <xsl:otherwise>2</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional09.xml b/test/tests/conf/conditional/conditional09.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conf/conditional/conditional09.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional09.xsl b/test/tests/conf/conditional/conditional09.xsl
new file mode 100644
index 0000000..249fb08
--- /dev/null
+++ b/test/tests/conf/conditional/conditional09.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test single when with xsl:otherwise, success on when. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="foo">1</xsl:when>
+      <xsl:otherwise>2</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional10.xml b/test/tests/conf/conditional/conditional10.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/conditional/conditional10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional10.xsl b/test/tests/conf/conditional/conditional10.xsl
new file mode 100644
index 0000000..7097851
--- /dev/null
+++ b/test/tests/conf/conditional/conditional10.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Purpose: Test xsl:if with simplistic boolean expression. -->
+
+<xsl:template match="/">
+  <out>
+  <xsl:if test="2=2">
+    <xsl:text>number </xsl:text>
+  </xsl:if>
+  <xsl:if test="'a'='a'">
+    <xsl:text>string</xsl:text>
+  </xsl:if>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional11.xml b/test/tests/conf/conditional/conditional11.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/conditional/conditional11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional11.xsl b/test/tests/conf/conditional/conditional11.xsl
new file mode 100644
index 0000000..311c517
--- /dev/null
+++ b/test/tests/conf/conditional/conditional11.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:if with test expression that converts to boolean true. -->
+
+<xsl:template match="/">
+  <out>
+  <xsl:if test="'StringConstant'">
+    <xsl:text>StringConstant</xsl:text>
+  </xsl:if>
+  <xsl:if test="0">
+    <xsl:text>Failed</xsl:text>
+  </xsl:if>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional12.xml b/test/tests/conf/conditional/conditional12.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conf/conditional/conditional12.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional12.xsl b/test/tests/conf/conditional/conditional12.xsl
new file mode 100644
index 0000000..94b873b
--- /dev/null
+++ b/test/tests/conf/conditional/conditional12.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:if with test involving current node value. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates select="letter"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter">
+  <xsl:if test=".='b'">
+    <xsl:text>Found b  </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional13.xml b/test/tests/conf/conditional/conditional13.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conf/conditional/conditional13.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional13.xsl b/test/tests/conf/conditional/conditional13.xsl
new file mode 100644
index 0000000..578b065
--- /dev/null
+++ b/test/tests/conf/conditional/conditional13.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:if with boolean function and test of current node. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates select="letter"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter">
+  <xsl:if test="not(.='b')">
+    <xsl:text>not_b </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional14.xml b/test/tests/conf/conditional/conditional14.xml
new file mode 100644
index 0000000..736846f
--- /dev/null
+++ b/test/tests/conf/conditional/conditional14.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<Family>
+<Child>
+<Name>Harry</Name>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>45</Age>
+</Personal_Information>
+</Child>
+<Child>
+<Name>Tom</Name>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>30</Age>
+</Personal_Information>
+</Child>
+<Child>
+<Name>Dick</Name>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>40</Age>
+</Personal_Information>
+</Child>
+<Child>
+<Name>Paulette</Name>
+<Personal_Information>
+<Sex>Female</Sex>
+<Age>38</Age>
+</Personal_Information>
+</Child>
+<Child>
+<Name>Peter</Name>
+<Personal_Information>
+<Sex>Male</Sex>
+<Age>34</Age>
+</Personal_Information>
+</Child>
+</Family>
diff --git a/test/tests/conf/conditional/conditional14.xsl b/test/tests/conf/conditional/conditional14.xsl
new file mode 100644
index 0000000..b1e4e67
--- /dev/null
+++ b/test/tests/conf/conditional/conditional14.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Purpose: Test xsl:if with test of subelement value. -->
+
+<xsl:template match="Family">
+  <out>
+    <xsl:apply-templates select="Child"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="Child">
+  <xsl:if test='Personal_Information/Sex[.="Male"]' >
+    <xsl:value-of select="./Name" />, he is <xsl:value-of select="Personal_Information/Age"/><xsl:text> years old.&#10;</xsl:text>
+  </xsl:if>
+  <xsl:if test='Personal_Information/Sex[.="Female"]' >
+    <xsl:value-of select="./Name" />, she is <xsl:value-of select="Personal_Information/Age"/><xsl:text> years old.&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional15.xml b/test/tests/conf/conditional/conditional15.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/conditional/conditional15.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional15.xsl b/test/tests/conf/conditional/conditional15.xsl
new file mode 100644
index 0000000..a1bb11b
--- /dev/null
+++ b/test/tests/conf/conditional/conditional15.xsl
@@ -0,0 +1,38 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Purpose: Test xsl:if with equality of result tree fragments. -->
+
+<xsl:variable name="v1">test</xsl:variable>
+<xsl:variable name="v2">test</xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <xsl:if test="$v1=$v2">Success1</xsl:if>
+    <xsl:if test="string($v1)=string($v2)">Success2</xsl:if>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional16.xml b/test/tests/conf/conditional/conditional16.xml
new file mode 100644
index 0000000..1f0ee2d
--- /dev/null
+++ b/test/tests/conf/conditional/conditional16.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Family>
+<Child name="Harry">
+<Name>Harry</Name>
+</Child>
+<Child name="Tom">
+<Name>Tom</Name>
+</Child>
+<Child name="Dick">
+<Name>Dick</Name>
+</Child>
+<Child name="John">
+<Name>Dick</Name>
+</Child>
+<Child name="Joe">
+<Name>Dick</Name>
+</Child>
+<Child name="Paulette">
+<Name>Paulette</Name>
+</Child>
+<Child name="Peter">
+<Name>Peter</Name>
+</Child>
+</Family>
diff --git a/test/tests/conf/conditional/conditional16.xsl b/test/tests/conf/conditional/conditional16.xsl
new file mode 100644
index 0000000..312947b
--- /dev/null
+++ b/test/tests/conf/conditional/conditional16.xsl
@@ -0,0 +1,38 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Purpose: Test of compound conditions within xsl:if. -->
+
+<xsl:template match="Family">
+  <out>
+    <xsl:for-each select="*">  
+      <xsl:if test="@name='John'or @name='Joe'">
+      <xsl:value-of select="@name"/> Smith</xsl:if><xsl:text>
+</xsl:text>  
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional17.xml b/test/tests/conf/conditional/conditional17.xml
new file mode 100644
index 0000000..1784365
--- /dev/null
+++ b/test/tests/conf/conditional/conditional17.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>5</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional17.xsl b/test/tests/conf/conditional/conditional17.xsl
new file mode 100644
index 0000000..1406f06
--- /dev/null
+++ b/test/tests/conf/conditional/conditional17.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that only the content of the first matching xsl:when is instantiated. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="foo &lt; 2">1</xsl:when>
+      <xsl:when test="foo &lt; 4">2</xsl:when>
+      <xsl:when test="foo &lt; 8">3</xsl:when>
+      <xsl:when test="foo &lt; 16">4</xsl:when>
+      <xsl:when test="foo &lt; 32">5</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional18.xml b/test/tests/conf/conditional/conditional18.xml
new file mode 100644
index 0000000..2456394
--- /dev/null
+++ b/test/tests/conf/conditional/conditional18.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>f</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional18.xsl b/test/tests/conf/conditional/conditional18.xsl
new file mode 100644
index 0000000..7367562
--- /dev/null
+++ b/test/tests/conf/conditional/conditional18.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that xsl:if can be nested. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates select="letter"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter">
+  <xsl:if test="2+2 = 4">
+    <xsl:if test="'d'='d'">
+      <xsl:if test=".='b'">
+        <xsl:if test="0 = 0">
+          <xsl:if test=".='b'">
+            <xsl:if test="name(..)='letters'">
+              <xsl:if test="1+1 = 2">
+                <xsl:text>Found b!</xsl:text>
+              </xsl:if>
+            </xsl:if>
+          </xsl:if>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional19.xml b/test/tests/conf/conditional/conditional19.xml
new file mode 100644
index 0000000..3440875
--- /dev/null
+++ b/test/tests/conf/conditional/conditional19.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+      <c>
+        <title>Level C</title>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional19.xsl b/test/tests/conf/conditional/conditional19.xsl
new file mode 100644
index 0000000..0264500
--- /dev/null
+++ b/test/tests/conf/conditional/conditional19.xsl
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that xsl:choose can be nested. -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select=".//title">
+      <xsl:choose>
+        <xsl:when test=".='Level A'">*A+</xsl:when>
+        <xsl:when test=".='Level B'">B+</xsl:when>
+        <xsl:when test=".='Level C'">
+          <xsl:choose><!-- When on a C, look ahead -->
+            <xsl:when test="name(following-sibling::*[1])='d'">C+</xsl:when>
+            <xsl:when test="name(../following-sibling::*[1])='c'">C:</xsl:when>
+            <xsl:when test="name(../../following-sibling::*[1])='b'">C-</xsl:when>
+            <xsl:otherwise>!Bad tree!</xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:when test=".='Level D'">
+          <xsl:choose><!-- When on a D, look ahead -->
+            <xsl:when test="name(following-sibling::*[1])='e'">D+</xsl:when>
+            <xsl:when test="name(../following-sibling::*[1])='d'">D:</xsl:when>
+            <xsl:otherwise><!-- We're backing up, but how far? -->
+              <xsl:choose>
+                <xsl:when test="name(../../following-sibling::*[1])='c'">D-</xsl:when>
+                <xsl:otherwise>D|</xsl:otherwise>
+              </xsl:choose>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:when test=".='Level E'">E-</xsl:when>
+        <xsl:otherwise>TREE: </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional20.xml b/test/tests/conf/conditional/conditional20.xml
new file mode 100644
index 0000000..ed3a5f4
--- /dev/null
+++ b/test/tests/conf/conditional/conditional20.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>
+    <test/>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional20.xsl b/test/tests/conf/conditional/conditional20.xsl
new file mode 100644
index 0000000..e79fa60
--- /dev/null
+++ b/test/tests/conf/conditional/conditional20.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Purpose: Test two xsl:when elements using a variable in the test. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="level" select="position()"/>
+    <xsl:choose>        
+      <xsl:when test="$level=1">
+        <xsl:text>Found the first one.</xsl:text>
+      </xsl:when>
+      <xsl:when test="$level=2">
+        <xsl:text>Found the second one.</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional21.xml b/test/tests/conf/conditional/conditional21.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/conditional/conditional21.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional21.xsl b/test/tests/conf/conditional/conditional21.xsl
new file mode 100644
index 0000000..981a4a1
--- /dev/null
+++ b/test/tests/conf/conditional/conditional21.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9 -->
+  <!-- Creator: Carmelo Montanez --><!-- DataManipulation002 in NIST suite -->
+  <!-- Purpose: Test xsl:if inside xsl:otherwise. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test = "2 &gt; 3">
+        <xsl:text>Test failed!!</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:if test = "9 mod 3 = 0">
+          <xsl:text>Test executed successfully.</xsl:text>
+        </xsl:if>
+      </xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional22.xml b/test/tests/conf/conditional/conditional22.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/conditional/conditional22.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional22.xsl b/test/tests/conf/conditional/conditional22.xsl
new file mode 100644
index 0000000..2e81ec1
--- /dev/null
+++ b/test/tests/conf/conditional/conditional22.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9 -->
+  <!-- Creator: Carmelo Montanez --><!-- DataManipulation001 in NIST suite -->
+  <!-- Purpose: Test xsl:if inside xsl:when. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test = "2 &gt; 1">
+        <xsl:if test = "9 mod 3 = 0">
+          <xsl:text>Test executed successfully.</xsl:text>
+        </xsl:if>
+      </xsl:when>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conditional/conditional23.xml b/test/tests/conf/conditional/conditional23.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/conditional/conditional23.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conditional/conditional23.xsl b/test/tests/conf/conditional/conditional23.xsl
new file mode 100644
index 0000000..6fdde2c
--- /dev/null
+++ b/test/tests/conf/conditional/conditional23.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditional23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: Carmelo Montanez --><!-- DataManipulation008 in NIST suite -->
+  <!-- Purpose: Test a function (round) in the test attribute. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test = "(round(3.7) &gt; 3)">
+        <xsl:text>Test executed successfully</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres01.xml b/test/tests/conf/conflictres/conflictres01.xml
new file mode 100644
index 0000000..2d08a18
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres01.xsl b/test/tests/conf/conflictres/conflictres01.xsl
new file mode 100644
index 0000000..a94f695
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres01.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test match of element name. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:text>Match-of-qualified-name</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-of-wildcard</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Match-of-node-type</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres02.xml b/test/tests/conf/conflictres/conflictres02.xml
new file mode 100644
index 0000000..2d08a18
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres02.xsl b/test/tests/conf/conflictres/conflictres02.xsl
new file mode 100644
index 0000000..0a75d80
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres02.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Purpose: Test for conflict resolution on wildcard names. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Match-of-node-type</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-of-wildcard</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres03.xml b/test/tests/conf/conflictres/conflictres03.xml
new file mode 100644
index 0000000..2d08a18
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres03.xsl b/test/tests/conf/conflictres/conflictres03.xsl
new file mode 100644
index 0000000..9cb8d6e
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres03.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Purpose: Test for conflict resolution - nodetype. -->
+  <!-- Creator: Paul Dick -->
+  <!-- should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-of-wildcard</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Match-of-node-type</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres04.xml b/test/tests/conf/conflictres/conflictres04.xml
new file mode 100644
index 0000000..b0e1586
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+	<foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres04.xsl b/test/tests/conf/conflictres/conflictres04.xsl
new file mode 100644
index 0000000..7bf1de4
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres04.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 -->
+  <!-- Purpose: Test for nodetest override of default priority. Also, node selected is attribute instead of element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- No conflict warnings should be seen. -->
+
+<xsl:template match="doc" priority="10">
+  <out>
+    <xsl:apply-templates select="foo/@test"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:text>Match-of-qualified-name</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-of-wildcard</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()" priority="1">
+  <xsl:text>Match-of-node-type</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres05.xml b/test/tests/conf/conflictres/conflictres05.xml
new file mode 100644
index 0000000..2d08a18
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres05.xsl b/test/tests/conf/conflictres/conflictres05.xsl
new file mode 100644
index 0000000..e7cc1ea
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres05.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for conflict resolution between simple and non-simple node patterns. -->
+
+  <!-- No conflict warnings should be seen. -->	       
+<!-- May be obsolete; wording of spec has changed. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc/foo">
+  <xsl:text>Match of non-simple '/'</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:text>Match-of-qualified-name</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-of-wildcard</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Match-of-node-type</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres06.xml b/test/tests/conf/conflictres/conflictres06.xml
new file mode 100644
index 0000000..b2479c6
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres06.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <file test="true"/>
+  <file test="false"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres06.xsl b/test/tests/conf/conflictres/conflictres06.xsl
new file mode 100644
index 0000000..4f99341
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres06.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Purpose: Test for conflict resolution on a predicate -->
+  <!-- Creator: Paul Dick -->
+  <!-- No conflict warnings should be seen. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="file"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="file[@test='false']"><!-- default priority is 0.5 -->
+  <xsl:text>Match-predicated-node-name</xsl:text>
+</xsl:template>
+
+<xsl:template match="file"><!-- default priority is 0 -->
+  <xsl:text>Match-on-node-name,</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-of-wildcard,</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Match-of-node,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres07.xml b/test/tests/conf/conflictres/conflictres07.xml
new file mode 100644
index 0000000..d3a59b4
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres07.xsl b/test/tests/conf/conflictres/conflictres07.xsl
new file mode 100644
index 0000000..ddfe8cb
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres07.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Purpose: Test for conflict resolution with 2 non-simple patterns (predicate and '/') -->
+  <!-- Creator: Paul Dick -->
+  <!-- 1 conflict warning should be seen. -->
+  <!-- Should say "Match of non-simple '/'" -->
+
+<xsl:template match="doc">
+  <out> 
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo[@test]">
+  <xsl:text>Match-of-non-simple '[...]'</xsl:text>
+</xsl:template>
+
+<xsl:template match="doc/foo">
+  <xsl:text>Match-of-non-simple '/'</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:text>Match-of-qualified-name</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-of-wildcard</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Match-of-node-type</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres08.xml b/test/tests/conf/conflictres/conflictres08.xml
new file mode 100644
index 0000000..2d08a18
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres08.xsl b/test/tests/conf/conflictres/conflictres08.xsl
new file mode 100644
index 0000000..1ab73b9
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres08.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Purpose: Test for conflict resolution with 2 non-simple patterns ('/' and predicate) -->
+  <!-- Creator: Paul Dick -->
+  <!-- 1 conflict warning should be seen. -->
+  <!-- Should say "Match of non-simple '[...]'" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc/foo">
+  <xsl:text>Match-of-non-simple '/'</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[@test]">
+  <xsl:text>Match-of-non-simple '[...]'</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:text>Match-of-qualified-name</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-of-wildcard</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Match-of-node-type</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres09.xml b/test/tests/conf/conflictres/conflictres09.xml
new file mode 100644
index 0000000..a2ea7e6
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres09.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<doc>
+<a>1</a>
+<b>2</b>
+<c>3</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres09.xsl b/test/tests/conf/conflictres/conflictres09.xsl
new file mode 100644
index 0000000..3cd3ff5
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres09.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<ped:transform xmlns:ped="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 Conflict Resolution for Template rules. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Verify that template with higher priority executes, and that
+  	   one with a lower import precedence does not. -->
+
+<ped:import href="k.xsl"/>
+<ped:include href="l.xsl"/>
+<ped:output method="xml"/>
+
+<ped:template match="doc">
+  <out>
+    <ped:value-of select="'Testing '"/>
+    <ped:for-each select="*">
+      <ped:value-of select="."/><ped:text> </ped:text>		
+    </ped:for-each>
+  </out>
+</ped:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+
+</ped:transform>
diff --git a/test/tests/conf/conflictres/conflictres10.xml b/test/tests/conf/conflictres/conflictres10.xml
new file mode 100644
index 0000000..5d7cc91
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres10.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <a/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres10.xsl b/test/tests/conf/conflictres/conflictres10.xsl
new file mode 100644
index 0000000..6c55cfb
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres10.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that second instance of template wins. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>First Match-of-wildcard</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Second Match-of-wildcard</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres11.xml b/test/tests/conf/conflictres/conflictres11.xml
new file mode 100644
index 0000000..0f6d66e
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres11.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><foo>text-in-foo</foo></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres11.xsl b/test/tests/conf/conflictres/conflictres11.xsl
new file mode 100644
index 0000000..13ffdff
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres11.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for conflict resolution - two different node tests. -->
+  <!-- should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Match-of-node,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>Match-of-text,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres12.xml b/test/tests/conf/conflictres/conflictres12.xml
new file mode 100644
index 0000000..d146812
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres12.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b/>
+    <b><b/></b>
+    <c><b/></c>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres12.xsl b/test/tests/conf/conflictres/conflictres12.xsl
new file mode 100644
index 0000000..e79acfd
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres12.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that child and descendant are equal in priority. -->
+  <!-- should see 2 conflict warnings -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a//b">
+  <xsl:text>Descendant,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="a/b">
+  <xsl:text>Child,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres13.xml b/test/tests/conf/conflictres/conflictres13.xml
new file mode 100644
index 0000000..53d482e
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres13.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b><c/></b>
+    <b><d/></b>
+    <e><c/></e>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres13.xsl b/test/tests/conf/conflictres/conflictres13.xsl
new file mode 100644
index 0000000..221dc8c
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres13.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that two patterns containing * at one level are equal
+     in priority, despite one * being deeper. -->
+  <!-- should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a|b|e">
+  <xsl:value-of select="name(.)"/><xsl:text>:</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="a/b/*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard-last,</xsl:text>
+</xsl:template>
+
+<xsl:template match="a/*/c">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard-middle,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres14.xml b/test/tests/conf/conflictres/conflictres14.xml
new file mode 100644
index 0000000..525974b
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres14.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b><c/></b>
+    <d><c/></d>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres14.xsl b/test/tests/conf/conflictres/conflictres14.xsl
new file mode 100644
index 0000000..37a7fe9
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres14.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that pattern containing * at one level is equal in priority
+     to one containing * at two levels. -->
+  <!-- should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a|b|d">
+  <xsl:value-of select="name(.)"/><xsl:text>:</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="a/*/*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Two-wildcards,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="a/b/*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard-last,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres15.xml b/test/tests/conf/conflictres/conflictres15.xml
new file mode 100644
index 0000000..87fd1bf
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres15.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b><c/></b>
+    <b><c><d><e/></d></c></b>
+    <e><c/></e>
+    <e><b><c/></b></e>
+    <e><c><d/></c></e>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres15.xsl b/test/tests/conf/conflictres/conflictres15.xsl
new file mode 100644
index 0000000..e6833f4
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres15.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that pattern a//c is higher priority than a/*/c, even though
+     it allows more nodes to qualify. -->
+  <!-- should see 4 conflict warnings -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a|b|d|e">
+  <xsl:value-of select="name(.)"/><xsl:text>:</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="a//c">
+  <xsl:value-of select="name(.)"/><xsl:text>-Descendant,</xsl:text>
+</xsl:template>
+
+<xsl:template match="a/*/c">
+  <xsl:value-of select="name(.)"/><xsl:text>-Grandchild,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres16.xml b/test/tests/conf/conflictres/conflictres16.xml
new file mode 100644
index 0000000..b2479c6
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres16.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <file test="true"/>
+  <file test="false"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres16.xsl b/test/tests/conf/conflictres/conflictres16.xsl
new file mode 100644
index 0000000..1bf53ac
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres16.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for conflict resolution on a predicate of a wildcard -->
+  <!-- No conflict warnings should be seen. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="file"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*[@test='false']">
+  <xsl:text>Match-predicated-wildcard,</xsl:text>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Match-wildcard,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres17.xml b/test/tests/conf/conflictres/conflictres17.xml
new file mode 100644
index 0000000..b2479c6
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres17.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <file test="true"/>
+  <file test="false"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres17.xsl b/test/tests/conf/conflictres/conflictres17.xsl
new file mode 100644
index 0000000..cf9c830
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres17.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: If equal priorities are explicitly assigned, default priority
+     rules have no effect on resolving conflicts. -->
+  <!-- should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="file"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="file[@test='false']" priority="2">
+  <xsl:text>Match-predicated-wildcard,</xsl:text>
+</xsl:template>
+
+<xsl:template match="file" priority="2">
+  <xsl:text>Match-wildcard,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres18.xml b/test/tests/conf/conflictres/conflictres18.xml
new file mode 100644
index 0000000..286b54b
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres18.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <a x1="big" x2="bigger"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres18.xsl b/test/tests/conf/conflictres/conflictres18.xsl
new file mode 100644
index 0000000..1a38aa3
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres18.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that @foo has higher priority than @*. -->
+  <!-- should see no conflict warnings -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+  <xsl:apply-templates select="@*"/>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard,</xsl:text>
+</xsl:template>
+
+<xsl:template match="@x1">
+  <xsl:text>Found x1 attribute,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres19.xml b/test/tests/conf/conflictres/conflictres19.xml
new file mode 100644
index 0000000..48f15ae
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres19.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc xmlns:ped="http://www.ped.com">
+  <a x1="big" x2="bigger" ped:x3="small" ped:x4="smaller"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres19.xsl b/test/tests/conf/conflictres/conflictres19.xsl
new file mode 100644
index 0000000..a5c560f
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres19.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0" xmlns:ped="http://www.ped.com" 
+    exclude-result-prefixes="ped">
+
+  <!-- FileName: conflictres19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test priority rankings of non-namespaced and
+     namespaced attributes. The @ped:* ranks above @* and below the others. -->
+  <!-- should see no conflict warnings -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a...
+</xsl:text>
+  <xsl:apply-templates select="@*"/>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard,</xsl:text>
+</xsl:template>
+
+<xsl:template match="@x1">
+  <xsl:text>got x1 attribute,</xsl:text>
+</xsl:template>
+
+<xsl:template match="@ped:*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Qualified-wildcard,</xsl:text>
+</xsl:template>
+
+<xsl:template match="@ped:x3">
+  <xsl:text>got ped:x3 attribute,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres20.xml b/test/tests/conf/conflictres/conflictres20.xml
new file mode 100644
index 0000000..11778ed
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres20.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc xmlns:ped="http://www.ped.com">
+  <a/>
+  <ped:a/>
+  <ped:b/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres20.xsl b/test/tests/conf/conflictres/conflictres20.xsl
new file mode 100644
index 0000000..6739943
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres20.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0" xmlns:ped="http://www.ped.com" 
+    exclude-result-prefixes="ped">
+
+  <!-- FileName: conflictres20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test priority rankings of non-namespaced and
+     namespaced elements. The ped:* ranks above * and below the others. -->
+  <!-- should see no conflict warnings -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard,</xsl:text>
+</xsl:template>
+
+<xsl:template match="ped:*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Qualified-wildcard,</xsl:text>
+</xsl:template>
+
+<xsl:template match="ped:b">
+  <xsl:text>found ped:b,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres21.xml b/test/tests/conf/conflictres/conflictres21.xml
new file mode 100644
index 0000000..d7d4197
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres21.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a>a-text</a><b>b-text</b></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres21.xsl b/test/tests/conf/conflictres/conflictres21.xsl
new file mode 100644
index 0000000..c37b06c
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres21.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for conflict resolution on a predicate of a node test. -->
+  <!-- should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>Any-text,</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()[.='a-text']">
+  <xsl:text>Specific-text,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres22.xml b/test/tests/conf/conflictres/conflictres22.xml
new file mode 100644
index 0000000..4d2bd41
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres22.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><!-- a-comment --><!-- b-comment --></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres22.xsl b/test/tests/conf/conflictres/conflictres22.xsl
new file mode 100644
index 0000000..2b9615a
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres22.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for conflict resolution on a predicate of a node test for comments. -->
+  <!-- should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:text>Any-comment,</xsl:text>
+</xsl:template>
+
+<xsl:template match="comment()[.=' a-comment ']">
+  <xsl:text>Specific-comment,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres23.xml b/test/tests/conf/conflictres/conflictres23.xml
new file mode 100644
index 0000000..fdd70f8
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres23.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <?a-pi some data?>
+  <?b-pi some data?>
+  <?b-pi junk?>
+  <?c-pi junk?>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres23.xsl b/test/tests/conf/conflictres/conflictres23.xsl
new file mode 100644
index 0000000..7f4243b
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres23.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for conflict resolution on processing-instruction() node test. -->
+  <!-- should see 1 conflict warning, because presence of a predicate raises priority to 0.5 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction('b-pi')[.='junk']">
+  <xsl:text>PI-by-name-and-content:</xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  <xsl:text>Any-PI:</xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()[.='junk']">
+  <xsl:text>PI-by-content:</xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+<xsl:template match="processing-instruction('b-pi')">
+  <xsl:text>PI-named-b:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres24.xml b/test/tests/conf/conflictres/conflictres24.xml
new file mode 100644
index 0000000..07d73dd
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres24.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <a>Element content</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres24.xsl b/test/tests/conf/conflictres/conflictres24.xsl
new file mode 100644
index 0000000..2a81cae
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres24.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres24 -->
+  <!-- Scenario: Standard-XML -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Purpose: Test for conflict resolution on templates assigned equal priority. -->
+  <!-- Creator: Gary Peskin -->
+  <!-- should see 1 conflict warning, because both templates are at same priority, but
+     the last one should be selected. If priorities weren't assigned, more specific one
+     (the "a" template) would have won. -->
+
+<xsl:strip-space elements="doc"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a" priority="-2.0">
+  <xsl:text>This template should not be matched.</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()" priority="-2.0">
+  <xsl:text>This template should be matched.</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres25.xml b/test/tests/conf/conflictres/conflictres25.xml
new file mode 100644
index 0000000..96b715f
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres25.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a x1="big" x2="bigger"/></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres25.xsl b/test/tests/conf/conflictres/conflictres25.xsl
new file mode 100644
index 0000000..c487494
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres25.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Santiago Pericas-Geertsen -->
+  <!-- Purpose: Test explicit priorities vs. default for attributes. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+  <xsl:apply-templates select="@*"/>
+</xsl:template>
+
+<!-- Should not match -->
+<xsl:template match="@x1">
+  <xsl:text>Found x1 attribute,</xsl:text>
+</xsl:template>
+
+<!-- Same priority as pattern above, but later position -->
+<xsl:template match="@*" priority="0">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard,</xsl:text>
+</xsl:template>
+
+<!-- Same priority as pattern above, but later position -->
+<xsl:template match="@x2">
+  <xsl:text>Found x2 attribute</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres26.xml b/test/tests/conf/conflictres/conflictres26.xml
new file mode 100644
index 0000000..96b715f
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres26.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a x1="big" x2="bigger"/></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres26.xsl b/test/tests/conf/conflictres/conflictres26.xsl
new file mode 100644
index 0000000..22ac474
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres26.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Santiago Pericas-Geertsen -->
+  <!-- Purpose: Test explicit priorities vs. default for attributes. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+  <xsl:apply-templates select="@*"/>
+</xsl:template>
+
+<xsl:template match="@*" priority="0.1">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard,</xsl:text>
+</xsl:template>
+
+<!-- Should not match as default priority is 0 -->
+<xsl:template match="@x1">
+  <xsl:text>Found x1 attribute,</xsl:text>
+</xsl:template>
+
+<!-- Should not match as default priority is 0 -->
+<xsl:template match="@x2">
+  <xsl:text>Found x2 attribute</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres27.xml b/test/tests/conf/conflictres/conflictres27.xml
new file mode 100644
index 0000000..04ba2a5
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres27.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a/><b/></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres27.xsl b/test/tests/conf/conflictres/conflictres27.xsl
new file mode 100644
index 0000000..fd4a1d7
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres27.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Santiago Pericas-Geertsen -->
+  <!-- Purpose: Test explicit priorities for "*". -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+</xsl:template>
+
+<xsl:template match="*" priority="0.1">
+  <xsl:text>Matched * on </xsl:text>
+  <xsl:value-of select="name(.)"/>
+  <xsl:text>;&#10;</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres28.xml b/test/tests/conf/conflictres/conflictres28.xml
new file mode 100644
index 0000000..04ba2a5
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres28.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a/><b/></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres28.xsl b/test/tests/conf/conflictres/conflictres28.xsl
new file mode 100644
index 0000000..e4ccc63
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres28.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Santiago Pericas-Geertsen -->
+  <!-- Purpose: Test explicit priority for "node()", higher than default of -0.5 -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+</xsl:template>
+
+<xsl:template match="node()" priority="0.1">
+  <xsl:text>Matched node() on </xsl:text>
+  <xsl:value-of select="name(.)"/>
+  <xsl:text>;&#10;</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres29.xml b/test/tests/conf/conflictres/conflictres29.xml
new file mode 100644
index 0000000..96b715f
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres29.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a x1="big" x2="bigger"/></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres29.xsl b/test/tests/conf/conflictres/conflictres29.xsl
new file mode 100644
index 0000000..5b7c4f5
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres29.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test conflict of two ways to wildcard attributes. Also assign conflicting priority on a template. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+  <xsl:apply-templates select="@*"/>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Star,</xsl:text>
+</xsl:template>
+
+<xsl:template match="attribute::node()">
+  <xsl:value-of select="name(.)"/><xsl:text>-node(),</xsl:text>
+</xsl:template>
+
+<!-- below is same priority as previous 2 -->
+<xsl:template match="@x2" priority="-0.5">
+  <xsl:text>Found x2 attribute</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres30.xml b/test/tests/conf/conflictres/conflictres30.xml
new file mode 100644
index 0000000..96b715f
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres30.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a x1="big" x2="bigger"/></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres30.xsl b/test/tests/conf/conflictres/conflictres30.xsl
new file mode 100644
index 0000000..41e972e
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres30.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test conflict of two ways to wildcard attributes. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+  <xsl:apply-templates select="@*"/>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Star,</xsl:text>
+</xsl:template>
+
+<xsl:template match="attribute::node()">
+  <xsl:value-of select="name(.)"/><xsl:text>-node(),</xsl:text>
+</xsl:template>
+
+<xsl:template match="@x2">
+  <xsl:text>Found x2 attribute</xsl:text>
+</xsl:template>
+
+<!-- last template wins -->
+<xsl:template match="@*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Star,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres31.xml b/test/tests/conf/conflictres/conflictres31.xml
new file mode 100644
index 0000000..96b715f
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres31.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a x1="big" x2="bigger"/></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres31.xsl b/test/tests/conf/conflictres/conflictres31.xsl
new file mode 100644
index 0000000..72a54d4
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres31.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres31-->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Tom Amiro -->
+  <!-- Purpose: Test system allocated priorities for "*[]". -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<!-- should match because priority is 0.5 -->
+<xsl:template match="*[@x1]">
+  <xsl:text>Correct - Matched "*[@x1]"</xsl:text>
+</xsl:template>
+
+<!-- priority 0 -->
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres32.xml b/test/tests/conf/conflictres/conflictres32.xml
new file mode 100644
index 0000000..90a4d6c
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres32.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a x1="big" /></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres32.xsl b/test/tests/conf/conflictres/conflictres32.xsl
new file mode 100644
index 0000000..cd523fe
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres32.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres32 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Tom Amiro -->
+  <!-- Purpose: Test system allocated priorities for "@*[]". -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>a: </xsl:text>
+  <xsl:apply-templates select="@*" />
+</xsl:template>
+
+<!-- should match because priority is 0.5 -->
+<xsl:template match="@*[name()='x1']">
+  <xsl:text>Correct - Matched "@*[name()='x1']"</xsl:text>
+</xsl:template>
+
+<!-- should not match because priority is 0 -->
+<xsl:template match="@x1">
+  <xsl:text>Matched "@x1"</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres33.xml b/test/tests/conf/conflictres/conflictres33.xml
new file mode 100644
index 0000000..90a4d6c
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres33.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><a x1="big" /></doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres33.xsl b/test/tests/conf/conflictres/conflictres33.xsl
new file mode 100644
index 0000000..c6f42d5
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres33.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres33 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Tom Amiro -->
+  <!-- Purpose: Test system allocated priorities for "node()[]" -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:apply-templates select="a"/>
+  </out>
+</xsl:template>
+
+<!-- system allocated priority  0.5 -->
+<xsl:template match="node()[@x1]" >
+  <xsl:text>Correct - Matched "node()[@x1]" </xsl:text>
+</xsl:template>
+
+<!-- system allocated priority 0 -->
+<xsl:template match="a">
+  <xsl:text>Matched "a" </xsl:text>
+</xsl:template>
+
+<!-- system allocated priority -.5 -->
+<xsl:template match="node()" >
+  <xsl:text>Matched "node()" </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres34.xml b/test/tests/conf/conflictres/conflictres34.xml
new file mode 100644
index 0000000..fdd70f8
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres34.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <?a-pi some data?>
+  <?b-pi some data?>
+  <?b-pi junk?>
+  <?c-pi junk?>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres34.xsl b/test/tests/conf/conflictres/conflictres34.xsl
new file mode 100644
index 0000000..406ce4b
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres34.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres34 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Confirm default priority of 0 for processing-instruction('name') pattern. -->
+  <!-- should see no conflict warnings -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction()" priority="-0.1">
+  <xsl:text>Any-PI:</xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()[.='junk']" priority="0.1">
+  <xsl:text>PI-by-content:</xsl:text><xsl:value-of select="name(.)"/>
+</xsl:template>
+
+<xsl:template match="processing-instruction('b-pi')">
+  <xsl:text>PI-named-b:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres35.xml b/test/tests/conf/conflictres/conflictres35.xml
new file mode 100644
index 0000000..87fd1bf
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres35.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b><c/></b>
+    <b><c><d><e/></d></c></b>
+    <e><c/></e>
+    <e><b><c/></b></e>
+    <e><c><d/></c></e>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres35.xsl b/test/tests/conf/conflictres/conflictres35.xsl
new file mode 100644
index 0000000..fa7c977
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres35.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that pattern a//b is equal priority than a/b, even though
+     it allows more nodes to qualify. -->
+  <!-- should see 2 conflict warnings -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a|c|d|e">
+  <xsl:value-of select="name(.)"/><xsl:text>:</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="a//b">
+  <xsl:value-of select="name(.)"/><xsl:text>-Descendant,</xsl:text>
+</xsl:template>
+
+<xsl:template match="a/b">
+  <xsl:value-of select="name(.)"/><xsl:text>-Child,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres36.xml b/test/tests/conf/conflictres/conflictres36.xml
new file mode 100644
index 0000000..6c3ea1c
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres36.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b><c/></b>
+    <b><d/></b>
+    <d><c/></d>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/conflictres/conflictres36.xsl b/test/tests/conf/conflictres/conflictres36.xsl
new file mode 100644
index 0000000..0a9c947
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres36.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conflictres36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that pattern containing * at one level is equal in priority
+     to one containing * at a lower level. -->
+  <!-- should see 1 conflict warning -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a|b|d">
+  <xsl:value-of select="name(.)"/><xsl:text>:</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="a/*/c">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard-in-middle,&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="a/b/*">
+  <xsl:value-of select="name(.)"/><xsl:text>-Wildcard-last,&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- Suppress whitespace -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/conflictres37.xml b/test/tests/conf/conflictres/conflictres37.xml
new file mode 100755
index 0000000..909cf1b
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres37.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
+  <xf:output form="form1">with form attribute</xf:output>
+  <xf:output>no form attribute</xf:output>
+  <notxf>not in xf namespace</notxf>
+</doc>
diff --git a/test/tests/conf/conflictres/conflictres37.xsl b/test/tests/conf/conflictres/conflictres37.xsl
new file mode 100755
index 0000000..6a45d88
--- /dev/null
+++ b/test/tests/conf/conflictres/conflictres37.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <!-- FileName: conflictres37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.5 -->
+  <!-- Creator: Ilene Seelemann -->
+  <!-- Purpose: Test that qname with predicate has precedence over ncname:*, 
+                which in turn has precedence over * in a match pattern. -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+    xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
+    
+    <xsl:template match="/doc">
+      <out>
+         <xsl:apply-templates/>
+       </out>
+     </xsl:template>
+     <xsl:template match="xf:output[@form]">
+        <OutWithForm>
+           <xsl:value-of select="."/>
+        </OutWithForm>
+     </xsl:template>
+     <xsl:template match="xf:*">
+        <OutWithoutForm>
+        <xsl:value-of select="."/>
+        </OutWithoutForm>
+     </xsl:template>
+     <xsl:template match="*">
+         <General>
+         <xsl:value-of select="."/>
+         </General>
+     </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/k.xsl b/test/tests/conf/conflictres/k.xsl
new file mode 100644
index 0000000..2744246
--- /dev/null
+++ b/test/tests/conf/conflictres/k.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: k -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace. -->
+  <!-- Purpose: Imported by other tests.  -->
+
+<xsl:template match="doc" priority="2.0">
+  <out>
+    <xsl:value-of select="'In Import: Testing '"/>
+    <xsl:for-each select="*">
+      <xsl:value-of select="."/><xsl:text> </xsl:text>		
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/conflictres/l.xsl b/test/tests/conf/conflictres/l.xsl
new file mode 100644
index 0000000..d1f8620
--- /dev/null
+++ b/test/tests/conf/conflictres/l.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<jad:transform xmlns:jad="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<jad:output method="xml"/>
+
+  <!-- FileName: l -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace. -->
+  <!-- Purpose: Included by other tests.  -->
+
+<jad:template match="doc" priority="1.0">
+  <out>
+    <jad:value-of select="'In Include: Testing '"/>
+    <jad:for-each select="*">
+      <jad:value-of select="."/><jad:text> </jad:text>		
+    </jad:for-each>
+  </out>
+</jad:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</jad:transform>
diff --git a/test/tests/conf/copy/copy01.xml b/test/tests/conf/copy/copy01.xml
new file mode 100644
index 0000000..c13b898
--- /dev/null
+++ b/test/tests/conf/copy/copy01.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL>
diff --git a/test/tests/conf/copy/copy01.xsl b/test/tests/conf/copy/copy01.xsl
new file mode 100644
index 0000000..703b6e0
--- /dev/null
+++ b/test/tests/conf/copy/copy01.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for simple identity transformation with template match -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="@*|comment()|processing-instruction()|text()|*">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|comment()|processing-instruction()|text()|*"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy02.xml b/test/tests/conf/copy/copy02.xml
new file mode 100644
index 0000000..4b94689
--- /dev/null
+++ b/test/tests/conf/copy/copy02.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+</OL>
diff --git a/test/tests/conf/copy/copy02.xsl b/test/tests/conf/copy/copy02.xsl
new file mode 100644
index 0000000..0ef3785
--- /dev/null
+++ b/test/tests/conf/copy/copy02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for simple tree copy, in main template via copy-of naming the document element -->                
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="OL"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy03.xml b/test/tests/conf/copy/copy03.xml
new file mode 100644
index 0000000..c13b898
--- /dev/null
+++ b/test/tests/conf/copy/copy03.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL>
diff --git a/test/tests/conf/copy/copy03.xsl b/test/tests/conf/copy/copy03.xsl
new file mode 100644
index 0000000..412923a
--- /dev/null
+++ b/test/tests/conf/copy/copy03.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use identity transformation to put document tree into result tree fragment,
+   then use xsl:copy-of to move to result -->                
+
+<xsl:template match="/">
+  <xsl:variable name="var1">
+    <xsl:apply-templates/>
+  </xsl:variable>
+  <out>
+    <xsl:copy-of select="$var1"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*|comment()|processing-instruction()|text()">
+  <xsl:copy>
+    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy04.xml b/test/tests/conf/copy/copy04.xml
new file mode 100644
index 0000000..ad513d8
--- /dev/null
+++ b/test/tests/conf/copy/copy04.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<fonts>
+<b>
+<font face="Arial">item3</font>
+</b>
+<i>
+<font face="Default Serif" size="18">item4</font>
+</i>
+</fonts>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy04.xsl b/test/tests/conf/copy/copy04.xsl
new file mode 100644
index 0000000..c68153a
--- /dev/null
+++ b/test/tests/conf/copy/copy04.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Purpose: Test for copy-of whole tree via wildcard pattern -->
+  <!-- Creator: Paul Dick -->
+  <!-- This test also checks handling of attributes by copy-of. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy05.xml b/test/tests/conf/copy/copy05.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/copy/copy05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy05.xsl b/test/tests/conf/copy/copy05.xsl
new file mode 100644
index 0000000..b9c2a4d
--- /dev/null
+++ b/test/tests/conf/copy/copy05.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test copy-of a string constant -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="'test'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy06.xml b/test/tests/conf/copy/copy06.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/copy/copy06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy06.xsl b/test/tests/conf/copy/copy06.xsl
new file mode 100644
index 0000000..5953115
--- /dev/null
+++ b/test/tests/conf/copy/copy06.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for copy-of a number -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="32"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy07.xml b/test/tests/conf/copy/copy07.xml
new file mode 100644
index 0000000..1c9e28c
--- /dev/null
+++ b/test/tests/conf/copy/copy07.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<data>
+<histogram misc="0" name="load-times" type="int"/>
+<INPUT type="text" OnDBLClick="retreive( )" testapos="JSFunction('val1','val2')"/> 
+</data>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy07.xsl b/test/tests/conf/copy/copy07.xsl
new file mode 100644
index 0000000..d83f9a9
--- /dev/null
+++ b/test/tests/conf/copy/copy07.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for copying attributes from source to result tree -->                
+
+<xsl:template match="data">
+  <out>
+    <xsl:for-each select="*">
+      <xsl:copy>
+        <xsl:apply-templates select="@*|node()|text()"></xsl:apply-templates>
+      </xsl:copy>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:attribute name="{name(.)}">
+    <xsl:value-of select="."/>
+  </xsl:attribute>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy08.xml b/test/tests/conf/copy/copy08.xml
new file mode 100644
index 0000000..572b67b
--- /dev/null
+++ b/test/tests/conf/copy/copy08.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy08.xsl b/test/tests/conf/copy/copy08.xsl
new file mode 100644
index 0000000..3b5dbfc
--- /dev/null
+++ b/test/tests/conf/copy/copy08.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using values of variables and parameters with xsl:copy-of. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of passing HTML to a named template. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="format">
+      <xsl:with-param name="nodetext">Please <b>BOLD THIS</b> now.</xsl:with-param>
+    </xsl:call-template>
+  </out>		 
+</xsl:template>
+
+<xsl:template name="format">
+  <xsl:param name="nodetext">bla bla bla</xsl:param>
+  <xsl:copy-of select="$nodetext"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy09.xml b/test/tests/conf/copy/copy09.xml
new file mode 100644
index 0000000..05aaebc
--- /dev/null
+++ b/test/tests/conf/copy/copy09.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:ped="http://ped.test.com">
+   <Out xmlns:ns0="http://www.ns0.com" ns0:Attr0="Hello" Attr1="Whatsup" ped:Attr2="Goodbye"/>
+   <Out2 xmlns:bdd="http://bdd.test.com">
+      <Out3 xmlns:jad="http://jad.test.com"/>
+   </Out2>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy09.xsl b/test/tests/conf/copy/copy09.xsl
new file mode 100644
index 0000000..f80a91b
--- /dev/null
+++ b/test/tests/conf/copy/copy09.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for xsl:copy-of with nodeset. Shows handling of namespaces. -->                
+
+<xsl:output indent="yes"/>
+
+<xsl:template match="/">
+  <root>
+    <xsl:apply-templates/>
+  </root>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:copy-of select="*|@*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy10.xml b/test/tests/conf/copy/copy10.xml
new file mode 100644
index 0000000..14ca284
--- /dev/null
+++ b/test/tests/conf/copy/copy10.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<docs>
+  <doc2>
+    <a level="2">
+      <b level="3">3-B2</b>
+      <c level="3">3-C3</c>
+      <d level="3">Hello
+        <e level="4">Success</e>
+        <!-- Me, too -->
+      </d>
+    </a>
+  </doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy10.xsl b/test/tests/conf/copy/copy10.xsl
new file mode 100644
index 0000000..cd625b1
--- /dev/null
+++ b/test/tests/conf/copy/copy10.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use copy-of to put a tree fragment under an element. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="docs//d"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy11.xml b/test/tests/conf/copy/copy11.xml
new file mode 100644
index 0000000..e565a36
--- /dev/null
+++ b/test/tests/conf/copy/copy11.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<docs>
+  <d level="1"><!-- doc1 --></d>
+  <doc2>
+    <a level="2">
+      <b level="3">3-B2</b>
+      <c level="3">3-C3</c>
+      <d level="3">Hello
+        <e level="4">Success</e>
+        <!-- Me, too -->
+      </d>
+    </a>
+    <d level="2">More</d>
+  </doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy11.xsl b/test/tests/conf/copy/copy11.xsl
new file mode 100644
index 0000000..1eee463
--- /dev/null
+++ b/test/tests/conf/copy/copy11.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use copy-of to put a non-tree node-set under an element. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="docs//d"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy12.xml b/test/tests/conf/copy/copy12.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/copy/copy12.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy12.xsl b/test/tests/conf/copy/copy12.xsl
new file mode 100644
index 0000000..9b93e55
--- /dev/null
+++ b/test/tests/conf/copy/copy12.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 1999116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for copy-of with boolean constant -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="true()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy13.xml b/test/tests/conf/copy/copy13.xml
new file mode 100644
index 0000000..480341c
--- /dev/null
+++ b/test/tests/conf/copy/copy13.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <b>
+    <!-- set a font this time -->
+    <font face="Arial">item3</font>
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy13.xsl b/test/tests/conf/copy/copy13.xsl
new file mode 100644
index 0000000..e66c66e
--- /dev/null
+++ b/test/tests/conf/copy/copy13.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for copy-of with '*' wildcard pattern -->
+  <!-- This test also checks handling of comments by copy-of. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy14.xml b/test/tests/conf/copy/copy14.xml
new file mode 100644
index 0000000..30ccc72
--- /dev/null
+++ b/test/tests/conf/copy/copy14.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <b>
+    <?a-pi some data?>
+    <font face="Arial">item3</font>
+  </b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy14.xsl b/test/tests/conf/copy/copy14.xsl
new file mode 100644
index 0000000..0051db7
--- /dev/null
+++ b/test/tests/conf/copy/copy14.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for copy-of with '*' wildcard pattern -->
+  <!-- This test also checks handling of processing instructions by copy-of. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy15.xml b/test/tests/conf/copy/copy15.xml
new file mode 100644
index 0000000..c59d80f
--- /dev/null
+++ b/test/tests/conf/copy/copy15.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>yes1</LI>
+    <LI>me2</LI>
+    <OL>
+      <LI>subsubitem</LI>
+    </OL>
+  </OL>
+</OL>
diff --git a/test/tests/conf/copy/copy15.xsl b/test/tests/conf/copy/copy15.xsl
new file mode 100644
index 0000000..2bd42eb
--- /dev/null
+++ b/test/tests/conf/copy/copy15.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for-each inside xsl:copy -->                
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy>
+      <xsl:for-each select="OL/OL/LI">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:copy>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy16.xml b/test/tests/conf/copy/copy16.xml
new file mode 100644
index 0000000..00f6182
--- /dev/null
+++ b/test/tests/conf/copy/copy16.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE main [
+  <!ELEMENT main (a|b)*>
+  <!ELEMENT a (#PCDATA)>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA)>
+]>
+<main>
+  <a id="w">W</a>
+  <a id="x">X</a>
+  <a id="y">Y</a>
+  <a id="z">Z</a>
+  <b>y</b>
+  <b>w</b>
+  <b>x</b>
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy16.xsl b/test/tests/conf/copy/copy16.xsl
new file mode 100644
index 0000000..54de97e
--- /dev/null
+++ b/test/tests/conf/copy/copy16.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use id(node-set) to try to create a set of nodes in random order.
+      Either id() or xsl:copy is arranging them in document order. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy>
+      <xsl:apply-templates select="id(main/b)"/>
+    </xsl:copy>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy17.xml b/test/tests/conf/copy/copy17.xml
new file mode 100644
index 0000000..c13b898
--- /dev/null
+++ b/test/tests/conf/copy/copy17.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL>
diff --git a/test/tests/conf/copy/copy17.xsl b/test/tests/conf/copy/copy17.xsl
new file mode 100644
index 0000000..7ba1a64
--- /dev/null
+++ b/test/tests/conf/copy/copy17.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Purpose: Test for identity transformation exactly as in spec. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="@*|node()">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy18.xml b/test/tests/conf/copy/copy18.xml
new file mode 100644
index 0000000..884fad7
--- /dev/null
+++ b/test/tests/conf/copy/copy18.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<TEST RELEASE="R6.0">
+  <ELEMENT x="100000"/>
+  <ELEMENT x="2" y="3" z="4"/>
+  <ELEMENT x="33333"/>
+</TEST>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy18.xsl b/test/tests/conf/copy/copy18.xsl
new file mode 100644
index 0000000..b332f0e
--- /dev/null
+++ b/test/tests/conf/copy/copy18.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: copy18 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 1999116 -->
+<!-- Section: 11.3 -->
+<!-- Creator: Gertjan van Son -->
+<!-- Purpose: Test for copy-of with union of attribute nodes. -->
+
+<xsl:template match="TEST">
+   <xsl:element name="out">
+      <xsl:apply-templates/>
+   </xsl:element>
+</xsl:template>
+
+<xsl:template match="ELEMENT">
+   <xsl:element name="item">
+      <xsl:copy-of select="@x|@z"/>
+   </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy19.xml b/test/tests/conf/copy/copy19.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/copy/copy19.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy19.xsl b/test/tests/conf/copy/copy19.xsl
new file mode 100644
index 0000000..129f9fc
--- /dev/null
+++ b/test/tests/conf/copy/copy19.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!DOCTYPE HTMLlat1 SYSTEM "htmllat1.dtd">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test copy-of a string constant containing character entity -->
+
+<xsl:output method="xml" encoding="ISO-8859-1"/>
+<!-- With this output encoding, should get one byte of xE8 for the &egrave -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="'abcd&egrave;fgh'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy20.xml b/test/tests/conf/copy/copy20.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/copy/copy20.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy20.xsl b/test/tests/conf/copy/copy20.xsl
new file mode 100644
index 0000000..55ef85e
--- /dev/null
+++ b/test/tests/conf/copy/copy20.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!DOCTYPE HTMLlat1 SYSTEM "htmllat1.dtd">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test copy-of a string constant containing character entity -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+<!-- With this output encoding, should get two bytes (xC3,xA6) for the &aelig -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="'abcd&aelig;fgh'"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy21.xml b/test/tests/conf/copy/copy21.xml
new file mode 100644
index 0000000..0c0bc74
--- /dev/null
+++ b/test/tests/conf/copy/copy21.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" standalone="no" ?>
+<!DOCTYPE test [
+  <!ELEMENT test (extEnt)>
+  <!ELEMENT extEnt (sub2)> 
+  <!ATTLIST extEnt attr CDATA #REQUIRED>
+  <!ELEMENT sub2 (#PCDATA)> 
+  <!ENTITY extEnt SYSTEM "ent21.xml">
+  ]>
+
+<test>&extEnt;</test>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy21.xsl b/test/tests/conf/copy/copy21.xsl
new file mode 100644
index 0000000..7f13e07
--- /dev/null
+++ b/test/tests/conf/copy/copy21.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Creator: David Marston -->
+  <!-- Section: 7.5 -->
+  <!-- Purpose: Ensure that external entity reference works in copy. -->
+
+<xsl:template match="@*|node()">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy22.xml b/test/tests/conf/copy/copy22.xml
new file mode 100644
index 0000000..9a72179
--- /dev/null
+++ b/test/tests/conf/copy/copy22.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<!DOCTYPE test [ 
+  <!ELEMENT test (#PCDATA)> 
+  <!ENTITY extEnt SYSTEM "ent22.xml">
+  ]>
+
+<test>abcd&extEnt;fgh</test>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy22.xsl b/test/tests/conf/copy/copy22.xsl
new file mode 100644
index 0000000..576a9dc
--- /dev/null
+++ b/test/tests/conf/copy/copy22.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Creator: David Marston -->
+  <!-- Section: 7.5 -->
+  <!-- Purpose: Ensure that external entity reference with high-byte character works in copy. -->
+
+<xsl:output method="xml" encoding="ISO-8859-1"/>
+<!-- With this output encoding, should get one byte of xBE for the &frac34 -->
+
+<xsl:template match="@*|node()">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy23.xml b/test/tests/conf/copy/copy23.xml
new file mode 100644
index 0000000..7e8da02
--- /dev/null
+++ b/test/tests/conf/copy/copy23.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <simple>abcde</simple>
+  <coded>ab<![CDATA[<P>&nbsp;</P>]]>de</coded>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy23.xsl b/test/tests/conf/copy/copy23.xsl
new file mode 100644
index 0000000..e2cc765
--- /dev/null
+++ b/test/tests/conf/copy/copy23.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Purpose: Test for copy-of text nodes including CDATA. -->
+  <!-- Creator: David Marston -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="doc"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy24.xml b/test/tests/conf/copy/copy24.xml
new file mode 100644
index 0000000..c3e9dc5
--- /dev/null
+++ b/test/tests/conf/copy/copy24.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<?a-pi some data?>
+<?pi-2 another?>
+<doc><!-- This is a comment -->
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy24.xsl b/test/tests/conf/copy/copy24.xsl
new file mode 100644
index 0000000..4cc7fa5
--- /dev/null
+++ b/test/tests/conf/copy/copy24.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: Myriam Midy -->
+  <!-- Purpose: Test for processing-instruction() node-test in copy-of. -->
+
+<!-- should say "Found-pi,,Found-pi" -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="./processing-instruction('a-pi')"/><xsl:text>...
+</xsl:text>
+    <xsl:copy-of select="./processing-instruction()"/><xsl:text>...
+</xsl:text>
+    <xsl:copy-of select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy25.xml b/test/tests/conf/copy/copy25.xml
new file mode 100644
index 0000000..edcec07
--- /dev/null
+++ b/test/tests/conf/copy/copy25.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<main>
+  <a attr="w">
+    <b>
+      <c dim="h">
+        <d size="l"/>
+      </c>
+    </b>
+  </a>
+  <size for="d" h="17" />
+  <size for="e" h="27" />
+  <size for="d" w="37" />
+  <size for="e" w="47" />
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy25.xsl b/test/tests/conf/copy/copy25.xsl
new file mode 100644
index 0000000..a6b8376
--- /dev/null
+++ b/test/tests/conf/copy/copy25.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Accumulate attributes from several places in the source. -->
+
+<xsl:output method="xml" encoding="UTF-8" />
+
+<xsl:template match="/">
+  <out>
+    <a>
+      <!-- first, get all attribute nodes under the 'a' node in the source -->
+      <xsl:for-each select="main/a/descendant-or-self::*/@*">
+        <xsl:copy/>
+      </xsl:for-each>
+      <!-- next, get an attribute node from elsewhere -->
+      <xsl:for-each select="main/size[@for='d']">
+        <xsl:apply-templates select="@h | @w"/>
+      </xsl:for-each>
+    </a>
+  </out>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:copy/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy26.xml b/test/tests/conf/copy/copy26.xml
new file mode 100644
index 0000000..09f1354
--- /dev/null
+++ b/test/tests/conf/copy/copy26.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<inc>
+  <list>
+    <node1>foo1</node1>
+    <node2>foo2</node2>
+    <node3>foo3</node3>
+  </list>
+  <node1>bar1</node1>
+  <node2>bar2</node2>
+  <node4 ax="by+c">bar4</node4>
+</inc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy26.xsl b/test/tests/conf/copy/copy26.xsl
new file mode 100644
index 0000000..f7ce02b
--- /dev/null
+++ b/test/tests/conf/copy/copy26.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
+
+  <!-- FileName: copy26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Bob Morris -->
+  <!-- Purpose: Should be able to copy the same tree fragment twice in succession. -->
+
+<xsl:template match="/">
+  <xsl:variable name ="theNode" select="//inc/node4"/>
+  <out>
+    <xsl:copy-of select="$theNode"/>
+    <xsl:copy-of select="$theNode"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy27.xml b/test/tests/conf/copy/copy27.xml
new file mode 100644
index 0000000..0254aec
--- /dev/null
+++ b/test/tests/conf/copy/copy27.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy27.xsl b/test/tests/conf/copy/copy27.xsl
new file mode 100644
index 0000000..7821f3f
--- /dev/null
+++ b/test/tests/conf/copy/copy27.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
+
+  <!-- FileName: copy27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Oliver Becker -->
+  <!-- Purpose: Demonstrate copying a named template from the stylesheet
+    into the result. From a thread on XSL-list 7/30/2001. -->
+
+<xsl:template name="qq">
+  <node attr="8"/>
+</xsl:template>
+ 
+<xsl:template match="/">
+  <results>
+    <usual-result>
+      <xsl:call-template name="qq"/>
+    </usual-result>
+    <xsl:text>&#10;</xsl:text>
+    <exotic-result>
+      <xsl:copy-of select="document('')/*/xsl:template[@name='qq']/node()" />
+    </exotic-result>
+  </results>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy28.xml b/test/tests/conf/copy/copy28.xml
new file mode 100644
index 0000000..e7b7883
--- /dev/null
+++ b/test/tests/conf/copy/copy28.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <simple>abcde</simple>
+  <empty/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy28.xsl b/test/tests/conf/copy/copy28.xsl
new file mode 100644
index 0000000..6ff7e85
--- /dev/null
+++ b/test/tests/conf/copy/copy28.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Purpose: Test for copy-of an empty node. -->
+  <!-- Creator: David Marston -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="doc"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy29.xml b/test/tests/conf/copy/copy29.xml
new file mode 100644
index 0000000..3f0b88c
--- /dev/null
+++ b/test/tests/conf/copy/copy29.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc name="foo">
+  <!-- This is a comment -->
+    test<![CDATA[<]]> 
+  <?a-pi some data?>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy29.xsl b/test/tests/conf/copy/copy29.xsl
new file mode 100644
index 0000000..77a52a0
--- /dev/null
+++ b/test/tests/conf/copy/copy29.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 current() -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: current() should work in copy-of. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="."/>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:copy-of select="current()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy30.xml b/test/tests/conf/copy/copy30.xml
new file mode 100644
index 0000000..1f6b797
--- /dev/null
+++ b/test/tests/conf/copy/copy30.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<docs>
+  <doc1>
+    <a level="1" origin="house">1a1</a>
+    <a level="1" origin="Albany">1a2</a>
+    <doc1supplement>
+      <a level="1" origin="Austin">1xa1</a>
+    </doc1supplement>
+  </doc1>
+  <doc2>
+    <a level="2" origin="Baltimore">2a1</a>
+    <b level="2" origin="Albany">2b1</b>
+    <a level="2" origin="Portland">2a2</a>
+    <a level="2" origin="Albany">2a3</a>
+    <doc2supplement>
+      <a level="3" origin="Chicago">2xa1</a>
+      <a level="3" origin="Albany">2xa2</a>
+      <a level="3" origin="Albany">2xa3</a>
+      <d level="3" origin="Albany">2xd1</d>
+    </doc2supplement>
+  </doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy30.xsl b/test/tests/conf/copy/copy30.xsl
new file mode 100644
index 0000000..bc3b72e
--- /dev/null
+++ b/test/tests/conf/copy/copy30.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use key() to try to create a set of nodes in random order. -->
+
+<xsl:key name="k" use="@origin" match="a" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="key('k','Albany')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy31.xml b/test/tests/conf/copy/copy31.xml
new file mode 100644
index 0000000..123d0e7
--- /dev/null
+++ b/test/tests/conf/copy/copy31.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:ped="http://ped.test.com">
+  <Out xmlns:ns0="http://www.ns0.com" ns0:Attr0="Hello" Attr1="Whatsup" ped:Attr2="Goodbye"/>
+  <Out2 xmlns:bdd="http://bdd.test.com"/><!-- Unused namespace decl -->
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy31.xsl b/test/tests/conf/copy/copy31.xsl
new file mode 100644
index 0000000..3001578
--- /dev/null
+++ b/test/tests/conf/copy/copy31.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy31 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:copy with nodeset. Shows handling of namespaces. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match='node()|@*'>
+  <xsl:copy>
+    <xsl:apply-templates select='node()|@*'/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy32.xml b/test/tests/conf/copy/copy32.xml
new file mode 100644
index 0000000..f82a9dd
--- /dev/null
+++ b/test/tests/conf/copy/copy32.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- Comment-1 -->
+<far-north> Level-1
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center>
+           <near-south-west/>
+		   <!-- Comment-5 -->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!-- Comment-6 -->   Level-6
+		      <?a-pi pi-6?>
+	      <south attr1="First" attr2="Last">
+              </south>
+           </near-south>
+        </center>
+     </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/conf/copy/copy32.xsl b/test/tests/conf/copy/copy32.xsl
new file mode 100644
index 0000000..2f23507
--- /dev/null
+++ b/test/tests/conf/copy/copy32.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy32 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Make each comment be the current node, and copy it. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//comment()">
+      <xsl:copy/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy33.xml b/test/tests/conf/copy/copy33.xml
new file mode 100644
index 0000000..f82a9dd
--- /dev/null
+++ b/test/tests/conf/copy/copy33.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- Comment-1 -->
+<far-north> Level-1
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center>
+           <near-south-west/>
+		   <!-- Comment-5 -->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!-- Comment-6 -->   Level-6
+		      <?a-pi pi-6?>
+	      <south attr1="First" attr2="Last">
+              </south>
+           </near-south>
+        </center>
+     </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/conf/copy/copy33.xsl b/test/tests/conf/copy/copy33.xsl
new file mode 100644
index 0000000..e6e5e4b
--- /dev/null
+++ b/test/tests/conf/copy/copy33.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy33 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Make each PI be the current node, and copy it. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//processing-instruction()">
+      <xsl:copy/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy34.xml b/test/tests/conf/copy/copy34.xml
new file mode 100644
index 0000000..e6a9943
--- /dev/null
+++ b/test/tests/conf/copy/copy34.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <OL place="inner">
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+  </OL>
+</OL>
diff --git a/test/tests/conf/copy/copy34.xsl b/test/tests/conf/copy/copy34.xsl
new file mode 100644
index 0000000..524a3f7
--- /dev/null
+++ b/test/tests/conf/copy/copy34.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy34 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Make an RTF of the whole doc and watch for incorrect xml-decl placement. -->
+
+<xsl:template match="/">
+  <xsl:variable name="var1">
+    <xsl:apply-templates/>
+  </xsl:variable>
+  <out>
+    <xsl:copy-of select="$var1"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*|comment()|processing-instruction()|text()">
+  <xsl:copy>
+    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy35.xml b/test/tests/conf/copy/copy35.xml
new file mode 100644
index 0000000..e6a9943
--- /dev/null
+++ b/test/tests/conf/copy/copy35.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <OL place="inner">
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+  </OL>
+</OL>
diff --git a/test/tests/conf/copy/copy35.xsl b/test/tests/conf/copy/copy35.xsl
new file mode 100644
index 0000000..1216d59
--- /dev/null
+++ b/test/tests/conf/copy/copy35.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Make a node-set of the whole doc and watch for incorrect xml-decl placement. -->
+
+<xsl:template match="/">
+  <xsl:variable name="var1">
+    <xsl:apply-templates/>
+  </xsl:variable>
+  <out>
+    <xsl:copy-of select="$var1"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*|comment()|processing-instruction()|text()">
+  <xsl:copy>
+    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy36.xml b/test/tests/conf/copy/copy36.xml
new file mode 100644
index 0000000..76dead4
--- /dev/null
+++ b/test/tests/conf/copy/copy36.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Leave line-breaks as-is -->
+<OUTLINE xmlns:xlink="http://www.w3.org/1999/xlink"><NODE type="book" 
+xlink:href="hello.htm" xlink:type="simple"><LABEL>Hello, world!
+</LABEL></NODE></OUTLINE>
diff --git a/test/tests/conf/copy/copy36.xsl b/test/tests/conf/copy/copy36.xsl
new file mode 100644
index 0000000..9d73837
--- /dev/null
+++ b/test/tests/conf/copy/copy36.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 Copying -->
+  <!-- Creator: <Jochen.Schwarze@cit.de> -->
+  <!-- Purpose: Use prefixed attributes with no preceding text nodes. -->
+
+<xsl:template match="@*|node()">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy37.xml b/test/tests/conf/copy/copy37.xml
new file mode 100644
index 0000000..bec4bf3
--- /dev/null
+++ b/test/tests/conf/copy/copy37.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" ?>
+<lot>
+  <car color="red" make="honda">
+    <plate>HJU-789</plate>
+  </car>
+  <car color="silver" make="honda">
+    <plate>HXU-000</plate>
+  </car>
+  <car color="black" make="honda">
+    <plate>ZXU-040</plate>
+  </car>
+</lot>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy37.xsl b/test/tests/conf/copy/copy37.xsl
new file mode 100644
index 0000000..a2446a9
--- /dev/null
+++ b/test/tests/conf/copy/copy37.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+  <!-- FileName: copy37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: Tom Amiro -->
+  <!-- Purpose: Look for bug in building union for identity transform. -->
+
+<xsl:template match="/lot">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*|@*|comment()|processing-instruction()|text()">
+  <xsl:copy>
+    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy38.xml b/test/tests/conf/copy/copy38.xml
new file mode 100644
index 0000000..91bba15
--- /dev/null
+++ b/test/tests/conf/copy/copy38.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" ?>
+<results group="A">
+  <match>
+    <date>10-Jun-98</date>
+    <team score="2">Brazil</team>
+    <team score="1">Scotland</team>
+  </match>
+  <match>
+    <date>10-Jun-98</date>
+    <team score="2">Morocco</team>
+    <team score="2">Norway</team>
+  </match>
+  <match>
+    <date>16-Jun-98</date>
+    <team score="1">Scotland</team>
+    <team score="1">Norway</team>
+  </match>
+  <match>
+    <date>16-Jun-98</date>
+    <team score="3">Brazil</team>
+    <team score="0">Morocco</team>
+  </match>
+  <match>
+    <date>23-Jun-98</date>
+    <team score="1">Brazil</team>
+    <team score="2">Norway</team>
+  </match>
+  <match>
+    <date>23-Jun-98</date>
+    <team score="0">Scotland</team>
+    <team score="3">Morocco</team>
+  </match>
+</results>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy38.xsl b/test/tests/conf/copy/copy38.xsl
new file mode 100644
index 0000000..816d97d
--- /dev/null
+++ b/test/tests/conf/copy/copy38.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: copy38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Michael Kay -->
+  <!-- Purpose: Using copy-of for repeated output of an RTF (HTML output) -->
+
+  <!-- Source Attribution: This test was written by Michael Kay and is taken from
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved.
+       Now updated in the second edition (ISBN 1-861005-06-7), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or transmitted
+       in any form or by any means - electronic, electrostatic, mechanical, photocopying,
+       recording or otherwise - without the prior written permission of the publisher,
+       except in the case of brief quotations embodied in critical articles or reviews. -->
+  <!-- Origin: copy-of/soccer.xml, copy-of/soccer.xsl, Chapter/Page: 4-185, was MK015 before -->
+
+<xsl:output method="html" indent="no"/>
+
+<xsl:variable name="table-heading">
+  <tr>
+    <td><b>Date</b></td>
+    <td><b>Home Team</b></td>
+    <td><b>Away Team</b></td>
+    <td><b>Result</b></td>
+  </tr>
+</xsl:variable>
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <h1>Matches in Group <xsl:value-of select="/*/@group"/></h1>
+
+      <xsl:for-each select="//match">
+
+        <h2><xsl:value-of select="concat(team[1], ' versus ', team[2])"/></h2>
+
+        <table border="1">
+          <xsl:copy-of select="$table-heading"/><!-- This is the test! -->
+          <tr>
+            <td><xsl:value-of select="date"/>&#xa0;</td>
+            <td><xsl:value-of select="team[1]"/>&#xa0;</td>
+            <td><xsl:value-of select="team[2]"/>&#xa0;</td>
+            <td><xsl:value-of select="concat(team[1]/@score, '-', team[2]/@score)"/>&#xa0;</td>
+          </tr>
+        </table>
+      </xsl:for-each>
+    </body>
+  </html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy39.xml b/test/tests/conf/copy/copy39.xml
new file mode 100644
index 0000000..c13b898
--- /dev/null
+++ b/test/tests/conf/copy/copy39.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL>
diff --git a/test/tests/conf/copy/copy39.xsl b/test/tests/conf/copy/copy39.xsl
new file mode 100644
index 0000000..c9a02aa
--- /dev/null
+++ b/test/tests/conf/copy/copy39.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy39 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Another style of identity transform, where attributes are copied
+   by copy-of rather than by recursive use of the template. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates select="node()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy40.xml b/test/tests/conf/copy/copy40.xml
new file mode 100644
index 0000000..1f6b797
--- /dev/null
+++ b/test/tests/conf/copy/copy40.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<docs>
+  <doc1>
+    <a level="1" origin="house">1a1</a>
+    <a level="1" origin="Albany">1a2</a>
+    <doc1supplement>
+      <a level="1" origin="Austin">1xa1</a>
+    </doc1supplement>
+  </doc1>
+  <doc2>
+    <a level="2" origin="Baltimore">2a1</a>
+    <b level="2" origin="Albany">2b1</b>
+    <a level="2" origin="Portland">2a2</a>
+    <a level="2" origin="Albany">2a3</a>
+    <doc2supplement>
+      <a level="3" origin="Chicago">2xa1</a>
+      <a level="3" origin="Albany">2xa2</a>
+      <a level="3" origin="Albany">2xa3</a>
+      <d level="3" origin="Albany">2xd1</d>
+    </doc2supplement>
+  </doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy40.xsl b/test/tests/conf/copy/copy40.xsl
new file mode 100644
index 0000000..9f0043d
--- /dev/null
+++ b/test/tests/conf/copy/copy40.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy40 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use key() to get nodes from various places, then copy and mark. -->
+
+<xsl:key name="k" use="@origin" match="a" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="key('k','Albany')">
+      <xsl:copy>
+        <xsl:copy-of select="@level"/>
+        <xsl:attribute name="data"><!-- Mark copied 'a' nodes with their data -->
+          <xsl:value-of select="text()"/>
+        </xsl:attribute>
+      </xsl:copy><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy41.xml b/test/tests/conf/copy/copy41.xml
new file mode 100644
index 0000000..5a603cd
--- /dev/null
+++ b/test/tests/conf/copy/copy41.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <!-- XYZ -->
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy41.xsl b/test/tests/conf/copy/copy41.xsl
new file mode 100644
index 0000000..e39194a
--- /dev/null
+++ b/test/tests/conf/copy/copy41.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY41 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to copy a comment before there is any element produced. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="doc/comment()"/>
+  <out/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy42.xml b/test/tests/conf/copy/copy42.xml
new file mode 100644
index 0000000..02dd96e
--- /dev/null
+++ b/test/tests/conf/copy/copy42.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<doc>
+  <part1>
+    <a2 pick="yes">
+      <a3 x="a3-1" ordering="7">
+        <a4 x="a4-1">7</a4>
+      </a3>
+      <a3 x="a3-2" ordering="3">
+        <a4 x="a4-2">3</a4>
+      </a3>
+      <a3 x="a3-3" ordering="9">
+        <a4 x="a4-3">9</a4>
+      </a3>
+    </a2>
+    <a2 pick="no">
+      <a3 x="a3-4" ordering="0">
+        <a4 x="a4-4">0</a4>
+      </a3>
+    </a2>
+  </part1>
+  <part2>
+    <a2 pick="yes">
+      <a3 x="a3-5" ordering="2">
+        <a4 x="a4-5">2</a4>
+      </a3>
+      <a3 x="a3-6" ordering="8">
+        <a4 x="a4-6">8</a4>
+        <a4 x="a4-7">8x</a4>
+      </a3>
+      <a3 x="a3-7" ordering="5">
+        <a4 x="a4-8">5</a4>
+      </a3>
+    </a2>
+    <a2 pick="no">
+      <a3 x="a3-8" ordering="0">
+        <a4 x="a4-9">0</a4>
+      </a3>
+    </a2>
+  </part2>
+</doc>
diff --git a/test/tests/conf/copy/copy42.xsl b/test/tests/conf/copy/copy42.xsl
new file mode 100644
index 0000000..bbe75c1
--- /dev/null
+++ b/test/tests/conf/copy/copy42.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy42 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Demonstrate sorting of tree fragments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="doc//a3[../@pick='yes']">
+      <xsl:sort select="@ordering" data-type="number"/>
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy43.xml b/test/tests/conf/copy/copy43.xml
new file mode 100644
index 0000000..c13b898
--- /dev/null
+++ b/test/tests/conf/copy/copy43.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OL>
+  <LI>item1</LI>
+  <LI attrib="2">item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI attrib="2">subitem2</LI>
+    <!-- Now go deeper -->
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+  <?a-pi some data?>
+</OL>
diff --git a/test/tests/conf/copy/copy43.xsl b/test/tests/conf/copy/copy43.xsl
new file mode 100644
index 0000000..98efbe4
--- /dev/null
+++ b/test/tests/conf/copy/copy43.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy43 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Copy the whole input tree to non-root position in output.
+     "a root node is copied by copying its children" -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="/" />
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy44.xml b/test/tests/conf/copy/copy44.xml
new file mode 100644
index 0000000..53a6d19
--- /dev/null
+++ b/test/tests/conf/copy/copy44.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc xmlns:foo="http://foo.test.com">
+  <bar xmlns:yow="http://yow.test.com">18 Generic Ave.</bar>
+  <foo:bar>157 Fourth St.</foo:bar>
+  <wonder:bar xmlns:wonder="http://wonder.com">777 Broadway</wonder:bar>
+  <bar xmlns:huh="http://unknown.com">12 Slammin Ave.</bar>
+  <joes:bar xmlns:joes="http://joes.com">17 Generic Ave.</joes:bar>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy44.xsl b/test/tests/conf/copy/copy44.xsl
new file mode 100644
index 0000000..6afd890
--- /dev/null
+++ b/test/tests/conf/copy/copy44.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:foo="http://foo.test.com"
+    xmlns:joes="http://joes.com">
+
+  <!-- FileName: copy44 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Introduce namespace nodes through copy-of (i.e., no earlier reference). -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <union>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:copy-of select="bar | joes:bar" />
+  </union>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy45.xml b/test/tests/conf/copy/copy45.xml
new file mode 100644
index 0000000..572b67b
--- /dev/null
+++ b/test/tests/conf/copy/copy45.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy45.xsl b/test/tests/conf/copy/copy45.xsl
new file mode 100644
index 0000000..b647edf
--- /dev/null
+++ b/test/tests/conf/copy/copy45.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy45 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Make an RTF on the fly and watch for incorrect xml-decl placement. -->
+
+<xsl:output method="xml" encoding="UTF-8" standalone="yes" />
+
+<xsl:template match="/">
+  <xsl:variable name="var1"><rtf>abc<in x="yz">def</in>ghi</rtf></xsl:variable>
+  <out>
+    <xsl:copy-of select="$var1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy46.xml b/test/tests/conf/copy/copy46.xml
new file mode 100644
index 0000000..53a6d19
--- /dev/null
+++ b/test/tests/conf/copy/copy46.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc xmlns:foo="http://foo.test.com">
+  <bar xmlns:yow="http://yow.test.com">18 Generic Ave.</bar>
+  <foo:bar>157 Fourth St.</foo:bar>
+  <wonder:bar xmlns:wonder="http://wonder.com">777 Broadway</wonder:bar>
+  <bar xmlns:huh="http://unknown.com">12 Slammin Ave.</bar>
+  <joes:bar xmlns:joes="http://joes.com">17 Generic Ave.</joes:bar>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy46.xsl b/test/tests/conf/copy/copy46.xsl
new file mode 100644
index 0000000..be896d2
--- /dev/null
+++ b/test/tests/conf/copy/copy46.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:foo="http://foo.test.com"
+    xmlns:joes="http://joes.com"
+    xmlns:huh="http://unknown.com">
+
+  <!-- FileName: copy46 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Introduce namespace nodes through copy-of where select ignores namespace. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <star>
+    <xsl:copy-of select="*[local-name()='bar']" />
+  </star>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy47.xml b/test/tests/conf/copy/copy47.xml
new file mode 100644
index 0000000..aa07579
--- /dev/null
+++ b/test/tests/conf/copy/copy47.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc xmlns:foo="http://foo.test.com">
+  <bar>18 Generic Ave.</bar>
+  <foo:bar>157 Fourth St.</foo:bar>
+  <wonder:bar xmlns:wonder="http://wonder.com">777 Broadway</wonder:bar>
+  <bar xmlns:huh="http://unknown.com">12 Slammin Ave.</bar>
+  <joes:bar xmlns:joes="http://joes.com">17 Generic Ave.</joes:bar>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy47.xsl b/test/tests/conf/copy/copy47.xsl
new file mode 100644
index 0000000..c8f3c24
--- /dev/null
+++ b/test/tests/conf/copy/copy47.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:foo="http://foo.test.com"
+    xmlns:huh="http://unknown.com"
+    exclude-result-prefixes="huh">
+
+  <!-- FileName: copy47 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 (and 11.3) -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that exclude-result-prefixes doesn't affect copy-of. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <union>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:copy-of select="bar | foo:bar" />
+  </union>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy48.xml b/test/tests/conf/copy/copy48.xml
new file mode 100644
index 0000000..aa07579
--- /dev/null
+++ b/test/tests/conf/copy/copy48.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc xmlns:foo="http://foo.test.com">
+  <bar>18 Generic Ave.</bar>
+  <foo:bar>157 Fourth St.</foo:bar>
+  <wonder:bar xmlns:wonder="http://wonder.com">777 Broadway</wonder:bar>
+  <bar xmlns:huh="http://unknown.com">12 Slammin Ave.</bar>
+  <joes:bar xmlns:joes="http://joes.com">17 Generic Ave.</joes:bar>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy48.xsl b/test/tests/conf/copy/copy48.xsl
new file mode 100644
index 0000000..467d11c
--- /dev/null
+++ b/test/tests/conf/copy/copy48.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:foo="http://foo.test.com"
+    xmlns:joes="http://joes.com"
+    exclude-result-prefixes="foo">
+
+  <!-- FileName: copy48 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 (and 11.3) -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Unusual effect: "foo" is in effect on each copied node, but excluded from LREs "out" and "union". -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <union>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:copy-of select="joes:bar | foo:bar" />
+  </union>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy49.xml b/test/tests/conf/copy/copy49.xml
new file mode 100755
index 0000000..baf4d05
--- /dev/null
+++ b/test/tests/conf/copy/copy49.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc id="1" class="mobile" xml:lang="en" >
+<text>Sample text</text>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy49.xsl b/test/tests/conf/copy/copy49.xsl
new file mode 100755
index 0000000..3a66155
--- /dev/null
+++ b/test/tests/conf/copy/copy49.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: copy49 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: Tony Pentinnen -->
+  <!-- Purpose: Verify xml:lang attributes can be copied from source to result -->
+
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+
+<xsl:template match="doc">
+  <document>
+    <xsl:copy-of select="@*" />
+  </document>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy50.xml b/test/tests/conf/copy/copy50.xml
new file mode 100644
index 0000000..d3450df
--- /dev/null
+++ b/test/tests/conf/copy/copy50.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test test="test">
+  <test2 test2="test2">
+    <test3 test3="test3"/>
+  </test2>
+</test>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy50.xsl b/test/tests/conf/copy/copy50.xsl
new file mode 100644
index 0000000..dc65f66
--- /dev/null
+++ b/test/tests/conf/copy/copy50.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY50 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Joerg Heinicke (joerg.heinicke@gmx.de) -->
+  <!-- Purpose: Attribute encountered before first copied node must not be copied. -->
+  <!-- Discretionary: add-attribute-to-non-element="ignore" -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="test">
+  <xsl:copy-of select="*|@*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy51.xml b/test/tests/conf/copy/copy51.xml
new file mode 100644
index 0000000..331a171
--- /dev/null
+++ b/test/tests/conf/copy/copy51.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<a:root xmlns:a="name-a">
+  <b:sub xmlns:b="name-b"/>
+  <c:sub xmlns:c="name-c"/>
+</a:root>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy51.xsl b/test/tests/conf/copy/copy51.xsl
new file mode 100644
index 0000000..56923c4
--- /dev/null
+++ b/test/tests/conf/copy/copy51.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:target="name-b"
+    exclude-result-prefixes="target"
+    version="1.0">
+
+  <!-- FileName: copy51 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:copy on namespaces referenced directly. -->
+  <!-- Elaboration: while namespace::* will include the implied declaration for
+    The XML Namespace, it's not appropriate to serialize it as an explicit declaration.
+    XML output from here could be pipelined to some other process that wants the XML
+    namespace to be implicit only. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select=".//target:sub"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="target:sub">
+  <xsl:for-each select="namespace::*">
+    <xsl:sort select="local-name(.)"/>
+    <xsl:copy/>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy52.xml b/test/tests/conf/copy/copy52.xml
new file mode 100644
index 0000000..2050334
--- /dev/null
+++ b/test/tests/conf/copy/copy52.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <?a-pi pi-1?>
+  <north>
+    Level-3
+    <?b-pi pi-2?>
+    <near-north>
+      Level-4
+      <?a-pi pi-3?>
+      <center>
+        <?b-pi pi-4?>
+        <near-south-west/>Level-5
+          <?a-pi pi-5?>
+          <near-south>Level-6
+            <?b-pi pi-6?>
+	    <south/>
+            <?a-pi pi-7?>
+          </near-south>
+          <?b-pi pi-8?>
+        </center>
+     </near-north>
+  <?a-pi pi-9?>
+  </north>
+</far-north>
diff --git a/test/tests/conf/copy/copy52.xsl b/test/tests/conf/copy/copy52.xsl
new file mode 100644
index 0000000..233a981
--- /dev/null
+++ b/test/tests/conf/copy/copy52.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy52 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Make each PI of a certain name be the current node, and copy it. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//processing-instruction('b-pi')">
+      <xsl:copy/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy53.xml b/test/tests/conf/copy/copy53.xml
new file mode 100644
index 0000000..2050334
--- /dev/null
+++ b/test/tests/conf/copy/copy53.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <?a-pi pi-1?>
+  <north>
+    Level-3
+    <?b-pi pi-2?>
+    <near-north>
+      Level-4
+      <?a-pi pi-3?>
+      <center>
+        <?b-pi pi-4?>
+        <near-south-west/>Level-5
+          <?a-pi pi-5?>
+          <near-south>Level-6
+            <?b-pi pi-6?>
+	    <south/>
+            <?a-pi pi-7?>
+          </near-south>
+          <?b-pi pi-8?>
+        </center>
+     </near-north>
+  <?a-pi pi-9?>
+  </north>
+</far-north>
diff --git a/test/tests/conf/copy/copy53.xsl b/test/tests/conf/copy/copy53.xsl
new file mode 100644
index 0000000..2f77a9b
--- /dev/null
+++ b/test/tests/conf/copy/copy53.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy53 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Copy all PIs of a certain name via copy-of. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy-of select="//processing-instruction('b-pi')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy54.xml b/test/tests/conf/copy/copy54.xml
new file mode 100644
index 0000000..2050334
--- /dev/null
+++ b/test/tests/conf/copy/copy54.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <?a-pi pi-1?>
+  <north>
+    Level-3
+    <?b-pi pi-2?>
+    <near-north>
+      Level-4
+      <?a-pi pi-3?>
+      <center>
+        <?b-pi pi-4?>
+        <near-south-west/>Level-5
+          <?a-pi pi-5?>
+          <near-south>Level-6
+            <?b-pi pi-6?>
+	    <south/>
+            <?a-pi pi-7?>
+          </near-south>
+          <?b-pi pi-8?>
+        </center>
+     </near-north>
+  <?a-pi pi-9?>
+  </north>
+</far-north>
diff --git a/test/tests/conf/copy/copy54.xsl b/test/tests/conf/copy/copy54.xsl
new file mode 100644
index 0000000..baa99f5
--- /dev/null
+++ b/test/tests/conf/copy/copy54.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy54 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Copy some PIs with a multiply-filtered select. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center//processing-instruction('b-pi')">
+      <xsl:copy/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy55.xml b/test/tests/conf/copy/copy55.xml
new file mode 100644
index 0000000..aa66cdf
--- /dev/null
+++ b/test/tests/conf/copy/copy55.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://example.org/defn/" xmlns:tns="http://hello.org/base"
+    xmlns:ns1="http://hello.org/plug" xmlns:ns2="http://hello.org/types">
+  <types>
+    <!-- Below: default + tns changed, ns1 unaffected, ns2 same, xsi new -->
+    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://hello.org/types"
+        xmlns:ns2="http://hello.org/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        targetNamespace="http://hello.org/types">
+      <complexType name="Hobbies">
+        <sequence>
+          <element name="name" type="tns:Name"/>
+          <element name="detail" type="string"/>
+          <element name="places" type="ns2:collection"/>
+          <element name="hobby" type="ns2:vector"/>
+        </sequence>
+      </complexType>
+    </schema>
+  </types>
+</definitions>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy55.xsl b/test/tests/conf/copy/copy55.xsl
new file mode 100644
index 0000000..2989cec
--- /dev/null
+++ b/test/tests/conf/copy/copy55.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPY55-->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: Tom Amiro -->
+  <!-- Purpose: Test copy-of identity transformation on XML with namespace nodes
+       that redefines the default and one prefixed namespace on inner element. -->
+
+  <!-- The data also has a namespace node that is re-declared exactly the same on the inner element.
+    This redundant declaration does not have to be copied, so it isn't. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+    <xsl:copy-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy56.xml b/test/tests/conf/copy/copy56.xml
new file mode 100644
index 0000000..e565a36
--- /dev/null
+++ b/test/tests/conf/copy/copy56.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<docs>
+  <d level="1"><!-- doc1 --></d>
+  <doc2>
+    <a level="2">
+      <b level="3">3-B2</b>
+      <c level="3">3-C3</c>
+      <d level="3">Hello
+        <e level="4">Success</e>
+        <!-- Me, too -->
+      </d>
+    </a>
+    <d level="2">More</d>
+  </doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy56.xsl b/test/tests/conf/copy/copy56.xsl
new file mode 100644
index 0000000..084bee4
--- /dev/null
+++ b/test/tests/conf/copy/copy56.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy56 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27 -->
+  <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use copy-of to attempt to put a node-set in an attribute. -->
+  <!-- Invalid nodes (non-text) and their content should be ignored. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:attribute name="attr1">
+      <xsl:copy-of select="docs//d"/>
+    </xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy57.xml b/test/tests/conf/copy/copy57.xml
new file mode 100644
index 0000000..46b65eb
--- /dev/null
+++ b/test/tests/conf/copy/copy57.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<docs>
+  <d level="1">D1</d>
+  <doc2>
+    <a level="2">
+      <b level="3">3-B2</b>
+      <c level="3">3-C3</c>
+      <d level="3">D3</d>
+    </a>
+    <d level="2">D2</d>
+  </doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy57.xsl b/test/tests/conf/copy/copy57.xsl
new file mode 100644
index 0000000..6a0b85c
--- /dev/null
+++ b/test/tests/conf/copy/copy57.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy57 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27 -->
+  <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use copy-of to put a node-set in an attribute, where all members are text nodes. -->
+  <!-- Invalid nodes (non-text) and their content should be ignored. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:attribute name="attr1">
+      <xsl:copy-of select="docs//d/text()"/>
+    </xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy58.xml b/test/tests/conf/copy/copy58.xml
new file mode 100644
index 0000000..65503d2
--- /dev/null
+++ b/test/tests/conf/copy/copy58.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+  <a level="1">T1<b level="2">BBBB</b>T2</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy58.xsl b/test/tests/conf/copy/copy58.xsl
new file mode 100644
index 0000000..c0304cf
--- /dev/null
+++ b/test/tests/conf/copy/copy58.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy58 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27 -->
+  <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use copy-of to put a node-set in an attribute, where some members are text nodes. -->
+  <!-- Invalid nodes (non-text) and their content should be ignored. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:attribute name="attr1">
+      <xsl:copy-of select="docs/a/node()"/>
+    </xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy59.xml b/test/tests/conf/copy/copy59.xml
new file mode 100644
index 0000000..5a147b0
--- /dev/null
+++ b/test/tests/conf/copy/copy59.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc>foo<a place="above">top-level-a</a><doc><a place="below">sub-level-a</a></doc></doc>
diff --git a/test/tests/conf/copy/copy59.xsl b/test/tests/conf/copy/copy59.xsl
new file mode 100644
index 0000000..bc18c9f
--- /dev/null
+++ b/test/tests/conf/copy/copy59.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy59 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Use copy-of to put a node-set and RTF in a comment, where some members are text nodes. -->
+  <!-- Invalid nodes (non-text) and their content should be ignored. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:variable name="rTreeFrag">
+  <xsl:copy-of select="/"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:comment>
+      <xsl:copy-of select="node()"/>
+    </xsl:comment>
+    <xsl:comment>
+      <xsl:text> </xsl:text><!-- to separate delimiters -->
+      <xsl:copy-of select="$rTreeFrag"/>
+    </xsl:comment>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy60.xml b/test/tests/conf/copy/copy60.xml
new file mode 100644
index 0000000..5a147b0
--- /dev/null
+++ b/test/tests/conf/copy/copy60.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc>foo<a place="above">top-level-a</a><doc><a place="below">sub-level-a</a></doc></doc>
diff --git a/test/tests/conf/copy/copy60.xsl b/test/tests/conf/copy/copy60.xsl
new file mode 100644
index 0000000..6b7db2c
--- /dev/null
+++ b/test/tests/conf/copy/copy60.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy60 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using Values of Variables & Parameters with xsl:copy-of. -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Use copy-of to put a node-set and RTF in a PI, where some members are text nodes. -->
+  <!-- Invalid nodes (non-text) and their content should be ignored. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:variable name="rTreeFrag">
+  <xsl:copy-of select="/"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:processing-instruction name="pi1">
+      <xsl:copy-of select="node()"/>
+    </xsl:processing-instruction>
+    <xsl:processing-instruction name="pi2">
+      <xsl:copy-of select="$rTreeFrag"/>
+    </xsl:processing-instruction>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy61.xml b/test/tests/conf/copy/copy61.xml
new file mode 100644
index 0000000..199f92d
--- /dev/null
+++ b/test/tests/conf/copy/copy61.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc top="gotcha"></doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy61.xsl b/test/tests/conf/copy/copy61.xsl
new file mode 100644
index 0000000..b555641
--- /dev/null
+++ b/test/tests/conf/copy/copy61.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy61 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to copy an attribute, via copy, after child element. -->
+  <!-- Discretionary: name="add-attribute-after-children" choice="ignore" -->
+  <!-- ExpectedException: Attempt to write an attribute after child element -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <child/>
+    <xsl:apply-templates select="doc/@*"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:copy/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/copy62.xml b/test/tests/conf/copy/copy62.xml
new file mode 100644
index 0000000..199f92d
--- /dev/null
+++ b/test/tests/conf/copy/copy62.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc top="gotcha"></doc>
\ No newline at end of file
diff --git a/test/tests/conf/copy/copy62.xsl b/test/tests/conf/copy/copy62.xsl
new file mode 100644
index 0000000..4d25518
--- /dev/null
+++ b/test/tests/conf/copy/copy62.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: copy62 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to copy an attribute, via copy-of, after child element. -->
+  <!-- Discretionary: name="add-attribute-after-children" choice="ignore" -->
+  <!-- ExpectedException: Attempt to write an attribute after child element -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <child/>
+    <xsl:copy-of select="doc/@*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/copy/ent21.xml b/test/tests/conf/copy/ent21.xml
new file mode 100644
index 0000000..cb1f167
--- /dev/null
+++ b/test/tests/conf/copy/ent21.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<extEnt attr="x"><sub2>z</sub2></extEnt>
\ No newline at end of file
diff --git a/test/tests/conf/copy/ent22.xml b/test/tests/conf/copy/ent22.xml
new file mode 100644
index 0000000..3ced57c
--- /dev/null
+++ b/test/tests/conf/copy/ent22.xml
@@ -0,0 +1 @@
+E¾E
\ No newline at end of file
diff --git a/test/tests/conf/copy/htmllat1.dtd b/test/tests/conf/copy/htmllat1.dtd
new file mode 100644
index 0000000..d7cd3f9
--- /dev/null
+++ b/test/tests/conf/copy/htmllat1.dtd
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Portions (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLlat1 PUBLIC
+       "-//W3C//ENTITIES Latin 1//EN//HTML">
+     %HTMLlat1;
+-->
+
+<!ENTITY nbsp   "&#160;" >
+<!ENTITY iexcl  "&#161;" >
+<!ENTITY cent   "&#162;" >
+<!ENTITY pound  "&#163;" >
+<!ENTITY curren "&#164;" >
+<!ENTITY yen    "&#165;" >
+<!ENTITY brvbar "&#166;" >
+<!ENTITY sect   "&#167;" >
+<!ENTITY uml    "&#168;" >
+<!ENTITY copy   "&#169;" >
+<!ENTITY ordf   "&#170;" >
+<!ENTITY laquo  "&#171;" >
+<!ENTITY not    "&#172;" >
+<!ENTITY shy    "&#173;" >
+<!ENTITY reg    "&#174;" >
+<!ENTITY macr   "&#175;" >
+<!ENTITY deg    "&#176;" >
+<!ENTITY plusmn "&#177;" >
+<!ENTITY sup2   "&#178;" >
+<!ENTITY sup3   "&#179;" >
+<!ENTITY acute  "&#180;" >
+<!ENTITY micro  "&#181;" >
+<!ENTITY para   "&#182;" >
+<!ENTITY middot "&#183;" >
+<!ENTITY cedil  "&#184;" >
+<!ENTITY sup1   "&#185;" >
+<!ENTITY ordm   "&#186;" >
+<!ENTITY raquo  "&#187;" >
+<!ENTITY frac14 "&#188;" >
+<!ENTITY frac12 "&#189;" >
+<!ENTITY frac34 "&#190;" >
+<!ENTITY iquest "&#191;" >
+<!ENTITY Agrave "&#192;" >
+<!ENTITY Aacute "&#193;" >
+<!ENTITY Acirc  "&#194;" >
+<!ENTITY Atilde "&#195;" >
+<!ENTITY Auml   "&#196;" >
+<!ENTITY Aring  "&#197;" >
+<!ENTITY AElig  "&#198;" >
+<!ENTITY Ccedil "&#199;" >
+<!ENTITY Egrave "&#200;" >
+<!ENTITY Eacute "&#201;" >
+<!ENTITY Ecirc  "&#202;" >
+<!ENTITY Euml   "&#203;" >
+<!ENTITY Igrave "&#204;" >
+<!ENTITY Iacute "&#205;" >
+<!ENTITY Icirc  "&#206;" >
+<!ENTITY Iuml   "&#207;" >
+<!ENTITY ETH    "&#208;" >
+<!ENTITY Ntilde "&#209;" >
+<!ENTITY Ograve "&#210;" >
+<!ENTITY Oacute "&#211;" >
+<!ENTITY Ocirc  "&#212;" >
+<!ENTITY Otilde "&#213;" >
+<!ENTITY Ouml   "&#214;" >
+<!ENTITY times  "&#215;" >
+<!ENTITY Oslash "&#216;" >
+<!ENTITY Ugrave "&#217;" >
+<!ENTITY Uacute "&#218;" >
+<!ENTITY Ucirc  "&#219;" >
+<!ENTITY Uuml   "&#220;" >
+<!ENTITY Yacute "&#221;" >
+<!ENTITY THORN  "&#222;" >
+<!ENTITY szlig  "&#223;" >
+<!ENTITY agrave "&#224;" >
+<!ENTITY aacute "&#225;" >
+<!ENTITY acirc  "&#226;" >
+<!ENTITY atilde "&#227;" >
+<!ENTITY auml   "&#228;" >
+<!ENTITY aring  "&#229;" >
+<!ENTITY aelig  "&#230;" >
+<!ENTITY ccedil "&#231;" >
+<!ENTITY egrave "&#232;" >
+<!ENTITY eacute "&#233;" >
+<!ENTITY ecirc  "&#234;" >
+<!ENTITY euml   "&#235;" >
+<!ENTITY igrave "&#236;" >
+<!ENTITY iacute "&#237;" >
+<!ENTITY icirc  "&#238;" >
+<!ENTITY iuml   "&#239;" >
+<!ENTITY eth    "&#240;" >
+<!ENTITY ntilde "&#241;" >
+<!ENTITY ograve "&#242;" >
+<!ENTITY oacute "&#243;" >
+<!ENTITY ocirc  "&#244;" >
+<!ENTITY otilde "&#245;" >
+<!ENTITY ouml   "&#246;" >
+<!ENTITY divide "&#247;" >
+<!ENTITY oslash "&#248;" >
+<!ENTITY ugrave "&#249;" >
+<!ENTITY uacute "&#250;" >
+<!ENTITY ucirc  "&#251;" >
+<!ENTITY uuml   "&#252;" >
+<!ENTITY yacute "&#253;" >
+<!ENTITY thorn  "&#254;" >
+<!ENTITY yuml   "&#255;" >
\ No newline at end of file
diff --git a/test/tests/conf/dflt/dflt01.xml b/test/tests/conf/dflt/dflt01.xml
new file mode 100644
index 0000000..e26b646
--- /dev/null
+++ b/test/tests/conf/dflt/dflt01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc test="attr on doc elem">
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/dflt/dflt01.xsl b/test/tests/conf/dflt/dflt01.xsl
new file mode 100644
index 0000000..688d9a3
--- /dev/null
+++ b/test/tests/conf/dflt/dflt01.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: DFLT01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.8 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for built-in template rule for attributes.-->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="@test"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/dflt/dflt01_1.xml b/test/tests/conf/dflt/dflt01_1.xml
new file mode 100644
index 0000000..984f313
--- /dev/null
+++ b/test/tests/conf/dflt/dflt01_1.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<doc>
+  <section index="section1" index2="atr2val">
+    <section index="subSection1.1">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+  </section>
+  <section index="section2">
+    <p>Hello2</p>
+    <section index="subSection2.1">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+    <section index="subSection2.2">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+    <p>Hello2 again.</p>
+    <section index="subSection2.3">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+  </section>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/dflt/dflt02.xml b/test/tests/conf/dflt/dflt02.xml
new file mode 100644
index 0000000..7f3ffcc
--- /dev/null
+++ b/test/tests/conf/dflt/dflt02.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?> 
+<far-north>
+<way-out-yonder-west/>
+<out-yonder-west/>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south-east/>
+<near-south>
+<south>
+<far-south/>
+</south>
+</near-south>
+<near-south-west/>
+</center>
+<near-east/>hello
+<east/>whatsup
+<far-east/>goodbye
+</near-north>
+</north>
+<way-out-yonder-east/>
+<out-yonder-east/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/dflt/dflt02.xsl b/test/tests/conf/dflt/dflt02.xsl
new file mode 100644
index 0000000..60c79be
--- /dev/null
+++ b/test/tests/conf/dflt/dflt02.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: DFLT02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.8 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of built-in template for text nodes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="following-sibling::node()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+   <xsl:value-of select="position()"/>node:<xsl:value-of select="name()"/>,
+</xsl:template>
+
+<!-- For testing this should remain commented out. It shows how all nodes
+     are processed, particularly the text nodes.
+
+<xsl:template match="text()">
+   <xsl:value-of select="position()"/>text:<xsl:value-of select="."/>,
+</xsl:template>
+
+-->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/dflt/dflt03.xml b/test/tests/conf/dflt/dflt03.xml
new file mode 100644
index 0000000..d760f79
--- /dev/null
+++ b/test/tests/conf/dflt/dflt03.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center>
+  <near-south>WentNearSouth
+    <south>WentSouth
+      <far-south>WentFarSouth</far-south>BackToSouth
+    </south>BackToNearSouth
+  </near-south>BackToCentral
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/dflt/dflt03.xsl b/test/tests/conf/dflt/dflt03.xsl
new file mode 100644
index 0000000..b5ea588
--- /dev/null
+++ b/test/tests/conf/dflt/dflt03.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: DFLT03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.8 -->
+  <!-- Purpose: Test of built-in template for elements. -->
+  <!-- Creator: David Marston -->
+  <!-- Use the built-in template for text to show that we hit each descendant -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/dflt/dflt04.xml b/test/tests/conf/dflt/dflt04.xml
new file mode 100644
index 0000000..d760f79
--- /dev/null
+++ b/test/tests/conf/dflt/dflt04.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+<north>
+<near-north>
+<far-west/>
+<west/>
+<near-west/>
+<center>
+  <near-south>WentNearSouth
+    <south>WentSouth
+      <far-south>WentFarSouth</far-south>BackToSouth
+    </south>BackToNearSouth
+  </near-south>BackToCentral
+</center>
+<near-east/>
+<east/>
+<far-east/>
+</near-north>
+</north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/dflt/dflt04.xsl b/test/tests/conf/dflt/dflt04.xsl
new file mode 100644
index 0000000..c1000af
--- /dev/null
+++ b/test/tests/conf/dflt/dflt04.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: DFLT04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.8 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of built-in template for elements for a named mode. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates mode="good"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()"><!-- Should never trigger -->
+  <xsl:value-of select="translate(.,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+</xsl:template>
+
+<xsl:template match="*"><!-- Should never trigger -->
+  <xsl:text>Reverted on: </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/embed/blank.out b/test/tests/conf/embed/blank.out
new file mode 100644
index 0000000..b28b04f
--- /dev/null
+++ b/test/tests/conf/embed/blank.out
@@ -0,0 +1,3 @@
+
+
+
diff --git a/test/tests/conf/embed/embed01.xml b/test/tests/conf/embed/embed01.xml
new file mode 100644
index 0000000..a98b11e
--- /dev/null
+++ b/test/tests/conf/embed/embed01.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0"?> 
+<?xml-stylesheet type="text/xsl" href="#style1"?>
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA | head | body)*>
+
+<!ELEMENT head (#PCDATA | xsl:stylesheet)*>
+<!ELEMENT body (#PCDATA|para)*>
+
+<!ELEMENT xsl:stylesheet (#PCDATA | xsl:key | xsl:template)*>
+<!ATTLIST xsl:stylesheet 
+		  id ID #REQUIRED
+		  xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform"
+		  version NMTOKEN #REQUIRED>
+
+<!ELEMENT xsl:key EMPTY>
+<!ATTLIST xsl:key
+    name NMTOKENS #REQUIRED
+    match CDATA #REQUIRED
+    use CDATA #REQUIRED>
+
+<!ELEMENT xsl:template (#PCDATA | out)*>
+<!ATTLIST xsl:template  match CDATA #IMPLIED>
+
+<!ELEMENT out (#PCDATA | xsl:value-of | xsl:text)*>
+
+<!ELEMENT xsl:value-of EMPTY>
+<!ATTLIST xsl:value-of select CDATA #REQUIRED>
+
+<!ELEMENT xsl:text (#PCDATA)>
+
+<!ELEMENT para (#PCDATA)*>
+<!ATTLIST para id ID #REQUIRED>
+]>
+
+<doc>
+  <head>
+	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                id="style1">
+
+	<!-- FileName: embed01 -->
+	<!-- Document: http://www.w3.org/TR/xslt -->
+	<!-- DocVersion: 19991116 -->
+	<!-- Section: 2.7 Embedding Stylesheets. -->
+	<!-- Purpose: General test of embedded stylesheet using fragment identifier -->
+
+	  <xsl:key name="test" match="para" use="@id"/>
+
+		<xsl:template match="/">
+  			<out>
+    			<xsl:value-of select="doc/body/para"/>
+				<xsl:value-of select="key('test','foey')"/><xsl:text>&#10;</xsl:text>
+  			</out>
+		</xsl:template>
+
+ <!--
+  * Licensed to the Apache Software Foundation (ASF) under one
+  * or more contributor license agreements. See the NOTICE file
+  * distributed with this work for additional information
+  * regarding copyright ownership. The ASF licenses this file
+  * to you 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.
+ -->
+
+	</xsl:stylesheet>
+  </head>
+
+  <body>
+  	<para id="foo">
+Hello
+	</para>
+	<para id="foey">
+Goodbye
+	</para>
+  </body>
+</doc>
diff --git a/test/tests/conf/embed/embed02.xml b/test/tests/conf/embed/embed02.xml
new file mode 100644
index 0000000..ec04b7b
--- /dev/null
+++ b/test/tests/conf/embed/embed02.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="foo.xsl"?>
+
+  <!-- FileName: embed02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.7 Embedding Stylesheets. -->
+  <!-- Purpose: Minimal test of embedded stylesheet -->
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+<doc>
+<head>
+</head>
+<body>
+<para id="foo">
+Hello down there.
+</para>
+</body>
+</doc>
diff --git a/test/tests/conf/embed/embed03.xml b/test/tests/conf/embed/embed03.xml
new file mode 100644
index 0000000..9b92abd
--- /dev/null
+++ b/test/tests/conf/embed/embed03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<expense-report>
+	<total>153</total>
+</expense-report>
\ No newline at end of file
diff --git a/test/tests/conf/embed/embed03.xsl b/test/tests/conf/embed/embed03.xsl
new file mode 100644
index 0000000..0cc1056
--- /dev/null
+++ b/test/tests/conf/embed/embed03.xsl
@@ -0,0 +1,37 @@
+<html xsl:version="1.0"
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+      xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+  <!-- FileName: embed03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 LRE as Stylesheet -->
+  <!-- Purpose: Stylesheet may consist of just a literal result element.
+     This is the example from the spec. -->
+
+  <head>
+    <title>Expense Report Summary</title>
+  </head>
+  <body>
+    <p>Total Amount: <xsl:value-of select="expense-report/total"/></p>  
+  </body>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</html>
diff --git a/test/tests/conf/embed/embed04.xml b/test/tests/conf/embed/embed04.xml
new file mode 100644
index 0000000..ae451fe
--- /dev/null
+++ b/test/tests/conf/embed/embed04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<expense-report>
+	<total>153</total>
+</expense-report>
diff --git a/test/tests/conf/embed/embed04.xsl b/test/tests/conf/embed/embed04.xsl
new file mode 100644
index 0000000..d25c11b
--- /dev/null
+++ b/test/tests/conf/embed/embed04.xsl
@@ -0,0 +1,41 @@
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+  <!-- FileName: embed04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 LRE as Stylesheet -->
+  <!-- Purpose: From the spec: reference version, non-embedded, for comparison. -->
+
+<xsl:template match="/">
+<html>
+  <head>
+    <title>Expense Report Summary</title>
+  </head>
+  <body>
+    <p>Total Amount: <xsl:value-of select="expense-report/total"/></p>
+  </body>
+</html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/embed/embed07.xml b/test/tests/conf/embed/embed07.xml
new file mode 100644
index 0000000..9d2971f
--- /dev/null
+++ b/test/tests/conf/embed/embed07.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="#style1"?>
+<!DOCTYPE doc [
+<!ELEMENT doc (xsl:transform | body)*>
+
+<!ELEMENT body ANY>
+
+<!ELEMENT xsl:transform ANY>
+<!ATTLIST xsl:transform 
+		  id ID #REQUIRED
+		  xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform"
+		  version NMTOKEN #REQUIRED>
+<!ELEMENT xsl:key EMPTY>
+<!ATTLIST xsl:key 
+		  name CDATA #REQUIRED
+		  match CDATA #REQUIRED
+		  use CDATA #REQUIRED
+		  >
+<!ELEMENT xsl:template ANY>
+<!ATTLIST xsl:template 
+		  match CDATA #REQUIRED
+		  >
+<!ELEMENT xsl:value-of ANY>
+<!ATTLIST xsl:value-of 
+		  select CDATA #REQUIRED
+		  >
+<!ELEMENT transform ANY>
+<!ELEMENT para ANY>
+<!ATTLIST para 
+		  id ID #REQUIRED>
+
+]>
+<doc>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+               id="style1">
+
+  <!-- FileName: embed07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.7 Embedding Stylesheets. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: General test of embedded "transform" using fragment identifier -->
+
+<xsl:key name="test" match="para" use="@id"/>
+
+<xsl:template match="/">
+  <transform>
+    <xsl:value-of select="doc/body/para"/>
+	<xsl:value-of select="key('test','foey')"/>
+  </transform>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+
+</xsl:transform>
+
+<body>
+<para id="foo">
+Hello
+</para>
+<para id="foey">
+Goodbye
+</para>
+</body>
+</doc>
diff --git a/test/tests/conf/embed/embed08.xml b/test/tests/conf/embed/embed08.xml
new file mode 100644
index 0000000..f97504a
--- /dev/null
+++ b/test/tests/conf/embed/embed08.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<?xml-stylesheet media="xxx" type="text/xsl" href="nonexist.xsl"?>
+<?xml-stylesheet media="yyy" type="text/xsl" href="foo.xsl"?>
+<?xml-stylesheet media="zzz" type="text/xsl" href="#style1"?>
+<?xml-stylesheet media="xyz" alternate="yes" type="text/xsl" href="mediaembed08.xsl"?>
+
+<doc>
+<head>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+    version="1.0" id="style1">
+
+  <!-- FileName: embed08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.7 Embedding Stylesheets -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test the media attribute and -MEDIA command-line option. -->
+  <!-- Can be invoked four ways; media="xxx" is an error case. -->
+
+<xsl:key name="test" match="para" use="@id"/>
+
+  <xsl:template match="/">
+     <out>
+	 Ye ha comming to you from the xml file!
+        <xsl:value-of select="doc/body/para"/>
+        <xsl:value-of select="key('test','foey')"/>
+     </out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+
+</xsl:stylesheet>
+</head>
+<body>
+<para id="foo">
+Hello
+</para>
+<para id="foey">
+Goodbye
+</para>
+</body>
+</doc>
diff --git a/test/tests/conf/embed/foo.xsl b/test/tests/conf/embed/foo.xsl
new file mode 100644
index 0000000..a61b11d
--- /dev/null
+++ b/test/tests/conf/embed/foo.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: foo.xsl -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 2.7 -->
+<!-- Purpose: Referenced by embed02 and embed08 in their xml-stylesheet PIs.  -->
+
+<xsl:template match="/">
+  <out>
+     <xsl:value-of select="doc/body/para"/>
+  </out><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/embed/mediaembed08.xsl b/test/tests/conf/embed/mediaembed08.xsl
new file mode 100644
index 0000000..8556451
--- /dev/null
+++ b/test/tests/conf/embed/mediaembed08.xsl
@@ -0,0 +1,36 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: EMBED08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.7 Embedding Stylesheets. -->
+  <!-- Purpose: Test the media attribute and -MEDIA command-line option -->
+
+<xsl:key name="test" match="para" use="@id"/>
+
+  <xsl:template match="/">
+	<out>
+    <xsl:value-of select="doc/body/para"/>
+    <xsl:value-of select="key('test','foey')"/>
+	</out>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/embed/paramtest.xml b/test/tests/conf/embed/paramtest.xml
new file mode 100644
index 0000000..2e59055
--- /dev/null
+++ b/test/tests/conf/embed/paramtest.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<root></root>
\ No newline at end of file
diff --git a/test/tests/conf/embed/paramtest.xsl b/test/tests/conf/embed/paramtest.xsl
new file mode 100644
index 0000000..34c5839
--- /dev/null
+++ b/test/tests/conf/embed/paramtest.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: paramtest -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Test of parameters to the stylesheet.  -->
+  <!-- Comments: This test is within the embedded section because it requires
+                 a special command line which is already developed for embed. -->
+
+<xsl:param name="pv1" />
+<xsl:param name="pv2" />
+<xsl:param name="pv3" />
+<xsl:param name="pv4">Oops, failed</xsl:param>
+<xsl:param name="pv5">Oops, failed</xsl:param>
+<xsl:param name="pv6">Oops, failed</xsl:param>
+
+<xsl:template match="/">
+ <out>
+	<pv1Tag><xsl:value-of select="$pv1"/></pv1Tag>,
+	<pv2Tag><xsl:value-of select="$pv2"/></pv2Tag>,
+	<pv3Tag><xsl:value-of select="$pv3"/></pv3Tag>,
+	<pv4Tag><xsl:value-of select="$pv4"/></pv4Tag>,
+	<pv5Tag><xsl:value-of select="$pv5"/></pv5Tag>,
+	<pv6Tag><xsl:value-of select="$pv6"/></pv6Tag>.
+ </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/embed/testembed.bat b/test/tests/conf/embed/testembed.bat
new file mode 100755
index 0000000..459c906
--- /dev/null
+++ b/test/tests/conf/embed/testembed.bat
@@ -0,0 +1,29 @@
+@ECHO OFF
+set JAVAPROG=java
+set savedCLASSPATH=%CLASSPATH%
+set LOTUSXSLDIR=d:\xslt\testsuite\classes\
+
+rem +++ This file is used to run embed01, embed02, embed07, embed08(4x) and paramtest.  +++
+rem +++ Set classpath based on the build you are testing +++
+rem +++ This is for XALANJ build.
+rem
+rem set XCLASSPATH=%LOTUSXSLDIR%xerces.jar;%LOTUSXSLDIR%xalan.jar;d:\xslt\testsuite\conf\extend\;%LOTUSXSLDIR%js.jar;%LOTUSXSLDIR%bsf.jar;%LOTUSXSLDIR%bsfengines.jar;%CLASSPATH%
+rem This is for LOTUSXSL build.
+set XCLASSPATH=%LOTUSXSLDIR%xerces.jar;%LOTUSXSLDIR%lotusxsl.jar;%LOTUSXSLDIR%xalan.jar;d:\xslt\testsuite\conf\extend\;%LOTUSXSLDIR%js.jar;%LOTUSXSLDIR%bsf.jar;%LOTUSXSLDIR%bsfengines.jar;%CLASSPATH%
+
+%JAVAPROG% -Djava.compiler=NONE -classpath %XCLASSPATH% org.apache.xalan.xslt.Process %2 %3 %4 %5 %6 -v -in embed01.xml 
+type blank.out
+%JAVAPROG% -Djava.compiler=NONE -classpath %XCLASSPATH% org.apache.xalan.xslt.Process %2 %3 %4 %5 %6 -v -in embed02.xml 
+type blank.out
+%JAVAPROG% -Djava.compiler=NONE -classpath %XCLASSPATH% org.apache.xalan.xslt.Process %2 %3 %4 %5 %6 -v -in embed07.xml 
+type blank.out
+
+%JAVAPROG% -Djava.compiler=NONE -classpath %XCLASSPATH% org.apache.xalan.xslt.Process %2 %3 %4 %5 %6 -v -MEDIA xxx -in embed08.xml 
+type blank.out
+%JAVAPROG% -Djava.compiler=NONE -classpath %XCLASSPATH% org.apache.xalan.xslt.Process %2 %3 %4 %5 %6 -v -MEDIA yyy -in embed08.xml 
+type blank.out
+%JAVAPROG% -Djava.compiler=NONE -classpath %XCLASSPATH% org.apache.xalan.xslt.Process %2 %3 %4 %5 %6 -v -MEDIA zzz -in embed08.xml 
+type blank.out
+%JAVAPROG% -Djava.compiler=NONE -classpath %XCLASSPATH% org.apache.xalan.xslt.Process %2 %3 %4 %5 %6 -v -MEDIA xyz -in embed08.xml 
+type blank.out
+%JAVAPROG% -Djava.compiler=NONE -classpath %XCLASSPATH% org.apache.xalan.xslt.Process %2 %3 %4 %5 %6 -v -param pv1 'aa' -param pv2 'bb' -param pv3 'cc' -param pv4 'dd' -param pv5 'ee' -param pv6 'ff' -in paramtest.xml -xsl paramtest.xsl 
diff --git a/test/tests/conf/expression/expression01.xml b/test/tests/conf/expression/expression01.xml
new file mode 100644
index 0000000..63a11db
--- /dev/null
+++ b/test/tests/conf/expression/expression01.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <para id="1" xml:lang="en">en</para>
+  <div xml:lang="en">
+    <para>en</para>
+  </div>
+  <para id="3" xml:lang="EN">EN</para>
+  <para id="4" xml:lang="en-us">en-us</para>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/expression/expression01.xsl b/test/tests/conf/expression/expression01.xsl
new file mode 100644
index 0000000..f301ebe
--- /dev/null
+++ b/test/tests/conf/expression/expression01.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: expression01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of lang() function, with exact match on "en" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="para[@id='1' and lang('en')]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/expression/expression02.xml b/test/tests/conf/expression/expression02.xml
new file mode 100644
index 0000000..59f8d11
--- /dev/null
+++ b/test/tests/conf/expression/expression02.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE doc [
+  <!NOTATION gif SYSTEM "../www.foo.com" >
+  <!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif >
+  <!ELEMENT doc (#PCDATA)>
+]>
+         
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/expression/expression02.xsl b/test/tests/conf/expression/expression02.xsl
new file mode 100644
index 0000000..0b169ca
--- /dev/null
+++ b/test/tests/conf/expression/expression02.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: expression02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Invoke unparsed-entity-uri function -->
+  <!-- To avoid dealing with the top of the file path,
+     we just look for the part of the returned value that's in the supplied data. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains(
+      unparsed-entity-uri('hatch-pic'),'grafix/OpenHatch.gif')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/expression/expression03.xml b/test/tests/conf/expression/expression03.xml
new file mode 100644
index 0000000..b9cc7f5
--- /dev/null
+++ b/test/tests/conf/expression/expression03.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <para id="1" xml:lang="en">en</para>
+  <div xml:lang="en">
+<para>en</para>
+</div>
+  <para id="3" xml:lang="EN">EN</para>
+  <para id="4" xml:lang="en-us">en-us</para>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/expression/expression03.xsl b/test/tests/conf/expression/expression03.xsl
new file mode 100644
index 0000000..dcd4548
--- /dev/null
+++ b/test/tests/conf/expression/expression03.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: expression03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of lang() function, matching "en-us" to partial qualifier -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="para[@id='4' and lang('en')]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/expression/expression04.xml b/test/tests/conf/expression/expression04.xml
new file mode 100644
index 0000000..8d3c53a
--- /dev/null
+++ b/test/tests/conf/expression/expression04.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <para id="1" xml:lang="en">en</para>
+  <div xml:lang="en">
+    <para>en</para>
+  </div>
+  <para id="3" xml:lang="EN">EN</para>
+  <para id="4" xml:lang="en-us">en-us</para>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/expression/expression04.xsl b/test/tests/conf/expression/expression04.xsl
new file mode 100644
index 0000000..e2d435f
--- /dev/null
+++ b/test/tests/conf/expression/expression04.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: EXPR04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of lang() function -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="div/para[lang('en')]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/expression/expression05.xml b/test/tests/conf/expression/expression05.xml
new file mode 100644
index 0000000..b9cc7f5
--- /dev/null
+++ b/test/tests/conf/expression/expression05.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <para id="1" xml:lang="en">en</para>
+  <div xml:lang="en">
+<para>en</para>
+</div>
+  <para id="3" xml:lang="EN">EN</para>
+  <para id="4" xml:lang="en-us">en-us</para>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/expression/expression05.xsl b/test/tests/conf/expression/expression05.xsl
new file mode 100644
index 0000000..f182adf
--- /dev/null
+++ b/test/tests/conf/expression/expression05.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: expression05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of lang() function, attempting to match "EN" to "en" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="para[@id='3' and lang('en')]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/expression/expression06.xml b/test/tests/conf/expression/expression06.xml
new file mode 100644
index 0000000..36592ce
--- /dev/null
+++ b/test/tests/conf/expression/expression06.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <para id="1" xml:lang="en">en</para>
+  <div xml:lang="en">
+    <para id="2">en</para>
+  </div>
+  <para id="3" xml:lang="EN">EN</para>
+  <para id="4" xml:lang="en-us">en-us</para>
+  <para id="A" xml:lang="it">it</para>
+  <div xml:lang="it">
+    <para id="B">it</para>
+  </div>
+  <para id="C" xml:lang="IT">IT</para>
+  <para id="D" xml:lang="it-it">it-it</para>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/expression/expression06.xsl b/test/tests/conf/expression/expression06.xsl
new file mode 100644
index 0000000..18d714e
--- /dev/null
+++ b/test/tests/conf/expression/expression06.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: expression06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Purpose: Test of lang() function in a for-each -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="//para[lang('en')]">
+      <xsl:value-of select="@id"/>
+      <xsl:text>:</xsl:text>
+      <xsl:value-of select="ancestor-or-self::*[@xml:lang]/@xml:lang"/>
+      <xsl:if test="position() != last()">
+        <xsl:text>, </xsl:text>
+      </xsl:if>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/extend/extend01.xml b/test/tests/conf/extend/extend01.xml
new file mode 100644
index 0000000..8a40de1
--- /dev/null
+++ b/test/tests/conf/extend/extend01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<element>Just me</element>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/extend/extend01.xsl b/test/tests/conf/extend/extend01.xsl
new file mode 100644
index 0000000..6f643ec
--- /dev/null
+++ b/test/tests/conf/extend/extend01.xsl
@@ -0,0 +1,56 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:ora="http://www.oracle.com/XSL/Transform/java/"
+				extension-element-prefixes="ora"
+				exclude-result-prefixes="ora">
+
+  <!-- FileName: extend01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Testing Conformance specific extension stuff. The top-level usage
+       of a extension element is not really allowed and should be ignored. Therefore
+       the first xsl:fallback should also be ignored.  -->
+  <!-- Author: Paul Dick -->
+
+
+<ora:output name="oout" method="html">
+  <xsl:fallback>
+	<xsl:text>THIS FALLBACK SHOULD BE IGNORED !! </xsl:text>
+  </xsl:fallback>
+</ora:output>
+
+<xsl:template match="doc">
+ <out>
+	<xsl:variable name="filename" select="testfile.html"/>
+
+	<ora:output  use="oout" href="{$filename}">
+	  <xsl:fallback>
+		<xsl:text>THIS FALLBACK OK !! </xsl:text>
+  	  </xsl:fallback>
+   	  <xsl:value-of select="element"/>
+  	</ora:output>
+
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/extend/extend02.xml b/test/tests/conf/extend/extend02.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/extend/extend02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/extend/extend02.xsl b/test/tests/conf/extend/extend02.xsl
new file mode 100644
index 0000000..3fd5742
--- /dev/null
+++ b/test/tests/conf/extend/extend02.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ext="somebody.elses.extension"
+                extension-element-prefixes="ext">
+
+  <!-- FileName: extend02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 15 Fallback -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Testing that xsl:fallback engages when required. -->
+
+  <xsl:template match="/">
+    <out>
+      <ext:test>
+        <xsl:fallback>
+          <xsl:text>Fallback: extension was not found.</xsl:text>
+        </xsl:fallback>
+      </ext:test>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/extend/extend03.xml b/test/tests/conf/extend/extend03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/extend/extend03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/extend/extend03.xsl b/test/tests/conf/extend/extend03.xsl
new file mode 100644
index 0000000..c59e335
--- /dev/null
+++ b/test/tests/conf/extend/extend03.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: extend03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test function-available and element-available with
+     xslt elements and functions. -->
+
+<xsl:template match="/">
+<out><xsl:text>&#010;</xsl:text>
+  <xsl:choose>
+    <xsl:when test="element-available('xsl:value-of')">
+      <xsl:text>element xsl:value-of IS defined</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>element xsl:value-of IS NOT defined</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose><xsl:text>&#010;</xsl:text>
+
+  <xsl:choose>
+    <xsl:when test="function-available('document')">
+      <xsl:text>function document() IS defined</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>function document() IS NOT defined</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose><xsl:text>&#010;</xsl:text>
+
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/extend/extend04.xml b/test/tests/conf/extend/extend04.xml
new file mode 100644
index 0000000..703f073
--- /dev/null
+++ b/test/tests/conf/extend/extend04.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>X</a>
+  <a>Y</a>
+  <a>Z</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/extend/extend04.xsl b/test/tests/conf/extend/extend04.xsl
new file mode 100644
index 0000000..aee831b
--- /dev/null
+++ b/test/tests/conf/extend/extend04.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ext="somebody.elses.extension"
+                extension-element-prefixes="ext">
+
+  <!-- FileName: EXTEND04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 15 Fallback -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for-each inside xsl:fallback. Also have content with in
+       the extension. -->
+
+<xsl:template match="doc">
+  <out>
+    <ext:test>
+	  <xsl:call-template name="oops">
+	    <xsl:with-param name="oopsdata" select="'Gadzookz'"/>
+	  </xsl:call-template>
+      <xsl:fallback>
+        <xsl:for-each select="a">
+          <xsl:value-of select="."/>
+        </xsl:for-each>
+      </xsl:fallback>
+    </ext:test>
+  </out>
+</xsl:template>
+
+<xsl:template name="oops">
+   <xsl:param name="oopsdata" select="'default'"/>
+   <xsl:value-of select="$oopsdata"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/extend/extend05.xml b/test/tests/conf/extend/extend05.xml
new file mode 100755
index 0000000..7330301
--- /dev/null
+++ b/test/tests/conf/extend/extend05.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<out></out>
diff --git a/test/tests/conf/extend/extend05.xsl b/test/tests/conf/extend/extend05.xsl
new file mode 100755
index 0000000..ac34478
--- /dev/null
+++ b/test/tests/conf/extend/extend05.xsl
@@ -0,0 +1,43 @@
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:saxon="http://icl.com/saxon"
+                extension-element-prefixes="saxon">
+
+<!-- Written by Tom Amiro -->
+  <!-- FileName: ac137.xsl -->
+  <!-- Document: http://www.w3.org/TR/xslt11 -->
+  <!-- DocVersion: 200001212 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Using element-available function to test for vendor extensions  -->
+
+<xsl:template match="/">
+<out>
+  <xsl:if test="element-available('saxon:entity-ref')">
+    <saxon:entity-ref name="nbsp" />
+  </xsl:if>
+  <xsl:if test="element-available('saxon:entity-ref') = false">
+    <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+  </xsl:if>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/bib.xml b/test/tests/conf/idkey/bib.xml
new file mode 100644
index 0000000..96894fc
--- /dev/null
+++ b/test/tests/conf/idkey/bib.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<main>
+<entry name="XML">--location of the XML spec--</entry>
+<entry name="XPath">--location of the XPath spec--</entry>
+<entry name="XSLT">--location of the XSLT spec--</entry>
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey01.xml b/test/tests/conf/idkey/idkey01.xml
new file mode 100644
index 0000000..4251694
--- /dev/null
+++ b/test/tests/conf/idkey/idkey01.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<doc>
+  <town name="Amherst" state="NH"/>
+  <town name="Amherst" state="MA"/>
+  <town name="Auburn" state="MA"/>
+  <town name="Auburn" state="NH"/>
+  <town name="Auburn" state="ME"/>
+  <town name="Bristol" state="RI"/>
+  <town name="Bristol" state="ME"/>
+  <town name="Bristol" state="CT"/>
+  <town name="Bristol" state="NH"/>
+  <town name="Bristol" state="VT"/>
+  <town name="Cambridge" state="ME"/>
+  <town name="Cambridge" state="VT"/>
+  <town name="Cambridge" state="MA"/>
+  <town name="Enfield" state="NH"/>
+  <town name="Enfield" state="CT"/>
+  <town name="Enfield" state="ME"/>
+  <town name="Grafton" state="MA"/>
+  <town name="Grafton" state="NH"/>
+  <town name="Grafton" state="VT"/>
+  <town name="Hudson" state="NH"/>
+  <town name="Hudson" state="MA"/>
+  <town name="Hudson" state="ME"/>
+  <town name="Lincoln" state="NH"/>
+  <town name="Lincoln" state="RI"/>
+  <town name="Lincoln" state="ME"/>
+  <town name="Lincoln" state="MA"/>
+  <town name="Manchester" state="MA"/>
+  <town name="Manchester" state="ME"/>
+  <town name="Manchester" state="NH"/>
+  <town name="Manchester" state="CT"/>
+  <town name="Manchester" state="VT"/>
+  <town name="Newport" state="RI"/>
+  <town name="Newport" state="NH"/>
+  <town name="Newport" state="ME"/>
+  <town name="Newport" state="VT"/>
+  <town name="Pittsfield" state="MA"/>
+  <town name="Pittsfield" state="NH"/>
+  <town name="Pittsfield" state="VT"/>
+  <town name="Pittsfield" state="ME"/>
+  <town name="Rochester" state="NH"/>
+  <town name="Rochester" state="MA"/>
+  <town name="Rochester" state="VT"/>
+  <town name="Salem" state="MA"/>
+  <town name="Salem" state="NH"/>
+  <town name="Springfield" state="MA"/>
+  <town name="Springfield" state="ME"/>
+  <town name="Springfield" state="VT"/>
+  <town name="Washington" state="NH"/>
+  <town name="Washington" state="VT"/>
+  <town name="Washington" state="CT"/>
+  <town name="Washington" state="ME"/>
+</doc>
diff --git a/test/tests/conf/idkey/idkey01.xsl b/test/tests/conf/idkey/idkey01.xsl
new file mode 100644
index 0000000..3e28760
--- /dev/null
+++ b/test/tests/conf/idkey/idkey01.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test generate-id() as used in grouping. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:key name="places" match="town" use="@state"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="town[generate-id() = generate-id(key('places',@state)[1])]">
+      <xsl:text>&#10;</xsl:text>
+      <xsl:element name="towns">
+      <xsl:copy-of select="@state"/>
+      <xsl:for-each select="key('places',current()/@state)">
+        <xsl:value-of select="@name"/>
+        <xsl:if test="position() != last()">
+          <xsl:text>, </xsl:text>
+        </xsl:if>
+      </xsl:for-each>
+      </xsl:element>
+    </xsl:for-each>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey02.xml b/test/tests/conf/idkey/idkey02.xml
new file mode 100644
index 0000000..b854eb4
--- /dev/null
+++ b/test/tests/conf/idkey/idkey02.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey02.xsl b/test/tests/conf/idkey/idkey02.xsl
new file mode 100644
index 0000000..a18662d
--- /dev/null
+++ b/test/tests/conf/idkey/idkey02.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Make one keyspace and use it. -->
+
+<xsl:key name="mykey" match="div" use="title"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey03.xml b/test/tests/conf/idkey/idkey03.xml
new file mode 100644
index 0000000..f81af66
--- /dev/null
+++ b/test/tests/conf/idkey/idkey03.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro_Section</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS_Section</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp_Section</p>
+  </div>
+
+  <div>
+    <title>Patterns</title>
+    <p>Pat_Section</p>
+  </div>
+</doc>
diff --git a/test/tests/conf/idkey/idkey03.xsl b/test/tests/conf/idkey/idkey03.xsl
new file mode 100644
index 0000000..97f6c10
--- /dev/null
+++ b/test/tests/conf/idkey/idkey03.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Test for key() in template pattern matching. --> 
+
+<xsl:key name="mykey" match="div" use="title"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:apply-templates select="key('mykey', 'Introduction')/p"/>
+  <xsl:apply-templates select="key('mykey', 'Stylesheet Structure')"/>
+  <xsl:apply-templates select="key('mykey', 'Expressions')/p"/>
+  <xsl:apply-templates select="key('mykey', 'Patterns')"/>
+ </out>
+</xsl:template>
+
+<xsl:template match="key('mykey', 'Introduction')/p">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="key('mykey', 'Stylesheet Structure')">
+  <xsl:value-of select="p"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="key('mykey', 'Expressions')/p">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="key('mykey', 'Patterns')">
+  <xsl:value-of select="p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey04.xml b/test/tests/conf/idkey/idkey04.xml
new file mode 100644
index 0000000..ed3a1e7
--- /dev/null
+++ b/test/tests/conf/idkey/idkey04.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 SYSTEM "t04.dtd">
+
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey04.xsl b/test/tests/conf/idkey/idkey04.xsl
new file mode 100644
index 0000000..539a246
--- /dev/null
+++ b/test/tests/conf/idkey/idkey04.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Purpose: Test for id(). -->
+
+<xsl:template match="t04">
+ <out>
+    <xsl:value-of select="id('c')/@id"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey05.xml b/test/tests/conf/idkey/idkey05.xml
new file mode 100644
index 0000000..bc58ca7
--- /dev/null
+++ b/test/tests/conf/idkey/idkey05.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section</p>
+	<q>1</q>
+  </div>
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section</p>
+	<q>2</q>
+  </div>
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section</p>
+	<q>3</q>
+  </div>
+  <div>
+    <title>Numbers</title>
+    <p>Num Section</p>
+	<q>3.7</q>
+  </div>
+</doc>
diff --git a/test/tests/conf/idkey/idkey05.xsl b/test/tests/conf/idkey/idkey05.xsl
new file mode 100644
index 0000000..efaf9fc
--- /dev/null
+++ b/test/tests/conf/idkey/idkey05.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 Keys -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:key, where value of use is a string constant. -->
+
+<xsl:key name="mykey1" match="div" use="'foo'"/>
+<xsl:key name="mykey2" match="div" use="number(q)"/>
+
+<xsl:template match="doc">
+  <out>
+     <xsl:value-of select="key('mykey1','foo' )/p"/><xsl:text>,</xsl:text>
+     <xsl:value-of select="key('mykey2', 1 )/p"/><xsl:text>,</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey06.xml b/test/tests/conf/idkey/idkey06.xml
new file mode 100644
index 0000000..a5f0322
--- /dev/null
+++ b/test/tests/conf/idkey/idkey06.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+<a/>
+<b/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey06.xsl b/test/tests/conf/idkey/idkey06.xsl
new file mode 100644
index 0000000..78ea4e7
--- /dev/null
+++ b/test/tests/conf/idkey/idkey06.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 Miscellaneous Additional Functions. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'generate-id()' - ensure same node generates same ID. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="generate-id(a)=generate-id(a)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey07.xml b/test/tests/conf/idkey/idkey07.xml
new file mode 100644
index 0000000..2dfd172
--- /dev/null
+++ b/test/tests/conf/idkey/idkey07.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc att="gulp">text1
+  <a/>
+  <b/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey07.xsl b/test/tests/conf/idkey/idkey07.xsl
new file mode 100644
index 0000000..6100ba6
--- /dev/null
+++ b/test/tests/conf/idkey/idkey07.xsl
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 Miscellaneous Additional Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of generate-id() uniqueness. -->
+  <!-- All IDs should be different. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="generate-id() = generate-id(a)">
+        <xsl:text>FAIL on parent-child 'a' element: </xsl:text>
+        <xsl:value-of select="generate-id()"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(a)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id() = generate-id(b)">
+        <xsl:text>FAIL on parent-child 'b' element: </xsl:text>
+        <xsl:value-of select="generate-id()"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(b)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(a) = generate-id(b)">
+        <xsl:text>FAIL on child 'a' to child 'b' element: </xsl:text>
+        <xsl:value-of select="generate-id(a)"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(b)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id() = generate-id(./@att)">
+        <xsl:text>FAIL on parent-attribute: </xsl:text>
+        <xsl:value-of select="generate-id()"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(./@att)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(./@att) = generate-id(a)">
+        <xsl:text>FAIL on attribute-child 'a' element: </xsl:text>
+        <xsl:value-of select="generate-id(./@att)"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(a)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(./@att) = generate-id(b)">
+        <xsl:text>FAIL on attribute-child 'b' element: </xsl:text>
+        <xsl:value-of select="generate-id(./@att)"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(b)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id() = generate-id(./text()[1])">
+        <xsl:text>FAIL on parent-text: </xsl:text>
+        <xsl:value-of select="generate-id()"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(./text()[1])"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(./text()[1]) = generate-id(a)">
+        <xsl:text>FAIL on text-child 'a' element: </xsl:text>
+        <xsl:value-of select="generate-id(./text()[1])"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(a)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(./text()[1]) = generate-id(b)">
+        <xsl:text>FAIL on text-child 'b' element: </xsl:text>
+        <xsl:value-of select="generate-id(./text()[1])"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(b)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(./@att) = generate-id(./text()[1])">
+        <xsl:text>FAIL on attribute-text: </xsl:text>
+        <xsl:value-of select="generate-id(./@att)"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(./text()[1])"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>Success</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey08.xml b/test/tests/conf/idkey/idkey08.xml
new file mode 100644
index 0000000..bc58ca7
--- /dev/null
+++ b/test/tests/conf/idkey/idkey08.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section</p>
+	<q>1</q>
+  </div>
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section</p>
+	<q>2</q>
+  </div>
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section</p>
+	<q>3</q>
+  </div>
+  <div>
+    <title>Numbers</title>
+    <p>Num Section</p>
+	<q>3.7</q>
+  </div>
+</doc>
diff --git a/test/tests/conf/idkey/idkey08.xsl b/test/tests/conf/idkey/idkey08.xsl
new file mode 100644
index 0000000..5a03cd2
--- /dev/null
+++ b/test/tests/conf/idkey/idkey08.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 Keys -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:key, where value of use is an integer. -->
+
+<xsl:key name="mykey" match="div" use="number(q)"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('mykey', 1 )/p"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="key('mykey', 3.0 )/p"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="key('mykey', 1+1 )/p"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="key('mykey', 3.7 )/p"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey09.xml b/test/tests/conf/idkey/idkey09.xml
new file mode 100644
index 0000000..e428d73
--- /dev/null
+++ b/test/tests/conf/idkey/idkey09.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey09.xsl b/test/tests/conf/idkey/idkey09.xsl
new file mode 100644
index 0000000..a3e763c
--- /dev/null
+++ b/test/tests/conf/idkey/idkey09.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id() behaving well when there is no DTD to designate an ID. -->
+
+  <!-- No exception expected, but output is just some blank lines. -->
+
+<xsl:template match="/">
+<out>
+  <xsl:value-of select="id('c')/@id"/>
+  <xsl:apply-templates/>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey10.xml b/test/tests/conf/idkey/idkey10.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey10.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey10.xsl b/test/tests/conf/idkey/idkey10.xsl
new file mode 100644
index 0000000..59d5bcf
--- /dev/null
+++ b/test/tests/conf/idkey/idkey10.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for match attribute being first in xsl:key. -->
+
+<xsl:key match="div" use="title" name="mykey" />
+
+<xsl:template match="doc">
+ <root>
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey11.xml b/test/tests/conf/idkey/idkey11.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey11.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey11.xsl b/test/tests/conf/idkey/idkey11.xsl
new file mode 100644
index 0000000..75b4150
--- /dev/null
+++ b/test/tests/conf/idkey/idkey11.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for use attribute being first in xsl:key. -->
+
+<xsl:key use="title" name="mykey" match="div" />
+
+<xsl:template match="doc">
+ <root>
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey12.xml b/test/tests/conf/idkey/idkey12.xml
new file mode 100644
index 0000000..79c688a
--- /dev/null
+++ b/test/tests/conf/idkey/idkey12.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+    <title>Second Title in Structure</title>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey12.xsl b/test/tests/conf/idkey/idkey12.xsl
new file mode 100644
index 0000000..70bade6
--- /dev/null
+++ b/test/tests/conf/idkey/idkey12.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:key matching multiple keys on same node. -->
+  <!-- "There can be multiple keys in a document with the same node, same key name,
+       but different key values." -->
+
+<xsl:key name="mykey" match="div" use="title" />
+
+<xsl:template match="doc">
+ <root>
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+  <xsl:value-of select="key('mykey', 'Second Title in Structure')/p"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey13.xml b/test/tests/conf/idkey/idkey13.xml
new file mode 100644
index 0000000..4e1949e
--- /dev/null
+++ b/test/tests/conf/idkey/idkey13.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Second Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey13.xsl b/test/tests/conf/idkey/idkey13.xsl
new file mode 100644
index 0000000..73739e2
--- /dev/null
+++ b/test/tests/conf/idkey/idkey13.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:key matching multiple nodes on same looked-up value. -->
+  <!-- "There can be multiple keys in a document with the same key name, same key value,
+       but different nodes." -->
+
+<xsl:key name="mykey" match="div" use="title" />
+
+<xsl:template match="doc">
+ <root>
+  <xsl:value-of select="count(div)" /> divisions:
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  The next key finds two divisions:
+  <xsl:for-each select="key('mykey', 'Expressions')">
+    <xsl:value-of select="p"/>
+  </xsl:for-each>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey15.xml b/test/tests/conf/idkey/idkey15.xml
new file mode 100644
index 0000000..e3ef851
--- /dev/null
+++ b/test/tests/conf/idkey/idkey15.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+    <div>
+      <title>Introduction</title>
+      <p>Intro to SS subsection.</p>
+    </div>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+
+  <appendix>
+    <title>Appendix Title</title>
+    <p>Appendix.</p>
+    <div>
+      <title>Introduction</title>
+      <p>Intro to Appendix.</p>
+    </div>
+  </appendix>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey15.xsl b/test/tests/conf/idkey/idkey15.xsl
new file mode 100644
index 0000000..2f61784
--- /dev/null
+++ b/test/tests/conf/idkey/idkey15.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:key where match nodes occur at different levels in the document. -->
+
+<xsl:key name="mykey" match="div" use="title" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(key('mykey', 'Introduction'))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey16.xml b/test/tests/conf/idkey/idkey16.xml
new file mode 100644
index 0000000..3be0af4
--- /dev/null
+++ b/test/tests/conf/idkey/idkey16.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <subdiv allow="no">
+      <title>Introduction</title>
+      <p>Intro Section.</p>
+    </subdiv>
+  </div>
+  
+  <div allow="yes">
+    <subdiv>
+      <title>Stylesheet Structure</title>
+      <p>SS Section.</p>
+    </subdiv>
+  </div>
+  
+  <div allow="yes">
+    <subdiv>
+      <title>Expressions</title>
+      <p>Exp Section.</p>
+    </subdiv>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey16.xsl b/test/tests/conf/idkey/idkey16.xsl
new file mode 100644
index 0000000..4f48425
--- /dev/null
+++ b/test/tests/conf/idkey/idkey16.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for three keyspaces using the same nodes as keys. -->
+
+<xsl:key name="bigspace" match="div" use="subdiv/title" />
+<xsl:key name="smallspace" match="subdiv" use="title" />
+<xsl:key name="filterspace" match="div[@allow='yes']" use="subdiv/title" />
+
+<xsl:template match="doc">
+ <root>
+  <xsl:value-of select="key('bigspace', 'Introduction')/subdiv/p"/>
+  <xsl:value-of select="key('bigspace', 'Stylesheet Structure')/subdiv/p"/>
+  <xsl:value-of select="key('bigspace', 'Expressions')/subdiv/p"/><xsl:text>
+</xsl:text>
+  <xsl:value-of select="key('smallspace', 'Introduction')/p"/>
+  <xsl:value-of select="key('smallspace', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('smallspace', 'Expressions')/p"/><xsl:text>
+</xsl:text>
+  <xsl:value-of select="key('filterspace', 'Introduction')/subdiv/p"/>
+  <xsl:value-of select="key('filterspace', 'Stylesheet Structure')/subdiv/p"/>
+  <xsl:value-of select="key('filterspace', 'Expressions')/subdiv/p"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey17.xml b/test/tests/conf/idkey/idkey17.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey17.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey17.xsl b/test/tests/conf/idkey/idkey17.xsl
new file mode 100644
index 0000000..5dbbe8d
--- /dev/null
+++ b/test/tests/conf/idkey/idkey17.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test key() with a node-set as second argument. -->
+
+  <!-- "When the second argument to key is of type node-set,
+       then the result is the union of the result of applying
+       the key function to the string value of each of
+       the nodes in the argument node-set." -->
+
+<xsl:key name="mykey" match="div" use="title" />
+
+<xsl:template match="doc">
+ <root>
+  <xsl:for-each select="key('mykey',*//title)">
+    <xsl:value-of select="p"/>
+  </xsl:for-each>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey18.xml b/test/tests/conf/idkey/idkey18.xml
new file mode 100644
index 0000000..d7b369e
--- /dev/null
+++ b/test/tests/conf/idkey/idkey18.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+Blah blah blah.
+Blah blah blah.
+For details, see <bibref>XSLT</bibref>.
+Blah blah blah.
+For details, see <bibref>XML</bibref>.
+Blah blah blah.
+Blah blah blah.
+For details, see <bibref>XPath</bibref>.
+Blah blah blah.
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey18.xsl b/test/tests/conf/idkey/idkey18.xsl
new file mode 100644
index 0000000..9ac261b
--- /dev/null
+++ b/test/tests/conf/idkey/idkey18.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test combination of key() and document() as suggested in spec. -->
+
+<xsl:key name="bib" match="entry" use="@name" />
+
+<xsl:template match="doc">
+ <root>
+  <xsl:apply-templates/>
+ </root>
+</xsl:template>
+
+<xsl:template match="bibref">
+  <xsl:variable name="lookup" select="."/>
+  <xsl:for-each select="document('bib.xml')">
+    <xsl:apply-templates select="key('bib',$lookup)"/>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey19.xml b/test/tests/conf/idkey/idkey19.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey19.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey19.xsl b/test/tests/conf/idkey/idkey19.xsl
new file mode 100644
index 0000000..5d53552
--- /dev/null
+++ b/test/tests/conf/idkey/idkey19.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz="http://xsl.lotus.com/ns1">
+
+  <!-- FileName: idkey19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:key and key() with a qualified name. -->
+
+<xsl:key name="baz:mykey" match="div" use="title"/>
+
+<xsl:template match="doc">
+  <root>
+    <xsl:value-of select="key('baz:mykey', 'Introduction')/p"/><xsl:text> </xsl:text>
+    <xsl:value-of select="key('baz:mykey', 'Stylesheet Structure')/p"/><xsl:text> </xsl:text>
+    <xsl:value-of select="key('baz:mykey', 'Expressions')/p"/>
+  </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey20.xml b/test/tests/conf/idkey/idkey20.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey20.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey20.xsl b/test/tests/conf/idkey/idkey20.xsl
new file mode 100644
index 0000000..b034719
--- /dev/null
+++ b/test/tests/conf/idkey/idkey20.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 1999116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:key being imported. -->
+
+<xsl:import href="impidky20.xsl"/>
+
+<xsl:template match="doc">
+ <root>
+    <xsl:value-of select="key('mykey', 'Introduction')/p"/><xsl:text> </xsl:text>
+    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/><xsl:text> </xsl:text>
+    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey21.xml b/test/tests/conf/idkey/idkey21.xml
new file mode 100644
index 0000000..1e58312
--- /dev/null
+++ b/test/tests/conf/idkey/idkey21.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<doc>
+  <div mark="0">
+    <title>Introduction</title>
+    <finder>0</finder>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div mark="2">
+    <title>Expressions</title>
+    <finder>1</finder>
+    <p>Exp Section.</p>
+  </div>
+
+  <div mark="5">
+    <title>Stylesheet Structure</title>
+    <finder>2</finder>
+    <p>SS Section.</p>
+  </div>
+  
+  <div mark="1">
+    <title>Expressions</title>
+    <finder>3</finder>
+    <p>Second Exp Section.</p>
+  </div>
+
+  <div mark="3">
+    <title>Stylesheet Processing</title>
+    <finder>4</finder>
+    <p>SP Section.</p>
+  </div>
+  
+  <div mark="4">
+    <title>Expressions</title>
+    <finder>5</finder>
+    <p>Third Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey21.xsl b/test/tests/conf/idkey/idkey21.xsl
new file mode 100644
index 0000000..f24182a
--- /dev/null
+++ b/test/tests/conf/idkey/idkey21.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for nested calls to key() function. -->
+
+<xsl:key name="titles" match="div" use="title" />
+<xsl:key name="marks" match="div" use="@mark" />
+
+<xsl:template match="doc">
+ <root>
+  The next key finds three divisions:
+  <xsl:for-each select="key('marks',key('titles', 'Expressions')/finder)">
+    <xsl:value-of select="p"/>
+  </xsl:for-each>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey22.xml b/test/tests/conf/idkey/idkey22.xml
new file mode 100644
index 0000000..d9522b5
--- /dev/null
+++ b/test/tests/conf/idkey/idkey22.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!-- Test for ID selection and pattern matching -->
+<!DOCTYPE doc [
+  <!ELEMENT doc (#PCDATA|a|b|c)*>
+  <!ATTLIST doc id ID #REQUIRED>
+  <!ELEMENT a (#PCDATA|a|b|c)*>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA|a|b|c)*>
+  <!ATTLIST b id ID #REQUIRED>
+  <!ELEMENT c (#PCDATA|a|b|c)*>
+  <!ATTLIST c id ID #REQUIRED >
+]>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <a id="id2">*id2*
+      <a id="id3">*id3*</a>
+      <b id="id4">*id4*</b>
+      <c id="id5">*id5*</c>
+    </a>
+    <b id="id6">*id6*</b>
+    <c id="id7">*id7*</c>
+  </a>
+  <b id="id8">
+    *id8*
+    <a id="id9">*id9*</a>
+    <b id="id10">*id10*
+      <a id="id11">*id11*</a>
+      <b id="id12">*id12*</b>
+      <c id="id13">*id13*</c>
+    </b>
+    <c id="id14">*id14*</c>
+  </b>
+  <c id="id15">
+    *id15*
+    <a id="id16">*id16*</a>
+    <b id="id17">*id17*</b>
+    <c id="id18">*id18*
+      <a id="id19">*id19*</a>
+    </c>
+  </c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey22.xsl b/test/tests/conf/idkey/idkey22.xsl
new file mode 100644
index 0000000..4dbe1ce
--- /dev/null
+++ b/test/tests/conf/idkey/idkey22.xsl
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston (original idea sent in by user) -->
+  <!-- Purpose: Test for id() in complex structure. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  Test for id selection and pattern matching...
+  Next line should read: -*id17*-    <!-- No id() either end -->
+  <xsl:apply-templates select="c/b"/>
+  Next line should read: (*id14*)    <!-- id() below but not here -->
+  <xsl:apply-templates select="b/c"/>
+  Next line should read: -*id4*-     <!-- id() here on apply but not below -->
+  <xsl:apply-templates select="id('id4')"/>
+  Next line should read: +*id9*+     <!-- id() same on both ends -->
+  <xsl:apply-templates select="id('id9')"/>
+  Next line should read: (*id13*)    <!-- simple id() here, path off top-level id() below -->
+  <xsl:apply-templates select="id('id13')"/>
+  Next line should read: -*id6*-     <!-- path off top-level id() here but not below -->
+  <xsl:apply-templates select="id('id0')/a/b"/>
+  Next line should read: @*id19*@    <!-- same path off top-level id() here and below -->
+  <xsl:apply-templates select="id('id0')/c/c/a"/>
+  Next line should read: %*id12*%    <!-- different paths off id() here and below -->
+  <xsl:apply-templates select="id('id8')/b/b"/>
+  Next line should read: !*id11*!    <!-- different paths off id(), middle here and top-level below -->
+  <xsl:apply-templates select="id('id10')/a"/>
+  Next line should read: [*id3*] \*id5*\ =*id16*=  <!-- union of id()-based paths -->
+  <xsl:apply-templates select="id('id2')/a | id('id5') | id('id15')/a"/>
+</xsl:template>
+
+<!-- Now the templates for the specific cases -->
+
+<xsl:template match="c">
+  Error if this (c) template fires!
+</xsl:template>
+
+<xsl:template match="b">
+  -<xsl:apply-templates/>-
+</xsl:template>
+
+<xsl:template match="id('id5')">
+  \<xsl:apply-templates/>\
+</xsl:template>
+
+<xsl:template match="id('id9')">
+  +<xsl:apply-templates/>+
+</xsl:template>
+
+<xsl:template match="id('id16')">
+  =<xsl:apply-templates/>=
+</xsl:template>
+
+<xsl:template match="id('id0')/a/a/a">
+  [<xsl:apply-templates/>]
+</xsl:template>
+
+<xsl:template match="id('id0')/b/b/a">
+  !<xsl:apply-templates/>!
+</xsl:template>
+
+<xsl:template match="id('id0')/c/c/a">
+  @<xsl:apply-templates/>@
+</xsl:template>
+
+<xsl:template match="id('id8')//b" priority="1">
+  %<xsl:apply-templates/>%
+</xsl:template>
+
+<xsl:template match="id('id8')//c" priority="2">
+  (<xsl:apply-templates/>)
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey23.xml b/test/tests/conf/idkey/idkey23.xml
new file mode 100644
index 0000000..cbd036f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey23.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 [
+  <!ELEMENT t04 (a*)>
+  <!ELEMENT a EMPTY>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey23.xsl b/test/tests/conf/idkey/idkey23.xsl
new file mode 100644
index 0000000..1573d1a
--- /dev/null
+++ b/test/tests/conf/idkey/idkey23.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey23 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id() with a non-matching value. -->
+
+<xsl:template match="/">
+  <P><xsl:value-of select="id('nomatch')/@id"/></P>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey24.xml b/test/tests/conf/idkey/idkey24.xml
new file mode 100644
index 0000000..cbd036f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey24.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 [
+  <!ELEMENT t04 (a*)>
+  <!ELEMENT a EMPTY>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey24.xsl b/test/tests/conf/idkey/idkey24.xsl
new file mode 100644
index 0000000..260d65b
--- /dev/null
+++ b/test/tests/conf/idkey/idkey24.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id(string), where string is a whitespace-separated list of values. -->
+
+<xsl:template match="/">
+  <n>
+    <xsl:for-each select="id('d b c')">
+      <xsl:value-of select="./@id"/>
+    </xsl:for-each>
+  </n>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey25.xml b/test/tests/conf/idkey/idkey25.xml
new file mode 100644
index 0000000..3be0af4
--- /dev/null
+++ b/test/tests/conf/idkey/idkey25.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <subdiv allow="no">
+      <title>Introduction</title>
+      <p>Intro Section.</p>
+    </subdiv>
+  </div>
+  
+  <div allow="yes">
+    <subdiv>
+      <title>Stylesheet Structure</title>
+      <p>SS Section.</p>
+    </subdiv>
+  </div>
+  
+  <div allow="yes">
+    <subdiv>
+      <title>Expressions</title>
+      <p>Exp Section.</p>
+    </subdiv>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey25.xsl b/test/tests/conf/idkey/idkey25.xsl
new file mode 100644
index 0000000..e7a85d1
--- /dev/null
+++ b/test/tests/conf/idkey/idkey25.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for variable as first argument to key(). -->
+
+<xsl:output indent="yes"/>
+
+<xsl:variable name="keysp">bigspace</xsl:variable>
+
+<xsl:key name="bigspace" match="div" use="subdiv/title" />
+<xsl:key name="smallspace" match="subdiv" use="title" />
+<xsl:key name="filterspace" match="div[@allow='yes']" use="subdiv/title" />
+
+<xsl:template match="doc">
+ <root>
+  Using keyspace <xsl:value-of select="$keysp"/>...
+  <xsl:value-of select="key($keysp, 'Introduction')/subdiv/p"/>
+  <xsl:value-of select="key($keysp, 'Stylesheet Structure')/subdiv/p"/>
+  <xsl:value-of select="key($keysp, 'Expressions')/subdiv/p"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey26.xml b/test/tests/conf/idkey/idkey26.xml
new file mode 100644
index 0000000..0738d9f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey26.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE main [
+  <!ELEMENT main (a*,b*)>
+  <!ELEMENT a (#PCDATA)>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA)>
+]>
+<main>
+  <a id="w">W</a>
+  <a id="x">X</a>
+  <a id="y">Y</a>
+  <a id="z">Z</a>
+  <b>y</b>
+  <b>w</b>
+  <b>x</b>
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey26.xsl b/test/tests/conf/idkey/idkey26.xsl
new file mode 100644
index 0000000..b08b44b
--- /dev/null
+++ b/test/tests/conf/idkey/idkey26.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey26 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id(node-set), where node-set has multiple values. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="id(main/b)">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey27.xml b/test/tests/conf/idkey/idkey27.xml
new file mode 100644
index 0000000..14086e2
--- /dev/null
+++ b/test/tests/conf/idkey/idkey27.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section</p>
+  </div>
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section</p>
+  </div>
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section</p>
+  </div>
+  <div>
+    <title/>
+    <p>Untitled Section</p>
+  </div>
+  <div>
+    <title>Sorting</title>
+    <p>Sort Section</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey27.xsl b/test/tests/conf/idkey/idkey27.xsl
new file mode 100644
index 0000000..35bb792
--- /dev/null
+++ b/test/tests/conf/idkey/idkey27.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test whether blank keying (use) value works or is ignored. -->
+
+<xsl:key name="mykey" match="div" use="title"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:value-of select="key('mykey','Introduction')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','Stylesheet Structure')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','Expressions')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','Sorting')/p"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey28.xml b/test/tests/conf/idkey/idkey28.xml
new file mode 100644
index 0000000..692af75
--- /dev/null
+++ b/test/tests/conf/idkey/idkey28.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<doc>
+  <div title="Introduction">
+    <p>Intro Section</p>
+  </div>
+  <div title="Stylesheet Structure">
+    <p>SS Section</p>
+  </div>
+  <div title="">
+    <p>Untitled Section</p>
+  </div>
+  <div title="Expressions">
+    <p>Exp Section</p>
+  </div>
+  <div title="Sorting">
+    <p>Sort Section</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey28.xsl b/test/tests/conf/idkey/idkey28.xsl
new file mode 100644
index 0000000..909a855
--- /dev/null
+++ b/test/tests/conf/idkey/idkey28.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test whether blank keying (use) value works when it's an attribute. -->
+
+<xsl:key name="mykey" match="div" use="@title"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:value-of select="key('mykey','Introduction')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','Stylesheet Structure')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','Expressions')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','')/p"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','Sorting')/p"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey29.xml b/test/tests/conf/idkey/idkey29.xml
new file mode 100644
index 0000000..2bea44e
--- /dev/null
+++ b/test/tests/conf/idkey/idkey29.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <div title="Introduction">Intro Section</div>
+  <div title="Stylesheet Structure">SS Section</div>
+  <div title="(none)"> </div>
+  <div title="Expressions">Exp Section</div>
+  <div title="Sorting">Sort Section</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey29.xsl b/test/tests/conf/idkey/idkey29.xsl
new file mode 100644
index 0000000..ed1a993
--- /dev/null
+++ b/test/tests/conf/idkey/idkey29.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use content of an element as the "use" value. -->
+
+<xsl:key name="mykey" match="div" use="text()"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:value-of select="key('mykey','Intro Section')/@title"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','SS Section')/@title"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','Exp Section')/@title"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey',' ')/@title"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="key('mykey','Sort Section')/@title"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey30.xml b/test/tests/conf/idkey/idkey30.xml
new file mode 100644
index 0000000..efc3980
--- /dev/null
+++ b/test/tests/conf/idkey/idkey30.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<doc>
+  <side att="view"><!-- This is the side comment -->text-in-side<?s-pi side ?></side>
+  <begin bat="top"><?a-pi some data?>
+  <!-- This is the 2nd comment -->
+  text-in-begin
+  <inner blat="blob">
+    inner-text
+    <!-- This is the 3rd comment -->
+    <sub latte="glub">subtext</sub>
+  </inner>
+  text-in-begin2
+  </begin>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey30.xsl b/test/tests/conf/idkey/idkey30.xsl
new file mode 100644
index 0000000..8cc9156
--- /dev/null
+++ b/test/tests/conf/idkey/idkey30.xsl
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 Miscellaneous Additional Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that 'generate-id()' on various kinds of nodes yields unique values for each -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <!-- Get in position so we have nodes on the following axis. -->
+    <xsl:apply-templates select="side"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="side">
+  <!-- Build up a string containing generated IDs for nodes on the following axis, plus attributes they carry. -->
+  <xsl:variable name="accumulated">
+    <!-- Since call-template doesn't change context, iterate by position number. -->
+    <xsl:call-template name="nextnode">
+      <xsl:with-param name="this" select="1" />
+      <xsl:with-param name="max" select="count(following::node()|following::*/@*)" />
+      <xsl:with-param name="idset" select="'+'" />
+      <!-- Use + as delimiter to avoid spoofs from adjacent strings.
+           Returned string from generate-id() can't contain +. -->
+    </xsl:call-template>
+  </xsl:variable>
+  <!-- Summary data, so we have output when we pass. -->
+  <xsl:text>Number of IDs accumulated: </xsl:text>
+  <xsl:value-of select="count(following::node()|following::*/@*)"/>
+  <!-- Now, take one node of each kind, whose generated ID should not be in the accumulated string,
+    surround generated ID by + to avoid substring matches, and see if it's in there. -->
+  <!-- Now see if we duplicated an ID with the root -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(/),'+'))">
+    <xsl:text>FAIL on root node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(/)"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the element -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(.),'+'))">
+    <xsl:text>FAIL on side node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(.)"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the attribute -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./@att),'+'))">
+    <xsl:text>FAIL on side/@att node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./@att)"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the text node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./text()),'+'))">
+    <xsl:text>FAIL on side/text() node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./text())"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the comment node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./comment()),'+'))">
+    <xsl:text>FAIL on side/comment() node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./comment())"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the PI node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./processing-instruction('s-pi')),'+'))">
+    <xsl:text>FAIL on side/processing-instruction('s-pi') node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./processing-instruction('s-pi'))"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with a namespace node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./namespace::*[1]),'+'))">
+    <xsl:text>FAIL on side/namespace::*[1] node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./namespace::*[1])"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="nextnode">
+  <xsl:param name="this"/>
+  <xsl:param name="max"/>
+  <xsl:param name="idset"/>
+  <!-- Params this and max are index numbers, idset is the string we're accumulating. -->
+  <xsl:variable name="this-id" select="generate-id((following::node()|following::*/@*)[position() = $this])"/>
+  <xsl:choose>
+    <xsl:when test="$this &lt;= $max">
+      <!-- Recurse, adding current ID to string of all IDs on "begin" sub-tree, with separators -->
+      <xsl:call-template name="nextnode">
+        <xsl:with-param name="this" select="$this+1" />
+        <xsl:with-param name="max" select="$max" />
+        <xsl:with-param name="idset" select="concat($idset,$this-id,'+')" />
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- "return" the final idset -->
+      <xsl:value-of select="$idset"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey31.xml b/test/tests/conf/idkey/idkey31.xml
new file mode 100644
index 0000000..14b0087
--- /dev/null
+++ b/test/tests/conf/idkey/idkey31.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<docs>
+  <doc xmlns:ext="http://somebody.elses.extension">
+    <section xmlns:foo="http://foo.com">
+      <inner xmlns:whiz="http://whiz.com/special/page" att="view"><!-- Inner comment -->inner
+text<?s-pi side ?></inner>
+    </section>
+  </doc>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey31.xsl b/test/tests/conf/idkey/idkey31.xsl
new file mode 100644
index 0000000..5702cfb
--- /dev/null
+++ b/test/tests/conf/idkey/idkey31.xsl
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey31 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 Miscellaneous Additional Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'generate-id()' on namespace nodes -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+  <!-- Build up a string containing generated IDs for nodes on the namespace axes of self and all lower elements. -->
+  <xsl:variable name="accumulated">
+    <!-- Since call-template doesn't change context, iterate by position number. -->
+    <xsl:call-template name="nextnode">
+      <xsl:with-param name="this" select="1" />
+      <xsl:with-param name="max" select="count(descendant-or-self::*/namespace::*)" />
+      <xsl:with-param name="idset" select="'+'" />
+      <!-- Use + as delimiter to avoid spoofs from adjacent strings.
+           Returned string from generate-id() can't contain +. -->
+    </xsl:call-template>
+  </xsl:variable>
+  <!-- Summary data, so we have output when we pass. -->
+  <xsl:text>Number of IDs accumulated: </xsl:text>
+  <xsl:value-of select="count(descendant-or-self::*/namespace::*)"/>
+  <!-- Now, take one node of each kind, whose generated ID should not be in the accumulated string,
+    surround generated ID by + to avoid substring matches, and see if it's in there. -->
+  <!-- Now see if we duplicated an ID with the root -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(/),'+'))">
+    <xsl:text>FAIL on root node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(/)"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the element -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(.),'+'))">
+    <xsl:text>FAIL on side node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(.)"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the attribute -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./@att),'+'))">
+    <xsl:text>FAIL on side/@att node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./@att)"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the text node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./text()),'+'))">
+    <xsl:text>FAIL on side/text() node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./text())"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the comment node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./comment()),'+'))">
+    <xsl:text>FAIL on side/comment() node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./comment())"/>
+  </xsl:if>
+  <!-- Now see if we duplicated an ID with the PI node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./processing-instruction('s-pi')),'+'))">
+    <xsl:text>FAIL on side/processing-instruction('s-pi') node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./processing-instruction('s-pi'))"/>
+  </xsl:if>
+  </out>
+</xsl:template>
+
+<xsl:template name="nextnode">
+  <xsl:param name="this"/>
+  <xsl:param name="max"/>
+  <xsl:param name="idset"/>
+  <!-- Params this and max are index numbers, idset is the string we're accumulating. -->
+  <xsl:variable name="this-id" select="generate-id((descendant-or-self::*/namespace::*)[position() = $this])"/>
+  <xsl:choose>
+    <xsl:when test="$this &lt;= $max">
+      <!-- Recurse, adding current ID to string of all IDs of namespace nodes, with separators -->
+      <xsl:call-template name="nextnode">
+        <xsl:with-param name="this" select="$this+1" />
+        <xsl:with-param name="max" select="$max" />
+        <xsl:with-param name="idset" select="concat($idset,$this-id,'+')" />
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- "return" the final idset -->
+      <xsl:value-of select="$idset"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey32.xml b/test/tests/conf/idkey/idkey32.xml
new file mode 100644
index 0000000..4b24352
--- /dev/null
+++ b/test/tests/conf/idkey/idkey32.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<doc>
+<monthtab>
+  <entry><name>Jan</name><number>1</number></entry>
+  <entry><name>January</name><number>1</number></entry>
+  <entry><name>Feb</name><number>2</number></entry>
+  <entry><name>February</name><number>2</number></entry>
+  <entry><name>Mar</name><number>3</number></entry>
+  <entry><name>March</name><number>3</number></entry>
+  <entry><name>Apr</name><number>4</number></entry>
+  <entry><name>April</name><number>4</number></entry>
+  <entry><name>May</name><number>5</number></entry>
+  <entry><name>Jun</name><number>6</number></entry>
+  <entry><name>June</name><number>6</number></entry>
+  <entry><name>Jul</name><number>7</number></entry>
+  <entry><name>July</name><number>7</number></entry>
+  <entry><name>Aug</name><number>8</number></entry>
+  <entry><name>August</name><number>8</number></entry>
+  <entry><name>Sep</name><number>9</number></entry>
+  <entry><name>Sept</name><number>9</number></entry>
+  <entry><name>September</name><number>9</number></entry>
+  <entry><name>Oct</name><number>10</number></entry>
+  <entry><name>October</name><number>10</number></entry>
+  <entry><name>Nov</name><number>11</number></entry>
+  <entry><name>November</name><number>11</number></entry>
+  <entry><name>Dec</name><number>12</number></entry>
+  <entry><name>December</name><number>12</number></entry>
+</monthtab>
+  <birthday person="Linda"><month>Apr</month><day>22</day></birthday>
+  <birthday person="Marie"><month>September</month><day>9</day></birthday>
+  <birthday person="Lisa"><month>March</month><day>31</day></birthday>
+  <birthday person="Harry"><month>Sep</month><day>16</day></birthday>
+  <birthday person="Ginny"><month>Jan</month><day>22</day></birthday>
+  <birthday person="Pedro"><month>November</month><day>2</day></birthday>
+  <birthday person="Bill"><month>Apr</month><day>4</day></birthday>
+  <birthday person="Frida"><month>July</month><day>5</day></birthday>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey32.xsl b/test/tests/conf/idkey/idkey32.xsl
new file mode 100644
index 0000000..4225185
--- /dev/null
+++ b/test/tests/conf/idkey/idkey32.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey32 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use key() for sorting with apply-templates. -->
+
+<xsl:key name="MonthNum" match="monthtab/entry/number" use="../name" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>Birthdays in chronological order...
+</xsl:text>
+    <xsl:apply-templates select="birthday">
+      <xsl:sort select="key('MonthNum',month)" data-type="number" />
+      <xsl:sort select="day" data-type="number" />
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="birthday">
+  <xsl:value-of select="@person"/><xsl:text>: </xsl:text>
+  <xsl:value-of select="month"/><xsl:text> </xsl:text>
+  <xsl:value-of select="day"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey33.xml b/test/tests/conf/idkey/idkey33.xml
new file mode 100644
index 0000000..4b24352
--- /dev/null
+++ b/test/tests/conf/idkey/idkey33.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<doc>
+<monthtab>
+  <entry><name>Jan</name><number>1</number></entry>
+  <entry><name>January</name><number>1</number></entry>
+  <entry><name>Feb</name><number>2</number></entry>
+  <entry><name>February</name><number>2</number></entry>
+  <entry><name>Mar</name><number>3</number></entry>
+  <entry><name>March</name><number>3</number></entry>
+  <entry><name>Apr</name><number>4</number></entry>
+  <entry><name>April</name><number>4</number></entry>
+  <entry><name>May</name><number>5</number></entry>
+  <entry><name>Jun</name><number>6</number></entry>
+  <entry><name>June</name><number>6</number></entry>
+  <entry><name>Jul</name><number>7</number></entry>
+  <entry><name>July</name><number>7</number></entry>
+  <entry><name>Aug</name><number>8</number></entry>
+  <entry><name>August</name><number>8</number></entry>
+  <entry><name>Sep</name><number>9</number></entry>
+  <entry><name>Sept</name><number>9</number></entry>
+  <entry><name>September</name><number>9</number></entry>
+  <entry><name>Oct</name><number>10</number></entry>
+  <entry><name>October</name><number>10</number></entry>
+  <entry><name>Nov</name><number>11</number></entry>
+  <entry><name>November</name><number>11</number></entry>
+  <entry><name>Dec</name><number>12</number></entry>
+  <entry><name>December</name><number>12</number></entry>
+</monthtab>
+  <birthday person="Linda"><month>Apr</month><day>22</day></birthday>
+  <birthday person="Marie"><month>September</month><day>9</day></birthday>
+  <birthday person="Lisa"><month>March</month><day>31</day></birthday>
+  <birthday person="Harry"><month>Sep</month><day>16</day></birthday>
+  <birthday person="Ginny"><month>Jan</month><day>22</day></birthday>
+  <birthday person="Pedro"><month>November</month><day>2</day></birthday>
+  <birthday person="Bill"><month>Apr</month><day>4</day></birthday>
+  <birthday person="Frida"><month>July</month><day>5</day></birthday>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey33.xsl b/test/tests/conf/idkey/idkey33.xsl
new file mode 100644
index 0000000..e309bc6
--- /dev/null
+++ b/test/tests/conf/idkey/idkey33.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey33 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use key() for sorting in for-each. -->
+
+<xsl:key name="MonthNum" match="monthtab/entry/number" use="../name" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>Birthdays as found...
+</xsl:text>
+    <xsl:for-each select="birthday">
+      <xsl:value-of select="@person"/><xsl:text>: </xsl:text>
+      <xsl:value-of select="month"/><xsl:text> </xsl:text>
+      <xsl:value-of select="day"/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+Birthdays in chronological order...
+</xsl:text>
+    <xsl:for-each select="birthday">
+      <xsl:sort select="key('MonthNum',month)" data-type="number" />
+      <xsl:sort select="day" data-type="number" />
+      <xsl:value-of select="@person"/><xsl:text>: </xsl:text>
+      <xsl:value-of select="month"/><xsl:text> </xsl:text>
+      <xsl:value-of select="day"/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey34.xml b/test/tests/conf/idkey/idkey34.xml
new file mode 100644
index 0000000..610e364
--- /dev/null
+++ b/test/tests/conf/idkey/idkey34.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<doc>
+  <p>The whole document.</p>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+    <body>Deeper
+      <p>Body of Intro.</p>junk
+    </body>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+    <div>
+      <title>Introduction</title>
+      <p>Intro to SS subsection.</p>
+      <body>Deeper
+        <p>Body of SS Intro.</p>junk
+      </body>
+    </div>
+    <body>Deeper
+      <p>Body of SS.</p>junk
+    </body>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+    <body>Deeper
+      <p>Body of Exp.</p>junk
+    </body>
+  </div>
+
+  <appendix>
+    <title>Appendix Title</title>
+    <p>Appendix.</p>
+    <div>
+      <title>Introduction</title>
+      <p>Intro to Appendix.</p>
+      <body>Deeper
+        <Sect1>Into 1
+          <p>Body of App1.</p>junk
+        </Sect1>
+        <Sect2>Into 2
+          <p>Body of App2.</p>junk
+        </Sect2>
+        <Sect3>Into 3
+          <sub>Further Into 3
+            <p>Body of App3sub.</p>junk
+          </sub>Coming back
+        </Sect3>Back
+      </body>Back to div
+    </div>Out of div
+  </appendix>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey34.xsl b/test/tests/conf/idkey/idkey34.xsl
new file mode 100644
index 0000000..eb4ba26
--- /dev/null
+++ b/test/tests/conf/idkey/idkey34.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey34 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test descendants of node-set from key(). -->
+
+<xsl:key name="mykey" match="div" use="title" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="key('mykey', 'Introduction')//p">
+      <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey35.xml b/test/tests/conf/idkey/idkey35.xml
new file mode 100644
index 0000000..610e364
--- /dev/null
+++ b/test/tests/conf/idkey/idkey35.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<doc>
+  <p>The whole document.</p>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+    <body>Deeper
+      <p>Body of Intro.</p>junk
+    </body>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+    <div>
+      <title>Introduction</title>
+      <p>Intro to SS subsection.</p>
+      <body>Deeper
+        <p>Body of SS Intro.</p>junk
+      </body>
+    </div>
+    <body>Deeper
+      <p>Body of SS.</p>junk
+    </body>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+    <body>Deeper
+      <p>Body of Exp.</p>junk
+    </body>
+  </div>
+
+  <appendix>
+    <title>Appendix Title</title>
+    <p>Appendix.</p>
+    <div>
+      <title>Introduction</title>
+      <p>Intro to Appendix.</p>
+      <body>Deeper
+        <Sect1>Into 1
+          <p>Body of App1.</p>junk
+        </Sect1>
+        <Sect2>Into 2
+          <p>Body of App2.</p>junk
+        </Sect2>
+        <Sect3>Into 3
+          <sub>Further Into 3
+            <p>Body of App3sub.</p>junk
+          </sub>Coming back
+        </Sect3>Back
+      </body>Back to div
+    </div>Out of div
+  </appendix>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey35.xsl b/test/tests/conf/idkey/idkey35.xsl
new file mode 100644
index 0000000..dc76aac
--- /dev/null
+++ b/test/tests/conf/idkey/idkey35.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test descendants of node-set from key() in a match pattern. -->
+
+<xsl:key name="mykey" match="div" use="title" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="div">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="key('mykey','Introduction')//p">
+  <xsl:text>Found target p: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey36.xml b/test/tests/conf/idkey/idkey36.xml
new file mode 100644
index 0000000..3be0af4
--- /dev/null
+++ b/test/tests/conf/idkey/idkey36.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <subdiv allow="no">
+      <title>Introduction</title>
+      <p>Intro Section.</p>
+    </subdiv>
+  </div>
+  
+  <div allow="yes">
+    <subdiv>
+      <title>Stylesheet Structure</title>
+      <p>SS Section.</p>
+    </subdiv>
+  </div>
+  
+  <div allow="yes">
+    <subdiv>
+      <title>Expressions</title>
+      <p>Exp Section.</p>
+    </subdiv>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey36.xsl b/test/tests/conf/idkey/idkey36.xsl
new file mode 100644
index 0000000..d3f6a06
--- /dev/null
+++ b/test/tests/conf/idkey/idkey36.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for three keyspaces, some being imported. -->
+
+<xsl:import href="impidk36a.xsl"/>
+
+<xsl:key name="filterspace" match="div[@allow='yes']" use="subdiv/title" />
+
+<xsl:template match="doc">
+ <root><xsl:text>
+bigspace...</xsl:text>
+  <xsl:value-of select="key('bigspace', 'Introduction')/subdiv/p"/>
+  <xsl:value-of select="key('bigspace', 'Stylesheet Structure')/subdiv/p"/>
+  <xsl:value-of select="key('bigspace', 'Expressions')/subdiv/p"/><xsl:text>
+smallspace...</xsl:text>
+  <xsl:value-of select="key('smallspace', 'Introduction')/p"/>
+  <xsl:value-of select="key('smallspace', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('smallspace', 'Expressions')/p"/><xsl:text>
+filterspace...</xsl:text>
+  <xsl:value-of select="key('filterspace', 'Introduction')/subdiv/p"/>
+  <xsl:value-of select="key('filterspace', 'Stylesheet Structure')/subdiv/p"/>
+  <xsl:value-of select="key('filterspace', 'Expressions')/subdiv/p"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey37.xml b/test/tests/conf/idkey/idkey37.xml
new file mode 100644
index 0000000..a66a0fd
--- /dev/null
+++ b/test/tests/conf/idkey/idkey37.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE tee [
+  <!ELEMENT tee (s*)>
+  <!ELEMENT s (r)>
+  <!ELEMENT r EMPTY>
+  <!ATTLIST s id ID #REQUIRED>
+  <!ATTLIST r size CDATA #REQUIRED>
+]>
+<tee>
+  <s id="a"><r size="20"/></s>
+  <s id="b"><r size="18"/></s>
+  <s id="c"><r size="12"/></s>
+  <s id="d"><r size="19"/></s>
+  <s id="e"><r size="14"/></s>
+</tee>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey37.xsl b/test/tests/conf/idkey/idkey37.xsl
new file mode 100644
index 0000000..259270e
--- /dev/null
+++ b/test/tests/conf/idkey/idkey37.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test id(list) filtered by a predicate, in a match pattern. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="tee/s">
+      <xsl:apply-templates select="r"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="id('b d c')/*[@size &gt; 17]" priority="2">
+  <xsl:text>&#10;</xsl:text>
+  <big><xsl:value-of select="../@id"/></big>
+</xsl:template>
+
+<xsl:template match="r" priority="1">
+  <xsl:text>&#10;</xsl:text>
+  <other><xsl:value-of select="../@id"/></other>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey38.xml b/test/tests/conf/idkey/idkey38.xml
new file mode 100644
index 0000000..a66a0fd
--- /dev/null
+++ b/test/tests/conf/idkey/idkey38.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE tee [
+  <!ELEMENT tee (s*)>
+  <!ELEMENT s (r)>
+  <!ELEMENT r EMPTY>
+  <!ATTLIST s id ID #REQUIRED>
+  <!ATTLIST r size CDATA #REQUIRED>
+]>
+<tee>
+  <s id="a"><r size="20"/></s>
+  <s id="b"><r size="18"/></s>
+  <s id="c"><r size="12"/></s>
+  <s id="d"><r size="19"/></s>
+  <s id="e"><r size="14"/></s>
+</tee>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey38.xsl b/test/tests/conf/idkey/idkey38.xsl
new file mode 100644
index 0000000..247100c
--- /dev/null
+++ b/test/tests/conf/idkey/idkey38.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test id() filtered by a predicate, in a match pattern. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="tee/s">
+      <xsl:apply-templates select="r"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="id('d')/*[@size &gt; 17]" priority="2">
+  <xsl:text>&#10;</xsl:text>
+  <bigD><xsl:value-of select="../@id"/></bigD>
+</xsl:template>
+
+<xsl:template match="r[@size &gt; 17]">
+  <xsl:text>&#10;</xsl:text>
+  <big><xsl:value-of select="../@id"/></big>
+</xsl:template>
+
+<xsl:template match="r">
+  <xsl:text>&#10;</xsl:text>
+  <other><xsl:value-of select="../@id"/></other>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey39.xml b/test/tests/conf/idkey/idkey39.xml
new file mode 100644
index 0000000..a66a0fd
--- /dev/null
+++ b/test/tests/conf/idkey/idkey39.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE tee [
+  <!ELEMENT tee (s*)>
+  <!ELEMENT s (r)>
+  <!ELEMENT r EMPTY>
+  <!ATTLIST s id ID #REQUIRED>
+  <!ATTLIST r size CDATA #REQUIRED>
+]>
+<tee>
+  <s id="a"><r size="20"/></s>
+  <s id="b"><r size="18"/></s>
+  <s id="c"><r size="12"/></s>
+  <s id="d"><r size="19"/></s>
+  <s id="e"><r size="14"/></s>
+</tee>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey39.xsl b/test/tests/conf/idkey/idkey39.xsl
new file mode 100644
index 0000000..d51fa86
--- /dev/null
+++ b/test/tests/conf/idkey/idkey39.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey39 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test id(list) with lower path filtered by a predicate, in a match pattern. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="tee/s">
+      <xsl:apply-templates select="r"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="id('b d c')/r[@size &gt; 17]">
+  <xsl:text>&#10;</xsl:text>
+  <big><xsl:value-of select="../@id"/></big>
+</xsl:template>
+
+<xsl:template match="r">
+  <xsl:text>&#10;</xsl:text>
+  <other><xsl:value-of select="../@id"/></other>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey40.xml b/test/tests/conf/idkey/idkey40.xml
new file mode 100644
index 0000000..f716d4f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey40.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- Test for ID selection and pattern matching -->
+<!DOCTYPE doc [
+  <!ELEMENT doc (#PCDATA|a|b|c)*>
+  <!ATTLIST doc id ID #REQUIRED>
+  <!ELEMENT a (#PCDATA|a|b|c)*>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA|a|b|c)*>
+  <!ATTLIST b id ID #REQUIRED>
+  <!ELEMENT c (#PCDATA|a|b|c)*>
+  <!ATTLIST c id ID #REQUIRED >
+]>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <a id="id2">*id2*
+      <a id="id3">*id3*</a>
+      <b id="id4">*id4*</b>
+      <c id="id5">*id5*</c>
+    </a>
+    <b id="id6">*id6*</b>
+    <c id="id7">*id7*</c>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey40.xsl b/test/tests/conf/idkey/idkey40.xsl
new file mode 100644
index 0000000..6763aec
--- /dev/null
+++ b/test/tests/conf/idkey/idkey40.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey40 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Find text in a node with particular ID, via match pattern. -->
+
+<xsl:strip-space elements="a b c"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a//text()"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="id('id6')/text()">
+  <xsl:text>&#10;</xsl:text>
+  <bee><xsl:value-of select="../@id"/></bee>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>&#10;</xsl:text>
+  <other><xsl:value-of select="."/></other>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey41.xml b/test/tests/conf/idkey/idkey41.xml
new file mode 100644
index 0000000..f716d4f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey41.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- Test for ID selection and pattern matching -->
+<!DOCTYPE doc [
+  <!ELEMENT doc (#PCDATA|a|b|c)*>
+  <!ATTLIST doc id ID #REQUIRED>
+  <!ELEMENT a (#PCDATA|a|b|c)*>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA|a|b|c)*>
+  <!ATTLIST b id ID #REQUIRED>
+  <!ELEMENT c (#PCDATA|a|b|c)*>
+  <!ATTLIST c id ID #REQUIRED >
+]>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <a id="id2">*id2*
+      <a id="id3">*id3*</a>
+      <b id="id4">*id4*</b>
+      <c id="id5">*id5*</c>
+    </a>
+    <b id="id6">*id6*</b>
+    <c id="id7">*id7*</c>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey41.xsl b/test/tests/conf/idkey/idkey41.xsl
new file mode 100644
index 0000000..250108f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey41.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey41 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Find all text under a node with particular ID, via match pattern. -->
+
+<xsl:strip-space elements="a b c"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a//text()"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="id('id2')//text()">
+  <xsl:text>&#10;</xsl:text>
+  <x><xsl:value-of select="../@id"/></x>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>&#10;</xsl:text>
+  <other><xsl:value-of select="."/></other>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey42.xml b/test/tests/conf/idkey/idkey42.xml
new file mode 100644
index 0000000..f716d4f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey42.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- Test for ID selection and pattern matching -->
+<!DOCTYPE doc [
+  <!ELEMENT doc (#PCDATA|a|b|c)*>
+  <!ATTLIST doc id ID #REQUIRED>
+  <!ELEMENT a (#PCDATA|a|b|c)*>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA|a|b|c)*>
+  <!ATTLIST b id ID #REQUIRED>
+  <!ELEMENT c (#PCDATA|a|b|c)*>
+  <!ATTLIST c id ID #REQUIRED >
+]>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <a id="id2">*id2*
+      <a id="id3">*id3*</a>
+      <b id="id4">*id4*</b>
+      <c id="id5">*id5*</c>
+    </a>
+    <b id="id6">*id6*</b>
+    <c id="id7">*id7*</c>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey42.xsl b/test/tests/conf/idkey/idkey42.xsl
new file mode 100644
index 0000000..495805d
--- /dev/null
+++ b/test/tests/conf/idkey/idkey42.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey42 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Find all text under IDed node and apply predicate, via match pattern. -->
+
+<xsl:strip-space elements="a b c"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a//text()"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="id('id2')/*[name()='b']/text()" priority="2">
+  <xsl:text>&#10;</xsl:text>
+  <bee><xsl:value-of select="../@id"/></bee>
+</xsl:template>
+
+<xsl:template match="id('id2')//text()">
+  <xsl:text>&#10;</xsl:text>
+  <x><xsl:value-of select="../@id"/></x>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>&#10;</xsl:text>
+  <other><xsl:value-of select="."/></other>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey43.xml b/test/tests/conf/idkey/idkey43.xml
new file mode 100644
index 0000000..f716d4f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey43.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- Test for ID selection and pattern matching -->
+<!DOCTYPE doc [
+  <!ELEMENT doc (#PCDATA|a|b|c)*>
+  <!ATTLIST doc id ID #REQUIRED>
+  <!ELEMENT a (#PCDATA|a|b|c)*>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA|a|b|c)*>
+  <!ATTLIST b id ID #REQUIRED>
+  <!ELEMENT c (#PCDATA|a|b|c)*>
+  <!ATTLIST c id ID #REQUIRED >
+]>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <a id="id2">*id2*
+      <a id="id3">*id3*</a>
+      <b id="id4">*id4*</b>
+      <c id="id5">*id5*</c>
+    </a>
+    <b id="id6">*id6*</b>
+    <c id="id7">*id7*</c>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey43.xsl b/test/tests/conf/idkey/idkey43.xsl
new file mode 100644
index 0000000..3026684
--- /dev/null
+++ b/test/tests/conf/idkey/idkey43.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey43 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use variables in predicate of match pattern that also has id() -->
+
+<xsl:strip-space elements="a b c"/>
+
+<xsl:variable name="major" select="'b'"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a//text()"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="id('id2')/*[name()=$major]/text()" priority="2">
+  <xsl:text>&#10;</xsl:text>
+  <bee><xsl:value-of select="../@id"/></bee>
+</xsl:template>
+
+<xsl:template match="id('id2')//text()">
+  <xsl:text>&#10;</xsl:text>
+  <x><xsl:value-of select="../@id"/></x>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>&#10;</xsl:text>
+  <other><xsl:value-of select="."/></other>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey44.xml b/test/tests/conf/idkey/idkey44.xml
new file mode 100644
index 0000000..b0d550b
--- /dev/null
+++ b/test/tests/conf/idkey/idkey44.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<Tree>
+<Level1 ID="id1">
+	<Name First="Lee" MI="R" Last="Smith">Lee</Name>
+	<Age>70</Age>
+	<Level2 ID="id2">
+		<Name First="Amby" MI="A" Last="Smith">Amby</Name>
+		<Age>46</Age>
+
+		<Level3 ID="id6">
+			<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+			<Age>9</Age>
+		</Level3>
+		<Level3 ID="id9">
+			<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+			<Age>8</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id3">
+		<Name First="Ted" MI="R" Last="Smith">Ted</Name>
+		<Age>45</Age>
+		<Level3 ID="id8">
+			<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+			<Age>7</Age>
+		</Level3>
+		<Level3 ID="id11">
+			<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+			<Age>5</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id4">
+		<Name First="Pedro" MI="Q" Last="Smith">Pedro</Name>
+		<Age>43</Age>
+		<Level3 ID="id7">
+			<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id10">
+			<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id5">
+		<Name First="Pablo" MI="E" Last="Smith">Pablo</Name>
+		<Age>41</Age>
+		<Level3 ID="id12">
+			<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+			<Age>5</Age>
+		</Level3>
+		<Level3 ID="id13">
+			<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+			<Age>2</Age>
+		</Level3>
+		<Level3 ID="id14">
+			<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+			<Age>1</Age>
+		</Level3>
+	</Level2>
+	<Level3 ID="id15">
+		<Name First="Jeffery" MI="Q" Last="Smith">Jeff</Name>
+		<Age>36</Age>
+		<Level3 ID="id16">
+			<Name First="Christopher" MI="Q" Last="Smith">Christopher</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id17">
+			<Name First="Jabriella" MI="Q" Last="Smith">Jabriella</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level3>
+</Level1>
+<childnodeset>
+	<id>id6</id>
+	<id>id7</id>
+	<id>id8</id>
+	<id>id9</id>
+	<id>id10</id>
+	<id>id11</id>
+	<id>id12</id>
+	<id>id13</id>
+	<id>id14</id>
+	<id>id15</id>
+</childnodeset>
+<parentnodeset>
+	<id>id2</id>
+	<id>id3</id>
+	<id>id4</id>
+	<id>id5</id>
+</parentnodeset>
+</Tree>
+
diff --git a/test/tests/conf/idkey/idkey44.xsl b/test/tests/conf/idkey/idkey44.xsl
new file mode 100644
index 0000000..917312a
--- /dev/null
+++ b/test/tests/conf/idkey/idkey44.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey44 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test simple key()// filtered by a predicate, in a match pattern. -->
+
+
+<xsl:key name="Info" match="Level3" use="@ID"/>
+
+<xsl:template match="/">
+ <out>
+	<xsl:apply-templates select="//Level3"/>
+ </out>
+</xsl:template>
+
+
+<xsl:template match="key('Info','id15')//Level3[Name[starts-with(@First,'J')]]">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="J-Name">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+<xsl:template match="*">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="Name">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey45.xml b/test/tests/conf/idkey/idkey45.xml
new file mode 100644
index 0000000..fa8b297
--- /dev/null
+++ b/test/tests/conf/idkey/idkey45.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0"?>
+<Tree>
+<Level1 ID="id1">
+	<Name First="Lee" MI="R" Last="Smith">Lee</Name>
+	<Age>70</Age>
+	<Level2 ID="id2">
+		<Name First="Amby" MI="A" Last="Smith">Amby</Name>
+		<Age>46</Age>
+
+		<Level3 ID="id6">
+			<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+			<Age>9</Age>
+		</Level3>
+		<Level3 ID="id9">
+			<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+			<Age>8</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id3">
+		<Name First="Ted" MI="R" Last="Smith">Ted</Name>
+		<Age>45</Age>
+		<Level3 ID="id8">
+			<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+			<Age>7</Age>
+		</Level3>
+		<Level3 ID="id11">
+			<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+			<Age>5</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id4">
+		<Name First="Pedro" MI="Q" Last="Smith">Pedro</Name>
+		<Age>43</Age>
+		<Level3 ID="id7">
+			<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id10">
+			<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id5">
+		<Name First="Pablo" MI="E" Last="Smith">Pablo</Name>
+		<Age>41</Age>
+		<Level3 ID="id12">
+			<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+			<Age>5</Age>
+		</Level3>
+		<Level3 ID="id13">
+			<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+			<Age>2</Age>
+		</Level3>
+		<Level3 ID="id14">
+			<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+			<Age>1</Age>
+		</Level3>
+	</Level2>
+	<Level3 ID="id15">
+		<Name First="Jeffery" MI="Q" Last="Smith">Jeff</Name>
+		<Age>36</Age>
+		<Level3 ID="id16">
+			<Name First="Christopher" MI="Q" Last="Smith">Christopher</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id17">
+			<Name First="Jabriella" MI="Q" Last="Smith">Jabriella</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level3>
+</Level1>
+<Level1 ID="id18">
+	<Name First="Melvin" MI="R" Last="Gaas">Mel</Name>
+	<Age>80</Age>
+	<Level2 ID="id1">
+		<Name First="Robert" MI="A" Last="Gaas">Bob</Name>
+		<Age>52</Age>
+
+		<Level3 ID="id20">
+			<Name First="Eric" MI="A" Last="Gaas">Eric</Name>
+			<Age>19</Age>
+		</Level3>
+		<Level3 ID="id21">
+			<Name First="Johnathan" MI="L" Last="Gaas">John</Name>
+			<Age>18</Age>
+		</Level3>
+	</Level2>
+</Level1>
+<childnodeset>
+	<id>id6</id>
+	<id>id7</id>
+	<id>id8</id>
+	<id>id9</id>
+	<id>id10</id>
+	<id>id11</id>
+	<id>id12</id>
+	<id>id13</id>
+	<id>id14</id>
+	<id>id15</id>
+</childnodeset>
+<parentnodeset>
+	<id>id2</id>
+	<id>id3</id>
+	<id>id4</id>
+	<id>id5</id>
+</parentnodeset>
+</Tree>
+
diff --git a/test/tests/conf/idkey/idkey45.xsl b/test/tests/conf/idkey/idkey45.xsl
new file mode 100644
index 0000000..9940c67
--- /dev/null
+++ b/test/tests/conf/idkey/idkey45.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey45 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test complex key()// filtered by a predicate in predicate, 
+       in a match pattern. -->
+
+
+<xsl:key name="Info" match="Level1 | Level2" use="@ID"/>
+
+<xsl:template match="/">
+ <out>
+	<xsl:apply-templates select="//Level3"/>
+ </out>
+</xsl:template>
+
+<xsl:template match="key('Info','id1')//Level3[Name[starts-with(@First,'J')]]">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="J-NAME">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+<xsl:template match="*">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="Name">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey46.xml b/test/tests/conf/idkey/idkey46.xml
new file mode 100644
index 0000000..b50d25f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey46.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<Tree>
+<Level1 ID="id1">
+	<Name First="Lee" MI="R" Last="Smith">Lee</Name>
+	<Age>70</Age>
+	<Level2 ID="id2">
+		<Name First="Amby" MI="A" Last="Smith">Amby</Name>
+		<Age>46</Age>
+
+		<Level3 ID="id6">
+			<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+			<Age>9</Age>
+		</Level3>
+		<Level3 ID="id9">
+			<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+			<Age>8</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id3">
+		<Name First="Ted" MI="R" Last="Smith">Ted</Name>
+		<Age>45</Age>
+		<Level3 ID="id8">
+			<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+			<Age>7</Age>
+		</Level3>
+		<Level3 ID="id11">
+			<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+			<Age>5</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id4">
+		<Name First="Pedro" MI="Q" Last="Smith">Pedro</Name>
+		<Age>43</Age>
+		<Level3 ID="id7">
+			<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id10">
+			<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id5">
+		<Name First="Pablo" MI="E" Last="Smith">Pablo</Name>
+		<Age>41</Age>
+		<Level3 ID="id12">
+			<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+			<Age>5</Age>
+		</Level3>
+		<Level3 ID="id13">
+			<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+			<Age>2</Age>
+		</Level3>
+		<Level3 ID="id14">
+			<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+			<Age>1</Age>
+		</Level3>
+	</Level2>
+	<Level3 ID="id15">
+		<Name First="Jeffery" MI="Q" Last="Smith">Jeff</Name>
+		<Age>36</Age>
+		<Level3 ID="id16">
+			<Name First="Christopher" MI="Q" Last="Smith">Christopher</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id17">
+			<Name First="Jabriella" MI="Q" Last="Smith">Jabriella</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level3>
+</Level1>
+<Level1 ID="id18">
+	<Name First="Melvin" MI="R" Last="Gaas">Mel</Name>
+	<Age>80</Age>
+	<Level2 ID="id4">
+		<Name First="Robert" MI="A" Last="Gaas">Bob</Name>
+		<Age>52</Age>
+
+		<Level3 ID="id20">
+			<Name First="Eric" MI="A" Last="Gaas">Eric</Name>
+			<Age>19</Age>
+		</Level3>
+		<Level3 ID="id21">
+			<Name First="Johnathan" MI="L" Last="Gaas">John</Name>
+			<Age>18</Age>
+		</Level3>
+	</Level2>
+</Level1>
+
+<childnodeset>
+	<id>id6</id>
+	<id>id7</id>
+	<id>id8</id>
+	<id>id9</id>
+	<id>id10</id>
+	<id>id11</id>
+	<id>id12</id>
+	<id>id13</id>
+	<id>id14</id>
+	<id>id15</id>
+</childnodeset>
+<parentnodeset>
+	<id>id2</id>
+	<id>id3</id>
+	<id>id4</id>
+	<id>id5</id>
+</parentnodeset>
+</Tree>
+
diff --git a/test/tests/conf/idkey/idkey46.xsl b/test/tests/conf/idkey/idkey46.xsl
new file mode 100644
index 0000000..1a5cd51
--- /dev/null
+++ b/test/tests/conf/idkey/idkey46.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey46 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test complex key()//x in match pattern. -->
+
+
+<xsl:key name="Info" match="Level1 | Level2 | Level3" use="@ID"/>
+
+<xsl:template match="/">
+ <out>
+	<xsl:apply-templates select="//Level3"/>
+ </out>
+</xsl:template>
+
+<xsl:template match="key('Info','id4')//Level3">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="Simple-Match">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+<xsl:template match="*">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="No-Match">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey47.xml b/test/tests/conf/idkey/idkey47.xml
new file mode 100644
index 0000000..0fd78ce
--- /dev/null
+++ b/test/tests/conf/idkey/idkey47.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0"?>
+<Tree>
+<Level1 ID="id1">
+	<Name First="Lee" MI="R" Last="Smith">Lee</Name>
+	<Age>70</Age>
+	<Level2 ID="id2">
+		<Name First="Amby" MI="A" Last="Smith">Amby</Name>
+		<Age>46</Age>
+
+		<Level3 ID="id6">
+			<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+			<Age>9</Age>
+		</Level3>
+		<Level3 ID="id9">
+			<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+			<Age>8</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id3">
+		<Name First="Ted" MI="R" Last="Smith">Ted</Name>
+		<Age>45</Age>
+		<Level3 ID="id8">
+			<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+			<Age>7</Age>
+		</Level3>
+		<Level3 ID="id11">
+			<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+			<Age>5</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id4">
+		<Name First="Pedro" MI="Q" Last="Smith">Pedro</Name>
+		<Age>43</Age>
+		<Level3 ID="id7">
+			<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id10">
+			<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id5">
+		<Name First="Pablo" MI="E" Last="Smith">Pablo</Name>
+		<Age>41</Age>
+		<Level3 ID="id12">
+			<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+			<Age>5</Age>
+		</Level3>
+		<Level3 ID="id13">
+			<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+			<Age>2</Age>
+		</Level3>
+		<Level3 ID="id14">
+			<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+			<Age>1</Age>
+		</Level3>
+	</Level2>
+	<Level3 ID="id15">
+		<Name First="Jeffery" MI="Q" Last="Smith">Jeff</Name>
+		<Age>36</Age>
+		<Level3 ID="id16">
+			<Name First="Christopher" MI="Q" Last="Smith">Chris</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id17">
+			<Name First="Jabriella" MI="Q" Last="Smith">Jabriella</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level3>
+</Level1>
+<Level2 ID="id1">
+	<Name First="Melvin" MI="R" Last="Gaas">Mel</Name>
+	<Age>80</Age>
+	<Level3 ID="id8">
+		<Name First="Robert" MI="A" Last="Gaas">Bob</Name>
+		<Age>52</Age>
+
+		<Level3 ID="id20">
+			<Name First="Eric" MI="A" Last="Gaas">Eric</Name>
+			<Age>19</Age>
+		</Level3>
+		<Level3 ID="id21">
+			<Name First="Johnathan" MI="L" Last="Gaas">John</Name>
+			<Age>18</Age>
+		</Level3>
+	</Level3>
+</Level2>
+<childnodeset>
+	<id>id6</id>
+	<id>id7</id>
+	<id>id8</id>
+	<id>id9</id>
+	<id>id10</id>
+	<id>id11</id>
+	<id>id12</id>
+	<id>id13</id>
+	<id>id14</id>
+	<id>id15</id>
+</childnodeset>
+<parentnodeset>
+	<id>id2</id>
+	<id>id3</id>
+	<id>id4</id>
+	<id>id5</id>
+</parentnodeset>
+</Tree>
+
diff --git a/test/tests/conf/idkey/idkey47.xsl b/test/tests/conf/idkey/idkey47.xsl
new file mode 100644
index 0000000..fe05c94
--- /dev/null
+++ b/test/tests/conf/idkey/idkey47.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey47 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test complex key()//x/x in match pattern. -->
+
+
+<xsl:key name="Info" match="Level1 | Level2 | Level3" use="@ID"/>
+
+<xsl:template match="/">
+ <out>
+	<xsl:apply-templates select="//Level3"/>
+ </out>
+</xsl:template>
+
+<xsl:template match="key('Info','id1')//Level3/Level3">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="Simple-Match">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+<xsl:template match="*">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="No-Match">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey48.xml b/test/tests/conf/idkey/idkey48.xml
new file mode 100644
index 0000000..d718888
--- /dev/null
+++ b/test/tests/conf/idkey/idkey48.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0"?>
+<Tree>
+<Level1 ID="id1">
+	<Name First="Lee" MI="R" Last="Smith">Lee</Name>
+	<Age>70</Age>
+	<Level2 ID="id2">
+		<Name First="Amby" MI="A" Last="Smith">Amby</Name>
+		<Age>46</Age>
+
+		<Level3 ID="id6">
+			<Name First="Julie" MI="A" Last="Smith">Jules</Name>
+			<Age>9</Age>
+		</Level3>
+		<Level3 ID="id9">
+			<Name First="Daniel" MI="L" Last="Smith">Daniel</Name>
+			<Age>8</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id3">
+		<Name First="Ted" MI="R" Last="Smith">Ted</Name>
+		<Age>45</Age>
+		<Level3 ID="id8">
+			<Name First="Joshua" MI="R" Last="Smith">Joshua</Name>
+			<Age>7</Age>
+		</Level3>
+		<Level3 ID="id11">
+			<Name First="Lauren" MI="R" Last="Smith">Lauren</Name>
+			<Age>5</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id4">
+		<Name First="Pedro" MI="Q" Last="Smith">Pedro</Name>
+		<Age>43</Age>
+		<Level3 ID="id7">
+			<Name First="Nathaniel" MI="Q" Last="Smith">Nate</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id10">
+			<Name First="Samual" MI="Q" Last="Smith">Sam</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level2>
+	<Level2 ID="id5">
+		<Name First="Pablo" MI="E" Last="Smith">Pablo</Name>
+		<Age>41</Age>
+		<Level3 ID="id12">
+			<Name First="Benjamin" MI="D" Last="Smith">Ben</Name>
+			<Age>5</Age>
+		</Level3>
+		<Level3 ID="id13">
+			<Name First="Lucy" MI="E" Last="Smith">Lucy</Name>
+			<Age>2</Age>
+		</Level3>
+		<Level3 ID="id14">
+			<Name First="Jake" MI="E" Last="Smith">Jake</Name>
+			<Age>1</Age>
+		</Level3>
+	</Level2>
+	<Level3 ID="id15">
+		<Name First="Jeffery" MI="Q" Last="Smith">Jeff</Name>
+		<Age>36</Age>
+		<Level3 ID="id16">
+			<Name First="Christopher" MI="Q" Last="Smith">Chris</Name>
+			<Age>8</Age>
+		</Level3>
+		<Level3 ID="id17">
+			<Name First="Jabriella" MI="Q" Last="Smith">Jabriella</Name>
+			<Age>7</Age>
+		</Level3>
+	</Level3>
+</Level1>
+<Level2 ID="id1">
+	<Name First="Melvin" MI="R" Last="Gaas">Mel</Name>
+	<Age>80</Age>
+	<Level3 ID="id8">
+		<Name First="Robert" MI="A" Last="Gaas">Bob</Name>
+		<Age>52</Age>
+
+		<Level3 ID="id20">
+			<Name First="Eric" MI="A" Last="Gaas">Eric</Name>
+			<Age>19</Age>
+		</Level3>
+		<Level3 ID="id21">
+			<Name First="Johnathan" MI="Q" Last="Gaas">John</Name>
+			<Age>8</Age>
+		</Level3>
+	</Level3>
+</Level2>
+<childnodeset>
+	<id>id6</id>
+	<id>id7</id>
+	<id>id8</id>
+	<id>id9</id>
+	<id>id10</id>
+	<id>id11</id>
+	<id>id12</id>
+	<id>id13</id>
+	<id>id14</id>
+	<id>id15</id>
+</childnodeset>
+<parentnodeset>
+	<id>id2</id>
+	<id>id3</id>
+	<id>id4</id>
+	<id>id5</id>
+</parentnodeset>
+</Tree>
+
diff --git a/test/tests/conf/idkey/idkey48.xsl b/test/tests/conf/idkey/idkey48.xsl
new file mode 100644
index 0000000..c2215a2
--- /dev/null
+++ b/test/tests/conf/idkey/idkey48.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey48 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test complex key()//x/x, with complex predicate in match pattern. -->
+
+
+<xsl:key name="Info" match="Level1 | Level2 | Level3" use="@ID"/>
+
+<xsl:template match="/">
+ <out>
+	<xsl:apply-templates select="//Level3"/>
+ </out>
+</xsl:template>
+
+<xsl:template match="key('Info','id1')//Level3/Level3[Name/@MI='Q'][Age='8']">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="Complex-Match">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+<xsl:template match="*">
+	<xsl:text>&#10;</xsl:text>
+	<xsl:element name="No-Match">
+		<xsl:value-of select="Name/@First"/>
+	</xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey49.xml b/test/tests/conf/idkey/idkey49.xml
new file mode 100644
index 0000000..469fea9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey49.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <side att="view"><!-- This is the side comment -->text-in-side<?s-pi side ?></side>
+  <a>idkey49b.xml</a><!-- Shirt, Overt -->
+  <a>idkey49c.xml</a><!-- GoodBye -->
+  <a>idkey49d.xml</a><!-- Tie, Sly -->
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey49.xsl b/test/tests/conf/idkey/idkey49.xsl
new file mode 100644
index 0000000..d2492ed
--- /dev/null
+++ b/test/tests/conf/idkey/idkey49.xsl
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey49 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 Generate-ID  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test generate-id() when nodes are coming from different documents.
+    All IDs should be distinct. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <!-- Get in position so we have nodes on the following axis. -->
+    <xsl:apply-templates select="side"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="side">
+  <!-- Build up a string containing generated IDs for nodes on the following axis, plus attributes they carry. -->
+  <xsl:variable name="accumulated">
+    <!-- Since call-template doesn't change context, iterate by position number. -->
+    <xsl:call-template name="nextnode">
+      <xsl:with-param name="this" select="1" />
+      <xsl:with-param name="max" select="count(document(../a)//node()|following::node()|following::*/@*)" />
+      <xsl:with-param name="idset" select="'+'" />
+      <!-- Use + as delimiter to avoid spoofs from adjacent strings.
+           Returned string from generate-id() can't contain +. -->
+    </xsl:call-template>
+  </xsl:variable>
+  <!-- Summary data, so we have output when we pass. -->
+  <xsl:text>Number of IDs accumulated: </xsl:text>
+  <xsl:value-of select="count(document(../a)//node()|following::node()|following::*/@*)"/>
+  <!-- Now, take one node of each kind, whose generated ID should not be in the accumulated string,
+    surround generated ID by + to avoid substring matches, and see if it's in there. -->
+  <!-- See if we duplicated an ID with the root -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(/),'+'))">
+    <xsl:text>FAIL on root node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(/)"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with the element -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(.),'+'))">
+    <xsl:text>FAIL on side node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(.)"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with the attribute -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./@att),'+'))">
+    <xsl:text>FAIL on side/@att node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./@att)"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with the text node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./text()),'+'))">
+    <xsl:text>FAIL on side/text() node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./text())"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with the comment node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./comment()),'+'))">
+    <xsl:text>FAIL on side/comment() node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./comment())"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with the PI node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./processing-instruction('s-pi')),'+'))">
+    <xsl:text>FAIL on side/processing-instruction('s-pi') node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./processing-instruction('s-pi'))"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with a namespace node -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(./namespace::*[1]),'+'))">
+    <xsl:text>FAIL on side/namespace::*[1] node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(./namespace::*[1])"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with an element from another document -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(document('idkey49a.xml')//body),'+'))">
+    <xsl:text>FAIL on 49a body node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(document('idkey49a.xml')//body)"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with an attribute from another document -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(document('idkey49a.xml')//body/@att),'+'))">
+    <xsl:text>FAIL on 49a body node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(document('idkey49a.xml')//body/@att)"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with a text node from another document -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(document('idkey49a.xml')//body/text()),'+'))">
+    <xsl:text>FAIL on 49a body node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(document('idkey49a.xml')//body/text())"/>
+  </xsl:if>
+  <!-- See if we duplicated an ID with a comment node from another document -->
+  <xsl:if test="contains($accumulated,concat('+',generate-id(document('idkey49a.xml')//comment()),'+'))">
+    <xsl:text>FAIL on 49a body node whose ID is </xsl:text>
+    <xsl:value-of select="generate-id(document('idkey49a.xml')//comment())"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="nextnode">
+  <xsl:param name="this"/>
+  <xsl:param name="max"/>
+  <xsl:param name="idset"/>
+  <!-- Params this and max are index numbers, idset is the string we're accumulating. -->
+  <xsl:variable name="this-id" select="generate-id((document(../a)//node()|following::node()|following::*/@*)[position() = $this])"/>
+  <xsl:choose>
+    <xsl:when test="$this &lt;= $max">
+      <!-- Recurse, adding current ID to string of all IDs, with separators -->
+      <xsl:call-template name="nextnode">
+        <xsl:with-param name="this" select="$this+1" />
+        <xsl:with-param name="max" select="$max" />
+        <xsl:with-param name="idset" select="concat($idset,$this-id,'+')" />
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- "return" the final idset -->
+      <xsl:value-of select="$idset"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey49a.xml b/test/tests/conf/idkey/idkey49a.xml
new file mode 100644
index 0000000..8cfaaed
--- /dev/null
+++ b/test/tests/conf/idkey/idkey49a.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <body att="view">49A-Hello</body><!-- Comment in 49a -->
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey49b.xml b/test/tests/conf/idkey/idkey49b.xml
new file mode 100644
index 0000000..c3de5bb
--- /dev/null
+++ b/test/tests/conf/idkey/idkey49b.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <body>49B-Shirt</body>
+  <body>49B-Overt</body>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey49c.xml b/test/tests/conf/idkey/idkey49c.xml
new file mode 100644
index 0000000..969aa72
--- /dev/null
+++ b/test/tests/conf/idkey/idkey49c.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<outer>
+  <body>49C-GoodBye</body><!-- Comment in 49c -->
+</outer>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey49d.xml b/test/tests/conf/idkey/idkey49d.xml
new file mode 100644
index 0000000..e33554d
--- /dev/null
+++ b/test/tests/conf/idkey/idkey49d.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<outer>
+  <body>49D-Tie</body>
+  <body>49D-Sly</body>
+</outer>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey50.xml b/test/tests/conf/idkey/idkey50.xml
new file mode 100644
index 0000000..e08cd46
--- /dev/null
+++ b/test/tests/conf/idkey/idkey50.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <bind>HTTP</bind>
+  <bind>SOAP</bind>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey50.xsl b/test/tests/conf/idkey/idkey50.xsl
new file mode 100644
index 0000000..ad32ffd
--- /dev/null
+++ b/test/tests/conf/idkey/idkey50.xsl
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+     version='1.0'
+     xmlns:x="http://namespaces.ogbuji.net/articles" exclude-result-prefixes="x">
+
+  <!-- FileName: idkey50 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: Uche Ogbuji, adapted by David Marston -->
+  <!-- Purpose: Test combination of key() and document() reading from stylesheet. -->
+  <!-- Elaboration: "Look-up table 1.6 is worth a close look because it uses an advanced XSLT
+    technique. It builds up the lookup-table right in the stylesheet, using a distinct namespace.
+    You can see the x:ns-to-binding elements right below the key. If you are familiar with keys,
+    you are aware that they define indices that will be built on the nodes in the original source
+    document that match the pattern in the match attribute. What is not as well known is that
+    every time an additional source document is loaded with the XSLT document() function, all keys
+    are applied to it as well. The xsl:variable...uses a special form of document() call to load
+    the stylesheet itself as an additional source document. Thus the nodes in the stylesheet that
+    match the ns-to-binding are indexed. This is a very useful technique for setting up a look-up
+    table without having to hack at the source document or depend on an additional file." -->
+
+<xsl:output method='xml'/>
+
+  <!-- Lookup table 1.6: WSDL binding types -->
+  <xsl:key name='ns-to-binding' match='x:ns-to-binding' use='@binding'/>
+  <x:ns-to-binding uri='http://schemas.xmlsoap.org/wsdl/soap/' binding='SOAP'/>
+  <x:ns-to-binding uri='http://schemas.xmlsoap.org/wsdl/mime/' binding='MIME'/>
+  <x:ns-to-binding uri='http://schemas.xmlsoap.org/wsdl/http/' binding='HTTP'/>
+
+<xsl:template match='doc'>
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="bind">
+  <bound>
+    <xsl:variable name="lookup" select="."/>
+    <xsl:value-of select="$lookup"/><xsl:text>- </xsl:text>
+    <xsl:for-each select="document('')"><!-- Switch context so key reads from stylesheet -->
+      <xsl:value-of select="key('ns-to-binding',$lookup)/@uri"/>
+    </xsl:for-each>
+  </bound>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey51.xml b/test/tests/conf/idkey/idkey51.xml
new file mode 100644
index 0000000..21ec7a2
--- /dev/null
+++ b/test/tests/conf/idkey/idkey51.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>idkey49a.xml</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey51.xsl b/test/tests/conf/idkey/idkey51.xsl
new file mode 100644
index 0000000..ee0337f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey51.xsl
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey51 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test two calls to generate-id() on the same file. All IDs should be
+    the same. If both filenames were given literally, the spec says that IDs must match.
+    Retrieving the name from the principal XML document should still clearly mean the
+    same file. Putting nodes in a variable is more of a gray area. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="tn" select="document('idkey49a.xml')//doc/body/text()[1]" />
+    <xsl:choose>
+      <xsl:when test="generate-id(document('idkey49a.xml')//body) != generate-id(document(a)//body)">
+        <xsl:text>FAIL on body element: </xsl:text>
+        <xsl:value-of select="generate-id(document('idkey49c.xml')//body)"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(document(a)//body)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(document('idkey49a.xml')//text()[1]) != generate-id(document(a)//text()[1])">
+        <xsl:text>FAIL on first text node: </xsl:text>
+        <xsl:value-of select="generate-id(document('idkey49c.xml')//text()[1])"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(document(a)//text()[1])"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(document('idkey49a.xml')//body/@att) != generate-id(document(a)//body/@att)">
+        <xsl:text>FAIL on body attribute: </xsl:text>
+        <xsl:value-of select="generate-id(document('idkey49c.xml')//body/@att)"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(document(a)//body/@att)"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:when test="generate-id(document('idkey49a.xml')//comment()[1]) != generate-id(document(a)//comment()[1])">
+        <xsl:text>FAIL on first comment node: </xsl:text>
+        <xsl:value-of select="generate-id(document('idkey49c.xml')//comment()[1])"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(document(a)//comment()[1])"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <!-- Now try the node in the variable -->
+      <xsl:when test="generate-id($tn) != generate-id(document(a)//doc/body/text()[1])">
+        <xsl:text>FAIL on inner text node: </xsl:text>
+        <xsl:value-of select="generate-id(document('idkey49c.xml')//text()[1])"/><xsl:text>,  </xsl:text>
+        <xsl:value-of select="generate-id(document(a)//text()[1])"/><xsl:text>&#10;</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>Success</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey52.xml b/test/tests/conf/idkey/idkey52.xml
new file mode 100644
index 0000000..cb80641
--- /dev/null
+++ b/test/tests/conf/idkey/idkey52.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<doc>
+Blah blah blah.
+Blah blah blah.
+For details, see <bibref>XSLT</bibref>.
+Blah blah blah.
+For details, see <bibref>XML</bibref>.
+Blah blah blah.
+Blah blah blah.
+For details, see <bibref>XPath</bibref>.
+Blah blah blah.
+  <refdoc>idkey52a.xml</refdoc>
+  <refdoc>idkey52b.xml</refdoc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey52.xsl b/test/tests/conf/idkey/idkey52.xsl
new file mode 100644
index 0000000..ce5f908
--- /dev/null
+++ b/test/tests/conf/idkey/idkey52.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey52 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test combination of key() and document() on multiple files. -->
+
+      <!-- Compare to idkey18 -->
+
+<xsl:key name="bib" match="entry" use="@name" />
+
+<xsl:template match="doc">
+ <root>
+  <xsl:apply-templates/>
+ </root>
+</xsl:template>
+
+<xsl:template match="bibref">
+  Got a bibref for <xsl:value-of select="."/>...
+  <xsl:variable name="lookup" select="."/>
+  <xsl:for-each select="document(refdoc)">
+    <xsl:apply-templates select="key('bib',$lookup)"/>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="refdoc"><!-- suppress default action -->
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey52a.xml b/test/tests/conf/idkey/idkey52a.xml
new file mode 100644
index 0000000..14d5abd
--- /dev/null
+++ b/test/tests/conf/idkey/idkey52a.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<main>
+<entry name="XML">--A's citation of the XML spec--</entry>
+<entry name="XPath">--A's citation of the XPath spec--</entry>
+<entry name="XSLT">--A's citation of the XSLT spec--</entry>
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey52b.xml b/test/tests/conf/idkey/idkey52b.xml
new file mode 100644
index 0000000..421a29f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey52b.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<main>
+<entry name="XML">--B's citation of the XML spec--</entry>
+<entry name="XPath">--B's citation of the XPath spec--</entry>
+<entry name="XSLT">--B's citation of the XSLT spec--</entry>
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey53.xml b/test/tests/conf/idkey/idkey53.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey53.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey53.xsl b/test/tests/conf/idkey/idkey53.xsl
new file mode 100644
index 0000000..6b6740d
--- /dev/null
+++ b/test/tests/conf/idkey/idkey53.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz="http://xsl.lotus.com/ns1"
+                xmlns:bar="http://xsl.lotus.com/ns1"
+                exclude-result-prefixes="bar baz">
+
+  <!-- FileName: idkey53 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Test for xsl:key and key() with a qualified name, different prefix. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:key name="baz:mykey" match="div" use="title"/>
+
+<xsl:template match="doc">
+  <root>
+    <xsl:value-of select="key('bar:mykey', 'Introduction')/p"/><xsl:text> </xsl:text>
+    <xsl:value-of select="key('bar:mykey', 'Stylesheet Structure')/p"/><xsl:text> </xsl:text>
+    <xsl:value-of select="key('bar:mykey', 'Expressions')/p"/>
+  </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey54.xml b/test/tests/conf/idkey/idkey54.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey54.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey54.xsl b/test/tests/conf/idkey/idkey54.xsl
new file mode 100644
index 0000000..08ce636
--- /dev/null
+++ b/test/tests/conf/idkey/idkey54.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey54 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:key and key() with a leaing underscore in the name. -->
+
+<xsl:key name="_my_key" match="div" use="title"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('_my_key', 'Introduction')/p"/><xsl:text> </xsl:text>
+    <xsl:value-of select="key('_my_key', 'Stylesheet Structure')/p"/><xsl:text> </xsl:text>
+    <xsl:value-of select="key('_my_key', 'Expressions')/p"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey55.xml b/test/tests/conf/idkey/idkey55.xml
new file mode 100644
index 0000000..cbd036f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey55.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 [
+  <!ELEMENT t04 (a*)>
+  <!ELEMENT a EMPTY>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey55.xsl b/test/tests/conf/idkey/idkey55.xsl
new file mode 100644
index 0000000..13d8633
--- /dev/null
+++ b/test/tests/conf/idkey/idkey55.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey55 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id(list) and position() in a for-each loop -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>
+</xsl:text>
+    <xsl:for-each select="id('d b c')">
+      <item>
+        <xsl:value-of select="./@id"/>
+        <xsl:text> is at position </xsl:text>
+        <xsl:value-of select="position()"/>
+      </item>
+    <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey56.xml b/test/tests/conf/idkey/idkey56.xml
new file mode 100644
index 0000000..cbd036f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey56.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 [
+  <!ELEMENT t04 (a*)>
+  <!ELEMENT a EMPTY>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey56.xsl b/test/tests/conf/idkey/idkey56.xsl
new file mode 100644
index 0000000..aaf9908
--- /dev/null
+++ b/test/tests/conf/idkey/idkey56.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey56 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id(list) and position() in apply-templates -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>
+</xsl:text>
+  <xsl:apply-templates select="id('c a d')" />
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <item>
+    <xsl:value-of select="./@id"/>
+    <xsl:text> is at position </xsl:text>
+    <xsl:value-of select="position()"/>
+  </item>
+  <xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey57.xml b/test/tests/conf/idkey/idkey57.xml
new file mode 100644
index 0000000..91f5dce
--- /dev/null
+++ b/test/tests/conf/idkey/idkey57.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE main [
+  <!ELEMENT main (a*)>
+  <!ATTLIST main list CDATA #REQUIRED>
+  <!ELEMENT a (#PCDATA)>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<main list="y w z">
+  <a id="w">W</a>
+  <a id="x">X</a>
+  <a id="y">Y</a>
+  <a id="z">Z</a>
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey57.xsl b/test/tests/conf/idkey/idkey57.xsl
new file mode 100644
index 0000000..b220ae9
--- /dev/null
+++ b/test/tests/conf/idkey/idkey57.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey57 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id(node-set), where node-set has a string with a list of ID values. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="id(main/@list)">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey58.xml b/test/tests/conf/idkey/idkey58.xml
new file mode 100644
index 0000000..a76ff48
--- /dev/null
+++ b/test/tests/conf/idkey/idkey58.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE main [
+  <!ELEMENT main (a*)>
+  <!ELEMENT a (#PCDATA)>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<main>
+  <a id="w">W</a>
+  <a id="x">X</a>
+  <a id="y">Y</a>
+  <a id="z">Z</a>
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey58.xsl b/test/tests/conf/idkey/idkey58.xsl
new file mode 100644
index 0000000..bce9aa2
--- /dev/null
+++ b/test/tests/conf/idkey/idkey58.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey58 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id($var), where $var has a string with a list of ID values. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:variable name="list" select="'z w x'"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="id($list)">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey59.xml b/test/tests/conf/idkey/idkey59.xml
new file mode 100644
index 0000000..d5bcd23
--- /dev/null
+++ b/test/tests/conf/idkey/idkey59.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<doc>
+  <div>
+    <title>Introduction</title>
+	<x>25</x>
+	<y>39</y>
+	<z>25</z>
+    <p>Intro Section</p>
+	<q>1</q>
+  </div>
+  <div>
+    <title>Structure</title>
+	<x>14</x>
+	<y>89</y>
+	<z>75</z>
+    <p>Struc Section</p>
+	<q>2</q>
+  </div>
+  <div>
+    <title>Expressions</title>
+	<x>44</x>
+	<y>25</y>
+	<z>46</z>
+    <p>Exp Section</p>
+	<q>3</q>
+  </div>
+  <div>
+    <title>Numbers</title>
+	<x>25</x>
+	<y>44</y>
+	<z>75</z>
+    <p>Num Section</p>
+	<q>3.7</q>
+  </div>
+</doc>
diff --git a/test/tests/conf/idkey/idkey59.xsl b/test/tests/conf/idkey/idkey59.xsl
new file mode 100644
index 0000000..d9517ef
--- /dev/null
+++ b/test/tests/conf/idkey/idkey59.xsl
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey59 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: Frank Weiss -->
+  <!-- Purpose: Test xsl:key with union in "use" attribute. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
+
+<xsl:key name="key1" match="div" use="x | y | z"/>
+
+<xsl:template match="/">
+  <out>
+    <h1>Coordinate 25 (4 hits, 3 sections):</h1>
+    <xsl:for-each select="key('key1', 25)">
+      <title>
+        <xsl:value-of select="title"/>
+      </title>
+    </xsl:for-each>
+    <h1>Coordinate 39 (1 hit):</h1>
+    <xsl:for-each select="key('key1', 39)">
+      <title>
+        <xsl:value-of select="title"/>
+      </title>
+    </xsl:for-each>
+    <h1>Coordinate 44 (2 hits, 2 sections):</h1>
+    <xsl:for-each select="key('key1', 44)">
+      <title>
+        <xsl:value-of select="title"/>
+      </title>
+    </xsl:for-each>
+    <h1>Coordinate 75 (2 hits, 2 sections):</h1>
+    <xsl:for-each select="key('key1', 75)">
+      <title>
+        <xsl:value-of select="title"/>
+      </title>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey60.xml b/test/tests/conf/idkey/idkey60.xml
new file mode 100644
index 0000000..fe59f74
--- /dev/null
+++ b/test/tests/conf/idkey/idkey60.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!DOCTYPE doc [
+  <!ELEMENT doc  (l1)>
+  <!ATTLIST doc  id ID #REQUIRED>
+  <!ELEMENT l1    (l2)>
+  <!ELEMENT l2    (l3)>
+  <!ELEMENT l3    EMPTY>
+  <!ELEMENT v     (#PCDATA)>
+]>
+<doc id='abc'>
+  <l1>
+    <v>Text from doc/l1/v</v>
+    <l2>
+      <v>Text from doc/l1/l2/v</v>
+      <l3>
+        <v>Text from doc/l1/l2/l3/v</v>
+      </l3>
+      <w>Text from doc/l1/l2/w</w>
+    </l2>
+  </l1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey60.xsl b/test/tests/conf/idkey/idkey60.xsl
new file mode 100644
index 0000000..0173665
--- /dev/null
+++ b/test/tests/conf/idkey/idkey60.xsl
@@ -0,0 +1,79 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey60 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Purpose: Try multiple child steps after id() in match patterns -->
+  <!-- Creator: Henry Zongaro -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+  <xsl:template match='/'>
+    <out>
+      <xsl:apply-templates/><!-- rely on some built-ins -->
+    </out>
+  </xsl:template>
+
+  <xsl:template match='id("abc")/l1/v'>
+    <xsl:text>
+</xsl:text>
+    <match-l1-v>
+      <xsl:value-of select='.'/>
+    </match-l1-v>
+  </xsl:template>
+
+  <xsl:template match='id("abc")/l2/v'>
+    <xsl:text>
+</xsl:text>
+    <match-l2-v>
+      <xsl:value-of select='.'/>
+    </match-l2-v>
+  </xsl:template>
+
+  <xsl:template match='id("abc")/l1/l2/w'>
+    <xsl:text>
+</xsl:text>
+    <match-l1-l2-w>
+      <xsl:value-of select='.'/>
+    </match-l1-l2-w>
+  </xsl:template>
+
+  <xsl:template match='id("abc")/l3/v'>
+    <xsl:text>
+</xsl:text>
+    <match-l3-v>
+      <xsl:value-of select='.'/>
+    </match-l3-v>
+  </xsl:template>
+
+  <xsl:template match='v'>
+    <xsl:text>
+</xsl:text>
+    <match-v>
+      <xsl:value-of select='.'/>
+    </match-v>
+  </xsl:template>
+
+  <xsl:template match='text()'/><!-- squelch direct replay of text -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey61.xml b/test/tests/conf/idkey/idkey61.xml
new file mode 100644
index 0000000..cbd036f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey61.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 [
+  <!ELEMENT t04 (a*)>
+  <!ELEMENT a EMPTY>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey61.xsl b/test/tests/conf/idkey/idkey61.xsl
new file mode 100644
index 0000000..f2d0739
--- /dev/null
+++ b/test/tests/conf/idkey/idkey61.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey61 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for count() of id(), multiple values. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="count(id('d b c k'))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey62.xml b/test/tests/conf/idkey/idkey62.xml
new file mode 100644
index 0000000..cbd036f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey62.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 [
+  <!ELEMENT t04 (a*)>
+  <!ELEMENT a EMPTY>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey62.xsl b/test/tests/conf/idkey/idkey62.xsl
new file mode 100644
index 0000000..6fe4b9c
--- /dev/null
+++ b/test/tests/conf/idkey/idkey62.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey62 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for count() of id(), one value. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="count(id('c'))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/idkey63.xml b/test/tests/conf/idkey/idkey63.xml
new file mode 100644
index 0000000..cbd036f
--- /dev/null
+++ b/test/tests/conf/idkey/idkey63.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 [
+  <!ELEMENT t04 (a*)>
+  <!ELEMENT a EMPTY>
+  <!ATTLIST a id ID #REQUIRED>
+]>
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conf/idkey/idkey63.xsl b/test/tests/conf/idkey/idkey63.xsl
new file mode 100644
index 0000000..2e0cff3
--- /dev/null
+++ b/test/tests/conf/idkey/idkey63.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkey63 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for count() of id(), no matching values. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="count(id('k'))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/impidk36a.xsl b/test/tests/conf/idkey/impidk36a.xsl
new file mode 100644
index 0000000..e267603
--- /dev/null
+++ b/test/tests/conf/idkey/impidk36a.xsl
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Purpose: For importation by idkey36.xsl stylesheet. -->
+
+<xsl:import href="impidk36b.xsl"/>
+
+<xsl:key name="smallspace" match="subdiv" use="title" />
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/impidk36b.xsl b/test/tests/conf/idkey/impidk36b.xsl
new file mode 100644
index 0000000..d18f790
--- /dev/null
+++ b/test/tests/conf/idkey/impidk36b.xsl
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Purpose: For importation by idkey36a.xsl stylesheet. -->
+
+<xsl:key name="bigspace" match="div" use="subdiv/title" />
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/impidky20.xsl b/test/tests/conf/idkey/impidky20.xsl
new file mode 100644
index 0000000..5c3dd37
--- /dev/null
+++ b/test/tests/conf/idkey/impidky20.xsl
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Purpose: For importation by idkey20.xsl stylesheet. -->
+
+<xsl:key name="mykey" match="div" use="title"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/idkey/t04.dtd b/test/tests/conf/idkey/t04.dtd
new file mode 100644
index 0000000..c82a831
--- /dev/null
+++ b/test/tests/conf/idkey/t04.dtd
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!ELEMENT t04 (a*)>
+<!ELEMENT a EMPTY>
+<!ATTLIST a  id ID #REQUIRED> 
diff --git a/test/tests/conf/impincl-test/impincl04.xsl b/test/tests/conf/impincl-test/impincl04.xsl
new file mode 100644
index 0000000..d233b67
--- /dev/null
+++ b/test/tests/conf/impincl-test/impincl04.xsl
@@ -0,0 +1,29 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+<xsl:template name="TestInclude">
+  Included xsl file's relative URI is resolved 
+  relative to the base URI of the xsl:include 
+  element 
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl-test/impincl08.xsl b/test/tests/conf/impincl-test/impincl08.xsl
new file mode 100644
index 0000000..2920ec6
--- /dev/null
+++ b/test/tests/conf/impincl-test/impincl08.xsl
@@ -0,0 +1,29 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+<xsl:variable name="testfile.xml" select="document('testfile.xml')"/>
+
+<xsl:template name="TestInclude">
+  <xsl:value-of select="$testfile.xml/doc/node"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl-test/mdocs11a.xml b/test/tests/conf/impincl-test/mdocs11a.xml
new file mode 100644
index 0000000..ad43d87
--- /dev/null
+++ b/test/tests/conf/impincl-test/mdocs11a.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <body width="66"/>
+  <body width="72"/>
+  <body width="80"/>
+  <body width="96"/>
+  <body width="132"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl-test/mdocstest.xml b/test/tests/conf/impincl-test/mdocstest.xml
new file mode 100644
index 0000000..b3a2d91
--- /dev/null
+++ b/test/tests/conf/impincl-test/mdocstest.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a/>
+<a>mdocs04a.xml</a>	<!-- Hello -->
+<a>mdocs06a.xml</a>	<!-- Shirt, Overt -->
+<v/>
+<a>mdocs04b.xml</a>	<!-- Good Bye -->
+<a>mdocs06b.xml</a>	<!-- Tie, Sly -->
+<b>Ye ha - performed document(File URL) correctly!</b>
+<x/>
+<y/>						
+<z/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl-test/testfile.xml b/test/tests/conf/impincl-test/testfile.xml
new file mode 100644
index 0000000..7e4eae9
--- /dev/null
+++ b/test/tests/conf/impincl-test/testfile.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<node>DocBook bug regressed successfully</node>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/b.xsl b/test/tests/conf/impincl/b.xsl
new file mode 100644
index 0000000..822845f
--- /dev/null
+++ b/test/tests/conf/impincl/b.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: b -->
+<!-- Purpose: Used by impincl05, 06, 07 -->
+
+<xsl:import href="d.xsl"/>
+
+<xsl:template match="author">
+  B-author: <xsl:apply-imports/><xsl:text>,</xsl:text>
+  <!-- No other author templates, so built-in will be used. -->
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/c.xsl b/test/tests/conf/impincl/c.xsl
new file mode 100644
index 0000000..fa57176
--- /dev/null
+++ b/test/tests/conf/impincl/c.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: c -->
+<!-- Purpose: Used by impincl05, 06, 07, 12, 14 -->
+
+<xsl:import href="e.xsl"/>
+
+<xsl:template match="title">
+  C-title: <xsl:value-of select="."/>
+  <xsl:apply-imports/>
+</xsl:template>
+
+<xsl:template match="chapters">
+  C-chapters: <xsl:apply-templates select="chapter"/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/d.xsl b/test/tests/conf/impincl/d.xsl
new file mode 100644
index 0000000..5854812
--- /dev/null
+++ b/test/tests/conf/impincl/d.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: d -->
+<!-- Purpose: Used by b.xsl, which is used by several tests. -->
+
+<xsl:template match="title">
+  D-title: <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="overview">
+  D-overview: <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/e.xsl b/test/tests/conf/impincl/e.xsl
new file mode 100644
index 0000000..09fce1b
--- /dev/null
+++ b/test/tests/conf/impincl/e.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: e -->
+<!-- Purpose: Used by c.xsl, which is used by several tests. -->
+
+<xsl:template match="title">
+  E-title: <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="chapter">
+    E-chapter <xsl:value-of select="@num"/><xsl:text>: </xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/f.xsl b/test/tests/conf/impincl/f.xsl
new file mode 100644
index 0000000..50d81eb
--- /dev/null
+++ b/test/tests/conf/impincl/f.xsl
@@ -0,0 +1,31 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: f -->
+<!-- Purpose: Used by impincl02 -->
+
+<xsl:import href="g.xsl"/>
+
+<xsl:template match="foo">
+  <good-match sheet="f"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/frag-subdir/main_import.xsl b/test/tests/conf/impincl/fragments/frag-subdir/main_import.xsl
new file mode 100644
index 0000000..90048f8
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/frag-subdir/main_import.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: main_import (version for bottom directory in tree) -->
+<!-- Purpose: Used by impincl19 -->
+<!--   This is the second file in the import chain. It's imported by impincl19 -->
+
+<xsl:import href="../main_import.xsl"/>
+
+<xsl:template match="test">
+In Frag-Subdir: <xsl:value-of select="."/>
+<xsl:apply-imports/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/i13imp.xsl b/test/tests/conf/impincl/fragments/i13imp.xsl
new file mode 100644
index 0000000..e77e39c
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/i13imp.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: i13incl -->
+<!-- Purpose: Used by impincl13 -->
+
+<xsl:template match="author">
+  IMPORT author: <xsl:value-of select="."/><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="overview">
+  <xsl:text>IMPORT overview: </xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/i13incl.xsl b/test/tests/conf/impincl/fragments/i13incl.xsl
new file mode 100644
index 0000000..2486062
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/i13incl.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: i13incl -->
+<!-- Purpose: Used by impincl13 -->
+
+<xsl:template match="title">
+  <xsl:text>Template for title in included file should NOT be used.</xsl:text>
+</xsl:template>
+
+<xsl:template match="overview">
+  <!-- This one should have highest import precedence, since it's included into main. -->
+  <xsl:element name="{@x}">
+    <xsl:apply-imports/><!-- go get next-highest-precedence overview template -->
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/i23incl.xsl b/test/tests/conf/impincl/fragments/i23incl.xsl
new file mode 100644
index 0000000..6de14ae
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/i23incl.xsl
@@ -0,0 +1,27 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: 123incl -->
+<!-- Purpose: Used by impincl23 -->
+
+<xsl:import href="i23sub.xsl"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/i23sub.xsl b/test/tests/conf/impincl/fragments/i23sub.xsl
new file mode 100644
index 0000000..e5ae67e
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/i23sub.xsl
@@ -0,0 +1,29 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: i23sub -->
+<!-- Purpose: Used by impincl23 -->
+
+<xsl:template match="foo">
+  <good-match/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/i24imp.xsl b/test/tests/conf/impincl/fragments/i24imp.xsl
new file mode 100644
index 0000000..b1d902c
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/i24imp.xsl
@@ -0,0 +1,31 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: i24imp -->
+<!-- Purpose: Used by impincl24 -->
+
+<xsl:template match="tag">
+  <pre>
+    <xsl:value-of select="concat('border should be ',$color)"/>
+  </pre>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp16all.xsl b/test/tests/conf/impincl/fragments/imp16all.xsl
new file mode 100644
index 0000000..25b52a3
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp16all.xsl
@@ -0,0 +1,63 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- Purpose: To be imported by ../ImpIncl16. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="aac|llh|oop|aah|ssb|iii|rre|eek|xxo|aar|sst|bbd|eeo|xxi|ddg|nne">
+  <!-- Template for big union -->
+  <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="//yyj">
+  <!-- Template for Absolute Location Path covering whole document. -->
+  <xsl:text>Middle: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="aaa[@val]">
+  <!-- Template for attribute -->
+  <xsl:text>@val=</xsl:text><xsl:value-of select="@val"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="*[.=117]">
+  <!-- Template for element's value -->
+  <xsl:text>The node containing 117 is </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="*[(not(.=117) and ((position() &gt; 225) and (position() &lt; 375))) and ((@century='yes') or (@foo='nope'))]">
+  <!-- Template for compound boolean expression -->
+  <xsl:text>A century node is </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- suppress extraneous text -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp17all.xsl b/test/tests/conf/impincl/fragments/imp17all.xsl
new file mode 100644
index 0000000..5ef3184
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp17all.xsl
@@ -0,0 +1,65 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- Purpose: To be imported by ../ImpIncl17. -->
+
+<xsl:key name="id" use="@id" match="LAMBDA"/>
+<xsl:key name="annid" use="@of" match="Annotation"/>
+
+<xsl:template match="a">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="Definition"/><!-- Don't handle the LAMBDAs now -->
+
+<!-- Alternate template for Definition...
+Usual "apply" looping, which means we will visit the LAMBDAs -->
+<!--
+<xsl:template match="Definition">
+  <xsl:apply-templates/>
+</xsl:template>
+-->
+
+<xsl:template match="LAMBDA">
+  <xsl:choose>
+    <xsl:when test="key('annid',@id)">
+      <xsl:text>NO BUG</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>Found one whose id has no annotation!</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="node">
+  <xsl:variable name="id" select="@id"/>
+  <xsl:text>On node whose id is </xsl:text>
+  <xsl:value-of select="$id"/>
+  <xsl:text> -nodes to apply: </xsl:text>
+  <xsl:value-of select="count(key('id',$id))"/><xsl:text>
+</xsl:text>
+  <xsl:apply-templates select="key('id',$id)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp20b.xsl b/test/tests/conf/impincl/fragments/imp20b.xsl
new file mode 100644
index 0000000..16b1b05
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp20b.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp20b -->
+<!-- Purpose: Used by impincl20 -->
+
+<xsl:import href="imp20c.xsl"/>
+
+<xsl:template match="/">
+  <xsl:text>WRONG Match on / in imp20b.xsl&#xa;</xsl:text>
+  <xsl:apply-templates select="foo"/>
+</xsl:template>
+
+<xsl:template match="foo">
+  <B><xsl:apply-imports/></B>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text>match on bar in imp20b.xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp20c.xsl b/test/tests/conf/impincl/fragments/imp20c.xsl
new file mode 100644
index 0000000..2d9ce9d
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp20c.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp20c -->
+<!-- Purpose: Used indirectly by impincl20 -->
+
+<xsl:template match="/">
+  <xsl:text>WRONG Match on / in imp20c.xsl&#xa;</xsl:text>
+  <xsl:apply-templates select="foo"/>
+</xsl:template>
+
+<xsl:template match="foo">
+  <C>
+    <xsl:apply-templates select="bar"/><!-- Should start at top of import tree -->
+  </C>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text>match on bar in imp20c.xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp20d.xsl b/test/tests/conf/impincl/fragments/imp20d.xsl
new file mode 100644
index 0000000..de0e598
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp20d.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp20d -->
+<!-- Purpose: Used by impincl20 -->
+
+<xsl:template match="/">
+  <xsl:text>WRONG Match on / in imp20d.xsl&#xa;</xsl:text>
+  <xsl:apply-templates select="foo"/>
+</xsl:template>
+
+<xsl:template match="foo">
+  <D>
+    <xsl:apply-imports/><!-- no imports here, so it will revert to built-ins -->
+  </D>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text>match on bar in imp20d.xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp21b.xsl b/test/tests/conf/impincl/fragments/imp21b.xsl
new file mode 100644
index 0000000..c56cc9f
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp21b.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp21b -->
+<!-- Purpose: Used by impincl21 -->
+
+<xsl:import href="imp21c.xsl"/>
+
+<xsl:template match="foo">
+  <B><xsl:apply-imports/></B>
+</xsl:template>
+
+<xsl:template match="goo">
+  <B><xsl:apply-imports/></B>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text> - match on bar in imp21b.xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp21c.xsl b/test/tests/conf/impincl/fragments/imp21c.xsl
new file mode 100644
index 0000000..3f4fde9
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp21c.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp21c -->
+<!-- Purpose: Used indirectly by impincl21 and impincl25 -->
+
+<xsl:template match="foo">
+  <C>
+    <xsl:value-of select="name(.)"/>
+    <xsl:apply-templates select="bar"/>
+  </C>
+</xsl:template>
+
+<xsl:template match="goo">
+  <C>
+    <xsl:value-of select="name(.)"/>
+    <xsl:apply-templates select="bar"/>
+  </C>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text> - match on bar in imp21c.xsl</xsl:text>
+</xsl:template>
+
+<xsl:template match="blob"><!-- no such node -->
+  <xsl:apply-imports/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp21d.xsl b/test/tests/conf/impincl/fragments/imp21d.xsl
new file mode 100644
index 0000000..654e9b5
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp21d.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp21d -->
+<!-- Purpose: Used by impincl21 -->
+
+<xsl:template match="foo">
+  <D>
+    <xsl:value-of select="name(.)"/>
+    <xsl:apply-templates select="bar"/>
+  </D>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text> - match on bar in imp21d.xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp25b.xsl b/test/tests/conf/impincl/fragments/imp25b.xsl
new file mode 100644
index 0000000..9654768
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp25b.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp25b -->
+<!-- Purpose: Used by impincl25 -->
+
+<xsl:import href="imp21c.xsl"/>
+
+<xsl:template match="bar">
+  <xsl:text> - match on bar in imp25b.xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp26a.xsl b/test/tests/conf/impincl/fragments/imp26a.xsl
new file mode 100644
index 0000000..76ad99f
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp26a.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp26a -->
+<!-- Purpose: Used by impincl26 -->
+
+<xsl:import href="imp26b.xsl"/>
+
+<!-- No template for outer or inner -->
+
+<xsl:template match="middle">
+  <A>
+    <xsl:value-of select="name(.)"/>
+    <xsl:apply-imports/>
+  </A>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp26b.xsl b/test/tests/conf/impincl/fragments/imp26b.xsl
new file mode 100644
index 0000000..d263851
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp26b.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp26b -->
+<!-- Purpose: Used indirectly by impincl26 -->
+
+<xsl:import href="imp26c.xsl"/>
+
+<!-- No template for middle or inner -->
+
+<xsl:template match="outer">
+  <B>
+    <xsl:value-of select="name(.)"/>
+    <xsl:apply-imports/>
+  </B>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp26c.xsl b/test/tests/conf/impincl/fragments/imp26c.xsl
new file mode 100644
index 0000000..10f5ada
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp26c.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp26c -->
+<!-- Purpose: Used indirectly by impincl26 -->
+
+<xsl:import href="imp26d.xsl"/>
+
+<!-- No template for outer or inner -->
+
+<xsl:template match="middle">
+  <C>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> Switching to inner...
+</xsl:text>
+    <xsl:apply-templates select="inner"/>
+  </C>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp26d.xsl b/test/tests/conf/impincl/fragments/imp26d.xsl
new file mode 100644
index 0000000..df72095
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp26d.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: imp26d -->
+<!-- Purpose: Used indirectly by impincl26 -->
+<!-- No template for middle -->
+
+<xsl:template match="outer">
+  <D>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> Switching to middle...
+</xsl:text>
+    <xsl:apply-templates select="middle"/>
+  </D>
+</xsl:template>
+
+<xsl:template match="inner">
+  <D>
+    <xsl:value-of select="name(.)"/>
+  </D>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp27b.xsl b/test/tests/conf/impincl/fragments/imp27b.xsl
new file mode 100644
index 0000000..2e5cb7c
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp27b.xsl
@@ -0,0 +1,27 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Purpose: To be imported by ../ImpIncl27. -->
+
+  <xsl:import href="file:imp27c.xsl"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/imp27c.xsl b/test/tests/conf/impincl/fragments/imp27c.xsl
new file mode 100644
index 0000000..d864be9
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/imp27c.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- Purpose: To be imported by imp27b. -->
+  <xsl:template match="doc">
+    <xsl:copy-of select="num" />
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/impwparam.xsl b/test/tests/conf/impincl/fragments/impwparam.xsl
new file mode 100644
index 0000000..a8645bc
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/impwparam.xsl
@@ -0,0 +1,35 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: impwparam -->
+<!-- Purpose: Used by impincl28 and 29. Has xsl:param to receive param, just in case. -->
+
+<xsl:template match="tag">
+  <xsl:param name="p1" select="'default'"/>
+  <imp-t><xsl:value-of select="$p1"/></imp-t>
+</xsl:template>
+
+<xsl:template match="bag">
+  <xsl:param name="p1" select="'default'"/>
+  <imp-b><xsl:value-of select="$p1"/></imp-b>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/main_import.xsl b/test/tests/conf/impincl/fragments/main_import.xsl
new file mode 100644
index 0000000..b65ab5b
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/main_import.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: main_import (version for directory one level down) -->
+<!-- Purpose: Used by impincl19 -->
+<!--   This is the third file in the import chain. It's imported by the one in the frag-subdir. -->
+
+<xsl:import href="../main_import.xsl"/>
+
+<xsl:template match="test">
+In Fragments: <xsl:value-of select="."/>
+<xsl:apply-imports/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/ss2.xsl b/test/tests/conf/impincl/fragments/ss2.xsl
new file mode 100644
index 0000000..bb83fea
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/ss2.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="ss3.xsl"/>
+<xsl:param name="mParam" select="string('!From ss2!')"/>
+
+<xsl:template match="author">
+  m-author:  
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/ss3.xsl b/test/tests/conf/impincl/fragments/ss3.xsl
new file mode 100644
index 0000000..76a9728
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/ss3.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="ss4.xsl"/>
+<xsl:param name="nParam" select="string('!From ss3!')"/>
+
+<xsl:template match="chapter[@num='1']">
+  n-contents of first chapter:  
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/ss4.xsl b/test/tests/conf/impincl/fragments/ss4.xsl
new file mode 100644
index 0000000..7eab5e0
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/ss4.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="ss5.xsl"/>
+<xsl:param name="oParam" select="string('!From ss4!')"/>
+
+<xsl:template match="overview">
+  o-overview: 
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/ss5.xsl b/test/tests/conf/impincl/fragments/ss5.xsl
new file mode 100644
index 0000000..e72356b
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/ss5.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:param name="pParam" select="string('!From ss5!')"/>
+
+<xsl:template match="publisher">
+  p-publisher: 
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/fragments/ss6.xsl b/test/tests/conf/impincl/fragments/ss6.xsl
new file mode 100644
index 0000000..e87d974
--- /dev/null
+++ b/test/tests/conf/impincl/fragments/ss6.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:param name="qParam" select="string('!From ss6!')"/>
+
+<xsl:template match="price">
+  q-price: 
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/g.xsl b/test/tests/conf/impincl/g.xsl
new file mode 100644
index 0000000..c1e2407
--- /dev/null
+++ b/test/tests/conf/impincl/g.xsl
@@ -0,0 +1,29 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: g -->
+<!-- Purpose: Used indirectly by impincl02, etc. -->
+
+<xsl:template match="foo">
+  <bad-match sheet="g"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/h.xsl b/test/tests/conf/impincl/h.xsl
new file mode 100644
index 0000000..90ff096
--- /dev/null
+++ b/test/tests/conf/impincl/h.xsl
@@ -0,0 +1,26 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="foo">
+  <best-match/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/i.xsl b/test/tests/conf/impincl/i.xsl
new file mode 100644
index 0000000..f66e47e
--- /dev/null
+++ b/test/tests/conf/impincl/i.xsl
@@ -0,0 +1,29 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="html"/>
+
+<xsl:template match="one-tag">
+ From Imported stylesheet: <xsl:value-of select="self::node()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl01.xml b/test/tests/conf/impincl/impincl01.xml
new file mode 100644
index 0000000..11b06b6
--- /dev/null
+++ b/test/tests/conf/impincl/impincl01.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl01.xsl b/test/tests/conf/impincl/impincl01.xsl
new file mode 100644
index 0000000..d5c89d1
--- /dev/null
+++ b/test/tests/conf/impincl/impincl01.xsl
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.1 Stylesheet Inclusion -->
+  <!-- Purpose: Test of basic Import & Include functionality. -->
+
+<xsl:import href="i.xsl"/>
+<xsl:include href="j.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl02.xml b/test/tests/conf/impincl/impincl02.xml
new file mode 100644
index 0000000..f4e5164
--- /dev/null
+++ b/test/tests/conf/impincl/impincl02.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<foo/>
diff --git a/test/tests/conf/impincl/impincl02.xsl b/test/tests/conf/impincl/impincl02.xsl
new file mode 100644
index 0000000..888ce09
--- /dev/null
+++ b/test/tests/conf/impincl/impincl02.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: IMPINCL02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6 Combining Stylesheets -->
+  <!-- Purpose: Included document's xsl:import (f imports g) is moved into the
+    including document. Import precedence is (high) impincl02, g (low) -->
+
+<xsl:include href="f.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl03.xml b/test/tests/conf/impincl/impincl03.xml
new file mode 100644
index 0000000..e7d2b34
--- /dev/null
+++ b/test/tests/conf/impincl/impincl03.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <title>Testing import/include nesting</title>
+  <author>Joe Jones</author>
+  <publisher>Conformance Press</publisher>
+  <overview>testing-import</overview>
+  <chapters>
+    <chapter num="1">know XSL</chapter>
+    <chapter num="2">love XSL</chapter>
+  </chapters>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl03.xsl b/test/tests/conf/impincl/impincl03.xsl
new file mode 100644
index 0000000..dd8ba68
--- /dev/null
+++ b/test/tests/conf/impincl/impincl03.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: IMPINCL03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 -->
+  <!-- Purpose: Nest imports and includes so that there are two of each, import on top. -->
+
+<xsl:import href="m.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="concat($mParam,$nParam,$oParam,$pParam)"/>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+ 
+<xsl:template match="title">
+  Main stylesheet - title:
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl04.xml b/test/tests/conf/impincl/impincl04.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/impincl/impincl04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl04.xsl b/test/tests/conf/impincl/impincl04.xsl
new file mode 100644
index 0000000..4ab175d
--- /dev/null
+++ b/test/tests/conf/impincl/impincl04.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.1 -->
+  <!-- Purpose: Verifies; "A relative URI is resolved relative to the
+       base URI of the xsl:include element". The included document loads
+       from an included file that resides in a different subdirectory. -->
+
+<xsl:include href="../impincl-test/impincl04.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="TestInclude"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl05.xml b/test/tests/conf/impincl/impincl05.xml
new file mode 100644
index 0000000..4a926f1
--- /dev/null
+++ b/test/tests/conf/impincl/impincl05.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+<title>Testing:import-precedence</title>
+<author>Joe Jones</author>
+<overview>testing-import</overview>
+<chapters>
+<chapter num="1">know xsl</chapter>
+<chapter num="2">love xsl</chapter>
+</chapters>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl05.xsl b/test/tests/conf/impincl/impincl05.xsl
new file mode 100644
index 0000000..e271723
--- /dev/null
+++ b/test/tests/conf/impincl/impincl05.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: IMPINCL05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 -->
+  <!-- Purpose: Two imports, each of which has an import, plus an
+       apply-imports in main stylesheet. Precedence (low) DBECA (high) per spec. -->
+
+<xsl:import href="b.xsl"/>
+<xsl:import href="c.xsl"/>
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="doc/*" /></out>
+</xsl:template>
+
+<xsl:template match="title"><!-- This has import precedence over all others -->
+  MAIN title matched<xsl:text>...</xsl:text>
+  <xsl:apply-imports/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl06.xml b/test/tests/conf/impincl/impincl06.xml
new file mode 100644
index 0000000..529ffe0
--- /dev/null
+++ b/test/tests/conf/impincl/impincl06.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+<title>Testing-xsl:include</title>
+<author>Joe Jones</author>
+<overview>testing-include</overview>
+<chapters>
+<chapter num="1">know xsl</chapter>
+<chapter num="2">love xsl</chapter>
+</chapters>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl06.xsl b/test/tests/conf/impincl/impincl06.xsl
new file mode 100644
index 0000000..f03231b
--- /dev/null
+++ b/test/tests/conf/impincl/impincl06.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: IMPINCL06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6 -->
+  <!-- Purpose: Two includes (see below), each of which has an import. -->
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="doc/*" /></out>
+</xsl:template>
+
+<xsl:template match="author">
+  MAIN author: <xsl:text>How did THIS get called?</xsl:text>
+</xsl:template>
+
+<xsl:template match="chapter"><!-- This has import precedence over e.xsl -->
+    MAIN chapter <xsl:value-of select="@num"/><xsl:text>: </xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<!-- INCLUDES can be anywhere and are positionally significant -->
+<xsl:include href="b.xsl"/>
+<xsl:include href="c.xsl"/>
+
+<xsl:template match="title"><!-- This has import precedence over d.xsl, plus it's last -->
+  MAIN title matched<xsl:text>...</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl07.xml b/test/tests/conf/impincl/impincl07.xml
new file mode 100644
index 0000000..2d47294
--- /dev/null
+++ b/test/tests/conf/impincl/impincl07.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+<title>Testing:import-precedence</title>
+<author>Joe Jones</author>
+<author>Milt Hinton</author>
+<overview>testing-import</overview>
+<chapters>
+<chapter num="1">know xsl</chapter>
+<chapter num="2">love xsl</chapter>
+</chapters>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl07.xsl b/test/tests/conf/impincl/impincl07.xsl
new file mode 100644
index 0000000..86eb37a
--- /dev/null
+++ b/test/tests/conf/impincl/impincl07.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: IMPINCL07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 -->
+  <!-- Purpose: Show the significance of the order of xsl:import declarations. -->
+
+<xsl:import href="c.xsl"/>
+<xsl:import href="b.xsl"/>
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="doc/*" /></out>
+</xsl:template>
+
+<xsl:template match="title"><!-- This has import precedence over all others -->
+  MAIN title matched<xsl:text>...</xsl:text>
+  <xsl:apply-imports/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl08.xml b/test/tests/conf/impincl/impincl08.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/impincl/impincl08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl08.xsl b/test/tests/conf/impincl/impincl08.xsl
new file mode 100644
index 0000000..fca31c5
--- /dev/null
+++ b/test/tests/conf/impincl/impincl08.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Loads document from an included file that resides in
+       a different subdirectory. -->
+
+<xsl:include href="../impincl-test/impincl08.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="TestInclude"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl09.xml b/test/tests/conf/impincl/impincl09.xml
new file mode 100644
index 0000000..2c569f9
--- /dev/null
+++ b/test/tests/conf/impincl/impincl09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
diff --git a/test/tests/conf/impincl/impincl09.xsl b/test/tests/conf/impincl/impincl09.xsl
new file mode 100644
index 0000000..6faa992
--- /dev/null
+++ b/test/tests/conf/impincl/impincl09.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="q.xsl"/>
+
+  <!-- FileName: impincl09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.1 Stylesheet Inclusion -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: The resource located by the href attribute value is parsed as an 
+       XML document, and the children of the xsl:stylesheet element in this document 
+       replace the xsl:include element in the including document. (No namespaces 
+       should be copied over. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="set1 set2" namespace="www.lotus.com"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+  <xsl:attribute name="test" ></xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl10.xml b/test/tests/conf/impincl/impincl10.xml
new file mode 100644
index 0000000..0255a51
--- /dev/null
+++ b/test/tests/conf/impincl/impincl10.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <tag>Example of apply-imports</tag>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl10.xsl b/test/tests/conf/impincl/impincl10.xsl
new file mode 100644
index 0000000..fe31762
--- /dev/null
+++ b/test/tests/conf/impincl/impincl10.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Purpose: General test of xsl:apply-imports from spec. -->
+
+<xsl:import href="l.xsl"/>
+
+<xsl:template match="doc">
+ <out>
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+<xsl:template match="tag">
+  <div style="border: solid red">
+    <xsl:apply-imports/>
+  </div>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl11.xml b/test/tests/conf/impincl/impincl11.xml
new file mode 100644
index 0000000..fcc1575
--- /dev/null
+++ b/test/tests/conf/impincl/impincl11.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<doc>
+  <title>Testing import/include nesting</title>
+  <author>Joe Jones</author>
+  <publisher>Conformance Press</publisher>
+  <overview>testing-import</overview>
+  <price>25.85</price>
+  <chapters>
+    <chapter num="1">know XSL</chapter>
+    <chapter num="2">love XSL</chapter>
+  </chapters>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl11.xsl b/test/tests/conf/impincl/impincl11.xsl
new file mode 100644
index 0000000..bb6d081
--- /dev/null
+++ b/test/tests/conf/impincl/impincl11.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Nest imports and includes using relative paths. -->
+
+<xsl:import href="fragments/ss2.xsl"/>
+<xsl:import href="fragments/ss6.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="concat($mParam,$nParam,$oParam,$pParam, $qParam)"/>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="title">
+  Main stylesheet - title:
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl12.xml b/test/tests/conf/impincl/impincl12.xml
new file mode 100644
index 0000000..b3e5052
--- /dev/null
+++ b/test/tests/conf/impincl/impincl12.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+<title>Testing include</title>
+<author>Joe Jones</author>
+<chapters>
+<chapter num="1">know xsl</chapter>
+<chapter num="2">love xsl</chapter>
+</chapters>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl12.xsl b/test/tests/conf/impincl/impincl12.xsl
new file mode 100644
index 0000000..c44c3ee
--- /dev/null
+++ b/test/tests/conf/impincl/impincl12.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that apply-imports really means imports, not includes -->
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="doc/*" /></out>
+</xsl:template>
+
+<xsl:template match="author">
+  MAIN author: <xsl:value-of select="."/>
+</xsl:template>
+
+<!-- INCLUDES can be anywhere and are positionally significant -->
+<xsl:include href="c.xsl"/>
+
+<xsl:template match="title"><!-- This has import precedence over e.xsl, plus it's last -->
+  MAIN title: <xsl:value-of select="."/>
+  <xsl:apply-imports/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl13.xml b/test/tests/conf/impincl/impincl13.xml
new file mode 100644
index 0000000..d495e9a
--- /dev/null
+++ b/test/tests/conf/impincl/impincl13.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>
+<title>Testing include</title>
+<author>Joe Jones</author>
+<overview x="y">testing apply-imports from include</overview>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl13.xsl b/test/tests/conf/impincl/impincl13.xsl
new file mode 100644
index 0000000..2bd676f
--- /dev/null
+++ b/test/tests/conf/impincl/impincl13.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6 -->
+  <!-- Creator: David Marston, from an idea by Norm Walsh -->
+  <!-- Purpose: Show that included templates doing apply-imports *will* get includer's import tree. -->
+
+<xsl:import href="fragments/i13imp.xsl"/>
+<xsl:include href="fragments/i13incl.xsl"/>
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="doc/*" /></out>
+</xsl:template>
+
+<xsl:template match="author">
+  MAIN author: <xsl:value-of select="."/>
+  <xsl:apply-imports/>
+</xsl:template>
+
+<xsl:template match="title"><!-- This is last, so it wins out over the imports/includes -->
+  MAIN title: <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl14.xml b/test/tests/conf/impincl/impincl14.xml
new file mode 100644
index 0000000..bf17318
--- /dev/null
+++ b/test/tests/conf/impincl/impincl14.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Testing:apply-imports</title>
+  <author>Joe Jones</author>
+  <overview>No templates for this part.</overview>
+  <chapters>
+    <chapter num="1">know xsl</chapter>
+    <chapter num="2">love xsl</chapter>
+  </chapters>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl14.xsl b/test/tests/conf/impincl/impincl14.xsl
new file mode 100644
index 0000000..43108f3
--- /dev/null
+++ b/test/tests/conf/impincl/impincl14.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that apply-imports has limited scope of rules to search. -->
+  <!-- "xsl:apply-imports processes the current node using only template rules that
+     were imported into the stylesheet CONTAINING THE CURRENT TEMPLATE RULE...."
+     The apply-imports will be done in c.xsl; rules from r won't apply at that time. -->
+
+<xsl:import href="r.xsl"/>
+<xsl:import href="c.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="title"/><!-- c, e, r all have templates for this. -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl15.xml b/test/tests/conf/impincl/impincl15.xml
new file mode 100644
index 0000000..0255a51
--- /dev/null
+++ b/test/tests/conf/impincl/impincl15.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <tag>Example of apply-imports</tag>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl15.xsl b/test/tests/conf/impincl/impincl15.xsl
new file mode 100644
index 0000000..6119c5a
--- /dev/null
+++ b/test/tests/conf/impincl/impincl15.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that apply-imports stays in same mode as what called it. -->
+
+<xsl:import href="s.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates mode="yes"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="tag" mode="yes">
+  <div style="border: solid green">
+    <xsl:apply-imports/>
+  </div>
+</xsl:template>
+
+<xsl:template match="tag">
+  <div style="border: solid red">
+    <xsl:apply-imports/>
+  </div>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl16.xml b/test/tests/conf/impincl/impincl16.xml
new file mode 100644
index 0000000..c6332d5
--- /dev/null
+++ b/test/tests/conf/impincl/impincl16.xml
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<aaa att="no" foo="nope" val="yes">1</aaa>
+<bbb>2</bbb>
+<ccc>3</ccc>
+<ddd>4</ddd>
+<eee>5</eee>
+<fff>6</fff>
+<ggg>7</ggg>
+<hhh>8</hhh>
+<iii>9</iii>
+<jjj>10</jjj>
+<kkk>11</kkk>
+<lll>12</lll>
+<mmm>13</mmm>
+<nnn>14</nnn>
+<ooo>15</ooo>
+<ppp>16</ppp>
+<qqq>17</qqq>
+<rrr>18</rrr>
+<sss>19</sss>
+<ttt>20</ttt>
+<uuu>21</uuu>
+<vvv>22</vvv>
+<www>23</www>
+<xxx>24</xxx>
+<yyy>25</yyy>
+<aab>26</aab>
+<bbb>27</bbb>
+<ccb>28</ccb>
+<ddb>29</ddb>
+<eeb>30</eeb>
+<ffb>31</ffb>
+<ggb>32</ggb>
+<hhb>33</hhb>
+<iib>34</iib>
+<jjb>35</jjb>
+<kkb>36</kkb>
+<llb>37</llb>
+<mmb>38</mmb>
+<nnb>39</nnb>
+<oob>40</oob>
+<ppb>41</ppb>
+<qqb>42</qqb>
+<rrb>43</rrb>
+<ssb>44</ssb>
+<ttb>45</ttb>
+<uub>46</uub>
+<vvb>47</vvb>
+<wwb>48</wwb>
+<xxb>49</xxb>
+<yyb>50</yyb>
+<aac>51</aac>
+<bbc>52</bbc>
+<ccc>53</ccc>
+<ddc>54</ddc>
+<eec>55</eec>
+<ffc>56</ffc>
+<ggc>57</ggc>
+<hhc>58</hhc>
+<iic>59</iic>
+<jjc>60</jjc>
+<kkc>61</kkc>
+<llc>62</llc>
+<mmc>63</mmc>
+<nnc>64</nnc>
+<ooc>65</ooc>
+<ppc>66</ppc>
+<qqc>67</qqc>
+<rrc>68</rrc>
+<ssc>69</ssc>
+<ttc>70</ttc>
+<uuc>71</uuc>
+<vvc>72</vvc>
+<wwc>73</wwc>
+<xxc>74</xxc>
+<yyc>75</yyc>
+<aad>76</aad>
+<bbd>77</bbd>
+<ccd>78</ccd>
+<ddd>79</ddd>
+<eed>80</eed>
+<ffd>81</ffd>
+<ggd>82</ggd>
+<hhd>83</hhd>
+<iid>84</iid>
+<jjd>85</jjd>
+<kkd>86</kkd>
+<lld>87</lld>
+<mmd>88</mmd>
+<nnd>89</nnd>
+<ood>90</ood>
+<ppd>91</ppd>
+<qqd>92</qqd>
+<rrd>93</rrd>
+<ssd>94</ssd>
+<ttd>95</ttd>
+<uud>96</uud>
+<vvd>97</vvd>
+<wwd>98</wwd>
+<xxd>99</xxd>
+<yyd century="yes">100</yyd>
+<aae>101</aae>
+<bbe>102</bbe>
+<cce>103</cce>
+<dde>104</dde>
+<eee>105</eee>
+<ffe>106</ffe>
+<gge>107</gge>
+<hhe>108</hhe>
+<iie>109</iie>
+<jje>110</jje>
+<kke>111</kke>
+<lle>112</lle>
+<mme>113</mme>
+<nne>114</nne>
+<ooe>115</ooe>
+<ppe>116</ppe>
+<qqe>117</qqe>
+<rre>118</rre>
+<sse>119</sse>
+<tte>120</tte>
+<uue>121</uue>
+<vve>122</vve>
+<wwe>123</wwe>
+<xxe>124</xxe>
+<yye>125</yye>
+<aaf>126</aaf>
+<bbf>127</bbf>
+<ccf>128</ccf>
+<ddf>129</ddf>
+<eef>130</eef>
+<fff>131</fff>
+<ggf>132</ggf>
+<hhf>133</hhf>
+<iif>134</iif>
+<jjf>135</jjf>
+<kkf>136</kkf>
+<llf>137</llf>
+<mmf>138</mmf>
+<nnf>139</nnf>
+<oof>140</oof>
+<ppf>141</ppf>
+<qqf>142</qqf>
+<rrf>143</rrf>
+<ssf>144</ssf>
+<ttf>145</ttf>
+<uuf>146</uuf>
+<vvf>147</vvf>
+<wwf>148</wwf>
+<xxf>149</xxf>
+<yyf>150</yyf>
+<aag>151</aag>
+<bbg>152</bbg>
+<ccg>153</ccg>
+<ddg>154</ddg>
+<eeg>155</eeg>
+<ffg>156</ffg>
+<ggg>157</ggg>
+<hhg>158</hhg>
+<iig>159</iig>
+<jjg>160</jjg>
+<kkg>161</kkg>
+<llg>162</llg>
+<mmg>163</mmg>
+<nng>164</nng>
+<oog>165</oog>
+<ppg>166</ppg>
+<qqg>167</qqg>
+<rrg>168</rrg>
+<ssg>169</ssg>
+<ttg>170</ttg>
+<uug>171</uug>
+<vvg>172</vvg>
+<wwg>173</wwg>
+<xxg>174</xxg>
+<yyg>175</yyg>
+<aah>176</aah>
+<bbh>177</bbh>
+<cch>178</cch>
+<ddh>179</ddh>
+<eeh>180</eeh>
+<ffh>181</ffh>
+<ggh>182</ggh>
+<hhh>183</hhh>
+<iih>184</iih>
+<jjh>185</jjh>
+<kkh>186</kkh>
+<llh>187</llh>
+<mmh>188</mmh>
+<nnh>189</nnh>
+<ooh>190</ooh>
+<pph>191</pph>
+<qqh>192</qqh>
+<rrh>193</rrh>
+<ssh>194</ssh>
+<tth>195</tth>
+<uuh>196</uuh>
+<vvh>197</vvh>
+<wwh>198</wwh>
+<xxh>199</xxh>
+<yyh century="yes">200</yyh>
+<aai>201</aai>
+<bbi>202</bbi>
+<cci>203</cci>
+<ddi>204</ddi>
+<eei>205</eei>
+<ffi>206</ffi>
+<ggi>207</ggi>
+<hhi>208</hhi>
+<iii>209</iii>
+<jji>210</jji>
+<kki>211</kki>
+<lli>212</lli>
+<mmi>213</mmi>
+<nni>214</nni>
+<ooi>215</ooi>
+<ppi>216</ppi>
+<qqi>217</qqi>
+<rri>218</rri>
+<ssi>219</ssi>
+<tti>220</tti>
+<uui>221</uui>
+<vvi>222</vvi>
+<wwi>223</wwi>
+<xxi>224</xxi>
+<yyi>225</yyi>
+<aaj>226</aaj>
+<bbj>227</bbj>
+<ccj>228</ccj>
+<ddj>229</ddj>
+<eej>230</eej>
+<ffj>231</ffj>
+<ggj>232</ggj>
+<hhj>233</hhj>
+<iij>234</iij>
+<jjj>235</jjj>
+<kkj>236</kkj>
+<llj>237</llj>
+<mmj>238</mmj>
+<nnj>239</nnj>
+<ooj>240</ooj>
+<ppj>241</ppj>
+<qqj>242</qqj>
+<rrj>243</rrj>
+<ssj>244</ssj>
+<ttj>245</ttj>
+<uuj>246</uuj>
+<vvj>247</vvj>
+<wwj>248</wwj>
+<xxj>249</xxj>
+<yyj>250</yyj>
+<aak>251</aak>
+<bbk>252</bbk>
+<cck>253</cck>
+<ddk>254</ddk>
+<eek>255</eek>
+<ffk>256</ffk>
+<ggk>257</ggk>
+<hhk>258</hhk>
+<iik>259</iik>
+<jjk>260</jjk>
+<kkk>261</kkk>
+<llk>262</llk>
+<mmk>263</mmk>
+<nnk>264</nnk>
+<ook>265</ook>
+<ppk>266</ppk>
+<qqk>267</qqk>
+<rrk>268</rrk>
+<ssk>269</ssk>
+<ttk>270</ttk>
+<uuk>271</uuk>
+<vvk>272</vvk>
+<wwk>273</wwk>
+<xxk>274</xxk>
+<yyk>275</yyk>
+<aal>276</aal>
+<bbl>277</bbl>
+<ccl>278</ccl>
+<ddl>279</ddl>
+<eel>280</eel>
+<ffl>281</ffl>
+<ggl>282</ggl>
+<hhl>283</hhl>
+<iil>284</iil>
+<jjl>285</jjl>
+<kkl>286</kkl>
+<lll>287</lll>
+<mml>288</mml>
+<nnl>289</nnl>
+<ool>290</ool>
+<ppl>291</ppl>
+<qql>292</qql>
+<rrl>293</rrl>
+<ssl>294</ssl>
+<ttl>295</ttl>
+<uul>296</uul>
+<vvl>297</vvl>
+<wwl>298</wwl>
+<xxl>299</xxl>
+<yyl century="yes">300</yyl>
+<aam>301</aam>
+<bbm>302</bbm>
+<ccm>303</ccm>
+<ddm>304</ddm>
+<eem>305</eem>
+<ffm>306</ffm>
+<ggm>307</ggm>
+<hhm>308</hhm>
+<iim>309</iim>
+<jjm>310</jjm>
+<kkm>311</kkm>
+<llm>312</llm>
+<mmm>313</mmm>
+<nnm>314</nnm>
+<oom>315</oom>
+<ppm>316</ppm>
+<qqm>317</qqm>
+<rrm>318</rrm>
+<ssm>319</ssm>
+<ttm>320</ttm>
+<uum>321</uum>
+<vvm>322</vvm>
+<wwm>323</wwm>
+<xxm>324</xxm>
+<yym>325</yym>
+<aan>326</aan>
+<bbn>327</bbn>
+<ccn>328</ccn>
+<ddn>329</ddn>
+<een>330</een>
+<ffn>331</ffn>
+<ggn>332</ggn>
+<hhn>333</hhn>
+<iin>334</iin>
+<jjn>335</jjn>
+<kkn>336</kkn>
+<lln>337</lln>
+<mmn>338</mmn>
+<nnn>339</nnn>
+<oon>340</oon>
+<ppn>341</ppn>
+<qqn>342</qqn>
+<rrn>343</rrn>
+<ssn>344</ssn>
+<ttn>345</ttn>
+<uun>346</uun>
+<vvn>347</vvn>
+<wwn>348</wwn>
+<xxn>349</xxn>
+<yyn>350</yyn>
+<aao>351</aao>
+<bbo>352</bbo>
+<cco>353</cco>
+<ddo>354</ddo>
+<eeo>355</eeo>
+<ffo>356</ffo>
+<ggo>357</ggo>
+<hho>358</hho>
+<iio>359</iio>
+<jjo>360</jjo>
+<kko>361</kko>
+<llo>362</llo>
+<mmo>363</mmo>
+<nno>364</nno>
+<ooo>365</ooo>
+<ppo>366</ppo>
+<qqo>367</qqo>
+<rro>368</rro>
+<sso>369</sso>
+<tto>370</tto>
+<uuo>371</uuo>
+<vvo>372</vvo>
+<wwo>373</wwo>
+<xxo>374</xxo>
+<yyo>375</yyo>
+<aap>376</aap>
+<bbp>377</bbp>
+<ccp>378</ccp>
+<ddp>379</ddp>
+<eep>380</eep>
+<ffp>381</ffp>
+<ggp>382</ggp>
+<hhp>383</hhp>
+<iip>384</iip>
+<jjp>385</jjp>
+<kkp>386</kkp>
+<llp>387</llp>
+<mmp>388</mmp>
+<nnp>389</nnp>
+<oop>390</oop>
+<ppp>391</ppp>
+<qqp>392</qqp>
+<rrp>393</rrp>
+<ssp>394</ssp>
+<ttp>395</ttp>
+<uup>396</uup>
+<vvp>397</vvp>
+<wwp>398</wwp>
+<xxp>399</xxp>
+<yyp century="yes">400</yyp>
+<aaq>401</aaq>
+<bbq>402</bbq>
+<ccq>403</ccq>
+<ddq>404</ddq>
+<eeq>405</eeq>
+<ffq>406</ffq>
+<ggq>407</ggq>
+<hhq>408</hhq>
+<iiq>409</iiq>
+<jjq>410</jjq>
+<kkq>411</kkq>
+<llq>412</llq>
+<mmq>413</mmq>
+<nnq>414</nnq>
+<ooq>415</ooq>
+<ppq>416</ppq>
+<qqq>417</qqq>
+<rrq>418</rrq>
+<ssq>419</ssq>
+<ttq>420</ttq>
+<uuq>421</uuq>
+<vvq>422</vvq>
+<wwq>423</wwq>
+<xxq>424</xxq>
+<yyq>425</yyq>
+<aar>426</aar>
+<bbr>427</bbr>
+<ccr>428</ccr>
+<ddr>429</ddr>
+<eer>430</eer>
+<ffr>431</ffr>
+<ggr>432</ggr>
+<hhr>433</hhr>
+<iir>434</iir>
+<jjr>435</jjr>
+<kkr>436</kkr>
+<llr>437</llr>
+<mmr>438</mmr>
+<nnr>439</nnr>
+<oor>440</oor>
+<ppr>441</ppr>
+<qqr>442</qqr>
+<rrr>443</rrr>
+<ssr>444</ssr>
+<ttr>445</ttr>
+<uur>446</uur>
+<vvr>447</vvr>
+<wwr>448</wwr>
+<xxr>449</xxr>
+<yyr>450</yyr>
+<aas>451</aas>
+<bbs>452</bbs>
+<ccs>453</ccs>
+<dds>454</dds>
+<ees>455</ees>
+<ffs>456</ffs>
+<ggs>457</ggs>
+<hhs>458</hhs>
+<iis>459</iis>
+<jjs>460</jjs>
+<kks>461</kks>
+<lls>462</lls>
+<mms>463</mms>
+<nns>464</nns>
+<oos>465</oos>
+<pps>466</pps>
+<qqs>467</qqs>
+<rrs>468</rrs>
+<sss>469</sss>
+<tts>470</tts>
+<uus>471</uus>
+<vvs>472</vvs>
+<wws>473</wws>
+<xxs>474</xxs>
+<yys>475</yys>
+<aat>476</aat>
+<bbt>477</bbt>
+<cct>478</cct>
+<ddt>479</ddt>
+<eet>480</eet>
+<fft>481</fft>
+<ggt>482</ggt>
+<hht>483</hht>
+<iit>484</iit>
+<jjt>485</jjt>
+<kkt>486</kkt>
+<llt>487</llt>
+<mmt>488</mmt>
+<nnt>489</nnt>
+<oot>490</oot>
+<ppt>491</ppt>
+<qqt>492</qqt>
+<rrt>493</rrt>
+<sst>494</sst>
+<ttt>495</ttt>
+<uut>496</uut>
+<vvt>497</vvt>
+<wwt>498</wwt>
+<xxt>499</xxt>
+<yyt century="yes">500</yyt>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl16.xsl b/test/tests/conf/impincl/impincl16.xsl
new file mode 100644
index 0000000..7cc384f
--- /dev/null
+++ b/test/tests/conf/impincl/impincl16.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpIncl16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of importing a basic stylesheet involving matching. -->
+
+<xsl:import href="fragments/imp16all.xsl"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl17.xml b/test/tests/conf/impincl/impincl17.xml
new file mode 100644
index 0000000..4e42f3e
--- /dev/null
+++ b/test/tests/conf/impincl/impincl17.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<a>
+  <Definition>
+    <LAMBDA id="i1"/>
+    <LAMBDA id="i5"/>
+  </Definition>
+  <Annotation of="i1"><node id="i5"/></Annotation>
+  <Annotation of="i5"/>
+</a>
diff --git a/test/tests/conf/impincl/impincl17.xsl b/test/tests/conf/impincl/impincl17.xsl
new file mode 100644
index 0000000..d301551
--- /dev/null
+++ b/test/tests/conf/impincl/impincl17.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpIncl17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 -->
+  <!-- Purpose: Test of importing a stylesheet involving keys. -->
+  <!-- Author: Claudio Sacerdoti Coen, revised by David Marston -->
+
+<!-- Uncomment either line below if keyspace fails when defined only in import. -->
+<!-- <xsl:key name="id" use="@id" match="LAMBDA"/> -->
+<!-- <xsl:key name="annid" use="@of" match="Annotation"/> -->
+
+<xsl:import href="fragments/imp17all.xsl"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl18.xml b/test/tests/conf/impincl/impincl18.xml
new file mode 100644
index 0000000..e3009f7
--- /dev/null
+++ b/test/tests/conf/impincl/impincl18.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root>This is from the XML Source Document.</root>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl18.xsl b/test/tests/conf/impincl/impincl18.xsl
new file mode 100644
index 0000000..b845d6e
--- /dev/null
+++ b/test/tests/conf/impincl/impincl18.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: impincl18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: Gary L Peskin -->
+  <!-- Purpose: When no stylesheets are imported, an xsl:apply-imports should
+       select the built-in templates. -->
+
+<xsl:template match="/">
+  <xsl:message>This message should be issued only one time.</xsl:message>
+  <result>
+    Before apply-imports
+      <xsl:apply-imports/>
+    After apply-imports
+  </result>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl19.xml b/test/tests/conf/impincl/impincl19.xml
new file mode 100644
index 0000000..0f592a2
--- /dev/null
+++ b/test/tests/conf/impincl/impincl19.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<test>Hello</test>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl19.xsl b/test/tests/conf/impincl/impincl19.xsl
new file mode 100644
index 0000000..1741acc
--- /dev/null
+++ b/test/tests/conf/impincl/impincl19.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: impincl19 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 2.6.2 Stylesheet Import -->
+<!-- Creator: Vikranth Reddy (vreddy@covigo.com) -->
+<!-- Purpose: Test of import (down and up directory tree) using ..\main_import.xsl
+   from two separate subdiretories. Filename deliberately repeated! -->
+
+<xsl:import href="fragments/frag-subdir/main_import.xsl"/>
+
+<xsl:template match="test">
+<out>
+From Stylesheet: <xsl:value-of select="."/>
+<xsl:apply-imports/>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl20.xml b/test/tests/conf/impincl/impincl20.xml
new file mode 100644
index 0000000..7d5f70c
--- /dev/null
+++ b/test/tests/conf/impincl/impincl20.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<foo>
+  <bar>
+    <baz/>
+  </bar>
+</foo>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl20.xsl b/test/tests/conf/impincl/impincl20.xsl
new file mode 100644
index 0000000..693fd3b
--- /dev/null
+++ b/test/tests/conf/impincl/impincl20.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: impincl20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 -->
+  <!-- Creator: Morten Jorgensen -->
+  <!-- Purpose: Show that apply-imports applies on its matching node, not children. -->
+
+<xsl:import href="fragments/imp20b.xsl"/>
+<xsl:import href="fragments/imp20d.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>Match on / in top xsl&#xa;</xsl:text>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <A><xsl:apply-imports/></A>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text>match on bar in top xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl21.xml b/test/tests/conf/impincl/impincl21.xml
new file mode 100644
index 0000000..0be4662
--- /dev/null
+++ b/test/tests/conf/impincl/impincl21.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo><bar/></foo>
+  <goo><bar/></goo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl21.xsl b/test/tests/conf/impincl/impincl21.xsl
new file mode 100644
index 0000000..c53df82
--- /dev/null
+++ b/test/tests/conf/impincl/impincl21.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: impincl21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 -->
+  <!-- Creator: Morten Jorgensen -->
+  <!-- Purpose: Show selection of templates from files with 1st and 2nd import precedence. -->
+
+<xsl:import href="fragments/imp21b.xsl"/>
+<xsl:import href="fragments/imp21d.xsl"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:text>Match on /doc in top xsl&#xa;</xsl:text>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <A><xsl:apply-imports/></A><xsl:text>&#xa;</xsl:text>
+</xsl:template>
+
+<xsl:template match="goo">
+  <A><xsl:apply-imports/></A><xsl:text>&#xa;</xsl:text>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text> - match on bar in top xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl22.xml b/test/tests/conf/impincl/impincl22.xml
new file mode 100644
index 0000000..f4e5164
--- /dev/null
+++ b/test/tests/conf/impincl/impincl22.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<foo/>
diff --git a/test/tests/conf/impincl/impincl22.xsl b/test/tests/conf/impincl/impincl22.xsl
new file mode 100644
index 0000000..8498293
--- /dev/null
+++ b/test/tests/conf/impincl/impincl22.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6 Combining Stylesheets -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: With two imports, precedence goes to the last one.
+    Import precedence for templates matching foo (f imports g) is
+    (high) h, f, g (low) -->
+
+<xsl:import href="f.xsl"/>
+<xsl:import href="h.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl23.xml b/test/tests/conf/impincl/impincl23.xml
new file mode 100644
index 0000000..f4e5164
--- /dev/null
+++ b/test/tests/conf/impincl/impincl23.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<foo/>
diff --git a/test/tests/conf/impincl/impincl23.xsl b/test/tests/conf/impincl/impincl23.xsl
new file mode 100644
index 0000000..6a87fbb
--- /dev/null
+++ b/test/tests/conf/impincl/impincl23.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6 Combining Stylesheets -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Included document's xsl:import (i23incl imports i23sub) is moved into the
+    including document. Import precedence for templates matching foo is
+    (high) i23sub, h (low) -->
+
+<xsl:import href="h.xsl"/>
+<xsl:include href="fragments/i23incl.xsl"/><!-- last one on list has higher precedence -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl24.xml b/test/tests/conf/impincl/impincl24.xml
new file mode 100644
index 0000000..0255a51
--- /dev/null
+++ b/test/tests/conf/impincl/impincl24.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <tag>Example of apply-imports</tag>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl24.xsl b/test/tests/conf/impincl/impincl24.xsl
new file mode 100644
index 0000000..68bc329
--- /dev/null
+++ b/test/tests/conf/impincl/impincl24.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that global variables are in scope in apply-imports templates. -->
+
+<xsl:import href="fragments/i24imp.xsl"/>
+
+<xsl:variable name="color" select="'red'" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="tag">
+  <div style="{concat('border: solid ',$color)}">
+    <xsl:apply-imports/>
+  </div>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl25.xml b/test/tests/conf/impincl/impincl25.xml
new file mode 100644
index 0000000..b50386b
--- /dev/null
+++ b/test/tests/conf/impincl/impincl25.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo><bar/></foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl25.xsl b/test/tests/conf/impincl/impincl25.xsl
new file mode 100644
index 0000000..657956d
--- /dev/null
+++ b/test/tests/conf/impincl/impincl25.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: impincl25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show apply-imports matching a template deeper into the import tree. -->
+
+<xsl:import href="fragments/imp25b.xsl"/>
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:text>Match on /doc in top xsl</xsl:text>
+    <xsl:apply-imports/>
+  </out>
+</xsl:template>
+
+<xsl:template match="bar">
+  <xsl:text> - match on bar in top xsl</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl26.xml b/test/tests/conf/impincl/impincl26.xml
new file mode 100644
index 0000000..5e95ad9
--- /dev/null
+++ b/test/tests/conf/impincl/impincl26.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <outer><middle><inner/></middle></outer>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl26.xsl b/test/tests/conf/impincl/impincl26.xsl
new file mode 100644
index 0000000..d017c9b
--- /dev/null
+++ b/test/tests/conf/impincl/impincl26.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: impincl26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Each apply-imports must take its own view of the import tree. -->
+
+<xsl:import href="fragments/imp26a.xsl"/>
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:text>Match on /doc in top xsl</xsl:text>
+    <xsl:apply-imports/>
+  </out>
+</xsl:template>
+
+<xsl:template match="inner">
+  <top>
+    <xsl:value-of select="name(.)"/>
+    <xsl:apply-imports/>
+  </top>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl27.xml b/test/tests/conf/impincl/impincl27.xml
new file mode 100644
index 0000000..c9e9bbd
--- /dev/null
+++ b/test/tests/conf/impincl/impincl27.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <num>1</num>
+  <num>2</num>
+</doc>
diff --git a/test/tests/conf/impincl/impincl27.xsl b/test/tests/conf/impincl/impincl27.xsl
new file mode 100644
index 0000000..f61a188
--- /dev/null
+++ b/test/tests/conf/impincl/impincl27.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 -->
+  <!-- Creator: Morris Kwan -->
+  <!-- Purpose: href is a URI containing the "file:" scheme part. -->
+
+<xsl:import href="file:fragments/imp27b.xsl"/>
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc" />
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl28.xml b/test/tests/conf/impincl/impincl28.xml
new file mode 100644
index 0000000..a625530
--- /dev/null
+++ b/test/tests/conf/impincl/impincl28.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <tag>Example of apply-imports</tag>
+  <bag>Example of apply-templates</bag>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl28.xsl b/test/tests/conf/impincl/impincl28.xsl
new file mode 100644
index 0000000..c6343cc
--- /dev/null
+++ b/test/tests/conf/impincl/impincl28.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: See what happens to apply-imports when there is a param stack in place. -->
+
+<xsl:import href="fragments/impwparam.xsl"/>
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*">
+      <xsl:with-param name="p1" select="'top'"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="tag">
+  <xsl:param name="p1" select="'fallback'"/>
+  <main-t><xsl:value-of select="$p1"/></main-t>
+  <div>
+    <xsl:apply-imports/>
+  </div>
+</xsl:template>
+
+<!-- No template for "bag" here, so it will use the one in the imported file. -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/impincl29.xml b/test/tests/conf/impincl/impincl29.xml
new file mode 100644
index 0000000..a625530
--- /dev/null
+++ b/test/tests/conf/impincl/impincl29.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <tag>Example of apply-imports</tag>
+  <bag>Example of apply-templates</bag>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/impincl/impincl29.xsl b/test/tests/conf/impincl/impincl29.xsl
new file mode 100644
index 0000000..d4edc34
--- /dev/null
+++ b/test/tests/conf/impincl/impincl29.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impincl29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: See what happens to apply-imports when there is a param stack in place on the
+    upper apply-templates, but no xsl:param to receive p1 until we get to the import. -->
+
+<xsl:import href="fragments/impwparam.xsl"/>
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*">
+      <xsl:with-param name="p1" select="'top'"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="tag">
+  <div>
+    <xsl:apply-imports/>
+  </div>
+</xsl:template>
+
+<!-- No template for "bag" here, so it will use the one in the imported file. -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/j.xsl b/test/tests/conf/impincl/j.xsl
new file mode 100644
index 0000000..3963b00
--- /dev/null
+++ b/test/tests/conf/impincl/j.xsl
@@ -0,0 +1,29 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="html"/>
+
+<xsl:template match="two-tag">
+ From Included stylesheet: <xsl:value-of select="self::node()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/k.xsl b/test/tests/conf/impincl/k.xsl
new file mode 100644
index 0000000..196f00e
--- /dev/null
+++ b/test/tests/conf/impincl/k.xsl
@@ -0,0 +1,28 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="doc1" priority="1.0">
+	<xsl:for-each select="*">
+		<xsl:value-of select="."/>
+	</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/l.xsl b/test/tests/conf/impincl/l.xsl
new file mode 100644
index 0000000..fc1f590
--- /dev/null
+++ b/test/tests/conf/impincl/l.xsl
@@ -0,0 +1,29 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: l -->
+<!-- Purpose: Used by impincl10 -->
+
+<xsl:template match="tag">
+  <pre><xsl:apply-templates/></pre>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/m.xsl b/test/tests/conf/impincl/m.xsl
new file mode 100644
index 0000000..198d88d
--- /dev/null
+++ b/test/tests/conf/impincl/m.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:include href="n.xsl"/>
+
+<xsl:param name="mParam" select="string('!From m!')"/>
+
+<xsl:template match="author">
+  m-author:  
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/main_import.xsl b/test/tests/conf/impincl/main_import.xsl
new file mode 100644
index 0000000..0a361e3
--- /dev/null
+++ b/test/tests/conf/impincl/main_import.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: main_import (version for same directory as impincl19) -->
+<!-- Purpose: Used by impincl19 -->
+<!--   This is the last file in the import chain. Main XSLT file is in same directory. -->
+
+<xsl:template match="test">
+In ImpIncl: <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/n.xsl b/test/tests/conf/impincl/n.xsl
new file mode 100644
index 0000000..2ce74ca
--- /dev/null
+++ b/test/tests/conf/impincl/n.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:import href="o.xsl"/>
+
+<xsl:param name="nParam" select="string('!From n!')"/>
+
+<xsl:template match="chapter[@num='1']">
+  n-contents of first chapter:  
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/o.xsl b/test/tests/conf/impincl/o.xsl
new file mode 100644
index 0000000..42968d0
--- /dev/null
+++ b/test/tests/conf/impincl/o.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="p.xsl"/>
+
+<xsl:param name="oParam" select="string('!From o!')"/>
+
+<xsl:template match="overview">
+  o-overview: 
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/p.xsl b/test/tests/conf/impincl/p.xsl
new file mode 100644
index 0000000..237b315
--- /dev/null
+++ b/test/tests/conf/impincl/p.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:param name="pParam" select="string('!From p!')"/>
+
+<xsl:template match="publisher">
+  p-publisher: 
+  <xsl:value-of select="."/>
+</xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/q.xsl b/test/tests/conf/impincl/q.xsl
new file mode 100644
index 0000000..c2d390a
--- /dev/null
+++ b/test/tests/conf/impincl/q.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="http://www.ped.com" 
+                xmlns:bdd="http://www.bdd.com"
+                xmlns:jad="http://www.jad.com">
+
+<xsl:template match="nothing">
+	This should never match
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/r.xsl b/test/tests/conf/impincl/r.xsl
new file mode 100644
index 0000000..959cdee
--- /dev/null
+++ b/test/tests/conf/impincl/r.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: r -->
+<!-- Purpose: Used by impincl14. -->
+
+<xsl:template match="title">
+  <xsl:text>R-title shouldn't be used</xsl:text>
+</xsl:template>
+
+<xsl:template match="author">
+  R-author:<xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/impincl/s.xsl b/test/tests/conf/impincl/s.xsl
new file mode 100644
index 0000000..b5c9cf1
--- /dev/null
+++ b/test/tests/conf/impincl/s.xsl
@@ -0,0 +1,37 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: s -->
+<!-- Purpose: Used by impincl15. -->
+
+<xsl:template match="tag" mode="yes">
+  <pre><xsl:apply-templates/></pre>
+</xsl:template>
+
+<xsl:template match="tag" mode="no">
+  <bad><xsl:apply-templates/></bad>
+</xsl:template>
+
+<xsl:template match="tag">
+  <unmoded><xsl:apply-templates/></unmoded>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/implre05.xsl b/test/tests/conf/lre/implre05.xsl
new file mode 100644
index 0000000..c65118c
--- /dev/null
+++ b/test/tests/conf/lre/implre05.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://tester.com">
+
+<xsl:template match="doc2">
+  <sub-element-in-import />
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/inclre05.xsl b/test/tests/conf/lre/inclre05.xsl
new file mode 100644
index 0000000..ef580ec
--- /dev/null
+++ b/test/tests/conf/lre/inclre05.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://tester.com">
+
+<xsl:template match="doc3">
+  <sub-element-in-include />
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre01.xml b/test/tests/conf/lre/lre01.xml
new file mode 100644
index 0000000..07387c4
--- /dev/null
+++ b/test/tests/conf/lre/lre01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>DocValue
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre01.xsl b/test/tests/conf/lre/lre01.xsl
new file mode 100644
index 0000000..4dffce7
--- /dev/null
+++ b/test/tests/conf/lre/lre01.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:ped="http://www.test.com">
+
+  <!-- FileName: lre01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Basic demonstration that namespace node is added when namespaced attribute is instantiated. -->
+  <!-- Elaboration: In a template, an element in the stylesheet that does not belong to 
+  the XSLT namespace and that is not an extension element is instantiated to create 
+  an element node with the same expanded-name.... The created element node will 
+  have the attribute nodes that were present on the element node in the stylesheet 
+  tree, other than attributes with names in the XSLT namespace. -->
+
+<xsl:template match="doc">
+  <out english="to leave" ped:attr="test"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre02.xml b/test/tests/conf/lre/lre02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre02.xsl b/test/tests/conf/lre/lre02.xsl
new file mode 100644
index 0000000..ec7aab7
--- /dev/null
+++ b/test/tests/conf/lre/lre02.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:ped="http://tester.com"
+	xmlns:jad="http://administrator.com"
+	xmlns="www.lotus.com"
+      exclude-result-prefixes="java jad #default">
+
+  <!-- FileName: lre02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test exclusion of prefixes specified as xsl:stylesheet attribute. -->
+  <!-- Elaboration: The created element node will also have a copy of the namespace nodes 
+       that were present on the element node in the stylesheet tree with the exception 
+       of any namespace node whose string-value is the XSLT namespace URI, a namespace 
+       URI declared as an extension namespace, or a namespace URI designated as an 
+       excluded namespace. (Can't exclude namespaces that are used, however.)
+    The default namespace is used, and so can't be excluded. -->
+
+<xsl:template match="doc">
+  <out english="to leave"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre03.xml b/test/tests/conf/lre/lre03.xml
new file mode 100644
index 0000000..07387c4
--- /dev/null
+++ b/test/tests/conf/lre/lre03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>DocValue
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre03.xsl b/test/tests/conf/lre/lre03.xsl
new file mode 100644
index 0000000..0999795
--- /dev/null
+++ b/test/tests/conf/lre/lre03.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:bdd="http://buster.com"
+	xmlns:jad="http://administrator.com"
+	xmlns="www.lotus.com">
+
+  <!-- FileName: lre03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test exclude-result-prefixes as an attribute on an LRE. -->
+  <!-- Elaboration: The created element node will also have a copy of the namespace nodes 
+       that were present on the element node in the stylesheet tree with the exception 
+       of any namespace node whose string-value is the XSLT namespace URI, a namespace 
+       URI declared as an extension namespace, or a namespace URI designated as an 
+       excluded namespace. (Can't exclude namespaces that are used, however.)
+    The default namespace is used, and so can't be excluded. -->
+
+<xsl:template match="doc">
+  <out english="to leave" xsl:exclude-result-prefixes="java jad #default"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre04.xml b/test/tests/conf/lre/lre04.xml
new file mode 100644
index 0000000..07387c4
--- /dev/null
+++ b/test/tests/conf/lre/lre04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>DocValue
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre04.xsl b/test/tests/conf/lre/lre04.xsl
new file mode 100644
index 0000000..6da672e
--- /dev/null
+++ b/test/tests/conf/lre/lre04.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:bdd="http://buster.com"
+    xmlns:jad="http://administrator.com">
+
+  <!-- FileName: lre04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: The designation of a namespace as an excluded namespace is 
+       effective within the subtree of the stylesheet rooted at the element 
+       bearing the exclude-result-prefixes or xsl:exclude-result-prefixes attribute. -->
+
+<xsl:template match="doc">
+  <out x="by the corner"><xsl:text>&#010;</xsl:text>
+  <sits x="little jack horner" xsl:exclude-result-prefixes="jad"/><xsl:text>&#010;</xsl:text> 
+  <minding x="his peas and queues" xsl:exclude-result-prefixes="jad bdd"/></out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre05.xml b/test/tests/conf/lre/lre05.xml
new file mode 100644
index 0000000..6a1d3d6
--- /dev/null
+++ b/test/tests/conf/lre/lre05.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<docs>
+  <doc1/>
+  <doc2/>
+  <doc3/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre05.xsl b/test/tests/conf/lre/lre05.xsl
new file mode 100644
index 0000000..544521b
--- /dev/null
+++ b/test/tests/conf/lre/lre05.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://tester.com">
+
+<xsl:import href="implre05.xsl"/>
+<xsl:include href="inclre05.xsl"/>
+
+  <!-- FileName: lre05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Show that exclude-result-prefixes is scoped to just it's LRE. -->
+
+  <!-- The designation of a namespace as an excluded namespace is 
+       effective within the subtree of the stylesheet rooted at the element 
+       bearing the exclude-result-prefixes or xsl:exclude-result-prefixes attribute.
+       A subtree rooted at an xsl:stylesheet element does not include any 
+       stylesheets imported or included by children of that xsl:stylesheet element. -->
+
+  <!-- The ped namespace is excluded from main and foo, but not from the sub-elements that
+    got placed in main by other templates. In fact, it has to be re-declared for each of
+    those sub-elements. -->
+
+<xsl:template match="docs">
+  <main xsl:exclude-result-prefixes="ped">
+     <foo/>
+     <xsl:apply-templates/>
+  </main>
+</xsl:template>
+
+<xsl:template match="doc1">
+  <sub-element-in-main />
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre06.xml b/test/tests/conf/lre/lre06.xml
new file mode 100644
index 0000000..c9d611c
--- /dev/null
+++ b/test/tests/conf/lre/lre06.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<docs>
+<doc1>
+	<a level="1">A1</a>
+	<b level="1">B2</b>
+	<c level="1">C3</c>
+</doc1>
+<doc2>
+	<a level="2">A1</a>
+	<b level="2">B2</b>
+	<c level="2">C3</c>
+	<doc3>
+		<a level="3">A1</a>
+		<bat level="3">B22</bat>
+		<cat level="3">C33</cat>
+	</doc3>
+</doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre06.xsl b/test/tests/conf/lre/lre06.xsl
new file mode 100644
index 0000000..f06c28d
--- /dev/null
+++ b/test/tests/conf/lre/lre06.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: lre06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Tests that the value of an attribute of a LRE is 
+  	   interpreted as a attribute value template, which can contain
+  	   expressions within curly braces({}).	-->
+
+<xsl:template match="docs">
+  <out a="{doc1/a}" b="{doc2/doc3/bat}"
+       c="{doc2/doc3/a/@level}"
+       d="{.//*[starts-with(name(.),'ba')]}"
+       e="{.//cat}" f="{'All Done'}">
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre07.xml b/test/tests/conf/lre/lre07.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre07.xsl b/test/tests/conf/lre/lre07.xsl
new file mode 100644
index 0000000..1d15024
--- /dev/null
+++ b/test/tests/conf/lre/lre07.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: lre07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Show that attributes from XSLT namespace are automatically excluded. -->
+  <!-- Elaboration: The created element node will also have a copy of the namespace nodes 
+       that were present on the element node in the stylesheet tree with the exception 
+       of any namespace node whose string-value is the XSLT namespace URI, a namespace 
+       URI declared as an extension namespace, or a namespace URI designated as an 
+       excluded namespace. -->
+
+<xsl:template match="doc">
+  <out xsl:if="my if" english="to leave"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre08.xml b/test/tests/conf/lre/lre08.xml
new file mode 100644
index 0000000..7ff316d
--- /dev/null
+++ b/test/tests/conf/lre/lre08.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<docs>
+<doc1>
+	<a level="1">A1</a>
+	<b level="1">B2</b>
+	<c level="1">C3</c>
+</doc1>
+<doc2>
+	<a level="2">A1</a>
+	<b level="2">B2</b>
+	<c level="2">C3</c>
+	<doc3>
+		<a level="Out1">A1</a>
+		<bat level="3">Out2</bat>
+		<cat level="3">C33</cat>
+	</doc3>
+</doc2>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre08.xsl b/test/tests/conf/lre/lre08.xsl
new file mode 100644
index 0000000..10b4b60
--- /dev/null
+++ b/test/tests/conf/lre/lre08.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: lre08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: The name attribute of xsl:element is interpreted as an 
+       attribute value template. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="{.//doc2/doc3/a/@level}"/>
+    <xsl:element name="{.//*[starts-with(name(.),'ba')]}"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre09.xml b/test/tests/conf/lre/lre09.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/conf/lre/lre09.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre09.xsl b/test/tests/conf/lre/lre09.xsl
new file mode 100644
index 0000000..90ea0a8
--- /dev/null
+++ b/test/tests/conf/lre/lre09.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: lre09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that names are preserved, case and all. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out AtTrib-0.01="Mix-d.Char5">Text-A<Sub-Elem2.0/>teXt.B</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre10.xml b/test/tests/conf/lre/lre10.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre10.xsl b/test/tests/conf/lre/lre10.xsl
new file mode 100644
index 0000000..6239e60
--- /dev/null
+++ b/test/tests/conf/lre/lre10.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+	xmlns:ext="http://somebody.elses.extension"
+      extension-element-prefixes="ext">
+
+  <!-- FileName: lre10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that attributes from extension namespaces cause inclusion of the namespace node. -->
+  <!-- Purpose: The created element node will also have a copy of the namespace nodes 
+       that were present on the element node in the stylesheet tree with the exception 
+       of any namespace node whose string-value is the XSLT namespace URI, a namespace 
+       URI declared as an extension namespace, or a namespace URI designated as an 
+       excluded namespace. -->
+
+<xsl:template match="doc">
+  <out ext:size="big" english="to leave"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre11.xml b/test/tests/conf/lre/lre11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre11.xsl b/test/tests/conf/lre/lre11.xsl
new file mode 100644
index 0000000..7db871e
--- /dev/null
+++ b/test/tests/conf/lre/lre11.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ext="http://somebody.elses.extension"
+    xmlns:java="http://xml.apache.org/xslt/java"
+    xmlns:jad="http://administrator.com"
+    xmlns="www.lotus.com"
+    xmlns:ped="http://tester.com"
+    xmlns:bdd="http://buster.com"
+    extension-element-prefixes="ext"
+    exclude-result-prefixes="java jad #default">
+
+  <!-- FileName: lre11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet Element -->
+  <!-- Creator: Paul Dick -->
+  <!-- AdditionalSpec: 2.1 of XSLT for namespaces on attributes -->
+  <!-- Purpose: Testing the xsl:transform element and its attributes. english
+       attribute and #default,ped,bdd namespace nodes are all that should be output.
+       (#default is used.) xsl:if must be assumed to be a directive to the processor,
+       so it could raise an error. -->
+
+<xsl:template match="doc">
+  <out xsl:if= "my if" english="to leave"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/conf/lre/lre12.xml b/test/tests/conf/lre/lre12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre12.xsl b/test/tests/conf/lre/lre12.xsl
new file mode 100644
index 0000000..284010c
--- /dev/null
+++ b/test/tests/conf/lre/lre12.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: LRE12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test warning if required element name is null.-->
+  <!-- ExpectedException: XSL Warning: Illegal attribute name: -->
+  <!-- The above is issued as a warning, then the content is put out as an LRE. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="">
+      This should be directly inside the out element.
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre13.xml b/test/tests/conf/lre/lre13.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre13.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre13.xsl b/test/tests/conf/lre/lre13.xsl
new file mode 100644
index 0000000..b785642
--- /dev/null
+++ b/test/tests/conf/lre/lre13.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: LRE13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to put out text without any tags.-->
+
+<xsl:output method="text"/>
+
+<xsl:template match="doc">
+  This should be directly at the top.
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre14.xml b/test/tests/conf/lre/lre14.xml
new file mode 100644
index 0000000..3a89cad
--- /dev/null
+++ b/test/tests/conf/lre/lre14.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+<a>X</a>
+<a>Y</a>
+<a>Z</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre14.xsl b/test/tests/conf/lre/lre14.xsl
new file mode 100644
index 0000000..4ea52f0
--- /dev/null
+++ b/test/tests/conf/lre/lre14.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: LRE14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for-each inside xsl:element -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:element name="all">
+      <xsl:for-each select="a">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre15.xml b/test/tests/conf/lre/lre15.xml
new file mode 100644
index 0000000..07387c4
--- /dev/null
+++ b/test/tests/conf/lre/lre15.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>DocValue
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre15.xsl b/test/tests/conf/lre/lre15.xsl
new file mode 100644
index 0000000..d03afd7
--- /dev/null
+++ b/test/tests/conf/lre/lre15.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:ped="http://tester.com"
+				xmlns:ljh="http://buster.com"
+				xmlns:jad="http://administrator.com">
+
+<xsl:output method="xml" indent="yes"/>
+
+  <!-- FileName: lre15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: xsl:exclude-result-prefixes should 
+       only work to omit namespace declarations that are not actually used. -->
+
+<xsl:template match="doc">
+  <out x="by the corner"  xsl:exclude-result-prefixes="ped">
+    <jad:output1/>
+	<jad:output2>
+		<jad:output2a/>
+	</jad:output2>
+	<ljh:output1/>
+	<ljh:output2>
+		<ljh:output2a/>
+	</ljh:output2>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre16.xml b/test/tests/conf/lre/lre16.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre16.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre16.xsl b/test/tests/conf/lre/lre16.xsl
new file mode 100644
index 0000000..e80a9f8
--- /dev/null
+++ b/test/tests/conf/lre/lre16.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: LRE16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Purpose: Try to put out value of a variable as an LRE. Get "$var" literally. -->
+  <!-- Creator: David Marston -->
+
+<xsl:variable name="var" select="'Data'"/>
+
+<xsl:template match="/">
+  <out>$var</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre17.xml b/test/tests/conf/lre/lre17.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre17.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre17.xsl b/test/tests/conf/lre/lre17.xsl
new file mode 100644
index 0000000..d7ecc17
--- /dev/null
+++ b/test/tests/conf/lre/lre17.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:ped="http://tester.com"
+				xmlns:ljh="http://buster.com"
+				xmlns:jad="http://administrator.com">
+
+<xsl:output method="xml" indent="yes"/>
+
+  <!-- FileName: lre17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: xsl:exclude-result-prefixes should 
+       only work to omit namespace declarations that are not actually used. -->
+
+<xsl:template match="doc">
+  <sits x="little jack horner" xsl:exclude-result-prefixes="ped jad"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre18.xml b/test/tests/conf/lre/lre18.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre18.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre18.xsl b/test/tests/conf/lre/lre18.xsl
new file mode 100644
index 0000000..41f847d
--- /dev/null
+++ b/test/tests/conf/lre/lre18.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:ped="http://tester.com"
+				xmlns:ljh="http://buster.com"
+				xmlns:jad="http://administrator.com">
+
+<xsl:output method="xml" indent="yes"/>
+
+  <!-- FileName: lre18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: xsl:exclude-result-prefixes should 
+       only work to omit namespace declarations that are not actually used. -->
+
+<xsl:template match="doc">
+  <minding x="his peas and queues" xsl:exclude-result-prefixes="jad ljh">
+	<jad:output1/>
+	<jad:output2>
+		<jad:output2a/>
+	</jad:output2>
+	<ljh:output1/>
+	<ljh:output2>
+		<ljh:output2a/>
+	</ljh:output2>
+  </minding>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre19.xml b/test/tests/conf/lre/lre19.xml
new file mode 100644
index 0000000..b4c3240
--- /dev/null
+++ b/test/tests/conf/lre/lre19.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+  <a href="http://www.ped.com">Out1</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre19.xsl b/test/tests/conf/lre/lre19.xsl
new file mode 100644
index 0000000..998f34c
--- /dev/null
+++ b/test/tests/conf/lre/lre19.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+				xmlns:_ped="http://www.ped.com">
+  <!-- FileName: lre19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of leading underscore in names. -->
+
+<xsl:template match="/">
+ <root>
+   <xsl:text>&#10;</xsl:text>
+   <xsl:element name="_an_elem" namespace="{docs/a/@href}"/>
+   <xsl:text>&#10;</xsl:text>
+   <xsl:element name="_ped:_an_elem"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre20.xml b/test/tests/conf/lre/lre20.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre20.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre20.xsl b/test/tests/conf/lre/lre20.xsl
new file mode 100644
index 0000000..8b12246
--- /dev/null
+++ b/test/tests/conf/lre/lre20.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+	xmlns:ped="http://tester.com"
+	xmlns:ext="http://somebody.elses.extension"
+      extension-element-prefixes="ext">
+
+  <!-- FileName: lre20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Show that the namespace node for an extension namespace is automatically excluded. -->
+  <!-- Elaboration: The created element node will also have a copy of the namespace nodes 
+       that were present on the element node in the stylesheet tree with the exception 
+       of any namespace node whose string-value is the XSLT namespace URI, a namespace 
+       URI declared as an extension namespace, or a namespace URI designated as an 
+       excluded namespace. -->
+
+<xsl:template match="doc">
+  <out english="to leave"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre21.xml b/test/tests/conf/lre/lre21.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre21.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre21.xsl b/test/tests/conf/lre/lre21.xsl
new file mode 100644
index 0000000..735e48e
--- /dev/null
+++ b/test/tests/conf/lre/lre21.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+	xmlns:ped="http://tester.com"
+	xmlns:ext="http://somebody.elses.extension">
+
+  <!-- FileName: lre21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Exclude namespace node for an extension namespace via local declaration. -->
+  <!-- Elaboration: The created element node will also have a copy of the namespace nodes 
+       that were present on the element node in the stylesheet tree with the exception 
+       of any namespace node whose string-value is the XSLT namespace URI, a namespace 
+       URI declared as an extension namespace, or a namespace URI designated as an 
+       excluded namespace. -->
+
+<xsl:template match="doc">
+  <out english="to leave" xsl:extension-element-prefixes="ext"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre22.xml b/test/tests/conf/lre/lre22.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre22.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre22.xsl b/test/tests/conf/lre/lre22.xsl
new file mode 100644
index 0000000..33a15d6
--- /dev/null
+++ b/test/tests/conf/lre/lre22.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:ped="http://tester.com"
+      xmlns="www.lotus.com"
+      exclude-result-prefixes="#default">
+
+  <!-- FileName: lre22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test exclusion of #default, stylesheet level. -->
+  <!-- Elaboration: The created element node will also have a copy of the namespace nodes 
+       that were present on the element node in the stylesheet tree with the exception 
+       of any namespace node whose string-value is the XSLT namespace URI, a namespace 
+       URI declared as an extension namespace, or a namespace URI designated as an 
+       excluded namespace. (Can't exclude namespaces that are used, however.) -->
+
+<xsl:template match="doc">
+  <ped:out ped:english="to leave"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/lre/lre23.xml b/test/tests/conf/lre/lre23.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/lre/lre23.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/lre/lre23.xsl b/test/tests/conf/lre/lre23.xsl
new file mode 100644
index 0000000..b3c618f
--- /dev/null
+++ b/test/tests/conf/lre/lre23.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+	xmlns:bdd="http://buster.com"
+	xmlns="www.lotus.com">
+
+  <!-- FileName: lre23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test exclusion of #default as an attribute on an LRE. -->
+  <!-- Elaboration: The created element node will also have a copy of the namespace nodes 
+       that were present on the element node in the stylesheet tree with the exception 
+       of any namespace node whose string-value is the XSLT namespace URI, a namespace 
+       URI declared as an extension namespace, or a namespace URI designated as an 
+       excluded namespace. (Can't exclude namespaces that are used, however.) -->
+
+<xsl:template match="doc">
+  <bdd:out bdd:english="to leave" xsl:exclude-result-prefixes="#default"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match01.xml b/test/tests/conf/match/match01.xml
new file mode 100644
index 0000000..0d461a0
--- /dev/null
+++ b/test/tests/conf/match/match01.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<doc>
+  <foo att1="c">
+    <foo att1="b">
+      <foo att1="a">
+        <baz att1="wrong"/>
+      </foo>
+    </foo>
+  </foo>
+</doc>
+   
\ No newline at end of file
diff --git a/test/tests/conf/match/match01.xsl b/test/tests/conf/match/match01.xsl
new file mode 100644
index 0000000..0a9a92a
--- /dev/null
+++ b/test/tests/conf/match/match01.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:strip-space elements="foo"/>
+
+  <!-- FileName: MATCH01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for //name match pattern. -->
+
+<xsl:template match="doc">
+ <out>
+ 	<xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+<xsl:template match="//foo">
+  <xsl:value-of select="@att1"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match02.xml b/test/tests/conf/match/match02.xml
new file mode 100644
index 0000000..25e9741
--- /dev/null
+++ b/test/tests/conf/match/match02.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>
+    <a><num6 val="6"/></a>
+    <a><num2 val="2"/></a>
+    <a><num4 val="4"/></a>
+  </foo>
+  <foo>
+    <a><num3 val="3"/></a>
+    <a><num1 val="1"/></a>
+    <a><num5 val="5"/></a>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match02.xsl b/test/tests/conf/match/match02.xsl
new file mode 100644
index 0000000..810bf23
--- /dev/null
+++ b/test/tests/conf/match/match02.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Purpose: Test of predicate, using attribute, in match pattern. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*[@val]">
+  <xsl:value-of select="name(.)"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match03.xml b/test/tests/conf/match/match03.xml
new file mode 100644
index 0000000..25e9741
--- /dev/null
+++ b/test/tests/conf/match/match03.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>
+    <a><num6 val="6"/></a>
+    <a><num2 val="2"/></a>
+    <a><num4 val="4"/></a>
+  </foo>
+  <foo>
+    <a><num3 val="3"/></a>
+    <a><num1 val="1"/></a>
+    <a><num5 val="5"/></a>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match03.xsl b/test/tests/conf/match/match03.xsl
new file mode 100644
index 0000000..bcc9eb2
--- /dev/null
+++ b/test/tests/conf/match/match03.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Purpose: Test of @attrib=value in predicate in match pattern. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*[@val=4]">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match04.xml b/test/tests/conf/match/match04.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conf/match/match04.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/match/match04.xsl b/test/tests/conf/match/match04.xsl
new file mode 100644
index 0000000..cce1609
--- /dev/null
+++ b/test/tests/conf/match/match04.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Purpose: Test of node=value in predicate in match pattern. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter[.='b']">
+  <xsl:value-of select="."/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match05.xml b/test/tests/conf/match/match05.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conf/match/match05.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/match/match05.xsl b/test/tests/conf/match/match05.xsl
new file mode 100644
index 0000000..ecfe944
--- /dev/null
+++ b/test/tests/conf/match/match05.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of or in predicate of match pattern. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter[.='b' or .='h']">
+  <xsl:value-of select="."/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match06.xml b/test/tests/conf/match/match06.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conf/match/match06.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/match/match06.xsl b/test/tests/conf/match/match06.xsl
new file mode 100644
index 0000000..1b9798a
--- /dev/null
+++ b/test/tests/conf/match/match06.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean not function in match pattern. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter[not(.='b')]">
+  <xsl:value-of select="."/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match07.xml b/test/tests/conf/match/match07.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conf/match/match07.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/match/match07.xsl b/test/tests/conf/match/match07.xsl
new file mode 100644
index 0000000..5d9e034
--- /dev/null
+++ b/test/tests/conf/match/match07.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of node!=value match pattern. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter[.!='b']">
+  <xsl:value-of select="."/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match08.xml b/test/tests/conf/match/match08.xml
new file mode 100644
index 0000000..e9d129f
--- /dev/null
+++ b/test/tests/conf/match/match08.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<doc>
+  <foo att1="c" att2="ok" spot="1">
+    <foo att1="b" att2="ok" spot="11">
+      <foo att1="a" att2="no" spot="111">
+        <baz att1="wrong" spot="1110"/>
+      </foo>
+      <foo att1="c" att2="no" spot="112">
+        <baz att1="wrong" spot="1120"/>
+      </foo>
+    </foo>
+    <foo att1="d" att2="ok" spot="12">
+      <foo att1="b" att2="ok" spot="121">
+        <baz att1="wrong" spot="1210"/>
+      </foo>
+    </foo>
+    <foo att1="b" att2="no" spot="13">
+      <foo att1="ok" att2="b" spot="131">
+        <baz att1="wrong" spot="1310"/>
+      </foo>
+      <foo att1="c" att2="ok" spot="132">
+        <baz att1="wrong" spot="1320"/>
+      </foo>
+    </foo>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match08.xsl b/test/tests/conf/match/match08.xsl
new file mode 100644
index 0000000..4e9f189
--- /dev/null
+++ b/test/tests/conf/match/match08.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 2 predicates. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo[@att1='b'][@att2='ok']">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match09.xml b/test/tests/conf/match/match09.xml
new file mode 100644
index 0000000..14121fd
--- /dev/null
+++ b/test/tests/conf/match/match09.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<doc>
+  <foo att1="c" att2="ok">
+    <foo att1="b" att2="ok">
+      <foo att1="a" att2="no">
+        <baz att1="wrong"/>
+      </foo>
+    </foo>
+    <foo att1="d" att2="ok">
+      <foo att1="b" att2="ok">
+        <baz att1="wrong"/>
+      </foo>
+    </foo>
+    <foo att1="b" att2="no">
+      <foo att1="ok" att2="b">
+        <baz att1="wrong"/>
+      </foo>
+    </foo>
+  </foo>
+</doc>
+   
\ No newline at end of file
diff --git a/test/tests/conf/match/match09.xsl b/test/tests/conf/match/match09.xsl
new file mode 100644
index 0000000..e7f3eae
--- /dev/null
+++ b/test/tests/conf/match/match09.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean and in predicate. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo[@att1='b' and @att2='ok']">
+  <xsl:value-of select="name(.)"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match10.xml b/test/tests/conf/match/match10.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conf/match/match10.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/match/match10.xsl b/test/tests/conf/match/match10.xsl
new file mode 100644
index 0000000..6645957
--- /dev/null
+++ b/test/tests/conf/match/match10.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of functions in predicate. -->
+
+<xsl:template match="letter[position()=last()]">
+  <out>
+    <xsl:value-of select="."/>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match11.xml b/test/tests/conf/match/match11.xml
new file mode 100644
index 0000000..0ed53e0
--- /dev/null
+++ b/test/tests/conf/match/match11.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE doc [
+  <!ELEMENT doc (a*)>
+  <!ELEMENT a (#PCDATA)>
+  <!ATTLIST a  id ID #REQUIRED>
+]>
+<doc>
+  <a id="a">A</a>
+  <a id="b">B</a>
+  <a id="c">C</a>
+  <a id="d">D</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match11.xsl b/test/tests/conf/match/match11.xsl
new file mode 100644
index 0000000..8ce8f57
--- /dev/null
+++ b/test/tests/conf/match/match11.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of id('literal') as match pattern. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="id('b')">
+  <xsl:value-of select="name(.)"/> = <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match12.xml b/test/tests/conf/match/match12.xml
new file mode 100644
index 0000000..914036c
--- /dev/null
+++ b/test/tests/conf/match/match12.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<doc>
+ <title>Test for source tree depth</title>
+ <a>
+  <title>Level A</title>
+  <b>
+   <title>Level B</title>
+   <c>
+    <title>Level C</title>
+    <d>
+     <title>Level D</title>
+     <e>
+      <title>Level E</title>
+      <f>
+       <title>Level F</title>
+       <g>
+        <title>Level G</title>
+        <h>
+         <title>Level H</title>
+         <i>
+          <title>Level I</title>
+          <j>
+           <title>Level J</title>
+           <k>
+            <title>Level K</title>
+            <l>
+             <title>Level L</title>
+             <m>
+              <title>Level M</title>
+              <n>
+               <title>Level N</title>
+               <o>
+                <title>Level O</title>
+               </o>
+              </n>
+             </m>
+            </l>
+           </k>
+          </j>
+         </i>
+        </h>
+       </g>
+      </f>
+     </e>
+    </d>
+   </c>
+  </b>
+ </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match12.xsl b/test/tests/conf/match/match12.xsl
new file mode 100644
index 0000000..bbaffd8
--- /dev/null
+++ b/test/tests/conf/match/match12.xsl
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Match12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that apply-templates goes down at least 15 levels. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="title"/><xsl:text>
+</xsl:text>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="title"/><!-- Suppress the default action on these. -->
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>Found an A node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="b">
+  <xsl:text>Found a B node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="c">
+  <xsl:text>Found a C node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="d">
+  <xsl:text>Found a D node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="e">
+  <xsl:text>Found an E node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="f">
+  <xsl:text>Found an F node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="g">
+  <xsl:text>Found a G node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="h">
+  <xsl:text>Found an H node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="i">
+  <xsl:text>Found an I node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="j">
+  <xsl:text>Found a J node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="k">
+  <xsl:text>Found a K node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="l">
+  <xsl:text>Found an L node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="m">
+  <xsl:text>Found an M node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="n">
+  <xsl:text>Found an N node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="o">
+  <xsl:text>Found an O node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:text>Found a P node; there should not be one!
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match13.xml b/test/tests/conf/match/match13.xml
new file mode 100644
index 0000000..ea6e7ef
--- /dev/null
+++ b/test/tests/conf/match/match13.xml
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<aaa>1</aaa>
+<bbb>2</bbb>
+<ccc>3</ccc>
+<ddd>4</ddd>
+<eee>5</eee>
+<fff>6</fff>
+<ggg>7</ggg>
+<hhh>8</hhh>
+<iii>9</iii>
+<jjj>10</jjj>
+<kkk>11</kkk>
+<lll>12</lll>
+<mmm>13</mmm>
+<nnn>14</nnn>
+<ooo>15</ooo>
+<ppp>16</ppp>
+<qqq>17</qqq>
+<rrr>18</rrr>
+<sss>19</sss>
+<ttt>20</ttt>
+<uuu>21</uuu>
+<vvv>22</vvv>
+<www>23</www>
+<xxx>24</xxx>
+<yyy>25</yyy>
+<aab>26</aab>
+<bbb>27</bbb>
+<ccb>28</ccb>
+<ddb>29</ddb>
+<eeb>30</eeb>
+<ffb>31</ffb>
+<ggb>32</ggb>
+<hhb>33</hhb>
+<iib>34</iib>
+<jjb>35</jjb>
+<kkb>36</kkb>
+<llb>37</llb>
+<mmb>38</mmb>
+<nnb>39</nnb>
+<oob>40</oob>
+<ppb>41</ppb>
+<qqb>42</qqb>
+<rrb>43</rrb>
+<ssb>44</ssb>
+<ttb>45</ttb>
+<uub>46</uub>
+<vvb>47</vvb>
+<wwb>48</wwb>
+<xxb>49</xxb>
+<yyb>50</yyb>
+<aac>51</aac>
+<bbc>52</bbc>
+<ccc>53</ccc>
+<ddc>54</ddc>
+<eec>55</eec>
+<ffc>56</ffc>
+<ggc>57</ggc>
+<hhc>58</hhc>
+<iic>59</iic>
+<jjc>60</jjc>
+<kkc>61</kkc>
+<llc>62</llc>
+<mmc>63</mmc>
+<nnc>64</nnc>
+<ooc>65</ooc>
+<ppc>66</ppc>
+<qqc>67</qqc>
+<rrc>68</rrc>
+<ssc>69</ssc>
+<ttc>70</ttc>
+<uuc>71</uuc>
+<vvc>72</vvc>
+<wwc>73</wwc>
+<xxc>74</xxc>
+<yyc>75</yyc>
+<aad>76</aad>
+<bbd>77</bbd>
+<ccd>78</ccd>
+<ddd>79</ddd>
+<eed>80</eed>
+<ffd>81</ffd>
+<ggd>82</ggd>
+<hhd>83</hhd>
+<iid>84</iid>
+<jjd>85</jjd>
+<kkd>86</kkd>
+<lld>87</lld>
+<mmd>88</mmd>
+<nnd>89</nnd>
+<ood>90</ood>
+<ppd>91</ppd>
+<qqd>92</qqd>
+<rrd>93</rrd>
+<ssd>94</ssd>
+<ttd>95</ttd>
+<uud>96</uud>
+<vvd>97</vvd>
+<wwd>98</wwd>
+<xxd>99</xxd>
+<yyd>100</yyd>
+<aae>101</aae>
+<bbe>102</bbe>
+<cce>103</cce>
+<dde>104</dde>
+<eee>105</eee>
+<ffe>106</ffe>
+<gge>107</gge>
+<hhe>108</hhe>
+<iie>109</iie>
+<jje>110</jje>
+<kke>111</kke>
+<lle>112</lle>
+<mme>113</mme>
+<nne>114</nne>
+<ooe>115</ooe>
+<ppe>116</ppe>
+<qqe>117</qqe>
+<rre>118</rre>
+<sse>119</sse>
+<tte>120</tte>
+<uue>121</uue>
+<vve>122</vve>
+<wwe>123</wwe>
+<xxe>124</xxe>
+<yye>125</yye>
+<aaf>126</aaf>
+<bbf>127</bbf>
+<ccf>128</ccf>
+<ddf>129</ddf>
+<eef>130</eef>
+<fff>131</fff>
+<ggf>132</ggf>
+<hhf>133</hhf>
+<iif>134</iif>
+<jjf>135</jjf>
+<kkf>136</kkf>
+<llf>137</llf>
+<mmf>138</mmf>
+<nnf>139</nnf>
+<oof>140</oof>
+<ppf>141</ppf>
+<qqf>142</qqf>
+<rrf>143</rrf>
+<ssf>144</ssf>
+<ttf>145</ttf>
+<uuf>146</uuf>
+<vvf>147</vvf>
+<wwf>148</wwf>
+<xxf>149</xxf>
+<yyf>150</yyf>
+<aag>151</aag>
+<bbg>152</bbg>
+<ccg>153</ccg>
+<ddg>154</ddg>
+<eeg>155</eeg>
+<ffg>156</ffg>
+<ggg>157</ggg>
+<hhg>158</hhg>
+<iig>159</iig>
+<jjg>160</jjg>
+<kkg>161</kkg>
+<llg>162</llg>
+<mmg>163</mmg>
+<nng>164</nng>
+<oog>165</oog>
+<ppg>166</ppg>
+<qqg>167</qqg>
+<rrg>168</rrg>
+<ssg>169</ssg>
+<ttg>170</ttg>
+<uug>171</uug>
+<vvg>172</vvg>
+<wwg>173</wwg>
+<xxg>174</xxg>
+<yyg>175</yyg>
+<aah>176</aah>
+<bbh>177</bbh>
+<cch>178</cch>
+<ddh>179</ddh>
+<eeh>180</eeh>
+<ffh>181</ffh>
+<ggh>182</ggh>
+<hhh>183</hhh>
+<iih>184</iih>
+<jjh>185</jjh>
+<kkh>186</kkh>
+<llh>187</llh>
+<mmh>188</mmh>
+<nnh>189</nnh>
+<ooh>190</ooh>
+<pph>191</pph>
+<qqh>192</qqh>
+<rrh>193</rrh>
+<ssh>194</ssh>
+<tth>195</tth>
+<uuh>196</uuh>
+<vvh>197</vvh>
+<wwh>198</wwh>
+<xxh>199</xxh>
+<yyh>200</yyh>
+<aai>201</aai>
+<bbi>202</bbi>
+<cci>203</cci>
+<ddi>204</ddi>
+<eei>205</eei>
+<ffi>206</ffi>
+<ggi>207</ggi>
+<hhi>208</hhi>
+<iii>209</iii>
+<jji>210</jji>
+<kki>211</kki>
+<lli>212</lli>
+<mmi>213</mmi>
+<nni>214</nni>
+<ooi>215</ooi>
+<ppi>216</ppi>
+<qqi>217</qqi>
+<rri>218</rri>
+<ssi>219</ssi>
+<tti>220</tti>
+<uui>221</uui>
+<vvi>222</vvi>
+<wwi>223</wwi>
+<xxi>224</xxi>
+<yyi>225</yyi>
+<aaj>226</aaj>
+<bbj>227</bbj>
+<ccj>228</ccj>
+<ddj>229</ddj>
+<eej>230</eej>
+<ffj>231</ffj>
+<ggj>232</ggj>
+<hhj>233</hhj>
+<iij>234</iij>
+<jjj>235</jjj>
+<kkj>236</kkj>
+<llj>237</llj>
+<mmj>238</mmj>
+<nnj>239</nnj>
+<ooj>240</ooj>
+<ppj>241</ppj>
+<qqj>242</qqj>
+<rrj>243</rrj>
+<ssj>244</ssj>
+<ttj>245</ttj>
+<uuj>246</uuj>
+<vvj>247</vvj>
+<wwj>248</wwj>
+<xxj>249</xxj>
+<yyj>250</yyj>
+<aak>251</aak>
+<bbk>252</bbk>
+<cck>253</cck>
+<ddk>254</ddk>
+<eek>255</eek>
+<ffk>256</ffk>
+<ggk>257</ggk>
+<hhk>258</hhk>
+<iik>259</iik>
+<jjk>260</jjk>
+<kkk>261</kkk>
+<llk>262</llk>
+<mmk>263</mmk>
+<nnk>264</nnk>
+<ook>265</ook>
+<ppk>266</ppk>
+<qqk>267</qqk>
+<rrk>268</rrk>
+<ssk>269</ssk>
+<ttk>270</ttk>
+<uuk>271</uuk>
+<vvk>272</vvk>
+<wwk>273</wwk>
+<xxk>274</xxk>
+<yyk>275</yyk>
+<aal>276</aal>
+<bbl>277</bbl>
+<ccl>278</ccl>
+<ddl>279</ddl>
+<eel>280</eel>
+<ffl>281</ffl>
+<ggl>282</ggl>
+<hhl>283</hhl>
+<iil>284</iil>
+<jjl>285</jjl>
+<kkl>286</kkl>
+<lll>287</lll>
+<mml>288</mml>
+<nnl>289</nnl>
+<ool>290</ool>
+<ppl>291</ppl>
+<qql>292</qql>
+<rrl>293</rrl>
+<ssl>294</ssl>
+<ttl>295</ttl>
+<uul>296</uul>
+<vvl>297</vvl>
+<wwl>298</wwl>
+<xxl>299</xxl>
+<yyl>300</yyl>
+<aam>301</aam>
+<bbm>302</bbm>
+<ccm>303</ccm>
+<ddm>304</ddm>
+<eem>305</eem>
+<ffm>306</ffm>
+<ggm>307</ggm>
+<hhm>308</hhm>
+<iim>309</iim>
+<jjm>310</jjm>
+<kkm>311</kkm>
+<llm>312</llm>
+<mmm>313</mmm>
+<nnm>314</nnm>
+<oom>315</oom>
+<ppm>316</ppm>
+<qqm>317</qqm>
+<rrm>318</rrm>
+<ssm>319</ssm>
+<ttm>320</ttm>
+<uum>321</uum>
+<vvm>322</vvm>
+<wwm>323</wwm>
+<xxm>324</xxm>
+<yym>325</yym>
+<aan>326</aan>
+<bbn>327</bbn>
+<ccn>328</ccn>
+<ddn>329</ddn>
+<een>330</een>
+<ffn>331</ffn>
+<ggn>332</ggn>
+<hhn>333</hhn>
+<iin>334</iin>
+<jjn>335</jjn>
+<kkn>336</kkn>
+<lln>337</lln>
+<mmn>338</mmn>
+<nnn>339</nnn>
+<oon>340</oon>
+<ppn>341</ppn>
+<qqn>342</qqn>
+<rrn>343</rrn>
+<ssn>344</ssn>
+<ttn>345</ttn>
+<uun>346</uun>
+<vvn>347</vvn>
+<wwn>348</wwn>
+<xxn>349</xxn>
+<yyn>350</yyn>
+<aao>351</aao>
+<bbo>352</bbo>
+<cco>353</cco>
+<ddo>354</ddo>
+<eeo>355</eeo>
+<ffo>356</ffo>
+<ggo>357</ggo>
+<hho>358</hho>
+<iio>359</iio>
+<jjo>360</jjo>
+<kko>361</kko>
+<llo>362</llo>
+<mmo>363</mmo>
+<nno>364</nno>
+<ooo>365</ooo>
+<ppo>366</ppo>
+<qqo>367</qqo>
+<rro>368</rro>
+<sso>369</sso>
+<tto>370</tto>
+<uuo>371</uuo>
+<vvo>372</vvo>
+<wwo>373</wwo>
+<xxo>374</xxo>
+<yyo>375</yyo>
+<aap>376</aap>
+<bbp>377</bbp>
+<ccp>378</ccp>
+<ddp>379</ddp>
+<eep>380</eep>
+<ffp>381</ffp>
+<ggp>382</ggp>
+<hhp>383</hhp>
+<iip>384</iip>
+<jjp>385</jjp>
+<kkp>386</kkp>
+<llp>387</llp>
+<mmp>388</mmp>
+<nnp>389</nnp>
+<oop>390</oop>
+<ppp>391</ppp>
+<qqp>392</qqp>
+<rrp>393</rrp>
+<ssp>394</ssp>
+<ttp>395</ttp>
+<uup>396</uup>
+<vvp>397</vvp>
+<wwp>398</wwp>
+<xxp>399</xxp>
+<yyp>400</yyp>
+<aaq>401</aaq>
+<bbq>402</bbq>
+<ccq>403</ccq>
+<ddq>404</ddq>
+<eeq>405</eeq>
+<ffq>406</ffq>
+<ggq>407</ggq>
+<hhq>408</hhq>
+<iiq>409</iiq>
+<jjq>410</jjq>
+<kkq>411</kkq>
+<llq>412</llq>
+<mmq>413</mmq>
+<nnq>414</nnq>
+<ooq>415</ooq>
+<ppq>416</ppq>
+<qqq>417</qqq>
+<rrq>418</rrq>
+<ssq>419</ssq>
+<ttq>420</ttq>
+<uuq>421</uuq>
+<vvq>422</vvq>
+<wwq>423</wwq>
+<xxq>424</xxq>
+<yyq>425</yyq>
+<aar>426</aar>
+<bbr>427</bbr>
+<ccr>428</ccr>
+<ddr>429</ddr>
+<eer>430</eer>
+<ffr>431</ffr>
+<ggr>432</ggr>
+<hhr>433</hhr>
+<iir>434</iir>
+<jjr>435</jjr>
+<kkr>436</kkr>
+<llr>437</llr>
+<mmr>438</mmr>
+<nnr>439</nnr>
+<oor>440</oor>
+<ppr>441</ppr>
+<qqr>442</qqr>
+<rrr>443</rrr>
+<ssr>444</ssr>
+<ttr>445</ttr>
+<uur>446</uur>
+<vvr>447</vvr>
+<wwr>448</wwr>
+<xxr>449</xxr>
+<yyr>450</yyr>
+<aas>451</aas>
+<bbs>452</bbs>
+<ccs>453</ccs>
+<dds>454</dds>
+<ees>455</ees>
+<ffs>456</ffs>
+<ggs>457</ggs>
+<hhs>458</hhs>
+<iis>459</iis>
+<jjs>460</jjs>
+<kks>461</kks>
+<lls>462</lls>
+<mms>463</mms>
+<nns>464</nns>
+<oos>465</oos>
+<pps>466</pps>
+<qqs>467</qqs>
+<rrs>468</rrs>
+<sss>469</sss>
+<tts>470</tts>
+<uus>471</uus>
+<vvs>472</vvs>
+<wws>473</wws>
+<xxs>474</xxs>
+<yys>475</yys>
+<aat>476</aat>
+<bbt>477</bbt>
+<cct>478</cct>
+<ddt>479</ddt>
+<eet>480</eet>
+<fft>481</fft>
+<ggt>482</ggt>
+<hht>483</hht>
+<iit>484</iit>
+<jjt>485</jjt>
+<kkt>486</kkt>
+<llt>487</llt>
+<mmt>488</mmt>
+<nnt>489</nnt>
+<oot>490</oot>
+<ppt>491</ppt>
+<qqt>492</qqt>
+<rrt>493</rrt>
+<sst>494</sst>
+<ttt>495</ttt>
+<uut>496</uut>
+<vvt>497</vvt>
+<wwt>498</wwt>
+<xxt>499</xxt>
+<yyt>500</yyt>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match13.xsl b/test/tests/conf/match/match13.xsl
new file mode 100644
index 0000000..71bae61
--- /dev/null
+++ b/test/tests/conf/match/match13.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of large union. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="aac|llh|oop|aah|ssb|iii|rre|eek|xxo|aar|sst|bbd|eeo|xxi|ddg|nne">
+  <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match14.xml b/test/tests/conf/match/match14.xml
new file mode 100644
index 0000000..94d1fe1
--- /dev/null
+++ b/test/tests/conf/match/match14.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <foo att1="a">8</foo>
+  <foo att1="b">5</foo>
+  <foo att1="c">9</foo>
+  <foo att1="d">6</foo>
+</doc>
diff --git a/test/tests/conf/match/match14.xsl b/test/tests/conf/match/match14.xsl
new file mode 100644
index 0000000..438f692
--- /dev/null
+++ b/test/tests/conf/match/match14.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: match14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Purpose: Show that a variable can be used in a match pattern, though
+      not for the name test. The variable must be top-level, of course. -->
+  <!-- Creator: David Marston -->
+
+<xsl:variable name="screen" select="7"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo[. &gt; $screen]">
+  <xsl:text>Passed: </xsl:text><xsl:value-of select="@att1"/>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Failed: </xsl:text><xsl:value-of select="@att1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match15.xml b/test/tests/conf/match/match15.xml
new file mode 100644
index 0000000..fecc442
--- /dev/null
+++ b/test/tests/conf/match/match15.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>Wrong Node Selected!</element1>
+  <element1>
+    <child1>Wrong Node Selected!!</child1>
+    <child1>Wrong Node Selected!!</child1>
+    <child1>Test Executed Successfully.</child1>
+  </element1>
+  <element1>Wrong Node Selected!</element1>
+</doc>
diff --git a/test/tests/conf/match/match15.xsl b/test/tests/conf/match/match15.xsl
new file mode 100644
index 0000000..73471fc
--- /dev/null
+++ b/test/tests/conf/match/match15.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: match15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath010 in NIST suite -->
+  <!-- Purpose: Test a match patttern with a complex expression. -->
+
+<xsl:template match = "/">
+  <xsl:apply-templates select="doc/element1[2]/child1[last()]"/>
+</xsl:template>
+
+<xsl:template match="doc/element1[(((((2*10)-4)+9) div 5) mod 3)]/child1[last()]">
+  <out>
+    <xsl:value-of select = "."/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match16.xml b/test/tests/conf/match/match16.xml
new file mode 100644
index 0000000..506b2d8
--- /dev/null
+++ b/test/tests/conf/match/match16.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<chapter>
+   <section>
+      <footnote>hello</footnote>
+      <footnote>ahoy</footnote>
+   </section>
+   <section>
+      <footnote>goodbye</footnote>
+      <footnote>sayonara</footnote>
+      <footnote>adios</footnote>
+   </section>
+   <section>
+      <footnote>aloha</footnote>
+      <subsection>
+        <footnote>shalom</footnote>
+        <footnote>yo</footnote>
+      </subsection>
+      <footnote>ciao</footnote>
+   </section>
+</chapter>
\ No newline at end of file
diff --git a/test/tests/conf/match/match16.xsl b/test/tests/conf/match/match16.xsl
new file mode 100644
index 0000000..b177edd
--- /dev/null
+++ b/test/tests/conf/match/match16.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: match16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test step//step[predicate], with positional predicate, to show
+     that position numbering applies "relative to the child axis", not //. -->
+
+<xsl:output method="xml" encoding="utf-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="*">
+      <xsl:apply-templates/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter//footnote[1]">
+  <xsl:text>
+</xsl:text>
+  <first>
+    <xsl:value-of select="."/>
+  </first>
+</xsl:template>
+
+<xsl:template match="chapter//footnote[position() != 1]">
+  <other/>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- Suppress text matching -->
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match17.xml b/test/tests/conf/match/match17.xml
new file mode 100644
index 0000000..11f6294
--- /dev/null
+++ b/test/tests/conf/match/match17.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<doc>
+  <foo att1="c" att2="ok" spot="1">
+    <foo att1="b" att2="ok" spot="11">
+      <foo att1="a" att2="no" spot="111">
+        <baz att1="wrong" spot="1110"/>
+      </foo>
+      <foo att1="c" att2="no" spot="112">
+        <baz att1="wrong" spot="1120"/>
+      </foo>
+    </foo>
+    <foo att1="d" att2="ok" spot="12">
+      <foo att1="b" att2="ok" spot="121">
+        <baz att1="wrong" spot="1210"/>
+      </foo>
+    </foo>
+    <foo att1="b" att2="no" spot="13">
+      <foo att1="ok" att2="b" spot="131">
+        <baz att1="wrong" spot="1310"/>
+      </foo>
+      <foo att1="c" att2="ok" spot="132">
+        <baz att1="wrong" spot="1320"/>
+      </foo>
+    </foo>
+  </foo>
+</doc>
+   
\ No newline at end of file
diff --git a/test/tests/conf/match/match17.xsl b/test/tests/conf/match/match17.xsl
new file mode 100644
index 0000000..3368ec2
--- /dev/null
+++ b/test/tests/conf/match/match17.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 2 predicates, first one being positional. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo[2][@att2='ok']">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- suppress built-in template for text -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match18.xml b/test/tests/conf/match/match18.xml
new file mode 100644
index 0000000..e9d129f
--- /dev/null
+++ b/test/tests/conf/match/match18.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<doc>
+  <foo att1="c" att2="ok" spot="1">
+    <foo att1="b" att2="ok" spot="11">
+      <foo att1="a" att2="no" spot="111">
+        <baz att1="wrong" spot="1110"/>
+      </foo>
+      <foo att1="c" att2="no" spot="112">
+        <baz att1="wrong" spot="1120"/>
+      </foo>
+    </foo>
+    <foo att1="d" att2="ok" spot="12">
+      <foo att1="b" att2="ok" spot="121">
+        <baz att1="wrong" spot="1210"/>
+      </foo>
+    </foo>
+    <foo att1="b" att2="no" spot="13">
+      <foo att1="ok" att2="b" spot="131">
+        <baz att1="wrong" spot="1310"/>
+      </foo>
+      <foo att1="c" att2="ok" spot="132">
+        <baz att1="wrong" spot="1320"/>
+      </foo>
+    </foo>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match18.xsl b/test/tests/conf/match/match18.xsl
new file mode 100644
index 0000000..21d5471
--- /dev/null
+++ b/test/tests/conf/match/match18.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of predicate with two conditions, one positional. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo[position()=2 and @att2='ok']">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- suppress built-in template for text -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match19.xml b/test/tests/conf/match/match19.xml
new file mode 100644
index 0000000..d068b63
--- /dev/null
+++ b/test/tests/conf/match/match19.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<doc>
+  <foo att1="c" att2="ok" spot="1">
+    <foo att1="b" att2="ok" spot="11">
+      <foo att1="c" att2="no" spot="111">
+        <baz att1="wrong" spot="1110"/>
+      </foo>
+      <foo att1="c" att2="no" spot="112">
+        <baz att1="wrong" spot="1120"/>
+      </foo>
+    </foo>
+    <foo att1="c" att2="ok" spot="12">
+      <foo att1="b" att2="ok" spot="121">
+        <baz att1="wrong" spot="1210"/>
+      </foo>
+    </foo>
+    <foo att1="c" att2="no" spot="13">
+      <foo att1="ok" att2="b" spot="131">
+        <baz att1="wrong" spot="1310"/>
+      </foo>
+      <foo att1="c" att2="ok" spot="132">
+        <baz att1="wrong" spot="1320"/>
+      </foo>
+    </foo>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match19.xsl b/test/tests/conf/match/match19.xsl
new file mode 100644
index 0000000..8631854
--- /dev/null
+++ b/test/tests/conf/match/match19.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of two predicates, second one being positional. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo[@att1='c'][2]">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- suppress built-in template for text -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match20.xml b/test/tests/conf/match/match20.xml
new file mode 100644
index 0000000..2fdeb6b
--- /dev/null
+++ b/test/tests/conf/match/match20.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<root>
+    <x spot="a" num="1"/>
+    <x spot="b" num="2"/>
+    <x spot="c" num="3"/>
+    <x spot="d" num="4"/>
+    <x spot="e" num="5"/>
+    <x spot="f" num="6"/>
+    <x spot="g" num="7"/>
+    <x spot="h" num="8"/>
+    <x spot="i" num="9"/>
+    <x spot="j" num="10"/>
+    <x spot="k" num="11"/>
+    <x spot="l" num="12"/>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/match/match20.xsl b/test/tests/conf/match/match20.xsl
new file mode 100644
index 0000000..b4f4eb0
--- /dev/null
+++ b/test/tests/conf/match/match20.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test of two predicates, both being positional.
+     First predicate reduces the set to {a,c,e,g,i,k}. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="root/x"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="x[(position() mod 2)=1][position() &gt; 3]">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match21.xml b/test/tests/conf/match/match21.xml
new file mode 100644
index 0000000..2fdeb6b
--- /dev/null
+++ b/test/tests/conf/match/match21.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<root>
+    <x spot="a" num="1"/>
+    <x spot="b" num="2"/>
+    <x spot="c" num="3"/>
+    <x spot="d" num="4"/>
+    <x spot="e" num="5"/>
+    <x spot="f" num="6"/>
+    <x spot="g" num="7"/>
+    <x spot="h" num="8"/>
+    <x spot="i" num="9"/>
+    <x spot="j" num="10"/>
+    <x spot="k" num="11"/>
+    <x spot="l" num="12"/>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/match/match21.xsl b/test/tests/conf/match/match21.xsl
new file mode 100644
index 0000000..b3b684d
--- /dev/null
+++ b/test/tests/conf/match/match21.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test of three predicates, all being positional.
+     First predicate reduces the set to {a,c,e,g,i,k}. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="root/x"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="x[(position() mod 2)=1][position() &gt; 3][position()=2]">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match22.xml b/test/tests/conf/match/match22.xml
new file mode 100644
index 0000000..2fdeb6b
--- /dev/null
+++ b/test/tests/conf/match/match22.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<root>
+    <x spot="a" num="1"/>
+    <x spot="b" num="2"/>
+    <x spot="c" num="3"/>
+    <x spot="d" num="4"/>
+    <x spot="e" num="5"/>
+    <x spot="f" num="6"/>
+    <x spot="g" num="7"/>
+    <x spot="h" num="8"/>
+    <x spot="i" num="9"/>
+    <x spot="j" num="10"/>
+    <x spot="k" num="11"/>
+    <x spot="l" num="12"/>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/match/match22.xsl b/test/tests/conf/match/match22.xsl
new file mode 100644
index 0000000..1eed6cb
--- /dev/null
+++ b/test/tests/conf/match/match22.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test of three predicates, all being positional. Different notation.
+     First predicate reduces the set to {a,c,e,g,i,k}. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="root/x"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="x[(position() mod 2) &gt; 0][position() &gt; 3][2]">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match23.xml b/test/tests/conf/match/match23.xml
new file mode 100644
index 0000000..2fdeb6b
--- /dev/null
+++ b/test/tests/conf/match/match23.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<root>
+    <x spot="a" num="1"/>
+    <x spot="b" num="2"/>
+    <x spot="c" num="3"/>
+    <x spot="d" num="4"/>
+    <x spot="e" num="5"/>
+    <x spot="f" num="6"/>
+    <x spot="g" num="7"/>
+    <x spot="h" num="8"/>
+    <x spot="i" num="9"/>
+    <x spot="j" num="10"/>
+    <x spot="k" num="11"/>
+    <x spot="l" num="12"/>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/match/match23.xsl b/test/tests/conf/match/match23.xsl
new file mode 100644
index 0000000..996d7b2
--- /dev/null
+++ b/test/tests/conf/match/match23.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test of three predicates, all being positional. Use last() for one.
+     First predicate reduces the set to {a,c,e,g,i,k}. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="root/x"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="x[(position() mod 2)=1][position() &gt; 3][last()]">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match24.xml b/test/tests/conf/match/match24.xml
new file mode 100644
index 0000000..2fdeb6b
--- /dev/null
+++ b/test/tests/conf/match/match24.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<root>
+    <x spot="a" num="1"/>
+    <x spot="b" num="2"/>
+    <x spot="c" num="3"/>
+    <x spot="d" num="4"/>
+    <x spot="e" num="5"/>
+    <x spot="f" num="6"/>
+    <x spot="g" num="7"/>
+    <x spot="h" num="8"/>
+    <x spot="i" num="9"/>
+    <x spot="j" num="10"/>
+    <x spot="k" num="11"/>
+    <x spot="l" num="12"/>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/match/match24.xsl b/test/tests/conf/match/match24.xsl
new file mode 100644
index 0000000..46bb10d
--- /dev/null
+++ b/test/tests/conf/match/match24.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of three predicates, two being positional. Use last() for one.
+     First predicate reduces the set to {a,c,e,g,i,k}.
+     Second predicate, taken alone, reduces the set to {f,g,h,i,j,k,l}. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="root/x"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="x[(position() mod 2)=1][@num &gt; 5][last()]">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match25.xml b/test/tests/conf/match/match25.xml
new file mode 100644
index 0000000..2fdeb6b
--- /dev/null
+++ b/test/tests/conf/match/match25.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<root>
+    <x spot="a" num="1"/>
+    <x spot="b" num="2"/>
+    <x spot="c" num="3"/>
+    <x spot="d" num="4"/>
+    <x spot="e" num="5"/>
+    <x spot="f" num="6"/>
+    <x spot="g" num="7"/>
+    <x spot="h" num="8"/>
+    <x spot="i" num="9"/>
+    <x spot="j" num="10"/>
+    <x spot="k" num="11"/>
+    <x spot="l" num="12"/>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/match/match25.xsl b/test/tests/conf/match/match25.xsl
new file mode 100644
index 0000000..a449bad
--- /dev/null
+++ b/test/tests/conf/match/match25.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of three predicates, two being positional. Use last() for one.
+     First predicate reduces the set to {b,e,h,k}.
+     Second predicate further reduces the set to {h,k}. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="root/x"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="x[(@num mod 3)=2][position() &gt; 2][last()]">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match26.xml b/test/tests/conf/match/match26.xml
new file mode 100644
index 0000000..2fdeb6b
--- /dev/null
+++ b/test/tests/conf/match/match26.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<root>
+    <x spot="a" num="1"/>
+    <x spot="b" num="2"/>
+    <x spot="c" num="3"/>
+    <x spot="d" num="4"/>
+    <x spot="e" num="5"/>
+    <x spot="f" num="6"/>
+    <x spot="g" num="7"/>
+    <x spot="h" num="8"/>
+    <x spot="i" num="9"/>
+    <x spot="j" num="10"/>
+    <x spot="k" num="11"/>
+    <x spot="l" num="12"/>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/match/match26.xsl b/test/tests/conf/match/match26.xsl
new file mode 100644
index 0000000..ce8d27f
--- /dev/null
+++ b/test/tests/conf/match/match26.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of three predicates, two being positional.
+     First predicate reduces the set to {a,c,e,g,i,k}.
+     Second predicate further reduces the set to {c}.
+     Third predicate, taken alone, reduces the set to {a,b,c,d,e,f,g,h,i}. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="root/x"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="x[(position() mod 2)=1][2][@num &lt; 10]">
+  <xsl:value-of select="@spot"/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match27.xml b/test/tests/conf/match/match27.xml
new file mode 100644
index 0000000..5dbbbc8
--- /dev/null
+++ b/test/tests/conf/match/match27.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<A level="1">
+  <X level="2">
+     <B level="3">
+        <X level="4">
+          <C level="5">
+            <X level="6"/>
+          </C>
+        </X>
+     </B>
+  </X>
+</A>
\ No newline at end of file
diff --git a/test/tests/conf/match/match27.xsl b/test/tests/conf/match/match27.xsl
new file mode 100644
index 0000000..9ef8630
--- /dev/null
+++ b/test/tests/conf/match/match27.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+  <!-- FileName: match27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston, from an idea by Holger Floerke -->
+  <!-- Purpose: // at start of match pattern should not affect selection of nodes. -->
+
+<xsl:output method="xml" encoding="UTF-8" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="//X" mode="unprefixed" />
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="//X" mode="prefixed" />
+  </out>
+</xsl:template>
+
+<xsl:template match="X" mode="unprefixed">
+  <foundX><xsl:copy-of select="@level"/></foundX>
+</xsl:template>
+
+<xsl:template match="//X" mode="prefixed">
+  <found-X><xsl:copy-of select="@level"/></found-X>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match28.xml b/test/tests/conf/match/match28.xml
new file mode 100644
index 0000000..5dbbbc8
--- /dev/null
+++ b/test/tests/conf/match/match28.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<A level="1">
+  <X level="2">
+     <B level="3">
+        <X level="4">
+          <C level="5">
+            <X level="6"/>
+          </C>
+        </X>
+     </B>
+  </X>
+</A>
\ No newline at end of file
diff --git a/test/tests/conf/match/match28.xsl b/test/tests/conf/match/match28.xsl
new file mode 100644
index 0000000..71741b6
--- /dev/null
+++ b/test/tests/conf/match/match28.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+  <!-- FileName: match28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston, from an idea by Holger Floerke -->
+  <!-- Purpose: // at start of match pattern should not affect selection of nodes. -->
+
+<xsl:output method="xml" encoding="UTF-8" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="//X" mode="unprefixed" />
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="//X" mode="prefixed" />
+  </out>
+</xsl:template>
+
+<xsl:template match="B/X" mode="unprefixed">
+  <foundX><xsl:copy-of select="@level"/></foundX>
+</xsl:template>
+
+<xsl:template match="//B/X" mode="prefixed">
+  <found-X><xsl:copy-of select="@level"/></found-X>
+</xsl:template>
+
+<xsl:template match="X" mode="unprefixed" priority="0">
+  <!-- Suppress other X nodes -->
+</xsl:template>
+
+<xsl:template match="X" mode="prefixed" priority="0">
+  <!-- Suppress other X nodes -->
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match29.xml b/test/tests/conf/match/match29.xml
new file mode 100644
index 0000000..5dbbbc8
--- /dev/null
+++ b/test/tests/conf/match/match29.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<A level="1">
+  <X level="2">
+     <B level="3">
+        <X level="4">
+          <C level="5">
+            <X level="6"/>
+          </C>
+        </X>
+     </B>
+  </X>
+</A>
\ No newline at end of file
diff --git a/test/tests/conf/match/match29.xsl b/test/tests/conf/match/match29.xsl
new file mode 100644
index 0000000..3df23a4
--- /dev/null
+++ b/test/tests/conf/match/match29.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+  <!-- FileName: match29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston, from an idea by Holger Floerke -->
+  <!-- Purpose: // at start of match pattern should not affect selection of nodes. -->
+
+<xsl:output method="xml" encoding="UTF-8" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="//X" mode="unprefixed" />
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="//X" mode="prefixed" />
+  </out>
+</xsl:template>
+
+<xsl:template match="B//X" mode="unprefixed">
+  <foundX><xsl:copy-of select="@level"/></foundX>
+</xsl:template>
+
+<xsl:template match="//B//X" mode="prefixed">
+  <found-X><xsl:copy-of select="@level"/></found-X>
+</xsl:template>
+
+<xsl:template match="X" mode="unprefixed" priority="0">
+  <!-- Suppress other X nodes -->
+</xsl:template>
+
+<xsl:template match="X" mode="prefixed" priority="0">
+  <!-- Suppress other X nodes -->
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match30.xml b/test/tests/conf/match/match30.xml
new file mode 100644
index 0000000..e32ef11
--- /dev/null
+++ b/test/tests/conf/match/match30.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <l1>
+    <v2>doc-l1-v2</v2>
+    <x2>doc-l1-x2</x2>
+    <l2>
+      <v3>doc-l1-l2-v3</v3>
+      <w3>doc-l1-l2-w3</w3>
+      <x3>doc-l1-l2-x3</x3>
+      <y3>doc-l1-l2-y3</y3>
+      <l3>
+        <v4>doc-l1-l2-l3-v4</v4>
+        <x4>doc-l1-l2-l3-x4</x4>
+      </l3>
+    </l2>
+  </l1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match30.xsl b/test/tests/conf/match/match30.xsl
new file mode 100644
index 0000000..fc0f48d
--- /dev/null
+++ b/test/tests/conf/match/match30.xsl
@@ -0,0 +1,112 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: match30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Purpose: Use multiple levels of child axis in match patterns.
+     Intermix 'child::' and default, but only with child:: in the middle. -->
+  <!-- Creator: Henry Zongaro -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:apply-templates/><!-- rely on some built-ins -->
+    </out>
+  </xsl:template>
+
+  <xsl:template match="doc/l1/v2">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/l1/v2; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/l1//v3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/l1//v3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//l2/w3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//l2/w3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//l2//v4">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//l2//v4; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/child::l1/x2">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/child::l1/x2; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/child::l1//x3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/child::l1//x3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//child::l2/y3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//child::l2/y3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//child::l2//x4">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//child::l2//x4; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match='text()'/><!-- squelch direct replay of text -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match31.xml b/test/tests/conf/match/match31.xml
new file mode 100644
index 0000000..e32ef11
--- /dev/null
+++ b/test/tests/conf/match/match31.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <l1>
+    <v2>doc-l1-v2</v2>
+    <x2>doc-l1-x2</x2>
+    <l2>
+      <v3>doc-l1-l2-v3</v3>
+      <w3>doc-l1-l2-w3</w3>
+      <x3>doc-l1-l2-x3</x3>
+      <y3>doc-l1-l2-y3</y3>
+      <l3>
+        <v4>doc-l1-l2-l3-v4</v4>
+        <x4>doc-l1-l2-l3-x4</x4>
+      </l3>
+    </l2>
+  </l1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match31.xsl b/test/tests/conf/match/match31.xsl
new file mode 100644
index 0000000..be93c8d
--- /dev/null
+++ b/test/tests/conf/match/match31.xsl
@@ -0,0 +1,112 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: match31 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Purpose: Use multiple levels of child axis in match patterns.
+     Intermix 'child::' and default, but only with child:: on the tail. -->
+  <!-- Creator: Henry Zongaro -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:apply-templates/><!-- rely on some built-ins -->
+    </out>
+  </xsl:template>
+
+  <xsl:template match="doc/l1/v2">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/l1/v2; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/l1//v3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/l1//v3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//l2/w3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//l2/w3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//l2//v4">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//l2//v4; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/l1/child::x2">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/l1/child::x2; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/l1//child::x3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/l1//child::x3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//l2/child::y3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//l2/child::y3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//l2//child::x4">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//l2//child::x4; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match='text()'/><!-- squelch direct replay of text -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match32.xml b/test/tests/conf/match/match32.xml
new file mode 100644
index 0000000..e32ef11
--- /dev/null
+++ b/test/tests/conf/match/match32.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <l1>
+    <v2>doc-l1-v2</v2>
+    <x2>doc-l1-x2</x2>
+    <l2>
+      <v3>doc-l1-l2-v3</v3>
+      <w3>doc-l1-l2-w3</w3>
+      <x3>doc-l1-l2-x3</x3>
+      <y3>doc-l1-l2-y3</y3>
+      <l3>
+        <v4>doc-l1-l2-l3-v4</v4>
+        <x4>doc-l1-l2-l3-x4</x4>
+      </l3>
+    </l2>
+  </l1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/match/match32.xsl b/test/tests/conf/match/match32.xsl
new file mode 100644
index 0000000..7acc128
--- /dev/null
+++ b/test/tests/conf/match/match32.xsl
@@ -0,0 +1,111 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: match32 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Purpose: Use multiple levels of child axis in match patterns. Spell out 'child::' sometimes. -->
+  <!-- Creator: Henry Zongaro -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:apply-templates/><!-- rely on some built-ins -->
+    </out>
+  </xsl:template>
+
+  <xsl:template match="doc/l1/v2">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/l1/v2; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/l1//v3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/l1//v3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//l2/w3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//l2/w3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//l2//v4">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//l2//v4; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/child::l1/child::x2">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/child::l1/child::x2; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc/child::l1//child::x3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc/child::l1//child::x3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//child::l2/child::y3">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//child::l2/child::y3; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match="doc//child::l2//child::x4">
+    <xsl:text>
+</xsl:text>
+    <match>
+      <xsl:text>Rule doc//child::l2//child::x4; value of matched node:  </xsl:text>
+      <xsl:value-of select='.'/>
+    </match>
+  </xsl:template>
+
+  <xsl:template match='text()'/><!-- squelch direct replay of text -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match33.xml b/test/tests/conf/match/match33.xml
new file mode 100644
index 0000000..87e3dbb
--- /dev/null
+++ b/test/tests/conf/match/match33.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <child>
+     <child-foo>
+        <name>John Doe</name>
+        <child>
+          <name>Jane Doe</name>
+        </child>
+     </child-foo>
+  </child>
+</doc>
diff --git a/test/tests/conf/match/match33.xsl b/test/tests/conf/match/match33.xsl
new file mode 100644
index 0000000..17674dd
--- /dev/null
+++ b/test/tests/conf/match/match33.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH33 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Bertoni (dbertoni@apache.org) -->
+  <!-- Purpose: Test for a predicate in a match pattern where the pattern step is followed by "//". 
+                See Jira issue XALANC-679 -->
+
+<xsl:template match="/">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="child/*[starts-with(name(),'child-')]//name" >
+    <name><xsl:value-of select="."/></name>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/match/match34.xml b/test/tests/conf/match/match34.xml
new file mode 100644
index 0000000..65de986
--- /dev/null
+++ b/test/tests/conf/match/match34.xml
@@ -0,0 +1,5 @@
+<doc>
+  <foo>
+    <bar name="name"/>
+  </foo>
+</doc>
diff --git a/test/tests/conf/match/match34.xsl b/test/tests/conf/match/match34.xsl
new file mode 100644
index 0000000..72674b3
--- /dev/null
+++ b/test/tests/conf/match/match34.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCH34 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Bertoni (dbertoni@apache.org) -->
+  <!-- Purpose: Test for a "@" (AbbreviatedAxisSpecifier) in a match pattern. Xalan-C would report a syntax error.
+                See Jira issue XALANC-680 -->
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="//@*"/></out>
+</xsl:template>
+
+<xsl:template match="doc//@name">
+  <attribute><xsl:value-of select="." /></attribute>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math01.xml b/test/tests/conf/math/math01.xml
new file mode 100644
index 0000000..0b8de7d
--- /dev/null
+++ b/test/tests/conf/math/math01.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math01.xsl b/test/tests/conf/math/math01.xsl
new file mode 100644
index 0000000..47deb39
--- /dev/null
+++ b/test/tests/conf/math/math01.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion function on an element. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number(n1)"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math02.xml b/test/tests/conf/math/math02.xml
new file mode 100644
index 0000000..c02bd02
--- /dev/null
+++ b/test/tests/conf/math/math02.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math02.xsl b/test/tests/conf/math/math02.xsl
new file mode 100644
index 0000000..a8ff906
--- /dev/null
+++ b/test/tests/conf/math/math02.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(0.0)"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math03.xml b/test/tests/conf/math/math03.xml
new file mode 100644
index 0000000..c02bd02
--- /dev/null
+++ b/test/tests/conf/math/math03.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math03.xsl b/test/tests/conf/math/math03.xsl
new file mode 100644
index 0000000..f0658a1
--- /dev/null
+++ b/test/tests/conf/math/math03.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(0.0)"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math04.xml b/test/tests/conf/math/math04.xml
new file mode 100644
index 0000000..7451dd2
--- /dev/null
+++ b/test/tests/conf/math/math04.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math04.xsl b/test/tests/conf/math/math04.xsl
new file mode 100644
index 0000000..5c80c0f
--- /dev/null
+++ b/test/tests/conf/math/math04.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(0.0)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math05.xml b/test/tests/conf/math/math05.xml
new file mode 100644
index 0000000..1f2bd78
--- /dev/null
+++ b/test/tests/conf/math/math05.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+<n attrib="1">0</n>
+<n attrib="1">1</n>
+<n attrib="1">2</n>
+<n attrib="1">3</n>
+<n attrib="2">4</n>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math05.xsl b/test/tests/conf/math/math05.xsl
new file mode 100644
index 0000000..d7c2df9
--- /dev/null
+++ b/test/tests/conf/math/math05.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of sum(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="sum(n)"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math06.xml b/test/tests/conf/math/math06.xml
new file mode 100644
index 0000000..f221832
--- /dev/null
+++ b/test/tests/conf/math/math06.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+<n1 attrib="2">2</n1>
+<n2 attrib="4">3</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math06.xsl b/test/tests/conf/math/math06.xsl
new file mode 100644
index 0000000..edd6dda
--- /dev/null
+++ b/test/tests/conf/math/math06.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '*' operator. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2*3"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math07.xml b/test/tests/conf/math/math07.xml
new file mode 100644
index 0000000..fd81403
--- /dev/null
+++ b/test/tests/conf/math/math07.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+<n1 attrib="5">3</n1>
+<n2 attrib="5">6</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math07.xsl b/test/tests/conf/math/math07.xsl
new file mode 100644
index 0000000..15ee0d8
--- /dev/null
+++ b/test/tests/conf/math/math07.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '+' operator. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="3+6"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math08.xml b/test/tests/conf/math/math08.xml
new file mode 100644
index 0000000..0fb0bfa
--- /dev/null
+++ b/test/tests/conf/math/math08.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math08.xsl b/test/tests/conf/math/math08.xsl
new file mode 100644
index 0000000..4136fa2
--- /dev/null
+++ b/test/tests/conf/math/math08.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator.  Note since XML allows "-" in names
+       the "-" operator typically needs to be preceded by whitespace.-->
+
+
+
+<xsl:variable name="h" select="60"/>
+<xsl:variable name="i" select="20"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="3-1"/><xsl:text>,</xsl:text>
+	<xsl:value-of select="$h - $i"/> 
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math09.xml b/test/tests/conf/math/math09.xml
new file mode 100644
index 0000000..b88dfa3
--- /dev/null
+++ b/test/tests/conf/math/math09.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math09.xsl b/test/tests/conf/math/math09.xsl
new file mode 100644
index 0000000..ff7369e
--- /dev/null
+++ b/test/tests/conf/math/math09.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="6 div 2"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math10.xml b/test/tests/conf/math/math10.xml
new file mode 100644
index 0000000..c6c431e
--- /dev/null
+++ b/test/tests/conf/math/math10.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<n1 attrib="10">5</n1>
+<n2 attrib="4">2</n2>
+<div attrib="-5">-5</div>
+<mod attrib="-2">2</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math10.xsl b/test/tests/conf/math/math10.xsl
new file mode 100644
index 0000000..b732885
--- /dev/null
+++ b/test/tests/conf/math/math10.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'mod' operator. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="5 mod 2"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math100.xml b/test/tests/conf/math/math100.xml
new file mode 100644
index 0000000..62e6932
--- /dev/null
+++ b/test/tests/conf/math/math100.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <n5>5</n5>
+  <n6>6</n6>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math100.xsl b/test/tests/conf/math/math100.xsl
new file mode 100644
index 0000000..a8f6f6b
--- /dev/null
+++ b/test/tests/conf/math/math100.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math100 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that div has precedence over + and -. -->
+
+<xsl:variable name="anum" select="10"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(24 div 3 +2) div (40 div 8 -3)"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="80 div n2 + 12 div 2 - n4 div n2"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="70 div $anum - 18 div n6 + $anum div n2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math101.xml b/test/tests/conf/math/math101.xml
new file mode 100644
index 0000000..62e6932
--- /dev/null
+++ b/test/tests/conf/math/math101.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <n5>5</n5>
+  <n6>6</n6>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math101.xsl b/test/tests/conf/math/math101.xsl
new file mode 100644
index 0000000..362458e
--- /dev/null
+++ b/test/tests/conf/math/math101.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math101 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that mod has precedence over + and -. -->
+
+<xsl:variable name="anum" select="10"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="48 mod 17 - 2 mod 9 + 13 mod 5"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="56 mod round(n5*2+1.444) - n6 mod 4 + 7 mod n4"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="(77 mod $anum + n5 mod 8) mod $anum"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math102.xml b/test/tests/conf/math/math102.xml
new file mode 100644
index 0000000..ac7b881
--- /dev/null
+++ b/test/tests/conf/math/math102.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>17</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math102.xsl b/test/tests/conf/math/math102.xsl
new file mode 100644
index 0000000..92bb9fb
--- /dev/null
+++ b/test/tests/conf/math/math102.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math102 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that number() with no argument applies to context node. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math103.xml b/test/tests/conf/math/math103.xml
new file mode 100644
index 0000000..fc85f3d
--- /dev/null
+++ b/test/tests/conf/math/math103.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n1>3</n1>
+  <n2>7</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math103.xsl b/test/tests/conf/math/math103.xsl
new file mode 100644
index 0000000..b11003a
--- /dev/null
+++ b/test/tests/conf/math/math103.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math103 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of unary '-' on a union. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:copy-of select="-(n1|n2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math104.xml b/test/tests/conf/math/math104.xml
new file mode 100644
index 0000000..fc52262
--- /dev/null
+++ b/test/tests/conf/math/math104.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<doc>
+  <n>0</n>
+  <n>1</n>
+  <n>2</n>
+  <n>-1</n>
+  <n>0.0001</n>
+  <n>five</n>
+  <n>NaN</n>
+  <n></n>
+  <n>.</n>
+  <n>0.</n>
+  <n>.0</n>
+  <n>-0</n>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math104.xsl b/test/tests/conf/math/math104.xsl
new file mode 100644
index 0000000..4f621bd
--- /dev/null
+++ b/test/tests/conf/math/math104.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math104 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of is-a-number technique. -->
+  <!-- Creator: David Marston -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="n">
+      <xsl:choose>
+        <xsl:when test="contains(number(.),'NaN')">
+          <xsl:value-of select="."/><xsl:text> is not a number
+</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="."/><xsl:text> is a number
+</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math105.xml b/test/tests/conf/math/math105.xml
new file mode 100644
index 0000000..0b8de7d
--- /dev/null
+++ b/test/tests/conf/math/math105.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math105.xsl b/test/tests/conf/math/math105.xsl
new file mode 100644
index 0000000..870bba1
--- /dev/null
+++ b/test/tests/conf/math/math105.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH105 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test what value-of does to a large number. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="9876543210"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math11.xml b/test/tests/conf/math/math11.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math11.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math11.xsl b/test/tests/conf/math/math11.xsl
new file mode 100644
index 0000000..7be668b
--- /dev/null
+++ b/test/tests/conf/math/math11.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion function on a non-existent node. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number(foo)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math110.xml b/test/tests/conf/math/math110.xml
new file mode 100644
index 0000000..8937527
--- /dev/null
+++ b/test/tests/conf/math/math110.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <k>0.0004</k>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math110.xsl b/test/tests/conf/math/math110.xsl
new file mode 100644
index 0000000..8a665d7
--- /dev/null
+++ b/test/tests/conf/math/math110.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH110 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of number() conversion function for small decimal numbers. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+      <xsl:value-of select="number(1.75)"/>
+      <xsl:text>|</xsl:text>
+      <xsl:value-of select="number(7 div 4)"/>
+      <xsl:text>|</xsl:text>
+      <xsl:value-of select="(number(1.75) = (7 div 4))"/>
+      <xsl:text>|&#10;</xsl:text>
+      <xsl:value-of select="number(0.109375 * 16)"/>
+      <xsl:text>|</xsl:text>
+      <xsl:value-of select="(number(1.75) = (0.109375 * 16))"/>
+      <xsl:text>|&#10;</xsl:text>
+      <xsl:value-of select="number(k)"/>
+      <xsl:text>|</xsl:text>
+      <xsl:value-of select="number(4 div 10000)"/>
+      <xsl:text>|</xsl:text>
+      <xsl:value-of select="(number(k) = (4 div 10000))"/>
+      <xsl:text>|&#10;</xsl:text>
+      <xsl:value-of select="number(0.0001 * 4)"/>
+      <xsl:text>|</xsl:text>
+      <xsl:value-of select="(number(k) = (0.0001 * 4))"/>
+      <xsl:text>|&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math111.xml b/test/tests/conf/math/math111.xml
new file mode 100644
index 0000000..dd0f48a
--- /dev/null
+++ b/test/tests/conf/math/math111.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<doc>
+	<number>0.0</number>
+	<number>0.4</number>
+	<number>4.0</number>
+	<number>0.04</number>
+	<number>0.004</number>
+	<number>0.0004</number>
+	<number>0.0000000000001</number>
+	<number>0.0000000000000000000000000001</number>
+	<number>0.0000000000001000000000000001</number>
+	<number>0.0012</number>
+	<number>0.012</number>
+</doc>
diff --git a/test/tests/conf/math/math111.xsl b/test/tests/conf/math/math111.xsl
new file mode 100644
index 0000000..d8d7a97
--- /dev/null
+++ b/test/tests/conf/math/math111.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH111 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: Gordon Chiu -->
+  <!-- Purpose: Test of string to number conversion for small (yet still representable) decimal numbers. -->
+	<xsl:template match="doc">
+		<out>
+			<xsl:apply-templates/>
+		</out>
+	</xsl:template>
+	<xsl:template match="number">
+		<pos><xsl:value-of select="string(number(.))"/></pos>
+		<neg><xsl:value-of select="string(-1 * number(.))"/></neg>
+	</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math12.xml b/test/tests/conf/math/math12.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math12.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math12.xsl b/test/tests/conf/math/math12.xsl
new file mode 100644
index 0000000..48084e5
--- /dev/null
+++ b/test/tests/conf/math/math12.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion function on numeric input. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number(2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math13.xml b/test/tests/conf/math/math13.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math13.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math13.xsl b/test/tests/conf/math/math13.xsl
new file mode 100644
index 0000000..b9ec060
--- /dev/null
+++ b/test/tests/conf/math/math13.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion function on a string that is convertible. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number('3')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math14.xml b/test/tests/conf/math/math14.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math14.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math14.xsl b/test/tests/conf/math/math14.xsl
new file mode 100644
index 0000000..9463688
--- /dev/null
+++ b/test/tests/conf/math/math14.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion function on a null string. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number('')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math15.xml b/test/tests/conf/math/math15.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math15.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math15.xsl b/test/tests/conf/math/math15.xsl
new file mode 100644
index 0000000..84239c2
--- /dev/null
+++ b/test/tests/conf/math/math15.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion function on a string that is not convertible. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number('abc')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math16.xml b/test/tests/conf/math/math16.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math16.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math16.xsl b/test/tests/conf/math/math16.xsl
new file mode 100644
index 0000000..d902368
--- /dev/null
+++ b/test/tests/conf/math/math16.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() and string() conversion functions for numeric accuracy. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number(string(1.0))=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math17.xml b/test/tests/conf/math/math17.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math17.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math17.xsl b/test/tests/conf/math/math17.xsl
new file mode 100644
index 0000000..df95af1
--- /dev/null
+++ b/test/tests/conf/math/math17.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion function on a tree fragment. -->
+
+<xsl:variable name="ResultTreeFragTest">
+  <xsl:value-of select="n4"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number($ResultTreeFragTest)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math18.xml b/test/tests/conf/math/math18.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math18.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math18.xsl b/test/tests/conf/math/math18.xsl
new file mode 100644
index 0000000..81ae47a
--- /dev/null
+++ b/test/tests/conf/math/math18.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion function on an empty tree fragment. -->
+
+<xsl:variable name="emptyResultTreeFragTest">
+  <xsl:value-of select="foo"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number($emptyResultTreeFragTest)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math19.xml b/test/tests/conf/math/math19.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math19.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math19.xsl b/test/tests/conf/math/math19.xsl
new file mode 100644
index 0000000..4f708d1
--- /dev/null
+++ b/test/tests/conf/math/math19.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion of boolean constant true. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number(true())=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math20.xml b/test/tests/conf/math/math20.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math20.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math20.xsl b/test/tests/conf/math/math20.xsl
new file mode 100644
index 0000000..aa3615b
--- /dev/null
+++ b/test/tests/conf/math/math20.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion of boolean constant false. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number(false())=0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math21.xml b/test/tests/conf/math/math21.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math21.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math21.xsl b/test/tests/conf/math/math21.xsl
new file mode 100644
index 0000000..ba991de
--- /dev/null
+++ b/test/tests/conf/math/math21.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of consistency number() conversion of non-convertible strings. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number('xxx')=number('xxx')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math22.xml b/test/tests/conf/math/math22.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math22.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math22.xsl b/test/tests/conf/math/math22.xsl
new file mode 100644
index 0000000..fed46a6
--- /dev/null
+++ b/test/tests/conf/math/math22.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of number() conversion of a non-convertible string. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="number('xxx')=0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math23.xml b/test/tests/conf/math/math23.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math23.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math23.xsl b/test/tests/conf/math/math23.xsl
new file mode 100644
index 0000000..e7ab264
--- /dev/null
+++ b/test/tests/conf/math/math23.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH23 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor() on a node. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(n0)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math24.xml b/test/tests/conf/math/math24.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math24.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math24.xsl b/test/tests/conf/math/math24.xsl
new file mode 100644
index 0000000..2b10250
--- /dev/null
+++ b/test/tests/conf/math/math24.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor() on a non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(1.9)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math25.xml b/test/tests/conf/math/math25.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math25.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math25.xsl b/test/tests/conf/math/math25.xsl
new file mode 100644
index 0000000..8f29fd2
--- /dev/null
+++ b/test/tests/conf/math/math25.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH25 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor() on a node containing a non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(n1)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math26.xml b/test/tests/conf/math/math26.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math26.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math26.xsl b/test/tests/conf/math/math26.xsl
new file mode 100644
index 0000000..7490444
--- /dev/null
+++ b/test/tests/conf/math/math26.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH26 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor() near a boundary. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(2.999999)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math27.xml b/test/tests/conf/math/math27.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math27.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math27.xsl b/test/tests/conf/math/math27.xsl
new file mode 100644
index 0000000..1def4d9
--- /dev/null
+++ b/test/tests/conf/math/math27.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH27 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor() on a node containing a boundary case. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(n2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math28.xml b/test/tests/conf/math/math28.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math28.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math28.xsl b/test/tests/conf/math/math28.xsl
new file mode 100644
index 0000000..1d80c3c
--- /dev/null
+++ b/test/tests/conf/math/math28.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH28 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor() on a negative non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(-1.5)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math29.xml b/test/tests/conf/math/math29.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math29.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math29.xsl b/test/tests/conf/math/math29.xsl
new file mode 100644
index 0000000..2357f78
--- /dev/null
+++ b/test/tests/conf/math/math29.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH29 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(1)=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math30.xml b/test/tests/conf/math/math30.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math30.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math30.xsl b/test/tests/conf/math/math30.xsl
new file mode 100644
index 0000000..389bc2f
--- /dev/null
+++ b/test/tests/conf/math/math30.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH30 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor() of a non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(1.9)=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math31.xml b/test/tests/conf/math/math31.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math31.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math31.xsl b/test/tests/conf/math/math31.xsl
new file mode 100644
index 0000000..631af2a
--- /dev/null
+++ b/test/tests/conf/math/math31.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH31 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of floor() on a negative non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(-1.5)=-2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math32.xml b/test/tests/conf/math/math32.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math32.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math32.xsl b/test/tests/conf/math/math32.xsl
new file mode 100644
index 0000000..7f2282d
--- /dev/null
+++ b/test/tests/conf/math/math32.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH32 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling() on a node containing an integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(n0)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math33.xml b/test/tests/conf/math/math33.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math33.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math33.xsl b/test/tests/conf/math/math33.xsl
new file mode 100644
index 0000000..20392fc
--- /dev/null
+++ b/test/tests/conf/math/math33.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH33 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling() on a non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(1.54)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math34.xml b/test/tests/conf/math/math34.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math34.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math34.xsl b/test/tests/conf/math/math34.xsl
new file mode 100644
index 0000000..837c285
--- /dev/null
+++ b/test/tests/conf/math/math34.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH34 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling() of a node containing a non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(n1)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math35.xml b/test/tests/conf/math/math35.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math35.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math35.xsl b/test/tests/conf/math/math35.xsl
new file mode 100644
index 0000000..d3601dd
--- /dev/null
+++ b/test/tests/conf/math/math35.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH35 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling() on a boundary case. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(2.999999)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math36.xml b/test/tests/conf/math/math36.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math36.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math36.xsl b/test/tests/conf/math/math36.xsl
new file mode 100644
index 0000000..6f08f6b
--- /dev/null
+++ b/test/tests/conf/math/math36.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH36 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling() on a node containing a boundary case. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(n2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math37.xml b/test/tests/conf/math/math37.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math37.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math37.xsl b/test/tests/conf/math/math37.xsl
new file mode 100644
index 0000000..73d0b3b
--- /dev/null
+++ b/test/tests/conf/math/math37.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH37 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(1)=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math38.xml b/test/tests/conf/math/math38.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math38.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math38.xsl b/test/tests/conf/math/math38.xsl
new file mode 100644
index 0000000..7340e14
--- /dev/null
+++ b/test/tests/conf/math/math38.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH38 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling() on a non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(1.1)=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math39.xml b/test/tests/conf/math/math39.xml
new file mode 100644
index 0000000..3dc5f22
--- /dev/null
+++ b/test/tests/conf/math/math39.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.54</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math39.xsl b/test/tests/conf/math/math39.xsl
new file mode 100644
index 0000000..8cc1fb9
--- /dev/null
+++ b/test/tests/conf/math/math39.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH39 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of ceiling() on a negative non-integer. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="ceiling(-1.5)=-1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math40.xml b/test/tests/conf/math/math40.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math40.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math40.xsl b/test/tests/conf/math/math40.xsl
new file mode 100644
index 0000000..7280e0f
--- /dev/null
+++ b/test/tests/conf/math/math40.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH40 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() on a node. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(n0)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math41.xml b/test/tests/conf/math/math41.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math41.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math41.xsl b/test/tests/conf/math/math41.xsl
new file mode 100644
index 0000000..e7a9e1c
--- /dev/null
+++ b/test/tests/conf/math/math41.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH41 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a non-integer below halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(1.24)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math42.xml b/test/tests/conf/math/math42.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math42.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math42.xsl b/test/tests/conf/math/math42.xsl
new file mode 100644
index 0000000..04015f9
--- /dev/null
+++ b/test/tests/conf/math/math42.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH42 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a node containing a non-integer below halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(n1)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math43.xml b/test/tests/conf/math/math43.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math43.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math43.xsl b/test/tests/conf/math/math43.xsl
new file mode 100644
index 0000000..438cf44
--- /dev/null
+++ b/test/tests/conf/math/math43.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH43 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a boundary case. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(2.999999)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math44.xml b/test/tests/conf/math/math44.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math44.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math44.xsl b/test/tests/conf/math/math44.xsl
new file mode 100644
index 0000000..7af014a
--- /dev/null
+++ b/test/tests/conf/math/math44.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH44 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a node containing a boundary case. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(n2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math45.xml b/test/tests/conf/math/math45.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math45.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math45.xsl b/test/tests/conf/math/math45.xsl
new file mode 100644
index 0000000..3edb3fd
--- /dev/null
+++ b/test/tests/conf/math/math45.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH45 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a non-integer below halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(1.1)=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math46.xml b/test/tests/conf/math/math46.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math46.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math46.xsl b/test/tests/conf/math/math46.xsl
new file mode 100644
index 0000000..ed2d8df
--- /dev/null
+++ b/test/tests/conf/math/math46.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH46 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a negative non-integer above halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(-1.1)=-1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math47.xml b/test/tests/conf/math/math47.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math47.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math47.xsl b/test/tests/conf/math/math47.xsl
new file mode 100644
index 0000000..59cae48
--- /dev/null
+++ b/test/tests/conf/math/math47.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH47 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a non-integer above halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(1.9)=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math48.xml b/test/tests/conf/math/math48.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math48.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math48.xsl b/test/tests/conf/math/math48.xsl
new file mode 100644
index 0000000..19930af
--- /dev/null
+++ b/test/tests/conf/math/math48.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH48 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a negative non-integer below halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(-1.9)=-2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math49.xml b/test/tests/conf/math/math49.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math49.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math49.xsl b/test/tests/conf/math/math49.xsl
new file mode 100644
index 0000000..3038bbd
--- /dev/null
+++ b/test/tests/conf/math/math49.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH49 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a non-integer at halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(1.5)=2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math50.xml b/test/tests/conf/math/math50.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math50.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math50.xsl b/test/tests/conf/math/math50.xsl
new file mode 100644
index 0000000..d7c42c2
--- /dev/null
+++ b/test/tests/conf/math/math50.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH50 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 Number Functions -->
+  <!-- Purpose: Test of round() of a non-integer at halfway. -->
+
+<xsl:template match="doc">
+  <out>
+     <xsl:value-of select="round(2.5)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math51.xml b/test/tests/conf/math/math51.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math51.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math51.xsl b/test/tests/conf/math/math51.xsl
new file mode 100644
index 0000000..10a5475
--- /dev/null
+++ b/test/tests/conf/math/math51.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH51 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of round() of a negative non-integer at halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(-2.5)=-2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math52.xml b/test/tests/conf/math/math52.xml
new file mode 100644
index 0000000..f7826ff
--- /dev/null
+++ b/test/tests/conf/math/math52.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0.0</n0>
+  <n1>1.24</n1>
+  <n2>2.999999</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math52.xsl b/test/tests/conf/math/math52.xsl
new file mode 100644
index 0000000..43ba826
--- /dev/null
+++ b/test/tests/conf/math/math52.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH52 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 Number Functions -->
+  <!-- Purpose: Test of round() of a negative non-integer at halfway. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="round(-1.5)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math53.xml b/test/tests/conf/math/math53.xml
new file mode 100644
index 0000000..9ae0e7c
--- /dev/null
+++ b/test/tests/conf/math/math53.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n attrib="1">0</n>
+<n attrib="1">1</n>
+<n attrib="1">2</n>
+<n attrib="1">3</n>
+<n attrib="2">4</n>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math53.xsl b/test/tests/conf/math/math53.xsl
new file mode 100644
index 0000000..bfeb37d
--- /dev/null
+++ b/test/tests/conf/math/math53.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH53 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of sum(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="sum(n/@attrib)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math54.xml b/test/tests/conf/math/math54.xml
new file mode 100644
index 0000000..9ae0e7c
--- /dev/null
+++ b/test/tests/conf/math/math54.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n attrib="1">0</n>
+<n attrib="1">1</n>
+<n attrib="1">2</n>
+<n attrib="1">3</n>
+<n attrib="2">4</n>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math54.xsl b/test/tests/conf/math/math54.xsl
new file mode 100644
index 0000000..c04d5a1
--- /dev/null
+++ b/test/tests/conf/math/math54.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH54 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 -->
+  <!-- Purpose: Test of sum(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="sum(x)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math55.xml b/test/tests/conf/math/math55.xml
new file mode 100644
index 0000000..ff9c028
--- /dev/null
+++ b/test/tests/conf/math/math55.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="2">2</n1>
+<n2 attrib="4">3</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math55.xsl b/test/tests/conf/math/math55.xsl
new file mode 100644
index 0000000..f8e4d16
--- /dev/null
+++ b/test/tests/conf/math/math55.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH55 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '*' operator on two nodes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n1*n2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math56.xml b/test/tests/conf/math/math56.xml
new file mode 100644
index 0000000..ff9c028
--- /dev/null
+++ b/test/tests/conf/math/math56.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="2">2</n1>
+<n2 attrib="4">3</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math56.xsl b/test/tests/conf/math/math56.xsl
new file mode 100644
index 0000000..a56a65d
--- /dev/null
+++ b/test/tests/conf/math/math56.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH56 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '*' operator on attributes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(n1/@attrib)*(n2/@attrib)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math57.xml b/test/tests/conf/math/math57.xml
new file mode 100644
index 0000000..d21506b
--- /dev/null
+++ b/test/tests/conf/math/math57.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="5">3</n1>
+<n2 attrib="5">6</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math57.xsl b/test/tests/conf/math/math57.xsl
new file mode 100644
index 0000000..e0e9421
--- /dev/null
+++ b/test/tests/conf/math/math57.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH57 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '+' operator on two nodes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n1+n2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math58.xml b/test/tests/conf/math/math58.xml
new file mode 100644
index 0000000..d21506b
--- /dev/null
+++ b/test/tests/conf/math/math58.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="5">3</n1>
+<n2 attrib="5">6</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math58.xsl b/test/tests/conf/math/math58.xsl
new file mode 100644
index 0000000..af6516c
--- /dev/null
+++ b/test/tests/conf/math/math58.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH58 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '+' operator on two attributes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(n1/@attrib)+(n2/@attrib)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math59.xml b/test/tests/conf/math/math59.xml
new file mode 100644
index 0000000..d21506b
--- /dev/null
+++ b/test/tests/conf/math/math59.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="5">3</n1>
+<n2 attrib="5">6</n2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math59.xsl b/test/tests/conf/math/math59.xsl
new file mode 100644
index 0000000..3c35709
--- /dev/null
+++ b/test/tests/conf/math/math59.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH59 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '+' operator on two attributes, without parentheses. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n1/@attrib + n2/@attrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math60.xml b/test/tests/conf/math/math60.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math60.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math60.xsl b/test/tests/conf/math/math60.xsl
new file mode 100644
index 0000000..b632c60
--- /dev/null
+++ b/test/tests/conf/math/math60.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH60 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator, negative result. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1-2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math61.xml b/test/tests/conf/math/math61.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math61.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math61.xsl b/test/tests/conf/math/math61.xsl
new file mode 100644
index 0000000..5b7622a
--- /dev/null
+++ b/test/tests/conf/math/math61.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH61 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator on two nodes whose names have hyphens. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n-2 - n-1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math62.xml b/test/tests/conf/math/math62.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math62.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math62.xsl b/test/tests/conf/math/math62.xsl
new file mode 100644
index 0000000..e427714
--- /dev/null
+++ b/test/tests/conf/math/math62.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH62 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '+' operator and unary '-'. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="7+-3"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math63.xml b/test/tests/conf/math/math63.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math63.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math63.xsl b/test/tests/conf/math/math63.xsl
new file mode 100644
index 0000000..171c2a4
--- /dev/null
+++ b/test/tests/conf/math/math63.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH63 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '+' operator and unary '-' on nodes whose names have hyphens. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n-2+-n-1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math64.xml b/test/tests/conf/math/math64.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math64.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math64.xsl b/test/tests/conf/math/math64.xsl
new file mode 100644
index 0000000..546d384
--- /dev/null
+++ b/test/tests/conf/math/math64.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH64 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator and unary '-'. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="7 - -3"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math65.xml b/test/tests/conf/math/math65.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math65.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math65.xsl b/test/tests/conf/math/math65.xsl
new file mode 100644
index 0000000..6b8e013
--- /dev/null
+++ b/test/tests/conf/math/math65.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH65 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator and unary '-' on nodes whose names have hyphens. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n-2 - -n-1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math66.xml b/test/tests/conf/math/math66.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math66.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math66.xsl b/test/tests/conf/math/math66.xsl
new file mode 100644
index 0000000..892ae22
--- /dev/null
+++ b/test/tests/conf/math/math66.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH66 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator and unary '-'. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="-7 --3"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math67.xml b/test/tests/conf/math/math67.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math67.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math67.xsl b/test/tests/conf/math/math67.xsl
new file mode 100644
index 0000000..62e2fb9
--- /dev/null
+++ b/test/tests/conf/math/math67.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH67 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator and unary '-' on nodes whose names have hyphens. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="-n-2 --n-1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math68.xml b/test/tests/conf/math/math68.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math68.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math68.xsl b/test/tests/conf/math/math68.xsl
new file mode 100644
index 0000000..b9e8954
--- /dev/null
+++ b/test/tests/conf/math/math68.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH68 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator and unary '-' on attributes of nodes whose names have hyphens. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="-n-2/@attrib --n-1/@attrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math69.xml b/test/tests/conf/math/math69.xml
new file mode 100644
index 0000000..c4b87ab
--- /dev/null
+++ b/test/tests/conf/math/math69.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n-1 attrib="9">3</n-1>
+<n-2 attrib="1">7</n-2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math69.xsl b/test/tests/conf/math/math69.xsl
new file mode 100644
index 0000000..14d3a3b
--- /dev/null
+++ b/test/tests/conf/math/math69.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH69 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of '-' operator and unary '-' outside parentheses, with values from attributes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="-(n-2/@attrib) - -(n-1/@attrib)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math70.xml b/test/tests/conf/math/math70.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math70.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math70.xsl b/test/tests/conf/math/math70.xsl
new file mode 100644
index 0000000..c7e2bc3
--- /dev/null
+++ b/test/tests/conf/math/math70.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH70 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator, negative divisor. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="6 div -2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math71.xml b/test/tests/conf/math/math71.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math71.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math71.xsl b/test/tests/conf/math/math71.xsl
new file mode 100644
index 0000000..73d0bdf
--- /dev/null
+++ b/test/tests/conf/math/math71.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH71 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator on two nodes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n1 div n2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math72.xml b/test/tests/conf/math/math72.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math72.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math72.xsl b/test/tests/conf/math/math72.xsl
new file mode 100644
index 0000000..816b697
--- /dev/null
+++ b/test/tests/conf/math/math72.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH72 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator on two nodes with confusing names. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="div div mod"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math73.xml b/test/tests/conf/math/math73.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math73.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math73.xsl b/test/tests/conf/math/math73.xsl
new file mode 100644
index 0000000..ba8154e
--- /dev/null
+++ b/test/tests/conf/math/math73.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH73 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator on two attributes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n1/@attrib div n2/@attrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math74.xml b/test/tests/conf/math/math74.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math74.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math74.xsl b/test/tests/conf/math/math74.xsl
new file mode 100644
index 0000000..0e611b3
--- /dev/null
+++ b/test/tests/conf/math/math74.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH74 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator on attributes of nodes with confusing names. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="div/@attrib div mod/@attrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math75.xml b/test/tests/conf/math/math75.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math75.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math75.xsl b/test/tests/conf/math/math75.xsl
new file mode 100644
index 0000000..2694cb5
--- /dev/null
+++ b/test/tests/conf/math/math75.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH75 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator with -0 as divisor. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1 div -0 = 2 div -0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math76.xml b/test/tests/conf/math/math76.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math76.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math76.xsl b/test/tests/conf/math/math76.xsl
new file mode 100644
index 0000000..e60a298
--- /dev/null
+++ b/test/tests/conf/math/math76.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH76 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator, comparing 0 and -0 as divisors. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="1 div -0 = 1 div 0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math77.xml b/test/tests/conf/math/math77.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math77.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math77.xsl b/test/tests/conf/math/math77.xsl
new file mode 100644
index 0000000..c6722f3
--- /dev/null
+++ b/test/tests/conf/math/math77.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH77 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator with 0 on both sides. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="0 div 0 >= 0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math78.xml b/test/tests/conf/math/math78.xml
new file mode 100644
index 0000000..15534e9
--- /dev/null
+++ b/test/tests/conf/math/math78.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">6</n1>
+<n2 attrib="5">3</n2>
+<div attrib="20">9</div>
+<mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math78.xsl b/test/tests/conf/math/math78.xsl
new file mode 100644
index 0000000..f02e6ba
--- /dev/null
+++ b/test/tests/conf/math/math78.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH78 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'div' operator and less-than. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="0 div 0 &#60; 0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math79.xml b/test/tests/conf/math/math79.xml
new file mode 100644
index 0000000..9b6ef73
--- /dev/null
+++ b/test/tests/conf/math/math79.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">5</n1>
+<n2 attrib="4">2</n2>
+<div attrib="-5">-5</div>
+<mod attrib="-2">2</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math79.xsl b/test/tests/conf/math/math79.xsl
new file mode 100644
index 0000000..c553423
--- /dev/null
+++ b/test/tests/conf/math/math79.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH79 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'mod' operator on two nodes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n1 mod n2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math80.xml b/test/tests/conf/math/math80.xml
new file mode 100644
index 0000000..9b6ef73
--- /dev/null
+++ b/test/tests/conf/math/math80.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">5</n1>
+<n2 attrib="4">2</n2>
+<div attrib="-5">-5</div>
+<mod attrib="-2">2</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math80.xsl b/test/tests/conf/math/math80.xsl
new file mode 100644
index 0000000..97ca3cc
--- /dev/null
+++ b/test/tests/conf/math/math80.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH80 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'mod' operator on two nodes with confusing names. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="div mod mod"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math81.xml b/test/tests/conf/math/math81.xml
new file mode 100644
index 0000000..9b6ef73
--- /dev/null
+++ b/test/tests/conf/math/math81.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">5</n1>
+<n2 attrib="4">2</n2>
+<div attrib="-5">-5</div>
+<mod attrib="-2">2</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math81.xsl b/test/tests/conf/math/math81.xsl
new file mode 100644
index 0000000..dbdd53c
--- /dev/null
+++ b/test/tests/conf/math/math81.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH81 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'mod' operator on two attributes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n1/@attrib mod n2/@attrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math82.xml b/test/tests/conf/math/math82.xml
new file mode 100644
index 0000000..9b6ef73
--- /dev/null
+++ b/test/tests/conf/math/math82.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">5</n1>
+<n2 attrib="4">2</n2>
+<div attrib="-5">-5</div>
+<mod attrib="-2">2</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math82.xsl b/test/tests/conf/math/math82.xsl
new file mode 100644
index 0000000..be935bf
--- /dev/null
+++ b/test/tests/conf/math/math82.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH82 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'mod' operator on attributes of nodes with confusing names. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="div/@attrib mod mod/@attrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math83.xml b/test/tests/conf/math/math83.xml
new file mode 100644
index 0000000..9b6ef73
--- /dev/null
+++ b/test/tests/conf/math/math83.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<n1 attrib="10">5</n1>
+<n2 attrib="4">2</n2>
+<div attrib="-5">-5</div>
+<mod attrib="-2">2</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math83.xsl b/test/tests/conf/math/math83.xsl
new file mode 100644
index 0000000..7fef49f
--- /dev/null
+++ b/test/tests/conf/math/math83.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATH83 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 3.5 -->
+  <!-- Purpose: Test of 'mod' operator on positive and negative operands. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(5 mod 2 = 1) and (5 mod -2 = 1) and (-5 mod 2 = -1) and (-5 mod -2 = -1)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math84.xml b/test/tests/conf/math/math84.xml
new file mode 100644
index 0000000..d5053a3
--- /dev/null
+++ b/test/tests/conf/math/math84.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<av>
+<a>
+<b>1</b>
+<h>8</h>
+<d>1</d>
+<e>1</e>
+</a>
+<v>
+<w>1</w>
+<h>7</h>
+<y>1</y>
+<z>1</z>
+</v>
+</av>
+</doc>
diff --git a/test/tests/conf/math/math84.xsl b/test/tests/conf/math/math84.xsl
new file mode 100644
index 0000000..ec5365d
--- /dev/null
+++ b/test/tests/conf/math/math84.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math84 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.4 Number Functions-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of sum(). -->
+
+<xsl:template match="doc">
+  <out><xsl:text>&#10;</xsl:text>
+    <xsl:variable name="rtf" select="av//h"/>
+	<xsl:copy-of select="$rtf"/><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="sum($rtf)"/><xsl:text>&#10;</xsl:text>
+	<xsl:value-of select="$rtf"/><xsl:text>&#10;</xsl:text>
+  </out>
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math85.xml b/test/tests/conf/math/math85.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math85.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math85.xsl b/test/tests/conf/math/math85.xsl
new file mode 100644
index 0000000..f31a4b3
--- /dev/null
+++ b/test/tests/conf/math/math85.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math85 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of nesting of parentheses. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="((((((n3+5)*(3)+(((n2)+2)*(n1 - 6)))-(n4 - n2))+(-(4-6)))))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math86.xml b/test/tests/conf/math/math86.xml
new file mode 100644
index 0000000..2ff93f2
--- /dev/null
+++ b/test/tests/conf/math/math86.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <n5>5</n5>
+  <n6>6</n6>
+  <n7>7</n7>
+  <n8>.125</n8>
+  <n9>.5</n9>
+  <n10>.2</n10>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math86.xsl b/test/tests/conf/math/math86.xsl
new file mode 100644
index 0000000..65d630f
--- /dev/null
+++ b/test/tests/conf/math/math86.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math86 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of repeated use of * to multiply. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n1*n2*n3*n4"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="n1*n2*n3*n4*n5*n6*n7*n8*n9*n10"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math87.xml b/test/tests/conf/math/math87.xml
new file mode 100644
index 0000000..4a759f8
--- /dev/null
+++ b/test/tests/conf/math/math87.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>1440</n0>
+  <n1>2</n1>
+  <n2>2</n2>
+  <n3>6</n3>
+  <n4>10</n4>
+  <n5>3</n5>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math87.xsl b/test/tests/conf/math/math87.xsl
new file mode 100644
index 0000000..9908663
--- /dev/null
+++ b/test/tests/conf/math/math87.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math87 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of repeated division. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="n0 div n1 div n2 div n3"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="n0 div n1 div n2 div n3 div n4"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="n0 div n1 div n2 div n3 div n4 div n5"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math88.xml b/test/tests/conf/math/math88.xml
new file mode 100644
index 0000000..ddc741c
--- /dev/null
+++ b/test/tests/conf/math/math88.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <n5>5</n5>
+  <n6>6</n6>
+  <n7>2</n7>
+  <n8>6</n8>
+  <n9>10</n9>
+  <n10>3</n10>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math88.xsl b/test/tests/conf/math/math88.xsl
new file mode 100644
index 0000000..d06b7b6
--- /dev/null
+++ b/test/tests/conf/math/math88.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math88 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Mini stress of x-way multiply and divide. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(n1*n2*n3*n4*n5*n6)div n7 div n8 div n9 div n10"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math89.xml b/test/tests/conf/math/math89.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math89.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math89.xsl b/test/tests/conf/math/math89.xsl
new file mode 100644
index 0000000..f826a42
--- /dev/null
+++ b/test/tests/conf/math/math89.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math89 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that NaN propagates through + and parentheses. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(2 + number('xxx'))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math90.xml b/test/tests/conf/math/math90.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math90.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math90.xsl b/test/tests/conf/math/math90.xsl
new file mode 100644
index 0000000..755920f
--- /dev/null
+++ b/test/tests/conf/math/math90.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math90 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that NaN propagates through * and unary -. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2 * -number('xxx')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math91.xml b/test/tests/conf/math/math91.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math91.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math91.xsl b/test/tests/conf/math/math91.xsl
new file mode 100644
index 0000000..ad7d698
--- /dev/null
+++ b/test/tests/conf/math/math91.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math91 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that NaN propagates through subtraction. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2 - number('xxx')"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="number('xxx') - 10"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math92.xml b/test/tests/conf/math/math92.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math92.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math92.xsl b/test/tests/conf/math/math92.xsl
new file mode 100644
index 0000000..3e2e155
--- /dev/null
+++ b/test/tests/conf/math/math92.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math92 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that NaN propagates through div. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2 div number('xxx')"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="number('xxx') div 3"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math93.xml b/test/tests/conf/math/math93.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math93.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math93.xsl b/test/tests/conf/math/math93.xsl
new file mode 100644
index 0000000..b500700
--- /dev/null
+++ b/test/tests/conf/math/math93.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math93 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that NaN propagates through mod. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="2 mod number('xxx')"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="number('xxx') mod 3"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math94.xml b/test/tests/conf/math/math94.xml
new file mode 100644
index 0000000..5f9cfa6
--- /dev/null
+++ b/test/tests/conf/math/math94.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math94.xsl b/test/tests/conf/math/math94.xsl
new file mode 100644
index 0000000..dd6f1f3
--- /dev/null
+++ b/test/tests/conf/math/math94.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math94 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that NaN propagates through the numeric functions. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="floor(number('xxx'))"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="ceiling(number('xxx'))"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="round(number('xxx'))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math95.xml b/test/tests/conf/math/math95.xml
new file mode 100644
index 0000000..59560ef
--- /dev/null
+++ b/test/tests/conf/math/math95.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <e>1</e>
+  <e>2</e>
+  <e>3</e>
+  <e>4</e>
+  <e>five</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math95.xsl b/test/tests/conf/math/math95.xsl
new file mode 100644
index 0000000..050f836
--- /dev/null
+++ b/test/tests/conf/math/math95.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math95 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of sum() with non-number. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="sum(e)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math96.xml b/test/tests/conf/math/math96.xml
new file mode 100644
index 0000000..28cbea6
--- /dev/null
+++ b/test/tests/conf/math/math96.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <e>17</e>
+  <e>-5</e>
+  <e>8</e>
+  <e>-37</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math96.xsl b/test/tests/conf/math/math96.xsl
new file mode 100644
index 0000000..96670a3
--- /dev/null
+++ b/test/tests/conf/math/math96.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math96 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of sum() with unary - in some nodes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="sum(e)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math97.xml b/test/tests/conf/math/math97.xml
new file mode 100644
index 0000000..62e6932
--- /dev/null
+++ b/test/tests/conf/math/math97.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <n5>5</n5>
+  <n6>6</n6>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math97.xsl b/test/tests/conf/math/math97.xsl
new file mode 100644
index 0000000..add2767
--- /dev/null
+++ b/test/tests/conf/math/math97.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math97 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of repeated use of +. -->
+
+<xsl:variable name="anum" select="10"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="10+5+25+20+15+50+35+40"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="2+n5+7+n3"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="n2+3+$anum+7+n5"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math98.xml b/test/tests/conf/math/math98.xml
new file mode 100644
index 0000000..62e6932
--- /dev/null
+++ b/test/tests/conf/math/math98.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <n5>5</n5>
+  <n6>6</n6>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math98.xsl b/test/tests/conf/math/math98.xsl
new file mode 100644
index 0000000..7114af8
--- /dev/null
+++ b/test/tests/conf/math/math98.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math98 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of repeated use of -. Space away from - when required. -->
+
+<xsl:variable name="anum" select="10"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="100-9-7-4-17-18-5"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="100-n6 -4-n1 -1-11"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="100-$anum -5-15-$anum"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/math/math99.xml b/test/tests/conf/math/math99.xml
new file mode 100644
index 0000000..62e6932
--- /dev/null
+++ b/test/tests/conf/math/math99.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <n0>0</n0>
+  <n1>1</n1>
+  <n2>2</n2>
+  <n3>3</n3>
+  <n4>4</n4>
+  <n5>5</n5>
+  <n6>6</n6>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/math/math99.xsl b/test/tests/conf/math/math99.xsl
new file mode 100644
index 0000000..a6f8bb3
--- /dev/null
+++ b/test/tests/conf/math/math99.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: math99 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that * has precedence over + and -. -->
+
+<xsl:variable name="anum" select="10"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="3*2+5*4-4*2-1"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="n6*5-8*n2+5*2"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="$anum*5-4*n2+n6*n1 -n3*3"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/compu.xml b/test/tests/conf/mdocs/compu.xml
new file mode 100644
index 0000000..5b07912
--- /dev/null
+++ b/test/tests/conf/mdocs/compu.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- DOCTYPE market.participant SYSTEM "urn:x-veosystems:dtd:cbl:1.1:markpart:1.0" -->
+
+<market.participant>
+<business.identity.group>
+  <business.name>CompUSA Inc.</business.name>
+</business.identity.group>
+	
+<address.set>
+<address.physical>
+  <location.in.street>14951</location.in.street>
+  <street>N. Dallas Pkwy</street>
+  <city>Dallas</city>
+  <country.subentity>TX</country.subentity>
+  <postcode>75240</postcode>
+</address.physical>
+<telephone>
+  <telephone.number>1-800-666-2000</telephone.number>
+</telephone>
+</address.set>
+
+</market.participant>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/doc01.xsl b/test/tests/conf/mdocs/doc01.xsl
new file mode 100644
index 0000000..3fee0c0
--- /dev/null
+++ b/test/tests/conf/mdocs/doc01.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!--Test for Multiple Input documents.-->
+
+<xsl:template match="doc">
+    <out>
+       <xsl:apply-templates select="@test"/>
+    </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs01.xml b/test/tests/conf/mdocs/mdocs01.xml
new file mode 100644
index 0000000..92f82f2
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<defaultcontent>
+	<section1/>
+	<section2/>
+</defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs01.xsl b/test/tests/conf/mdocs/mdocs01.xsl
new file mode 100644
index 0000000..4b30d20
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs01.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test document() function: Provides multiple input 
+       sources. One argument: string. -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates select="document('mdocs01a.xml')//body">
+      <xsl:with-param name="arg1">ok</xsl:with-param>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="body">
+  <xsl:param name="arg1">not ok</xsl:param>
+  <xsl:value-of select="$arg1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs01a.xml b/test/tests/conf/mdocs/mdocs01a.xml
new file mode 100644
index 0000000..9e2fb40
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs01a.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<body/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs02.xml b/test/tests/conf/mdocs/mdocs02.xml
new file mode 100644
index 0000000..d8d95f8
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs02.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <places>mdocs02a.xml</places>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs02.xsl b/test/tests/conf/mdocs/mdocs02.xsl
new file mode 100644
index 0000000..b903823
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test nesting of document() function. -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:copy-of select="document(document(places))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs02a.xml b/test/tests/conf/mdocs/mdocs02a.xml
new file mode 100644
index 0000000..e72ed06
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs02a.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<jump>mdocs02b.xml</jump>
diff --git a/test/tests/conf/mdocs/mdocs02b.xml b/test/tests/conf/mdocs/mdocs02b.xml
new file mode 100644
index 0000000..a7aca6d
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs02b.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<outer>
+  <body>GoodBye</body>
+</outer>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs03.xml b/test/tests/conf/mdocs/mdocs03.xml
new file mode 100644
index 0000000..343d73f
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs03.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<doc>
+<defaultcontent>
+	<section>1</section>
+	<section>2</section>
+	<section>3</section>
+	<section>4</section>
+	<section>5</section>
+	<section>6</section>
+</defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs03.xsl b/test/tests/conf/mdocs/mdocs03.xsl
new file mode 100644
index 0000000..f00d6df
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs03.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test document() function: Provides multiple input 
+       sources. Two arguments: string, node-set. -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:copy-of select="document('mdocs03a.xml',section)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs03a.xml b/test/tests/conf/mdocs/mdocs03a.xml
new file mode 100644
index 0000000..9e2fb40
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs03a.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<body/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs04.xml b/test/tests/conf/mdocs/mdocs04.xml
new file mode 100644
index 0000000..1b85f17
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs04.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<defaultcontent>
+	<places>mdocs04a.xml</places>
+	<places>mdocs04b.xml</places>
+</defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs04.xsl b/test/tests/conf/mdocs/mdocs04.xsl
new file mode 100644
index 0000000..e1cefe8
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs04.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test document() function with one argument: node-set. -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:copy-of select="document(places)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs04a.xml b/test/tests/conf/mdocs/mdocs04a.xml
new file mode 100644
index 0000000..013eb2c
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs04a.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<body>Hello</body>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs04b.xml b/test/tests/conf/mdocs/mdocs04b.xml
new file mode 100644
index 0000000..14c2b5e
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs04b.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<outer>
+	<body>GoodBye</body>
+</outer>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs05.xml b/test/tests/conf/mdocs/mdocs05.xml
new file mode 100644
index 0000000..66b9f53
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs05.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+
+<catalog>
+	<pointer>
+		<urlref urlstr="compu.xml"/>
+	</pointer>
+</catalog>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs05.xsl b/test/tests/conf/mdocs/mdocs05.xsl
new file mode 100644
index 0000000..f430510
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs05.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MDOCS05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test document() function with path following. -->
+
+<xsl:template match="catalog">
+  <out>
+    <xsl:apply-templates select="document(pointer/urlref/@urlstr)/market.participant/business.identity.group/business.name"/>
+    <xsl:apply-templates select="document('../mdocs/compu.xml')/market.participant/address.set/*"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="location.in.street">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="street">
+  <xsl:apply-templates/><xsl:text></xsl:text>
+</xsl:template>
+
+<xsl:template match="city">
+  <xsl:apply-templates/><xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="country.subentity">
+  <xsl:apply-templates/><xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="postcode">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="telephone.number">
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs06.xml b/test/tests/conf/mdocs/mdocs06.xml
new file mode 100644
index 0000000..776e53e
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs06.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<first>
+  <defaultcontent>
+    <second/>
+    <places>mdocs06a.xml</places>
+    <places>mdocs06b.xml</places>
+  </defaultcontent>
+</first>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs06.xsl b/test/tests/conf/mdocs/mdocs06.xsl
new file mode 100644
index 0000000..61fcb61
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs06.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MDocs06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test document() function with two arguments: node-set, node-set. -->
+
+<xsl:template match="first"><!-- Document node of file passed to processor -->
+  <out>
+    <xsl:apply-templates/><!-- Should get defaultcontent element -->
+  </out>
+</xsl:template>
+
+<xsl:template match="defaultcontent"><!-- contains places and second -->
+  <!-- Two 'places' elements contain names of the other two files as text. -->
+  <xsl:apply-templates select="document(places,second)/*">
+    <xsl:with-param name="arg1" select="'top'" />
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="doc"><!-- Document node of file A -->
+  <xsl:param name="arg1">doc-start</xsl:param>
+  <xsl:value-of select="$arg1"/>
+  <xsl:text>, Done with doc
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="outer"><!-- Document node of file B -->
+  <xsl:param name="arg1">outer-start</xsl:param>
+  <xsl:value-of select="$arg1"/>
+  <xsl:text>, Done with outer</xsl:text>
+</xsl:template>
+
+<xsl:template match="body"><!-- Other two files have body elements, but no apply goes here -->
+  <xsl:param name="arg1">problem</xsl:param>
+  <xsl:value-of select="$arg1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs06a.xml b/test/tests/conf/mdocs/mdocs06a.xml
new file mode 100644
index 0000000..840ae6a
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs06a.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <body>Shirt</body>
+  <body>Overt</body>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs06b.xml b/test/tests/conf/mdocs/mdocs06b.xml
new file mode 100644
index 0000000..7ec3d4c
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs06b.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<outer>
+  <body>Tie</body>
+  <body>Sly</body>
+</outer>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs07.xml b/test/tests/conf/mdocs/mdocs07.xml
new file mode 100644
index 0000000..b029e21
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs07.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a/>
+<a>mdocs04a.xml</a>	<!-- Hello -->
+<a>mdocs04a.xml</a>
+<a>mdocs04a.xml</a>
+<a>mdocs04a.xml</a>
+<a>mdocs06a.xml</a>	<!-- Shirt, Overt -->
+<a>mdocs06a.xml</a>
+<a>mdocs06a.xml</a>
+<a>mdocs06a.xml</a>
+<a>mdocs04a.xml</a>
+<a>mdocs04a.xml</a>
+<a>mdocs04a.xml</a>
+<a>mdocs04a.xml</a>
+<v/>
+<a>mdocs04b.xml</a>	<!-- Good Bye -->
+<a>mdocs04b.xml</a>
+<a>mdocs04b.xml</a>
+<a>mdocs04b.xml</a>
+<a>mdocs06b.xml</a>	<!-- Tie, Sly -->
+<a>mdocs06b.xml</a>
+<a>mdocs06b.xml</a>
+<a>mdocs06b.xml</a>
+<a>mdocs04b.xml</a>
+<a>mdocs04b.xml</a>
+<a>mdocs04b.xml</a>
+<a>mdocs04b.xml</a>
+<x/>
+<y/>
+<z/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs07.xsl b/test/tests/conf/mdocs/mdocs07.xsl
new file mode 100644
index 0000000..b1b30a1
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs07.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test document() function: Mini Stress test. The many 'a' elements
+     contain repeats of the file names. Union should not contain duplicate nodes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:copy-of select="document(a)//body"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs08.xml b/test/tests/conf/mdocs/mdocs08.xml
new file mode 100644
index 0000000..1b85f17
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs08.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<defaultcontent>
+	<places>mdocs04a.xml</places>
+	<places>mdocs04b.xml</places>
+</defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs08.xsl b/test/tests/conf/mdocs/mdocs08.xsl
new file mode 100644
index 0000000..aeda8d0
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs08.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test document() function: Generating nodeset based on 
+       ancestors of document() union. -->
+
+<xsl:template match="defaultcontent">
+  <!-- Two 'places' elements contain names of the other two files as text. -->
+  <out>
+    <xsl:apply-templates select="document(places)//body">
+      <xsl:with-param name="arg1">ok</xsl:with-param>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="body">
+  <xsl:param name="arg1">not ok</xsl:param>
+  1 <xsl:value-of select="."/><xsl:text> </xsl:text>
+  2 <xsl:value-of select="$arg1"/>
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs09.xml b/test/tests/conf/mdocs/mdocs09.xml
new file mode 100644
index 0000000..a247f32
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs09.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" ?>
+<doc>
+  <test>ERROR</test>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs09.xsl b/test/tests/conf/mdocs/mdocs09.xsl
new file mode 100644
index 0000000..ae150a4
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs09.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="ped.com"
+                xmlns:bdd="bdd.com"
+                exclude-result-prefixes="xsl ped bdd">
+
+  <!-- FileName: MDocs09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test that document("") refers to the root node of the stylesheet. -->
+  <!-- Remember: every top-level node in the stylesheet must have a namespace. -->
+
+<xsl:template match="doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:copy-of select='document("")/xsl:stylesheet/ped:test[@attrib="yeha"]'/><xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+<ped:test attrib="yeha">YEE-HA</ped:test>
+<ped:test attrib="haye">Test2</ped:test>
+<bdd:test>Test3</bdd:test>
+<bdd:test>Test4</bdd:test>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs10.xml b/test/tests/conf/mdocs/mdocs10.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs10.xsl b/test/tests/conf/mdocs/mdocs10.xsl
new file mode 100644
index 0000000..9d6784e
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs10.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test document() function with local file specification. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:copy-of select='document("../impincl-test/mdocstest.xml")//b'/><xsl:text>
+</xsl:text>
+    <xsl:copy-of select='document("../impincl-test/mdocstest.xml")//a'/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs10a.xml b/test/tests/conf/mdocs/mdocs10a.xml
new file mode 100644
index 0000000..9f083f2
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs10a.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"  encoding="windows-1250"?>
+
+<struktura>
+        <oblast id="1">
+                <obsah image="http://notarkom.corpus.cz/pic/evidence.gif">
+                        <b>Centrální&amp;nbsp;evidence</b>
+                </obsah>
+                <oblast id="komory" href="komory.sqw">
+                        <obsah image="http://notarkom.corpus.cz/pic/komory.gif" active="http://notarkom.corpus.cz/pic/komory_a.gif" width="150" height="22">
+                                <div>Notáøské&amp;nbsp;komory</div>
+                        </obsah>
+                </oblast>
+                <oblast id="newkom" href="komory.sqw" align="right">
+								<obsah image="http://notarkom.corpus.cz/pic/nkomora.gif" active="http://notarkom.corpus.cz/pic/nkomora_a.gif" width="150" height="22">
+							        <font size="-1">Nová komora</font>
+								</obsah>
+					 </oblast>
+			       <oblast id="updkom" href="komory.sqw" align="right" param="1" required="id_komora">
+ 								<obsah image="http://notarkom.corpus.cz/pic/opravau.gif" active="http://notarkom.corpus.cz/pic/opravau_a.gif" disabled="http://notarkom.corpus.cz/pic/opravau_n.gif" width="150" height="22">
+							        <font size="-1">Oprava údajù</font>
+ 				  		 	   </obsah>
+					 </oblast>
+                <oblast id="notari" href="notar.sqw">
+                        <obsah image="http://notarkom.corpus.cz/pic/seznam.gif" active="http://notarkom.corpus.cz/pic/seznam_a.gif" width="150" height="22">
+                                <div>Seznam&amp;nbsp;notáøù</div>
+                        </obsah>
+                </oblast>
+                <oblast id="newnot" href="notar.sqw" align="right">
+                        <obsah image="http://notarkom.corpus.cz/pic/nnotar.gif" active="http://notarkom.corpus.cz/pic/nnotar_a.gif" width="150" height="22">
+                                <font size="-1">Nový notáø</font>
+                        </obsah>
+                </oblast>
+			       <oblast id="not" href="notar.sqw" param="1" required="id_osoba">
+ 								<obsah image="http://notarkom.corpus.cz/pic/inotar.gif" active="http://notarkom.corpus.cz/pic/inotar_a.gif" disabled="http://notarkom.corpus.cz/pic/inotar_n.gif" width="150" height="22">
+							        <div>Informace&amp;nbsp;o&amp;nbsp;notáøi</div>
+ 				  		 	   </obsah>
+					 </oblast>
+<!--			       <oblast id="updnot" align="right" param="1">
+ 								<obsah>
+							        <font size="-1">Oprava údajù</font>
+ 				  		 	   </obsah>
+					 </oblast>
+-->
+<!--                <oblast id="usch" href="uschova.sqw" param="1" required="id_osoba">
+                        <obsah>
+                                <div>Notáøské&amp;nbsp;úschovy</div>
+                        </obsah>
+                </oblast>
+-->
+                <oblast id="priusch" href="uschova.sqw" align="right" param="1" required="id_osoba">
+                        <obsah image="http://notarkom.corpus.cz/pic/zuschovy.gif" active="http://notarkom.corpus.cz/pic/zuschovy_a.gif" disabled="http://notarkom.corpus.cz/pic/zuschovy_n.gif" width="150" height="22">
+                                <font size="-1">Živé úschovy</font>
+                        </obsah>
+                </oblast>
+                <oblast id="vyusch" href="uschova.sqw" align="right" param="1" required="id_osoba">
+                        <obsah image="http://notarkom.corpus.cz/pic/kuschovy.gif" active="http://notarkom.corpus.cz/pic/kuschovy_a.gif" disabled="http://notarkom.corpus.cz/pic/kuschovy_n.gif" width="150" height="22">
+                                <font size="-1">Ukonèené úschovy</font>
+                        </obsah>
+                </oblast>
+                <oblast id="newusch" href="uschova.sqw" align="right" param="1" required="id_osoba">
+                        <obsah image="http://notarkom.corpus.cz/pic/nuschova.gif" active="http://notarkom.corpus.cz/pic/nuschova_a.gif" disabled="http://notarkom.corpus.cz/pic/nuschova_n.gif" width="150" height="22">
+                                <font size="-1">Nová&amp;nbsp;úschova</font>
+                        </obsah>
+                </oblast>
+                <oblast id="vytisk" href="vytisk.sqw" target="_blank" align="right" param="1">
+                        <obsah image="http://notarkom.corpus.cz/pic/vytisk.gif" width="150" height="22">
+                                <font size="-1">Kontrolní&amp;nbsp;výtisk</font>
+                        </obsah>
+                </oblast>
+		<oblast id="konf" href="konference.sqw" param="1">
+			<obsah image="http://notarkom.corpus.cz/pic/konference.gif" active="http://notarkom.corpus.cz/pic/konference_a.gif" width="150" height="22">
+				<div>Notáøské konference</div>
+			</obsah>
+		</oblast>
+		<oblast id="newkonf" align="right" href="konference.sqw" param="1">
+			<obsah image="http://notarkom.corpus.cz/pic/nkonference.gif" active="http://notarkom.corpus.cz/pic/nkonference_a.gif" width="150" height="22">
+				<font size="-1">Nová konference</font>
+			</obsah>
+		</oblast>
+		<oblast id="prispevky" align="right" href="konference.sqw" param="1" required="id_konference">
+			<obsah image="http://notarkom.corpus.cz/pic/prispevky.gif" active="http://notarkom.corpus.cz/pic/prispevky_a.gif" disabled="http://notarkom.corpus.cz/pic/prispevky_n.gif" width="150" height="22">
+				<font size="-1">Pøíspìvky</font>
+			</obsah>
+		</oblast>
+		<oblast id="akcie" align="right" href="akcie.sqw" param="1">
+			<obsah image="http://notarkom.corpus.cz/pic/akcie.gif" active="http://notarkom.corpus.cz/pic/akcie_a.gif" width="150" height="22">
+				<font size="-1">Oceòování akcií</font>
+			</obsah>
+		</oblast>
+		<oblast id="home" href="http://www.cisnk.cz/">
+			<obsah image="http://notarkom.corpus.cz/pic/homepage.gif" width="150" height="22">
+				<font color="blue" size="-1">Hlavní strana</font>
+			</obsah>
+		</oblast>
+        </oblast>
+</struktura>
diff --git a/test/tests/conf/mdocs/mdocs11.xml b/test/tests/conf/mdocs/mdocs11.xml
new file mode 100644
index 0000000..628fd87
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs11.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs11.xsl b/test/tests/conf/mdocs/mdocs11.xsl
new file mode 100644
index 0000000..0b2d438
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs11.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MDocs11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check that position() counts nodes in external document. -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates select="document('../impincl-test/mdocs11a.xml')//body"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="body">
+  <xsl:text>Width of body </xsl:text>
+  <xsl:value-of select="position()"/>
+  <xsl:text> is </xsl:text>
+  <xsl:value-of select="@width"/>
+  <xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs12.xml b/test/tests/conf/mdocs/mdocs12.xml
new file mode 100644
index 0000000..a247f32
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs12.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" ?>
+<doc>
+  <test>ERROR</test>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs12.xsl b/test/tests/conf/mdocs/mdocs12.xsl
new file mode 100644
index 0000000..ee61ea7
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs12.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="ped.com"
+                exclude-result-prefixes="xsl ped">
+
+  <!-- FileName: mdocs12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: When document('') refers to the root node of the stylesheet,
+     it means the current file, not the main stylesheet. In this test, the call to
+     document() is in the included stylesheet, hence local to it. -->
+  <!-- Remember: every top-level node in the stylesheet must have a namespace. -->
+
+<xsl:include href="xincmdocs12.xsl"/>
+
+<xsl:template match="doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates/><xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+<ped:test attrib="yeha">Oops</ped:test>
+<ped:test attrib="haye">Wrong item from main</ped:test>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs13.xml b/test/tests/conf/mdocs/mdocs13.xml
new file mode 100644
index 0000000..a247f32
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" ?>
+<doc>
+  <test>ERROR</test>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs13.xsl b/test/tests/conf/mdocs/mdocs13.xsl
new file mode 100644
index 0000000..e99114d
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs13.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="ped.com"
+                exclude-result-prefixes="xsl ped">
+
+  <!-- FileName: mdocs13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: When document('') refers to the root node of the stylesheet,
+     it means the current file, not the main stylesheet. In this test, the call to
+     document() is in the imported stylesheet, hence local to it. -->
+  <!-- Remember: every top-level node in the stylesheet must have a namespace. -->
+
+<xsl:import href="ximpmdocs13.xsl"/>
+
+<xsl:template match="doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates/><xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+<ped:test attrib="yeha">Oops</ped:test>
+<ped:test attrib="haye">Wrong item from main</ped:test>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs14.xml b/test/tests/conf/mdocs/mdocs14.xml
new file mode 100644
index 0000000..bb89ecc
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs14.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<table>
+  <foo><b>zzz</b></foo>
+</table>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs14.xsl b/test/tests/conf/mdocs/mdocs14.xsl
new file mode 100644
index 0000000..a3a8331
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs14.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Author: Jeni Tennison -->
+  <!-- Purpose: Use document() to perform an include-like operation between two files.
+     At the conformance level, this shows that we can put the node-set from document()
+     into a variable, then reference where a node-set is required. -->
+
+<xsl:output method="xml"/>
+<xsl:variable name="xml-source" select="/" />
+<xsl:variable name="html-template" select="document('x14template.html')" />
+
+<xsl:template match="/">
+  <xsl:apply-templates select="$html-template" mode="copy" />
+</xsl:template>
+
+<xsl:template match="*" mode="copy">
+  <xsl:copy>
+    <xsl:copy-of select="@*" />
+    <xsl:apply-templates mode="copy" />
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="xml-content" mode="copy">
+  <xsl:text>XML</xsl:text><xsl:apply-templates select="$xml-source" mode="copy"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs15.xml b/test/tests/conf/mdocs/mdocs15.xml
new file mode 100644
index 0000000..b810c66
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs15.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section>1</section>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs15.xsl b/test/tests/conf/mdocs/mdocs15.xsl
new file mode 100644
index 0000000..0766aea
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs15.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test / as second argument to document().
+      Two arguments: string variable, node-set. -->
+
+<xsl:variable name="typefile" select="'mdocs15a.xml'" />
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:copy-of select="document($typefile,/)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs15a.xml b/test/tests/conf/mdocs/mdocs15a.xml
new file mode 100644
index 0000000..c9a04e7
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs15a.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <body/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs16.xml b/test/tests/conf/mdocs/mdocs16.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs16.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs16.xsl b/test/tests/conf/mdocs/mdocs16.xsl
new file mode 100644
index 0000000..1a6aeae
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs16.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <!-- FileName: mdocsXXX -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 -->
+  <!-- Purpose: Compare two evaluation sequences for variable containing
+    node-set returned from document() call. -->
+  <!-- Author: Norm Walsh -->
+
+<xsl:output method="xml" indent="yes"/>
+
+<xsl:param name="terms" select="document('terms.xml')"/>
+
+<xsl:template match="/">
+<out>
+  <xsl:call-template name="gentext">
+    <xsl:with-param name="key" select="'TableofContents'"/>
+    <xsl:with-param name="lang" select="'en'"/>
+  </xsl:call-template>
+</out>
+</xsl:template>
+
+<xsl:template name="gentext">
+  <xsl:param name="key" select="local-name(.)"/>
+  <xsl:param name="lang" select="FOO"/>
+  <xsl:variable name="lookup"
+    select="($terms/table/expand[@language=$lang]/gentext[@key=$key])[1]"/>
+  <xsl:variable name="l10n.name" select="$lookup/@text"/>
+  <xsl:element name="key"><xsl:value-of select="$key"/></xsl:element>
+  <xsl:element name="lang"><xsl:value-of select="$lang"/></xsl:element>
+  <xsl:element name="var"><xsl:value-of select="$l10n.name"/></xsl:element>
+  <xsl:element name="text"><xsl:value-of select="$lookup/@text"/></xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs17.xml b/test/tests/conf/mdocs/mdocs17.xml
new file mode 100644
index 0000000..148c3da
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs17.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<report>
+  <month sequence="01">
+    <miles-earned>35215</miles-earned>
+  </month>
+  <month sequence="02">
+    <miles-earned>92731</miles-earned>
+  </month>
+  <month sequence="03">
+    <miles-earned>76725</miles-earned>
+  </month>
+  <month sequence="04">
+    <miles-earned>31781</miles-earned>
+  </month>
+</report>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs17.xsl b/test/tests/conf/mdocs/mdocs17.xsl
new file mode 100644
index 0000000..132dd40
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs17.xsl
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:months="Lookup table for month names"
+                exclude-result-prefixes="months">
+
+  <!-- FileName: MDocs17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents  -->
+  <!-- Creator: Doug Tidwell, adapted by David Marston -->
+  <!-- Purpose: Use document('') to refer to the stylesheet, and have a local lookup table. -->
+
+  <months:name sequence="01">January</months:name>
+  <months:name sequence="02">February</months:name>
+  <months:name sequence="03">March</months:name>
+  <months:name sequence="04">April</months:name>
+  <months:name sequence="05">May</months:name>
+  <months:name sequence="06">June</months:name>
+  <months:name sequence="07">July</months:name>
+  <months:name sequence="08">August</months:name>
+  <months:name sequence="09">September</months:name>
+  <months:name sequence="10">October</months:name>
+  <months:name sequence="11">November</months:name>
+  <months:name sequence="12">December</months:name>
+
+<xsl:output method="xml"/>
+
+<xsl:variable name="newline">
+<xsl:text>
+</xsl:text>
+</xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="$newline"/>
+    <xsl:for-each select="/report/month">
+      <month>
+        <xsl:value-of select="document('')/xsl:stylesheet/months:name[@sequence=current()/@sequence]"/>
+        <xsl:text> - </xsl:text>
+        <xsl:value-of select="miles-earned"/>
+        <xsl:text> miles earned.</xsl:text>
+      </month>
+      <xsl:value-of select="$newline"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs18.xml b/test/tests/conf/mdocs/mdocs18.xml
new file mode 100644
index 0000000..bde966e
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs18.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <a>mdwords-a.xml</a><!-- Flirt, Skirt -->
+  <a/>
+  <a>mdwords-b.xml</a><!-- Why, Dry, Pie -->
+  <x/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs18.xsl b/test/tests/conf/mdocs/mdocs18.xsl
new file mode 100644
index 0000000..0df68de
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs18.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try sorting and numbering nodes from two other documents. -->
+  <!-- If we didn't sort, we couldn't guarantee the order in which the documents would be read. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(document(a)//body)"/><xsl:text> body nodes:
+</xsl:text>
+    <xsl:apply-templates select="document(a)//body">
+      <xsl:sort select="substring-after(.,'-')"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="body">
+  <xsl:value-of select="position()"/><xsl:text>. </xsl:text>
+  <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs19.xml b/test/tests/conf/mdocs/mdocs19.xml
new file mode 100644
index 0000000..decd870
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs19.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<defaultcontent>
+	<section>1</section>
+	<section>2</section>
+	<section>3</section>
+	<section>4</section>
+	<section>5</section>
+	<section>6</section>
+</defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdocs19.xsl b/test/tests/conf/mdocs/mdocs19.xsl
new file mode 100644
index 0000000..4c0fb32
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs19.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: mdocs19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents E14 -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E14 -->
+  <!-- Creator: Christine Li -->
+  <!-- Purpose: Test document() function: Provides multiple input sources. -->
+  <!-- Two arguments: string, node-set. The second node-set is empty -->
+  <!-- It is an error, recover by returning an empty node-set -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:copy-of select="document('mdocs19a.xml',empty)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/mdocs19a.xml b/test/tests/conf/mdocs/mdocs19a.xml
new file mode 100644
index 0000000..322bc2b
--- /dev/null
+++ b/test/tests/conf/mdocs/mdocs19a.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+	<body/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdwords-a.xml b/test/tests/conf/mdocs/mdwords-a.xml
new file mode 100644
index 0000000..3bd7547
--- /dev/null
+++ b/test/tests/conf/mdocs/mdwords-a.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <body>A-Flirt</body>
+  <body>A-Skirt</body>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/mdwords-b.xml b/test/tests/conf/mdocs/mdwords-b.xml
new file mode 100644
index 0000000..357025e
--- /dev/null
+++ b/test/tests/conf/mdocs/mdwords-b.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<outer>
+  <body>B-Why</body>
+  <body>B-Dry</body>
+  <body>B-Pie</body>
+</outer>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/terms.xml b/test/tests/conf/mdocs/terms.xml
new file mode 100644
index 0000000..20212db
--- /dev/null
+++ b/test/tests/conf/mdocs/terms.xml
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<table>
+  <!-- FileName: terms.xml -->
+  <!-- Purpose: To be referenced by tests such as mdocs16 -->
+<expand>
+  <gentext key="TableofContents" text="TOC"/>
+  <gentext key="tableofcontents" text="TOC"/>
+</expand>
+<expand language="en">
+  <gentext key="Abstract" text="Abstract"/>
+  <gentext key="abstract" text="Abstract"/>
+  <gentext key="Bibliography" text="Bibliography"/>
+  <gentext key="bibliography" text="Bibliography"/>
+  <gentext key="Book" text="Book"/>
+  <gentext key="book" text="Book"/>
+  <gentext key="Chapter" text="Chapter"/>
+  <gentext key="Figure" text="Figure"/>
+  <gentext key="figure" text="Figure"/>
+  <gentext key="Index" text="Index"/>
+  <gentext key="index" text="Index"/>
+  <gentext key="LegalNotice" text="Legal Notice"/>
+  <gentext key="legalnotice" text="Legal Notice"/>
+  <gentext key="Preface" text="Preface"/>
+  <gentext key="preface" text="Preface"/>
+  <gentext key="Section" text="Section"/>
+  <gentext key="Table" text="Table"/>
+  <gentext key="table" text="Table"/>
+  <gentext key="chapter" text="chapter"/>
+  <gentext key="section" text="Section"/>
+  <gentext key="TableofContents" text="Table of Contents"/>
+  <gentext key="tableofcontents" text="Table of Contents"/>
+</expand>
+<expand language="FOO">
+  <gentext key="TableofContents" text="Tableaux du Content"/>
+  <gentext key="tableofcontents" text="Tableaux du Content"/>
+</expand>
+</table>
+
diff --git a/test/tests/conf/mdocs/x14template.html b/test/tests/conf/mdocs/x14template.html
new file mode 100644
index 0000000..bbff87a
--- /dev/null
+++ b/test/tests/conf/mdocs/x14template.html
@@ -0,0 +1,9 @@
+<html>
+  <body>
+    <table>
+      <tr><td>xxx</td></tr>
+      <tr><td><xml-content/></td></tr>
+      <tr><td>xxx</td></tr>
+    </table>
+  </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/conf/mdocs/ximpmdocs13.xsl b/test/tests/conf/mdocs/ximpmdocs13.xsl
new file mode 100644
index 0000000..4ea9ae1
--- /dev/null
+++ b/test/tests/conf/mdocs/ximpmdocs13.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="ped.com"
+                exclude-result-prefixes="xsl ped">
+
+  <!-- Purpose: Imported by mdocs13 -->
+
+<xsl:template match="test">
+  <xsl:copy-of select="document('')/xsl:stylesheet/ped:test[@attrib='yeha']"/>
+</xsl:template>
+
+<ped:test attrib="yeha">YEE-HA</ped:test>
+<ped:test attrib="haye">Wrong item from sub</ped:test>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/mdocs/xincmdocs12.xsl b/test/tests/conf/mdocs/xincmdocs12.xsl
new file mode 100644
index 0000000..b81d9f2
--- /dev/null
+++ b/test/tests/conf/mdocs/xincmdocs12.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="ped.com"
+                exclude-result-prefixes="xsl ped">
+
+  <!-- Purpose: Included by mdocs12 -->
+
+<xsl:template match="test">
+  <xsl:copy-of select="document('')/xsl:stylesheet/ped:test[@attrib='yeha']"/>
+</xsl:template>
+
+<ped:test attrib="yeha">YEE-HA</ped:test>
+<ped:test attrib="haye">Wrong item from sub</ped:test>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message01.xml b/test/tests/conf/message/message01.xml
new file mode 100644
index 0000000..0877143
--- /dev/null
+++ b/test/tests/conf/message/message01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
diff --git a/test/tests/conf/message/message01.xsl b/test/tests/conf/message/message01.xsl
new file mode 100644
index 0000000..0de1945
--- /dev/null
+++ b/test/tests/conf/message/message01.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: message01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Issue a message from a literal constant, default on terminate option -->
+
+<xsl:template match="/">
+  <xsl:message>This message came from the MESSAGE01 test.</xsl:message><out/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message02.xml b/test/tests/conf/message/message02.xml
new file mode 100644
index 0000000..0877143
--- /dev/null
+++ b/test/tests/conf/message/message02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
diff --git a/test/tests/conf/message/message02.xsl b/test/tests/conf/message/message02.xsl
new file mode 100644
index 0000000..68ad3e1
--- /dev/null
+++ b/test/tests/conf/message/message02.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: message02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Issue a message from a literal constant, "no" on terminate option -->
+
+<xsl:template match="/">
+<out>
+  <xsl:message terminate="no">This message came from the MESSAGE02 test.</xsl:message>
+  If we got this far, we did not terminate.
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message03.xml b/test/tests/conf/message/message03.xml
new file mode 100644
index 0000000..1647936
--- /dev/null
+++ b/test/tests/conf/message/message03.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<docs></docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message03.xsl b/test/tests/conf/message/message03.xsl
new file mode 100644
index 0000000..97e4fa5
--- /dev/null
+++ b/test/tests/conf/message/message03.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:text inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE03</xsl:text>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message04.xml b/test/tests/conf/message/message04.xml
new file mode 100644
index 0000000..3a89cad
--- /dev/null
+++ b/test/tests/conf/message/message04.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+<a>X</a>
+<a>Y</a>
+<a>Z</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message04.xsl b/test/tests/conf/message/message04.xsl
new file mode 100644
index 0000000..a847272
--- /dev/null
+++ b/test/tests/conf/message/message04.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for-each and value-of inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE04: </xsl:text>
+      <xsl:for-each select="a">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message05.xml b/test/tests/conf/message/message05.xml
new file mode 100644
index 0000000..8e0747a
--- /dev/null
+++ b/test/tests/conf/message/message05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+  <a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message05.xsl b/test/tests/conf/message/message05.xsl
new file mode 100644
index 0000000..0420e59
--- /dev/null
+++ b/test/tests/conf/message/message05.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test if and copy-of inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE05: </xsl:text>
+      <xsl:if test="a">
+        <xsl:copy-of select="a"/>
+      </xsl:if>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message06.xml b/test/tests/conf/message/message06.xml
new file mode 100644
index 0000000..8e0747a
--- /dev/null
+++ b/test/tests/conf/message/message06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+  <a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message06.xsl b/test/tests/conf/message/message06.xsl
new file mode 100644
index 0000000..8216401
--- /dev/null
+++ b/test/tests/conf/message/message06.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Purpose: Test choose and variable inside xsl:message -->
+  <!-- Creator: David Marston -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:variable name="foo" select="'condition true'"/>
+      <xsl:variable name="tralse" select="'condition false'"/>
+      <xsl:text>Message from MESSAGE06: </xsl:text>
+      <xsl:choose>
+        <xsl:when test="a">
+          <xsl:value-of select="$foo"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$tralse"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message07.xml b/test/tests/conf/message/message07.xml
new file mode 100644
index 0000000..0943cb3
--- /dev/null
+++ b/test/tests/conf/message/message07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs><a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message07.xsl b/test/tests/conf/message/message07.xsl
new file mode 100644
index 0000000..09766dd
--- /dev/null
+++ b/test/tests/conf/message/message07.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test apply-templates inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE07: </xsl:text>
+      <xsl:apply-templates/>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message08.xml b/test/tests/conf/message/message08.xml
new file mode 100644
index 0000000..0943cb3
--- /dev/null
+++ b/test/tests/conf/message/message08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs><a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message08.xsl b/test/tests/conf/message/message08.xsl
new file mode 100644
index 0000000..65bea51
--- /dev/null
+++ b/test/tests/conf/message/message08.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test call-template inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE08: </xsl:text>
+      <xsl:call-template name="templ2"/>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+<xsl:template name="templ2">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message09.xml b/test/tests/conf/message/message09.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conf/message/message09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message09.xsl b/test/tests/conf/message/message09.xsl
new file mode 100644
index 0000000..76172bc
--- /dev/null
+++ b/test/tests/conf/message/message09.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test one xsl:message inside another -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE09: </xsl:text>
+      <xsl:message>This is a bulletin!</xsl:message>
+      <xsl:text>This is the original message</xsl:text>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message10.xml b/test/tests/conf/message/message10.xml
new file mode 100644
index 0000000..0943cb3
--- /dev/null
+++ b/test/tests/conf/message/message10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs><a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message10.xsl b/test/tests/conf/message/message10.xsl
new file mode 100644
index 0000000..41016aa
--- /dev/null
+++ b/test/tests/conf/message/message10.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:element and xsl:attribute inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE10: </xsl:text>
+      <xsl:element name="how">
+        <xsl:attribute name="when">now</xsl:attribute>
+        <xsl:value-of select="a"/>
+      </xsl:element>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message11.xml b/test/tests/conf/message/message11.xml
new file mode 100644
index 0000000..0943cb3
--- /dev/null
+++ b/test/tests/conf/message/message11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs><a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message11.xsl b/test/tests/conf/message/message11.xsl
new file mode 100644
index 0000000..91ce27f
--- /dev/null
+++ b/test/tests/conf/message/message11.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:comment inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE11: </xsl:text>
+      <xsl:comment>
+        <xsl:value-of select="a"/>
+      </xsl:comment>
+      <xsl:text>Anything between the colon and this?</xsl:text>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message12.xml b/test/tests/conf/message/message12.xml
new file mode 100644
index 0000000..0943cb3
--- /dev/null
+++ b/test/tests/conf/message/message12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs><a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message12.xsl b/test/tests/conf/message/message12.xsl
new file mode 100644
index 0000000..93f22e0
--- /dev/null
+++ b/test/tests/conf/message/message12.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:processing-instruction inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE12: </xsl:text>
+      <xsl:processing-instruction name="junk">
+        <xsl:value-of select="a"/>
+      </xsl:processing-instruction>
+      <xsl:text>Anything between the colon and this?</xsl:text>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message13.xml b/test/tests/conf/message/message13.xml
new file mode 100644
index 0000000..0943cb3
--- /dev/null
+++ b/test/tests/conf/message/message13.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs><a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message13.xsl b/test/tests/conf/message/message13.xsl
new file mode 100644
index 0000000..0b008ac
--- /dev/null
+++ b/test/tests/conf/message/message13.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:copy inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:message>
+    <xsl:text>Message from MESSAGE13: </xsl:text>
+    <xsl:copy/>
+    <xsl:text>Anything between the colon and this?</xsl:text>
+  </xsl:message>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message14.xml b/test/tests/conf/message/message14.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conf/message/message14.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message14.xsl b/test/tests/conf/message/message14.xsl
new file mode 100644
index 0000000..e693ceb
--- /dev/null
+++ b/test/tests/conf/message/message14.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:number inside xsl:message; number should appear. -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE14: </xsl:text>
+      <xsl:number value="17" format="(1) "/>
+      <xsl:text>Anything between the colon and this?</xsl:text>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message15.xml b/test/tests/conf/message/message15.xml
new file mode 100644
index 0000000..0943cb3
--- /dev/null
+++ b/test/tests/conf/message/message15.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs><a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message15.xsl b/test/tests/conf/message/message15.xsl
new file mode 100644
index 0000000..3c74104
--- /dev/null
+++ b/test/tests/conf/message/message15.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ext="somebody.elses.extension"
+                extension-element-prefixes="ext">
+
+  <!-- FileName: Message15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:fallback inside xsl:message -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:message>
+      <xsl:text>Message from MESSAGE15: </xsl:text>
+      <ext:test>
+        <xsl:fallback>We got inside</xsl:fallback>
+      </ext:test>
+    </xsl:message>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/message/message16.xml b/test/tests/conf/message/message16.xml
new file mode 100644
index 0000000..8e0747a
--- /dev/null
+++ b/test/tests/conf/message/message16.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+  <a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/message/message16.xsl b/test/tests/conf/message/message16.xsl
new file mode 100644
index 0000000..e186d82
--- /dev/null
+++ b/test/tests/conf/message/message16.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: Message16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Purpose: Test xsl:message inside xsl:param instead of xsl:template -->
+  <!-- Creator: David Marston -->
+
+<xsl:param name="foo">
+  <xsl:message>This message came from the MESSAGE16 test.</xsl:message>
+  <xsl:value-of select="/docs/a"/>
+</xsl:param>
+
+<xsl:template match="docs">
+  <out>
+    <xsl:value-of select="$foo"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes01.xml b/test/tests/conf/modes/modes01.xml
new file mode 100644
index 0000000..f934996
--- /dev/null
+++ b/test/tests/conf/modes/modes01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">a-text</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes01.xsl b/test/tests/conf/modes/modes01.xsl
new file mode 100644
index 0000000..788de9c
--- /dev/null
+++ b/test/tests/conf/modes/modes01.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Simple test of xsl:apply-templates with mode. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a" mode="a"/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="a" mode="a">
+  <xsl:text>mode-a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>no-mode:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes02.xml b/test/tests/conf/modes/modes02.xml
new file mode 100644
index 0000000..485c86a
--- /dev/null
+++ b/test/tests/conf/modes/modes02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+<a test="a attribute">brown-fox</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes02.xsl b/test/tests/conf/modes/modes02.xsl
new file mode 100644
index 0000000..b0a13d1
--- /dev/null
+++ b/test/tests/conf/modes/modes02.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Purpose: Test of moded template calling xsl:apply-templates 
+       on another template. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc" mode="b"/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="a" mode="a">
+  <xsl:text>mode-a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>no-mode:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+ 
+<xsl:template match="doc" mode="b">
+  mode-b: <xsl:apply-templates select="a"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes03.xml b/test/tests/conf/modes/modes03.xml
new file mode 100644
index 0000000..f934996
--- /dev/null
+++ b/test/tests/conf/modes/modes03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">a-text</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes03.xsl b/test/tests/conf/modes/modes03.xsl
new file mode 100644
index 0000000..befb8eb
--- /dev/null
+++ b/test/tests/conf/modes/modes03.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Purpose: Test of xsl:apply-templates with mode not found. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a" mode="z"/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="text()" mode="a">
+  <xsl:text>mode-a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>no-mode:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes04.xml b/test/tests/conf/modes/modes04.xml
new file mode 100644
index 0000000..f934996
--- /dev/null
+++ b/test/tests/conf/modes/modes04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">a-text</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes04.xsl b/test/tests/conf/modes/modes04.xsl
new file mode 100644
index 0000000..84c40dd
--- /dev/null
+++ b/test/tests/conf/modes/modes04.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Purpose: Simple test of xsl:apply-templates with no mode,
+     but with same-pattern template that has a mode available. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a"/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="a" mode="a">
+  <xsl:text>mode-a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>no-mode:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes05.xml b/test/tests/conf/modes/modes05.xml
new file mode 100644
index 0000000..f934996
--- /dev/null
+++ b/test/tests/conf/modes/modes05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">a-text</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes05.xsl b/test/tests/conf/modes/modes05.xsl
new file mode 100644
index 0000000..ed765b3
--- /dev/null
+++ b/test/tests/conf/modes/modes05.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Purpose: Simple test of xsl:apply-templates with mode, using the default rule. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a" mode="a"/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="text()" mode="a">
+  <xsl:text>mode-a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>no-mode:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes06.xml b/test/tests/conf/modes/modes06.xml
new file mode 100644
index 0000000..f934996
--- /dev/null
+++ b/test/tests/conf/modes/modes06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">a-text</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes06.xsl b/test/tests/conf/modes/modes06.xsl
new file mode 100644
index 0000000..7be8b1f
--- /dev/null
+++ b/test/tests/conf/modes/modes06.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:foo="http://foo.com">
+  
+  <!-- FileName: MODES06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Purpose: Test of xsl:apply-templates with mode, using a qualified name. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a" mode="foo:a"/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="text()" mode="a">
+  <xsl:text>mode-a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()" mode="foo:a">
+  <xsl:text>mode-foo:a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>no-mode:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes07.xml b/test/tests/conf/modes/modes07.xml
new file mode 100644
index 0000000..f934996
--- /dev/null
+++ b/test/tests/conf/modes/modes07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">a-text</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes07.xsl b/test/tests/conf/modes/modes07.xsl
new file mode 100644
index 0000000..0634610
--- /dev/null
+++ b/test/tests/conf/modes/modes07.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+                xmlns:foo="http://foo.com">
+
+  <!-- FileName: MODES07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Purpose: Test of xsl:apply-templates with mode, using a non-qualified 
+       name, but with a qualified name in scope. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a" mode="a"/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="text()" mode="a">
+  <xsl:text>mode-a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()" mode="foo:a">
+  <xsl:text>mode-foo:a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>no-mode:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes08.xml b/test/tests/conf/modes/modes08.xml
new file mode 100644
index 0000000..c2b0d48
--- /dev/null
+++ b/test/tests/conf/modes/modes08.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">a-text</a>
+  <b test="b attribute">b-text</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes08.xsl b/test/tests/conf/modes/modes08.xsl
new file mode 100644
index 0000000..ef21298
--- /dev/null
+++ b/test/tests/conf/modes/modes08.xsl
@@ -0,0 +1,78 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Purpose: Test of several modes being available. -->
+
+<xsl:template match="doc">
+  <out><xsl:text>&#010;</xsl:text>
+    <xsl:apply-templates select="a" mode="a"/>
+    <xsl:apply-templates select="a" mode="b"/>
+    <xsl:apply-templates select="a" mode="c"/>
+    <xsl:apply-templates select="a" mode="d"/>
+    <xsl:apply-templates select="a" mode="e"/>
+    <xsl:apply-templates select="b" mode="a"/>
+    <xsl:apply-templates select="b" mode="b"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a" mode="a">
+  <xsl:text>modeA: </xsl:text><xsl:value-of select="."/>
+  <xsl:text>&#010;</xsl:text>
+</xsl:template>
+
+<xsl:template match="a" mode="b">
+  <xsl:text>modeB: </xsl:text><xsl:value-of select="."/>
+  <xsl:value-of select="@test"/>
+  <xsl:text>&#010;</xsl:text>
+</xsl:template>
+
+<xsl:template match="a" mode="c">
+  <xsl:text>modeC: </xsl:text><xsl:value-of select="."/>
+  <xsl:text>&#010;</xsl:text>
+</xsl:template>
+
+<xsl:template match="a" mode="d">
+  <xsl:text>modeD: </xsl:text><xsl:value-of select="."/>
+  <xsl:value-of select="@test"/>
+  <xsl:text>&#010;</xsl:text>
+</xsl:template>
+
+<xsl:template match="a" mode="e">
+  <xsl:text>modeE: </xsl:text><xsl:value-of select="."/>
+  <xsl:text>&#010;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*" mode="a">
+  <xsl:text>modeA: </xsl:text><xsl:value-of select="."/>
+  <xsl:text>&#010;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*" mode="b">
+  <xsl:text>modeB: </xsl:text><xsl:value-of select="."/>
+  <xsl:text>&#010;</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes09.xml b/test/tests/conf/modes/modes09.xml
new file mode 100644
index 0000000..1bea0d3
--- /dev/null
+++ b/test/tests/conf/modes/modes09.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <punct>$</punct>
+  <number>6</number>
+  <letter>h</letter>
+  <number>9</number>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes09.xsl b/test/tests/conf/modes/modes09.xsl
new file mode 100644
index 0000000..f55cb8b
--- /dev/null
+++ b/test/tests/conf/modes/modes09.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test an apply-templates that has no select but has a mode. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates mode="char"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter" mode="char">
+  <xsl:text>-</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="number" mode="char">
+  <xsl:text>#</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<!-- The "punct" nodes in the input will get processed under the default
+     template, in char mode, which copies the content. -->
+
+<xsl:template match="letter">
+  <xsl:text>We should not get this line!
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes10.xml b/test/tests/conf/modes/modes10.xml
new file mode 100644
index 0000000..f602ee3
--- /dev/null
+++ b/test/tests/conf/modes/modes10.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>
+  <x test="x attribute">content
+    <y>why</y>
+  </x>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes10.xsl b/test/tests/conf/modes/modes10.xsl
new file mode 100644
index 0000000..5e8a56f
--- /dev/null
+++ b/test/tests/conf/modes/modes10.xsl
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that we only go into a mode via apply-templates.
+     You can't put a mode on call-template, and the fact that you call a named
+     template that has a mode specifier doesn't mean you are in that mode. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc" mode="a"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc" mode="a" priority="3">
+  <xsl:text>Found doc...</xsl:text>
+  <xsl:call-template name="scan"/>
+</xsl:template>
+
+<!-- The following template is both applied in mode a and called -->
+<xsl:template name="scan" match="*" mode="a" priority="2">
+  <xsl:text>Scanned </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="x" priority="4">
+  <xsl:text>Found x, no mode: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+  <xsl:apply-templates mode="a"/>
+</xsl:template>
+
+<xsl:template match="x" mode="a" priority="4">
+  <xsl:text>Found x, mode a: </xsl:text><xsl:value-of select="@test"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>modeless text: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()" mode="a">
+  <xsl:text>mode a text: </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes11.xml b/test/tests/conf/modes/modes11.xml
new file mode 100644
index 0000000..1e93def
--- /dev/null
+++ b/test/tests/conf/modes/modes11.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<!-- This test executed properly. -->
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes11.xsl b/test/tests/conf/modes/modes11.xsl
new file mode 100644
index 0000000..b83d799
--- /dev/null
+++ b/test/tests/conf/modes/modes11.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: modes11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 -->
+  <!-- Creator: Carmelo Montanez --><!-- Template001 in NIST suite -->
+  <!-- Purpose: Test apply-templates for a comment with a mode
+       and moded matching template. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="comment()" mode="mode1"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="comment()" mode="mode1">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="comment()">
+  This test failed to execute properly.
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes12.xml b/test/tests/conf/modes/modes12.xml
new file mode 100644
index 0000000..a4719f0
--- /dev/null
+++ b/test/tests/conf/modes/modes12.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<?PITarget Processing-Instruction 1 type="text/xml"?>
+</doc>
diff --git a/test/tests/conf/modes/modes12.xsl b/test/tests/conf/modes/modes12.xsl
new file mode 100644
index 0000000..3094298
--- /dev/null
+++ b/test/tests/conf/modes/modes12.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: modes12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 -->
+  <!-- Creator: Carmelo Montanez --><!-- Template002 in NIST suite -->
+  <!-- Purpose: Test apply-templates for PI with a mode
+       and moded matching template. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="processing-instruction()" mode="mode1"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction()" mode="mode1">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  This test failed to execute properly.
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes13.xml b/test/tests/conf/modes/modes13.xml
new file mode 100644
index 0000000..8d98f21
--- /dev/null
+++ b/test/tests/conf/modes/modes13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <child1>This is the child number 1.</child1>
+</doc>
diff --git a/test/tests/conf/modes/modes13.xsl b/test/tests/conf/modes/modes13.xsl
new file mode 100644
index 0000000..48884c3
--- /dev/null
+++ b/test/tests/conf/modes/modes13.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: modes13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 -->
+  <!-- Creator: Carmelo Montanez --><!-- Template003 in NIST suite -->
+  <!-- Purpose: Test apply-templates for any node() with a mode
+       and moded matching template. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="node()" mode="mode1"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()" mode="mode1">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="node()">
+  This test failed to execute properly.
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes14.xml b/test/tests/conf/modes/modes14.xml
new file mode 100644
index 0000000..dc31ffe
--- /dev/null
+++ b/test/tests/conf/modes/modes14.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attribute1="attribute1"></doc>
diff --git a/test/tests/conf/modes/modes14.xsl b/test/tests/conf/modes/modes14.xsl
new file mode 100644
index 0000000..4cf96c0
--- /dev/null
+++ b/test/tests/conf/modes/modes14.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: modes14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 -->
+  <!-- Creator: Carmelo Montanez --><!-- Template004 in NIST suite -->
+  <!-- Purpose: Test apply-templates for an attribute with a mode
+       and moded matching template. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="@attribute1" mode="mode1"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="@attribute1" mode="mode1">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="@attribute1">
+  This test failed to execute properly.
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes15.xml b/test/tests/conf/modes/modes15.xml
new file mode 100644
index 0000000..70df6e6
--- /dev/null
+++ b/test/tests/conf/modes/modes15.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<sss>
+<sss><i>Not OK</i></sss>
+</sss>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes15.xsl b/test/tests/conf/modes/modes15.xsl
new file mode 100644
index 0000000..66ba791
--- /dev/null
+++ b/test/tests/conf/modes/modes15.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: modes15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Purpose: Re-use nodes in different modes; templates have step-paths -->
+  <!-- Creator: Mingfei Peng (mfpeng@excite.com), altered by David Marston -->
+  <!-- Within a given mode, there are situations when more than one template
+    will match. Normal conflict-resolution rules should apply. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="sss/sss" mode="c"/>
+    <xsl:apply-templates select="sss/sss" mode="d"/>
+    <xsl:apply-templates select="sss//i" mode="c"/>
+    <xsl:apply-templates select="sss//i" mode="d"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="c"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="d"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="sss//*" mode="d">
+ !Any descendant of any sss!
+</xsl:template>
+
+<xsl:template match="/sss//*" mode="d">
+ +Any descendant of root sss+
+</xsl:template>
+
+<xsl:template match="sss/*" mode="c">
+ -Any child of any sss-
+</xsl:template>
+
+<xsl:template match="/sss/*" mode="c">
+ -Any child of root sss-
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes16.xml b/test/tests/conf/modes/modes16.xml
new file mode 100644
index 0000000..f934996
--- /dev/null
+++ b/test/tests/conf/modes/modes16.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">a-text</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes16.xsl b/test/tests/conf/modes/modes16.xsl
new file mode 100644
index 0000000..06a3ce4
--- /dev/null
+++ b/test/tests/conf/modes/modes16.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:foo="http://foo.com"
+                xmlns:moo="http://foo.com"
+                exclude-result-prefixes="foo moo">
+
+  <!-- FileName: MODES16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that qualified name of a mode is used in expanded form. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a" mode="foo:a"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()" mode="moo:a">
+  <xsl:text>mode-moo:a, </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>no-mode, </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/modes/modes17.xml b/test/tests/conf/modes/modes17.xml
new file mode 100644
index 0000000..d8dbc14
--- /dev/null
+++ b/test/tests/conf/modes/modes17.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="a attribute">lazy-dog</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/modes/modes17.xsl b/test/tests/conf/modes/modes17.xsl
new file mode 100644
index 0000000..11aedd3
--- /dev/null
+++ b/test/tests/conf/modes/modes17.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MODES17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.7 Modes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check that underscores are allowed in names. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc" mode="_1st_mode"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a" mode="a.mode">
+  <xsl:text>mode-a:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>no-mode:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="doc" mode="_1st_mode">
+  <xsl:text>_1st_mode: </xsl:text><xsl:apply-templates select="a" mode="a.mode"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/a.xsl b/test/tests/conf/namedtemplate/a.xsl
new file mode 100644
index 0000000..3288eb5
--- /dev/null
+++ b/test/tests/conf/namedtemplate/a.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template name="a">
+  import:a
+</xsl:template>
+
+<xsl:template name="a">
+  import:b
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate01.xml b/test/tests/conf/namedtemplate/namedtemplate01.xml
new file mode 100644
index 0000000..d1c7923
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+	<a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate01.xsl b/test/tests/conf/namedtemplate/namedtemplate01.xsl
new file mode 100644
index 0000000..9e7e869
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate01.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: General test for xsl:call-template. -->
+  <!-- Output should be 'test' and 'pvar2 default data' -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="RTF">
+      <xsl:value-of select="a"/>
+    </xsl:variable>
+    <xsl:call-template name="ntmp1">
+      <xsl:with-param name="pvar1" select="$RTF"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="ntmp1">
+  <xsl:param name="pvar1">pvar1 default data</xsl:param>
+  <xsl:param name="pvar2">pvar2 default data</xsl:param>
+  <xsl:value-of select="$pvar1"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="$pvar2"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate02.xml b/test/tests/conf/namedtemplate/namedtemplate02.xml
new file mode 100644
index 0000000..33838dc
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate02.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>top-level-a</a>
+    <doc1>
+	  <a>sub-level-a</a>
+	</doc1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate02.xsl b/test/tests/conf/namedtemplate/namedtemplate02.xsl
new file mode 100644
index 0000000..0be9f2e
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate02.xsl
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for xsl:call-template of one that has both match and name. -->
+
+  <!-- Also verifies that xsl:call-template does not change
+       the current node or the current node list resulting in
+       'top-level-a' being printed twice during the first 
+       instantiation of the named template. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="X1">
+      <xsl:value-of select="a"/>
+    </xsl:variable>
+
+    <xsl:call-template name="ntmp1">
+      <xsl:with-param name="pvar1" select="'Call-template'"/>
+      <xsl:with-param name="pvar2" select="$X1"/>
+    </xsl:call-template>
+
+    <xsl:text>&#010;</xsl:text>
+
+    <xsl:apply-templates select="doc1">
+      <xsl:with-param name="pvar1" select="'Apply-templates'"/>
+      <xsl:with-param name="pvar2" select="$X1"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template name="ntmp1" match="doc1">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:param name="pvar2">Default text in pvar2</xsl:param>
+
+  <xsl:value-of select="$pvar1"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="$pvar2"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="a"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate03.xml b/test/tests/conf/namedtemplate/namedtemplate03.xml
new file mode 100644
index 0000000..f4dbeec
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate03.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+ <a>
+  <b>
+   <c>
+	<d>
+	</d>
+   </c>
+  </b>
+ </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate03.xsl b/test/tests/conf/namedtemplate/namedtemplate03.xsl
new file mode 100644
index 0000000..df622c4
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate03.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for recursion of xsl:call-template. -->
+
+<!-- <xsl:param name="pvar2" select="'stylesheet-var'"/> -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:variable name="ResultTreeFragTest" select="name(.)"/> 
+    <xsl:call-template name="ntmp1">
+      <xsl:with-param name="pvar1" select="$ResultTreeFragTest"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="ntmp1">
+  <xsl:param name="pvar1">def-text-1</xsl:param>
+  <xsl:param name="pvar2">def-text-2</xsl:param>
+  <xsl:value-of select="$pvar1"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="$pvar2"/><xsl:text>,</xsl:text>
+  <xsl:apply-templates select="*">
+    <xsl:with-param name="pvar1" select="$pvar1"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:param name="pvar1">def-text-1</xsl:param>
+  <xsl:call-template name="ntmp1">
+    <xsl:with-param name="pvar1" select="$pvar1"/>
+    <xsl:with-param name="pvar2" select="name(.)"/>
+  </xsl:call-template>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate04.xml b/test/tests/conf/namedtemplate/namedtemplate04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate04.xsl b/test/tests/conf/namedtemplate/namedtemplate04.xsl
new file mode 100644
index 0000000..d0af461
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate04.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+                xmlns:foo="http://foo.com">
+
+  <!-- FileName: namedtemplate04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Make sure qualified names work for named templates. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="foo:a"/>
+  </out>
+</xsl:template>
+
+<xsl:template name="foo:a">
+  foo:a
+</xsl:template>
+
+<xsl:template name="a">
+  a
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate05.xml b/test/tests/conf/namedtemplate/namedtemplate05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate05.xsl b/test/tests/conf/namedtemplate/namedtemplate05.xsl
new file mode 100644
index 0000000..f998c3b
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate05.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+                xmlns:foo="http://foo.com">
+
+  <!-- FileName: namedtemplate05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Call named template with non-qualified name, but with 
+       qualified name in scope. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="a"/>
+  </out>
+</xsl:template>
+
+<xsl:template name="foo:a">
+  foo:a
+</xsl:template>
+
+<xsl:template name="a">
+  a
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate06.xml b/test/tests/conf/namedtemplate/namedtemplate06.xml
new file mode 100644
index 0000000..19801dd
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>top-level-a</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate06.xsl b/test/tests/conf/namedtemplate/namedtemplate06.xsl
new file mode 100644
index 0000000..af586ec
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate06.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Call named template that has priority and mode. -->
+
+  <!-- "The match, mode, and priority attributes on an xsl:template element do not affect
+     whether the template is invoked by an xsl:call-template element." -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="ntmp1">
+      <xsl:with-param name="pvar1" select="a"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="ntmp1" mode="other" priority="-500">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/><xsl:text> in ntmp1</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate07.xml b/test/tests/conf/namedtemplate/namedtemplate07.xml
new file mode 100644
index 0000000..14829d5
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate07.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<todo>
+  <action priority="high" context="y">HIGH</action>
+  <action priority="medium" context="x">MEDIUM</action>
+  <action priority="low" context="w">LOW</action>
+</todo>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate07.xsl b/test/tests/conf/namedtemplate/namedtemplate07.xsl
new file mode 100644
index 0000000..1f4afef
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate07.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Tests the ability to reset and evaluate a parameter. -->
+
+ <xsl:template match="todo">
+ <out>
+  <xsl:call-template name="section">
+     <xsl:with-param name="x">showstopper</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:call-template name="section">
+     <xsl:with-param name="x">high</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:call-template name="section">
+     <xsl:with-param name="x">medium</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:call-template name="section">
+     <xsl:with-param name="x">low</xsl:with-param>
+  </xsl:call-template>
+</out>
+</xsl:template>
+
+<xsl:template name="section">
+  <xsl:param name="x">other</xsl:param>
+
+  1.<xsl:value-of select="$x"/>
+  <xsl:if test="./action[@priority=string($x)]">
+   2.<xsl:value-of select="$x"/>
+  </xsl:if>
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate08.xml b/test/tests/conf/namedtemplate/namedtemplate08.xml
new file mode 100644
index 0000000..63b4d48
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate08.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>found A</a>
+  <b>found B</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate08.xsl b/test/tests/conf/namedtemplate/namedtemplate08.xsl
new file mode 100644
index 0000000..083be5f
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate08.xsl
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of nested template calls. -->
+  <!-- Output should not have pvarN default data -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="RTF">
+      <xsl:value-of select="a"/>
+    </xsl:variable>
+    <xsl:call-template name="tmplt1">
+      <xsl:with-param name="pvar1" select="$RTF"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1">
+  <xsl:param name="pvar1">pvar1 default data</xsl:param>
+  <xsl:value-of select="$pvar1"/><xsl:text>,</xsl:text>
+  <xsl:call-template name="tmplt2">
+    <xsl:with-param name="pvar2" select="555"/>
+  </xsl:call-template>
+  <xsl:text>
+Back to first template.</xsl:text>
+</xsl:template>
+
+<xsl:template name="tmplt2">
+  <xsl:param name="pvar2">pvar2 default data</xsl:param>
+  <xsl:variable name="subnode">
+    <xsl:value-of select="b"/>
+  </xsl:variable>
+  <!-- pvar2 won't be in scope in next template, so pass it in via new variable. -->
+  <xsl:variable name="passto3">
+    <xsl:value-of select="number($pvar2)"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$passto3"/><xsl:text>,</xsl:text>
+  <xsl:call-template name="tmplt3">
+    <xsl:with-param name="pvar3" select="$subnode"/>
+    <xsl:with-param name="t1num" select="$passto3"/>
+  </xsl:call-template>
+  <xsl:text>
+Back to template 2.</xsl:text>
+</xsl:template>
+
+<xsl:template name="tmplt3">
+  <xsl:param name="pvar3">pvar3 default data</xsl:param>
+  <xsl:param name="t1num">t1num default data</xsl:param>
+  <xsl:value-of select="$pvar3"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="444 + $t1num"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate09.xml b/test/tests/conf/namedtemplate/namedtemplate09.xml
new file mode 100644
index 0000000..d1c7923
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate09.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+	<a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate09.xsl b/test/tests/conf/namedtemplate/namedtemplate09.xsl
new file mode 100644
index 0000000..7b75d5f
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate09.xsl
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of nested template calls. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="tmplt1">
+      <xsl:with-param name="par1" select="0"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1">
+  <xsl:param name="par1">par1 default data</xsl:param>
+  <in1>
+    <xsl:value-of select="$par1"/>
+    <xsl:call-template name="tmplt2">
+      <xsl:with-param name="par1" select="1"/>
+    </xsl:call-template>
+  </in1>
+</xsl:template>
+
+<xsl:template name="tmplt2">
+  <xsl:param name="par1">par1 default in tmplt2</xsl:param>
+  <in2>
+    <xsl:value-of select="$par1"/>
+    <xsl:call-template name="tmplt3">
+      <xsl:with-param name="par1" select="2"/>
+    </xsl:call-template>
+  </in2>
+</xsl:template>
+
+<xsl:template name="tmplt3">
+  <xsl:param name="par1">par1 default in tmplt3</xsl:param>
+  <in3>
+    <xsl:value-of select="$par1"/>
+    <xsl:call-template name="tmplt4">
+      <xsl:with-param name="par1" select="3"/>
+    </xsl:call-template>
+  </in3>
+</xsl:template>
+
+<xsl:template name="tmplt4">
+  <xsl:param name="par1">par1 default in tmplt4</xsl:param>
+  <in4>
+    <xsl:value-of select="$par1"/>
+    <xsl:call-template name="tmplt5">
+      <xsl:with-param name="par1" select="4"/>
+    </xsl:call-template>
+  </in4>
+</xsl:template>
+
+<xsl:template name="tmplt5">
+  <xsl:param name="par1">par1 default in tmplt5</xsl:param>
+  <in5>
+    <xsl:value-of select="$par1"/>
+    <xsl:call-template name="tmplt6">
+      <xsl:with-param name="par1" select="5"/>
+    </xsl:call-template>
+  </in5>
+</xsl:template>
+
+<xsl:template name="tmplt6">
+  <xsl:param name="par1">par1 default in tmplt6</xsl:param>
+  <in6>
+    <xsl:value-of select="$par1"/><xsl:text> - all the way in</xsl:text>
+  </in6>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate10.xml b/test/tests/conf/namedtemplate/namedtemplate10.xml
new file mode 100644
index 0000000..f397c26
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate10.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>
+  <AAA repeat="3"/>
+  <BBB repeat="2"/>
+  <CCC repeat="5"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate10.xsl b/test/tests/conf/namedtemplate/namedtemplate10.xsl
new file mode 100644
index 0000000..be2f23e
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate10.xsl
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Purpose: Test of simulated numerically-indexed for loop. -->
+  <!-- This is example 77 from Nic Miloslav's tutorial site. -->
+
+<xsl:template match="/">
+  <out>
+  	<xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="/doc/*">
+  <p>
+  <xsl:call-template name="for">
+    <xsl:with-param name="stop">
+      <xsl:value-of select="@repeat"/>
+    </xsl:with-param>
+  </xsl:call-template>
+  </p>
+</xsl:template>
+
+<xsl:template name="for">
+  <xsl:param name="start">1</xsl:param>
+  <xsl:param name="stop">1</xsl:param>
+  <xsl:param name="step">1</xsl:param>
+  <!-- put out one iteration of the name and a trailing space -->
+  <xsl:value-of select="name()"/>
+  <xsl:text> </xsl:text>
+  <!-- here's the recursion -->
+  <xsl:if test="$start &lt; $stop">
+    <xsl:call-template name="for">
+      <xsl:with-param name="stop">
+        <xsl:value-of select="$stop"/>
+      </xsl:with-param>
+      <xsl:with-param name="start">
+        <xsl:value-of select="$start + $step"/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate11.xml b/test/tests/conf/namedtemplate/namedtemplate11.xml
new file mode 100644
index 0000000..703f073
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate11.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>X</a>
+  <a>Y</a>
+  <a>Z</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate11.xsl b/test/tests/conf/namedtemplate/namedtemplate11.xsl
new file mode 100644
index 0000000..5a10e50
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate11.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for-each inside xsl:with-param. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="ntmp1">
+      <xsl:with-param name="pvar1">
+        <xsl:for-each select="a">
+          <xsl:value-of select="."/>
+        </xsl:for-each>
+      </xsl:with-param>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="ntmp1">
+  <xsl:param name="pvar1">pvar1 default data</xsl:param>
+  <xsl:text>This template got passed </xsl:text>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate12.xml b/test/tests/conf/namedtemplate/namedtemplate12.xml
new file mode 100644
index 0000000..e365420
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate12.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+    <OL>
+      <LI>subsubitem</LI>
+    </OL>
+    <LI>subitem3</LI>
+  </OL>
+</doc>
diff --git a/test/tests/conf/namedtemplate/namedtemplate12.xsl b/test/tests/conf/namedtemplate/namedtemplate12.xsl
new file mode 100644
index 0000000..99c98fb
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate12.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of passed-in value in an AVT.
+     Derived from example code at end of 11.6 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="OL">
+  <xsl:text>OL!</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="LI">
+  <xsl:call-template name="numbered-block">
+    <xsl:with-param name="format">A. </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="OL/LI">
+  <xsl:call-template name="numbered-block">
+    <xsl:with-param name="format">a. </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="numbered-block">
+  <xsl:param name="format">1. </xsl:param>
+  <xsl:number format="{$format}"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate13.xml b/test/tests/conf/namedtemplate/namedtemplate13.xml
new file mode 100644
index 0000000..8a18f30
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate13.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <bloc>top-bloc</bloc>
+    <doc>
+      <bloc>sub-bloc</bloc>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate13.xsl b/test/tests/conf/namedtemplate/namedtemplate13.xsl
new file mode 100644
index 0000000..8702b28
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate13.xsl
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that we can use the default parameter value on some calls -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:text>Looking for doc...</xsl:text>
+    <xsl:choose>
+      <xsl:when test="//doc">
+        <xsl:call-template name="status">
+          <xsl:with-param name="X1">hasDocBelow</xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="status"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>&#010;Looking for croc...</xsl:text>
+    <xsl:choose>
+      <xsl:when test="//croc">
+        <xsl:call-template name="status">
+          <xsl:with-param name="X1">hasCrocBelow</xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="status"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>&#010;Looking for bloc...</xsl:text>
+    <xsl:choose>
+      <xsl:when test="//bloc">
+        <xsl:call-template name="status">
+          <xsl:with-param name="X1">hasBlocBelow</xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="status"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+<xsl:template name="status">
+  <xsl:param name="X1">noLowerNode</xsl:param>
+  <xsl:text>X1=</xsl:text><xsl:value-of select="$X1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate14.xml b/test/tests/conf/namedtemplate/namedtemplate14.xml
new file mode 100644
index 0000000..8c60d21
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate14.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate14.xsl b/test/tests/conf/namedtemplate/namedtemplate14.xsl
new file mode 100644
index 0000000..f774cb9
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate14.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Purpose: Test select= on xsl:param inside named template -->
+  <!-- Output should be 'test' and 'pvar2 default data' -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="RTF">
+      <xsl:value-of select="a"/>
+    </xsl:variable>
+    <xsl:call-template name="ntmp1">
+      <xsl:with-param name="pvar1" select="$RTF"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="ntmp1">
+  <!-- Must used nested quotes, else we'd be selecting nodes -->
+  <xsl:param name="pvar1" select="'pvar1 default data'" />
+  <xsl:param name="pvar2" select="'pvar2 default data'" />
+  <xsl:value-of select="$pvar1"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="$pvar2"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate15.xml b/test/tests/conf/namedtemplate/namedtemplate15.xml
new file mode 100644
index 0000000..d1c7923
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate15.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+	<a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate15.xsl b/test/tests/conf/namedtemplate/namedtemplate15.xsl
new file mode 100644
index 0000000..435aa9b
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate15.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of leading underscore in names. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="_a_var">
+      <xsl:value-of select="a"/>
+    </xsl:variable>
+    <xsl:call-template name="_a_template">
+      <xsl:with-param name="_a_param" select="$_a_var"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="_a_template">
+  <xsl:param name="_a_param">_a_param default data</xsl:param>
+  <xsl:value-of select="$_a_param"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate16.xml b/test/tests/conf/namedtemplate/namedtemplate16.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate16.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate16.xsl b/test/tests/conf/namedtemplate/namedtemplate16.xsl
new file mode 100644
index 0000000..d8c136f
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate16.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+  xmlns:hoo="http://foo.com" xmlns:woo="http://foo.com"
+  exclude-result-prefixes="woo hoo">
+
+  <!-- FileName: namedtemplate16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Make sure qualified names match by expanded name. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="woo:a"/>
+  </out>
+</xsl:template>
+
+<xsl:template name="hoo:a">
+  hoo:a
+</xsl:template>
+
+<xsl:template name="a">
+  a
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate17.xml b/test/tests/conf/namedtemplate/namedtemplate17.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate17.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate17.xsl b/test/tests/conf/namedtemplate/namedtemplate17.xsl
new file mode 100644
index 0000000..e53c64b
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate17.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test import precedence: both ntimpa and ntimpb have "show" template, b wins. -->
+  <!-- Output should be 'Template from ntimpb has been called.' -->
+
+<xsl:import href="ntimpa.xsl"/>
+<xsl:import href="ntimpb.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="show"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate18.xml b/test/tests/conf/namedtemplate/namedtemplate18.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate18.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate18.xsl b/test/tests/conf/namedtemplate/namedtemplate18.xsl
new file mode 100644
index 0000000..03a4faf
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate18.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test import precedence: main stylesheet wins over imported one. -->
+  <!-- Output should be 'Template from MAIN has been called.' -->
+
+<xsl:import href="ntimpa.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="show"/>
+  </out>
+</xsl:template>
+
+<xsl:template name="show">
+  <xsl:text>Template from MAIN has been called.</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/namedtemplate19.xml b/test/tests/conf/namedtemplate/namedtemplate19.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate19.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/namedtemplate/namedtemplate19.xsl b/test/tests/conf/namedtemplate/namedtemplate19.xsl
new file mode 100644
index 0000000..f62c1dd
--- /dev/null
+++ b/test/tests/conf/namedtemplate/namedtemplate19.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplate19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test import precedence: both ntimpa and ntimpc have "show" template, c wins. -->
+  <!-- Output should be 'Template from ntimpc has been called.' -->
+
+<xsl:import href="ntimpc.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="show"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/ntimpa.xsl b/test/tests/conf/namedtemplate/ntimpa.xsl
new file mode 100644
index 0000000..44f1742
--- /dev/null
+++ b/test/tests/conf/namedtemplate/ntimpa.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ntimpa -->
+  <!-- Purpose: Imported by various tests. -->
+
+<xsl:template name="show">
+  <xsl:text>Template from ntimpa has been called.</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/ntimpb.xsl b/test/tests/conf/namedtemplate/ntimpb.xsl
new file mode 100644
index 0000000..8ac267d
--- /dev/null
+++ b/test/tests/conf/namedtemplate/ntimpb.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ntimpb -->
+  <!-- Purpose: Imported by various tests. -->
+
+<xsl:template name="show">
+  <xsl:text>Template from ntimpb has been called.</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namedtemplate/ntimpc.xsl b/test/tests/conf/namedtemplate/ntimpc.xsl
new file mode 100644
index 0000000..f633e9a
--- /dev/null
+++ b/test/tests/conf/namedtemplate/ntimpc.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ntimpc -->
+  <!-- Purpose: Imported by various tests. -->
+
+<xsl:import href="ntimpa.xsl"/>
+
+<xsl:template name="show">
+  <xsl:text>Template from ntimpc has been called.</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/impnspc13.xsl b/test/tests/conf/namespace/impnspc13.xsl
new file mode 100644
index 0000000..edac410
--- /dev/null
+++ b/test/tests/conf/namespace/impnspc13.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: impnspc13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Purpose: This stylesheet is being imported by namespace13 which has the namespace
+       prefix set to 'ped'. Testing that this setup with two different namespaces
+       is allowed. -->
+
+<xsl:template match="doc" priority="1.0">
+  <out>
+	<xsl:value-of select="'In Import: Testing '"/>
+	<xsl:for-each select="*">
+		<xsl:value-of select="."/><xsl:text> </xsl:text>		
+	</xsl:for-each>
+
+	<xsl:text>&#010;&#013;</xsl:text>
+	<xsl:call-template name="ThatTemp">
+		<xsl:with-param name="sam">quos</xsl:with-param>
+	</xsl:call-template>
+
+  </out>
+</xsl:template>
+
+<xsl:template name="ThatOtherTemp">
+	<xsl:param name="sam">bo</xsl:param>
+	<xsl:copy-of select="$sam"/>
+</xsl:template>
+
+<xsl:template name="ThatForthTemp">
+  <xsl:param name="sam">bo</xsl:param>
+	Imported xmlns:xsl <xsl:copy-of select="$sam"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/incnamespace113.xsl b/test/tests/conf/namespace/incnamespace113.xsl
new file mode 100644
index 0000000..08eeaa1
--- /dev/null
+++ b/test/tests/conf/namespace/incnamespace113.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+     xmlns:ixsl="http://www.w3.org/1999/XSL/TransformAlias"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: incnamespace113 -->
+<!-- Purpose: Included stylesheet for test case namespace113. -->
+
+<xsl:template match="gen_a">
+  <ixsl:template>
+    <xsl:attribute name="match"><xsl:value-of select="@name"/></xsl:attribute>
+    <ixsl:text>Recognized <xsl:value-of select="@name"/></ixsl:text>
+  </ixsl:template>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/incnspc13.xsl b/test/tests/conf/namespace/incnspc13.xsl
new file mode 100644
index 0000000..05622cd
--- /dev/null
+++ b/test/tests/conf/namespace/incnspc13.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<jad:transform xmlns:jad="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<jad:output method="xml"/>
+
+  <!-- FileName: incnspc13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Purpose: This stylesheet is being included by namespace13 which has the namespace
+       prefix set to 'jad'. Testing that this setup with two different namespaces
+       is allowed.  -->
+
+<jad:template match="doc">
+  <out>
+	<jad:value-of select="'In Include: Testing '"/>
+	<jad:for-each select="*">
+		<jad:value-of select="."/><jad:text> </jad:text>		
+	</jad:for-each>
+
+	<jad:text>&#010;&#013;</jad:text>
+	<jad:call-template name="ThatTemp">
+		<jad:with-param name="sam">quos</jad:with-param>
+	</jad:call-template>
+
+  </out>
+</jad:template>
+
+<jad:template name="ThatOtherTemp">
+  <jad:param name="sam">bo</jad:param>
+	Included xmlns:jad <jad:copy-of select="$sam"/>
+</jad:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</jad:transform>
diff --git a/test/tests/conf/namespace/namespace01.xml b/test/tests/conf/namespace/namespace01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace01.xsl b/test/tests/conf/namespace/namespace01.xsl
new file mode 100644
index 0000000..7c2f3cc
--- /dev/null
+++ b/test/tests/conf/namespace/namespace01.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output indent="yes"/>
+
+  <!-- FileName: namespace01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Apply namespaces to attributes -->
+
+<xsl:template match="/">
+  <out xmlns:anamespace="foo.com">
+    <p>
+      <xsl:attribute name="Attr1" namespace="foo.com">true</xsl:attribute>
+    </p>
+    <p>
+      <xsl:attribute name="Attr2" namespace="baz.com">true</xsl:attribute>
+    </p>
+	<!-- This 3rd case is a base line and should not have associated namespace -->
+	<p>
+      <xsl:attribute name="Attr3">true</xsl:attribute>
+    </p>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace02.xml b/test/tests/conf/namespace/namespace02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace02.xsl b/test/tests/conf/namespace/namespace02.xsl
new file mode 100644
index 0000000..06f3205
--- /dev/null
+++ b/test/tests/conf/namespace/namespace02.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Basic test of applying namespaces to elements. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="yes" />
+
+<xsl:template match="/">
+  <out xmlns:anamespace="foo.com">
+    <xsl:element name="test" namespace="foo.com">
+      <inner/>
+    </xsl:element>
+    <later/>
+    <anamespace:anelement/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace03.xml b/test/tests/conf/namespace/namespace03.xml
new file mode 100644
index 0000000..5d7cc91
--- /dev/null
+++ b/test/tests/conf/namespace/namespace03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <a/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace03.xsl b/test/tests/conf/namespace/namespace03.xsl
new file mode 100644
index 0000000..7662588
--- /dev/null
+++ b/test/tests/conf/namespace/namespace03.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:space="http://fictitious.com"
+  version="1.0">
+
+  <!-- FileName: namespace03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Adding an attribute to an element replaces any existing
+     attribute of that element with the same expanded-name. For attribute L,
+     there is only a local name. Attribute Q has a namespace. -->
+
+<xsl:template match="a">
+  <out>The foo element....
+    <foo xmlns:space="http://fictitious.com">
+      <xsl:attribute name="L">loser1</xsl:attribute>
+      <xsl:attribute name="space:Q">loser2</xsl:attribute>
+      <xsl:attribute name="L">winner1</xsl:attribute>
+      <xsl:attribute name="space:Q">winner2</xsl:attribute>
+    </foo>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace04.xml b/test/tests/conf/namespace/namespace04.xml
new file mode 100644
index 0000000..37dd0aa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace04.xml
@@ -0,0 +1 @@
+<foo xmlns="http://bogus" up="down"/>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace04.xsl b/test/tests/conf/namespace/namespace04.xsl
new file mode 100644
index 0000000..074b879
--- /dev/null
+++ b/test/tests/conf/namespace/namespace04.xsl
@@ -0,0 +1,40 @@
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:bogus="http://bogus">
+
+  <!-- FileName: namespace04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test that default namespaces do not apply directly to attributes. -->
+
+<xsl:template match="*[@up]">
+  <foo/>
+</xsl:template>
+
+<xsl:template match="*[@bogus:up]">
+  <!-- this template should not trigger because the element is in the "bogus" namespace,
+       but its "up" attribute isn't -->
+  <ERROR/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace05.xml b/test/tests/conf/namespace/namespace05.xml
new file mode 100644
index 0000000..a2ea7e6
--- /dev/null
+++ b/test/tests/conf/namespace/namespace05.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<doc>
+<a>1</a>
+<b>2</b>
+<c>3</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace05.xsl b/test/tests/conf/namespace/namespace05.xsl
new file mode 100644
index 0000000..18aa400
--- /dev/null
+++ b/test/tests/conf/namespace/namespace05.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<ped:stylesheet xmlns:ped="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<ped:output method="xml"/>
+<ped:key name="tk" match="xyz" use="zyx"/>
+<ped:variable name="joe">2</ped:variable>
+<ped:param name="sam" select="' x 4'"/>
+
+  <!-- FileName: NSPC05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Stylesheets are free to use any prefix, provided there is a namespace
+       declaration that binds the prefix to the URI of XSLT namespace. -->
+
+<ped:template match="doc">
+  <out>
+	<ped:value-of select="'Testing '"/>
+	<ped:for-each select="*">
+		<ped:value-of select="."/><ped:text> </ped:text>		
+	</ped:for-each>
+
+	<ped:text>&#010;</ped:text>
+	<ped:value-of select="$joe"/>
+	<ped:value-of select="$sam"/>
+
+	<ped:text>&#010;</ped:text>
+	<ped:call-template name="ThatTemp">
+		<ped:with-param name="sam">quos</ped:with-param>
+	</ped:call-template>
+
+	<ped:text>&#010;</ped:text>
+	<ped:call-template name="ThatTemp"/>
+  </out>
+</ped:template>
+
+<ped:template name="ThatTemp">
+	<ped:param name="sam">bo</ped:param>
+	<ped:copy-of select="$sam"/>
+</ped:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</ped:stylesheet>
diff --git a/test/tests/conf/namespace/namespace06.xml b/test/tests/conf/namespace/namespace06.xml
new file mode 100644
index 0000000..51ea08e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace06.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<a>
+<b/>
+</a>
+<c/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace06.xsl b/test/tests/conf/namespace/namespace06.xsl
new file mode 100644
index 0000000..ced08de
--- /dev/null
+++ b/test/tests/conf/namespace/namespace06.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" lotus:foo="baz"
+                xmlns:lotus="http://www.lotus.com">
+
+  <!-- FileName: namespace06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Testing an attribute not from the XSLT namespace,
+       which is legal provided that the expanded name of the attribute
+       has a non-null namespace URI. -->
+
+<xsl:template match="/" lotus:QE="ped">
+  <out xmlns:foo="http://foo.com">
+    <xsl:copy-of select="doc" foo:test="0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace07.xml b/test/tests/conf/namespace/namespace07.xml
new file mode 100644
index 0000000..b08aff2
--- /dev/null
+++ b/test/tests/conf/namespace/namespace07.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+  <ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+  <b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace07.xsl b/test/tests/conf/namespace/namespace07.xsl
new file mode 100644
index 0000000..21d1605
--- /dev/null
+++ b/test/tests/conf/namespace/namespace07.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespace07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of 'local-name()' function on an element. -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="local-name(baz2:b)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace08.xml b/test/tests/conf/namespace/namespace08.xml
new file mode 100644
index 0000000..56d9e82
--- /dev/null
+++ b/test/tests/conf/namespace/namespace08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <a at1="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace08.xsl b/test/tests/conf/namespace/namespace08.xsl
new file mode 100644
index 0000000..4471e80
--- /dev/null
+++ b/test/tests/conf/namespace/namespace08.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test name functions on non-namespaced attribute node. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>name|</xsl:text><xsl:value-of select="name(a/@at1)"/><xsl:text>|</xsl:text>
+    <xsl:text>namespace-uri|</xsl:text><xsl:value-of select="namespace-uri(a/@at1)"/><xsl:text>|</xsl:text>
+    <xsl:text>local-name|</xsl:text><xsl:value-of select="local-name(a/@at1)"/><xsl:text>|</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace09.xml b/test/tests/conf/namespace/namespace09.xml
new file mode 100644
index 0000000..b08aff2
--- /dev/null
+++ b/test/tests/conf/namespace/namespace09.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+  <ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+  <b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace09.xsl b/test/tests/conf/namespace/namespace09.xsl
new file mode 100644
index 0000000..4093d87
--- /dev/null
+++ b/test/tests/conf/namespace/namespace09.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespace09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of 'local-name()' function on attribute in non-default namespace. -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="local-name(baz2:b/@baz1:attrib2)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace10.xml b/test/tests/conf/namespace/namespace10.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/namespace/namespace10.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace10.xsl b/test/tests/conf/namespace/namespace10.xsl
new file mode 100644
index 0000000..fb64199
--- /dev/null
+++ b/test/tests/conf/namespace/namespace10.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespace10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of 'namespace-uri' function. -->
+
+<xsl:template match="baz2:doc">
+	<out>
+		<xsl:value-of select="namespace-uri(x)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace100.xml b/test/tests/conf/namespace/namespace100.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace100.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace100.xsl b/test/tests/conf/namespace/namespace100.xsl
new file mode 100644
index 0000000..a05a49b
--- /dev/null
+++ b/test/tests/conf/namespace/namespace100.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace100 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed xmlns declaration, namespace attrib to same URI, different prefix on name. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="az:foo" namespace="barz.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace101.xml b/test/tests/conf/namespace/namespace101.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace101.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace101.xsl b/test/tests/conf/namespace/namespace101.xsl
new file mode 100644
index 0000000..a520320
--- /dev/null
+++ b/test/tests/conf/namespace/namespace101.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="testguys.com" xmlns:ped="http://www.test.com">
+
+  <!-- FileName: namespace101 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use "plain" xsl:element while both default and prefixed NS defined at top. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="inner"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace102.xml b/test/tests/conf/namespace/namespace102.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace102.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace102.xsl b/test/tests/conf/namespace/namespace102.xsl
new file mode 100644
index 0000000..50723c0
--- /dev/null
+++ b/test/tests/conf/namespace/namespace102.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="testguys.com">
+
+  <!-- FileName: namespace102 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set default namespace, then reset via xmlns declaration in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" xmlns="">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace103.xml b/test/tests/conf/namespace/namespace103.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace103.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace103.xsl b/test/tests/conf/namespace/namespace103.xsl
new file mode 100644
index 0000000..7847e03
--- /dev/null
+++ b/test/tests/conf/namespace/namespace103.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="testguys.com">
+
+  <!-- FileName: namespace103 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set default namespace, then set differently in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" xmlns="other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace104.xml b/test/tests/conf/namespace/namespace104.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace104.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace104.xsl b/test/tests/conf/namespace/namespace104.xsl
new file mode 100644
index 0000000..e127e60
--- /dev/null
+++ b/test/tests/conf/namespace/namespace104.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com">
+
+  <!-- FileName: namespace104 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Specify an empty namespace; stylesheet default NS set, and reset in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element namespace="" name="foo" xmlns="">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace105.xml b/test/tests/conf/namespace/namespace105.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace105.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace105.xsl b/test/tests/conf/namespace/namespace105.xsl
new file mode 100644
index 0000000..ad98e19
--- /dev/null
+++ b/test/tests/conf/namespace/namespace105.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com">
+
+  <!-- FileName: namespace105 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Specify an empty namespace; default NS set at two levels. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element namespace="" name="foo" xmlns="other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace106.xml b/test/tests/conf/namespace/namespace106.xml
new file mode 100644
index 0000000..61accf8
--- /dev/null
+++ b/test/tests/conf/namespace/namespace106.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>x</doc>
diff --git a/test/tests/conf/namespace/namespace106.xsl b/test/tests/conf/namespace/namespace106.xsl
new file mode 100644
index 0000000..04f3236
--- /dev/null
+++ b/test/tests/conf/namespace/namespace106.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace106 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test recovery when assigned name begins with : (has null namespace) -->
+
+<xsl:template match = "doc">
+  <out>
+    <xsl:element name=":foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace107.xml b/test/tests/conf/namespace/namespace107.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace107.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace107.xsl b/test/tests/conf/namespace/namespace107.xsl
new file mode 100644
index 0000000..6cf6c6e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace107.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com" xmlns:ped="www.test.com">
+
+  <!-- FileName: namespace107 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use xsl:element with namespace attribute; prefix known at stylesheet level; default set. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="inner" namespace="www.test.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace108.xml b/test/tests/conf/namespace/namespace108.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace108.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace108.xsl b/test/tests/conf/namespace/namespace108.xsl
new file mode 100644
index 0000000..30fdeb3
--- /dev/null
+++ b/test/tests/conf/namespace/namespace108.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com" xmlns:ped="www.test.com">
+
+  <!-- FileName: namespace108 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use xsl:element with namespace attribute that matches default; another in scope. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="inner" namespace="testguys.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace109.xml b/test/tests/conf/namespace/namespace109.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace109.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace109.xsl b/test/tests/conf/namespace/namespace109.xsl
new file mode 100644
index 0000000..ac07699
--- /dev/null
+++ b/test/tests/conf/namespace/namespace109.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com" xmlns:ped="www.test.com">
+
+  <!-- FileName: namespace109 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use namespace attribute, but namespace new at that point; default was set. -->
+  <!-- Requested name has no prefix, and we can get by without it. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="inner" namespace="other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace11.xml b/test/tests/conf/namespace/namespace11.xml
new file mode 100644
index 0000000..045c32a
--- /dev/null
+++ b/test/tests/conf/namespace/namespace11.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc-one xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+	<ns1:a-two attrib1="Goodbye" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">Hello</ns1:a-two>
+	<b-three ns1:attrib2="Ciao">
+		<c-four/>
+	</b-three>
+</doc-one>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace11.xsl b/test/tests/conf/namespace/namespace11.xsl
new file mode 100644
index 0000000..1b1cbd0
--- /dev/null
+++ b/test/tests/conf/namespace/namespace11.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2"
+                exclude-result-prefixes="baz1 baz2">
+
+  <!-- FileName: namespace11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of 'namespace-uri()' function, with hyphenated node name. -->
+
+<xsl:template match="baz2:doc-one">
+ <out>
+	0 <xsl:value-of select="namespace-uri()"/>:
+	1 <xsl:value-of select="namespace-uri(baz1:a-two)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>:
+	2 <xsl:value-of select="namespace-uri(baz1:a-two)"/>:
+	3 <xsl:value-of select="namespace-uri(baz1:a-two/@attrib1)"/>:
+	4 <xsl:value-of select="namespace-uri(baz2:b-three)"/>:
+	5 <xsl:value-of select="namespace-uri(baz2:b-three/@baz1:attrib2)"/>:
+	6 <xsl:value-of select="namespace-uri(baz2:b-three/c-four)"/>:
+	7 <xsl:value-of select="namespace-uri(bogus)"/>:
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace110.xml b/test/tests/conf/namespace/namespace110.xml
new file mode 100644
index 0000000..61accf8
--- /dev/null
+++ b/test/tests/conf/namespace/namespace110.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>x</doc>
diff --git a/test/tests/conf/namespace/namespace110.xsl b/test/tests/conf/namespace/namespace110.xsl
new file mode 100644
index 0000000..ca0fdab
--- /dev/null
+++ b/test/tests/conf/namespace/namespace110.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace110 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for invalid namespace URI; spec says "not syntactically legal URI" is NOT error. -->
+
+<xsl:template match = "doc">
+  <out>
+    <xsl:element name="ouch:foo" xmlns:ouch="&quot;">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace111.xml b/test/tests/conf/namespace/namespace111.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace111.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace111.xsl b/test/tests/conf/namespace/namespace111.xsl
new file mode 100644
index 0000000..310f87c
--- /dev/null
+++ b/test/tests/conf/namespace/namespace111.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace111 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set and reset default namespace, no prefixes involved. -->
+
+<xsl:template match = "/">
+  <out xmlns="abc">
+    <xsl:element namespace="abc" name="foo" xmlns="">
+      <xsl:element name="yyy"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace112.xml b/test/tests/conf/namespace/namespace112.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace112.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace112.xsl b/test/tests/conf/namespace/namespace112.xsl
new file mode 100644
index 0000000..8757cbd
--- /dev/null
+++ b/test/tests/conf/namespace/namespace112.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace112 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set default namespace at two levels, no prefixes involved. -->
+
+<xsl:template match = "/">
+  <out xmlns="abc">
+    <xsl:element namespace="abc" name="foo" xmlns="other.com">
+      <xsl:element name="yyy"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace113.xml b/test/tests/conf/namespace/namespace113.xml
new file mode 100644
index 0000000..b503d48
--- /dev/null
+++ b/test/tests/conf/namespace/namespace113.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<source>
+  <gen_a name="foo"/>
+  <gen_b name="bar"/>
+</source>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace113.xsl b/test/tests/conf/namespace/namespace113.xsl
new file mode 100644
index 0000000..83ab5f0
--- /dev/null
+++ b/test/tests/conf/namespace/namespace113.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+ <xsl:stylesheet version="1.0"
+      xmlns:ixsl="http://www.w3.org/1999/XSL/TransformAlias"
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- FileName: namespace113 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 7.1.1 Literal Result Elements -->
+<!-- Creator: Gary L Peskin, based on test case from Jens Lautenbacher -->
+<!-- Purpose: Verify that namespace-alias is honored in included stylesheets. -->
+
+   <xsl:include href="incnamespace113.xsl"/>
+   <xsl:namespace-alias stylesheet-prefix="ixsl" result-prefix="xsl"/>
+
+<xsl:template match="/"> 
+  <ixsl:stylesheet version="1.0">
+    <xsl:apply-templates/>
+  </ixsl:stylesheet>
+</xsl:template>
+
+<xsl:template match="gen_b">
+  <ixsl:template>
+    <xsl:attribute name="match"><xsl:value-of select="@name"/></xsl:attribute>
+    <ixsl:text>Recognized <xsl:value-of select="@name"/></ixsl:text>
+  </ixsl:template>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace115.xml b/test/tests/conf/namespace/namespace115.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace115.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace115.xsl b/test/tests/conf/namespace/namespace115.xsl
new file mode 100644
index 0000000..dc2fefc
--- /dev/null
+++ b/test/tests/conf/namespace/namespace115.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:ped="www.test.com">
+
+  <!-- FileName: namespace115 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use xsl:element with namespace attribute and default changed; prefix known at stylesheet level. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="inner" namespace="www.test.com" xmlns="other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace116.xml b/test/tests/conf/namespace/namespace116.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace116.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace116.xsl b/test/tests/conf/namespace/namespace116.xsl
new file mode 100644
index 0000000..32b32b8
--- /dev/null
+++ b/test/tests/conf/namespace/namespace116.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace116 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to put un-namespaced attribute on namespaced element. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out xmlns:foo="foo.com">
+    <foo:pq>
+      <xsl:attribute name="Attr1" namespace="">true</xsl:attribute>
+    </foo:pq>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace117.xml b/test/tests/conf/namespace/namespace117.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace117.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace117.xsl b/test/tests/conf/namespace/namespace117.xsl
new file mode 100644
index 0000000..a72a157
--- /dev/null
+++ b/test/tests/conf/namespace/namespace117.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace117 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Create prefixed attribute with namespace requested via attribute. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:attribute name="bee:see" namespace="bee.com">true</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace119.xml b/test/tests/conf/namespace/namespace119.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace119.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace119.xsl b/test/tests/conf/namespace/namespace119.xsl
new file mode 100644
index 0000000..5dcbf30
--- /dev/null
+++ b/test/tests/conf/namespace/namespace119.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace119 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put namespace attribute on xsl:attribute,
+    but set it to null (which it would have been anyway). -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:attribute name="Attr0" namespace="">whatever</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace12.xml b/test/tests/conf/namespace/namespace12.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/namespace/namespace12.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace12.xsl b/test/tests/conf/namespace/namespace12.xsl
new file mode 100644
index 0000000..5f81c6f
--- /dev/null
+++ b/test/tests/conf/namespace/namespace12.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespace12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of 'namespace-uri()' function on an element. -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="namespace-uri(baz2:b)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace120.xml b/test/tests/conf/namespace/namespace120.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace120.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace120.xsl b/test/tests/conf/namespace/namespace120.xsl
new file mode 100644
index 0000000..16744c6
--- /dev/null
+++ b/test/tests/conf/namespace/namespace120.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="base.test">
+
+  <!-- FileName: namespace120 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set a prefixed name to an NS not among those in scope; prefix was in use. -->
+
+<xsl:template match = "/">
+  <out xmlns:p1="xyz">
+    <xsl:element namespace="new" name="p1:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace121.xml b/test/tests/conf/namespace/namespace121.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace121.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace121.xsl b/test/tests/conf/namespace/namespace121.xsl
new file mode 100644
index 0000000..bf64b44
--- /dev/null
+++ b/test/tests/conf/namespace/namespace121.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="base.test">
+
+  <!-- FileName: namespace121 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Reset prefix from innermost URI to outer (default) one. -->
+
+<xsl:template match = "/">
+  <out xmlns:p1="xyz">
+    <xsl:element namespace="base.test" name="p1:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace122.xml b/test/tests/conf/namespace/namespace122.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace122.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace122.xsl b/test/tests/conf/namespace/namespace122.xsl
new file mode 100644
index 0000000..3d71831
--- /dev/null
+++ b/test/tests/conf/namespace/namespace122.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="base.test">
+
+  <!-- FileName: namespace122 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Request prefix that is already mapped to requested NS, default set globally. -->
+
+<xsl:template match = "/">
+  <out xmlns:p1="xyz">
+    <xsl:element namespace="xyz" name="p1:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace123.xml b/test/tests/conf/namespace/namespace123.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace123.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace123.xsl b/test/tests/conf/namespace/namespace123.xsl
new file mode 100644
index 0000000..7a784d3
--- /dev/null
+++ b/test/tests/conf/namespace/namespace123.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="base.test">
+
+  <!-- FileName: namespace123 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set a prefixed name to same NS as outer default, prefix is new. -->
+
+<xsl:template match = "/">
+  <out xmlns:p1="xyz">
+    <xsl:element namespace="base.test" name="baz:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace124.xml b/test/tests/conf/namespace/namespace124.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace124.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace124.xsl b/test/tests/conf/namespace/namespace124.xsl
new file mode 100644
index 0000000..d6e3ae4
--- /dev/null
+++ b/test/tests/conf/namespace/namespace124.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="base.test">
+
+  <!-- FileName: namespace124 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set a prefixed name to same NS as other prefix already had, prefix is new. -->
+
+<xsl:template match = "/">
+  <out xmlns:p1="xyz">
+    <xsl:element namespace="xyz" name="baz:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace125.xml b/test/tests/conf/namespace/namespace125.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace125.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace125.xsl b/test/tests/conf/namespace/namespace125.xsl
new file mode 100644
index 0000000..5ab45bd
--- /dev/null
+++ b/test/tests/conf/namespace/namespace125.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns="default.com">
+
+  <!-- FileName: namespace125 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: See what happens to attribute when default namespace is declared. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="inner">
+      <xsl:attribute name="Attr1">true</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace126.xml b/test/tests/conf/namespace/namespace126.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace126.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace126.xsl b/test/tests/conf/namespace/namespace126.xsl
new file mode 100644
index 0000000..d9ac325
--- /dev/null
+++ b/test/tests/conf/namespace/namespace126.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns="default.com">
+
+  <!-- FileName: namespace126 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Have default namespace declared, request attribute in null namespace. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="inner">
+      <xsl:attribute name="Attr0" namespace="">true</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace127.xml b/test/tests/conf/namespace/namespace127.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace127.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace127.xsl b/test/tests/conf/namespace/namespace127.xsl
new file mode 100644
index 0000000..6753160
--- /dev/null
+++ b/test/tests/conf/namespace/namespace127.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns="default.com">
+
+  <!-- FileName: namespace127 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Have default namespace declared, request attribute in namespace
+    different from default. No prefix on attribute name. Processor must create a prefix. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="inner">
+      <xsl:attribute name="Attr0" namespace="testguys.com">true</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace128.xml b/test/tests/conf/namespace/namespace128.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace128.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace128.xsl b/test/tests/conf/namespace/namespace128.xsl
new file mode 100644
index 0000000..a9533f8
--- /dev/null
+++ b/test/tests/conf/namespace/namespace128.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns="default.com">
+
+  <!-- FileName: namespace128 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Have default namespace declared, request attribute in namespace
+    same as default. No prefix on attribute name. Processor must create a prefix. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="inner">
+      <xsl:attribute name="Attr0" namespace="default.com">true</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace13.xml b/test/tests/conf/namespace/namespace13.xml
new file mode 100644
index 0000000..a2ea7e6
--- /dev/null
+++ b/test/tests/conf/namespace/namespace13.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<doc>
+<a>1</a>
+<b>2</b>
+<c>3</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace13.xsl b/test/tests/conf/namespace/namespace13.xsl
new file mode 100644
index 0000000..e5eb5d2
--- /dev/null
+++ b/test/tests/conf/namespace/namespace13.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<ped:transform xmlns:ped="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<ped:import href="impnspc13.xsl"/>
+<ped:include href="incnspc13.xsl"/>
+
+<ped:output method="xml"/>
+
+  <!-- FileName: namespace13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Stylesheets are free to use any prefix, provided there is a namespace
+       declaration that binds the prefix to the URI of XSLT namespace. -->
+
+<ped:template match="doc">
+  <out>
+	<ped:value-of select="'Testing '"/>
+	<ped:for-each select="*">
+		<ped:value-of select="."/><ped:text> </ped:text>		
+	</ped:for-each>
+
+	<ped:call-template name="ThatTemp">
+		<ped:with-param name="sam">quos</ped:with-param>
+	</ped:call-template>
+
+	<ped:call-template name="ThatOtherTemp">
+		<ped:with-param name="sam">quos</ped:with-param>
+	</ped:call-template>
+
+	<ped:call-template name="ThatForthTemp">
+		<ped:with-param name="sam">quos</ped:with-param>
+	</ped:call-template>
+  </out>
+</ped:template>
+
+<ped:template name="ThatTemp">
+  <ped:param name="sam">bo</ped:param>
+	Orginal xmlns:ped <ped:copy-of select="$sam"/>
+</ped:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</ped:transform>
diff --git a/test/tests/conf/namespace/namespace130.xml b/test/tests/conf/namespace/namespace130.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace130.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace130.xsl b/test/tests/conf/namespace/namespace130.xsl
new file mode 100644
index 0000000..0676c62
--- /dev/null
+++ b/test/tests/conf/namespace/namespace130.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns="default.com">
+
+  <!-- FileName: namespace130 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Have default namespace declared, request attribute in namespace
+    same as default. New prefix on attribute name. Processor must create a prefix. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="inner">
+      <xsl:attribute name="p:attr2" namespace="default.com">true</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace131.xml b/test/tests/conf/namespace/namespace131.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace131.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace131.xsl b/test/tests/conf/namespace/namespace131.xsl
new file mode 100644
index 0000000..cd97f8d
--- /dev/null
+++ b/test/tests/conf/namespace/namespace131.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns="default.com">
+
+  <!-- FileName: namespace131 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Have default namespace declared, request attribute in namespace
+    different from default. New prefix on attribute name. Processor must create a prefix. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="inner">
+      <xsl:attribute name="p:attr2" namespace="testguys.com">true</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace132.xml b/test/tests/conf/namespace/namespace132.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace132.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace132.xsl b/test/tests/conf/namespace/namespace132.xsl
new file mode 100644
index 0000000..4e745c4
--- /dev/null
+++ b/test/tests/conf/namespace/namespace132.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:pfix="party.com">
+
+  <!-- FileName: namespace132 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Declare prefixed namespace at stylesheet level, then use prefix in attribute
+    name only. No namespace nor xmlns on xsl:attribute itself. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="inner">
+      <xsl:attribute name="pfix:nuts">pecan</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace134.xml b/test/tests/conf/namespace/namespace134.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace134.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace134.xsl b/test/tests/conf/namespace/namespace134.xsl
new file mode 100644
index 0000000..247eac4
--- /dev/null
+++ b/test/tests/conf/namespace/namespace134.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:pfix="party.com">
+
+  <!-- FileName: namespace134 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Declare prefixed namespace at stylesheet level, then use another prefix in
+    attribute name, but same namespace. New namespace-decl must be issued, or change prefix. -->
+  <!-- This test raises another facet of the issue of supplied prefixes on the attribute
+    name. Processor developers could disagree about whether the combination of a prefixed
+    name and an explicit namespace attribute with a URI signals a request from the
+    stylesheet to generate a namespace declaration, even when the requested URI is already
+    available to apply to the attribute simply by using a different prefix. In other words,
+    does the stylesheet really want to ensure that an xmlns:other declaration is issued? -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="inner">
+      <xsl:attribute name="other:nuts" namespace="party.com">almond</xsl:attribute>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace137.xml b/test/tests/conf/namespace/namespace137.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace137.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace137.xsl b/test/tests/conf/namespace/namespace137.xsl
new file mode 100644
index 0000000..8d5c598
--- /dev/null
+++ b/test/tests/conf/namespace/namespace137.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace137 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Santiago Pericas-Geertsen -->
+  <!-- Purpose: Test for resetting of an unspecified default namespace by copy-of. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match = "/">
+  <!-- create an RTF with no namespace nodes -->
+  <xsl:variable name="x"><hello/></xsl:variable>
+  <out>
+    <xsl:element name="literalName" namespace="http://literalURI">
+      <xsl:copy-of select="$x"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace138.xml b/test/tests/conf/namespace/namespace138.xml
new file mode 100644
index 0000000..3d7e776
--- /dev/null
+++ b/test/tests/conf/namespace/namespace138.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <n:a xmlns:n="http://example.com">content</n:a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace138.xsl b/test/tests/conf/namespace/namespace138.xsl
new file mode 100644
index 0000000..c0f74b7
--- /dev/null
+++ b/test/tests/conf/namespace/namespace138.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:n="http://ns.test.com">
+
+  <!-- FileName: namespace138 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for resetting of a namespace prefix by copy-of. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match = "/">
+  <out>
+    <xsl:text>
+</xsl:text>
+    <n:x>from stylesheet</n:x>
+    <xsl:text>
+</xsl:text>
+    <xsl:element name="e" namespace="http://literalURI">
+      <xsl:copy-of select="doc/*"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace139.xml b/test/tests/conf/namespace/namespace139.xml
new file mode 100644
index 0000000..3d7e776
--- /dev/null
+++ b/test/tests/conf/namespace/namespace139.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <n:a xmlns:n="http://example.com">content</n:a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace139.xsl b/test/tests/conf/namespace/namespace139.xsl
new file mode 100644
index 0000000..2150919
--- /dev/null
+++ b/test/tests/conf/namespace/namespace139.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:n="http://ns.test.com"
+  xmlns:s="http://example.com">
+
+  <!-- FileName: namespace139 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test copying of a namespace node by copy-of. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match = "/">
+  <out>
+    <xsl:text>
+</xsl:text>
+    <n:x>from stylesheet</n:x>
+    <xsl:text>
+</xsl:text>
+    <xsl:element name="e" namespace="http://literalURI">
+      <xsl:copy-of select="doc/s:a"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace14.xml b/test/tests/conf/namespace/namespace14.xml
new file mode 100644
index 0000000..a2ea7e6
--- /dev/null
+++ b/test/tests/conf/namespace/namespace14.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<doc>
+<a>1</a>
+<b>2</b>
+<c>3</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace14.xsl b/test/tests/conf/namespace/namespace14.xsl
new file mode 100644
index 0000000..a379d59
--- /dev/null
+++ b/test/tests/conf/namespace/namespace14.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<ped:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:ped="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<ped:output method="xml"/>
+<ped:key name="tk" match="xyz" use="zyx"/>
+<xsl:variable name="joe">2</xsl:variable>
+<ped:param name="sam" select="' x 4'"/>
+
+  <!-- FileName: namespace14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Have more than one prefix bound to the URI of XSLT namespace. -->
+
+<ped:template match="doc">
+  <out>
+    <ped:value-of select="'Testing '"/>
+    <xsl:for-each select="*">
+      <ped:value-of select="."/><ped:text> </ped:text>
+    </xsl:for-each>
+
+    <ped:text>&#010;</ped:text>
+    <xsl:value-of select="$joe"/>
+    <ped:value-of select="$sam"/>
+
+    <ped:text>&#010;</ped:text>
+    <ped:call-template name="ThatTemp">
+      <ped:with-param name="sam">quos</ped:with-param>
+    </ped:call-template>
+
+    <xsl:text>&#010;</xsl:text>
+    <xsl:call-template name="ThatTemp"/>
+  </out>
+</ped:template>
+
+<xsl:template name="ThatTemp">
+  <xsl:param name="sam">unchanged</xsl:param>
+  <ped:copy-of select="$sam"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</ped:stylesheet>
diff --git a/test/tests/conf/namespace/namespace140.xml b/test/tests/conf/namespace/namespace140.xml
new file mode 100644
index 0000000..836a255
--- /dev/null
+++ b/test/tests/conf/namespace/namespace140.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <noprefix>elementName</noprefix>
+  <prefix>someprefix:elementName</prefix>
+  <namespace>http://otherspace</namespace>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace140.xsl b/test/tests/conf/namespace/namespace140.xsl
new file mode 100644
index 0000000..715d97e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace140.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:someprefix="http://someURI">
+
+  <!-- FileName: namespace140 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: Santiago Pericas-Geertsen -->
+  <!-- Purpose: Check for AVT on element name when xsl:element has namespace attribute. -->
+
+<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <!-- Name is literal, no prefix, no namespace: see copy18 -->
+    <!-- Name is literal, no prefix, namespace: see namespace36 -->
+    <!-- Name is literal, prefix, no namespace: see namespace40  -->
+    <!-- Name is literal, prefix, namespace: see namespace56 -->
+
+    <!-- Name is AVT, no prefix, no namespace -->
+    <xsl:element name="{noprefix}"/>
+
+    <!-- Name is AVT, no prefix, namespace -->
+    <xsl:element name="{noprefix}" namespace="http://literalURI"/>
+
+    <!-- Name is AVT, prefix, no namespace -->
+    <xsl:element name="{prefix}"/>
+    <!-- It's just a string in the source tree, but prefix must be declared here in the stylesheet! -->
+
+    <!-- Name is AVT, prefix, namespace -->
+    <xsl:element name="{prefix}" namespace="http://literalURI"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace141.xml b/test/tests/conf/namespace/namespace141.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/namespace/namespace141.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace141.xsl b/test/tests/conf/namespace/namespace141.xsl
new file mode 100644
index 0000000..a7f6965
--- /dev/null
+++ b/test/tests/conf/namespace/namespace141.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace141 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Gordon Chiu -->
+  <!-- Purpose: Test for resetting of an unspecified default namespace by copy-of. -->
+  <!-- extended variant of namespace137 to check special cases -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match = "/">
+  <!-- create an RTF with a mix of namespaced and non-namespaced elements -->
+  <xsl:variable name="x">
+    <xsl:element name="hello1"/>
+    <xsl:element name="hello2" namespace="http://literalURI">
+      <xsl:element name="hiya" namespace=""/>
+    </xsl:element>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:element name="hello3" namespace="http://literalURI2">
+      <xsl:element name="yo1" namespace="http://literalURI"/>
+      <xsl:element name="yo2" namespace=""/>
+    </xsl:element>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:element name="hello4">
+      <xsl:element name="hey" namespace=""/>
+    </xsl:element>
+  </xsl:variable>
+  <!-- Now start an output tree, with a namespace node, and copy in the RTF -->
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:element name="literalName" namespace="http://literalURI">
+      <xsl:text>&#10;</xsl:text>
+      <xsl:copy-of select="$x"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace142.xml b/test/tests/conf/namespace/namespace142.xml
new file mode 100644
index 0000000..936923c
--- /dev/null
+++ b/test/tests/conf/namespace/namespace142.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc xmlns="http://example.com"/>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace142.xsl b/test/tests/conf/namespace/namespace142.xsl
new file mode 100644
index 0000000..d73096e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace142.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:pre="http://example.com"
+  exclude-result-prefixes="pre">
+
+  <!-- FileName: namespace142 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test name functions on default-namespace declaration. Should be null strings. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no" />
+
+<xsl:template match="pre:doc">
+  <out>
+    <xsl:value-of select="count(namespace::*[name(.)!='xml'])"/><xsl:text> namespace node qualifies:&#10;</xsl:text>
+    <xsl:text>name|</xsl:text><xsl:value-of select="name(namespace::*[name(.)!='xml'])"/><xsl:text>|</xsl:text>
+    <xsl:text>namespace-uri|</xsl:text><xsl:value-of select="namespace-uri(namespace::*[name(.)!='xml'])"/><xsl:text>|</xsl:text>
+    <xsl:text>local-name|</xsl:text><xsl:value-of select="local-name(namespace::*[name(.)!='xml'])"/><xsl:text>|</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace15.xml b/test/tests/conf/namespace/namespace15.xml
new file mode 100644
index 0000000..a2ea7e6
--- /dev/null
+++ b/test/tests/conf/namespace/namespace15.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<doc>
+<a>1</a>
+<b>2</b>
+<c>3</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace15.xsl b/test/tests/conf/namespace/namespace15.xsl
new file mode 100644
index 0000000..94a7be5
--- /dev/null
+++ b/test/tests/conf/namespace/namespace15.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+     xmlns:help="xsl.lotus.com/help">
+
+  <!-- FileName: namespace15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet Element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Stylesheet elements may contain any element not from the 
+       XSLT namespace, provided that the expanded name of the element has 
+       a non-null namespace URI. -->
+
+<help:Header comment="Header would go here"/>
+<help:TOC comment="Table of Contents"/>
+
+<help:Template comment="This is the main template" match="doc" process="children"/>
+<xsl:template match="doc">
+  <out>
+	<xsl:text>&#010;</xsl:text>
+	<xsl:value-of select="'Testing '"/>
+	<xsl:for-each select="*">
+		<xsl:value-of select="."/><xsl:text> </xsl:text>		
+	</xsl:for-each>
+
+	<xsl:call-template name="ThatTemp">
+		<xsl:with-param name="sam">quos</xsl:with-param>
+	</xsl:call-template>
+  </out>
+</xsl:template>
+
+<help:Template comment="Named template" match="*" process="children"/>
+<xsl:template name="ThatTemp">
+  <xsl:param name="sam">bo</xsl:param>
+  <xsl:copy-of select="$sam"/>
+</xsl:template>
+
+<help:Footer comment="Footer would go here"/>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace16.xml b/test/tests/conf/namespace/namespace16.xml
new file mode 100644
index 0000000..a2ea7e6
--- /dev/null
+++ b/test/tests/conf/namespace/namespace16.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<doc>
+<a>1</a>
+<b>2</b>
+<c>3</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace16.xsl b/test/tests/conf/namespace/namespace16.xsl
new file mode 100644
index 0000000..04e595f
--- /dev/null
+++ b/test/tests/conf/namespace/namespace16.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+        xmlns:help="http://foobar.com"
+        extension-element-prefixes="help">
+
+  <!-- FileName: namespace16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet Element -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: XSLT processor must ignore a top-level element without giving
+        and error if it does not recognize the namespace URI. The prefix used
+        must still resolve to a URI; but that URI may not be known. -->
+
+<help:Header comment="Header would go here"/>
+<help:TOC comment="Table of Contents"/>
+<help:template comment="This is the main template" match="doc" process="children"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="'Testing '"/>
+    <xsl:for-each select="*">
+      <xsl:value-of select="."/><xsl:text> </xsl:text>		
+    </xsl:for-each>
+    <xsl:call-template name="ThatTemp">
+      <xsl:with-param name="sam">quos</xsl:with-param>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<help:template comment="Named template" match="*" name="ThatTemp" process="children"/>
+
+<xsl:template name="ThatTemp">
+  <xsl:param name="sam">bo</xsl:param>
+  <xsl:copy-of select="$sam"/>
+</xsl:template>
+
+<help:Footer comment="Footer would go here"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace17.xml b/test/tests/conf/namespace/namespace17.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace17.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace17.xsl b/test/tests/conf/namespace/namespace17.xsl
new file mode 100644
index 0000000..db24045
--- /dev/null
+++ b/test/tests/conf/namespace/namespace17.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:anamespace="foo.com"
+      exclude-result-prefixes="anamespace">
+
+<xsl:output indent="yes"/>
+
+  <!-- FileName: namespace17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:exclude-result-prefixes, stylesheet level -->
+
+<xsl:template match="/">
+  <out>
+    <p><xsl:attribute name="test" namespace="foo.com">true</xsl:attribute></p>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace18.xml b/test/tests/conf/namespace/namespace18.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/namespace/namespace18.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace18.xsl b/test/tests/conf/namespace/namespace18.xsl
new file mode 100644
index 0000000..f3494cc
--- /dev/null
+++ b/test/tests/conf/namespace/namespace18.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test exclude-result-prefixes, attribute level -->
+
+<xsl:template match="/">
+  <out xmlns:anamespace="foo.com"  xsl:exclude-result-prefixes="anamespace">
+    <p>
+      <xsl:attribute name="test" namespace="foo2.com">true</xsl:attribute>
+    </p>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace19.xml b/test/tests/conf/namespace/namespace19.xml
new file mode 100644
index 0000000..c75e225
--- /dev/null
+++ b/test/tests/conf/namespace/namespace19.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<elements>
+<block>h1</block>
+</elements>
diff --git a/test/tests/conf/namespace/namespace19.xsl b/test/tests/conf/namespace/namespace19.xsl
new file mode 100644
index 0000000..3e0078e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace19.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias">
+
+<xsl:output method="xml" indent="no"/>
+
+  <!-- FileName: namespace19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test basic functionality of namespace-alias. Where XSL elements
+       are created by using Literal Result Elements. namespace24 is very similar, but
+       it creates the axsl:stylesheet element via xsl:element. -->
+
+<xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
+
+<xsl:template match="/">
+  <axsl:stylesheet version="1.0">
+    <xsl:apply-templates/>
+  </axsl:stylesheet>
+</xsl:template>
+
+<xsl:template match="block">
+  <axsl:template match="{.}">
+     <axsl:apply-templates/>
+  </axsl:template>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace20.xml b/test/tests/conf/namespace/namespace20.xml
new file mode 100644
index 0000000..b809cfb
--- /dev/null
+++ b/test/tests/conf/namespace/namespace20.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  boo
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace20.xsl b/test/tests/conf/namespace/namespace20.xsl
new file mode 100644
index 0000000..62d4079
--- /dev/null
+++ b/test/tests/conf/namespace/namespace20.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+		xmlns:ped="ped.com"
+		xmlns:bdd="bdd.com"
+		xmlns="bubba.com"
+	exclude-result-prefixes="ped #default">
+
+  <!-- FileName: namespace20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test exclude-result-prefixes. -->
+
+<xsl:template match="doc">
+  <out><xsl:text>&#010;</xsl:text>
+    <xsl:for-each select='document("")//ped:test'><xsl:copy/><xsl:text>&#010;</xsl:text></xsl:for-each>
+    <xsl:for-each select='document("")//bdd:test'><xsl:copy/><xsl:text>&#010;</xsl:text></xsl:for-each>
+    <test>Test5</test>
+    <test xmlns="missing.com">Test6</test><xsl:text>&#010;</xsl:text>
+  </out>
+</xsl:template>
+
+<ped:test>Test1</ped:test>
+<test xmlns="ped.com">Test2</test>
+<ped:test xmlns:ped="ped2.com">Test3</ped:test>
+<bdd:test>Test4</bdd:test>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace21.xml b/test/tests/conf/namespace/namespace21.xml
new file mode 100644
index 0000000..b122339
--- /dev/null
+++ b/test/tests/conf/namespace/namespace21.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns:xem="http://www.psol.com/xtension/1.0">
+  <foo>xyz</foo>
+  <xem:foo>www.psol.com</xem:foo>
+  <foo>zyx</foo>
+</doc>
diff --git a/test/tests/conf/namespace/namespace21.xsl b/test/tests/conf/namespace/namespace21.xsl
new file mode 100644
index 0000000..83b2d47
--- /dev/null
+++ b/test/tests/conf/namespace/namespace21.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+   xmlns:em="http://www.psol.com/xtension/1.0"
+   xmlns="http://www.w3.org/TR/REC-html40">
+
+<!-- FileName: namespace21-->
+<!-- Document: http://www.w3.org/TR/xpath -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: Namespace Test  -->
+<!-- Creator: Paul Dick -->
+<!-- Purpose: Match namespace between stylesheet, in a select, and input.
+     Prefixes differ but the URIs are the same. -->
+
+<xsl:template match = "doc">
+  <out>
+    <xsl:for-each select="em:foo">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace22.xml b/test/tests/conf/namespace/namespace22.xml
new file mode 100644
index 0000000..140f248
--- /dev/null
+++ b/test/tests/conf/namespace/namespace22.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
diff --git a/test/tests/conf/namespace/namespace22.xsl b/test/tests/conf/namespace/namespace22.xsl
new file mode 100644
index 0000000..83aedc4
--- /dev/null
+++ b/test/tests/conf/namespace/namespace22.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns="spacename.com">
+
+  <!-- FileName: namespace22-->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1 Creating Elements (Namespace Node Inheritance) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Show how namespaces are inherited down to succeeding elements. -->
+
+<xsl:template match = "doc">
+  <out>
+    <xsl:text>&#010;</xsl:text>
+    <middle/>
+    <xsl:element name="element2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace23.xml b/test/tests/conf/namespace/namespace23.xml
new file mode 100644
index 0000000..51ea08e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace23.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<a>
+<b/>
+</a>
+<c/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace23.xsl b/test/tests/conf/namespace/namespace23.xsl
new file mode 100644
index 0000000..2a7cf00
--- /dev/null
+++ b/test/tests/conf/namespace/namespace23.xsl
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:bogus="http://www.bogus_ns.com"
+      xmlns:lotus="http://www.lotus.com"
+      xmlns:ped="www.ped.com">
+
+  <!-- FileName: namespace23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose:  Testing an attribute not from the XSLT namespace, which is
+       legal provided that the expanded name of the attribute has a non-null 
+       namespace URI. This tests for many xslt elements, apparent code path 
+       are different for numerous elements. Should actually output a "bogus"
+       stylesheet. -->
+
+<xsl:import href="test1.xsl"  ped:a="a"/>
+<xsl:include href="test2.xsl" ped:b="b"/>
+<xsl:output method="xml" indent="yes" lotus:c="c"/>
+
+<xsl:key name="sprtest" match="TestID" use="Name" lotus:d="d"/>
+
+<xsl:strip-space elements="a" ped:e="e"/>
+<xsl:preserve-space elements="b" lotus:f="f"/>
+
+<xsl:variable name="Var1" ped:g="g">
+DefaultValueOfVar1
+</xsl:variable>
+
+<xsl:param name="Param1" lotus:h="h">
+DefaultValueOfParam1
+</xsl:param>
+
+<xsl:attribute-set name="my-style" ped:i="i">
+  <xsl:attribute name="my-size" lotus:j="j">12pt</xsl:attribute>
+  <xsl:attribute name="my-weight">bold</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:namespace-alias stylesheet-prefix="bogus" result-prefix="xsl" ped:k="k"/>
+<xsl:decimal-format decimal-separator="," grouping-separator=" " lotus:l="l" />
+
+<xsl:template match="/">
+  <bogus:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+	<bogus:template match="/">
+	  <out>
+		Yeee ha
+      </out>
+	</bogus:template>
+  </bogus:stylesheet>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace24.xml b/test/tests/conf/namespace/namespace24.xml
new file mode 100644
index 0000000..c75e225
--- /dev/null
+++ b/test/tests/conf/namespace/namespace24.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<elements>
+<block>h1</block>
+</elements>
diff --git a/test/tests/conf/namespace/namespace24.xsl b/test/tests/conf/namespace/namespace24.xsl
new file mode 100644
index 0000000..8e98f31
--- /dev/null
+++ b/test/tests/conf/namespace/namespace24.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias">
+
+<xsl:output method="xml" indent="no"/>
+
+  <!-- FileName: nspc24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991118 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test basic functionality of namespace-alias. Where XSL elements
+       are created by using xsl:element command. -->
+
+<xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
+
+<xsl:template match="/">
+  <xsl:element name="axsl:stylesheet">
+  	<xsl:attribute name="version">1.0</xsl:attribute>
+    <xsl:apply-templates/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="block">
+  <axsl:template match="{.}">
+     <axsl:apply-templates/>
+  </axsl:template>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace25.xml b/test/tests/conf/namespace/namespace25.xml
new file mode 100644
index 0000000..2d30193
--- /dev/null
+++ b/test/tests/conf/namespace/namespace25.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<foo/>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace25.xsl b/test/tests/conf/namespace/namespace25.xsl
new file mode 100644
index 0000000..bef8200
--- /dev/null
+++ b/test/tests/conf/namespace/namespace25.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:foo="aaa">
+
+  <!-- FileName: namespace25 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Simple case of creating LRE with nested namespace declarations. -->
+
+<xsl:template match="/">
+    <foo:stuff xmlns:foo="bbb">
+      <foo:stuff xmlns:foo="ccc"/>
+    </foo:stuff>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace26.xml b/test/tests/conf/namespace/namespace26.xml
new file mode 100644
index 0000000..b08aff2
--- /dev/null
+++ b/test/tests/conf/namespace/namespace26.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+  <ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+  <b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace26.xsl b/test/tests/conf/namespace/namespace26.xsl
new file mode 100644
index 0000000..a45b1de
--- /dev/null
+++ b/test/tests/conf/namespace/namespace26.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespace26 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'local-name()' with zero arguments. -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="local-name()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace27.xml b/test/tests/conf/namespace/namespace27.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/namespace/namespace27.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace27.xsl b/test/tests/conf/namespace/namespace27.xsl
new file mode 100644
index 0000000..917c76c
--- /dev/null
+++ b/test/tests/conf/namespace/namespace27.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespace27 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'namespace-uri()' with no arguments. -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="namespace-uri()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace28.xml b/test/tests/conf/namespace/namespace28.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/namespace/namespace28.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace28.xsl b/test/tests/conf/namespace/namespace28.xsl
new file mode 100644
index 0000000..6333779
--- /dev/null
+++ b/test/tests/conf/namespace/namespace28.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace28 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Purpose: Test of local-name and name() on namespace axis. -->
+  <!-- Creator: David Marston -->
+  <!-- The local-name() function should work on this axis, returning the same value as name().
+     The XML parser has freedom to present namespaces in any order it wants.
+     The input should have only one namespace if you want consistent results across parsers. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="local-name(namespace::*[1])"/>
+    <xsl:text>=</xsl:text>
+    <xsl:value-of select="local-name(namespace::*[1])"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace29.xml b/test/tests/conf/namespace/namespace29.xml
new file mode 100644
index 0000000..0bf0183
--- /dev/null
+++ b/test/tests/conf/namespace/namespace29.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<?a-pi some data?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace29.xsl b/test/tests/conf/namespace/namespace29.xsl
new file mode 100644
index 0000000..b3a08ed
--- /dev/null
+++ b/test/tests/conf/namespace/namespace29.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace29 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test name functions on processing instructions. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="./processing-instruction()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  <xsl:text>name|</xsl:text><xsl:value-of select="name()"/><xsl:text>|</xsl:text>
+  <xsl:text>namespace-uri|</xsl:text><xsl:value-of select="namespace-uri()"/><xsl:text>|</xsl:text>
+  <xsl:text>local-name|</xsl:text><xsl:value-of select="local-name()"/><xsl:text>|</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace30.xml b/test/tests/conf/namespace/namespace30.xml
new file mode 100644
index 0000000..48c3294
--- /dev/null
+++ b/test/tests/conf/namespace/namespace30.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <!-- This is the 1st comment -->
+  text-in-doc
+  <inner>
+    inner-text
+    <!-- This is the 2nd comment -->
+    <sub>subtext</sub>
+  </inner>
+  text-in-doc2
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace30.xsl b/test/tests/conf/namespace/namespace30.xsl
new file mode 100644
index 0000000..7fe813b
--- /dev/null
+++ b/test/tests/conf/namespace/namespace30.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace30 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test name functions on comments. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select=".//comment()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:text>
+name|</xsl:text><xsl:value-of select="name()"/><xsl:text>|</xsl:text>
+  <xsl:text>namespace-uri|</xsl:text><xsl:value-of select="namespace-uri()"/><xsl:text>|</xsl:text>
+  <xsl:text>local-name|</xsl:text><xsl:value-of select="local-name()"/><xsl:text>|</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace31.xml b/test/tests/conf/namespace/namespace31.xml
new file mode 100644
index 0000000..083abf1
--- /dev/null
+++ b/test/tests/conf/namespace/namespace31.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  text-in-doc
+  <inner>
+    inner-text
+    <sub>subtext</sub>
+  </inner>
+  text-in-doc2
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace31.xsl b/test/tests/conf/namespace/namespace31.xsl
new file mode 100644
index 0000000..885b495
--- /dev/null
+++ b/test/tests/conf/namespace/namespace31.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace31 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test name functions on text nodes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select=".//text()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>
+name|</xsl:text><xsl:value-of select="name()"/><xsl:text>|</xsl:text>
+  <xsl:text>namespace-uri|</xsl:text><xsl:value-of select="namespace-uri()"/><xsl:text>|</xsl:text>
+  <xsl:text>local-name|</xsl:text><xsl:value-of select="local-name()"/><xsl:text>|</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace32.xml b/test/tests/conf/namespace/namespace32.xml
new file mode 100644
index 0000000..4099d01
--- /dev/null
+++ b/test/tests/conf/namespace/namespace32.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<a xmlns="test"
+ xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
+</a>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace32.xsl b/test/tests/conf/namespace/namespace32.xsl
new file mode 100644
index 0000000..247cb53
--- /dev/null
+++ b/test/tests/conf/namespace/namespace32.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:tst="test"
+                exclude-result-prefixes="tst">
+
+  <!-- FileName: namespace32 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of local-name() on default namespace declaration. -->
+
+<xsl:template match="/tst:a">
+  <out>
+   	<xsl:value-of select="local-name(namespace::*[string()='http://www.w3.org/1999/XMLSchema-instance'])"/>,
+<xsl:value-of select="local-name(namespace::*[string()='test'])"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace33.xml b/test/tests/conf/namespace/namespace33.xml
new file mode 100644
index 0000000..71a300e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace33.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<docs>
+  <doc xmlns:ext="http://somebody.elses.extension">
+    <section xmlns:foo="http://foo.com">
+      <inner xmlns:whiz="http://whiz.com/special/page"/>
+    </section>
+  </doc>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace33.xsl b/test/tests/conf/namespace/namespace33.xsl
new file mode 100644
index 0000000..a24cc12
--- /dev/null
+++ b/test/tests/conf/namespace/namespace33.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: namespace33 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of namespace-uri() on namespaces. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>Namespaces for </xsl:text><xsl:value-of select="name(.)"/><xsl:text>:</xsl:text>
+  <xsl:for-each select="namespace::*">
+    <xsl:text>|</xsl:text><xsl:value-of select="namespace-uri(.)"/><xsl:text>;</xsl:text>
+  </xsl:for-each>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace34.xml b/test/tests/conf/namespace/namespace34.xml
new file mode 100644
index 0000000..4099d01
--- /dev/null
+++ b/test/tests/conf/namespace/namespace34.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<a xmlns="test"
+ xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
+</a>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace34.xsl b/test/tests/conf/namespace/namespace34.xsl
new file mode 100644
index 0000000..ab60313
--- /dev/null
+++ b/test/tests/conf/namespace/namespace34.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:tst="test"
+      exclude-result-prefixes="tst">
+
+  <!-- FileName: namespace34 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of namespace-uri() on default namespace declaration. -->
+  <!-- Part 4 of the Namespaces in XML spec says "The prefix xmlns is used only for
+     namespace bindings and is not itself bound to any namespace name. -->
+
+<xsl:template match="/tst:a">
+  <out>
+   <xsl:value-of select="namespace-uri(namespace::*[string()='http://www.w3.org/1999/XMLSchema-instance'])"/>,
+<xsl:value-of select="namespace-uri(namespace::*[string()='test'])"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace35.xml b/test/tests/conf/namespace/namespace35.xml
new file mode 100644
index 0000000..51d2c27
--- /dev/null
+++ b/test/tests/conf/namespace/namespace35.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+
+<thisisroot>
+</thisisroot>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace35.xsl b/test/tests/conf/namespace/namespace35.xsl
new file mode 100644
index 0000000..bb51afc
--- /dev/null
+++ b/test/tests/conf/namespace/namespace35.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
+  version="1.0">
+
+<xsl:namespace-alias result-prefix="xsl" stylesheet-prefix="axsl" />
+<xsl:output method="xml" indent="yes"/>
+
+  <!-- FileName: namespace35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Get xmlns declaration attached to outermost LRE.
+     Prefix "axsl" should also be literal. -->
+
+<xsl:template match="/">
+  <axsl:template match="/"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace36.xml b/test/tests/conf/namespace/namespace36.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace36.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace36.xsl b/test/tests/conf/namespace/namespace36.xsl
new file mode 100644
index 0000000..fa257c2
--- /dev/null
+++ b/test/tests/conf/namespace/namespace36.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for resetting of the unspecified default namespace by a contained xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element namespace="abc" name="foo">
+      <xsl:element name="yyy"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace37.xml b/test/tests/conf/namespace/namespace37.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace37.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace37.xsl b/test/tests/conf/namespace/namespace37.xsl
new file mode 100644
index 0000000..c69f483
--- /dev/null
+++ b/test/tests/conf/namespace/namespace37.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for resetting of a specified default namespace. -->
+
+<xsl:template match = "/">
+  <out xmlns="xyz">
+    <xsl:element namespace="abc" name="foo">
+      <xsl:element name="yyy"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace38.xml b/test/tests/conf/namespace/namespace38.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace38.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace38.xsl b/test/tests/conf/namespace/namespace38.xsl
new file mode 100644
index 0000000..945d625
--- /dev/null
+++ b/test/tests/conf/namespace/namespace38.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for resetting of a specified default namespace by a LRE. -->
+
+<xsl:template match = "/">
+  <out xmlns="xyz">
+    <xsl:element namespace="abc" name="foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace39.xml b/test/tests/conf/namespace/namespace39.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace39.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace39.xsl b/test/tests/conf/namespace/namespace39.xsl
new file mode 100644
index 0000000..8253c13
--- /dev/null
+++ b/test/tests/conf/namespace/namespace39.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace39 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for resetting of a prefixed namespace by a LRE. -->
+
+<xsl:template match = "/">
+  <out xmlns:baz="xyz">
+    <xsl:element namespace="abc" name="baz:foo">
+      <baz:yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace40.xml b/test/tests/conf/namespace/namespace40.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace40.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace40.xsl b/test/tests/conf/namespace/namespace40.xsl
new file mode 100644
index 0000000..42c25c5
--- /dev/null
+++ b/test/tests/conf/namespace/namespace40.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace40 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Discretionary: name="element-name-not-QName" choice="pass-through" -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for resetting of a prefixed namespace by a LRE. -->
+  <!-- Should see one warning about namespace "none" unresolvable.
+       Recovery: put yyy directly inside higher element (out). -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="none:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace41.xml b/test/tests/conf/namespace/namespace41.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace41.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace41.xsl b/test/tests/conf/namespace/namespace41.xsl
new file mode 100644
index 0000000..0ec470f
--- /dev/null
+++ b/test/tests/conf/namespace/namespace41.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace41 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for specification of an empty namespace. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element namespace="" name="foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace42.xml b/test/tests/conf/namespace/namespace42.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace42.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace42.xsl b/test/tests/conf/namespace/namespace42.xsl
new file mode 100644
index 0000000..f5ca07b
--- /dev/null
+++ b/test/tests/conf/namespace/namespace42.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace42 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test to make sure xsl:attribute isn't added to the containing 
+       element when an xsl:element is ignored. Should see a warning that xyz:foo 
+       was not created.	The <yyy/> element is placed directly within out, but the 
+       attribute isn't. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="xyz:foo">
+      <xsl:attribute name="baz"/>
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace43.xml b/test/tests/conf/namespace/namespace43.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace43.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace43.xsl b/test/tests/conf/namespace/namespace43.xsl
new file mode 100644
index 0000000..778233e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace43.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace43 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Discretionary: name="element-name-not-QName" choice="pass-through" -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for non-empty illegal element name. -->
+  <!-- Should see a warning about illegal element name. Recovery: put yyy directly in out. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="this is a string">
+      <yyy xmlns=""/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace44.xml b/test/tests/conf/namespace/namespace44.xml
new file mode 100644
index 0000000..ddd6a71
--- /dev/null
+++ b/test/tests/conf/namespace/namespace44.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding="ISO-8859-1"?>
+<one>
+  <two>
+    <three>drei</three>
+  </two>
+</one>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace44.xsl b/test/tests/conf/namespace/namespace44.xsl
new file mode 100644
index 0000000..6d847a9
--- /dev/null
+++ b/test/tests/conf/namespace/namespace44.xsl
@@ -0,0 +1,46 @@
+<?xml version='1.0' encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'
+                xmlns:fiscus="http://www.fiscus.de">
+
+  <!-- FileName: namespace44 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Philip Strube -->
+  <!-- Purpose: Create attribute with QName and namespace which restates same URI. -->
+
+<xsl:output method="xml"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:copy>
+    <xsl:attribute name="fiscus:objectID" namespace="http://www.fiscus.de">
+      <xsl:number level="any" count="*"/>
+    </xsl:attribute>
+    <xsl:apply-templates select="@*|node()|comment()|processing-instruction()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace45.xml b/test/tests/conf/namespace/namespace45.xml
new file mode 100644
index 0000000..ddd6a71
--- /dev/null
+++ b/test/tests/conf/namespace/namespace45.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding="ISO-8859-1"?>
+<one>
+  <two>
+    <three>drei</three>
+  </two>
+</one>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace45.xsl b/test/tests/conf/namespace/namespace45.xsl
new file mode 100644
index 0000000..b51131d
--- /dev/null
+++ b/test/tests/conf/namespace/namespace45.xsl
@@ -0,0 +1,46 @@
+<?xml version='1.0' encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'
+                xmlns:fiscus="http://www.fiscus.de">
+
+  <!-- FileName: namespace45 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Philip Strube -->
+  <!-- Purpose: Create attribute with QName whose prefix is known. -->
+
+<xsl:output method="xml"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:copy>
+    <xsl:attribute name="fiscus:objectID">
+      <xsl:number level="any" count="*"/>
+    </xsl:attribute>
+    <xsl:apply-templates select="@*|node()|comment()|processing-instruction()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace46.xml b/test/tests/conf/namespace/namespace46.xml
new file mode 100644
index 0000000..ddd6a71
--- /dev/null
+++ b/test/tests/conf/namespace/namespace46.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding="ISO-8859-1"?>
+<one>
+  <two>
+    <three>drei</three>
+  </two>
+</one>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace46.xsl b/test/tests/conf/namespace/namespace46.xsl
new file mode 100644
index 0000000..507e1ee
--- /dev/null
+++ b/test/tests/conf/namespace/namespace46.xsl
@@ -0,0 +1,46 @@
+<?xml version='1.0' encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
+
+  <!-- FileName: namespace46 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Philip Strube -->
+  <!-- Purpose: Create attribute with NCName and newly-introduced namespace. -->
+  <!-- Processor will have to invent a prefix because none has been established for that namespace. -->
+
+<xsl:output method="xml"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:copy>
+    <xsl:attribute name="objectID" namespace="http://www.fiscus.de">
+      <xsl:number level="any" count="*"/>
+    </xsl:attribute>
+    <xsl:apply-templates select="@*|node()|comment()|processing-instruction()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace47.xml b/test/tests/conf/namespace/namespace47.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace47.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace47.xsl b/test/tests/conf/namespace/namespace47.xsl
new file mode 100644
index 0000000..df01d5b
--- /dev/null
+++ b/test/tests/conf/namespace/namespace47.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace47 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: Scott Boag -->
+  <!-- Purpose: Test for resetting of an unspecified default namespace by a LRE. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element namespace="bug" name="foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace48.xml b/test/tests/conf/namespace/namespace48.xml
new file mode 100644
index 0000000..61accf8
--- /dev/null
+++ b/test/tests/conf/namespace/namespace48.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>x</doc>
diff --git a/test/tests/conf/namespace/namespace48.xsl b/test/tests/conf/namespace/namespace48.xsl
new file mode 100644
index 0000000..4b1cf0d
--- /dev/null
+++ b/test/tests/conf/namespace/namespace48.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+   xmlns:err="www.error.com">
+
+  <!-- FileName: namespace48 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Discretionary: name="element-name-not-QName" choice="pass-through" -->
+  <!-- Purpose: Test for error recovery when assigned name ends with : (has null local-part) -->
+
+<xsl:template match = "doc">
+  <out>
+    <xsl:element name="err:">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace49.xml b/test/tests/conf/namespace/namespace49.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace49.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace49.xsl b/test/tests/conf/namespace/namespace49.xsl
new file mode 100644
index 0000000..4369116
--- /dev/null
+++ b/test/tests/conf/namespace/namespace49.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.test.com">
+
+  <!-- FileName: namespace49 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Baseline test of xsl:element; stylesheet has namespace node. -->
+
+<xsl:template match="doc">
+ <out>
+  <xsl:element name="inner"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace50.xml b/test/tests/conf/namespace/namespace50.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace50.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace50.xsl b/test/tests/conf/namespace/namespace50.xsl
new file mode 100644
index 0000000..2a78307
--- /dev/null
+++ b/test/tests/conf/namespace/namespace50.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.test.com">
+
+  <!-- FileName: namespace50 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:element with namespace attribute; prefix known at stylesheet level. -->
+  <!-- Requested name with no prefix, so we probably get that. -->
+
+<xsl:template match="doc">
+ <out>
+  <xsl:element name="inner" namespace="http://www.test.com"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace51.xml b/test/tests/conf/namespace/namespace51.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace51.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace51.xsl b/test/tests/conf/namespace/namespace51.xsl
new file mode 100644
index 0000000..930d08a
--- /dev/null
+++ b/test/tests/conf/namespace/namespace51.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.test.com">
+
+  <!-- FileName: namespace51 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:element with namespace attribute, but namespace new at that point. -->
+  <!-- Requested name has no prefix, and we can get by without it. -->
+
+<xsl:template match="doc">
+ <out>
+  <xsl:element name="inner" namespace="http://www.bdd.com"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace52.xml b/test/tests/conf/namespace/namespace52.xml
new file mode 100644
index 0000000..d2ee20c
--- /dev/null
+++ b/test/tests/conf/namespace/namespace52.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<docs>
+  <a href="http://www.ped.com">Out1</a>
+  <b href="">Out2</b>
+  <c href="http://www.bdd.com">Out3</c>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace52.xsl b/test/tests/conf/namespace/namespace52.xsl
new file mode 100644
index 0000000..b96e483
--- /dev/null
+++ b/test/tests/conf/namespace/namespace52.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.ped.com">
+
+  <!-- FileName: namespace52 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:element with namespace in AVT, comes out as null string. -->
+
+<xsl:template match="/">
+ <out>
+   <xsl:element name="{docs/b}" namespace="{docs/b/@href}"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace53.xml b/test/tests/conf/namespace/namespace53.xml
new file mode 100644
index 0000000..d2ee20c
--- /dev/null
+++ b/test/tests/conf/namespace/namespace53.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<docs>
+  <a href="http://www.ped.com">Out1</a>
+  <b href="">Out2</b>
+  <c href="http://www.bdd.com">Out3</c>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace53.xsl b/test/tests/conf/namespace/namespace53.xsl
new file mode 100644
index 0000000..2e6c90a
--- /dev/null
+++ b/test/tests/conf/namespace/namespace53.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.ped.com">
+
+  <!-- FileName: namespace53 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:element with namespace that is AVT, URI matches one already in scope. -->
+  <!-- Requested name has no NS prefix, so we probably get just that. -->
+
+<xsl:template match="/">
+ <out>
+   <xsl:element name="{docs/a}" namespace="{docs/a/@href}"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace54.xml b/test/tests/conf/namespace/namespace54.xml
new file mode 100644
index 0000000..d2ee20c
--- /dev/null
+++ b/test/tests/conf/namespace/namespace54.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<docs>
+  <a href="http://www.ped.com">Out1</a>
+  <b href="">Out2</b>
+  <c href="http://www.bdd.com">Out3</c>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace54.xsl b/test/tests/conf/namespace/namespace54.xsl
new file mode 100644
index 0000000..e2494a0
--- /dev/null
+++ b/test/tests/conf/namespace/namespace54.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.ped.com">
+
+  <!-- FileName: namespace54 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Use xsl:element with a namespace that has AVT, introduces new namespace. -->
+
+<xsl:template match="/">
+ <out>
+   <xsl:element name="{docs/c}" namespace="{docs/c/@href}"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace55.xml b/test/tests/conf/namespace/namespace55.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace55.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace55.xsl b/test/tests/conf/namespace/namespace55.xsl
new file mode 100644
index 0000000..5761184
--- /dev/null
+++ b/test/tests/conf/namespace/namespace55.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace55 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Prefixed xmlns declaration and same-prefixed name; namespace matches default set locally. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p2:foo" namespace="other.com" xmlns="other.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace56.xml b/test/tests/conf/namespace/namespace56.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace56.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace56.xsl b/test/tests/conf/namespace/namespace56.xsl
new file mode 100644
index 0000000..7b79ca5
--- /dev/null
+++ b/test/tests/conf/namespace/namespace56.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace56 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for namespace attribute not (previously) tied to prefix. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="q:foo" namespace="http://testguys.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace57.xml b/test/tests/conf/namespace/namespace57.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace57.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace57.xsl b/test/tests/conf/namespace/namespace57.xsl
new file mode 100644
index 0000000..4bd28bb
--- /dev/null
+++ b/test/tests/conf/namespace/namespace57.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace57 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test what happens when namespace attrib is a known URI, but no prefixes involved. -->
+
+<xsl:template match = "/">
+  <out xmlns="abc">
+    <xsl:element namespace="abc" name="foo">
+      <xsl:element name="yyy"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace58.xml b/test/tests/conf/namespace/namespace58.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace58.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace58.xsl b/test/tests/conf/namespace/namespace58.xsl
new file mode 100644
index 0000000..e5a56fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace58.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="http://testguys.com">
+
+  <!-- FileName: namespace58 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for namespace attribute matching stylesheet default. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="q:foo" namespace="http://testguys.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace59.xml b/test/tests/conf/namespace/namespace59.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace59.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace59.xsl b/test/tests/conf/namespace/namespace59.xsl
new file mode 100644
index 0000000..aee2990
--- /dev/null
+++ b/test/tests/conf/namespace/namespace59.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="http://testguys.com">
+
+  <!-- FileName: namespace59 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for namespace attribute with new URI and prefix requested. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="q:foo" namespace="http://other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace60.xml b/test/tests/conf/namespace/namespace60.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace60.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace60.xsl b/test/tests/conf/namespace/namespace60.xsl
new file mode 100644
index 0000000..5c1e739
--- /dev/null
+++ b/test/tests/conf/namespace/namespace60.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com">
+
+  <!-- FileName: namespace60 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Discretionary: name="element-name-not-QName" choice="pass-through" -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for resetting of a prefixed namespace by a LRE; stylesheet default NS set. -->
+  <!-- Should see one warning about namespace "none" unresolvable.
+       Recovery: put yyy directly inside higher element (out). -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="none:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace61.xml b/test/tests/conf/namespace/namespace61.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace61.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace61.xsl b/test/tests/conf/namespace/namespace61.xsl
new file mode 100644
index 0000000..330fc47
--- /dev/null
+++ b/test/tests/conf/namespace/namespace61.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com">
+
+  <!-- FileName: namespace61 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for specification of an empty namespace; stylesheet default NS set. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element namespace="" name="foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace62.xml b/test/tests/conf/namespace/namespace62.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace62.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace62.xsl b/test/tests/conf/namespace/namespace62.xsl
new file mode 100644
index 0000000..f0938d1
--- /dev/null
+++ b/test/tests/conf/namespace/namespace62.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace62 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Two xmlns declarations with namespace attrib (matches default) in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" namespace="test.com" xmlns="test.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace63.xml b/test/tests/conf/namespace/namespace63.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace63.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace63.xsl b/test/tests/conf/namespace/namespace63.xsl
new file mode 100644
index 0000000..a1a42e7
--- /dev/null
+++ b/test/tests/conf/namespace/namespace63.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="http://testguys.com">
+
+  <!-- FileName: namespace63 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Reset default locally, but namespace attribute matches stylesheet default. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="q:foo" namespace="http://testguys.com" xmlns="other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace64.xml b/test/tests/conf/namespace/namespace64.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace64.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace64.xsl b/test/tests/conf/namespace/namespace64.xsl
new file mode 100644
index 0000000..b06a786
--- /dev/null
+++ b/test/tests/conf/namespace/namespace64.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:p1="testguys.com">
+
+  <!-- FileName: namespace64 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for prefixed name when prefixed NS is in scope; no namespace attrib. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p1:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace65.xml b/test/tests/conf/namespace/namespace65.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace65.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace65.xsl b/test/tests/conf/namespace/namespace65.xsl
new file mode 100644
index 0000000..070b74c
--- /dev/null
+++ b/test/tests/conf/namespace/namespace65.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace65 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test resetting prefix and URI to what they were anyway. -->
+
+<xsl:template match = "/">
+  <out xmlns:baz="xyz">
+    <xsl:element namespace="xyz" name="baz:foo">
+      <baz:yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace66.xml b/test/tests/conf/namespace/namespace66.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace66.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace66.xsl b/test/tests/conf/namespace/namespace66.xsl
new file mode 100644
index 0000000..7d77b51
--- /dev/null
+++ b/test/tests/conf/namespace/namespace66.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace66 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test resetting of a prefix to same URI as known prefix. -->
+
+<xsl:template match = "/">
+  <out xmlns:p1="xyz">
+    <xsl:element namespace="xyz" name="baz:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace67.xml b/test/tests/conf/namespace/namespace67.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace67.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace67.xsl b/test/tests/conf/namespace/namespace67.xsl
new file mode 100644
index 0000000..26eb9fb
--- /dev/null
+++ b/test/tests/conf/namespace/namespace67.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="zilch.com" xmlns:p1="testguys.com">
+
+  <!-- FileName: namespace67 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for prefixed name when prefixed NS is in scope; also set default for stylesheet. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p1:foo">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace68.xml b/test/tests/conf/namespace/namespace68.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace68.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace68.xsl b/test/tests/conf/namespace/namespace68.xsl
new file mode 100644
index 0000000..d6d6118
--- /dev/null
+++ b/test/tests/conf/namespace/namespace68.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace68 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set default namespace in outer, then specify namespace for inner; add prefixed decl. -->
+
+<xsl:template match = "/">
+  <out xmlns="abc">
+    <xsl:element namespace="abc" name="foo" xmlns:p2="barz.com">
+      <xsl:element name="yyy"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace69.xml b/test/tests/conf/namespace/namespace69.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace69.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace69.xsl b/test/tests/conf/namespace/namespace69.xsl
new file mode 100644
index 0000000..365052f
--- /dev/null
+++ b/test/tests/conf/namespace/namespace69.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com">
+
+  <!-- FileName: namespace69 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed xmlns declaration with prefixed name; default was set. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p2:foo" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace70.xml b/test/tests/conf/namespace/namespace70.xml
new file mode 100644
index 0000000..422bca1
--- /dev/null
+++ b/test/tests/conf/namespace/namespace70.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>boo</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace70.xsl b/test/tests/conf/namespace/namespace70.xsl
new file mode 100644
index 0000000..8a0baf1
--- /dev/null
+++ b/test/tests/conf/namespace/namespace70.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+		xmlns:ped="bubba.com"
+		xmlns:bdd="bubba.com"
+		xmlns:bub="bubba.com"
+	exclude-result-prefixes="bub">
+
+  <!-- FileName: namespace70 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: When there two prefixes for an NS URI, exclude-result-prefixes of one prefix excludes all for that URI. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="."/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace71.xml b/test/tests/conf/namespace/namespace71.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace71.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace71.xsl b/test/tests/conf/namespace/namespace71.xsl
new file mode 100644
index 0000000..b8c4eb2
--- /dev/null
+++ b/test/tests/conf/namespace/namespace71.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace71 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Baseline case of an xmlns declaration in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" xmlns="">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace72.xml b/test/tests/conf/namespace/namespace72.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace72.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace72.xsl b/test/tests/conf/namespace/namespace72.xsl
new file mode 100644
index 0000000..fbdf3fb
--- /dev/null
+++ b/test/tests/conf/namespace/namespace72.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace72 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put both an unprefixed xmlns declaration and namespace attrib in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" namespace="zebie" xmlns="">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace73.xml b/test/tests/conf/namespace/namespace73.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace73.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace73.xsl b/test/tests/conf/namespace/namespace73.xsl
new file mode 100644
index 0000000..d6e713e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace73.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace73 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Discretionary: name="element-name-not-QName" choice="pass-through" -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put an unprefixed xmlns declaration in xsl:element where requested name has prefix. -->
+  <!-- Should see one warning about namespace "abc" unresolvable.
+       Recovery: put yyy directly inside higher element (out). -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="abc:foo" xmlns="">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace74.xml b/test/tests/conf/namespace/namespace74.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace74.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace74.xsl b/test/tests/conf/namespace/namespace74.xsl
new file mode 100644
index 0000000..3bc022b
--- /dev/null
+++ b/test/tests/conf/namespace/namespace74.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace74 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put both an unprefixed xmlns declaration and namespace attrib in; name has prefix. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="abc:foo" namespace="zebie" xmlns="">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace75.xml b/test/tests/conf/namespace/namespace75.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace75.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace75.xsl b/test/tests/conf/namespace/namespace75.xsl
new file mode 100644
index 0000000..da6e94e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace75.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace75 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Baseline case of a non-empty but unprefixed xmlns declaration in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" xmlns="test.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace77.xml b/test/tests/conf/namespace/namespace77.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace77.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace77.xsl b/test/tests/conf/namespace/namespace77.xsl
new file mode 100644
index 0000000..443d079
--- /dev/null
+++ b/test/tests/conf/namespace/namespace77.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace77 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Mix a non-empty xmlns declaration and namespace attrib (to same) in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" namespace="test.com" xmlns="test.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace78.xml b/test/tests/conf/namespace/namespace78.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace78.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace78.xsl b/test/tests/conf/namespace/namespace78.xsl
new file mode 100644
index 0000000..977b0ef
--- /dev/null
+++ b/test/tests/conf/namespace/namespace78.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace78 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Mix a non-empty xmlns declaration and namespace attrib (different URI) in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" namespace="abc.com" xmlns="test.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace79.xml b/test/tests/conf/namespace/namespace79.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace79.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace79.xsl b/test/tests/conf/namespace/namespace79.xsl
new file mode 100644
index 0000000..3742408
--- /dev/null
+++ b/test/tests/conf/namespace/namespace79.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace75 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Discretionary: name="element-name-not-QName" choice="pass-through" -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Have a non-empty but unprefixed xmlns declaration while specifying prefixed name. -->
+  <!-- Should see one warning about namespace "wxyz" unresolvable.
+       Recovery: put yyy directly inside higher element (out). -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="wxyz:foo" xmlns="test.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace80.xml b/test/tests/conf/namespace/namespace80.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace80.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace80.xsl b/test/tests/conf/namespace/namespace80.xsl
new file mode 100644
index 0000000..493eb7b
--- /dev/null
+++ b/test/tests/conf/namespace/namespace80.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace80 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Prefixed xmlns declaration and same-prefixed name; no namespace attrib; default set. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p2:foo" xmlns="other.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace81.xml b/test/tests/conf/namespace/namespace81.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace81.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace81.xsl b/test/tests/conf/namespace/namespace81.xsl
new file mode 100644
index 0000000..1e8f4f9
--- /dev/null
+++ b/test/tests/conf/namespace/namespace81.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace81 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Mix xmlns declaration and namespace attrib (to same) in xsl:element; name has prefix. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="wxyz:foo" namespace="test.com" xmlns="test.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace82.xml b/test/tests/conf/namespace/namespace82.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace82.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace82.xsl b/test/tests/conf/namespace/namespace82.xsl
new file mode 100644
index 0000000..820c953
--- /dev/null
+++ b/test/tests/conf/namespace/namespace82.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace82 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set xmlns declaration and namespace attrib to different URIs; name has prefix. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="wxyz:foo" namespace="abc.com" xmlns="test.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace83.xml b/test/tests/conf/namespace/namespace83.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace83.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace83.xsl b/test/tests/conf/namespace/namespace83.xsl
new file mode 100644
index 0000000..1c67d4f
--- /dev/null
+++ b/test/tests/conf/namespace/namespace83.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com">
+
+  <!-- FileName: namespace83 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed name; requested NS matches default rather than what's declared for that prefix. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p2:foo" namespace="testguys.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace84.xml b/test/tests/conf/namespace/namespace84.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace84.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace84.xsl b/test/tests/conf/namespace/namespace84.xsl
new file mode 100644
index 0000000..6aead36
--- /dev/null
+++ b/test/tests/conf/namespace/namespace84.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="testguys.com">
+
+  <!-- FileName: namespace84 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed name; requested NS matches default; another decl present. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="pre:foo" namespace="testguys.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace86.xml b/test/tests/conf/namespace/namespace86.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace86.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace86.xsl b/test/tests/conf/namespace/namespace86.xsl
new file mode 100644
index 0000000..af5c4b8
--- /dev/null
+++ b/test/tests/conf/namespace/namespace86.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace86 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test crossing prefix set locally with namespace from outer level (where it has other prefix). -->
+
+<xsl:template match = "/">
+  <out xmlns:p1="xyz">
+    <xsl:element namespace="xyz" name="p2:foo" xmlns:p2="other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace87.xml b/test/tests/conf/namespace/namespace87.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace87.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace87.xsl b/test/tests/conf/namespace/namespace87.xsl
new file mode 100644
index 0000000..118c62a
--- /dev/null
+++ b/test/tests/conf/namespace/namespace87.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="http://testguys.com">
+
+  <!-- FileName: namespace87 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Mix xmlns declaration and namespace attrib (to same) in xsl:element; name has prefix. -->
+  <!-- NOTE: Processor developers could legitimately disagree about where the default name
+     has to be set the 2nd time in the result. It must be correct for yyy, but could be reset for foo
+     as well. The spec doesn't address this point. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="wxyz:foo" namespace="test.com" xmlns="test.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace88.xml b/test/tests/conf/namespace/namespace88.xml
new file mode 100644
index 0000000..cee1312
--- /dev/null
+++ b/test/tests/conf/namespace/namespace88.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace88.xsl b/test/tests/conf/namespace/namespace88.xsl
new file mode 100644
index 0000000..b950230
--- /dev/null
+++ b/test/tests/conf/namespace/namespace88.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:ped="www.test.com">
+
+  <!-- FileName: namespace88 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use xsl:element with namespace attribute and default reset; prefix known at stylesheet level. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="inner" namespace="www.test.com" xmlns="">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace89.xml b/test/tests/conf/namespace/namespace89.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace89.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace89.xsl b/test/tests/conf/namespace/namespace89.xsl
new file mode 100644
index 0000000..002abae
--- /dev/null
+++ b/test/tests/conf/namespace/namespace89.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:a="foo.com">
+
+  <!-- FileName: namespace89 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that exclude-result-prefixes should NOT affect xsl:element (when prefix needed) -->
+
+<xsl:template match="/">
+  <out xmlns:b="barz.com" xsl:exclude-result-prefixes="a b">
+    <xsl:element name="b:mid">
+      <xsl:element name="a:inner"/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace90.xml b/test/tests/conf/namespace/namespace90.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace90.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace90.xsl b/test/tests/conf/namespace/namespace90.xsl
new file mode 100644
index 0000000..0b3f17b
--- /dev/null
+++ b/test/tests/conf/namespace/namespace90.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace90 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test crossing prefix set at outer level with URI also attached to different prefix in local decl. -->
+
+<xsl:template match = "/">
+  <out xmlns:p1="xyz">
+    <xsl:element name="p1:foo" namespace="barz.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace91.xml b/test/tests/conf/namespace/namespace91.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace91.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace91.xsl b/test/tests/conf/namespace/namespace91.xsl
new file mode 100644
index 0000000..f97d13e
--- /dev/null
+++ b/test/tests/conf/namespace/namespace91.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace91 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Baseline case of prefixed xmlns declaration in xsl:element. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace92.xml b/test/tests/conf/namespace/namespace92.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace92.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace92.xsl b/test/tests/conf/namespace/namespace92.xsl
new file mode 100644
index 0000000..8cd4a13
--- /dev/null
+++ b/test/tests/conf/namespace/namespace92.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace92 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed xmlns declaration with null namespace attrib. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" namespace="" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace93.xml b/test/tests/conf/namespace/namespace93.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace93.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace93.xsl b/test/tests/conf/namespace/namespace93.xsl
new file mode 100644
index 0000000..e852aa5
--- /dev/null
+++ b/test/tests/conf/namespace/namespace93.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace93 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed xmlns declaration with non-null namespace attrib, different URIs. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" namespace="testguys.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace94.xml b/test/tests/conf/namespace/namespace94.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace94.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace94.xsl b/test/tests/conf/namespace/namespace94.xsl
new file mode 100644
index 0000000..6356b4b
--- /dev/null
+++ b/test/tests/conf/namespace/namespace94.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace94 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed xmlns declaration with non-null namespace attrib, same URI. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="foo" namespace="barz.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace95.xml b/test/tests/conf/namespace/namespace95.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace95.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace95.xsl b/test/tests/conf/namespace/namespace95.xsl
new file mode 100644
index 0000000..30f7bc5
--- /dev/null
+++ b/test/tests/conf/namespace/namespace95.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace95 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Prefixed xmlns declaration and same-prefixed name; no namespace attrib. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p2:foo" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace96.xml b/test/tests/conf/namespace/namespace96.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace96.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace96.xsl b/test/tests/conf/namespace/namespace96.xsl
new file mode 100644
index 0000000..6482201
--- /dev/null
+++ b/test/tests/conf/namespace/namespace96.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:p1="testguys.com">
+
+  <!-- FileName: namespace96 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Issue prefixed name in current default namespace, rather than the one assigned to tha prefix at outer level -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p1:foo" namespace="other.com" xmlns="other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace97.xml b/test/tests/conf/namespace/namespace97.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace97.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace97.xsl b/test/tests/conf/namespace/namespace97.xsl
new file mode 100644
index 0000000..32546e3
--- /dev/null
+++ b/test/tests/conf/namespace/namespace97.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:p1="testguys.com">
+
+  <!-- FileName: namespace97 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for prefixed name when prefixed NS is in scope; also set default locally. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p1:foo" xmlns="other.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace98.xml b/test/tests/conf/namespace/namespace98.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace98.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace98.xsl b/test/tests/conf/namespace/namespace98.xsl
new file mode 100644
index 0000000..774eae7
--- /dev/null
+++ b/test/tests/conf/namespace/namespace98.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace98 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed xmlns declaration with non-null namespace attrib, same URI and prefix. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p2:foo" namespace="barz.com" xmlns:p2="barz.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/namespace99.xml b/test/tests/conf/namespace/namespace99.xml
new file mode 100644
index 0000000..80387fa
--- /dev/null
+++ b/test/tests/conf/namespace/namespace99.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>x</doc>
\ No newline at end of file
diff --git a/test/tests/conf/namespace/namespace99.xsl b/test/tests/conf/namespace/namespace99.xsl
new file mode 100644
index 0000000..118c089
--- /dev/null
+++ b/test/tests/conf/namespace/namespace99.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace99 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use prefixed xmlns declaration, namespace attrib sets different URI of that prefix. -->
+
+<xsl:template match = "/">
+  <out>
+    <xsl:element name="p2:foo" namespace="barz.com" xmlns:p2="testguys.com">
+      <yyy/>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/test1.xsl b/test/tests/conf/namespace/test1.xsl
new file mode 100644
index 0000000..2458508
--- /dev/null
+++ b/test/tests/conf/namespace/test1.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: test1 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Purpose:  Used by nspc23. -->
+
+<xsl:template match="/">
+  <test1/>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/namespace/test2.xsl b/test/tests/conf/namespace/test2.xsl
new file mode 100644
index 0000000..be49a92
--- /dev/null
+++ b/test/tests/conf/namespace/test2.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: test2 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Purpose:  Used by nspc23. -->
+
+<xsl:template match="/">
+  <test2/>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node01.xml b/test/tests/conf/node/node01.xml
new file mode 100644
index 0000000..e73a7d6
--- /dev/null
+++ b/test/tests/conf/node/node01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node01.xsl b/test/tests/conf/node/node01.xsl
new file mode 100644
index 0000000..62ee900
--- /dev/null
+++ b/test/tests/conf/node/node01.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for text() node test. -->
+
+<!-- Should say "test" -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:value-of select="./text()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node02.xml b/test/tests/conf/node/node02.xml
new file mode 100644
index 0000000..97eb438
--- /dev/null
+++ b/test/tests/conf/node/node02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <!-- This is a comment -->
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node02.xsl b/test/tests/conf/node/node02.xsl
new file mode 100644
index 0000000..24b6940
--- /dev/null
+++ b/test/tests/conf/node/node02.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 Node Tests -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for comment() node test. -->
+
+<xsl:template match="/doc">
+  <out>      
+    <xsl:apply-templates select="./comment()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:text>Found-comment</xsl:text>
+  <xsl:copy/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node03.xml b/test/tests/conf/node/node03.xml
new file mode 100644
index 0000000..853e15a
--- /dev/null
+++ b/test/tests/conf/node/node03.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<?a-pi some data?>
+<doc>
+  <!-- This is a comment -->
+    test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node03.xsl b/test/tests/conf/node/node03.xsl
new file mode 100644
index 0000000..4d57e36
--- /dev/null
+++ b/test/tests/conf/node/node03.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for processing-instruction() node test. -->
+
+<!-- should say "Found-pi,,Found-pi" -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="./processing-instruction('a-pi')"/>
+    <xsl:apply-templates select="./processing-instruction('*')"/>   
+    <xsl:apply-templates select="./processing-instruction()"/>	
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction('a-pi')">
+  <xsl:text>Found-pi:</xsl:text>
+  <xsl:value-of select="name()"/>
+  <xsl:copy/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node04.xml b/test/tests/conf/node/node04.xml
new file mode 100644
index 0000000..43ba02c
--- /dev/null
+++ b/test/tests/conf/node/node04.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc xmlns:ns1="http://xsl.lotus.com/ns1"
+     xmlns="http://xsl.lotus.com/ns2">
+  <ns1:a attrib1="test"/>
+  <b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node04.xsl b/test/tests/conf/node/node04.xsl
new file mode 100644
index 0000000..47adaa1
--- /dev/null
+++ b/test/tests/conf/node/node04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: node04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of 'local-name()'  -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="local-name(baz1:a)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node05.xml b/test/tests/conf/node/node05.xml
new file mode 100644
index 0000000..8ece442
--- /dev/null
+++ b/test/tests/conf/node/node05.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc xmlns:ns1="http://xsl.lotus.com/ns1" 
+     xmlns="http://xsl.lotus.com/ns2">
+<ns1:a attrib1="test"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node05.xsl b/test/tests/conf/node/node05.xsl
new file mode 100644
index 0000000..0984ab1
--- /dev/null
+++ b/test/tests/conf/node/node05.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: node05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of 'namespace-uri()'  -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="namespace-uri(*)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node06.xml b/test/tests/conf/node/node06.xml
new file mode 100644
index 0000000..ffa3f66
--- /dev/null
+++ b/test/tests/conf/node/node06.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc xmlns:ns1="http://xsl.lotus.com/ns1"
+     xmlns="http://xsl.lotus.com/ns2">
+<ns1:a attrib1="test"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node06.xsl b/test/tests/conf/node/node06.xsl
new file mode 100644
index 0000000..adb3688
--- /dev/null
+++ b/test/tests/conf/node/node06.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: node06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of 'name()', without arguments  -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="name()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node07.xml b/test/tests/conf/node/node07.xml
new file mode 100644
index 0000000..a2ea7e6
--- /dev/null
+++ b/test/tests/conf/node/node07.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<doc>
+<a>1</a>
+<b>2</b>
+<c>3</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node07.xsl b/test/tests/conf/node/node07.xsl
new file mode 100644
index 0000000..666929b
--- /dev/null
+++ b/test/tests/conf/node/node07.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3 Data Model -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Processing Instructions and comments within a stylesheet 
+       are ignored. -->
+
+<?MyPI version="1.0"?>
+
+<xsl:template match="doc">
+  <out>
+  <?MyPI version="2.0"?>
+  <!-- This template prints out 'Testing 1 2 3' -->
+    <xsl:text>&#010;</xsl:text>
+    <xsl:value-of select="'Testing '"/>
+    <xsl:for-each select="*">
+      <xsl:value-of select="."/><xsl:text> </xsl:text>		
+      <?MyPI version="3.0"?>
+    </xsl:for-each>
+
+  <!-- This calls a named template -->
+    <xsl:call-template name="ThatTemp">
+      <xsl:with-param name="sam">quos</xsl:with-param>
+      <?MyPI version="4.0"?>
+    </xsl:call-template>
+    <xsl:text>&#010;</xsl:text>
+  </out>
+</xsl:template>
+
+<!-- This is the named template that is called from above -->
+<xsl:template name="ThatTemp">
+  <xsl:param name="sam">bo</xsl:param>
+  <?MyPI version="5.0"?>
+  <xsl:copy-of select="$sam"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node08.xml b/test/tests/conf/node/node08.xml
new file mode 100644
index 0000000..03d4dc1
--- /dev/null
+++ b/test/tests/conf/node/node08.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<docs xmlns:ped="http:\\www.ped.com"><?MyPI DoesNothing ?><!-- This is a big tree containing all letters of the alphabet -->
+<a attr1="This should not be seen">A</a>
+<b><c attr1="tsnbs" attr2="tsnbs">B-C</c>
+<d><e><f>TextNode_between_F_and_G
+<g><h><i><j><k><l><m><n><o><p><q><r><s><t><u><v><w><x><y><z><Yahoo>Yahoo</Yahoo>
+</z></y></x></w></v></u></t></s></r></q></p></o></n></m></l></k></j></i></h>SecondNode_after_H</g></f></e></d></b>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/node/node08.xsl b/test/tests/conf/node/node08.xsl
new file mode 100644
index 0000000..96f37a5
--- /dev/null
+++ b/test/tests/conf/node/node08.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.1 Root Node. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: String value of the root node is the concatenation of the string
+       values of all text node descendants of the root node in document order. -->
+
+<xsl:template match="/">
+<root>
+	<xsl:value-of select="."/>
+</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node09.xml b/test/tests/conf/node/node09.xml
new file mode 100644
index 0000000..3f385d5
--- /dev/null
+++ b/test/tests/conf/node/node09.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <!-- This is a comment -->
+  Random content
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node09.xsl b/test/tests/conf/node/node09.xsl
new file mode 100644
index 0000000..5f90e82
--- /dev/null
+++ b/test/tests/conf/node/node09.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 Node Tests -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for value-of with comment() node test. -->
+
+<xsl:template match="/doc">
+  <out>      
+    <xsl:apply-templates select="./comment()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node10.xml b/test/tests/conf/node/node10.xml
new file mode 100644
index 0000000..018ad57
--- /dev/null
+++ b/test/tests/conf/node/node10.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<?a-pi some data?>
+<doc>
+  <!-- This is a comment -->
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node10.xsl b/test/tests/conf/node/node10.xsl
new file mode 100644
index 0000000..8638db1
--- /dev/null
+++ b/test/tests/conf/node/node10.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for value-of with processing-instruction() node test. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="./processing-instruction()"/>	
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  <xsl:text>Found-pi...</xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node11.xml b/test/tests/conf/node/node11.xml
new file mode 100644
index 0000000..e151ee0
--- /dev/null
+++ b/test/tests/conf/node/node11.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<doc att="top">
+  <?a-pi some data?>
+  <!-- This is the 1st comment -->
+  text-in-doc
+  <inner blat="blob">
+    inner-text
+    <!-- This is the 2nd comment -->
+    <sub>subtext</sub>
+  </inner>
+  text-in-doc2
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node11.xsl b/test/tests/conf/node/node11.xsl
new file mode 100644
index 0000000..532003e
--- /dev/null
+++ b/test/tests/conf/node/node11.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for node tests in match patterns (and union in select). -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*"><!-- for child elements -->
+  <xsl:text>E:</xsl:text><xsl:value-of select="name()"/>
+  <xsl:apply-templates select="@*"/>
+  <xsl:apply-templates/>
+  <xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:text>A:</xsl:text><xsl:value-of select="name()"/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>T:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:text>C:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  <xsl:text>P:</xsl:text><xsl:value-of select="name()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node12.xml b/test/tests/conf/node/node12.xml
new file mode 100644
index 0000000..af17403
--- /dev/null
+++ b/test/tests/conf/node/node12.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<doc att="top">
+  <?mypi some data?>
+  <!-- This is the 1st comment -->
+  text-in-doc
+  <inner blat="blob">
+    inner-text
+    <!-- This is the 2nd comment -->
+    <sub>subtext</sub>
+  </inner>
+  text-in-doc2
+  <inner2 blat="bar">
+    <sub>subtext</sub>final-text
+  </inner2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node12.xsl b/test/tests/conf/node/node12.xsl
new file mode 100644
index 0000000..6d74a19
--- /dev/null
+++ b/test/tests/conf/node/node12.xsl
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for node tests in select in for-each. -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:text>ATTRIBUTES:</xsl:text>
+    <xsl:for-each select="@*">
+      <xsl:text>A-</xsl:text><xsl:value-of select="name()"/>
+    </xsl:for-each>
+    <xsl:text>
+TEXT:</xsl:text>
+    <xsl:for-each select="text()">
+      <xsl:text>T-</xsl:text><xsl:value-of select="."/>
+    </xsl:for-each>
+    <xsl:text>
+COMMENTS:</xsl:text>
+    <xsl:for-each select="comment()">
+      <xsl:text>C-</xsl:text><xsl:value-of select="."/>
+    </xsl:for-each>
+    <xsl:text>
+PIs:</xsl:text>
+    <xsl:for-each select="processing-instruction()">
+      <xsl:text>P-</xsl:text><xsl:value-of select="name()"/>
+    </xsl:for-each>
+    <xsl:text>
+CHILDREN:</xsl:text>
+    <xsl:for-each select="*">
+      <xsl:text>E-</xsl:text><xsl:value-of select="name()"/><xsl:text>
+</xsl:text>
+      <xsl:apply-templates select="@*"/>
+      <xsl:apply-templates/>
+      <xsl:text>--End of child </xsl:text><xsl:value-of select="name()"/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*"><!-- for child elements -->
+  <xsl:text>E:</xsl:text><xsl:value-of select="name()"/>
+  <xsl:apply-templates select="@*"/>
+  <xsl:apply-templates/>
+  <xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:text>A:</xsl:text><xsl:value-of select="name()"/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>T:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:text>C:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  <xsl:text>P:</xsl:text><xsl:value-of select="name()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node13.xml b/test/tests/conf/node/node13.xml
new file mode 100644
index 0000000..e79f6ad
--- /dev/null
+++ b/test/tests/conf/node/node13.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<!-- First comment -->
+<doc>
+  <!-- Second comment -->
+</doc>
+<!-- Third comment -->
\ No newline at end of file
diff --git a/test/tests/conf/node/node13.xsl b/test/tests/conf/node/node13.xsl
new file mode 100644
index 0000000..3abc737
--- /dev/null
+++ b/test/tests/conf/node/node13.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.1 Root node -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for access to comments hanging off the root. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>
+Comments on the root node:</xsl:text>
+    <xsl:for-each select="comment()">
+      <xsl:text>
+</xsl:text><xsl:value-of select="."/>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node14.xml b/test/tests/conf/node/node14.xml
new file mode 100644
index 0000000..2780b63
--- /dev/null
+++ b/test/tests/conf/node/node14.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<?a-pi some data?>
+<doc>
+  <?b-pi some data?>
+</doc>
+<?c-pi some data?>
\ No newline at end of file
diff --git a/test/tests/conf/node/node14.xsl b/test/tests/conf/node/node14.xsl
new file mode 100644
index 0000000..5115ec2
--- /dev/null
+++ b/test/tests/conf/node/node14.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.1 Root node -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for access to PIs hanging off the root. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>
+Root-level processing instructions:</xsl:text>
+    <xsl:for-each select="processing-instruction()">
+      <xsl:text>
+</xsl:text><xsl:value-of select="name()"/>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node15.xml b/test/tests/conf/node/node15.xml
new file mode 100644
index 0000000..e151ee0
--- /dev/null
+++ b/test/tests/conf/node/node15.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<doc att="top">
+  <?a-pi some data?>
+  <!-- This is the 1st comment -->
+  text-in-doc
+  <inner blat="blob">
+    inner-text
+    <!-- This is the 2nd comment -->
+    <sub>subtext</sub>
+  </inner>
+  text-in-doc2
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node15.xsl b/test/tests/conf/node/node15.xsl
new file mode 100644
index 0000000..718a54d
--- /dev/null
+++ b/test/tests/conf/node/node15.xsl
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- AdditionalSpec: XSLT 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for node() in match patterns. Default axis is child. -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>N-</xsl:text>
+  <xsl:choose>
+    <xsl:when test="name(.)!=''">
+      <xsl:text>named:</xsl:text><xsl:value-of select="name()"/><xsl:text>...</xsl:text>
+    </xsl:when>
+    <xsl:when test=".!=''">
+      <xsl:text>content:</xsl:text><xsl:value-of select="."/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>UNKNOWN</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:apply-templates select="@*"/>
+  <xsl:apply-templates/>
+  <xsl:text>,
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="attribute::*" priority="-1">
+  <xsl:text>A:</xsl:text><xsl:value-of select="name()"/>
+  <xsl:text>
+  </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()" priority="-2"><!-- Override built-in template -->
+  <xsl:text>Incorrect text match:</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node16.xml b/test/tests/conf/node/node16.xml
new file mode 100644
index 0000000..ad8374b
--- /dev/null
+++ b/test/tests/conf/node/node16.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/conf/node/node16.xsl b/test/tests/conf/node/node16.xsl
new file mode 100644
index 0000000..56afaea
--- /dev/null
+++ b/test/tests/conf/node/node16.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'attribute::*' in match pattern. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="attribute::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="attribute::*">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node17.xml b/test/tests/conf/node/node17.xml
new file mode 100644
index 0000000..8991bc2
--- /dev/null
+++ b/test/tests/conf/node/node17.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<docs>
+  <doc x="x" y="y" z="z"
+    xmlns:ext="http://somebody.elses.extension"
+    xmlns:java="http://xml.apache.org/xslt/java"
+    xmlns:ped="http://tester.com"
+    xmlns:bdd="http://buster.com"
+    xmlns:jad="http://administrator.com"/>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/node/node17.xsl b/test/tests/conf/node/node17.xsl
new file mode 100644
index 0000000..c773df0
--- /dev/null
+++ b/test/tests/conf/node/node17.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Axes-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that 'namespace::node()' selects all namespaces. -->
+
+<xsl:template match="doc">
+  <xsl:element name="NSlist">
+    <xsl:for-each select="namespace::node()">
+      <xsl:attribute name="{name(.)}"><xsl:value-of select="."/></xsl:attribute>
+    </xsl:for-each>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node18.xml b/test/tests/conf/node/node18.xml
new file mode 100644
index 0000000..460814a
--- /dev/null
+++ b/test/tests/conf/node/node18.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?> 
+<doc>
+  <!-- This is the 1st comment -->
+  text-in-doc
+  <inner>
+    inner-text
+    <!-- This is the 2nd comment -->
+    <sub>subtext</sub>
+  </inner>
+  text-in-doc2
+  <more>
+    inner-text
+    <!-- This is the 3rd comment -->
+    <sub>subtext</sub>
+  </more>
+  text-in-doc3
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/node/node18.xsl b/test/tests/conf/node/node18.xsl
new file mode 100644
index 0000000..2ab8119
--- /dev/null
+++ b/test/tests/conf/node/node18.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 Node Tests -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for node test in argument to count() function. -->
+
+<xsl:template match="/doc">
+  <out><xsl:value-of select="count(.//comment())"/></out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node19.xml b/test/tests/conf/node/node19.xml
new file mode 100644
index 0000000..ad8374b
--- /dev/null
+++ b/test/tests/conf/node/node19.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/conf/node/node19.xsl b/test/tests/conf/node/node19.xsl
new file mode 100644
index 0000000..fb3b7f5
--- /dev/null
+++ b/test/tests/conf/node/node19.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'attribute::node()' in match pattern. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="attribute::*"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="attribute::node()">
+  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node20.xml b/test/tests/conf/node/node20.xml
new file mode 100644
index 0000000..ca3e3d6
--- /dev/null
+++ b/test/tests/conf/node/node20.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+        <center>
+          <south/>
+        </center>
+     </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/conf/node/node20.xsl b/test/tests/conf/node/node20.xsl
new file mode 100644
index 0000000..c495246
--- /dev/null
+++ b/test/tests/conf/node/node20.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'parent::node()' in select. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="parent::node()" mode="upward"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()" mode="upward">
+  <xsl:value-of select="name(.)"/><xsl:text>, </xsl:text>
+  <xsl:apply-templates select="parent::node()" mode="upward"/>
+</xsl:template>
+
+<xsl:template match="/" mode="upward">
+  <xsl:text>Root Node</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/node/node21.xml b/test/tests/conf/node/node21.xml
new file mode 100644
index 0000000..ca3e3d6
--- /dev/null
+++ b/test/tests/conf/node/node21.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+        <center>
+          <south/>
+        </center>
+     </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/conf/node/node21.xsl b/test/tests/conf/node/node21.xsl
new file mode 100644
index 0000000..b629d05
--- /dev/null
+++ b/test/tests/conf/node/node21.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: node21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for 'ancestor::node()' in select. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="ancestor::node()" mode="upward"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="node()" mode="upward">
+  <xsl:value-of select="name(.)"/><xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="/" mode="upward">
+  <xsl:text>Root Node; </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/newminus.xsl b/test/tests/conf/numberformat/newminus.xsl
new file mode 100644
index 0000000..1d16ca0
--- /dev/null
+++ b/test/tests/conf/numberformat/newminus.xsl
@@ -0,0 +1,29 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- This stylesheet is to be imported or included. It defines the 'newminus' format. -->
+
+  <xsl:import href="periodgroup.xsl"/>
+
+  <xsl:decimal-format name="newminus" minus-sign='_' />
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat01.xml b/test/tests/conf/numberformat/numberformat01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat01.xsl b/test/tests/conf/numberformat/numberformat01.xsl
new file mode 100644
index 0000000..eb8773a
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat01.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number with 2 arguments, showing zeroes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(2392.14*36.58,'000,000.000000')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat02.xml b/test/tests/conf/numberformat/numberformat02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat02.xsl b/test/tests/conf/numberformat/numberformat02.xsl
new file mode 100644
index 0000000..276022b
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number and # and 0 in format string. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(12792.14*96.58,'##,###,000.000###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat03.xml b/test/tests/conf/numberformat/numberformat03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat03.xsl b/test/tests/conf/numberformat/numberformat03.xsl
new file mode 100644
index 0000000..546172f
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat03.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number on a negative number. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(2792.14*(-36.58),'000,000.000###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat04.xml b/test/tests/conf/numberformat/numberformat04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat04.xsl b/test/tests/conf/numberformat/numberformat04.xsl
new file mode 100644
index 0000000..ac4c611
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat04.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number on a negative number; should choose second pattern. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(2392.14*(-36.58),'000,000.000###;###,###.000###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat05.xml b/test/tests/conf/numberformat/numberformat05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat05.xsl b/test/tests/conf/numberformat/numberformat05.xsl
new file mode 100644
index 0000000..877b88c
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat05.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number percentage format. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(0.4857,'###.###%')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat06.xml b/test/tests/conf/numberformat/numberformat06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat06.xsl b/test/tests/conf/numberformat/numberformat06.xsl
new file mode 100644
index 0000000..4834029
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat06.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number per-mille format. -->
+
+<xsl:output method="xml" encoding="ISO-8859-1"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(0.4857,'###.###&#8240;')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat07.xml b/test/tests/conf/numberformat/numberformat07.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat07.xsl b/test/tests/conf/numberformat/numberformat07.xsl
new file mode 100644
index 0000000..83d8352
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat07.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number currency symbol, which is not supposed to be there. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(95.4857,'&#164;###.####')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat08.xml b/test/tests/conf/numberformat/numberformat08.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat08.xsl b/test/tests/conf/numberformat/numberformat08.xsl
new file mode 100644
index 0000000..b664fb8
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat08.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number with prefix and suffix in format string. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(2.14*86.58,'PREFIX##00.000###SUFFIX')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat09.xml b/test/tests/conf/numberformat/numberformat09.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat09.xsl b/test/tests/conf/numberformat/numberformat09.xsl
new file mode 100644
index 0000000..72bbf65
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat09.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test default decimal-format on separator characters, changing both. -->
+
+<xsl:decimal-format decimal-separator="|" grouping-separator="." />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(931.4857,'000.000|###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat11.xml b/test/tests/conf/numberformat/numberformat11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat11.xsl b/test/tests/conf/numberformat/numberformat11.xsl
new file mode 100644
index 0000000..cc0eb80
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat11.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test default decimal-format on pattern-only characters, positive number. -->
+
+<xsl:decimal-format digit="!" pattern-separator="\" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(26931.4,'+!!!,!!!.!!!\-!!,!!!.!!!')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat12.xml b/test/tests/conf/numberformat/numberformat12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat12.xsl b/test/tests/conf/numberformat/numberformat12.xsl
new file mode 100644
index 0000000..f7beaea
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat12.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test default decimal-format on pattern-only characters, negative number. -->
+
+<xsl:decimal-format digit="!" pattern-separator="\" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'+!!,!!!.!!!\-!!!,!!!.!!!')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat13.xml b/test/tests/conf/numberformat/numberformat13.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat13.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat13.xsl b/test/tests/conf/numberformat/numberformat13.xsl
new file mode 100644
index 0000000..b7c93de
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat13.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test default decimal-format on pattern-only characters, negative number and one pattern. -->
+
+<xsl:decimal-format digit="!" pattern-separator="\" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'!!!,!!!.!!!')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat14.xml b/test/tests/conf/numberformat/numberformat14.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat14.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat14.xsl b/test/tests/conf/numberformat/numberformat14.xsl
new file mode 100644
index 0000000..9f92078
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat14.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NumberFormat14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test specified result pattern for infinity. -->
+
+<xsl:decimal-format infinity="off-the-scale" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(1 div 0,'###############################')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat15.xml b/test/tests/conf/numberformat/numberformat15.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat15.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat15.xsl b/test/tests/conf/numberformat/numberformat15.xsl
new file mode 100644
index 0000000..66986cc
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat15.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NumberFormat15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test specified result pattern for not-a-number. -->
+
+<xsl:decimal-format NaN="non-numeric" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('foo','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat16.xml b/test/tests/conf/numberformat/numberformat16.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat16.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat16.xsl b/test/tests/conf/numberformat/numberformat16.xsl
new file mode 100644
index 0000000..a581408
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat16.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of decimal-format per-mille format with character being changed. -->
+
+<xsl:decimal-format per-mille="m" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(0.4857,'###.###m')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat17.xml b/test/tests/conf/numberformat/numberformat17.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat17.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat17.xsl b/test/tests/conf/numberformat/numberformat17.xsl
new file mode 100644
index 0000000..954c55f
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat17.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test decimal-format output character for negative, 2 patterns. -->
+
+<xsl:decimal-format minus-sign="_" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'+###,###.###;-###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat18.xml b/test/tests/conf/numberformat/numberformat18.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat18.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat18.xsl b/test/tests/conf/numberformat/numberformat18.xsl
new file mode 100644
index 0000000..2258beb
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat18.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test decimal-format output character for negative, one pattern. -->
+
+<xsl:decimal-format minus-sign="_" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat19.xml b/test/tests/conf/numberformat/numberformat19.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat19.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat19.xsl b/test/tests/conf/numberformat/numberformat19.xsl
new file mode 100644
index 0000000..2949aad
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat19.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test decimal-format declaration with a name. -->
+
+<xsl:decimal-format name="myminus" minus-sign='_' />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'###,###.###','myminus')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-42857.1,'###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat20.xml b/test/tests/conf/numberformat/numberformat20.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat20.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat20.xsl b/test/tests/conf/numberformat/numberformat20.xsl
new file mode 100644
index 0000000..59e087a
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat20.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+                xmlns:foo="http://foo.com">
+
+  <!-- FileName: NUMBERFORMAT20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of decimal-format with qualified name. Unqualified name provided as a trap. -->
+
+<xsl:decimal-format name="foo:decimal1" decimal-separator='!' grouping-separator='*'/>
+<xsl:decimal-format name="decimal1" decimal-separator='*' grouping-separator='!'/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(1234.567,'#*###*###!###','foo:decimal1')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat21.xml b/test/tests/conf/numberformat/numberformat21.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat21.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat21.xsl b/test/tests/conf/numberformat/numberformat21.xsl
new file mode 100644
index 0000000..9d92ca2
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat21.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test include of a decimal-format. -->
+
+<xsl:include href="periodgroup.xsl"/>
+
+<xsl:decimal-format name="myminus" minus-sign='_' />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'###.###,###','periodgroup')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-42857.1,'###,###.###','myminus')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-73816.9,'###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat22.xml b/test/tests/conf/numberformat/numberformat22.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat22.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat22.xsl b/test/tests/conf/numberformat/numberformat22.xsl
new file mode 100644
index 0000000..c248b06
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat22.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test import of a decimal-format. Three formats should not conflict. -->
+
+<xsl:import href="periodgroup.xsl"/>
+
+<xsl:decimal-format name="myminus" minus-sign='_' />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'###.###,###','periodgroup')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-42857.1,'###,###.###','myminus')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-73816.9,'###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat23.xml b/test/tests/conf/numberformat/numberformat23.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat23.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat23.xsl b/test/tests/conf/numberformat/numberformat23.xsl
new file mode 100644
index 0000000..2b7be33
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat23.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of include that does an import, providing two named decimal-formats. Three formats should not conflict. -->
+
+<xsl:include href="newminus.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'###.###,###','periodgroup')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-42857.1,'###,###.###','newminus')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-73816.9,'###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat24.xml b/test/tests/conf/numberformat/numberformat24.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat24.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat24.xsl b/test/tests/conf/numberformat/numberformat24.xsl
new file mode 100644
index 0000000..d5c131d
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat24.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of import that does an import, providing two named decimal-formats. Three formats should not conflict. -->
+
+<xsl:import href="newminus.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'###.###,###','periodgroup')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-42857.1,'###,###.###','newminus')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-73816.9,'###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat25.xml b/test/tests/conf/numberformat/numberformat25.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat25.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat25.xsl b/test/tests/conf/numberformat/numberformat25.xsl
new file mode 100644
index 0000000..4b72e68
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat25.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Create a conflict in the use of the '.' character. -->
+
+<xsl:decimal-format decimal-separator="!" grouping-separator="!" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(931.4857,'###!###!###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat26.xml b/test/tests/conf/numberformat/numberformat26.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat26.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat26.xsl b/test/tests/conf/numberformat/numberformat26.xsl
new file mode 100644
index 0000000..f336b68
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat26.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Designate a space as the grouping separator. -->
+
+<xsl:decimal-format decimal-separator="," grouping-separator=" " />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(7654321.4857,'### ### ###,#####')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat27.xml b/test/tests/conf/numberformat/numberformat27.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat27.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat27.xsl b/test/tests/conf/numberformat/numberformat27.xsl
new file mode 100644
index 0000000..0d3c0ea
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat27.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number minus-sign behavior on positive numbers. -->
+
+<xsl:decimal-format name="myminus" minus-sign='_' />
+
+<xsl:template match="doc">
+  <out>All three should be the same...<xsl:text>
+</xsl:text><xsl:value-of select="format-number(2392.14*36.58,'000,000.000000','myminus')"/><xsl:text>
+</xsl:text><xsl:value-of select="format-number(2392.14*36.58,'000,000.000000;###,###.000###')"/><xsl:text>
+</xsl:text><xsl:value-of select="format-number(2392.14*36.58,'000,000.000000;###,###.000###','myminus')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat28.xml b/test/tests/conf/numberformat/numberformat28.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat28.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat28.xsl b/test/tests/conf/numberformat/numberformat28.xsl
new file mode 100644
index 0000000..6123d4c
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat28.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test what happens to minus sign embedded in second pattern. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(2392.14*(-36.58),'000,000.000###;-###,###.000###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat29.xml b/test/tests/conf/numberformat/numberformat29.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat29.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat29.xsl b/test/tests/conf/numberformat/numberformat29.xsl
new file mode 100644
index 0000000..94c0d5e
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat29.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test decimal-format output character does not influence input. -->
+
+<xsl:decimal-format minus-sign="_" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'+###,###.###;_###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat30.xml b/test/tests/conf/numberformat/numberformat30.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat30.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat30.xsl b/test/tests/conf/numberformat/numberformat30.xsl
new file mode 100644
index 0000000..69745c6
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat30.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test effects of minus-sign in one pattern. -->
+
+<xsl:decimal-format name="myminus" minus-sign='_' />
+
+<xsl:template match="doc">
+  <out>All three should have two prefixes...<xsl:text>
+</xsl:text><xsl:value-of select="format-number(-26931.4,'-###,###.###')"/><xsl:text>
+</xsl:text><xsl:value-of select="format-number(-26931.4,'-###,###.###','myminus')"/><xsl:text>
+</xsl:text><xsl:value-of select="format-number(-26931.4,'_###,###.###','myminus')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat31.xml b/test/tests/conf/numberformat/numberformat31.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat31.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat31.xsl b/test/tests/conf/numberformat/numberformat31.xsl
new file mode 100644
index 0000000..cfb4f6e
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat31.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT31 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test output of altered minus, 2 patterns but no sign marker in pattern. -->
+
+<xsl:decimal-format minus-sign="_" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'###,###.###;###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat32.xml b/test/tests/conf/numberformat/numberformat32.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat32.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat32.xsl b/test/tests/conf/numberformat/numberformat32.xsl
new file mode 100644
index 0000000..b7ee9a0
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat32.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT32 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number percent format with character being changed. -->
+
+<xsl:decimal-format percent="c" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(0.4857,'###.###c')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat34.xml b/test/tests/conf/numberformat/numberformat34.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat34.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat34.xsl b/test/tests/conf/numberformat/numberformat34.xsl
new file mode 100644
index 0000000..a550649
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat34.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT34 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test changing both digit and zero-digit in format string. -->
+
+<xsl:decimal-format digit="!" zero-digit="a" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(4030201.0506,'#!!!,!!!,aaa.aaaaaa0')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat35.xml b/test/tests/conf/numberformat/numberformat35.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat35.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat35.xsl b/test/tests/conf/numberformat/numberformat35.xsl
new file mode 100644
index 0000000..223bf3f
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat35.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of unequal spacing of grouping-separator. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(987654321,'###,##0,00.00')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat36.xml b/test/tests/conf/numberformat/numberformat36.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat36.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat36.xsl b/test/tests/conf/numberformat/numberformat36.xsl
new file mode 100644
index 0000000..7403650
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat36.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMAT36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test what happens when we overflow available digits on the left. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(239236.588,'00000.00')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat37.xml b/test/tests/conf/numberformat/numberformat37.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat37.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat37.xsl b/test/tests/conf/numberformat/numberformat37.xsl
new file mode 100644
index 0000000..d757d3e
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat37.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NumberFormat37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test result pattern for infinity, unchanged. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(1 div 0,'###############################')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat38.xml b/test/tests/conf/numberformat/numberformat38.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat38.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat38.xsl b/test/tests/conf/numberformat/numberformat38.xsl
new file mode 100644
index 0000000..9823c49
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat38.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NumberFormat38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test result pattern for not-a-number, unchanged. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('foo','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat39.xml b/test/tests/conf/numberformat/numberformat39.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat39.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat39.xsl b/test/tests/conf/numberformat/numberformat39.xsl
new file mode 100644
index 0000000..6636cb4
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat39.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NumberFormat39 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test result pattern for negative infinity, unchanged. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-1 div 0,'###############################')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat40.xml b/test/tests/conf/numberformat/numberformat40.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat40.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat40.xsl b/test/tests/conf/numberformat/numberformat40.xsl
new file mode 100644
index 0000000..cb1bf7a
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat40.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NumberFormat40 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test specification of result pattern for infinity
+       when quantity to be displayed is negative infinity. -->
+
+<xsl:decimal-format infinity="huge" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-1 div 0,'###############################')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat41.xml b/test/tests/conf/numberformat/numberformat41.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat41.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat41.xsl b/test/tests/conf/numberformat/numberformat41.xsl
new file mode 100644
index 0000000..9c071b2
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat41.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+    xmlns:foo="http://foo.com"
+    xmlns:baz="http://foo.com"
+    exclude-result-prefixes="foo baz">
+
+  <!-- FileName: NUMBERFORMAT41 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Test of multiple decimal-format elements with identical qualified names.
+    This is allowed as long as all attributes are identical (including defaults). -->
+
+<xsl:decimal-format name="foo:decimal1" minus-sign='-' NaN='not a number'/>
+<xsl:decimal-format name="baz:decimal1" NaN='not a number' decimal-separator='.'/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <foo>
+      <xsl:value-of select="format-number('NaN','###','foo:decimal1')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="format-number(-13.2,'###.0','foo:decimal1')"/>
+    </foo>
+    <xsl:text>&#10;</xsl:text>
+    <baz>
+      <xsl:value-of select="format-number('NaN','###','baz:decimal1')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="format-number(-13.2,'###.0','baz:decimal1')"/>
+    </baz>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat42.xml b/test/tests/conf/numberformat/numberformat42.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat42.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat42.xsl b/test/tests/conf/numberformat/numberformat42.xsl
new file mode 100644
index 0000000..3bd3771
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat42.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
+
+  <!-- FileName: NUMBERFORMAT42 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Test of multiple decimal-format elements with identical names.
+    This is allowed as long as all attributes are identical (including defaults). -->
+
+<xsl:decimal-format name="decimal2" zero-digit='0' NaN='not a number'/>
+<xsl:decimal-format name="decimal2" NaN='not a number' decimal-separator='.'/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('NaN','###','decimal2')"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="format-number(3.2,'###.0','decimal2')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat43.xml b/test/tests/conf/numberformat/numberformat43.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat43.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat43.xsl b/test/tests/conf/numberformat/numberformat43.xsl
new file mode 100644
index 0000000..cc1213c
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat43.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
+
+  <!-- FileName: NumberFormat43 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Have two decimal-format elements with identical names, one in an import.
+    This is allowed as long as all attributes are identical (including defaults). -->
+
+<xsl:import href="x43import.xsl"/>
+
+<xsl:decimal-format name="decimal3" NaN='not a number' decimal-separator='.'/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <one>
+      <xsl:value-of select="format-number('NaN','###','decimal3')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="format-number(-13.2,'###.0','decimal3')"/>
+    </one>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:call-template name="sub"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat44.xml b/test/tests/conf/numberformat/numberformat44.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat44.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat44.xsl b/test/tests/conf/numberformat/numberformat44.xsl
new file mode 100644
index 0000000..a94dd04
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat44.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
+
+  <!-- FileName: NumberFormat44 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test whether a decimal-format declaration in an import is visible here. -->
+
+<xsl:import href="x43import.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <main>
+      <xsl:value-of select="format-number('NaN','###','decimal3')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="format-number(-13.2,'###.0','decimal3')"/>
+    </main>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:call-template name="sub"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat45.xml b/test/tests/conf/numberformat/numberformat45.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat45.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat45.xsl b/test/tests/conf/numberformat/numberformat45.xsl
new file mode 100644
index 0000000..78ae4b6
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat45.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
+
+  <!-- FileName: NumberFormat45 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test whether a default decimal-format defined in an import is applied here. -->
+
+<xsl:import href="x45import.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <one>
+      <xsl:value-of select="format-number(12345.67,'000.000,###')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="format-number(-98765.4321,'##0.000,000')"/>
+    </one>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:call-template name="sub"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/numberformat46.xml b/test/tests/conf/numberformat/numberformat46.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat46.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numberformat/numberformat46.xsl b/test/tests/conf/numberformat/numberformat46.xsl
new file mode 100644
index 0000000..fde0fd3
--- /dev/null
+++ b/test/tests/conf/numberformat/numberformat46.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NumberFormat46 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test whether a default decimal-format defined in an include is applied here. -->
+
+<xsl:include href="x45import.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <one>
+      <xsl:value-of select="format-number(12345.67,'000.000,###')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="format-number(-98765.4321,'##0.000,000')"/>
+    </one>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:call-template name="sub"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/periodgroup.xsl b/test/tests/conf/numberformat/periodgroup.xsl
new file mode 100644
index 0000000..bc96cad
--- /dev/null
+++ b/test/tests/conf/numberformat/periodgroup.xsl
@@ -0,0 +1,27 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- This stylesheet is to be imported or included. It defines the 'periodgroup' format. -->
+
+  <xsl:decimal-format name="periodgroup" decimal-separator=',' grouping-separator='.'/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/x43import.xsl b/test/tests/conf/numberformat/x43import.xsl
new file mode 100644
index 0000000..c95a15e
--- /dev/null
+++ b/test/tests/conf/numberformat/x43import.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
+
+  <!-- FileName: x43import -->
+  <!-- Purpose: Imported by NumberFormat43 and 44 -->
+
+<xsl:decimal-format name="decimal3" digit='#' NaN='not a number'/>
+
+<xsl:template name="sub">
+  <sub>
+    <xsl:value-of select="format-number('NaN','###','decimal3')"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="format-number(-13.2,'###.0','decimal3')"/>
+  </sub>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numberformat/x45import.xsl b/test/tests/conf/numberformat/x45import.xsl
new file mode 100644
index 0000000..2050971
--- /dev/null
+++ b/test/tests/conf/numberformat/x45import.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
+
+  <!-- FileName: x45import -->
+  <!-- Purpose: Imported by NumberFormat45 -->
+
+<xsl:decimal-format decimal-separator=',' grouping-separator='.'/>
+
+<xsl:template name="sub">
+  <sub>
+    <xsl:value-of select="format-number(12345.67,'000.000,###')"/>
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="format-number(-98765.4321,'##0.000,000')"/>
+  </sub>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/iddata.dtd b/test/tests/conf/numbering/iddata.dtd
new file mode 100644
index 0000000..6908ff6
--- /dev/null
+++ b/test/tests/conf/numbering/iddata.dtd
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!ELEMENT iddata (el*)>
+<!ELEMENT el EMPTY>
+<!ATTLIST el id ID #REQUIRED> 
diff --git a/test/tests/conf/numbering/numbering01.xml b/test/tests/conf/numbering/numbering01.xml
new file mode 100644
index 0000000..5cbe085
--- /dev/null
+++ b/test/tests/conf/numbering/numbering01.xml
@@ -0,0 +1,1800 @@
+<?xml version="1.0"?> 
+
+<!-- Test for source tree numbering -->
+<doc>
+  <title>Test for source tree numbering</title>
+  <chapter>
+    <title>First Chapter</title>
+    <section>
+      <title>First Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+         <title>Twelveth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Second Chapter</title>
+    <section>
+      <title>First Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fouth Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Third Chapter</title>
+    <section>
+      <title>First Section In third Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In third Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourth Chapter</title>
+    <section>
+      <title>First Section In fourth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fifth Chapter</title>
+    <section>
+      <title>First Section In fifth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Sixth Chapter</title>
+    <section>
+      <title>First Section In sixth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In sixth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Seventh Chapter</title>
+    <section>
+      <title>First Section In seventh Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In seventh Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Eighth Chapter</title>
+    <section>
+      <title>First Section In eighth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In eighth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Ninth Chapter</title>
+    <section>
+      <title>First Section In ninth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In ninth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Tenth Chapter</title>
+    <section>
+      <title>First Section In tenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In tenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Eleventh Chapter</title>
+    <section>
+      <title>First Section In eleventh Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In eleventh Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Twelvth Chapter</title>
+    <section>
+      <title>First Section In twelvth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In twelvth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Thirteenth Chapter</title>
+    <section>
+      <title>First Section In thirteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In thirteenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourteenth Chapter</title>
+    <section>
+      <title>First Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <appendix>
+    <title>First Appendix</title>
+    <section>
+      <title>First Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Second Appendix</title>
+    <section>
+      <title>First Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fiftieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Third Appendix</title>
+    <section>
+      <title>First Section In third Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In third Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourth Appendix</title>
+    <section>
+      <title>First Section In fourth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fifth Appendix</title>
+    <section>
+      <title>First Section In fifth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Sixth Appendix</title>
+    <section>
+      <title>First Section In sixth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In sixth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Seventh Appendix</title>
+    <section>
+      <title>First Section In seventh Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In seventh Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Eighth Appendix</title>
+    <section>
+      <title>First Section In eighth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In eighth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Ninth Appendix</title>
+    <section>
+      <title>First Section In ninth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In ninth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Tenth Appendix</title>
+    <section>
+      <title>First Section In tenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In tenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Eleventh Appendix</title>
+    <section>
+      <title>First Section In eleventh Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In eleventh Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Twelvth Appendix</title>
+    <section>
+      <title>First Section In twelvth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In twelvth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Thirteenth Appendix</title>
+    <section>
+      <title>First Section In thirteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In thirteenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourteenth Appendix</title>
+    <section>
+      <title>First Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering01.xsl b/test/tests/conf/numbering/numbering01.xsl
new file mode 100644
index 0000000..33ea7e6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering01.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering01 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document with no attributes specified. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="DocFrag" place="id(number)" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number/><xsl:text>. </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+ 
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering02.xml b/test/tests/conf/numbering/numbering02.xml
new file mode 100644
index 0000000..e1e425a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering02.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <ol>
+    <item>aaa</item>
+    <item>bbb</item>
+    <item>ccc</item>
+    <item>ddd</item>
+  </ol>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering02.xsl b/test/tests/conf/numbering/numbering02.xsl
new file mode 100644
index 0000000..b47c44a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering02.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering02 -->
+  <!-- Author: Paul Dick, based on example in spec -->
+  <!-- Purpose: Test of simple numbering, no attributes specified. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="DocFrag" place="id(number)" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="ol/item"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="ol/item">
+  <xsl:number/><xsl:text>. </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering03.xml b/test/tests/conf/numbering/numbering03.xml
new file mode 100644
index 0000000..5cbe085
--- /dev/null
+++ b/test/tests/conf/numbering/numbering03.xml
@@ -0,0 +1,1800 @@
+<?xml version="1.0"?> 
+
+<!-- Test for source tree numbering -->
+<doc>
+  <title>Test for source tree numbering</title>
+  <chapter>
+    <title>First Chapter</title>
+    <section>
+      <title>First Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+         <title>Twelveth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Second Chapter</title>
+    <section>
+      <title>First Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fouth Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Third Chapter</title>
+    <section>
+      <title>First Section In third Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In third Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourth Chapter</title>
+    <section>
+      <title>First Section In fourth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fifth Chapter</title>
+    <section>
+      <title>First Section In fifth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Sixth Chapter</title>
+    <section>
+      <title>First Section In sixth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In sixth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Seventh Chapter</title>
+    <section>
+      <title>First Section In seventh Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In seventh Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Eighth Chapter</title>
+    <section>
+      <title>First Section In eighth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In eighth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Ninth Chapter</title>
+    <section>
+      <title>First Section In ninth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In ninth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Tenth Chapter</title>
+    <section>
+      <title>First Section In tenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In tenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Eleventh Chapter</title>
+    <section>
+      <title>First Section In eleventh Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In eleventh Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Twelvth Chapter</title>
+    <section>
+      <title>First Section In twelvth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In twelvth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Thirteenth Chapter</title>
+    <section>
+      <title>First Section In thirteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In thirteenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourteenth Chapter</title>
+    <section>
+      <title>First Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <appendix>
+    <title>First Appendix</title>
+    <section>
+      <title>First Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Second Appendix</title>
+    <section>
+      <title>First Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fiftieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Third Appendix</title>
+    <section>
+      <title>First Section In third Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In third Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourth Appendix</title>
+    <section>
+      <title>First Section In fourth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fifth Appendix</title>
+    <section>
+      <title>First Section In fifth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Sixth Appendix</title>
+    <section>
+      <title>First Section In sixth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In sixth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Seventh Appendix</title>
+    <section>
+      <title>First Section In seventh Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In seventh Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Eighth Appendix</title>
+    <section>
+      <title>First Section In eighth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In eighth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Ninth Appendix</title>
+    <section>
+      <title>First Section In ninth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In ninth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Tenth Appendix</title>
+    <section>
+      <title>First Section In tenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In tenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Eleventh Appendix</title>
+    <section>
+      <title>First Section In eleventh Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In eleventh Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Twelvth Appendix</title>
+    <section>
+      <title>First Section In twelvth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In twelvth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Thirteenth Appendix</title>
+    <section>
+      <title>First Section In thirteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In thirteenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourteenth Appendix</title>
+    <section>
+      <title>First Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering03.xsl b/test/tests/conf/numbering/numbering03.xsl
new file mode 100644
index 0000000..463e90e
--- /dev/null
+++ b/test/tests/conf/numbering/numbering03.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering03 -->
+  <!-- Author: Paul Dick, based on example in spec -->
+  <!-- Purpose: Test of level (multiple), count, format attributes. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="title">
+  <xsl:number level="multiple"
+      count="chapter|section|subsection"
+      format="1.1. "/>
+  <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="appendix//title" priority="1">
+  <xsl:number level="multiple"
+      count="appendix|section|subsection"
+      format="A.1. "/>
+  <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+ 
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering04.xml b/test/tests/conf/numbering/numbering04.xml
new file mode 100644
index 0000000..9b2a76c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering04.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
diff --git a/test/tests/conf/numbering/numbering04.xsl b/test/tests/conf/numbering/numbering04.xsl
new file mode 100644
index 0000000..1895a8e
--- /dev/null
+++ b/test/tests/conf/numbering/numbering04.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering04 -->
+  <!-- Author: Paul Dick, based on example in spec -->
+  <!-- Purpose: Test of level (any) and from attributes. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering05.xml b/test/tests/conf/numbering/numbering05.xml
new file mode 100644
index 0000000..965a6ec
--- /dev/null
+++ b/test/tests/conf/numbering/numbering05.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<doc>
+  <H1>
+    <H2>
+      <H3>
+        <H4>
+        </H4>
+      </H3>
+    </H2>
+    <H2>
+      <H3>
+        <H4>
+        </H4>
+        <H4>
+        </H4>
+      </H3>
+      <H3>
+        <H4>
+        </H4>
+        <H4>
+        </H4>
+        <H4>
+        </H4>
+      </H3>
+    </H2>
+  </H1>
+</doc>
diff --git a/test/tests/conf/numbering/numbering05.xsl b/test/tests/conf/numbering/numbering05.xsl
new file mode 100644
index 0000000..60290dd
--- /dev/null
+++ b/test/tests/conf/numbering/numbering05.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering05 -->
+  <!-- Author: Paul Dick, based on example in spec -->
+  <!-- Purpose: Test of level (any) and nested from/count. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="H4">
+  <xsl:text>&#010;</xsl:text>
+  <xsl:number level="any" from="H1" count="H2"/>
+  <xsl:text>.</xsl:text>
+  <xsl:number level="any" from="H2" count="H3"/>
+  <xsl:text>.</xsl:text>
+  <xsl:number level="any" from="H3" count="H4"/>
+  <xsl:text></xsl:text>
+  <xsl:text> &#010;</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering06.xml b/test/tests/conf/numbering/numbering06.xml
new file mode 100644
index 0000000..9b2a76c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering06.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
diff --git a/test/tests/conf/numbering/numbering06.xsl b/test/tests/conf/numbering/numbering06.xsl
new file mode 100644
index 0000000..ddb441b
--- /dev/null
+++ b/test/tests/conf/numbering/numbering06.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering06 -->
+  <!-- Author: Paul Dick, based on example in spec -->
+  <!-- Purpose: Test level=single specified explicitly -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" from="chapter" format="(1) "/>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering07.xml b/test/tests/conf/numbering/numbering07.xml
new file mode 100644
index 0000000..9b2a76c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering07.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
diff --git a/test/tests/conf/numbering/numbering07.xsl b/test/tests/conf/numbering/numbering07.xsl
new file mode 100644
index 0000000..e54b5dd
--- /dev/null
+++ b/test/tests/conf/numbering/numbering07.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering07 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Simple test of non-alphanumeric separator -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="A-1 "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering08.xml b/test/tests/conf/numbering/numbering08.xml
new file mode 100644
index 0000000..f89faf9
--- /dev/null
+++ b/test/tests/conf/numbering/numbering08.xml
@@ -0,0 +1,229 @@
+<?xml version="1.0"?>
+<!-- Test for source tree numbering -->
+<doc>
+  <title>Test for source tree numbering</title>
+  <chapter>
+    <title>First Chapter</title>
+    <section>
+      <title>First Section In first Chapter</title>
+      <subsection><title>First Subsection in first Section In first Chapter</title></subsection>
+      <subsection><title>Second Subsection in first Section In first Chapter</title></subsection>
+      <subsection><title>Third Subsection in first Section In first Chapter</title></subsection>
+      <subsection><title>Fourth Subsection in first Section In first Chapter</title></subsection>
+      <subsection><title>Fifth Subsection in first Section In first Chapter</title></subsection>
+    </section>
+    <section>
+      <title>Second Section In first Chapter</title>
+      <subsection><title>First Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Second Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Third Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Fourth Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Fifth Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Sixth Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Seventh Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Eighth Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Ninth Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Tenth Subsection in second Section In first Chapter</title></subsection>
+      <subsection><title>Eleventh Subsection in second Section In first Chapter</title></subsection>
+    </section>
+    <section>
+      <title>Third Section In first Chapter</title>
+      <subsection><title>First Subsection in third Section In first Chapter</title></subsection>
+      <subsection><title>Second Subsection in third Section In first Chapter</title></subsection>
+      <subsection><title>Third Subsection in third Section In first Chapter</title></subsection>
+      <subsection><title>Fourth Subsection in third Section In first Chapter</title></subsection>
+      <subsection><title>Fifth Subsection in third Section In first Chapter</title></subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Chapter</title>
+      <subsection><title>First Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Second Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Third Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Fourth Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Fifth Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Sixth Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Seventh Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Eighth Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Ninth Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Tenth Subsection in fourth Section In first Chapter</title></subsection>
+      <subsection><title>Eleventh Subsection in fourth Section In first Chapter</title></subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Second Chapter</title>
+    <section>
+      <title>First Section In second Chapter</title>
+      <subsection><title>First Subsection in first Section In second Chapter</title></subsection>
+      <subsection><title>Second Subsection in first Section In second Chapter</title></subsection>
+      <subsection><title>Third Subsection in first Section In second Chapter</title></subsection>
+      <subsection><title>Fourth Subsection in first Section In second Chapter</title></subsection>
+      <subsection><title>Fifth Subsection in first Section In second Chapter</title></subsection>
+    </section>
+    <section>
+      <title>Second Section In second Chapter</title>
+      <subsection><title>First Subsection in second Section In second Chapter</title></subsection>
+      <subsection><title>Second Subsection in second Section In second Chapter</title></subsection>
+      <subsection><title>Third Subsection in second Section In second Chapter</title></subsection>
+      <subsection><title>Fourth Subsection in second Section In second Chapter</title></subsection>
+      <subsection><title>Fifth Subsection in second Section In second Chapter</title></subsection>
+      <subsection><title>Sixth Subsection in second Section In second Chapter</title></subsection>
+      <subsection><title>Seventh Subsection in second Section In second Chapter</title></subsection>
+      <subsection><title>Eighth Subsection in second Section In second Chapter</title></subsection>
+      <subsection><title>Ninth Subsection in second Section In second Chapter</title></subsection>
+    </section>
+    <section>
+      <title>Third Section In second Chapter</title>
+      <subsection><title>First Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Second Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Third Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Fourth Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Fifth Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Sixth Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Seventh Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Eighth Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Ninth Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Tenth Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Eleventh Subsection in third Section In second Chapter</title></subsection>
+      <subsection><title>Twelveth Subsection in third Section In second Chapter</title></subsection>
+    </section>
+    <section>
+      <title>Fouth Section In second Chapter</title>
+      <subsection><title>First Subsection in fourth Section In second Chapter</title></subsection>
+      <subsection><title>Second Subsection in fourth Section In second Chapter</title></subsection>
+      <subsection><title>Third Subsection in fourth Section In second Chapter</title></subsection>
+      <subsection><title>Fourth Subsection in fourth Section In second Chapter</title></subsection>
+      <subsection><title>Fifth Subsection in fourth Section In second Chapter</title></subsection>
+      <subsection><title>Sixth Subsection in fourth Section In second Chapter</title></subsection>
+      <subsection><title>Seventh Subsection in fourth Section In second Chapter</title></subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Third Chapter</title>
+    <section>
+      <title>First Section In third Chapter</title>
+      <subsection><title>First Subsection in first Section In third Chapter</title></subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourth Chapter</title>
+    <section>
+      <title>First Section In fourth Chapter</title>
+      <subsection><title>First Subsection in first Section In fourth Chapter</title></subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fifth Chapter</title>
+    <section>
+      <title>First Section In fifth Chapter</title>
+      <subsection><title>First Subsection in first Section In fifth Chapter</title></subsection>
+    </section>
+  </chapter>
+  <appendix>
+    <title>First Appendix</title>
+    <section>
+      <title>First Section In first Appendix</title>
+      <subsection><title>First Subsection in first Section In first Appendix</title></subsection>
+      <subsection><title>Second Subsection in first Section In first Appendix</title></subsection>
+      <subsection><title>Third Subsection in first Section In first Appendix</title></subsection>
+      <subsection><title>Fourth Subsection in first Section In first Appendix</title></subsection>
+      <subsection><title>Fifth Subsection in first Section In first Appendix</title></subsection>
+    </section>
+    <section>
+      <title>Second Section In first Appendix</title>
+      <subsection><title>First Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Second Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Third Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Fourth Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Fifth Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Sixth Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Seventh Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Eighth Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Ninth Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Tenth Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Eleventh Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Twelveth Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Thirteenth Subsection in second Section In first Appendix</title></subsection>
+      <subsection><title>Fourteenth Subsection in second Section In first Appendix</title></subsection>
+    </section>
+    <section>
+      <title>Third Section In first Appendix</title>
+      <subsection><title>First Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Second Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Third Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Fourth Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Fifth Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Sixth Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Seventh Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Eighth Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Ninth Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Tenth Subsection in third Section In first Appendix</title></subsection>
+      <subsection><title>Eleventh Subsection in third Section In first Appendix</title></subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Second Appendix</title>
+    <section>
+      <title>First Section In second Appendix</title>
+      <subsection><title>First Subsection in first Section In second Appendix</title></subsection>
+      <subsection><title>Second Subsection in first Section In second Appendix</title></subsection>
+      <subsection><title>Third Subsection in first Section In second Appendix</title></subsection>
+      <subsection><title>Fourth Subsection in first Section In second Appendix</title></subsection>
+      <subsection><title>Fifth Subsection in first Section In second Appendix</title></subsection>
+    </section>
+    <section>
+      <title>Second Section In second Appendix</title>
+      <subsection><title>First Subsection in second Section In second Appendix</title></subsection>
+      <subsection><title>Second Subsection in second Section In second Appendix</title></subsection>
+      <subsection><title>Third Subsection in second Section In second Appendix</title></subsection>
+      <subsection><title>Fourth Subsection in second Section In second Appendix</title></subsection>
+      <subsection><title>Fifth Subsection in second Section In second Appendix</title></subsection>
+      <subsection><title>Sixth Subsection in second Section In second Appendix</title></subsection>
+      <subsection><title>Seventh Subsection in second Section In second Appendix</title></subsection>
+    </section>
+    <section>
+      <title>Third Section In second Appendix</title>
+      <subsection><title>First Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Second Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Third Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Fourth Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Fifth Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Sixth Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Seventh Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Eighth Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Ninth Subsection in third Section In second Appendix</title></subsection>
+      <subsection><title>Tenth Subsection in third Section In second Appendix</title></subsection>
+    </section>
+    <section>
+      <title>Fourth Section In second Appendix</title>
+      <subsection><title>First Subsection in fourth Section In second Appendix</title></subsection>
+      <subsection><title>Second Subsection in fourth Section In second Appendix</title></subsection>
+      <subsection><title>Third Subsection in fourth Section In second Appendix</title></subsection>
+      <subsection><title>Fourth Subsection in fourth Section In second Appendix</title></subsection>
+      <subsection><title>Fifth Subsection in fourth Section In second Appendix</title></subsection>
+      <subsection><title>Sixth Subsection in fourth Section In second Appendix</title></subsection>
+      <subsection><title>Seventh Subsection in fourth Section In second Appendix</title></subsection>
+      <subsection><title>Eighth Subsection in fourth Section In second Appendix</title></subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Third Appendix</title>
+    <section>
+      <title>First Section In third Appendix</title>
+      <subsection><title>First Subsection in first Section In third Appendix</title></subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourth Appendix</title>
+    <section>
+      <title>First Section In fourth Appendix</title>
+      <subsection><title>First Subsection in first Section In fourth Appendix</title></subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fifth Appendix</title>
+    <section>
+      <title>First Section In fifth Appendix</title>
+      <subsection><title>First Subsection in first Section In fifth Appendix</title></subsection>
+    </section>
+  </appendix>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering08.xsl b/test/tests/conf/numbering/numbering08.xsl
new file mode 100644
index 0000000..6b10687
--- /dev/null
+++ b/test/tests/conf/numbering/numbering08.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering08 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of leading zeroes in numbering. Last separator propagates. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[4]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="multiple"
+      count="chapter|section|subsection"
+      format="01-001. "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="appendix//title" priority="1">
+  <xsl:number level="multiple"
+      count="appendix|section|subsection"
+      format="A-001. "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering09.xml b/test/tests/conf/numbering/numbering09.xml
new file mode 100644
index 0000000..b4351b2
--- /dev/null
+++ b/test/tests/conf/numbering/numbering09.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering09.xsl b/test/tests/conf/numbering/numbering09.xsl
new file mode 100644
index 0000000..1828e1c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering09.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering09 -->
+  <!-- Author: David Marston, based on example in spec -->
+  <!-- Purpose: Test of value attribute. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <xsl:for-each select="note">
+    <xsl:number format="(1) " value="position()" /><xsl:value-of select="."/>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering10.xml b/test/tests/conf/numbering/numbering10.xml
new file mode 100644
index 0000000..5cbe085
--- /dev/null
+++ b/test/tests/conf/numbering/numbering10.xml
@@ -0,0 +1,1800 @@
+<?xml version="1.0"?> 
+
+<!-- Test for source tree numbering -->
+<doc>
+  <title>Test for source tree numbering</title>
+  <chapter>
+    <title>First Chapter</title>
+    <section>
+      <title>First Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+         <title>Twelveth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Second Chapter</title>
+    <section>
+      <title>First Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fouth Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Third Chapter</title>
+    <section>
+      <title>First Section In third Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In third Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourth Chapter</title>
+    <section>
+      <title>First Section In fourth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fifth Chapter</title>
+    <section>
+      <title>First Section In fifth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Sixth Chapter</title>
+    <section>
+      <title>First Section In sixth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In sixth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Seventh Chapter</title>
+    <section>
+      <title>First Section In seventh Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In seventh Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Eighth Chapter</title>
+    <section>
+      <title>First Section In eighth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In eighth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Ninth Chapter</title>
+    <section>
+      <title>First Section In ninth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In ninth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Tenth Chapter</title>
+    <section>
+      <title>First Section In tenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In tenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Eleventh Chapter</title>
+    <section>
+      <title>First Section In eleventh Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In eleventh Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Twelvth Chapter</title>
+    <section>
+      <title>First Section In twelvth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In twelvth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Thirteenth Chapter</title>
+    <section>
+      <title>First Section In thirteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In thirteenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourteenth Chapter</title>
+    <section>
+      <title>First Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <appendix>
+    <title>First Appendix</title>
+    <section>
+      <title>First Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Second Appendix</title>
+    <section>
+      <title>First Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fiftieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Third Appendix</title>
+    <section>
+      <title>First Section In third Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In third Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourth Appendix</title>
+    <section>
+      <title>First Section In fourth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fifth Appendix</title>
+    <section>
+      <title>First Section In fifth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Sixth Appendix</title>
+    <section>
+      <title>First Section In sixth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In sixth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Seventh Appendix</title>
+    <section>
+      <title>First Section In seventh Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In seventh Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Eighth Appendix</title>
+    <section>
+      <title>First Section In eighth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In eighth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Ninth Appendix</title>
+    <section>
+      <title>First Section In ninth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In ninth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Tenth Appendix</title>
+    <section>
+      <title>First Section In tenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In tenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Eleventh Appendix</title>
+    <section>
+      <title>First Section In eleventh Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In eleventh Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Twelvth Appendix</title>
+    <section>
+      <title>First Section In twelvth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In twelvth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Thirteenth Appendix</title>
+    <section>
+      <title>First Section In thirteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In thirteenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourteenth Appendix</title>
+    <section>
+      <title>First Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering10.xsl b/test/tests/conf/numbering/numbering10.xsl
new file mode 100644
index 0000000..057371b
--- /dev/null
+++ b/test/tests/conf/numbering/numbering10.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering10 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of format attributes that vary per level. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[4]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[5]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="multiple"
+        count="chapter|section|subsection"
+        format="I.A.1.a. "/>
+  <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="appendix//title" priority="1">
+  <xsl:number level="multiple"
+       count="appendix|section|subsection"
+       format="A.1.i.a. "/>
+  <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering11.xml b/test/tests/conf/numbering/numbering11.xml
new file mode 100644
index 0000000..e3673c4
--- /dev/null
+++ b/test/tests/conf/numbering/numbering11.xml
@@ -0,0 +1,335 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+    <note>aac</note>
+    <note>bbc</note>
+    <note>ccc</note>
+    <note>ddc</note>
+    <note>eec</note>
+    <note>ffc</note>
+    <note>ggc</note>
+    <note>hhc</note>
+    <note>iic</note>
+    <note>jjc</note>
+    <note>kkc</note>
+    <note>llc</note>
+    <note>mmc</note>
+    <note>nnc</note>
+    <note>ooc</note>
+    <note>ppc</note>
+    <note>qqc</note>
+    <note>rrc</note>
+    <note>ssc</note>
+    <note>ttc</note>
+    <note>uuc</note>
+    <note>vvc</note>
+    <note>wwc</note>
+    <note>xxc</note>
+    <note>yyc</note>
+    <note>aad</note>
+    <note>bbd</note>
+    <note>ccd</note>
+    <note>ddd</note>
+    <note>eed</note>
+    <note>ffd</note>
+    <note>ggd</note>
+    <note>hhd</note>
+    <note>iid</note>
+    <note>jjd</note>
+    <note>kkd</note>
+    <note>lld</note>
+    <note>mmd</note>
+    <note>nnd</note>
+    <note>ood</note>
+    <note>ppd</note>
+    <note>qqd</note>
+    <note>rrd</note>
+    <note>ssd</note>
+    <note>ttd</note>
+    <note>uud</note>
+    <note>vvd</note>
+    <note>wwd</note>
+    <note>xxd</note>
+    <note>yyd</note>
+    <note>aae</note>
+    <note>bbe</note>
+    <note>cce</note>
+    <note>dde</note>
+    <note>eee</note>
+    <note>ffe</note>
+    <note>gge</note>
+    <note>hhe</note>
+    <note>iie</note>
+    <note>jje</note>
+    <note>kke</note>
+    <note>lle</note>
+    <note>mme</note>
+    <note>nne</note>
+    <note>ooe</note>
+    <note>ppe</note>
+    <note>qqe</note>
+    <note>rre</note>
+    <note>sse</note>
+    <note>tte</note>
+    <note>uue</note>
+    <note>vve</note>
+    <note>wwe</note>
+    <note>xxe</note>
+    <note>yye</note>
+    <note>aaf</note>
+    <note>bbf</note>
+    <note>ccf</note>
+    <note>ddf</note>
+    <note>eef</note>
+    <note>fff</note>
+    <note>ggf</note>
+    <note>hhf</note>
+    <note>iif</note>
+    <note>jjf</note>
+    <note>kkf</note>
+    <note>llf</note>
+    <note>mmf</note>
+    <note>nnf</note>
+    <note>oof</note>
+    <note>ppf</note>
+    <note>qqf</note>
+    <note>rrf</note>
+    <note>ssf</note>
+    <note>ttf</note>
+    <note>uuf</note>
+    <note>vvf</note>
+    <note>wwf</note>
+    <note>xxf</note>
+    <note>yyf</note>
+    <note>aag</note>
+    <note>bbg</note>
+    <note>ccg</note>
+    <note>ddg</note>
+    <note>eeg</note>
+    <note>ffg</note>
+    <note>ggg</note>
+    <note>hhg</note>
+    <note>iig</note>
+    <note>jjg</note>
+    <note>kkg</note>
+    <note>llg</note>
+    <note>mmg</note>
+    <note>nng</note>
+    <note>oog</note>
+    <note>ppg</note>
+    <note>qqg</note>
+    <note>rrg</note>
+    <note>ssg</note>
+    <note>ttg</note>
+    <note>uug</note>
+    <note>vvg</note>
+    <note>wwg</note>
+    <note>xxg</note>
+    <note>yyg</note>
+    <note>aah</note>
+    <note>bbh</note>
+    <note>cch</note>
+    <note>ddh</note>
+    <note>eeh</note>
+    <note>ffh</note>
+    <note>ggh</note>
+    <note>hhh</note>
+    <note>iih</note>
+    <note>jjh</note>
+    <note>kkh</note>
+    <note>llh</note>
+    <note>mmh</note>
+    <note>nnh</note>
+    <note>ooh</note>
+    <note>pph</note>
+    <note>qqh</note>
+    <note>rrh</note>
+    <note>ssh</note>
+    <note>tth</note>
+    <note>uuh</note>
+    <note>vvh</note>
+    <note>wwh</note>
+    <note>xxh</note>
+    <note>yyh</note>
+    <note>aai</note>
+    <note>bbi</note>
+    <note>cci</note>
+    <note>ddi</note>
+    <note>eei</note>
+    <note>ffi</note>
+    <note>ggi</note>
+    <note>hhi</note>
+    <note>iii</note>
+    <note>jji</note>
+    <note>kki</note>
+    <note>lli</note>
+    <note>mmi</note>
+    <note>nni</note>
+    <note>ooi</note>
+    <note>ppi</note>
+    <note>qqi</note>
+    <note>rri</note>
+    <note>ssi</note>
+    <note>tti</note>
+    <note>uui</note>
+    <note>vvi</note>
+    <note>wwi</note>
+    <note>xxi</note>
+    <note>yyi</note>
+    <note>aaj</note>
+    <note>bbj</note>
+    <note>ccj</note>
+    <note>ddj</note>
+    <note>eej</note>
+    <note>ffj</note>
+    <note>ggj</note>
+    <note>hhj</note>
+    <note>iij</note>
+    <note>jjj</note>
+    <note>kkj</note>
+    <note>llj</note>
+    <note>mmj</note>
+    <note>nnj</note>
+    <note>ooj</note>
+    <note>ppj</note>
+    <note>qqj</note>
+    <note>rrj</note>
+    <note>ssj</note>
+    <note>ttj</note>
+    <note>uuj</note>
+    <note>vvj</note>
+    <note>wwj</note>
+    <note>xxj</note>
+    <note>yyj</note>
+    <note>aak</note>
+    <note>bbk</note>
+    <note>cck</note>
+    <note>ddk</note>
+    <note>eek</note>
+    <note>ffk</note>
+    <note>ggk</note>
+    <note>hhk</note>
+    <note>iik</note>
+    <note>jjk</note>
+    <note>kkk</note>
+    <note>llk</note>
+    <note>mmk</note>
+    <note>nnk</note>
+    <note>ook</note>
+    <note>ppk</note>
+    <note>qqk</note>
+    <note>rrk</note>
+    <note>ssk</note>
+    <note>ttk</note>
+    <note>uuk</note>
+    <note>vvk</note>
+    <note>wwk</note>
+    <note>xxk</note>
+    <note>yyk</note>
+    <note>aal</note>
+    <note>bbl</note>
+    <note>ccl</note>
+    <note>ddl</note>
+    <note>eel</note>
+    <note>ffl</note>
+    <note>ggl</note>
+    <note>hhl</note>
+    <note>iil</note>
+    <note>jjl</note>
+    <note>kkl</note>
+    <note>lll</note>
+    <note>mml</note>
+    <note>nnl</note>
+    <note>ool</note>
+    <note>ppl</note>
+    <note>qql</note>
+    <note>rrl</note>
+    <note>ssl</note>
+    <note>ttl</note>
+    <note>uul</note>
+    <note>vvl</note>
+    <note>wwl</note>
+    <note>xxl</note>
+    <note>yyl</note>
+    <note>aam</note>
+    <note>bbm</note>
+    <note>ccm</note>
+    <note>ddm</note>
+    <note>eem</note>
+    <note>ffm</note>
+    <note>ggm</note>
+    <note>hhm</note>
+    <note>iim</note>
+    <note>jjm</note>
+    <note>kkm</note>
+    <note>llm</note>
+    <note>mmm</note>
+    <note>nnm</note>
+    <note>oom</note>
+    <note>ppm</note>
+    <note>qqm</note>
+    <note>rrm</note>
+    <note>ssm</note>
+    <note>ttm</note>
+    <note>uum</note>
+    <note>vvm</note>
+    <note>wwm</note>
+    <note>xxm</note>
+    <note>yym</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering11.xsl b/test/tests/conf/numbering/numbering11.xsl
new file mode 100644
index 0000000..0478ad6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering11.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering11 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of grouping attributes. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[2]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(1) " grouping-size="2" grouping-separator="," />
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering12.xml b/test/tests/conf/numbering/numbering12.xml
new file mode 100644
index 0000000..86cffad
--- /dev/null
+++ b/test/tests/conf/numbering/numbering12.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
diff --git a/test/tests/conf/numbering/numbering12.xsl b/test/tests/conf/numbering/numbering12.xsl
new file mode 100644
index 0000000..ecfd341
--- /dev/null
+++ b/test/tests/conf/numbering/numbering12.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering12 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of alphabetic "numbering" sequence. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(A) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering13.xml b/test/tests/conf/numbering/numbering13.xml
new file mode 100644
index 0000000..86cffad
--- /dev/null
+++ b/test/tests/conf/numbering/numbering13.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
diff --git a/test/tests/conf/numbering/numbering13.xsl b/test/tests/conf/numbering/numbering13.xsl
new file mode 100644
index 0000000..bb3c17a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering13.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering13 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of roman-numeral "numbering" sequence. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[5]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(I) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering14.xml b/test/tests/conf/numbering/numbering14.xml
new file mode 100644
index 0000000..044d5b7
--- /dev/null
+++ b/test/tests/conf/numbering/numbering14.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>zzz</note>
+    <note>aab</note>
+    <note>aac</note>
+    <note>aad</note>
+    <note>aae</note>
+    <note>aaf</note>
+    <note>aag</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering14.xsl b/test/tests/conf/numbering/numbering14.xsl
new file mode 100644
index 0000000..45b7c6f
--- /dev/null
+++ b/test/tests/conf/numbering/numbering14.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering14 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of greek-numeral "alphabetic" sequence. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[6]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[5]/text()[5]" -->
+  <!-- Scenario: operation="standard-HTML" -->
+  <!-- Discretionary: number-greek-alpha="true" -->
+
+<xsl:output method="html" encoding="ISO-8859-1" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="&#x03b1;" letter-value="alphabetic"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering17.xml b/test/tests/conf/numbering/numbering17.xml
new file mode 100644
index 0000000..241f50b
--- /dev/null
+++ b/test/tests/conf/numbering/numbering17.xml
@@ -0,0 +1,505 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+    <note>aac</note>
+    <note>bbc</note>
+    <note>ccc</note>
+    <note>ddc</note>
+    <note>eec</note>
+    <note>ffc</note>
+    <note>ggc</note>
+    <note>hhc</note>
+    <note>iic</note>
+    <note>jjc</note>
+    <note>kkc</note>
+    <note>llc</note>
+    <note>mmc</note>
+    <note>nnc</note>
+    <note>ooc</note>
+    <note>ppc</note>
+    <note>qqc</note>
+    <note>rrc</note>
+    <note>ssc</note>
+    <note>ttc</note>
+    <note>uuc</note>
+    <note>vvc</note>
+    <note>wwc</note>
+    <note>xxc</note>
+    <note>yyc</note>
+    <note>aad</note>
+    <note>bbd</note>
+    <note>ccd</note>
+    <note>ddd</note>
+    <note>eed</note>
+    <note>ffd</note>
+    <note>ggd</note>
+    <note>hhd</note>
+    <note>iid</note>
+    <note>jjd</note>
+    <note>kkd</note>
+    <note>lld</note>
+    <note>mmd</note>
+    <note>nnd</note>
+    <note>ood</note>
+    <note>ppd</note>
+    <note>qqd</note>
+    <note>rrd</note>
+    <note>ssd</note>
+    <note>ttd</note>
+    <note>uud</note>
+    <note>vvd</note>
+    <note>wwd</note>
+    <note>xxd</note>
+    <note>yyd</note>
+    <note>aae</note>
+    <note>bbe</note>
+    <note>cce</note>
+    <note>dde</note>
+    <note>eee</note>
+    <note>ffe</note>
+    <note>gge</note>
+    <note>hhe</note>
+    <note>iie</note>
+    <note>jje</note>
+    <note>kke</note>
+    <note>lle</note>
+    <note>mme</note>
+    <note>nne</note>
+    <note>ooe</note>
+    <note>ppe</note>
+    <note>qqe</note>
+    <note>rre</note>
+    <note>sse</note>
+    <note>tte</note>
+    <note>uue</note>
+    <note>vve</note>
+    <note>wwe</note>
+    <note>xxe</note>
+    <note>yye</note>
+    <note>aaf</note>
+    <note>bbf</note>
+    <note>ccf</note>
+    <note>ddf</note>
+    <note>eef</note>
+    <note>fff</note>
+    <note>ggf</note>
+    <note>hhf</note>
+    <note>iif</note>
+    <note>jjf</note>
+    <note>kkf</note>
+    <note>llf</note>
+    <note>mmf</note>
+    <note>nnf</note>
+    <note>oof</note>
+    <note>ppf</note>
+    <note>qqf</note>
+    <note>rrf</note>
+    <note>ssf</note>
+    <note>ttf</note>
+    <note>uuf</note>
+    <note>vvf</note>
+    <note>wwf</note>
+    <note>xxf</note>
+    <note>yyf</note>
+    <note>aag</note>
+    <note>bbg</note>
+    <note>ccg</note>
+    <note>ddg</note>
+    <note>eeg</note>
+    <note>ffg</note>
+    <note>ggg</note>
+    <note>hhg</note>
+    <note>iig</note>
+    <note>jjg</note>
+    <note>kkg</note>
+    <note>llg</note>
+    <note>mmg</note>
+    <note>nng</note>
+    <note>oog</note>
+    <note>ppg</note>
+    <note>qqg</note>
+    <note>rrg</note>
+    <note>ssg</note>
+    <note>ttg</note>
+    <note>uug</note>
+    <note>vvg</note>
+    <note>wwg</note>
+    <note>xxg</note>
+    <note>yyg</note>
+    <note>aah</note>
+    <note>bbh</note>
+    <note>cch</note>
+    <note>ddh</note>
+    <note>eeh</note>
+    <note>ffh</note>
+    <note>ggh</note>
+    <note>hhh</note>
+    <note>iih</note>
+    <note>jjh</note>
+    <note>kkh</note>
+    <note>llh</note>
+    <note>mmh</note>
+    <note>nnh</note>
+    <note>ooh</note>
+    <note>pph</note>
+    <note>qqh</note>
+    <note>rrh</note>
+    <note>ssh</note>
+    <note>tth</note>
+    <note>uuh</note>
+    <note>vvh</note>
+    <note>wwh</note>
+    <note>xxh</note>
+    <note>yyh</note>
+    <note>aai</note>
+    <note>bbi</note>
+    <note>cci</note>
+    <note>ddi</note>
+    <note>eei</note>
+    <note>ffi</note>
+    <note>ggi</note>
+    <note>hhi</note>
+    <note>iii</note>
+    <note>jji</note>
+    <note>kki</note>
+    <note>lli</note>
+    <note>mmi</note>
+    <note>nni</note>
+    <note>ooi</note>
+    <note>ppi</note>
+    <note>qqi</note>
+    <note>rri</note>
+    <note>ssi</note>
+    <note>tti</note>
+    <note>uui</note>
+    <note>vvi</note>
+    <note>wwi</note>
+    <note>xxi</note>
+    <note>yyi</note>
+    <note>aaj</note>
+    <note>bbj</note>
+    <note>ccj</note>
+    <note>ddj</note>
+    <note>eej</note>
+    <note>ffj</note>
+    <note>ggj</note>
+    <note>hhj</note>
+    <note>iij</note>
+    <note>jjj</note>
+    <note>kkj</note>
+    <note>llj</note>
+    <note>mmj</note>
+    <note>nnj</note>
+    <note>ooj</note>
+    <note>ppj</note>
+    <note>qqj</note>
+    <note>rrj</note>
+    <note>ssj</note>
+    <note>ttj</note>
+    <note>uuj</note>
+    <note>vvj</note>
+    <note>wwj</note>
+    <note>xxj</note>
+    <note>yyj</note>
+    <note>aak</note>
+    <note>bbk</note>
+    <note>cck</note>
+    <note>ddk</note>
+    <note>eek</note>
+    <note>ffk</note>
+    <note>ggk</note>
+    <note>hhk</note>
+    <note>iik</note>
+    <note>jjk</note>
+    <note>kkk</note>
+    <note>llk</note>
+    <note>mmk</note>
+    <note>nnk</note>
+    <note>ook</note>
+    <note>ppk</note>
+    <note>qqk</note>
+    <note>rrk</note>
+    <note>ssk</note>
+    <note>ttk</note>
+    <note>uuk</note>
+    <note>vvk</note>
+    <note>wwk</note>
+    <note>xxk</note>
+    <note>yyk</note>
+    <note>aal</note>
+    <note>bbl</note>
+    <note>ccl</note>
+    <note>ddl</note>
+    <note>eel</note>
+    <note>ffl</note>
+    <note>ggl</note>
+    <note>hhl</note>
+    <note>iil</note>
+    <note>jjl</note>
+    <note>kkl</note>
+    <note>lll</note>
+    <note>mml</note>
+    <note>nnl</note>
+    <note>ool</note>
+    <note>ppl</note>
+    <note>qql</note>
+    <note>rrl</note>
+    <note>ssl</note>
+    <note>ttl</note>
+    <note>uul</note>
+    <note>vvl</note>
+    <note>wwl</note>
+    <note>xxl</note>
+    <note>yyl</note>
+    <note>aam</note>
+    <note>bbm</note>
+    <note>ccm</note>
+    <note>ddm</note>
+    <note>eem</note>
+    <note>ffm</note>
+    <note>ggm</note>
+    <note>hhm</note>
+    <note>iim</note>
+    <note>jjm</note>
+    <note>kkm</note>
+    <note>llm</note>
+    <note>mmm</note>
+    <note>nnm</note>
+    <note>oom</note>
+    <note>ppm</note>
+    <note>qqm</note>
+    <note>rrm</note>
+    <note>ssm</note>
+    <note>ttm</note>
+    <note>uum</note>
+    <note>vvm</note>
+    <note>wwm</note>
+    <note>xxm</note>
+    <note>yym</note>
+    <note>aan</note>
+    <note>bbn</note>
+    <note>ccn</note>
+    <note>ddn</note>
+    <note>een</note>
+    <note>ffn</note>
+    <note>ggn</note>
+    <note>hhn</note>
+    <note>iin</note>
+    <note>jjn</note>
+    <note>kkn</note>
+    <note>lln</note>
+    <note>mmn</note>
+    <note>nnn</note>
+    <note>oon</note>
+    <note>ppn</note>
+    <note>qqn</note>
+    <note>rrn</note>
+    <note>ssn</note>
+    <note>ttn</note>
+    <note>uun</note>
+    <note>vvn</note>
+    <note>wwn</note>
+    <note>xxn</note>
+    <note>yyn</note>
+    <note>aao</note>
+    <note>bbo</note>
+    <note>cco</note>
+    <note>ddo</note>
+    <note>eeo</note>
+    <note>ffo</note>
+    <note>ggo</note>
+    <note>hho</note>
+    <note>iio</note>
+    <note>jjo</note>
+    <note>kko</note>
+    <note>llo</note>
+    <note>mmo</note>
+    <note>nno</note>
+    <note>ooo</note>
+    <note>ppo</note>
+    <note>qqo</note>
+    <note>rro</note>
+    <note>sso</note>
+    <note>tto</note>
+    <note>uuo</note>
+    <note>vvo</note>
+    <note>wwo</note>
+    <note>xxo</note>
+    <note>yyo</note>
+    <note>aap</note>
+    <note>bbp</note>
+    <note>ccp</note>
+    <note>ddp</note>
+    <note>eep</note>
+    <note>ffp</note>
+    <note>ggp</note>
+    <note>hhp</note>
+    <note>iip</note>
+    <note>jjp</note>
+    <note>kkp</note>
+    <note>llp</note>
+    <note>mmp</note>
+    <note>nnp</note>
+    <note>oop</note>
+    <note>ppp</note>
+    <note>qqp</note>
+    <note>rrp</note>
+    <note>ssp</note>
+    <note>ttp</note>
+    <note>uup</note>
+    <note>vvp</note>
+    <note>wwp</note>
+    <note>xxp</note>
+    <note>yyp</note>
+    <note>aaq</note>
+    <note>bbq</note>
+    <note>ccq</note>
+    <note>ddq</note>
+    <note>eeq</note>
+    <note>ffq</note>
+    <note>ggq</note>
+    <note>hhq</note>
+    <note>iiq</note>
+    <note>jjq</note>
+    <note>kkq</note>
+    <note>llq</note>
+    <note>mmq</note>
+    <note>nnq</note>
+    <note>ooq</note>
+    <note>ppq</note>
+    <note>qqq</note>
+    <note>rrq</note>
+    <note>ssq</note>
+    <note>ttq</note>
+    <note>uuq</note>
+    <note>vvq</note>
+    <note>wwq</note>
+    <note>xxq</note>
+    <note>yyq</note>
+    <note>aar</note>
+    <note>bbr</note>
+    <note>ccr</note>
+    <note>ddr</note>
+    <note>eer</note>
+    <note>ffr</note>
+    <note>ggr</note>
+    <note>hhr</note>
+    <note>iir</note>
+    <note>jjr</note>
+    <note>kkr</note>
+    <note>llr</note>
+    <note>mmr</note>
+    <note>nnr</note>
+    <note>oor</note>
+    <note>ppr</note>
+    <note>qqr</note>
+    <note>rrr</note>
+    <note>ssr</note>
+    <note>ttr</note>
+    <note>uur</note>
+    <note>vvr</note>
+    <note>wwr</note>
+    <note>xxr</note>
+    <note>yyr</note>
+    <note>aas</note>
+    <note>bbs</note>
+    <note>ccs</note>
+    <note>dds</note>
+    <note>ees</note>
+    <note>ffs</note>
+    <note>ggs</note>
+    <note>hhs</note>
+    <note>iis</note>
+    <note>jjs</note>
+    <note>kks</note>
+    <note>lls</note>
+    <note>mms</note>
+    <note>nns</note>
+    <note>oos</note>
+    <note>pps</note>
+    <note>qqs</note>
+    <note>rrs</note>
+    <note>sss</note>
+    <note>tts</note>
+    <note>uus</note>
+    <note>vvs</note>
+    <note>wws</note>
+    <note>xxs</note>
+    <note>yys</note>
+    <note>aat</note>
+    <note>bbt</note>
+    <note>cct</note>
+    <note>ddt</note>
+    <note>eet</note>
+    <note>fft</note>
+    <note>ggt</note>
+    <note>hht</note>
+    <note>iit</note>
+    <note>jjt</note>
+    <note>kkt</note>
+    <note>llt</note>
+    <note>mmt</note>
+    <note>nnt</note>
+    <note>oot</note>
+    <note>ppt</note>
+    <note>qqt</note>
+    <note>rrt</note>
+    <note>sst</note>
+    <note>ttt</note>
+    <note>uut</note>
+    <note>vvt</note>
+    <note>wwt</note>
+    <note>xxt</note>
+    <note>yyt</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering17.xsl b/test/tests/conf/numbering/numbering17.xsl
new file mode 100644
index 0000000..e395ddd
--- /dev/null
+++ b/test/tests/conf/numbering/numbering17.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering17 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of proper formation of Roman numerals. -->
+  <!-- SpecCitation: Rec="XSLT" VersionDrop="1.1" --><!-- Formatting of zero will become an error -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[5]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<!-- Elaboration: The value= formula below generates groups of 12 numbers out of every 50.
+     Look particularly at subtractive numbers: 4, 9, 19, 40, 49, 99, 490, 499, 900, 990, 999, etc.
+     It generates a zero, which may vary in its representation. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <xsl:for-each select="note">
+    <xsl:number format="(I) " value="(floor(position() div 12)*50)+(position() mod 12)-1" />
+    <xsl:value-of select="."/><xsl:text>&#10;</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering18.xml b/test/tests/conf/numbering/numbering18.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering18.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering18.xsl b/test/tests/conf/numbering/numbering18.xsl
new file mode 100644
index 0000000..a47ca55
--- /dev/null
+++ b/test/tests/conf/numbering/numbering18.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering18 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of node numbering before and after the nodes specified in from. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering19.xml b/test/tests/conf/numbering/numbering19.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering19.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering19.xsl b/test/tests/conf/numbering/numbering19.xsl
new file mode 100644
index 0000000..8180374
--- /dev/null
+++ b/test/tests/conf/numbering/numbering19.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering19 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of node numbering before and after the nodes specified in from. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" from="chapter" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering20.xml b/test/tests/conf/numbering/numbering20.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering20.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering20.xsl b/test/tests/conf/numbering/numbering20.xsl
new file mode 100644
index 0000000..b0dc42a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering20.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering20 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of node numbering before and after the nodes specified in from. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" from="chapter" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering21.xml b/test/tests/conf/numbering/numbering21.xml
new file mode 100644
index 0000000..9c51d73
--- /dev/null
+++ b/test/tests/conf/numbering/numbering21.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="no">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="yes">eee</note>
+  </chapter>
+  <chapter>
+    <note flag="no">fff</note>
+    <note flag="yes">ggg</note>
+    <note flag="yes">hhh</note>
+  </chapter>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="yes">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="no">eee</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering21.xsl b/test/tests/conf/numbering/numbering21.xsl
new file mode 100644
index 0000000..624b248
--- /dev/null
+++ b/test/tests/conf/numbering/numbering21.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering21 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (any) and counting only some nodes. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" count="note[@flag='yes']" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering22.xml b/test/tests/conf/numbering/numbering22.xml
new file mode 100644
index 0000000..9c51d73
--- /dev/null
+++ b/test/tests/conf/numbering/numbering22.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="no">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="yes">eee</note>
+  </chapter>
+  <chapter>
+    <note flag="no">fff</note>
+    <note flag="yes">ggg</note>
+    <note flag="yes">hhh</note>
+  </chapter>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="yes">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="no">eee</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering22.xsl b/test/tests/conf/numbering/numbering22.xsl
new file mode 100644
index 0000000..c7bc385
--- /dev/null
+++ b/test/tests/conf/numbering/numbering22.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering22 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (single) and counting only some nodes. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Elaboration: Setting level to multiple should obtain the same results.
+       All note nodes are on the same level. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" from="chapter" count="note[@flag='yes']" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering23.xml b/test/tests/conf/numbering/numbering23.xml
new file mode 100644
index 0000000..f643429
--- /dev/null
+++ b/test/tests/conf/numbering/numbering23.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering23.xsl b/test/tests/conf/numbering/numbering23.xsl
new file mode 100644
index 0000000..443b1ce
--- /dev/null
+++ b/test/tests/conf/numbering/numbering23.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering23 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of value attribute with popular "of n" format. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[4]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <xsl:for-each select="note">
+    Note <xsl:number format="01" value="position()" /> of <xsl:value-of select="count(/doc/chapter/note)"/>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering24.xml b/test/tests/conf/numbering/numbering24.xml
new file mode 100644
index 0000000..f643429
--- /dev/null
+++ b/test/tests/conf/numbering/numbering24.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering24.xsl b/test/tests/conf/numbering/numbering24.xsl
new file mode 100644
index 0000000..a26b4ac
--- /dev/null
+++ b/test/tests/conf/numbering/numbering24.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering24 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Number without value= inside sorted for-each. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/p[2]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="DocFrag" place="id(for-each)" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="DocFrag" place="id(sorting)" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Elaboration: Numbering directly inside sorted for-each is from document order,
+     if using default number calculations. "If no value attribute is specified,
+     then the xsl:number element inserts a number based on the position of the
+     current node in the source tree." -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:for-each select="chapter/note">
+      <xsl:sort data-type="text" order="descending"/>
+      <xsl:number format="-1-" level="single" from="chapter" /><xsl:value-of select="."/>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering25.xml b/test/tests/conf/numbering/numbering25.xml
new file mode 100644
index 0000000..8c09bbf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering25.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+  </chapter>
+  <chapter>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+  </chapter>
+  <chapter>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>zzz</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering25.xsl b/test/tests/conf/numbering/numbering25.xsl
new file mode 100644
index 0000000..2b1ac31
--- /dev/null
+++ b/test/tests/conf/numbering/numbering25.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering25 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Number without value= inside template called within sorted for-each. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/p[2]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="DocFrag" place="id(for-each)" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="DocFrag" place="id(sorting)" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Elaboration: Numbering inside different template is still based on position
+     of each node in the source tree, if there is no value attribute in xsl:number. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc/chapter">
+  <list>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:for-each select="note">
+      <xsl:sort data-type="text" order="descending"/>
+      <xsl:apply-templates select="." mode="numbering"/>
+    </xsl:for-each>
+  </list>
+</xsl:template>
+
+<xsl:template match="note" mode="numbering">
+  <xsl:number level="single" from="chapter" format="(1) "/><xsl:value-of select="."/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering26.xml b/test/tests/conf/numbering/numbering26.xml
new file mode 100644
index 0000000..f643429
--- /dev/null
+++ b/test/tests/conf/numbering/numbering26.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering26.xsl b/test/tests/conf/numbering/numbering26.xsl
new file mode 100644
index 0000000..9080676
--- /dev/null
+++ b/test/tests/conf/numbering/numbering26.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering26 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Numbering comes from sorted order if value attribute used. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="DocFrag" place="id(for-each)" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="DocFrag" place="id(sorting)" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:for-each select="chapter/note">
+      <xsl:sort data-type="text" order="descending"/>
+      <xsl:number format="-1-" level="single" from="chapter" value="position()"/>
+      <xsl:value-of select="."/>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering27.xml b/test/tests/conf/numbering/numbering27.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering27.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering27.xsl b/test/tests/conf/numbering/numbering27.xsl
new file mode 100644
index 0000000..55bd2e4
--- /dev/null
+++ b/test/tests/conf/numbering/numbering27.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering27 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document, level=multiple and default from. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="1+1-1+1-1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering28.xml b/test/tests/conf/numbering/numbering28.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering28.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering28.xsl b/test/tests/conf/numbering/numbering28.xsl
new file mode 100644
index 0000000..968a0b9
--- /dev/null
+++ b/test/tests/conf/numbering/numbering28.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering28 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document, level=single and default from. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="single" count="a|b|c|d|e" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering29.xml b/test/tests/conf/numbering/numbering29.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering29.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering29.xsl b/test/tests/conf/numbering/numbering29.xsl
new file mode 100644
index 0000000..0fab3db
--- /dev/null
+++ b/test/tests/conf/numbering/numbering29.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering29 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document, level=any and default from. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="any" count="a|b|c|d|e" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering30.xml b/test/tests/conf/numbering/numbering30.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering30.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering30.xsl b/test/tests/conf/numbering/numbering30.xsl
new file mode 100644
index 0000000..677a929
--- /dev/null
+++ b/test/tests/conf/numbering/numbering30.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering30 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="1+1-1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering31.xml b/test/tests/conf/numbering/numbering31.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering31.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering31.xsl b/test/tests/conf/numbering/numbering31.xsl
new file mode 100644
index 0000000..0cbea28
--- /dev/null
+++ b/test/tests/conf/numbering/numbering31.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering31 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="A."/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering32.xml b/test/tests/conf/numbering/numbering32.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering32.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering32.xsl b/test/tests/conf/numbering/numbering32.xsl
new file mode 100644
index 0000000..97c50ff
--- /dev/null
+++ b/test/tests/conf/numbering/numbering32.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering32 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one, watching for confusion with default (.) separator. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[9]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="A.a+a"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering33.xml b/test/tests/conf/numbering/numbering33.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering33.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering33.xsl b/test/tests/conf/numbering/numbering33.xsl
new file mode 100644
index 0000000..339a58a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering33.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering33 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="A+"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering34.xml b/test/tests/conf/numbering/numbering34.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering34.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering34.xsl b/test/tests/conf/numbering/numbering34.xsl
new file mode 100644
index 0000000..51fcc0c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering34.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering34 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one, with default (.) elsewhere in format. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[9]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format=".A+a 1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering35.xml b/test/tests/conf/numbering/numbering35.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering35.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering35.xsl b/test/tests/conf/numbering/numbering35.xsl
new file mode 100644
index 0000000..a905cea
--- /dev/null
+++ b/test/tests/conf/numbering/numbering35.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering35 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="*1+1*"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering36.xml b/test/tests/conf/numbering/numbering36.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering36.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering36.xsl b/test/tests/conf/numbering/numbering36.xsl
new file mode 100644
index 0000000..5f3fd5e
--- /dev/null
+++ b/test/tests/conf/numbering/numbering36.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering36 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="*1+1*1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering37.xml b/test/tests/conf/numbering/numbering37.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering37.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering37.xsl b/test/tests/conf/numbering/numbering37.xsl
new file mode 100644
index 0000000..b6d408c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering37.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering37 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, with extra characters that look the same. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="...A..."/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering38.xml b/test/tests/conf/numbering/numbering38.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering38.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering38.xsl b/test/tests/conf/numbering/numbering38.xsl
new file mode 100644
index 0000000..e7f9cdc
--- /dev/null
+++ b/test/tests/conf/numbering/numbering38.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering38 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, with extra characters that look the same. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[5]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="..I.A.."/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering39.xml b/test/tests/conf/numbering/numbering39.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering39.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering39.xsl b/test/tests/conf/numbering/numbering39.xsl
new file mode 100644
index 0000000..9dbb652
--- /dev/null
+++ b/test/tests/conf/numbering/numbering39.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering39 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one, with extra characters that look the same. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="**A**"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering40.xml b/test/tests/conf/numbering/numbering40.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering40.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering40.xsl b/test/tests/conf/numbering/numbering40.xsl
new file mode 100644
index 0000000..d4f541f
--- /dev/null
+++ b/test/tests/conf/numbering/numbering40.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering40 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[9]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Elaboration: Due multiple levels, an interior separator character is needed, and the default will be used.
+       Trailing characters in format string look like a separator but aren't. -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="*%A|+"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering41.xml b/test/tests/conf/numbering/numbering41.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering41.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering41.xsl b/test/tests/conf/numbering/numbering41.xsl
new file mode 100644
index 0000000..e847143
--- /dev/null
+++ b/test/tests/conf/numbering/numbering41.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering41 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one (which is the last one between). -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="*%A|a+?"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering42.xml b/test/tests/conf/numbering/numbering42.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering42.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering42.xsl b/test/tests/conf/numbering/numbering42.xsl
new file mode 100644
index 0000000..299a664
--- /dev/null
+++ b/test/tests/conf/numbering/numbering42.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering42 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="(1.)"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering43.xml b/test/tests/conf/numbering/numbering43.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering43.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering43.xsl b/test/tests/conf/numbering/numbering43.xsl
new file mode 100644
index 0000000..641bfb1
--- /dev/null
+++ b/test/tests/conf/numbering/numbering43.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering43 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="(A*1)"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering44.xml b/test/tests/conf/numbering/numbering44.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering44.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering44.xsl b/test/tests/conf/numbering/numbering44.xsl
new file mode 100644
index 0000000..1ca23ca
--- /dev/null
+++ b/test/tests/conf/numbering/numbering44.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering44 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, propagating last one. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="(A*1?)"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering45.xml b/test/tests/conf/numbering/numbering45.xml
new file mode 100644
index 0000000..bcae948
--- /dev/null
+++ b/test/tests/conf/numbering/numbering45.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering45.xsl b/test/tests/conf/numbering/numbering45.xsl
new file mode 100644
index 0000000..f5b193b
--- /dev/null
+++ b/test/tests/conf/numbering/numbering45.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering45 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test more than one xsl:number counter active at the same time. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <xsl:for-each select="note">
+    <xsl:number format="A-" count="note" />
+    <xsl:if test="position() mod 2 = 0">
+      <xsl:number format="(1) " count="note[position() mod 2 = 0]" />
+    </xsl:if>
+    <xsl:if test="position() mod 2 = 1">
+      <xsl:number format="(1) " count="note[position() mod 2 = 1]" />
+    </xsl:if>
+    <xsl:value-of select="."/><xsl:text>&#10;</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering46.xml b/test/tests/conf/numbering/numbering46.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering46.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering46.xsl b/test/tests/conf/numbering/numbering46.xsl
new file mode 100644
index 0000000..f110c50
--- /dev/null
+++ b/test/tests/conf/numbering/numbering46.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering46 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number formatting separators, with multiple characters in between numbering tokens. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" count="a|b|c|d|e" format="(A--1)"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering47.xml b/test/tests/conf/numbering/numbering47.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering47.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering47.xsl b/test/tests/conf/numbering/numbering47.xsl
new file mode 100644
index 0000000..b89da81
--- /dev/null
+++ b/test/tests/conf/numbering/numbering47.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering47 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Establish that the default for level is single. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number count="a|b|c|d|e" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering48.xml b/test/tests/conf/numbering/numbering48.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering48.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering48.xsl b/test/tests/conf/numbering/numbering48.xsl
new file mode 100644
index 0000000..c95e16b
--- /dev/null
+++ b/test/tests/conf/numbering/numbering48.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering48 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Count only top-level changes but number all the way down, level=single. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="single" count="a" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering49.xml b/test/tests/conf/numbering/numbering49.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering49.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering49.xsl b/test/tests/conf/numbering/numbering49.xsl
new file mode 100644
index 0000000..fd2222e
--- /dev/null
+++ b/test/tests/conf/numbering/numbering49.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering49 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Count only bottom-level changes but number all the way down, level=any. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="any" count="e" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering50.xml b/test/tests/conf/numbering/numbering50.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering50.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering50.xsl b/test/tests/conf/numbering/numbering50.xsl
new file mode 100644
index 0000000..e2f31eb
--- /dev/null
+++ b/test/tests/conf/numbering/numbering50.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering50 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Allow level to default to single and count top-level items all the way down. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number count="a" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering51.xml b/test/tests/conf/numbering/numbering51.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering51.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering51.xsl b/test/tests/conf/numbering/numbering51.xsl
new file mode 100644
index 0000000..06bedbb
--- /dev/null
+++ b/test/tests/conf/numbering/numbering51.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering51 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with from and count defaulted but level=any. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="any" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering52.xml b/test/tests/conf/numbering/numbering52.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering52.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering52.xsl b/test/tests/conf/numbering/numbering52.xsl
new file mode 100644
index 0000000..f3e21c0
--- /dev/null
+++ b/test/tests/conf/numbering/numbering52.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering52 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with a filtered count pattern, from defaulted, level=single. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" count="note[position() mod 2 = 1]" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering53.xml b/test/tests/conf/numbering/numbering53.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering53.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering53.xsl b/test/tests/conf/numbering/numbering53.xsl
new file mode 100644
index 0000000..4272a6e
--- /dev/null
+++ b/test/tests/conf/numbering/numbering53.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering53 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with from and count defaulted, level=single. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering54.xml b/test/tests/conf/numbering/numbering54.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering54.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering54.xsl b/test/tests/conf/numbering/numbering54.xsl
new file mode 100644
index 0000000..ca57103
--- /dev/null
+++ b/test/tests/conf/numbering/numbering54.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering54 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with from and count defaulted, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering55.xml b/test/tests/conf/numbering/numbering55.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering55.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering55.xsl b/test/tests/conf/numbering/numbering55.xsl
new file mode 100644
index 0000000..f16898e
--- /dev/null
+++ b/test/tests/conf/numbering/numbering55.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering55 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with count on same level, from defaulted, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" count="note" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering56.xml b/test/tests/conf/numbering/numbering56.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering56.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering56.xsl b/test/tests/conf/numbering/numbering56.xsl
new file mode 100644
index 0000000..852ebe2
--- /dev/null
+++ b/test/tests/conf/numbering/numbering56.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering56 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with count from higher level, from defaulted, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" count="chapter" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering57.xml b/test/tests/conf/numbering/numbering57.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering57.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering57.xsl b/test/tests/conf/numbering/numbering57.xsl
new file mode 100644
index 0000000..00e89c6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering57.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering57 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with count specifying same and higher level, from defaulted, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" count="chapter/note" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering58.xml b/test/tests/conf/numbering/numbering58.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering58.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering58.xsl b/test/tests/conf/numbering/numbering58.xsl
new file mode 100644
index 0000000..bb2c01a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering58.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering58 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with a filtered count pattern, from defaulted, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" count="note[position() mod 2 = 1]" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering59.xml b/test/tests/conf/numbering/numbering59.xml
new file mode 100644
index 0000000..0eebbb6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering59.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="no">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="yes">eee</note>
+  </chapter>
+  <note flag="no">fff</note>
+  <note flag="yes">ggg</note>
+  <note flag="yes">hhh</note>
+  <chapter>
+    <note flag="yes">iii</note>
+    <note flag="yes">jjj</note>
+    <note flag="no">kkk</note>
+    <note flag="yes">lll</note>
+    <note flag="no">mmm</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering59.xsl b/test/tests/conf/numbering/numbering59.xsl
new file mode 100644
index 0000000..4ffd34c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering59.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering59 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (any) and counting only some nodes, with from defaulted. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" count="note[@flag='yes']" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering60.xml b/test/tests/conf/numbering/numbering60.xml
new file mode 100644
index 0000000..0eebbb6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering60.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="no">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="yes">eee</note>
+  </chapter>
+  <note flag="no">fff</note>
+  <note flag="yes">ggg</note>
+  <note flag="yes">hhh</note>
+  <chapter>
+    <note flag="yes">iii</note>
+    <note flag="yes">jjj</note>
+    <note flag="no">kkk</note>
+    <note flag="yes">lll</note>
+    <note flag="no">mmm</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering60.xsl b/test/tests/conf/numbering/numbering60.xsl
new file mode 100644
index 0000000..870ffdc
--- /dev/null
+++ b/test/tests/conf/numbering/numbering60.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering60 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (any) and counting only some nodes, from specifies next-higher level. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" count="note[@flag='yes']" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering61.xml b/test/tests/conf/numbering/numbering61.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering61.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering61.xsl b/test/tests/conf/numbering/numbering61.xsl
new file mode 100644
index 0000000..420172c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering61.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering61 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document, level=any, from specifies middle level. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="any" from="c" count="a|b|c|d|e" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering62.xml b/test/tests/conf/numbering/numbering62.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering62.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering62.xsl b/test/tests/conf/numbering/numbering62.xsl
new file mode 100644
index 0000000..50c4306
--- /dev/null
+++ b/test/tests/conf/numbering/numbering62.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering62 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Count one level of changes and number below there, level=single. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="single" from="b" count="c" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering63.xml b/test/tests/conf/numbering/numbering63.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering63.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering63.xsl b/test/tests/conf/numbering/numbering63.xsl
new file mode 100644
index 0000000..ae10248
--- /dev/null
+++ b/test/tests/conf/numbering/numbering63.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering63 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Count all levels of changes and number by level, level=single. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="single" from="a" count="a|b|c|d|e" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering64.xml b/test/tests/conf/numbering/numbering64.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering64.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering64.xsl b/test/tests/conf/numbering/numbering64.xsl
new file mode 100644
index 0000000..a42d7e6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering64.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering64 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with count on same level, from is next higher level, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" from="chapter" count="note" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering65.xml b/test/tests/conf/numbering/numbering65.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering65.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering65.xsl b/test/tests/conf/numbering/numbering65.xsl
new file mode 100644
index 0000000..5a895d3
--- /dev/null
+++ b/test/tests/conf/numbering/numbering65.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering65 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document with specified from level, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" from="a" count="b|c|d|e" format="1-1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering66.xml b/test/tests/conf/numbering/numbering66.xml
new file mode 100644
index 0000000..508b105
--- /dev/null
+++ b/test/tests/conf/numbering/numbering66.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0"?> 
+
+<!-- Test for source tree numbering -->
+<doc>
+  <title>Test for source tree numbering</title>
+  <chapter>
+    <title>First Chapter</title>
+    <section>
+      <title>First Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Second Chapter</title>
+    <section>
+      <title>First Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fouth Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Third Chapter</title>
+    <section>
+      <title>First Section In third Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In third Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourth Chapter</title>
+    <section>
+      <title>First Section In fourth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fifth Chapter</title>
+    <section>
+      <title>First Section In fifth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering66.xsl b/test/tests/conf/numbering/numbering66.xsl
new file mode 100644
index 0000000..6031db8
--- /dev/null
+++ b/test/tests/conf/numbering/numbering66.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering66 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document with specified from level, count filtered. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter//title">
+  <xsl:number level="multiple" from="chapter"
+      count="chapter|section|subsection[1]"
+      format="A.1.a. "/>
+  <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering67.xml b/test/tests/conf/numbering/numbering67.xml
new file mode 100644
index 0000000..c4e67a9
--- /dev/null
+++ b/test/tests/conf/numbering/numbering67.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B, again</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+          <e>
+            <title>Level E, again</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering67.xsl b/test/tests/conf/numbering/numbering67.xsl
new file mode 100644
index 0000000..9236850
--- /dev/null
+++ b/test/tests/conf/numbering/numbering67.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering67 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with with from set for two levels, level=any, count defaulted. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="any" from="b|d" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering68.xml b/test/tests/conf/numbering/numbering68.xml
new file mode 100644
index 0000000..23b818f
--- /dev/null
+++ b/test/tests/conf/numbering/numbering68.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B, again</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+      </c>
+      <c>
+        <title>Level C, again</title>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+          <e>
+            <title>Level E, again</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering68.xsl b/test/tests/conf/numbering/numbering68.xsl
new file mode 100644
index 0000000..ea1aa6a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering68.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering68 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with from set for two levels, level=any. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="any" from="b|d" count="e" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering69.xml b/test/tests/conf/numbering/numbering69.xml
new file mode 100644
index 0000000..23b818f
--- /dev/null
+++ b/test/tests/conf/numbering/numbering69.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B, again</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+      </c>
+      <c>
+        <title>Level C, again</title>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+          <e>
+            <title>Level E, again</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering69.xsl b/test/tests/conf/numbering/numbering69.xsl
new file mode 100644
index 0000000..c535e61
--- /dev/null
+++ b/test/tests/conf/numbering/numbering69.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering69 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with from set for two levels, level=any, counting two levels. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="any" from="b|d" count="c|e" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering70.xml b/test/tests/conf/numbering/numbering70.xml
new file mode 100644
index 0000000..0eebbb6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering70.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="no">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="yes">eee</note>
+  </chapter>
+  <note flag="no">fff</note>
+  <note flag="yes">ggg</note>
+  <note flag="yes">hhh</note>
+  <chapter>
+    <note flag="yes">iii</note>
+    <note flag="yes">jjj</note>
+    <note flag="no">kkk</note>
+    <note flag="yes">lll</note>
+    <note flag="no">mmm</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering70.xsl b/test/tests/conf/numbering/numbering70.xsl
new file mode 100644
index 0000000..023c6d1
--- /dev/null
+++ b/test/tests/conf/numbering/numbering70.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering70 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (any) and counting only some nodes, from specifies two higher levels. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="doc|chapter" count="note[@flag='yes']" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering71.xml b/test/tests/conf/numbering/numbering71.xml
new file mode 100644
index 0000000..0eebbb6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering71.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="no">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="yes">eee</note>
+  </chapter>
+  <note flag="no">fff</note>
+  <note flag="yes">ggg</note>
+  <note flag="yes">hhh</note>
+  <chapter>
+    <note flag="yes">iii</note>
+    <note flag="yes">jjj</note>
+    <note flag="no">kkk</note>
+    <note flag="yes">lll</note>
+    <note flag="no">mmm</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering71.xsl b/test/tests/conf/numbering/numbering71.xsl
new file mode 100644
index 0000000..7bde5bb
--- /dev/null
+++ b/test/tests/conf/numbering/numbering71.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering71 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (single) and counting only some nodes, from specifies two higher levels. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" from="doc|chapter" count="note[@flag='yes']" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering72.xml b/test/tests/conf/numbering/numbering72.xml
new file mode 100644
index 0000000..0204718
--- /dev/null
+++ b/test/tests/conf/numbering/numbering72.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+  </chapter>
+  <note>fff</note>
+  <note>ggg</note>
+  <note>hhh</note>
+  <chapter>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering72.xsl b/test/tests/conf/numbering/numbering72.xsl
new file mode 100644
index 0000000..30ea47c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering72.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering72 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (single), from specifies two higher levels, count defaulted. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" from="doc|chapter" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering73.xml b/test/tests/conf/numbering/numbering73.xml
new file mode 100644
index 0000000..0204718
--- /dev/null
+++ b/test/tests/conf/numbering/numbering73.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+  </chapter>
+  <note>fff</note>
+  <note>ggg</note>
+  <note>hhh</note>
+  <chapter>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering73.xsl b/test/tests/conf/numbering/numbering73.xsl
new file mode 100644
index 0000000..b59383a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering73.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering73 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (single), from specifies two higher levels. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" from="doc|chapter" count="note" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering74.xml b/test/tests/conf/numbering/numbering74.xml
new file mode 100644
index 0000000..3e90bd5
--- /dev/null
+++ b/test/tests/conf/numbering/numbering74.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<doc>
+  <ref>Citation before first chapter</ref>
+  <chapter>
+    <note>aaa</note>
+    <ref>Citation 1 in first chapter</ref>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <ref>Citation 2 in first chapter</ref>
+    <note>eee</note>
+    <ref>Citation 3 in first chapter</ref>
+  </chapter>
+  <note>fff</note>
+  <note>ggg</note>
+  <note>hhh</note>
+  <ref>Citation between chapters</ref>
+  <chapter>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <ref>Citation 1 in second chapter</ref>
+    <ref>Citation 2 in second chapter</ref>
+  </chapter>
+  <ref>Citation after last chapter</ref>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering74.xsl b/test/tests/conf/numbering/numbering74.xsl
new file mode 100644
index 0000000..f03795f
--- /dev/null
+++ b/test/tests/conf/numbering/numbering74.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering74 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of level (single) and counting two types of nodes, from specifies two higher levels. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="ref">
+  <xsl:number level="single" from="doc|chapter" count="note|ref" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering75.xml b/test/tests/conf/numbering/numbering75.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering75.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering75.xsl b/test/tests/conf/numbering/numbering75.xsl
new file mode 100644
index 0000000..33e5e0c
--- /dev/null
+++ b/test/tests/conf/numbering/numbering75.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering75 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with level=multiple, from specifies two levels. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" from="doc|chapter" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering76.xml b/test/tests/conf/numbering/numbering76.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering76.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering76.xsl b/test/tests/conf/numbering/numbering76.xsl
new file mode 100644
index 0000000..de1529e
--- /dev/null
+++ b/test/tests/conf/numbering/numbering76.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering76 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test xsl:number with count on same level, from is two higher levels, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" from="doc|chapter" count="note" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering77.xml b/test/tests/conf/numbering/numbering77.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering77.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering77.xsl b/test/tests/conf/numbering/numbering77.xsl
new file mode 100644
index 0000000..7ad12d3
--- /dev/null
+++ b/test/tests/conf/numbering/numbering77.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering77 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document with two from levels, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" from="doc|b" count="a|b|c|d|e" format="1-1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering78.xml b/test/tests/conf/numbering/numbering78.xml
new file mode 100644
index 0000000..8f35564
--- /dev/null
+++ b/test/tests/conf/numbering/numbering78.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+          <e>
+            <title>Level E, again</title>
+          </e>
+          <e>
+            <title>Level E, again</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+          <e>
+            <title>Level E, again</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+          <e>
+            <title>Level E, again</title>
+          </e>
+          <e>
+            <title>Level E, again</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering78.xsl b/test/tests/conf/numbering/numbering78.xsl
new file mode 100644
index 0000000..7a06d93
--- /dev/null
+++ b/test/tests/conf/numbering/numbering78.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering78 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of numbering of multi-level document with two from levels and filtering the lowest count level. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[7]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+    <xsl:number level="multiple" from="a|c" count="b|c|d|e[2]" format="1-1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering79.xml b/test/tests/conf/numbering/numbering79.xml
new file mode 100644
index 0000000..b4351b2
--- /dev/null
+++ b/test/tests/conf/numbering/numbering79.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering79.xsl b/test/tests/conf/numbering/numbering79.xsl
new file mode 100644
index 0000000..df2c754
--- /dev/null
+++ b/test/tests/conf/numbering/numbering79.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering79 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of non-numeric assignment to value attribute. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Should come out as zero every time. -->
+  <!-- Discretionary: number-not-positive="pass-through" -->
+  <!-- Gray-area: number-NaN-handling="pass-through" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <xsl:for-each select="note">
+    <xsl:number format="(1) " value="wiseguy" /><xsl:value-of select="."/>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering80.xml b/test/tests/conf/numbering/numbering80.xml
new file mode 100644
index 0000000..e3673c4
--- /dev/null
+++ b/test/tests/conf/numbering/numbering80.xml
@@ -0,0 +1,335 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+    <note>aac</note>
+    <note>bbc</note>
+    <note>ccc</note>
+    <note>ddc</note>
+    <note>eec</note>
+    <note>ffc</note>
+    <note>ggc</note>
+    <note>hhc</note>
+    <note>iic</note>
+    <note>jjc</note>
+    <note>kkc</note>
+    <note>llc</note>
+    <note>mmc</note>
+    <note>nnc</note>
+    <note>ooc</note>
+    <note>ppc</note>
+    <note>qqc</note>
+    <note>rrc</note>
+    <note>ssc</note>
+    <note>ttc</note>
+    <note>uuc</note>
+    <note>vvc</note>
+    <note>wwc</note>
+    <note>xxc</note>
+    <note>yyc</note>
+    <note>aad</note>
+    <note>bbd</note>
+    <note>ccd</note>
+    <note>ddd</note>
+    <note>eed</note>
+    <note>ffd</note>
+    <note>ggd</note>
+    <note>hhd</note>
+    <note>iid</note>
+    <note>jjd</note>
+    <note>kkd</note>
+    <note>lld</note>
+    <note>mmd</note>
+    <note>nnd</note>
+    <note>ood</note>
+    <note>ppd</note>
+    <note>qqd</note>
+    <note>rrd</note>
+    <note>ssd</note>
+    <note>ttd</note>
+    <note>uud</note>
+    <note>vvd</note>
+    <note>wwd</note>
+    <note>xxd</note>
+    <note>yyd</note>
+    <note>aae</note>
+    <note>bbe</note>
+    <note>cce</note>
+    <note>dde</note>
+    <note>eee</note>
+    <note>ffe</note>
+    <note>gge</note>
+    <note>hhe</note>
+    <note>iie</note>
+    <note>jje</note>
+    <note>kke</note>
+    <note>lle</note>
+    <note>mme</note>
+    <note>nne</note>
+    <note>ooe</note>
+    <note>ppe</note>
+    <note>qqe</note>
+    <note>rre</note>
+    <note>sse</note>
+    <note>tte</note>
+    <note>uue</note>
+    <note>vve</note>
+    <note>wwe</note>
+    <note>xxe</note>
+    <note>yye</note>
+    <note>aaf</note>
+    <note>bbf</note>
+    <note>ccf</note>
+    <note>ddf</note>
+    <note>eef</note>
+    <note>fff</note>
+    <note>ggf</note>
+    <note>hhf</note>
+    <note>iif</note>
+    <note>jjf</note>
+    <note>kkf</note>
+    <note>llf</note>
+    <note>mmf</note>
+    <note>nnf</note>
+    <note>oof</note>
+    <note>ppf</note>
+    <note>qqf</note>
+    <note>rrf</note>
+    <note>ssf</note>
+    <note>ttf</note>
+    <note>uuf</note>
+    <note>vvf</note>
+    <note>wwf</note>
+    <note>xxf</note>
+    <note>yyf</note>
+    <note>aag</note>
+    <note>bbg</note>
+    <note>ccg</note>
+    <note>ddg</note>
+    <note>eeg</note>
+    <note>ffg</note>
+    <note>ggg</note>
+    <note>hhg</note>
+    <note>iig</note>
+    <note>jjg</note>
+    <note>kkg</note>
+    <note>llg</note>
+    <note>mmg</note>
+    <note>nng</note>
+    <note>oog</note>
+    <note>ppg</note>
+    <note>qqg</note>
+    <note>rrg</note>
+    <note>ssg</note>
+    <note>ttg</note>
+    <note>uug</note>
+    <note>vvg</note>
+    <note>wwg</note>
+    <note>xxg</note>
+    <note>yyg</note>
+    <note>aah</note>
+    <note>bbh</note>
+    <note>cch</note>
+    <note>ddh</note>
+    <note>eeh</note>
+    <note>ffh</note>
+    <note>ggh</note>
+    <note>hhh</note>
+    <note>iih</note>
+    <note>jjh</note>
+    <note>kkh</note>
+    <note>llh</note>
+    <note>mmh</note>
+    <note>nnh</note>
+    <note>ooh</note>
+    <note>pph</note>
+    <note>qqh</note>
+    <note>rrh</note>
+    <note>ssh</note>
+    <note>tth</note>
+    <note>uuh</note>
+    <note>vvh</note>
+    <note>wwh</note>
+    <note>xxh</note>
+    <note>yyh</note>
+    <note>aai</note>
+    <note>bbi</note>
+    <note>cci</note>
+    <note>ddi</note>
+    <note>eei</note>
+    <note>ffi</note>
+    <note>ggi</note>
+    <note>hhi</note>
+    <note>iii</note>
+    <note>jji</note>
+    <note>kki</note>
+    <note>lli</note>
+    <note>mmi</note>
+    <note>nni</note>
+    <note>ooi</note>
+    <note>ppi</note>
+    <note>qqi</note>
+    <note>rri</note>
+    <note>ssi</note>
+    <note>tti</note>
+    <note>uui</note>
+    <note>vvi</note>
+    <note>wwi</note>
+    <note>xxi</note>
+    <note>yyi</note>
+    <note>aaj</note>
+    <note>bbj</note>
+    <note>ccj</note>
+    <note>ddj</note>
+    <note>eej</note>
+    <note>ffj</note>
+    <note>ggj</note>
+    <note>hhj</note>
+    <note>iij</note>
+    <note>jjj</note>
+    <note>kkj</note>
+    <note>llj</note>
+    <note>mmj</note>
+    <note>nnj</note>
+    <note>ooj</note>
+    <note>ppj</note>
+    <note>qqj</note>
+    <note>rrj</note>
+    <note>ssj</note>
+    <note>ttj</note>
+    <note>uuj</note>
+    <note>vvj</note>
+    <note>wwj</note>
+    <note>xxj</note>
+    <note>yyj</note>
+    <note>aak</note>
+    <note>bbk</note>
+    <note>cck</note>
+    <note>ddk</note>
+    <note>eek</note>
+    <note>ffk</note>
+    <note>ggk</note>
+    <note>hhk</note>
+    <note>iik</note>
+    <note>jjk</note>
+    <note>kkk</note>
+    <note>llk</note>
+    <note>mmk</note>
+    <note>nnk</note>
+    <note>ook</note>
+    <note>ppk</note>
+    <note>qqk</note>
+    <note>rrk</note>
+    <note>ssk</note>
+    <note>ttk</note>
+    <note>uuk</note>
+    <note>vvk</note>
+    <note>wwk</note>
+    <note>xxk</note>
+    <note>yyk</note>
+    <note>aal</note>
+    <note>bbl</note>
+    <note>ccl</note>
+    <note>ddl</note>
+    <note>eel</note>
+    <note>ffl</note>
+    <note>ggl</note>
+    <note>hhl</note>
+    <note>iil</note>
+    <note>jjl</note>
+    <note>kkl</note>
+    <note>lll</note>
+    <note>mml</note>
+    <note>nnl</note>
+    <note>ool</note>
+    <note>ppl</note>
+    <note>qql</note>
+    <note>rrl</note>
+    <note>ssl</note>
+    <note>ttl</note>
+    <note>uul</note>
+    <note>vvl</note>
+    <note>wwl</note>
+    <note>xxl</note>
+    <note>yyl</note>
+    <note>aam</note>
+    <note>bbm</note>
+    <note>ccm</note>
+    <note>ddm</note>
+    <note>eem</note>
+    <note>ffm</note>
+    <note>ggm</note>
+    <note>hhm</note>
+    <note>iim</note>
+    <note>jjm</note>
+    <note>kkm</note>
+    <note>llm</note>
+    <note>mmm</note>
+    <note>nnm</note>
+    <note>oom</note>
+    <note>ppm</note>
+    <note>qqm</note>
+    <note>rrm</note>
+    <note>ssm</note>
+    <note>ttm</note>
+    <note>uum</note>
+    <note>vvm</note>
+    <note>wwm</note>
+    <note>xxm</note>
+    <note>yym</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering80.xsl b/test/tests/conf/numbering/numbering80.xsl
new file mode 100644
index 0000000..ca9e732
--- /dev/null
+++ b/test/tests/conf/numbering/numbering80.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering80 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of grouping attributes. If only one of the two is present, it is ignored. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[6]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(1) " grouping-separator="," />
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering81.xml b/test/tests/conf/numbering/numbering81.xml
new file mode 100644
index 0000000..e3673c4
--- /dev/null
+++ b/test/tests/conf/numbering/numbering81.xml
@@ -0,0 +1,335 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+    <note>aac</note>
+    <note>bbc</note>
+    <note>ccc</note>
+    <note>ddc</note>
+    <note>eec</note>
+    <note>ffc</note>
+    <note>ggc</note>
+    <note>hhc</note>
+    <note>iic</note>
+    <note>jjc</note>
+    <note>kkc</note>
+    <note>llc</note>
+    <note>mmc</note>
+    <note>nnc</note>
+    <note>ooc</note>
+    <note>ppc</note>
+    <note>qqc</note>
+    <note>rrc</note>
+    <note>ssc</note>
+    <note>ttc</note>
+    <note>uuc</note>
+    <note>vvc</note>
+    <note>wwc</note>
+    <note>xxc</note>
+    <note>yyc</note>
+    <note>aad</note>
+    <note>bbd</note>
+    <note>ccd</note>
+    <note>ddd</note>
+    <note>eed</note>
+    <note>ffd</note>
+    <note>ggd</note>
+    <note>hhd</note>
+    <note>iid</note>
+    <note>jjd</note>
+    <note>kkd</note>
+    <note>lld</note>
+    <note>mmd</note>
+    <note>nnd</note>
+    <note>ood</note>
+    <note>ppd</note>
+    <note>qqd</note>
+    <note>rrd</note>
+    <note>ssd</note>
+    <note>ttd</note>
+    <note>uud</note>
+    <note>vvd</note>
+    <note>wwd</note>
+    <note>xxd</note>
+    <note>yyd</note>
+    <note>aae</note>
+    <note>bbe</note>
+    <note>cce</note>
+    <note>dde</note>
+    <note>eee</note>
+    <note>ffe</note>
+    <note>gge</note>
+    <note>hhe</note>
+    <note>iie</note>
+    <note>jje</note>
+    <note>kke</note>
+    <note>lle</note>
+    <note>mme</note>
+    <note>nne</note>
+    <note>ooe</note>
+    <note>ppe</note>
+    <note>qqe</note>
+    <note>rre</note>
+    <note>sse</note>
+    <note>tte</note>
+    <note>uue</note>
+    <note>vve</note>
+    <note>wwe</note>
+    <note>xxe</note>
+    <note>yye</note>
+    <note>aaf</note>
+    <note>bbf</note>
+    <note>ccf</note>
+    <note>ddf</note>
+    <note>eef</note>
+    <note>fff</note>
+    <note>ggf</note>
+    <note>hhf</note>
+    <note>iif</note>
+    <note>jjf</note>
+    <note>kkf</note>
+    <note>llf</note>
+    <note>mmf</note>
+    <note>nnf</note>
+    <note>oof</note>
+    <note>ppf</note>
+    <note>qqf</note>
+    <note>rrf</note>
+    <note>ssf</note>
+    <note>ttf</note>
+    <note>uuf</note>
+    <note>vvf</note>
+    <note>wwf</note>
+    <note>xxf</note>
+    <note>yyf</note>
+    <note>aag</note>
+    <note>bbg</note>
+    <note>ccg</note>
+    <note>ddg</note>
+    <note>eeg</note>
+    <note>ffg</note>
+    <note>ggg</note>
+    <note>hhg</note>
+    <note>iig</note>
+    <note>jjg</note>
+    <note>kkg</note>
+    <note>llg</note>
+    <note>mmg</note>
+    <note>nng</note>
+    <note>oog</note>
+    <note>ppg</note>
+    <note>qqg</note>
+    <note>rrg</note>
+    <note>ssg</note>
+    <note>ttg</note>
+    <note>uug</note>
+    <note>vvg</note>
+    <note>wwg</note>
+    <note>xxg</note>
+    <note>yyg</note>
+    <note>aah</note>
+    <note>bbh</note>
+    <note>cch</note>
+    <note>ddh</note>
+    <note>eeh</note>
+    <note>ffh</note>
+    <note>ggh</note>
+    <note>hhh</note>
+    <note>iih</note>
+    <note>jjh</note>
+    <note>kkh</note>
+    <note>llh</note>
+    <note>mmh</note>
+    <note>nnh</note>
+    <note>ooh</note>
+    <note>pph</note>
+    <note>qqh</note>
+    <note>rrh</note>
+    <note>ssh</note>
+    <note>tth</note>
+    <note>uuh</note>
+    <note>vvh</note>
+    <note>wwh</note>
+    <note>xxh</note>
+    <note>yyh</note>
+    <note>aai</note>
+    <note>bbi</note>
+    <note>cci</note>
+    <note>ddi</note>
+    <note>eei</note>
+    <note>ffi</note>
+    <note>ggi</note>
+    <note>hhi</note>
+    <note>iii</note>
+    <note>jji</note>
+    <note>kki</note>
+    <note>lli</note>
+    <note>mmi</note>
+    <note>nni</note>
+    <note>ooi</note>
+    <note>ppi</note>
+    <note>qqi</note>
+    <note>rri</note>
+    <note>ssi</note>
+    <note>tti</note>
+    <note>uui</note>
+    <note>vvi</note>
+    <note>wwi</note>
+    <note>xxi</note>
+    <note>yyi</note>
+    <note>aaj</note>
+    <note>bbj</note>
+    <note>ccj</note>
+    <note>ddj</note>
+    <note>eej</note>
+    <note>ffj</note>
+    <note>ggj</note>
+    <note>hhj</note>
+    <note>iij</note>
+    <note>jjj</note>
+    <note>kkj</note>
+    <note>llj</note>
+    <note>mmj</note>
+    <note>nnj</note>
+    <note>ooj</note>
+    <note>ppj</note>
+    <note>qqj</note>
+    <note>rrj</note>
+    <note>ssj</note>
+    <note>ttj</note>
+    <note>uuj</note>
+    <note>vvj</note>
+    <note>wwj</note>
+    <note>xxj</note>
+    <note>yyj</note>
+    <note>aak</note>
+    <note>bbk</note>
+    <note>cck</note>
+    <note>ddk</note>
+    <note>eek</note>
+    <note>ffk</note>
+    <note>ggk</note>
+    <note>hhk</note>
+    <note>iik</note>
+    <note>jjk</note>
+    <note>kkk</note>
+    <note>llk</note>
+    <note>mmk</note>
+    <note>nnk</note>
+    <note>ook</note>
+    <note>ppk</note>
+    <note>qqk</note>
+    <note>rrk</note>
+    <note>ssk</note>
+    <note>ttk</note>
+    <note>uuk</note>
+    <note>vvk</note>
+    <note>wwk</note>
+    <note>xxk</note>
+    <note>yyk</note>
+    <note>aal</note>
+    <note>bbl</note>
+    <note>ccl</note>
+    <note>ddl</note>
+    <note>eel</note>
+    <note>ffl</note>
+    <note>ggl</note>
+    <note>hhl</note>
+    <note>iil</note>
+    <note>jjl</note>
+    <note>kkl</note>
+    <note>lll</note>
+    <note>mml</note>
+    <note>nnl</note>
+    <note>ool</note>
+    <note>ppl</note>
+    <note>qql</note>
+    <note>rrl</note>
+    <note>ssl</note>
+    <note>ttl</note>
+    <note>uul</note>
+    <note>vvl</note>
+    <note>wwl</note>
+    <note>xxl</note>
+    <note>yyl</note>
+    <note>aam</note>
+    <note>bbm</note>
+    <note>ccm</note>
+    <note>ddm</note>
+    <note>eem</note>
+    <note>ffm</note>
+    <note>ggm</note>
+    <note>hhm</note>
+    <note>iim</note>
+    <note>jjm</note>
+    <note>kkm</note>
+    <note>llm</note>
+    <note>mmm</note>
+    <note>nnm</note>
+    <note>oom</note>
+    <note>ppm</note>
+    <note>qqm</note>
+    <note>rrm</note>
+    <note>ssm</note>
+    <note>ttm</note>
+    <note>uum</note>
+    <note>vvm</note>
+    <note>wwm</note>
+    <note>xxm</note>
+    <note>yym</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering81.xsl b/test/tests/conf/numbering/numbering81.xsl
new file mode 100644
index 0000000..75ca9d1
--- /dev/null
+++ b/test/tests/conf/numbering/numbering81.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering81 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of grouping attributes. If only one of the two is present, it is ignored. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[2]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[6]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(1) " grouping-size="2" />
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering82.xml b/test/tests/conf/numbering/numbering82.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering82.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering82.xsl b/test/tests/conf/numbering/numbering82.xsl
new file mode 100644
index 0000000..5c6ef6a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering82.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering82 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Count non-existant nodes, level=single. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="single" count="unknown" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering83.xml b/test/tests/conf/numbering/numbering83.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conf/numbering/numbering83.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering83.xsl b/test/tests/conf/numbering/numbering83.xsl
new file mode 100644
index 0000000..607b1c7
--- /dev/null
+++ b/test/tests/conf/numbering/numbering83.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering83 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Count non-existant nodes, level=any. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Gray-area: number-any-no-nodes="return-empty" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="any" count="unknown" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering84.xml b/test/tests/conf/numbering/numbering84.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conf/numbering/numbering84.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering84.xsl b/test/tests/conf/numbering/numbering84.xsl
new file mode 100644
index 0000000..ee1d394
--- /dev/null
+++ b/test/tests/conf/numbering/numbering84.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering84 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Count non-existant nodes, level=multiple. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="multiple" count="unknown" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering85.xml b/test/tests/conf/numbering/numbering85.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/numbering/numbering85.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering85.xsl b/test/tests/conf/numbering/numbering85.xsl
new file mode 100644
index 0000000..65b0f5b
--- /dev/null
+++ b/test/tests/conf/numbering/numbering85.xsl
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering85 -->
+  <!-- Author: Paul Dick -->
+  <!-- Purpose: Test that value attribute gets rounded correctly w/various formats. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[4]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="doc">
+  <out>
+  <!-- Round down to 1 -->
+     <o><xsl:number format="1" value="1.1"/></o><xsl:text>&#10;</xsl:text>
+     <o><xsl:number format="01" value="1.02"/></o><xsl:text>&#10;</xsl:text>
+     <o><xsl:number format="A" value="1.003"/></o><xsl:text>&#10;</xsl:text>
+     <o><xsl:number format="a" value="1.0004"/></o><xsl:text>&#10;</xsl:text>
+     <o><xsl:number format="I" value="1.00005"/></o><xsl:text>&#10;</xsl:text>
+	 <xsl:text>&#10;</xsl:text>
+
+  <!-- Round up to 7 -->
+     <s><xsl:number format="i" value="6.5000000000"/></s><xsl:text>&#10;</xsl:text>
+     <s><xsl:number format="1" value="6.51"/></s><xsl:text>&#10;</xsl:text>
+     <s><xsl:number format="01" value="6.501"/></s><xsl:text>&#10;</xsl:text>
+     <s><xsl:number format="A" value="6.5001"/></s><xsl:text>&#10;</xsl:text>
+     <s><xsl:number format="a" value="6.50001"/></s><xsl:text>&#10;</xsl:text>
+     <s><xsl:number format="I" value="6.500001"/></s><xsl:text>&#10;</xsl:text>
+	 <xsl:text>&#10;</xsl:text>
+	 
+  <!-- Round away two decimal places -->
+
+    <n><xsl:number format="1" value="99.03"/></n><xsl:text>&#10;</xsl:text>
+    <n><xsl:number format="01" value="99.13"/></n><xsl:text>&#10;</xsl:text>
+    <n><xsl:number format="A" value="99.23"/></n><xsl:text>&#10;</xsl:text>
+    <n><xsl:number format="a" value="99.33"/></n><xsl:text>&#10;</xsl:text>
+    <n><xsl:number format="I" value="99.43"/></n><xsl:text>&#10;</xsl:text>
+	 <xsl:text>&#10;</xsl:text>
+    <h><xsl:number format="i" value="99.50"/></h><xsl:text>&#10;</xsl:text>
+    <h><xsl:number format="1" value="99.53"/></h><xsl:text>&#10;</xsl:text>
+    <h><xsl:number format="01" value="99.63"/></h><xsl:text>&#10;</xsl:text>
+    <h><xsl:number format="A" value="99.73"/></h><xsl:text>&#10;</xsl:text>
+    <h><xsl:number format="a" value="99.83"/></h><xsl:text>&#10;</xsl:text>
+    <h><xsl:number format="I" value="99.93"/></h><xsl:text>&#10;</xsl:text>
+      <xsl:text>&#10;</xsl:text>
+
+  <!-- More edge cases -->
+
+    <t><xsl:number format="01" value="2.499"/></t><xsl:text>&#10;</xsl:text>
+    <t><xsl:number format="1" value="2.499999999"/></t><xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering86.xml b/test/tests/conf/numbering/numbering86.xml
new file mode 100644
index 0000000..bbd2d70
--- /dev/null
+++ b/test/tests/conf/numbering/numbering86.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<z:doc xmlns:z="z.test.com">
+  <z:chapter>
+    <z:note>aaa</z:note>
+    <z:note>bbb</z:note>
+    <z:note>ccc</z:note>
+  </z:chapter>
+  <z:chapter>
+    <z:note>ddd</z:note>
+    <z:note>eee</z:note>
+    <z:note>fff</z:note>
+  </z:chapter>
+</z:doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering86.xsl b/test/tests/conf/numbering/numbering86.xsl
new file mode 100644
index 0000000..9187b43
--- /dev/null
+++ b/test/tests/conf/numbering/numbering86.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:z="z.test.com">
+
+  <!-- CaseName: numbering86 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Namespaced elements should work just like non-namespaced ones. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[3]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="z:doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="z:note">
+  <xsl:element name="znote">
+    <xsl:attribute name="number">
+      <xsl:number level="single" from="z:chapter"/>
+    </xsl:attribute>
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering87.xml b/test/tests/conf/numbering/numbering87.xml
new file mode 100644
index 0000000..200aeee
--- /dev/null
+++ b/test/tests/conf/numbering/numbering87.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<z:doc xmlns:z="z.test.com">
+  <z:chapter>
+    <note>aaa</note>
+    <z:note>bbb</z:note>
+    <z:note>ccc</z:note>
+  </z:chapter>
+  <z:chapter>
+    <z:note>ddd</z:note>
+    <note>eee</note>
+    <z:note>fff</z:note>
+  </z:chapter>
+  <z:chapter>
+    <z:note>ggg</z:note>
+    <z:note>hhh</z:note>
+    <note>iii</note>
+  </z:chapter>
+  <z:chapter>
+    <z:note>jjj</z:note>
+    <z:note>kkk</z:note>
+    <note>lll</note>
+  </z:chapter>
+</z:doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering87.xsl b/test/tests/conf/numbering/numbering87.xsl
new file mode 100644
index 0000000..3bb51a5
--- /dev/null
+++ b/test/tests/conf/numbering/numbering87.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:z="z.test.com">
+
+  <!-- CaseName: numbering87 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Number the namespaced elements when mixed with non-namespaced ones. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[3]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="z:doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="z:note">
+  <xsl:element name="znote">
+    <xsl:attribute name="number">
+      <xsl:number level="any" from="z:doc"/>
+    </xsl:attribute>
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:element name="chapter-note">
+    <xsl:attribute name="number">
+      <xsl:number level="single" from="z:chapter"/>
+    </xsl:attribute>
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering88.xml b/test/tests/conf/numbering/numbering88.xml
new file mode 100644
index 0000000..e08b74a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering88.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+  </chapter>
+  <chapter>
+    <note>zzz</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering88.xsl b/test/tests/conf/numbering/numbering88.xsl
new file mode 100644
index 0000000..e056780
--- /dev/null
+++ b/test/tests/conf/numbering/numbering88.xsl
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering88 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show discrepancies between number and position. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[3]" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Elaboration: While xsl:number always shows the number of the chapter among all chapters,
+       position() in the outer case is the position of the chapter among all children of doc,
+       position() in the inner case is the position of the chapter within the select="." set
+       that contains just one element. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <xsl:element name="chap">
+    <xsl:attribute name="number">
+      <xsl:number/>
+    </xsl:attribute>
+    <xsl:attribute name="position">
+      <xsl:value-of select="position()"/>
+    </xsl:attribute>
+    <xsl:value-of select="note[1]"/>
+    <xsl:apply-templates select="." mode="repeat"/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="chapter" mode="repeat">
+  <xsl:element name="sel">
+    <xsl:attribute name="number">
+      <xsl:number/>
+    </xsl:attribute>
+    <xsl:attribute name="position">
+      <xsl:value-of select="position()"/>
+    </xsl:attribute>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering89.xml b/test/tests/conf/numbering/numbering89.xml
new file mode 100644
index 0000000..e08b74a
--- /dev/null
+++ b/test/tests/conf/numbering/numbering89.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+  </chapter>
+  <chapter>
+    <note>zzz</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering89.xsl b/test/tests/conf/numbering/numbering89.xsl
new file mode 100644
index 0000000..97e5a65
--- /dev/null
+++ b/test/tests/conf/numbering/numbering89.xsl
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering89 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show discrepancies between number and position. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[3]" -->
+  <!-- Scenario: operation="standard-XML" -->
+  <!-- Elaboration: While xsl:number always shows the number of the chapter among all chapters,
+       position() in the outer case is the position of the chapter among all children of doc,
+       position() in the inner case (repeat mode) is the position of the chapter/text within the select set
+       that contains the chapter and all its siblings. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <xsl:element name="chap">
+    <xsl:attribute name="number">
+      <xsl:number/>
+    </xsl:attribute>
+    <xsl:attribute name="position">
+      <xsl:value-of select="position()"/>
+    </xsl:attribute>
+    <xsl:value-of select="note[1]"/>
+    <xsl:apply-templates select="../node()" mode="repeat"/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="chapter" mode="repeat">
+  <xsl:element name="sel">
+    <xsl:attribute name="number">
+      <xsl:number/>
+    </xsl:attribute>
+    <xsl:attribute name="position">
+      <xsl:value-of select="position()"/>
+    </xsl:attribute>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="text()" mode="repeat">
+  <xsl:text>&#10;</xsl:text>
+  <xsl:element name="text">
+    <xsl:attribute name="number">
+      <xsl:number/>
+    </xsl:attribute>
+    <xsl:attribute name="position">
+      <xsl:value-of select="position()"/>
+    </xsl:attribute>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering90.xml b/test/tests/conf/numbering/numbering90.xml
new file mode 100644
index 0000000..0eebbb6
--- /dev/null
+++ b/test/tests/conf/numbering/numbering90.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note flag="yes">aaa</note>
+    <note flag="no">bbb</note>
+    <note flag="no">ccc</note>
+    <note flag="yes">ddd</note>
+    <note flag="yes">eee</note>
+  </chapter>
+  <note flag="no">fff</note>
+  <note flag="yes">ggg</note>
+  <note flag="yes">hhh</note>
+  <chapter>
+    <note flag="yes">iii</note>
+    <note flag="yes">jjj</note>
+    <note flag="no">kkk</note>
+    <note flag="yes">lll</note>
+    <note flag="no">mmm</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering90.xsl b/test/tests/conf/numbering/numbering90.xsl
new file mode 100644
index 0000000..dfb46f8
--- /dev/null
+++ b/test/tests/conf/numbering/numbering90.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering90 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test counting only some nodes, with key() in count pattern. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:key name="key_of_f" match="note" use="@flag"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" from="doc|chapter" count="key('key_of_f','yes')" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering91.xml b/test/tests/conf/numbering/numbering91.xml
new file mode 100644
index 0000000..9f20ef7
--- /dev/null
+++ b/test/tests/conf/numbering/numbering91.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE iddata SYSTEM "iddata.dtd">
+
+<iddata>
+  <el id="a"/>
+  <el id="b"/>
+  <el id="c"/>
+  <el id="d"/>
+  <el id="e"/>
+  <el id="f"/>
+  <el id="g"/>
+  <el id="h"/>
+</iddata>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering91.xsl b/test/tests/conf/numbering/numbering91.xsl
new file mode 100644
index 0000000..1693d6d
--- /dev/null
+++ b/test/tests/conf/numbering/numbering91.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering91 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test counting only some nodes, with id() in count pattern. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:template match="iddata">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="el">
+  <xsl:choose>
+    <xsl:when test="@id='b' or @id='d' or @id='g'">
+      <xsl:number level="single" from="iddata" count="id('b d g')" format="(1) "/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>(no) </xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:value-of select="@id"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering92.xml b/test/tests/conf/numbering/numbering92.xml
new file mode 100644
index 0000000..450946e
--- /dev/null
+++ b/test/tests/conf/numbering/numbering92.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc xmlns="z.test.com">
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering92.xsl b/test/tests/conf/numbering/numbering92.xsl
new file mode 100644
index 0000000..7e39ad9
--- /dev/null
+++ b/test/tests/conf/numbering/numbering92.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:z="z.test.com" exclude-result-prefixes="z">
+
+  <!-- CaseName: numbering92 -->
+  <!-- Creator: Ilene Seelemann -->
+  <!-- Purpose: If the source document has a named default namespace, the counting (on xsl:number) should still work. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[3]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="z:doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="z:note">
+  <xsl:element name="znote">
+    <xsl:attribute name="number">
+      <xsl:number level="single" from="z:chapter"/>
+    </xsl:attribute>
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering93.xml b/test/tests/conf/numbering/numbering93.xml
new file mode 100644
index 0000000..bbd2d70
--- /dev/null
+++ b/test/tests/conf/numbering/numbering93.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<z:doc xmlns:z="z.test.com">
+  <z:chapter>
+    <z:note>aaa</z:note>
+    <z:note>bbb</z:note>
+    <z:note>ccc</z:note>
+  </z:chapter>
+  <z:chapter>
+    <z:note>ddd</z:note>
+    <z:note>eee</z:note>
+    <z:note>fff</z:note>
+  </z:chapter>
+</z:doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering93.xsl b/test/tests/conf/numbering/numbering93.xsl
new file mode 100644
index 0000000..bbc405d
--- /dev/null
+++ b/test/tests/conf/numbering/numbering93.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:b="z.test.com" exclude-result-prefixes="b">
+
+  <!-- CaseName: numbering93 -->
+  <!-- Creator: Ilene Seelemann -->
+  <!-- Purpose: Namespaced elements should work just like non-namespaced ones even when prefixes in source document and stylesheet are different. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[1]/p[1]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[3]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[3]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="b:doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="b:note">
+  <xsl:element name="bnote">
+    <xsl:attribute name="number">
+      <xsl:number level="single" from="b:chapter"/>
+    </xsl:attribute>
+    <xsl:value-of select="."/>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering94.xml b/test/tests/conf/numbering/numbering94.xml
new file mode 100644
index 0000000..e3673c4
--- /dev/null
+++ b/test/tests/conf/numbering/numbering94.xml
@@ -0,0 +1,335 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+    <note>aac</note>
+    <note>bbc</note>
+    <note>ccc</note>
+    <note>ddc</note>
+    <note>eec</note>
+    <note>ffc</note>
+    <note>ggc</note>
+    <note>hhc</note>
+    <note>iic</note>
+    <note>jjc</note>
+    <note>kkc</note>
+    <note>llc</note>
+    <note>mmc</note>
+    <note>nnc</note>
+    <note>ooc</note>
+    <note>ppc</note>
+    <note>qqc</note>
+    <note>rrc</note>
+    <note>ssc</note>
+    <note>ttc</note>
+    <note>uuc</note>
+    <note>vvc</note>
+    <note>wwc</note>
+    <note>xxc</note>
+    <note>yyc</note>
+    <note>aad</note>
+    <note>bbd</note>
+    <note>ccd</note>
+    <note>ddd</note>
+    <note>eed</note>
+    <note>ffd</note>
+    <note>ggd</note>
+    <note>hhd</note>
+    <note>iid</note>
+    <note>jjd</note>
+    <note>kkd</note>
+    <note>lld</note>
+    <note>mmd</note>
+    <note>nnd</note>
+    <note>ood</note>
+    <note>ppd</note>
+    <note>qqd</note>
+    <note>rrd</note>
+    <note>ssd</note>
+    <note>ttd</note>
+    <note>uud</note>
+    <note>vvd</note>
+    <note>wwd</note>
+    <note>xxd</note>
+    <note>yyd</note>
+    <note>aae</note>
+    <note>bbe</note>
+    <note>cce</note>
+    <note>dde</note>
+    <note>eee</note>
+    <note>ffe</note>
+    <note>gge</note>
+    <note>hhe</note>
+    <note>iie</note>
+    <note>jje</note>
+    <note>kke</note>
+    <note>lle</note>
+    <note>mme</note>
+    <note>nne</note>
+    <note>ooe</note>
+    <note>ppe</note>
+    <note>qqe</note>
+    <note>rre</note>
+    <note>sse</note>
+    <note>tte</note>
+    <note>uue</note>
+    <note>vve</note>
+    <note>wwe</note>
+    <note>xxe</note>
+    <note>yye</note>
+    <note>aaf</note>
+    <note>bbf</note>
+    <note>ccf</note>
+    <note>ddf</note>
+    <note>eef</note>
+    <note>fff</note>
+    <note>ggf</note>
+    <note>hhf</note>
+    <note>iif</note>
+    <note>jjf</note>
+    <note>kkf</note>
+    <note>llf</note>
+    <note>mmf</note>
+    <note>nnf</note>
+    <note>oof</note>
+    <note>ppf</note>
+    <note>qqf</note>
+    <note>rrf</note>
+    <note>ssf</note>
+    <note>ttf</note>
+    <note>uuf</note>
+    <note>vvf</note>
+    <note>wwf</note>
+    <note>xxf</note>
+    <note>yyf</note>
+    <note>aag</note>
+    <note>bbg</note>
+    <note>ccg</note>
+    <note>ddg</note>
+    <note>eeg</note>
+    <note>ffg</note>
+    <note>ggg</note>
+    <note>hhg</note>
+    <note>iig</note>
+    <note>jjg</note>
+    <note>kkg</note>
+    <note>llg</note>
+    <note>mmg</note>
+    <note>nng</note>
+    <note>oog</note>
+    <note>ppg</note>
+    <note>qqg</note>
+    <note>rrg</note>
+    <note>ssg</note>
+    <note>ttg</note>
+    <note>uug</note>
+    <note>vvg</note>
+    <note>wwg</note>
+    <note>xxg</note>
+    <note>yyg</note>
+    <note>aah</note>
+    <note>bbh</note>
+    <note>cch</note>
+    <note>ddh</note>
+    <note>eeh</note>
+    <note>ffh</note>
+    <note>ggh</note>
+    <note>hhh</note>
+    <note>iih</note>
+    <note>jjh</note>
+    <note>kkh</note>
+    <note>llh</note>
+    <note>mmh</note>
+    <note>nnh</note>
+    <note>ooh</note>
+    <note>pph</note>
+    <note>qqh</note>
+    <note>rrh</note>
+    <note>ssh</note>
+    <note>tth</note>
+    <note>uuh</note>
+    <note>vvh</note>
+    <note>wwh</note>
+    <note>xxh</note>
+    <note>yyh</note>
+    <note>aai</note>
+    <note>bbi</note>
+    <note>cci</note>
+    <note>ddi</note>
+    <note>eei</note>
+    <note>ffi</note>
+    <note>ggi</note>
+    <note>hhi</note>
+    <note>iii</note>
+    <note>jji</note>
+    <note>kki</note>
+    <note>lli</note>
+    <note>mmi</note>
+    <note>nni</note>
+    <note>ooi</note>
+    <note>ppi</note>
+    <note>qqi</note>
+    <note>rri</note>
+    <note>ssi</note>
+    <note>tti</note>
+    <note>uui</note>
+    <note>vvi</note>
+    <note>wwi</note>
+    <note>xxi</note>
+    <note>yyi</note>
+    <note>aaj</note>
+    <note>bbj</note>
+    <note>ccj</note>
+    <note>ddj</note>
+    <note>eej</note>
+    <note>ffj</note>
+    <note>ggj</note>
+    <note>hhj</note>
+    <note>iij</note>
+    <note>jjj</note>
+    <note>kkj</note>
+    <note>llj</note>
+    <note>mmj</note>
+    <note>nnj</note>
+    <note>ooj</note>
+    <note>ppj</note>
+    <note>qqj</note>
+    <note>rrj</note>
+    <note>ssj</note>
+    <note>ttj</note>
+    <note>uuj</note>
+    <note>vvj</note>
+    <note>wwj</note>
+    <note>xxj</note>
+    <note>yyj</note>
+    <note>aak</note>
+    <note>bbk</note>
+    <note>cck</note>
+    <note>ddk</note>
+    <note>eek</note>
+    <note>ffk</note>
+    <note>ggk</note>
+    <note>hhk</note>
+    <note>iik</note>
+    <note>jjk</note>
+    <note>kkk</note>
+    <note>llk</note>
+    <note>mmk</note>
+    <note>nnk</note>
+    <note>ook</note>
+    <note>ppk</note>
+    <note>qqk</note>
+    <note>rrk</note>
+    <note>ssk</note>
+    <note>ttk</note>
+    <note>uuk</note>
+    <note>vvk</note>
+    <note>wwk</note>
+    <note>xxk</note>
+    <note>yyk</note>
+    <note>aal</note>
+    <note>bbl</note>
+    <note>ccl</note>
+    <note>ddl</note>
+    <note>eel</note>
+    <note>ffl</note>
+    <note>ggl</note>
+    <note>hhl</note>
+    <note>iil</note>
+    <note>jjl</note>
+    <note>kkl</note>
+    <note>lll</note>
+    <note>mml</note>
+    <note>nnl</note>
+    <note>ool</note>
+    <note>ppl</note>
+    <note>qql</note>
+    <note>rrl</note>
+    <note>ssl</note>
+    <note>ttl</note>
+    <note>uul</note>
+    <note>vvl</note>
+    <note>wwl</note>
+    <note>xxl</note>
+    <note>yyl</note>
+    <note>aam</note>
+    <note>bbm</note>
+    <note>ccm</note>
+    <note>ddm</note>
+    <note>eem</note>
+    <note>ffm</note>
+    <note>ggm</note>
+    <note>hhm</note>
+    <note>iim</note>
+    <note>jjm</note>
+    <note>kkm</note>
+    <note>llm</note>
+    <note>mmm</note>
+    <note>nnm</note>
+    <note>oom</note>
+    <note>ppm</note>
+    <note>qqm</note>
+    <note>rrm</note>
+    <note>ssm</note>
+    <note>ttm</note>
+    <note>uum</note>
+    <note>vvm</note>
+    <note>wwm</note>
+    <note>xxm</note>
+    <note>yym</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering94.xsl b/test/tests/conf/numbering/numbering94.xsl
new file mode 100644
index 0000000..8eaa5cb
--- /dev/null
+++ b/test/tests/conf/numbering/numbering94.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering94 -->
+  <!-- Creator: Ilene Seelemann -->
+  <!-- Purpose: Test of grouping attributes. Use a grouping-separator that is not likely to be in the environment's locale settings. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[2]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(1) " grouping-size="2" grouping-separator=":" />
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/numbering/numbering95.xml b/test/tests/conf/numbering/numbering95.xml
new file mode 100644
index 0000000..e3673c4
--- /dev/null
+++ b/test/tests/conf/numbering/numbering95.xml
@@ -0,0 +1,335 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+    <note>aac</note>
+    <note>bbc</note>
+    <note>ccc</note>
+    <note>ddc</note>
+    <note>eec</note>
+    <note>ffc</note>
+    <note>ggc</note>
+    <note>hhc</note>
+    <note>iic</note>
+    <note>jjc</note>
+    <note>kkc</note>
+    <note>llc</note>
+    <note>mmc</note>
+    <note>nnc</note>
+    <note>ooc</note>
+    <note>ppc</note>
+    <note>qqc</note>
+    <note>rrc</note>
+    <note>ssc</note>
+    <note>ttc</note>
+    <note>uuc</note>
+    <note>vvc</note>
+    <note>wwc</note>
+    <note>xxc</note>
+    <note>yyc</note>
+    <note>aad</note>
+    <note>bbd</note>
+    <note>ccd</note>
+    <note>ddd</note>
+    <note>eed</note>
+    <note>ffd</note>
+    <note>ggd</note>
+    <note>hhd</note>
+    <note>iid</note>
+    <note>jjd</note>
+    <note>kkd</note>
+    <note>lld</note>
+    <note>mmd</note>
+    <note>nnd</note>
+    <note>ood</note>
+    <note>ppd</note>
+    <note>qqd</note>
+    <note>rrd</note>
+    <note>ssd</note>
+    <note>ttd</note>
+    <note>uud</note>
+    <note>vvd</note>
+    <note>wwd</note>
+    <note>xxd</note>
+    <note>yyd</note>
+    <note>aae</note>
+    <note>bbe</note>
+    <note>cce</note>
+    <note>dde</note>
+    <note>eee</note>
+    <note>ffe</note>
+    <note>gge</note>
+    <note>hhe</note>
+    <note>iie</note>
+    <note>jje</note>
+    <note>kke</note>
+    <note>lle</note>
+    <note>mme</note>
+    <note>nne</note>
+    <note>ooe</note>
+    <note>ppe</note>
+    <note>qqe</note>
+    <note>rre</note>
+    <note>sse</note>
+    <note>tte</note>
+    <note>uue</note>
+    <note>vve</note>
+    <note>wwe</note>
+    <note>xxe</note>
+    <note>yye</note>
+    <note>aaf</note>
+    <note>bbf</note>
+    <note>ccf</note>
+    <note>ddf</note>
+    <note>eef</note>
+    <note>fff</note>
+    <note>ggf</note>
+    <note>hhf</note>
+    <note>iif</note>
+    <note>jjf</note>
+    <note>kkf</note>
+    <note>llf</note>
+    <note>mmf</note>
+    <note>nnf</note>
+    <note>oof</note>
+    <note>ppf</note>
+    <note>qqf</note>
+    <note>rrf</note>
+    <note>ssf</note>
+    <note>ttf</note>
+    <note>uuf</note>
+    <note>vvf</note>
+    <note>wwf</note>
+    <note>xxf</note>
+    <note>yyf</note>
+    <note>aag</note>
+    <note>bbg</note>
+    <note>ccg</note>
+    <note>ddg</note>
+    <note>eeg</note>
+    <note>ffg</note>
+    <note>ggg</note>
+    <note>hhg</note>
+    <note>iig</note>
+    <note>jjg</note>
+    <note>kkg</note>
+    <note>llg</note>
+    <note>mmg</note>
+    <note>nng</note>
+    <note>oog</note>
+    <note>ppg</note>
+    <note>qqg</note>
+    <note>rrg</note>
+    <note>ssg</note>
+    <note>ttg</note>
+    <note>uug</note>
+    <note>vvg</note>
+    <note>wwg</note>
+    <note>xxg</note>
+    <note>yyg</note>
+    <note>aah</note>
+    <note>bbh</note>
+    <note>cch</note>
+    <note>ddh</note>
+    <note>eeh</note>
+    <note>ffh</note>
+    <note>ggh</note>
+    <note>hhh</note>
+    <note>iih</note>
+    <note>jjh</note>
+    <note>kkh</note>
+    <note>llh</note>
+    <note>mmh</note>
+    <note>nnh</note>
+    <note>ooh</note>
+    <note>pph</note>
+    <note>qqh</note>
+    <note>rrh</note>
+    <note>ssh</note>
+    <note>tth</note>
+    <note>uuh</note>
+    <note>vvh</note>
+    <note>wwh</note>
+    <note>xxh</note>
+    <note>yyh</note>
+    <note>aai</note>
+    <note>bbi</note>
+    <note>cci</note>
+    <note>ddi</note>
+    <note>eei</note>
+    <note>ffi</note>
+    <note>ggi</note>
+    <note>hhi</note>
+    <note>iii</note>
+    <note>jji</note>
+    <note>kki</note>
+    <note>lli</note>
+    <note>mmi</note>
+    <note>nni</note>
+    <note>ooi</note>
+    <note>ppi</note>
+    <note>qqi</note>
+    <note>rri</note>
+    <note>ssi</note>
+    <note>tti</note>
+    <note>uui</note>
+    <note>vvi</note>
+    <note>wwi</note>
+    <note>xxi</note>
+    <note>yyi</note>
+    <note>aaj</note>
+    <note>bbj</note>
+    <note>ccj</note>
+    <note>ddj</note>
+    <note>eej</note>
+    <note>ffj</note>
+    <note>ggj</note>
+    <note>hhj</note>
+    <note>iij</note>
+    <note>jjj</note>
+    <note>kkj</note>
+    <note>llj</note>
+    <note>mmj</note>
+    <note>nnj</note>
+    <note>ooj</note>
+    <note>ppj</note>
+    <note>qqj</note>
+    <note>rrj</note>
+    <note>ssj</note>
+    <note>ttj</note>
+    <note>uuj</note>
+    <note>vvj</note>
+    <note>wwj</note>
+    <note>xxj</note>
+    <note>yyj</note>
+    <note>aak</note>
+    <note>bbk</note>
+    <note>cck</note>
+    <note>ddk</note>
+    <note>eek</note>
+    <note>ffk</note>
+    <note>ggk</note>
+    <note>hhk</note>
+    <note>iik</note>
+    <note>jjk</note>
+    <note>kkk</note>
+    <note>llk</note>
+    <note>mmk</note>
+    <note>nnk</note>
+    <note>ook</note>
+    <note>ppk</note>
+    <note>qqk</note>
+    <note>rrk</note>
+    <note>ssk</note>
+    <note>ttk</note>
+    <note>uuk</note>
+    <note>vvk</note>
+    <note>wwk</note>
+    <note>xxk</note>
+    <note>yyk</note>
+    <note>aal</note>
+    <note>bbl</note>
+    <note>ccl</note>
+    <note>ddl</note>
+    <note>eel</note>
+    <note>ffl</note>
+    <note>ggl</note>
+    <note>hhl</note>
+    <note>iil</note>
+    <note>jjl</note>
+    <note>kkl</note>
+    <note>lll</note>
+    <note>mml</note>
+    <note>nnl</note>
+    <note>ool</note>
+    <note>ppl</note>
+    <note>qql</note>
+    <note>rrl</note>
+    <note>ssl</note>
+    <note>ttl</note>
+    <note>uul</note>
+    <note>vvl</note>
+    <note>wwl</note>
+    <note>xxl</note>
+    <note>yyl</note>
+    <note>aam</note>
+    <note>bbm</note>
+    <note>ccm</note>
+    <note>ddm</note>
+    <note>eem</note>
+    <note>ffm</note>
+    <note>ggm</note>
+    <note>hhm</note>
+    <note>iim</note>
+    <note>jjm</note>
+    <note>kkm</note>
+    <note>llm</note>
+    <note>mmm</note>
+    <note>nnm</note>
+    <note>oom</note>
+    <note>ppm</note>
+    <note>qqm</note>
+    <note>rrm</note>
+    <note>ssm</note>
+    <note>ttm</note>
+    <note>uum</note>
+    <note>vvm</note>
+    <note>wwm</note>
+    <note>xxm</note>
+    <note>yym</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/numbering/numbering95.xsl b/test/tests/conf/numbering/numbering95.xsl
new file mode 100644
index 0000000..4762d82
--- /dev/null
+++ b/test/tests/conf/numbering/numbering95.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numbering95 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of grouping attributes. Ensure that grouping-separator can be a space. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[3]/p[1]/text()[6]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[1]" -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[2]" -->
+  <!-- Scenario: operation="standard-XML" -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(1) " grouping-size="2" grouping-separator=" " />
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/impo88.xsl b/test/tests/conf/output/impo88.xsl
new file mode 100644
index 0000000..f0fe76b
--- /dev/null
+++ b/test/tests/conf/output/impo88.xsl
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impo88 -->
+  <!-- Purpose: Imported by output88 test. -->
+
+<xsl:output method="xml" encoding="US-ASCII"
+    omit-xml-declaration="yes" cdata-section-elements="a b"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output01.xml b/test/tests/conf/output/output01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output01.xsl b/test/tests/conf/output/output01.xsl
new file mode 100644
index 0000000..7def2b0
--- /dev/null
+++ b/test/tests/conf/output/output01.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Test for SCRIPT handling -->
+
+<xsl:template match="/">
+  <HTML>
+    <HEAD>
+      <SCRIPT>
+        <![CDATA[
+        document.write("<P>Hi Oren");
+        if((2 < 5) & (6 < 3))
+        {
+          ...
+        }
+        ]]>
+      </SCRIPT>
+    </HEAD>
+    <BODY/>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output02.xml b/test/tests/conf/output/output02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output02.xsl b/test/tests/conf/output/output02.xsl
new file mode 100644
index 0000000..d644e59
--- /dev/null
+++ b/test/tests/conf/output/output02.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Test for STYLE handling -->
+
+<xsl:template match="/">
+  <HTML>
+    <HEAD>
+      <STYLE>
+        <![CDATA[
+        <>&
+        ]]>
+      </STYLE>
+    </HEAD>
+    <BODY/>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output03.xml b/test/tests/conf/output/output03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output03.xsl b/test/tests/conf/output/output03.xsl
new file mode 100644
index 0000000..182723a
--- /dev/null
+++ b/test/tests/conf/output/output03.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 Disabling Output Escaping -->
+  <!-- Purpose: Test for disabling output escaping in xsl:text -->
+
+<xsl:template match="/">
+  <HTML>
+    <BODY>
+      <xsl:text disable-output-escaping="yes"><![CDATA[<P>&nbsp;</P>]]></xsl:text>
+    </BODY>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output04.xml b/test/tests/conf/output/output04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output04.xsl b/test/tests/conf/output/output04.xsl
new file mode 100644
index 0000000..3aeeac4
--- /dev/null
+++ b/test/tests/conf/output/output04.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html"/>
+
+  <!-- FileName: OUTP04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Test for numbered character entities -->
+
+<xsl:template match="/">
+  <HTML>
+    <P>&#064;</P>
+    <P>&#160;</P>
+    <P>&#126;</P>
+    <P>&#169;</P>
+    <P>&#200;</P>
+  </HTML>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output05.xml b/test/tests/conf/output/output05.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/output/output05.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output05.xsl b/test/tests/conf/output/output05.xsl
new file mode 100644
index 0000000..e7c464b
--- /dev/null
+++ b/test/tests/conf/output/output05.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+  <!-- FileName: OUTP05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test for "whitespace sensitive" html tags; <img>, <applet>, <object> -->
+
+<xsl:template match="/">
+  <HTML><TABLE><tr><td><img src="image1.gif"/></td></tr><tr><td><img src="image2.gif"/></td></tr>
+  <tr><td><applet code="clock.class"/></td></tr><tr><td><object/></td></tr></TABLE></HTML>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output06.xml b/test/tests/conf/output/output06.xml
new file mode 100644
index 0000000..5963b7b
--- /dev/null
+++ b/test/tests/conf/output/output06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo><![CDATA[<P>&nbsp;</P>]]></foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output06.xsl b/test/tests/conf/output/output06.xsl
new file mode 100644
index 0000000..afe5223
--- /dev/null
+++ b/test/tests/conf/output/output06.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml"/>
+
+  <!-- FileName: OUTP06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.1 -->
+  <!-- Purpose: Test for disabling output escaping in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="yes"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output07.xml b/test/tests/conf/output/output07.xml
new file mode 100644
index 0000000..9a5ce70
--- /dev/null
+++ b/test/tests/conf/output/output07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo><![CDATA[<P>&nbsp;</P>]]></foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output07.xsl b/test/tests/conf/output/output07.xsl
new file mode 100644
index 0000000..1447388
--- /dev/null
+++ b/test/tests/conf/output/output07.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml"/>
+
+  <!-- FileName: OUTP07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 Disable Output Escaping -->
+  <!-- Purpose: Test for enabling output escaping in xsl:value-of, 
+       XML output -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="no"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output08.xml b/test/tests/conf/output/output08.xml
new file mode 100644
index 0000000..acb837d
--- /dev/null
+++ b/test/tests/conf/output/output08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output08.xsl b/test/tests/conf/output/output08.xsl
new file mode 100644
index 0000000..ac64226
--- /dev/null
+++ b/test/tests/conf/output/output08.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 Disable Output Escaping -->
+  <!-- Purpose: Test for enabling output escaping in xsl:text, HTML output -->
+
+<xsl:template match="/">
+  <HTML>
+    <BODY>
+      <P><xsl:text disable-output-escaping="no"><![CDATA[<P>&nbsp;</P>]]></xsl:text></P>
+      <P><xsl:text disable-output-escaping="yes"><![CDATA[<P>&nbsp;</P>]]></xsl:text></P>
+    </BODY>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output09.xml b/test/tests/conf/output/output09.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output09.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output09.xsl b/test/tests/conf/output/output09.xsl
new file mode 100644
index 0000000..3f4579d
--- /dev/null
+++ b/test/tests/conf/output/output09.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html"/>
+
+  <!-- FileName: OUTP09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 Disable Output Escaping -->
+  <!-- Purpose: Test for disabling output 
+       escaping in a variable with xsl:text, HTML output -->
+
+<xsl:template match="/">
+  <xsl:variable name="foo">
+    <xsl:text disable-output-escaping="yes">&#064; &#126; &#033; &#043;</xsl:text>
+    <xsl:text disable-output-escaping="no">&#064; &#126; &#033; &#043;</xsl:text>
+  </xsl:variable>
+  <HTML>
+    <BODY>
+      <xsl:copy-of select="$foo"/>
+    </BODY>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output10.xml b/test/tests/conf/output/output10.xml
new file mode 100644
index 0000000..5963b7b
--- /dev/null
+++ b/test/tests/conf/output/output10.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo><![CDATA[<P>&nbsp;</P>]]></foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output10.xsl b/test/tests/conf/output/output10.xsl
new file mode 100644
index 0000000..778e492
--- /dev/null
+++ b/test/tests/conf/output/output10.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml"/>
+
+  <!-- FileName: OUTP10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.1 -->
+  <!-- Purpose: test for disabling output escaping in a variable with xsl:value-of -->
+
+<xsl:template match="/">
+  <xsl:variable name="foo">
+    <xsl:value-of select="doc/foo" disable-output-escaping="yes"/>
+  </xsl:variable>
+  <out>
+    <xsl:copy-of select="$foo"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output100.xml b/test/tests/conf/output/output100.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output100.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output100.xsl b/test/tests/conf/output/output100.xsl
new file mode 100644
index 0000000..e081ad3
--- /dev/null
+++ b/test/tests/conf/output/output100.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:baz="http://baz.com"
+  exclude-result-prefixes="baz">
+
+  <!-- FileName: OUTPUT100 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that non-namespaced LRE does not match namespaced element in cdata-section-elements list. -->
+
+<xsl:output method="xml" cdata-section-elements="baz:out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>should NOT be wrapped</out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output101.xml b/test/tests/conf/output/output101.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output101.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output101.xsl b/test/tests/conf/output/output101.xsl
new file mode 100644
index 0000000..1974176
--- /dev/null
+++ b/test/tests/conf/output/output101.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:baz="http://baz.com" xmlns="http://baz.com"
+  exclude-result-prefixes="baz">
+
+  <!-- FileName: OUTPUT101 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that LRE in default namespace can match namespaced element in cdata-section-elements list. -->
+
+<xsl:output method="xml" cdata-section-elements="baz:out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>should be wrapped</out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output102.xml b/test/tests/conf/output/output102.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output102.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output102.xsl b/test/tests/conf/output/output102.xsl
new file mode 100644
index 0000000..e6b98ad
--- /dev/null
+++ b/test/tests/conf/output/output102.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:baz="http://baz.com" xmlns="http://baz.com"
+  exclude-result-prefixes="#default">
+
+  <!-- FileName: OUTPUT102 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that namespaced LRE can match element in cdata-section-elements list when default is set. -->
+
+<xsl:output method="xml" cdata-section-elements="out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <baz:out>should be wrapped</baz:out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output103.xml b/test/tests/conf/output/output103.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output103.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output103.xsl b/test/tests/conf/output/output103.xsl
new file mode 100644
index 0000000..cabf3b7
--- /dev/null
+++ b/test/tests/conf/output/output103.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:baz="http://baz.com" xmlns:extra="http://baz.com"
+  exclude-result-prefixes="extra">
+
+  <!-- FileName: OUTPUT103 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that namespaced LRE can match differently-prefixed element in cdata-section-elements. -->
+
+<xsl:output method="xml" cdata-section-elements="extra:out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <baz:out>should be wrapped</baz:out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output104.xml b/test/tests/conf/output/output104.xml
new file mode 100644
index 0000000..f40ae4e
--- /dev/null
+++ b/test/tests/conf/output/output104.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<baz:out xmlns:baz="http://baz.com">should be wrapped</baz:out>
\ No newline at end of file
diff --git a/test/tests/conf/output/output104.xsl b/test/tests/conf/output/output104.xsl
new file mode 100644
index 0000000..e4ef7f0
--- /dev/null
+++ b/test/tests/conf/output/output104.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:baz="http://baz.com">
+
+  <!-- FileName: OUTPUT104 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Use cdata-section-elements with xsl:copy-of, namespaces match. -->
+
+<xsl:output method="xml" cdata-section-elements="baz:out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output105.xml b/test/tests/conf/output/output105.xml
new file mode 100644
index 0000000..59fee84
--- /dev/null
+++ b/test/tests/conf/output/output105.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<out xmlns="http://baz.com">should be wrapped</out>
diff --git a/test/tests/conf/output/output105.xsl b/test/tests/conf/output/output105.xsl
new file mode 100644
index 0000000..0da0ace
--- /dev/null
+++ b/test/tests/conf/output/output105.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:baz="http://baz.com">
+
+  <!-- FileName: OUTPUT105 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Use cdata-section-elements with xsl:copy-of, default in input matches prefixed here. -->
+
+<xsl:output method="xml" cdata-section-elements="baz:out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output106.xml b/test/tests/conf/output/output106.xml
new file mode 100644
index 0000000..f40ae4e
--- /dev/null
+++ b/test/tests/conf/output/output106.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<baz:out xmlns:baz="http://baz.com">should be wrapped</baz:out>
\ No newline at end of file
diff --git a/test/tests/conf/output/output106.xsl b/test/tests/conf/output/output106.xsl
new file mode 100644
index 0000000..b17d5f0
--- /dev/null
+++ b/test/tests/conf/output/output106.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="http://baz.com">
+
+  <!-- FileName: OUTPUT106 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use cdata-section-elements with xsl:copy-of, prefix in input matches default here. -->
+
+<xsl:output method="xml" cdata-section-elements="out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output107.xml b/test/tests/conf/output/output107.xml
new file mode 100644
index 0000000..f40ae4e
--- /dev/null
+++ b/test/tests/conf/output/output107.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<baz:out xmlns:baz="http://baz.com">should be wrapped</baz:out>
\ No newline at end of file
diff --git a/test/tests/conf/output/output107.xsl b/test/tests/conf/output/output107.xsl
new file mode 100644
index 0000000..465dd0d
--- /dev/null
+++ b/test/tests/conf/output/output107.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:snaz="http://baz.com">
+
+  <!-- FileName: OUTPUT107 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use cdata-section-elements with xsl:copy-of, namespaces match URIs but prefixes are different. -->
+
+<xsl:output method="xml" cdata-section-elements="snaz:out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output109.xml b/test/tests/conf/output/output109.xml
new file mode 100644
index 0000000..86837fd
--- /dev/null
+++ b/test/tests/conf/output/output109.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <dis>one</dis>
+  <dat>two</dat>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output109.xsl b/test/tests/conf/output/output109.xsl
new file mode 100644
index 0000000..2ddb601
--- /dev/null
+++ b/test/tests/conf/output/output109.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output109 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Attempt to create comment under text output method -->
+
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="dis"/>
+  <xsl:comment>Here is my comment</xsl:comment>
+  <xsl:value-of select="dat"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output11.xml b/test/tests/conf/output/output11.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output11.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output11.xsl b/test/tests/conf/output/output11.xsl
new file mode 100644
index 0000000..079c60f
--- /dev/null
+++ b/test/tests/conf/output/output11.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: OUTP11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test for the xml output method by itself -->
+
+<xsl:template match="/">
+  <out/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output110.xml b/test/tests/conf/output/output110.xml
new file mode 100644
index 0000000..3954ca6
--- /dev/null
+++ b/test/tests/conf/output/output110.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <dis>|</dis>
+  <dat>|</dat>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output110.xsl b/test/tests/conf/output/output110.xsl
new file mode 100644
index 0000000..a26303a
--- /dev/null
+++ b/test/tests/conf/output/output110.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output110 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Attempt to create element (LRE) under text output method. Should get just its text-node descendant. -->
+
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="dis"/>
+  <xyz>Here is my LRE</xyz>
+  <xsl:value-of select="dat"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output111.xml b/test/tests/conf/output/output111.xml
new file mode 100644
index 0000000..3954ca6
--- /dev/null
+++ b/test/tests/conf/output/output111.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <dis>|</dis>
+  <dat>|</dat>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output111.xsl b/test/tests/conf/output/output111.xsl
new file mode 100644
index 0000000..fb7fceb
--- /dev/null
+++ b/test/tests/conf/output/output111.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output111 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Attempt to create element under text output method. Should get just its text-node descendant. -->
+
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="dis"/>
+  <xsl:element name="bogus">Here is my element</xsl:element>
+  <xsl:value-of select="dat"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output112.xml b/test/tests/conf/output/output112.xml
new file mode 100644
index 0000000..86837fd
--- /dev/null
+++ b/test/tests/conf/output/output112.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <dis>one</dis>
+  <dat>two</dat>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output112.xsl b/test/tests/conf/output/output112.xsl
new file mode 100644
index 0000000..093272d
--- /dev/null
+++ b/test/tests/conf/output/output112.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output112 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Attempt to create attribute under text output method -->
+
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="dis"/>
+  <xsl:attribute name="bogus">Here is my attribute</xsl:attribute>
+  <xsl:value-of select="dat"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output113.xml b/test/tests/conf/output/output113.xml
new file mode 100644
index 0000000..86837fd
--- /dev/null
+++ b/test/tests/conf/output/output113.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <dis>one</dis>
+  <dat>two</dat>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output113.xsl b/test/tests/conf/output/output113.xsl
new file mode 100644
index 0000000..62ff93e
--- /dev/null
+++ b/test/tests/conf/output/output113.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output113 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Attempt to create processing instruction under text output method -->
+
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="dis"/>
+  <xsl:processing-instruction name="bogus">Here is my PI</xsl:processing-instruction>
+  <xsl:value-of select="dat"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output114.xml b/test/tests/conf/output/output114.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output114.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output114.xsl b/test/tests/conf/output/output114.xsl
new file mode 100644
index 0000000..325ae6c
--- /dev/null
+++ b/test/tests/conf/output/output114.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output114 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Creator: Gordon Chiu -->
+  <!-- Purpose: Check that empty comments are created correctly -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:comment/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output12.xml b/test/tests/conf/output/output12.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output12.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output12.xsl b/test/tests/conf/output/output12.xsl
new file mode 100644
index 0000000..425aa58
--- /dev/null
+++ b/test/tests/conf/output/output12.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" omit-xml-declaration="yes"/>
+
+  <!-- FileName: OUTP12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test for the xml output method by itself with 
+       omit-xml-declaration -->
+
+<xsl:template match="/">
+  <out/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output13.xml b/test/tests/conf/output/output13.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output13.xsl b/test/tests/conf/output/output13.xsl
new file mode 100644
index 0000000..4ba600e
--- /dev/null
+++ b/test/tests/conf/output/output13.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output doctype-system="out.dtd"/>
+
+  <!-- FileName: OUTP13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16 Output -->
+  <!-- Purpose: Test for doctype-system  -->
+
+<xsl:template match="/">
+  <out/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output14.xml b/test/tests/conf/output/output14.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output14.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output14.xsl b/test/tests/conf/output/output14.xsl
new file mode 100644
index 0000000..77d55fb
--- /dev/null
+++ b/test/tests/conf/output/output14.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output doctype-public="-//BOAG//DTD Websites V1.3//EN"/>
+
+  <!-- FileName: OUTP14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test for doctype-public only  -->
+
+<xsl:template match="/">
+  <out/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output15.xml b/test/tests/conf/output/output15.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output15.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output15.xsl b/test/tests/conf/output/output15.xsl
new file mode 100644
index 0000000..6581f72
--- /dev/null
+++ b/test/tests/conf/output/output15.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output doctype-system="out.dtd" doctype-public="-//BOAG//DTD Websites V1.3//EN"/>
+
+  <!-- FileName: OUTP15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test for doctype-system and doctype-public  -->
+
+<xsl:template match="/">
+  <out/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output16.xml b/test/tests/conf/output/output16.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output16.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output16.xsl b/test/tests/conf/output/output16.xsl
new file mode 100644
index 0000000..bca738d
--- /dev/null
+++ b/test/tests/conf/output/output16.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html" doctype-system="html.dtd"/>
+
+  <!-- FileName: OUTP16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test for doctype-system with html method -->
+
+<xsl:template match="/">
+  <HTML/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output17.xml b/test/tests/conf/output/output17.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output17.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output17.xsl b/test/tests/conf/output/output17.xsl
new file mode 100644
index 0000000..3501d66
--- /dev/null
+++ b/test/tests/conf/output/output17.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>  
+
+  <!-- FileName: OUTP17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test for doctype-public only with html method  -->
+
+<xsl:template match="/">
+  <HTML/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output18.xml b/test/tests/conf/output/output18.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output18.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output18.xsl b/test/tests/conf/output/output18.xsl
new file mode 100644
index 0000000..868adea
--- /dev/null
+++ b/test/tests/conf/output/output18.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html" doctype-system="html.dtd" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
+
+  <!-- FileName: OUTP18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test for doctype-system and doctype-public with html method -->
+
+<xsl:template match="/">
+  <HTML/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output19.xml b/test/tests/conf/output/output19.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output19.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output19.xsl b/test/tests/conf/output/output19.xsl
new file mode 100644
index 0000000..cd1a6ea
--- /dev/null
+++ b/test/tests/conf/output/output19.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" encoding="US-ASCII" />
+
+  <!-- FileName: OUTP19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test US-ASCII encoding. -->
+
+<xsl:template match="/">
+  <out>
+    <test>Testing</test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output20.xml b/test/tests/conf/output/output20.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output20.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output20.xsl b/test/tests/conf/output/output20.xsl
new file mode 100644
index 0000000..76c9e1f
--- /dev/null
+++ b/test/tests/conf/output/output20.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output omit-xml-declaration="no" encoding="SHIFT_JIS"/>
+
+  <!-- FileName: OUTP20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test SHIFT_JIS encoding.-->
+
+<xsl:template match="/">
+  <out>
+    <test>Testing</test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output21.xml b/test/tests/conf/output/output21.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output21.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output21.xsl b/test/tests/conf/output/output21.xsl
new file mode 100644
index 0000000..2be6473
--- /dev/null
+++ b/test/tests/conf/output/output21.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output omit-xml-declaration="no" encoding="BIG5"/>
+
+  <!-- FileName: OUTP21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test BIG5 encoding. -->
+
+<xsl:template match="/">
+  <out>
+    <test>Testing</test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output22.xml b/test/tests/conf/output/output22.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output22.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output22.xsl b/test/tests/conf/output/output22.xsl
new file mode 100644
index 0000000..4190dbe
--- /dev/null
+++ b/test/tests/conf/output/output22.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test EBCDIC-CP-IT encoding. Avoid new-lines in output until XML 1.1
+    addresses the EBCDIC-specific new-line issue. It all looks like gibberish on
+    an ASCII/ISO/UTF platform anyway, so you won't notice the lack of an XML decl. -->
+
+<xsl:output omit-xml-declaration="yes" encoding="EBCDIC-CP-IT"/>
+
+<xsl:template match="/">
+  <out>ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 abcdefghijklmnopqrstuvwxyz</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output23.xml b/test/tests/conf/output/output23.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output23.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output23.xsl b/test/tests/conf/output/output23.xsl
new file mode 100644
index 0000000..ca84d72
--- /dev/null
+++ b/test/tests/conf/output/output23.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output omit-xml-declaration="no" encoding="ISO-2022-JP"/>
+
+  <!-- FileName: OUTP23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test ISO-2022-JP encoding. -->
+
+<xsl:template match="/">
+  <out>
+    <test>Testing</test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output24.xml b/test/tests/conf/output/output24.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output24.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output24.xsl b/test/tests/conf/output/output24.xsl
new file mode 100644
index 0000000..e8e54c2
--- /dev/null
+++ b/test/tests/conf/output/output24.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: OUTP24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Escape of non-ASCII chars in URI attribute values using method 
+       cited in Section B.2.1 of HTML 4.0 Spec. This test is a duplicate of
+       OUTP31, except that the output is XML.  -->
+
+<xsl:template match="/">
+  <out>
+    1. "&#165;"  <A attr="&#165;"/>
+    2. "&quot;"  <A attr="&quot;"/>
+    3. "&lt;"    <A attr="&lt;"/>
+    4. "&gt;"    <A attr="&gt;"/>
+    5. "&amp;"   <A attr="&amp;"/>
+    6. "&#035;"  <A attr="&#035;"/>
+    7. "&#039;"  <A attr="&#039;"/>
+    8. "&#032;"  <A attr="&#032;"/>	<img src="Test 31 Gif.gif"/>
+    9. "&#169;"  <A attr="&#169;"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output25.xml b/test/tests/conf/output/output25.xml
new file mode 100644
index 0000000..c5cd3f0
--- /dev/null
+++ b/test/tests/conf/output/output25.xml
@@ -0,0 +1,458 @@
+<?xml version="1.0"?>
+<Sprs>
+<Spr>
+<Name>DMAN4H3TBV</Name>
+<DateCreated>03/03/2000</DateCreated>
+<State>Open</State>
+<TestID>lre01</TestID>
+<TestDesc>Test harness needs robustness review for L1T, L2T, L2D setups</TestDesc>
+</Spr>
+<Spr>
+<Name>DMAN4H3VML</Name>
+<DateCreated>03/03/2000</DateCreated>
+<State>Open</State>
+<TestID>nspc03</TestID>
+<TestDesc>Attribute values fail to override in DOM scenario</TestDesc>
+</Spr>
+<Spr>
+<Name>DMAN4H429H</Name>
+<DateCreated>03/03/2000</DateCreated>
+<State>Open</State>
+<TestID>numberformat10</TestID>
+<TestDesc>Torture test of format-number obtains garbage</TestDesc>
+</Spr>
+<Spr>
+<Name>DMAN4H6RZ2</Name>
+<DateCreated>03/06/2000</DateCreated>
+<State>Open</State>
+<TestID>pos10</TestID>
+<TestDesc>Use of position() inside for-each loop has different behavior under TX scenario</TestDesc>
+</Spr>
+<Spr>
+<Name>EFAR4H2RQ6</Name>
+<DateCreated>03/02/2000</DateCreated>
+<State>Open</State>
+<TestID></TestID>
+<TestDesc>LotusXSL: include a batch file that will combine the JAR files</TestDesc>
+</Spr>
+<Spr>
+<Name>MMIY4ELLNZ</Name>
+<DateCreated>12/15/1999</DateCreated>
+<State build="0.19.2">Resolved</State>
+<TestID></TestID>
+<TestDesc>Error reporting mechanism needs major improvements</TestDesc>
+</Spr>
+<Spr>
+<Name>MMIY4G5RKT</Name>
+<DateCreated>02/02/2000</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID></TestID>
+<TestDesc>Need to have XSLTInputSource have a setDocumentHandler method, etc.</TestDesc>
+</Spr>
+<Spr>
+<Name>MMIY4G5RPR</Name>
+<DateCreated>02/02/2000</DateCreated>
+<State build="0.20.0">Resolved</State>
+<TestID></TestID>
+<TestDesc>Stylesheet Attribute validation seems not to be working</TestDesc>
+</Spr>
+<Spr>
+<Name>MMIY4G5RY5</Name>
+<DateCreated>02/02/2000</DateCreated>
+<State build="0.20.0">Resolved</State>
+<TestID></TestID>
+<TestDesc>Processor needs to be smarter about using DTM vs. Xerces liaison</TestDesc>
+</Spr>
+<Spr>
+<Name>MMIY4G5RZU</Name>
+<DateCreated>02/02/2000</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID>sort08</TestID>
+<TestDesc>xsl:sort should do simple string compare if lang="english"</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK47NLGY</Name>
+<DateCreated>05/07/1999</DateCreated>
+<State>Closed</State>
+<TestID></TestID>
+<TestDesc>xsl:stylesheet is not synonymous with xsl:transform</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4D2JCF</Name>
+<DateCreated>10/26/1999</DateCreated>
+<State build="0.19.3D03">Resolved</State>
+<TestID>avt07</TestID>
+<TestDesc>Failure to parse attribute with a SPACE within quoted string</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4D2JFT</Name>
+<DateCreated>10/26/1999</DateCreated>
+<State>Closed</State>
+<TestID></TestID>
+<TestDesc>&lt;xsl:text disable-output-escaping="yes"&gt; not working with &lt;xsl:output method=html&gt;</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4D2JJ7</Name>
+<DateCreated>10/26/1999</DateCreated>
+<State>Open</State>
+<TestID></TestID>
+<TestDesc>The escaping of quotes in inlined JavaScript died again</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4D2JLR</Name>
+<DateCreated>10/26/1999</DateCreated>
+<State build="0.19.3D03">Resolved</State>
+<TestID>ntmperr01</TestID>
+<TestDesc>Problems parsing &lt;xsl:with-param&gt; stmt</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4D2JP5</Name>
+<DateCreated>10/26/1999</DateCreated>
+<State>Open</State>
+<TestID>outp31</TestID>
+<TestDesc>Escaping of attribute quotes wasn't being done correctly when method="html".</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4D2JPR</Name>
+<DateCreated>10/26/1999</DateCreated>
+<State>Open</State>
+<TestID></TestID>
+<TestDesc>Equality comparisons with nodesets and other nodesets, strings, and numbers not to spec.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4D9RX5</Name>
+<DateCreated>11/02/1999</DateCreated>
+<State build="0.19.2">Resolved</State>
+<TestID></TestID>
+<TestDesc>FormatterToXML is throwing a NullPointerException</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DASEE</Name>
+<DateCreated>11/03/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>spr01</TestID>
+<TestDesc>Predicate test failing when testing for number that has space around it</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DBTZG</Name>
+<DateCreated>11/04/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>outp31</TestID>
+<TestDesc>method="html" failing to esc non-ASCII chars in URI attributes via HTML 4.O Spec</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DHUR4</Name>
+<DateCreated>11/10/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>outp35</TestID>
+<TestDesc>&lt;Option selected="selected"&gt; not being output correctly for HTML output.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DHUVS</Name>
+<DateCreated>11/10/1999</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID>outp36</TestID>
+<TestDesc>&lt;? Processing Instructions?&gt; not being not being terminated correctly for HTML output.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DJS4Q</Name>
+<DateCreated>11/11/1999</DateCreated>
+<State>Open</State>
+<TestID>outp42,outp43,outp46</TestID>
+<TestDesc>cdata-section-elements not outputing literal result element correctly</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DJSE3</Name>
+<DateCreated>11/11/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>outp44</TestID>
+<TestDesc>xsl:output method="xsl" not outputing proper xml header for result file</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DJSKZ</Name>
+<DateCreated>11/11/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>outp45</TestID>
+<TestDesc>omit-xml-declaration is not a recognize attribute for method="xml"</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DRL8E</Name>
+<DateCreated>11/18/1999</DateCreated>
+<State build="0.19.0">Resolved</State>
+<TestID>outp48</TestID>
+<TestDesc>HTML DTD being output after initial data.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DRLCG</Name>
+<DateCreated>11/18/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>outp47</TestID>
+<TestDesc>No error reporting of invalid use of disable-output-escaping</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DRPKM</Name>
+<DateCreated>11/18/1999</DateCreated>
+<State>Open</State>
+<TestID>spr02</TestID>
+<TestDesc>Use of 9/5 in a xpath expression generates a cryptic error message</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DSKP4</Name>
+<DateCreated>11/19/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>cnfr09</TestID>
+<TestDesc>Included template w/higher priority not being instantiated</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4DVTJS</Name>
+<DateCreated>11/22/1999</DateCreated>
+<State build="0.19.3">Resolved</State>
+<TestID>nspc16</TestID>
+<TestDesc>Marginal error reporting for toplevel elements with undefined namespaces.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4E4KCL</Name>
+<DateCreated>11/29/1999</DateCreated>
+<State build="0.19.3D03">Resolved</State>
+<TestID>impinclerr02</TestID>
+<TestDesc>Not allowed to have xsl:apply-imports within a xsl:for-each</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4E6MR3</Name>
+<DateCreated>12/01/1999</DateCreated>
+<State>Open</State>
+<TestID>str105</TestID>
+<TestDesc>Concat() does not check for number of arguments.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4E6NZE</Name>
+<DateCreated>12/01/1999</DateCreated>
+<State>Open</State>
+<TestID>ntmp06</TestID>
+<TestDesc>Stylesheet should not contain more then 1 template with the same name.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4E8L6L</Name>
+<DateCreated>12/03/1999</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID>nspc19</TestID>
+<TestDesc>&lt;xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/&gt; not working correctly</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4E8QBB</Name>
+<DateCreated>12/03/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>idky08</TestID>
+<TestDesc>The expression in a use attribute on xsl:key should not restricted to return a node-set.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4E8UHQ</Name>
+<DateCreated>12/03/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>extend09</TestID>
+<TestDesc>Extend tests that use Javascript not running w/ latest js.jars</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4EBQWT</Name>
+<DateCreated>12/06/1999</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID>embed06</TestID>
+<TestDesc>Processor crashes running example for embedded stylesheets from spec</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ECQK3</Name>
+<DateCreated>12/07/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>mdocs04</TestID>
+<TestDesc>Document() not creating a union when single argument is a nodeset.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ECTX7</Name>
+<DateCreated>12/07/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>mdocs03</TestID>
+<TestDesc>NPE when passing document() a nodeset of 'doc' as second argument</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ECVJJ</Name>
+<DateCreated>12/07/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>mdocs09</TestID>
+<TestDesc>document("") does NOTrefer to the root node of the stylesheet</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ED222</Name>
+<DateCreated>12/07/1999</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID>nspc20</TestID>
+<TestDesc>exclude-result-prefixes="ped bdd #default" not working with multiple prefixes</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4EF2FS</Name>
+<DateCreated>12/09/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>outp48</TestID>
+<TestDesc>xml header being output all the time</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4EF2KL</Name>
+<DateCreated>12/09/1999</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID>outp48</TestID>
+<TestDesc>Doctype declaration not output html/HTML when it's suppose to.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4EKLX9</Name>
+<DateCreated>12/14/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>atrs07</TestID>
+<TestDesc>Attribute sets test atrs07, seems to be generating wrong output</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4EKNM8</Name>
+<DateCreated>12/14/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>prop01</TestID>
+<TestDesc>Prop01 returns the value of system-property('xsl:version') as a string not a number</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ELNRC</Name>
+<DateCreated>12/15/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID></TestID>
+<TestDesc>Outp tests 19,20,21,22,23 now failing to output xml headers w/ different encodings.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ELPBD</Name>
+<DateCreated>12/15/1999</DateCreated>
+<State build="0.19.2">Resolved</State>
+<TestID>mdocs02</TestID>
+<TestDesc>Document()'s error resources should be in XSLT not XPATH.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ELSE3</Name>
+<DateCreated>12/15/1999</DateCreated>
+<State build="0.19.1">Resolved</State>
+<TestID>entref01</TestID>
+<TestDesc>Entref01: value-of is not passing "&amp;" thru to result output file.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ERNDJ</Name>
+<DateCreated>12/20/1999</DateCreated>
+<State>Open</State>
+<TestID></TestID>
+<TestDesc>Errors messages are overly verbose. Simplify where possible.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ERPLJ</Name>
+<DateCreated>12/20/1999</DateCreated>
+<State build="0.19.3D03">Resolved</State>
+<TestID>bool58</TestID>
+<TestDesc>urgh: $x="foo" does not mean the same as not($x!="foo")</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ESQA5</Name>
+<DateCreated>12/21/1999</DateCreated>
+<State build="0.19.2">Resolved</State>
+<TestID>lre01</TestID>
+<TestDesc>LRE attribute creation will include nodes with names in the XSLT namespace.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ESQEF</Name>
+<DateCreated>12/21/1999</DateCreated>
+<State build="0.19.2">Resolved</State>
+<TestID>lre02, lre03</TestID>
+<TestDesc>both forms of exclude-result-prefixes fail to suppress the default namespace - #default</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ESTEB</Name>
+<DateCreated>12/21/1999</DateCreated>
+<State build="0.19.3D02">Resolved</State>
+<TestID>lre05</TestID>
+<TestDesc>exclude-result-prefixes, should not apply to any included/imported stylesheets</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ETKTJ</Name>
+<DateCreated>12/22/1999</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID>lre06</TestID>
+<TestDesc>Attribute value template does not parse.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4ETPCT</Name>
+<DateCreated>12/22/1999</DateCreated>
+<State build="0.19.3D03">Resolved</State>
+<TestID>lre09</TestID>
+<TestDesc>xsl:element name attribute should generate error if result from the AVT is not a QName.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4EUNA6</Name>
+<DateCreated>12/23/1999</DateCreated>
+<State>Open</State>
+<TestID>lre07</TestID>
+<TestDesc>"xsl:element" created element does not acquire namespace prefixes from stylesheet.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4EUQN6</Name>
+<DateCreated>12/23/1999</DateCreated>
+<State build="0.19.3D02">Resolved</State>
+<TestID>lre01</TestID>
+<TestDesc>LRE with namespace prefixed QName attribute(ped:attr) does not pass attribute to result tree.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4EYP2U</Name>
+<DateCreated>12/27/1999</DateCreated>
+<State build="0.19.3D02">Resolved</State>
+<TestID>ntmp07</TestID>
+<TestDesc>Parameters are not evaluated by XPATH expressions correctly.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4F7PZC</Name>
+<DateCreated>01/03/2000</DateCreated>
+<State build="1.0.1">Resolved</State>
+<TestID>lre10</TestID>
+<TestDesc>Should we generate namespaces if it's set to ""</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4F7QUC</Name>
+<DateCreated>01/03/2000</DateCreated>
+<State build="0.19.3D02">Resolved</State>
+<TestID>atrs15</TestID>
+<TestDesc>attribute name is accepting an invalid QName and "xmlns" as valid names.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4F7TP5</Name>
+<DateCreated>01/03/2000</DateCreated>
+<State build="0.19.3D02">Resolved</State>
+<TestID>sort21</TestID>
+<TestDesc>Using sort with position() fails.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4F8N4Y</Name>
+<DateCreated>01/04/2000</DateCreated>
+<State build="0.19.3D02">Resolved</State>
+<TestID>nspc22</TestID>
+<TestDesc>&lt;xsl:elements&gt; elements are not getting copy of namespace nodes from element node.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4F9L5Q</Name>
+<DateCreated>01/05/2000</DateCreated>
+<State build="0.19.3D02">Resolved</State>
+<TestID>whte18,whte19</TestID>
+<TestDesc>Problems with whitespace stripping in stylesheet.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4F9PTP</Name>
+<DateCreated>01/05/2000</DateCreated>
+<State build="0.20.0">Resolved</State>
+<TestID></TestID>
+<TestDesc>Customer problem. Attempt to create DOM output w/o creating root node first, crashes.</TestDesc>
+</Spr>
+<Spr>
+<Name>PDIK4F9QVX</Name>
+<DateCreated>01/05/2000</DateCreated>
+<State build="0.20.0">Resolved</State>
+<TestID>outp31</TestID>
+<TestDesc>URL encoding should escape the space character as '%20'.</TestDesc>
+</Spr>
+</Sprs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output25.xsl b/test/tests/conf/output/output25.xsl
new file mode 100644
index 0000000..308e894
--- /dev/null
+++ b/test/tests/conf/output/output25.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="text"/>
+
+  <!-- FileName: OUTP25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Purpose: ??? -->
+
+<xsl:template match="Sprs">
+<s3 title="Known bugs:">
+ <p>We are aware of the following bugs (SPR ID# and description):</p><xsl:text>
+</xsl:text>
+   <ul>
+	<xsl:apply-templates select="Spr/State[. = 'Open']"/><xsl:text>&#010;</xsl:text>
+   </ul></s3>
+</xsl:template>
+
+<xsl:template match="*">
+	<li>
+	<xsl:value-of select="preceding-sibling::*[2]"/><xsl:text>: </xsl:text>
+	<xsl:value-of select="following-sibling::*[2]"/><xsl:text>. ( </xsl:text>
+	<xsl:value-of select="following-sibling::*[1]"/><xsl:text>)
+</xsl:text>
+	<br/><br/></li>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output26.xml b/test/tests/conf/output/output26.xml
new file mode 100644
index 0000000..87fce57
--- /dev/null
+++ b/test/tests/conf/output/output26.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <dat>two</dat>
+  <dat>222</dat>
+  <dat>&#xa9;2000</dat>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output26.xsl b/test/tests/conf/output/output26.xsl
new file mode 100644
index 0000000..0c4b7c0
--- /dev/null
+++ b/test/tests/conf/output/output26.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="text" encoding="ISO-8859-1"/>
+
+  <!-- FileName: OUTP26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Purpose: Text output of characters encoded between 128 and 255 -->
+
+<xsl:template match="doc">
+  <xsl:apply-templates select="dat"/>
+</xsl:template>
+
+<xsl:template match="dat">
+  <xsl:text>&#172;</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output27.xml b/test/tests/conf/output/output27.xml
new file mode 100644
index 0000000..acb837d
--- /dev/null
+++ b/test/tests/conf/output/output27.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output27.xsl b/test/tests/conf/output/output27.xsl
new file mode 100644
index 0000000..64fe957
--- /dev/null
+++ b/test/tests/conf/output/output27.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?> 
+
+  <!-- FileName: OUTP27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test of simple output, HTML with xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" -->
+
+<HTML xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
+  <BODY>
+	<out>
+    	<xsl:value-of select="doc/foo"/>
+	</out>
+  </BODY>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</HTML>
diff --git a/test/tests/conf/output/output28.xml b/test/tests/conf/output/output28.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output28.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output28.xsl b/test/tests/conf/output/output28.xsl
new file mode 100644
index 0000000..8240387
--- /dev/null
+++ b/test/tests/conf/output/output28.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output cdata-section-elements="example" encoding="US-ASCII"/>
+
+  <!-- FileName: OUTP28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method-->
+  <!-- Purpose: Result tree here defaults to XML
+       Test for cdata-section-elements with nonrepresentable character. -->
+
+<xsl:template match="doc">
+  <out>
+    <example>this character: &#10052; is a snowflake.</example>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output29.xml b/test/tests/conf/output/output29.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output29.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output29.xsl b/test/tests/conf/output/output29.xsl
new file mode 100644
index 0000000..54d9275
--- /dev/null
+++ b/test/tests/conf/output/output29.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output cdata-section-elements="example"/>
+
+  <!-- FileName: OUTP29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test cdata-section-elements. -->
+
+<xsl:template match="/">
+  <out>
+    <example>]]</example>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output30.xml b/test/tests/conf/output/output30.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output30.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output30.xsl b/test/tests/conf/output/output30.xsl
new file mode 100644
index 0000000..01314e1
--- /dev/null
+++ b/test/tests/conf/output/output30.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output cdata-section-elements="example"/>
+
+  <!-- FileName: OUTP30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test cdata-section-elements that looks like end of CDATA. -->
+
+<xsl:template match="/">
+  <out>
+    <example>]]&gt;</example>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output32.xml b/test/tests/conf/output/output32.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output32.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output32.xsl b/test/tests/conf/output/output32.xsl
new file mode 100644
index 0000000..13ac8d4
--- /dev/null
+++ b/test/tests/conf/output/output32.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>

+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

+

+  <!-- FileName: OUTP32 -->

+  <!-- Document: http://www.w3.org/TR/xslt -->

+  <!-- DocVersion: 19991116 -->

+  <!-- Section: 16.2 HTML Output Method -->

+  <!-- Purpose: ESC of non-ASCII chars in URI attribute

+  	   values using method sited in Section B.2.1 of 

+  	   HTML 4.0 Spec. -->

+

+  <!-- test for SCRIPT handling -->

+  <xsl:output method="html" indent="no"/>

+

+  <xsl:template match="/">

+    <HTML>

+       <Q cite="bë.xml"/>

+    </HTML>

+  </xsl:template>

+

+

+  <!--

+   * Licensed to the Apache Software Foundation (ASF) under one

+   * or more contributor license agreements. See the NOTICE file

+   * distributed with this work for additional information

+   * regarding copyright ownership. The ASF licenses this file

+   * to you 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.

+  -->

+

+</xsl:stylesheet>

diff --git a/test/tests/conf/output/output33.xml b/test/tests/conf/output/output33.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output33.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output33.xsl b/test/tests/conf/output/output33.xsl
new file mode 100644
index 0000000..ee3f124
--- /dev/null
+++ b/test/tests/conf/output/output33.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html" indent="no"/>
+
+  <!-- FileName: output33 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: html output method should not output an end-tag
+  	   for designated empty elements. -->
+
+<xsl:template match="/">
+  <HTML>
+    <area>
+      <xsl:attribute name="tabindex">2</xsl:attribute>
+    </area>	
+    <base/>
+    <basefont/>
+    <br/>
+    <col/>
+    <frame/>
+    <hr width="100"/>
+    <img/>
+    <input/>
+    <isindex/>
+    <link/>
+    <meta/>
+    <param/>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output34.xml b/test/tests/conf/output/output34.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output34.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output34.xsl b/test/tests/conf/output/output34.xsl
new file mode 100644
index 0000000..4874434
--- /dev/null
+++ b/test/tests/conf/output/output34.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html" doctype-system="html" indent="no"/>
+
+  <!-- FileName: OUTP34 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Names of HTML elements should be recognized 
+  	   regardless of case. -->
+
+<xsl:template match="/">
+  <HTML>
+	<Area/>
+	<bAse/>
+	<BaseFont/>
+	<Br/>
+	<Col/>
+	<framE/>
+	<Hr/>
+	<IMG/>
+	<inPut/>
+	<isIndex/>
+	<liNk/>
+	<metA/>
+	<Param/>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output35.xml b/test/tests/conf/output/output35.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output35.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output35.xsl b/test/tests/conf/output/output35.xsl
new file mode 100644
index 0000000..400d0e0
--- /dev/null
+++ b/test/tests/conf/output/output35.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html" 
+    doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: OUTP35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Boolean attributes should be output in minimized form. -->
+
+<xsl:template match="/">
+  <HTML>
+   <Option selected="selected"/>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output36.xml b/test/tests/conf/output/output36.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output36.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output36.xsl b/test/tests/conf/output/output36.xsl
new file mode 100644
index 0000000..1e2d1df
--- /dev/null
+++ b/test/tests/conf/output/output36.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" 
+            doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: outp36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Processing instructions should be terminated with ">". -->
+
+<xsl:template match="/">
+ <HTML>
+   <?PI1 Dothis ?>
+   <?PI2 Dothat ?>
+   <xsl:processing-instruction name="my-pi">href="book.css" type="text/css"</xsl:processing-instruction>
+ </HTML>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output37.xml b/test/tests/conf/output/output37.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output37.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output37.xsl b/test/tests/conf/output/output37.xsl
new file mode 100644
index 0000000..2158fb8
--- /dev/null
+++ b/test/tests/conf/output/output37.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html" 
+    doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: OUTP37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: "&" should not be escaped when occuring in an attribute value
+     immediately followed by a "{". See to Section B.7.1 HTML 4.0 Recommendation. -->
+
+<xsl:template match="/">
+  <HTML>
+    <Body bgcolor='&amp;{{randomrbg}};'/>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output38.xml b/test/tests/conf/output/output38.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output38.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output38.xsl b/test/tests/conf/output/output38.xsl
new file mode 100644
index 0000000..e72309d
--- /dev/null
+++ b/test/tests/conf/output/output38.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Meta should be added immediately after after the start-tag
+     of the HEAD element specifying the character encoding actually used. -->
+
+<xsl:output method="html" encoding="ISO-8859-1"
+  doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+<xsl:template match="/">
+  <HTML>
+    <HEAD>
+      <Body>Hi</Body>
+    </HEAD>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output39.xml b/test/tests/conf/output/output39.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output39.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output39.xsl b/test/tests/conf/output/output39.xsl
new file mode 100644
index 0000000..53e3a8d
--- /dev/null
+++ b/test/tests/conf/output/output39.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" 
+            doctype-public="-//W3C//DTD HTML 4.0 Transitional" 
+            indent="no"/>
+
+  <!-- FileName: outp39 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Test of indent -->
+
+<xsl:template match="/">
+  <HTML><Body></Body></HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output40.xml b/test/tests/conf/output/output40.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output40.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output40.xsl b/test/tests/conf/output/output40.xsl
new file mode 100644
index 0000000..44ac372
--- /dev/null
+++ b/test/tests/conf/output/output40.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="yes"
+  doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: OUTP40 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Test of indent -->
+
+<xsl:template match="/">
+  <root>
+  <Out> this tests nothing </Out>
+  <Out> this tests something </Out>
+  <HEAD><Body></Body></HEAD>
+  </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output41.xml b/test/tests/conf/output/output41.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output41.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output41.xsl b/test/tests/conf/output/output41.xsl
new file mode 100644
index 0000000..b41b524
--- /dev/null
+++ b/test/tests/conf/output/output41.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" cdata-section-elements="example"/>
+
+  <!-- FileName: OUTP41 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Text node containing "]]>" and closure of CDATA section. -->
+
+<xsl:template match="/">
+	<example>]]&gt;</example>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output42.xml b/test/tests/conf/output/output42.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output42.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output42.xsl b/test/tests/conf/output/output42.xsl
new file mode 100644
index 0000000..7751ed7
--- /dev/null
+++ b/test/tests/conf/output/output42.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" cdata-section-elements="example test"/>
+
+  <!-- FileName: outp42 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test of cdata-section-elements processing. -->
+
+<xsl:template match="/">
+  <out>
+	<example>&lt;foo></example><xsl:text>&#010;</xsl:text>
+	<example>&gt;&gt;&gt;HELLO&lt;&lt;&lt;</example><xsl:text>&#010;</xsl:text>
+	<test><![CDATA[>>>HELLO<<<]]></test>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output43.xml b/test/tests/conf/output/output43.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output43.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output43.xsl b/test/tests/conf/output/output43.xsl
new file mode 100644
index 0000000..335159c
--- /dev/null
+++ b/test/tests/conf/output/output43.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" cdata-section-elements="test"/>
+
+  <!-- FileName: outp43 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test of cdata-section-elements processing. <example>
+  	   should not be processed.  -->
+
+<xsl:template match="/">
+  <out>
+	<example>&gt;&gt;&gt;SHOULD NOT BE WRAPPED WITH cdata section&lt;&lt;&lt;</example><xsl:text>&#010;</xsl:text>
+	<test>&gt;&gt;&gt;SHOULD BE WRAPPED WITH cdata section&lt;&lt;&lt;</test>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output44.xml b/test/tests/conf/output/output44.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output44.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output44.xsl b/test/tests/conf/output/output44.xsl
new file mode 100644
index 0000000..542447f
--- /dev/null
+++ b/test/tests/conf/output/output44.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: output44 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: xml method should output XML declaration. -->
+
+<xsl:template match="/">
+  <example>SHOULD have XML Declaration</example>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output45.xml b/test/tests/conf/output/output45.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output45.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output45.xsl b/test/tests/conf/output/output45.xsl
new file mode 100644
index 0000000..f26dd0a
--- /dev/null
+++ b/test/tests/conf/output/output45.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" omit-xml-declaration="yes"/>
+
+  <!-- FileName: OUTP45 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: xml method should not output XML declaration if 
+     omit-xml-declaration="yes". -->
+
+<xsl:template match="/">
+  <example>SHOULD NOT have XML Declaration</example>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output46.xml b/test/tests/conf/output/output46.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output46.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output46.xsl b/test/tests/conf/output/output46.xsl
new file mode 100644
index 0000000..1a0a2d3
--- /dev/null
+++ b/test/tests/conf/output/output46.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output46 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16 Output -->
+  <!-- Purpose: All xsl:output elements are merged into a single element. While repeats of
+    most attributes are just tested for conflicts, cdata-section-elements will contain the
+    union of the specified values. Both example and test should be wrapped by CDATA, and
+    the output should be XML (since cdata-section-elements only applies to XML). -->
+
+<xsl:output cdata-section-elements="test" encoding="UTF-8" indent="no"/>
+<xsl:output method="xml" cdata-section-elements="example"/>
+
+<xsl:template match="/">
+  <out>
+    <example>&lt;foo></example>
+    <plain>bar &amp; ban</plain>
+    <test>!&gt;</test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output47.xml b/test/tests/conf/output/output47.xml
new file mode 100644
index 0000000..572b67b
--- /dev/null
+++ b/test/tests/conf/output/output47.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output47.xsl b/test/tests/conf/output/output47.xsl
new file mode 100644
index 0000000..99da6aa
--- /dev/null
+++ b/test/tests/conf/output/output47.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP47 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 Disabling Output Escaping -->
+  <!-- Purpose: Illegal use of disable-output-escaping. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:variable name="nodetext">
+      <xsl:text disable-output-escaping="yes">This is &lt;b>BOLD1&lt;/b> text.</xsl:text>
+    </xsl:variable>
+    <xsl:value-of select="$nodetext"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output48.xml b/test/tests/conf/output/output48.xml
new file mode 100644
index 0000000..572b67b
--- /dev/null
+++ b/test/tests/conf/output/output48.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output48.xsl b/test/tests/conf/output/output48.xsl
new file mode 100644
index 0000000..1274593
--- /dev/null
+++ b/test/tests/conf/output/output48.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional" indent="no"/>
+
+  <!-- FileName: outp48 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose:  ... html output method should output a DTD immediately
+       before the first element. -->
+
+<xsl:template match="/">
+ <root>
+ Please <b>BOLD THIS</b> now.
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output49.xml b/test/tests/conf/output/output49.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output49.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output49.xsl b/test/tests/conf/output/output49.xsl
new file mode 100644
index 0000000..9d24726
--- /dev/null
+++ b/test/tests/conf/output/output49.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP49 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: HTML output method should not escape '<' in attribute values. -->
+
+<xsl:template match="/">
+  <HTML>
+    <foo name="&lt;abcd>"/>
+	<h1 title="&lt;contacts>">People</h1>
+	<frame name="z&lt;this>z"/>    
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output50.xml b/test/tests/conf/output/output50.xml
new file mode 100644
index 0000000..572b67b
--- /dev/null
+++ b/test/tests/conf/output/output50.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output50.xsl b/test/tests/conf/output/output50.xsl
new file mode 100644
index 0000000..3e92248
--- /dev/null
+++ b/test/tests/conf/output/output50.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP50 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 Disabling Output Escaping -->
+  <!-- Purpose: Valid use of disable-output-escaping. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:variable name="nodetext">
+      <xsl:text disable-output-escaping="yes">This is &lt;b>BOLD1&lt;/b> text.</xsl:text>
+    </xsl:variable>
+    <xsl:copy-of select="$nodetext"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output51.xml b/test/tests/conf/output/output51.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output51.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output51.xsl b/test/tests/conf/output/output51.xsl
new file mode 100644
index 0000000..a76bbc6
--- /dev/null
+++ b/test/tests/conf/output/output51.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output indent="yes"/>
+
+  <!-- FileName: outp51 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output -->
+  <!-- Purpose: Test of indent attribute by itself. -->
+
+<xsl:template match="/">
+ <root>
+   <Out>Test of indent</Out>
+   <Out>Test of indent</Out>
+ </root>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output52.xml b/test/tests/conf/output/output52.xml
new file mode 100644
index 0000000..0877143
--- /dev/null
+++ b/test/tests/conf/output/output52.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
diff --git a/test/tests/conf/output/output52.xsl b/test/tests/conf/output/output52.xsl
new file mode 100644
index 0000000..c3f2bc8
--- /dev/null
+++ b/test/tests/conf/output/output52.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+  <xsl:strip-space elements="*"/>
+
+  <!-- FileName: OUTP52 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: html output method should not output white space after 
+       the image tag within the anchor tag. -->
+
+<xsl:template match="/">
+  <html><body>
+    <a href="#">
+      <img src="image.jpg"/>
+    </a>
+  </body></html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output53.xml b/test/tests/conf/output/output53.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conf/output/output53.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output53.xsl b/test/tests/conf/output/output53.xsl
new file mode 100644
index 0000000..8ee92ae
--- /dev/null
+++ b/test/tests/conf/output/output53.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP53 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Basic test for creating a comment. -->
+
+<xsl:template match="/">
+  <Out>
+    <xsl:comment>This should be inserted as-is.</xsl:comment>
+  </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output54.xml b/test/tests/conf/output/output54.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conf/output/output54.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output54.xsl b/test/tests/conf/output/output54.xsl
new file mode 100644
index 0000000..68757aa
--- /dev/null
+++ b/test/tests/conf/output/output54.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP54 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Test for creating a comment using a formula. -->
+
+<xsl:template match="/">
+  <Out>
+    <xsl:comment><xsl:value-of select="substring('abcdefghi',2,4)"/></xsl:comment>
+  </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output55.xml b/test/tests/conf/output/output55.xml
new file mode 100644
index 0000000..c277bc1
--- /dev/null
+++ b/test/tests/conf/output/output55.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs attr="comment fodder">
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output55.xsl b/test/tests/conf/output/output55.xsl
new file mode 100644
index 0000000..d32caf0
--- /dev/null
+++ b/test/tests/conf/output/output55.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP55 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Test creating a comment from a path expression. -->
+
+<xsl:template match="docs">
+  <Out>
+    <xsl:comment><xsl:value-of select="@attr"/></xsl:comment>
+  </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output56.xml b/test/tests/conf/output/output56.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conf/output/output56.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output56.xsl b/test/tests/conf/output/output56.xsl
new file mode 100644
index 0000000..1015f44
--- /dev/null
+++ b/test/tests/conf/output/output56.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP56 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Test creating a comment from a variable. -->
+
+<xsl:variable name="commentor">foo</xsl:variable>
+
+<xsl:template match="/">
+  <Out>
+    <xsl:comment><xsl:value-of select="$commentor"/></xsl:comment>
+  </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output57.xml b/test/tests/conf/output/output57.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conf/output/output57.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output57.xsl b/test/tests/conf/output/output57.xsl
new file mode 100644
index 0000000..21056ef
--- /dev/null
+++ b/test/tests/conf/output/output57.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP57 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Test use of xsl:if and xsl:text inside xsl:comment. -->
+
+<xsl:template match="/">
+  <Out>
+    <xsl:comment>
+      <xsl:if test="true()">
+        <xsl:text>Comment content</xsl:text>
+      </xsl:if>
+    </xsl:comment>
+  </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output58.xml b/test/tests/conf/output/output58.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conf/output/output58.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output58.xsl b/test/tests/conf/output/output58.xsl
new file mode 100644
index 0000000..8086c3c
--- /dev/null
+++ b/test/tests/conf/output/output58.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP58 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Test creation of a top-level comment. -->
+
+<xsl:template match="/">
+  <xsl:comment>This should be inserted as-is.</xsl:comment>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output59.xml b/test/tests/conf/output/output59.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output59.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output59.xsl b/test/tests/conf/output/output59.xsl
new file mode 100644
index 0000000..dfc1029
--- /dev/null
+++ b/test/tests/conf/output/output59.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="no"
+            doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: outp59 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.3 Creating Processing Instructions -->
+  <!-- Purpose: Test creation of a top-level processing-instruction before the 
+                document element. -->
+
+<xsl:template match="/">
+ <xsl:processing-instruction name="my-pi">href="book.css" type="text/css"</xsl:processing-instruction>
+ <HTML>
+   <?PI1 Dothis ?>
+   Literal output
+ </HTML>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output60.xml b/test/tests/conf/output/output60.xml
new file mode 100644
index 0000000..d1feba2
--- /dev/null
+++ b/test/tests/conf/output/output60.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?> 
+<sales>
+ <division id="North">
+     <revenue>10</revenue>
+     <growth>9</growth>
+     <bonus>7</bonus>
+ </division>
+ <division id="South">
+     <revenue>4</revenue>
+     <growth>3</growth>
+     <bonus>4</bonus>
+ </division>
+ <division id="West">
+     <revenue>6</revenue>
+     <growth>-1.5</growth>
+     <bonus>2</bonus>
+ </division>
+</sales>
diff --git a/test/tests/conf/output/output60.xsl b/test/tests/conf/output/output60.xsl
new file mode 100644
index 0000000..6299cab
--- /dev/null
+++ b/test/tests/conf/output/output60.xsl
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:output method="html" indent="no" doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: OUTP60 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Do everything inside an HTML element. Note first item in this file. -->
+
+<xsl:template match="/">
+  <html lang="en">
+    <head>
+      <title>Sales Results By Division</title>
+    </head>
+    <body>
+      <table border="1">
+	<tr>
+          <th>Division</th>
+          <th>Revenue</th>
+          <th>Growth</th>
+          <th>Bonus</th>
+        </tr>
+        <xsl:for-each select="sales/division">
+          <!-- order the result by revenue -->
+          <xsl:sort select="revenue"
+            data-type="number"
+            order="descending"/>
+          <tr>
+            <td>
+              <em><xsl:value-of select="@id"/></em>
+            </td>
+            <td>
+              <xsl:value-of select="revenue"/>
+            </td>
+            <td>
+              <!-- highlight negative growth in red -->
+              <xsl:if test="growth &lt; 0">
+                <xsl:attribute name="style">
+                  <xsl:text>color:red</xsl:text>
+                </xsl:attribute>
+              </xsl:if>
+              <xsl:value-of select="growth"/>
+            </td>
+            <td>
+              <xsl:value-of select="bonus"/>
+            </td>
+          </tr>
+        </xsl:for-each>
+      </table>
+    </body>
+  </html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output61.xml b/test/tests/conf/output/output61.xml
new file mode 100644
index 0000000..d3b0671
--- /dev/null
+++ b/test/tests/conf/output/output61.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><![CDATA[<P>&nbsp;</P>]]></doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output61.xsl b/test/tests/conf/output/output61.xsl
new file mode 100644
index 0000000..a114865
--- /dev/null
+++ b/test/tests/conf/output/output61.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml"/>
+
+  <!-- FileName: OUTP61 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 -->
+  <!-- Purpose: Test for disabling output escaping in xsl:value-of on ., which has special code. XML method. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:value-of select="." disable-output-escaping="yes"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output62.xml b/test/tests/conf/output/output62.xml
new file mode 100644
index 0000000..d3b0671
--- /dev/null
+++ b/test/tests/conf/output/output62.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><![CDATA[<P>&nbsp;</P>]]></doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output62.xsl b/test/tests/conf/output/output62.xsl
new file mode 100644
index 0000000..928c658
--- /dev/null
+++ b/test/tests/conf/output/output62.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTP62 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 -->
+  <!-- Purpose: Test for disabling output escaping in xsl:value-of on ., which has special code. HTML method. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:value-of select="." disable-output-escaping="yes"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output63.xml b/test/tests/conf/output/output63.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output63.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output63.xsl b/test/tests/conf/output/output63.xsl
new file mode 100644
index 0000000..87fac69
--- /dev/null
+++ b/test/tests/conf/output/output63.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:jsp="http://www.w3.org/jsp"
+				xmlns="http://www.w3.org/TR/REC-html40"
+                exclude-result-prefixes="jsp">
+
+  <!-- FileName: OUTP63 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: The html output method should not output an element 
+                differently from the xml output method unless the 
+                expanded-name of the element has a null namespace URI; an 
+                element whose expanded-name has a non-null namespace URI 
+                should be output as XML. So the html tags <p>, <hr> and
+                <br> in this case, due to the default html namespace will
+                be output as xml not html. -->
+  <!-- Creator: Paul Dick -->
+
+<xsl:output method="html"/>
+
+<xsl:template match="/">
+  <HTML>
+    <jsp:setProperty name="blah" property="blah" value="blah"/>
+	<P></P>
+	<p/>
+	<P/>
+	<hr size="8"></hr>
+	<hr size="8"/>
+	<br/>
+	<br>
+	</br>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output64.xml b/test/tests/conf/output/output64.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output64.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output64.xsl b/test/tests/conf/output/output64.xsl
new file mode 100644
index 0000000..dc19648
--- /dev/null
+++ b/test/tests/conf/output/output64.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="xml"
+    doctype-system="wml_11.xml"
+    doctype-public="-//WAPFORUM//DTD WML1.1//EN"/>
+
+<!-- The orginal doctype-system attrib was as below:
+    	doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml"
+	 but it has been localized to facilatate testing. -->
+
+  <!-- FileName: OUTP64 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Purpose: Generate output tagged for WML -->
+
+<xsl:template match="/">
+  <wml>
+    <xsl:apply-templates/>
+  </wml>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output65.xml b/test/tests/conf/output/output65.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output65.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output65.xsl b/test/tests/conf/output/output65.xsl
new file mode 100644
index 0000000..a27e770
--- /dev/null
+++ b/test/tests/conf/output/output65.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="http://www.w3.org/1999/xhtml">
+
+<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+  doctype-system="DTD/xhtml1-strict.dtd"/>
+
+  <!-- FileName: OUTP65 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test for special case for XHTML -->
+
+<xsl:template match="/">
+  <html><xsl:value-of select="doc/foo"/></html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output66.xml b/test/tests/conf/output/output66.xml
new file mode 100644
index 0000000..c2d75d5
--- /dev/null
+++ b/test/tests/conf/output/output66.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+<node>Standalone set to no</node>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output66.xsl b/test/tests/conf/output/output66.xsl
new file mode 100644
index 0000000..8360bac
--- /dev/null
+++ b/test/tests/conf/output/output66.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: outp66 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Verify standalone attribute set to "no". -->
+
+<xsl:output method="xml" standalone="no"/>
+
+<xsl:template match="doc">
+	<root>
+		<xsl:value-of select="node"/>
+	</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output67.xml b/test/tests/conf/output/output67.xml
new file mode 100644
index 0000000..00ec563
--- /dev/null
+++ b/test/tests/conf/output/output67.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+<node>Standalone set to yes</node>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output67.xsl b/test/tests/conf/output/output67.xsl
new file mode 100644
index 0000000..245c1c4
--- /dev/null
+++ b/test/tests/conf/output/output67.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: outp67 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Verify standalone attribute set to "yes". -->
+
+<xsl:output method="xml" standalone="yes"/>
+
+<xsl:template match="doc">
+	<root>
+		<xsl:value-of select="node"/>
+	</root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output68.xml b/test/tests/conf/output/output68.xml
new file mode 100644
index 0000000..3a89cad
--- /dev/null
+++ b/test/tests/conf/output/output68.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+<a>X</a>
+<a>Y</a>
+<a>Z</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output68.xsl b/test/tests/conf/output/output68.xsl
new file mode 100644
index 0000000..3bba8ba
--- /dev/null
+++ b/test/tests/conf/output/output68.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP68 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Test for-each inside xsl:comment. -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:comment>
+      <xsl:for-each select="a">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:comment>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output69.xml b/test/tests/conf/output/output69.xml
new file mode 100644
index 0000000..3a89cad
--- /dev/null
+++ b/test/tests/conf/output/output69.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+<a>X</a>
+<a>Y</a>
+<a>Z</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/output/output69.xsl b/test/tests/conf/output/output69.xsl
new file mode 100644
index 0000000..8f793a7
--- /dev/null
+++ b/test/tests/conf/output/output69.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP69 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Test for-each inside xsl:processing-instruction. -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:processing-instruction name="my-pi">
+      <xsl:for-each select="a">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:processing-instruction>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output70.xml b/test/tests/conf/output/output70.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output70.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output70.xsl b/test/tests/conf/output/output70.xsl
new file mode 100644
index 0000000..edaa12c
--- /dev/null
+++ b/test/tests/conf/output/output70.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="html" indent="no"/>
+
+  <!-- FileName: outp70 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 1 Introduction -->
+  <!-- Purpose: Quotes and apostrophes can be used inside themselves, without
+     terminating the string, if entered as entities. -->
+
+<xsl:template match="/">
+  <HTML>
+    Inside double quotes:
+    1. "&quot;"  <A href="&quot;"/>
+    2. "&apos;"  <A href="&apos;"/>
+    Inside single quotes:
+    3. '&quot;'  <A href='&quot;'/>
+    4. '&apos;'  <A href='&apos;'/>
+    NOTE: hrefs always have the double quotes.
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output71.xml b/test/tests/conf/output/output71.xml
new file mode 100644
index 0000000..acb837d
--- /dev/null
+++ b/test/tests/conf/output/output71.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output71.xsl b/test/tests/conf/output/output71.xsl
new file mode 100644
index 0000000..64045bc
--- /dev/null
+++ b/test/tests/conf/output/output71.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTP71 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Purpose: Test that implied HTML output assumes indent=yes. -->
+
+<xsl:template match="/">
+<HTML>
+  <BODY>
+    <out>
+      <xsl:value-of select="doc/foo"/>
+    </out>
+  </BODY>
+</HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output72.xml b/test/tests/conf/output/output72.xml
new file mode 100644
index 0000000..89fef58
--- /dev/null
+++ b/test/tests/conf/output/output72.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <tag>Hello</tag>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output72.xsl b/test/tests/conf/output/output72.xsl
new file mode 100644
index 0000000..bf7f4b7
--- /dev/null
+++ b/test/tests/conf/output/output72.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: outp72 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.3 Creating Processing Instructions. -->
+  <!-- Purpose: Test the generation of Processing instructions. -->
+
+<xsl:template match="doc/tag">
+<out>
+  <?PI1 Dothis ?>
+  <?PI2 Dothat ?>
+  <xsl:processing-instruction name="my-pi">href="book.css" type="text/css"</xsl:processing-instruction>
+  <xsl:processing-instruction name="mytag">
+	<xsl:value-of select="."/>
+	 ?>
+  </xsl:processing-instruction>
+</out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output73.xml b/test/tests/conf/output/output73.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conf/output/output73.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output73.xsl b/test/tests/conf/output/output73.xsl
new file mode 100644
index 0000000..10849d3
--- /dev/null
+++ b/test/tests/conf/output/output73.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:output method="html" encoding="SHIFT_JIS"/>
+
+  <!-- FileName: OUTP73 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 HTML Output Method -->
+  <!-- Purpose: Test SHIFT_JIS encoding on HTML output.-->
+
+<xsl:template match="/">
+  <HTML>
+    <HEAD></HEAD>
+    <body>Hiragana &#x3041; &#x3051; &#x3061; &#x3071; &#x3081; &#x3091;</body>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output74.xml b/test/tests/conf/output/output74.xml
new file mode 100644
index 0000000..e29db62
--- /dev/null
+++ b/test/tests/conf/output/output74.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+	<a>&lt;&lt;&lt;P&gt;&gt;&gt;</a>
+	<a><![CDATA[<P>&nbsp;</P>]]></a>
+	<b>Previous attrib from CDATA</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output74.xsl b/test/tests/conf/output/output74.xsl
new file mode 100644
index 0000000..ae97e2b
--- /dev/null
+++ b/test/tests/conf/output/output74.xsl
@@ -0,0 +1,72 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="html"/>
+
+  <!-- FileName: output74 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 Disable output escaping. -->
+  <!-- Purpose: Spec states:It is an error for output escaping to be disabled 
+       for a text node that is used for something other than a text node in the 
+       result tree. Thus, it is an error to disable output escaping for an 
+       xsl:value-of or xsl:text element that is used to generate the string-value 
+       of a comment, processing instruction or attribute node;. OUTPUT = HTML -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="doc">
+ <html>
+  <out1>
+	<xsl:attribute name="attrib1">
+		<xsl:text disable-output-escaping="no">_&lt;Whoa-No&gt;_</xsl:text>
+	</xsl:attribute>
+	<xsl:attribute name="attrib2">
+		<xsl:value-of select="a" disable-output-escaping="no"/>
+	</xsl:attribute></out1>
+
+  <!-- This is the error case. It should come out as doe="no" -->
+  <out2>  
+	<xsl:attribute name="attrib3">
+		<xsl:text disable-output-escaping="yes">_&lt;Whoa-Yes&gt;_</xsl:text>
+	</xsl:attribute>
+	<xsl:attribute name="attrib4">
+		<xsl:value-of select="a" disable-output-escaping="yes"/>
+	</xsl:attribute></out2 >
+
+  <h1>
+  	<xsl:attribute name="title">
+		<xsl:text disable-output-escaping="yes">_&lt;Yes-Contacts&gt;_</xsl:text>
+	</xsl:attribute>People</h1>
+
+  <frame>
+  	<xsl:attribute name="scrolling">yes</xsl:attribute>
+	<xsl:attribute name="name">
+  		<xsl:text disable-output-escaping="yes">_&lt;this&gt;_</xsl:text>
+	</xsl:attribute></frame>
+
+  <out3>
+	<xsl:value-of select="a" disable-output-escaping="yes"/></out3>
+
+ </html>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output75.xml b/test/tests/conf/output/output75.xml
new file mode 100644
index 0000000..e29db62
--- /dev/null
+++ b/test/tests/conf/output/output75.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+	<a>&lt;&lt;&lt;P&gt;&gt;&gt;</a>
+	<a><![CDATA[<P>&nbsp;</P>]]></a>
+	<b>Previous attrib from CDATA</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output75.xsl b/test/tests/conf/output/output75.xsl
new file mode 100644
index 0000000..c9816f0
--- /dev/null
+++ b/test/tests/conf/output/output75.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName: output75 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.4 Disable output escaping. -->
+  <!-- Purpose: Spec states:It is an error for output escaping to be disabled 
+       for a text node that is used for something other than a text node in the 
+       result tree. Thus, it is an error to disable output escaping for an 
+       xsl:value-of or xsl:text element that is used to generate the string-value 
+       of a comment, processing instruction or attribute node; OUTPUT = XML  -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="doc">
+ <xml><xsl:text>&#10;</xsl:text>
+  <out1>
+	<xsl:attribute name="attrib1">
+		<xsl:text disable-output-escaping="no">_&lt;Whoa-No&gt;_</xsl:text>
+	</xsl:attribute>
+	<xsl:attribute name="attrib2">
+		<xsl:value-of select="a" disable-output-escaping="no"/>
+	</xsl:attribute></out1><xsl:text>&#10;</xsl:text>
+
+  <!-- This is the error case. It should come out as d-o-e="no" -->
+  <out2>
+	<xsl:attribute name="attrib3">
+		<xsl:text disable-output-escaping="yes">_&lt;Whoa-Yes&gt;_</xsl:text>
+	</xsl:attribute>
+	<xsl:attribute name="attrib4">
+		<xsl:value-of select="a" disable-output-escaping="yes"/>
+	</xsl:attribute></out2><xsl:text>&#10;</xsl:text>
+
+  <out3>
+	<xsl:value-of select="a" disable-output-escaping="yes"/>
+  </out3><xsl:text>&#10;</xsl:text>
+ </xml>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output76.xml b/test/tests/conf/output/output76.xml
new file mode 100644
index 0000000..5b0ac73
--- /dev/null
+++ b/test/tests/conf/output/output76.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha key="a">A</alpha>
+   <alpha key="b">B</alpha>
+   <alpha key="c">C</alpha>
+   <alpha key="d">D</alpha>
+   <alpha key="e">E</alpha>
+   <alpha key="f">F</alpha>
+   <alpha key="g">G</alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output76.xsl b/test/tests/conf/output/output76.xsl
new file mode 100644
index 0000000..c782909
--- /dev/null
+++ b/test/tests/conf/output/output76.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: output76 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 -->
+  <!-- Purpose: Test for text output with special characters.  -->
+
+<xsl:template match="/">
+     <xsl:for-each select="doc/alpha">
+         <xsl:value-of select="@key"/>@
+     </xsl:for-each>
+     <xsl:for-each select="doc/alpha">
+         <xsl:value-of select="."/>-
+     </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output77.xml b/test/tests/conf/output/output77.xml
new file mode 100644
index 0000000..acb837d
--- /dev/null
+++ b/test/tests/conf/output/output77.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output77.xsl b/test/tests/conf/output/output77.xsl
new file mode 100644
index 0000000..8165712
--- /dev/null
+++ b/test/tests/conf/output/output77.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output encoding="Big-Deal"/>
+
+  <!-- FileName: output77 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test of ficticous encoding. This is generating an Illegal 
+       argument exception, with other known encodings such as "ISO-8859-11" 
+       too -->
+
+<xsl:template match="/">
+  <out>
+    <test>Testing</test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output80.xml b/test/tests/conf/output/output80.xml
new file mode 100644
index 0000000..dcae8f0
--- /dev/null
+++ b/test/tests/conf/output/output80.xml
Binary files differ
diff --git a/test/tests/conf/output/output80.xsl b/test/tests/conf/output/output80.xsl
new file mode 100644
index 0000000..151d779
--- /dev/null
+++ b/test/tests/conf/output/output80.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output80 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method -->
+  <!-- Purpose: Test UTF-16 encoding. -->
+
+<xsl:output encoding="UTF-16"/>
+<xsl:template match="@*|node()">
+<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output81.xml b/test/tests/conf/output/output81.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/output/output81.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output81.xsl b/test/tests/conf/output/output81.xsl
new file mode 100644
index 0000000..b1e22ca
--- /dev/null
+++ b/test/tests/conf/output/output81.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output81 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.3 Creating Processing Instructions. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of leading underscore in names of Processing instructions. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:processing-instruction name="_a_pi">foo</xsl:processing-instruction>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output82.xml b/test/tests/conf/output/output82.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output82.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output82.xsl b/test/tests/conf/output/output82.xsl
new file mode 100644
index 0000000..7f4b639
--- /dev/null
+++ b/test/tests/conf/output/output82.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+  <!-- FileName: output82 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Creator: Ito Kazumitsu -->
+  <!-- Purpose: Generic test, verifies that DOCTYPE gets generated correctly,
+  	   and that the default namespace xml is in scope for LRE use. -->
+
+<xsl:output method="xml"
+            doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+            doctype-system="xhtml1-transitional.dtd"
+            indent="yes"
+            encoding="UTF-8"/>
+
+
+<xsl:template match='/'>
+  <html>
+    <xsl:attribute name="lang">ja</xsl:attribute>
+    <xsl:attribute name="xml:lang">ja</xsl:attribute>
+    <head><title>test</title></head><body>test</body>
+  </html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output84.xml b/test/tests/conf/output/output84.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output84.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output84.xsl b/test/tests/conf/output/output84.xsl
new file mode 100644
index 0000000..ff441b5
--- /dev/null
+++ b/test/tests/conf/output/output84.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output84 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check that xml:lang is properly emitted in XML output. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match='/'>
+  <out>
+    <xsl:attribute name="xml:lang">en-US</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output85.xml b/test/tests/conf/output/output85.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/output/output85.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output85.xsl b/test/tests/conf/output/output85.xsl
new file mode 100644
index 0000000..f336398
--- /dev/null
+++ b/test/tests/conf/output/output85.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output85 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check that xml:lang is properly copied from literal attribute. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match='/'>
+  <out xml:lang="en-US"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output86.xml b/test/tests/conf/output/output86.xml
new file mode 100644
index 0000000..87fce57
--- /dev/null
+++ b/test/tests/conf/output/output86.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <dat>two</dat>
+  <dat>222</dat>
+  <dat>&#xa9;2000</dat>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output86.xsl b/test/tests/conf/output/output86.xsl
new file mode 100644
index 0000000..310c4ce
--- /dev/null
+++ b/test/tests/conf/output/output86.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output86 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Text output of characters encoded between 128 and 255 -->
+
+<xsl:output method="text" encoding="ISO-8859-1"/>
+
+<xsl:template match="doc">
+  <xsl:apply-templates select="dat"/>
+</xsl:template>
+
+<xsl:template match="dat">
+  <xsl:text>&#255;</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output87.xml b/test/tests/conf/output/output87.xml
new file mode 100644
index 0000000..4ef40c1
--- /dev/null
+++ b/test/tests/conf/output/output87.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<doc>
+  <a>phoenix</a>
+  <b>phony</b>
+  <c>phonograph</c>
+  <d>philibuster</d>
+  <e>phrenology</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output87.xsl b/test/tests/conf/output/output87.xsl
new file mode 100644
index 0000000..eeb5f19
--- /dev/null
+++ b/test/tests/conf/output/output87.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output87 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16 -->
+  <!-- Discretionary: two-output-same-attribute="choose-last" -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check merging of multiple declarations of xsl:output. -->
+
+<xsl:output method="xml" encoding="US-ASCII" indent="no"
+    omit-xml-declaration="yes" cdata-section-elements="a b"/>
+<xsl:output method="xml" encoding="UTF-8"
+    omit-xml-declaration="no" cdata-section-elements="c d"/>
+
+<xsl:template match='/'>
+  <out>
+    <xsl:for-each select="doc/*">
+      <xsl:text>&#10;</xsl:text>
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output88.xml b/test/tests/conf/output/output88.xml
new file mode 100644
index 0000000..4ef40c1
--- /dev/null
+++ b/test/tests/conf/output/output88.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<doc>
+  <a>phoenix</a>
+  <b>phony</b>
+  <c>phonograph</c>
+  <d>philibuster</d>
+  <e>phrenology</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/output/output88.xsl b/test/tests/conf/output/output88.xsl
new file mode 100644
index 0000000..91c1007
--- /dev/null
+++ b/test/tests/conf/output/output88.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output88 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check effect of import precedence on merging of xsl:output. -->
+
+<xsl:import href="impo88.xsl"/>
+
+<xsl:output method="xml" encoding="UTF-8"
+    omit-xml-declaration="no" cdata-section-elements="c d"/>
+
+<xsl:template match='/'>
+  <out>
+    <xsl:copy-of select="doc"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output89.xml b/test/tests/conf/output/output89.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output89.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output89.xsl b/test/tests/conf/output/output89.xsl
new file mode 100644
index 0000000..7e6f501
--- /dev/null
+++ b/test/tests/conf/output/output89.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output89 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check recovery when requested comment string contains two hyphens together -->
+  <!-- Discretionary: comment-content-contains-delimiter="add-space" -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:comment>This cannot be inserted as--is.</xsl:comment>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output90.xml b/test/tests/conf/output/output90.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output90.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output90.xsl b/test/tests/conf/output/output90.xsl
new file mode 100644
index 0000000..efea61b
--- /dev/null
+++ b/test/tests/conf/output/output90.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: output90 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Check recovery when requested comment string ends with a hyphen -->
+  <!-- Discretionary: comment-content-contains-delimiter="add-space" -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:comment>This needs a space after-</xsl:comment>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output91.xml b/test/tests/conf/output/output91.xml
new file mode 100644
index 0000000..95f9afa
--- /dev/null
+++ b/test/tests/conf/output/output91.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<out>foo</out>
\ No newline at end of file
diff --git a/test/tests/conf/output/output91.xsl b/test/tests/conf/output/output91.xsl
new file mode 100644
index 0000000..fed59f3
--- /dev/null
+++ b/test/tests/conf/output/output91.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: OUTPUT91 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Test effect of cdata-section-elements on xsl:copy. -->
+
+<xsl:output method="xml" cdata-section-elements="out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output92.xml b/test/tests/conf/output/output92.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output92.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output92.xsl b/test/tests/conf/output/output92.xsl
new file mode 100644
index 0000000..b743d2c
--- /dev/null
+++ b/test/tests/conf/output/output92.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: OUTPUT92 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test effect of cdata-section-elements on xsl:element. -->
+
+<xsl:output method="xml" cdata-section-elements="example" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="example">Text that should be enclosed</xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output93.xml b/test/tests/conf/output/output93.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output93.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output93.xsl b/test/tests/conf/output/output93.xsl
new file mode 100644
index 0000000..7452598
--- /dev/null
+++ b/test/tests/conf/output/output93.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPUT93 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test effect of cdata-section-elements when text-node children are created by xsl:text. -->
+
+<xsl:output method="xml" cdata-section-elements="example" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <example><xsl:text>this is a section</xsl:text></example>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output94.xml b/test/tests/conf/output/output94.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output94.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output94.xsl b/test/tests/conf/output/output94.xsl
new file mode 100644
index 0000000..78c1306
--- /dev/null
+++ b/test/tests/conf/output/output94.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPUT94 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test effect of cdata-section-elements on multiple text-node children, created by xsl:text. -->
+
+<xsl:output method="xml" cdata-section-elements="example" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <example>
+      <xsl:text>this is a section</xsl:text>
+      <xsl:comment>Comment in between</xsl:comment>
+      <xsl:text>another section</xsl:text>
+    </example>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output95.xml b/test/tests/conf/output/output95.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output95.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output95.xsl b/test/tests/conf/output/output95.xsl
new file mode 100644
index 0000000..31be2aa
--- /dev/null
+++ b/test/tests/conf/output/output95.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPUT95 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test effect of cdata-section-elements when text-node children are created by xsl:value-of. -->
+
+<xsl:output method="xml" cdata-section-elements="example" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <example><xsl:value-of select="'should be wrapped'"/></example>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output96.xml b/test/tests/conf/output/output96.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output96.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output96.xsl b/test/tests/conf/output/output96.xsl
new file mode 100644
index 0000000..7ee0906
--- /dev/null
+++ b/test/tests/conf/output/output96.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPUT96 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 XML Output Method-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that cdata-section-elements applies to text-node children, not descendants. -->
+
+<xsl:output method="xml" cdata-section-elements="example" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <example>
+      <xsl:text>a section</xsl:text>
+      <sub>descendant text node</sub>
+      <xsl:text>one more section</xsl:text>
+    </example>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output97.xml b/test/tests/conf/output/output97.xml
new file mode 100644
index 0000000..0ca9260
--- /dev/null
+++ b/test/tests/conf/output/output97.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<out>a section<sub>descendant text node</sub>one more</out>
\ No newline at end of file
diff --git a/test/tests/conf/output/output97.xsl b/test/tests/conf/output/output97.xsl
new file mode 100644
index 0000000..ffd2248
--- /dev/null
+++ b/test/tests/conf/output/output97.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: OUTPUT97 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test effect of cdata-section-elements on xsl:copy, with descendants in tree. -->
+
+<xsl:output method="xml" cdata-section-elements="out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output98.xml b/test/tests/conf/output/output98.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output98.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output98.xsl b/test/tests/conf/output/output98.xsl
new file mode 100644
index 0000000..34b8a58
--- /dev/null
+++ b/test/tests/conf/output/output98.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:baz="http://baz.com">
+
+  <!-- FileName: OUTPUT98 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Test of QName for cdata-section-elements attribute of xsl:output. -->
+
+<xsl:output method="xml" cdata-section-elements="baz:out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <baz:out>foo</baz:out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/output99.xml b/test/tests/conf/output/output99.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/conf/output/output99.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/output/output99.xsl b/test/tests/conf/output/output99.xsl
new file mode 100644
index 0000000..90ff689
--- /dev/null
+++ b/test/tests/conf/output/output99.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:baz="http://baz.com">
+
+  <!-- FileName: OUTPUT99 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.1 -->
+  <!-- Creator: David Bertoni -->
+  <!-- Purpose: Show that namespaced LRE does not match unprefixed element in cdata-section-elements list. -->
+
+<xsl:output method="xml" cdata-section-elements="out" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <baz:out>should NOT be wrapped</baz:out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/output/wml_11.xml b/test/tests/conf/output/wml_11.xml
new file mode 100644
index 0000000..45f2c4e
--- /dev/null
+++ b/test/tests/conf/output/wml_11.xml
@@ -0,0 +1,299 @@
+<!--
+Wireless Markup Language (WML) Document Type Definition.
+WML is an XML language. Typical usage:
+<?xml version="1.0"?>
+<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
+"http://www.wapforum.org/DTD/wml_1.1.xml">
+<wml>
+...
+</wml>
+-->
+<!ENTITY % 	length 		"CDATA"> <!-- [0-9]+ for pixels or [0-9]+"%" for
+								percentage length -->
+<!ENTITY % 	vdata 		"CDATA"> <!-- attribute value possibly containing
+								variable references -->
+<!ENTITY % 	HREF 		"%vdata;"> <!-- URI, URL or URN designating a hypertext
+								node. May contain variable references -->
+<!ENTITY % 	boolean 	"(true|false)">
+<!ENTITY % 	number 		"NMTOKEN"> <!-- a number, with format [0-9]+ -->
+<!ENTITY % 	coreattrs 	"id ID #IMPLIED
+					  	class CDATA #IMPLIED">
+<!ENTITY % 	emph   		"em | strong | b | i | u | big | small">
+<!ENTITY % 	layout 		"br">
+<!ENTITY % 	text 		"#PCDATA | %emph;">
+
+<!-- flow covers "card-level" elements, such as text and images -->
+<!ENTITY % 	flow 		"%text; | %layout; | img | anchor | a | table">
+
+<!-- Task types -->
+<!ENTITY % 	task 		"go | prev | noop | refresh">
+
+<!-- Navigation and event elements -->
+<!ENTITY % 	navelmts 	"do | onevent">
+
+<!--================ Decks and Cards ================-->
+<!ELEMENT wml ( head?, template?, card+ )>
+<!ATTLIST wml
+xml:lang NMTOKEN #IMPLIED
+%coreattrs;
+>
+
+<!-- card intrinsic events -->
+<!ENTITY % cardev
+"onenterforward %HREF; 	#IMPLIED
+onenterbackward %HREF; 	#IMPLIED
+ontimer 		%HREF; 	#IMPLIED"
+>
+
+<!-- card field types -->
+<!ENTITY % fields "%flow; | input | select | fieldset">
+<!ELEMENT card (onevent*, timer?, (do | p)*)>
+<!ATTLIST card
+title 		%vdata; 	#IMPLIED
+newcontext 	%boolean; 	"false"
+ordered 	%boolean; 	"true"
+xml:lang 	NMTOKEN 	#IMPLIED
+%cardev;
+%coreattrs;
+>
+<!--================ Event Bindings ================-->
+<!ELEMENT do (%task;)>
+<!ATTLIST do
+type 		CDATA #REQUIRED
+label 		%vdata; 	#IMPLIED
+name 		NMTOKEN 	#IMPLIED
+optional 	%boolean; 	"false"
+xml:lang 	NMTOKEN		#IMPLIED
+%coreattrs;
+>
+
+<!ELEMENT onevent (%task;)>
+<!ATTLIST onevent
+type 		CDATA 		#REQUIRED
+%coreattrs;
+>
+
+<!--================ Deck-level declarations ================-->
+<!ELEMENT head ( access | meta )+>
+<!ATTLIST head
+%coreattrs;
+>
+
+<!ELEMENT template (%navelmts;)*>
+<!ATTLIST template
+%cardev;
+%coreattrs;
+>
+
+<!ELEMENT access EMPTY>
+<!ATTLIST access
+domain 		CDATA 		#IMPLIED
+path 		CDATA 		#IMPLIED
+%coreattrs;
+>
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+http-equiv 	CDATA 		#IMPLIED
+name 		CDATA 		#IMPLIED
+forua 		%boolean; 	#IMPLIED
+content 	CDATA 		#REQUIRED
+scheme 		CDATA 		#IMPLIED
+%coreattrs;
+>
+
+
+<!--================ Tasks ================-->
+<!ELEMENT go (postfield | setvar)*>
+<!ATTLIST go
+href 		%HREF; 		#REQUIRED
+sendreferer %boolean; 	"false"
+method (post|get) "get"
+accept-charset CDATA 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT prev (setvar)*>
+<!ATTLIST prev
+%coreattrs;
+>
+<!ELEMENT refresh (setvar)*>
+<!ATTLIST refresh
+%coreattrs;
+>
+<!ELEMENT noop EMPTY>
+<!ATTLIST noop
+%coreattrs;
+>
+
+<!--================ postfield ================-->
+<!ELEMENT postfield EMPTY>
+<!ATTLIST postfield
+name 		%vdata; 	#REQUIRED
+value 		%vdata; 	#REQUIRED
+%coreattrs;
+>
+
+<!--================ variables ================-->
+<!ELEMENT setvar EMPTY>
+<!ATTLIST setvar
+name 		%vdata; 	#REQUIRED
+value 		%vdata; 	#REQUIRED
+%coreattrs;
+>
+
+<!--================ Card Fields ================-->
+<!ELEMENT select (optgroup|option)+>
+<!ATTLIST select
+title 		%vdata; 	#IMPLIED
+name 		NMTOKEN 	#IMPLIED
+value	 	%vdata; 	#IMPLIED
+iname 		NMTOKEN 	#IMPLIED
+ivalue	 	%vdata; 	#IMPLIED
+multiple 	%boolean; 	"false"
+tabindex 	%number; 	#IMPLIED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT optgroup (optgroup|option)+ >
+<!ATTLIST optgroup
+title 		%vdata; 	#IMPLIED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT option (#PCDATA | onevent)*>
+<!ATTLIST option
+value 		%vdata; 	#IMPLIED
+title 		%vdata; 	#IMPLIED
+onpick 		%HREF; 		#IMPLIED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT input EMPTY>
+<!ATTLIST input
+name NMTOKEN #REQUIRED
+type (text|password) "text"
+value 		%vdata; 	#IMPLIED
+format 		CDATA 		#IMPLIED
+emptyok 	%boolean; 	"false"
+size 		%number; 	#IMPLIED
+maxlength 	%number; 	#IMPLIED
+tabindex 	%number; 	#IMPLIED
+title 		%vdata; 	#IMPLIED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT fieldset (%fields; | do)* >
+<!ATTLIST fieldset
+title 		%vdata; 	#IMPLIED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT timer EMPTY>
+<!ATTLIST timer
+name 		NMTOKEN 	#IMPLIED
+value 		%vdata; 	#REQUIRED
+%coreattrs;
+>
+<!--================ Images ================-->
+<!ENTITY % IAlign "(top|middle|bottom)" >
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+alt 		%vdata; 	#REQUIRED
+src 		%HREF; 		#REQUIRED
+localsrc 	%vdata; 	#IMPLIED
+vspace 		%length; 	"0"
+hspace 		%length; 	"0"
+align 		%IAlign; 	"bottom"
+height 		%length; 	#IMPLIED
+width 		%length; 	#IMPLIED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!--================ Anchor ================-->
+<!ELEMENT anchor ( #PCDATA | br | img | go | prev | refresh )*>
+<!ATTLIST anchor
+title 		%vdata; 	#IMPLIED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT a ( #PCDATA | br | img )*>
+<!ATTLIST a
+href 		%HREF; 		#REQUIRED
+title 		%vdata; 	#IMPLIED
+xml:lang	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!--================ Tables ================-->
+<!ELEMENT table (tr)+>
+<!ATTLIST table
+title 		%vdata; 	#IMPLIED
+align 		CDATA 		#IMPLIED
+columns 	%number; 	#REQUIRED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT tr (td)+>
+<!ATTLIST tr
+%coreattrs;
+>
+<!ELEMENT td ( %text; | %layout; | img | anchor | a )*>
+<!ATTLIST td
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!--================ Text layout and line breaks ================-->
+<!ELEMENT em (%flow;)*>
+<!ATTLIST em
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT strong (%flow;)*>
+<!ATTLIST strong
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT b (%flow;)*>
+<!ATTLIST b
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT i (%flow;)*>
+<!ATTLIST i
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT u (%flow;)*>
+<!ATTLIST u
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT big (%flow;)*>
+<!ATTLIST big
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT small (%flow;)*>
+<!ATTLIST small
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ENTITY % TAlign "(left|right|center)">
+<!ENTITY % WrapMode "(wrap|nowrap)" >
+<!ELEMENT p (%fields; | do)*>
+<!ATTLIST p
+align 		%TAlign; 	"left"
+mode 		%WrapMode; 	#IMPLIED
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ELEMENT br EMPTY>
+<!ATTLIST br
+xml:lang 	NMTOKEN 	#IMPLIED
+%coreattrs;
+>
+<!ENTITY quot 	"&#34;"> 		<!-- quotation mark -->
+<!ENTITY amp 	"&#38;#38;"> 	<!-- ampersand -->
+<!ENTITY apos 	"&#39;"> 		<!-- apostrophe -->
+<!ENTITY lt 	"&#38;#60;"> 	<!-- less than -->
+<!ENTITY gt 	"&#62;"> 		<!-- greater than -->
+<!ENTITY nbsp 	"&#160;"> 		<!-- non-breaking space -->
+<!ENTITY shy 	"&#173;"> 		<!-- soft hyphen (discretionary hyphen) -->
\ No newline at end of file
diff --git a/test/tests/conf/output/xhtml1-transitional.dtd b/test/tests/conf/output/xhtml1-transitional.dtd
new file mode 100644
index 0000000..15141a5
--- /dev/null
+++ b/test/tests/conf/output/xhtml1-transitional.dtd
@@ -0,0 +1,313 @@
+<!--
+   Extensible HTML version 1.0 Transitional DTD
+
+   This is the same as HTML 4.0 Transitional except for
+   changes due to the differences between XML and SGML.
+
+   Namespace = http://www.w3.org/1999/xhtml
+
+   For further information, see: http://www.w3.org/TR/xhtml1
+
+   Copyright (c) 1998-2000 W3C (MIT, INRIA, Keio),
+   All Rights Reserved. 
+
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+
+   $Revision$
+   $Date$
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+   "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+   "-//W3C//ENTITIES Symbols for XHTML//EN"
+   "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+   "-//W3C//ENTITIES Special for XHTML//EN"
+   "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+    <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+    <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+    <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+    <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+    <!-- a language code, as per [RFC1766] -->
+
+<!ENTITY % Character "CDATA">
+    <!-- a single character from [ISO10646] -->
+
+<!ENTITY % Number "CDATA">
+    <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+    <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+    <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+    <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+    <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+    <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+    <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+    <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+    <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+    <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+    <!-- pixel, percentage, or relative -->
+
+<!ENTITY % MultiLengths "CDATA">
+    <!-- comma-separated list of MultiLength -->
+
+<!ENTITY % Pixels "CDATA">
+    <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+    <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+    Black  = #000000    Green  = #008000
+    Silver = #C0C0C0    Lime   = #00FF00
+    Gray   = #808080    Olive  = #808000
+    White  = #FFFFFF    Yellow = #FFFF00
+    Maroon = #800000    Navy   = #000080
+    Red    = #FF0000    Blue   = #0000FF
+    Purple = #800080    Teal   = #008080
+    Fuchsia= #FF00FF    Aqua   = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+  id       document-wide unique id
+  class    space separated list of classes
+  style    associated style info
+  title    advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED"
+  >
+
+<!-- internationalization attributes
+  lang        language code (backwards compatible)
+  xml:lang    language code (as per XML 1.0 spec)
+  dir         direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #IMPLIED"
+  >
+
+<!-- attributes for common UI events
+  onclick     a pointer button was clicked
+  ondblclick  a pointer button was double clicked
+  onmousedown a pointer button was pressed down
+  onmouseup   a pointer button was released
+  onmousemove a pointer was moved onto the element
+  onmouseout  a pointer was moved away from the element
+  onkeypress  a key was pressed and released
+  onkeydown   a key was pressed down
+  onkeyup     a key was released
+-->
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED
+  ondblclick  %Script;       #IMPLIED
+  onmousedown %Script;       #IMPLIED
+  onmouseup   %Script;       #IMPLIED
+  onmouseover %Script;       #IMPLIED
+  onmousemove %Script;       #IMPLIED
+  onmouseout  %Script;       #IMPLIED
+  onkeypress  %Script;       #IMPLIED
+  onkeydown   %Script;       #IMPLIED
+  onkeyup     %Script;       #IMPLIED"
+  >
+
+<!-- attributes for elements that can get the focus
+  accesskey   accessibility key character
+  tabindex    position in tabbing order
+  onfocus     the element got the focus
+  onblur      the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey   %Character;    #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+     align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special
+   "br | span | bdo | object | applet | img | map | iframe">
+
+<!ENTITY % fontstyle "tt | i | b | big | small | u
+                      | s | strike |font | basefont">
+
+<!ENTITY % phrase "em | strong | dfn | code | q | sub | sup |
+                   samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc "ins | del | script | noscript">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
+
+<!ENTITY % block
+    "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes Block and Inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+     sub, sup, font, or basefont -->
+
+<!ENTITY % pre.content
+   "(#PCDATA | a | br | span | bdo | map | tt | i | b | u | s |
+      %phrase; | %inline.forms;)*">
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+      table | br | span | bdo | object | applet | img | map |
+      %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+  %i18n;
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
+  >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+     title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+     ((title, %head.misc;, (base, %head.misc;)?) |
+      (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+  %i18n;
+  profile     %URI;          #IMPLIED
+  >
+
+<!-- The title element is not considered part of the flow of text.
+       It should be displayed, for example as the page header or
+       window title. Exactly one title is required per document.
+    -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title %i18n;>
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+  href        %URI;          #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+  %i18n;
+  http-equiv  CDATA          #IMPLIED
+  name        CDATA          #IMPLIED
+  content     CDATA          #REQUIRED
+  scheme      CDATA          #IMPLIED
+  >
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the link element in d
\ No newline at end of file
diff --git a/test/tests/conf/position/pos102imp.xsl b/test/tests/conf/position/pos102imp.xsl
new file mode 100644
index 0000000..28ad07c
--- /dev/null
+++ b/test/tests/conf/position/pos102imp.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: pos102imp -->
+  <!-- Purpose: To be imported by position102. -->
+
+<xsl:template match="b">
+  <xsl:text>
+</xsl:text>
+  <direct>
+    <xsl:text>Item </xsl:text>
+    <xsl:value-of select="@mark"/>
+    <xsl:text> is in position </xsl:text>
+    <xsl:value-of select="position()"/>
+  </direct>
+</xsl:template>
+
+<xsl:template match="c">
+  <xsl:text>
+</xsl:text>
+  <apply level="import">
+    <xsl:text>Item </xsl:text>
+    <xsl:value-of select="@mark"/>
+    <xsl:text> is in position </xsl:text>
+    <xsl:value-of select="position()"/>
+  </apply>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position01.xml b/test/tests/conf/position/position01.xml
new file mode 100644
index 0000000..879358e
--- /dev/null
+++ b/test/tests/conf/position/position01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position01.xsl b/test/tests/conf/position/position01.xsl
new file mode 100644
index 0000000..7053543
--- /dev/null
+++ b/test/tests/conf/position/position01.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function in value-of select. Look for 1. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="position()=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position02.xml b/test/tests/conf/position/position02.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position02.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position02.xsl b/test/tests/conf/position/position02.xsl
new file mode 100644
index 0000000..2779bc1
--- /dev/null
+++ b/test/tests/conf/position/position02.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function in predicate on wildcard. Look for last item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[position()=4]"/>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position03.xml b/test/tests/conf/position/position03.xml
new file mode 100644
index 0000000..9430b55
--- /dev/null
+++ b/test/tests/conf/position/position03.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="true"><num>1</num></a>
+  <a><num>1191</num></a>
+  <a><num>263</num></a>
+  <a test="true"><num>2</num></a>
+  <a><num>827</num></a>
+  <a><num>256</num></a>
+  <a test="true"><num>3</num></a>
+  <a test="true"><num>4</num></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position03.xsl b/test/tests/conf/position/position03.xsl
new file mode 100644
index 0000000..9183514
--- /dev/null
+++ b/test/tests/conf/position/position03.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function anded with attribute test. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test and position()=8]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position04.xml b/test/tests/conf/position/position04.xml
new file mode 100644
index 0000000..9430b55
--- /dev/null
+++ b/test/tests/conf/position/position04.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="true"><num>1</num></a>
+  <a><num>1191</num></a>
+  <a><num>263</num></a>
+  <a test="true"><num>2</num></a>
+  <a><num>827</num></a>
+  <a><num>256</num></a>
+  <a test="true"><num>3</num></a>
+  <a test="true"><num>4</num></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position04.xsl b/test/tests/conf/position/position04.xsl
new file mode 100644
index 0000000..4c1570e
--- /dev/null
+++ b/test/tests/conf/position/position04.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() in 2nd predicate. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test][position()=4]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position05.xml b/test/tests/conf/position/position05.xml
new file mode 100644
index 0000000..134bb8e
--- /dev/null
+++ b/test/tests/conf/position/position05.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="true"><num>1</num></a>
+  <a><num>5</num></a>
+  <a test="false"><num>5</num></a>
+  <a test="true"><num>2</num></a>
+  <a><num>5</num></a>
+  <a test="false"><num>7</num></a>
+  <a test="true"><num>3</num></a>
+  <a test="true"><num>4</num></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position05.xsl b/test/tests/conf/position/position05.xsl
new file mode 100644
index 0000000..3d08a40
--- /dev/null
+++ b/test/tests/conf/position/position05.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() predicate on node-set from key(). Look for item 4. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+<xsl:key name="k2" match="a" use="num"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','true')[position()=4]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position06.xml b/test/tests/conf/position/position06.xml
new file mode 100644
index 0000000..7af3b9e
--- /dev/null
+++ b/test/tests/conf/position/position06.xml
@@ -0,0 +1,10 @@
+<doc>
+  <a test="true"><num>1</num></a>
+  <a><num>5</num></a>
+  <a test="false"><num>5</num></a>
+  <a test="true"><num>2</num></a>
+  <a><num>5</num></a>
+  <a test="false"><num>5</num></a>
+  <a test="true"><num>3</num></a>
+  <a test="true"><num>4</num></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position06.xsl b/test/tests/conf/position/position06.xsl
new file mode 100644
index 0000000..384645b
--- /dev/null
+++ b/test/tests/conf/position/position06.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of count() on wildcard. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(*)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position07.xml b/test/tests/conf/position/position07.xml
new file mode 100644
index 0000000..73dc8b2
--- /dev/null
+++ b/test/tests/conf/position/position07.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position07.xsl b/test/tests/conf/position/position07.xsl
new file mode 100644
index 0000000..47564b6
--- /dev/null
+++ b/test/tests/conf/position/position07.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() in predicate, all spelled out. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[last()=position()]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position08.xml b/test/tests/conf/position/position08.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position08.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position08.xsl b/test/tests/conf/position/position08.xsl
new file mode 100644
index 0000000..d51daa2
--- /dev/null
+++ b/test/tests/conf/position/position08.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() in match pattern. Used in predicate of name.
+     Look for 1, last, others. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a[position()=4]">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="a[position()=3]">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="a[position()=2]">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="a[position()=1]">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position09.xml b/test/tests/conf/position/position09.xml
new file mode 100644
index 0000000..6316ca1
--- /dev/null
+++ b/test/tests/conf/position/position09.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>
+    <a><num val="1"/></a>
+    <a><num val="2"/></a>
+    <a><num val="3"/></a>
+  </foo>
+  <foo>
+    <a><num val="4"/></a>
+    <a><num val="5"/></a>
+    <a><num val="6"/></a>
+  </foo>
+  <foo>
+    <a><num val="7"/></a>
+    <a><num val="8"/></a>
+    <a><num val="9"/></a>
+  </foo>
+  <baz>
+    <a><num val="10"/></a>
+    <a><num val="11"/></a>
+    <a><num val="12"/></a>
+  </baz>
+</doc>
diff --git a/test/tests/conf/position/position09.xsl b/test/tests/conf/position/position09.xsl
new file mode 100644
index 0000000..b06d102
--- /dev/null
+++ b/test/tests/conf/position/position09.xsl
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position in match pattern predicates, both long and short versions. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo[3]/a[position()=3]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[3]/a[position()=2]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[3]/a[position()=1]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[2]/a[position()=3]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[2]/a[position()=2]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[2]/a[position()=1]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[1]/a[position()=3]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[1]/a[position()=2]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="foo[1]/a[position()=1]/num/@val">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+<xsl:template match="a/num">
+  <xsl:apply-templates select="@val"/>
+</xsl:template>
+
+<!-- Override default template matching, otherwise the values 10, 11, 12 will be displayed -->
+
+<xsl:template match="@val" priority="-1"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position10.xml b/test/tests/conf/position/position10.xml
new file mode 100644
index 0000000..21570aa
--- /dev/null
+++ b/test/tests/conf/position/position10.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>
+    <a><num val="6"/></a>
+    <a><num val="2"/></a>
+    <a><num val="4"/></a>
+  </foo>
+  <foo>
+    <a><num val="3"/></a>
+    <a><num val="1"/></a>
+    <a><num val="5"/></a>
+  </foo>
+</doc>
diff --git a/test/tests/conf/position/position10.xsl b/test/tests/conf/position/position10.xsl
new file mode 100644
index 0000000..d02c2ac
--- /dev/null
+++ b/test/tests/conf/position/position10.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function and sorting. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="foo/a/num/@val">
+      <xsl:value-of select="position()"/>_<xsl:value-of select="."/>
+      <xsl:text> </xsl:text>
+    </xsl:for-each>
+  Now, sort the data...    
+    <xsl:for-each select="foo/a/num/@val">
+      <xsl:sort select="."/>
+      <xsl:value-of select="position()"/>_<xsl:value-of select="."/>
+      <xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position100.xml b/test/tests/conf/position/position100.xml
new file mode 100644
index 0000000..248dbfb
--- /dev/null
+++ b/test/tests/conf/position/position100.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3"> Still Level-4
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/position/position100.xsl b/test/tests/conf/position/position100.xsl
new file mode 100644
index 0000000..de8f6dc
--- /dev/null
+++ b/test/tests/conf/position/position100.xsl
@@ -0,0 +1,67 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position100 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test count() starting on a text node and going upward. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center/text()[1]">
+      <xsl:value-of select="count(ancestor-or-self::node())"/><xsl:text> nodes on this axis:
+</xsl:text>
+      <xsl:apply-templates select="ancestor-or-self::node()" mode="census"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="/" mode="census">
+  <xsl:text>Root Node
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="*" mode="census">
+  <xsl:text>E: </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="@*" mode="census">
+  <xsl:text>A: </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()" mode="census">
+  <xsl:text>T: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()" mode="census">
+  <xsl:text>ERROR! </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position101.xml b/test/tests/conf/position/position101.xml
new file mode 100644
index 0000000..e7da3ef
--- /dev/null
+++ b/test/tests/conf/position/position101.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	  <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+	  <!-- Comment-4 --> Level-4
+          <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+          <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+            <south attr1="First" attr2="Last">
+                 <far-south/>
+            </south>
+          </near-south>
+          <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/position/position101.xsl b/test/tests/conf/position/position101.xsl
new file mode 100644
index 0000000..1069e6c
--- /dev/null
+++ b/test/tests/conf/position/position101.xsl
@@ -0,0 +1,67 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position101 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test count() starting on a comment and going upward. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center/comment()[1]">
+      <xsl:value-of select="count(ancestor-or-self::node())"/><xsl:text> nodes on this axis:
+</xsl:text>
+      <xsl:apply-templates select="ancestor-or-self::node()" mode="census"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="/" mode="census">
+  <xsl:text>Root Node
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="*" mode="census">
+  <xsl:text>E: </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="@*" mode="census">
+  <xsl:text>A: </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="comment()" mode="census">
+  <xsl:text>C: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()" mode="census">
+  <xsl:text>ERROR! </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position102.xml b/test/tests/conf/position/position102.xml
new file mode 100644
index 0000000..0de04cd
--- /dev/null
+++ b/test/tests/conf/position/position102.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+  <a mark="a1"/>
+  <b mark="b1"/>
+  <c mark="c1"/>
+  <c mark="c2"/>
+  <a mark="a2"/>
+  <a mark="a3"/>
+  <b mark="b2"/>
+  <c mark="c3"/>
+  <b mark="b3"/>
+</doc>
diff --git a/test/tests/conf/position/position102.xsl b/test/tests/conf/position/position102.xsl
new file mode 100644
index 0000000..a421243
--- /dev/null
+++ b/test/tests/conf/position/position102.xsl
@@ -0,0 +1,65 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position102 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 -->
+  <!-- Creator: David Marston, from an idea by Kai Ojansuu -->
+  <!-- Purpose: Test position() when template is imported. -->
+
+<xsl:import href="pos102imp.xsl"/>
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="a"/>
+    <xsl:apply-templates select="b"/>
+    <xsl:apply-templates select="c"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>
+</xsl:text>
+  <local>
+    <xsl:text>Item </xsl:text>
+    <xsl:value-of select="@mark"/>
+    <xsl:text> is in position </xsl:text>
+    <xsl:value-of select="position()"/>
+  </local>
+</xsl:template>
+
+<xsl:template match="c">
+  <xsl:text>
+</xsl:text>
+  <apply level="main">
+    <xsl:text>Item </xsl:text>
+    <xsl:value-of select="@mark"/>
+    <xsl:text> is in position </xsl:text>
+    <xsl:value-of select="position()"/>
+  </apply>
+  <xsl:apply-imports/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position103.xml b/test/tests/conf/position/position103.xml
new file mode 100644
index 0000000..5ecb67e
--- /dev/null
+++ b/test/tests/conf/position/position103.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position103.xsl b/test/tests/conf/position/position103.xsl
new file mode 100644
index 0000000..34a977c
--- /dev/null
+++ b/test/tests/conf/position/position103.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position103 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Igor Hersht -->
+  <!-- Purpose: Ensure that last() takes on new value when context changes -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="item[last()-1]"/>
+    <xsl:text>, </xsl:text>
+    <xsl:apply-templates select="item[last()]"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="item">
+  <xsl:value-of select="last()"/><!-- should be 1 -->
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position104.xml b/test/tests/conf/position/position104.xml
new file mode 100644
index 0000000..7ec7722
--- /dev/null
+++ b/test/tests/conf/position/position104.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position104.xsl b/test/tests/conf/position/position104.xsl
new file mode 100644
index 0000000..be72021
--- /dev/null
+++ b/test/tests/conf/position/position104.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position104 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Igor Hersht -->
+  <!-- Purpose: Try double positional predicates to ensure they at least raise no error -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="item[last()][last()]"/>
+    <xsl:text>, </xsl:text>
+    <xsl:apply-templates select="item[1][last()]"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="item">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position105.xml b/test/tests/conf/position/position105.xml
new file mode 100644
index 0000000..6bd7862
--- /dev/null
+++ b/test/tests/conf/position/position105.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc> 
+  <item>XSLT</item> 
+  <item>processors</item> 
+  <item>must</item> 
+  <item>use</item> 
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position105.xsl b/test/tests/conf/position/position105.xsl
new file mode 100644
index 0000000..05f0ea2
--- /dev/null
+++ b/test/tests/conf/position/position105.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position105 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Ilene Seelemann -->
+  <!-- Purpose: Test last() in a numeric expression and double predicate. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">  
+  <out>
+    <xsl:apply-templates select="item[last()-1][1]"/> 
+    <xsl:text>, </xsl:text>
+    <xsl:apply-templates select="item[last()-1][last()]"/> 
+  </out> 
+</xsl:template>
+
+<xsl:template match="item">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position106.xml b/test/tests/conf/position/position106.xml
new file mode 100644
index 0000000..d6c716d
--- /dev/null
+++ b/test/tests/conf/position/position106.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/position/position106.xsl b/test/tests/conf/position/position106.xsl
new file mode 100644
index 0000000..f6aabe2
--- /dev/null
+++ b/test/tests/conf/position/position106.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position106 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for last() on 'ancestor-or-self::' axis. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:if test="generate-id(ancestor-or-self::node()[last()])=generate-id(/)">Success</xsl:if>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position107.xml b/test/tests/conf/position/position107.xml
new file mode 100644
index 0000000..38c0859
--- /dev/null
+++ b/test/tests/conf/position/position107.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <north-west1/>
+  <north-west2/>
+  <north/>
+  <north-east1/>
+  <north-east2/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position107.xsl b/test/tests/conf/position/position107.xsl
new file mode 100644
index 0000000..4d9990e
--- /dev/null
+++ b/test/tests/conf/position/position107.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position107 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for last() on 'preceding-sibling::' axis. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="/doc/north"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="north">
+  <xsl:text>last preceding: </xsl:text>
+  <xsl:value-of select="name(preceding-sibling::*[last()])"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position108.xml b/test/tests/conf/position/position108.xml
new file mode 100644
index 0000000..38c0859
--- /dev/null
+++ b/test/tests/conf/position/position108.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <north-west1/>
+  <north-west2/>
+  <north/>
+  <north-east1/>
+  <north-east2/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position108.xsl b/test/tests/conf/position/position108.xsl
new file mode 100644
index 0000000..a8afd5a
--- /dev/null
+++ b/test/tests/conf/position/position108.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position108 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for last() on 'following-sibling::' axis. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="/doc/north"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="north">
+  <xsl:text>last following: </xsl:text>
+  <xsl:value-of select="name(following-sibling::*[last()])"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position109.xml b/test/tests/conf/position/position109.xml
new file mode 100644
index 0000000..52d4057
--- /dev/null
+++ b/test/tests/conf/position/position109.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<far-north>
+ <north-west1/>
+ <north-west2/>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+ <north-east1/>
+ <north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/position/position109.xsl b/test/tests/conf/position/position109.xsl
new file mode 100644
index 0000000..7b5e4b7
--- /dev/null
+++ b/test/tests/conf/position/position109.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position109 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for last() on 'preceding::' axis. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:value-of select="name(preceding::*[last()])"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position11.xml b/test/tests/conf/position/position11.xml
new file mode 100644
index 0000000..151d9e1
--- /dev/null
+++ b/test/tests/conf/position/position11.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>d</letter>
+  <letter>e</letter>
+  <letter>f</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/position/position11.xsl b/test/tests/conf/position/position11.xsl
new file mode 100644
index 0000000..1b5a30b
--- /dev/null
+++ b/test/tests/conf/position/position11.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() and last() in xsl:if test. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates select="letter"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter">
+  <xsl:value-of select="normalize-space(text())"/>
+  <xsl:if test="not(position()=last())">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position110.xml b/test/tests/conf/position/position110.xml
new file mode 100644
index 0000000..52d4057
--- /dev/null
+++ b/test/tests/conf/position/position110.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<far-north>
+ <north-west1/>
+ <north-west2/>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center>
+    <near-south>
+     <south>
+      <far-south/>
+     </south>
+    </near-south>
+   </center>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+ <north-east1/>
+ <north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/position/position110.xsl b/test/tests/conf/position/position110.xsl
new file mode 100644
index 0000000..a3c1f0c
--- /dev/null
+++ b/test/tests/conf/position/position110.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position101 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for last() on 'following::' axis. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:value-of select="name(following::*[last()])"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position111.xml b/test/tests/conf/position/position111.xml
new file mode 100644
index 0000000..31f449f
--- /dev/null
+++ b/test/tests/conf/position/position111.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Doc bar:foo1="attr1" xmlns:bar="http://example.org/bar" bar:foo2="attr2"
+     xmlns:foo="http://example.org/foo"/>
\ No newline at end of file
diff --git a/test/tests/conf/position/position111.xsl b/test/tests/conf/position/position111.xsl
new file mode 100644
index 0000000..f584940
--- /dev/null
+++ b/test/tests/conf/position/position111.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position111 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5 -->
+  <!-- Creator: David Bertoni, amended by David Marston -->
+  <!-- Purpose: Data Model requires that namespace nodes precede attribute nodes. -->
+
+<xsl:output encoding="UTF-8" method="xml" indent="no"/>
+
+<xsl:template match="Doc">
+  <out>
+    <xsl:for-each select="namespace::* | attribute::*" >
+      <xsl:choose>
+        <xsl:when test="contains(.,'http')">
+          <!-- it's a namespace node -->
+          <xsl:if test="position() &lt;= 3">
+            <xsl:text> OK</xsl:text>
+          </xsl:if>
+        </xsl:when>
+        <xsl:when test="contains(.,'attr')">
+          <!-- it's an attribute node -->
+          <xsl:if test="position() &gt; 3">
+            <xsl:text> OK</xsl:text>
+          </xsl:if>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>&#10;BAD VALUE: </xsl:text><xsl:value-of select="."/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position112.xml b/test/tests/conf/position/position112.xml
new file mode 100644
index 0000000..92fb1a8
--- /dev/null
+++ b/test/tests/conf/position/position112.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/position/position112.xsl b/test/tests/conf/position/position112.xsl
new file mode 100644
index 0000000..1d5c153
--- /dev/null
+++ b/test/tests/conf/position/position112.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position112 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston, from an idea by Dimitry Voytenko -->
+  <!-- Purpose: Test last() in double predicate. Second predicate does nothing, but can fool optimizations. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">  
+  <out>
+    <xsl:for-each select="//center/*[position() != last()][true()]">
+      <xsl:value-of select="name()"/>
+      <xsl:text>, </xsl:text>
+    </xsl:for-each> 
+  </out> 
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position113.xml b/test/tests/conf/position/position113.xml
new file mode 100644
index 0000000..92fb1a8
--- /dev/null
+++ b/test/tests/conf/position/position113.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/position/position113.xsl b/test/tests/conf/position/position113.xsl
new file mode 100644
index 0000000..f2ec33b
--- /dev/null
+++ b/test/tests/conf/position/position113.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position113 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston, from an idea by Dimitry Voytenko -->
+  <!-- Purpose: Test last() in double predicate on a reverse axis.
+        Second predicate does nothing, but can fool optimizations. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">  
+  <out>
+    <xsl:for-each select="//center/ancestor::*[position() != last()][true()]">
+      <xsl:value-of select="name()"/>
+      <xsl:text>, </xsl:text>
+    </xsl:for-each> 
+  </out> 
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position12.xml b/test/tests/conf/position/position12.xml
new file mode 100644
index 0000000..647b543
--- /dev/null
+++ b/test/tests/conf/position/position12.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <p/>
+  <p/>
+  <p/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position12.xsl b/test/tests/conf/position/position12.xsl
new file mode 100644
index 0000000..3ad30ed
--- /dev/null
+++ b/test/tests/conf/position/position12.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function in value-of select. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="p"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:value-of select="position()=2"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position13.xml b/test/tests/conf/position/position13.xml
new file mode 100644
index 0000000..2fb5e88
--- /dev/null
+++ b/test/tests/conf/position/position13.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <p/>
+  <p/>
+  <p/>
+</doc>
diff --git a/test/tests/conf/position/position13.xsl b/test/tests/conf/position/position13.xsl
new file mode 100644
index 0000000..b1b45e0
--- /dev/null
+++ b/test/tests/conf/position/position13.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() function in value-of select. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="p"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:value-of select="last()=3"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position14.xml b/test/tests/conf/position/position14.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/position/position14.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position14.xsl b/test/tests/conf/position/position14.xsl
new file mode 100644
index 0000000..d91773f
--- /dev/null
+++ b/test/tests/conf/position/position14.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() function in a numeric equality. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="last()=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position15.xml b/test/tests/conf/position/position15.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position15.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position15.xsl b/test/tests/conf/position/position15.xsl
new file mode 100644
index 0000000..4113624
--- /dev/null
+++ b/test/tests/conf/position/position15.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function in predicate. Look for last item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[position()=4]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position16.xml b/test/tests/conf/position/position16.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position16.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position16.xsl b/test/tests/conf/position/position16.xsl
new file mode 100644
index 0000000..3ed7510
--- /dev/null
+++ b/test/tests/conf/position/position16.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function in a predicate. Look for item 3. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[position()=3]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position17.xml b/test/tests/conf/position/position17.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position17.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position17.xsl b/test/tests/conf/position/position17.xsl
new file mode 100644
index 0000000..91a3ebf
--- /dev/null
+++ b/test/tests/conf/position/position17.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function in a predicate. Look for first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[position()=1]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position18.xml b/test/tests/conf/position/position18.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position18.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position18.xsl b/test/tests/conf/position/position18.xsl
new file mode 100644
index 0000000..89dde7b
--- /dev/null
+++ b/test/tests/conf/position/position18.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() function and a variable in a predicate. -->
+
+<xsl:variable name="first" select="1"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[position()=$first]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position19.xml b/test/tests/conf/position/position19.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position19.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position19.xsl b/test/tests/conf/position/position19.xsl
new file mode 100644
index 0000000..158a650
--- /dev/null
+++ b/test/tests/conf/position/position19.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of positional indexing (shorthand) in select. Look for last item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[4]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position20.xml b/test/tests/conf/position/position20.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position20.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position20.xsl b/test/tests/conf/position/position20.xsl
new file mode 100644
index 0000000..cc37a3c
--- /dev/null
+++ b/test/tests/conf/position/position20.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of shorthand positional indexing. Look for middle item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[3]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position21.xml b/test/tests/conf/position/position21.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position21.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position21.xsl b/test/tests/conf/position/position21.xsl
new file mode 100644
index 0000000..acec886
--- /dev/null
+++ b/test/tests/conf/position/position21.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of shorthand positional indexing. Look for first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[1]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position22.xml b/test/tests/conf/position/position22.xml
new file mode 100644
index 0000000..dfc568a
--- /dev/null
+++ b/test/tests/conf/position/position22.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>A<a>1</a>B<a>2</a>C<a>3</a>D<a>4</a>E</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position22.xsl b/test/tests/conf/position/position22.xsl
new file mode 100644
index 0000000..eeed4bd
--- /dev/null
+++ b/test/tests/conf/position/position22.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of positional indexing on the text() nodes. Look for first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="text()[1]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position23.xml b/test/tests/conf/position/position23.xml
new file mode 100644
index 0000000..dfc568a
--- /dev/null
+++ b/test/tests/conf/position/position23.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>A<a>1</a>B<a>2</a>C<a>3</a>D<a>4</a>E</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position23.xsl b/test/tests/conf/position/position23.xsl
new file mode 100644
index 0000000..b71a1e6
--- /dev/null
+++ b/test/tests/conf/position/position23.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position23 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of positional indexing on the text() nodes. Look for middle item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="text()[3]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position24.xml b/test/tests/conf/position/position24.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position24.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position24.xsl b/test/tests/conf/position/position24.xsl
new file mode 100644
index 0000000..07ce0f8
--- /dev/null
+++ b/test/tests/conf/position/position24.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() function with current context position. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="*">
+      <xsl:value-of select="last()=4"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position25.xml b/test/tests/conf/position/position25.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position25.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position25.xsl b/test/tests/conf/position/position25.xsl
new file mode 100644
index 0000000..0780181
--- /dev/null
+++ b/test/tests/conf/position/position25.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position25 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function in predicate of wildcard. Look for middle item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[position()=3]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position26.xml b/test/tests/conf/position/position26.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position26.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position26.xsl b/test/tests/conf/position/position26.xsl
new file mode 100644
index 0000000..47f8f3d
--- /dev/null
+++ b/test/tests/conf/position/position26.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position26 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() function on predicate of wildcard. Look for first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[position()=1]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position27.xml b/test/tests/conf/position/position27.xml
new file mode 100644
index 0000000..683deeb
--- /dev/null
+++ b/test/tests/conf/position/position27.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>d</letter>
+  <letter>e</letter>
+  <letter>f</letter>
+  <letter>g</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conf/position/position27.xsl b/test/tests/conf/position/position27.xsl
new file mode 100644
index 0000000..3608089
--- /dev/null
+++ b/test/tests/conf/position/position27.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position27 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of positional capabilities with choose. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates select="letter"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="letter">
+  <xsl:choose>
+    <xsl:when test="position()=1">
+      <xsl:text>First: </xsl:text><xsl:value-of select="."/><xsl:text>+</xsl:text>
+    </xsl:when>
+    <xsl:when test="position()=last()">
+      <xsl:text>+Last: </xsl:text><xsl:value-of select="."/>
+    </xsl:when>
+    <xsl:when test="position()=ceiling(last() div 2)">
+      <xsl:text>-Middle: </xsl:text><xsl:value-of select="."/><xsl:text>-</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="."/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position28.xml b/test/tests/conf/position/position28.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position28.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position28.xsl b/test/tests/conf/position/position28.xsl
new file mode 100644
index 0000000..edd2a23
--- /dev/null
+++ b/test/tests/conf/position/position28.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position28 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of shorthand positional indexing with wildcard. Look for last item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[4]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position29.xml b/test/tests/conf/position/position29.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position29.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position29.xsl b/test/tests/conf/position/position29.xsl
new file mode 100644
index 0000000..57612e6
--- /dev/null
+++ b/test/tests/conf/position/position29.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position29 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of positional indexing with wildcard. Look for middle item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[3]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position30.xml b/test/tests/conf/position/position30.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position30.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position30.xsl b/test/tests/conf/position/position30.xsl
new file mode 100644
index 0000000..6de5b0d
--- /dev/null
+++ b/test/tests/conf/position/position30.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position30 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of shorthand positional indexing with wildcard. Look for first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[1]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position31.xml b/test/tests/conf/position/position31.xml
new file mode 100644
index 0000000..f6d1332
--- /dev/null
+++ b/test/tests/conf/position/position31.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?> 
+<items>
+  <bracket group="1">left front</bracket>
+  <button group="1">momentary</button>
+  <button group="1">toggle</button>
+  <dial group="1">source select</dial>
+  <button group="2">power switch</button>
+  <light group="2">main panel</light>
+  <light group="2">selector</light>
+  <bracket group="1">right front</bracket>
+  <bracket group="2">top inner</bracket>
+  <dial group="1">output select</dial>
+  <dial group="3">frequency</dial>
+  <dial group="3">voltage</dial>
+  <light group="1">power</light>
+  <light group="2">safety</light>
+</items>
\ No newline at end of file
diff --git a/test/tests/conf/position/position31.xsl b/test/tests/conf/position/position31.xsl
new file mode 100644
index 0000000..a026dc4
--- /dev/null
+++ b/test/tests/conf/position/position31.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position31 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() with a sibling axis. -->
+
+<xsl:template match="items">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="sfdhd">
+  <xsl:text>Pos</xsl:text><xsl:value-of select="position()"/><xsl:text> G</xsl:text><xsl:value-of select="@group"/><xsl:text>- </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="bracket|button|dial|light">
+  <xsl:choose>
+    <xsl:when test="position()=2"><!-- Have to skip interstitial text -->
+      <xsl:text>Group: </xsl:text><xsl:value-of select="@group"/><xsl:text>
+     </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+    </xsl:when>
+    <xsl:when test="@group != preceding-sibling::*[1]/@group">
+      <xsl:text>Group: </xsl:text><xsl:value-of select="@group"/><xsl:text>
+     </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>   </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="name(.)"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position32.xml b/test/tests/conf/position/position32.xml
new file mode 100644
index 0000000..6184fae
--- /dev/null
+++ b/test/tests/conf/position/position32.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>1191</num>
+</a>
+  <a>
+<num>263</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>827</num>
+</a>
+  <a>
+<num>256</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position32.xsl b/test/tests/conf/position/position32.xsl
new file mode 100644
index 0000000..e6bd0d1
--- /dev/null
+++ b/test/tests/conf/position/position32.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position32 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() on predicate of wildcard, anded with attribute test. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test and position()=7]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position33.xml b/test/tests/conf/position/position33.xml
new file mode 100644
index 0000000..6184fae
--- /dev/null
+++ b/test/tests/conf/position/position33.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>1191</num>
+</a>
+  <a>
+<num>263</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>827</num>
+</a>
+  <a>
+<num>256</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position33.xsl b/test/tests/conf/position/position33.xsl
new file mode 100644
index 0000000..e70ae15
--- /dev/null
+++ b/test/tests/conf/position/position33.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position33 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() on predicate of wildcard, anded with attribute test. Look for first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test and position()=1]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position34.xml b/test/tests/conf/position/position34.xml
new file mode 100644
index 0000000..6184fae
--- /dev/null
+++ b/test/tests/conf/position/position34.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>1191</num>
+</a>
+  <a>
+<num>263</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>827</num>
+</a>
+  <a>
+<num>256</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position34.xsl b/test/tests/conf/position/position34.xsl
new file mode 100644
index 0000000..06eb897
--- /dev/null
+++ b/test/tests/conf/position/position34.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position34 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() on predicate of wildcard, anded with attribute test. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test and position()=4]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position35.xml b/test/tests/conf/position/position35.xml
new file mode 100644
index 0000000..6184fae
--- /dev/null
+++ b/test/tests/conf/position/position35.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>1191</num>
+</a>
+  <a>
+<num>263</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>827</num>
+</a>
+  <a>
+<num>256</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position35.xsl b/test/tests/conf/position/position35.xsl
new file mode 100644
index 0000000..c8e9199
--- /dev/null
+++ b/test/tests/conf/position/position35.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position35 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() in 2nd predicate. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test][position()=3]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position36.xml b/test/tests/conf/position/position36.xml
new file mode 100644
index 0000000..6184fae
--- /dev/null
+++ b/test/tests/conf/position/position36.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>1191</num>
+</a>
+  <a>
+<num>263</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>827</num>
+</a>
+  <a>
+<num>256</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position36.xsl b/test/tests/conf/position/position36.xsl
new file mode 100644
index 0000000..23886f4
--- /dev/null
+++ b/test/tests/conf/position/position36.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position36 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() in 2nd predicate. Look for first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test][position()=1]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position37.xml b/test/tests/conf/position/position37.xml
new file mode 100644
index 0000000..e968029
--- /dev/null
+++ b/test/tests/conf/position/position37.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2<a>under2</a>2.5</a>
+  <b>3<a>under3</a>3.5</b>
+  <b>4<c>under4</c>4.5<a>under4.5</a>4.9</b>
+  <b>5<c>5.1<a>under5</a>5.5</c>5.9</b>
+  <b>6<c>6.1<d>6.3</d><a>under6.5</a><d>6.7</d>6.8</c>6.9</b>
+  <a>7<c>7.1<a>under7</a>7.5</c>7.9</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position37.xsl b/test/tests/conf/position/position37.xsl
new file mode 100644
index 0000000..db5dda3
--- /dev/null
+++ b/test/tests/conf/position/position37.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position37 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() in a for-each node set. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select=".//a">
+      <xsl:value-of select="position()"/>
+      <xsl:text>. </xsl:text>
+      <xsl:choose>
+        <xsl:when test="count(./*)=0">
+          <xsl:value-of select="."/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="text()[1]"/>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position38.xml b/test/tests/conf/position/position38.xml
new file mode 100644
index 0000000..6184fae
--- /dev/null
+++ b/test/tests/conf/position/position38.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>1191</num>
+</a>
+  <a>
+<num>263</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>827</num>
+</a>
+  <a>
+<num>256</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position38.xsl b/test/tests/conf/position/position38.xsl
new file mode 100644
index 0000000..d2ccf01
--- /dev/null
+++ b/test/tests/conf/position/position38.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position38 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of positional indexing (shorthand) in 2nd predicate. Look for last item. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test][4]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position39.xml b/test/tests/conf/position/position39.xml
new file mode 100644
index 0000000..6184fae
--- /dev/null
+++ b/test/tests/conf/position/position39.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>1191</num>
+</a>
+  <a>
+<num>263</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>827</num>
+</a>
+  <a>
+<num>256</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position39.xsl b/test/tests/conf/position/position39.xsl
new file mode 100644
index 0000000..feba1c0
--- /dev/null
+++ b/test/tests/conf/position/position39.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position39 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of shorthand positional indexing in 2nd predicate. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test][3]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position40.xml b/test/tests/conf/position/position40.xml
new file mode 100644
index 0000000..6184fae
--- /dev/null
+++ b/test/tests/conf/position/position40.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>1191</num>
+</a>
+  <a>
+<num>263</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>827</num>
+</a>
+  <a>
+<num>256</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position40.xsl b/test/tests/conf/position/position40.xsl
new file mode 100644
index 0000000..9166a91
--- /dev/null
+++ b/test/tests/conf/position/position40.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position40 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of positional indexing in 2nd predicate. Look for first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[@test][1]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position41.xml b/test/tests/conf/position/position41.xml
new file mode 100644
index 0000000..c69681b
--- /dev/null
+++ b/test/tests/conf/position/position41.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1<b>under1</b>1.5</a>
+  <a>2<b>under2</b>2.5</a>
+  <a>3<b>under3</b>3.5<b>under3.5</b>3.9</a>
+  <a>4<c>under4</c>4.5<b>under4.5</b>4.9</a>
+  <a>5<b>under5</b>5.5<x>under5.5</x>5.9</a>
+  <a>6<b>under6</b>6.5<c>under6.5</c>6.9</a>
+  <a>7<b>under7</b>7.5</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position41.xsl b/test/tests/conf/position/position41.xsl
new file mode 100644
index 0000000..531924d
--- /dev/null
+++ b/test/tests/conf/position/position41.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position41 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() in a for-each node set involving parent axis. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="a/x"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="x">
+  <xsl:text>From the x node...
+</xsl:text>
+  <xsl:for-each select="../../a/b[1]">
+    <xsl:if test="position() &gt;= 2 and position() &lt;= 6">
+      <xsl:value-of select="."/>
+      <xsl:text>
+</xsl:text>
+    </xsl:if>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position42.xml b/test/tests/conf/position/position42.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position42.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position42.xsl b/test/tests/conf/position/position42.xsl
new file mode 100644
index 0000000..810544b
--- /dev/null
+++ b/test/tests/conf/position/position42.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position42 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() on node-set from key(). -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','false')[position()=2]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position43.xml b/test/tests/conf/position/position43.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position43.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position43.xsl b/test/tests/conf/position/position43.xsl
new file mode 100644
index 0000000..cbbeaf5
--- /dev/null
+++ b/test/tests/conf/position/position43.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position43 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() on node-set from key(). Look for first. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','true')[position()=1]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position44.xml b/test/tests/conf/position/position44.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position44.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position44.xsl b/test/tests/conf/position/position44.xsl
new file mode 100644
index 0000000..cd242d4
--- /dev/null
+++ b/test/tests/conf/position/position44.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position44 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() on node-set from key(). Look for first. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','false')[position()=1]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position45.xml b/test/tests/conf/position/position45.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position45.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position45.xsl b/test/tests/conf/position/position45.xsl
new file mode 100644
index 0000000..727abb4
--- /dev/null
+++ b/test/tests/conf/position/position45.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position45 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of shorthand positional indexing on node-set from key(). -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','true')[4]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position46.xml b/test/tests/conf/position/position46.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position46.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position46.xsl b/test/tests/conf/position/position46.xsl
new file mode 100644
index 0000000..1962298
--- /dev/null
+++ b/test/tests/conf/position/position46.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position46 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of shorthand positional indexing on node-set from key(). -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','true')[3]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position47.xml b/test/tests/conf/position/position47.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position47.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position47.xsl b/test/tests/conf/position/position47.xsl
new file mode 100644
index 0000000..d2126d4
--- /dev/null
+++ b/test/tests/conf/position/position47.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position47 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of shorthand positional indexing on node-set from key(). Look for first. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','true')[1]/num"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position48.xml b/test/tests/conf/position/position48.xml
new file mode 100644
index 0000000..88b98e4
--- /dev/null
+++ b/test/tests/conf/position/position48.xml
@@ -0,0 +1,30 @@
+<doc>
+  <alpha key="a">
+    <z>5</z>
+  </alpha>
+  <alpha key="b">
+    <b>3</b>
+    <z>9</z>
+  </alpha>
+  <alpha key="c">
+    <z>2</z>
+  </alpha>
+  <alpha key="d">
+    <z>4</z>
+    <z>12</z>
+  </alpha>
+  <alpha key="e">
+    <z>6</z>
+    <z>11</z>
+    <z>1</z>
+  </alpha>
+  <alpha key="f">
+    <z>3</z>
+    <f>8</f>
+  </alpha>
+  <alpha key="g">
+    <z>7</z>
+    <g>1</g>
+    <z>10</z>
+  </alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position48.xsl b/test/tests/conf/position/position48.xsl
new file mode 100644
index 0000000..cd270f2
--- /dev/null
+++ b/test/tests/conf/position/position48.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position48 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test position predicate on sort key. -->
+
+<xsl:template match="doc">
+  <out>Order should be cfdaegb...
+    <xsl:for-each select="alpha">
+      <xsl:sort select="z[1]" data-type="number"/>
+      <xsl:value-of select="@key"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position49.xml b/test/tests/conf/position/position49.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position49.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position49.xsl b/test/tests/conf/position/position49.xsl
new file mode 100644
index 0000000..a655f70
--- /dev/null
+++ b/test/tests/conf/position/position49.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position49 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of positional indexing when used with key() in xsl:apply-templates. Look for last. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="key('k','true')[4]/num"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="num">
+  <B><xsl:value-of select="."/></B>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position50.xml b/test/tests/conf/position/position50.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position50.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position50.xsl b/test/tests/conf/position/position50.xsl
new file mode 100644
index 0000000..48b9134
--- /dev/null
+++ b/test/tests/conf/position/position50.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position50 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() when used with key() in xsl:apply-templates. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="key('k','true')[3]/num"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="num">
+  <B><xsl:value-of select="."/></B>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position51.xml b/test/tests/conf/position/position51.xml
new file mode 100644
index 0000000..a54b52b
--- /dev/null
+++ b/test/tests/conf/position/position51.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>7</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position51.xsl b/test/tests/conf/position/position51.xsl
new file mode 100644
index 0000000..f9ef80a
--- /dev/null
+++ b/test/tests/conf/position/position51.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position51 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of position() when used with key() in xsl:apply-templates. Look for first. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="key('k','true')[1]/num"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="num">
+  <B><xsl:value-of select="."/></B>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position52.xml b/test/tests/conf/position/position52.xml
new file mode 100644
index 0000000..0d5717d
--- /dev/null
+++ b/test/tests/conf/position/position52.xml
@@ -0,0 +1,39 @@
+<doc>
+  <alpha key="a">
+    <z>5</z>
+  </alpha>
+  <alpha key="b">
+    <b>3</b>
+    <z>9</z>
+  </alpha>
+  <alpha key="c">
+    <z>2</z>
+    <z>5</z>
+  </alpha>
+  <alpha key="d">
+    <z>4</z>
+    <z>12</z>
+    <z>5</z>
+  </alpha>
+  <alpha key="e">
+    <z>6</z>
+    <z>11</z>
+    <e>1</e>
+  </alpha>
+  <alpha key="f">
+    <f>8</f>
+    <z>4</z>
+    <z>3</z>
+    <z>8</z>
+  </alpha>
+  <alpha key="g">
+    <z>7</z>
+    <g>1</g>
+    <z>10</z>
+  </alpha>
+  <alpha key="h">
+    <h>1</h>
+    <z>9</z>
+    <h>4</h>
+  </alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position52.xsl b/test/tests/conf/position/position52.xsl
new file mode 100644
index 0000000..b4a14a9
--- /dev/null
+++ b/test/tests/conf/position/position52.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position52 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of count() on a set filtered by position. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(*/z[2])"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position53.xml b/test/tests/conf/position/position53.xml
new file mode 100644
index 0000000..c0bbb17
--- /dev/null
+++ b/test/tests/conf/position/position53.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position53.xsl b/test/tests/conf/position/position53.xsl
new file mode 100644
index 0000000..2e09e41
--- /dev/null
+++ b/test/tests/conf/position/position53.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position53 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of count() with attribute wildcard. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(a/@*)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position54.xml b/test/tests/conf/position/position54.xml
new file mode 100644
index 0000000..c0bbb17
--- /dev/null
+++ b/test/tests/conf/position/position54.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">
+<num>1</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>2</num>
+</a>
+  <a>
+<num>5</num>
+</a>
+  <a test="false">
+<num>5</num>
+</a>
+  <a test="true">
+<num>3</num>
+</a>
+  <a test="true">
+<num>4</num>
+</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position54.xsl b/test/tests/conf/position/position54.xsl
new file mode 100644
index 0000000..862e4db
--- /dev/null
+++ b/test/tests/conf/position/position54.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position54 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of count() of wildcarded attribute axis, long-form notation. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(a/attribute::*)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position55.xml b/test/tests/conf/position/position55.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conf/position/position55.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position55.xsl b/test/tests/conf/position/position55.xsl
new file mode 100644
index 0000000..f5f26e7
--- /dev/null
+++ b/test/tests/conf/position/position55.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position55 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() by itself in a predicate. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[last()]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position56.xml b/test/tests/conf/position/position56.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conf/position/position56.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position56.xsl b/test/tests/conf/position/position56.xsl
new file mode 100644
index 0000000..6b7ed71
--- /dev/null
+++ b/test/tests/conf/position/position56.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position56 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() with node-set from key(). Long-form predicate. -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','true')[last()=position()]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position57.xml b/test/tests/conf/position/position57.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conf/position/position57.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position57.xsl b/test/tests/conf/position/position57.xsl
new file mode 100644
index 0000000..573c8f6
--- /dev/null
+++ b/test/tests/conf/position/position57.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position57 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() in predicate of node-set from key(). -->
+
+<xsl:key name="k" match="a" use="@test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="key('k','true')[last()]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position58.xml b/test/tests/conf/position/position58.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conf/position/position58.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position58.xsl b/test/tests/conf/position/position58.xsl
new file mode 100644
index 0000000..533a01c
--- /dev/null
+++ b/test/tests/conf/position/position58.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position58 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() in second predicate, in long form. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[not(@test)][last()=position()]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position59.xml b/test/tests/conf/position/position59.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conf/position/position59.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position59.xsl b/test/tests/conf/position/position59.xsl
new file mode 100644
index 0000000..d518bce
--- /dev/null
+++ b/test/tests/conf/position/position59.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position59 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of last() in second predicate. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="*[not(@test)][last()]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position60.xml b/test/tests/conf/position/position60.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position60.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position60.xsl b/test/tests/conf/position/position60.xsl
new file mode 100644
index 0000000..9333da7
--- /dev/null
+++ b/test/tests/conf/position/position60.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position60 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of greater-than with position(). -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[position()>2]">
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position61.xml b/test/tests/conf/position/position61.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position61.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position61.xsl b/test/tests/conf/position/position61.xsl
new file mode 100644
index 0000000..3c8145f
--- /dev/null
+++ b/test/tests/conf/position/position61.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position61 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of less-than with position(). -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[position()&lt;3]">
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position62.xml b/test/tests/conf/position/position62.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position62.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position62.xsl b/test/tests/conf/position/position62.xsl
new file mode 100644
index 0000000..4f7f5c4
--- /dev/null
+++ b/test/tests/conf/position/position62.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position62 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of greater-than-or-equal-to with position(). -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[position()>=2]">
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position63.xml b/test/tests/conf/position/position63.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position63.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position63.xsl b/test/tests/conf/position/position63.xsl
new file mode 100644
index 0000000..f55b5df
--- /dev/null
+++ b/test/tests/conf/position/position63.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position63 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of less-than-or-equal-to with position(). -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[position() &lt;=3]">
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position64.xml b/test/tests/conf/position/position64.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position64.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position64.xsl b/test/tests/conf/position/position64.xsl
new file mode 100644
index 0000000..564885c
--- /dev/null
+++ b/test/tests/conf/position/position64.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position64 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of not-equal-to with position(). -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[position()!=2]">
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position65.xml b/test/tests/conf/position/position65.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position65.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position65.xsl b/test/tests/conf/position/position65.xsl
new file mode 100644
index 0000000..ea69236
--- /dev/null
+++ b/test/tests/conf/position/position65.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position65 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of a numeric formula in positional indexing. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[3-2]">
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position66.xml b/test/tests/conf/position/position66.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/position/position66.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position66.xsl b/test/tests/conf/position/position66.xsl
new file mode 100644
index 0000000..eb40a1c
--- /dev/null
+++ b/test/tests/conf/position/position66.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position66 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of zero in positional indexing. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[0]">
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position67.xml b/test/tests/conf/position/position67.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position67.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position67.xsl b/test/tests/conf/position/position67.xsl
new file mode 100644
index 0000000..e91b344
--- /dev/null
+++ b/test/tests/conf/position/position67.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position67 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of number function to make positional indexing definite. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[number('3')]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position68.xml b/test/tests/conf/position/position68.xml
new file mode 100644
index 0000000..e659d0c
--- /dev/null
+++ b/test/tests/conf/position/position68.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<metadata>
+    <keyword tag="ticker" value="MSFT"/>
+    <keyword tag="sector" value="unitedstates"/>
+    <keyword tag="ticker" value="IBM"/>
+    <keyword tag="ticker" value="Lotus"/>
+    <SUMMARY>tetettete</SUMMARY>
+    <CLASSIFICATION state="immediate"/>
+    <IPTYPE_REF majorName="Earn" minorName="announcement"/>
+</metadata>
diff --git a/test/tests/conf/position/position68.xsl b/test/tests/conf/position/position68.xsl
new file mode 100644
index 0000000..285a09b
--- /dev/null
+++ b/test/tests/conf/position/position68.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position68 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test positional indexing with for-each loop and all-but-last xsl:if for comma. -->
+
+<xsl:template match="metadata">
+  <out>
+    <xsl:for-each select="keyword[@tag='ticker']">
+      <xsl:value-of select="@value"/>
+      <xsl:value-of select="position()"/>
+      <xsl:value-of select="last()"/>
+      <xsl:if test="position()!=last()">,</xsl:if>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position69.xml b/test/tests/conf/position/position69.xml
new file mode 100644
index 0000000..e659d0c
--- /dev/null
+++ b/test/tests/conf/position/position69.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<metadata>
+    <keyword tag="ticker" value="MSFT"/>
+    <keyword tag="sector" value="unitedstates"/>
+    <keyword tag="ticker" value="IBM"/>
+    <keyword tag="ticker" value="Lotus"/>
+    <SUMMARY>tetettete</SUMMARY>
+    <CLASSIFICATION state="immediate"/>
+    <IPTYPE_REF majorName="Earn" minorName="announcement"/>
+</metadata>
diff --git a/test/tests/conf/position/position69.xsl b/test/tests/conf/position/position69.xsl
new file mode 100644
index 0000000..5756155
--- /dev/null
+++ b/test/tests/conf/position/position69.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position69 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test positional indexing with for-each loop and apply-templates. -->
+
+<xsl:template match="metadata">
+  <out>
+    <xsl:text>&#010;</xsl:text>
+    <xsl:for-each select="keyword[@tag='ticker']">
+      <xsl:sort select="@value"/>
+      <xsl:value-of select="@value"/>
+      <xsl:value-of select="position()"/>
+      <xsl:value-of select="last()"/>
+      <xsl:if test="position()!=last()">,</xsl:if>
+    </xsl:for-each>
+
+    <xsl:text>&#010;</xsl:text>
+
+    <xsl:apply-templates select="keyword[@tag='ticker']">
+      <xsl:sort select="@value"/>
+    </xsl:apply-templates>
+    <xsl:text>&#010;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="keyword">
+  <xsl:value-of select="@value"/>
+  <xsl:value-of select="position()"/>
+  <xsl:value-of select="last()"/>
+  <xsl:if test="position()!=last()">,</xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position70.xml b/test/tests/conf/position/position70.xml
new file mode 100644
index 0000000..a2b0018
--- /dev/null
+++ b/test/tests/conf/position/position70.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<doc att="top">
+  <!-- This is the 1st comment -->
+  text-in-doc
+  <inner>
+    inner-text
+    <!-- This is the 2nd comment -->
+    <sub>subtext</sub>
+    text-after
+  </inner>
+  text-in-doc2
+  <inner2 blat="bar">
+    <sub>subtext</sub>final-text
+  </inner2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position70.xsl b/test/tests/conf/position/position70.xsl
new file mode 100644
index 0000000..ccae900
--- /dev/null
+++ b/test/tests/conf/position/position70.xsl
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position70 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that set of nodes changes when strip-space is in effect. -->
+  <!-- "The xsl:apply-templates instruction processes all children of the current node,
+        including text nodes. However, text nodes that have been stripped as specified
+        in 3.4 Whitespace Stripping will not be processed." -->
+
+<xsl:strip-space elements="doc inner inner2"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:apply-templates select="*|@*|comment()|text()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*"><!-- for child elements -->
+  <xsl:text>E(</xsl:text>
+  <xsl:value-of select="position()"/>
+  <xsl:text>):</xsl:text>
+  <xsl:value-of select="name()"/>
+  <xsl:apply-templates select="@*"/>
+  <xsl:apply-templates/>
+  <xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="@*">
+  <!-- The parser has freedom to present attributes in any order it wants.
+     Input file should have only one attribute if you want consistent results across parsers. -->
+  <xsl:text>A(</xsl:text>
+  <xsl:value-of select="position()"/>
+  <xsl:text>):</xsl:text>
+  <xsl:value-of select="name()"/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>T(</xsl:text>
+  <xsl:value-of select="position()"/>
+  <xsl:text>):</xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="comment()">
+  <xsl:text>C(</xsl:text>
+  <xsl:value-of select="position()"/>
+  <xsl:text>):</xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position71.xml b/test/tests/conf/position/position71.xml
new file mode 100644
index 0000000..f599fff
--- /dev/null
+++ b/test/tests/conf/position/position71.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<?a-pi some data?>
+<?b-pi some data?>
+<doc>
+  test
+</doc>
+<?c-pi some data?>
diff --git a/test/tests/conf/position/position71.xsl b/test/tests/conf/position/position71.xsl
new file mode 100644
index 0000000..ca1d97e
--- /dev/null
+++ b/test/tests/conf/position/position71.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position71 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that position test can be applied to PI nodes. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="./processing-instruction()[2]"/>	
+  </out>
+</xsl:template>
+
+<xsl:template match="processing-instruction()">
+  <xsl:text>Found PI: </xsl:text><xsl:value-of select="name()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position72.xml b/test/tests/conf/position/position72.xml
new file mode 100644
index 0000000..aa1cafb
--- /dev/null
+++ b/test/tests/conf/position/position72.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<doc>OUTER
+  <a>1
+    <b>1.1
+      <c>1.2
+        <d>1.3
+          <e>1.4
+            <f>HERE
+            </f>1.5
+          </e>1.6
+        </d>1.7
+      </c>1.8
+    </b>1.9
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position72.xsl b/test/tests/conf/position/position72.xsl
new file mode 100644
index 0000000..fa7e9bd
--- /dev/null
+++ b/test/tests/conf/position/position72.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position72 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() and the ancestor-or-self axis. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select=".//f"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="f">
+  <xsl:value-of select="ancestor-or-self::*[1]/text()"/>
+  <xsl:value-of select="ancestor-or-self::*[2]/text()"/>
+  <xsl:value-of select="ancestor-or-self::*[3]/text()"/>
+  <xsl:value-of select="ancestor-or-self::*[4]/text()"/>
+  <xsl:value-of select="ancestor-or-self::*[5]/text()"/>
+  <xsl:value-of select="ancestor-or-self::*[6]/text()"/>
+  <xsl:value-of select="ancestor-or-self::*[7]/text()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position73.xml b/test/tests/conf/position/position73.xml
new file mode 100644
index 0000000..aa1cafb
--- /dev/null
+++ b/test/tests/conf/position/position73.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<doc>OUTER
+  <a>1
+    <b>1.1
+      <c>1.2
+        <d>1.3
+          <e>1.4
+            <f>HERE
+            </f>1.5
+          </e>1.6
+        </d>1.7
+      </c>1.8
+    </b>1.9
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position73.xsl b/test/tests/conf/position/position73.xsl
new file mode 100644
index 0000000..571252a
--- /dev/null
+++ b/test/tests/conf/position/position73.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position73 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() and for-each resetting the frame of reference of a node-set. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select=".//f"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="f">
+  <xsl:for-each select="ancestor-or-self::*">
+    <xsl:value-of select="position()"/>
+    <xsl:text>. </xsl:text>
+    <xsl:choose>
+      <xsl:when test="count(./*)=0">
+        <xsl:value-of select="."/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="text()[1]"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position74.xml b/test/tests/conf/position/position74.xml
new file mode 100644
index 0000000..2ccd356
--- /dev/null
+++ b/test/tests/conf/position/position74.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?> 
+<doc><a><b><c><d><e><f>HERE</f>
+            <g>we </g>
+            <h>found
+              <i>the </i>
+              <j>rest
+                <k>of
+                  <l>the </l>
+                  <m>tree</m>
+                  that
+                </k>we
+              </j>wanted
+            </h>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position74.xsl b/test/tests/conf/position/position74.xsl
new file mode 100644
index 0000000..2abcc4e
--- /dev/null
+++ b/test/tests/conf/position/position74.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position74 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() and for-each resetting the frame of reference of a node-set.
+     Show position via value-of before going into for-each loop. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select=".//f"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="f">
+  <xsl:value-of select="text()[1]"/><xsl:text>
+</xsl:text>
+  <xsl:for-each select="following::*">
+    <xsl:value-of select="position()"/>
+    <xsl:text>. </xsl:text>
+    <xsl:choose>
+      <xsl:when test="count(./*)=0">
+        <xsl:value-of select="."/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="text()[1]"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position75.xml b/test/tests/conf/position/position75.xml
new file mode 100644
index 0000000..6664f32
--- /dev/null
+++ b/test/tests/conf/position/position75.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">A1<b>B1</b>A2<!-- This is the 1st comment -->A3<b>B2</b>
+    A4<!-- This is the 2nd comment -->A5</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position75.xsl b/test/tests/conf/position/position75.xsl
new file mode 100644
index 0000000..f40c8f7
--- /dev/null
+++ b/test/tests/conf/position/position75.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position75 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of last() on various sets of children. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a/*[last()]"/>,
+    <xsl:value-of select="a/child::*[last()]"/>,
+    <xsl:value-of select="a/descendant::*[last()]"/>;
+    <xsl:value-of select="a/child::node()[last()]"/>,
+    <xsl:value-of select="a/child::text()[last()]"/>;
+    <xsl:value-of select="a/child::comment()[last()]"/>,
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position76.xml b/test/tests/conf/position/position76.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/position/position76.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position76.xsl b/test/tests/conf/position/position76.xsl
new file mode 100644
index 0000000..00a7978
--- /dev/null
+++ b/test/tests/conf/position/position76.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position76 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() with namespace axis. -->
+  <!-- The XML parser has freedom to present namespaces in any order it wants.
+     Nevertheless, the position() function should work on this axis, not raise an error.
+     The input should have only one namespace if you want consistent results across parsers. -->
+
+<xsl:template match="doc">
+  <out><xsl:value-of select="name(namespace::*[1])"/></out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position77.xml b/test/tests/conf/position/position77.xml
new file mode 100644
index 0000000..507b003
--- /dev/null
+++ b/test/tests/conf/position/position77.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<metadata>
+  <keyword majorName="Earn"/>
+  <keyword tag="ticker" value="MSFT"/>
+  <keyword tag="sector" value="unitedstates"/>
+  <keyword tag="ticker" value="IBM"/>
+  <keyword tag="ticker" value="Lotus"/>
+  <CLASSIFICATION value="immediate"/>
+  <keyword tag="sector" value="automotive">
+    <keyword tag="ticker" value="GM"/>
+    <keyword tag="ticker" value="F"/>
+    <keyword tag="ticker" value="C"/>
+  </keyword>
+  <IPTYPE_REF majorName="Earn" value="announcement"/>
+</metadata>
diff --git a/test/tests/conf/position/position77.xsl b/test/tests/conf/position/position77.xsl
new file mode 100644
index 0000000..9e0e7b3
--- /dev/null
+++ b/test/tests/conf/position/position77.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position77 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- AdditionalSpec: 4, 10 and "current node list" in 1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test positional indexing in current node list passed
+       via apply-templates with select that has predicate. -->
+
+<xsl:template match="metadata">
+  <out>
+    <xsl:apply-templates select="CLASSIFICATION"/>
+    <xsl:text>&#10;====== tickers ======&#10;</xsl:text>
+    <xsl:apply-templates select="keyword[@tag='ticker']"/>
+    <xsl:text>&#10;====== sectors ======&#10;</xsl:text>
+    <xsl:apply-templates select="keyword[@tag='sector']"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="keyword">
+  <xsl:value-of select="@value"/>
+  <xsl:value-of select="position()"/>
+  <xsl:value-of select="last()"/>
+  <xsl:if test="position()!=last()">,</xsl:if>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="@value"/>
+  <xsl:value-of select="position()"/>
+  <xsl:value-of select="last()"/>
+  <xsl:if test="position()!=last()">,</xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position78.xml b/test/tests/conf/position/position78.xml
new file mode 100644
index 0000000..5645828
--- /dev/null
+++ b/test/tests/conf/position/position78.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>Item-1A
+  <north-north-west/>Item-1B
+  <north>Item-2A
+    <near-north>Item-3A
+      <west/>Item-3B
+      <center>Item-4A
+        <near-south-west/>Item-4B
+        <near-south>Item-5A
+          <south>Item-6A
+            <far-south/>Item-6B
+          </south>Item-5B
+        </near-south>Item-4C
+        <near-south-east/>Item-4D
+      </center>Item-3C
+      <east/>Item-3D
+    </near-north>Item-2B
+  </north>Item-1C
+  <north-north-east/>Item-1D
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/position/position78.xsl b/test/tests/conf/position/position78.xsl
new file mode 100644
index 0000000..fb5104d
--- /dev/null
+++ b/test/tests/conf/position/position78.xsl
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position78 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Look at preceding axis (reverse document order) filtered by node test. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select=".//center" />
+  </out>
+</xsl:template>
+
+<xsl:template match="center">
+  <xsl:variable name="num" select="count(preceding::text())" />
+  <xsl:text>There are </xsl:text>
+  <xsl:value-of select="$num"/>
+  <xsl:text> preceding text nodes
+</xsl:text>
+  <xsl:call-template name="display-loop">
+    <xsl:with-param name="this" select="1"/>
+    <xsl:with-param name="total" select="$num"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="display-loop">
+  <xsl:param name="this"/>
+  <xsl:param name="total"/>
+  <xsl:text>Position </xsl:text>
+  <xsl:value-of select="$this"/>
+  <xsl:text> is </xsl:text>
+  <xsl:value-of select="preceding::text()[$this]"/>
+  <xsl:if test="$this &lt; $total">
+    <xsl:call-template name="display-loop">
+      <xsl:with-param name="this" select="$this + 1"/>
+      <xsl:with-param name="total" select="$total"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position79.xml b/test/tests/conf/position/position79.xml
new file mode 100644
index 0000000..5645828
--- /dev/null
+++ b/test/tests/conf/position/position79.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<far-north>Item-1A
+  <north-north-west/>Item-1B
+  <north>Item-2A
+    <near-north>Item-3A
+      <west/>Item-3B
+      <center>Item-4A
+        <near-south-west/>Item-4B
+        <near-south>Item-5A
+          <south>Item-6A
+            <far-south/>Item-6B
+          </south>Item-5B
+        </near-south>Item-4C
+        <near-south-east/>Item-4D
+      </center>Item-3C
+      <east/>Item-3D
+    </near-north>Item-2B
+  </north>Item-1C
+  <north-north-east/>Item-1D
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conf/position/position79.xsl b/test/tests/conf/position/position79.xsl
new file mode 100644
index 0000000..004bc36
--- /dev/null
+++ b/test/tests/conf/position/position79.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position79 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Look at preceding axis filtered by node test. Use of apply-templates causes document-order processing. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select=".//center" />
+  </out>
+</xsl:template>
+
+<xsl:template match="center">
+  <xsl:variable name="num" select="count(preceding::text())" />
+  <xsl:text>There are </xsl:text>
+  <xsl:value-of select="$num"/>
+  <xsl:text> preceding text nodes
+</xsl:text>
+  <xsl:apply-templates select="preceding::text()"/>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>Position </xsl:text>
+  <xsl:value-of select="position()"/>
+  <xsl:text> is </xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position80.xml b/test/tests/conf/position/position80.xml
new file mode 100644
index 0000000..074abc7
--- /dev/null
+++ b/test/tests/conf/position/position80.xml
@@ -0,0 +1,21 @@
+<article class="whitepaper" status="Note">
+  <articleinfo>
+    <title>AAA</title>
+    <section id="info">
+      <title>BBB</title>
+      <para>About this article</para>
+    </section>
+  </articleinfo>
+  <section id="intro">
+    <title>CCC</title>
+    <para>...</para>
+  </section>
+  <section>
+    <title>YYY</title>
+    <para>...</para>
+    <section revisionflag="added">
+      <title>ZZZ</title>
+      <para>This is the section titled "ZZZ".</para>
+    </section>
+  </section>
+</article>
diff --git a/test/tests/conf/position/position80.xsl b/test/tests/conf/position/position80.xsl
new file mode 100644
index 0000000..aaabc2f
--- /dev/null
+++ b/test/tests/conf/position/position80.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0">
+
+  <!-- FileName: position80 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Ensure last() is working with unionpaths of ancestors. -->
+  <!-- Creator: Scott Boag -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//section/title">
+      Title= <xsl:value-of select="."/>
+      <xsl:variable name="size">
+        <xsl:value-of select="count(ancestor::section
+          |ancestor::simplesect|ancestor::articleinfo)"/>
+      </xsl:variable>
+      <xsl:for-each select="(ancestor::section|ancestor::simplesect
+        |ancestor::articleinfo)[last()]">
+        <name>
+          <xsl:attribute name="last-of">
+            <xsl:value-of select="$size"/>
+          </xsl:attribute>
+          <xsl:value-of select="name(.)"/>
+        </name>
+      </xsl:for-each>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position81.xml b/test/tests/conf/position/position81.xml
new file mode 100644
index 0000000..0d5717d
--- /dev/null
+++ b/test/tests/conf/position/position81.xml
@@ -0,0 +1,39 @@
+<doc>
+  <alpha key="a">
+    <z>5</z>
+  </alpha>
+  <alpha key="b">
+    <b>3</b>
+    <z>9</z>
+  </alpha>
+  <alpha key="c">
+    <z>2</z>
+    <z>5</z>
+  </alpha>
+  <alpha key="d">
+    <z>4</z>
+    <z>12</z>
+    <z>5</z>
+  </alpha>
+  <alpha key="e">
+    <z>6</z>
+    <z>11</z>
+    <e>1</e>
+  </alpha>
+  <alpha key="f">
+    <f>8</f>
+    <z>4</z>
+    <z>3</z>
+    <z>8</z>
+  </alpha>
+  <alpha key="g">
+    <z>7</z>
+    <g>1</g>
+    <z>10</z>
+  </alpha>
+  <alpha key="h">
+    <h>1</h>
+    <z>9</z>
+    <h>4</h>
+  </alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position81.xsl b/test/tests/conf/position/position81.xsl
new file mode 100644
index 0000000..16bf0ac
--- /dev/null
+++ b/test/tests/conf/position/position81.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position81 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of count() on a set filtered by the last() function. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(/doc/alpha[last()]/h)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position82.xml b/test/tests/conf/position/position82.xml
new file mode 100644
index 0000000..0d5717d
--- /dev/null
+++ b/test/tests/conf/position/position82.xml
@@ -0,0 +1,39 @@
+<doc>
+  <alpha key="a">
+    <z>5</z>
+  </alpha>
+  <alpha key="b">
+    <b>3</b>
+    <z>9</z>
+  </alpha>
+  <alpha key="c">
+    <z>2</z>
+    <z>5</z>
+  </alpha>
+  <alpha key="d">
+    <z>4</z>
+    <z>12</z>
+    <z>5</z>
+  </alpha>
+  <alpha key="e">
+    <z>6</z>
+    <z>11</z>
+    <e>1</e>
+  </alpha>
+  <alpha key="f">
+    <f>8</f>
+    <z>4</z>
+    <z>3</z>
+    <z>8</z>
+  </alpha>
+  <alpha key="g">
+    <z>7</z>
+    <g>1</g>
+    <z>10</z>
+  </alpha>
+  <alpha key="h">
+    <h>1</h>
+    <z>9</z>
+    <h>4</h>
+  </alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position82.xsl b/test/tests/conf/position/position82.xsl
new file mode 100644
index 0000000..f6abac1
--- /dev/null
+++ b/test/tests/conf/position/position82.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position82 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of count() on a set filtered by the last() function. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(alpha/*[last()][name()='z'])"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position83.xml b/test/tests/conf/position/position83.xml
new file mode 100644
index 0000000..9148eef
--- /dev/null
+++ b/test/tests/conf/position/position83.xml
@@ -0,0 +1,21 @@
+<article class="whitepaper" status="Note">
+  <articleinfo>
+    <title>AAA</title>
+    <section id="info">
+      <title>BBB</title>
+      <para>About this article</para>
+      <section revisionflag="added">
+        <title>CCC</title>
+        <para>This is the section titled "ZZZ".</para>
+        <ednote who="KKK">
+          <title>DDD</title>
+          <para>Don't worry.</para>
+          <section revisionflag="added">
+            <title>EEE</title>
+            <para>This is the deep subsection.</para>
+          </section>
+        </ednote>
+      </section>
+    </section>
+  </articleinfo>
+</article>
diff --git a/test/tests/conf/position/position83.xsl b/test/tests/conf/position/position83.xsl
new file mode 100644
index 0000000..bd6ca23
--- /dev/null
+++ b/test/tests/conf/position/position83.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0">
+
+  <!-- FileName: position83 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Try count() and last() on unionpaths that aren't sequential. -->
+  <!-- Creator: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//section/title">
+      Title= <xsl:value-of select="."/>
+      <name>
+        <xsl:attribute name="last-of">
+          <xsl:value-of select="count(ancestor::section
+            |ancestor::simplesect|ancestor::article)"/>
+        </xsl:attribute>
+        <xsl:value-of select="name((ancestor::section|ancestor::simplesect
+          |ancestor::article)[last()])"/>
+      </name>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position84.xml b/test/tests/conf/position/position84.xml
new file mode 100644
index 0000000..9148eef
--- /dev/null
+++ b/test/tests/conf/position/position84.xml
@@ -0,0 +1,21 @@
+<article class="whitepaper" status="Note">
+  <articleinfo>
+    <title>AAA</title>
+    <section id="info">
+      <title>BBB</title>
+      <para>About this article</para>
+      <section revisionflag="added">
+        <title>CCC</title>
+        <para>This is the section titled "ZZZ".</para>
+        <ednote who="KKK">
+          <title>DDD</title>
+          <para>Don't worry.</para>
+          <section revisionflag="added">
+            <title>EEE</title>
+            <para>This is the deep subsection.</para>
+          </section>
+        </ednote>
+      </section>
+    </section>
+  </articleinfo>
+</article>
diff --git a/test/tests/conf/position/position84.xsl b/test/tests/conf/position/position84.xsl
new file mode 100644
index 0000000..a3c2767
--- /dev/null
+++ b/test/tests/conf/position/position84.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0">
+
+  <!-- FileName: position83 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Purpose: Try positional filter on unionpaths that aren't sequential. -->
+  <!-- Creator: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//title">
+      Title= <xsl:value-of select="."/>
+      <name>
+        <xsl:attribute name="first-of">
+          <xsl:value-of select="count(ancestor::section
+            |../ednote|following::title|../bogus)"/>
+        </xsl:attribute>
+        <xsl:value-of select="name((ancestor::section|../ednote
+          |following::title|../bogus)[1])"/>
+      </name>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position85.xml b/test/tests/conf/position/position85.xml
new file mode 100644
index 0000000..ff9a91c
--- /dev/null
+++ b/test/tests/conf/position/position85.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo att1="c">
+     <foo att1="b">
+        <foo att1="a">
+           <baz/>
+        </foo>
+     </foo>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position85.xsl b/test/tests/conf/position/position85.xsl
new file mode 100644
index 0000000..070344c
--- /dev/null
+++ b/test/tests/conf/position/position85.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position85 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that () grouping can be applied multiple times. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//baz">
+      <xsl:value-of select="ancestor::foo[1]/@att1"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(ancestor::foo[1])/@att1"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(ancestor::foo)[1]/@att1"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="((ancestor::foo))[1]/@att1"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="(((ancestor::foo)[1])/@att1)"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position86.xml b/test/tests/conf/position/position86.xml
new file mode 100644
index 0000000..a38fc5d
--- /dev/null
+++ b/test/tests/conf/position/position86.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<chapter>
+   <section>
+      <footnote>hello</footnote>
+   </section>
+   <section>
+      <footnote>goodbye</footnote>
+      <footnote>sayonara</footnote>
+   </section>
+   <section>
+      <footnote>aloha</footnote>
+   </section>
+</chapter>
\ No newline at end of file
diff --git a/test/tests/conf/position/position86.xsl b/test/tests/conf/position/position86.xsl
new file mode 100644
index 0000000..d3e83d3
--- /dev/null
+++ b/test/tests/conf/position/position86.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: position86 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: Mukund Raghavachari -->
+  <!-- Purpose: "The Predicate filters the node-set with respect to the child axis"
+     means that the descendant(-or-self) axes must be internally segregated so that
+     the position is among one group of children. -->
+
+<xsl:output method="xml" encoding="utf-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="chapter//footnote[1]">
+      <xsl:copy>
+        <xsl:value-of select="."/>
+      </xsl:copy>
+      <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position87.xml b/test/tests/conf/position/position87.xml
new file mode 100644
index 0000000..506b2d8
--- /dev/null
+++ b/test/tests/conf/position/position87.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<chapter>
+   <section>
+      <footnote>hello</footnote>
+      <footnote>ahoy</footnote>
+   </section>
+   <section>
+      <footnote>goodbye</footnote>
+      <footnote>sayonara</footnote>
+      <footnote>adios</footnote>
+   </section>
+   <section>
+      <footnote>aloha</footnote>
+      <subsection>
+        <footnote>shalom</footnote>
+        <footnote>yo</footnote>
+      </subsection>
+      <footnote>ciao</footnote>
+   </section>
+</chapter>
\ No newline at end of file
diff --git a/test/tests/conf/position/position87.xsl b/test/tests/conf/position/position87.xsl
new file mode 100644
index 0000000..ef83aac
--- /dev/null
+++ b/test/tests/conf/position/position87.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: position87 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that predicate applies along child axis, not descendant-or-self. -->
+
+<xsl:output method="xml" encoding="utf-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="chapter//footnote[2]">
+      <greeting>
+        <xsl:value-of select="."/>
+      </greeting>
+      <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position88.xml b/test/tests/conf/position/position88.xml
new file mode 100644
index 0000000..506b2d8
--- /dev/null
+++ b/test/tests/conf/position/position88.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<chapter>
+   <section>
+      <footnote>hello</footnote>
+      <footnote>ahoy</footnote>
+   </section>
+   <section>
+      <footnote>goodbye</footnote>
+      <footnote>sayonara</footnote>
+      <footnote>adios</footnote>
+   </section>
+   <section>
+      <footnote>aloha</footnote>
+      <subsection>
+        <footnote>shalom</footnote>
+        <footnote>yo</footnote>
+      </subsection>
+      <footnote>ciao</footnote>
+   </section>
+</chapter>
\ No newline at end of file
diff --git a/test/tests/conf/position/position88.xsl b/test/tests/conf/position/position88.xsl
new file mode 100644
index 0000000..4efd459
--- /dev/null
+++ b/test/tests/conf/position/position88.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: position88 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston, from remarks of Mukund Raghavachari (who read Mike Kay) -->
+  <!-- Purpose: Test () grouping around // (descendant-or-self) axis. -->
+
+<xsl:output method="xml" encoding="utf-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="(chapter//footnote)[2]">
+      <greeting>
+        <xsl:value-of select="."/>
+      </greeting>
+      <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position89.xml b/test/tests/conf/position/position89.xml
new file mode 100644
index 0000000..740946a
--- /dev/null
+++ b/test/tests/conf/position/position89.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?> 
+<chapter>
+   <section>
+      <footnote>hello</footnote>
+   </section>
+   <section>
+      <footnote>goodbye</footnote>
+      <footnote>sayonara</footnote>
+      <footnote>adios</footnote>
+   </section>
+   <section>
+      <footnote>aloha</footnote>
+      <subsection>
+        <footnote>shalom</footnote>
+        <footnote>yo</footnote>
+      </subsection>
+      <footnote>ciao</footnote>
+   </section>
+</chapter>
\ No newline at end of file
diff --git a/test/tests/conf/position/position89.xsl b/test/tests/conf/position/position89.xsl
new file mode 100644
index 0000000..2452530
--- /dev/null
+++ b/test/tests/conf/position/position89.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: position89 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston, from remarks of Mukund Raghavachari (who read Mike Kay) -->
+  <!-- Purpose: Test () grouping with expanded version of // axis. This test attempts to
+     give an explicit representation of one possible fallacious interpretation of
+     chapter//footnote[2]. -->
+
+<xsl:output method="xml" encoding="utf-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="(child::chapter/descendant-or-self::node())/footnote[2]">
+      <greeting>
+        <xsl:value-of select="."/>
+      </greeting>
+      <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position90.xml b/test/tests/conf/position/position90.xml
new file mode 100644
index 0000000..3d0a111
--- /dev/null
+++ b/test/tests/conf/position/position90.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<chapter>
+   <section>
+      <footnote>hello</footnote>
+   </section>
+   <section>
+      <footnote>goodbye</footnote>
+      <footnote>sayonara</footnote>
+      <footnote>adios</footnote>
+   </section>
+   <footnote>auf wiedersehn</footnote>
+   <section>
+      <footnote>aloha</footnote>
+      <subsection>
+        <footnote>shalom</footnote>
+        <footnote>yo</footnote>
+      </subsection>
+      <footnote>ciao</footnote>
+   </section>
+</chapter>
\ No newline at end of file
diff --git a/test/tests/conf/position/position90.xsl b/test/tests/conf/position/position90.xsl
new file mode 100644
index 0000000..5924c6c
--- /dev/null
+++ b/test/tests/conf/position/position90.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: position90 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston, from remarks of Mukund Raghavachari (who read Mike Kay) -->
+  <!-- Purpose: Test () grouping with expanded version of // axis. This test attempts to
+     give an explicit representation of one possible fallacious interpretation of
+     chapter//footnote[6]. -->
+
+<xsl:output method="xml" encoding="utf-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="chapter/descendant::footnote[6]">
+      <greeting>
+        <xsl:value-of select="."/>
+      </greeting>
+      <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position91.xml b/test/tests/conf/position/position91.xml
new file mode 100644
index 0000000..b0f6669
--- /dev/null
+++ b/test/tests/conf/position/position91.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<chapter title="A">
+  <section title="A1">
+    <subsection title="A1a">hello</subsection>
+    <subsection title="A1b">ahoy</subsection>
+  </section>
+  <section title="A2">
+    <subsection title="A2a">goodbye</subsection>
+    <subsection title="A2b">sayonara</subsection>
+    <subsection title="A2c">adios</subsection>
+  </section>
+  <section title="A3">
+    <subsection title="A3a">aloha</subsection>
+    <subsection title="A3b">
+      <footnote>A3b-1</footnote>
+      <footnote>A3b-2</footnote>
+    </subsection>
+    <subsection title="A3c">shalom</subsection>
+  </section>
+</chapter>
\ No newline at end of file
diff --git a/test/tests/conf/position/position91.xsl b/test/tests/conf/position/position91.xsl
new file mode 100644
index 0000000..7944538
--- /dev/null
+++ b/test/tests/conf/position/position91.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: position91 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Apply a predicate to a node-set full of attribute nodes.
+     If there were no parentheses, we would be asking for the 7th attribute
+     named "title" on each element, but there can only be one attribute of a
+     particular name on each, so we'd get the empty set. -->
+
+<xsl:output method="xml" encoding="utf-8"/>
+
+<xsl:template match="chapter">
+  <out>
+    <xsl:text>
+</xsl:text>
+    <xsl:for-each select="(section//@title)[7]">
+      <noted>
+        <xsl:value-of select="name(..)"/><xsl:text> </xsl:text>
+        <xsl:value-of select="."/>
+      </noted>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position92.xml b/test/tests/conf/position/position92.xml
new file mode 100644
index 0000000..abafaad
--- /dev/null
+++ b/test/tests/conf/position/position92.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<foo>
+  <bar>
+    <test>1</test>
+    <test>3</test>
+    <test>5</test>
+    <test>7</test>
+    <test>9</test>
+  </bar>
+  <baz>
+    <test>2</test>
+    <test>4</test>
+    <test>6</test>
+    <test>8</test>
+    <test>10</test>
+  </baz>
+</foo>
\ No newline at end of file
diff --git a/test/tests/conf/position/position92.xsl b/test/tests/conf/position/position92.xsl
new file mode 100644
index 0000000..e8bf85e
--- /dev/null
+++ b/test/tests/conf/position/position92.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: position92 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: John Howard -->
+  <!-- Purpose: Test retrieving correct values from node-set variables by positional predicate. -->
+ 
+  <xsl:output method="xml"/>
+
+  <xsl:template match="/">
+    <xsl:variable name="x1">
+      <xsl:variable name="node" select="/foo/*/test/text()"/>
+      <xsl:value-of select="$node[1]"/>
+    </xsl:variable>
+    <xsl:variable name="x6">
+      <xsl:variable name="node" select="/foo/*/test/text()"/>
+      <xsl:for-each select="$node[6]">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="xL">
+      <xsl:variable name="node" select="/foo/*/test/text()"/>
+      <xsl:for-each select="$node[last()]">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:variable>
+    <out>
+      <x1><xsl:value-of select="$x1"/></x1><xsl:text>&#10;</xsl:text>
+      <x6><xsl:value-of select="$x6"/></x6><xsl:text>&#10;</xsl:text>
+      <xL><xsl:value-of select="$xL"/></xL>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position93.xml b/test/tests/conf/position/position93.xml
new file mode 100644
index 0000000..d3f6da9
--- /dev/null
+++ b/test/tests/conf/position/position93.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a z="3">1st</a>
+  <a z="2">2nd</a>
+  <a z="4">3rd</a>
+  <a z="1">4th</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position93.xsl b/test/tests/conf/position/position93.xsl
new file mode 100644
index 0000000..6e273de
--- /dev/null
+++ b/test/tests/conf/position/position93.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position93 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of position() in match pattern. Nodes are sorted. -->
+  <!-- Elaboration: The nodes are processed in the sorted order, but the position() in the
+     match pattern always refers to the node as found in the source tree. -->
+
+<xsl:template match="doc">
+  <out><xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="a">
+      <xsl:sort select="@z" data-type="number"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="a[position()=4]">
+  <a4><xsl:value-of select="."/></a4><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="a[position()=3]">
+  <a3><xsl:value-of select="."/></a3><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="a[position()=2]">
+  <a2><xsl:value-of select="."/></a2><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="a[position()=1]">
+  <a1><xsl:value-of select="."/></a1><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position94.xml b/test/tests/conf/position/position94.xml
new file mode 100644
index 0000000..0291d9c
--- /dev/null
+++ b/test/tests/conf/position/position94.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<root>
+  <a>
+    <b/>
+    <b/>
+  </a>
+  <a>
+    <b/>
+    <b/>
+    <b/>
+  </a>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/position/position94.xsl b/test/tests/conf/position/position94.xsl
new file mode 100644
index 0000000..12918f9
--- /dev/null
+++ b/test/tests/conf/position/position94.xsl
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position94 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: Sergei Ivanov, adapted by David Marston -->
+  <!-- Purpose: Test of position() and last() in xsl:with-param. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/root">
+  <out>
+    <xsl:apply-templates select="a" />
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:text>
+</xsl:text>
+  <xsl:text>In a, position() is </xsl:text>
+  <xsl:value-of select="position()"/>
+  <xsl:text> and last() is </xsl:text>
+  <xsl:value-of select="last()"/><xsl:text>
+</xsl:text>
+  <xsl:apply-templates select="b">
+    <xsl:with-param name="a.pos" select="position()"/>
+    <xsl:with-param name="a.last" select="last()"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="b">
+  <xsl:param name="a.pos" select="pos-bad"/>
+  <xsl:param name="a.last" select="last-bad"/>
+  <xsl:text>In b number </xsl:text>
+  <xsl:value-of select="position()"/>
+  <xsl:text>, $a.pos=</xsl:text>
+  <xsl:value-of select="$a.pos"/>
+  <xsl:text> and $a.last=</xsl:text>
+  <xsl:value-of select="$a.last"/>
+  <xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position95.xml b/test/tests/conf/position/position95.xml
new file mode 100644
index 0000000..0f686b9
--- /dev/null
+++ b/test/tests/conf/position/position95.xml
@@ -0,0 +1,15 @@
+<doc>
+  <alpha key="a">
+    <z key="a1"/>
+  </alpha>
+  <alpha key="b">
+    <beta key="b1"/>
+    <z key="b2"/>
+  </alpha>
+  <alpha key="c">
+    <z key="c1"/>
+    <z key="c2"/>
+    <beta key="c2"/>
+    <z key="c4"/>
+  </alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position95.xsl b/test/tests/conf/position/position95.xsl
new file mode 100644
index 0000000..a97b073
--- /dev/null
+++ b/test/tests/conf/position/position95.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position95 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test position in a union in a match pattern -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="descendant::*"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="alpha|z">
+  <xsl:text>
+</xsl:text>
+  <xsl:value-of select="@key"/>
+  <xsl:text> is at position </xsl:text>
+  <xsl:value-of select="position()"/>
+</xsl:template>
+
+<xsl:template match="beta"/><!-- Squelch these -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position96.xml b/test/tests/conf/position/position96.xml
new file mode 100644
index 0000000..5b693a7
--- /dev/null
+++ b/test/tests/conf/position/position96.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/position/position96.xsl b/test/tests/conf/position/position96.xsl
new file mode 100644
index 0000000..ee4589b
--- /dev/null
+++ b/test/tests/conf/position/position96.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position96 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use just a (number-valued) global variable in a predicate. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:variable name="third" select="3"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[$third]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position97.xml b/test/tests/conf/position/position97.xml
new file mode 100644
index 0000000..96c7f46
--- /dev/null
+++ b/test/tests/conf/position/position97.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<root>
+ <base side="left">
+  <a>
+   <description>a1</description>
+  </a>
+  <a>
+   <description>a2</description>
+   <b>
+    <description>a2b1</description>
+   </b>
+   <b>
+    <description>a2b2</description>
+   </b>
+  </a>
+ </base>
+ <base side="right">
+  <a>
+   <description>a3</description>
+   <b>
+    <description>a3b1</description>
+   </b>
+  </a>
+  <a>
+   <description>a4</description>
+  </a>
+  <a>
+   <description>a5</description>
+   <b>
+    <description>a5b1</description>
+   </b>
+  </a>
+ </base>
+</root>
\ No newline at end of file
diff --git a/test/tests/conf/position/position97.xsl b/test/tests/conf/position/position97.xsl
new file mode 100644
index 0000000..06cfdc1
--- /dev/null
+++ b/test/tests/conf/position/position97.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position97 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 -->
+  <!-- Creator: Joerg Heinicke, trimmed by David Marston -->
+  <!-- Purpose: Use a (number-valued) variable in a predicate, but inside a for-each. -->
+  <!-- Also tests that weird sentence: "The predicate filters the node-set with respect to
+    the child axis" because .//description[2] means the second description that is a child
+    of the a (or b) node under which you found the description currently being considered. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="root">
+  <out>
+  <xsl:text>
+</xsl:text>
+    <xsl:apply-templates select="base//description"/>
+  </out>
+</xsl:template>
+  
+<xsl:template match="description">
+  <xsl:variable name="pos" select="position()"/>
+  <tr row="{$pos}">
+    <xsl:for-each select="/root/base">
+      <td>
+        <xsl:copy-of select="@side"/>
+        <xsl:value-of select=".//description[$pos]"/>
+      </td>
+    </xsl:for-each>
+  </tr>
+  <xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position98.xml b/test/tests/conf/position/position98.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/position/position98.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/position/position98.xsl b/test/tests/conf/position/position98.xsl
new file mode 100644
index 0000000..4c8da3b
--- /dev/null
+++ b/test/tests/conf/position/position98.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position98 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test count() starting on an attribute and going upward. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center/@center-attr-3">
+      <xsl:value-of select="count(ancestor-or-self::node())"/><xsl:text> nodes on this axis:
+</xsl:text>
+      <xsl:apply-templates select="ancestor-or-self::node()" mode="census"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="/" mode="census">
+  <xsl:text>Root Node
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="*" mode="census">
+  <xsl:text>E: </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="@*" mode="census">
+  <xsl:text>A: </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()|comment()|processing-instruction()" mode="census">
+  <xsl:text>ERROR! </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/position/position99.xml b/test/tests/conf/position/position99.xml
new file mode 100644
index 0000000..d7cd7c5
--- /dev/null
+++ b/test/tests/conf/position/position99.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<far-north> Level-1
+  <north-north-west1/>
+  <north-north-west2/>
+  <!-- Comment-2 --> Level-2
+  <?a-pi pi-2?>
+  <north>
+	 <!-- Comment-3 --> Level-3
+	 <?a-pi pi-3?>
+     <near-north>
+        <far-west/>
+        <west/>
+        <near-west/>
+	    <!-- Comment-4 --> Level-4
+	    <?a-pi pi-4?>
+        <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+           <near-south-west/>
+		   <!--Comment-5-->   Level-5
+		   <?a-pi pi-5?>
+           <near-south>
+		      <!--Comment-6-->   Level-6
+		      <?a-pi pi-6?>
+		      <south attr1="First" attr2="Last">
+                 <far-south/>
+              </south>
+           </near-south>
+           <near-south-east/>
+        </center>
+        <near-east/>
+        <east/>
+        <far-east/>
+     </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
diff --git a/test/tests/conf/position/position99.xsl b/test/tests/conf/position/position99.xsl
new file mode 100644
index 0000000..fa902bf
--- /dev/null
+++ b/test/tests/conf/position/position99.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: position99 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test count() starting on an element and going upward. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:value-of select="count(ancestor-or-self::node())"/><xsl:text> nodes on this axis:
+</xsl:text>
+      <xsl:apply-templates select="ancestor-or-self::node()" mode="census"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="/" mode="census">
+  <xsl:text>Root Node
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="*" mode="census">
+  <xsl:text>E: </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="@*" mode="census">
+  <xsl:text>A: </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()|comment()|processing-instruction()" mode="census">
+  <xsl:text>ERROR! </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate01.xml b/test/tests/conf/predicate/predicate01.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate01.xsl b/test/tests/conf/predicate/predicate01.xsl
new file mode 100644
index 0000000..015f1c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate01.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion to boolean. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[true()=4]"/>
+    <!-- Always true; positive numbers convert to true. -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate02.xml b/test/tests/conf/predicate/predicate02.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate02.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate02.xsl b/test/tests/conf/predicate/predicate02.xsl
new file mode 100644
index 0000000..eb1b32a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate02.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion to boolean. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[true()='stringwithchars']"/>
+    <!-- Always true; nonzero-length strings convert to true. -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate03.xml b/test/tests/conf/predicate/predicate03.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate03.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate03.xsl b/test/tests/conf/predicate/predicate03.xsl
new file mode 100644
index 0000000..eecee5a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate03.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to boolean. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[true()=following-sibling::*]"/>
+    <!-- Should match 1,2,3 because those nodes have non-empty following-sibling axis. -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate04.xml b/test/tests/conf/predicate/predicate04.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate04.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate04.xsl b/test/tests/conf/predicate/predicate04.xsl
new file mode 100644
index 0000000..1b36b54
--- /dev/null
+++ b/test/tests/conf/predicate/predicate04.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion to number. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[3.0='3.0']"/>
+    <!-- Always true; strings convert to the numbers they look like. -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate05.xml b/test/tests/conf/predicate/predicate05.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate05.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate05.xsl b/test/tests/conf/predicate/predicate05.xsl
new file mode 100644
index 0000000..504252a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate05.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[3=following-sibling::*]"/>
+    <!-- True only when the node containing 3 is one of the following siblings. -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate06.xml b/test/tests/conf/predicate/predicate06.xml
new file mode 100644
index 0000000..3f5acb0
--- /dev/null
+++ b/test/tests/conf/predicate/predicate06.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2
+    <achild>target</achild>
+  </a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate06.xsl b/test/tests/conf/predicate/predicate06.xsl
new file mode 100644
index 0000000..0058c5e
--- /dev/null
+++ b/test/tests/conf/predicate/predicate06.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to string. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a['target'=descendant::*]"/>
+    <!-- True only when the node has a descendant containing "target". -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate07.xml b/test/tests/conf/predicate/predicate07.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate07.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate07.xsl b/test/tests/conf/predicate/predicate07.xsl
new file mode 100644
index 0000000..5157543
--- /dev/null
+++ b/test/tests/conf/predicate/predicate07.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion to number for an inequality test. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[0 &lt; true()]">
+    <!-- Always true; true converts to 1. -->
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate08.xml b/test/tests/conf/predicate/predicate08.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate08.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate08.xsl b/test/tests/conf/predicate/predicate08.xsl
new file mode 100644
index 0000000..917203c
--- /dev/null
+++ b/test/tests/conf/predicate/predicate08.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion to number for an inequality test. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a['3.5' &lt; 4]">
+    <!-- Always true; strings convert to the numbers they look like. -->
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate09.xml b/test/tests/conf/predicate/predicate09.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate09.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate09.xsl b/test/tests/conf/predicate/predicate09.xsl
new file mode 100644
index 0000000..66a1aed
--- /dev/null
+++ b/test/tests/conf/predicate/predicate09.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with an inequality relation. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[3 &lt; following-sibling::*]">
+    <xsl:value-of select="."/>
+    <!-- True only when a node containing a number greater than 3 is one of the following siblings. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate10.xml b/test/tests/conf/predicate/predicate10.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate10.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate10.xsl b/test/tests/conf/predicate/predicate10.xsl
new file mode 100644
index 0000000..46df7bc
--- /dev/null
+++ b/test/tests/conf/predicate/predicate10.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of association of inequality symbols. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[1 &lt; 2 &lt; 3]">
+    <xsl:value-of select="."/>
+    <!-- Always true; (1 &lt; 2 ) converts to true; true converts to 1; and (1 &lt; 3) is true. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate11.xml b/test/tests/conf/predicate/predicate11.xml
new file mode 100644
index 0000000..4303ad4
--- /dev/null
+++ b/test/tests/conf/predicate/predicate11.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2
+    <achild>target</achild>
+  </a>
+  <a>3</a>
+  <a>target</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate11.xsl b/test/tests/conf/predicate/predicate11.xsl
new file mode 100644
index 0000000..35ce77d
--- /dev/null
+++ b/test/tests/conf/predicate/predicate11.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of comparison of 2 node-sets. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[following-sibling::*=descendant::*]"/>
+    <!-- True only when the node has both a descendant and a following sibling containing "target". -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate12.xml b/test/tests/conf/predicate/predicate12.xml
new file mode 100644
index 0000000..db5b6c3
--- /dev/null
+++ b/test/tests/conf/predicate/predicate12.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<doc>
+  <a squish="heavy">1</a>
+  <a>2
+    <achild>target</achild>
+  </a>
+  <a>3</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate12.xsl b/test/tests/conf/predicate/predicate12.xsl
new file mode 100644
index 0000000..c5164b2
--- /dev/null
+++ b/test/tests/conf/predicate/predicate12.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean or. -->
+
+<xsl:template match="doc">
+  <out>
+
+  <xsl:for-each select="a[('target'=descendant::*) or @squish]">
+    <xsl:value-of select="."/>
+    <!-- True only when the node has either a squish attribute or a descendant containing "target". -->
+  </xsl:for-each>
+
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate13.xml b/test/tests/conf/predicate/predicate13.xml
new file mode 100644
index 0000000..ca3d38f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate13.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a squish="heavy">1</a>
+  <a>2
+    <achild>target</achild>
+  </a>
+  <a>3</a>
+  <a>target</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate13.xsl b/test/tests/conf/predicate/predicate13.xsl
new file mode 100644
index 0000000..1845441
--- /dev/null
+++ b/test/tests/conf/predicate/predicate13.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean not compounded with or. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[not(('target'=descendant::*) or @squish)]"/>
+    <!-- True only when the node has neither a squish attribute nor a descendant containing "target". -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate14.xml b/test/tests/conf/predicate/predicate14.xml
new file mode 100644
index 0000000..becef2a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate14.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a squish="heavy" squash="butternut">1</a>
+  <a squish="heavy" squeesh="virus">2</a>
+  <a squash="butternut" squeesh="virus">3</a>
+  <a squish="heavy">4</a>
+  <a squeesh="virus">5</a>
+  <a squash="butternut">6</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate14.xsl b/test/tests/conf/predicate/predicate14.xsl
new file mode 100644
index 0000000..275e38a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate14.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean and, or with parens retaining usual precedence. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[@squeesh or (@squish and @squash)]">
+    <xsl:value-of select="."/>
+    <!-- Should match 1, 2, 3, 5. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate15.xml b/test/tests/conf/predicate/predicate15.xml
new file mode 100644
index 0000000..becef2a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate15.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a squish="heavy" squash="butternut">1</a>
+  <a squish="heavy" squeesh="virus">2</a>
+  <a squash="butternut" squeesh="virus">3</a>
+  <a squish="heavy">4</a>
+  <a squeesh="virus">5</a>
+  <a squash="butternut">6</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate15.xsl b/test/tests/conf/predicate/predicate15.xsl
new file mode 100644
index 0000000..e263ccb
--- /dev/null
+++ b/test/tests/conf/predicate/predicate15.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean and, or with parens overriding precedence. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[(@squeesh or @squish) and @squash]">
+    <xsl:value-of select="."/>
+    <!-- Should match 1, 3. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate16.xml b/test/tests/conf/predicate/predicate16.xml
new file mode 100644
index 0000000..becef2a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate16.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a squish="heavy" squash="butternut">1</a>
+  <a squish="heavy" squeesh="virus">2</a>
+  <a squash="butternut" squeesh="virus">3</a>
+  <a squish="heavy">4</a>
+  <a squeesh="virus">5</a>
+  <a squash="butternut">6</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate16.xsl b/test/tests/conf/predicate/predicate16.xsl
new file mode 100644
index 0000000..d5eb27a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate16.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean and, or without parens. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select="a[@squeesh or @squish and @squash]">
+    <xsl:value-of select="."/>
+    <!-- Should match 1, 2, 3, 5. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate17.xml b/test/tests/conf/predicate/predicate17.xml
new file mode 100644
index 0000000..1d83caa
--- /dev/null
+++ b/test/tests/conf/predicate/predicate17.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <a squish="heavy">1</a>
+  <a>2
+    <achild size="large">child2</achild>
+  </a>
+  <a>3</a>
+  <a attrib="present">4
+    <achild>child4</achild>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate17.xsl b/test/tests/conf/predicate/predicate17.xsl
new file mode 100644
index 0000000..4fbba47
--- /dev/null
+++ b/test/tests/conf/predicate/predicate17.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean not with @* to test for lack of attributes. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a[not(@*)]">
+       <xsl:value-of select="."/>
+	</xsl:for-each>
+    <!-- Should output 2, child2, 3. -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate18.xml b/test/tests/conf/predicate/predicate18.xml
new file mode 100644
index 0000000..a63def0
--- /dev/null
+++ b/test/tests/conf/predicate/predicate18.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>
+    <asub>
+      <asubsub/>
+    </asub>
+  </a>
+  <b>
+    <bsub>
+      <foo>
+        <child/>
+      </foo>
+    </bsub>
+  </b>
+  <c>f-inside</c>
+  <d>
+    <dsub>
+      <dsubsub>
+        <foundnode/>
+      </dsubsub>
+    </dsub>
+  </d>
+  <e>f-inside
+    <esub>
+      f-inside
+    </esub>
+    <esubsib>
+      f-inside
+    </esubsib>
+    f-inside
+  </e>
+  <f>
+    <fsub/>
+  </f>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate18.xsl b/test/tests/conf/predicate/predicate18.xsl
new file mode 100644
index 0000000..692c5f4
--- /dev/null
+++ b/test/tests/conf/predicate/predicate18.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of starts-with on node name. -->
+
+<xsl:template match="doc">
+  <out>
+    <!-- Should match foo, foundnode, f, fsub. -->
+    <xsl:for-each select="*[starts-with(name(.),'f')]">
+       <xsl:value-of select="name(.)"/>
+	</xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate19.xml b/test/tests/conf/predicate/predicate19.xml
new file mode 100644
index 0000000..86b655f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate19.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>
+    <asub>
+      <asubsub/>
+    </asub>
+  </a>
+  <b>
+    <bsub>x</bsub>
+  </b>
+  <c>inside</c>
+  <d>
+    <dsub>
+      <q>
+        <foundnode/>
+      </q>
+    </dsub>
+  </d>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate19.xsl b/test/tests/conf/predicate/predicate19.xsl
new file mode 100644
index 0000000..46cd4f6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate19.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of string-length on node name. -->
+
+<xsl:template match="doc">
+  <out>
+    <!-- Should match a, b, c, d, q. -->
+	<xsl:for-each select="descendant::*[string-length(name(.))=1]">
+    	<xsl:value-of select="name(.)"/>
+	</xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate20.xml b/test/tests/conf/predicate/predicate20.xml
new file mode 100644
index 0000000..3f5acb0
--- /dev/null
+++ b/test/tests/conf/predicate/predicate20.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2
+    <achild>target</achild>
+  </a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate20.xsl b/test/tests/conf/predicate/predicate20.xsl
new file mode 100644
index 0000000..d35f6c8
--- /dev/null
+++ b/test/tests/conf/predicate/predicate20.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to string, ensure = is symmetric. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[descendant::*='target']"/>
+    <!-- True only when the node has a descendant containing "target". -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate21.xml b/test/tests/conf/predicate/predicate21.xml
new file mode 100644
index 0000000..33f758d
--- /dev/null
+++ b/test/tests/conf/predicate/predicate21.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2<achild>target</achild></a>
+  <a>3</a>
+  <a>4<achild>missed</achild></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate21.xsl b/test/tests/conf/predicate/predicate21.xsl
new file mode 100644
index 0000000..6be0563
--- /dev/null
+++ b/test/tests/conf/predicate/predicate21.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to string on != predicate. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a['target'!=descendant::*]">
+      <!-- True only when the node has descendants, but none containing "target". -->
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate22.xml b/test/tests/conf/predicate/predicate22.xml
new file mode 100644
index 0000000..33f758d
--- /dev/null
+++ b/test/tests/conf/predicate/predicate22.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2<achild>target</achild></a>
+  <a>3</a>
+  <a>4<achild>missed</achild></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate22.xsl b/test/tests/conf/predicate/predicate22.xsl
new file mode 100644
index 0000000..312b38b
--- /dev/null
+++ b/test/tests/conf/predicate/predicate22.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to string, and that != is symmetric. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a[descendant::*!='target']">
+      <!-- True only when the node has descendants, but none containing "target". -->
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate23.xml b/test/tests/conf/predicate/predicate23.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate23.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate23.xsl b/test/tests/conf/predicate/predicate23.xsl
new file mode 100644
index 0000000..d250162
--- /dev/null
+++ b/test/tests/conf/predicate/predicate23.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE23 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to boolean, ensure = is symmetric. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a[following-sibling::*=true()]">
+      <!-- Should match 1,2,3 because those nodes have non-empty following-sibling axis. -->
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate24.xml b/test/tests/conf/predicate/predicate24.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate24.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate24.xsl b/test/tests/conf/predicate/predicate24.xsl
new file mode 100644
index 0000000..69c6410
--- /dev/null
+++ b/test/tests/conf/predicate/predicate24.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to boolean with !=, boolean first. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a[false()!=following-sibling::*]">
+      <!-- Should match 1,2,3 because those nodes have non-empty following-sibling axis. -->
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate25.xml b/test/tests/conf/predicate/predicate25.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate25.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate25.xsl b/test/tests/conf/predicate/predicate25.xsl
new file mode 100644
index 0000000..cbc2d09
--- /dev/null
+++ b/test/tests/conf/predicate/predicate25.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE25 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to boolean with !=, boolean last. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a[following-sibling::*!=false()]">
+      <!-- Should match 1,2,3 because those nodes have non-empty following-sibling axis. -->
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate26.xml b/test/tests/conf/predicate/predicate26.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate26.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate26.xsl b/test/tests/conf/predicate/predicate26.xsl
new file mode 100644
index 0000000..e37d528
--- /dev/null
+++ b/test/tests/conf/predicate/predicate26.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE26 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Creator: David Marston -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test of implied conversion of node-set to number, ensure = is symmetric. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a[following-sibling::*=3]">
+      <!-- True only when the node containing 3 is one of the following siblings. -->
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate27.xml b/test/tests/conf/predicate/predicate27.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate27.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate27.xsl b/test/tests/conf/predicate/predicate27.xsl
new file mode 100644
index 0000000..943acc9
--- /dev/null
+++ b/test/tests/conf/predicate/predicate27.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE27 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with a != relation. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select = "a[4 != following-sibling::*]">
+      <xsl:value-of select="."/>
+      <!-- True only when there is a following sibling that does not contain a 4. -->
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate28.xml b/test/tests/conf/predicate/predicate28.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate28.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate28.xsl b/test/tests/conf/predicate/predicate28.xsl
new file mode 100644
index 0000000..09ec002
--- /dev/null
+++ b/test/tests/conf/predicate/predicate28.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE28 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with a != relation. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select = "a[following-sibling::* != 4]">
+      <xsl:value-of select="."/>
+      <!-- True only when there is a following sibling that does not contain a 4. -->
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate29.xml b/test/tests/conf/predicate/predicate29.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate29.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate29.xsl b/test/tests/conf/predicate/predicate29.xsl
new file mode 100644
index 0000000..61e0864
--- /dev/null
+++ b/test/tests/conf/predicate/predicate29.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE29 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with an inequality relation. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[following-sibling::* &lt; 3]">
+    <xsl:value-of select="."/>
+    <!-- True only when one of the following siblings contains a number less than 3. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate30.xml b/test/tests/conf/predicate/predicate30.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate30.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate30.xsl b/test/tests/conf/predicate/predicate30.xsl
new file mode 100644
index 0000000..f51582e
--- /dev/null
+++ b/test/tests/conf/predicate/predicate30.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE30 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with an inequality relation. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[3 &gt;= following-sibling::*]">
+    <xsl:value-of select="."/>
+    <!-- True only when one of the following siblings contains a number less/equal than 3. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate31.xml b/test/tests/conf/predicate/predicate31.xml
new file mode 100644
index 0000000..b6faca4
--- /dev/null
+++ b/test/tests/conf/predicate/predicate31.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+  <a>2</a>
+  <a>2</a>
+  <a>1</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate31.xsl b/test/tests/conf/predicate/predicate31.xsl
new file mode 100644
index 0000000..c10976d
--- /dev/null
+++ b/test/tests/conf/predicate/predicate31.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE31 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with an inequality relation. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[following-sibling::* &gt;= 3]">
+    <xsl:value-of select="."/>
+    <!-- True only when a node containing a number greater/equal than 3 is one of the following siblings. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate32.xml b/test/tests/conf/predicate/predicate32.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate32.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate32.xsl b/test/tests/conf/predicate/predicate32.xsl
new file mode 100644
index 0000000..95dcebf
--- /dev/null
+++ b/test/tests/conf/predicate/predicate32.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE32 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with an inequality relation. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[3 &gt; following-sibling::*]">
+    <xsl:value-of select="."/>
+    <!-- True only when a node containing a number less/equal than 3 is one of the following siblings. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate33.xml b/test/tests/conf/predicate/predicate33.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate33.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate33.xsl b/test/tests/conf/predicate/predicate33.xsl
new file mode 100644
index 0000000..beedd5b
--- /dev/null
+++ b/test/tests/conf/predicate/predicate33.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE33 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with an inequality relation. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[following-sibling::* &gt; 3]">
+    <xsl:value-of select="."/>
+    <!-- True only when a node containing a number greater than 3 is one of the following siblings. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate34.xml b/test/tests/conf/predicate/predicate34.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate34.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate34.xsl b/test/tests/conf/predicate/predicate34.xsl
new file mode 100644
index 0000000..fbec1b5
--- /dev/null
+++ b/test/tests/conf/predicate/predicate34.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE34 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with an inequality relation. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[3 &lt;= following-sibling::*]">
+    <xsl:value-of select="."/>
+    <!-- True only when one of the following siblings contains a number greater than 3. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate35.xml b/test/tests/conf/predicate/predicate35.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate35.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate35.xsl b/test/tests/conf/predicate/predicate35.xsl
new file mode 100644
index 0000000..1254a23
--- /dev/null
+++ b/test/tests/conf/predicate/predicate35.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE35 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of implied conversion of node-set to number with an inequality relation. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[following-sibling::* &lt;= 3]">
+    <xsl:value-of select="."/>
+    <!-- True only when a node containing a number less/equal than 3 is one of the following siblings. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate36.xml b/test/tests/conf/predicate/predicate36.xml
new file mode 100644
index 0000000..35e198f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate36.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a>2</a>
+  <a>3</a>
+  <a>4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate36.xsl b/test/tests/conf/predicate/predicate36.xsl
new file mode 100644
index 0000000..cf36bd8
--- /dev/null
+++ b/test/tests/conf/predicate/predicate36.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE36 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of association of inequality symbols. -->
+
+<xsl:template match="doc">
+  <out>
+  <xsl:for-each select = "a[1 &lt; 3 &lt; 2]">
+    <xsl:value-of select="."/>
+    <!-- Always true; (1 &lt; 3 ) converts to true; true converts to 1; and (1 &lt; 2) is true. -->
+  </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate37.xml b/test/tests/conf/predicate/predicate37.xml
new file mode 100644
index 0000000..0f33594
--- /dev/null
+++ b/test/tests/conf/predicate/predicate37.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<a> 
+  <b>This is a B</b> 
+  <c></c> 
+</a> 
diff --git a/test/tests/conf/predicate/predicate37.xsl b/test/tests/conf/predicate/predicate37.xsl
new file mode 100644
index 0000000..85983a8
--- /dev/null
+++ b/test/tests/conf/predicate/predicate37.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PREDICATE37 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Show that we can limit match to non-empty elements. -->
+
+<xsl:template match="/" >
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a" >
+  <!-- If the node 'a' has a child 'b' that has a value in it,
+  then show it. Otherwise don't show it. -->
+
+  <xsl:if test='b[not(.="")]' >( <xsl:value-of select="b" /> )</xsl:if>
+
+  <!-- If the node 'a' has a child 'c' that has a value in it,
+  then show it. Otherwise don't show it. -->
+
+  <xsl:if test='c[not(.="")]' >( <xsl:value-of select="c" /> )</xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet> 
diff --git a/test/tests/conf/predicate/predicate38.xml b/test/tests/conf/predicate/predicate38.xml
new file mode 100644
index 0000000..be1c249
--- /dev/null
+++ b/test/tests/conf/predicate/predicate38.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<doc>
+	<foo>
+		<bar attr="1">this</bar>
+		<bar attr="2">2</bar>
+		<bar attr="3">3</bar>
+	</foo>
+	<foo>
+		<bar attr="4">this</bar>
+		<bar attr="5">this</bar>
+		<bar1 attr="6">that</bar1>
+	</foo>
+	<foo>
+		<bar attr="7">
+			<baz attr="a">hello</baz>
+			<baz attr="b">goodbye</baz>
+		</bar>
+		<bar2 attr="8">this</bar2>
+		<bar2 attr="9">that</bar2>
+	</foo>
+	<foo>
+		<bar attr="10">this</bar>
+		<bar attr="11">
+			<baz attr="a">hello</baz>
+			<baz attr="b">goodbye</baz>
+		</bar>
+		<bar attr="12">other</bar>
+	</foo>
+</doc>
+
+
+					
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate38.xsl b/test/tests/conf/predicate/predicate38.xsl
new file mode 100644
index 0000000..f8edf36
--- /dev/null
+++ b/test/tests/conf/predicate/predicate38.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" indent="yes"/>
+
+  <!-- FileName: predicate38 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Stress test of nested and multiple predicates. The production rules
+       allow such nesting. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="doc">
+<out>
+  <predicate1>
+   <xsl:apply-templates select="foo[(bar[2])='this']"/>
+  </predicate1>
+  <predicate2>
+   <xsl:apply-templates select="foo[(bar[2][(baz[2])='goodbye'])]"/>
+  </predicate2>
+</out>
+</xsl:template>
+
+<xsl:template match="foo[(bar[2])='this']">
+ <xsl:text>1 is </xsl:text>	<xsl:for-each select="*">
+    	<xsl:value-of select="@attr"/><xsl:text>,</xsl:text>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template match="foo[(bar[(baz[2])='goodbye'])]">
+ <xsl:text>3 is </xsl:text>	<xsl:for-each select="*">
+    	<xsl:value-of select="@attr"/><xsl:text>,</xsl:text>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template match="foo[(bar[2][(baz[2])='goodbye'])]">
+ <xsl:text>2 is </xsl:text>	<xsl:for-each select="*">
+    	<xsl:value-of select="@attr"/><xsl:text>,</xsl:text>
+	</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate39.xml b/test/tests/conf/predicate/predicate39.xml
new file mode 100644
index 0000000..2d74461
--- /dev/null
+++ b/test/tests/conf/predicate/predicate39.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <child1>Text from child1<child2></child2></child1>
+</doc>
diff --git a/test/tests/conf/predicate/predicate39.xsl b/test/tests/conf/predicate/predicate39.xsl
new file mode 100644
index 0000000..ac3d1ef
--- /dev/null
+++ b/test/tests/conf/predicate/predicate39.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate39 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath001 in NIST suite -->
+  <!-- Purpose: Test a predicate that uses the "child" axis. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="child1[child::child2]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate40.xml b/test/tests/conf/predicate/predicate40.xml
new file mode 100644
index 0000000..708bdc0
--- /dev/null
+++ b/test/tests/conf/predicate/predicate40.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>Text from first element
+    <child1>Text from child1 of first element</child1>
+    <child2>Text from child2 of first element</child2>
+  </element1>
+  <element2>Text from second element
+    <child1>Text from child1 of second element</child1>
+    <child2>Text from child2 of second element (correct execution)</child2>
+  </element2>
+</doc>
diff --git a/test/tests/conf/predicate/predicate40.xsl b/test/tests/conf/predicate/predicate40.xsl
new file mode 100644
index 0000000..f95be2e
--- /dev/null
+++ b/test/tests/conf/predicate/predicate40.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate40 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath002 in NIST suite -->
+  <!-- Purpose: Test a predicate that uses the "ancestor" axis. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select = "//child2[ancestor::element2]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate41.xml b/test/tests/conf/predicate/predicate41.xml
new file mode 100644
index 0000000..708bdc0
--- /dev/null
+++ b/test/tests/conf/predicate/predicate41.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>Text from first element
+    <child1>Text from child1 of first element</child1>
+    <child2>Text from child2 of first element</child2>
+  </element1>
+  <element2>Text from second element
+    <child1>Text from child1 of second element</child1>
+    <child2>Text from child2 of second element (correct execution)</child2>
+  </element2>
+</doc>
diff --git a/test/tests/conf/predicate/predicate41.xsl b/test/tests/conf/predicate/predicate41.xsl
new file mode 100644
index 0000000..db49581
--- /dev/null
+++ b/test/tests/conf/predicate/predicate41.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate41 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath003 in NIST suite -->
+  <!-- Purpose: Test a predicate that uses the "ancestor-or-self" axis. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select = "//child2[ancestor-or-self::element2]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate42.xml b/test/tests/conf/predicate/predicate42.xml
new file mode 100644
index 0000000..4507168
--- /dev/null
+++ b/test/tests/conf/predicate/predicate42.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>Text from first element
+    <child1>Text from child1 of first element</child1>
+    <child2>Text from child2 of first element</child2>
+  </element1>
+  <element2>Text from second element
+    <child1>Text from child1 of second element</child1>
+    <child2 attr1="yes">Text from child2 of second element (correct execution)</child2>
+  </element2>
+</doc>
diff --git a/test/tests/conf/predicate/predicate42.xsl b/test/tests/conf/predicate/predicate42.xsl
new file mode 100644
index 0000000..ab27dd7
--- /dev/null
+++ b/test/tests/conf/predicate/predicate42.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate42 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath004 in NIST suite -->
+  <!-- Purpose: Test a predicate that uses the "attribute" axis. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select = "//child2[attribute::attr1]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate43.xml b/test/tests/conf/predicate/predicate43.xml
new file mode 100644
index 0000000..fd44cd9
--- /dev/null
+++ b/test/tests/conf/predicate/predicate43.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>Text from first element (correct execution)<child1>
+    </child1><child2></child2></element1>
+  <element1>Text from second element
+    <child1>Text from child1 of second element</child1>
+  </element1>
+</doc>
diff --git a/test/tests/conf/predicate/predicate43.xsl b/test/tests/conf/predicate/predicate43.xsl
new file mode 100644
index 0000000..7d7e305
--- /dev/null
+++ b/test/tests/conf/predicate/predicate43.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate43 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath005 in NIST suite -->
+  <!-- Purpose: Test a predicate that uses the "descendant-or-self" axis. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select = "element1[descendant-or-self::child2]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate44.xml b/test/tests/conf/predicate/predicate44.xml
new file mode 100644
index 0000000..f22acb0
--- /dev/null
+++ b/test/tests/conf/predicate/predicate44.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>
+    <child1>Test executed successfully</child1>
+    <child2>child2</child2>
+  </element1>
+  <element2>
+    <child1>Wrong node selected!!</child1>
+  </element2>
+  <element3>
+    <child1>Wrong node selected!!</child1>
+  </element3>
+</doc>
diff --git a/test/tests/conf/predicate/predicate44.xsl b/test/tests/conf/predicate/predicate44.xsl
new file mode 100644
index 0000000..3ce021f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate44.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate44 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath006 in NIST suite -->
+  <!-- Purpose: Test a predicate that uses the "parent" axis. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select = "//child1[parent::element1]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate45.xml b/test/tests/conf/predicate/predicate45.xml
new file mode 100644
index 0000000..277aaa5
--- /dev/null
+++ b/test/tests/conf/predicate/predicate45.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>Wrong node selected!!</element1>
+  <element1>Test executed successfully</element1>
+  <element1>Wrong node selected!!</element1>
+</doc>
diff --git a/test/tests/conf/predicate/predicate45.xsl b/test/tests/conf/predicate/predicate45.xsl
new file mode 100644
index 0000000..ce5371c
--- /dev/null
+++ b/test/tests/conf/predicate/predicate45.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate45 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath007 in NIST suite -->
+  <!-- Purpose: Test a predicate that uses elaborate complex expressions -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select = "element1[(((((2*10)-4)+9) div 5) mod 3 )]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate46.xml b/test/tests/conf/predicate/predicate46.xml
new file mode 100644
index 0000000..277aaa5
--- /dev/null
+++ b/test/tests/conf/predicate/predicate46.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>Wrong node selected!!</element1>
+  <element1>Test executed successfully</element1>
+  <element1>Wrong node selected!!</element1>
+</doc>
diff --git a/test/tests/conf/predicate/predicate46.xsl b/test/tests/conf/predicate/predicate46.xsl
new file mode 100644
index 0000000..4c4199a
--- /dev/null
+++ b/test/tests/conf/predicate/predicate46.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate46 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath008 in NIST suite -->
+  <!-- Purpose: Test a predicate that uses math functions. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select = "element1[(((((2*10)-4)+9) div 5) mod floor(3))]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate47.xml b/test/tests/conf/predicate/predicate47.xml
new file mode 100644
index 0000000..277aaa5
--- /dev/null
+++ b/test/tests/conf/predicate/predicate47.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <element1>Wrong node selected!!</element1>
+  <element1>Test executed successfully</element1>
+  <element1>Wrong node selected!!</element1>
+</doc>
diff --git a/test/tests/conf/predicate/predicate47.xsl b/test/tests/conf/predicate/predicate47.xsl
new file mode 100644
index 0000000..542c9a5
--- /dev/null
+++ b/test/tests/conf/predicate/predicate47.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: predicate47 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: Carmelo Montanez --><!-- LocationPath009 in NIST suite -->
+  <!-- Purpose: Test a predicate that only has a math function call. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select = "element1[floor(2)]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate48.xml b/test/tests/conf/predicate/predicate48.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate48.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate48.xsl b/test/tests/conf/predicate/predicate48.xsl
new file mode 100755
index 0000000..5d88e0f
--- /dev/null
+++ b/test/tests/conf/predicate/predicate48.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate48 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test (a and b) combination of logical expressions in a predicate. -->
+  <!-- Author: Morten Jorgensen -->
+
+<xsl:template match="foo">
+<out>
+  <test-info>(a and b)</test-info>
+  <test-output>
+  <xsl:for-each select="bar[@a='1' and @b='1']">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate49.xml b/test/tests/conf/predicate/predicate49.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate49.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate49.xsl b/test/tests/conf/predicate/predicate49.xsl
new file mode 100755
index 0000000..533f85b
--- /dev/null
+++ b/test/tests/conf/predicate/predicate49.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate49 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test ((a or b) and c) combination of logical expressions in a predicate -->
+  <!-- Author: Morten Jorgensen -->
+
+<xsl:template match="foo">
+<out>
+  <test-info>((a or b) and c)</test-info>
+  <test-output>
+  <xsl:for-each select="bar[(@a='1' or @b='1') and @c='1']">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate50.xml b/test/tests/conf/predicate/predicate50.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate50.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate50.xsl b/test/tests/conf/predicate/predicate50.xsl
new file mode 100755
index 0000000..3a9dd51
--- /dev/null
+++ b/test/tests/conf/predicate/predicate50.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate50 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test (a and (b or c) and d) combination of logical expressions in a predicate -->
+  <!-- Author: Morten Jorgensen -->
+
+<xsl:template match="foo">
+<out>
+  <test-info>(a and (b or c) and d)</test-info>
+  <test-output>
+  <xsl:for-each select="bar[@a='1' and (@b='1' or @c='1') and @d='1']">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate51.xml b/test/tests/conf/predicate/predicate51.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate51.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate51.xsl b/test/tests/conf/predicate/predicate51.xsl
new file mode 100755
index 0000000..374c874
--- /dev/null
+++ b/test/tests/conf/predicate/predicate51.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate51 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test (a and b or c and d) combination of logical expressions in a predicate -->
+  <!-- Author: Morten Jorgensen -->
+
+<xsl:template match="foo">
+<out>
+  <test-info>(a and b or c and d)</test-info>
+  <test-output>
+  <xsl:for-each select="bar[@a='1' and @b='1' or @c='1' and @d='1']">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate52.xml b/test/tests/conf/predicate/predicate52.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate52.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate52.xsl b/test/tests/conf/predicate/predicate52.xsl
new file mode 100755
index 0000000..9d0a90b
--- /dev/null
+++ b/test/tests/conf/predicate/predicate52.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate52 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test ((a and b) or (c and d)) combination of logical expressions in a predicate -->
+  <!-- Author: Morten Jorgensen -->
+
+<xsl:template match="foo">
+<out>
+  <test-info>((a and b) or (c and d))</test-info>
+  <test-output>
+  <xsl:for-each select="bar[(@a='1' and @b='1') or (@c='1' and @d='1')]">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate53.xml b/test/tests/conf/predicate/predicate53.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate53.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate53.xsl b/test/tests/conf/predicate/predicate53.xsl
new file mode 100755
index 0000000..cd131f2
--- /dev/null
+++ b/test/tests/conf/predicate/predicate53.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate53 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test (a or (b and c) or d) combination of logical expressions in a predicate-->
+  <!-- Author: Morten Jorgensen -->
+
+<xsl:template match="foo">
+<out>
+  <test-info>(a or (b and c) or d)</test-info>
+  <test-output>
+  <xsl:for-each select="bar[@a='1' or (@b='1' and @c='1') or @d='1']">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate54.xml b/test/tests/conf/predicate/predicate54.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate54.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate54.xsl b/test/tests/conf/predicate/predicate54.xsl
new file mode 100755
index 0000000..0e7a316
--- /dev/null
+++ b/test/tests/conf/predicate/predicate54.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate54 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test ((a or b) and (c or d)) combination of logical expressions in a predicate-->
+
+<xsl:template match="foo">
+<out>
+  <test-info>((a or b) and (c or d))</test-info>
+  <test-output>
+  <xsl:for-each select="bar[(@a='1' or @b='1') and (@c='1' or @d='1')]">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate55.xml b/test/tests/conf/predicate/predicate55.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate55.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate55.xsl b/test/tests/conf/predicate/predicate55.xsl
new file mode 100755
index 0000000..41e34fb
--- /dev/null
+++ b/test/tests/conf/predicate/predicate55.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate55 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test (a or b and c or d) combination of logical expressions in a predicate-->
+  <!-- Author: Morten Jorgensen -->
+
+<xsl:template match="foo">
+<out>
+  <test-info>(a or b and c or d)</test-info>
+  <test-output>
+  <xsl:for-each select="bar[@a='1' or @b='1' and @c='1' or @d='1']">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate56.xml b/test/tests/conf/predicate/predicate56.xml
new file mode 100755
index 0000000..c9860c6
--- /dev/null
+++ b/test/tests/conf/predicate/predicate56.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<foo>
+
+  <bar a="0" b="0" c="0" d="0" seq="0"/>
+  <bar a="0" b="0" c="0" d="1" seq="1"/>
+  <bar a="0" b="0" c="1" d="0" seq="2"/>
+  <bar a="0" b="0" c="1" d="1" seq="3"/>
+  <bar a="0" b="1" c="0" d="0" seq="4"/>
+  <bar a="0" b="1" c="0" d="1" seq="5"/>
+  <bar a="0" b="1" c="1" d="0" seq="6"/>
+  <bar a="0" b="1" c="1" d="1" seq="7"/>
+  <bar a="1" b="0" c="0" d="0" seq="8"/>
+  <bar a="1" b="0" c="0" d="1" seq="9"/>
+  <bar a="1" b="0" c="1" d="0" seq="a"/>
+  <bar a="1" b="0" c="1" d="1" seq="b"/>
+  <bar a="1" b="1" c="0" d="0" seq="c"/>
+  <bar a="1" b="1" c="0" d="1" seq="d"/>
+  <bar a="1" b="1" c="1" d="0" seq="e"/>
+  <bar a="1" b="1" c="1" d="1" seq="f"/>
+
+</foo>
diff --git a/test/tests/conf/predicate/predicate56.xsl b/test/tests/conf/predicate/predicate56.xsl
new file mode 100755
index 0000000..393f557
--- /dev/null
+++ b/test/tests/conf/predicate/predicate56.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- FileName: predicate56 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test (a or b or c) combination of logical expressions in a predicate-->
+  <!-- Author: Morten Jorgensen -->
+
+<xsl:template match="foo">
+<out>
+  <test-info>(a or b or c)</test-info>
+  <test-output>
+  <xsl:for-each select="bar[@a='1' or @b='1' or @c='1']">
+    <xsl:value-of select="@seq"/><xsl:text> </xsl:text>
+  </xsl:for-each>
+  </test-output>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate57.xml b/test/tests/conf/predicate/predicate57.xml
new file mode 100644
index 0000000..fa0e84e
--- /dev/null
+++ b/test/tests/conf/predicate/predicate57.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<table>
+<tr><td>1.1</td><td>1.2</td></tr>
+<tr><td>2.1</td><td>2.2</td><td>2.3</td></tr>
+<tr><td>3.1</td><td>3.2<td>3.2.1</td></td></tr>
+<tr><td>4<td>4.1<td>4.1.1</td></td></td></tr>
+<tr><td>5.1</td><td>5.2</td><td>5.3</td><td>5.4</td></tr>
+<tr><ta/><td>6.1</td><td>6.2</td></tr>
+<tr><ta/><td>7.1</td><td>7.2</td><td>7.3</td></tr>
+<tr><ta/><td>8.1</td><td>8.2</td><td>8.3</td><td>8.4</td></tr>
+</table>
diff --git a/test/tests/conf/predicate/predicate57.xsl b/test/tests/conf/predicate/predicate57.xsl
new file mode 100644
index 0000000..875f9b5
--- /dev/null
+++ b/test/tests/conf/predicate/predicate57.xsl
@@ -0,0 +1,52 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <!-- FileName: predicate57 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston, based on an idea by Mukund Raghavachari -->
+  <!-- Purpose: Test use of count() in a predicate to count children. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>tr nodes: </xsl:text><xsl:value-of select="count(//tr)"/>
+    <xsl:text>, tr nodes with 3 td children: </xsl:text>
+    <xsl:value-of select="count(//tr[count(./td) = 3])"/><xsl:text>
+</xsl:text>
+    <nodes>
+      <xsl:for-each select="//tr[count(./td) = 3]">
+        <xsl:for-each select="td">
+          <xsl:value-of select="."/>
+          <xsl:if test="following-sibling::td">
+            <xsl:text>, </xsl:text>
+          </xsl:if>
+        </xsl:for-each><xsl:text>
+  </xsl:text>
+      </xsl:for-each>
+    </nodes>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/predicate/predicate58.xml b/test/tests/conf/predicate/predicate58.xml
new file mode 100644
index 0000000..e7f9c0c
--- /dev/null
+++ b/test/tests/conf/predicate/predicate58.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>1</a>
+  <a ex="">2</a>
+  <a ex="value">3</a>
+  <a why="">4</a>
+  <a why="value">5</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/predicate/predicate58.xsl b/test/tests/conf/predicate/predicate58.xsl
new file mode 100644
index 0000000..974fe93
--- /dev/null
+++ b/test/tests/conf/predicate/predicate58.xsl
@@ -0,0 +1,56 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <!-- FileName: predicate58 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Compare non-existent attributes to ones containing the null string. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>has ex: </xsl:text><xsl:value-of select="count(a[@ex])"/>
+    <xsl:text>
+has ex, eq null: </xsl:text><xsl:value-of select="count(a[@ex=''])"/>
+    <xsl:text>
+has ex, measure null: </xsl:text><xsl:value-of select="count(a[string-length(@ex)=0])"/>
+    <xsl:text>
+has ex, neq null: </xsl:text><xsl:value-of select="count(a[@ex!=''])"/>
+    <xsl:text>
+has ex, measure non-null: </xsl:text><xsl:value-of select="count(a[string-length(@ex) &gt; 0])"/>
+    <xsl:text>
+not has ex: </xsl:text><xsl:value-of select="count(a[not(@ex)])"/>
+    <xsl:text>
+not has ex, eq null: </xsl:text><xsl:value-of select="count(a[not(@ex='')])"/>
+    <xsl:text>
+not has ex, measure null: </xsl:text><xsl:value-of select="count(a[not(string-length(@ex)=0)])"/>
+    <xsl:text>
+has why, eq value: </xsl:text><xsl:value-of select="count(a[@why='value'])"/>
+    <xsl:text>
+has why, neq value: </xsl:text><xsl:value-of select="count(a[@why!='value'])"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/processorinfo/processorinfo03.xml b/test/tests/conf/processorinfo/processorinfo03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/processorinfo/processorinfo03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/processorinfo/processorinfo03.xsl b/test/tests/conf/processorinfo/processorinfo03.xsl
new file mode 100644
index 0000000..21a6302
--- /dev/null
+++ b/test/tests/conf/processorinfo/processorinfo03.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PROP03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Test the xsl:vendor-url system property -->
+
+<xsl:template match="doc">
+  <out>
+	<xsl:if test="contains(system-property('xsl:vendor-url'), 'http://xml.apache.org/xalan-')">
+		<xsl:value-of select="'Xalan_URL_found'"/>
+	</xsl:if>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/final_imported.xsl b/test/tests/conf/reluri/final_imported.xsl
new file mode 100644
index 0000000..baf4952
--- /dev/null
+++ b/test/tests/conf/reluri/final_imported.xsl
@@ -0,0 +1,27 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="four-tag">
+  From stylesheet final_imported.xsl: <xsl:value-of select="self::node()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/final_included.xsl b/test/tests/conf/reluri/final_included.xsl
new file mode 100644
index 0000000..3081c67
--- /dev/null
+++ b/test/tests/conf/reluri/final_included.xsl
@@ -0,0 +1,27 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="four-tag">
+  From stylesheet final_included.xsl: <xsl:value-of select="self::node()"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level1_import1.xsl b/test/tests/conf/reluri/level1/level1_import1.xsl
new file mode 100644
index 0000000..986cd67
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level1_import1.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="level2/level2_import1.xsl"/>
+
+<xsl:template match="one-tag">
+  From stylesheet level1_import1.xsl: <xsl:value-of select="self::node()"/>
+  importing level2_import1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level1_import2.xsl b/test/tests/conf/reluri/level1/level1_import2.xsl
new file mode 100644
index 0000000..19644bb
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level1_import2.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="level2/level2_include1.xsl"/>
+
+<xsl:template match="one-tag">
+  From stylesheet level1_import2.xsl: <xsl:value-of select="self::node()"/>
+  importing level2_include1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level1_import3.xsl b/test/tests/conf/reluri/level1/level1_import3.xsl
new file mode 100644
index 0000000..f0b7a4d
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level1_import3.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="level2/level2_import3.xsl"/>
+
+<xsl:template match="one-tag">
+  From stylesheet level1_import3.xsl: <xsl:value-of select="self::node()"/>
+  importing level2_import3.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level1_import4.xsl b/test/tests/conf/reluri/level1/level1_import4.xsl
new file mode 100644
index 0000000..56446f0
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level1_import4.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="level2/level2_include3.xsl"/>
+
+<xsl:template match="one-tag">
+  From stylesheet level1_import4.xsl: <xsl:value-of select="self::node()"/>
+  importing level2_include3.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level1_include1.xsl b/test/tests/conf/reluri/level1/level1_include1.xsl
new file mode 100644
index 0000000..5a46125
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level1_include1.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="level2/level2_import2.xsl"/>
+
+<xsl:template match="one-tag">
+  From stylesheet level1_include1.xsl: <xsl:value-of select="self::node()"/>
+  Including level2_import2.xsl 
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level1_include2.xsl b/test/tests/conf/reluri/level1/level1_include2.xsl
new file mode 100644
index 0000000..516a1c4
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level1_include2.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="level2/level2_include2.xsl"/>
+
+<xsl:template match="one-tag">
+  From stylesheet level1_include2.xsl: <xsl:value-of select="self::node()"/>
+  Including level2_include2.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level1_include3.xsl b/test/tests/conf/reluri/level1/level1_include3.xsl
new file mode 100644
index 0000000..a46e513
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level1_include3.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="level2/level2_import4.xsl"/>
+
+<xsl:template match="one-tag">
+  From stylesheet level1_include3.xsl: <xsl:value-of select="self::node()"/>
+  Including level2_import4.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level1_include4.xsl b/test/tests/conf/reluri/level1/level1_include4.xsl
new file mode 100644
index 0000000..c05f001
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level1_include4.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="level2/level2_include4.xsl"/>
+
+<xsl:template match="one-tag">
+  From stylesheet level1_include4.xsl: <xsl:value-of select="self::node()"/>
+  Including level2_include4.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level2_import1.xsl b/test/tests/conf/reluri/level1/level2/level2_import1.xsl
new file mode 100644
index 0000000..7a63c65
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level2_import1.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="level3/level3_import1.xsl"/>
+
+<xsl:template match="two-tag">
+  From stylesheet level2_import1.xsl: <xsl:value-of select="self::node()"/>
+  importing level3_import1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level2_import2.xsl b/test/tests/conf/reluri/level1/level2/level2_import2.xsl
new file mode 100644
index 0000000..a5068cd
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level2_import2.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="level3/level3_import1.xsl"/>
+
+<xsl:template match="two-tag">
+  From stylesheet level2_import2.xsl: <xsl:value-of select="self::node()"/>
+  importing level3_import1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level2_import3.xsl b/test/tests/conf/reluri/level1/level2/level2_import3.xsl
new file mode 100644
index 0000000..b77c2b9
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level2_import3.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="level3/level3_include1.xsl"/>
+
+<xsl:template match="two-tag">
+  From stylesheet level2_import3.xsl: <xsl:value-of select="self::node()"/>
+  importing level3_include1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level2_import4.xsl b/test/tests/conf/reluri/level1/level2/level2_import4.xsl
new file mode 100644
index 0000000..22952a0
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level2_import4.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="level3/level3_include1.xsl"/>
+
+<xsl:template match="two-tag">
+  From stylesheet level2_import4.xsl: <xsl:value-of select="self::node()"/>
+  importing level3_include1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level2_include1.xsl b/test/tests/conf/reluri/level1/level2/level2_include1.xsl
new file mode 100644
index 0000000..50458ac
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level2_include1.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="level3/level3_import1.xsl"/>
+
+<xsl:template match="two-tag">
+  From stylesheet level2_include1.xsl: <xsl:value-of select="self::node()"/>
+  Including level3_import1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level2_include2.xsl b/test/tests/conf/reluri/level1/level2/level2_include2.xsl
new file mode 100644
index 0000000..531c2d6
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level2_include2.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="level3/level3_import1.xsl"/>
+
+<xsl:template match="two-tag">
+  From stylesheet level2_include2.xsl: <xsl:value-of select="self::node()"/>
+  Including level3_import1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level2_include3.xsl b/test/tests/conf/reluri/level1/level2/level2_include3.xsl
new file mode 100644
index 0000000..f7dab12
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level2_include3.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="level3/level3_include1.xsl"/>
+
+<xsl:template match="two-tag">
+  From stylesheet level2_include3.xsl: <xsl:value-of select="self::node()"/>
+  Including level3_include1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level2_include4.xsl b/test/tests/conf/reluri/level1/level2/level2_include4.xsl
new file mode 100644
index 0000000..349eb41
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level2_include4.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="level3/level3_include1.xsl"/>
+
+<xsl:template match="two-tag">
+  From stylesheet level2_include4.xsl: <xsl:value-of select="self::node()"/>
+  Including level3_include1.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level3/level3_import1.xsl b/test/tests/conf/reluri/level1/level2/level3/level3_import1.xsl
new file mode 100644
index 0000000..2cb543a
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level3/level3_import1.xsl
@@ -0,0 +1,31 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="../../../final_imported.xsl"/>
+
+<xsl:template match="three-tag">
+  From  stylesheet level3_import1.xsl: <xsl:value-of select="self::node()"/>
+  importing final_imported.xsl
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level3/level3_include1.xsl b/test/tests/conf/reluri/level1/level2/level3/level3_include1.xsl
new file mode 100644
index 0000000..1626db3
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level3/level3_include1.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:include href="../../../final_included.xsl"/>
+
+<xsl:template match="three-tag">
+  From stylesheet level3_include1.xsl: <xsl:value-of select="self::node()"/>
+  Including final_included.xsl
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/level1/level2/level3/xreluri09a.xml b/test/tests/conf/reluri/level1/level2/level3/xreluri09a.xml
new file mode 100644
index 0000000..6360c54
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/level3/xreluri09a.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<first>
+	<body>Watching the game, having a bud</body>
+</first>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/level1/level2/xreluri09b.xml b/test/tests/conf/reluri/level1/level2/xreluri09b.xml
new file mode 100644
index 0000000..f8a6c80
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/xreluri09b.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!-- This file is used by reluri09. Do not remove from this directory. -->
+<first>
+	<body>Hey</body>
+</first>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/level1/level2/xreluri10b.xml b/test/tests/conf/reluri/level1/level2/xreluri10b.xml
new file mode 100644
index 0000000..f254f7a
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/xreluri10b.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!-- This file is used by reluri10. Do not remove from this directory. -->
+<first>
+  <body>Not for display</body>
+</first>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/level1/level2/xreluri11b.xml b/test/tests/conf/reluri/level1/level2/xreluri11b.xml
new file mode 100644
index 0000000..93e9896
--- /dev/null
+++ b/test/tests/conf/reluri/level1/level2/xreluri11b.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!-- This file is used by reluri11. Do not remove from this directory. -->
+<doc>
+  <filename>level3/xreluri09a.xml</filename>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri01.xml b/test/tests/conf/reluri/reluri01.xml
new file mode 100644
index 0000000..8a7b9bc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+		 <three-tag>Text of three-tag</three-tag>
+		 <four-tag>Text of four-tag</four-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri01.xsl b/test/tests/conf/reluri/reluri01.xsl
new file mode 100644
index 0000000..edd1dfd
--- /dev/null
+++ b/test/tests/conf/reluri/reluri01.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.2 Base URI (Stylesheet import/Inclusion) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This test verifies correct URI resolution with relative URI's. --> 
+  <!-- Case: import, import, import import-->
+
+<xsl:import href="level1/level1_import1.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+Case of: import, import, import import
+  importing level1_import1.xsl
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri02.xml b/test/tests/conf/reluri/reluri02.xml
new file mode 100644
index 0000000..8a7b9bc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri02.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+		 <three-tag>Text of three-tag</three-tag>
+		 <four-tag>Text of four-tag</four-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri02.xsl b/test/tests/conf/reluri/reluri02.xsl
new file mode 100644
index 0000000..9f65342
--- /dev/null
+++ b/test/tests/conf/reluri/reluri02.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.2 Base URI (Stylesheet import/Inclusion) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This test verifies correct URI resolution with relative URI's. --> 
+  <!-- Case: import, import, include, import -->
+
+<xsl:import href="level1/level1_import2.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+Case of: import, import, include, import
+  importing level1_import2.xsl
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri03.xml b/test/tests/conf/reluri/reluri03.xml
new file mode 100644
index 0000000..8a7b9bc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri03.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+		 <three-tag>Text of three-tag</three-tag>
+		 <four-tag>Text of four-tag</four-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri03.xsl b/test/tests/conf/reluri/reluri03.xsl
new file mode 100644
index 0000000..c5d9b52
--- /dev/null
+++ b/test/tests/conf/reluri/reluri03.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.2 Base URI (Stylesheet import/Inclusion) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This test verifies correct URI resolution with relative URI's. --> 
+  <!-- Case: import, include, import, import -->
+
+<xsl:import href="level1/level1_include1.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+Case of: import, include, import, import
+  importing level1_include1.xsl
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri04.xml b/test/tests/conf/reluri/reluri04.xml
new file mode 100644
index 0000000..8a7b9bc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri04.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+		 <three-tag>Text of three-tag</three-tag>
+		 <four-tag>Text of four-tag</four-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri04.xsl b/test/tests/conf/reluri/reluri04.xsl
new file mode 100644
index 0000000..4c324cf
--- /dev/null
+++ b/test/tests/conf/reluri/reluri04.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.2 Base URI (Stylesheet import/Inclusion) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This test verifies correct URI resolution with relative URI's. --> 
+  <!-- Case: import, include, include, import -->
+
+<xsl:import href="level1/level1_include2.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+Case of: import, include, include, import
+  importing level1_include2.xsl
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri05.xml b/test/tests/conf/reluri/reluri05.xml
new file mode 100644
index 0000000..8a7b9bc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri05.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+		 <three-tag>Text of three-tag</three-tag>
+		 <four-tag>Text of four-tag</four-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri05.xsl b/test/tests/conf/reluri/reluri05.xsl
new file mode 100644
index 0000000..d516747
--- /dev/null
+++ b/test/tests/conf/reluri/reluri05.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.2 Base URI (Stylesheet import/Inclusion) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This test verifies correct URI resolution with relative URI's. --> 
+  <!-- Case: include, import, import, include -->
+
+<xsl:include href="level1/level1_import3.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+Case of: include, import, import, include
+  Including level1_import3.xsl
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri06.xml b/test/tests/conf/reluri/reluri06.xml
new file mode 100644
index 0000000..8a7b9bc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri06.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+		 <three-tag>Text of three-tag</three-tag>
+		 <four-tag>Text of four-tag</four-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri06.xsl b/test/tests/conf/reluri/reluri06.xsl
new file mode 100644
index 0000000..16b682e
--- /dev/null
+++ b/test/tests/conf/reluri/reluri06.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.2 Base URI (Stylesheet import/Inclusion) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This test verifies correct URI resolution with relative URI's. --> 
+  <!-- Case: include, import, include, include -->
+
+<xsl:include href="level1/level1_import4.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+Case of: include, import, include, include
+  Including level1_import4.xsl
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri07.xml b/test/tests/conf/reluri/reluri07.xml
new file mode 100644
index 0000000..8a7b9bc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri07.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+		 <three-tag>Text of three-tag</three-tag>
+		 <four-tag>Text of four-tag</four-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri07.xsl b/test/tests/conf/reluri/reluri07.xsl
new file mode 100644
index 0000000..9e14def
--- /dev/null
+++ b/test/tests/conf/reluri/reluri07.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.2 Base URI (Stylesheet import/Inclusion) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This test verifies correct URI resolution with relative URI's. --> 
+  <!-- Case: include, include, import, include -->
+
+<xsl:include href="level1/level1_include3.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+Case of: include, include, import, include
+  Including level1_include3.xsl
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri08.xml b/test/tests/conf/reluri/reluri08.xml
new file mode 100644
index 0000000..8a7b9bc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri08.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<root-tag>
+		 <one-tag>Text of one-tag</one-tag>
+		 <two-tag>Text of two-tag</two-tag>
+		 <three-tag>Text of three-tag</three-tag>
+		 <four-tag>Text of four-tag</four-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conf/reluri/reluri08.xsl b/test/tests/conf/reluri/reluri08.xsl
new file mode 100644
index 0000000..20491b4
--- /dev/null
+++ b/test/tests/conf/reluri/reluri08.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.2 Base URI (Stylesheet import/Inclusion) -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: This test verifies correct URI resolution with relative URI's. --> 
+  <!-- Case: include, include, include, include -->
+
+<xsl:include href="level1/level1_include4.xsl"/>
+
+<xsl:template match="root-tag">
+ <out>
+Case of: include, include, include, include
+  Including level1_include4.xsl
+  <xsl:apply-templates/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri09.xml b/test/tests/conf/reluri/reluri09.xml
new file mode 100644
index 0000000..d4141b2
--- /dev/null
+++ b/test/tests/conf/reluri/reluri09.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<doc>
+<defaultcontent>
+	<section>1</section>
+	<section>2</section>
+	<section>3</section>
+	<section>4</section>
+	<section>5</section>
+	<section>6</section>
+</defaultcontent>
+</doc>
diff --git a/test/tests/conf/reluri/reluri09.xsl b/test/tests/conf/reluri/reluri09.xsl
new file mode 100644
index 0000000..c5031c8
--- /dev/null
+++ b/test/tests/conf/reluri/reluri09.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Testing document() function with two arguments: string, node-set: 
+       verifying that a relative URL specified in first argument is resolved based
+	   on base URI of document in second argument nodeset. -->
+
+<xsl:output indent="yes"/>
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:copy-of select="document('level3/xreluri09a.xml',document('level1/level2/xreluri09b.xml'))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri10.xml b/test/tests/conf/reluri/reluri10.xml
new file mode 100644
index 0000000..fb4172a
--- /dev/null
+++ b/test/tests/conf/reluri/reluri10.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <filename>level3/xreluri09a.xml</filename>
+</doc>
diff --git a/test/tests/conf/reluri/reluri10.xsl b/test/tests/conf/reluri/reluri10.xsl
new file mode 100644
index 0000000..7546d25
--- /dev/null
+++ b/test/tests/conf/reluri/reluri10.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Testing document() function with two arguments: node-set, node-set: 
+       verifying that a relative URL specified in first argument is resolved based
+	   on base URI of document in second argument nodeset. -->
+
+<xsl:output indent="yes"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:copy-of select="document(filename,document('level1/level2/xreluri10b.xml'))/*/body"/>
+    <!-- xsl:copy-of select="document('level1/level2/xreluri10b.xml')/*/body"/ -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/reluri/reluri11.xml b/test/tests/conf/reluri/reluri11.xml
new file mode 100644
index 0000000..ffad6eb
--- /dev/null
+++ b/test/tests/conf/reluri/reluri11.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <filename>level1/level2/xreluri10b.xml</filename>
+  <!-- The above file is the WRONG one, placed here as a trap. -->
+  <body>Mowing the lawn, wishing I had the right node-set.</body>
+</doc>
diff --git a/test/tests/conf/reluri/reluri11.xsl b/test/tests/conf/reluri/reluri11.xsl
new file mode 100644
index 0000000..51636dc
--- /dev/null
+++ b/test/tests/conf/reluri/reluri11.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: reluri11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: Myriam Midy -->
+  <!-- Purpose: Testing how a relative URI specified in document() is resolved by default. -->
+  <!-- Elaboration: "If the second argument [to document()] is omitted,
+     then it [the base URI for resolving the relative URI] defaults to
+     the node in the stylesheet that contains the expression 
+     that includes the call to the document function." The inner call to document, using
+     a filename argument rather than a node-set, opens the designated file and gets a node-set
+     whose base is that file (or the directory containing it). Further pathing within the
+     node-set results in a filename element that contains "level3/xreluri09a.xml" as text.
+     The outer call to document() is getting a node-set with a base URI that is not the same as
+     this stylesheet nor the reluri11.xml supplied as an argument. Thus, the relative path
+     beginning with level3/... (from the inner document call) can only be resolved if
+     the outer document() call obtained the base URI of the node-set it was passed as
+     its (one) argument. The node-set derived from the file named by the filename has the
+     necessary 'body' element. -->
+
+<xsl:output method="xml" indent="yes"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:copy-of select="document(document('level1/level2/xreluri11b.xml')/*/filename)/*/body"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select01.xml b/test/tests/conf/select/select01.xml
new file mode 100644
index 0000000..cab4c62
--- /dev/null
+++ b/test/tests/conf/select/select01.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a><b attr="test"/></a>
+  <c>
+    <d>
+      <e/>
+    </d>
+  </c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select01.xsl b/test/tests/conf/select/select01.xsl
new file mode 100644
index 0000000..9a6a9d6
--- /dev/null
+++ b/test/tests/conf/select/select01.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for absolute path selection.-->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="doc/c/d/e">
+      <xsl:value-of select="/doc/a/b/@attr"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select02.xml b/test/tests/conf/select/select02.xml
new file mode 100644
index 0000000..acb837d
--- /dev/null
+++ b/test/tests/conf/select/select02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select02.xsl b/test/tests/conf/select/select02.xsl
new file mode 100644
index 0000000..9dd67f2
--- /dev/null
+++ b/test/tests/conf/select/select02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of current() function - just select it. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="current()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select03.xml b/test/tests/conf/select/select03.xml
new file mode 100644
index 0000000..f67c222
--- /dev/null
+++ b/test/tests/conf/select/select03.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">
+    <item type="z">a</item>
+    <item type="c">b</item>
+    <item type="x">c</item>
+  </foo>
+  <foo name="y">
+    <item type="y">d</item>
+    <item type="h">e</item>
+    <item type="k">f</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select03.xsl b/test/tests/conf/select/select03.xsl
new file mode 100644
index 0000000..3983cf9
--- /dev/null
+++ b/test/tests/conf/select/select03.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for select in for-each and current(). -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="foo">
+      <xsl:copy-of select="//item[@type=current()/@name]"/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select04.xml b/test/tests/conf/select/select04.xml
new file mode 100644
index 0000000..99b0fb9
--- /dev/null
+++ b/test/tests/conf/select/select04.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- to test xsl:process and xsl:for-each -->
+<doc>
+  <do do="-do-">do</do>
+  <re>re</re>
+  <mi mi1="-mi1-" mi2="mi2">mi</mi>
+  <fa fa="-fa-">fa<so so="-so-">so<la>la<ti>ti</ti>do</la></so></fa>
+  <Gsharp so="so+">G#</Gsharp>
+  <Aflat><natural><la>A</la></natural>Ab</Aflat>
+  <Bflat>Bb</Bflat>
+  <Csharp><natural>C</natural>C#<doublesharp>D</doublesharp></Csharp>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select04.xsl b/test/tests/conf/select/select04.xsl
new file mode 100644
index 0000000..699f677
--- /dev/null
+++ b/test/tests/conf/select/select04.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2 -->
+  <!-- Purpose: Test of unions, returned in document order. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  This should come out fasolatido:
+  <xsl:apply-templates select="fa"/>
+  This should come out doremifasolatido:
+  <xsl:apply-templates select="mi | do | fa | re"/>
+  This should come out do-do-remi-mi1-mi2fasolatido-fa--so-:
+  <xsl:apply-templates select="mi[@mi2='mi2'] | do | fa/so/@so | fa | mi/@* | re | fa/@fa | do/@do"/>
+  This should come out solatidoG#:
+  <xsl:apply-templates select=".//*[@so]"/>
+  This should come out relatidoABb:
+  <xsl:apply-templates select="*//la | //Bflat | re"/>
+  This should come out domitiACD:
+  <xsl:apply-templates select="fa/../mi | Aflat/natural/la | Csharp//* | /doc/do | *//ti"/>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select05.xml b/test/tests/conf/select/select05.xml
new file mode 100644
index 0000000..30b2481
--- /dev/null
+++ b/test/tests/conf/select/select05.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<document-element>
+  <inside>
+    <way-inside/>
+  </inside>
+</document-element>
diff --git a/test/tests/conf/select/select05.xsl b/test/tests/conf/select/select05.xsl
new file mode 100644
index 0000000..6fde78c
--- /dev/null
+++ b/test/tests/conf/select/select05.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for selecting parent nodes. -->
+
+<xsl:template match="/">
+  <out>At the root, should say the name is ():<xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="way-inside">We are way inside.
+  <xsl:apply-templates select=".." mode="parent"/>
+</xsl:template>
+
+<xsl:template match="* | /" mode="parent">
+  name of parent is (<xsl:value-of select="name(.)"/>)
+  <xsl:apply-templates select=".." mode="parent"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select06.xml b/test/tests/conf/select/select06.xml
new file mode 100644
index 0000000..2efd1c4
--- /dev/null
+++ b/test/tests/conf/select/select06.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for iterating</title>
+  <a>
+    <title>A1</title>
+    <b>
+      <title>A1B1</title>
+    </b>
+    <b>
+      <title>A1B2</title>
+      <c>
+        <title>A1B2C1</title>
+      </c>
+      <c>
+        <title>A1B2C2</title>
+      </c>
+      <c>
+        <title>A1B2C3</title>
+      </c>
+    </b>
+    <b>
+      <title>A1B3</title>
+      <c>
+        <title>A1B3C4</title>
+        <d>
+          <title>A1B3C4D1</title>
+        </d>
+         <d>
+          <title>A1B3C4D2</title>
+        </d>
+     </c>
+    </b>
+  </a>
+  <a>
+    <title>A2</title>
+    <b>
+      <title>A2B4</title>
+      <c>
+        <title>A2B4C5</title>
+        <d>
+          <title>A2B4C5D3</title>
+          <e>
+            <title>A2B4C5D3E1</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>A3</title>
+    <b>
+      <title>A3B5</title>
+      <c>
+        <title>A3B5C6</title>
+        <d>
+          <title>A3B5C6D4</title>
+          <e>
+            <title>A3B5C6D4E2</title>
+          </e>
+        </d>
+        <d>
+          <title>A3B5C6D5</title>
+          <e>
+            <title>A3B5C6D5E3</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>A3B5C7</title>
+        <d>
+          <title>A3B5C7D6</title>
+        </d>
+        <d>
+          <title>A3B5C7D7</title>
+           <e>
+            <title>A3B5C7D7E4</title>
+          </e>
+          <e>
+            <title>A3B5C7D7E5</title>
+          </e>
+          <e>
+            <title>A3B5C7D7E6</title>
+          </e>
+       </d>
+        <d>
+          <title>A3B5C7D8</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>A3B6</title>
+    </b>
+    <b>
+      <title>A3B7</title>
+    </b>
+    <b>
+      <title>A3B8</title>
+    </b>
+    <b>
+      <title>A3B9</title>
+      <c>
+        <title>A3B9C8</title>
+        <d>
+          <title>A3B9C8D9</title>
+          <e>
+            <title>A3B9C8D9E7</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select06.xsl b/test/tests/conf/select/select06.xsl
new file mode 100644
index 0000000..8cd1aca
--- /dev/null
+++ b/test/tests/conf/select/select06.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test nesting of for-each.-->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="a">
+      Inside an A node
+      <xsl:for-each select="b">
+        <xsl:for-each select="c">
+          <xsl:for-each select="d">|
+            <xsl:for-each select="e"><xsl:value-of select="title"/>,</xsl:for-each>
+          </xsl:for-each>Finished C node: <xsl:value-of select="title"/>
+        </xsl:for-each>
+      </xsl:for-each>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select07.xml b/test/tests/conf/select/select07.xml
new file mode 100644
index 0000000..43fff9d
--- /dev/null
+++ b/test/tests/conf/select/select07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <inner>content</inner>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select07.xsl b/test/tests/conf/select/select07.xsl
new file mode 100644
index 0000000..b67795b
--- /dev/null
+++ b/test/tests/conf/select/select07.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to put out computed text without any tags.-->
+
+<xsl:output method="text"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="inner"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select08.xml b/test/tests/conf/select/select08.xml
new file mode 100644
index 0000000..3a7f443
--- /dev/null
+++ b/test/tests/conf/select/select08.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<doc>
+  <foo test="true"/>
+  <sub test="false"/>
+  <foo test="false"/>
+  <bar test="true"/>
+  <wiz test="false"/>
+  <sub test="true"/>
+  <wiz test="true"/>
+  <foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select08.xsl b/test/tests/conf/select/select08.xsl
new file mode 100644
index 0000000..d110ebe
--- /dev/null
+++ b/test/tests/conf/select/select08.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level parameters -->
+  <!-- Purpose: Test assignment of a node-set to a parameter, then use in select. -->
+  <!-- Creator: David Marston -->
+
+<xsl:param name="truenodes" select="/doc/*[@test='true']"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="$truenodes"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:text>Got a foo node;</xsl:text>
+</xsl:template>
+
+<xsl:template match="wiz">
+  <xsl:text>Got a wiz node;</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Got some other node;
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select09.xml b/test/tests/conf/select/select09.xml
new file mode 100644
index 0000000..3a7f443
--- /dev/null
+++ b/test/tests/conf/select/select09.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<doc>
+  <foo test="true"/>
+  <sub test="false"/>
+  <foo test="false"/>
+  <bar test="true"/>
+  <wiz test="false"/>
+  <sub test="true"/>
+  <wiz test="true"/>
+  <foo test="true"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select09.xsl b/test/tests/conf/select/select09.xsl
new file mode 100644
index 0000000..0b4081e
--- /dev/null
+++ b/test/tests/conf/select/select09.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11 Parameters -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test assignment of a node-set to a local parameter, then use in select. -->
+
+<xsl:template match="doc">
+  <xsl:param name="truenodes" select="*[@test='true']"/>
+  <out>
+    <xsl:apply-templates select="$truenodes"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:text>Got a foo node;</xsl:text>
+</xsl:template>
+
+<xsl:template match="wiz">
+  <xsl:text>Got a wiz node;</xsl:text>
+</xsl:template>
+
+<xsl:template match="node()">
+  <xsl:text>Got some other node;
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select10.xml b/test/tests/conf/select/select10.xml
new file mode 100644
index 0000000..a31b5b9
--- /dev/null
+++ b/test/tests/conf/select/select10.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+  <critter type="dog"><name>Lassie</name></critter>
+  <human><name>Anne</name></human>
+  <critter type="dog"><name>Wishbone</name></critter>
+  <critter type="cat"><name>Felix</name></critter>
+  <critter type="cat"><name>Sylvester</name></critter>
+  <critter type="porcupine"><name>Porky</name></critter>
+  <human><name>Elissa</name></human>
+  <critter type="cat"><name>TopCat</name></critter>
+  <critter type="turtle"><name>Churchy</name></critter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select10.xsl b/test/tests/conf/select/select10.xsl
new file mode 100644
index 0000000..0e6bcd8
--- /dev/null
+++ b/test/tests/conf/select/select10.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 Repetition -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for-each with select expression in a global variable. -->
+
+<xsl:variable name="which" select="/doc/critter[@type='cat']"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="$which">
+      <xsl:value-of select="name"/><xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select11.xml b/test/tests/conf/select/select11.xml
new file mode 100644
index 0000000..a31b5b9
--- /dev/null
+++ b/test/tests/conf/select/select11.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+  <critter type="dog"><name>Lassie</name></critter>
+  <human><name>Anne</name></human>
+  <critter type="dog"><name>Wishbone</name></critter>
+  <critter type="cat"><name>Felix</name></critter>
+  <critter type="cat"><name>Sylvester</name></critter>
+  <critter type="porcupine"><name>Porky</name></critter>
+  <human><name>Elissa</name></human>
+  <critter type="cat"><name>TopCat</name></critter>
+  <critter type="turtle"><name>Churchy</name></critter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select11.xsl b/test/tests/conf/select/select11.xsl
new file mode 100644
index 0000000..d0a63d8
--- /dev/null
+++ b/test/tests/conf/select/select11.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 Repetition -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for-each with select expression in a local variable. -->
+
+<xsl:template match="/doc">
+  <xsl:variable name="which" select="human"/>
+  <out>
+    <xsl:for-each select="$which">
+      <xsl:value-of select="name"/><xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select12.xml b/test/tests/conf/select/select12.xml
new file mode 100644
index 0000000..cab4c62
--- /dev/null
+++ b/test/tests/conf/select/select12.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a><b attr="test"/></a>
+  <c>
+    <d>
+      <e/>
+    </d>
+  </c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select12.xsl b/test/tests/conf/select/select12.xsl
new file mode 100644
index 0000000..efcffa6
--- /dev/null
+++ b/test/tests/conf/select/select12.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for select that comes up empty.-->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="doc//Q">
+      <xsl:text>Found a Q!</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select13.xml b/test/tests/conf/select/select13.xml
new file mode 100644
index 0000000..019db24
--- /dev/null
+++ b/test/tests/conf/select/select13.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!-- Top comment -->
+<OL>
+  <LI>item1</LI>
+  <!-- Upper Middle comment -->
+  <LI>item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+    <OL>
+      <!-- Lower Middle comment -->
+      <LI>subsubitem</LI>
+      <tag/>
+    </OL>
+  </OL>
+</OL>
+<!-- Bottom comment -->
diff --git a/test/tests/conf/select/select13.xsl b/test/tests/conf/select/select13.xsl
new file mode 100644
index 0000000..c6ff54e
--- /dev/null
+++ b/test/tests/conf/select/select13.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that for-each doesn't care about current node -->
+
+<!-- Collect a node-set, outside any template -->
+<xsl:param name="all" select="//OL"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//comment()">
+      <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+    <xsl:apply-templates select="OL//tag"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="tag">
+  <xsl:text>Found the tag...
+</xsl:text>
+  <xsl:for-each select="$all/LI">
+    <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select14.xml b/test/tests/conf/select/select14.xml
new file mode 100644
index 0000000..33c9b1e
--- /dev/null
+++ b/test/tests/conf/select/select14.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1>
+    <child1>preceding sibling number 1</child1>
+    <child2>current node</child2>
+    <child3>following sibling number 3</child3>
+  </sub1>
+  <sub2>
+    <c>cousin 1</c>
+    <c>cousin 2</c>
+    <child3>cousin 3</child3>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select14.xsl b/test/tests/conf/select/select14.xsl
new file mode 100644
index 0000000..f0804c9
--- /dev/null
+++ b/test/tests/conf/select/select14.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select14 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: Node-set union using mixed axes --><!-- Expression013 in NIST suite -->
+  <!-- Creator: Carmelo Montanez, adapted by David Marston -->
+
+<xsl:template match="/doc/sub1/child2">
+  <out>
+    <xsl:for-each select="preceding-sibling::child1|//child3">
+      <xsl:value-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- To suppress other output -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select15.xml b/test/tests/conf/select/select15.xml
new file mode 100644
index 0000000..50012a9
--- /dev/null
+++ b/test/tests/conf/select/select15.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<doc>
+  <child>bad1
+    <sub>bad2</sub>
+  </child>
+  <c>bad3
+    <sub>bad4</sub>
+  </c>
+  <sub>OK
+    <nogo>bad5</nogo>
+  </sub>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select15.xsl b/test/tests/conf/select/select15.xsl
new file mode 100644
index 0000000..5bbbf36
--- /dev/null
+++ b/test/tests/conf/select/select15.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName followed by :: must be recognized as an AxisName. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="child::sub">
+      <xsl:value-of select="./text()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select16.xml b/test/tests/conf/select/select16.xml
new file mode 100644
index 0000000..50012a9
--- /dev/null
+++ b/test/tests/conf/select/select16.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<doc>
+  <child>bad1
+    <sub>bad2</sub>
+  </child>
+  <c>bad3
+    <sub>bad4</sub>
+  </c>
+  <sub>OK
+    <nogo>bad5</nogo>
+  </sub>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select16.xsl b/test/tests/conf/select/select16.xsl
new file mode 100644
index 0000000..101a06c
--- /dev/null
+++ b/test/tests/conf/select/select16.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName followed by :: must be recognized as an AxisName,
+      even if there is intervening whitespace. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="child :: sub">
+      <xsl:value-of select="./text()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select17.xml b/test/tests/conf/select/select17.xml
new file mode 100644
index 0000000..5a4c661
--- /dev/null
+++ b/test/tests/conf/select/select17.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>bad0
+  <!-- Good -->
+  <comment>bad1
+    <sub>bad2</sub>
+  </comment>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select17.xsl b/test/tests/conf/select/select17.xsl
new file mode 100644
index 0000000..80e612f
--- /dev/null
+++ b/test/tests/conf/select/select17.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName followed by ( must be recognized as a NodeType
+      or FunctionName. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="comment()">
+      <xsl:copy/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select18.xml b/test/tests/conf/select/select18.xml
new file mode 100644
index 0000000..5a4c661
--- /dev/null
+++ b/test/tests/conf/select/select18.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>bad0
+  <!-- Good -->
+  <comment>bad1
+    <sub>bad2</sub>
+  </comment>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select18.xsl b/test/tests/conf/select/select18.xsl
new file mode 100644
index 0000000..3a4b372
--- /dev/null
+++ b/test/tests/conf/select/select18.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName followed by ( must be recognized as a NodeType
+      or FunctionName, even if there is intervening whitespace. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="comment ()">
+      <xsl:copy/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select19.xml b/test/tests/conf/select/select19.xml
new file mode 100644
index 0000000..6eaba2e
--- /dev/null
+++ b/test/tests/conf/select/select19.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>bad0
+  <string-length>ThisIsBad
+    <sub>ThisIsWorse</sub>
+  </string-length>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select19.xsl b/test/tests/conf/select/select19.xsl
new file mode 100644
index 0000000..cfd6ffa
--- /dev/null
+++ b/test/tests/conf/select/select19.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName followed by ( must be recognized as a NodeType
+      or FunctionName. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="string-length()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select20.xml b/test/tests/conf/select/select20.xml
new file mode 100644
index 0000000..6eaba2e
--- /dev/null
+++ b/test/tests/conf/select/select20.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>bad0
+  <string-length>ThisIsBad
+    <sub>ThisIsWorse</sub>
+  </string-length>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select20.xsl b/test/tests/conf/select/select20.xsl
new file mode 100644
index 0000000..f8ac207
--- /dev/null
+++ b/test/tests/conf/select/select20.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName followed by ( must be recognized as a NodeType
+      or FunctionName, even if there is intervening whitespace. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="string-length ()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select21.xml b/test/tests/conf/select/select21.xml
new file mode 100644
index 0000000..8f68668
--- /dev/null
+++ b/test/tests/conf/select/select21.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select21.xsl b/test/tests/conf/select/select21.xsl
new file mode 100644
index 0000000..9f5ca31
--- /dev/null
+++ b/test/tests/conf/select/select21.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName as first item must not be treated as an operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="div +3"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select22.xml b/test/tests/conf/select/select22.xml
new file mode 100644
index 0000000..8f68668
--- /dev/null
+++ b/test/tests/conf/select/select22.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select22.xsl b/test/tests/conf/select/select22.xsl
new file mode 100644
index 0000000..3ff99d7
--- /dev/null
+++ b/test/tests/conf/select/select22.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: * as first item must not be treated as an operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="* +3"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select23.xml b/test/tests/conf/select/select23.xml
new file mode 100644
index 0000000..9928713
--- /dev/null
+++ b/test/tests/conf/select/select23.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc div="20" div-5="12">
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select23.xsl b/test/tests/conf/select/select23.xsl
new file mode 100644
index 0000000..8cea69b
--- /dev/null
+++ b/test/tests/conf/select/select23.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select23 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName after @ must not be treated as an operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="@div - 5"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select24.xml b/test/tests/conf/select/select24.xml
new file mode 100644
index 0000000..9928713
--- /dev/null
+++ b/test/tests/conf/select/select24.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc div="20" div-5="12">
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select24.xsl b/test/tests/conf/select/select24.xsl
new file mode 100644
index 0000000..c8ee203
--- /dev/null
+++ b/test/tests/conf/select/select24.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName after @ must not be treated as an operator; space after is questionable. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="@div -5"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select25.xml b/test/tests/conf/select/select25.xml
new file mode 100644
index 0000000..9928713
--- /dev/null
+++ b/test/tests/conf/select/select25.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc div="20" div-5="12">
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select25.xsl b/test/tests/conf/select/select25.xsl
new file mode 100644
index 0000000..3266c28
--- /dev/null
+++ b/test/tests/conf/select/select25.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select25 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName after @ must not be treated as an operator;
+     lack of spaces around hyphen makes it part of name. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="@div-5"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select26.xml b/test/tests/conf/select/select26.xml
new file mode 100644
index 0000000..d3cb3ac
--- /dev/null
+++ b/test/tests/conf/select/select26.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc div="20">
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select26.xsl b/test/tests/conf/select/select26.xsl
new file mode 100644
index 0000000..3d200e7
--- /dev/null
+++ b/test/tests/conf/select/select26.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select26 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: * after @ must be treated as all attributes -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="@*-5"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select27.xml b/test/tests/conf/select/select27.xml
new file mode 100644
index 0000000..f2646c7
--- /dev/null
+++ b/test/tests/conf/select/select27.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc div="20">
+  <div>9</div>
+  <attribute>-5</attribute>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select27.xsl b/test/tests/conf/select/select27.xsl
new file mode 100644
index 0000000..8bc28f9
--- /dev/null
+++ b/test/tests/conf/select/select27.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select27 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName after :: must be treated as part of path -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="attribute :: div"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select28.xml b/test/tests/conf/select/select28.xml
new file mode 100644
index 0000000..f2646c7
--- /dev/null
+++ b/test/tests/conf/select/select28.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc div="20">
+  <div>9</div>
+  <attribute>-5</attribute>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select28.xsl b/test/tests/conf/select/select28.xsl
new file mode 100644
index 0000000..1be4fab
--- /dev/null
+++ b/test/tests/conf/select/select28.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select28 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName after :: must be treated as part of path -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="attribute :: *"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select29.xml b/test/tests/conf/select/select29.xml
new file mode 100644
index 0000000..607bda9
--- /dev/null
+++ b/test/tests/conf/select/select29.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc div="20">
+  <div>9</div>
+  <attribute>8</attribute>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select29.xsl b/test/tests/conf/select/select29.xsl
new file mode 100644
index 0000000..8e9aad8
--- /dev/null
+++ b/test/tests/conf/select/select29.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select29 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName after ( must not be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="attribute*(div - 4)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select30.xml b/test/tests/conf/select/select30.xml
new file mode 100644
index 0000000..8f68668
--- /dev/null
+++ b/test/tests/conf/select/select30.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select30.xsl b/test/tests/conf/select/select30.xsl
new file mode 100644
index 0000000..8546de0
--- /dev/null
+++ b/test/tests/conf/select/select30.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select30 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: * after ( must not be treated as operator, but * after ) is,
+     and being tokenized means following * is not (because it follows an operator) -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(* - 4)**"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select31.xml b/test/tests/conf/select/select31.xml
new file mode 100644
index 0000000..83f42a2
--- /dev/null
+++ b/test/tests/conf/select/select31.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>x<div>7</div></a>
+  <a>y<div>9</div></a>
+  <a>z<div>5</div></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select31.xsl b/test/tests/conf/select/select31.xsl
new file mode 100644
index 0000000..b905cef
--- /dev/null
+++ b/test/tests/conf/select/select31.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select31 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName after [ must not be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="a[div=9]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select32.xml b/test/tests/conf/select/select32.xml
new file mode 100644
index 0000000..120bc25
--- /dev/null
+++ b/test/tests/conf/select/select32.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<doc>
+  <a s="v"><b>7</b><c>3</c></a>
+  <a s="w"><b>7</b><c>9</c></a>
+  <a s="x"><b>9</b><c>2</c></a>
+  <a s="y"><b>9</b><c>9</c></a>
+  <a s="z"><b>2</b><c>0</c></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select32.xsl b/test/tests/conf/select/select32.xsl
new file mode 100644
index 0000000..89c7ef2
--- /dev/null
+++ b/test/tests/conf/select/select32.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select32 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: * after [ must not be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a[*=9]">
+      <xsl:value-of select="@s"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select33.xml b/test/tests/conf/select/select33.xml
new file mode 100644
index 0000000..8f68668
--- /dev/null
+++ b/test/tests/conf/select/select33.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select33.xsl b/test/tests/conf/select/select33.xsl
new file mode 100644
index 0000000..79cbc38
--- /dev/null
+++ b/test/tests/conf/select/select33.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select33 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName after operator must not be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="16-div"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select34.xml b/test/tests/conf/select/select34.xml
new file mode 100644
index 0000000..8f68668
--- /dev/null
+++ b/test/tests/conf/select/select34.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select34.xsl b/test/tests/conf/select/select34.xsl
new file mode 100644
index 0000000..299babc
--- /dev/null
+++ b/test/tests/conf/select/select34.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select34 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: * after (ambiguous) operator must not be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="25-*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select35.xml b/test/tests/conf/select/select35.xml
new file mode 100644
index 0000000..8f68668
--- /dev/null
+++ b/test/tests/conf/select/select35.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>9</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select35.xsl b/test/tests/conf/select/select35.xsl
new file mode 100644
index 0000000..e63867c
--- /dev/null
+++ b/test/tests/conf/select/select35.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select35 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: * after (named) operator must not be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="54 div*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select36.xml b/test/tests/conf/select/select36.xml
new file mode 100644
index 0000000..0a2f3e0
--- /dev/null
+++ b/test/tests/conf/select/select36.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>14</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select36.xsl b/test/tests/conf/select/select36.xsl
new file mode 100644
index 0000000..d005044
--- /dev/null
+++ b/test/tests/conf/select/select36.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select36 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: name after ) must be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(* - 4) div 2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select37.xml b/test/tests/conf/select/select37.xml
new file mode 100644
index 0000000..6dffbb6
--- /dev/null
+++ b/test/tests/conf/select/select37.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>0</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select37.xsl b/test/tests/conf/select/select37.xsl
new file mode 100644
index 0000000..bdbdbb4
--- /dev/null
+++ b/test/tests/conf/select/select37.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select37 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: name after literal should be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="' 6 ' div 2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select38.xml b/test/tests/conf/select/select38.xml
new file mode 100644
index 0000000..288ecd8
--- /dev/null
+++ b/test/tests/conf/select/select38.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>4</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select38.xsl b/test/tests/conf/select/select38.xsl
new file mode 100644
index 0000000..c2fb0f2
--- /dev/null
+++ b/test/tests/conf/select/select38.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select38 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: name after * should not be treated as operator -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="' 6 '*div"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select39.xml b/test/tests/conf/select/select39.xml
new file mode 100644
index 0000000..2e5a6c6
--- /dev/null
+++ b/test/tests/conf/select/select39.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>6</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select39.xsl b/test/tests/conf/select/select39.xsl
new file mode 100644
index 0000000..503a0f8
--- /dev/null
+++ b/test/tests/conf/select/select39.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select39 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: . after operator should be treated as path -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="div">
+  <xsl:value-of select="5.*."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select40.xml b/test/tests/conf/select/select40.xml
new file mode 100644
index 0000000..2e5a6c6
--- /dev/null
+++ b/test/tests/conf/select/select40.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>6</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select40.xsl b/test/tests/conf/select/select40.xsl
new file mode 100644
index 0000000..6b544b5
--- /dev/null
+++ b/test/tests/conf/select/select40.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select40 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: * after operator should be treated as path -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="5.+*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select41.xml b/test/tests/conf/select/select41.xml
new file mode 100644
index 0000000..286521c
--- /dev/null
+++ b/test/tests/conf/select/select41.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1>
+    <child1>child1</child1>
+  </sub1>
+  <sub2>
+    <child2>child2</child2>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select41.xsl b/test/tests/conf/select/select41.xsl
new file mode 100644
index 0000000..b00d821
--- /dev/null
+++ b/test/tests/conf/select/select41.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select41 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using two absolute location paths--><!-- Expression001 in NIST suite -->
+  <!-- Creator: Carmelo Montanez -->
+
+<xsl:template match="/">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select = "/doc/sub1/child1|/doc/sub2/child2"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select42.xml b/test/tests/conf/select/select42.xml
new file mode 100644
index 0000000..286521c
--- /dev/null
+++ b/test/tests/conf/select/select42.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1>
+    <child1>child1</child1>
+  </sub1>
+  <sub2>
+    <child2>child2</child2>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select42.xsl b/test/tests/conf/select/select42.xsl
new file mode 100644
index 0000000..44bcb73
--- /dev/null
+++ b/test/tests/conf/select/select42.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select42 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using absolute and relative location paths-->
+  <!-- Creator: Carmelo Montanez --><!-- Expression002 in NIST suite -->
+
+<xsl:template match="/">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select="doc">
+      <xsl:apply-templates select = "sub1/child1|/doc/sub2/child2"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select43.xml b/test/tests/conf/select/select43.xml
new file mode 100644
index 0000000..6ed9671
--- /dev/null
+++ b/test/tests/conf/select/select43.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1 pos="1">
+    <child1>descendant number 1</child1>
+  </sub1>
+  <sub2 pos="2">
+    <child1>descendant number 2</child1>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select43.xsl b/test/tests/conf/select/select43.xsl
new file mode 100644
index 0000000..fd1391e
--- /dev/null
+++ b/test/tests/conf/select/select43.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select43 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using the ancestor axis -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression003 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//child1">
+      <xsl:apply-templates select="ancestor::sub1|ancestor::sub2"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="@pos"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select44.xml b/test/tests/conf/select/select44.xml
new file mode 100644
index 0000000..3c78bfe
--- /dev/null
+++ b/test/tests/conf/select/select44.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<doc>
+  <sub pos="1">
+    <child>child number 1</child>
+    <sub-sub pos="1sub">
+      <child>grandchild number 1</child>
+    </sub-sub>
+  </sub>
+  <sub0 pos="2-no">
+    <child>child number 2</child>
+    <sub pos="2.5">
+      <child>grandchild number 2</child>
+    </sub>
+  </sub0>
+  <sub pos="3">
+    <child>child number 3</child>
+    <subno pos="3.5-no">
+      <child>grandchild number 3</child>
+    </subno>
+  </sub>
+  <sub0 pos="4-no">
+    <child>child number 4</child>
+    <sub-sub pos="4sub">
+      <child>grandchild number 4</child>
+    </sub-sub>
+  </sub0>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select44.xsl b/test/tests/conf/select/select44.xsl
new file mode 100644
index 0000000..8e76e7d
--- /dev/null
+++ b/test/tests/conf/select/select44.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select44 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using the ancestor-or-self axis -->
+  <!-- Creator: Carmelo Montanez --><!-- Heavily modified from Expression004 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//child"><!-- 8 different ones -->
+      <xsl:apply-templates select="ancestor-or-self::sub | ancestor-or-self::sub-sub"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="@pos"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select45.xml b/test/tests/conf/select/select45.xml
new file mode 100644
index 0000000..c714920
--- /dev/null
+++ b/test/tests/conf/select/select45.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<doc>
+  <book>
+    <author>
+      <name real="no">Carmelo Montanez</name>
+      <chapters>Nine</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="na">David Marston</name>
+      <chapters>Seven</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="yes">Mary Brady</name>
+      <chapters>Ten</chapters>
+      <bibliography></bibliography>            
+    </author>
+  </book>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select45.xsl b/test/tests/conf/select/select45.xsl
new file mode 100644
index 0000000..a90b326
--- /dev/null
+++ b/test/tests/conf/select/select45.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select45 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator using two paths with predicates. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression005 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "book">
+      <xsl:apply-templates select= "author[name/@real='no']|author[name/@real='yes']"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name"/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select47.xml b/test/tests/conf/select/select47.xml
new file mode 100644
index 0000000..ce3db48
--- /dev/null
+++ b/test/tests/conf/select/select47.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1 pos="1">
+    <child1>child number 1</child1>
+  </sub1>
+  <sub2 pos="2">
+    <child2>child number 2</child2>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select47.xsl b/test/tests/conf/select/select47.xsl
new file mode 100644
index 0000000..da0efdd
--- /dev/null
+++ b/test/tests/conf/select/select47.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select47 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using the child axis -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression007 in NIST suite -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="doc">  
+      <xsl:apply-templates select = "child::sub1|child::sub2"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select = "@pos"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select48.xml b/test/tests/conf/select/select48.xml
new file mode 100644
index 0000000..c714920
--- /dev/null
+++ b/test/tests/conf/select/select48.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<doc>
+  <book>
+    <author>
+      <name real="no">Carmelo Montanez</name>
+      <chapters>Nine</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="na">David Marston</name>
+      <chapters>Seven</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="yes">Mary Brady</name>
+      <chapters>Ten</chapters>
+      <bibliography></bibliography>            
+    </author>
+  </book>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select48.xsl b/test/tests/conf/select/select48.xsl
new file mode 100644
index 0000000..3c834f3
--- /dev/null
+++ b/test/tests/conf/select/select48.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select48 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator on two paths, each with complex predicate. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression008 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "book">
+      <xsl:apply-templates select= "author[(name/@real='no' and position()=1)]|author[(name/@real='yes' and position()=last())]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name"/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select49.xml b/test/tests/conf/select/select49.xml
new file mode 100644
index 0000000..7b44437
--- /dev/null
+++ b/test/tests/conf/select/select49.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc attr1="attribute 1 " attr2="attribute 2">
+  <sub1>
+    <child1>descendant number 1</child1>
+  </sub1>
+  <sub2>
+    <child2>descendant number 2</child2>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select49.xsl b/test/tests/conf/select/select49.xsl
new file mode 100644
index 0000000..8eff23b
--- /dev/null
+++ b/test/tests/conf/select/select49.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select49 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using the descendant axis -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression009 in NIST suite -->
+
+<xsl:template match="/">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select="doc">
+      <xsl:apply-templates select="descendant::child1|descendant::child2"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select50.xml b/test/tests/conf/select/select50.xml
new file mode 100644
index 0000000..7b44437
--- /dev/null
+++ b/test/tests/conf/select/select50.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc attr1="attribute 1 " attr2="attribute 2">
+  <sub1>
+    <child1>descendant number 1</child1>
+  </sub1>
+  <sub2>
+    <child2>descendant number 2</child2>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select50.xsl b/test/tests/conf/select/select50.xsl
new file mode 100644
index 0000000..aacf33e
--- /dev/null
+++ b/test/tests/conf/select/select50.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select50 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using the descendant-or-self axis -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression010 in NIST suite -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:apply-templates select="descendant-or-self::sub1|descendant-or-self::sub2"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select = "."/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select51.xml b/test/tests/conf/select/select51.xml
new file mode 100644
index 0000000..3da0326
--- /dev/null
+++ b/test/tests/conf/select/select51.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<doc>
+  <book>
+    <author>
+      <name real="no">Carmelo Montanez</name>
+      <chapters>Nine</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="yes">David Marston</name>
+      <chapters>Seven</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="yes">Mary Brady</name>
+      <chapters>Ten</chapters>
+      <bibliography></bibliography>            
+    </author>
+  </book>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select51.xsl b/test/tests/conf/select/select51.xsl
new file mode 100644
index 0000000..a4547ce
--- /dev/null
+++ b/test/tests/conf/select/select51.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select51 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator using predicates testing element and attribute nodes. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression011 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "book">
+      <xsl:apply-templates select= "author[name='Mary Brady']|author[name/@real='no']"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name"/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select52.xml b/test/tests/conf/select/select52.xml
new file mode 100644
index 0000000..c7a829f
--- /dev/null
+++ b/test/tests/conf/select/select52.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <child1>child number 1</child1>
+  <child2>child number 2</child2>
+  <child3>Selection of this child is an error.</child3>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select52.xsl b/test/tests/conf/select/select52.xsl
new file mode 100644
index 0000000..dfc5c2d
--- /dev/null
+++ b/test/tests/conf/select/select52.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select52 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator where union yields empty set. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression012 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select = "//noChild1|//noChild2"/>
+  </out>
+</xsl:template>
+
+<xsl:template match = "*">
+  <xsl:value-of select = "."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select53.xml b/test/tests/conf/select/select53.xml
new file mode 100644
index 0000000..685198e
--- /dev/null
+++ b/test/tests/conf/select/select53.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1>
+    <child1>preceding sibling number 1</child1>
+    <child2>current node</child2>
+    <child3>following sibling number 3</child3>
+  </sub1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select53.xsl b/test/tests/conf/select/select53.xsl
new file mode 100644
index 0000000..66b52bf
--- /dev/null
+++ b/test/tests/conf/select/select53.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select53 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using the following-sibling and preceding-sibling axes -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression013 in NIST suite -->
+
+<xsl:template match="/">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "//child2">
+      <xsl:apply-templates select="preceding-sibling::child1|following-sibling::child3"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+   <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select54.xml b/test/tests/conf/select/select54.xml
new file mode 100644
index 0000000..c405114
--- /dev/null
+++ b/test/tests/conf/select/select54.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <book author="Carmelo Montanez">book1</book>
+  <book author="Mary Brady">book2</book>
+  <book author="Carmelo Montanez">book3</book>
+  <book author="Mary Brady">book4</book>
+  <book author="Carmelo Montanez">book5</book>
+  <book author="Mary Brady">book6</book>
+  <book author="David Marston">book7</book>
+  <book author="Rick Rivello">book8</book>
+  <book author="Carmelo Montanez">book9</book>
+  <book author="Mary Brady">book10</book>
+  <book author="Carmelo Montanez">book11</book>
+  <book author="Mary Brady">book12</book>
+  <book author="Carmelo Montanez">book13</book>
+  <book author="Lynne Rosenthal">book14</book>
+  <book author="Carmelo Montanez">book15</book>
+  <book author="Rick Rivello">book16</book>
+  <article author="Mark Skall">article 1</article>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select54.xsl b/test/tests/conf/select/select54.xsl
new file mode 100644
index 0000000..2593d95
--- /dev/null
+++ b/test/tests/conf/select/select54.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select54 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using a function that returns a node set (key) and 
+       an axis. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression014 in NIST suite -->
+
+<xsl:key name="key1" match="book" use="@author"></xsl:key>
+
+<xsl:template match="doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select="child::article|key('key1','Carmelo Montanez')"/>
+  </out>
+</xsl:template>
+
+<xsl:template match = "*">
+  <xsl:value-of select = "."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select55.xml b/test/tests/conf/select/select55.xml
new file mode 100644
index 0000000..358c9b6
--- /dev/null
+++ b/test/tests/conf/select/select55.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<doc>
+  <book author="Carmelo Montanez">book1</book>
+  <book author="Mary Brady">book2</book>
+  <book author="Carmelo Montanez">book3</book>
+  <book author="Mary Brady">book4</book>
+  <book author="Carmelo Montanez">book5</book>
+  <book author="Mary Brady">book6</book>
+  <book author="David Marston">book7</book>
+  <book author="Rick Rivello">book8</book>
+  <book author="Carmelo Montanez">book9</book>
+  <book author="Mary Brady">book10</book>
+  <book author="Carmelo Montanez">book11</book>
+  <book author="Mary Brady">book12</book>
+  <book author="Carmelo Montanez">book13</book>
+  <book author="Lynne Rosenthal">book14</book>
+  <book author="Carmelo Montanez">book15</book>
+  <book author="Mark Skall">book16</book>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select55.xsl b/test/tests/conf/select/select55.xsl
new file mode 100644
index 0000000..36fcac1
--- /dev/null
+++ b/test/tests/conf/select/select55.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select55 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using a function that returns a node set (key) as each term. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression015 in NIST suite -->
+
+<xsl:key name="key1" match="book" use="@author"></xsl:key>
+<xsl:key name="key2" match="book" use="@author"></xsl:key>
+
+<xsl:template match="/">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select="key('key1','Mary Brady')|key('key2','Rick Rivello')"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select56.xml b/test/tests/conf/select/select56.xml
new file mode 100644
index 0000000..3e2ba48
--- /dev/null
+++ b/test/tests/conf/select/select56.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<doc>
+  <book>
+    <author>
+      <name real="no">Carmelo Montanez</name>
+      <chapters>Nine</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="yes">David Marston</name>
+      <chapters>Seven</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+        <name real="yes">Mary Brady</name>
+        <chapters>Ten</chapters>
+        <bibliography>
+        <author>
+          <name>Lynne Rosenthal</name>
+          <chapters>Five</chapters>
+        </author>          
+      </bibliography>
+    </author>
+  </book>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select56.xsl b/test/tests/conf/select/select56.xsl
new file mode 100644
index 0000000..b7150f6
--- /dev/null
+++ b/test/tests/conf/select/select56.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select56 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator at different nesting levels (same element) -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression016 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "book">
+      <xsl:apply-templates select= "author/name|author/bibliography/author/name"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select57.xml b/test/tests/conf/select/select57.xml
new file mode 100644
index 0000000..3062e63
--- /dev/null
+++ b/test/tests/conf/select/select57.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<doc>
+  <book>
+    <author>
+      <name real="no">Carmelo Montanez</name>
+      <chapters>Nine</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="yes">David Marston</name>
+      <chapters>Seven</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="yes">Mary Brady</name>
+      <chapters>Ten</chapters>
+      <bibliography>
+        <author>
+          <name>Lynne Rosenthal</name>
+          <chapters>Five</chapters>
+        </author>          
+      </bibliography>
+    </author>
+  </book>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select57.xsl b/test/tests/conf/select/select57.xsl
new file mode 100644
index 0000000..b1fa3af
--- /dev/null
+++ b/test/tests/conf/select/select57.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select57 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator at different nesting levels (different elements) -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression017 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "book">
+      <xsl:apply-templates select= "author/name|author/bibliography/author/chapters"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select58.xml b/test/tests/conf/select/select58.xml
new file mode 100644
index 0000000..b34e31e
--- /dev/null
+++ b/test/tests/conf/select/select58.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <book>
+    <author>
+      <name real="na">David Marston</name>
+      <chapters>Seven</chapters>
+      <bibliography></bibliography>
+    </author>
+  </book>
+  <book>
+    <author>
+      <name real="yes">Mary Brady</name>
+      <chapters>Ten</chapters>
+      <bibliography></bibliography>            
+    </author>
+  </book>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select58.xsl b/test/tests/conf/select/select58.xsl
new file mode 100644
index 0000000..4f6f54e
--- /dev/null
+++ b/test/tests/conf/select/select58.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select58 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator where one of the members is empty -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression018 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "book">
+      <xsl:apply-templates select= "author/name|author/noElement"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select59.xml b/test/tests/conf/select/select59.xml
new file mode 100644
index 0000000..9483314
--- /dev/null
+++ b/test/tests/conf/select/select59.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<doc>
+  <child>Selection of this child is an error.</child>
+  <child high="3">Selection of this child is an error.</child>
+  <child wide="4">Selection of this child is an error.</child>
+  <child wide="4" high="3">Selection of this child is an error.</child>
+  <child wide="3">E</child>
+  <child wide="3" high="3">F</child>
+  <child wide="3" deep="3">G</child>
+  <child wide="4" deep="2">Selection of this child is an error.</child>
+  <child wide="4" deep="2" high="3">Selection of this child is an error.</child>
+  <child wide="3" deep="2">J</child>
+  <child wide="3" deep="3" high="3">K</child>
+  <child deep="2">Selection of this child is an error.</child>
+  <child deep="2" high="3">Selection of this child is an error.</child>
+  <child deep="3">N</child>
+  <child deep="3" high="3">O</child>
+  <child wide="4" deep="3">P</child>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select59.xsl b/test/tests/conf/select/select59.xsl
new file mode 100644
index 0000000..6779938
--- /dev/null
+++ b/test/tests/conf/select/select59.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select59 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator using overlapping node-sets. Results should
+       always be output in doc order regardless of order of select attribute. -->
+  <!-- Creator: Carmelo Montanez (original) --><!-- Expression019 in NIST suite -->
+  <!-- Creator: Paul Dick (this version) -->
+
+<xsl:key name="which" match="child" use="@wide|@deep"/>
+<xsl:key name="one" match="child" use="@deep"/>
+<xsl:key name="two" match="child" use="@wide"/>
+
+<xsl:template match="doc">
+  <out><xsl:text>
+</xsl:text>
+<xsl:apply-templates select = "child[@wide='3']|child[@deep='3']"/>,
+<xsl:apply-templates select = "child[@deep='3']|child[@wide='3']"/>,
+<xsl:apply-templates select = "key('which','3')"/>,
+<xsl:apply-templates select = "key('one','3') | key('two','3')"/>,
+<xsl:apply-templates select = "child[@wide='3'] | key('one','3')"/>,
+<xsl:apply-templates select = "key('two','3') | document('select59.xml')/child[@wide='3'] | child[@deep='3']"/>,
+</out>
+</xsl:template>
+
+<xsl:template match = "*">
+<xsl:value-of select = "."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select60.xml b/test/tests/conf/select/select60.xml
new file mode 100644
index 0000000..286521c
--- /dev/null
+++ b/test/tests/conf/select/select60.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1>
+    <child1>child1</child1>
+  </sub1>
+  <sub2>
+    <child2>child2</child2>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select60.xsl b/test/tests/conf/select/select60.xsl
new file mode 100644
index 0000000..20c4f11
--- /dev/null
+++ b/test/tests/conf/select/select60.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select60 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using two relative location paths-->
+  <!-- Creator: Carmelo Montanez --><!-- Expression020 in NIST suite -->
+
+<xsl:template match="/">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "doc">
+      <xsl:apply-templates select = "sub1/child1|sub2/child2"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select = "."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select61.xml b/test/tests/conf/select/select61.xml
new file mode 100644
index 0000000..1f725ad
--- /dev/null
+++ b/test/tests/conf/select/select61.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1>
+    <child1>self content number 1</child1>
+  </sub1>
+  <sub2>
+    <child2>self content number 2</child2>
+  </sub2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select61.xsl b/test/tests/conf/select/select61.xsl
new file mode 100644
index 0000000..128afa9
--- /dev/null
+++ b/test/tests/conf/select/select61.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select61 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using the self axis -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression021 in NIST suite -->
+
+<xsl:template match="doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:for-each select = "//child1|//child2">
+      <xsl:apply-templates select = "self::child1|self::child2"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match = "*">
+  <xsl:value-of select="."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select62.xml b/test/tests/conf/select/select62.xml
new file mode 100644
index 0000000..931dc48
--- /dev/null
+++ b/test/tests/conf/select/select62.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <child1>1</child1>
+  <child2>2</child2>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select62.xsl b/test/tests/conf/select/select62.xsl
new file mode 100644
index 0000000..1287b64
--- /dev/null
+++ b/test/tests/conf/select/select62.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select62 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: union of two absolute (//) paths -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression022 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out>
+    <xsl:apply-templates select = "//child1|//child2"/>
+  </out>
+</xsl:template>
+
+<xsl:template match = "*">
+  <xsl:value-of select = "."/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select63.xml b/test/tests/conf/select/select63.xml
new file mode 100644
index 0000000..dcd8571
--- /dev/null
+++ b/test/tests/conf/select/select63.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc>
+  <child1>1</child1>
+  <child2>2A</child2>
+  <child2>2B</child2>
+  <child3>3A</child3>
+  <child3>3B</child3>
+  <child4>4</child4>
+  <child5>5</child5>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select63.xsl b/test/tests/conf/select/select63.xsl
new file mode 100644
index 0000000..7b4d60c
--- /dev/null
+++ b/test/tests/conf/select/select63.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select63 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator used three times in an expression -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression023 in NIST suite -->
+
+<xsl:template match = "doc">
+  <out>
+    <xsl:for-each select = "//child5|//child2|//child4">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select64.xml b/test/tests/conf/select/select64.xml
new file mode 100644
index 0000000..5bdf102
--- /dev/null
+++ b/test/tests/conf/select/select64.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<doc>
+  <article author="Carmelo Montanez">article 1</article>
+  <book author="Mary Brady">book2</book>
+  <book author="Carmelo Montanez">book3</book>
+  <book author="Mary Brady">book4</book>
+  <book author="Carmelo Montanez">book5</book>
+  <book author="Mary Brady">book6</book>
+  <book author="David Marston">book7</book>
+  <book author="Rick Rivello">book8</book>
+  <book author="Carmelo Montanez">book9</book>
+  <book author="Mary Brady">book10</book>
+  <book author="Carmelo Montanez">book11</book>
+  <book author="Mary Brady">book12</book>
+  <book author="Carmelo Montanez">book13</book>
+  <book author="Lynne Rosenthal">book14</book>
+  <book author="Carmelo Montanez">book15</book>
+  <book author="Mark Skall">book16</book>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select64.xsl b/test/tests/conf/select/select64.xsl
new file mode 100644
index 0000000..516f18b
--- /dev/null
+++ b/test/tests/conf/select/select64.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select64 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator using a variable and a function. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression024 in NIST suite -->
+
+<xsl:key name="key1" match="book" use="@author"></xsl:key>
+
+<xsl:template match = "doc">
+  <xsl:variable name = "var1" select = "//article"></xsl:variable>
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select = "$var1|key('key1','Lynne Rosenthal')"/>
+  </out>
+</xsl:template>
+
+<xsl:template match = "*">
+  <xsl:value-of select = "."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select65.xml b/test/tests/conf/select/select65.xml
new file mode 100644
index 0000000..49d5f0c
--- /dev/null
+++ b/test/tests/conf/select/select65.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <child1>Text for variable</child1>
+  <child2>Text for location Path</child2>
+  <child3>Selection of this child is an error.</child3>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select65.xsl b/test/tests/conf/select/select65.xsl
new file mode 100644
index 0000000..9f2d0cc
--- /dev/null
+++ b/test/tests/conf/select/select65.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select65 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator using a variable and an axis. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression025 in NIST suite -->
+
+<xsl:template match = "doc">
+  <xsl:variable name = "var1" select = "//child1"></xsl:variable>
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select = "$var1|child::child2"/>
+  </out>
+</xsl:template>
+
+<xsl:template match = "*">
+  <xsl:value-of select = "."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select66.xml b/test/tests/conf/select/select66.xml
new file mode 100644
index 0000000..c7a829f
--- /dev/null
+++ b/test/tests/conf/select/select66.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <child1>child number 1</child1>
+  <child2>child number 2</child2>
+  <child3>Selection of this child is an error.</child3>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select66.xsl b/test/tests/conf/select/select66.xsl
new file mode 100644
index 0000000..4d26103
--- /dev/null
+++ b/test/tests/conf/select/select66.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select66 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: test union operator using variables. -->
+  <!-- Creator: Carmelo Montanez --><!-- Expression013 in NIST suite -->
+
+<xsl:template match = "doc">
+  <xsl:variable name = "var1" select = "//child1"></xsl:variable>
+  <xsl:variable name = "var2" select = "//child2"></xsl:variable>
+  <out><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select = "$var1|$var2"/>
+  </out>
+</xsl:template>
+
+<xsl:template match = "*">
+  <xsl:value-of select = "."/><xsl:text>
+    </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select67.xml b/test/tests/conf/select/select67.xml
new file mode 100644
index 0000000..8781abb
--- /dev/null
+++ b/test/tests/conf/select/select67.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<document-element>
+  <inside/>
+</document-element>
diff --git a/test/tests/conf/select/select67.xsl b/test/tests/conf/select/select67.xsl
new file mode 100644
index 0000000..5e85645
--- /dev/null
+++ b/test/tests/conf/select/select67.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select67 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that document('') refers to this stylesheet, and exploit
+     that fact to choose a template dynamically. Idea from Mike Kay. -->
+
+<xsl:template match="/document-element">
+  <xsl:variable name="whichtmplt" select="'this'"/>
+  <out>
+    <xsl:apply-templates select="document('')/*/xsl:template[@name=$whichtmplt]"/>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template name="this" match="xsl:template[@name='this']">We are inside.
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+<xsl:template name="that" match="xsl:template[@name='that']">We are offside.
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+<xsl:template name="the_other" match="*">We are generic.
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select68.xml b/test/tests/conf/select/select68.xml
new file mode 100644
index 0000000..9e982e5
--- /dev/null
+++ b/test/tests/conf/select/select68.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<document-element>
+  <chooser>that</chooser>
+  <inside flag="okay" xx="indifferent">wrong</inside>
+</document-element>
diff --git a/test/tests/conf/select/select68.xsl b/test/tests/conf/select/select68.xsl
new file mode 100644
index 0000000..ad32125
--- /dev/null
+++ b/test/tests/conf/select/select68.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select68 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that document('') refers to this stylesheet, and exploit
+     that fact to have data file select which template to use. -->
+
+<xsl:template match="/document-element">
+  <xsl:variable name="whichtmplt" select="chooser"/>
+  <out>
+    <xsl:apply-templates select="document('')/*/xsl:template[@name=$whichtmplt]"/>
+  </out>
+</xsl:template>
+
+<xsl:template name="this" match="xsl:template">This template.
+  <xsl:apply-templates select="document('select68.xml')//inside" mode="thismode"/>
+</xsl:template>
+
+<xsl:template name="that" match="xsl:template">That template.
+  <xsl:apply-templates select="document('select68.xml')//inside" mode="thatmode"/>
+</xsl:template>
+
+<xsl:template match="inside" mode="thismode">We are inside.
+  <xsl:value-of select="@xx"/>
+</xsl:template>
+
+<xsl:template match="inside" mode="thatmode">We got inside.
+  <xsl:value-of select="@flag"/>
+</xsl:template>
+
+<xsl:template match="inside">We got inside, but modeless.
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template name="the_other" match="*">We are generic.
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select69.xml b/test/tests/conf/select/select69.xml
new file mode 100644
index 0000000..9461fa0
--- /dev/null
+++ b/test/tests/conf/select/select69.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a squish="light" squash="butternut">1</a>
+  <a squeesh="" squish="extreme">2</a>
+  <a squash="butternut" squeesh="">3</a>
+  <a squish="heavy" squash="sport" squeesh="">4</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select69.xsl b/test/tests/conf/select/select69.xsl
new file mode 100644
index 0000000..349cbb1
--- /dev/null
+++ b/test/tests/conf/select/select69.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select69 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test whether null string as attribute value causes selection problem. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:value-of select="."/><xsl:text>-</xsl:text>
+  <xsl:for-each select="attribute::*">
+    <xsl:sort select="name(.)"/>
+    <xsl:value-of select="."/><xsl:text>|</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select70.xml b/test/tests/conf/select/select70.xml
new file mode 100644
index 0000000..acb837d
--- /dev/null
+++ b/test/tests/conf/select/select70.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select70.xsl b/test/tests/conf/select/select70.xsl
new file mode 100644
index 0000000..50dc1d6
--- /dev/null
+++ b/test/tests/conf/select/select70.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select70 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show that current() produces a node-set. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="current()">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select71.xml b/test/tests/conf/select/select71.xml
new file mode 100644
index 0000000..ebae227
--- /dev/null
+++ b/test/tests/conf/select/select71.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<directions>
+	<north>
+		<dup1/>
+		<dup2/>
+		<south/>
+		<east/>
+		<west/>
+	</north>
+	<north1/>
+	<north2>
+		<dup1/>
+		<dup2/>
+		<dup3/>
+		<dup4/>
+	</north2>
+	<north3>
+		<dup1/>
+		<dup2/>
+		<south-north/>
+		<east-north/>
+		<west-north/>
+	</north3>
+	<south/>
+	<east>
+		<dup1/>
+		<dup2/>
+		<north-east/>
+		<south-east/>
+		<west-east/>
+	</east>
+	<west/>
+</directions>
\ No newline at end of file
diff --git a/test/tests/conf/select/select71.xsl b/test/tests/conf/select/select71.xsl
new file mode 100644
index 0000000..660068b
--- /dev/null
+++ b/test/tests/conf/select/select71.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName:  select71 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Nodesets. -->
+  <!-- Purpose: Test union operator using overlapping node-sets. Results should
+       always be output in doc order regardless of order of select attribute. -->
+  <!-- Creator: Paul Dick -->
+
+<xsl:output indent="no"/>
+
+<xsl:template match="directions">
+  <out><xsl:text>
+    </xsl:text>
+    <xsl:copy-of select="north/* | north/dup1 | north/dup2"/>,
+    <xsl:copy-of select="north/dup2 | north/dup1 | north/*"/>,
+    <xsl:copy-of select="//north/dup2 | south/preceding-sibling::*[4]/* | north/dup1 | north/*"/>,
+    <xsl:copy-of select="north/dup2 | document('select71.xml')/south/preceding-sibling::*[4]/* | north/*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select72.xml b/test/tests/conf/select/select72.xml
new file mode 100644
index 0000000..2c31c68
--- /dev/null
+++ b/test/tests/conf/select/select72.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <sub1>
+    <child1>child1</child1>
+  </sub1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select72.xsl b/test/tests/conf/select/select72.xsl
new file mode 100644
index 0000000..80b28e6
--- /dev/null
+++ b/test/tests/conf/select/select72.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select72 -->
+  <!-- Document: http://www.w3.org/TR/Xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.3 Node Sets -->
+  <!-- Purpose: NodeSet union using two copies of same node, and variables -->
+  <!-- Creator: David Marston -->
+  <!-- This could be used to establish that the variable is of the node-set type,
+     as opposed to string or one-node RTF, where the count would go up. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:variable name = "var1" select = "doc/sub1/child1" />
+    <xsl:text>
+Count of node-set: </xsl:text>
+    <xsl:value-of select = "count($var1)"/>
+    <xsl:variable name = "var2" select = "$var1|$var1" />
+    <xsl:text>
+Count of union: </xsl:text>
+    <xsl:value-of select = "count($var2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select73.xml b/test/tests/conf/select/select73.xml
new file mode 100644
index 0000000..d1fec1b
--- /dev/null
+++ b/test/tests/conf/select/select73.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>  
+<!DOCTYPE doc
+[  
+<!ELEMENT doc ANY>
+<!ELEMENT A ANY>
+<!ELEMENT K ANY>
+<!ENTITY eacute "&#233;">
+]>
+<doc>
+  <A>adresse1 <K>AFTER</K></A>
+  <A>ad&eacute;resse2 <K>after</K></A>
+  <A>adresse3 </A>
+  <A><K>BEFORE </K>adresse4</A>
+  <A><K>before </K>ad&eacute;resse5</A>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select73.xsl b/test/tests/conf/select/select73.xsl
new file mode 100644
index 0000000..c896201
--- /dev/null
+++ b/test/tests/conf/select/select73.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select73 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that entity does not cause splitting of one text node into many. -->
+
+<xsl:output method="xml" encoding="ISO-8859-1"/>
+<!-- With this output encoding, should get one byte of xE9 for the &eacute -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="A"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="A">
+  <xsl:text>
+</xsl:text>
+  <xsl:for-each select="child::node()">
+    <e>
+      <xsl:value-of select="position()"/><xsl:text>. </xsl:text><xsl:value-of select="."/>
+    </e>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select74.xml b/test/tests/conf/select/select74.xml
new file mode 100644
index 0000000..42f713b
--- /dev/null
+++ b/test/tests/conf/select/select74.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<customers>
+  <customer>
+    <name>William</name>
+    <order>pc10</order>
+    <order>pc20</order>
+  </customer>
+  <customer>
+    <name>Harry</name>
+    <order>pc21</order>
+    <order>pc22</order>
+  </customer>
+</customers>
\ No newline at end of file
diff --git a/test/tests/conf/select/select74.xsl b/test/tests/conf/select/select74.xsl
new file mode 100644
index 0000000..29914bb
--- /dev/null
+++ b/test/tests/conf/select/select74.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select74 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 Repetition -->
+  <!-- Purpose: Test for-each example from XSLT spec. -->
+
+<xsl:template match="/">
+  <html>
+    <head>
+      <title>Customers</title>
+    </head>
+    <body>
+      <table>
+	<tbody>
+	  <xsl:for-each select="customers/customer">
+	    <tr>
+	      <th>
+		<xsl:apply-templates select="name"/>
+	      </th>
+	      <xsl:for-each select="order">
+		<td>
+		  <xsl:apply-templates/>
+		</td>
+	      </xsl:for-each>
+	    </tr>
+	  </xsl:for-each>
+	</tbody>
+      </table>
+    </body>
+  </html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select75.xml b/test/tests/conf/select/select75.xml
new file mode 100644
index 0000000..9cafbb2
--- /dev/null
+++ b/test/tests/conf/select/select75.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<!-- First comment -->
+<doc>
+  <!-- Front comment -->
+  <inner/>
+  <!-- Back comment -->
+</doc>
+<!-- Last comment -->
\ No newline at end of file
diff --git a/test/tests/conf/select/select75.xsl b/test/tests/conf/select/select75.xsl
new file mode 100644
index 0000000..ec54328
--- /dev/null
+++ b/test/tests/conf/select/select75.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select75 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.1 Root node -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that select='/' gets what it should. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc"/>
+    <xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:apply-templates select="comment()" mode="showcomments"/>
+  <xsl:apply-templates select="inner"/>
+</xsl:template>
+
+<xsl:template match="inner">
+  <xsl:apply-templates select="/" mode="showcomments"/>
+</xsl:template>
+
+<xsl:template match="/" mode="showcomments">
+  <xsl:text>
+...Back to top...</xsl:text>
+  <xsl:apply-templates select="comment()" mode="showcomments"/>
+</xsl:template>
+
+<xsl:template match="comment()" mode="showcomments">
+  <xsl:text>
+Comment found:</xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select76.xml b/test/tests/conf/select/select76.xml
new file mode 100644
index 0000000..ca15b7d
--- /dev/null
+++ b/test/tests/conf/select/select76.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<Q level="0">bad0
+  <Q level="1">bad1
+    <Q level="2">bad2</Q>
+  </Q>
+</Q>
\ No newline at end of file
diff --git a/test/tests/conf/select/select76.xsl b/test/tests/conf/select/select76.xsl
new file mode 100644
index 0000000..1827e55
--- /dev/null
+++ b/test/tests/conf/select/select76.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select76 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try /{name} to match the document element. -->
+
+<xsl:template match="/Q">
+  <out>
+    <xsl:value-of select="@level"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select77.xml b/test/tests/conf/select/select77.xml
new file mode 100644
index 0000000..d581691
--- /dev/null
+++ b/test/tests/conf/select/select77.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<page>
+   <contents>
+      <avail>
+         <hotel>
+            <location city="Seattle" state="WA"/>
+         </hotel>
+      </avail>
+   </contents>
+</page>
\ No newline at end of file
diff --git a/test/tests/conf/select/select77.xsl b/test/tests/conf/select/select77.xsl
new file mode 100644
index 0000000..0f8ab23
--- /dev/null
+++ b/test/tests/conf/select/select77.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select77 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: Chris McCabe -->
+  <!-- Purpose: Try to select a non-existent attribute out of a node-set variable -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/page">
+  <out><xsl:text>calling...</xsl:text>
+    <xsl:call-template name="BrandHeader">
+      <xsl:with-param name="hotelnode" select="/page/contents/avail/hotel"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="BrandHeader">
+  <xsl:param name="hotelnode"/>
+  <xsl:value-of select="$hotelnode/location/@country"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select78.xml b/test/tests/conf/select/select78.xml
new file mode 100644
index 0000000..32b390b
--- /dev/null
+++ b/test/tests/conf/select/select78.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x"/>
+  <foo name="y"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select78.xsl b/test/tests/conf/select/select78.xsl
new file mode 100644
index 0000000..d96fa16
--- /dev/null
+++ b/test/tests/conf/select/select78.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select78 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Simple test of current() in for-each. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="foo">
+      <xsl:text>&#10;</xsl:text>
+      <match>
+        <xsl:value-of select="current()/@name"/>
+        <xsl:text> = </xsl:text>
+        <xsl:value-of select="./@name"/>
+      </match>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select79.xml b/test/tests/conf/select/select79.xml
new file mode 100644
index 0000000..28fcb45
--- /dev/null
+++ b/test/tests/conf/select/select79.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">alpha</foo>
+  <foo name="y">omega</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select79.xsl b/test/tests/conf/select/select79.xsl
new file mode 100644
index 0000000..b07cc0a
--- /dev/null
+++ b/test/tests/conf/select/select79.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select79 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Simple test of current() in apply-templates. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo">
+      <xsl:with-param name="node" select="current()"/><!-- the doc node -->
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <xsl:param name="node" select="'duh'"/>
+  <xsl:text>&#10;</xsl:text>
+  <content>
+    <xsl:attribute name="from">
+      <xsl:value-of select="@name"/>
+    </xsl:attribute>
+    <xsl:attribute name="size">
+      <xsl:value-of select="count($node)"/>
+    </xsl:attribute>
+    <xsl:value-of select="normalize-space($node)"/><!-- stringification of doc node -->
+  </content>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select80.xml b/test/tests/conf/select/select80.xml
new file mode 100644
index 0000000..e163a1d
--- /dev/null
+++ b/test/tests/conf/select/select80.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<doc>
+<OL real="yes">
+  <LI flag="yes">item1</LI>
+  <LI>item2</LI>
+  <LI flag="yes">item3</LI>
+  <OL real="no">
+    <LI flag="yes">subitem1n</LI>
+    <LI>subitem2n</LI>
+    <OL real="yes">
+      <LI flag="yes">subsubitem-not-last</LI>
+      <LI flag="yes">subsubitem-early</LI>
+      <tag/>
+    </OL>
+  </OL>
+</OL>
+<OL real="no">
+  <LI flag="yes">item1n</LI>
+  <LI>item2n</LI>
+  <OL real="yes">
+    <LI flag="yes">subitem1</LI>
+    <LI>subitem2</LI>
+    <OL real="yes">
+      <LI gag="yes">subsubitem-late</LI>
+      <tag/>
+    </OL>
+  </OL>
+</OL>
+</doc>
diff --git a/test/tests/conf/select/select80.xsl b/test/tests/conf/select/select80.xsl
new file mode 100644
index 0000000..5e75664
--- /dev/null
+++ b/test/tests/conf/select/select80.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select80 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try a positional predicate on descendants of a node-set variable -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<!-- Collect a node-set, outside any template -->
+<xsl:variable name="all" select="//OL[@real='yes']"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/OL//tag"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="tag">
+  <xsl:text>Found the tag...
+</xsl:text>
+  <xsl:apply-templates select="$all/LI[@flag][last()]"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="LI[@flag]">
+  <xsl:value-of select="."/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select81.xml b/test/tests/conf/select/select81.xml
new file mode 100644
index 0000000..9746600
--- /dev/null
+++ b/test/tests/conf/select/select81.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<para>
+  <font color='red'>Hello</font>
+  <font color='green'>There</font>
+  <font color='blue'>World</font>
+</para>
\ No newline at end of file
diff --git a/test/tests/conf/select/select81.xsl b/test/tests/conf/select/select81.xsl
new file mode 100644
index 0000000..26905e6
--- /dev/null
+++ b/test/tests/conf/select/select81.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select81 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: Joe Kesselman -->
+  <!-- Purpose: Try absolute path when current node is in middle of tree -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="/para/font[@color='green']" />
+  </out>
+</xsl:template>
+
+<xsl:template match="font">
+  <rel><xsl:apply-templates select="..//text()" /></rel>
+  <abs><xsl:apply-templates select="//text()" /></abs>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select82.xml b/test/tests/conf/select/select82.xml
new file mode 100644
index 0000000..b00a8ad
--- /dev/null
+++ b/test/tests/conf/select/select82.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>1<a>in-a</a>2<!-- upper comment -->
+  <b>3<bb>4<bbb>5</bbb>6</bb>7</b>
+  <!-- lower comment -->8<c>in-c</c>9
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select82.xsl b/test/tests/conf/select/select82.xsl
new file mode 100644
index 0000000..a7c853b
--- /dev/null
+++ b/test/tests/conf/select/select82.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select82 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test //* to get all elements -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="/doc/b/bb/bbb" />
+  </out>
+</xsl:template>
+
+<xsl:template match="bbb">
+  <list><xsl:apply-templates select="//*" mode="list"/></list>
+</xsl:template>
+
+<xsl:template match="*" mode="list">
+  <xsl:value-of select="name()" />
+  <xsl:text>|</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select83.xml b/test/tests/conf/select/select83.xml
new file mode 100644
index 0000000..0c3f9d9
--- /dev/null
+++ b/test/tests/conf/select/select83.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc x="on-doc">
+  <a x="on-a">in-a</a>
+  <b x="on-b">
+    <bb NO="on-bb">
+      <bbb x="on-bbb"/>
+    </bb>
+  </b>
+  <c x="on-c">in-c</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select83.xsl b/test/tests/conf/select/select83.xsl
new file mode 100644
index 0000000..13328fe
--- /dev/null
+++ b/test/tests/conf/select/select83.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select83 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test //@x to get all attributes of a certain name -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="/doc/b/bb/bbb" />
+  </out>
+</xsl:template>
+
+<xsl:template match="bbb">
+  <list><xsl:apply-templates select="//@x"/></list>
+</xsl:template>
+
+<xsl:template match="@x">
+  <xsl:text>
+Node </xsl:text>
+  <xsl:value-of select="name(..)" />
+  <xsl:text> has </xsl:text>
+  <xsl:value-of select="." />
+  <xsl:text> in @x</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select84.xml b/test/tests/conf/select/select84.xml
new file mode 100644
index 0000000..686a82f
--- /dev/null
+++ b/test/tests/conf/select/select84.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc d="on-doc">
+  <a aa="on-a">in-a</a>
+  <b x="on-b">
+    <bb y="on-bb">
+      <bbb z="on-bbb"/>
+    </bb>
+  </b>
+  <c cc="on-c">in-c</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select84.xsl b/test/tests/conf/select/select84.xsl
new file mode 100644
index 0000000..8d30a06
--- /dev/null
+++ b/test/tests/conf/select/select84.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: select84 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test //@* to get all attributes in the tree -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="/doc/b/bb/bbb" />
+  </out>
+</xsl:template>
+
+<xsl:template match="bbb">
+  <list><xsl:apply-templates select="//@*"/></list>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:text>
+Node </xsl:text>
+  <xsl:value-of select="name(..)" />
+  <xsl:text> has </xsl:text>
+  <xsl:value-of select="." />
+  <xsl:text> in @</xsl:text>
+  <xsl:value-of select="name(.)" />
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select85.xml b/test/tests/conf/select/select85.xml
new file mode 100644
index 0000000..08fe8d7
--- /dev/null
+++ b/test/tests/conf/select/select85.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <mark/>
+  <ch>ch1</ch>
+  <ch>ch2</ch>
+  <ch>ch3</ch>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select85.xsl b/test/tests/conf/select/select85.xsl
new file mode 100644
index 0000000..8543c0c
--- /dev/null
+++ b/test/tests/conf/select/select85.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: select85 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 12.4 Miscellaneous Additional Functions -->
+<!-- Purpose: Test current() by itself in a predicate. -->
+<!-- Creator: Henry Zongaro -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="mark"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<!-- Both of the following should select the same thing. -->
+<xsl:template match="mark">
+  <in><xsl:value-of select="following-sibling::ch[current()]"/></in>
+  <xsl:text>&#10;</xsl:text>
+  <in><xsl:value-of select="(following-sibling::ch[current()])[1]"/></in>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/select/select86.xml b/test/tests/conf/select/select86.xml
new file mode 100644
index 0000000..4c25f3c
--- /dev/null
+++ b/test/tests/conf/select/select86.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <m/>
+  <n>ok</n>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/select/select86.xsl b/test/tests/conf/select/select86.xsl
new file mode 100644
index 0000000..dc73ca8
--- /dev/null
+++ b/test/tests/conf/select/select86.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- FileName: select86 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 12.4 Miscellaneous Additional Functions -->
+<!-- Purpose: Test that current() returns a node-set suitable for count(). -->
+<!-- Creator: David Marston -->
+<!-- Elaboration: There was a bug, masked by current()/sub-node -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="m"/>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:for-each select="m">
+      <for1><xsl:value-of select="count(current())"/></for1>
+      <xsl:text>&#10;</xsl:text>
+      <for2><xsl:value-of select="following-sibling::*[count(current())]"/></for2>
+    </xsl:for-each>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="m">
+  <apply><xsl:value-of select="count(current())"/></apply>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort-alphabet-english.param b/test/tests/conf/sort/sort-alphabet-english.param
new file mode 100644
index 0000000..8c3cb07
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-english.param
@@ -0,0 +1,24 @@
+#

+# Licensed to the Apache Software Foundation (ASF) under one or more

+# contributor license agreements.  See the NOTICE file distributed with

+# this work for additional information regarding copyright ownership.

+# The ASF licenses this file to You 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.

+#

+

+# XALANJ-2546 xsl:sort lang attribute ignores parameter value, only hard-coding works.

+# Run org.apache.qetest.xsl.StylesheetTestletDriver -goldDir tests/conf-gold -param.lang en 

+# Run org.apache.qetest.xsl.StylesheetTestletDriver -goldDir tests/conf-gold -param.lang en -flavor xsltc

+# Make sure you have the "output" directory on the classpath.

+# $Id$

+

+lang=en
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort-alphabet-english.xml b/test/tests/conf/sort/sort-alphabet-english.xml
new file mode 100644
index 0000000..0e7ad1a
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-english.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+<alphabet language="en">
+  <character>A</character>
+  <character>E</character>
+  <character>C</character>
+  <character>D</character>
+  <character>F</character>
+  <character>G</character>
+  <character>H</character>
+  <character>I</character>
+  <character>J</character>
+  <character>K</character>
+  <character>L</character>
+  <character>M</character>
+  <character>N</character>
+  <character>Y</character>
+  <character>O</character>
+  <character>P</character>
+  <character>Q</character>
+  <character>U</character>
+  <character>R</character>
+  <character>S</character>
+  <character>V</character>
+  <character>W</character>
+  <character>T</character>
+  <character>X</character>
+  <character>Z</character>
+</alphabet>
diff --git a/test/tests/conf/sort/sort-alphabet-english.xsl b/test/tests/conf/sort/sort-alphabet-english.xsl
new file mode 100644
index 0000000..e91e53c
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-english.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.0" omit-xml-declaration="no" encoding="UTF-8" indent="yes" xml:space="preserve" />
+  <!-- <xsl:output method="html" doctype-system="http://www.w3.org/TR/html4/strict.dtd" doctype-public="-//W3C//DTD HTML 
+    4.01//EN" version="4.0" encoding="UTF-8" indent="yes" xml:lang="$lang" omit-xml-declaration="no"/> -->
+  <xsl:param name="lang" />
+  <xsl:template match="alphabet">
+    <root>
+      <p>lang: <xsl:value-of select="$lang" /></p>
+      <ul>
+        <xsl:apply-templates select="character">
+          <xsl:sort select="." lang="{$lang}" order="ascending" />
+        </xsl:apply-templates>
+      </ul>
+    </root>
+  </xsl:template>
+  <xsl:template match="character">
+    <li>
+      <xsl:value-of select="text()" />
+    </li>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort-alphabet-polish.param b/test/tests/conf/sort/sort-alphabet-polish.param
new file mode 100644
index 0000000..83cc961
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-polish.param
@@ -0,0 +1,24 @@
+#

+# Licensed to the Apache Software Foundation (ASF) under one or more

+# contributor license agreements.  See the NOTICE file distributed with

+# this work for additional information regarding copyright ownership.

+# The ASF licenses this file to You 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.

+#

+

+# XALANJ-2546 xsl:sort lang attribute ignores parameter value, only hard-coding works.

+# Run org.apache.qetest.xsl.StylesheetTestletDriver -goldDir tests/conf-gold -param.lang pl 

+# Run org.apache.qetest.xsl.StylesheetTestletDriver -goldDir tests/conf-gold -param.lang pl -flavor xsltc

+# Make sure you have the "output" directory on the classpath.

+# $Id$

+

+lang=pl
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort-alphabet-polish.xml b/test/tests/conf/sort/sort-alphabet-polish.xml
new file mode 100644
index 0000000..cf08ac1
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-polish.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+<alphabet language="pl">
+  <character>A</character>
+  <character>Ż</character>
+  <character>B</character>
+  <character>C</character>
+  <character>Ć</character>
+  <character>D</character>
+  <character>Ł</character>
+  <character>E</character>
+  <character>Ę</character>
+  <character>F</character>
+  <character>G</character>
+  <character>H</character>
+  <character>I</character>
+  <character>J</character>
+  <character>K</character>
+  <character>L</character>
+  <character>Z</character>
+  <character>Ź</character>
+  <character>M</character>
+  <character>N</character>
+  <character>Ń</character>
+  <character>O</character>
+  <character>Ó</character>
+  <character>P</character>
+  <character>R</character>
+  <character>S</character>
+  <character>Ś</character>
+  <character>T</character>
+  <character>U</character>
+  <character>W</character>
+  <character>Ą</character>
+  <character>Y</character>
+</alphabet>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort-alphabet-polish.xsl b/test/tests/conf/sort/sort-alphabet-polish.xsl
new file mode 100644
index 0000000..e91e53c
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-polish.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.0" omit-xml-declaration="no" encoding="UTF-8" indent="yes" xml:space="preserve" />
+  <!-- <xsl:output method="html" doctype-system="http://www.w3.org/TR/html4/strict.dtd" doctype-public="-//W3C//DTD HTML 
+    4.01//EN" version="4.0" encoding="UTF-8" indent="yes" xml:lang="$lang" omit-xml-declaration="no"/> -->
+  <xsl:param name="lang" />
+  <xsl:template match="alphabet">
+    <root>
+      <p>lang: <xsl:value-of select="$lang" /></p>
+      <ul>
+        <xsl:apply-templates select="character">
+          <xsl:sort select="." lang="{$lang}" order="ascending" />
+        </xsl:apply-templates>
+      </ul>
+    </root>
+  </xsl:template>
+  <xsl:template match="character">
+    <li>
+      <xsl:value-of select="text()" />
+    </li>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort-alphabet-russian.param b/test/tests/conf/sort/sort-alphabet-russian.param
new file mode 100644
index 0000000..e9c4f09
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-russian.param
@@ -0,0 +1,24 @@
+#

+# Licensed to the Apache Software Foundation (ASF) under one or more

+# contributor license agreements.  See the NOTICE file distributed with

+# this work for additional information regarding copyright ownership.

+# The ASF licenses this file to You 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.

+#

+

+# XALANJ-2546 xsl:sort lang attribute ignores parameter value, only hard-coding works.

+# Run org.apache.qetest.xsl.StylesheetTestletDriver -goldDir tests/conf-gold -param.lang ru 

+# Run org.apache.qetest.xsl.StylesheetTestletDriver -goldDir tests/conf-gold -param.lang ru -flavor xsltc

+# Make sure you have the "output" directory on the classpath.

+# $Id$

+

+lang=ru
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort-alphabet-russian.xml b/test/tests/conf/sort/sort-alphabet-russian.xml
new file mode 100644
index 0000000..6811b16
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-russian.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+<alphabet language="ru">
+  <character>А</character>
+  <character>Б</character>
+  <character>В</character>
+  <character>Г</character>
+  <character>Д</character>
+  <character>Е</character>
+  <character>Ё</character>
+  <character>Ж</character>
+  <character>З</character>
+  <character>Й</character>
+  <character>П</character>
+  <character>Я</character>
+  <character>К</character>
+  <character>Л</character>
+  <character>С</character>
+  <character>М</character>
+  <character>Н</character>
+  <character>О</character>
+  <character>Р</character>
+  <character>И</character>
+  <character>Т</character>
+  <character>Ф</character>
+  <character>Х</character>
+  <character>Ц</character>
+  <character>У</character>
+  <character>Ш</character>
+  <character>Щ</character>
+  <character>Ъ</character>
+  <character>Ы</character>
+  <character>Ч</character>
+  <character>Ь</character>
+  <character>Э</character>
+  <character>Ю</character>
+</alphabet>
diff --git a/test/tests/conf/sort/sort-alphabet-russian.xsl b/test/tests/conf/sort/sort-alphabet-russian.xsl
new file mode 100644
index 0000000..e91e53c
--- /dev/null
+++ b/test/tests/conf/sort/sort-alphabet-russian.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" version="1.0" omit-xml-declaration="no" encoding="UTF-8" indent="yes" xml:space="preserve" />
+  <!-- <xsl:output method="html" doctype-system="http://www.w3.org/TR/html4/strict.dtd" doctype-public="-//W3C//DTD HTML 
+    4.01//EN" version="4.0" encoding="UTF-8" indent="yes" xml:lang="$lang" omit-xml-declaration="no"/> -->
+  <xsl:param name="lang" />
+  <xsl:template match="alphabet">
+    <root>
+      <p>lang: <xsl:value-of select="$lang" /></p>
+      <ul>
+        <xsl:apply-templates select="character">
+          <xsl:sort select="." lang="{$lang}" order="ascending" />
+        </xsl:apply-templates>
+      </ul>
+    </root>
+  </xsl:template>
+  <xsl:template match="character">
+    <li>
+      <xsl:value-of select="text()" />
+    </li>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort01.xml b/test/tests/conf/sort/sort01.xml
new file mode 100644
index 0000000..c1d14e3
--- /dev/null
+++ b/test/tests/conf/sort/sort01.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+
+<!-- Test for xsl:sort -->
+<doc>
+  <num>99</num>
+  <num>3</num>
+  <num>100</num>
+  <num>40</num>
+  <num>69</num>
+  <num>82</num>
+  <num>1</num>
+  <num>0</num>
+  <num>803.23</num>
+  <num>803.05</num>
+  <num>803.33333333</num>
+  <num>803.33333332</num>
+  <num>23</num>
+  <num>1001001001</num>
+  <num>0008</num>
+  <num>5</num>
+  <num>04</num>
+  <num>002</num>
+  <num>666</num>
+  <num>777</num>
+  <num>Hello</num>
+  <num>617-939-5938</num>
+  <num>-13</num>
+  <num>-47</num>
+</doc>
+
diff --git a/test/tests/conf/sort/sort01.xsl b/test/tests/conf/sort/sort01.xsl
new file mode 100644
index 0000000..79b62ce
--- /dev/null
+++ b/test/tests/conf/sort/sort01.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Purpose: Simple test for xsl:sort on numbers, default order. -->
+
+<xsl:template match="doc">
+  <out>
+    Default (ascending) order....
+    <xsl:for-each select="num">
+      <xsl:sort data-type="number"/>
+      <xsl:value-of select="."/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort02.xml b/test/tests/conf/sort/sort02.xml
new file mode 100644
index 0000000..e208cbf
--- /dev/null
+++ b/test/tests/conf/sort/sort02.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?> 
+
+<!-- Test for xsl:sort -->
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+  <item>XML</item>
+  <item>namespaces</item>
+  <item>mechanism</item>
+  <item>to</item>
+  <item>recognize</item>
+  <item>XSLT-defined</item>
+  <item>elements</item>
+  <item>specified</item>
+  <item>document</item>
+  <item>prefix</item>
+  <item>recognized</item>
+  <item>URI</item>
+  <item>04</item>
+  <item>002</item>
+</doc>
+
diff --git a/test/tests/conf/sort/sort02.xsl b/test/tests/conf/sort/sort02.xsl
new file mode 100644
index 0000000..b4a5474
--- /dev/null
+++ b/test/tests/conf/sort/sort02.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Purpose: Test for xsl:sort on strings without specifying data-type or order. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort03.xml b/test/tests/conf/sort/sort03.xml
new file mode 100644
index 0000000..c576695
--- /dev/null
+++ b/test/tests/conf/sort/sort03.xml
@@ -0,0 +1,209 @@
+<?xml version="1.0"?> 
+
+<!-- Test for xsl:sort -->
+<w3cgroup group="xsl" group-name="W3C XSL Working Group">
+
+  <chair>
+  <name><first>Sharon</first><last>Adler</last></name>
+  <affiliation>Inso Corporation</affiliation>
+  </chair>
+
+  <chair>
+  <name><first>Steve</first><last>Zilles</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </chair>
+
+  <w3c-contact>
+  <name><first>Vincent</first><last>Quint</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </w3c-contact>
+
+  <member>
+  <primary><name><first>Alex</first><last>Milowski</last></name></primary>
+  <alternate><name><first>Murray</first><last>Maloney</last></name></alternate>
+  <affiliation>Veo Systems, Inc.</affiliation>
+  <date-joined>Tue, 20 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jeff</first><last>Caruso</last></name></primary>
+  <alternate><name><first>Andrew</first><last>Greene</last></name></alternate>
+  <affiliation>Bitstream</affiliation>
+  <date-joined>Thu, 26 Mar 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Boris</first><last>Moore</last></name></primary>
+  <alternate><name><first>Daniel</first><last>Rivers-Moore</last></name></alternate>
+  <affiliation>RivCom</affiliation>
+  <date-joined>Thu, 26 March 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Chris</first><last>Maden</last></name></primary>
+  <affiliation>O'Reilly &amp; Associates, Inc.</affiliation> 
+  <date-joined>Tue, 20 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Doug</first><last>Rand</last></name></primary>
+  <affiliation>Silicon Graphics</affiliation> 
+  <date-joined>Thu, 15 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Dwayne</first><last>Dicks</last></name></primary>
+  <alternate><name><first>Lauren</first><last>Wood</last></name></alternate>
+  <affiliation>SoftQuad, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Eduardo</first><last>Gutentag</last></name></primary>
+  <alternate><name><first>Jon</first><last>Bosak</last></name></alternate>
+  <affiliation>Sun Microsystems Inc.</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Henry</first><last>Thompson</last></name></primary>
+  <affiliation>HCRC Language Technology Group, University of Edinburgh</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>James</first><last>Clark</last></name></primary>
+  <affiliation>Invited Expert</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Marsh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Microsoft Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Cdef</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+  
+  <member>
+  <primary><name><first>Jonathan</first><last>Efgh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Abcde</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Defg</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Ghij</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Fghi</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Mickey</first><last>Kimchi</last></name></primary>
+  <alternate><name><first>Ronnen</first><last>Armon</last></name></alternate>
+  <affiliation>Enigma, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Nisheeth</first><last>Ranjan</last></name></primary>
+  <alternate><name><first>Vidur</first><last>Apparao</last></name></alternate>
+  <affiliation>Netscape Corporation</affiliation> 
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Paul</first><last>Grosso</last></name></primary>
+  <alternate><name><first>Norm</first><last>Walsh</last></name></alternate>
+  <affiliation>ArborText</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Don</first><last>Day</last></name></primary>
+  <alternate><name><first>Sanjiva</first><last>Weerawarana</last></name></alternate>
+  <affiliation>IBM</affiliation>
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Scott</first><last>Boag</last></name></primary>
+  <alternate><name><first>Robert</first><last>Pernett</last></name></alternate>
+  <affiliation>Lotus Development Corporation</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Sharon</first><last>Adler</last></name></primary>
+  <alternate><name><first>Anders</first><last>Berglund</last></name></alternate>
+  <affiliation>Inso Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Stephen</first><last>Deach</last></name></primary>
+  <alternate><name><first>Steve</first><last>Zilles</last></name></alternate>
+  <affiliation>Adobe Systems Inc.</affiliation>
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Vincent</first><last>Quint</last></name></primary>
+  <alternate><name><first>Chris</first><last>Lilley</last></name></alternate>
+  <affiliation>W3C Mon, 5 Jan 1998</affiliation>
+  </member>
+
+  <member>
+  <primary><name><first>Joe</first><last>Lapp</last></name></primary>
+  <affiliation>webMethods</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Randy</first><last>Waki</last></name></primary>
+  <affiliation>Novell</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Gregg</first><last>Reynolds</last></name></primary>
+  <affiliation>Datalogics</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Robie</last></name></primary>
+  <affiliation>Texcel</affiliation> 
+  <date-joined>Tue 10 Nov 1998</date-joined> 
+  </member>
+    
+</w3cgroup>
+
diff --git a/test/tests/conf/sort/sort03.xsl b/test/tests/conf/sort/sort03.xsl
new file mode 100644
index 0000000..9a71629
--- /dev/null
+++ b/test/tests/conf/sort/sort03.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Purpose: Test for xsl:sort on a descendant element. -->
+
+<xsl:template match="w3cgroup">
+  <out>
+    <xsl:apply-templates select="member">
+      <xsl:sort select="primary/name/first" order="descending"/>
+      <xsl:sort select="primary/name/last" order="ascending"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="member">
+  <xsl:value-of select="primary/name/first"/><xsl:text> </xsl:text>
+  <xsl:value-of select="primary/name/last"/><xsl:text>; </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort04.xml b/test/tests/conf/sort/sort04.xml
new file mode 100644
index 0000000..cf09287
--- /dev/null
+++ b/test/tests/conf/sort/sort04.xml
@@ -0,0 +1,209 @@
+<?xml version="1.0"?> 
+
+<!-- Test for xsl:sort -->
+<w3cgroup group="xsl" group-name="W3C XSL Working Group">
+
+  <chair>
+  <name><first>Sharon</first><last>Adler</last></name>
+  <affiliation>Inso Corporation</affiliation>
+  </chair>
+
+  <chair>
+  <name><first>Steve</first><last>Zilles</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </chair>
+
+  <w3c-contact>
+  <name><first>Vincent</first><last>Quint</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </w3c-contact>
+
+  <member>
+  <primary><name><first>Alex</first><last>Milowski</last></name></primary>
+  <alternate><name><first>Murray</first><last>Maloney</last></name></alternate>
+  <affiliation>Veo Systems, Inc.</affiliation>
+  <date-joined>Tue, 20 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jeff</first><last>Caruso</last></name></primary>
+  <alternate><name><first>Andrew</first><last>Greene</last></name></alternate>
+  <affiliation>Bitstream</affiliation>
+  <date-joined>Thu, 26 Mar 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Boris</first><last>Moore</last></name></primary>
+  <alternate><name><first>Daniel</first><last>Rivers-Moore</last></name></alternate>
+  <affiliation>RivCom</affiliation>
+  <date-joined>Thu, 26 March 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Chris</first><last>Maden</last></name></primary>
+  <affiliation>O'Reilly and Associates, Inc.</affiliation> 
+  <date-joined>Tue, 20 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Doug</first><last>Rand</last></name></primary>
+  <affiliation>Silicon Graphics</affiliation> 
+  <date-joined>Thu, 15 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Dwayne</first><last>Dicks</last></name></primary>
+  <alternate><name><first>Lauren</first><last>Wood</last></name></alternate>
+  <affiliation>SoftQuad, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Eduardo</first><last>Gutentag</last></name></primary>
+  <alternate><name><first>Jon</first><last>Bosak</last></name></alternate>
+  <affiliation>Sun Microsystems Inc.</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Henry</first><last>Thompson</last></name></primary>
+  <affiliation>HCRC Language Technology Group, University of Edinburgh</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>James</first><last>Clark</last></name></primary>
+  <affiliation>Invited Expert</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Marsh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Microsoft Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Cdef</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+  
+  <member>
+  <primary><name><first>Jonathan</first><last>Efgh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Abcde</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Defg</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Ghij</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Fghi</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Mickey</first><last>Kimchi</last></name></primary>
+  <alternate><name><first>Ronnen</first><last>Armon</last></name></alternate>
+  <affiliation>Enigma, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Nisheeth</first><last>Ranjan</last></name></primary>
+  <alternate><name><first>Vidur</first><last>Apparao</last></name></alternate>
+  <affiliation>Netscape Corporation</affiliation> 
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Paul</first><last>Grosso</last></name></primary>
+  <alternate><name><first>Norm</first><last>Walsh</last></name></alternate>
+  <affiliation>ArborText</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Don</first><last>Day</last></name></primary>
+  <alternate><name><first>Sanjiva</first><last>Weerawarana</last></name></alternate>
+  <affiliation>IBM</affiliation>
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Scott</first><last>Boag</last></name></primary>
+  <alternate><name><first>Robert</first><last>Pernett</last></name></alternate>
+  <affiliation>Lotus Development Corporation</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Sharon</first><last>Adler</last></name></primary>
+  <alternate><name><first>Anders</first><last>Berglund</last></name></alternate>
+  <affiliation>Inso Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Stephen</first><last>Deach</last></name></primary>
+  <alternate><name><first>Steve</first><last>Zilles</last></name></alternate>
+  <affiliation>Adobe Systems Inc.</affiliation>
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Vincent</first><last>Quint</last></name></primary>
+  <alternate><name><first>Chris</first><last>Lilley</last></name></alternate>
+  <affiliation>W3C Mon, 5 Jan 1998</affiliation>
+  </member>
+
+  <member>
+  <primary><name><first>Joe</first><last>Lapp</last></name></primary>
+  <affiliation>webMethods</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Randy</first><last>Waki</last></name></primary>
+  <affiliation>Novell</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Gregg</first><last>Reynolds</last></name></primary>
+  <affiliation>Datalogics</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Robie</last></name></primary>
+  <affiliation>Texcel</affiliation> 
+  <date-joined>Tue 10 Nov 1998</date-joined> 
+  </member>
+    
+</w3cgroup>
+
diff --git a/test/tests/conf/sort/sort04.xsl b/test/tests/conf/sort/sort04.xsl
new file mode 100644
index 0000000..b68092a
--- /dev/null
+++ b/test/tests/conf/sort/sort04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Purpose: Test for xsl:sort and value-of the same element in the same loop. -->
+
+<xsl:template match="w3cgroup">
+  <out>
+    <xsl:for-each select="member">
+      <xsl:sort select="affiliation"/>
+      <xsl:value-of select="affiliation"/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort05.xml b/test/tests/conf/sort/sort05.xml
new file mode 100644
index 0000000..c576695
--- /dev/null
+++ b/test/tests/conf/sort/sort05.xml
@@ -0,0 +1,209 @@
+<?xml version="1.0"?> 
+
+<!-- Test for xsl:sort -->
+<w3cgroup group="xsl" group-name="W3C XSL Working Group">
+
+  <chair>
+  <name><first>Sharon</first><last>Adler</last></name>
+  <affiliation>Inso Corporation</affiliation>
+  </chair>
+
+  <chair>
+  <name><first>Steve</first><last>Zilles</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </chair>
+
+  <w3c-contact>
+  <name><first>Vincent</first><last>Quint</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </w3c-contact>
+
+  <member>
+  <primary><name><first>Alex</first><last>Milowski</last></name></primary>
+  <alternate><name><first>Murray</first><last>Maloney</last></name></alternate>
+  <affiliation>Veo Systems, Inc.</affiliation>
+  <date-joined>Tue, 20 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jeff</first><last>Caruso</last></name></primary>
+  <alternate><name><first>Andrew</first><last>Greene</last></name></alternate>
+  <affiliation>Bitstream</affiliation>
+  <date-joined>Thu, 26 Mar 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Boris</first><last>Moore</last></name></primary>
+  <alternate><name><first>Daniel</first><last>Rivers-Moore</last></name></alternate>
+  <affiliation>RivCom</affiliation>
+  <date-joined>Thu, 26 March 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Chris</first><last>Maden</last></name></primary>
+  <affiliation>O'Reilly &amp; Associates, Inc.</affiliation> 
+  <date-joined>Tue, 20 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Doug</first><last>Rand</last></name></primary>
+  <affiliation>Silicon Graphics</affiliation> 
+  <date-joined>Thu, 15 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Dwayne</first><last>Dicks</last></name></primary>
+  <alternate><name><first>Lauren</first><last>Wood</last></name></alternate>
+  <affiliation>SoftQuad, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Eduardo</first><last>Gutentag</last></name></primary>
+  <alternate><name><first>Jon</first><last>Bosak</last></name></alternate>
+  <affiliation>Sun Microsystems Inc.</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Henry</first><last>Thompson</last></name></primary>
+  <affiliation>HCRC Language Technology Group, University of Edinburgh</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>James</first><last>Clark</last></name></primary>
+  <affiliation>Invited Expert</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Marsh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Microsoft Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Cdef</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+  
+  <member>
+  <primary><name><first>Jonathan</first><last>Efgh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Abcde</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Defg</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Ghij</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Fghi</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Mickey</first><last>Kimchi</last></name></primary>
+  <alternate><name><first>Ronnen</first><last>Armon</last></name></alternate>
+  <affiliation>Enigma, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Nisheeth</first><last>Ranjan</last></name></primary>
+  <alternate><name><first>Vidur</first><last>Apparao</last></name></alternate>
+  <affiliation>Netscape Corporation</affiliation> 
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Paul</first><last>Grosso</last></name></primary>
+  <alternate><name><first>Norm</first><last>Walsh</last></name></alternate>
+  <affiliation>ArborText</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Don</first><last>Day</last></name></primary>
+  <alternate><name><first>Sanjiva</first><last>Weerawarana</last></name></alternate>
+  <affiliation>IBM</affiliation>
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Scott</first><last>Boag</last></name></primary>
+  <alternate><name><first>Robert</first><last>Pernett</last></name></alternate>
+  <affiliation>Lotus Development Corporation</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Sharon</first><last>Adler</last></name></primary>
+  <alternate><name><first>Anders</first><last>Berglund</last></name></alternate>
+  <affiliation>Inso Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Stephen</first><last>Deach</last></name></primary>
+  <alternate><name><first>Steve</first><last>Zilles</last></name></alternate>
+  <affiliation>Adobe Systems Inc.</affiliation>
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Vincent</first><last>Quint</last></name></primary>
+  <alternate><name><first>Chris</first><last>Lilley</last></name></alternate>
+  <affiliation>W3C Mon, 5 Jan 1998</affiliation>
+  </member>
+
+  <member>
+  <primary><name><first>Joe</first><last>Lapp</last></name></primary>
+  <affiliation>webMethods</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Randy</first><last>Waki</last></name></primary>
+  <affiliation>Novell</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Gregg</first><last>Reynolds</last></name></primary>
+  <affiliation>Datalogics</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Robie</last></name></primary>
+  <affiliation>Texcel</affiliation> 
+  <date-joined>Tue 10 Nov 1998</date-joined> 
+  </member>
+    
+</w3cgroup>
+
diff --git a/test/tests/conf/sort/sort05.xsl b/test/tests/conf/sort/sort05.xsl
new file mode 100644
index 0000000..e07c433
--- /dev/null
+++ b/test/tests/conf/sort/sort05.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Purpose: Test for xsl:sort on a descendant element with no order specified. -->
+
+<xsl:template match="w3cgroup">
+  <out>
+    <xsl:apply-templates select="member">
+      <xsl:sort select="primary/name/last"/>
+      <xsl:sort select="primary/name/first"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="member">
+  <xsl:value-of select="primary/name/last"/><xsl:text> </xsl:text>
+  <xsl:value-of select="primary/name/first"/><xsl:text>; </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort06.xml b/test/tests/conf/sort/sort06.xml
new file mode 100644
index 0000000..c576695
--- /dev/null
+++ b/test/tests/conf/sort/sort06.xml
@@ -0,0 +1,209 @@
+<?xml version="1.0"?> 
+
+<!-- Test for xsl:sort -->
+<w3cgroup group="xsl" group-name="W3C XSL Working Group">
+
+  <chair>
+  <name><first>Sharon</first><last>Adler</last></name>
+  <affiliation>Inso Corporation</affiliation>
+  </chair>
+
+  <chair>
+  <name><first>Steve</first><last>Zilles</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </chair>
+
+  <w3c-contact>
+  <name><first>Vincent</first><last>Quint</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </w3c-contact>
+
+  <member>
+  <primary><name><first>Alex</first><last>Milowski</last></name></primary>
+  <alternate><name><first>Murray</first><last>Maloney</last></name></alternate>
+  <affiliation>Veo Systems, Inc.</affiliation>
+  <date-joined>Tue, 20 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jeff</first><last>Caruso</last></name></primary>
+  <alternate><name><first>Andrew</first><last>Greene</last></name></alternate>
+  <affiliation>Bitstream</affiliation>
+  <date-joined>Thu, 26 Mar 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Boris</first><last>Moore</last></name></primary>
+  <alternate><name><first>Daniel</first><last>Rivers-Moore</last></name></alternate>
+  <affiliation>RivCom</affiliation>
+  <date-joined>Thu, 26 March 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Chris</first><last>Maden</last></name></primary>
+  <affiliation>O'Reilly &amp; Associates, Inc.</affiliation> 
+  <date-joined>Tue, 20 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Doug</first><last>Rand</last></name></primary>
+  <affiliation>Silicon Graphics</affiliation> 
+  <date-joined>Thu, 15 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Dwayne</first><last>Dicks</last></name></primary>
+  <alternate><name><first>Lauren</first><last>Wood</last></name></alternate>
+  <affiliation>SoftQuad, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Eduardo</first><last>Gutentag</last></name></primary>
+  <alternate><name><first>Jon</first><last>Bosak</last></name></alternate>
+  <affiliation>Sun Microsystems Inc.</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Henry</first><last>Thompson</last></name></primary>
+  <affiliation>HCRC Language Technology Group, University of Edinburgh</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>James</first><last>Clark</last></name></primary>
+  <affiliation>Invited Expert</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Marsh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Microsoft Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Cdef</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+  
+  <member>
+  <primary><name><first>Jonathan</first><last>Efgh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Abcde</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Defg</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Ghij</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Fghi</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Mickey</first><last>Kimchi</last></name></primary>
+  <alternate><name><first>Ronnen</first><last>Armon</last></name></alternate>
+  <affiliation>Enigma, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Nisheeth</first><last>Ranjan</last></name></primary>
+  <alternate><name><first>Vidur</first><last>Apparao</last></name></alternate>
+  <affiliation>Netscape Corporation</affiliation> 
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Paul</first><last>Grosso</last></name></primary>
+  <alternate><name><first>Norm</first><last>Walsh</last></name></alternate>
+  <affiliation>ArborText</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Don</first><last>Day</last></name></primary>
+  <alternate><name><first>Sanjiva</first><last>Weerawarana</last></name></alternate>
+  <affiliation>IBM</affiliation>
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Scott</first><last>Boag</last></name></primary>
+  <alternate><name><first>Robert</first><last>Pernett</last></name></alternate>
+  <affiliation>Lotus Development Corporation</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Sharon</first><last>Adler</last></name></primary>
+  <alternate><name><first>Anders</first><last>Berglund</last></name></alternate>
+  <affiliation>Inso Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Stephen</first><last>Deach</last></name></primary>
+  <alternate><name><first>Steve</first><last>Zilles</last></name></alternate>
+  <affiliation>Adobe Systems Inc.</affiliation>
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Vincent</first><last>Quint</last></name></primary>
+  <alternate><name><first>Chris</first><last>Lilley</last></name></alternate>
+  <affiliation>W3C Mon, 5 Jan 1998</affiliation>
+  </member>
+
+  <member>
+  <primary><name><first>Joe</first><last>Lapp</last></name></primary>
+  <affiliation>webMethods</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Randy</first><last>Waki</last></name></primary>
+  <affiliation>Novell</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Gregg</first><last>Reynolds</last></name></primary>
+  <affiliation>Datalogics</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Robie</last></name></primary>
+  <affiliation>Texcel</affiliation> 
+  <date-joined>Tue 10 Nov 1998</date-joined> 
+  </member>
+    
+</w3cgroup>
+
diff --git a/test/tests/conf/sort/sort06.xsl b/test/tests/conf/sort/sort06.xsl
new file mode 100644
index 0000000..9d4adb6
--- /dev/null
+++ b/test/tests/conf/sort/sort06.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Purpose: Test for 2 xsl:sort elements with different sequence than SORT05. -->
+
+<xsl:template match="w3cgroup">
+  <out>
+    <xsl:apply-templates select="member">
+      <xsl:sort select="primary/name/first"/>
+      <xsl:sort select="primary/name/last"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="member">
+  <xsl:value-of select="primary/name/first"/><xsl:text> </xsl:text>
+  <xsl:value-of select="primary/name/last"/><xsl:text>; </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort07.xml b/test/tests/conf/sort/sort07.xml
new file mode 100644
index 0000000..041780a
--- /dev/null
+++ b/test/tests/conf/sort/sort07.xml
@@ -0,0 +1,209 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<w3cgroup group="xsl" group-name="W3C XSL Working Group">
+
+  <chair>
+  <name><first>Sharon</first><last>Adler</last></name>
+  <affiliation>Inso Corporation</affiliation>
+  </chair>
+
+  <chair>
+  <name><first>Steve</first><last>Zilles</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </chair>
+
+  <w3c-contact>
+  <name><first>Vincent</first><last>Quint</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </w3c-contact>
+
+  <member>
+  <primary><name><first>Alex</first><last>Milowski</last></name></primary>
+  <alternate><name><first>Murray</first><last>Maloney</last></name></alternate>
+  <affiliation>Veo Systems, Inc.</affiliation>
+  <date-joined>Tue, 20 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jeff</first><last>Caruso</last></name></primary>
+  <alternate><name><first>Andrew</first><last>Greene</last></name></alternate>
+  <affiliation>Bitstream</affiliation>
+  <date-joined>Thu, 26 Mar 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Boris</first><last>Moore</last></name></primary>
+  <alternate><name><first>Daniel</first><last>Rivers-Moore</last></name></alternate>
+  <affiliation>RivCom</affiliation>
+  <date-joined>Thu, 26 March 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Chris</first><last>Maden</last></name></primary>
+  <affiliation>O'Reilly &amp; Associates, Inc.</affiliation> 
+  <date-joined>Tue, 20 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Doug</first><last>Rand</last></name></primary>
+  <affiliation>Silicon Graphics</affiliation> 
+  <date-joined>Thu, 15 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Dwayne</first><last>Dicks</last></name></primary>
+  <alternate><name><first>Lauren</first><last>Wood</last></name></alternate>
+  <affiliation>SoftQuad, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Eduardo</first><last>Gutentag</last></name></primary>
+  <alternate><name><first>Jon</first><last>Bosak</last></name></alternate>
+  <affiliation>Sun Microsystems Inc.</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Henry</first><last>Thompson</last></name></primary>
+  <affiliation>HCRC Language Technology Group, University of Edinburgh</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>James</first><last>Clark</last></name></primary>
+  <affiliation>Invited Expert</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Marsh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Microsoft Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Cdef</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+  
+  <member>
+  <primary><name><first>Jonathan</first><last>Efgh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Abcde</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Defg</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Ghij</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Fghi</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Mickey</first><last>Kimchi</last></name></primary>
+  <alternate><name><first>Ronnen</first><last>Armon</last></name></alternate>
+  <affiliation>Enigma, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Nisheeth</first><last>Ranjan</last></name></primary>
+  <alternate><name><first>Vidur</first><last>Apparao</last></name></alternate>
+  <affiliation>Netscape Corporation</affiliation> 
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Paul</first><last>Grosso</last></name></primary>
+  <alternate><name><first>Norm</first><last>Walsh</last></name></alternate>
+  <affiliation>ArborText</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Don</first><last>Day</last></name></primary>
+  <alternate><name><first>Sanjiva</first><last>Weerawarana</last></name></alternate>
+  <affiliation>IBM</affiliation>
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Scott</first><last>Boag</last></name></primary>
+  <alternate><name><first>Robert</first><last>Pernett</last></name></alternate>
+  <affiliation>Lotus Development Corporation</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Sharon</first><last>Adler</last></name></primary>
+  <alternate><name><first>Anders</first><last>Berglund</last></name></alternate>
+  <affiliation>Inso Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Stephen</first><last>Deach</last></name></primary>
+  <alternate><name><first>Steve</first><last>Zilles</last></name></alternate>
+  <affiliation>Adobe Systems Inc.</affiliation>
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Vincent</first><last>Quint</last></name></primary>
+  <alternate><name><first>Chris</first><last>Lilley</last></name></alternate>
+  <affiliation>W3C</affiliation>
+  <date-joined>Mon, 5 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Joe</first><last>Lapp</last></name></primary>
+  <affiliation>webMethods</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Randy</first><last>Waki</last></name></primary>
+  <affiliation>Novell</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Gregg</first><last>Reynolds</last></name></primary>
+  <affiliation>Datalogics</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Robie</last></name></primary>
+  <affiliation>Texcel</affiliation> 
+  <date-joined>Tue 10 Nov 1998</date-joined> 
+  </member>
+    
+</w3cgroup>
+
diff --git a/test/tests/conf/sort/sort07.xsl b/test/tests/conf/sort/sort07.xsl
new file mode 100644
index 0000000..09742e7
--- /dev/null
+++ b/test/tests/conf/sort/sort07.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Purpose: Test for xsl:sort on a different element (not always present)
+       which should have tie-breakers. -->
+
+<xsl:template match="w3cgroup">
+  <out>
+    <xsl:apply-templates select="member">
+      <xsl:sort select="alternate/name/first" order="ascending"/>
+      <xsl:sort select="alternate/name/last" order="descending"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="member">
+  <xsl:value-of select="affiliation"/><xsl:text>: </xsl:text>
+  <xsl:value-of select="alternate/name/first"/><xsl:text> </xsl:text>
+  <xsl:value-of select="alternate/name/last"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort08.xml b/test/tests/conf/sort/sort08.xml
new file mode 100644
index 0000000..3bbb472
--- /dev/null
+++ b/test/tests/conf/sort/sort08.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<!-- UTF-8 order: space, !, %, lower-case letters -->
+<doc>
+  <t>abc</t>
+  <t>a b</t>
+  <t>ab </t>
+  <t>ac </t>
+  <t>abcd</t>
+  <t>ab!</t>
+  <t>ab%</t>
+  <t>a!b</t>
+  <t>a!b!</t>
+  <t>ac!</t>
+  <t>a c%</t>
+  <t>abd</t>
+  <t>a!cd</t>
+  <t>ab</t>
+  <t>a c</t>
+  <t>a!b </t>
+  <t>a  d</t>
+  <t>a!c</t>
+  <t>acc</t>
+</doc>
+
diff --git a/test/tests/conf/sort/sort08.xsl b/test/tests/conf/sort/sort08.xsl
new file mode 100644
index 0000000..a121978
--- /dev/null
+++ b/test/tests/conf/sort/sort08.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort on letters and spaces. -->
+
+<xsl:template match="doc">
+  <out>
+    Ascending order....
+    <xsl:for-each select="t">
+      <xsl:sort data-type="text"/>
+      <xsl:value-of select="."/><xsl:text>|</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort09.xml b/test/tests/conf/sort/sort09.xml
new file mode 100644
index 0000000..96ea9a3
--- /dev/null
+++ b/test/tests/conf/sort/sort09.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <num>99</num>
+  <num>3</num>
+  <num>100</num>
+  <num>40</num>
+  <num>69</num>
+  <num>82</num>
+  <num>1</num>
+  <num>0</num>
+  <num>803.23</num>
+  <num>803.05</num>
+  <num>803.33333333</num>
+  <num>803.33333332</num>
+  <num>23</num>
+  <num>1001001001</num>
+  <num>0008</num>
+  <num>5</num>
+  <num>04</num>
+  <num>002</num>
+  <num>666</num>
+  <num>777</num>
+  <num>Hello</num>
+  <num>617-939-5938</num>
+  <num>-13</num>
+  <num>-47</num>
+</doc>
+
diff --git a/test/tests/conf/sort/sort09.xsl b/test/tests/conf/sort/sort09.xsl
new file mode 100644
index 0000000..56dac6d
--- /dev/null
+++ b/test/tests/conf/sort/sort09.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Simple test for xsl:sort on numbers, descending order. -->
+
+<xsl:template match="doc">
+  <out>
+    Descending order....
+    <xsl:for-each select="num">
+      <xsl:sort data-type="number" order="descending"/>
+      <xsl:value-of select="."/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort10.xml b/test/tests/conf/sort/sort10.xml
new file mode 100644
index 0000000..54f8201
--- /dev/null
+++ b/test/tests/conf/sort/sort10.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+  <item>XML</item>
+  <item>namespaces</item>
+  <item>mechanism</item>
+  <item>to</item>
+  <item>recognize</item>
+  <item>XSLT-defined</item>
+  <item>elements</item>
+  <item>specified</item>
+  <item>document</item>
+  <item>prefix</item>
+  <item>recognized</item>
+  <item>URI</item>
+  <item>04</item>
+  <item>002</item>
+</doc>
+
diff --git a/test/tests/conf/sort/sort10.xsl b/test/tests/conf/sort/sort10.xsl
new file mode 100644
index 0000000..15cdcfe
--- /dev/null
+++ b/test/tests/conf/sort/sort10.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort on strings without specifying data-type, descending order. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort order="descending"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort11.xml b/test/tests/conf/sort/sort11.xml
new file mode 100644
index 0000000..d8cdb2d
--- /dev/null
+++ b/test/tests/conf/sort/sort11.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>2</item>
+  <item>4.0</item>
+  <item>.01</item>
+  <item>.0101</item>
+  <item>4</item>
+  <item>.0100</item>
+  <item>4.000</item>
+  <item>0.01</item>
+  <item>02.0</item>
+  <item>0.0100</item>
+  <item>.0110</item>
+  <item>2.0</item>
+  <item>04</item>
+  <item>002</item>
+</doc>
+
diff --git a/test/tests/conf/sort/sort11.xsl b/test/tests/conf/sort/sort11.xsl
new file mode 100644
index 0000000..6e17f09
--- /dev/null
+++ b/test/tests/conf/sort/sort11.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Sort strings that all can be numbers without specifying data-type or order. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort12.xml b/test/tests/conf/sort/sort12.xml
new file mode 100644
index 0000000..d8cdb2d
--- /dev/null
+++ b/test/tests/conf/sort/sort12.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>2</item>
+  <item>4.0</item>
+  <item>.01</item>
+  <item>.0101</item>
+  <item>4</item>
+  <item>.0100</item>
+  <item>4.000</item>
+  <item>0.01</item>
+  <item>02.0</item>
+  <item>0.0100</item>
+  <item>.0110</item>
+  <item>2.0</item>
+  <item>04</item>
+  <item>002</item>
+</doc>
+
diff --git a/test/tests/conf/sort/sort12.xsl b/test/tests/conf/sort/sort12.xsl
new file mode 100644
index 0000000..46f8432
--- /dev/null
+++ b/test/tests/conf/sort/sort12.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Sort numbers with leading zeroes and decimal points. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort data-type="number"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort13.xml b/test/tests/conf/sort/sort13.xml
new file mode 100644
index 0000000..6ccff31
--- /dev/null
+++ b/test/tests/conf/sort/sort13.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <t>First</t>
+  <t>1</t>
+  <t>p2</t>
+  <t>1.0.9</t>
+  <t>007</t>
+  <t>1.0</t>
+  <t>7</t>
+  <t>00k</t>
+  <t>1.u</t>
+  <t>0.5</t>
+  <t>0.5.9</t>
+  <t>0</t>
+  <t>1-m</t>
+  <t> 1.1</t>
+  <t>11</t>
+  <t>0.5s</t>
+  <t>Last</t>
+</doc>
+
diff --git a/test/tests/conf/sort/sort13.xsl b/test/tests/conf/sort/sort13.xsl
new file mode 100644
index 0000000..b7f8848
--- /dev/null
+++ b/test/tests/conf/sort/sort13.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Numeric sort, all items that aren't true numbers should cluster together. -->
+
+<xsl:template match="doc">
+  <out>
+    Ascending order....
+    <xsl:for-each select="t">
+      <xsl:sort data-type="number"/>
+      <xsl:value-of select="."/><xsl:text>|</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort14.xml b/test/tests/conf/sort/sort14.xml
new file mode 100644
index 0000000..d2aeca2
--- /dev/null
+++ b/test/tests/conf/sort/sort14.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+  <item>XML</item>
+  <item>Namespaces</item>
+  <item>mechanism</item>
+  <item>to</item>
+  <item>recognize</item>
+  <item>XSLT-defined</item>
+  <item>elements</item>
+  <item>specified</item>
+  <item>document</item>
+  <item>prefix</item>
+  <item>recognized</item>
+  <item>URI</item>
+  <item>preFIX</item>
+</doc>
+
diff --git a/test/tests/conf/sort/sort14.xsl b/test/tests/conf/sort/sort14.xsl
new file mode 100644
index 0000000..f2e0627
--- /dev/null
+++ b/test/tests/conf/sort/sort14.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort on strings without specifying case-order. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort lang="en-US"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort15.xml b/test/tests/conf/sort/sort15.xml
new file mode 100644
index 0000000..d2aeca2
--- /dev/null
+++ b/test/tests/conf/sort/sort15.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+  <item>XML</item>
+  <item>Namespaces</item>
+  <item>mechanism</item>
+  <item>to</item>
+  <item>recognize</item>
+  <item>XSLT-defined</item>
+  <item>elements</item>
+  <item>specified</item>
+  <item>document</item>
+  <item>prefix</item>
+  <item>recognized</item>
+  <item>URI</item>
+  <item>preFIX</item>
+</doc>
+
diff --git a/test/tests/conf/sort/sort15.xsl b/test/tests/conf/sort/sort15.xsl
new file mode 100644
index 0000000..5ed5659
--- /dev/null
+++ b/test/tests/conf/sort/sort15.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort on strings, upper-first case-order. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort lang="en-US" case-order="upper-first"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort16.xml b/test/tests/conf/sort/sort16.xml
new file mode 100644
index 0000000..d2aeca2
--- /dev/null
+++ b/test/tests/conf/sort/sort16.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+  <item>XML</item>
+  <item>Namespaces</item>
+  <item>mechanism</item>
+  <item>to</item>
+  <item>recognize</item>
+  <item>XSLT-defined</item>
+  <item>elements</item>
+  <item>specified</item>
+  <item>document</item>
+  <item>prefix</item>
+  <item>recognized</item>
+  <item>URI</item>
+  <item>preFIX</item>
+</doc>
+
diff --git a/test/tests/conf/sort/sort16.xsl b/test/tests/conf/sort/sort16.xsl
new file mode 100644
index 0000000..dff886f
--- /dev/null
+++ b/test/tests/conf/sort/sort16.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort on strings, lower-first case-order. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort lang="en-US" case-order="lower-first"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort20.xml b/test/tests/conf/sort/sort20.xml
new file mode 100644
index 0000000..2895deb
--- /dev/null
+++ b/test/tests/conf/sort/sort20.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <num>99</num>
+  <num>3</num>
+  <num>100</num>
+  <num>40</num>
+  <num>69</num>
+  <num>82</num>
+  <num>1</num>
+  <num>0</num>
+  <num>803.23</num>
+  <num>803.05</num>
+  <num>803.33333333</num>
+  <num>803.33333332</num>
+  <num>23</num>
+  <num>1001001001</num>
+  <num>0008</num>
+  <num>5</num>
+  <num>04</num>
+  <num>002</num>
+  <num>666</num>
+  <num>777</num>
+  <num>-13</num>
+  <num>-47</num>
+</doc>
+
diff --git a/test/tests/conf/sort/sort20.xsl b/test/tests/conf/sort/sort20.xsl
new file mode 100644
index 0000000..7de33a9
--- /dev/null
+++ b/test/tests/conf/sort/sort20.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that lang has no effect on numeric data. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="num">
+      <xsl:sort lang="fr-CA" data-type="number"/>
+      <xsl:value-of select="."/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort21.xml b/test/tests/conf/sort/sort21.xml
new file mode 100644
index 0000000..572ea23
--- /dev/null
+++ b/test/tests/conf/sort/sort21.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha key="a"/>
+   <alpha key="b"/>
+   <alpha key="c"/>
+   <alpha key="d"/>
+   <alpha key="e"/>
+   <alpha key="f"/>
+   <alpha key="g"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort21.xsl b/test/tests/conf/sort/sort21.xsl
new file mode 100644
index 0000000..c2dc65e
--- /dev/null
+++ b/test/tests/conf/sort/sort21.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for xsl:sort using a numeric expression for the select. -->
+
+<xsl:template match="/">
+  <out>
+     <xsl:for-each select="doc/alpha">
+         <xsl:sort select="position()" data-type="number" order="descending"/>
+         <xsl:value-of select="@key"/><xsl:text>,</xsl:text>
+     </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort22.xml b/test/tests/conf/sort/sort22.xml
new file mode 100644
index 0000000..31f79f7
--- /dev/null
+++ b/test/tests/conf/sort/sort22.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha key="ve1"/>
+   <alpha key="xd2"/>
+   <alpha key="ua3"/>
+   <alpha key="tf4"/>
+   <alpha key="zc5"/>
+   <alpha key="wg6"/>
+   <alpha key="yb7"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort22.xsl b/test/tests/conf/sort/sort22.xsl
new file mode 100644
index 0000000..adf9517
--- /dev/null
+++ b/test/tests/conf/sort/sort22.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: sort22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort using a string function for the select. -->
+
+<xsl:template match="/">
+  <xsl:for-each select="doc/alpha">
+    <xsl:sort select="substring(@key,2,1)" data-type="text" />
+    <xsl:value-of select="@key"/><xsl:text>,</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort23.xml b/test/tests/conf/sort/sort23.xml
new file mode 100644
index 0000000..83bba54
--- /dev/null
+++ b/test/tests/conf/sort/sort23.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha height="3" width="5" net="15"/>
+   <alpha height="2" width="9" net="18"/>
+   <alpha height="4" width="3" net="12"/>
+   <alpha height="2" width="4" net="8"/>
+   <alpha height="6" width="4" net="24"/>
+   <alpha height="7" width="3" net="21"/>
+   <alpha height="4" width="5" net="20"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort23.xsl b/test/tests/conf/sort/sort23.xsl
new file mode 100644
index 0000000..b30bad3
--- /dev/null
+++ b/test/tests/conf/sort/sort23.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: sort23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort using a numeric expression for the select. -->
+
+<xsl:template match="/">
+  <xsl:for-each select="doc/alpha">
+    <xsl:sort select="@height*@width" data-type="number" />
+    <xsl:value-of select="@net"/><xsl:text>,</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort24.xml b/test/tests/conf/sort/sort24.xml
new file mode 100644
index 0000000..3f099b2
--- /dev/null
+++ b/test/tests/conf/sort/sort24.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha key="a44a"/>
+   <alpha key="b2"/>
+   <alpha key="c6666c"/>
+   <alpha key="d"/>
+   <alpha key="e555e"/>
+   <alpha key="f77777f"/>
+   <alpha key="g3g"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort24.xsl b/test/tests/conf/sort/sort24.xsl
new file mode 100644
index 0000000..b75f8e0
--- /dev/null
+++ b/test/tests/conf/sort/sort24.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: sort24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort using a numeric expression for the select. -->
+  <!-- Note that we show that this sort does NOT do the expected rearrangement of nodes!
+     Apparently, the conversion of the select expression to a string occurs at a bad time. -->
+
+<xsl:template match="/">
+  <xsl:for-each select="doc/alpha">
+    <xsl:sort select="string-length(.)" data-type="number"/>
+    <xsl:value-of select="@key"/><xsl:text>|</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort25.xml b/test/tests/conf/sort/sort25.xml
new file mode 100644
index 0000000..572ea23
--- /dev/null
+++ b/test/tests/conf/sort/sort25.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha key="a"/>
+   <alpha key="b"/>
+   <alpha key="c"/>
+   <alpha key="d"/>
+   <alpha key="e"/>
+   <alpha key="f"/>
+   <alpha key="g"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort25.xsl b/test/tests/conf/sort/sort25.xsl
new file mode 100644
index 0000000..07e0768
--- /dev/null
+++ b/test/tests/conf/sort/sort25.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: sort25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Reverse the order of the nodes using an expression that is reliable. -->
+
+<xsl:template match="/">
+  <xsl:for-each select="doc/alpha">
+    <xsl:sort select="count(following-sibling::*)" data-type="number"/>
+    <xsl:value-of select="@key"/>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort26.xml b/test/tests/conf/sort/sort26.xml
new file mode 100644
index 0000000..790392e
--- /dev/null
+++ b/test/tests/conf/sort/sort26.xml
@@ -0,0 +1,207 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<w3cgroup group="xsl" group-name="W3C XSL Working Group">
+
+  <chair>
+  <name><first>Sharon</first><last>Adler</last></name>
+  <affiliation>Inso Corporation</affiliation>
+  </chair>
+
+  <chair>
+  <name><first>Steve</first><last>Zilles</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </chair>
+
+  <w3c-contact>
+  <name><first>Vincent</first><last>Quint</last></name>
+  <affiliation>Adobe Systems</affiliation>
+  </w3c-contact>
+
+  <member>
+  <primary><name><first>Alex</first><last>Milowski</last></name></primary>
+  <alternate><name><first>Murray</first><last>Maloney</last></name></alternate>
+  <affiliation>Veo Systems, Inc.</affiliation>
+  <date-joined>Tue, 20 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jeff</first><last>Caruso</last></name></primary>
+  <alternate><name><first>Andrew</first><last>Greene</last></name></alternate>
+  <affiliation>Bitstream</affiliation>
+  <date-joined>Thu, 26 Mar 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Boris</first><last>Moore</last></name></primary>
+  <alternate><name><first>Daniel</first><last>Rivers-Moore</last></name></alternate>
+  <affiliation>RivCom</affiliation>
+  <date-joined>Thu, 26 March 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Chris</first><last>Maden</last></name></primary>
+  <affiliation>O'Reilly &amp; Associates, Inc.</affiliation> 
+  <date-joined>Tue, 20 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Doug</first><last>Rand</last></name></primary>
+  <affiliation>Silicon Graphics</affiliation> 
+  <date-joined>Thu, 15 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Dwayne</first><last>Dicks</last></name></primary>
+  <alternate><name><first>Lauren</first><last>Wood</last></name></alternate>
+  <affiliation>SoftQuad, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Eduardo</first><last>Gutentag</last></name></primary>
+  <alternate><name><first>Jon</first><last>Bosak</last></name></alternate>
+  <affiliation>Sun Microsystems Inc.</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Henry</first><last>Thompson</last></name></primary>
+  <affiliation>HCRC Language Technology Group, University of Edinburgh</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>James</first><last>Clark</last></name></primary>
+  <affiliation>Invited Expert</affiliation> 
+  <date-joined>Wed, 28 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Marsh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Microsoft Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Cdef</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+  
+  <member>
+  <primary><name><first>Jonathan</first><last>Efgh</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Abcde</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Defg</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Ghij</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Fghi</last></name></primary>
+  <alternate><name><first>Chris</first><last>Wilson</last></name></alternate>
+  <affiliation>Bubba Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Mickey</first><last>Kimchi</last></name></primary>
+  <alternate><name><first>Ronnen</first><last>Armon</last></name></alternate>
+  <affiliation>Enigma, Inc.</affiliation> 
+  <date-joined>Fri, 23 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Nisheeth</first><last>Ranjan</last></name></primary>
+  <alternate><name><first>Vidur</first><last>Apparao</last></name></alternate>
+  <affiliation>Netscape Corporation</affiliation> 
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Paul</first><last>Grosso</last></name></primary>
+  <alternate><name><first>Norm</first><last>Walsh</last></name></alternate>
+  <affiliation>ArborText</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Don</first><last>Day</last></name></primary>
+  <alternate><name><first>Sanjiva</first><last>Weerawarana</last></name></alternate>
+  <affiliation>IBM</affiliation>
+  <date-joined>Sat, 21 Feb 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Scott</first><last>Boag</last></name></primary>
+  <alternate><name><first>Robert</first><last>Pernett</last></name></alternate>
+  <affiliation>Lotus Development Corporation</affiliation> 
+  <date-joined>Fri, 16 Jan 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Anders</first><last>Berglund</last></name></primary>
+  <affiliation>Inso Corporation</affiliation> 
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Stephen</first><last>Deach</last></name></primary>
+  <alternate><name><first>Steve</first><last>Zilles</last></name></alternate>
+  <affiliation>Adobe Systems Inc.</affiliation>
+  <date-joined>Sun, 18 Jan 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Vincent</first><last>Quint</last></name></primary>
+  <alternate><name><first>Chris</first><last>Lilley</last></name></alternate>
+  <affiliation>W3C Mon, 5 Jan 1998</affiliation>
+  </member>
+
+  <member>
+  <primary><name><first>Joe</first><last>Lapp</last></name></primary>
+  <affiliation>webMethods</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined> 
+  </member>
+
+  <member>
+  <primary><name><first>Randy</first><last>Waki</last></name></primary>
+  <affiliation>Novell</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Gregg</first><last>Reynolds</last></name></primary>
+  <affiliation>Datalogics</affiliation> 
+  <date-joined>Wed 9 Sep 1998</date-joined>
+  </member>
+
+  <member>
+  <primary><name><first>Jonathan</first><last>Robie</last></name></primary>
+  <affiliation>Texcel</affiliation> 
+  <date-joined>Tue 10 Nov 1998</date-joined> 
+  </member>
+    
+</w3cgroup>
+
diff --git a/test/tests/conf/sort/sort26.xsl b/test/tests/conf/sort/sort26.xsl
new file mode 100644
index 0000000..e342d74
--- /dev/null
+++ b/test/tests/conf/sort/sort26.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort on apply-templates that does not have a select attribute. -->
+
+<xsl:template match="w3cgroup">
+  <out>
+    <xsl:apply-templates>
+      <xsl:sort select="name/last | primary/name/last" order="ascending"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="member">
+  <xsl:value-of select="primary/name/first"/><xsl:text> </xsl:text>
+  <xsl:value-of select="primary/name/last"/><xsl:text>; </xsl:text>
+</xsl:template>
+
+<xsl:template match="chair" priority="2">
+  Chair: <xsl:value-of select="name/first"/><xsl:text> </xsl:text>
+  <xsl:value-of select="name/last"/><xsl:text>; </xsl:text>
+</xsl:template>
+
+<xsl:template match="w3c-contact" priority="2">
+  W3C: <xsl:value-of select="name/first"/><xsl:text> </xsl:text>
+  <xsl:value-of select="name/last"/><xsl:text>; </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort27.xml b/test/tests/conf/sort/sort27.xml
new file mode 100644
index 0000000..a7d63c2
--- /dev/null
+++ b/test/tests/conf/sort/sort27.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<main>
+  j
+  <sub size="7">d</sub>
+  f
+  <sub size="3">h</sub>
+  i
+  <sub size="5">e</sub>
+  b
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort27.xsl b/test/tests/conf/sort/sort27.xsl
new file mode 100644
index 0000000..97e75f2
--- /dev/null
+++ b/test/tests/conf/sort/sort27.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort on apply-templates that will get text and element children. -->
+
+<xsl:template match="main">
+  <out>
+    <xsl:apply-templates>
+      <xsl:sort/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="sub | text()">
+  <xsl:value-of select="."/><xsl:text>-</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort28.xml b/test/tests/conf/sort/sort28.xml
new file mode 100644
index 0000000..a7d63c2
--- /dev/null
+++ b/test/tests/conf/sort/sort28.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<main>
+  j
+  <sub size="7">d</sub>
+  f
+  <sub size="3">h</sub>
+  i
+  <sub size="5">e</sub>
+  b
+</main>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort28.xsl b/test/tests/conf/sort/sort28.xsl
new file mode 100644
index 0000000..873c6ee
--- /dev/null
+++ b/test/tests/conf/sort/sort28.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort on apply-templates without select, numeric sort. -->
+
+<xsl:template match="main">
+  <out>
+    <xsl:apply-templates>
+      <xsl:sort select="@size" data-type="number"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="sub | text()">
+  <xsl:value-of select="."/><xsl:text>-</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort29.xml b/test/tests/conf/sort/sort29.xml
new file mode 100644
index 0000000..551af45
--- /dev/null
+++ b/test/tests/conf/sort/sort29.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha><key>ve1</key><display>Third</display></alpha>
+   <alpha><key>xd2</key><display>Fifth</display></alpha>
+   <alpha><key>ua3</key><display>Second</display></alpha>
+   <alpha><key>tf4</key><display>First</display></alpha>
+   <alpha><key>zc5</key><display>Seventh</display></alpha>
+   <alpha><key>wg6</key><display>Fourth</display></alpha>
+   <alpha><key>yb7</key><display>Sixth</display></alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort29.xsl b/test/tests/conf/sort/sort29.xsl
new file mode 100644
index 0000000..198a9f2
--- /dev/null
+++ b/test/tests/conf/sort/sort29.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort using a variable in the select, for-each loop. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:variable name="index" select="1"/>
+  <xsl:for-each select="alpha">
+    <xsl:sort select="*[$index]" data-type="text" />
+    <xsl:value-of select="display"/><xsl:text>,</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort30.xml b/test/tests/conf/sort/sort30.xml
new file mode 100644
index 0000000..551af45
--- /dev/null
+++ b/test/tests/conf/sort/sort30.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha><key>ve1</key><display>Third</display></alpha>
+   <alpha><key>xd2</key><display>Fifth</display></alpha>
+   <alpha><key>ua3</key><display>Second</display></alpha>
+   <alpha><key>tf4</key><display>First</display></alpha>
+   <alpha><key>zc5</key><display>Seventh</display></alpha>
+   <alpha><key>wg6</key><display>Fourth</display></alpha>
+   <alpha><key>yb7</key><display>Sixth</display></alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort30.xsl b/test/tests/conf/sort/sort30.xsl
new file mode 100644
index 0000000..82d8607
--- /dev/null
+++ b/test/tests/conf/sort/sort30.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: sort30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort using a local variable in the select, apply-templates. -->
+
+<xsl:template match="/">
+  <xsl:variable name="index" select="1"/>
+  <xsl:apply-templates select="doc/alpha">
+    <xsl:sort select="*[$index]" data-type="text" />
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="doc/alpha">
+  <xsl:value-of select="display"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort31.xml b/test/tests/conf/sort/sort31.xml
new file mode 100644
index 0000000..551af45
--- /dev/null
+++ b/test/tests/conf/sort/sort31.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha><key>ve1</key><display>Third</display></alpha>
+   <alpha><key>xd2</key><display>Fifth</display></alpha>
+   <alpha><key>ua3</key><display>Second</display></alpha>
+   <alpha><key>tf4</key><display>First</display></alpha>
+   <alpha><key>zc5</key><display>Seventh</display></alpha>
+   <alpha><key>wg6</key><display>Fourth</display></alpha>
+   <alpha><key>yb7</key><display>Sixth</display></alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort31.xsl b/test/tests/conf/sort/sort31.xsl
new file mode 100644
index 0000000..8ebda5b
--- /dev/null
+++ b/test/tests/conf/sort/sort31.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: sort31 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for xsl:sort using a global variable in the select, apply-templates. -->
+
+<xsl:variable name="index" select="1"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates select="doc/alpha">
+    <xsl:sort select="*[$index]" data-type="text" />
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="doc/alpha">
+  <xsl:value-of select="display"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort32.xml b/test/tests/conf/sort/sort32.xml
new file mode 100644
index 0000000..323dcaa
--- /dev/null
+++ b/test/tests/conf/sort/sort32.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <t>1</t>
+  <t>007</t>
+  <t>1.0</t>
+  <t>7</t>
+  <t>bogus</t>
+  <t>0.5</t>
+  <t>1.1</t>
+  <t>11</t>
+</doc>
diff --git a/test/tests/conf/sort/sort32.xsl b/test/tests/conf/sort/sort32.xsl
new file mode 100644
index 0000000..6dc5c3d
--- /dev/null
+++ b/test/tests/conf/sort/sort32.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT32 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to set data-type from a variable. -->
+
+<xsl:template match="doc">
+  <xsl:variable name="typer" select="'number'"/>
+  <out>
+    Ascending order....
+    <xsl:for-each select="t">
+      <xsl:sort data-type="{$typer}"/>
+      <xsl:value-of select="."/><xsl:text>|</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort33.xml b/test/tests/conf/sort/sort33.xml
new file mode 100644
index 0000000..323dcaa
--- /dev/null
+++ b/test/tests/conf/sort/sort33.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <t>1</t>
+  <t>007</t>
+  <t>1.0</t>
+  <t>7</t>
+  <t>bogus</t>
+  <t>0.5</t>
+  <t>1.1</t>
+  <t>11</t>
+</doc>
diff --git a/test/tests/conf/sort/sort33.xsl b/test/tests/conf/sort/sort33.xsl
new file mode 100644
index 0000000..354d993
--- /dev/null
+++ b/test/tests/conf/sort/sort33.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT33 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to set order from a variable. -->
+
+<xsl:template match="doc">
+  <xsl:variable name="ord" select="'descending'"/>
+  <out>
+    Descending order....
+    <xsl:for-each select="t">
+      <xsl:sort data-type="number" order="{$ord}"/>
+      <xsl:value-of select="."/><xsl:text>|</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort34.xml b/test/tests/conf/sort/sort34.xml
new file mode 100644
index 0000000..c62858e
--- /dev/null
+++ b/test/tests/conf/sort/sort34.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+  <item>XML</item>
+  <item>Namespaces</item>
+  <item>mechanism</item>
+  <item>to</item>
+  <item>recognize</item>
+  <item>XSLT-defined</item>
+  <item>elements</item>
+  <item>specified</item>
+  <item>document</item>
+  <item>prefix</item>
+  <item>recognized</item>
+  <item>URI</item>
+  <item>preFIX</item>
+</doc>
diff --git a/test/tests/conf/sort/sort34.xsl b/test/tests/conf/sort/sort34.xsl
new file mode 100644
index 0000000..ce789fc
--- /dev/null
+++ b/test/tests/conf/sort/sort34.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT34 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to set case-order from a variable. -->
+
+<xsl:template match="doc">
+  <xsl:variable name="ord" select="'lower-first'"/>
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort lang="en-US" case-order="{$ord}"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort35.xml b/test/tests/conf/sort/sort35.xml
new file mode 100644
index 0000000..6088487
--- /dev/null
+++ b/test/tests/conf/sort/sort35.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha><left>v</left><right>e</right><orig>1</orig></alpha>
+   <alpha><left>x</left><right>d</right><orig>2</orig></alpha>
+   <alpha><left>u</left><right>a</right><orig>3</orig></alpha>
+   <alpha><left>t</left><right>f</right><orig>4</orig></alpha>
+   <alpha><left>z</left><right>c</right><orig>5</orig></alpha>
+   <alpha><left>w</left><right>g</right><orig>6</orig></alpha>
+   <alpha><left>y</left><right>b</right><orig>7</orig></alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort35.xsl b/test/tests/conf/sort/sort35.xsl
new file mode 100644
index 0000000..ebcf5d3
--- /dev/null
+++ b/test/tests/conf/sort/sort35.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: sort35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test the famous technique for choosing the sort key dynamically. -->
+
+<xsl:variable name="sortcol" select="'left'"/>
+<!-- Set value to either 'left' or 'right' above. Could change to external param. -->
+
+<xsl:template match="/">
+  <xsl:for-each select="doc/alpha">
+    <xsl:sort select="./*[name(.) = $sortcol]" data-type="text" />
+    <xsl:value-of select="concat(left,right,orig)"/><xsl:text>,</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort36.xml b/test/tests/conf/sort/sort36.xml
new file mode 100644
index 0000000..41445ae
--- /dev/null
+++ b/test/tests/conf/sort/sort36.xml
@@ -0,0 +1,12 @@
+<doc>
+   <memo><subj>Thread A</subj><time>10:02:44</time><body>A1</body></memo>
+   <memo><subj>Thread B</subj><time>10:03:18</time><body>B2</body></memo>
+   <memo><subj>Re: Thread A</subj><time>10:11:12</time><body>A3</body></memo>
+   <memo><subj>Re: Thread B</subj><time>10:19:57</time><body>B4</body></memo>
+   <memo><subj>Re: Thread A</subj><time>11:31:28</time><body>A5</body></memo>
+   <memo><subj>Thread C</subj><time>11:45:05</time><body>C6</body></memo>
+   <memo><subj>Re: Thread A</subj><time>13:15:17</time><body>A7</body></memo>
+   <memo><subj>Re: Thread C</subj><time>13:59:46</time><body>C8</body></memo>
+   <memo><subj>Re: Thread B</subj><time>14:21:28</time><body>B9</body></memo>
+   <memo><subj>Re: Thread A</subj><time>14:21:29</time><body>A10</body></memo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort36.xsl b/test/tests/conf/sort/sort36.xsl
new file mode 100644
index 0000000..0002333
--- /dev/null
+++ b/test/tests/conf/sort/sort36.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml"/>
+
+  <!-- FileName: sort36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test the famous technique for sorting with conditionals.
+     In this case, we want to sort strings with and without "Re: " prefix by
+     the rest of the string. Technique from Oliver Becker (obecker@informatik.hu-berlin.de). -->
+
+<xsl:template match="/">
+  <out><xsl:text>Memos by thread:
+</xsl:text>
+    <xsl:for-each select="doc/memo">
+      <xsl:sort select="concat(
+        substring(subj,1,number(not(starts-with(.,'Re: ')))*string-length(subj)),
+        substring(substring-after(subj,'Re: '),1,
+          number(starts-with(.,'Re: '))*string-length(substring-after(subj,'Re: '))))"
+        data-type="text" />
+        <!-- First substring in concat is null string when 'Re: ' is at start, all of subj otherwise.
+          Second substring in concat is null at opposite times from first, when non-null it's all of subj beyond 'Re: '.
+          Thus, concat "chooses" which string (all of subj or trimmed subj) based on the boolean starts-with(.,'Re: '),
+          because one of the two substring functions returns a null string while other doesn't.
+          The substring(x,1,0) returns null and substring(x,1,string-length(x)) returns the whole x.
+          The zero comes from converting the boolean false to a number, where multiplying by string-length stays zero.
+          The other branch gets boolean true converted to 1, then multiplied by string-length. -->
+      <xsl:sort select="time" data-type="text" /><!-- Tie breaker, for demonstration only. -->
+      <xsl:value-of select="body"/><xsl:text>: </xsl:text><xsl:value-of select="subj"/><xsl:text>;
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort37.xml b/test/tests/conf/sort/sort37.xml
new file mode 100644
index 0000000..6088487
--- /dev/null
+++ b/test/tests/conf/sort/sort37.xml
@@ -0,0 +1,9 @@
+<doc>
+   <alpha><left>v</left><right>e</right><orig>1</orig></alpha>
+   <alpha><left>x</left><right>d</right><orig>2</orig></alpha>
+   <alpha><left>u</left><right>a</right><orig>3</orig></alpha>
+   <alpha><left>t</left><right>f</right><orig>4</orig></alpha>
+   <alpha><left>z</left><right>c</right><orig>5</orig></alpha>
+   <alpha><left>w</left><right>g</right><orig>6</orig></alpha>
+   <alpha><left>y</left><right>b</right><orig>7</orig></alpha>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort37.xsl b/test/tests/conf/sort/sort37.xsl
new file mode 100644
index 0000000..3f682c7
--- /dev/null
+++ b/test/tests/conf/sort/sort37.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="text"/>
+
+  <!-- FileName: sort37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: If nothing comes through select, should get document order. -->
+
+<xsl:template match="/">
+  <xsl:for-each select="doc/alpha">
+    <xsl:sort select="./*[name(.) = 'never']" data-type="text" />
+    <xsl:value-of select="concat(left,right,orig)"/><xsl:text>,</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort38.xml b/test/tests/conf/sort/sort38.xml
new file mode 100644
index 0000000..ac1ad28
--- /dev/null
+++ b/test/tests/conf/sort/sort38.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <t>First</t>
+  <t>p2</t>
+  <t>1.0.9</t>
+  <t>00k</t>
+  <t>1.u</t>
+  <t>1-m</t>
+  <t>0.5s</t>
+  <t>Last</t>
+</doc>
+
diff --git a/test/tests/conf/sort/sort38.xsl b/test/tests/conf/sort/sort38.xsl
new file mode 100644
index 0000000..fc51870
--- /dev/null
+++ b/test/tests/conf/sort/sort38.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Numeric sort, but no items are true numbers. -->
+
+<xsl:template match="doc">
+  <out>
+    Ascending order....
+    <xsl:for-each select="t">
+      <xsl:sort data-type="number"/>
+      <xsl:value-of select="."/><xsl:text>|</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort39.xml b/test/tests/conf/sort/sort39.xml
new file mode 100644
index 0000000..584aefc
--- /dev/null
+++ b/test/tests/conf/sort/sort39.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<data>
+  <row><COLUMN1>ABC</COLUMN1><COLUMN2>ABC2</COLUMN2></row>
+  <row><COLUMN1>GHI</COLUMN1><COLUMN2>GHI2</COLUMN2></row>
+  <row><COLUMN1>DEF</COLUMN1><COLUMN2>DEF2</COLUMN2></row>
+  <row><COLUMN1>AEI</COLUMN1><COLUMN2>AEI2</COLUMN2></row>
+  <row><COLUMN1>JKL</COLUMN1><COLUMN2>JKL2</COLUMN2></row>
+  <row><COLUMN1>DHL</COLUMN1><COLUMN2>DHL2</COLUMN2></row>
+  <row><COLUMN1>JHF</COLUMN1><COLUMN2>JHF2</COLUMN2></row>
+</data>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort39.xsl b/test/tests/conf/sort/sort39.xsl
new file mode 100644
index 0000000..5744d5c
--- /dev/null
+++ b/test/tests/conf/sort/sort39.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT39 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to set lang from an expression. -->
+
+<xsl:output method="xml" indent="no"/>
+<xsl:template match="data">
+  <xsl:variable name="language" select="'en'"/>
+  <xsl:variable name="country" select="'US'"/>
+  <out><xsl:text>
+  </xsl:text>
+    <xsl:for-each select="row">
+      <xsl:sort lang="{concat($language,'-',$country)}"/>
+      <xsl:copy-of select="."/><xsl:text>
+  </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort40.xml b/test/tests/conf/sort/sort40.xml
new file mode 100644
index 0000000..96ea9a3
--- /dev/null
+++ b/test/tests/conf/sort/sort40.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <num>99</num>
+  <num>3</num>
+  <num>100</num>
+  <num>40</num>
+  <num>69</num>
+  <num>82</num>
+  <num>1</num>
+  <num>0</num>
+  <num>803.23</num>
+  <num>803.05</num>
+  <num>803.33333333</num>
+  <num>803.33333332</num>
+  <num>23</num>
+  <num>1001001001</num>
+  <num>0008</num>
+  <num>5</num>
+  <num>04</num>
+  <num>002</num>
+  <num>666</num>
+  <num>777</num>
+  <num>Hello</num>
+  <num>617-939-5938</num>
+  <num>-13</num>
+  <num>-47</num>
+</doc>
+
diff --git a/test/tests/conf/sort/sort40.xsl b/test/tests/conf/sort/sort40.xsl
new file mode 100644
index 0000000..d8c4fa9
--- /dev/null
+++ b/test/tests/conf/sort/sort40.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORT40 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Loop over a node-set in for-each and sort the nodes. -->
+
+<xsl:template match="/">
+  <xsl:variable name="numnodes" select="doc/num" />
+  <out>
+    Descending order....
+    <xsl:for-each select="$numnodes">
+      <xsl:sort data-type="number" order="descending"/>
+      <xsl:value-of select="."/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/sort/sort41.xml b/test/tests/conf/sort/sort41.xml
new file mode 100755
index 0000000..4b24352
--- /dev/null
+++ b/test/tests/conf/sort/sort41.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<doc>
+<monthtab>
+  <entry><name>Jan</name><number>1</number></entry>
+  <entry><name>January</name><number>1</number></entry>
+  <entry><name>Feb</name><number>2</number></entry>
+  <entry><name>February</name><number>2</number></entry>
+  <entry><name>Mar</name><number>3</number></entry>
+  <entry><name>March</name><number>3</number></entry>
+  <entry><name>Apr</name><number>4</number></entry>
+  <entry><name>April</name><number>4</number></entry>
+  <entry><name>May</name><number>5</number></entry>
+  <entry><name>Jun</name><number>6</number></entry>
+  <entry><name>June</name><number>6</number></entry>
+  <entry><name>Jul</name><number>7</number></entry>
+  <entry><name>July</name><number>7</number></entry>
+  <entry><name>Aug</name><number>8</number></entry>
+  <entry><name>August</name><number>8</number></entry>
+  <entry><name>Sep</name><number>9</number></entry>
+  <entry><name>Sept</name><number>9</number></entry>
+  <entry><name>September</name><number>9</number></entry>
+  <entry><name>Oct</name><number>10</number></entry>
+  <entry><name>October</name><number>10</number></entry>
+  <entry><name>Nov</name><number>11</number></entry>
+  <entry><name>November</name><number>11</number></entry>
+  <entry><name>Dec</name><number>12</number></entry>
+  <entry><name>December</name><number>12</number></entry>
+</monthtab>
+  <birthday person="Linda"><month>Apr</month><day>22</day></birthday>
+  <birthday person="Marie"><month>September</month><day>9</day></birthday>
+  <birthday person="Lisa"><month>March</month><day>31</day></birthday>
+  <birthday person="Harry"><month>Sep</month><day>16</day></birthday>
+  <birthday person="Ginny"><month>Jan</month><day>22</day></birthday>
+  <birthday person="Pedro"><month>November</month><day>2</day></birthday>
+  <birthday person="Bill"><month>Apr</month><day>4</day></birthday>
+  <birthday person="Frida"><month>July</month><day>5</day></birthday>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/sort/sort41.xsl b/test/tests/conf/sort/sort41.xsl
new file mode 100755
index 0000000..53a6e7d
--- /dev/null
+++ b/test/tests/conf/sort/sort41.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort41 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test multi-level sorting when the first-level sort key
+                isn't available. -->
+
+<xsl:key name="MonthNum" match="monthtab/entry/number" use="../name" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>Birthdays as found...
+</xsl:text>
+    <xsl:for-each select="birthday">
+      <xsl:value-of select="@person"/><xsl:text>: </xsl:text>
+      <xsl:value-of select="month"/><xsl:text> </xsl:text>
+      <xsl:value-of select="day"/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+Birthdays in chronological order...
+</xsl:text>
+<xsl:for-each select="birthday">
+      <!-- there is no 'mo' to look up -->
+      <xsl:sort select="key('MonthNum',mo)" data-type="number" />
+      <xsl:sort select="day" data-type="number" />
+      <xsl:value-of select="@person"/><xsl:text>: </xsl:text>
+      <xsl:value-of select="month"/><xsl:text> </xsl:text>
+      <xsl:value-of select="day"/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/htmllat1.dtd b/test/tests/conf/string/htmllat1.dtd
new file mode 100644
index 0000000..d7cd3f9
--- /dev/null
+++ b/test/tests/conf/string/htmllat1.dtd
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Portions (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLlat1 PUBLIC
+       "-//W3C//ENTITIES Latin 1//EN//HTML">
+     %HTMLlat1;
+-->
+
+<!ENTITY nbsp   "&#160;" >
+<!ENTITY iexcl  "&#161;" >
+<!ENTITY cent   "&#162;" >
+<!ENTITY pound  "&#163;" >
+<!ENTITY curren "&#164;" >
+<!ENTITY yen    "&#165;" >
+<!ENTITY brvbar "&#166;" >
+<!ENTITY sect   "&#167;" >
+<!ENTITY uml    "&#168;" >
+<!ENTITY copy   "&#169;" >
+<!ENTITY ordf   "&#170;" >
+<!ENTITY laquo  "&#171;" >
+<!ENTITY not    "&#172;" >
+<!ENTITY shy    "&#173;" >
+<!ENTITY reg    "&#174;" >
+<!ENTITY macr   "&#175;" >
+<!ENTITY deg    "&#176;" >
+<!ENTITY plusmn "&#177;" >
+<!ENTITY sup2   "&#178;" >
+<!ENTITY sup3   "&#179;" >
+<!ENTITY acute  "&#180;" >
+<!ENTITY micro  "&#181;" >
+<!ENTITY para   "&#182;" >
+<!ENTITY middot "&#183;" >
+<!ENTITY cedil  "&#184;" >
+<!ENTITY sup1   "&#185;" >
+<!ENTITY ordm   "&#186;" >
+<!ENTITY raquo  "&#187;" >
+<!ENTITY frac14 "&#188;" >
+<!ENTITY frac12 "&#189;" >
+<!ENTITY frac34 "&#190;" >
+<!ENTITY iquest "&#191;" >
+<!ENTITY Agrave "&#192;" >
+<!ENTITY Aacute "&#193;" >
+<!ENTITY Acirc  "&#194;" >
+<!ENTITY Atilde "&#195;" >
+<!ENTITY Auml   "&#196;" >
+<!ENTITY Aring  "&#197;" >
+<!ENTITY AElig  "&#198;" >
+<!ENTITY Ccedil "&#199;" >
+<!ENTITY Egrave "&#200;" >
+<!ENTITY Eacute "&#201;" >
+<!ENTITY Ecirc  "&#202;" >
+<!ENTITY Euml   "&#203;" >
+<!ENTITY Igrave "&#204;" >
+<!ENTITY Iacute "&#205;" >
+<!ENTITY Icirc  "&#206;" >
+<!ENTITY Iuml   "&#207;" >
+<!ENTITY ETH    "&#208;" >
+<!ENTITY Ntilde "&#209;" >
+<!ENTITY Ograve "&#210;" >
+<!ENTITY Oacute "&#211;" >
+<!ENTITY Ocirc  "&#212;" >
+<!ENTITY Otilde "&#213;" >
+<!ENTITY Ouml   "&#214;" >
+<!ENTITY times  "&#215;" >
+<!ENTITY Oslash "&#216;" >
+<!ENTITY Ugrave "&#217;" >
+<!ENTITY Uacute "&#218;" >
+<!ENTITY Ucirc  "&#219;" >
+<!ENTITY Uuml   "&#220;" >
+<!ENTITY Yacute "&#221;" >
+<!ENTITY THORN  "&#222;" >
+<!ENTITY szlig  "&#223;" >
+<!ENTITY agrave "&#224;" >
+<!ENTITY aacute "&#225;" >
+<!ENTITY acirc  "&#226;" >
+<!ENTITY atilde "&#227;" >
+<!ENTITY auml   "&#228;" >
+<!ENTITY aring  "&#229;" >
+<!ENTITY aelig  "&#230;" >
+<!ENTITY ccedil "&#231;" >
+<!ENTITY egrave "&#232;" >
+<!ENTITY eacute "&#233;" >
+<!ENTITY ecirc  "&#234;" >
+<!ENTITY euml   "&#235;" >
+<!ENTITY igrave "&#236;" >
+<!ENTITY iacute "&#237;" >
+<!ENTITY icirc  "&#238;" >
+<!ENTITY iuml   "&#239;" >
+<!ENTITY eth    "&#240;" >
+<!ENTITY ntilde "&#241;" >
+<!ENTITY ograve "&#242;" >
+<!ENTITY oacute "&#243;" >
+<!ENTITY ocirc  "&#244;" >
+<!ENTITY otilde "&#245;" >
+<!ENTITY ouml   "&#246;" >
+<!ENTITY divide "&#247;" >
+<!ENTITY oslash "&#248;" >
+<!ENTITY ugrave "&#249;" >
+<!ENTITY uacute "&#250;" >
+<!ENTITY ucirc  "&#251;" >
+<!ENTITY uuml   "&#252;" >
+<!ENTITY yacute "&#253;" >
+<!ENTITY thorn  "&#254;" >
+<!ENTITY yuml   "&#255;" >
\ No newline at end of file
diff --git a/test/tests/conf/string/string01.xml b/test/tests/conf/string/string01.xml
new file mode 100644
index 0000000..a2b684e
--- /dev/null
+++ b/test/tests/conf/string/string01.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string01.xsl b/test/tests/conf/string/string01.xsl
new file mode 100644
index 0000000..55bcb41
--- /dev/null
+++ b/test/tests/conf/string/string01.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of string-length() on literal string.  -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="string-length('This is a test')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string02.xml b/test/tests/conf/string/string02.xml
new file mode 100644
index 0000000..a2b684e
--- /dev/null
+++ b/test/tests/conf/string/string02.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string02.xsl b/test/tests/conf/string/string02.xsl
new file mode 100644
index 0000000..cc57a1d
--- /dev/null
+++ b/test/tests/conf/string/string02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of string-length() of element node -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="string-length(doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string04.xml b/test/tests/conf/string/string04.xml
new file mode 100644
index 0000000..3e01d8d
--- /dev/null
+++ b/test/tests/conf/string/string04.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+<a>Testing this</a>
+<b>and this too</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string04.xsl b/test/tests/conf/string/string04.xsl
new file mode 100644
index 0000000..39d46be
--- /dev/null
+++ b/test/tests/conf/string/string04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of string-length() without arguments, and
+       with node path. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="string-length()"/><xsl:text> </xsl:text>
+	<xsl:value-of select="string-length(doc/a)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string05.xml b/test/tests/conf/string/string05.xml
new file mode 100644
index 0000000..a2b684e
--- /dev/null
+++ b/test/tests/conf/string/string05.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string05.xsl b/test/tests/conf/string/string05.xsl
new file mode 100644
index 0000000..c8eab0f
--- /dev/null
+++ b/test/tests/conf/string/string05.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'string()' conversion w/ element node  -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="string(doc)"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string06.xml b/test/tests/conf/string/string06.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conf/string/string06.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string06.xsl b/test/tests/conf/string/string06.xsl
new file mode 100644
index 0000000..d692ad1
--- /dev/null
+++ b/test/tests/conf/string/string06.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'starts-with()'  -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="starts-with('ENCYCLOPEDIA', 'ENCY')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string07.xml b/test/tests/conf/string/string07.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conf/string/string07.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string07.xsl b/test/tests/conf/string/string07.xsl
new file mode 100644
index 0000000..cf16453
--- /dev/null
+++ b/test/tests/conf/string/string07.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'contains()'  -->
+
+<xsl:template match="/">
+   <out>
+      <xsl:value-of select="contains('ENCYCLOPEDIA', 'CYCL')"/>
+   </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string08.xml b/test/tests/conf/string/string08.xml
new file mode 100644
index 0000000..f991ad4
--- /dev/null
+++ b/test/tests/conf/string/string08.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string08.xsl b/test/tests/conf/string/string08.xsl
new file mode 100644
index 0000000..31cb673
--- /dev/null
+++ b/test/tests/conf/string/string08.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring-before()'  -->
+
+<xsl:template match="/">
+  <out>
+     <xsl:value-of select="substring-before('1999/04/01', '/')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string09.xml b/test/tests/conf/string/string09.xml
new file mode 100644
index 0000000..d07cbb1
--- /dev/null
+++ b/test/tests/conf/string/string09.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string09.xsl b/test/tests/conf/string/string09.xsl
new file mode 100644
index 0000000..3369d46
--- /dev/null
+++ b/test/tests/conf/string/string09.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring-after()'  -->
+
+<xsl:template match="/">
+   <out>
+      <xsl:value-of select="substring-after('1999/04/01', '/')"/>
+   </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string10.xml b/test/tests/conf/string/string10.xml
new file mode 100644
index 0000000..760d52a
--- /dev/null
+++ b/test/tests/conf/string/string10.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc> 
+<a>       This          is a       
+
+normalized          
+text node from 
+the
+source document.</a>    
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string10.xsl b/test/tests/conf/string/string10.xsl
new file mode 100644
index 0000000..a1c3833
--- /dev/null
+++ b/test/tests/conf/string/string10.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'normalize-space()' function  -->
+
+<xsl:template match="/doc">
+   <out>
+      <xsl:value-of select="normalize-space('&#9;&#10;&#13; 
+      ab    
+      cd&#9;&#10;&#13;
+      ef&#9;&#10;&#13; ')"/><xsl:text>&#10;</xsl:text>
+	  <xsl:value-of select="normalize-space(a)"/>
+   </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string100.xml b/test/tests/conf/string/string100.xml
new file mode 100644
index 0000000..bbd2be7
--- /dev/null
+++ b/test/tests/conf/string/string100.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string100.xsl b/test/tests/conf/string/string100.xsl
new file mode 100644
index 0000000..8dbec8e
--- /dev/null
+++ b/test/tests/conf/string/string100.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str100 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'concat()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="concat(&#34;cd&#34;, &#34;34&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string101.xml b/test/tests/conf/string/string101.xml
new file mode 100644
index 0000000..bbd2be7
--- /dev/null
+++ b/test/tests/conf/string/string101.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string101.xsl b/test/tests/conf/string/string101.xsl
new file mode 100644
index 0000000..4f65815
--- /dev/null
+++ b/test/tests/conf/string/string101.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str101 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'concat()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="concat(&#34;cd&#34;, 34)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string102.xml b/test/tests/conf/string/string102.xml
new file mode 100644
index 0000000..bbd2be7
--- /dev/null
+++ b/test/tests/conf/string/string102.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string102.xsl b/test/tests/conf/string/string102.xsl
new file mode 100644
index 0000000..e31a943
--- /dev/null
+++ b/test/tests/conf/string/string102.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: STR102 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of concat() on entities and expressions -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="concat(&#34;bc&#34;, string(23))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string103.xml b/test/tests/conf/string/string103.xml
new file mode 100644
index 0000000..bbd2be7
--- /dev/null
+++ b/test/tests/conf/string/string103.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string103.xsl b/test/tests/conf/string/string103.xsl
new file mode 100644
index 0000000..db16298
--- /dev/null
+++ b/test/tests/conf/string/string103.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str103 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'concat()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="concat(a, 34)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string104.xml b/test/tests/conf/string/string104.xml
new file mode 100644
index 0000000..bbd2be7
--- /dev/null
+++ b/test/tests/conf/string/string104.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string104.xsl b/test/tests/conf/string/string104.xsl
new file mode 100644
index 0000000..279edb7
--- /dev/null
+++ b/test/tests/conf/string/string104.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str104 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'concat()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="concat(false(),'ly')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string105.xml b/test/tests/conf/string/string105.xml
new file mode 100644
index 0000000..5b3290b
--- /dev/null
+++ b/test/tests/conf/string/string105.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e attr="whatsup">what's up</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string105.xsl b/test/tests/conf/string/string105.xsl
new file mode 100644
index 0000000..701ce91
--- /dev/null
+++ b/test/tests/conf/string/string105.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: STR105 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Special case of concat() with one argument.
+       Strictly speaking, this should fail just like STRerr14. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="concat(/*, /*[@attr='whatsup'])"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string106.xml b/test/tests/conf/string/string106.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/string/string106.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string106.xsl b/test/tests/conf/string/string106.xsl
new file mode 100644
index 0000000..c23c123
--- /dev/null
+++ b/test/tests/conf/string/string106.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str106 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 12.3 Number Formatting  -->
+  <!-- Purpose: Test of 'format-number()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="format-number(1000, '###0')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string107.xml b/test/tests/conf/string/string107.xml
new file mode 100644
index 0000000..c122878
--- /dev/null
+++ b/test/tests/conf/string/string107.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <av>
+    <a>
+      <b>b</b>
+      <c>c</c>
+      <d>d</d>
+      <e>e</e>
+    </a>
+    <v>
+      <w>w</w>
+      <x>x</x>
+      <y>y</y>
+      <z>z</z>
+    </v>
+  </av>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string107.xsl b/test/tests/conf/string/string107.xsl
new file mode 100644
index 0000000..5134892
--- /dev/null
+++ b/test/tests/conf/string/string107.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string107 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of string() function on an RTF with sub-nodes. -->
+
+<xsl:variable name="ResultTreeFragTest">
+  <xsl:value-of select="doc/av"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="string($ResultTreeFragTest)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string108.xml b/test/tests/conf/string/string108.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/string/string108.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string108.xsl b/test/tests/conf/string/string108.xsl
new file mode 100644
index 0000000..7bd683d
--- /dev/null
+++ b/test/tests/conf/string/string108.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str108 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 12.3 Number Formatting  -->
+  <!-- Purpose: Test of 'format-number()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="format-number(1, '00')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string109.xml b/test/tests/conf/string/string109.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/string/string109.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string109.xsl b/test/tests/conf/string/string109.xsl
new file mode 100644
index 0000000..b88ed66
--- /dev/null
+++ b/test/tests/conf/string/string109.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str109 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 12.3 Number Formatting  -->
+  <!-- Purpose: Test of 'format-number()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="format-number(1, '00.0')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string11.xml b/test/tests/conf/string/string11.xml
new file mode 100644
index 0000000..25a693e
--- /dev/null
+++ b/test/tests/conf/string/string11.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string11.xsl b/test/tests/conf/string/string11.xsl
new file mode 100644
index 0000000..94239b5
--- /dev/null
+++ b/test/tests/conf/string/string11.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'translate()'  -->
+
+<xsl:template match="/doc">
+	<out>
+       <xsl:value-of select='translate("bar","abc","ABC")'/>
+	</out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string110.xml b/test/tests/conf/string/string110.xml
new file mode 100644
index 0000000..03ac1dc
--- /dev/null
+++ b/test/tests/conf/string/string110.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string110.xsl b/test/tests/conf/string/string110.xsl
new file mode 100644
index 0000000..ba05450
--- /dev/null
+++ b/test/tests/conf/string/string110.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str110 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 12.3 Number Formatting  -->
+  <!-- Purpose: Test of 'format-number()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="format-number(0.25, '00%')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string111.xml b/test/tests/conf/string/string111.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string111.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string111.xsl b/test/tests/conf/string/string111.xsl
new file mode 100644
index 0000000..239feb2
--- /dev/null
+++ b/test/tests/conf/string/string111.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str111 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring('ENCYCLOPEDIA', 8, 3)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string112.xml b/test/tests/conf/string/string112.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string112.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string112.xsl b/test/tests/conf/string/string112.xsl
new file mode 100644
index 0000000..e0bc304
--- /dev/null
+++ b/test/tests/conf/string/string112.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str112 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring('ENCYCLOPEDIA', 8)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string113.xml b/test/tests/conf/string/string113.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string113.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string113.xsl b/test/tests/conf/string/string113.xsl
new file mode 100644
index 0000000..147e021
--- /dev/null
+++ b/test/tests/conf/string/string113.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ 
+  <!-- FileName: str113 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring('abcdefghijk',0 div 0, 5)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string114.xml b/test/tests/conf/string/string114.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string114.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string114.xsl b/test/tests/conf/string/string114.xsl
new file mode 100644
index 0000000..dd04701
--- /dev/null
+++ b/test/tests/conf/string/string114.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str114 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring('abcdefghijk',4, 6)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string115.xml b/test/tests/conf/string/string115.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string115.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string115.xsl b/test/tests/conf/string/string115.xsl
new file mode 100644
index 0000000..a30fd46
--- /dev/null
+++ b/test/tests/conf/string/string115.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str115 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring('1999/04/01', 1, 0)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string116.xml b/test/tests/conf/string/string116.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string116.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string116.xsl b/test/tests/conf/string/string116.xsl
new file mode 100644
index 0000000..f5060c5
--- /dev/null
+++ b/test/tests/conf/string/string116.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str116 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring(doc, 1, 4)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string117.xml b/test/tests/conf/string/string117.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string117.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string117.xsl b/test/tests/conf/string/string117.xsl
new file mode 100644
index 0000000..1aa4b0a
--- /dev/null
+++ b/test/tests/conf/string/string117.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str117 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring(foo, 2, 2)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string118.xml b/test/tests/conf/string/string118.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string118.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string118.xsl b/test/tests/conf/string/string118.xsl
new file mode 100644
index 0000000..9330989
--- /dev/null
+++ b/test/tests/conf/string/string118.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str118 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring(doc/@attr, 1, 3)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string119.xml b/test/tests/conf/string/string119.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string119.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string119.xsl b/test/tests/conf/string/string119.xsl
new file mode 100644
index 0000000..3bb477a
--- /dev/null
+++ b/test/tests/conf/string/string119.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str119 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring(doc/@attr, 4)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string12.xml b/test/tests/conf/string/string12.xml
new file mode 100644
index 0000000..f7a9be6
--- /dev/null
+++ b/test/tests/conf/string/string12.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string12.xsl b/test/tests/conf/string/string12.xsl
new file mode 100644
index 0000000..a83fdd3
--- /dev/null
+++ b/test/tests/conf/string/string12.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'concat()'  -->
+
+<xsl:template match="doc">
+   <out>
+      <xsl:value-of select='concat("x","yz")'/>
+   </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string120.xml b/test/tests/conf/string/string120.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string120.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string120.xsl b/test/tests/conf/string/string120.xsl
new file mode 100644
index 0000000..b58f96a
--- /dev/null
+++ b/test/tests/conf/string/string120.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str120 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'substring()'  -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="substring(doc/@attr, 2.5, 3.6)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string121.xml b/test/tests/conf/string/string121.xml
new file mode 100644
index 0000000..953ceab
--- /dev/null
+++ b/test/tests/conf/string/string121.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">     bar       fly        </a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string121.xsl b/test/tests/conf/string/string121.xsl
new file mode 100644
index 0000000..d8c7920
--- /dev/null
+++ b/test/tests/conf/string/string121.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str121 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Purpose: Test of 'translate()'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:variable name="s" select="a"/>
+		<xsl:value-of select='translate(normalize-space($s), " ", "_")'/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string122.xml b/test/tests/conf/string/string122.xml
new file mode 100644
index 0000000..316df4c
--- /dev/null
+++ b/test/tests/conf/string/string122.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <av>
+    <a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>e</e></a>
+    <v>
+      <w>w</w>
+      <x>x</x>
+      <y>y</y>
+      <z>z</z>
+    </v>
+  </av>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string122.xsl b/test/tests/conf/string/string122.xsl
new file mode 100644
index 0000000..22b14c4
--- /dev/null
+++ b/test/tests/conf/string/string122.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string122 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: string(nodeset) returns string value of the node in the
+       node-set that is first in document order.'  -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="string(av//*)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string123.xml b/test/tests/conf/string/string123.xml
new file mode 100644
index 0000000..6fbc7d0
--- /dev/null
+++ b/test/tests/conf/string/string123.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>Test<a>ing</a>String</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string123.xsl b/test/tests/conf/string/string123.xsl
new file mode 100644
index 0000000..43ef7db
--- /dev/null
+++ b/test/tests/conf/string/string123.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string123 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of string() function with no arguments. -->
+  <!-- "If the argument is omitted, it defaults to a node-set
+        with the context node as its only member."
+    BUT this node has text and element children, all of which get concatenated. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="string()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string124.xml b/test/tests/conf/string/string124.xml
new file mode 100644
index 0000000..439275e
--- /dev/null
+++ b/test/tests/conf/string/string124.xml
@@ -0,0 +1,5 @@
+<doc>
+Mother's house's door
+SYMBOL 180 \f &quot;Symbol&quot; \s1
+SYMBOL 180 \f &quot;Symbol&quot; \s1
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string124.xsl b/test/tests/conf/string/string124.xsl
new file mode 100644
index 0000000..e76ef65
--- /dev/null
+++ b/test/tests/conf/string/string124.xsl
@@ -0,0 +1,45 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: string124 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of contains() function searching for an entity. -->
+
+<xsl:strip-space elements = "*"/>
+<xsl:output method = "xml"/>
+
+<xsl:template match="text()[contains(., 'SYMBOL 180 \f &quot;')]" priority="2">
+   Found match of entity
+</xsl:template>
+
+<xsl:template match="*">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()" priority="1"/><!-- Suppress text copying if contains() fails -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string125.xml b/test/tests/conf/string/string125.xml
new file mode 100644
index 0000000..07371fc
--- /dev/null
+++ b/test/tests/conf/string/string125.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <main>fu manchu</main>
+  <sub>foo</sub>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string125.xsl b/test/tests/conf/string/string125.xsl
new file mode 100644
index 0000000..82b2122
--- /dev/null
+++ b/test/tests/conf/string/string125.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string125 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of contains() function with nodes for both arguments, string is not in it. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains(main,sub)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string126.xml b/test/tests/conf/string/string126.xml
new file mode 100644
index 0000000..47ac14b
--- /dev/null
+++ b/test/tests/conf/string/string126.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <main>fu manchu</main>
+  <sub>fu</sub>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string126.xsl b/test/tests/conf/string/string126.xsl
new file mode 100644
index 0000000..1859957
--- /dev/null
+++ b/test/tests/conf/string/string126.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string126 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of contains() function with nodes for both arguments, string is in it. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains(main,sub)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string127.xml b/test/tests/conf/string/string127.xml
new file mode 100644
index 0000000..ded3855
--- /dev/null
+++ b/test/tests/conf/string/string127.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <main>foo</main>
+  <main>achoo</main>
+  <main>fu manchu</main>
+  <sub>fu</sub>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string127.xsl b/test/tests/conf/string/string127.xsl
new file mode 100644
index 0000000..70328ad
--- /dev/null
+++ b/test/tests/conf/string/string127.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string127 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of contains() function with two paths, 
+       first argument is multiple nodes, first of those nodes does NOT contain the string. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains(main,sub)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string128.xml b/test/tests/conf/string/string128.xml
new file mode 100644
index 0000000..b9f2604
--- /dev/null
+++ b/test/tests/conf/string/string128.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <main>fu manchu</main>
+  <sub>foo</sub>
+  <sub>fu</sub>
+  <sub>few</sub>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string128.xsl b/test/tests/conf/string/string128.xsl
new file mode 100644
index 0000000..b4594df
--- /dev/null
+++ b/test/tests/conf/string/string128.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string128 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of contains() function with two paths, 
+       second argument is multiple nodes, first of those nodes does NOT contain the string. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains(main,sub)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string129.xml b/test/tests/conf/string/string129.xml
new file mode 100644
index 0000000..82d4069
--- /dev/null
+++ b/test/tests/conf/string/string129.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>p &amp; q</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string129.xsl b/test/tests/conf/string/string129.xsl
new file mode 100644
index 0000000..978842d
--- /dev/null
+++ b/test/tests/conf/string/string129.xsl
@@ -0,0 +1,39 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: string129 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of contains() function using a numbered entity. -->
+
+<xsl:strip-space elements = "*"/>
+<xsl:output method = "xml" indent = "yes"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains(., '&#38;')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string13.xml b/test/tests/conf/string/string13.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string13.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string13.xsl b/test/tests/conf/string/string13.xsl
new file mode 100644
index 0000000..3e117af
--- /dev/null
+++ b/test/tests/conf/string/string13.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'format-number()' function. -->
+
+<xsl:template match="/">
+  <out>
+     <xsl:value-of select="format-number(1, '#,##0')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string130.xml b/test/tests/conf/string/string130.xml
new file mode 100644
index 0000000..bc4f3f7
--- /dev/null
+++ b/test/tests/conf/string/string130.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>98.6&#176; F</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string130.xsl b/test/tests/conf/string/string130.xsl
new file mode 100644
index 0000000..cbf44d4
--- /dev/null
+++ b/test/tests/conf/string/string130.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!DOCTYPE HTMLlat1 SYSTEM "htmllat1.dtd">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: string130 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of contains() function using a numbered entity. -->
+
+<xsl:output method="html"/>
+<xsl:strip-space elements = "*"/>
+
+<xsl:template match="doc">
+  <HTML>
+    <xsl:value-of select="contains(., '&deg;')"/>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string131.xml b/test/tests/conf/string/string131.xml
new file mode 100644
index 0000000..2b900fe
--- /dev/null
+++ b/test/tests/conf/string/string131.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc>17</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string131.xsl b/test/tests/conf/string/string131.xsl
new file mode 100644
index 0000000..fee503b
--- /dev/null
+++ b/test/tests/conf/string/string131.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string131 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of string() with zero arguments. Context node just has one text child. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="string()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string132.xml b/test/tests/conf/string/string132.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string132.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string132.xsl b/test/tests/conf/string/string132.xsl
new file mode 100644
index 0000000..11b9bec
--- /dev/null
+++ b/test/tests/conf/string/string132.xsl
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string132 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of default (no functions) conversion of integers. -->
+
+<xsl:template match="/">
+  <out>
+    <set>
+    <xsl:text>Positive numbers:&#10;</xsl:text>
+    <xsl:value-of select="1"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="12"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="123"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="1234"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="12345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="123456"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="1234567"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="12345678"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="1234567890"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="12345678901"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="123456789012"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="1234567890123"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="12345678901234"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="123456789012345"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="1234567890123456"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="12345678901234567"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="123456789012345678"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:text>Negative numbers:&#10;</xsl:text>
+    <xsl:value-of select="-1"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-12"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-123"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-1234"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-12345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-123456"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-1234567"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-12345678"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-1234567890"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-12345678901"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-123456789012"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-1234567890123"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-12345678901234"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-123456789012345"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-1234567890123456"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-12345678901234567"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-123456789012345678"/>
+	</set>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string133.xml b/test/tests/conf/string/string133.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string133.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string133.xsl b/test/tests/conf/string/string133.xsl
new file mode 100644
index 0000000..03a8250
--- /dev/null
+++ b/test/tests/conf/string/string133.xsl
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string133 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of default (no functions) conversion of decimal numbers with fractions. -->
+
+<xsl:template match="/">
+  <out>
+   <set>
+    <xsl:text>Positive numbers:&#10;</xsl:text>
+    <xsl:value-of select=".1"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".01"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".012"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0123"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".01234"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0123456"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".01234567"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".012345678"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".10123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".101234567892"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".1012345678923"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".10123456789234"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".101234567892345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".1012345678923456"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".10123456789234567"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".101234567892345678"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".1012345678923456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".10123456789234567893"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:text>Negative numbers:&#10;</xsl:text>
+    <xsl:value-of select="-.1"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.01"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.012"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0123"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.01234"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0123456"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.01234567"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.012345678"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.10123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.101234567892"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.1012345678923"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.10123456789234"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.101234567892345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.1012345678923456"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.10123456789234567"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.101234567892345678"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.1012345678923456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.10123456789234567893"/><xsl:text>&#10;</xsl:text></set>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string134.xml b/test/tests/conf/string/string134.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string134.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string134.xsl b/test/tests/conf/string/string134.xsl
new file mode 100644
index 0000000..1a6a18d
--- /dev/null
+++ b/test/tests/conf/string/string134.xsl
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string134 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of default (no functions) conversion of decimal numbers with decimal point at all positions. -->
+
+<xsl:template match="/">
+  <out>
+  <set>
+   <xsl:text>Positive numbers:&#10;</xsl:text>
+    <xsl:value-of select="9.87654321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="98.7654321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="987.654321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="9876.54321012345"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="98765.4321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="987654.321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="9876543.21012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="98765432.1012345"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="987654321.012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="9876543210.12345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="98765432101.2345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="987654321012.345"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="9876543210123.45"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="98765432101234.5"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:text>Negative numbers:&#10;</xsl:text>
+    <xsl:value-of select="-9.87654321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-98.7654321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-987.654321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-9876.54321012345"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-98765.4321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-987654.321012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-9876543.21012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-98765432.1012345"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-987654321.012345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-9876543210.12345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-98765432101.2345"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-987654321012.345"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-9876543210123.45"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-98765432101234.5"/><xsl:text>&#10;</xsl:text>
+  </set></out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string135.xml b/test/tests/conf/string/string135.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string135.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string135.xsl b/test/tests/conf/string/string135.xsl
new file mode 100644
index 0000000..f1d0b19
--- /dev/null
+++ b/test/tests/conf/string/string135.xsl
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string135 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of default (no functions) conversion of small decimal numbers. -->
+
+<xsl:template match="/">
+  <out>
+   <set>
+    <xsl:text>Positive numbers:&#10;</xsl:text>
+    <xsl:value-of select=".123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".00123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".0000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".00000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".0000000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".00000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".000000000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".0000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select=".000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".0000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".0000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".0000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".0000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".00000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".000000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select=".0000000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:text>Negative numbers:&#10;</xsl:text>
+    <xsl:value-of select="-.123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.00123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.0000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.00000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.0000000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.00000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.000000000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.0000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000000000000000000000123456789"/><xsl:text>,</xsl:text>
+    <xsl:value-of select="-.000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.0000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.0000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.0000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.0000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.00000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.000000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+    <xsl:value-of select="-.0000000000000000000000000000000000000000123456789"/></set><set><xsl:text>&#10;</xsl:text>
+  </set></out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string136.xml b/test/tests/conf/string/string136.xml
new file mode 100644
index 0000000..107f277
--- /dev/null
+++ b/test/tests/conf/string/string136.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>barter</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string136.xsl b/test/tests/conf/string/string136.xsl
new file mode 100644
index 0000000..78bd54e
--- /dev/null
+++ b/test/tests/conf/string/string136.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string136 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that 'translate()' doesn't loop on characters that get repositioned -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:value-of select='translate(a,"abe","bao")'/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string137.xml b/test/tests/conf/string/string137.xml
new file mode 100644
index 0000000..7d65054
--- /dev/null
+++ b/test/tests/conf/string/string137.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>barbarity</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string137.xsl b/test/tests/conf/string/string137.xsl
new file mode 100644
index 0000000..70cc594
--- /dev/null
+++ b/test/tests/conf/string/string137.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string137 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use 'translate()' to map several characters to the same one. -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:value-of select='translate(a,"aeiouy","******")'/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string138.xml b/test/tests/conf/string/string138.xml
new file mode 100644
index 0000000..61e390f
--- /dev/null
+++ b/test/tests/conf/string/string138.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a><![CDATA[qua'lit"y]]></a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string138.xsl b/test/tests/conf/string/string138.xsl
new file mode 100644
index 0000000..b2fcc5e
--- /dev/null
+++ b/test/tests/conf/string/string138.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string138 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use 'translate()' to change quotes and apostrophes to other characters. -->
+
+<xsl:template match="/doc">
+  <out>
+    <!-- The input string to translate() contains both a quote and an apostrophe.
+      Since only one of those two can be treated as data in one string constant,
+      we build up the string from two variables, using opposite double-quoting on each. -->
+    <xsl:variable name="pt1" select='"aqu&apos;"'/>
+    <xsl:variable name="pt2" select="'&quot;eos'"/>
+    <xsl:value-of select="translate(a,concat($pt1,$pt2),'AQU-+EOS')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string139.xml b/test/tests/conf/string/string139.xml
new file mode 100644
index 0000000..4f99c41
--- /dev/null
+++ b/test/tests/conf/string/string139.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>quan+ti-ty</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string139.xsl b/test/tests/conf/string/string139.xsl
new file mode 100644
index 0000000..4152867
--- /dev/null
+++ b/test/tests/conf/string/string139.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string139 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use 'translate()' to change certain characters to quotes and apostrophes. -->
+
+<xsl:template match="/doc">
+  <out>
+    <!-- The output string to translate() contains both a quote and an apostrophe.
+      Since only one of those two can be treated as data in one string constant,
+      we build up the string from two variables, using opposite double-quoting on each. -->
+    <xsl:variable name="pt1" select='"aqu&apos;"'/>
+    <xsl:variable name="pt2" select="'&quot;eos'"/>
+    <xsl:value-of select="translate(a,'AQU-+EOS',concat($pt1,$pt2))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string14.xml b/test/tests/conf/string/string14.xml
new file mode 100644
index 0000000..c122878
--- /dev/null
+++ b/test/tests/conf/string/string14.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <av>
+    <a>
+      <b>b</b>
+      <c>c</c>
+      <d>d</d>
+      <e>e</e>
+    </a>
+    <v>
+      <w>w</w>
+      <x>x</x>
+      <y>y</y>
+      <z>z</z>
+    </v>
+  </av>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string14.xsl b/test/tests/conf/string/string14.xsl
new file mode 100644
index 0000000..0b44374
--- /dev/null
+++ b/test/tests/conf/string/string14.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of string() conversion on a variable containing a node-set -->
+
+<xsl:template match="/">
+  <xsl:variable name="which" select="doc/av//*"/>
+  <out>
+    <xsl:value-of select="string($which)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string140.xml b/test/tests/conf/string/string140.xml
new file mode 100644
index 0000000..44500a3
--- /dev/null
+++ b/test/tests/conf/string/string140.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc> 
+<a>a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+<a >a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+<a>a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a >
+<a  >a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+<a>a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a  >
+<a   >a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+<a>a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a   >
+<a>a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+<!-- Now try padding out each line at the front. -->
+<a>a! b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+<a>a!! b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+<a>a!!! b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+<a>a!!!! b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string140.xsl b/test/tests/conf/string/string140.xsl
new file mode 100644
index 0000000..1c81e25
--- /dev/null
+++ b/test/tests/conf/string/string140.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string140 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'normalize-space()' function. Watch for space being removed when it shouldn't be -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="a">
+      <xsl:text>
+</xsl:text>
+      <xsl:element name="A">
+        <xsl:attribute name="size"><xsl:value-of select="string-length(normalize-space(.))"/></xsl:attribute>
+        <xsl:value-of select="normalize-space(.)"/>
+      </xsl:element>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string141.xml b/test/tests/conf/string/string141.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/conf/string/string141.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/string/string141.xsl b/test/tests/conf/string/string141.xsl
new file mode 100644
index 0000000..a9b4f92
--- /dev/null
+++ b/test/tests/conf/string/string141.xsl
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string141 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test concat() with lots of arguments -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select='concat("t1","t2","t3","t4","t5","t6","t7","t8","t9","t10",
+    "t11","t12","t13","t14","t15","t16","t17","t18","t19","t20",
+    "t21","t22","t23","t24","t25","t26","t27","t28","t29","t30",
+    "t31","t32","t33","t34","t35","t36","t37","t38","t39","t40",
+    "t41","t42","t43","t44","t45","t46","t47","t48","t49","t50",
+    "t51","t52","t53","t54","t55","t56","t57","t58","t59","t60",
+    "t61","t62","t63","t64","t65","t66","t67","t68","t69","t70",
+    "t71","t72","t73","t74","t75","t76","t77","t78","t79","t80",
+    "t81","t82","t83","t84","t85","t86","t87","t88","t89","t90",
+    "t91","t92","t93","t94","t95","t96","t97","t98","t99","t100",
+    "t101","t102","t103","t104","t105","t106","t107","t108","t109","t110",
+    "t111","t112","t113","t114","t115","t116","t117","t118","t119","t120",
+    "t121","t122","t123","t124","t125","t126","t127","t128","t129","t130",
+    "t131","t132","t133","t134","t135","t136","t137","t138","t139","t140",
+    "t141","t142","t143","t144","t145","t146","t147","t148","t149","t150",
+    "t151","t152","t153","t154","t155","t156","t157","t158","t159","t160",
+    "t161","t162","t163","t164","t165","t166","t167","t168","t169","t170",
+    "t171","t172","t173","t174","t175","t176","t177","t178","t179","t180",
+    "t181","t182","t183","t184","t185","t186","t187","t188","t189","t190",
+    "t191","t192","t193","t194","t195","t196","t197","t198","t199","t200",
+    "t201","t202","t203","t204","t205","t206","t207","t208","t209","t210",
+    "t211","t212","t213","t214","t215","t216","t217","t218","t219","t220",
+    "t221","t222","t223","t224","t225","t226","t227","t228","t229","t230",
+    "t231","t232","t233","t234","t235","t236","t237","t238","t239","t240",
+    "t241","t242","t243","t244","t245","t246","t247","t248","t249","t250",
+    "t251","t252","t253","t254","t255","t256","t257","t258","t259","t260",
+    "t261","t262","t263","t264","t265","t266","t267","t268","t269","t270",
+    "t271","t272","t273","t274","t275","t276","t277","t278","t279","t280",
+    "t281","t282","t283","t284","t285","t286","t287","t288","t289","t290",
+    "t291","t292","t293","t294","t295","t296","t297","t298","t299","t300",
+    "t301","t302","t303","t304","t305","t306","t307","t308","t309","t310",
+    "t311","t312","t313","t314","t315","t316","t317","t318","t319","t320",
+    "t321","t322","t323","t324","t325","t326","t327","t328","t329","t330",
+    "t331","t332","t333","t334","t335","t336","t337","t338","t339","t340",
+    "t341","t342","t343","t344","t345","t346","t347","t348","t349","t350",
+    "t351","t352","t353","t354","t355","t356","t357","t358","t359","t360",
+    "t361","t362","t363","t364","t365","t366","t367","t368","t369","t370",
+    "t371","t372","t373","t374","t375","t376","t377","t378","t379","t380",
+    "t381","t382","t383","t384","t385","t386","t387","t388","t389","t390",
+    "t391","t392","t393","t394","t395","t396","t397","t398","t399","t400",
+    "t401","t402","t403","t404","t405","t406","t407","t408","t409","t410",
+    "t411","t412","t413","t414","t415","t416","t417","t418","t419","t420",
+    "t421","t422","t423","t424","t425","t426","t427","t428","t429","t430",
+    "t431","t432","t433","t434","t435","t436","t437","t438","t439","t440",
+    "t441","t442","t443","t444","t445","t446","t447","t448","t449","t450",
+    "t451","t452","t453","t454","t455","t456","t457","t458","t459","t460",
+    "t461","t462","t463","t464","t465","t466","t467","t468","t469","t470",
+    "t471","t472","t473","t474","t475","t476","t477","t478","t479","t480",
+    "t481","t482","t483","t484","t485","t486","t487","t488","t489","t490",
+    "t491","t492","t493","t494","t495","t496","t497","t498","t499","t500",
+    "t501","t502","t503","t504","t505","t506","t507","t508","t509","t510",
+    "t511","t512","t513","t514","t515","t516","t517","t518","t519","t520",
+    "t521","t522","t523","t524","t525","t526","t527","t528","t529","t530",
+    "t531","t532","t533","t534","t535","t536","t537","t538","t539","t540",
+    "t541","t542","t543","t544","t545","t546","t547","t548","t549","t550",
+    "t551","t552","t553","t554","t555","t556","t557","t558","t559","t560",
+    "t561","t562","t563","t564","t565","t566","t567","t568","t569","t570",
+    "t571","t572","t573","t574","t575","t576","t577","t578","t579","t580",
+    "t581","t582","t583","t584","t585","t586","t587","t588","t589","t590",
+    "t591","t592","t593","t594","t595","t596","t597","t598","t599","t600",
+    "t601","t602","t603","t604","t605","t606","t607","t608","t609","t610",
+    "t611","t612","t613","t614","t615","t616","t617","t618","t619","t620",
+    "t621","t622","t623","t624","t625","t626","t627","t628","t629","t630",
+    "t631","t632","t633","t634","t635","t636","t637","t638","t639","t640",
+    "t641","t642","t643","t644","t645","t646","t647","t648","t649","t650",
+    "t651","t652","t653","t654","t655","t656","t657","t658","t659","t660",
+    "t661","t662","t663","t664","t665","t666","t667","t668","t669","t670",
+    "t671","t672","t673","t674","t675","t676","t677","t678","t679","t680",
+    "t681","t682","t683","t684","t685","t686","t687","t688","t689","t690",
+    "t691","t692","t693","t694","t695","t696","t697","t698","t699","t700",
+    "t701","t702","t703","t704","t705","t706","t707","t708","t709","t710",
+    "t711","t712","t713","t714","t715","t716","t717","t718","t719","t720",
+    "t721","t722","t723","t724","t725","t726","t727","t728","t729","t730",
+    "t731","t732","t733","t734","t735","t736","t737","t738","t739","t740",
+    "t741","t742","t743","t744","t745","t746","t747","t748","t749","t750",
+    "t751","t752","t753","t754","t755","t756","t757","t758","t759","t760",
+    "t761","t762","t763","t764","t765","t766","t767","t768","t769","t770",
+    "t771","t772","t773","t774","t775","t776","t777","t778","t779","t780",
+    "t781","t782","t783","t784","t785","t786","t787","t788","t789","t790",
+    "t791","t792","t793","t794","t795","t796","t797","t798","t799","t800",
+    "t801","t802","t803","t804","t805","t806","t807","t808","t809","t810",
+    "t811","t812","t813","t814","t815","t816","t817","t818","t819","t820",
+    "t821","t822","t823","t824","t825","t826","t827","t828","t829","t830",
+    "t831","t832","t833","t834","t835","t836","t837","t838","t839","t840",
+    "t841","t842","t843","t844","t845","t846","t847","t848","t849","t850",
+    "t851","t852","t853","t854","t855","t856","t857","t858","t859","t860",
+    "t861","t862","t863","t864","t865","t866","t867","t868","t869","t870",
+    "t871","t872","t873","t874","t875","t876","t877","t878","t879","t880",
+    "t881","t882","t883","t884","t885","t886","t887","t888","t889","t890",
+    "t891","t892","t893","t894","t895","t896","t897","t898","t899","t900",
+    "t901","t902","t903","t904","t905","t906","t907","t908","t909","t910",
+    "t911","t912","t913","t914","t915","t916","t917","t918","t919","t920",
+    "t921","t922","t923","t924","t925","t926","t927","t928","t929","t930",
+    "t931","t932","t933","t934","t935","t936","t937","t938","t939","t940",
+    "t941","t942","t943","t944","t945","t946","t947","t948","t949","t950",
+    "t951","t952","t953","t954","t955","t956","t957","t958","t959","t960",
+    "t961","t962","t963","t964","t965","t966","t967","t968","t969","t970",
+    "t971","t972","t973","t974","t975","t976","t977","t978","t979","t980",
+    "t981","t982","t983","t984","t985","t986","t987","t988","t989","t990",
+    "t991","t992","t993","t994","t995","t996","t997","t998","t999","t1000"
+    )'/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string142.xml b/test/tests/conf/string/string142.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/conf/string/string142.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/string/string142.xsl b/test/tests/conf/string/string142.xsl
new file mode 100644
index 0000000..ee120eb
--- /dev/null
+++ b/test/tests/conf/string/string142.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string142 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xpath-19991116-errata/ -->
+  <!-- ErrataAdd: 20011101 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: If the second argument to substring-before is the empty string, then the empty string is returned. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="string-length(substring-before('abcde',''))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string143.xml b/test/tests/conf/string/string143.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/conf/string/string143.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/string/string143.xsl b/test/tests/conf/string/string143.xsl
new file mode 100644
index 0000000..437b347
--- /dev/null
+++ b/test/tests/conf/string/string143.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string143 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xpath-19991116-errata/ -->
+  <!-- ErrataAdd: 20011101 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: If the second argument to substring-after is the empty string, then the first argument string is returned. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="substring-after('ABCDE','')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string15.xml b/test/tests/conf/string/string15.xml
new file mode 100644
index 0000000..d07cbb1
--- /dev/null
+++ b/test/tests/conf/string/string15.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string15.xsl b/test/tests/conf/string/string15.xsl
new file mode 100644
index 0000000..59bcfc1
--- /dev/null
+++ b/test/tests/conf/string/string15.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring()' function. -->
+
+<xsl:template match="/">
+   <out>
+      <xsl:value-of select="substring('1999/04/01', 1, 4)"/>
+   </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string16.xml b/test/tests/conf/string/string16.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string16.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string16.xsl b/test/tests/conf/string/string16.xsl
new file mode 100644
index 0000000..a965c14
--- /dev/null
+++ b/test/tests/conf/string/string16.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring()' function. -->
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select='substring("12345", 1.5, 2.6)'/>
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string17.xml b/test/tests/conf/string/string17.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string17.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string17.xsl b/test/tests/conf/string/string17.xsl
new file mode 100644
index 0000000..e994654
--- /dev/null
+++ b/test/tests/conf/string/string17.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring()' function. -->
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select='substring("12345", 0, 3)'/>
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string18.xml b/test/tests/conf/string/string18.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string18.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string18.xsl b/test/tests/conf/string/string18.xsl
new file mode 100644
index 0000000..e85f84c
--- /dev/null
+++ b/test/tests/conf/string/string18.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring()' function. -->
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select='substring("12345", 0 div 0, 3)'/>
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string19.xml b/test/tests/conf/string/string19.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string19.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string19.xsl b/test/tests/conf/string/string19.xsl
new file mode 100644
index 0000000..9e7068c
--- /dev/null
+++ b/test/tests/conf/string/string19.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring()' function. -->
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select='substring("12345", 1, 0 div 0)'/>
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string20.xml b/test/tests/conf/string/string20.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string20.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string20.xsl b/test/tests/conf/string/string20.xsl
new file mode 100644
index 0000000..cb014ae
--- /dev/null
+++ b/test/tests/conf/string/string20.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring()' function. -->
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select='substring("12345", -42, 1 div 0)'/>
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string21.xml b/test/tests/conf/string/string21.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string21.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string21.xsl b/test/tests/conf/string/string21.xsl
new file mode 100644
index 0000000..12d1548
--- /dev/null
+++ b/test/tests/conf/string/string21.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring()' function. -->
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select='substring("12345", -1 div 0, 1 div 0)'/>
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string22.xml b/test/tests/conf/string/string22.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/string/string22.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string22.xsl b/test/tests/conf/string/string22.xsl
new file mode 100644
index 0000000..fd7a07c
--- /dev/null
+++ b/test/tests/conf/string/string22.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring()' function on non-existent node -->
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select='substring(foo, 12, 3)'/>
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string30.xml b/test/tests/conf/string/string30.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/string/string30.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string30.xsl b/test/tests/conf/string/string30.xsl
new file mode 100644
index 0000000..83bb48f
--- /dev/null
+++ b/test/tests/conf/string/string30.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: str30 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions. -->
+  <!-- Purpose: Test of 'namespace-uri()'. -->
+
+
+<xsl:template match="baz2:doc">
+	<out>
+		<xsl:value-of select="namespace-uri(baz1:a/@baz2:attrib1)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string31.xml b/test/tests/conf/string/string31.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/string/string31.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string31.xsl b/test/tests/conf/string/string31.xsl
new file mode 100644
index 0000000..4306524
--- /dev/null
+++ b/test/tests/conf/string/string31.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+<!-- DOCUMENT:  http://www.w3.org/TR/xpath -->
+<!-- SECTION:  4.1 Node Set Functions. -->
+<!-- PURPOSE:   Test of 'namespace-uri()'. -->
+
+<xsl:template match="baz2:doc">
+<out>
+<xsl:value-of select="namespace-uri(baz2:b/@baz1:attrib2)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+</out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string32.xml b/test/tests/conf/string/string32.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/string/string32.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string32.xsl b/test/tests/conf/string/string32.xsl
new file mode 100644
index 0000000..60779e1
--- /dev/null
+++ b/test/tests/conf/string/string32.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+<!-- DOCUMENT:  http://www.w3.org/TR/xpath -->
+<!-- SECTION:  4.1 Node Set Functions. -->
+<!-- PURPOSE:   Test of 'name()'. -->
+
+<xsl:template match="baz2:doc">
+<out>
+<xsl:value-of select="name(*)"/>
+</out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string33.xml b/test/tests/conf/string/string33.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/string/string33.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string33.xsl b/test/tests/conf/string/string33.xsl
new file mode 100644
index 0000000..defa4ab
--- /dev/null
+++ b/test/tests/conf/string/string33.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+<!-- DOCUMENT:  http://www.w3.org/TR/xpath -->
+<!-- SECTION:  4.1 Node Set Functions. -->
+<!-- PURPOSE:   Test of 'name()'. -->
+
+<xsl:template match="baz2:doc">
+<out>
+<xsl:value-of select="name(baz1:a)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+</out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string34.xml b/test/tests/conf/string/string34.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/string/string34.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string34.xsl b/test/tests/conf/string/string34.xsl
new file mode 100644
index 0000000..8fc71ff
--- /dev/null
+++ b/test/tests/conf/string/string34.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+<!-- DOCUMENT:  http://www.w3.org/TR/xpath -->
+<!-- SECTION:  4.1 Node Set Functions. -->
+<!-- PURPOSE:   Test of 'name()'. -->
+
+<xsl:template match="baz2:doc">
+<out>
+<xsl:value-of select="name(baz2:b)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+</out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string35.xml b/test/tests/conf/string/string35.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/string/string35.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string35.xsl b/test/tests/conf/string/string35.xsl
new file mode 100644
index 0000000..e8d49ef
--- /dev/null
+++ b/test/tests/conf/string/string35.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+<!-- DOCUMENT:  http://www.w3.org/TR/xpath -->
+<!-- SECTION:  4.1 Node Set Functions. -->
+<!-- PURPOSE:   Test of 'name()'. -->
+
+<xsl:template match="baz2:doc">
+<out>
+<xsl:value-of select="name(baz1:a/@baz2:attrib1)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+</out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string36.xml b/test/tests/conf/string/string36.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conf/string/string36.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string36.xsl b/test/tests/conf/string/string36.xsl
new file mode 100644
index 0000000..c65a542
--- /dev/null
+++ b/test/tests/conf/string/string36.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+<!-- DOCUMENT:  http://www.w3.org/TR/xpath -->
+<!-- SECTION:  4.1 Node Set Functions. -->
+<!-- PURPOSE:   Test of 'name()'. -->
+
+<xsl:template match="baz2:doc">
+<out>
+<xsl:value-of select="name(baz2:b/@baz1:attrib2)" xmlns:baz1="http://xsl.lotus.com/ns1" xmlns:baz2="http://xsl.lotus.com/ns2"/>
+</out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string37.xml b/test/tests/conf/string/string37.xml
new file mode 100644
index 0000000..25e077e
--- /dev/null
+++ b/test/tests/conf/string/string37.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string37.xsl b/test/tests/conf/string/string37.xsl
new file mode 100644
index 0000000..f3bd68a
--- /dev/null
+++ b/test/tests/conf/string/string37.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str37 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'string()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="string(foo)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string38.xml b/test/tests/conf/string/string38.xml
new file mode 100644
index 0000000..25e077e
--- /dev/null
+++ b/test/tests/conf/string/string38.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string38.xsl b/test/tests/conf/string/string38.xsl
new file mode 100644
index 0000000..6f0bfc3
--- /dev/null
+++ b/test/tests/conf/string/string38.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str38 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'string()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="string(0)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string39.xml b/test/tests/conf/string/string39.xml
new file mode 100644
index 0000000..25e077e
--- /dev/null
+++ b/test/tests/conf/string/string39.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string39.xsl b/test/tests/conf/string/string39.xsl
new file mode 100644
index 0000000..682b951
--- /dev/null
+++ b/test/tests/conf/string/string39.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str39 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'string()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="string(2)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string40.xml b/test/tests/conf/string/string40.xml
new file mode 100644
index 0000000..25e077e
--- /dev/null
+++ b/test/tests/conf/string/string40.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string40.xsl b/test/tests/conf/string/string40.xsl
new file mode 100644
index 0000000..13d280c
--- /dev/null
+++ b/test/tests/conf/string/string40.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str40 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'string()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="string('test')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string41.xml b/test/tests/conf/string/string41.xml
new file mode 100644
index 0000000..25e077e
--- /dev/null
+++ b/test/tests/conf/string/string41.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string41.xsl b/test/tests/conf/string/string41.xsl
new file mode 100644
index 0000000..8c0d1e5
--- /dev/null
+++ b/test/tests/conf/string/string41.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str41 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'string()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="string('')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string42.xml b/test/tests/conf/string/string42.xml
new file mode 100644
index 0000000..25e077e
--- /dev/null
+++ b/test/tests/conf/string/string42.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string42.xsl b/test/tests/conf/string/string42.xsl
new file mode 100644
index 0000000..2a7ab12
--- /dev/null
+++ b/test/tests/conf/string/string42.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: STR42 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'string()' function on a simple RTF. -->
+
+<xsl:variable name="ResultTreeFragTest">
+  <xsl:value-of select="doc"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="string($ResultTreeFragTest)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string43.xml b/test/tests/conf/string/string43.xml
new file mode 100644
index 0000000..25e077e
--- /dev/null
+++ b/test/tests/conf/string/string43.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>Test</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string43.xsl b/test/tests/conf/string/string43.xsl
new file mode 100644
index 0000000..7404c89
--- /dev/null
+++ b/test/tests/conf/string/string43.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str43 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'string()' function with empty RTF. -->
+
+<xsl:variable name="emptyResultTreeFragTest">
+   <xsl:value-of select="foo"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="string($emptyResultTreeFragTest)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string44.xml b/test/tests/conf/string/string44.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string44.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string44.xsl b/test/tests/conf/string/string44.xsl
new file mode 100644
index 0000000..17971f6
--- /dev/null
+++ b/test/tests/conf/string/string44.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str44 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with('ENCYCLOPEDIA', 'EN')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string45.xml b/test/tests/conf/string/string45.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string45.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string45.xsl b/test/tests/conf/string/string45.xsl
new file mode 100644
index 0000000..6c509c3
--- /dev/null
+++ b/test/tests/conf/string/string45.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str45 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with('ENCYCLOPEDIA', 'en')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string46.xml b/test/tests/conf/string/string46.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string46.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string46.xsl b/test/tests/conf/string/string46.xsl
new file mode 100644
index 0000000..b6b8bee
--- /dev/null
+++ b/test/tests/conf/string/string46.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str46 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with('ab', 'abc')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string47.xml b/test/tests/conf/string/string47.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string47.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string47.xsl b/test/tests/conf/string/string47.xsl
new file mode 100644
index 0000000..d9e468c
--- /dev/null
+++ b/test/tests/conf/string/string47.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str47 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with('abc', 'bc')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string48.xml b/test/tests/conf/string/string48.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string48.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string48.xsl b/test/tests/conf/string/string48.xsl
new file mode 100644
index 0000000..97451ee
--- /dev/null
+++ b/test/tests/conf/string/string48.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string48 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xpath-19991116-errata/ -->
+  <!-- ErrataAdd: 20011101 -->
+  <!-- Purpose: If the second argument to starts-with is the empty string, then true is returned. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="starts-with('abc','')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string49.xml b/test/tests/conf/string/string49.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string49.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string49.xsl b/test/tests/conf/string/string49.xsl
new file mode 100644
index 0000000..48fc19f
--- /dev/null
+++ b/test/tests/conf/string/string49.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string49 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: If the second argument to starts-with is the empty string, then true is returned. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="starts-with('','')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string50.xml b/test/tests/conf/string/string50.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string50.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string50.xsl b/test/tests/conf/string/string50.xsl
new file mode 100644
index 0000000..4a217c9
--- /dev/null
+++ b/test/tests/conf/string/string50.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str50 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with('true()', 'tr')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string51.xml b/test/tests/conf/string/string51.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string51.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string51.xsl b/test/tests/conf/string/string51.xsl
new file mode 100644
index 0000000..6c2a72e
--- /dev/null
+++ b/test/tests/conf/string/string51.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str51 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function with node. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with(doc, 'ENCY')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string52.xml b/test/tests/conf/string/string52.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string52.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string52.xsl b/test/tests/conf/string/string52.xsl
new file mode 100644
index 0000000..0557231
--- /dev/null
+++ b/test/tests/conf/string/string52.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str52 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function with node. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with(doc, 'test')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string53.xml b/test/tests/conf/string/string53.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string53.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string53.xsl b/test/tests/conf/string/string53.xsl
new file mode 100644
index 0000000..d72de12
--- /dev/null
+++ b/test/tests/conf/string/string53.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str53 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function w/ attribute. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with(doc/@attr, 'slam')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string54.xml b/test/tests/conf/string/string54.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string54.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string54.xsl b/test/tests/conf/string/string54.xsl
new file mode 100644
index 0000000..abb2382
--- /dev/null
+++ b/test/tests/conf/string/string54.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str54 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'starts-with()' function with attribute. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="starts-with(doc/@attr, 'wich')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string55.xml b/test/tests/conf/string/string55.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string55.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string55.xsl b/test/tests/conf/string/string55.xsl
new file mode 100644
index 0000000..8ebde5d
--- /dev/null
+++ b/test/tests/conf/string/string55.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str55 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="contains('ENCYCLOPEDIA', 'TEST')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string56.xml b/test/tests/conf/string/string56.xml
new file mode 100644
index 0000000..ccc2744
--- /dev/null
+++ b/test/tests/conf/string/string56.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string56.xsl b/test/tests/conf/string/string56.xsl
new file mode 100644
index 0000000..4e56ddb
--- /dev/null
+++ b/test/tests/conf/string/string56.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str56 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function using variables. -->
+
+<xsl:variable name="find" select="'CY'"/>
+
+<xsl:template match="/">
+  <xsl:variable name="node" select="doc"/>
+  <out>
+    <xsl:value-of select="contains($node,$find)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string57.xml b/test/tests/conf/string/string57.xml
new file mode 100644
index 0000000..ccc2744
--- /dev/null
+++ b/test/tests/conf/string/string57.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string57.xsl b/test/tests/conf/string/string57.xsl
new file mode 100644
index 0000000..f36c1d2
--- /dev/null
+++ b/test/tests/conf/string/string57.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str57 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function using expressions. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains(concat(.,'BC'),concat('A','B','C'))"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string58.xml b/test/tests/conf/string/string58.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string58.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string58.xsl b/test/tests/conf/string/string58.xsl
new file mode 100644
index 0000000..1c31471
--- /dev/null
+++ b/test/tests/conf/string/string58.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str58 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="contains('ab', 'abc')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string59.xml b/test/tests/conf/string/string59.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string59.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string59.xsl b/test/tests/conf/string/string59.xsl
new file mode 100644
index 0000000..05662f5
--- /dev/null
+++ b/test/tests/conf/string/string59.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str59 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="contains('abc', 'bc')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string60.xml b/test/tests/conf/string/string60.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string60.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string60.xsl b/test/tests/conf/string/string60.xsl
new file mode 100644
index 0000000..78f7ac7
--- /dev/null
+++ b/test/tests/conf/string/string60.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str60 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="contains('abc', 'bcd')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string61.xml b/test/tests/conf/string/string61.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string61.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string61.xsl b/test/tests/conf/string/string61.xsl
new file mode 100644
index 0000000..711b264
--- /dev/null
+++ b/test/tests/conf/string/string61.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string61 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xpath-19991116-errata/ -->
+  <!-- ErrataAdd: 20011101 -->
+  <!-- Purpose: If the second argument to contains is the empty string, then true is returned. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains('abc','')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string62.xml b/test/tests/conf/string/string62.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string62.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string62.xsl b/test/tests/conf/string/string62.xsl
new file mode 100644
index 0000000..d3e5ee9
--- /dev/null
+++ b/test/tests/conf/string/string62.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: string62 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- AdditionalSpec: http://www.w3.org/1999/11/REC-xpath-19991116-errata/ -->
+  <!-- ErrataAdd: 20011101 -->
+  <!-- Purpose: If the second argument to contains is the empty string, then true is returned. -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="contains('','')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string63.xml b/test/tests/conf/string/string63.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string63.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string63.xsl b/test/tests/conf/string/string63.xsl
new file mode 100644
index 0000000..3eb4778
--- /dev/null
+++ b/test/tests/conf/string/string63.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str63 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="contains('true()', 'e')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string64.xml b/test/tests/conf/string/string64.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string64.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string64.xsl b/test/tests/conf/string/string64.xsl
new file mode 100644
index 0000000..9776d18
--- /dev/null
+++ b/test/tests/conf/string/string64.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str64 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function with node as 1st argument, string is in it. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="contains(doc, 'CYCL')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string65.xml b/test/tests/conf/string/string65.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string65.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string65.xsl b/test/tests/conf/string/string65.xsl
new file mode 100644
index 0000000..c78b52a
--- /dev/null
+++ b/test/tests/conf/string/string65.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str65 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function with node as 1st argument, string is not in it. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="contains(doc, 'TEST')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string66.xml b/test/tests/conf/string/string66.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string66.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string66.xsl b/test/tests/conf/string/string66.xsl
new file mode 100644
index 0000000..9cb2ceb
--- /dev/null
+++ b/test/tests/conf/string/string66.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str66 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function with attribute as 1st argument, string is in it. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="contains(doc/@attr, 'amwi')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string67.xml b/test/tests/conf/string/string67.xml
new file mode 100644
index 0000000..e863ebf
--- /dev/null
+++ b/test/tests/conf/string/string67.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string67.xsl b/test/tests/conf/string/string67.xsl
new file mode 100644
index 0000000..4fd90cd
--- /dev/null
+++ b/test/tests/conf/string/string67.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str67 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'contains()' function with attribute as 1st argument, string is not in it. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="contains(doc/@attr, 'TEST')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string68.xml b/test/tests/conf/string/string68.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string68.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string68.xsl b/test/tests/conf/string/string68.xsl
new file mode 100644
index 0000000..6d17890
--- /dev/null
+++ b/test/tests/conf/string/string68.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str68 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-before()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-before('ENCYCLOPEDIA', '/')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string69.xml b/test/tests/conf/string/string69.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string69.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string69.xsl b/test/tests/conf/string/string69.xsl
new file mode 100644
index 0000000..919e156
--- /dev/null
+++ b/test/tests/conf/string/string69.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str69 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-before()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-before('ENCYCLOPEDIA', 'C')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string70.xml b/test/tests/conf/string/string70.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string70.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string70.xsl b/test/tests/conf/string/string70.xsl
new file mode 100644
index 0000000..25e53a7
--- /dev/null
+++ b/test/tests/conf/string/string70.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str70 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-before()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-before('ENCYCLOPEDIA', 'c')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string71.xml b/test/tests/conf/string/string71.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string71.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string71.xsl b/test/tests/conf/string/string71.xsl
new file mode 100644
index 0000000..5e3100d
--- /dev/null
+++ b/test/tests/conf/string/string71.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str71 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-before()' function with node. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-before(doc, '/')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string72.xml b/test/tests/conf/string/string72.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string72.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string72.xsl b/test/tests/conf/string/string72.xsl
new file mode 100644
index 0000000..298ec59
--- /dev/null
+++ b/test/tests/conf/string/string72.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str72 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-before()' function with empty node. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-before(foo, '/')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string73.xml b/test/tests/conf/string/string73.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string73.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string73.xsl b/test/tests/conf/string/string73.xsl
new file mode 100644
index 0000000..3a49ce6
--- /dev/null
+++ b/test/tests/conf/string/string73.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str73 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-before()' function with attribute. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-before(doc/@attr, 'z')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string74.xml b/test/tests/conf/string/string74.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string74.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string74.xsl b/test/tests/conf/string/string74.xsl
new file mode 100644
index 0000000..8d50b3c
--- /dev/null
+++ b/test/tests/conf/string/string74.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str74 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-before()' function with attribute. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-before(doc/@attr, 'D')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string75.xml b/test/tests/conf/string/string75.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string75.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string75.xsl b/test/tests/conf/string/string75.xsl
new file mode 100644
index 0000000..f703347
--- /dev/null
+++ b/test/tests/conf/string/string75.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str75 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-before()' function with attribute. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-before(doc/@attr, 'd')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string76.xml b/test/tests/conf/string/string76.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string76.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string76.xsl b/test/tests/conf/string/string76.xsl
new file mode 100644
index 0000000..46811c9
--- /dev/null
+++ b/test/tests/conf/string/string76.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str76 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after('ENCYCLOPEDIA', '/')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string77.xml b/test/tests/conf/string/string77.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string77.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string77.xsl b/test/tests/conf/string/string77.xsl
new file mode 100644
index 0000000..bcee2ea
--- /dev/null
+++ b/test/tests/conf/string/string77.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str77 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after('ENCYCLOPEDIA', 'C')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string78.xml b/test/tests/conf/string/string78.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string78.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string78.xsl b/test/tests/conf/string/string78.xsl
new file mode 100644
index 0000000..53b8e01
--- /dev/null
+++ b/test/tests/conf/string/string78.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str78 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after('abcdefghijk','l')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string79.xml b/test/tests/conf/string/string79.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string79.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string79.xsl b/test/tests/conf/string/string79.xsl
new file mode 100644
index 0000000..39a4380
--- /dev/null
+++ b/test/tests/conf/string/string79.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str79 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after('1999/04/01', '1')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string80.xml b/test/tests/conf/string/string80.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string80.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string80.xsl b/test/tests/conf/string/string80.xsl
new file mode 100644
index 0000000..8cb6240
--- /dev/null
+++ b/test/tests/conf/string/string80.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str80 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function with node. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after(doc, '/')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string81.xml b/test/tests/conf/string/string81.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string81.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string81.xsl b/test/tests/conf/string/string81.xsl
new file mode 100644
index 0000000..17728e9
--- /dev/null
+++ b/test/tests/conf/string/string81.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str81 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function with empty node. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after(foo, '/')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string82.xml b/test/tests/conf/string/string82.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string82.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string82.xsl b/test/tests/conf/string/string82.xsl
new file mode 100644
index 0000000..cfa03c4
--- /dev/null
+++ b/test/tests/conf/string/string82.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str82 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function with attribute -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after(doc/@attr, 'z')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string83.xml b/test/tests/conf/string/string83.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string83.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string83.xsl b/test/tests/conf/string/string83.xsl
new file mode 100644
index 0000000..a53494c
--- /dev/null
+++ b/test/tests/conf/string/string83.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str83 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function with attribute. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after(doc/@attr, 'D')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string84.xml b/test/tests/conf/string/string84.xml
new file mode 100644
index 0000000..9abcb96
--- /dev/null
+++ b/test/tests/conf/string/string84.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc attr="abcdefg">1999/04/01</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string84.xsl b/test/tests/conf/string/string84.xsl
new file mode 100644
index 0000000..85cf122
--- /dev/null
+++ b/test/tests/conf/string/string84.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str84 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'substring-after()' function with attribute. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="substring-after(doc/@attr, 'd')"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string85.xml b/test/tests/conf/string/string85.xml
new file mode 100644
index 0000000..2caa8aa
--- /dev/null
+++ b/test/tests/conf/string/string85.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc> 
+<a>       This          is a       normalized          string.</a>    
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string85.xsl b/test/tests/conf/string/string85.xsl
new file mode 100644
index 0000000..a0f308c
--- /dev/null
+++ b/test/tests/conf/string/string85.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str85 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'normalize-space()' function with node. -->
+
+<xsl:variable name="thisvalue">This       is       a       test</xsl:variable>
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="normalize-space(a)"/>
+		<xsl:value-of select="normalize-space($thisvalue)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string86.xml b/test/tests/conf/string/string86.xml
new file mode 100644
index 0000000..2caa8aa
--- /dev/null
+++ b/test/tests/conf/string/string86.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc> 
+<a>       This          is a       normalized          string.</a>    
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string86.xsl b/test/tests/conf/string/string86.xsl
new file mode 100644
index 0000000..94e128f
--- /dev/null
+++ b/test/tests/conf/string/string86.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str86 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'normaliz-space()' function with empty node. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="normalize-space()"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string87.xml b/test/tests/conf/string/string87.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string87.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string87.xsl b/test/tests/conf/string/string87.xsl
new file mode 100644
index 0000000..d4a56a9
--- /dev/null
+++ b/test/tests/conf/string/string87.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str87 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(&#34;BAR&#34;,&#34;abc&#34;,&#34;ABC&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string88.xml b/test/tests/conf/string/string88.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string88.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string88.xsl b/test/tests/conf/string/string88.xsl
new file mode 100644
index 0000000..961f95f
--- /dev/null
+++ b/test/tests/conf/string/string88.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str88 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(&#34;bar&#34;,&#34;RAB&#34;,&#34;xyz&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string89.xml b/test/tests/conf/string/string89.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string89.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string89.xsl b/test/tests/conf/string/string89.xsl
new file mode 100644
index 0000000..95852b3
--- /dev/null
+++ b/test/tests/conf/string/string89.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str89 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(&#34;BAR&#34;,&#34;Rab&#34;,&#34;TxX&#34;)"/><xsl:text>,</xsl:text>
+		<xsl:value-of select='translate("B&#039;B","&#039;","&#096;")'/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string90.xml b/test/tests/conf/string/string90.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string90.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string90.xsl b/test/tests/conf/string/string90.xsl
new file mode 100644
index 0000000..e9e83e0
--- /dev/null
+++ b/test/tests/conf/string/string90.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str90 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(a,&#34;abc&#34;,&#34;ABC&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string91.xml b/test/tests/conf/string/string91.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string91.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string91.xsl b/test/tests/conf/string/string91.xsl
new file mode 100644
index 0000000..92da18f
--- /dev/null
+++ b/test/tests/conf/string/string91.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str91 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(b,&#34;ABC&#34;,&#34;abc&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string92.xml b/test/tests/conf/string/string92.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string92.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string92.xsl b/test/tests/conf/string/string92.xsl
new file mode 100644
index 0000000..0ac212b
--- /dev/null
+++ b/test/tests/conf/string/string92.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str92 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function with attributes. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(a/@attrib,&#34;lo&#34;,&#34;IT&#34;)"/>
+	</out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string93.xml b/test/tests/conf/string/string93.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string93.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string93.xsl b/test/tests/conf/string/string93.xsl
new file mode 100644
index 0000000..8d7a675
--- /dev/null
+++ b/test/tests/conf/string/string93.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str93 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function with attributes. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(b/@attrib,&#34;LO&#34;,&#34;it&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string94.xml b/test/tests/conf/string/string94.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string94.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string94.xsl b/test/tests/conf/string/string94.xsl
new file mode 100644
index 0000000..dc56230
--- /dev/null
+++ b/test/tests/conf/string/string94.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str94 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function with attributes. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(b/@attrib,&#34;lo&#34;,&#34;it&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string95.xml b/test/tests/conf/string/string95.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string95.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string95.xsl b/test/tests/conf/string/string95.xsl
new file mode 100644
index 0000000..d4f8b8d
--- /dev/null
+++ b/test/tests/conf/string/string95.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str95 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(&#34;zzaaazzz&#34;,&#34;abcz&#34;,&#34;ABC&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string96.xml b/test/tests/conf/string/string96.xml
new file mode 100644
index 0000000..f52cae1
--- /dev/null
+++ b/test/tests/conf/string/string96.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a attrib="hello">bar</a>
+<b attrib="HELLO">BAR</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string96.xsl b/test/tests/conf/string/string96.xsl
new file mode 100644
index 0000000..6231d5f
--- /dev/null
+++ b/test/tests/conf/string/string96.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str96 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'translate()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="translate(&#34;ddaaadddd&#34;,&#34;abcd&#34;,&#34;ABCxy&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string97.xml b/test/tests/conf/string/string97.xml
new file mode 100644
index 0000000..bbd2be7
--- /dev/null
+++ b/test/tests/conf/string/string97.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string97.xsl b/test/tests/conf/string/string97.xsl
new file mode 100644
index 0000000..859c1dc
--- /dev/null
+++ b/test/tests/conf/string/string97.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str97 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'concat()' function. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="concat(&#34;a&#34;,&#34;b&#34;,&#34;c&#34;,&#34;d&#34;,&#34;ef&#34;)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string98.xml b/test/tests/conf/string/string98.xml
new file mode 100644
index 0000000..bbd2be7
--- /dev/null
+++ b/test/tests/conf/string/string98.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string98.xsl b/test/tests/conf/string/string98.xsl
new file mode 100644
index 0000000..bb2a5d8
--- /dev/null
+++ b/test/tests/conf/string/string98.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str98 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'concat()' function with nodes. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="concat(a, b)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/string/string99.xml b/test/tests/conf/string/string99.xml
new file mode 100644
index 0000000..bbd2be7
--- /dev/null
+++ b/test/tests/conf/string/string99.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e>ef</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/string/string99.xsl b/test/tests/conf/string/string99.xsl
new file mode 100644
index 0000000..18b603c
--- /dev/null
+++ b/test/tests/conf/string/string99.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: str99 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19990922 -->
+  <!-- Section: 4.2 String Functions -->
+  <!-- Purpose: Test of 'concat()' function with nodes. -->
+
+<xsl:template match="doc">
+	<out>
+		<xsl:value-of select="concat(a, b, c, d, e)"/>
+	</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/impfinal.xsl b/test/tests/conf/variable/impfinal.xsl
new file mode 100644
index 0000000..0ccdeec
--- /dev/null
+++ b/test/tests/conf/variable/impfinal.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impfinal -->
+  <!-- Purpose: to be imported by impmid and others -->
+
+<xsl:param name="test" select="'test value set in impfinal'"/>
+
+<xsl:template match="/">
+  <out><xsl:text>
+  In final: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/impmid.xsl b/test/tests/conf/variable/impmid.xsl
new file mode 100644
index 0000000..c3174c1
--- /dev/null
+++ b/test/tests/conf/variable/impmid.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impmid -->
+  <!-- Purpose: to be imported by variable22, 27, etc. -->
+
+<xsl:import href="impfinal.xsl"/>
+
+<xsl:param name="test" select="'test value set in impmid'"/>
+
+<xsl:template match="a">
+  <xsl:text>
+  In middle: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/var11imp.xsl b/test/tests/conf/variable/var11imp.xsl
new file mode 100644
index 0000000..8d55a74
--- /dev/null
+++ b/test/tests/conf/variable/var11imp.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: var11imp -->
+  <!-- Purpose: to be imported by variable11 -->
+
+<xsl:param name="test" select="'subsheet, should be overridden by main sheet'"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="$test"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/var27side.xsl b/test/tests/conf/variable/var27side.xsl
new file mode 100644
index 0000000..a6fc99e
--- /dev/null
+++ b/test/tests/conf/variable/var27side.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: var27side -->
+  <!-- Purpose: to be imported by variable27 -->
+
+<xsl:param name="test" select="'test value set in var27side'"/>
+
+<xsl:template match="b">
+  <xsl:text>
+  On the side: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/var28final.xsl b/test/tests/conf/variable/var28final.xsl
new file mode 100644
index 0000000..a02109f
--- /dev/null
+++ b/test/tests/conf/variable/var28final.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: var28final -->
+  <!-- Purpose: to be imported by var28mid -->
+
+<xsl:param name="test" select="'test value set in final'"/>
+
+<xsl:template match="b">
+  <xsl:text>
+  In final: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/var28mid.xsl b/test/tests/conf/variable/var28mid.xsl
new file mode 100644
index 0000000..be1e875
--- /dev/null
+++ b/test/tests/conf/variable/var28mid.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: var28mid -->
+  <!-- Purpose: to be imported by variable28 -->
+
+<xsl:import href="var28final.xsl"/>
+
+<xsl:param name="test" select="'test value set in mid'"/>
+
+<xsl:template match="/">
+  <out><xsl:text>
+  In middle: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/var29side.xsl b/test/tests/conf/variable/var29side.xsl
new file mode 100644
index 0000000..9187369
--- /dev/null
+++ b/test/tests/conf/variable/var29side.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: var29side -->
+  <!-- Purpose: to be imported by variable29 -->
+
+<xsl:param name="test" select="'set in var29side, should have highest precedence'"/>
+
+<xsl:template match="a">
+  <xsl:text>
+  On the side: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="c">
+  <xsl:text>
+  Side again: </xsl:text><xsl:value-of select="$test"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/var30mid.xsl b/test/tests/conf/variable/var30mid.xsl
new file mode 100644
index 0000000..7854589
--- /dev/null
+++ b/test/tests/conf/variable/var30mid.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: var30mid -->
+  <!-- Purpose: to be imported by variable30 -->
+
+<xsl:import href="impfinal.xsl"/>
+
+<xsl:param name="test" select="'value set in var30mid, should have highest precedence'"/>
+
+<xsl:template match="b">
+  <xsl:text>
+  In middle: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/var47imp.xsl b/test/tests/conf/variable/var47imp.xsl
new file mode 100644
index 0000000..dc266e6
--- /dev/null
+++ b/test/tests/conf/variable/var47imp.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: var47imp -->
+  <!-- Purpose: to be imported by variable47 -->
+
+<xsl:template name="baseTemplate">
+  <xsl:param name="baseParam0"/><!-- Not actually used -->
+  <xsl:param name="baseParam1"/>
+  <xsl:copy-of select="$baseParam1"/>
+  <OK/>
+</xsl:template>
+
+<xsl:template name="baseSubTemplate">
+  <xsl:param name="baseSubParam0"/><!-- Not actually used -->
+  <OK-too/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/var70imp.xsl b/test/tests/conf/variable/var70imp.xsl
new file mode 100644
index 0000000..4a70b7c
--- /dev/null
+++ b/test/tests/conf/variable/var70imp.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: var70imp -->
+  <!-- Purpose: to be imported by variable70 -->
+
+<xsl:variable name="foo">
+  <xsl:value-of select="/doc/foo"/>
+</xsl:variable>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable01.xml b/test/tests/conf/variable/variable01.xml
new file mode 100644
index 0000000..8f89afb
--- /dev/null
+++ b/test/tests/conf/variable/variable01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<!-- Test #1 for xsl:variable -->
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable01.xsl b/test/tests/conf/variable/variable01.xsl
new file mode 100644
index 0000000..740e000
--- /dev/null
+++ b/test/tests/conf/variable/variable01.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Set top-level xsl:variable to a string -->
+  <!-- Author: Paul Dick -->
+
+<xsl:variable name="ExpressionTest" select="'ABC'"/>
+
+<xsl:template match="doc">
+   <out>
+      <xsl:value-of select="$ExpressionTest"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable02.xml b/test/tests/conf/variable/variable02.xml
new file mode 100644
index 0000000..780117b
--- /dev/null
+++ b/test/tests/conf/variable/variable02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<!-- Test #2 for xsl:variable -->
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable02.xsl b/test/tests/conf/variable/variable02.xsl
new file mode 100644
index 0000000..6046858
--- /dev/null
+++ b/test/tests/conf/variable/variable02.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test top-level xsl:variable set to be an RTF -->
+  <!-- Author: Paul Dick -->
+
+<xsl:variable name="ResultTreeFragTest">
+    <B>ABC</B>
+</xsl:variable>
+
+<xsl:template match="doc">
+   <out>
+     <xsl:value-of select="$ResultTreeFragTest"/><xsl:text>,</xsl:text>
+	 <xsl:copy-of select="$ResultTreeFragTest"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable03.xml b/test/tests/conf/variable/variable03.xml
new file mode 100644
index 0000000..d1c7923
--- /dev/null
+++ b/test/tests/conf/variable/variable03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+	<a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable03.xsl b/test/tests/conf/variable/variable03.xsl
new file mode 100644
index 0000000..86976d3
--- /dev/null
+++ b/test/tests/conf/variable/variable03.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test xsl:variable inside a template set to be an RTF  -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="doc">
+   <out>
+      <xsl:variable name="ResultTreeFragTest">
+        <B><xsl:value-of select="a"/></B>
+      </xsl:variable>
+      <xsl:value-of select="$ResultTreeFragTest"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable04.xml b/test/tests/conf/variable/variable04.xml
new file mode 100644
index 0000000..d1c7923
--- /dev/null
+++ b/test/tests/conf/variable/variable04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+	<a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable04.xsl b/test/tests/conf/variable/variable04.xsl
new file mode 100644
index 0000000..b65f505
--- /dev/null
+++ b/test/tests/conf/variable/variable04.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test for passing variable into other template via with-param.  -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="doc">
+   <out>
+     <xsl:variable name="ResultTreeFragTest">
+        <B><xsl:value-of select="a"/></B>
+     </xsl:variable>
+     <xsl:apply-templates select="a">
+        <xsl:with-param name="pvar1" select="$ResultTreeFragTest"/>
+     </xsl:apply-templates>
+   </out>
+</xsl:template>
+
+<xsl:template match="a">
+   <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+   <xsl:param name="pvar2">Default text in pvar2</xsl:param>
+   <xsl:value-of select="$pvar1"/>, <xsl:value-of select="$pvar2"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable05.xml b/test/tests/conf/variable/variable05.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/variable/variable05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable05.xsl b/test/tests/conf/variable/variable05.xsl
new file mode 100644
index 0000000..405576e
--- /dev/null
+++ b/test/tests/conf/variable/variable05.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Verify top-level xsl:variable, HTML text RTF -->
+  <!-- Author: Paul Dick -->
+
+<xsl:variable name="variable"><B>value</B></xsl:variable>
+  
+<xsl:template match="/">
+   <out>
+      <xsl:value-of select="$variable"/><xsl:text>,</xsl:text>
+      <xsl:copy-of select="$variable"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable06.xml b/test/tests/conf/variable/variable06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable06.xsl b/test/tests/conf/variable/variable06.xsl
new file mode 100644
index 0000000..2d65260
--- /dev/null
+++ b/test/tests/conf/variable/variable06.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Set variable by name but no value, should get null string -->
+  <!-- Author: Paul Dick -->
+  <!-- Note: "If the variable-binding element has empty content and 
+              does not have a select attribute, then the value of the 
+              variable is an empty string." -->
+                
+<xsl:template match="doc">
+  <xsl:variable name="x"/>
+  <out>
+    <xsl:value-of select="$x=''"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable07.xml b/test/tests/conf/variable/variable07.xml
new file mode 100644
index 0000000..c942fd2
--- /dev/null
+++ b/test/tests/conf/variable/variable07.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <item>1</item>
+  <item>2</item>
+  <item>3</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable07.xsl b/test/tests/conf/variable/variable07.xsl
new file mode 100644
index 0000000..b05f833
--- /dev/null
+++ b/test/tests/conf/variable/variable07.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test for handling of RTF used as positional index by setting
+        variable as the content of the xsl:variable element. Reference as [$n].
+        This is the case that will NOT obtain what a naive person expects. -->
+  <!-- Author: Paul Dick -->
+  <!-- Note: When a variable is used to select nodes by position, 
+             be careful not to do: 
+             <xsl:variable name="n">2</xsl:variable>
+                ...
+             <xsl:value-of select="item[$n]"/>
+             This will output the value of the first item element, because 
+             the variable n will be bound to a result tree fragment, 
+             not a number. Instead, do either 
+
+             <xsl:variable name="n" select="2"/>
+                ...
+             <xsl:value-of select="item[$n]"/>
+                or 
+             <xsl:variable name="n">2</xsl:variable>
+                ...
+             <xsl:value-of select="item[position()=$n]"/>    -->
+
+<xsl:template match="doc">
+  <xsl:variable name="n">2</xsl:variable>
+  <out>
+    <xsl:value-of select="item[$n]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable08.xml b/test/tests/conf/variable/variable08.xml
new file mode 100644
index 0000000..c942fd2
--- /dev/null
+++ b/test/tests/conf/variable/variable08.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <item>1</item>
+  <item>2</item>
+  <item>3</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable08.xsl b/test/tests/conf/variable/variable08.xsl
new file mode 100644
index 0000000..3ed2664
--- /dev/null
+++ b/test/tests/conf/variable/variable08.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test for handling of RTF used as positional index by setting
+        variable as the content of the xsl:variable element.  Reference as [position()=$n]
+        This is the case that will NOT obtain what the naive person expects. -->
+  <!-- Author: Paul Dick -->
+  <!-- Note: When a variable is used to select nodes by position, 
+             be careful not to do: 
+             <xsl:variable name="n">2</xsl:variable>
+                ...
+             <xsl:value-of select="item[$n]"/>
+             This will output the value of the first item element, 
+             because the variable n will be bound to a result tree fragment, 
+             not a number. Instead, do either 
+
+             <xsl:variable name="n" select="2"/>
+                ...
+             <xsl:value-of select="item[$n]"/>
+                or 
+             <xsl:variable name="n">2</xsl:variable>
+                ...
+             <xsl:value-of select="item[position()=$n]"/>     -->
+
+<xsl:template match="doc">
+  <xsl:variable name="n">2</xsl:variable>
+  <out>
+    <xsl:value-of select="item[position()=$n]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable09.xml b/test/tests/conf/variable/variable09.xml
new file mode 100644
index 0000000..c942fd2
--- /dev/null
+++ b/test/tests/conf/variable/variable09.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <item>1</item>
+  <item>2</item>
+  <item>3</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable09.xsl b/test/tests/conf/variable/variable09.xsl
new file mode 100644
index 0000000..a03bf4f
--- /dev/null
+++ b/test/tests/conf/variable/variable09.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Test for handling of number used as positional index by setting
+        variable using select attribute.  Reference as [$n] -->
+  <!-- Author: Paul Dick -->
+  <!-- Note: When a variable is used to select nodes by position, 
+             be careful not to do: 
+             <xsl:variable name="n">2</xsl:variable>
+                ...
+             <xsl:value-of select="item[$n]"/>
+             This will output the value of the first item element, 
+             because the variable n will be bound to a result tree fragment, 
+             not a number. Instead, do either 
+
+             <xsl:variable name="n" select="2"/>
+                ...
+             <xsl:value-of select="item[$n]"/>
+                or 
+             <xsl:variable name="n">2</xsl:variable>
+                ...
+             <xsl:value-of select="item[position()=$n]"/>    -->
+
+<xsl:template match="doc">
+  <xsl:variable name="n" select="2"/>
+  <out>
+    <xsl:value-of select="item[$n]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable10.xml b/test/tests/conf/variable/variable10.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable10.xsl b/test/tests/conf/variable/variable10.xsl
new file mode 100644
index 0000000..ffce722
--- /dev/null
+++ b/test/tests/conf/variable/variable10.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using Variables and Parameters with xsl:copy-of -->
+  <!-- Purpose: Test for using xsl:copy-of with empty (null string) variable. -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="doc">
+  <xsl:variable name="x"/>
+  <out>
+    <xsl:copy-of select="$x"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable11.xml b/test/tests/conf/variable/variable11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable11.xsl b/test/tests/conf/variable/variable11.xsl
new file mode 100644
index 0000000..01e02ce
--- /dev/null
+++ b/test/tests/conf/variable/variable11.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Import precedence applies to top-level params
+     (even when template referencing it is in the imported file) -->
+  <!-- Author: Ed Blachman -->
+
+<xsl:import href="var11imp.xsl"/>
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+
+<xsl:param name="test" select="'main stylesheet, should have highest precedence'"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable12.xml b/test/tests/conf/variable/variable12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable12.xsl b/test/tests/conf/variable/variable12.xsl
new file mode 100644
index 0000000..be8b923
--- /dev/null
+++ b/test/tests/conf/variable/variable12.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Set top-level xsl:param to a string -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="ExpressionTest" select="'ABC'"/>
+
+<xsl:template match="doc">
+   <out>
+      <xsl:value-of select="$ExpressionTest"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable13.xml b/test/tests/conf/variable/variable13.xml
new file mode 100644
index 0000000..d86dfba
--- /dev/null
+++ b/test/tests/conf/variable/variable13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <item>Y</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable13.xsl b/test/tests/conf/variable/variable13.xsl
new file mode 100644
index 0000000..4b7643e
--- /dev/null
+++ b/test/tests/conf/variable/variable13.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test for setting a param using a choose -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="chooseTest" select="'ABC'"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="$chooseTest"/><xsl:text>_</xsl:text>
+    <xsl:apply-templates select="doc"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:param name="chooseTest">
+    <xsl:choose>
+      <xsl:when test="item='X'">24</xsl:when>
+      <xsl:when test="item='Y'">25</xsl:when>
+      <xsl:when test="item='Z'">26</xsl:when>
+      <xsl:otherwise>32</xsl:otherwise>
+    </xsl:choose>
+  </xsl:param>
+  <xsl:value-of select="$chooseTest"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable14.xml b/test/tests/conf/variable/variable14.xml
new file mode 100644
index 0000000..5006dc2
--- /dev/null
+++ b/test/tests/conf/variable/variable14.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+<Test>Hello</Test>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable14.xsl b/test/tests/conf/variable/variable14.xsl
new file mode 100644
index 0000000..d113d3f
--- /dev/null
+++ b/test/tests/conf/variable/variable14.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 Passing Parameters to Templates. -->
+  <!-- Purpose: Verify that a variable defined within a xsl:with-param content
+                is scoped correctly. Idea sent in on xalan-dev list. We should
+                recognize 'test' within the with-param statement. 
+                The named template 'foo' really plays no part here. -->
+  <!-- Author: Paul Dick, based on posting to xalan-dev list -->
+
+<xsl:template match="doc">
+  <xsl:call-template name="foo">
+    <xsl:with-param name="bar">
+      <xsl:variable name="test">Test</xsl:variable>
+      <xsl:value-of select="$test"/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="foo">
+  <xsl:param name="bar"/>
+  <foo>
+    <xsl:copy-of select="$bar"/>
+  </foo>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable15.xml b/test/tests/conf/variable/variable15.xml
new file mode 100644
index 0000000..3a89cad
--- /dev/null
+++ b/test/tests/conf/variable/variable15.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+<a>X</a>
+<a>Y</a>
+<a>Z</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable15.xsl b/test/tests/conf/variable/variable15.xsl
new file mode 100644
index 0000000..85562ca
--- /dev/null
+++ b/test/tests/conf/variable/variable15.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 -->
+  <!-- Purpose: Test for-each inside xsl:variable -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="docs">
+  <out>
+    <xsl:variable name="all">
+      <xsl:for-each select="a">
+        <xsl:value-of select="."/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:text>$all contains </xsl:text>
+    <xsl:value-of select="$all"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable16.xml b/test/tests/conf/variable/variable16.xml
new file mode 100644
index 0000000..3a89cad
--- /dev/null
+++ b/test/tests/conf/variable/variable16.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<docs>
+<doc/>
+<a>X</a>
+<a>Y</a>
+<a>Z</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable16.xsl b/test/tests/conf/variable/variable16.xsl
new file mode 100644
index 0000000..013b3d9
--- /dev/null
+++ b/test/tests/conf/variable/variable16.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 -->
+  <!-- Purpose: Test for-each inside xsl:param -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="all">
+  <xsl:for-each select="/docs/a">
+    <xsl:value-of select="."/>
+  </xsl:for-each>
+</xsl:param>
+
+<xsl:template match="docs">
+  <out>
+    <xsl:text>$all contains </xsl:text>
+    <xsl:value-of select="$all"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable17.xml b/test/tests/conf/variable/variable17.xml
new file mode 100644
index 0000000..8155204
--- /dev/null
+++ b/test/tests/conf/variable/variable17.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<docs>
+<doc>blah</doc>
+<a>X</a>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable17.xsl b/test/tests/conf/variable/variable17.xsl
new file mode 100644
index 0000000..d00edcd
--- /dev/null
+++ b/test/tests/conf/variable/variable17.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Purpose: Show that there is always a current node -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="children" select="count(*)"/>
+
+<xsl:template match="docs">
+  <out>
+    <xsl:text>$children contains </xsl:text>
+    <xsl:value-of select="$children"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable18.xml b/test/tests/conf/variable/variable18.xml
new file mode 100644
index 0000000..ead31d6
--- /dev/null
+++ b/test/tests/conf/variable/variable18.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultVal>Just checking</defaultVal>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable18.xsl b/test/tests/conf/variable/variable18.xsl
new file mode 100644
index 0000000..07bbdad
--- /dev/null
+++ b/test/tests/conf/variable/variable18.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 Passing Parameters to Templates.  -->
+  <!-- Purpose: Test param being set to default in a named template. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="myTmpl">
+      <!-- If we had a with-param here, we could change the value of "bar". -->
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="myTmpl">
+  <xsl:param name="bar">defaultVal</xsl:param>
+    <foo>
+      <xsl:value-of select="$bar"/>
+    </foo>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable19.xml b/test/tests/conf/variable/variable19.xml
new file mode 100644
index 0000000..eba96a1
--- /dev/null
+++ b/test/tests/conf/variable/variable19.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <a pos="first">
+    <b/>
+  </a>
+  <a pos="second">
+    <b/>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable19.xsl b/test/tests/conf/variable/variable19.xsl
new file mode 100644
index 0000000..05acbb6
--- /dev/null
+++ b/test/tests/conf/variable/variable19.xsl
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11 -->
+  <!-- Purpose: Verify that a variable in an inner template can take on a new value -->
+  <!-- Author: David Marston -->
+  <!-- "Only the innermost binding of a variable is visible." -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:variable name="var" select="'level0'"/>
+    <xsl:text>begin root template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>end root template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:variable name="var" select="'level1'"/>
+  <xsl:text>begin doc template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>end doc template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:variable name="var" select="@pos"/>
+  <xsl:text>begin a template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>end a template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="b">
+  <xsl:variable name="var" select="'level3'"/>
+  <xsl:text>in b template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- suppress empty lines -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable20.xml b/test/tests/conf/variable/variable20.xml
new file mode 100644
index 0000000..eba96a1
--- /dev/null
+++ b/test/tests/conf/variable/variable20.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <a pos="first">
+    <b/>
+  </a>
+  <a pos="second">
+    <b/>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable20.xsl b/test/tests/conf/variable/variable20.xsl
new file mode 100644
index 0000000..20fe6f1
--- /dev/null
+++ b/test/tests/conf/variable/variable20.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11 -->
+  <!-- Purpose: Verify that a variable in a for-each can take on a new value -->
+  <!-- It's unclear whether the spec allows this. XT does; Saxon doesn't. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:variable name="var" select="'level1'"/>
+  <xsl:text>begin doc template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+  <xsl:for-each select="a">
+    <xsl:variable name="var" select="@pos"/>
+    <xsl:text>inside for-each, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+  </xsl:for-each>
+  <xsl:text>end doc template, $var=</xsl:text><xsl:value-of select="$var"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/><!-- suppress empty lines -->
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable21.xml b/test/tests/conf/variable/variable21.xml
new file mode 100644
index 0000000..74bfe00
--- /dev/null
+++ b/test/tests/conf/variable/variable21.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+  <item>a</item>
+  <item>e</item>
+  <item>e</item>
+  <item>i</item>
+  <item>i</item>
+  <item>l</item>
+  <item>r</item>
+  <item>s</item>
+  <item>z</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable21.xsl b/test/tests/conf/variable/variable21.xsl
new file mode 100644
index 0000000..3f57d63
--- /dev/null
+++ b/test/tests/conf/variable/variable21.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Test setting several parameters locally -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:param name="n1" select="1"/>
+  <xsl:param name="n2" select="2"/>
+  <xsl:param name="n3" select="3"/>
+  <xsl:param name="n4" select="4"/>
+  <xsl:param name="n5" select="5"/>
+  <xsl:param name="n6" select="6"/>
+  <xsl:param name="n7" select="7"/>
+  <xsl:param name="n8" select="8"/>
+  <xsl:param name="n9" select="9"/>
+  <out>
+    <xsl:value-of select="item[$n8]"/>
+    <xsl:value-of select="item[$n3]"/>
+    <xsl:value-of select="item[$n7]"/>
+    <xsl:value-of select="item[$n4]"/>
+    <xsl:value-of select="item[$n1]"/>
+    <xsl:value-of select="item[$n6]"/>
+    <xsl:value-of select="item[$n5]"/>
+    <xsl:value-of select="item[$n9]"/>
+    <xsl:value-of select="item[$n2]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable22.xml b/test/tests/conf/variable/variable22.xml
new file mode 100644
index 0000000..322bfce
--- /dev/null
+++ b/test/tests/conf/variable/variable22.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b>
+      <c/>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable22.xsl b/test/tests/conf/variable/variable22.xsl
new file mode 100644
index 0000000..53fda08
--- /dev/null
+++ b/test/tests/conf/variable/variable22.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Import precedence applies to top-level params
+     (testing references from various import levels) -->
+  <!-- Author: David Marston -->
+
+<xsl:import href="impmid.xsl"/>
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+
+<xsl:param name="test" select="'main stylesheet, should have highest precedence'"/>
+
+<xsl:template match="b">
+  <xsl:text>
+  In main: </xsl:text><xsl:value-of select="$test"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable23.xml b/test/tests/conf/variable/variable23.xml
new file mode 100644
index 0000000..7de6cda
--- /dev/null
+++ b/test/tests/conf/variable/variable23.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc>a</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable23.xsl b/test/tests/conf/variable/variable23.xsl
new file mode 100644
index 0000000..c139331
--- /dev/null
+++ b/test/tests/conf/variable/variable23.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Purpose: Test how big a string can be passed to a template. -->
+  <!-- Author: David Marston -->
+
+<!-- Set upper limit here -->
+<xsl:variable name="max" select="256" />
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:call-template name="looper">
+      <xsl:with-param name="str" select="'....5....|'" />
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="looper">
+  <xsl:param name="str" select="0000000000" />
+  <!-- put out one iteration of the name and a trailing space -->
+  <xsl:value-of select="string-length($str)"/><xsl:text>: </xsl:text>
+  <xsl:value-of select="$str"/><xsl:text>
+</xsl:text>
+  <!-- here's the recursion -->
+  <xsl:if test="string-length($str) &lt; $max">
+    <xsl:call-template name="looper">
+      <xsl:with-param name="str">
+        <xsl:value-of select="concat($str,'....5....|')"/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable24.xml b/test/tests/conf/variable/variable24.xml
new file mode 100644
index 0000000..2c569f9
--- /dev/null
+++ b/test/tests/conf/variable/variable24.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
diff --git a/test/tests/conf/variable/variable24.xsl b/test/tests/conf/variable/variable24.xsl
new file mode 100644
index 0000000..a4113ea
--- /dev/null
+++ b/test/tests/conf/variable/variable24.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="xml"/>
+
+  <!-- FileName: variable24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Test the ability of variable to hold the result of document() -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="document-nodelist" select="document('variable20.xml')"/>
+    <xsl:copy-of select="$document-nodelist"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable25.xml b/test/tests/conf/variable/variable25.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable25.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable25.xsl b/test/tests/conf/variable/variable25.xsl
new file mode 100644
index 0000000..f242173
--- /dev/null
+++ b/test/tests/conf/variable/variable25.xsl
@@ -0,0 +1,39 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:txt="http://www.host.com/txt"
+                exclude-result-prefixes="txt">
+
+  <!-- FileName: variable25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11 Variables and Parameters -->
+  <!-- Purpose: Variable name is a QName. -->
+  <!-- Author: Tommy Burglund -->
+
+<xsl:variable name="txt:me" select="'Tommy'"/>
+
+<xsl:template match="/">
+ <out>
+  <xsl:value-of select="$txt:me"/>
+ </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable26.xml b/test/tests/conf/variable/variable26.xml
new file mode 100644
index 0000000..3a3eaee
--- /dev/null
+++ b/test/tests/conf/variable/variable26.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<dummy/>
diff --git a/test/tests/conf/variable/variable26.xsl b/test/tests/conf/variable/variable26.xsl
new file mode 100644
index 0000000..7242298
--- /dev/null
+++ b/test/tests/conf/variable/variable26.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 Passing Parameters to Templates -->
+  <!-- Purpose: It is not an error to pass a parameter to a template that does
+       not have an element for it, the parameter is simpily ignored. -->
+  <!-- Author: Ed Blachman -->
+
+<xsl:output method="xml"/>
+
+<xsl:param name="test" select="'global'"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="temtest">
+      <xsl:with-param name="test" select="'local'"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="temtest">
+  <xsl:choose>
+    <xsl:when test="$test = 'global'">It is global!</xsl:when>
+    <xsl:otherwise>Not global!!!</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable27.xml b/test/tests/conf/variable/variable27.xml
new file mode 100644
index 0000000..322bfce
--- /dev/null
+++ b/test/tests/conf/variable/variable27.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b>
+      <c/>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable27.xsl b/test/tests/conf/variable/variable27.xsl
new file mode 100644
index 0000000..9c6e8ed
--- /dev/null
+++ b/test/tests/conf/variable/variable27.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Import precedence applies to top-level params
+     (testing references from various import levels) -->
+  <!-- Author: David Marston -->
+
+<xsl:import href="impmid.xsl"/>
+<xsl:import href="var27side.xsl"/>
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+
+<xsl:param name="test" select="'main stylesheet, should have highest precedence'"/>
+
+<xsl:template match="c">
+  <xsl:text>
+  In main: </xsl:text><xsl:value-of select="$test"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable28.xml b/test/tests/conf/variable/variable28.xml
new file mode 100644
index 0000000..322bfce
--- /dev/null
+++ b/test/tests/conf/variable/variable28.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b>
+      <c/>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable28.xsl b/test/tests/conf/variable/variable28.xsl
new file mode 100644
index 0000000..315c6b2
--- /dev/null
+++ b/test/tests/conf/variable/variable28.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Import precedence applies to top-level params
+     (first template from middle, then up/down/up) -->
+  <!-- Author: David Marston -->
+
+<xsl:import href="var28mid.xsl"/>
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+
+<xsl:param name="test" select="'main stylesheet, should have highest precedence'"/>
+
+<xsl:template match="a">
+  <xsl:text>
+  In main: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="c">
+  <xsl:text>
+  In main again: </xsl:text><xsl:value-of select="$test"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable29.xml b/test/tests/conf/variable/variable29.xml
new file mode 100644
index 0000000..322bfce
--- /dev/null
+++ b/test/tests/conf/variable/variable29.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b>
+      <c/>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable29.xsl b/test/tests/conf/variable/variable29.xsl
new file mode 100644
index 0000000..ec14e51
--- /dev/null
+++ b/test/tests/conf/variable/variable29.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Import precedence applies to top-level params
+     (order of imports in this sheet matters) -->
+  <!-- Author: David Marston -->
+
+<xsl:import href="impfinal.xsl"/>
+<xsl:import href="var29side.xsl"/>
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+
+<xsl:template match="b">
+  <xsl:text>
+  In main: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable30.xml b/test/tests/conf/variable/variable30.xml
new file mode 100644
index 0000000..322bfce
--- /dev/null
+++ b/test/tests/conf/variable/variable30.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <a>
+    <b>
+      <c/>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable30.xsl b/test/tests/conf/variable/variable30.xsl
new file mode 100644
index 0000000..66ad09f
--- /dev/null
+++ b/test/tests/conf/variable/variable30.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Import precedence applies to top-level params
+     (start at bottom; all use variable set in middle) -->
+  <!-- Author: David Marston -->
+
+<xsl:import href="var30mid.xsl"/>
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+
+<xsl:template match="a">
+  <xsl:text>
+  In main: </xsl:text><xsl:value-of select="$test"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="c">
+  <xsl:text>
+  In main again: </xsl:text><xsl:value-of select="$test"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable31.xml b/test/tests/conf/variable/variable31.xml
new file mode 100644
index 0000000..8e39ecb
--- /dev/null
+++ b/test/tests/conf/variable/variable31.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
diff --git a/test/tests/conf/variable/variable31.xsl b/test/tests/conf/variable/variable31.xsl
new file mode 100644
index 0000000..342e43e
--- /dev/null
+++ b/test/tests/conf/variable/variable31.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+    version="1.0">
+
+  <!-- FileName: variable31 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Test passing value from top-level param to top-level variable via value-of. -->
+  <!-- Author: Benoit Cerrina, adapted by David Marston -->
+
+  <xsl:param name="toto" select="'titi'"/>
+
+  <xsl:variable name="tata">
+    <xsl:call-template name="set-tata"/>
+  </xsl:variable>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="$tata"/>
+    </out>
+  </xsl:template>
+
+  <xsl:template name="set-tata">
+    <xsl:value-of select="$toto"/>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable32.xml b/test/tests/conf/variable/variable32.xml
new file mode 100644
index 0000000..8e39ecb
--- /dev/null
+++ b/test/tests/conf/variable/variable32.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
diff --git a/test/tests/conf/variable/variable32.xsl b/test/tests/conf/variable/variable32.xsl
new file mode 100644
index 0000000..7af796f
--- /dev/null
+++ b/test/tests/conf/variable/variable32.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+    version="1.0">
+
+  <!-- FileName: variable32 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Test passing value from top-level param to top-level variable via value-of. -->
+  <!-- Author: David Marston -->
+
+  <xsl:param name="toto" select="'titi'"/>
+
+  <xsl:variable name="tata" select="$toto"/>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="$tata"/>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable33.xml b/test/tests/conf/variable/variable33.xml
new file mode 100644
index 0000000..8e39ecb
--- /dev/null
+++ b/test/tests/conf/variable/variable33.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
diff --git a/test/tests/conf/variable/variable33.xsl b/test/tests/conf/variable/variable33.xsl
new file mode 100644
index 0000000..315fa8d
--- /dev/null
+++ b/test/tests/conf/variable/variable33.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+    version="1.0">
+
+  <!-- FileName: variable33 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Set top-level variable with a forward reference to see what happens. -->
+  <!-- Author: David Marston -->
+
+  <xsl:variable name="tata" select="$toto"/>
+
+  <xsl:param name="toto" select="'titi'"/>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="$tata"/>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable34.xml b/test/tests/conf/variable/variable34.xml
new file mode 100644
index 0000000..a9b3e4d
--- /dev/null
+++ b/test/tests/conf/variable/variable34.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <mid>
+    <inner>GotIt</inner>
+  </mid>
+</doc>
diff --git a/test/tests/conf/variable/variable34.xsl b/test/tests/conf/variable/variable34.xsl
new file mode 100644
index 0000000..9b51663
--- /dev/null
+++ b/test/tests/conf/variable/variable34.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable34 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Set cascaded top-level variables in arbitrary order. -->
+  <!-- Author: David Marston -->
+
+<xsl:variable name="b" select="$a"/>
+
+<xsl:variable name="e" select="$d"/>
+
+<xsl:variable name="a" select="/doc/mid/inner"/>
+
+<xsl:variable name="d" select="$c"/>
+
+<xsl:variable name="c" select="$b"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:text>
+a= </xsl:text><xsl:value-of select="$a"/>
+    <xsl:text>
+b= </xsl:text><xsl:value-of select="$b"/>
+    <xsl:text>
+c= </xsl:text><xsl:value-of select="$c"/>
+    <xsl:text>
+d= </xsl:text><xsl:value-of select="$d"/>
+    <xsl:text>
+e= </xsl:text><xsl:value-of select="$e"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable35.xml b/test/tests/conf/variable/variable35.xml
new file mode 100644
index 0000000..8e39ecb
--- /dev/null
+++ b/test/tests/conf/variable/variable35.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
diff --git a/test/tests/conf/variable/variable35.xsl b/test/tests/conf/variable/variable35.xsl
new file mode 100644
index 0000000..5c79b7f
--- /dev/null
+++ b/test/tests/conf/variable/variable35.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 Top-level Variables and Parameters  -->
+  <!-- Purpose: Try to catch lazy-evaluation scheme picking up local instead of global. -->
+  <!-- Author: David Marston -->
+
+  <xsl:variable name="tata" select="$toto"/>
+
+  <xsl:param name="toto" select="'titi'"/>
+
+  <xsl:template match="/">
+    <xsl:param name="toto" select="'templ'"/>
+    <out>
+      <xsl:value-of select="$toto"/><xsl:text>, </xsl:text>
+      <xsl:value-of select="$tata"/>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable36.xml b/test/tests/conf/variable/variable36.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable36.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable36.xsl b/test/tests/conf/variable/variable36.xsl
new file mode 100644
index 0000000..716c76f
--- /dev/null
+++ b/test/tests/conf/variable/variable36.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Set variable to null string explicitly and implicitly, compare. -->
+  <!-- Author: David Marston -->
+
+<xsl:variable name="empty" />
+
+<xsl:template match="doc">
+  <xsl:param name="x" select="substring-before('a','z')" />
+  <out>
+    <xsl:value-of select="$x=$empty"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable37.xml b/test/tests/conf/variable/variable37.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable37.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable37.xsl b/test/tests/conf/variable/variable37.xsl
new file mode 100644
index 0000000..2152bff
--- /dev/null
+++ b/test/tests/conf/variable/variable37.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable37 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Set a variable to a boolean, and show it being used in xsl:if -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:variable name="partest" select="contains('foo','o')"/>
+  <out>
+    <xsl:if test="$partest">
+      <xsl:text>Success</xsl:text>
+    </xsl:if>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable38.xml b/test/tests/conf/variable/variable38.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable38.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable38.xsl b/test/tests/conf/variable/variable38.xsl
new file mode 100644
index 0000000..7bc36f8
--- /dev/null
+++ b/test/tests/conf/variable/variable38.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable38 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using Variables and Parameters with xsl:copy-of -->
+  <!-- Purpose: Test for using xsl:copy-of with variable set to a number. -->
+  <!-- This should have the same result as xsl:value-of, stringified number. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:variable name="x" select="10+7"/><!-- Use of + causes it to be numeric -->
+  <out>
+    <xsl:copy-of select="$x"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable39.xml b/test/tests/conf/variable/variable39.xml
new file mode 100644
index 0000000..c9d1aba
--- /dev/null
+++ b/test/tests/conf/variable/variable39.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc>content</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable39.xsl b/test/tests/conf/variable/variable39.xsl
new file mode 100644
index 0000000..dbf14ca
--- /dev/null
+++ b/test/tests/conf/variable/variable39.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable39 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 Using Variables and Parameters with xsl:copy-of -->
+  <!-- Purpose: Build an RTF from instructions, then use xsl:copy-of. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:variable name="tree">
+    <xsl:element name="main">
+      <xsl:element name="first">
+        <xsl:attribute name="type">text</xsl:attribute>
+        <xsl:text>junk</xsl:text>
+      </xsl:element>
+      <xsl:element name="second">
+        <xsl:attribute name="type">fetched</xsl:attribute>
+        <xsl:value-of select="." />
+      </xsl:element>
+      <xsl:element name="third">
+        <xsl:attribute name="type">comment</xsl:attribute>
+        <xsl:comment>remarks</xsl:comment>
+      </xsl:element>
+    </xsl:element>
+  </xsl:variable>
+  <out>
+    <xsl:copy-of select="$tree"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable40.xml b/test/tests/conf/variable/variable40.xml
new file mode 100644
index 0000000..6e90b1c
--- /dev/null
+++ b/test/tests/conf/variable/variable40.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <a><b>begin</b><c>junk</c></a>
+  <b>+more+</b>
+  <d>wrong<b>end</b>bad</d>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable40.xsl b/test/tests/conf/variable/variable40.xsl
new file mode 100644
index 0000000..519cfa6
--- /dev/null
+++ b/test/tests/conf/variable/variable40.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable40 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test top-level xsl:variable set using apply-templates -->
+  <!-- Author: David Marston -->
+
+<xsl:variable name="TreeFrag">
+  <xsl:apply-templates select="//b" />
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="$TreeFrag"/><xsl:text>,</xsl:text>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="a|d">
+  <xsl:value-of select="name(.)"/><xsl:text>,</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="b">
+  <xsl:apply-templates/><!-- expect only text, not child elements -->
+</xsl:template>
+
+<xsl:template match="c">
+  <xsl:text>-</xsl:text><xsl:value-of select="."/><xsl:text>;</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable41.xml b/test/tests/conf/variable/variable41.xml
new file mode 100644
index 0000000..4d887c0
--- /dev/null
+++ b/test/tests/conf/variable/variable41.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<!-- the comment -->
+<doc>blah</doc>
diff --git a/test/tests/conf/variable/variable41.xsl b/test/tests/conf/variable/variable41.xsl
new file mode 100644
index 0000000..cda6ce2
--- /dev/null
+++ b/test/tests/conf/variable/variable41.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable41 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Purpose: Because root node is current when top-level param is set, can get top-level comment. -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="z" select="comment()"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>$z contains</xsl:text>
+    <xsl:value-of select="$z"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable42.xml b/test/tests/conf/variable/variable42.xml
new file mode 100644
index 0000000..a919e88
--- /dev/null
+++ b/test/tests/conf/variable/variable42.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc status="original">
+  <t0>inner</t0>
+</doc>
diff --git a/test/tests/conf/variable/variable42.xsl b/test/tests/conf/variable/variable42.xsl
new file mode 100644
index 0000000..0b8603a
--- /dev/null
+++ b/test/tests/conf/variable/variable42.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable42 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Purpose: Use copy to set a variable to an RTF.
+       REMINDER: we won't get the whole sub-tree, just the 'doc' element node. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:variable name="z">
+    <xsl:copy>
+      <xsl:attribute name="status">replacement</xsl:attribute>
+    </xsl:copy>
+  </xsl:variable>
+  <out>
+    <xsl:text>$z contains </xsl:text>
+    <xsl:copy-of select="$z"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable43.xml b/test/tests/conf/variable/variable43.xml
new file mode 100644
index 0000000..b0df934
--- /dev/null
+++ b/test/tests/conf/variable/variable43.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <width>9</width>
+  <depth>22</depth>
+</doc>
diff --git a/test/tests/conf/variable/variable43.xsl b/test/tests/conf/variable/variable43.xsl
new file mode 100644
index 0000000..711c7b2
--- /dev/null
+++ b/test/tests/conf/variable/variable43.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable43 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 -->
+  <!-- AdditionalSpec: 7.5 -->
+  <!-- Purpose: Test xsl:variable inside xsl:copy -->                
+  <!-- Author: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="doc">
+  <xsl:copy>
+    <xsl:variable name="size" select="width * depth"/>
+    <xsl:element name="item">
+      <xsl:value-of select="$size"/>
+    </xsl:element>
+  </xsl:copy>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable44.xml b/test/tests/conf/variable/variable44.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable44.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable44.xsl b/test/tests/conf/variable/variable44.xsl
new file mode 100644
index 0000000..6995f39
--- /dev/null
+++ b/test/tests/conf/variable/variable44.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable44 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.5 -->
+  <!-- Purpose: Set a variable inside a template based on variable defined earlier in that template. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="a" select="'first'" /><!-- Two sets of quotes make it a string -->
+    <xsl:variable name="b" select="$a" />
+    <xsl:value-of select="$b" />
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable45.xml b/test/tests/conf/variable/variable45.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable45.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable45.xsl b/test/tests/conf/variable/variable45.xsl
new file mode 100644
index 0000000..ea64207
--- /dev/null
+++ b/test/tests/conf/variable/variable45.xsl
@@ -0,0 +1,45 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:zoo="http://www.host.com/zoo"
+                exclude-result-prefixes="zoo">
+
+  <!-- FileName: variable45 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Purpose: Use param whose name is a QName in with-param passing. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="a">
+      <xsl:with-param name="zoo:bear" select="'200'"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="a">
+  <xsl:param name="zoo:bear">Default mammal</xsl:param>
+  <xsl:param name="zoo:snake">Default reptile</xsl:param>
+  <xsl:value-of select="$zoo:bear"/>, <xsl:value-of select="$zoo:snake"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable46.xml b/test/tests/conf/variable/variable46.xml
new file mode 100644
index 0000000..ec53fa8
--- /dev/null
+++ b/test/tests/conf/variable/variable46.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<root/>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable46.xsl b/test/tests/conf/variable/variable46.xsl
new file mode 100644
index 0000000..466f828
--- /dev/null
+++ b/test/tests/conf/variable/variable46.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable46 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Test proper construction of an RTF containing multiple top level nodes. -->
+  <!-- Creator: Felix Garcia Romero (felixgr@tdi.tudistrito.es) -->
+
+<xsl:variable name="foo">
+  <b>First element</b>
+  Second element
+  <FORM METHOD="post">
+    <input type="length" size="30" />
+  </FORM>
+</xsl:variable>
+
+<xsl:template match="/">
+  <out><xsl:copy-of select="$foo"/></out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable47.xml b/test/tests/conf/variable/variable47.xml
new file mode 100644
index 0000000..47fe288
--- /dev/null
+++ b/test/tests/conf/variable/variable47.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<xmlDoc attr1="theAttr1" attr2="theAttr2"/>
diff --git a/test/tests/conf/variable/variable47.xsl b/test/tests/conf/variable/variable47.xsl
new file mode 100644
index 0000000..3605f45
--- /dev/null
+++ b/test/tests/conf/variable/variable47.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+                  
+<!-- FileName: variable47 -->
+<!-- Document: http://www.w3.org/TR/xslt -->
+<!-- DocVersion: 19991116 -->
+<!-- Section: 11.2 Values of Variables and Parameters -->
+<!-- Purpose: Evaluation of params with repeated use of imported stylesheet. -->
+<!-- Creator: Matthew Hanson (matthew.hanson@wcom.com -->
+<!-- Elaboration: One of the params passed in to baseTemplate is the result of
+    a call to baseSubTemplate. Both are in the imported stylesheet, which could
+    be considered a subroutine library. The ...Param0 params aren't actually
+    used, but are there to potentially cause trouble. baseTemplate puts out two
+    child elements, one from itself and one it got from baseSubTemplate. -->
+
+<xsl:import href="var47imp.xsl"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="baseTemplate">
+      <xsl:with-param name="baseParam0" select="'baseParam1Data'"/>
+      <xsl:with-param name="baseParam1">
+        <xsl:call-template name="baseSubTemplate">
+          <xsl:with-param name="baseSubParam0" select="'baseSubParam0Data'"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable48.xml b/test/tests/conf/variable/variable48.xml
new file mode 100644
index 0000000..c0c68cd
--- /dev/null
+++ b/test/tests/conf/variable/variable48.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <a id="id2">*id2*
+      <a id="id3">*id3*</a>
+      <b id="id4">*id4*</b>
+      <c id="id5">*id5*</c>
+    </a>
+    <b id="id6">*id6*</b>
+    <c id="id7">*id7*</c>
+  </a>
+  <b id="id8">
+    *id8*
+    <a id="id9">*id9*</a>
+    <b id="id10">*id10*
+      <a id="id11">*id11*</a>
+      <b id="id12">*id12*</b>
+      <c id="id13">*id13*</c>
+    </b>
+    <c id="id14">*id14*</c>
+  </b>
+  <c id="id15">
+    *id15*
+    <a id="id16">*id16*</a>
+    <b id="id17">*id17*</b>
+    <c id="id18">*id18*
+      <a id="id19">*id19*</a>
+    </c>
+  </c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable48.xsl b/test/tests/conf/variable/variable48.xsl
new file mode 100644
index 0000000..d91a7c0
--- /dev/null
+++ b/test/tests/conf/variable/variable48.xsl
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0">
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+  <!-- FileName: variable48 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.5 -->
+  <!-- Purpose: Check propagation of params down into templates -->
+  <!-- Author: Scott Boag -->
+
+<xsl:param name="request" select="'top'"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates>
+    <xsl:with-param name="p1" select="$request"/>
+    <xsl:with-param name="p2" select="'root'"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:param name="p1" select="'error1!'"/>
+  <xsl:param name="p2" select="'error2!'"/>
+	
+  <xsl:copy>
+    <xsl:apply-templates select="node()|@*">
+      <xsl:with-param name="p1" select="$request"/>
+      <xsl:with-param name="p2" select="@id"/>
+    </xsl:apply-templates>
+    <from>
+      <xsl:call-template name="dump-values">
+        <xsl:with-param name="p1" select="$request"/>
+        <xsl:with-param name="p2" select="$p2"/>
+      </xsl:call-template>
+    </from>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:param name="p1" select="'error3!'"/>
+  <xsl:param name="p2" select="'error4!'"/>
+
+  <xsl:attribute name="Value">
+    <xsl:call-template name="dump-values">
+      <xsl:with-param name="p1" select="$p1"/>
+      <xsl:with-param name="p2" select="concat('id=', string($p2))"/>
+    </xsl:call-template>
+  </xsl:attribute>
+</xsl:template>
+
+<xsl:template name="dump-values">
+  <xsl:param name="p1" select="'error5!'"/>
+  <xsl:param name="p2" select="'error6!'"/>
+
+  <xsl:value-of select="$p1"/>, <xsl:value-of select="$p2"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable49.xml b/test/tests/conf/variable/variable49.xml
new file mode 100644
index 0000000..ad6c742
--- /dev/null
+++ b/test/tests/conf/variable/variable49.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <a id="id2">*id2*
+      <a id="id3">*id3*</a>
+      <b id="id4">*id4*</b>
+      <c id="id5">*id5*</c>
+    </a>
+    <b id="id6">*id6*</b>
+    <c id="id7">*id7*</c>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable49.xsl b/test/tests/conf/variable/variable49.xsl
new file mode 100644
index 0000000..b936d40
--- /dev/null
+++ b/test/tests/conf/variable/variable49.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0">
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+  <!-- FileName: variable49 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.5 -->
+  <!-- Purpose: Show that one param (p2) can be set to value of another (p1)
+    equally well in apply and call template invocations. -->
+  <!-- Author: Scott Boag -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="*"/>
+    <xsl:text>&#10;== apply above, call below ==&#10;</xsl:text>
+    <xsl:for-each select="//*">
+      <xsl:call-template name="matchElem"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:param name="p1" select="@id"/>
+  <xsl:param name="p2" select="$p1"/>
+  <xsl:value-of select="$p1"/>,  <xsl:value-of select="$p2"/>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:apply-templates select="*"/><!-- Recursively visit all children -->
+</xsl:template>
+
+<xsl:template name="matchElem">
+  <xsl:param name="p1" select="@id"/>
+  <xsl:param name="p2" select="$p1"/>
+  <xsl:value-of select="$p1"/>,  <xsl:value-of select="$p2"/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable50.xml b/test/tests/conf/variable/variable50.xml
new file mode 100644
index 0000000..bc6437f
--- /dev/null
+++ b/test/tests/conf/variable/variable50.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc><p>a<b>b</b>c</p></doc>    
diff --git a/test/tests/conf/variable/variable50.xsl b/test/tests/conf/variable/variable50.xsl
new file mode 100644
index 0000000..1ccfc5e
--- /dev/null
+++ b/test/tests/conf/variable/variable50.xsl
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: variable50 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 -->
+  <!-- Author: Scott Boag -->
+  <!-- Purpose: Ensure that we can find descendants of the nodes
+    in a node-set stored in a variable. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:variable name="in" select="*/p"/>	
+    <xsl:for-each select="$in//text()">
+      <xsl:value-of select="."/><xsl:text>&#10;</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable51.xml b/test/tests/conf/variable/variable51.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable51.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable51.xsl b/test/tests/conf/variable/variable51.xsl
new file mode 100644
index 0000000..715552f
--- /dev/null
+++ b/test/tests/conf/variable/variable51.xsl
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="xml" indent="no"/>
+
+  <!-- FileName: variable51 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 -->
+  <!-- Creator: John Howard/Tom Amiro -->
+  <!-- Purpose: Set a variable within an if within a for-each. -->
+
+<xsl:template match="/">
+  <xsl:call-template name="Func">
+    <xsl:with-param name="Node" select="."/>
+    <xsl:with-param name="Set" select="/"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="Func">
+  <xsl:param name="Node"/>
+  <xsl:param name="Set"/>
+  <xsl:for-each select="$Set">
+  <!-- declaring b here causes no problems -->
+    <xsl:if test=". = $Node">
+       <xsl:variable name="b" select="1"/><!-- declaring b here was a problem -->
+       <xsl:if test="$b = $b">
+         <out>Passed!</out><xsl:text>&#xA;</xsl:text>
+       </xsl:if>
+     </xsl:if>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable52.xml b/test/tests/conf/variable/variable52.xml
new file mode 100644
index 0000000..eff8a84
--- /dev/null
+++ b/test/tests/conf/variable/variable52.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<data>
+  <point>10</point>
+  <point>20</point>
+  <point>30</point>
+</data>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable52.xsl b/test/tests/conf/variable/variable52.xsl
new file mode 100644
index 0000000..5cc0d50
--- /dev/null
+++ b/test/tests/conf/variable/variable52.xsl
@@ -0,0 +1,84 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  version="1.0">
+
+  <!-- FileName: variable52 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Author: John Howard -->
+  <!-- Purpose: test parameters call by reference and by value -->
+ 
+<xsl:output method="xml" indent="no"/>
+
+<xsl:template match="/">
+  <out><xsl:text>&#10;</xsl:text>
+    <xsl:variable name="foo" select="/data/point"/>
+
+    <list m="ByReference">
+      <xsl:call-template name="AllOrNothing">
+        <xsl:with-param name="path" select="$foo"/>
+      </xsl:call-template>
+    </list><xsl:text>&#10;</xsl:text>
+    <list m="ByValue">
+      <xsl:call-template name="AllOrNothing">
+        <xsl:with-param name="path" select="/data/point"/>
+      </xsl:call-template>
+    </list><xsl:text>&#10;</xsl:text>
+    <list m="ByReference">
+      <xsl:call-template name="AlmostAndNothing">
+        <xsl:with-param name="path" select="$foo"/>
+      </xsl:call-template>
+    </list><xsl:text>&#10;</xsl:text>
+    <list m="ByValue">
+      <xsl:call-template name="AlmostAndNothing">
+        <xsl:with-param name="path" select="/data/point"/>
+      </xsl:call-template>
+    </list><xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template name="AllOrNothing">
+  <xsl:param name="path"/>
+
+  <xsl:for-each select="/data/point">
+    <xsl:variable name="pos" select="position()"/>
+
+    <xsl:for-each select="$path[$pos]">
+      <xsl:value-of select="."/><xsl:text>/</xsl:text>
+    </xsl:for-each>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="AlmostAndNothing">
+  <xsl:param name="path"/>
+
+  <xsl:for-each select="$path">
+    <xsl:variable name="pos" select="position()"/>
+
+    <xsl:for-each select="$path[$pos]">
+      <xsl:value-of select="."/><xsl:text>-</xsl:text>
+    </xsl:for-each>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable53.xml b/test/tests/conf/variable/variable53.xml
new file mode 100644
index 0000000..cfa70d6
--- /dev/null
+++ b/test/tests/conf/variable/variable53.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<data>
+  <foodata>
+    <datum value="a"/>
+    <datum value="b"/>
+    <datum value="c"/>
+    <datum value="d"/>
+  </foodata>
+  <bardata>
+    <datum value="k"/>
+    <datum value="l"/>
+    <datum value="m"/>
+    <datum value="n"/>
+  </bardata>
+  <bazdata>
+    <datum value="w"/>
+    <datum value="x"/>
+    <datum value="y"/>
+    <datum value="z"/>
+  </bazdata>
+</data>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable53.xsl b/test/tests/conf/variable/variable53.xsl
new file mode 100644
index 0000000..67550cf
--- /dev/null
+++ b/test/tests/conf/variable/variable53.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: variable53 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Author: John Howard -->
+  <!-- Purpose: test using recursion to traverse a node-set in a variable. -->
+ 
+<xsl:output method="xml"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="traverse-vals">
+      <xsl:with-param name="pos" select="1"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="traverse-vals">
+  <xsl:param name="pos"/>
+  <xsl:variable name="series" select="/data/*/datum/@value"/>
+
+  <xsl:value-of select="concat($series[number($pos)],' ')"/>
+  <xsl:if test="$pos &lt; count($series)">
+    <xsl:call-template name="traverse-vals">
+      <xsl:with-param name="pos" select="$pos + 1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable54.xml b/test/tests/conf/variable/variable54.xml
new file mode 100644
index 0000000..38f3996
--- /dev/null
+++ b/test/tests/conf/variable/variable54.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<data>
+  <foodata>
+    <datum value="2"/>
+    <datum value="3"/>
+    <datum value="4"/>
+  </foodata>
+  <bardata>
+    <datum value="6"/>
+    <datum value="7"/>
+    <datum value="8"/>
+  </bardata>
+</data>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable54.xsl b/test/tests/conf/variable/variable54.xsl
new file mode 100644
index 0000000..ba28f06
--- /dev/null
+++ b/test/tests/conf/variable/variable54.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: variable54 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 -->
+  <!-- Author: John Howard -->
+  <!-- Purpose: test using parameter names with '.' in them -->
+ 
+<xsl:output method="xml"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="foo">
+      <xsl:with-param name="foo.bar" select="/data/*/datum/@value"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="foo">
+  <xsl:param name="foo.bar"/>
+
+  <xsl:for-each select="$foo.bar">(<xsl:value-of select="position()"/>)</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable55.xml b/test/tests/conf/variable/variable55.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/variable/variable55.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable55.xsl b/test/tests/conf/variable/variable55.xsl
new file mode 100644
index 0000000..068c2fb
--- /dev/null
+++ b/test/tests/conf/variable/variable55.xsl
@@ -0,0 +1,40 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:txt="http://www.host.com"
+    xmlns:new="http://www.host.com"
+    exclude-result-prefixes="txt new">
+
+  <!-- FileName: variable55 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11 Variables and Parameters -->
+  <!-- Purpose: Show that name of variable acts like a real QName. -->
+  <!-- Author: David Marston -->
+
+<xsl:variable name="txt:me" select="'Wizard'"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="$new:me"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable56.xml b/test/tests/conf/variable/variable56.xml
new file mode 100644
index 0000000..8e39ecb
--- /dev/null
+++ b/test/tests/conf/variable/variable56.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
diff --git a/test/tests/conf/variable/variable56.xsl b/test/tests/conf/variable/variable56.xsl
new file mode 100644
index 0000000..2c4463f
--- /dev/null
+++ b/test/tests/conf/variable/variable56.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: variable56 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.5 -->
+  <!-- Author: darrylf@schemasoft.com -->
+  <!-- Purpose: Use same-named variables in inner and outer scopes, where inner is a for-each loop. -->
+  <!-- This may need to become an error case. -->
+ 
+<xsl:output method="xml" indent="yes" />
+
+<xsl:template match="/">
+  <xsl:variable name="bar">outer</xsl:variable>
+  <outer bar="{$bar}">
+    <xsl:for-each select="./*">
+      <xsl:variable name="bar">inner</xsl:variable>
+      <inner bar="{$bar}"/>
+    </xsl:for-each>
+  </outer>
+</xsl:template>
+                
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable57.xml b/test/tests/conf/variable/variable57.xml
new file mode 100644
index 0000000..8c60d21
--- /dev/null
+++ b/test/tests/conf/variable/variable57.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable57.xsl b/test/tests/conf/variable/variable57.xsl
new file mode 100644
index 0000000..128f6f9
--- /dev/null
+++ b/test/tests/conf/variable/variable57.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable57 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for passing param containing 1-element node-set via apply-templates -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <size><xsl:value-of select="count(a/text())"/></size>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="a">
+      <xsl:with-param name="texts" select="a/text()"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:param name="texts">Default text in param 1</xsl:param>
+  <list>
+    <xsl:for-each select="$texts">
+      <xsl:value-of select="."/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </list>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable58.xml b/test/tests/conf/variable/variable58.xml
new file mode 100644
index 0000000..533abf2
--- /dev/null
+++ b/test/tests/conf/variable/variable58.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a-set>
+    <a>first</a>
+    <a>second</a>
+    <a>third</a>
+    <a>fourth</a>
+  </a-set>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable58.xsl b/test/tests/conf/variable/variable58.xsl
new file mode 100644
index 0000000..1807073
--- /dev/null
+++ b/test/tests/conf/variable/variable58.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable58 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for passing param containing 4-element node-set via apply-templates -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <size><xsl:value-of select="count(a-set/a/text())"/></size>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="a-set">
+      <xsl:with-param name="texts" select="a-set/a/text()"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="a-set">
+  <xsl:param name="texts">Default text in param 1</xsl:param>
+  <list>
+    <xsl:for-each select="$texts">
+      <xsl:value-of select="."/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </list>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable59.xml b/test/tests/conf/variable/variable59.xml
new file mode 100644
index 0000000..8c60d21
--- /dev/null
+++ b/test/tests/conf/variable/variable59.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable59.xsl b/test/tests/conf/variable/variable59.xsl
new file mode 100644
index 0000000..d7c5498
--- /dev/null
+++ b/test/tests/conf/variable/variable59.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable59 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for passing param containing 0-element node-set via apply-templates -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <size><xsl:value-of select="count(a/comment())"/></size>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="a">
+      <xsl:with-param name="comments" select="a/comment()"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:param name="comments">Default text in param 1</xsl:param>
+  <list>
+    <xsl:for-each select="$comments">
+      <xsl:value-of select="."/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </list>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable60.xml b/test/tests/conf/variable/variable60.xml
new file mode 100644
index 0000000..0813395
--- /dev/null
+++ b/test/tests/conf/variable/variable60.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>foo</a>
+  <b>foo</b>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable60.xsl b/test/tests/conf/variable/variable60.xsl
new file mode 100644
index 0000000..2ef2eb1
--- /dev/null
+++ b/test/tests/conf/variable/variable60.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable60 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for passing param containing boolean via apply-templates -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="a">
+      <xsl:with-param name="eq" select="a=b"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:param name="eq">Default text in param 1</xsl:param>
+  <a>
+    <xsl:value-of select="."/>
+  </a>
+  <b>
+    <xsl:if test="$eq">
+      <xsl:attribute name="content">
+        <xsl:value-of select="'the same'"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:value-of select="."/>
+  </b>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable61.xml b/test/tests/conf/variable/variable61.xml
new file mode 100644
index 0000000..c905fb9
--- /dev/null
+++ b/test/tests/conf/variable/variable61.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>11</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable61.xsl b/test/tests/conf/variable/variable61.xsl
new file mode 100644
index 0000000..c19814d
--- /dev/null
+++ b/test/tests/conf/variable/variable61.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable61 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for passing param containing number via apply-templates -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="a">
+      <xsl:with-param name="nums" select="a/text()"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="a">
+  <xsl:param name="nums">Default text in param 1</xsl:param>
+  <list>
+    <xsl:for-each select="$nums">
+      <xsl:value-of select=".+6"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </list>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable62.xml b/test/tests/conf/variable/variable62.xml
new file mode 100644
index 0000000..f9db526
--- /dev/null
+++ b/test/tests/conf/variable/variable62.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?> 
+<doc>
+  <a-set g="1st" s="5">
+    <a>35</a>
+    <a>44</a>
+    <a>12</a>
+    <a>98</a>
+    <a>28</a>
+  </a-set>
+  <a-set g="2nd" s="3">
+    <a>62</a>
+    <a>440</a>
+    <a>29</a>
+  </a-set>
+  <a-set g="3rd" s="4">
+    <a>16</a>
+    <a>45</a>
+    <a>78</a>
+    <a>33</a>
+  </a-set>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable62.xsl b/test/tests/conf/variable/variable62.xsl
new file mode 100644
index 0000000..6ec5e0d
--- /dev/null
+++ b/test/tests/conf/variable/variable62.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable62 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for passing numeric param via apply-templates, with sorting -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="a-set">
+      <xsl:sort select="@s" data-type="number" order="ascending"/>
+      <xsl:with-param name="total" select="sum(a-set/a)"/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="a-set">
+  <xsl:param name="total">Default text in param 1</xsl:param>
+  <xsl:text>&#10;</xsl:text>
+  <list from="{@g}">
+    <xsl:attribute name="proportion">
+      <xsl:value-of select="concat(sum(./a/text()),'/',$total)"/>
+    </xsl:attribute>
+    <xsl:for-each select="./a/text()">
+      <xsl:value-of select="."/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </list>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable63.xml b/test/tests/conf/variable/variable63.xml
new file mode 100644
index 0000000..8e4be7b
--- /dev/null
+++ b/test/tests/conf/variable/variable63.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <datum value="5"/>
+  <datum value="3"/>
+  <datum value="4"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable63.xsl b/test/tests/conf/variable/variable63.xsl
new file mode 100644
index 0000000..f5ef66e
--- /dev/null
+++ b/test/tests/conf/variable/variable63.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: variable63 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: test using parameter names with leading underscore -->
+ 
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="foo">
+      <xsl:with-param name="_foo_par" select="/doc/datum/@value"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="foo">
+  <xsl:param name="_foo_par"/>
+
+  <xsl:for-each select="$_foo_par">(<xsl:value-of select="position()"/>)</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable64.xml b/test/tests/conf/variable/variable64.xml
new file mode 100644
index 0000000..493a330
--- /dev/null
+++ b/test/tests/conf/variable/variable64.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <Test a="attrib-a" b="attrib-b"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable64.xsl b/test/tests/conf/variable/variable64.xsl
new file mode 100644
index 0000000..90a6096
--- /dev/null
+++ b/test/tests/conf/variable/variable64.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable64 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: Joseph Kesselman -->
+  <!-- Purpose: test with-param as RTF copied from global variable (also RTF) -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:variable name="ax"><xsl:value-of select="//Test/@a"/>x</xsl:variable>
+<xsl:variable name="by"><xsl:value-of select="//Test/@b"/>y</xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="preview"/>
+
+    <xsl:call-template name="doNothing">
+      <xsl:with-param name="dummy">
+        <xsl:value-of select="$by"/>
+      </xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:text>
+</xsl:text>
+    <after>ax="<xsl:value-of select='$ax'/>"</after>
+  </out>
+</xsl:template>
+
+<xsl:template name="preview">
+  <before>ax="<xsl:value-of select='$ax'/>"</before>
+</xsl:template>
+
+<xsl:template name="doNothing">
+  <xsl:param name="dummy"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable65.xml b/test/tests/conf/variable/variable65.xml
new file mode 100644
index 0000000..493a330
--- /dev/null
+++ b/test/tests/conf/variable/variable65.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <Test a="attrib-a" b="attrib-b"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable65.xsl b/test/tests/conf/variable/variable65.xsl
new file mode 100644
index 0000000..19cb7c1
--- /dev/null
+++ b/test/tests/conf/variable/variable65.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable65 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston, from Joseph Kesselman's base test -->
+  <!-- Purpose: test with-param as string copied from global variable (an RTF) -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:variable name="ax"><xsl:value-of select="//Test/@a"/>x</xsl:variable>
+<xsl:variable name="by"><xsl:value-of select="//Test/@b"/>y</xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="preview"/>
+
+    <xsl:call-template name="doNothing">
+      <xsl:with-param name="dummy" select="string($by)"/>
+    </xsl:call-template>
+
+    <xsl:text>
+</xsl:text>
+    <after>ax="<xsl:value-of select='$ax'/>"</after>
+  </out>
+</xsl:template>
+
+<xsl:template name="preview">
+  <before>ax="<xsl:value-of select='$ax'/>"</before>
+</xsl:template>
+
+<xsl:template name="doNothing">
+  <xsl:param name="dummy"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable66.xml b/test/tests/conf/variable/variable66.xml
new file mode 100644
index 0000000..493a330
--- /dev/null
+++ b/test/tests/conf/variable/variable66.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <Test a="attrib-a" b="attrib-b"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable66.xsl b/test/tests/conf/variable/variable66.xsl
new file mode 100644
index 0000000..8515d86
--- /dev/null
+++ b/test/tests/conf/variable/variable66.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable65 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston, from Joseph Kesselman's base test -->
+  <!-- Purpose: test with-param as string copied from global variable (a locally-built RTF) -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:variable name="ax"><xsl:value-of select="//Test/@a"/>x</xsl:variable>
+<xsl:variable name="librurgli"><li>b<r>u</r>g</li></xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <xsl:call-template name="preview"/>
+
+    <xsl:call-template name="doNothing">
+      <xsl:with-param name="dummy" select="string($librurgli)"/>
+    </xsl:call-template>
+
+    <xsl:text>
+</xsl:text>
+    <after>ax="<xsl:value-of select='$ax'/>"</after>
+  </out>
+</xsl:template>
+
+<xsl:template name="preview">
+  <before>ax="<xsl:value-of select='$ax'/>"</before>
+</xsl:template>
+
+<xsl:template name="doNothing">
+  <xsl:param name="dummy"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable67.xml b/test/tests/conf/variable/variable67.xml
new file mode 100644
index 0000000..fe5bd36
--- /dev/null
+++ b/test/tests/conf/variable/variable67.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable67.xsl b/test/tests/conf/variable/variable67.xsl
new file mode 100644
index 0000000..f0a9062
--- /dev/null
+++ b/test/tests/conf/variable/variable67.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable67 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston, from Roman Stawski's bug report (#7118) -->
+  <!-- Purpose: Setting a variable in the midst of setting another should not alter any others -->
+
+<xsl:output method="xml" indent="no" encoding="ISO-8859-1"/>
+
+<!-- Two global variables: index should be unaffected; source contains settings for others -->
+<xsl:variable name="index" select="'okay'"/>
+
+<xsl:variable name="source">
+  <xsl:text>
+(Before) </xsl:text><xsl:value-of select="$index"/>
+  <xsl:variable name="joke1" select="'error'" />
+  <xsl:text>
+(Between) </xsl:text><xsl:value-of select="$index"/>
+  <xsl:variable name="joke2" select="'bug'"/>
+  <xsl:text>
+(After) </xsl:text><xsl:value-of select="$index"/>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <Start><xsl:value-of select="$index"/></Start>
+    <xsl:value-of select="$source"/>
+    <xsl:text>
+</xsl:text>
+    <End><xsl:value-of select="$index"/></End>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable68.xml b/test/tests/conf/variable/variable68.xml
new file mode 100644
index 0000000..7aca669
--- /dev/null
+++ b/test/tests/conf/variable/variable68.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>value</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable68.xsl b/test/tests/conf/variable/variable68.xsl
new file mode 100644
index 0000000..a7db583
--- /dev/null
+++ b/test/tests/conf/variable/variable68.xsl
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable68 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Demonstrate various tests of nullness on local variables -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <xsl:variable name="NotSet"/>
+  <xsl:variable name="String" select="'string'"/>
+  <xsl:variable name="nString" select="''"/>
+  <xsl:variable name="Node" select="a"/>
+  <xsl:variable name="nNode" select="b"/><!-- No element of that name in source. -->
+  <out>
+    <xsl:text>NotSet: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$NotSet = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$NotSet != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>
+String: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$String = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$String != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>
+nString: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$nString = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$nString != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>
+Node: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$Node = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$Node != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>
+nNode: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$nNode = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$nNode != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable69.xml b/test/tests/conf/variable/variable69.xml
new file mode 100644
index 0000000..7aca669
--- /dev/null
+++ b/test/tests/conf/variable/variable69.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a>value</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable69.xsl b/test/tests/conf/variable/variable69.xsl
new file mode 100644
index 0000000..557c9bb
--- /dev/null
+++ b/test/tests/conf/variable/variable69.xsl
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable69 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Demonstrate various tests of nullness on global variables -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:variable name="NotSet"/>
+<xsl:variable name="String" select="'string'"/>
+<xsl:variable name="nString" select="''"/>
+<xsl:variable name="Node" select="/doc/a"/>
+<xsl:variable name="nNode" select="/doc/b"/><!-- No element of that name in source. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>NotSet: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$NotSet = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$NotSet != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>
+String: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$String = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$String != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>
+nString: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$nString = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$nString != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>
+Node: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$Node = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$Node != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>
+nNode: </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$nNode = ''"><xsl:text>equals empty</xsl:text></xsl:when>
+      <xsl:when test="$nNode != ''"><xsl:text>not empty</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>neither</xsl:text></xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/variable/variable70.xml b/test/tests/conf/variable/variable70.xml
new file mode 100644
index 0000000..8a3c5dc
--- /dev/null
+++ b/test/tests/conf/variable/variable70.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <foo>bar</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/variable/variable70.xsl b/test/tests/conf/variable/variable70.xsl
new file mode 100644
index 0000000..6a7c45b
--- /dev/null
+++ b/test/tests/conf/variable/variable70.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variable70 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Creator: Tom Amiro -->
+  <!-- Purpose: Define global variable using a when with a dependency on a variable in an included file -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:include href="var70imp.xsl"/>
+
+<xsl:variable name="bar">
+  <xsl:choose>
+    <xsl:when test="$foo='bar'">
+      <xsl:text>the value of bar is bar</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>the value of bar is undefined</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="$bar"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/ver/ver01.xml b/test/tests/conf/ver/ver01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/ver/ver01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/ver/ver01.xsl b/test/tests/conf/ver/ver01.xsl
new file mode 100644
index 0000000..71a73c4
--- /dev/null
+++ b/test/tests/conf/ver/ver01.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="8.5">
+
+  <!-- FileName: Ver01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 Forwards-Compatible Processing  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test the basics of the XSLT version declaration. Should not raise an error. -->
+
+  <xsl:template match="/">
+    <out>
+      Choosing, based on value of version property.
+      <xsl:choose>
+        <xsl:when test="system-property('xsl:version') &gt;= 8.5">
+          We are allowed to use the 8.5 feature.
+          <xsl:exciting-new-8.5-feature/>
+        </xsl:when>
+        <xsl:otherwise>
+          We are not allowed to use the 8.5 feature.
+          <xsl:message>This stylesheet requires XSLT 8.5 or higher</xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/ver/ver02.xml b/test/tests/conf/ver/ver02.xml
new file mode 100644
index 0000000..f41aad4
--- /dev/null
+++ b/test/tests/conf/ver/ver02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <version theattrib="39"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/ver/ver02.xsl b/test/tests/conf/ver/ver02.xsl
new file mode 100644
index 0000000..6716341
--- /dev/null
+++ b/test/tests/conf/ver/ver02.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+
+  <!-- FileName: Ver02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet element -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Prove that transform is a synonym for stylesheet. -->
+
+<!-- Explicitly match text nodes so the output is just 39 -->
+<xsl:template match="text()">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="doc/version">
+  <out>
+    <xsl:value-of select="./@theattrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/conf/ver/ver03.xml b/test/tests/conf/ver/ver03.xml
new file mode 100644
index 0000000..f41aad4
--- /dev/null
+++ b/test/tests/conf/ver/ver03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <version theattrib="39"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/ver/ver03.xsl b/test/tests/conf/ver/ver03.xsl
new file mode 100644
index 0000000..776bd84
--- /dev/null
+++ b/test/tests/conf/ver/ver03.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0" id="style1">
+
+  <!-- FileName: Ver03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet element -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Prove that transform takes the "id" attribute. -->
+
+<!-- Explicitly match text nodes so the output is just 39 -->
+<xsl:template match="text()">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="doc/version">
+  <out>
+    <xsl:value-of select="./@theattrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/conf/ver/ver04.xml b/test/tests/conf/ver/ver04.xml
new file mode 100644
index 0000000..919bcf7
--- /dev/null
+++ b/test/tests/conf/ver/ver04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+	<version theattrib="39"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/ver/ver04.xsl b/test/tests/conf/ver/ver04.xsl
new file mode 100644
index 0000000..97ed37b
--- /dev/null
+++ b/test/tests/conf/ver/ver04.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+
+  <!-- FileName: Ver04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for explicit specification of version attribute in stylesheet declaration above. -->
+
+<!-- Explicitly match text nodes so the output is just 39 -->
+<xsl:template match="text()">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="doc/version">
+  <out>
+    <xsl:value-of select="./@theattrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/ver/ver05.xml b/test/tests/conf/ver/ver05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/ver/ver05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/ver/ver05.xsl b/test/tests/conf/ver/ver05.xsl
new file mode 100644
index 0000000..401f824
--- /dev/null
+++ b/test/tests/conf/ver/ver05.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.1">
+
+  <!-- FileName: Ver05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 Forwards-Compatible Processing  -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Test the basics of the XSLT version declaration. Should not raise an error. -->
+  <!-- Note that this test obviously needs updating as soon as we support XSLT 1.1! -->
+
+  <xsl:template match="/">
+    <out>
+      <xsl:text>xsl:choose when test="system-property('xsl:version') &gt;= 1.1"</xsl:text>
+      <choose>
+      <xsl:choose>
+        <xsl:when test="system-property('xsl:version') &gt;= 1.1">
+          <xsl:text>Hey! Call the 1.1 feature!</xsl:text>
+          <xsl:exciting-new-1.1-feature/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>Hey! 1.1 features are not supported!</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+      </choose>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/ver/ver06.xml b/test/tests/conf/ver/ver06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/ver/ver06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/ver/ver06.xsl b/test/tests/conf/ver/ver06.xsl
new file mode 100644
index 0000000..99199df
--- /dev/null
+++ b/test/tests/conf/ver/ver06.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.2">
+
+  <!-- FileName: Ver06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 Forwards-Compatible Processing  -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Test the basics of the XSLT version declaration. Should not raise an error. -->
+  <!-- Note that this test obviously needs updating as soon as we support XSLT 1.2! -->
+
+  <xsl:template match="/">
+    <out>
+      <xsl:text>xsl:choose when test="system-property('xsl:version') &gt;= 1.2"</xsl:text>
+      <choose>
+      <xsl:choose>
+        <xsl:when test="system-property('xsl:version') &gt;= 1.2">
+          <xsl:text>Hey! Call the 1.2 feature!</xsl:text>
+          <xsl:exciting-new-1.2-feature/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>Hey! 1.2 features are not supported!</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+      </choose>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/ver/ver07.xml b/test/tests/conf/ver/ver07.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/ver/ver07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/ver/ver07.xsl b/test/tests/conf/ver/ver07.xsl
new file mode 100644
index 0000000..77189ad
--- /dev/null
+++ b/test/tests/conf/ver/ver07.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="2.0">
+
+  <!-- FileName: Ver07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 Forwards-Compatible Processing  -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Test the basics of the XSLT version declaration. Should not raise an error. -->
+  <!-- Note that this test obviously needs updating as soon as we support XSLT 2.0! -->
+
+  <xsl:template match="/">
+    <out>
+      <xsl:text>xsl:choose when test="system-property('xsl:version') &gt;= 2.0"</xsl:text>
+      <choose>
+      <xsl:choose>
+        <xsl:when test="system-property('xsl:version') &gt;= 2.0">
+          <xsl:text>Hey! Call the 2.0 feature!</xsl:text>
+          <xsl:exciting-new-2.0-feature/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>Hey! 2.0 features are not supported!</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+      </choose>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/ver/ver08.xml b/test/tests/conf/ver/ver08.xml
new file mode 100644
index 0000000..55d1d89
--- /dev/null
+++ b/test/tests/conf/ver/ver08.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0'?>
+<doc>
+	<in>
+		<ok>xsl ok</ok>
+		<notok>xsl not ok</notok>
+	</in>	
+</doc>
diff --git a/test/tests/conf/ver/ver08.xsl b/test/tests/conf/ver/ver08.xsl
new file mode 100644
index 0000000..19c7eff
--- /dev/null
+++ b/test/tests/conf/ver/ver08.xsl
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.1" 
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+	<!-- FileName: ver08 -->
+	<!-- Document: http://www.w3.org/TR/xslt -->
+	<!-- DocVersion: 19991116 -->
+	<!-- Section: 15 Fallback -->
+	<!-- Author: Joanne Tong -->
+	<!-- Purpose: Test fallback for unsupported xsl elements 
+		, fallback for top-level-elements, and more than one
+		fallback child -->
+	<!-- related to bugs 23089 and 23706 -->
+
+	<xsl:foo /><!-- should ignore -->
+
+	<xsl:bar><!-- should ignore -->
+		<xsl:fallback>
+			<doh />
+		</xsl:fallback>
+	</xsl:bar>
+
+	<xsl:template match="in">
+			<xsl:import-table HREF="blah.asp" name="sample">
+				<doh><!-- should ignore -->
+					<xsl:value-of select="notok" />
+				</doh>
+				<xsl:fallback>
+					<out1>
+						<xsl:value-of select="ok" />
+					</out1>
+					<xsl:import-table>
+						<xsl:fallback>
+							<out2>
+								<xsl:value-of select="ok" />
+							</out2>
+						</xsl:fallback>
+						<xsl:fallback>
+							<out3>
+								<xsl:value-of select="ok" />
+							</out3>
+						</xsl:fallback>						
+					</xsl:import-table>
+					<xsl:fallback><!-- should ignore -->
+						<doh />
+					</xsl:fallback>
+				</xsl:fallback>
+			</xsl:import-table>
+			<xsl:if test="false()">
+				<xsl:import-table /><!-- should not throw error -->
+			</xsl:if>			
+	</xsl:template>
+	
+	<xsl:template match="/">
+		<out>
+			<xsl:apply-templates />
+		</out>
+	</xsl:template>	
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/docws35.xml b/test/tests/conf/whitespace/docws35.xml
new file mode 100644
index 0000000..7770c3c
--- /dev/null
+++ b/test/tests/conf/whitespace/docws35.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+		 <element>ghi</element>	   <element>jkl</element>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/space.xml b/test/tests/conf/whitespace/space.xml
new file mode 100644
index 0000000..8e65994
--- /dev/null
+++ b/test/tests/conf/whitespace/space.xml
@@ -0,0 +1,3 @@
+<document>
+  <section/>  <section/>  <section/>
+</document>
diff --git a/test/tests/conf/whitespace/space.xsl b/test/tests/conf/whitespace/space.xsl
new file mode 100644
index 0000000..be0b6f2
--- /dev/null
+++ b/test/tests/conf/whitespace/space.xsl
@@ -0,0 +1,35 @@
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns="http://www.w3.org/TR/REC-html40"
+  result-ns="">
+
+<xsl:strip-space elements="document"/>
+
+<xsl:template match="document">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="section">
+  <xsl:text>Position:</xsl:text><xsl:value-of select="position()"/>
+  <xsl:text>,Last:</xsl:text><xsl:value-of select="last()"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace01.xml b/test/tests/conf/whitespace/whitespace01.xml
new file mode 100644
index 0000000..3eea3c9
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace01.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <test1>
+         <a>a</a>
+                <b>b</b>
+  </test1>
+  <test2>
+         <c>c</c>
+                <d>d</d>
+  </test2>
+</doc>
diff --git a/test/tests/conf/whitespace/whitespace01.xsl b/test/tests/conf/whitespace/whitespace01.xsl
new file mode 100644
index 0000000..df9419f
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace01.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test strip-space directive. -->
+
+<xsl:strip-space elements="test1"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace02.xml b/test/tests/conf/whitespace/whitespace02.xml
new file mode 100644
index 0000000..3eea3c9
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace02.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <test1>
+         <a>a</a>
+                <b>b</b>
+  </test1>
+  <test2>
+         <c>c</c>
+                <d>d</d>
+  </test2>
+</doc>
diff --git a/test/tests/conf/whitespace/whitespace02.xsl b/test/tests/conf/whitespace/whitespace02.xsl
new file mode 100644
index 0000000..3b4a42b
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace02.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test strip-space on list of specified elements. -->
+
+<xsl:strip-space elements="test1 test2"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace03.xml b/test/tests/conf/whitespace/whitespace03.xml
new file mode 100644
index 0000000..3eea3c9
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace03.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <test1>
+         <a>a</a>
+                <b>b</b>
+  </test1>
+  <test2>
+         <c>c</c>
+                <d>d</d>
+  </test2>
+</doc>
diff --git a/test/tests/conf/whitespace/whitespace03.xsl b/test/tests/conf/whitespace/whitespace03.xsl
new file mode 100644
index 0000000..f76e592
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace03.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test strip-space with wildcard element selector. -->
+
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace04.xml b/test/tests/conf/whitespace/whitespace04.xml
new file mode 100644
index 0000000..dc7e4f0
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace04.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc>
+  <test1>
+	<a>a</a>
+	<b>b</b>
+  </test1>
+  <test2>
+	<c>c</c>
+	<d>d</d>
+  </test2>
+</doc>
diff --git a/test/tests/conf/whitespace/whitespace04.xsl b/test/tests/conf/whitespace/whitespace04.xsl
new file mode 100644
index 0000000..6c2d97a
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace04.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test wildcard on strip-space overridden by preserve-space for one element. -->
+
+<xsl:strip-space elements="*"/>
+<xsl:preserve-space elements="test2"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace05.xml b/test/tests/conf/whitespace/whitespace05.xml
new file mode 100644
index 0000000..9a56dac
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace05.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+<doc>
+    <a>a</a>
+        <b> <!-- test -->b</b>
+</doc>
diff --git a/test/tests/conf/whitespace/whitespace05.xsl b/test/tests/conf/whitespace/whitespace05.xsl
new file mode 100644
index 0000000..48dfa6a
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace05.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test stripping an element that has whitespace plus a comment containing whitespace. -->
+
+<xsl:strip-space elements="b"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace06.xml b/test/tests/conf/whitespace/whitespace06.xml
new file mode 100644
index 0000000..b8c89e2
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace06.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc xmlns:foo="ns1" xmlns:roo="ns2">
+  <foo:test>
+         <a>a</a>
+                <b>b</b>
+  </foo:test>
+  <roo:test>
+         <c>c</c>
+                <d>d</d>
+  </roo:test>
+</doc>
diff --git a/test/tests/conf/whitespace/whitespace06.xsl b/test/tests/conf/whitespace/whitespace06.xsl
new file mode 100644
index 0000000..dac3d8f
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace06.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+                xmlns:ns1="ns1">
+
+  <!-- FileName: whitespace06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test element specifier that has a namespace qualifier. -->
+
+<xsl:strip-space elements="ns1:test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace07.xml b/test/tests/conf/whitespace/whitespace07.xml
new file mode 100644
index 0000000..b8c89e2
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace07.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc xmlns:foo="ns1" xmlns:roo="ns2">
+  <foo:test>
+         <a>a</a>
+                <b>b</b>
+  </foo:test>
+  <roo:test>
+         <c>c</c>
+                <d>d</d>
+  </roo:test>
+</doc>
diff --git a/test/tests/conf/whitespace/whitespace07.xsl b/test/tests/conf/whitespace/whitespace07.xsl
new file mode 100644
index 0000000..3cd65d3
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace07.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+                xmlns:ns1="ns1">
+
+  <!-- FileName: whitespace07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test for element specifier that is a wildcard but qualified by a namespace. -->
+
+<xsl:strip-space elements="ns1:*"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace08.xml b/test/tests/conf/whitespace/whitespace08.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace08.xsl b/test/tests/conf/whitespace/whitespace08.xsl
new file mode 100644
index 0000000..c3fe059
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace08.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Purpose: Test default whitespace handling. -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:text> </xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace09.xml b/test/tests/conf/whitespace/whitespace09.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace09.xsl b/test/tests/conf/whitespace/whitespace09.xsl
new file mode 100644
index 0000000..95dfdf9
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace09.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test output of newline via CDATA section in template. -->
+
+<xsl:template match="/"><out>
+  <![CDATA[
+      ]]>
+      </out></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace10.xml b/test/tests/conf/whitespace/whitespace10.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace10.xsl b/test/tests/conf/whitespace/whitespace10.xsl
new file mode 100644
index 0000000..8b7af63
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace10.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test whitespace as LRE in template. -->
+
+<xsl:template match="/"><out>
+      x
+      </out></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace11.xml b/test/tests/conf/whitespace/whitespace11.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace11.xsl b/test/tests/conf/whitespace/whitespace11.xsl
new file mode 100644
index 0000000..0510150
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace11.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test whitespace in template matched on root. -->
+
+<xsl:template match="/"><out>
+      x
+      </out></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace12.xml b/test/tests/conf/whitespace/whitespace12.xml
new file mode 100644
index 0000000..6b98629
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace12.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<document>
+  <section/>  <section/>  <section/>
+</document>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace12.xsl b/test/tests/conf/whitespace/whitespace12.xsl
new file mode 100644
index 0000000..e3b3d2a
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace12.xsl
@@ -0,0 +1,45 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test xsl:output with indent. -->
+
+<xsl:output indent="yes"/>
+
+<xsl:strip-space elements="document"/>
+
+<xsl:template match="document">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="section">
+  <xsl:text>Position:</xsl:text><xsl:value-of select="position()"/>
+  <xsl:text>,Last:</xsl:text><xsl:value-of select="last()"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace13.xml b/test/tests/conf/whitespace/whitespace13.xml
new file mode 100644
index 0000000..acb837d
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace13.xsl b/test/tests/conf/whitespace/whitespace13.xsl
new file mode 100644
index 0000000..ec6650a
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace13.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test default whitespace handling where both source and template have space. -->
+
+<xsl:template match="/">
+  <out> <![CDATA[test]]> </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace15.xml b/test/tests/conf/whitespace/whitespace15.xml
new file mode 100644
index 0000000..977fcc2
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace15.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace15.xsl b/test/tests/conf/whitespace/whitespace15.xsl
new file mode 100644
index 0000000..7650909
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace15.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test default whitespace handling. -->
+
+<xsl:template match="/">
+  <out/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace17.xml b/test/tests/conf/whitespace/whitespace17.xml
new file mode 100644
index 0000000..7a0efe7
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace17.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc><foo>a</foo></doc>
+
diff --git a/test/tests/conf/whitespace/whitespace17.xsl b/test/tests/conf/whitespace/whitespace17.xsl
new file mode 100644
index 0000000..392f72a
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace17.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test indent on xsl:output with copy-of. -->
+
+<xsl:output indent="yes"/>
+
+<xsl:template match="/">
+	<xsl:copy-of select="doc"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace18.xml b/test/tests/conf/whitespace/whitespace18.xml
new file mode 100644
index 0000000..2eaab79
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace18.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc>
+   <alpha key="a"/>
+   <alpha key="b"/>
+   <alpha key="c"/>
+   <alpha key="d"/>
+   <alpha key="e"/>
+   <alpha key="f"/>
+   <alpha key="g"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace18.xsl b/test/tests/conf/whitespace/whitespace18.xsl
new file mode 100644
index 0000000..a3b52f8
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace18.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Purpose: xsl:text node should not contribute any text nodes 
+       to the result tree. -->
+
+<xsl:template match="/">
+<out><xsl:text>&#010;</xsl:text>
+<xsl:for-each select="doc/alpha">
+   <xsl:value-of select="@key"/>|<xsl:text/>
+</xsl:for-each>
+</out>
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace19.xml b/test/tests/conf/whitespace/whitespace19.xml
new file mode 100644
index 0000000..2eaab79
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace19.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<doc>
+   <alpha key="a"/>
+   <alpha key="b"/>
+   <alpha key="c"/>
+   <alpha key="d"/>
+   <alpha key="e"/>
+   <alpha key="f"/>
+   <alpha key="g"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace19.xsl b/test/tests/conf/whitespace/whitespace19.xsl
new file mode 100644
index 0000000..70b2322
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace19.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Stylesheet is whitespace stripped before processing. -->
+
+<xsl:template match="/">
+<out>
+<xsl:for-each select="doc/alpha">
+    <xsl:value-of select="@key"/>|<xsl:text/> </xsl:for-each>
+
+
+
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace20.xml b/test/tests/conf/whitespace/whitespace20.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace20.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace20.xsl b/test/tests/conf/whitespace/whitespace20.xsl
new file mode 100644
index 0000000..63bfd96
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace20.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Simple case verifies use of xml:space to preserve whitespace,
+  	   here a space and a tab. -->
+
+<xsl:template match="/">
+ <root><xsl:text>&#10;</xsl:text>
+   <out>    </out><xsl:text>&#10;</xsl:text>
+   <out xml:space="default"> 	</out><xsl:text>&#10;</xsl:text>
+   <out xml:space="preserve"> 	</out><xsl:text>&#10;</xsl:text>
+   <out xml:space="default"> 	</out><xsl:text>&#10;</xsl:text>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace21.xml b/test/tests/conf/whitespace/whitespace21.xml
new file mode 100644
index 0000000..f5c9e18
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace21.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace21.xsl b/test/tests/conf/whitespace/whitespace21.xsl
new file mode 100644
index 0000000..bee5c0b
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace21.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for whitespace handling with comments in literal sections -->
+
+<xsl:template match="/">
+  <out>x
+    <!-- this is a comment -->y
+    <!-- this is another comment -->
+    <z><!-- this is another comment --> </z>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace22.xml b/test/tests/conf/whitespace/whitespace22.xml
new file mode 100644
index 0000000..481c18c
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace22.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<doc xmlns:ns1="www.ns1.com" xmlns:ns2="www.ns2.com">
+  <ns2:test>
+         <c>c</c>
+                <d>d</d>
+  </ns2:test>
+  <ns1:test>
+         <a>a</a>
+                <b>b</b>
+  </ns1:test>
+
+</doc>
diff --git a/test/tests/conf/whitespace/whitespace22.xsl b/test/tests/conf/whitespace/whitespace22.xsl
new file mode 100644
index 0000000..ea7b4d9
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace22.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
+                xmlns:ns1="www.ns1.com" xmlns:ns2="www.ns2.com"
+                exclude-result-prefixes="ns1 ns2">
+
+  <!-- FileName: whitespace22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Testing the applicable match for a particular element, also
+       verifying that preserve-space works with namespace-prefixed element.
+       This generate an error, recovering with the match that occurs last in
+       the stylesheet. -->
+
+<xsl:strip-space elements="ns1:test ns2:test"/>
+<xsl:preserve-space elements="ns1:test"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace23.xml b/test/tests/conf/whitespace/whitespace23.xml
new file mode 100644
index 0000000..48332ed
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace23.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<doc> 
+<link>
+		 <url>
+		 		 value
+		 		 xx
+		 </url>
+</link>
+<link>
+		 <url>
+		 		 value
+		 </url>
+</link>
+<link>
+		 <url>
+		 		 value      zz
+		 </url>
+</link>
+<link>
+		 <url>
+		 		 value yy
+		 </url>
+</link>
+
+</doc> 
diff --git a/test/tests/conf/whitespace/whitespace23.xsl b/test/tests/conf/whitespace/whitespace23.xsl
new file mode 100644
index 0000000..bc33a27
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace23.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: Scott Boag (in response to problem reported by "Carsten Ziegeler" <cziegeler@sundn.de>) -->
+  <!-- Purpose: Another test for the normalize-space function, this one really testing handling of the newline. -->
+
+<xsl:template match = "doc">
+   <out>
+	<xsl:for-each select="link">
+		 <a>
+		 		 <xsl:attribute name="href"><xsl:value-of
+                                select="normalize-space(url)"/></xsl:attribute>
+		 		 <xsl:value-of select="normalize-space(url)"/>
+		 </a>
+		 <xsl:text>&#10;</xsl:text>
+	</xsl:for-each>
+
+	<xsl:for-each select="link">
+		 <a href="{normalize-space(url)}">
+		 		 <xsl:value-of select="normalize-space(url)"/>
+		 </a>
+		 <xsl:text>&#10;</xsl:text>
+	</xsl:for-each>
+
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace35.xml b/test/tests/conf/whitespace/whitespace35.xml
new file mode 100644
index 0000000..9f6f146
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace35.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+		 <element>abc</element>	   <element>def</element>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conf/whitespace/whitespace35.xsl b/test/tests/conf/whitespace/whitespace35.xsl
new file mode 100644
index 0000000..01cd367
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace35.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespace35 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Maynard Demmons (maynard@organic.com) -->
+  <!-- Purpose: Test for whitespace stripping from source documents retrieved
+                with the document() function. -->
+  <!-- Elaboration: doc/node() [excluding XDM (XPath data model) attribute nodes and the 
+                root node] might contain several whitespace nodes if not stripped. 
+                The built-in template for text would cause them to be emitted. But 
+                the strip operation is defined as being applied to XDM 
+                nodes originating from "XML source documents" and nodes returned by 
+                the document() function, as described in XSLT 1.0 spec's section 
+                "12.1 Multiple Source Documents", so they can be stripped (using XSLT 1.0 
+                language instruction xsl:strip-space) out of the tree returned by 
+                document() and not appear in the output. -->
+
+<xsl:strip-space elements="*" />
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+    <xsl:apply-templates select="document('docws35.xml')/doc"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="element">
+  <xsl:element name="{(.)}"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conf/whitespace/whitespace36.xml b/test/tests/conf/whitespace/whitespace36.xml
new file mode 100644
index 0000000..fadd287
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace36.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<foo>
+<boo>
+</boo>
+</foo>
diff --git a/test/tests/conf/whitespace/whitespace36.xsl b/test/tests/conf/whitespace/whitespace36.xsl
new file mode 100644
index 0000000..7699994
--- /dev/null
+++ b/test/tests/conf/whitespace/whitespace36.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>                                                                                   
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  version="1.0">
+
+  <!-- FileName: whitespace36 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: Dmitry Hayes (dmitryh@ca.ibm.com) and David Bertoni (dbertoni@apache.org) -->
+  <!-- Purpose: Test for whitespace stripping from source documents when converting
+                a node set to a string. -->
+  <!-- Elaboration: Xalan-C neglected to strip whitespace text nodes that were
+       descendants of a document or element node when calculating the string value. -->
+
+<xsl:strip-space elements="*" />                                                                                
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*"> 
+  <xsl:if test="string-length(.) != 0 and . != '' and string(.) != ''"> 
+    <xsl:text>Whitespace text nodes for for the element node "</xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text>" were not stripped!"</xsl:text> 
+  </xsl:if>
+  <xsl:apply-templates/>
+</xsl:template> 
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr01.xml b/test/tests/conferr/attribseterr/attribseterr01.xml
new file mode 100644
index 0000000..d9455e7
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr01.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<docs>
+<doc1>
+	<a level="1">A1</a>
+	<b level="1">B2</b>
+	<c level="1">C3</c>
+</doc1>
+<doc2>
+	<a level="2">A1</a>
+	<b level="2">B2</b>
+	<c level="2">C3</c>
+	<doc3>
+		<a level="Out1">A1</a>
+		<bat level="3">Out2</bat>
+		<cat level="3">C33</cat>
+	</doc3>
+</doc2>
+</docs> 
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr01.xsl b/test/tests/conferr/attribseterr/attribseterr01.xsl
new file mode 100644
index 0000000..add8543
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr01.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Purpose: Verify creating nodes other than text nodes during instantiation
+       of the content of the xsl:attribute element is an error. Offending nodes
+       can be ignored. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: ElemTemplateElement error: Can not add foo to xsl:attribute -->
+  <!-- ExpectedException: ElemTemplateElement error: Can not add foo to xsl:attribute -->
+  <!-- ExpectedException: foo is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="/">
+   <Out>
+      <xsl:attribute name="attr1">
+		 <foo/>
+         <xsl:processing-instruction name="PDPI">Process this</xsl:processing-instruction>
+		 <xsl:comment>This should be ignored</xsl:comment>
+		 <xsl:copy-of select="doc2"/>
+		OK
+      </xsl:attribute>
+   </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr02.xml b/test/tests/conferr/attribseterr/attribseterr02.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr02.xsl b/test/tests/conferr/attribseterr/attribseterr02.xsl
new file mode 100644
index 0000000..2e73219
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr02.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set up circular references of attribute-sets using each other -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: xsl:attribute-set 'set1' used itself, which will cause an infinite loop. -->
+  <!-- ExpectedException: xsl:attribute-set set1 used itself, which will cause an infinite loop. -->
+
+<xsl:template match="/">
+    <out>
+      <test1 xsl:use-attribute-sets="set1"></test1>
+    </out>
+</xsl:template>
+
+<xsl:attribute-set name="set2" use-attribute-sets="set3">
+  <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set1" use-attribute-sets="set2">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="set3" use-attribute-sets="set1">
+  <xsl:attribute name="font-size">14pt</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr03.xml b/test/tests/conferr/attribseterr/attribseterr03.xml
new file mode 100644
index 0000000..effb08f
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc> 
+</doc> 
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr03.xsl b/test/tests/conferr/attribseterr/attribseterr03.xsl
new file mode 100644
index 0000000..77ca32c
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr03.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Purpose: Verify adding an attribute to node that is not an element
+  	   is an error.  The attributes can be ignored.-->
+  <!-- ExpectedException: Can not add xsl:attribute to xsl:attribute -->
+  <!-- ExpectedException: ElemTemplateElement error: Can not add xsl:attribute to xsl:attribute -->
+  <!-- ExpectedException: xsl:attribute is not allowed in this position in the stylesheet! -->
+<xsl:template match="/">
+  <out>
+    <xsl:element name="Element1">
+      <xsl:attribute name="Att1">
+        <xsl:attribute name="Att2">Wrong</xsl:attribute>
+          OK
+        </xsl:attribute>
+      </xsl:element>	  
+    <xsl:attribute name="Att1">Also-Wrong</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr04.xml b/test/tests/conferr/attribseterr/attribseterr04.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr04.xsl b/test/tests/conferr/attribseterr/attribseterr04.xsl
new file mode 100644
index 0000000..0fb2dfb
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr04.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Omit name attribute in xsl:attribute-set. -->
+  <!-- ExpectedException: xsl:attribute-set must have a name attribute. -->
+  <!-- ExpectedException: xsl:attribute-set requires attribute: name -->
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="set1"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set>
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr05.xml b/test/tests/conferr/attribseterr/attribseterr05.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr05.xsl b/test/tests/conferr/attribseterr/attribseterr05.xsl
new file mode 100644
index 0000000..9e72f7a
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr05.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Purpose: Put illegal instructions in xsl:attribute-set. -->
+  <!-- ExpectedException: ElemTemplateElement error: Can not add xsl:apply-templates to xsl:attribute-set -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: ElemTemplateElement error: Can not add xsl:apply-templates to xsl:attribute-set -->
+  <!-- ExpectedException: xsl:apply-templates is not allowed in this position in the stylesheet! -->
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="set1"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+  <xsl:apply-templates/>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr06.xml b/test/tests/conferr/attribseterr/attribseterr06.xml
new file mode 100644
index 0000000..5042ef6
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr06.xsl b/test/tests/conferr/attribseterr/attribseterr06.xsl
new file mode 100644
index 0000000..640c5e8
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr06.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test placement of attribute-set inside a template, which is illegal. -->
+  <!-- ExpectedException: xsl:attribute-set is not allowed inside a template! -->
+  <!-- ExpectedException: XSLT: (StylesheetHandler) xsl:attribute-set is not allowed inside a template! -->
+  <!-- ExpectedException: xsl:attribute-set is not allowed in this position in the stylesheet! -->
+<xsl:template match="/">
+  <out>
+    <xsl:attribute-set name="set2">
+      <xsl:attribute name="text-decoration">underline</xsl:attribute>
+    </xsl:attribute-set>
+    <test1 xsl:use-attribute-sets="set1">This should fail</test1>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr07.xml b/test/tests/conferr/attribseterr/attribseterr07.xml
new file mode 100644
index 0000000..21aae0f
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>\
+  <foo>a</foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr07.xsl b/test/tests/conferr/attribseterr/attribseterr07.xsl
new file mode 100644
index 0000000..87f4858
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr07.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set attributes of element, using an attribute set that doesn't exist. -->
+  <!-- NOTE that the spec is unclear about what behavior is required! In a private email,
+       James Clark said that it should be an error. Erratum to come? -->
+  <!-- ExpectedException: attribute-set named set2 does not exist -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:element name="test" use-attribute-sets="set1 set2"/>
+  </out>
+</xsl:template>
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr08.xml b/test/tests/conferr/attribseterr/attribseterr08.xml
new file mode 100644
index 0000000..199f92d
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr08.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc top="gotcha"></doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr08.xsl b/test/tests/conferr/attribseterr/attribseterr08.xsl
new file mode 100644
index 0000000..3c19dc3
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr08.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Attempt to write an attribute with no element -->
+  <!-- Purpose: Try to create an attribute before there is any element produced. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:attribute name="baaad"><xsl:value-of select="doc/@top"/></xsl:attribute>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribseterr/attribseterr09.xml b/test/tests/conferr/attribseterr/attribseterr09.xml
new file mode 100644
index 0000000..c1f4340
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr09.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <section index="section1" index2="atr2val">
+    <section index="subSection1.1">
+      <p>Hello</p>
+      <p>Hello again.</p>
+    </section>
+  </section>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribseterr/attribseterr09.xsl b/test/tests/conferr/attribseterr/attribseterr09.xsl
new file mode 100644
index 0000000..7b1da69
--- /dev/null
+++ b/test/tests/conferr/attribseterr/attribseterr09.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribseterr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Attempt to use xsl:if inside xsl:attribute-set -->
+  <!-- ExpectedException: xsl:if is not allowed in this position in the stylesheet! -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="yes" />
+
+<xsl:attribute-set name="set1">
+  <xsl:attribute name="color">black</xsl:attribute>
+  <xsl:if test="32 &gt; 1">
+    <xsl:attribute name="font-size">14pt</xsl:attribute>
+  </xsl:if>
+</xsl:attribute-set>
+
+<xsl:template match="/">
+  <out>
+    <test1 xsl:use-attribute-sets="set1"></test1>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr01.xml b/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr01.xsl b/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr01.xsl
new file mode 100644
index 0000000..302c98c
--- /dev/null
+++ b/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr01.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplateerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test of nested curly braces. Not allowed. -->
+  <!-- ExpectedException: XSL Warning: Found '}' but no attribute template open! -->
+
+<xsl:template match="doc">
+  <out href="{{'all'}{'done'}}"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr02.xml b/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr02.xml
new file mode 100644
index 0000000..4c8dbef
--- /dev/null
+++ b/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr02.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc xmlns:http="xyz">
+  <http:val>pfu</http:val>
+  <val>dfu</val>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr02.xsl b/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr02.xsl
new file mode 100644
index 0000000..f369329
--- /dev/null
+++ b/test/tests/conferr/attribvaltemplateerr/attribvaltemplateerr02.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribvaltemplateerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Value with a colon is interpreted as having a namespace prefix. -->
+  <!-- ExpectedException: Prefix must resolve to a namespace -->
+
+<xsl:template match="doc">
+  <out href="{http:val}"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr01.xml b/test/tests/conferr/booleanerr/booleanerr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr01.xsl b/test/tests/conferr/booleanerr/booleanerr01.xsl
new file mode 100644
index 0000000..2dc8002
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr01.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "not". -->
+  <!-- ExpectedException: Could not find function: nt -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="nt(true())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr02.xml b/test/tests/conferr/booleanerr/booleanerr02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr02.xsl b/test/tests/conferr/booleanerr/booleanerr02.xsl
new file mode 100644
index 0000000..fa823ff
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr02.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" in not. -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="not(troo())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr03.xml b/test/tests/conferr/booleanerr/booleanerr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr03.xsl b/test/tests/conferr/booleanerr/booleanerr03.xsl
new file mode 100644
index 0000000..4438466
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr03.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" in and. -->
+  <!-- ExpectedException: XSL Warning: Could not find function: troo -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="troo() and (2 = 2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr04.xml b/test/tests/conferr/booleanerr/booleanerr04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr04.xsl b/test/tests/conferr/booleanerr/booleanerr04.xsl
new file mode 100644
index 0000000..fe4245c
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr04.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" in or. -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="troo() or (2 = 2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr05.xml b/test/tests/conferr/booleanerr/booleanerr05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr05.xsl b/test/tests/conferr/booleanerr/booleanerr05.xsl
new file mode 100644
index 0000000..4d37759
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr05.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" in = relation. -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="2 = troo()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr06.xml b/test/tests/conferr/booleanerr/booleanerr06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr06.xsl b/test/tests/conferr/booleanerr/booleanerr06.xsl
new file mode 100644
index 0000000..0b5bd1f
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr06.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" in boolean(). -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="boolean(troo())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr07.xml b/test/tests/conferr/booleanerr/booleanerr07.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr07.xsl b/test/tests/conferr/booleanerr/booleanerr07.xsl
new file mode 100644
index 0000000..f743c25
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr07.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of true() with an argument. -->
+  <!-- ExpectedException: expected zero arguments -->
+  <!-- ExpectedException: FuncTrue only allows 0 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="true(doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr08.xml b/test/tests/conferr/booleanerr/booleanerr08.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr08.xsl b/test/tests/conferr/booleanerr/booleanerr08.xsl
new file mode 100644
index 0000000..684b6ab
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr08.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of false() with an argument. -->
+  <!-- ExpectedException: expected zero arguments -->
+  <!-- ExpectedException: FuncFalse only allows 0 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="false(doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr09.xml b/test/tests/conferr/booleanerr/booleanerr09.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr09.xsl b/test/tests/conferr/booleanerr/booleanerr09.xsl
new file mode 100644
index 0000000..a8749e6
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr09.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of not() with no argument. -->
+  <!-- ExpectedException: expected one argument -->
+  <!-- ExpectedException: FuncNot only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="not()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr10.xml b/test/tests/conferr/booleanerr/booleanerr10.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr10.xsl b/test/tests/conferr/booleanerr/booleanerr10.xsl
new file mode 100644
index 0000000..727e805
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr10.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of not() with too many arguments. -->
+  <!-- ExpectedException: expected one argument -->
+  <!-- ExpectedException: FuncNot only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="not(false(),doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr11.xml b/test/tests/conferr/booleanerr/booleanerr11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr11.xsl b/test/tests/conferr/booleanerr/booleanerr11.xsl
new file mode 100644
index 0000000..34ece66
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr11.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean() with no argument. -->
+  <!-- ExpectedException: expected one argument -->
+  <!-- ExpectedException: FuncBoolean only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="boolean()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr12.xml b/test/tests/conferr/booleanerr/booleanerr12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr12.xsl b/test/tests/conferr/booleanerr/booleanerr12.xsl
new file mode 100644
index 0000000..88b4763
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr12.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of boolean() with too many arguments. -->
+  <!-- ExpectedException: expected one argument -->
+  <!-- ExpectedException: FuncBoolean only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="boolean(false(),doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr13.xml b/test/tests/conferr/booleanerr/booleanerr13.xml
new file mode 100644
index 0000000..6bd1268
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr13.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+  <p xml:lang="en"/>
+  <p xml:lang="EN"/>
+  <p xml:lang="en-gb"/>
+  <p xml:lang="EN-GB"/>
+  <p xml:lang="TH"/>
+  <p/>
+  <span xml:lang="en">
+    <p/>
+  </span>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr13.xsl b/test/tests/conferr/booleanerr/booleanerr13.xsl
new file mode 100644
index 0000000..78bee47
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr13.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Give lang() function too few arguments -->
+  <!-- ExpectedException: expected one argument -->
+  <!-- ExpectedException: FuncLang only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="doc/p"/></out>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:value-of select="lang()"/><xsl:text>, </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/booleanerr/booleanerr14.xml b/test/tests/conferr/booleanerr/booleanerr14.xml
new file mode 100644
index 0000000..6bd1268
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr14.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+  <p xml:lang="en"/>
+  <p xml:lang="EN"/>
+  <p xml:lang="en-gb"/>
+  <p xml:lang="EN-GB"/>
+  <p xml:lang="TH"/>
+  <p/>
+  <span xml:lang="en">
+    <p/>
+  </span>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/booleanerr/booleanerr14.xsl b/test/tests/conferr/booleanerr/booleanerr14.xsl
new file mode 100644
index 0000000..f0d8f5a
--- /dev/null
+++ b/test/tests/conferr/booleanerr/booleanerr14.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: BOOLEANerr14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Give lang() function too many arguments -->
+  <!-- ExpectedException: expected one argument -->
+  <!-- ExpectedException: FuncLang only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out><xsl:apply-templates select="doc/p"/></out>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:value-of select="lang('en','us')"/><xsl:text>, </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr01.xml b/test/tests/conferr/conditionalerr/conditionalerr01.xml
new file mode 100644
index 0000000..3f04c72
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <critter><name>Lassie</name></critter>
+  <critter><name>Wishbone</name></critter>
+  <critter><name>Felix</name></critter>
+  <critter><name>Sylvester</name></critter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr01.xsl b/test/tests/conferr/conditionalerr/conditionalerr01.xsl
new file mode 100644
index 0000000..9df389d
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr01.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Purpose: Test for xsl:choose with no when or otherwise clauses. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Required Element not found: xsl:when -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="critter">
+      <xsl:choose>
+      </xsl:choose>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr02.xml b/test/tests/conferr/conditionalerr/conditionalerr02.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr02.xsl b/test/tests/conferr/conditionalerr/conditionalerr02.xsl
new file mode 100644
index 0000000..f7726af
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr02.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:choose without xsl:when, but otherwise exists. -->
+  <!-- ExpectedException: Required Element not found: xsl:when -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr03.xml b/test/tests/conferr/conditionalerr/conditionalerr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr03.xsl b/test/tests/conferr/conditionalerr/conditionalerr03.xsl
new file mode 100644
index 0000000..163ba41
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr03.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of xsl:choose containing sub-element that is not a when or otherwise. -->
+  <!-- ExpectedException: ElemTemplateElement error: Can not add #text to xsl:choose -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: ElemTemplateElement error: Can not add #text to xsl:choose -->
+  <!-- ExpectedException: xsl:text is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:text>Inside choose</xsl:text>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr04.xml b/test/tests/conferr/conditionalerr/conditionalerr04.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr04.xsl b/test/tests/conferr/conditionalerr/conditionalerr04.xsl
new file mode 100644
index 0000000..6172a23
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr04.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Purpose: Test xsl:choose having more than one xsl:otherwise. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:otherwise is not allowed in this position in the stylesheet -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="false()">Should not get this output!</xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+      <xsl:otherwise>2</xsl:otherwise>
+      <xsl:otherwise>3</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr05.xml b/test/tests/conferr/conditionalerr/conditionalerr05.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr05.xsl b/test/tests/conferr/conditionalerr/conditionalerr05.xsl
new file mode 100644
index 0000000..7fed3b8
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr05.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Purpose: Test xsl:when after xsl:otherwise, match on final when. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:when is not allowed in this position in the stylesheet -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="blah">BAD</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+      <xsl:when test="foo">1</xsl:when>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr06.xml b/test/tests/conferr/conditionalerr/conditionalerr06.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr06.xsl b/test/tests/conferr/conditionalerr/conditionalerr06.xsl
new file mode 100644
index 0000000..743ca34
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr06.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test bad attribute on xsl:when (only "test" allowed). -->
+  <!-- ExpectedException: xsl:when has an illegal attribute: name -->
+  <!-- ExpectedException: "name" attribute is not allowed on the xsl:when element! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="foo" name="pointless">1</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr07.xml b/test/tests/conferr/conditionalerr/conditionalerr07.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr07.xsl b/test/tests/conferr/conditionalerr/conditionalerr07.xsl
new file mode 100644
index 0000000..b7a18e7
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr07.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test attempt to put attribute on xsl:otherwise. -->
+  <!-- ExpectedException: xsl:otherwise has an illegal attribute: test -->
+  <!-- ExpectedException: "test" attribute is not allowed on the xsl:otherwise element! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="blah">BAD</xsl:when>
+      <xsl:otherwise test="not(blah)">0</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr08.xml b/test/tests/conferr/conditionalerr/conditionalerr08.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr08.xsl b/test/tests/conferr/conditionalerr/conditionalerr08.xsl
new file mode 100644
index 0000000..9e0ebb4
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr08.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test attempt to put attribute on xsl:choose. -->
+  <!-- ExpectedException: xsl:choose has an illegal attribute: name -->
+  <!-- ExpectedException: "name" attribute is not allowed on the xsl:choose element! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose name="outer">
+      <xsl:when test="foo">1</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr09.xml b/test/tests/conferr/conditionalerr/conditionalerr09.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr09.xsl b/test/tests/conferr/conditionalerr/conditionalerr09.xsl
new file mode 100644
index 0000000..1aaadd3
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr09.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:if that lacks the required "test" attribute. -->
+  <!-- ExpectedException: xsl:if must have a test attribute -->
+  <!-- ExpectedException: xsl:if requires attribute: test -->
+<xsl:template match="/">
+  <out>
+    <xsl:if>
+      <xsl:text>string</xsl:text>
+    </xsl:if>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr10.xml b/test/tests/conferr/conditionalerr/conditionalerr10.xml
new file mode 100644
index 0000000..afa62eb
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr10.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<doc>
+this text shouldn't be here.
+</doc>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr10.xsl b/test/tests/conferr/conditionalerr/conditionalerr10.xsl
new file mode 100644
index 0000000..4f64fde
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr10.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:if that has an empty "test" attribute. -->
+  <!-- ExpectedException: Empty expression -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:if test="">
+      <xsl:text>string</xsl:text>
+    </xsl:if>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr11.xml b/test/tests/conferr/conditionalerr/conditionalerr11.xml
new file mode 100644
index 0000000..0c75a0f
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr11.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <person><sex>M</sex><name>John</name></person>
+  <person><sex>F</sex><name>Jane</name></person>
+  <person><sex>H</sex><name>Hermaphrodite</name></person>
+  <person><sex>12</sex><name>Prince</name></person>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr11.xsl b/test/tests/conferr/conditionalerr/conditionalerr11.xsl
new file mode 100644
index 0000000..bf952b6
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr11.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use when outside of choose. -->
+  <!-- ExpectedException: (StylesheetHandler) xsl:when not parented by xsl:choose! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:when not parented by xsl:choose! -->
+  <!-- ExpectedException: xsl:when is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="person">
+      <xsl:when test="sex='M'">&#xa;Male: </xsl:when>
+      <xsl:value-of select="name"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr12.xml b/test/tests/conferr/conditionalerr/conditionalerr12.xml
new file mode 100644
index 0000000..0c75a0f
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr12.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <person><sex>M</sex><name>John</name></person>
+  <person><sex>F</sex><name>Jane</name></person>
+  <person><sex>H</sex><name>Hermaphrodite</name></person>
+  <person><sex>12</sex><name>Prince</name></person>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr12.xsl b/test/tests/conferr/conditionalerr/conditionalerr12.xsl
new file mode 100644
index 0000000..9938248
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr12.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use otherwise outside of choose. -->
+  <!-- ExpectedException: (StylesheetHandler) xsl:otherwise not parented by xsl:choose! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:otherwise not parented by xsl:choose! -->
+  <!-- ExpectedException: xsl:otherwise is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="person">
+      <xsl:otherwise>&#xa;Male: </xsl:otherwise>
+      <xsl:value-of select="name"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr13.xml b/test/tests/conferr/conditionalerr/conditionalerr13.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr13.xsl b/test/tests/conferr/conditionalerr/conditionalerr13.xsl
new file mode 100644
index 0000000..a41e7b6
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr13.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:when lacking the "test" attribute. -->
+  <!-- ExpectedException: xsl:when must have a 'test' attribute -->
+  <!-- ExpectedException: xsl:when requires attribute: test -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when>1</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr14.xml b/test/tests/conferr/conditionalerr/conditionalerr14.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr14.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr14.xsl b/test/tests/conferr/conditionalerr/conditionalerr14.xsl
new file mode 100644
index 0000000..7660580
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr14.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:when "test" having null content. -->
+  <!-- ExpectedException: Empty expression -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="">1</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr15.xml b/test/tests/conferr/conditionalerr/conditionalerr15.xml
new file mode 100644
index 0000000..1f0ee2d
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr15.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Family>
+<Child name="Harry">
+<Name>Harry</Name>
+</Child>
+<Child name="Tom">
+<Name>Tom</Name>
+</Child>
+<Child name="Dick">
+<Name>Dick</Name>
+</Child>
+<Child name="John">
+<Name>Dick</Name>
+</Child>
+<Child name="Joe">
+<Name>Dick</Name>
+</Child>
+<Child name="Paulette">
+<Name>Paulette</Name>
+</Child>
+<Child name="Peter">
+<Name>Peter</Name>
+</Child>
+</Family>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr15.xsl b/test/tests/conferr/conditionalerr/conditionalerr15.xsl
new file mode 100644
index 0000000..60ea4c4
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr15.xsl
@@ -0,0 +1,40 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Purpose: Test of incorrect use of | where 'or' was intended. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: invalid token: | -->
+  
+<xsl:template match="Family">
+  <out>
+    <xsl:for-each select="*">  
+      <xsl:if test="@name='John' | @name='Joe'">
+      <xsl:value-of select="@name"/> Smith</xsl:if><xsl:text>
+</xsl:text>  
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr16.xml b/test/tests/conferr/conditionalerr/conditionalerr16.xml
new file mode 100644
index 0000000..ed3a5f4
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr16.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <foo>
+    <test/>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr16.xsl b/test/tests/conferr/conditionalerr/conditionalerr16.xsl
new file mode 100644
index 0000000..083c39b
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr16.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of non-existant variable in test attribute. -->
+  <!-- ExpectedException: Could not find variable with the name of level -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:if test='$level=1'>1</xsl:if>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr17.xml b/test/tests/conferr/conditionalerr/conditionalerr17.xml
new file mode 100644
index 0000000..afa62eb
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr17.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<doc>
+this text shouldn't be here.
+</doc>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr17.xsl b/test/tests/conferr/conditionalerr/conditionalerr17.xsl
new file mode 100644
index 0000000..8904c53
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr17.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:if that has bad content in "test" attribute. -->
+  <!-- ExpectedException: Invalid token -->
+  <!-- Note the below line may not work, as it's been escaped. This 
+       test also causes problems with ConsoleLogger, so we may 
+       want to change the test somewhat -->
+  <!-- ExpectedException: Could not find function: &#58490;&#57332; -->
+  <!-- ExpectedException: Could not find function: --><!-- Provide minimal detection: should be reviewed -sc -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:if test="Œnot(name(.)='')">
+      <xsl:text>string</xsl:text>
+    </xsl:if>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr18.xml b/test/tests/conferr/conditionalerr/conditionalerr18.xml
new file mode 100644
index 0000000..b979a83
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr18.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <foo/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr18.xsl b/test/tests/conferr/conditionalerr/conditionalerr18.xsl
new file mode 100644
index 0000000..09ac8bd
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr18.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xsl:when that has bad content in "test" attribute. -->
+  <!-- ExpectedException: Invalid token -->
+  <!-- ExpectedException: Could not find function: &#58490;&#57332; -->
+  <!-- ExpectedException: Could not find function: --><!-- see conditionalerr17 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:choose>
+      <xsl:when test="Œnot(name(.)='')">1</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr19.xml b/test/tests/conferr/conditionalerr/conditionalerr19.xml
new file mode 100644
index 0000000..0c75a0f
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr19.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <person><sex>M</sex><name>John</name></person>
+  <person><sex>F</sex><name>Jane</name></person>
+  <person><sex>H</sex><name>Hermaphrodite</name></person>
+  <person><sex>12</sex><name>Prince</name></person>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr19.xsl b/test/tests/conferr/conditionalerr/conditionalerr19.xsl
new file mode 100644
index 0000000..fb8c305
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr19.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:choose at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:choose is not allowed in this position in the stylesheet -->
+
+<xsl:choose>
+  <xsl:when test="doc">Found a doc</xsl:when>
+  <xsl:when test="person">Found a person</xsl:when>
+  <xsl:otherwise>Who knows?</xsl:otherwise>
+</xsl:choose>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr20.xml b/test/tests/conferr/conditionalerr/conditionalerr20.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr20.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr20.xsl b/test/tests/conferr/conditionalerr/conditionalerr20.xsl
new file mode 100644
index 0000000..6db0ff0
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr20.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:if at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:if is not allowed in this position in the stylesheet -->
+
+<xsl:if test="true()">
+  <xsl:text>This should fail</xsl:text>
+</xsl:if>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr21.xml b/test/tests/conferr/conditionalerr/conditionalerr21.xml
new file mode 100644
index 0000000..24dc80f
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr21.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <person><sex>M</sex><name>John</name></person>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr21.xsl b/test/tests/conferr/conditionalerr/conditionalerr21.xsl
new file mode 100644
index 0000000..263f6b2
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr21.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:when at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:when is not allowed in this position in the stylesheet -->
+
+<xsl:when test="sex='M'">Male: </xsl:when>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/conditionalerr/conditionalerr22.xml b/test/tests/conferr/conditionalerr/conditionalerr22.xml
new file mode 100644
index 0000000..e7aa524
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr22.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <person><sex>F</sex><name>Jane</name></person>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/conditionalerr/conditionalerr22.xsl b/test/tests/conferr/conditionalerr/conditionalerr22.xsl
new file mode 100644
index 0000000..e51597b
--- /dev/null
+++ b/test/tests/conferr/conditionalerr/conditionalerr22.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: conditionalerr22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 9.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:otherwise at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:otherwise is not allowed in this position in the stylesheet -->
+
+<xsl:otherwise>Female: </xsl:otherwise>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/copyerr/copyerr01.xml b/test/tests/conferr/copyerr/copyerr01.xml
new file mode 100644
index 0000000..ff96b7d
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns:ped="http://ped.test.com">
+</root>
diff --git a/test/tests/conferr/copyerr/copyerr01.xsl b/test/tests/conferr/copyerr/copyerr01.xsl
new file mode 100644
index 0000000..34d8ee4
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr01.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output indent="yes"/>
+
+  <!-- FileName: COPYerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Purpose: Test for xsl:copy-of without select. -->                
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:copy-of requires a select attribute -->
+  <!-- ExpectedException: xsl:copy-of requires attribute: select -->
+
+<xsl:template match="/">
+  <root>
+    <xsl:apply-templates/>
+  </root>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:copy-of />
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/copyerr/copyerr02.xml b/test/tests/conferr/copyerr/copyerr02.xml
new file mode 100644
index 0000000..4b94689
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr02.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+</OL>
diff --git a/test/tests/conferr/copyerr/copyerr02.xsl b/test/tests/conferr/copyerr/copyerr02.xsl
new file mode 100644
index 0000000..0bce259
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr02.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPYerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Purpose: Put xsl:copy-of at top level, which is illegal. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:copy-of is not allowed in this position in the stylesheet -->
+
+<xsl:copy-of select="OL"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/copyerr/copyerr03.xml b/test/tests/conferr/copyerr/copyerr03.xml
new file mode 100644
index 0000000..4b94689
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr03.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<OL>
+  <LI>item1</LI>
+  <LI>item2</LI>
+  <LI>item3</LI>
+  <OL>
+    <LI>subitem1</LI>
+    <LI>subitem2</LI>
+    <OL>
+      <LI>subitem3</LI>
+    </OL>
+  </OL>
+</OL>
diff --git a/test/tests/conferr/copyerr/copyerr03.xsl b/test/tests/conferr/copyerr/copyerr03.xsl
new file mode 100644
index 0000000..e66f3d9
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr03.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPYerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Purpose: Put xsl:copy at top level, which is illegal. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:copy is not allowed in this position in the stylesheet -->
+
+<xsl:copy>
+  <xsl:apply-templates select="*|text()"/>
+</xsl:copy>
+
+<xsl:template match="/">
+  <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/copyerr/copyerr04.xml b/test/tests/conferr/copyerr/copyerr04.xml
new file mode 100644
index 0000000..199f92d
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr04.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc top="gotcha"></doc>
\ No newline at end of file
diff --git a/test/tests/conferr/copyerr/copyerr04.xsl b/test/tests/conferr/copyerr/copyerr04.xsl
new file mode 100644
index 0000000..a82b44d
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr04.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPYerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Attempt to write an attribute with no element -->
+  <!-- Purpose: Try to copy an attribute, via copy-of, before there is any element produced. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="doc/@*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/copyerr/copyerr05.xml b/test/tests/conferr/copyerr/copyerr05.xml
new file mode 100644
index 0000000..199f92d
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr05.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc top="gotcha"></doc>
\ No newline at end of file
diff --git a/test/tests/conferr/copyerr/copyerr05.xsl b/test/tests/conferr/copyerr/copyerr05.xsl
new file mode 100644
index 0000000..f5fada1
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr05.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPYerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.3 -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Attempt to write an attribute with no element -->
+  <!-- Purpose: Try to copy an attribute, via copy, before there is any element produced. -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates select="doc/@*"/>
+</xsl:template>
+
+<xsl:template match="@*">
+  <xsl:copy/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/copyerr/copyerr08.xml b/test/tests/conferr/copyerr/copyerr08.xml
new file mode 100644
index 0000000..0489789
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr08.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>
+    <b c="attrib-on-b"/>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/copyerr/copyerr08.xsl b/test/tests/conferr/copyerr/copyerr08.xsl
new file mode 100644
index 0000000..7e29574
--- /dev/null
+++ b/test/tests/conferr/copyerr/copyerr08.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: COPYerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to put an illegal attribute on xsl:copy. -->
+  <!-- ExpectedException: "select" attribute is not allowed on the xsl:copy element -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:copy select="doc/a"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/embederr/embederr01.xml b/test/tests/conferr/embederr/embederr01.xml
new file mode 100644
index 0000000..0936620
--- /dev/null
+++ b/test/tests/conferr/embederr/embederr01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<expense-report>
+  <total>153</total>
+</expense-report>
\ No newline at end of file
diff --git a/test/tests/conferr/embederr/embederr01.xsl b/test/tests/conferr/embederr/embederr01.xsl
new file mode 100644
index 0000000..a098ae5
--- /dev/null
+++ b/test/tests/conferr/embederr/embederr01.xsl
@@ -0,0 +1,43 @@
+<html xsl:version="1.0"
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+      xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+  <!-- FileName: EMBEDerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 LRE as Stylesheet -->
+  <!-- Purpose: Literal Result Element used as stylesheet
+  	   cannot contain top-level elements. Should fail at line
+  	   containing xsl:key statement -->
+  <!-- ExpectedException: (StylesheetHandler) xsl:key is not allowed inside a template! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:key is not allowed inside a template! -->
+  <!-- ExpectedException: xsl:key is not allowed in this position in the stylesheet! -->
+
+  <xsl:key name="test" match="para" use="@id"/>
+
+  <head>
+    <title>Expense Report Summary</title>
+  </head>
+  <body>
+    <p>Total Amount: <xsl:value-of select="expense-report/total"/></p>
+  </body>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</html>
diff --git a/test/tests/conferr/embederr/embederr02.xml b/test/tests/conferr/embederr/embederr02.xml
new file mode 100644
index 0000000..1e9c404
--- /dev/null
+++ b/test/tests/conferr/embederr/embederr02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<expense-report>
+  <total>153</total>
+</expense-report>
diff --git a/test/tests/conferr/embederr/embederr02.xsl b/test/tests/conferr/embederr/embederr02.xsl
new file mode 100644
index 0000000..5b17528
--- /dev/null
+++ b/test/tests/conferr/embederr/embederr02.xsl
@@ -0,0 +1,42 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+  <!-- FileName: EMBEDerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 LRE as Stylesheet -->
+  <!-- Purpose: See what happens when version number is missing from xsl namespace (above). -->
+  <!-- ExpectedException: stylesheet must have a "version" attribute -->
+  <!-- ExpectedException: xsl:stylesheet requires attribute: version -->
+
+<xsl:template match="/">
+<html>
+  <head>
+    <title>Expense Report Summary</title>
+  </head>
+  <body>
+    <p>Total Amount: <xsl:value-of select="expense-report/total"/></p>
+  </body>
+</html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/expressionerr/expressionerr01.xml b/test/tests/conferr/expressionerr/expressionerr01.xml
new file mode 100644
index 0000000..7d5c02b
--- /dev/null
+++ b/test/tests/conferr/expressionerr/expressionerr01.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE doc [
+  <!NOTATION gif SYSTEM "../www.foo.com" >
+  <!ENTITY hatch-pic
+         SYSTEM "../grafix/OpenHatch.gif"
+         NDATA gif >
+  <!ELEMENT doc (#PCDATA)>
+]>         
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/expressionerr/expressionerr01.xsl b/test/tests/conferr/expressionerr/expressionerr01.xsl
new file mode 100644
index 0000000..d8d319c
--- /dev/null
+++ b/test/tests/conferr/expressionerr/expressionerr01.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: expressionerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Invoke unparsed-entity-uri function with zero arguments -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: The unparsed-entity-uri function should take one argument -->
+  <!-- ExpectedException: FuncUnparsedEntityURI only allows 1 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="unparsed-entity-uri()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/expressionerr/expressionerr02.xml b/test/tests/conferr/expressionerr/expressionerr02.xml
new file mode 100644
index 0000000..7d5c02b
--- /dev/null
+++ b/test/tests/conferr/expressionerr/expressionerr02.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE doc [
+  <!NOTATION gif SYSTEM "../www.foo.com" >
+  <!ENTITY hatch-pic
+         SYSTEM "../grafix/OpenHatch.gif"
+         NDATA gif >
+  <!ELEMENT doc (#PCDATA)>
+]>         
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/expressionerr/expressionerr02.xsl b/test/tests/conferr/expressionerr/expressionerr02.xsl
new file mode 100644
index 0000000..b8450ac
--- /dev/null
+++ b/test/tests/conferr/expressionerr/expressionerr02.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: EXPRerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Invoke unparsed-entity-uri function with too many arguments -->
+  <!-- ExpectedException: The unparsed-entity-uri function should take one argument -->
+  <!-- ExpectedException: FuncUnparsedEntityURI only allows 1 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="unparsed-entity-uri('foo','hatch-pic')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/extenderr/extenderr01.xml b/test/tests/conferr/extenderr/extenderr01.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/extenderr/extenderr01.xsl b/test/tests/conferr/extenderr/extenderr01.xsl
new file mode 100644
index 0000000..7cf5474
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr01.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ext="class:TestElemExt"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                extension-element-prefixes="ext">
+
+  <!-- FileName: extenderr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Put xsl:fallback at top level, which is illegal. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:fallback is not allowed in this position in the stylesheet -->
+
+<lxslt:component prefix="ext" elements="test"/>
+
+<xsl:fallback>
+  <xsl:text>Fallback: extension was not found.</xsl:text>
+</xsl:fallback>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/extenderr/extenderr02.xml b/test/tests/conferr/extenderr/extenderr02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/extenderr/extenderr02.xsl b/test/tests/conferr/extenderr/extenderr02.xsl
new file mode 100644
index 0000000..15e9640
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr02.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: EXTENDerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Test function-available with too few arguments. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: function-available requires one argument -->
+  <!-- ExpectedException: FuncExtFunctionAvailable only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="function-available()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/extenderr/extenderr03.xml b/test/tests/conferr/extenderr/extenderr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/extenderr/extenderr03.xsl b/test/tests/conferr/extenderr/extenderr03.xsl
new file mode 100644
index 0000000..8d9c0e8
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr03.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: EXTENDerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Test function-available with too many arguments. -->
+  <!-- ExpectedException: function-available requires one argument -->
+  <!-- ExpectedException: FuncExtFunctionAvailable only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="function-available('document','whatever')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/extenderr/extenderr04.xml b/test/tests/conferr/extenderr/extenderr04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/extenderr/extenderr04.xsl b/test/tests/conferr/extenderr/extenderr04.xsl
new file mode 100644
index 0000000..3daea6a
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: EXTENDerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Test element-available with too few arguments. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: element-available requires one argument -->
+  <!-- ExpectedException: FuncExtElementAvailable only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+     <xsl:value-of select="element-available()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/extenderr/extenderr05.xml b/test/tests/conferr/extenderr/extenderr05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/extenderr/extenderr05.xsl b/test/tests/conferr/extenderr/extenderr05.xsl
new file mode 100644
index 0000000..5a8f361
--- /dev/null
+++ b/test/tests/conferr/extenderr/extenderr05.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: EXTENDerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Test element-available with too many arguments. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: element-available requires one argument -->
+  <!-- ExpectedException: FuncExtElementAvailable only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+     <xsl:value-of select="element-available('xsl:value-of','xsl:for-each')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr01.xml b/test/tests/conferr/idkeyerr/idkeyerr01.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr01.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr01.xsl b/test/tests/conferr/idkeyerr/idkeyerr01.xsl
new file mode 100644
index 0000000..da88749
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr01.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Test for missing name attribute in xsl:key. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:key requires a name attribute! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: xsl:key requires a name attribute! -->
+  <!-- ExpectedException: xsl:key requires attribute: name -->
+<xsl:output indent="yes"/>
+
+<xsl:key match="div" use="title" />
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr02.xml b/test/tests/conferr/idkeyerr/idkeyerr02.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr02.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr02.xsl b/test/tests/conferr/idkeyerr/idkeyerr02.xsl
new file mode 100644
index 0000000..7aabffc
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr02.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Test for missing match attribute in xsl:key. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:key requires a match attribute! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: xsl:key requires a match attribute! -->
+  <!-- ExpectedException: xsl:key requires attribute: match -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" use="title"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr03.xml b/test/tests/conferr/idkeyerr/idkeyerr03.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr03.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr03.xsl b/test/tests/conferr/idkeyerr/idkeyerr03.xsl
new file mode 100644
index 0000000..491917d
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr03.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Test for missing use attribute in xsl:key. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:key requires a use attribute! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: xsl:key requires a use attribute! -->
+  <!-- ExpectedException: xsl:key requires attribute: use -->
+  
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" match="div" />
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr04.xml b/test/tests/conferr/idkeyerr/idkeyerr04.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr04.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr04.xsl b/test/tests/conferr/idkeyerr/idkeyerr04.xsl
new file mode 100644
index 0000000..41ccdd2
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr04.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Test for two name attributes in xsl:key. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Attribute "name" was already specified for element "xsl:key". -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Attribute "name" was already specified for element "xsl:key". -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" match="div" use="title" name="otherkey" />
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr05.xml b/test/tests/conferr/idkeyerr/idkeyerr05.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr05.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr05.xsl b/test/tests/conferr/idkeyerr/idkeyerr05.xsl
new file mode 100644
index 0000000..e85386c
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr05.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Test for two match attributes in xsl:key. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Attribute "match" was already specified for element "xsl:key". -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Attribute "match" was already specified for element "xsl:key". -->
+  
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" match="foo" use="title" match="div" />
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr06.xml b/test/tests/conferr/idkeyerr/idkeyerr06.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr06.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr06.xsl b/test/tests/conferr/idkeyerr/idkeyerr06.xsl
new file mode 100644
index 0000000..99c56cf
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr06.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Test for two use attributes in xsl:key. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Attribute "use" was already specified for element "xsl:key". -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Attribute "use" was already specified for element "xsl:key". -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" use="foo" match="div" use="title"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr07.xml b/test/tests/conferr/idkeyerr/idkeyerr07.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr07.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr07.xsl b/test/tests/conferr/idkeyerr/idkeyerr07.xsl
new file mode 100644
index 0000000..70fd632
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr07.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for invalid value of name attribute in xsl:key. -->
+  <!-- ExpectedException: name contains invalid characters -->
+  <!-- ExpectedException: Illegal value: + used for QNAME attribute: name -->
+  
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="+" match="div" use="title"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('+', 'Introduction')/p"/>
+  <xsl:value-of select="key('+', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('+', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr08.xml b/test/tests/conferr/idkeyerr/idkeyerr08.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr08.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr08.xsl b/test/tests/conferr/idkeyerr/idkeyerr08.xsl
new file mode 100644
index 0000000..ea57ac0
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr08.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for invalid value of match attribute in xsl:key. -->
+  <!-- ExpectedException: Invalid match pattern -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" match="+" use="title"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr09.xml b/test/tests/conferr/idkeyerr/idkeyerr09.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr09.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr09.xsl b/test/tests/conferr/idkeyerr/idkeyerr09.xsl
new file mode 100644
index 0000000..a318358
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr09.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for invalid value of use attribute in xsl:key. -->
+  <!-- ExpectedException: invalid use expression -->
+  <!-- ExpectedException: A location path was expected, but the following token was encountered:  + -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" match="div" use="+"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr10.xml b/test/tests/conferr/idkeyerr/idkeyerr10.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr10.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr10.xsl b/test/tests/conferr/idkeyerr/idkeyerr10.xsl
new file mode 100644
index 0000000..f6e872e
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr10.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for use of key() without a corresponding xsl:key declaration. -->
+  <!-- ExpectedException: There is no xsl:key declaration for mykey -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykeyspace" match="div" use="title"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr11.xml b/test/tests/conferr/idkeyerr/idkeyerr11.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr11.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr11.xsl b/test/tests/conferr/idkeyerr/idkeyerr11.xsl
new file mode 100644
index 0000000..1526bd1
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr11.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: It is an error for the "match" attribute on xsl:key to contain a variable reference. -->
+  <!-- ExpectedException: Extra illegal tokens: 'v1' -->
+
+<xsl:output indent="yes"/>
+<xsl:variable name="v1">div</xsl:variable>
+
+<xsl:key name="mykey" match="$v1" use="title"/>
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr12.xml b/test/tests/conferr/idkeyerr/idkeyerr12.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr12.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr12.xsl b/test/tests/conferr/idkeyerr/idkeyerr12.xsl
new file mode 100644
index 0000000..fcf60f7
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr12.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: It is an error for the "use" attribute on xsl:key to contain a variable reference. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Extra illegal tokens: 'v1' -->
+
+<xsl:output indent="yes"/>
+<xsl:variable name="v1">title</xsl:variable>
+
+<xsl:key name="mykey" match="div" use="$v1" />
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey', 'Introduction')/p"/>
+  <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
+  <xsl:value-of select="key('mykey', 'Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr13.xml b/test/tests/conferr/idkeyerr/idkeyerr13.xml
new file mode 100644
index 0000000..0842db4
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr13.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<doc>
+  <div id="id1">
+    <title>Introduction</title>
+    <p>For more information see the <divref>Expressions</divref> section.</p>
+    <p>(alternate id link: <keydivref>id3</keydivref>)</p>
+  </div>
+  
+  <div id="id2">
+    <title>Stylesheet Structure</title>
+    <p>For more information see the <divref>Introduction</divref> section.</p>
+    <p>(alternate id link: <keydivref>id1</keydivref>)</p>
+  </div>
+  
+  <div id="id3">
+    <title>Expressions</title>
+    <p>For more information see the <divref>Stylesheet Structure</divref> section.</p>
+    <p>(alternate id link: <keydivref>id2</keydivref>)</p>
+  </div>
+</doc>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr13.xsl b/test/tests/conferr/idkeyerr/idkeyerr13.xsl
new file mode 100644
index 0000000..404a4bc
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr13.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for two xsl:key declarations with the same name attribute. -->
+  <!-- The spec allows this. If the processor implements the feature, then 'titles' is
+     one keyspace where the two types of 'use' nodes index their designated match nodes,
+     but don't cross-index the others as would happen if | notation was used in one xsl:key. -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="titles" match="div" use="title"/>
+<xsl:key name="titles" match="@id" use="@id"/>
+
+<xsl:template match="doc">
+  <P>Reference numbers should match the titles, links should work.</P>
+  <xsl:for-each select="div">
+    <HR/>
+    <H1 id="{generate-id(.)}">
+      <xsl:number level="multiple" count="div" format="1.1. "/>
+      <xsl:value-of select="title"/></H1>
+    <xsl:apply-templates/>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="p">
+  <P><xsl:apply-templates/></P>
+</xsl:template>
+
+<xsl:template match="divref">
+  <A href="#{generate-id(key('titles', .))}">
+    <xsl:for-each select="key('titles', .)">
+      <xsl:number level="multiple" count="div" format="1.1. "/>
+    </xsl:for-each>
+    <xsl:value-of select="."/>
+  </A>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr14.xml b/test/tests/conferr/idkeyerr/idkeyerr14.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr14.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr14.xsl b/test/tests/conferr/idkeyerr/idkeyerr14.xsl
new file mode 100644
index 0000000..08f1017
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr14.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Call key() with too few arguments. -->
+  <!-- ExpectedException: key() requires two arguments -->
+  <!-- ExpectedException: FuncKey only allows 2 arguments -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" match="div" use="title" />
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('Expressions')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr15.xml b/test/tests/conferr/idkeyerr/idkeyerr15.xml
new file mode 100644
index 0000000..32965b9
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr15.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div>
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div>
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div>
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr15.xsl b/test/tests/conferr/idkeyerr/idkeyerr15.xsl
new file mode 100644
index 0000000..fa817e1
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr15.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Call key() with too many arguments. -->
+  <!-- ExpectedException: key() requires two arguments -->
+  <!-- ExpectedException: FuncKey only allows 2 arguments -->
+
+<xsl:output indent="yes"/>
+
+<xsl:key name="mykey" match="div" use="title" />
+
+<xsl:template match="doc">
+  <xsl:value-of select="key('mykey','Expressions','useless')/p"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr16.xml b/test/tests/conferr/idkeyerr/idkeyerr16.xml
new file mode 100644
index 0000000..100d60d
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr16.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<a/>
+<a/>
+<b/>
+<c/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr16.xsl b/test/tests/conferr/idkeyerr/idkeyerr16.xsl
new file mode 100644
index 0000000..4f67606
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr16.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 Miscellaneous Additional Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'generate-id()' with multiple arguments. Should generate
+       an error. Should test for zero, or one argument.  -->
+  <!-- ExpectedException: generate-id only allows 1 argument -->
+  <!-- ExpectedException: FuncGenerateId only allows 0 or 1 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="generate-id(a,d)"/><xsl:text>,</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr17.xml b/test/tests/conferr/idkeyerr/idkeyerr17.xml
new file mode 100644
index 0000000..a6f24be
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr17.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <div id="id1">
+    <title>Introduction</title>
+    <p>For more information see the <divref>Expressions</divref> section.</p>
+    <p>(alternate id link: <keydivref>id3</keydivref>)</p>
+  </div>
+</doc>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr17.xsl b/test/tests/conferr/idkeyerr/idkeyerr17.xsl
new file mode 100644
index 0000000..3015447
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr17.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test placement of xsl:key inside atemplate, which is illegal. -->
+  <!-- ExpectedException: XSLT: (StylesheetHandler) xsl:key is not allowed inside a template! -->
+  <!-- ExpectedException: xsl:key is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:key name="titles" match="div" use="title"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr18.xml b/test/tests/conferr/idkeyerr/idkeyerr18.xml
new file mode 100644
index 0000000..ed3a1e7
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr18.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 SYSTEM "t04.dtd">
+
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr18.xsl b/test/tests/conferr/idkeyerr/idkeyerr18.xsl
new file mode 100644
index 0000000..01923ea
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr18.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id() with too few arguments. -->
+  <!-- ExpectedException: id() should have one argument -->
+  <!-- ExpectedException: FuncId only allows 1 argument -->
+
+<xsl:template match="t04">
+  <out>
+    <xsl:value-of select="id()/@id"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr19.xml b/test/tests/conferr/idkeyerr/idkeyerr19.xml
new file mode 100644
index 0000000..ed3a1e7
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr19.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE t04 SYSTEM "t04.dtd">
+
+<t04>
+  <a id="a"/>
+  <a id="b"/>
+  <a id="c"/>
+  <a id="d"/>
+</t04>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr19.xsl b/test/tests/conferr/idkeyerr/idkeyerr19.xsl
new file mode 100644
index 0000000..c7897cc
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr19.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for id() with too many arguments. -->
+  <!-- ExpectedException: id() should have one argument -->
+  <!-- ExpectedException: FuncId only allows 1 argument -->
+
+<xsl:template match="t04">
+  <out>
+    <xsl:value-of select="id('b','d')/@id"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr20.xml b/test/tests/conferr/idkeyerr/idkeyerr20.xml
new file mode 100644
index 0000000..0688762
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr20.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc>
+  <div allow="yes">
+    <title>Introduction</title>
+    <p>Intro Section.</p>
+  </div>
+  
+  <div allow="yes">
+    <title>Stylesheet Structure</title>
+    <p>SS Section.</p>
+  </div>
+  
+  <div allow="no">
+    <title>Expressions</title>
+    <p>Exp Section.</p>
+  </div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr20.xsl b/test/tests/conferr/idkeyerr/idkeyerr20.xsl
new file mode 100644
index 0000000..46402df
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr20.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- VersionDrop: 1.1 will outlaw this trick. -->
+  <!-- Creator: David Marston -->
+  <!-- Section: 12.2 -->
+  <!-- Purpose: Test for xsl:key that uses key() on a different keyspace in its match attribute. -->
+  <!-- ExpectedException: recursive key() calls are not allowed -->
+
+<xsl:key name="allowdiv" match="div" use="@allow"/>
+<xsl:key name="titles" match="key('allowdiv','yes')" use="title"/>
+
+<xsl:template match="doc">
+ <root>
+  <xsl:value-of select="key('titles', 'Introduction')/p"/>
+  <xsl:value-of select="key('titles', 'Stylesheet Structure')/p"/>
+  <!-- The next one is an empty node-set -->
+  <xsl:value-of select="key('titles', 'Expressions')/p"/>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/idkeyerr21.xml b/test/tests/conferr/idkeyerr/idkeyerr21.xml
new file mode 100644
index 0000000..f716d4f
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr21.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- Test for ID selection and pattern matching -->
+<!DOCTYPE doc [
+  <!ELEMENT doc (#PCDATA|a|b|c)*>
+  <!ATTLIST doc id ID #REQUIRED>
+  <!ELEMENT a (#PCDATA|a|b|c)*>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA|a|b|c)*>
+  <!ATTLIST b id ID #REQUIRED>
+  <!ELEMENT c (#PCDATA|a|b|c)*>
+  <!ATTLIST c id ID #REQUIRED >
+]>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <a id="id2">*id2*
+      <a id="id3">*id3*</a>
+      <b id="id4">*id4*</b>
+      <c id="id5">*id5*</c>
+    </a>
+    <b id="id6">*id6*</b>
+    <c id="id7">*id7*</c>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/idkeyerr/idkeyerr21.xsl b/test/tests/conferr/idkeyerr/idkeyerr21.xsl
new file mode 100644
index 0000000..7d3dee5
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/idkeyerr21.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: idkeyerr21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Use variable in id() argument in match pattern -->
+  <!-- ExpectedException: Argument to id() in match pattern must be a literal string -->
+
+<xsl:strip-space elements="a b c"/>
+
+<xsl:variable name="pick" select="'id2'"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="doc/a//text()"/>
+    <xsl:text>&#10;</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template match="id($pick)//text()">
+  <xsl:text>&#10;</xsl:text>
+  <x><xsl:value-of select="../@id"/></x>
+</xsl:template>
+
+<xsl:template match="text()">
+  <xsl:text>&#10;</xsl:text>
+  <other><xsl:value-of select="."/></other>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/idkeyerr/t04.dtd b/test/tests/conferr/idkeyerr/t04.dtd
new file mode 100644
index 0000000..c82a831
--- /dev/null
+++ b/test/tests/conferr/idkeyerr/t04.dtd
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!ELEMENT t04 (a*)>
+<!ELEMENT a EMPTY>
+<!ATTLIST a  id ID #REQUIRED> 
diff --git a/test/tests/conferr/impinclerr/f.xsl b/test/tests/conferr/impinclerr/f.xsl
new file mode 100644
index 0000000..abf9d25
--- /dev/null
+++ b/test/tests/conferr/impinclerr/f.xsl
@@ -0,0 +1,24 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="g.xsl"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/g.xsl b/test/tests/conferr/impinclerr/g.xsl
new file mode 100644
index 0000000..048445b
--- /dev/null
+++ b/test/tests/conferr/impinclerr/g.xsl
@@ -0,0 +1,26 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="foo">
+  <bad-match/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/h.xsl b/test/tests/conferr/impinclerr/h.xsl
new file mode 100644
index 0000000..90ff096
--- /dev/null
+++ b/test/tests/conferr/impinclerr/h.xsl
@@ -0,0 +1,26 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="foo">
+  <best-match/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr01.xml b/test/tests/conferr/impinclerr/impinclerr01.xml
new file mode 100644
index 0000000..bd7eabc
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr01.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<root-tag>
+	<one-tag>Text of one-tag</one-tag>
+	<two-tag>Text of two-tag</two-tag>
+</root-tag>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr01.xsl b/test/tests/conferr/impinclerr/impinclerr01.xsl
new file mode 100644
index 0000000..0eda085
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr01.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpInclerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 Style Import -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: It is an error for a stylesheet to import itself. -->
+  <!-- ExpectedException: (StylesheetHandler) file:/E:\builds\testsuite\.\conf\impincl\err\impinclerr01.xsl is directly or indirectly importing itself! -->
+  <!-- ExpectedException: (StylesheetHandler) file:E:/builds/testsuite/conf/impincl/err/impinclerr01.xsl is directly or indirectly importing itself! -->  
+  <!-- ExpectedException: impinclerr01.xsl is directly or indirectly importing itself! -->
+
+<xsl:import href="impinclerr01.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr02.xml b/test/tests/conferr/impinclerr/impinclerr02.xml
new file mode 100644
index 0000000..9726574
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr02.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <doc1>
+    <tag>This</tag>
+    <tag>That</tag>
+    <tag>Other</tag>
+    <tag>Thing</tag>
+  </doc1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr02.xsl b/test/tests/conferr/impinclerr/impinclerr02.xsl
new file mode 100644
index 0000000..098c26f
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr02.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpInclerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: It is an error if apply-imports is instantiated when the current
+       template rule is null, i.e. from within a xsl:for-each loop. -->
+  <!-- ExpectedException: Attempt to use apply-imports without current template rule -->
+  <!-- ExpectedException: xsl:apply-imports not allowed in a xsl:for-each -->
+
+<xsl:import href="k.xsl"/>
+
+<xsl:template match="doc">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="doc1">
+  <xsl:for-each select="*">
+    <xsl:value-of select="."/>
+    <xsl:apply-imports/>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr03.xml b/test/tests/conferr/impinclerr/impinclerr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr03.xsl b/test/tests/conferr/impinclerr/impinclerr03.xsl
new file mode 100644
index 0000000..91d554f
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr03.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpInclerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 Stylesheet Import -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Imports must precede all other elements, including 
+  	   Includes, in a stylesheet. -->
+  <!-- ExpectedException: xsl:import is not allowed in this position in the stylesheet -->
+
+<xsl:include href="f.xsl"/>
+<xsl:import href="h.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr04.xml b/test/tests/conferr/impinclerr/impinclerr04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr04.xsl b/test/tests/conferr/impinclerr/impinclerr04.xsl
new file mode 100644
index 0000000..d03f950
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr04.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpInclerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.1 Style Inclusion -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: It is an error for a stylesheet to include itself. -->
+  <!-- ExpectedException: (StylesheetHandler) file:/E:\builds\testsuite\.\conf\impincl\err\impinclerr04.xsl is directly or indirectly importing itself! -->
+  <!-- ExpectedException: (StylesheetHandler) file:E:/builds/testsuite/conf/impincl/err/impinclerr04.xsl is directly or indirectly importing itself! -->
+  <!-- ExpectedException: impinclerr04.xsl is directly or indirectly including itself! -->
+
+<xsl:include href="impinclerr04.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr05.xml b/test/tests/conferr/impinclerr/impinclerr05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr05.xsl b/test/tests/conferr/impinclerr/impinclerr05.xsl
new file mode 100644
index 0000000..89a0b0b
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr05.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impinclerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 Stylesheet Import -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Check that proper error is reported if required attribute, href,
+       is not included. -->
+  <!-- Note: SCurcuru 28-Feb-00 added ExpectedException; seems like good error text to me. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) Could not find href attribute for xsl:import -->
+  <!-- ExpectedException: (StylesheetHandler) Could not find href attribute for xsl:import -->
+  <!-- ExpectedException: xsl:import requires attribute: href -->
+
+<xsl:import/>
+
+<xsl:template match="doc">
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr06.xml b/test/tests/conferr/impinclerr/impinclerr06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr06.xsl b/test/tests/conferr/impinclerr/impinclerr06.xsl
new file mode 100644
index 0000000..d875849
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr06.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impinclerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.1 Stylesheet Inclusion -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Check that proper error is reported if required attribute, href,
+       is not included. -->
+  <!-- Note: SCurcuru 28-Feb-00 added ExpectedException; seems like good error text to me. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) Could not find href attribute for xsl:include -->
+  <!-- ExpectedException: (StylesheetHandler) Could not find href attribute for xsl:include -->
+  <!-- ExpectedException: xsl:include requires attribute: href -->
+
+<xsl:include/>
+
+<xsl:template match="doc">
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr07.xml b/test/tests/conferr/impinclerr/impinclerr07.xml
new file mode 100644
index 0000000..9726574
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr07.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <doc1>
+    <tag>This</tag>
+    <tag>That</tag>
+    <tag>Other</tag>
+    <tag>Thing</tag>
+  </doc1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr07.xsl b/test/tests/conferr/impinclerr/impinclerr07.xsl
new file mode 100644
index 0000000..3ce5f27
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr07.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpInclerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:apply-imports at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:apply-imports is not allowed in this position in the stylesheet -->
+
+<xsl:import href="k.xsl"/>
+
+<xsl:apply-imports/>
+
+<xsl:template match="doc">
+  <xsl:text>This should fail</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr08.xml b/test/tests/conferr/impinclerr/impinclerr08.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr08.xsl b/test/tests/conferr/impinclerr/impinclerr08.xsl
new file mode 100644
index 0000000..350abf0
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr08.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpInclerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.2 Stylesheet Import -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test placement of xsl:import inside a template, which is illegal. -->
+  <!-- ExpectedException: XSLT: (StylesheetHandler) xsl:import is not allowed inside a template! -->
+  <!-- ExpectedException: xsl:import is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:import href="h.xsl"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr09.xml b/test/tests/conferr/impinclerr/impinclerr09.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr09.xsl b/test/tests/conferr/impinclerr/impinclerr09.xsl
new file mode 100644
index 0000000..bf5aad6
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr09.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: ImpInclerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.6.1 Stylesheet Inclusion -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test placement of xsl:include inside a template, which is illegal. -->
+  <!-- ExpectedException: XSLT: (StylesheetHandler) xsl:include is not allowed inside a template! -->
+  <!-- ExpectedException: xsl:include is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:include href="h.xsl"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/impinclerr10.xml b/test/tests/conferr/impinclerr/impinclerr10.xml
new file mode 100644
index 0000000..0255a51
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr10.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <tag>Example of apply-imports</tag>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/impinclerr/impinclerr10.xsl b/test/tests/conferr/impinclerr/impinclerr10.xsl
new file mode 100644
index 0000000..ed53ba2
--- /dev/null
+++ b/test/tests/conferr/impinclerr/impinclerr10.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: impinclerr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.6 Overriding Template Rules -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to put a child element on apply-imports -->
+  <!-- ExpectedException: xsl:with-param is not allowed in this position in the stylesheet! -->
+
+<xsl:import href="../fragments/impwparam.xsl"/>
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="*"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="tag">
+  <div style="border: solid blue">
+    <xsl:apply-imports>
+      <xsl:with-param name="p1" select="'main'"/>
+    </xsl:apply-imports>
+  </div>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/impinclerr/k.xsl b/test/tests/conferr/impinclerr/k.xsl
new file mode 100644
index 0000000..196f00e
--- /dev/null
+++ b/test/tests/conferr/impinclerr/k.xsl
@@ -0,0 +1,28 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="doc1" priority="1.0">
+	<xsl:for-each select="*">
+		<xsl:value-of select="."/>
+	</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/lreerr/lreerr01.xml b/test/tests/conferr/lreerr/lreerr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/lreerr/lreerr01.xsl b/test/tests/conferr/lreerr/lreerr01.xsl
new file mode 100644
index 0000000..04e9a2a
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr01.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ext="http://somebody.elses.extension"
+    xmlns:java="http://xml.apache.org/xslt/java"
+    xmlns:ped="http://tester.com"
+    xmlns:bdd="http://buster.com"
+    xmlns="www.lotus.com"
+    exclude-result-prefixes="java jad #default"
+    extension-element-prefixes="ext">
+
+  <!-- FileName: lreerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: It is an error if there is no namespace bound to the prefix named in
+       the exclude-result-prefixes attribute of the stylesheet. -->
+  <!-- Note: SCurcuru 28-Feb-00 added ExpectedException; seems like good error text to me. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Prefix in exclude-result-prefixes is not valid: jad -->
+  <!-- ExpectedException: Prefix in exclude-result-prefixes is not valid: jad -->
+
+<xsl:template match="doc">
+  <out xsl:if= "my if" english="to leave"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/lreerr/lreerr02.xml b/test/tests/conferr/lreerr/lreerr02.xml
new file mode 100644
index 0000000..07387c4
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>DocValue
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/lreerr/lreerr02.xsl b/test/tests/conferr/lreerr/lreerr02.xsl
new file mode 100644
index 0000000..4ac8ccc
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr02.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ext="http://somebody.elses.extension"
+    xmlns:java="http://xml.apache.org/xslt/java"
+    xmlns:ped="http://tester.com"
+    xmlns:bdd="http://buster.com"
+    xmlns="www.lotus.com"
+    extension-element-prefixes="ext">
+
+  <!-- FileName: lreerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: It is an error if there is no namespace bound to the prefix on 
+       the element bearing the xsl:exclude-result-prefixes attribute. -->
+  <!-- Note: SCurcuru 28-Feb-00 added ExpectedException; seems like good error text to me. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Prefix in exclude-result-prefixes is not valid: jad -->
+  <!-- ExpectedException: Prefix in exclude-result-prefixes is not valid: jad -->
+
+<xsl:template match="doc">
+  <out xsl:if= "my if" english="to leave" xsl:exclude-result-prefixes="java jad #default"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/lreerr/lreerr03.xml b/test/tests/conferr/lreerr/lreerr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/lreerr/lreerr03.xsl b/test/tests/conferr/lreerr/lreerr03.xsl
new file mode 100644
index 0000000..f15e543
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr03.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.tester.com">
+
+<xsl:output indent="yes"/>
+
+  <!-- FileName: lreerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test error reporting if required attribute of xsl:element 
+       is not specified.-->
+  <!-- ExpectedException: xsl:element requires attribute: name -->
+
+<xsl:template match="doc">
+  <xsl:element/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/lreerr/lreerr04.xml b/test/tests/conferr/lreerr/lreerr04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/lreerr/lreerr04.xsl b/test/tests/conferr/lreerr/lreerr04.xsl
new file mode 100644
index 0000000..e5ba47e
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr04.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.tester.com">
+
+  <!-- FileName: lreerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes with xsl:attribute. -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test error reporting if required attribute of xsl:attribute
+       is not specified.-->
+  <!-- ExpectedException: xsl:attribute requires attribute: name -->
+
+<xsl:template match="doc">
+  <xsl:element name="test">
+    <xsl:attribute>Hello</xsl:attribute>
+  </xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/lreerr/lreerr05.xml b/test/tests/conferr/lreerr/lreerr05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/lreerr/lreerr05.xsl b/test/tests/conferr/lreerr/lreerr05.xsl
new file mode 100644
index 0000000..1d146ab
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr05.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: LREerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to put out literal output without a template. -->
+  <!-- ExpectedException: Illegal top-level element -->
+  <!-- ExpectedException: out is not allowed in this position in the stylesheet! -->
+
+<out>Data</out>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/lreerr/lreerr06.xml b/test/tests/conferr/lreerr/lreerr06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/lreerr/lreerr06.xsl b/test/tests/conferr/lreerr/lreerr06.xsl
new file mode 100644
index 0000000..da934cf
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr06.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: lreerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Purpose: Try to put out value of a variable without a template. -->
+  <!-- ExpectedException: Illegal top-level element -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: out is not allowed in this position in the stylesheet! -->
+
+<xsl:variable name="var" select="Data"/>
+
+<out>$var</out>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/lreerr/lreerr07.xml b/test/tests/conferr/lreerr/lreerr07.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/lreerr/lreerr07.xsl b/test/tests/conferr/lreerr/lreerr07.xsl
new file mode 100644
index 0000000..3bedf9e
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr07.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
+
+  <!-- FileName: LREerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements-->
+  <!-- Purpose: Try to put out literal output without a template. -->
+  <!-- ExpectedException: Illegal characters in xsl:stylesheet -->
+  <!-- ExpectedException: Non-whitespace text is not allowed in this position in the stylesheet -->
+
+Data
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/lreerr/lreerr08.xml b/test/tests/conferr/lreerr/lreerr08.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/lreerr/lreerr08.xsl b/test/tests/conferr/lreerr/lreerr08.xsl
new file mode 100644
index 0000000..43d7ea7
--- /dev/null
+++ b/test/tests/conferr/lreerr/lreerr08.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:ped="http://www.tester.com">
+
+<xsl:output indent="yes"/>
+
+  <!-- FileName: lreerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements with xsl:element. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test error reporting if name attribute of xsl:element is empty. -->
+  <!-- ExpectedException: Illegal element name -->
+  <!-- ExpectedException: Illegal value used for attribute name -->
+
+<xsl:template match="doc">
+  <xsl:element name="">foo</xsl:element>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr01.xml b/test/tests/conferr/matcherr/matcherr01.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr01.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr01.xsl b/test/tests/conferr/matcherr/matcherr01.xsl
new file mode 100644
index 0000000..7c2d970
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr01.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for error when xsl:template has neither match nor name. -->
+  <!-- ExpectedException: xsl:template requires either a name or a match attribute. -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template>
+  <xsl:value-of select="."/>
+  <xsl:text> Huh? </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr02.xml b/test/tests/conferr/matcherr/matcherr02.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr02.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr02.xsl b/test/tests/conferr/matcherr/matcherr02.xsl
new file mode 100644
index 0000000..ef0a315
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr02.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use xsl:template as something other than a top-level element. -->
+  <!-- ExpectedException: (StylesheetHandler) xsl:template is not allowed inside a template! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:template is not allowed inside a template! -->
+  <!-- ExpectedException: xsl:template is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:template>
+      <xsl:value-of select="."/>
+      <xsl:text> Huh? </xsl:text>
+    </xsl:template>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr03.xml b/test/tests/conferr/matcherr/matcherr03.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr03.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr03.xsl b/test/tests/conferr/matcherr/matcherr03.xsl
new file mode 100644
index 0000000..a20d9ef
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr03.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: matcherr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for error when xsl:template is nested in another top-level element. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:template is not allowed inside a template! -->
+  <!-- Author: David Marston -->
+  <!-- ExpectedException: xsl:template is not allowed in this position in the stylesheet! -->
+
+<xsl:param name="bad">
+  <xsl:template match="letters">
+    <out>
+      <xsl:apply-templates/>
+    </out>
+  </xsl:template>
+</xsl:param>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr04.xml b/test/tests/conferr/matcherr/matcherr04.xml
new file mode 100644
index 0000000..914036c
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr04.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<doc>
+ <title>Test for source tree depth</title>
+ <a>
+  <title>Level A</title>
+  <b>
+   <title>Level B</title>
+   <c>
+    <title>Level C</title>
+    <d>
+     <title>Level D</title>
+     <e>
+      <title>Level E</title>
+      <f>
+       <title>Level F</title>
+       <g>
+        <title>Level G</title>
+        <h>
+         <title>Level H</title>
+         <i>
+          <title>Level I</title>
+          <j>
+           <title>Level J</title>
+           <k>
+            <title>Level K</title>
+            <l>
+             <title>Level L</title>
+             <m>
+              <title>Level M</title>
+              <n>
+               <title>Level N</title>
+               <o>
+                <title>Level O</title>
+               </o>
+              </n>
+             </m>
+            </l>
+           </k>
+          </j>
+         </i>
+        </h>
+       </g>
+      </f>
+     </e>
+    </d>
+   </c>
+  </b>
+ </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr04.xsl b/test/tests/conferr/matcherr/matcherr04.xsl
new file mode 100644
index 0000000..852df2b
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr04.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Purpose: Put content other than sort or param inside apply-templates. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: ElemTemplateElement error: Can not add #text to xsl:apply-templates -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: ElemTemplateElement error: Can not add #text to xsl:apply-templates -->
+  <!-- ExpectedException: xsl:text is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="title"/><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select="title">
+      <xsl:sort select="."/>
+      <xsl:text>This should not be inside apply-templates</xsl:text>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="*[@title]">
+  <xsl:text>Found a node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:text>Found a P node; there should not be one!
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr05.xml b/test/tests/conferr/matcherr/matcherr05.xml
new file mode 100644
index 0000000..914036c
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr05.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<doc>
+ <title>Test for source tree depth</title>
+ <a>
+  <title>Level A</title>
+  <b>
+   <title>Level B</title>
+   <c>
+    <title>Level C</title>
+    <d>
+     <title>Level D</title>
+     <e>
+      <title>Level E</title>
+      <f>
+       <title>Level F</title>
+       <g>
+        <title>Level G</title>
+        <h>
+         <title>Level H</title>
+         <i>
+          <title>Level I</title>
+          <j>
+           <title>Level J</title>
+           <k>
+            <title>Level K</title>
+            <l>
+             <title>Level L</title>
+             <m>
+              <title>Level M</title>
+              <n>
+               <title>Level N</title>
+               <o>
+                <title>Level O</title>
+               </o>
+              </n>
+             </m>
+            </l>
+           </k>
+          </j>
+         </i>
+        </h>
+       </g>
+      </f>
+     </e>
+    </d>
+   </c>
+  </b>
+ </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr05.xsl b/test/tests/conferr/matcherr/matcherr05.xsl
new file mode 100644
index 0000000..20d414a
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr05.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Purpose: Put a disallowed attribute on xsl:template. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: XSL Error: xsl:template has an illegal attribute: level -->
+  <!-- ExpectedException: "level" attribute is not allowed on the xsl:template element! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="title"/><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select="title">
+      <xsl:sort select="."/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="*[@title]" level="single">
+  <xsl:text>Found a node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:text>Found a P node; there should not be one!
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr06.xml b/test/tests/conferr/matcherr/matcherr06.xml
new file mode 100644
index 0000000..f6093cd
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr06.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section1/>
+    <section2/>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr06.xsl b/test/tests/conferr/matcherr/matcherr06.xsl
new file mode 100644
index 0000000..91a7382
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr06.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test document() function in a match pattern.
+     The spec doesn't say whether it's allowed or not, but NOT seems likely. -->
+  <!-- ExpectedException: Unknown nodetype: document -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="document('test6.xml')//body">
+  <xsl:value-of select="name(..)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr07.xml b/test/tests/conferr/matcherr/matcherr07.xml
new file mode 100644
index 0000000..914036c
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr07.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<doc>
+ <title>Test for source tree depth</title>
+ <a>
+  <title>Level A</title>
+  <b>
+   <title>Level B</title>
+   <c>
+    <title>Level C</title>
+    <d>
+     <title>Level D</title>
+     <e>
+      <title>Level E</title>
+      <f>
+       <title>Level F</title>
+       <g>
+        <title>Level G</title>
+        <h>
+         <title>Level H</title>
+         <i>
+          <title>Level I</title>
+          <j>
+           <title>Level J</title>
+           <k>
+            <title>Level K</title>
+            <l>
+             <title>Level L</title>
+             <m>
+              <title>Level M</title>
+              <n>
+               <title>Level N</title>
+               <o>
+                <title>Level O</title>
+               </o>
+              </n>
+             </m>
+            </l>
+           </k>
+          </j>
+         </i>
+        </h>
+       </g>
+      </f>
+     </e>
+    </d>
+   </c>
+  </b>
+ </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr07.xsl b/test/tests/conferr/matcherr/matcherr07.xsl
new file mode 100644
index 0000000..46aeac3
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr07.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Purpose: Put a disallowed attribute on xsl:apply-templates. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: XSL Error: xsl:apply-templates has an illegal attribute: name -->
+  <!-- ExpectedException: "name" attribute is not allowed on the xsl:apply-templates element -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="title"/><xsl:text>
+</xsl:text>
+    <xsl:apply-templates select="title" name="tmplt1">
+      <xsl:sort select="."/>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+<xsl:template match="*[@title]">
+  <xsl:text>Found a node
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="p">
+  <xsl:text>Found a P node; there should not be one!
+</xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr08.xml b/test/tests/conferr/matcherr/matcherr08.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr08.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr08.xsl b/test/tests/conferr/matcherr/matcherr08.xsl
new file mode 100644
index 0000000..e3189c6
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr08.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for error when xsl:template has neither match nor name, but has a mode. -->
+  <!-- ExpectedException: XSL Error: xsl:template must have a match attribute if it has a mode. -->
+  <!-- ExpectedException: xsl:template must have a name or match attribute (or both). -->
+
+<xsl:template match="letters">
+  <out>
+    <xsl:apply-templates mode="broken"/>
+  </out>
+</xsl:template>
+
+<xsl:template mode="broken">
+  <xsl:value-of select="."/>
+  <xsl:text> Huh? </xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr09.xml b/test/tests/conferr/matcherr/matcherr09.xml
new file mode 100644
index 0000000..6a42a4f
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr09.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<letters>
+  <letter>a</letter>
+  <letter>b</letter>
+  <letter>c</letter>
+  <letter>b</letter>
+  <letter>h</letter>
+</letters>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr09.xsl b/test/tests/conferr/matcherr/matcherr09.xsl
new file mode 100644
index 0000000..804b355
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr09.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Purpose: Put xsl:apply-templates at top level, which is illegal. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: xsl:apply-templates is not allowed in this position in the stylesheet -->
+
+<xsl:apply-templates select="letters/letter"/>
+
+<xsl:template match="letter">
+  <xsl:value-of select="."/>
+  <xsl:text> This should fail</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr10.xml b/test/tests/conferr/matcherr/matcherr10.xml
new file mode 100644
index 0000000..f6093cd
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr10.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section1/>
+    <section2/>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr10.xsl b/test/tests/conferr/matcherr/matcherr10.xsl
new file mode 100644
index 0000000..a528973
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr10.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test variable in a match pattern -->
+  <!-- ExpectedException: Extra illegal tokens -->
+
+<xsl:variable name="screen" select="'section1'"/>
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="$screen">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr11.xml b/test/tests/conferr/matcherr/matcherr11.xml
new file mode 100644
index 0000000..f6093cd
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr11.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section1/>
+    <section2/>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr11.xsl b/test/tests/conferr/matcherr/matcherr11.xsl
new file mode 100644
index 0000000..887095f
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr11.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test '//' in a match pattern -->
+  <!-- ExpectedException: Unexpected token in pattern -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="//">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr12.xml b/test/tests/conferr/matcherr/matcherr12.xml
new file mode 100644
index 0000000..f6093cd
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr12.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section1/>
+    <section2/>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr12.xsl b/test/tests/conferr/matcherr/matcherr12.xsl
new file mode 100644
index 0000000..a7f3ca3
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr12.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test unbalanced '|' at end of match pattern -->
+  <!-- ExpectedException: Unexpected token in pattern -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="section1|">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/matcherr13.xml b/test/tests/conferr/matcherr/matcherr13.xml
new file mode 100644
index 0000000..f6093cd
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr13.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section1/>
+    <section2/>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matcherr/matcherr13.xsl b/test/tests/conferr/matcherr/matcherr13.xsl
new file mode 100644
index 0000000..8f7c838
--- /dev/null
+++ b/test/tests/conferr/matcherr/matcherr13.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATCHerr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test unbalanced '|' at start of match pattern -->
+  <!-- ExpectedException: Unexpected token in pattern -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="|section2">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matcherr/test6.xml b/test/tests/conferr/matcherr/test6.xml
new file mode 100644
index 0000000..c9a04e7
--- /dev/null
+++ b/test/tests/conferr/matcherr/test6.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <body/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr01.xml b/test/tests/conferr/matherr/matherr01.xml
new file mode 100644
index 0000000..690bfac
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <mod attrib="2">3</mod>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr01.xsl b/test/tests/conferr/matherr/matherr01.xsl
new file mode 100644
index 0000000..fb317c4
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr01.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test reaction to obsolete 'quo' operator. -->
+  <!-- ExpectedException: Old syntax: quo(...) is no longer defined in XPath -->
+  <!-- ExpectedException: ERROR! Unknown op code: quo --><!-- Could be improved for usability -sc -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="6 quo 4"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr02.xml b/test/tests/conferr/matherr/matherr02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr02.xsl b/test/tests/conferr/matherr/matherr02.xsl
new file mode 100644
index 0000000..4464a44
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr02.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" with unary minus. -->
+  <!-- ExpectedException: XSL Warning: Could not find function: troo -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="-troo()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr03.xml b/test/tests/conferr/matherr/matherr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr03.xsl b/test/tests/conferr/matherr/matherr03.xsl
new file mode 100644
index 0000000..21d63d1
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr03.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" with number(). -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="number(troo())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr04.xml b/test/tests/conferr/matherr/matherr04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr04.xsl b/test/tests/conferr/matherr/matherr04.xsl
new file mode 100644
index 0000000..4b1b965
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr04.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" with multiplication. -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="5 * troo()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr05.xml b/test/tests/conferr/matherr/matherr05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr05.xsl b/test/tests/conferr/matherr/matherr05.xsl
new file mode 100644
index 0000000..302c5b7
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr05.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.5 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" with div. -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="12 div troo()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr06.xml b/test/tests/conferr/matherr/matherr06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr06.xsl b/test/tests/conferr/matherr/matherr06.xsl
new file mode 100644
index 0000000..91a68f9
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr06.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of number() with too many arguments. -->
+  <!-- ExpectedException: number() has too many arguments. -->
+  <!-- ExpectedException: FuncNumber only allows 0 or 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="number(8,doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr07.xml b/test/tests/conferr/matherr/matherr07.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr07.xsl b/test/tests/conferr/matherr/matherr07.xsl
new file mode 100644
index 0000000..add06f1
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr07.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of sum() with too many arguments. -->
+  <!-- ExpectedException: sum() has too many arguments. -->
+  <!-- ExpectedException: sum only allows 1 argument -->
+  <!-- ExpectedException: FuncSum only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="sum(doc,8)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr08.xml b/test/tests/conferr/matherr/matherr08.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr08.xsl b/test/tests/conferr/matherr/matherr08.xsl
new file mode 100644
index 0000000..b719da4
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr08.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of sum() with zero arguments. -->
+  <!-- ExpectedException: one argument expected -->
+  <!-- ExpectedException: FuncSum only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="sum()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr09.xml b/test/tests/conferr/matherr/matherr09.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr09.xsl b/test/tests/conferr/matherr/matherr09.xsl
new file mode 100644
index 0000000..0369395
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr09.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of floor() with too many arguments. -->
+  <!-- ExpectedException: floor() has too many arguments. -->
+  <!-- ExpectedException: FuncFloor only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="floor(8,7)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr10.xml b/test/tests/conferr/matherr/matherr10.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr10.xsl b/test/tests/conferr/matherr/matherr10.xsl
new file mode 100644
index 0000000..28021ee
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr10.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of floor() with zero arguments. -->
+  <!-- ExpectedException: one argument expected -->
+  <!-- ExpectedException: FuncFloor only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="floor()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr11.xml b/test/tests/conferr/matherr/matherr11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr11.xsl b/test/tests/conferr/matherr/matherr11.xsl
new file mode 100644
index 0000000..0309119
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr11.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of ceiling() with too many arguments. -->
+  <!-- ExpectedException: ceiling() has too many arguments. -->
+  <!-- ExpectedException: FuncCeiling only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="ceiling(8,7)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr12.xml b/test/tests/conferr/matherr/matherr12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr12.xsl b/test/tests/conferr/matherr/matherr12.xsl
new file mode 100644
index 0000000..c3cec59
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr12.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of ceiling() with zero arguments. -->
+  <!-- ExpectedException: one argument expected -->
+  <!-- ExpectedException: FuncCeiling only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="ceiling()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr13.xml b/test/tests/conferr/matherr/matherr13.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr13.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr13.xsl b/test/tests/conferr/matherr/matherr13.xsl
new file mode 100644
index 0000000..529818c
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr13.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of round() with too many arguments. -->
+  <!-- ExpectedException: round() has too many arguments. -->
+  <!-- ExpectedException: FuncRound only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="round(8,7)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/matherr/matherr14.xml b/test/tests/conferr/matherr/matherr14.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr14.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/matherr/matherr14.xsl b/test/tests/conferr/matherr/matherr14.xsl
new file mode 100644
index 0000000..4c30d44
--- /dev/null
+++ b/test/tests/conferr/matherr/matherr14.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MATHerr14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of round() with zero arguments. -->
+  <!-- ExpectedException: one argument expected -->
+  <!-- ExpectedException: FuncRound only allows 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="round()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/mdocserr/mdocserr01.xml b/test/tests/conferr/mdocserr/mdocserr01.xml
new file mode 100644
index 0000000..f6093cd
--- /dev/null
+++ b/test/tests/conferr/mdocserr/mdocserr01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section1/>
+    <section2/>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/mdocserr/mdocserr01.xsl b/test/tests/conferr/mdocserr/mdocserr01.xsl
new file mode 100644
index 0000000..33fe33c
--- /dev/null
+++ b/test/tests/conferr/mdocserr/mdocserr01.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MDOCSerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test document() function with non-existent file. -->
+  <!-- ExpectedException: File not found -->
+  <!-- ExpectedException: The system cannot find the path specified -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates select="document('notfound.xml')/body">
+      <xsl:with-param name="arg1">ok</xsl:with-param>
+    </xsl:apply-templates>
+  </out>
+</xsl:template>
+
+<xsl:template match="body">
+  <xsl:param name="arg1">not ok</xsl:param>
+  <xsl:value-of select="$arg1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/mdocserr/mdocserr02.xml b/test/tests/conferr/mdocserr/mdocserr02.xml
new file mode 100644
index 0000000..f6093cd
--- /dev/null
+++ b/test/tests/conferr/mdocserr/mdocserr02.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section1/>
+    <section2/>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/mdocserr/mdocserr02.xsl b/test/tests/conferr/mdocserr/mdocserr02.xsl
new file mode 100644
index 0000000..672368e
--- /dev/null
+++ b/test/tests/conferr/mdocserr/mdocserr02.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MDOCSerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Purpose: Test document() function with zero arguments. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: FuncDocument only allows 1 or 2 arguments -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates select="document()/body"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="body">
+  <xsl:text>This should fail</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/mdocserr/mdocserr03.xml b/test/tests/conferr/mdocserr/mdocserr03.xml
new file mode 100644
index 0000000..f6093cd
--- /dev/null
+++ b/test/tests/conferr/mdocserr/mdocserr03.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+  <defaultcontent>
+    <section1/>
+    <section2/>
+  </defaultcontent>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/mdocserr/mdocserr03.xsl b/test/tests/conferr/mdocserr/mdocserr03.xsl
new file mode 100644
index 0000000..ced3ad3
--- /dev/null
+++ b/test/tests/conferr/mdocserr/mdocserr03.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MDOCSerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.1 Multiple Source Documents -->
+  <!-- Purpose: Test document() function with too many arguments. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: document() function requires 1 or 2 arguments -->
+  <!-- ExpectedException: FuncDocument only allows 1 or 2 arguments -->
+
+<xsl:template match="defaultcontent">
+  <out>
+    <xsl:apply-templates select="document('../mdocs03a.xml','bad1','bad2')/body"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="body">
+  <xsl:text>This should fail</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/mdocserr/mdocserr04.xml b/test/tests/conferr/mdocserr/mdocserr04.xml
new file mode 100644
index 0000000..a247f32
--- /dev/null
+++ b/test/tests/conferr/mdocserr/mdocserr04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" ?>
+<doc>
+  <test>ERROR</test>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/mdocserr/mdocserr04.xsl b/test/tests/conferr/mdocserr/mdocserr04.xsl
new file mode 100644
index 0000000..9ba83a0
--- /dev/null
+++ b/test/tests/conferr/mdocserr/mdocserr04.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="ped.com">
+
+  <!-- FileName: MDOCSerr04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2  -->
+  <!-- Purpose: Top-level elements must have some namespace. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: top-level element test has no namespace -->
+  <!-- ExpectedException: test is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out><xsl:text>
+</xsl:text>
+    <xsl:copy-of select='document("")//test'/><xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+<ped:test>Test1</ped:test>
+<test>Test2</test>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/messageerr/messageerr01.xml b/test/tests/conferr/messageerr/messageerr01.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/messageerr/messageerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/messageerr/messageerr01.xsl b/test/tests/conferr/messageerr/messageerr01.xsl
new file mode 100644
index 0000000..3a24129
--- /dev/null
+++ b/test/tests/conferr/messageerr/messageerr01.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MESSAGEerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 Messages -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:message at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:message is not allowed in this position in the stylesheet -->
+
+<xsl:message terminate="no">This should not appear</xsl:message>
+
+<xsl:template match="/">
+ <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/messageerr/messageerr02.xml b/test/tests/conferr/messageerr/messageerr02.xml
new file mode 100644
index 0000000..0877143
--- /dev/null
+++ b/test/tests/conferr/messageerr/messageerr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
diff --git a/test/tests/conferr/messageerr/messageerr02.xsl b/test/tests/conferr/messageerr/messageerr02.xsl
new file mode 100644
index 0000000..9e75728
--- /dev/null
+++ b/test/tests/conferr/messageerr/messageerr02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MESSAGEerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 199911116 -->
+  <!-- Section: 13 -->
+  <!-- Purpose: Illegal value "duh" on terminate option -->                
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Value for terminate should equal yes or no -->
+  <!-- ExpectedException: Illegal value: duh used for boolean attribute: terminate -->
+
+<xsl:template match="/">
+  <xsl:message terminate="duh">This message came from the MESSAGEerr02 test.</xsl:message>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/messageerr/messageerr03.xml b/test/tests/conferr/messageerr/messageerr03.xml
new file mode 100644
index 0000000..0877143
--- /dev/null
+++ b/test/tests/conferr/messageerr/messageerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
diff --git a/test/tests/conferr/messageerr/messageerr03.xsl b/test/tests/conferr/messageerr/messageerr03.xsl
new file mode 100644
index 0000000..03cde42
--- /dev/null
+++ b/test/tests/conferr/messageerr/messageerr03.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: MESSAGEerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 13 -->
+  <!-- Purpose: Use "yes" on terminate option, causing exception -->                
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: This message came from the MESSAGE03 test. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: This message came from the MESSAGE03 test. -->
+  <!-- ExpectedException: Stylesheet directed termination -->
+
+<xsl:template match="/">
+  <xsl:message terminate="yes">This message came from the MESSAGE03 test.</xsl:message>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/a.xsl b/test/tests/conferr/namedtemplateerr/a.xsl
new file mode 100644
index 0000000..105e86e
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/a.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: a -->
+  <!-- Purpose: Used by namespaceerr12 case. -->
+
+<xsl:template name="a">
+  import:a
+</xsl:template>
+
+<xsl:template name="a">
+  import:b
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr01.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr01.xml
new file mode 100644
index 0000000..ef84d82
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr01.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a place="above">top-level-a</a>
+    <doc>
+      <a place="below">sub-level-a</a>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr01.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr01.xsl
new file mode 100644
index 0000000..3ed1be4
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr01.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test what happens with badly-formed select pattern in with-param. -->
+  <!-- ExpectedException: Extra illegal tokens -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="tmplt1">
+      <xsl:with-param name="pvar1" select="doc/[@place='below']"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1" match="doc/doc">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr02.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr02.xml
new file mode 100644
index 0000000..2f17161
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr02.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr02.xsl
new file mode 100644
index 0000000..90fb6f9
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr02.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Purpose: Error test- parameter of outer template unknown inside inner template. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Could not find variable with the name of pvar1 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="tmplt1">
+      <xsl:with-param name="pvar1" select="555"/>
+    </xsl:call-template>
+<xsl:text>
+Back to main template.</xsl:text>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1">
+  <xsl:param name="pvar1">pvar1 default data</xsl:param>
+  <!-- pvar1 won't be in scope in next template, so pass it in via new variable. -->
+  <xsl:variable name="passto2">
+    <xsl:value-of select="number($pvar1)"/>
+  </xsl:variable>
+
+  <xsl:value-of select="$passto2"/><xsl:text>, </xsl:text>
+  <xsl:call-template name="tmplt2">
+    <xsl:with-param name="t1num" select="$passto2"/>
+  </xsl:call-template>
+  <xsl:text>
+Back to template 1.</xsl:text>
+</xsl:template>
+
+<xsl:template name="tmplt2">
+  <xsl:param name="t1num">t1num default data</xsl:param>
+  <xsl:value-of select="444 + $t1num"/><xsl:text>, prior item should be 999, </xsl:text>
+  <xsl:value-of select="222 + $pvar1"/><xsl:text>, prior item should be 777</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr03.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr03.xml
new file mode 100644
index 0000000..ef84d82
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr03.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a place="above">top-level-a</a>
+    <doc>
+      <a place="below">sub-level-a</a>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr03.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr03.xsl
new file mode 100644
index 0000000..26d0b93
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr03.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Purpose: Try to do call-template without a template of the specified name. -->
+  <!-- Creator: David Marston -->
+  <!-- ExpectedException: Could not find template named -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="tmplt2">
+      <xsl:with-param name="pvar1" select="doc/a"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1" match="doc/doc">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr04.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr04.xml
new file mode 100644
index 0000000..ef84d82
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr04.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a place="above">top-level-a</a>
+    <doc>
+      <a place="below">sub-level-a</a>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr04.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr04.xsl
new file mode 100644
index 0000000..565367f
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr04.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test child of call-template other than with-param. -->
+  <!-- ExpectedException: Can not add #text to xsl:call-template -->
+  <!-- ExpectedException: ElemTemplateElement error: Can not add #text to xsl:call-template -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: ElemTemplateElement error: Can not add #text to xsl:call-template -->
+  <!-- ExpectedException: xsl:text is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="tmplt1">
+      <xsl:text>This should not come out</xsl:text>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr05.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr05.xml
new file mode 100644
index 0000000..8c60d21
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr05.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr05.xsl
new file mode 100644
index 0000000..3215a4c
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr05.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test param lacking name attribute. -->
+  <!-- ExpectedException: XSL Error: xsl:param must have a name attribute. -->
+  <!-- ExpectedException: xsl:param requires attribute: name -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="RTF">
+      <xsl:value-of select="a"/>
+    </xsl:variable>
+    <xsl:call-template name="ntmp1">
+      <xsl:with-param name="pvar1" select="$RTF"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="ntmp1">
+  <xsl:param>default data</xsl:param>
+  <xsl:value-of select="$pvar1"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr06.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr06.xml
new file mode 100644
index 0000000..ef84d82
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr06.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a place="above">top-level-a</a>
+    <doc>
+      <a place="below">sub-level-a</a>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr06.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr06.xsl
new file mode 100644
index 0000000..2857a64
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr06.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to do call-template without its name attribute. -->
+  <!-- ExpectedException: xsl:call-template requires attribute: name -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template>
+      <xsl:with-param name="pvar1" select="doc/a"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1" match="doc/doc">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr07.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr07.xml
new file mode 100644
index 0000000..8c60d21
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr07.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr07.xsl
new file mode 100644
index 0000000..c53198c
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr07.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test with-param lacking name attribute. -->
+  <!-- ExpectedException: XSL Error: xsl:with-param must have a 'name' attribute. -->
+  <!-- ExpectedException: xsl:with-param requires attribute: name -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="RTF">
+      <xsl:value-of select="a"/>
+    </xsl:variable>
+    <xsl:call-template name="ntmp1">
+      <xsl:with-param select="$RTF"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="ntmp1">
+  <xsl:param name="pvar1">default data</xsl:param>
+  <xsl:value-of select="$pvar1"/><xsl:text>,</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr08.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr08.xml
new file mode 100644
index 0000000..8c60d21
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr08.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr08.xsl
new file mode 100644
index 0000000..7ff6fc8
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr08.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:call-template at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:call-template is not allowed in this position in the stylesheet -->
+
+<xsl:call-template name="ntmp1">
+  <xsl:with-param name="pvar1" select="value"/>
+</xsl:call-template>
+
+<xsl:template name="ntmp1">
+  <xsl:param name="pvar1">pvar1 default data</xsl:param>
+  <xsl:param name="pvar2">pvar2 default data</xsl:param>
+  <xsl:value-of select="$pvar1"/><xsl:text>,</xsl:text>
+  <xsl:value-of select="$pvar2"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr09.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr09.xml
new file mode 100644
index 0000000..8c60d21
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr09.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr09.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr09.xsl
new file mode 100644
index 0000000..303b245
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr09.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:with-param at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:with-param is not allowed in this position in the stylesheet -->
+
+<xsl:with-param select="'foo'"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr10.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr10.xml
new file mode 100644
index 0000000..8c60d21
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr10.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <a>test</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr10.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr10.xsl
new file mode 100644
index 0000000..7df2295
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr10.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:with-param in a template, which is illegal. -->
+  <!-- ExpectedException: xsl:with-param must be child of xsl:apply-templates or xsl:call-template -->
+  <!-- ExpectedException: xsl:with-param is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <xsl:with-param name="par1" select="'foo'"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr11.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr11.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr11.xsl
new file mode 100644
index 0000000..2175c58
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr11.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use an AVT for the template name when invoking. -->
+  <!-- ExpectedException: Could not find template named: {$tocall} -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Could not find template named: {$tocall} -->
+  <!-- ExpectedException: Illegal value: {$tocall} used for QNAME attribute: name -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="tocall" select="'a'"/>
+    <xsl:call-template name="{$tocall}"/>
+  </out>
+</xsl:template>
+
+<xsl:template name="tocall">
+  <xsl:text>This should NOT display!</xsl:text>
+</xsl:template>
+
+<xsl:template name="a">
+  <xsl:text>We are in template a!</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr12.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr12.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr12.xsl
new file mode 100644
index 0000000..1426aa8
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr12.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 Named Templates -->
+  <!-- Purpose: Error to have a stylesheet contain more then one template
+     with the same name and same import precedence. -->
+  <!-- Author: Paul Dick -->
+  <!-- ExpectedException: There is already a template named: a -->
+  <!-- ExpectedException: Found more than one template named: a -->
+
+<xsl:import href="a.xsl"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="a"/>
+	<xsl:apply-imports/>
+  </out>
+</xsl:template>
+
+<xsl:template name="a">
+  a
+</xsl:template>
+
+<xsl:template name="a">
+  b
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr13.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr13.xml
new file mode 100644
index 0000000..ef84d82
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr13.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a place="above">top-level-a</a>
+    <doc>
+      <a place="below">sub-level-a</a>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr13.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr13.xsl
new file mode 100644
index 0000000..b7a3ee7
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr13.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to set name attribute to null string. -->
+  <!-- ExpectedException: Invalid template name -->
+  <!-- ExpectedException: Illegal value:  used for QNAME attribute: name -->
+
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="">
+      <xsl:with-param name="pvar1" select="doc/a"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+<xsl:template name="">
+  <xsl:text>Empty-named template got called!</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr14.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr14.xml
new file mode 100644
index 0000000..ef84d82
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr14.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a place="above">top-level-a</a>
+    <doc>
+      <a place="below">sub-level-a</a>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr14.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr14.xsl
new file mode 100644
index 0000000..aa84420
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr14.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:foo="http://foo.com">
+
+  <!-- FileName: namedtemplateerr14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to set local part of QName to null string. -->
+  <!-- ExpectedException: Invalid template name -->
+  <!-- ExpectedException: Illegal value: foo: used for QNAME attribute: name -->
+
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="foo:">
+      <xsl:with-param name="pvar1" select="doc/a"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="foo:tmplt1">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+<xsl:template name="foo:">
+  <xsl:text>Empty-named template got called!</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr15.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr15.xml
new file mode 100644
index 0000000..ef84d82
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr15.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a place="above">top-level-a</a>
+    <doc>
+      <a place="below">sub-level-a</a>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr15.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr15.xsl
new file mode 100644
index 0000000..8cb0460
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr15.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to set prefix part of QName to null string. -->
+  <!-- ExpectedException: Name cannot start with a colon -->
+  <!-- ExpectedException: A prefix of length 0 was detected -->
+  <!-- ExpectedException: Template name is not a valid QName -->
+  <!-- ExpectedException: Illegal value: :tmplt1 used for QNAME attribute: name -->
+  
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name=":tmplt1">
+      <xsl:with-param name="pvar1" select="doc/a"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+<xsl:template name=":tmplt1">
+  <xsl:text>Empty-prefix template got called!</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr16.xml b/test/tests/conferr/namedtemplateerr/namedtemplateerr16.xml
new file mode 100644
index 0000000..ef84d82
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr16.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+  <a place="above">top-level-a</a>
+    <doc>
+      <a place="below">sub-level-a</a>
+    </doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namedtemplateerr/namedtemplateerr16.xsl b/test/tests/conferr/namedtemplateerr/namedtemplateerr16.xsl
new file mode 100644
index 0000000..cdab9db
--- /dev/null
+++ b/test/tests/conferr/namedtemplateerr/namedtemplateerr16.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namedtemplateerr16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 6 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Call a template using invalid name. -->
+  <!-- ExpectedException: Invalid template name -->
+  <!-- ExpectedException: xsl:call-template has an invalid 'name' attribute -->
+  <!-- ExpectedException: Illegal value: tmplt1@bar used for QNAME attribute: name -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="tmplt1@bar">
+      <xsl:with-param name="pvar1" select="doc/a"/>
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="tmplt1">
+  <xsl:param name="pvar1">Default text in pvar1</xsl:param>
+  <xsl:value-of select="$pvar1"/>
+</xsl:template>
+
+<xsl:template name="tmplt1@bar">
+  <xsl:text>Badly named template got called!</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr01.xml b/test/tests/conferr/namespaceerr/namespaceerr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namespaceerr/namespaceerr01.xsl b/test/tests/conferr/namespaceerr/namespaceerr01.xsl
new file mode 100644
index 0000000..6861c13
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr01.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespaceerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose:  It is an error for an element from XSLT namespace to have attributes
+       with expanded-names that have null namespace URI's. -->
+  <!-- ExpectedException: XSL Error: xsl:copy-of has an illegal attribute: -->
+  <!-- ExpectedException: "test" attribute is not allowed on the xsl:copy-of element! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:copy-of select="doc" test="0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr02.xml b/test/tests/conferr/namespaceerr/namespaceerr02.xml
new file mode 100644
index 0000000..357f6f7
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr02.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<elements>
+  <block>p</block>
+  <block>h1</block>
+  <block>h2</block>
+  <block>h3</block>
+  <block>h4</block>
+</elements>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr02.xsl b/test/tests/conferr/namespaceerr/namespaceerr02.xsl
new file mode 100644
index 0000000..2ced472
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr02.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias">
+
+  <!-- FileName: namespaceerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test missing attribute in namespace-alias. -->
+  <!-- ExpectedException: xsl:namespace-alias requires attribute: result-prefix -->
+
+<xsl:namespace-alias stylesheet-prefix="axsl"/>
+
+<xsl:template match="/">
+  <axsl:stylesheet>
+    <xsl:apply-templates/>
+  </axsl:stylesheet>
+</xsl:template>
+
+<xsl:template match="block">
+  <axsl:template match="{.}">
+    <axsl:apply-templates/>
+  </axsl:template>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr03.xml b/test/tests/conferr/namespaceerr/namespaceerr03.xml
new file mode 100644
index 0000000..357f6f7
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr03.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<elements>
+  <block>p</block>
+  <block>h1</block>
+  <block>h2</block>
+  <block>h3</block>
+  <block>h4</block>
+</elements>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr03.xsl b/test/tests/conferr/namespaceerr/namespaceerr03.xsl
new file mode 100644
index 0000000..866b053
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr03.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias">
+
+  <!-- FileName: namespaceerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test missing attribute in namespace-alias. -->
+  <!-- ExpectedException: xsl:namespace-alias requires attribute: stylesheet-prefix -->
+
+<xsl:namespace-alias result-prefix="xsl"/>
+
+<xsl:template match="/">
+  <axsl:stylesheet>
+    <xsl:apply-templates/>
+  </axsl:stylesheet>
+</xsl:template>
+
+<xsl:template match="block">
+  <axsl:template match="{.}">
+    <axsl:apply-templates/>
+  </axsl:template>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr04.xml b/test/tests/conferr/namespaceerr/namespaceerr04.xml
new file mode 100644
index 0000000..0068636
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr04.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<docs>
+  <block>p</block>
+  <block>h1</block>
+  <block>h2</block>
+  <block>h3</block>
+  <block>h4</block>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conferr/namespaceerr/namespaceerr04.xsl b/test/tests/conferr/namespaceerr/namespaceerr04.xsl
new file mode 100644
index 0000000..46f4922
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr04.xsl
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+	xmlns:bogus="http://www.bogus_ns.com"
+        xmlns:lotus="http://www.lotus.com"
+	xmlns:ped="www.ped.com">
+
+  <!-- FileName: namespaceerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose:  Testing an attribute not from the XSLT namespace, which is
+       legal provided that the expanded name of the attribute has a non-null 
+       namespace URI. This tests for many xslt TOP-LEVEL elements, apparent code path 
+       are different for numerous elements. Should not have namespaces to inherit. -->
+
+<!-- xsl:import href="..\test1.xsl"  a="a"/ -->
+<!-- xsl:include href="..\test2.xsl" b="b"/ -->
+<xsl:output method="xml" indent="yes" ped:c="c"/>
+
+<xsl:key name="sprtest" match="TestID" use="Name" ped:d="d"/>
+
+<xsl:strip-space elements="a" ped:e="e"/>
+<xsl:preserve-space elements="b" ped:f="f"/>
+
+<xsl:variable name="Var1" ped:g="g">
+DefaultValueOfVar1
+</xsl:variable>
+
+<xsl:param name="Param1" ped:h="h">
+DefaultValueOfParam1
+</xsl:param>
+
+<xsl:attribute-set name="my-style" ped:i="i">
+  <xsl:attribute name="my-size" ped:j="j">12pt</xsl:attribute>
+  <xsl:attribute name="my-weight">bold</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:namespace-alias stylesheet-prefix="bogus" result-prefix="xsl" ped:k="k"/>
+<xsl:decimal-format decimal-separator="," grouping-separator=" " ped:l="l"/>
+
+<xsl:template match="docs" ped:m="m">
+  <bogus:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+	<bogus:template match="/">
+	  <out>
+		Yeee ha
+		<xsl:for-each select="block" ped:n="n">
+			<xsl:if test=" .='p'" ped:o="o">
+				Whoopie
+			</xsl:if>
+			<xsl:value-of select="." ped:p="p"/>
+		</xsl:for-each>
+      </out>
+	</bogus:template>
+  </bogus:stylesheet>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr05.xml b/test/tests/conferr/namespaceerr/namespaceerr05.xml
new file mode 100644
index 0000000..c82f8ee
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<elements>
+  <block>p</block>
+</elements>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr05.xsl b/test/tests/conferr/namespaceerr/namespaceerr05.xsl
new file mode 100644
index 0000000..1187ebf
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr05.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:axsl="http://www.w3.org/1999/XSL/TransAlias">
+
+  <!-- FileName: namespaceerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test placement of namespace-alias inside a template, which is illegal. -->
+  <!-- ExpectedException: Must put xsl:namespace-alias outside any template. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Must put xsl:namespace-alias outside any template. -->
+  <!-- ExpectedException: xsl:namespace-alias is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr06.xml b/test/tests/conferr/namespaceerr/namespaceerr06.xml
new file mode 100644
index 0000000..b08aff2
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr06.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+  <ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+  <b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namespaceerr/namespaceerr06.xsl b/test/tests/conferr/namespaceerr/namespaceerr06.xsl
new file mode 100644
index 0000000..c10ca37
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr06.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespaceerr06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'local-name()' with too many arguments. -->
+  <!-- ExpectedException: local-name() has too many arguments. -->
+  <!-- ExpectedException: FuncLocalPart only allows 0 or 1 arguments -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="local-name(baz2:b,..)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr07.xml b/test/tests/conferr/namespaceerr/namespaceerr07.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr07.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namespaceerr/namespaceerr07.xsl b/test/tests/conferr/namespaceerr/namespaceerr07.xsl
new file mode 100644
index 0000000..1b150c2
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr07.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespaceerr07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions. -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'namespace-uri()' with too many arguments. -->
+  <!-- ExpectedException: namespace-uri() has too many arguments. -->
+  <!-- ExpectedException: FuncNamespace only allows 0 or 1 arguments --><!-- Note: why isn't the error about FuncNamespaceURI? -sc -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="namespace-uri(baz2:b,..)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr08.xml b/test/tests/conferr/namespaceerr/namespaceerr08.xml
new file mode 100644
index 0000000..22724bf
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr08.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1">
+<ns1:a attrib1="test" xmlns="http://xsl.lotus.com/ns2" xmlns:ns1="http://xsl.lotus.com/ns1"/>
+<b ns1:attrib2="test"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/namespaceerr/namespaceerr08.xsl b/test/tests/conferr/namespaceerr/namespaceerr08.xsl
new file mode 100644
index 0000000..8849051
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr08.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:baz1="http://xsl.lotus.com/ns1"
+                xmlns:baz2="http://xsl.lotus.com/ns2">
+
+  <!-- FileName: namespaceerr08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'name()' with too many arguments. -->
+  <!-- ExpectedException: FuncQname only allows 0 or 1 arguments -->
+
+<xsl:template match="baz2:doc">
+  <out>
+    <xsl:value-of select="name(a,b)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr09.xml b/test/tests/conferr/namespaceerr/namespaceerr09.xml
new file mode 100644
index 0000000..7fe8394
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr09.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns:xem="http://www.psol.com/xtension/1.0">
+  <foo>xyz</foo>
+  <xem:foo>found</xem:foo>
+  <foo>zyx</foo>
+</doc>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr09.xsl b/test/tests/conferr/namespaceerr/namespaceerr09.xsl
new file mode 100644
index 0000000..e640173
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr09.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+   xmlns:em="http://www.psol.com/xtension/1.0">
+
+  <!-- FileName: namespaceerr09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for meaningful message when expression begins with : (has null namespace) -->
+  <!-- ExpectedException: Extra illegal tokens: 'foo' -->
+
+<xsl:template match = "doc">
+  <out>
+    <xsl:for-each select=":foo">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr10.xml b/test/tests/conferr/namespaceerr/namespaceerr10.xml
new file mode 100644
index 0000000..5d69f36
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr10.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc xmlns:xem="http://www.psol.com/xtension/1.0"
+   xmlns:l="http://xsl.lotus.com"/>
+  <foo>xyz</foo>
+  <xem:foo>found</xem:foo>
+  <l:foo>zyx</foo>
+</doc>
diff --git a/test/tests/conferr/namespaceerr/namespaceerr10.xsl b/test/tests/conferr/namespaceerr/namespaceerr10.xsl
new file mode 100644
index 0000000..0f73382
--- /dev/null
+++ b/test/tests/conferr/namespaceerr/namespaceerr10.xsl
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+   xmlns:em="http://www.psol.com/xtension/1.0">
+
+  <!-- FileName: NSPCerr10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for meaningful message when attempting to use namespace wildcard (*) -->
+  <!-- ExpectedException: XSLT: ElemTemplateElement error: Can not resolve namespace prefix: -->
+  <!-- ExpectedException: Prefix must resolve to a namespace: -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*:foo">
+  <in>
+    <xsl:value-of select="."/>
+  </in>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr01.xml b/test/tests/conferr/numberformaterr/numberformaterr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr01.xsl b/test/tests/conferr/numberformaterr/numberformaterr01.xsl
new file mode 100644
index 0000000..59575eb
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr01.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test repeat declaration of decimal-format, un-named. -->
+  <!-- ExpectedException: Only one default xsl:decimal-format declaration is allowed. -->
+
+<xsl:decimal-format NaN="non-numeric" />
+
+<xsl:decimal-format NaN="wrong-number" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('foo','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr02.xml b/test/tests/conferr/numberformaterr/numberformaterr02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr02.xsl b/test/tests/conferr/numberformaterr/numberformaterr02.xsl
new file mode 100644
index 0000000..c8b9815
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr02.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test repeat declaration of decimal-format, named the same, but different settings. -->
+  <!-- ExpectedException: xsl:decimal-format names must be unique. -->
+
+<xsl:decimal-format name="myminus" minus-sign='_' />
+
+<xsl:decimal-format name="myminus" minus-sign='`' />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'###,###.###','myminus')"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="format-number(-42857.1,'###,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr03.xml b/test/tests/conferr/numberformaterr/numberformaterr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr03.xsl b/test/tests/conferr/numberformaterr/numberformaterr03.xsl
new file mode 100644
index 0000000..0dc78c6
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr03.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Attempt to put a child on decimal-format. -->
+  <!-- ExpectedException: xsl:text not allowed inside xsl:decimal-format -->
+  <!-- ExpectedException: xsl:text is not allowed in this position in the stylesheet! -->
+
+<xsl:decimal-format NaN="non-numeric">
+  <xsl:text>This should not appear!</xsl:text>
+</xsl:decimal-format>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('foo','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr04.xml b/test/tests/conferr/numberformaterr/numberformaterr04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr04.xsl b/test/tests/conferr/numberformaterr/numberformaterr04.xsl
new file mode 100644
index 0000000..f5f8943
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr04.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test illegal attribute on decimal-format. -->
+  <!-- ExpectedException: Invalid attribute on xsl:decimal-format. -->
+  <!-- ExpectedException: "badattr" attribute is not allowed on the xsl:decimal-format element! -->
+
+<xsl:decimal-format NaN="non-numeric" badattr="bad" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('foo','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr05.xml b/test/tests/conferr/numberformaterr/numberformaterr05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr05.xsl b/test/tests/conferr/numberformaterr/numberformaterr05.xsl
new file mode 100644
index 0000000..c1581c1
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr05.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set one-character attribute grouping-separator too large in decimal-format. -->
+  <!-- ExpectedException: An XSLT attribute of type T_CHAR must be only 1 character -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: grouping-separator.  An attribute of type CHAR must be only 1 character! -->
+
+<xsl:decimal-format grouping-separator="toobig" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('7654321','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr06.xml b/test/tests/conferr/numberformaterr/numberformaterr06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr06.xsl b/test/tests/conferr/numberformaterr/numberformaterr06.xsl
new file mode 100644
index 0000000..ba199bd
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr06.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show what happens if there are any filler digits (#) between
+       zero-digits and the decimal-separator on the left. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: 00,000,###.000### -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(4030201.050607,'00,000,###.000###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr07.xml b/test/tests/conferr/numberformaterr/numberformaterr07.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr07.xsl b/test/tests/conferr/numberformaterr/numberformaterr07.xsl
new file mode 100644
index 0000000..a74d746
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr07.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show what happens if there are any filler digits (#) between
+       zero-digits and the decimal-separator on the right. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ##,000,000.###000 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(4030201.050607,'##,000,000.###000')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr08.xml b/test/tests/conferr/numberformaterr/numberformaterr08.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr08.xsl b/test/tests/conferr/numberformaterr/numberformaterr08.xsl
new file mode 100644
index 0000000..ddb66b5
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr08.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show what happens if there are any filler digits (#) between
+       zero-digits and the decimal-separator. Change both characters. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: #aa,aaa,!!!.!!!aaa0 -->
+
+<xsl:decimal-format digit="!" zero-digit="a" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(4030201.050607,'#aa,aaa,!!!.!!!aaa0')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr09.xml b/test/tests/conferr/numberformaterr/numberformaterr09.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr09.xsl b/test/tests/conferr/numberformaterr/numberformaterr09.xsl
new file mode 100644
index 0000000..7caae4b
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr09.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of two occurrences of the decimal-separator. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ##,000.000.0000 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(1886.201,'##,000.000.0000')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr10.xml b/test/tests/conferr/numberformaterr/numberformaterr10.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr10.xsl b/test/tests/conferr/numberformaterr/numberformaterr10.xsl
new file mode 100644
index 0000000..6041dee
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr10.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of grouping-separator after the decimal-separator. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: 0.000,###,###,### -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(1.0123456789,'0.000,###,###,###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr11.xml b/test/tests/conferr/numberformaterr/numberformaterr11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr11.xsl b/test/tests/conferr/numberformaterr/numberformaterr11.xsl
new file mode 100644
index 0000000..5907bd0
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr11.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set one-character attribute decimal-separator too large in decimal-format. -->
+  <!-- ExpectedException: An XSLT attribute of type T_CHAR must be only 1 character -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: decimal-separator.  An attribute of type CHAR must be only 1 character! -->
+
+<xsl:decimal-format decimal-separator="toobig" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('7654.321','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr12.xml b/test/tests/conferr/numberformaterr/numberformaterr12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr12.xsl b/test/tests/conferr/numberformaterr/numberformaterr12.xsl
new file mode 100644
index 0000000..d195d47
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr12.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set one-character attribute percent too large in decimal-format. -->
+  <!-- ExpectedException: An XSLT attribute of type T_CHAR must be only 1 character -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: percent.  An attribute of type CHAR must be only 1 character! -->
+
+<xsl:decimal-format percent="toobig" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('54.321','####.####toobig')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr13.xml b/test/tests/conferr/numberformaterr/numberformaterr13.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr13.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr13.xsl b/test/tests/conferr/numberformaterr/numberformaterr13.xsl
new file mode 100644
index 0000000..ef33e41
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr13.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set one-character attribute per-mille too large in decimal-format. -->
+  <!-- ExpectedException: An XSLT attribute of type T_CHAR must be only 1 character -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: per-mille.  An attribute of type CHAR must be only 1 character! -->
+
+<xsl:decimal-format per-mille="toobig" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('54.321','####.####toobig')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr14.xml b/test/tests/conferr/numberformaterr/numberformaterr14.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr14.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr14.xsl b/test/tests/conferr/numberformaterr/numberformaterr14.xsl
new file mode 100644
index 0000000..fa1167a
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr14.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set one-character attribute zero-digit too large in decimal-format. -->
+  <!-- ExpectedException: An XSLT attribute of type T_CHAR must be only 1 character -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: zero-digit.  An attribute of type CHAR must be only 1 character! -->
+
+<xsl:decimal-format zero-digit="toobig" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('54321','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr15.xml b/test/tests/conferr/numberformaterr/numberformaterr15.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr15.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr15.xsl b/test/tests/conferr/numberformaterr/numberformaterr15.xsl
new file mode 100644
index 0000000..38e14f0
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr15.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set one-character attribute digit too large in decimal-format. -->
+  <!-- ExpectedException: An XSLT attribute of type T_CHAR must be only 1 character -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: digit.  An attribute of type CHAR must be only 1 character! -->
+
+<xsl:decimal-format digit="toobig" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('32.1','toobig0.00')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr16.xml b/test/tests/conferr/numberformaterr/numberformaterr16.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr16.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr16.xsl b/test/tests/conferr/numberformaterr/numberformaterr16.xsl
new file mode 100644
index 0000000..943006c
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr16.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set one-character attribute pattern-separator too large in decimal-format. -->
+  <!-- ExpectedException: An XSLT attribute of type T_CHAR must be only 1 character -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: pattern-separator.  An attribute of type CHAR must be only 1 character! -->
+
+<xsl:decimal-format pattern-separator="toobig" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('-54321','000000toobig-######')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr17.xml b/test/tests/conferr/numberformaterr/numberformaterr17.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr17.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr17.xsl b/test/tests/conferr/numberformaterr/numberformaterr17.xsl
new file mode 100644
index 0000000..5f24883
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr17.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Set one-character attribute minus-sign too large in decimal-format. -->
+  <!-- ExpectedException: An XSLT attribute of type T_CHAR must be only 1 character -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: minus-sign.  An attribute of type CHAR must be only 1 character! -->
+
+
+<xsl:decimal-format minus-sign="toobig" />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('-7654321','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr18.xml b/test/tests/conferr/numberformaterr/numberformaterr18.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr18.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr18.xsl b/test/tests/conferr/numberformaterr/numberformaterr18.xsl
new file mode 100644
index 0000000..d2b20c5
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr18.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show what happens if there are any literal characters between
+       two groups of filler digits (#). -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ######zip###### -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(90232.0884,'######zip######')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr19.xml b/test/tests/conferr/numberformaterr/numberformaterr19.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr19.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr19.xsl b/test/tests/conferr/numberformaterr/numberformaterr19.xsl
new file mode 100644
index 0000000..a53e87e
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr19.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Show what happens if there are any literal characters between
+       two groups of zero digits. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: 000000zip000000 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(90232.0884,'000000zip000000')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr20.xml b/test/tests/conferr/numberformaterr/numberformaterr20.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr20.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr20.xsl b/test/tests/conferr/numberformaterr/numberformaterr20.xsl
new file mode 100644
index 0000000..0ec11a5
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr20.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put grouping separator adjacent to decimal-separator. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ######,.00 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(90232.0884,'######,.00')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr21.xml b/test/tests/conferr/numberformaterr/numberformaterr21.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr21.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr21.xsl b/test/tests/conferr/numberformaterr/numberformaterr21.xsl
new file mode 100644
index 0000000..dcf5179
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr21.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put grouping separator adjacent to percent. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ######,% -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(32.0884,'######,%')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr22.xml b/test/tests/conferr/numberformaterr/numberformaterr22.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr22.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr22.xsl b/test/tests/conferr/numberformaterr/numberformaterr22.xsl
new file mode 100644
index 0000000..1f32b17
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr22.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr22 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put grouping separator adjacent to per-mille character. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ######, -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(90232.0884,'######,&#8240;')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr23.xml b/test/tests/conferr/numberformaterr/numberformaterr23.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr23.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr23.xsl b/test/tests/conferr/numberformaterr/numberformaterr23.xsl
new file mode 100644
index 0000000..bcd84fc
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr23.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put grouping separator adjacent to pattern-separator. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ######,;000,000 -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-90232,'######,;000,000')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr24.xml b/test/tests/conferr/numberformaterr/numberformaterr24.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr24.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr24.xsl b/test/tests/conferr/numberformaterr/numberformaterr24.xsl
new file mode 100644
index 0000000..ff28895
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr24.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr24 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of percent in middle of format string. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ###%###.## -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('54.321','###%###.##')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr25.xml b/test/tests/conferr/numberformaterr/numberformaterr25.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr25.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr25.xsl b/test/tests/conferr/numberformaterr/numberformaterr25.xsl
new file mode 100644
index 0000000..d8e2858
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr25.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr25 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of per-mille in middle of format string. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ###&#8240;###.## --><!-- Note comparison may not work with entity value here -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('54.321','###&#8240;###.##')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr26.xml b/test/tests/conferr/numberformaterr/numberformaterr26.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr26.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr26.xsl b/test/tests/conferr/numberformaterr/numberformaterr26.xsl
new file mode 100644
index 0000000..0726bf0
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr26.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr26 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of more than two patterns. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: +##,###.000;-##,###.###;x##,###.### -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-26931.4,'+##,###.000;-##,###.###;x##,###.###')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr27.xml b/test/tests/conferr/numberformaterr/numberformaterr27.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr27.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr27.xsl b/test/tests/conferr/numberformaterr/numberformaterr27.xsl
new file mode 100644
index 0000000..9cfbbe7
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr27.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr27 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of both percent and per-mille in format string. -->
+  <!-- ExpectedException: java.lang.RuntimeException: Malformed format string -->
+  <!-- ExpectedException: Malformed format string: ######.##% -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number('54.321','######.##%&#8240;')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr28.xml b/test/tests/conferr/numberformaterr/numberformaterr28.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr28.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr28.xsl b/test/tests/conferr/numberformaterr/numberformaterr28.xsl
new file mode 100644
index 0000000..5807e21
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr28.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr28 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number with too few arguments. -->
+  <!-- ExpectedException: format-number() must have at least 2 arguments -->
+  <!-- ExpectedException: only allows 2 or 3 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(2392.14*36.58)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr29.xml b/test/tests/conferr/numberformaterr/numberformaterr29.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr29.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr29.xsl b/test/tests/conferr/numberformaterr/numberformaterr29.xsl
new file mode 100644
index 0000000..2e0d69c
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr29.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr29 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of format-number with too many arguments. -->
+  <!-- ExpectedException: format-number() must have at most 3 arguments -->
+  <!-- ExpectedException: only allows 2 or 3 arguments -->
+
+<xsl:decimal-format name="myminus" minus-sign='_' />
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="format-number(-2392.14*36.58,'#####0.000###','myminus',3407)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberformaterr/numberformaterr30.xml b/test/tests/conferr/numberformaterr/numberformaterr30.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr30.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberformaterr/numberformaterr30.xsl b/test/tests/conferr/numberformaterr/numberformaterr30.xsl
new file mode 100644
index 0000000..23e5c50
--- /dev/null
+++ b/test/tests/conferr/numberformaterr/numberformaterr30.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: NUMBERFORMATerr30 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.3 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test placement of decimal-format inside atemplate, which is illegal. -->
+  <!-- ExpectedException: Must put xsl:decimal-format outside any template. -->
+  <!-- ExpectedException: xsl:decimal-format is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:decimal-format NaN="non-numeric"/>
+    <xsl:value-of select="format-number('foo','#############')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberingerr/numberingerr01.xml b/test/tests/conferr/numberingerr/numberingerr01.xml
new file mode 100644
index 0000000..e3673c4
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr01.xml
@@ -0,0 +1,335 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+    <note>aab</note>
+    <note>bbb</note>
+    <note>ccb</note>
+    <note>ddb</note>
+    <note>eeb</note>
+    <note>ffb</note>
+    <note>ggb</note>
+    <note>hhb</note>
+    <note>iib</note>
+    <note>jjb</note>
+    <note>kkb</note>
+    <note>llb</note>
+    <note>mmb</note>
+    <note>nnb</note>
+    <note>oob</note>
+    <note>ppb</note>
+    <note>qqb</note>
+    <note>rrb</note>
+    <note>ssb</note>
+    <note>ttb</note>
+    <note>uub</note>
+    <note>vvb</note>
+    <note>wwb</note>
+    <note>xxb</note>
+    <note>yyb</note>
+    <note>aac</note>
+    <note>bbc</note>
+    <note>ccc</note>
+    <note>ddc</note>
+    <note>eec</note>
+    <note>ffc</note>
+    <note>ggc</note>
+    <note>hhc</note>
+    <note>iic</note>
+    <note>jjc</note>
+    <note>kkc</note>
+    <note>llc</note>
+    <note>mmc</note>
+    <note>nnc</note>
+    <note>ooc</note>
+    <note>ppc</note>
+    <note>qqc</note>
+    <note>rrc</note>
+    <note>ssc</note>
+    <note>ttc</note>
+    <note>uuc</note>
+    <note>vvc</note>
+    <note>wwc</note>
+    <note>xxc</note>
+    <note>yyc</note>
+    <note>aad</note>
+    <note>bbd</note>
+    <note>ccd</note>
+    <note>ddd</note>
+    <note>eed</note>
+    <note>ffd</note>
+    <note>ggd</note>
+    <note>hhd</note>
+    <note>iid</note>
+    <note>jjd</note>
+    <note>kkd</note>
+    <note>lld</note>
+    <note>mmd</note>
+    <note>nnd</note>
+    <note>ood</note>
+    <note>ppd</note>
+    <note>qqd</note>
+    <note>rrd</note>
+    <note>ssd</note>
+    <note>ttd</note>
+    <note>uud</note>
+    <note>vvd</note>
+    <note>wwd</note>
+    <note>xxd</note>
+    <note>yyd</note>
+    <note>aae</note>
+    <note>bbe</note>
+    <note>cce</note>
+    <note>dde</note>
+    <note>eee</note>
+    <note>ffe</note>
+    <note>gge</note>
+    <note>hhe</note>
+    <note>iie</note>
+    <note>jje</note>
+    <note>kke</note>
+    <note>lle</note>
+    <note>mme</note>
+    <note>nne</note>
+    <note>ooe</note>
+    <note>ppe</note>
+    <note>qqe</note>
+    <note>rre</note>
+    <note>sse</note>
+    <note>tte</note>
+    <note>uue</note>
+    <note>vve</note>
+    <note>wwe</note>
+    <note>xxe</note>
+    <note>yye</note>
+    <note>aaf</note>
+    <note>bbf</note>
+    <note>ccf</note>
+    <note>ddf</note>
+    <note>eef</note>
+    <note>fff</note>
+    <note>ggf</note>
+    <note>hhf</note>
+    <note>iif</note>
+    <note>jjf</note>
+    <note>kkf</note>
+    <note>llf</note>
+    <note>mmf</note>
+    <note>nnf</note>
+    <note>oof</note>
+    <note>ppf</note>
+    <note>qqf</note>
+    <note>rrf</note>
+    <note>ssf</note>
+    <note>ttf</note>
+    <note>uuf</note>
+    <note>vvf</note>
+    <note>wwf</note>
+    <note>xxf</note>
+    <note>yyf</note>
+    <note>aag</note>
+    <note>bbg</note>
+    <note>ccg</note>
+    <note>ddg</note>
+    <note>eeg</note>
+    <note>ffg</note>
+    <note>ggg</note>
+    <note>hhg</note>
+    <note>iig</note>
+    <note>jjg</note>
+    <note>kkg</note>
+    <note>llg</note>
+    <note>mmg</note>
+    <note>nng</note>
+    <note>oog</note>
+    <note>ppg</note>
+    <note>qqg</note>
+    <note>rrg</note>
+    <note>ssg</note>
+    <note>ttg</note>
+    <note>uug</note>
+    <note>vvg</note>
+    <note>wwg</note>
+    <note>xxg</note>
+    <note>yyg</note>
+    <note>aah</note>
+    <note>bbh</note>
+    <note>cch</note>
+    <note>ddh</note>
+    <note>eeh</note>
+    <note>ffh</note>
+    <note>ggh</note>
+    <note>hhh</note>
+    <note>iih</note>
+    <note>jjh</note>
+    <note>kkh</note>
+    <note>llh</note>
+    <note>mmh</note>
+    <note>nnh</note>
+    <note>ooh</note>
+    <note>pph</note>
+    <note>qqh</note>
+    <note>rrh</note>
+    <note>ssh</note>
+    <note>tth</note>
+    <note>uuh</note>
+    <note>vvh</note>
+    <note>wwh</note>
+    <note>xxh</note>
+    <note>yyh</note>
+    <note>aai</note>
+    <note>bbi</note>
+    <note>cci</note>
+    <note>ddi</note>
+    <note>eei</note>
+    <note>ffi</note>
+    <note>ggi</note>
+    <note>hhi</note>
+    <note>iii</note>
+    <note>jji</note>
+    <note>kki</note>
+    <note>lli</note>
+    <note>mmi</note>
+    <note>nni</note>
+    <note>ooi</note>
+    <note>ppi</note>
+    <note>qqi</note>
+    <note>rri</note>
+    <note>ssi</note>
+    <note>tti</note>
+    <note>uui</note>
+    <note>vvi</note>
+    <note>wwi</note>
+    <note>xxi</note>
+    <note>yyi</note>
+    <note>aaj</note>
+    <note>bbj</note>
+    <note>ccj</note>
+    <note>ddj</note>
+    <note>eej</note>
+    <note>ffj</note>
+    <note>ggj</note>
+    <note>hhj</note>
+    <note>iij</note>
+    <note>jjj</note>
+    <note>kkj</note>
+    <note>llj</note>
+    <note>mmj</note>
+    <note>nnj</note>
+    <note>ooj</note>
+    <note>ppj</note>
+    <note>qqj</note>
+    <note>rrj</note>
+    <note>ssj</note>
+    <note>ttj</note>
+    <note>uuj</note>
+    <note>vvj</note>
+    <note>wwj</note>
+    <note>xxj</note>
+    <note>yyj</note>
+    <note>aak</note>
+    <note>bbk</note>
+    <note>cck</note>
+    <note>ddk</note>
+    <note>eek</note>
+    <note>ffk</note>
+    <note>ggk</note>
+    <note>hhk</note>
+    <note>iik</note>
+    <note>jjk</note>
+    <note>kkk</note>
+    <note>llk</note>
+    <note>mmk</note>
+    <note>nnk</note>
+    <note>ook</note>
+    <note>ppk</note>
+    <note>qqk</note>
+    <note>rrk</note>
+    <note>ssk</note>
+    <note>ttk</note>
+    <note>uuk</note>
+    <note>vvk</note>
+    <note>wwk</note>
+    <note>xxk</note>
+    <note>yyk</note>
+    <note>aal</note>
+    <note>bbl</note>
+    <note>ccl</note>
+    <note>ddl</note>
+    <note>eel</note>
+    <note>ffl</note>
+    <note>ggl</note>
+    <note>hhl</note>
+    <note>iil</note>
+    <note>jjl</note>
+    <note>kkl</note>
+    <note>lll</note>
+    <note>mml</note>
+    <note>nnl</note>
+    <note>ool</note>
+    <note>ppl</note>
+    <note>qql</note>
+    <note>rrl</note>
+    <note>ssl</note>
+    <note>ttl</note>
+    <note>uul</note>
+    <note>vvl</note>
+    <note>wwl</note>
+    <note>xxl</note>
+    <note>yyl</note>
+    <note>aam</note>
+    <note>bbm</note>
+    <note>ccm</note>
+    <note>ddm</note>
+    <note>eem</note>
+    <note>ffm</note>
+    <note>ggm</note>
+    <note>hhm</note>
+    <note>iim</note>
+    <note>jjm</note>
+    <note>kkm</note>
+    <note>llm</note>
+    <note>mmm</note>
+    <note>nnm</note>
+    <note>oom</note>
+    <note>ppm</note>
+    <note>qqm</note>
+    <note>rrm</note>
+    <note>ssm</note>
+    <note>ttm</note>
+    <note>uum</note>
+    <note>vvm</note>
+    <note>wwm</note>
+    <note>xxm</note>
+    <note>yym</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberingerr/numberingerr01.xsl b/test/tests/conferr/numberingerr/numberingerr01.xsl
new file mode 100644
index 0000000..5e5e5ef
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr01.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numberingerr01 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of excessive size of grouping-separator. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[6]/text()[1]" -->
+  <!-- Scenario: operation="message" StandardError="grouping-separator must be one character long." -->
+  <!-- ExpectedException: Illegal value: toobig used for CHAR attribute: grouping-separator.  An attribute of type CHAR must be only 1 character! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="(1) " grouping-size="2" grouping-separator="toobig" />
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberingerr/numberingerr02.xml b/test/tests/conferr/numberingerr/numberingerr02.xml
new file mode 100644
index 0000000..f44e3d5
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr02.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberingerr/numberingerr02.xsl b/test/tests/conferr/numberingerr/numberingerr02.xsl
new file mode 100644
index 0000000..3e322d3
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr02.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numberingerr02 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of bad value for level attribute. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[1]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="message" StandardError="Bad value on level attribute: sides" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="sides" from="chapter" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberingerr/numberingerr03.xml b/test/tests/conferr/numberingerr/numberingerr03.xml
new file mode 100644
index 0000000..13d99e6
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr03.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+  </chapter>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberingerr/numberingerr03.xsl b/test/tests/conferr/numberingerr/numberingerr03.xsl
new file mode 100644
index 0000000..f7312e9
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr03.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numberingerr03 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of bad specification for letter-value. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[5]/text()[1]" -->
+  <!-- Scenario: operation="message" StandardError="Bad value on letter-value attribute" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="any" from="chapter" format="&#x03b1;" letter-value="invalid"/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberingerr/numberingerr04.xml b/test/tests/conferr/numberingerr/numberingerr04.xml
new file mode 100644
index 0000000..b7f0e89
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr04.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<doc>
+  <note>aaa</note>
+  <note>bbb</note>
+  <note>ccc</note>
+  <chapter>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+  </chapter>
+  <note>ggg</note>
+  <note>hhh</note>
+  <note>iii</note>
+  <chapter>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+  </chapter>
+  <note>mmm</note>
+  <note>nnn</note>
+  <note>ooo</note>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberingerr/numberingerr04.xsl b/test/tests/conferr/numberingerr/numberingerr04.xsl
new file mode 100644
index 0000000..121b446
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr04.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numberingerr04 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test invalid path specified in from. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[3]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="message" StandardError="from attribute must be a node-set" -->
+  <!-- ExpectedException: Unknown nodetype: true -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="note">
+  <xsl:number level="single" from="true()" format="(1) "/>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberingerr/numberingerr05.xml b/test/tests/conferr/numberingerr/numberingerr05.xml
new file mode 100644
index 0000000..e6e98cf
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr05.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<doc>
+  <title>Test for source tree numbering</title>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+    </b>
+  </a>
+  <a>
+    <title>Level A</title>
+    <b>
+      <title>Level B</title>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+        <d>
+          <title>Level D</title>
+          <e>
+            <title>Level E</title>
+          </e>
+        </d>
+      </c>
+      <c>
+        <title>Level C</title>
+        <d>
+          <title>Level D</title>
+        </d>
+      </c>
+    </b>
+    <b>
+      <title>Level B</title>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberingerr/numberingerr05.xsl b/test/tests/conferr/numberingerr/numberingerr05.xsl
new file mode 100644
index 0000000..9d96616
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr05.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numberingerr05 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test invalid path specified in count. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="message" StandardError="count attribute must be a node-set" -->
+  <!-- ExpectedException: Unknown nodetype: true -->
+
+<xsl:template match="doc">
+  <out><xsl:apply-templates/></out>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:number level="any" count="true()" format="1"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberingerr/numberingerr06.xml b/test/tests/conferr/numberingerr/numberingerr06.xml
new file mode 100644
index 0000000..bcae948
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr06.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<doc>
+  <chapter>
+    <note>aaa</note>
+    <note>bbb</note>
+    <note>ccc</note>
+    <note>ddd</note>
+    <note>eee</note>
+    <note>fff</note>
+    <note>ggg</note>
+    <note>hhh</note>
+    <note>iii</note>
+    <note>jjj</note>
+    <note>kkk</note>
+    <note>lll</note>
+    <note>mmm</note>
+    <note>nnn</note>
+    <note>ooo</note>
+    <note>ppp</note>
+    <note>qqq</note>
+    <note>rrr</note>
+    <note>sss</note>
+    <note>ttt</note>
+    <note>uuu</note>
+    <note>vvv</note>
+    <note>www</note>
+    <note>xxx</note>
+    <note>yyy</note>
+  </chapter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberingerr/numberingerr06.xsl b/test/tests/conferr/numberingerr/numberingerr06.xsl
new file mode 100644
index 0000000..326588d
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr06.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numberingerr06 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Test of attempt to express negative numbers in Roman numerals. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[5]/p[1]/text()[1]" -->
+  <!-- Scenario: operation="message" StandardError="I and i can only format positive numbers" -->
+  <!-- Discretionary: number-not-positive="raise-error" -->
+  <!-- Gray-area: number-NaN-handling="raise-error" -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="chapter">
+  <xsl:for-each select="note">
+    <xsl:number format="(I) " value="position() -10" />
+    <xsl:value-of select="."/><xsl:text>&#10;</xsl:text>
+  </xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/numberingerr/numberingerr07.xml b/test/tests/conferr/numberingerr/numberingerr07.xml
new file mode 100644
index 0000000..e1e425a
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr07.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<doc>
+  <ol>
+    <item>aaa</item>
+    <item>bbb</item>
+    <item>ccc</item>
+    <item>ddd</item>
+  </ol>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/numberingerr/numberingerr07.xsl b/test/tests/conferr/numberingerr/numberingerr07.xsl
new file mode 100644
index 0000000..f65b36d
--- /dev/null
+++ b/test/tests/conferr/numberingerr/numberingerr07.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- CaseName: numberingerr07 -->
+  <!-- Author: David Marston -->
+  <!-- Purpose: Put xsl:number at top level, which is illegal. -->
+  <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(stylesheet-element)/p[3]/text()[1]" -->
+  <!-- Scenario: operation="message" StandardError="xsl:number not allowed inside a stylesheet" -->
+  <!-- ExpectedException: xsl:number is not allowed in this position in the stylesheet -->
+
+<xsl:number count="item" from="ol"/>
+
+<xsl:template match="doc">
+  <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr01.xml b/test/tests/conferr/outputerr/outputerr01.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr01.xsl b/test/tests/conferr/outputerr/outputerr01.xsl
new file mode 100644
index 0000000..c03f224
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr01.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: outperr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.1 Generating Text with xsl:value -->
+  <!-- Purpose: Test error reporting for missing required select attribute. -->
+  <!-- ExpectedException: xsl:value-of requires a select attribute. -->
+  <!-- ExpectedException: xsl:value-of requires attribute: select -->
+
+<xsl:template match="/">
+	<xsl:value-of/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr02.xml b/test/tests/conferr/outputerr/outputerr02.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr02.xsl b/test/tests/conferr/outputerr/outputerr02.xsl
new file mode 100644
index 0000000..2ead9f1
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr02.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" 
+            doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: OUTPerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.3 Creating Processing Instructions -->
+  <!-- Purpose: Try to create processing instruction without a name. -->
+  <!-- ExpectedException: xsl:processing-instruction must have a name attribute. -->
+  <!-- ExpectedException: xsl:processing-instruction requires attribute: name -->
+
+<xsl:template match="/">
+ <HTML>
+   <xsl:processing-instruction>href="book.css" type="text/css"</xsl:processing-instruction>
+ </HTML>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr03.xml b/test/tests/conferr/outputerr/outputerr03.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr03.xsl b/test/tests/conferr/outputerr/outputerr03.xsl
new file mode 100644
index 0000000..6020fcd
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr03.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html"
+            doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: outputerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.3 Creating Processing Instructions -->
+  <!-- Purpose: Try to create processing instruction with "xml" as name. -->
+  <!-- ExpectedException: processing-instruction name can not be 'xml' -->
+
+<xsl:template match="/">
+ <HTML>
+   <xsl:processing-instruction name="xml">href="book.css" type="text/css"</xsl:processing-instruction>
+ </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr04.xml b/test/tests/conferr/outputerr/outputerr04.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr04.xsl b/test/tests/conferr/outputerr/outputerr04.xsl
new file mode 100644
index 0000000..ed2e368
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html"
+            doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
+
+  <!-- FileName: outputerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.3 Creating Processing Instructions -->
+  <!-- Purpose: Try to create processing instruction with an improper name. -->
+  <!-- ExpectedException: processing-instruction name must be a valid NCName: + -->
+
+<xsl:template match="/">
+ <HTML>
+   <xsl:processing-instruction name="+">href="book.css" type="text/css"</xsl:processing-instruction>
+ </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr05.xml b/test/tests/conferr/outputerr/outputerr05.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr05.xsl b/test/tests/conferr/outputerr/outputerr05.xsl
new file mode 100644
index 0000000..34e7e3b
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr05.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.3 Creating Processing Instructions -->
+  <!-- Purpose: Put processing-instruction at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:processing-instruction is not allowed in this position in the stylesheet -->
+  
+<xsl:processing-instruction name="my-pi">href="book.css" type="text/css"</xsl:processing-instruction>
+
+<xsl:template match="/">
+ <out>This should fail</out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr06.xml b/test/tests/conferr/outputerr/outputerr06.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr06.xsl b/test/tests/conferr/outputerr/outputerr06.xsl
new file mode 100644
index 0000000..3225f2b
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr06.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html"/>
+
+  <!-- FileName: OUTPerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.2 Creating Text -->
+  <!-- Purpose: Test for bad child in xsl:text -->
+  <!-- ExpectedException: Can not add xsl:value-of to xsl:text -->
+  <!-- ExpectedException: ElemTemplateElement error: Can not add xsl:value-of to xsl:text -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: ElemTemplateElement error: Can not add xsl:value-of to xsl:text -->
+  <!-- ExpectedException: xsl:value-of is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="/">
+  <HTML>
+    <BODY>
+      <xsl:text disable-output-escaping="yes"><xsl:value-of select="2 + 2"/></xsl:text>
+    </BODY>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr07.xml b/test/tests/conferr/outputerr/outputerr07.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr07.xsl b/test/tests/conferr/outputerr/outputerr07.xsl
new file mode 100644
index 0000000..9505b0f
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr07.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Purpose: Put attribute at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:attribute is not allowed in this position in the stylesheet -->
+
+<xsl:attribute name="badattr">foo</xsl:attribute>
+
+<xsl:template match="/">
+ <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr08.xml b/test/tests/conferr/outputerr/outputerr08.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr08.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr08.xsl b/test/tests/conferr/outputerr/outputerr08.xsl
new file mode 100644
index 0000000..3e1fb9e
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr08.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.4 Creating Comments -->
+  <!-- Purpose: Put comment at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:comment is not allowed in this position in the stylesheet -->
+
+<xsl:comment>boo</xsl:comment>
+
+<xsl:template match="/">
+ <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr09.xml b/test/tests/conferr/outputerr/outputerr09.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr09.xsl b/test/tests/conferr/outputerr/outputerr09.xsl
new file mode 100644
index 0000000..0aedffc
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr09.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.2 Creating Elements -->
+  <!-- Purpose: Put element at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:element is not allowed in this position in the stylesheet -->
+
+<xsl:element name="elk">foo</xsl:element>
+
+<xsl:template match="/">
+ <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr10.xml b/test/tests/conferr/outputerr/outputerr10.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr10.xsl b/test/tests/conferr/outputerr/outputerr10.xsl
new file mode 100644
index 0000000..198ec6e
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr10.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPerr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.2 Creating Text -->
+  <!-- Purpose: Put xsl:text at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:text is not allowed in this position in the stylesheet -->
+
+<xsl:text>boo</xsl:text>
+
+<xsl:template match="/">
+ <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr11.xml b/test/tests/conferr/outputerr/outputerr11.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr11.xsl b/test/tests/conferr/outputerr/outputerr11.xsl
new file mode 100644
index 0000000..98d1704
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr11.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPerr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.6.1 Generating Text -->
+  <!-- Purpose: Put value-of at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:value-of is not allowed in this position in the stylesheet -->
+
+<xsl:value-of select="concat('f','o','o')"/>
+
+<xsl:template match="/">
+ <out>This should fail</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr12.xml b/test/tests/conferr/outputerr/outputerr12.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr12.xsl b/test/tests/conferr/outputerr/outputerr12.xsl
new file mode 100644
index 0000000..8e2bb8c
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr12.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: outperr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16 -->
+  <!-- Purpose: Test placement of xsl:output inside atemplate, which is illegal. -->
+  <!-- ExpectedException: Must put xsl:output outside any template. -->
+  <!-- ExpectedException: xsl:output is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="/">
+  <xsl:output method="html"/>
+  <HTML>
+  </HTML>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr13.xml b/test/tests/conferr/outputerr/outputerr13.xml
new file mode 100644
index 0000000..89fef58
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <tag>Hello</tag>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr13.xsl b/test/tests/conferr/outputerr/outputerr13.xsl
new file mode 100644
index 0000000..aa2a3d7
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr13.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: outputerr13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.3 Creating Processing Instructions -->
+  <!-- Purpose: Instructions that are content of xsl:processing-instruction can't create
+      nodes other than text nodes. -->
+  <!-- ExpectedException: Can not add xsl:element to xsl:processing-instruction -->
+  <!-- ExpectedException: xsl:element is not allowed in this position in the stylesheet -->
+
+<xsl:template match="doc/tag">
+  <out>
+    <xsl:processing-instruction name="mytag">
+      <xsl:element name="trythis">
+        <xsl:value-of select="."/>
+      </xsl:element>
+    </xsl:processing-instruction>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/outputerr/outputerr14.xml b/test/tests/conferr/outputerr/outputerr14.xml
new file mode 100644
index 0000000..87fce57
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr14.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <dat>two</dat>
+  <dat>222</dat>
+  <dat>&#xa9;2000</dat>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/outputerr/outputerr14.xsl b/test/tests/conferr/outputerr/outputerr14.xsl
new file mode 100644
index 0000000..104c6f2
--- /dev/null
+++ b/test/tests/conferr/outputerr/outputerr14.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: OUTPerr14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 16.3 Text Output Method -->
+  <!-- Purpose: Attempt text output of characters above 127 when encoding doesn't support them. -->
+  <!-- "If the result tree contains a character that cannot be represented in the encoding
+       that the XSLT processor is using for output, the XSLT processor should signal an error." -->
+  <!-- ExpectedException: Attempt to output character not represented in specified encoding. -->
+  <!-- ExpectedException: Attempt to output character of integral value 264 that is not represented in specified output encoding of US-ASCII. -->
+
+<xsl:output method="text" encoding="US-ASCII"/>
+
+<xsl:template match="doc">
+  <xsl:apply-templates select="dat"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template match="dat">
+  <xsl:text>&#264;</xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/positionerr/positionerr01.xml b/test/tests/conferr/positionerr/positionerr01.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr01.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/positionerr/positionerr01.xsl b/test/tests/conferr/positionerr/positionerr01.xsl
new file mode 100644
index 0000000..9e0ee3e
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr01.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: positionerr01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Last should not have any arguments. -->
+  <!-- ExpectedException: zero arguments expected  -->
+  <!-- ExpectedException: FuncLast only allows 0 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    Last is h: <xsl:value-of select="*[last(*,2)]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/positionerr/positionerr02.xml b/test/tests/conferr/positionerr/positionerr02.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr02.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/positionerr/positionerr02.xsl b/test/tests/conferr/positionerr/positionerr02.xsl
new file mode 100644
index 0000000..aa07689
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr02.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: positionerr02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: position() should not have any arguments. -->
+  <!-- ExpectedException: zero arguments expected  -->
+  <!-- ExpectedException: FuncPosition only allows 0 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="position(b)=1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/positionerr/positionerr03.xml b/test/tests/conferr/positionerr/positionerr03.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr03.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/positionerr/positionerr03.xsl b/test/tests/conferr/positionerr/positionerr03.xsl
new file mode 100644
index 0000000..16a7495
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr03.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: positionerr03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test too few arguments to count(). -->
+  <!-- ExpectedException: The count function should take one argument -->
+  <!-- ExpectedException: FuncCount only allows 1 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count()"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/positionerr/positionerr04.xml b/test/tests/conferr/positionerr/positionerr04.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr04.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/positionerr/positionerr04.xsl b/test/tests/conferr/positionerr/positionerr04.xsl
new file mode 100644
index 0000000..7f6fe59
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: positionerr04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test too many arguments to count(). -->
+  <!-- ExpectedException: The count function should take one argument -->
+  <!-- ExpectedException: FuncCount only allows 1 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(*,4)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/positionerr/positionerr05.xml b/test/tests/conferr/positionerr/positionerr05.xml
new file mode 100644
index 0000000..395a336
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr05.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+  <a test="true">a</a>
+  <a>b</a>
+  <a test="false">c</a>
+  <a test="true">d</a>
+  <a>e</a>
+  <a test="false">f</a>
+  <a test="true">g</a>
+  <a test="false">h</a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/positionerr/positionerr05.xsl b/test/tests/conferr/positionerr/positionerr05.xsl
new file mode 100644
index 0000000..d04ce70
--- /dev/null
+++ b/test/tests/conferr/positionerr/positionerr05.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: positionerr05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 Node Set Functions -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: last() should not have any arguments. -->
+  <!-- ExpectedException: zero arguments expected  -->
+  <!-- ExpectedException: FuncLast only allows 0 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="position()=last(a)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr01.xml b/test/tests/conferr/processorinfoerr/processorinfoerr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr01.xsl b/test/tests/conferr/processorinfoerr/processorinfoerr01.xsl
new file mode 100644
index 0000000..27e782c
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr01.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PROPerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Test bad argument to system-property -->
+  <!-- ExpectedException: XSL Property not supported -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="system-property('xsl:if')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr02.xml b/test/tests/conferr/processorinfoerr/processorinfoerr02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr02.xsl b/test/tests/conferr/processorinfoerr/processorinfoerr02.xsl
new file mode 100644
index 0000000..86333fa
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr02.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PROPerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Test bad argument to system-property, no namespace -->
+  <!-- ExpectedException: Property not supported -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="system-property('size')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr03.xml b/test/tests/conferr/processorinfoerr/processorinfoerr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr03.xsl b/test/tests/conferr/processorinfoerr/processorinfoerr03.xsl
new file mode 100644
index 0000000..d0423e5
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr03.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:lotus="http://www.lotus.com">
+
+  <!-- FileName: PROPerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Test bad argument to system-property, different namespace -->
+  <!-- ExpectedException: property not supported -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="system-property('lotus:version')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr04.xml b/test/tests/conferr/processorinfoerr/processorinfoerr04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr04.xsl b/test/tests/conferr/processorinfoerr/processorinfoerr04.xsl
new file mode 100644
index 0000000..6872942
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr04.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PROPerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Test too few arguments to system-property -->
+  <!-- ExpectedException: system-property requires one argument -->
+  <!-- ExpectedException: FuncSystemProperty only allows 1 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="system-property()"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr05.xml b/test/tests/conferr/processorinfoerr/processorinfoerr05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr05.xsl b/test/tests/conferr/processorinfoerr/processorinfoerr05.xsl
new file mode 100644
index 0000000..7adaa9c
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr05.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: PROPerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Purpose: Test too many arguments to system-property -->
+  <!-- ExpectedException: system-property requires one argument -->
+  <!-- ExpectedException: FuncSystemProperty only allows 1 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="system-property('xsl:version','xsl:vendor')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr06.xml b/test/tests/conferr/processorinfoerr/processorinfoerr06.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr06.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/conferr/processorinfoerr/processorinfoerr06.xsl b/test/tests/conferr/processorinfoerr/processorinfoerr06.xsl
new file mode 100644
index 0000000..72193cd
--- /dev/null
+++ b/test/tests/conferr/processorinfoerr/processorinfoerr06.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: processorinfoerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test bad argument to system-property, QName's prefix undeclared -->
+  <!-- ExpectedException: property not supported -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="system-property('lotus:version')"/>
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr01.xml b/test/tests/conferr/selecterr/selecterr01.xml
new file mode 100644
index 0000000..afa62eb
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr01.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<doc>
+this text shouldn't be here.
+</doc>
diff --git a/test/tests/conferr/selecterr/selecterr01.xsl b/test/tests/conferr/selecterr/selecterr01.xsl
new file mode 100644
index 0000000..dbf4a4d
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr01.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for select with empty value. -->
+  <!-- ExpectedException: null expression selected -->
+  <!-- ExpectedException: Empty expression! --><!-- Not a great error, but probably close enough -sc -->
+
+<xsl:template match="/">
+  <xsl:apply-templates select=""/>
+</xsl:template>
+
+<xsl:template match="*">
+  We found a node!
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr02.xml b/test/tests/conferr/selecterr/selecterr02.xml
new file mode 100644
index 0000000..f67c222
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr02.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">
+    <item type="z">a</item>
+    <item type="c">b</item>
+    <item type="x">c</item>
+  </foo>
+  <foo name="y">
+    <item type="y">d</item>
+    <item type="h">e</item>
+    <item type="k">f</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr02.xsl b/test/tests/conferr/selecterr/selecterr02.xsl
new file mode 100644
index 0000000..a587bcc
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr02.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test for-each lacking a select. -->
+  <!-- ExpectedException: xsl:for-each requires attribute: select -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each>
+      <xsl:copy-of select="//item"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr03.xml b/test/tests/conferr/selecterr/selecterr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr03.xsl b/test/tests/conferr/selecterr/selecterr03.xsl
new file mode 100644
index 0000000..4380338
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr03.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" where a node-set is expected. -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="count(troo())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr04.xml b/test/tests/conferr/selecterr/selecterr04.xml
new file mode 100644
index 0000000..f67c222
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr04.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">
+    <item type="z">a</item>
+    <item type="c">b</item>
+    <item type="x">c</item>
+  </foo>
+  <foo name="y">
+    <item type="y">d</item>
+    <item type="h">e</item>
+    <item type="k">f</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr04.xsl b/test/tests/conferr/selecterr/selecterr04.xsl
new file mode 100644
index 0000000..c92a6b3
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr04.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 12.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to provide an argument to current(). -->
+  <!-- ExpectedException: current() must not have any arguments -->
+  <!-- ExpectedException: FuncCurrent only allows 0 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="foo">
+      <xsl:copy-of select="//item[@type=current(doc)/@name]"/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr05.xml b/test/tests/conferr/selecterr/selecterr05.xml
new file mode 100644
index 0000000..e2e6f03
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr05.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr05.xsl b/test/tests/conferr/selecterr/selecterr05.xsl
new file mode 100644
index 0000000..5517022
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr05.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Put xsl:for-each at top level, which is illegal. -->
+  <!-- ExpectedException: xsl:for-each is not allowed in this position in the stylesheet -->
+
+<xsl:for-each select="/doc/foo">
+  <xsl:text>This should fail</xsl:text>
+</xsl:for-each>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr06.xml b/test/tests/conferr/selecterr/selecterr06.xml
new file mode 100644
index 0000000..50012a9
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr06.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<doc>
+  <child>bad1
+    <sub>bad2</sub>
+  </child>
+  <c>bad3
+    <sub>bad4</sub>
+  </c>
+  <sub>OK
+    <nogo>bad5</nogo>
+  </sub>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr06.xsl b/test/tests/conferr/selecterr/selecterr06.xsl
new file mode 100644
index 0000000..a2e8a8c
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr06.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName followed by :: must be recognized as an AxisName. -->
+  <!-- ExpectedException: illegal axis name: c -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="c::sub">
+      <xsl:value-of select="./text()"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr07.xml b/test/tests/conferr/selecterr/selecterr07.xml
new file mode 100644
index 0000000..c2c21e4
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr07.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+<doc>bad0
+  <!-- Good -->
+  <comment>bad1
+    <sub>bad2</sub>
+  </comment>
+  <c>bad3</c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr07.xsl b/test/tests/conferr/selecterr/selecterr07.xsl
new file mode 100644
index 0000000..c5fcf5d
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr07.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: NCName followed by ( must be recognized as a NodeType
+      or FunctionName. -->
+  <!-- ExpectedException: Could not find function: c -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="c()">
+      <xsl:copy/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr08.xml b/test/tests/conferr/selecterr/selecterr08.xml
new file mode 100644
index 0000000..0a2f3e0
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>14</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr08.xsl b/test/tests/conferr/selecterr/selecterr08.xsl
new file mode 100644
index 0000000..7ead2d0
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr08.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: name after ) must be treated as operator -->
+  <!-- ExpectedException: Extra illegal tokens: 'foo', '2' -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="(* - 4) foo 2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr09.xml b/test/tests/conferr/selecterr/selecterr09.xml
new file mode 100644
index 0000000..2e5a6c6
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr09.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <div>6</div>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr09.xsl b/test/tests/conferr/selecterr/selecterr09.xsl
new file mode 100644
index 0000000..cfdd7fe
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr09.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.7 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: . after number but with space should be treated as path -->
+  <!-- ExpectedException: Extra illegal tokens: '.', '+', '*' -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+  </out>
+</xsl:template>
+
+<xsl:template match="div">
+  <xsl:value-of select="5 . + *"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr10.xml b/test/tests/conferr/selecterr/selecterr10.xml
new file mode 100644
index 0000000..cab4c62
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr10.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a><b attr="test"/></a>
+  <c>
+    <d>
+      <e/>
+    </d>
+  </c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr10.xsl b/test/tests/conferr/selecterr/selecterr10.xsl
new file mode 100644
index 0000000..795a105
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr10.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 Repetition -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use a number where a node-set is needed in for-each.-->
+  <!-- ExpectedException: XPATH: Can not convert #UNKNOWN to a NodeList -->
+  <!-- ExpectedException: Can not convert #NUMBER to a NodeList! -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="4">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr11.xml b/test/tests/conferr/selecterr/selecterr11.xml
new file mode 100644
index 0000000..cab4c62
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr11.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a><b attr="test"/></a>
+  <c>
+    <d>
+      <e/>
+    </d>
+  </c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr11.xsl b/test/tests/conferr/selecterr/selecterr11.xsl
new file mode 100644
index 0000000..2bb10a6
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr11.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 Repetition -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use a boolean where a node-set is needed in for-each.-->
+  <!-- ExpectedException: XPATH: Can not convert #UNKNOWN to a NodeList -->
+  <!-- ExpectedException: Can not convert #BOOLEAN to a NodeList! -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="true()">
+      <xsl:value-of select="."/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr12.xml b/test/tests/conferr/selecterr/selecterr12.xml
new file mode 100644
index 0000000..a31b5b9
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr12.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+  <critter type="dog"><name>Lassie</name></critter>
+  <human><name>Anne</name></human>
+  <critter type="dog"><name>Wishbone</name></critter>
+  <critter type="cat"><name>Felix</name></critter>
+  <critter type="cat"><name>Sylvester</name></critter>
+  <critter type="porcupine"><name>Porky</name></critter>
+  <human><name>Elissa</name></human>
+  <critter type="cat"><name>TopCat</name></critter>
+  <critter type="turtle"><name>Churchy</name></critter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr12.xsl b/test/tests/conferr/selecterr/selecterr12.xsl
new file mode 100644
index 0000000..166cfc3
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr12.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 Repetition -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use a string where a node-set is needed in for-each.-->
+  <!-- ExpectedException: XPATH: Can not convert #UNKNOWN to a NodeList -->
+  <!-- ExpectedException: Can not convert #STRING to a NodeList! -->
+
+<xsl:variable name="which" select="'fish'"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="$which">
+      <xsl:value-of select="name"/><xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr13.xml b/test/tests/conferr/selecterr/selecterr13.xml
new file mode 100644
index 0000000..9705605
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr13.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" ?>
+<doc>
+  test
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr13.xsl b/test/tests/conferr/selecterr/selecterr13.xsl
new file mode 100644
index 0000000..e2ab05e
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr13.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 8 Repetition -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use an RTF where a node-set is needed in for-each.-->
+  <!-- ExpectedException: XPATH: Can not convert #UNKNOWN to a NodeList -->
+  <!-- ExpectedException: Can not convert #RTREEFRAG to a NodeList! -->
+
+<xsl:variable name="ResultTreeFragTest">
+  <xsl:value-of select="doc"/>
+</xsl:variable>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:for-each select="$ResultTreeFragTest">
+      <xsl:value-of select="name"/><xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr14.xml b/test/tests/conferr/selecterr/selecterr14.xml
new file mode 100644
index 0000000..cab4c62
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr14.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a><b attr="test"/></a>
+  <c>
+    <d>
+      <e/>
+    </d>
+  </c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr14.xsl b/test/tests/conferr/selecterr/selecterr14.xsl
new file mode 100644
index 0000000..6d0c778
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr14.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use a number where a node-set is needed in apply-templates.-->
+  <!-- ExpectedException: XPATH: Can not convert #UNKNOWN to a NodeList -->
+  <!-- ExpectedException: Can not convert #NUMBER to a NodeList! -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="4"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>.</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr15.xml b/test/tests/conferr/selecterr/selecterr15.xml
new file mode 100644
index 0000000..cab4c62
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr15.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+<doc>
+  <a><b attr="test"/></a>
+  <c>
+    <d>
+      <e/>
+    </d>
+  </c>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr15.xsl b/test/tests/conferr/selecterr/selecterr15.xsl
new file mode 100644
index 0000000..e016cc7
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr15.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use a boolean where a node-set is needed in apply-templates.-->
+  <!-- ExpectedException: XPATH: Can not convert #UNKNOWN to a NodeList -->
+  <!-- ExpectedException: Can not convert #BOOLEAN to a NodeList! -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="true()"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>.</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr16.xml b/test/tests/conferr/selecterr/selecterr16.xml
new file mode 100644
index 0000000..a31b5b9
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr16.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<doc>
+  <critter type="dog"><name>Lassie</name></critter>
+  <human><name>Anne</name></human>
+  <critter type="dog"><name>Wishbone</name></critter>
+  <critter type="cat"><name>Felix</name></critter>
+  <critter type="cat"><name>Sylvester</name></critter>
+  <critter type="porcupine"><name>Porky</name></critter>
+  <human><name>Elissa</name></human>
+  <critter type="cat"><name>TopCat</name></critter>
+  <critter type="turtle"><name>Churchy</name></critter>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr16.xsl b/test/tests/conferr/selecterr/selecterr16.xsl
new file mode 100644
index 0000000..4022b9b
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr16.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 5.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use a string where a node-set is needed in apply-templates.-->
+  <!-- ExpectedException: XPATH: Can not convert #UNKNOWN to a NodeList -->
+  <!-- ExpectedException: Can not convert #STRING to a NodeList! -->
+
+<xsl:variable name="which" select="'fish'"/>
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:apply-templates select="$which"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:text>.</xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr17.xml b/test/tests/conferr/selecterr/selecterr17.xml
new file mode 100644
index 0000000..1fa0002
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr17.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">
+    <item type="z">a</item>
+    <item type="c">
+      <subitem>OK</subitem>
+    </item>
+    <item type="x">c</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr17.xsl b/test/tests/conferr/selecterr/selecterr17.xsl
new file mode 100644
index 0000000..d675fa8
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr17.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to follow '//' by a predicate, without node-test. -->
+  <!-- ExpectedException: Found '[' without node test -->
+  <!-- ExpectedException: Unexpected token -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="foo">
+      <xsl:value-of select="item//[@type='x']"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr18.xml b/test/tests/conferr/selecterr/selecterr18.xml
new file mode 100644
index 0000000..1fa0002
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr18.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">
+    <item type="z">a</item>
+    <item type="c">
+      <subitem>OK</subitem>
+    </item>
+    <item type="x">c</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr18.xsl b/test/tests/conferr/selecterr/selecterr18.xsl
new file mode 100644
index 0000000..5fac643
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr18.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to select a '//' without a following node-test. -->
+  <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
+  <!-- ExpectedException: Unexpected token -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="//subitem">
+      <xsl:value-of select="//"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr19.xml b/test/tests/conferr/selecterr/selecterr19.xml
new file mode 100644
index 0000000..1fa0002
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr19.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">
+    <item type="z">a</item>
+    <item type="c">
+      <subitem>OK</subitem>
+    </item>
+    <item type="x">c</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr19.xsl b/test/tests/conferr/selecterr/selecterr19.xsl
new file mode 100644
index 0000000..3d0e2bd
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr19.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to put '//' at end of path. -->
+  <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
+  <!-- ExpectedException: Unexpected token -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="foo">
+      <xsl:value-of select="item//"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr20.xml b/test/tests/conferr/selecterr/selecterr20.xml
new file mode 100644
index 0000000..1fa0002
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr20.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">
+    <item type="z">a</item>
+    <item type="c">
+      <subitem>OK</subitem>
+    </item>
+    <item type="x">c</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr20.xsl b/test/tests/conferr/selecterr/selecterr20.xsl
new file mode 100644
index 0000000..da4f3e2
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr20.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr20 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to select a '//' without a following node-test as a function argument. -->
+  <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <count><xsl:value-of select="count(//)"/></count>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr21.xml b/test/tests/conferr/selecterr/selecterr21.xml
new file mode 100644
index 0000000..d58cc12
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr21.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">5
+    <item type="z">a</item>
+    <item type="c">
+      <subitem>OK</subitem>
+    </item>
+    <item type="x">c</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr21.xsl b/test/tests/conferr/selecterr/selecterr21.xsl
new file mode 100644
index 0000000..9d67a81
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr21.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr21 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try '//' followed by a comma as a function argument. -->
+  <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
+  <!-- ExpectedException: Unexpected token -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <subs><xsl:value-of select="substring-after(//,'O')"/></subs>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr22.xml b/test/tests/conferr/selecterr/selecterr22.xml
new file mode 100644
index 0000000..d58cc12
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr22.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">5
+    <item type="z">a</item>
+    <item type="c">
+      <subitem>OK</subitem>
+    </item>
+    <item type="x">c</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr22.xsl b/test/tests/conferr/selecterr/selecterr22.xsl
new file mode 100644
index 0000000..04acc2d
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr22.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr22 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try '//' followed by a + as a function argument. -->
+  <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
+  <!-- ExpectedException: Unexpected token -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <subs><xsl:value-of select="//+17"/></subs>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr23.xml b/test/tests/conferr/selecterr/selecterr23.xml
new file mode 100644
index 0000000..d58cc12
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr23.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo name="x">5
+    <item type="z">a</item>
+    <item type="c">
+      <subitem>OK</subitem>
+    </item>
+    <item type="x">c</item>
+  </foo>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr23.xsl b/test/tests/conferr/selecterr/selecterr23.xsl
new file mode 100644
index 0000000..54ec8d6
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr23.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: selecterr23 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try '//' followed by a | in a select. -->
+  <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
+  <!-- ExpectedException: Unexpected token -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates select="foo"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="foo">
+  <subs><xsl:value-of select="//|subitem"/></subs>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/selecterr/selecterr24.xml b/test/tests/conferr/selecterr/selecterr24.xml
new file mode 100644
index 0000000..95ecdb1
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr24.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<far-north>
+ <north>
+  <near-north>
+   <far-west/>
+   <west/>
+   <near-west/>
+   <center/>
+   <near-east/>
+   <east/>
+   <far-east/>
+  </near-north>
+ </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/conferr/selecterr/selecterr24.xsl b/test/tests/conferr/selecterr/selecterr24.xsl
new file mode 100644
index 0000000..b54f200
--- /dev/null
+++ b/test/tests/conferr/selecterr/selecterr24.xsl
@@ -0,0 +1,47 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <!-- FileName: SELECTerr24 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test odd syntax: predicate right after .. (for parent). -->
+  <!-- ExpectedException: unknown axis -->
+  <!-- ExpectedException: need / or // to separate steps -->
+  <!-- ExpectedException: unexpected token -->
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//center">
+      <xsl:apply-templates select="..[near-north]"/>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr01.xml b/test/tests/conferr/sorterr/sorterr01.xml
new file mode 100644
index 0000000..3bbb472
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr01.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<!-- UTF-8 order: space, !, %, lower-case letters -->
+<doc>
+  <t>abc</t>
+  <t>a b</t>
+  <t>ab </t>
+  <t>ac </t>
+  <t>abcd</t>
+  <t>ab!</t>
+  <t>ab%</t>
+  <t>a!b</t>
+  <t>a!b!</t>
+  <t>ac!</t>
+  <t>a c%</t>
+  <t>abd</t>
+  <t>a!cd</t>
+  <t>ab</t>
+  <t>a c</t>
+  <t>a!b </t>
+  <t>a  d</t>
+  <t>a!c</t>
+  <t>acc</t>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr01.xsl b/test/tests/conferr/sorterr/sorterr01.xsl
new file mode 100644
index 0000000..9e54117
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr01.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Undefined value for data-type attribute on sort. -->
+  <!-- ExpectedException: Sorting data-type must be "text" or "number" -->
+  <!-- ExpectedException: Attribute: data-type has an illegal value: badtype -->
+  <!-- ExpectedException: Illegal value: badtype used for ENUM attribute: data-type.  Valid values are: text number <qname-but-not-ncname>. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="t">
+      <xsl:sort data-type="badtype"/>
+      <xsl:value-of select="."/><xsl:text>|</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr02.xml b/test/tests/conferr/sorterr/sorterr02.xml
new file mode 100644
index 0000000..96ea9a3
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr02.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <num>99</num>
+  <num>3</num>
+  <num>100</num>
+  <num>40</num>
+  <num>69</num>
+  <num>82</num>
+  <num>1</num>
+  <num>0</num>
+  <num>803.23</num>
+  <num>803.05</num>
+  <num>803.33333333</num>
+  <num>803.33333332</num>
+  <num>23</num>
+  <num>1001001001</num>
+  <num>0008</num>
+  <num>5</num>
+  <num>04</num>
+  <num>002</num>
+  <num>666</num>
+  <num>777</num>
+  <num>Hello</num>
+  <num>617-939-5938</num>
+  <num>-13</num>
+  <num>-47</num>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr02.xsl b/test/tests/conferr/sorterr/sorterr02.xsl
new file mode 100644
index 0000000..a7013e9
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr02.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Incorrect value for order attribute on sort. -->
+  <!-- ExpectedException: Sorting order must be "ascending" or "descending" -->
+  <!-- ExpectedException: Attribute: order has an illegal value: sideways -->
+  <!-- ExpectedException: Illegal value: sideways used for ENUM attribute: order.  Valid values are: ascending descending. -->
+
+
+<xsl:template match="doc">
+  <out>
+    Sideways order....
+    <xsl:for-each select="num">
+      <xsl:sort data-type="number" order="sideways"/>
+      <xsl:value-of select="."/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr03.xml b/test/tests/conferr/sorterr/sorterr03.xml
new file mode 100644
index 0000000..d2aeca2
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr03.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+  <item>XML</item>
+  <item>Namespaces</item>
+  <item>mechanism</item>
+  <item>to</item>
+  <item>recognize</item>
+  <item>XSLT-defined</item>
+  <item>elements</item>
+  <item>specified</item>
+  <item>document</item>
+  <item>prefix</item>
+  <item>recognized</item>
+  <item>URI</item>
+  <item>preFIX</item>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr03.xsl b/test/tests/conferr/sorterr/sorterr03.xsl
new file mode 100644
index 0000000..0786e0c
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr03.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Incorrect value for case-order attribute on sort. -->
+  <!-- ExpectedException: Sorting case-order must be "upper-first" or "lower-first" -->
+  <!-- ExpectedException: Attribute: case-order has an illegal value: bad-order -->
+  <!-- ExpectedException: Illegal value: bad-order used for ENUM attribute: case-order.  Valid values are: upper-first lower-first. -->
+
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort lang="en-US" case-order="bad-order"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr04.xml b/test/tests/conferr/sorterr/sorterr04.xml
new file mode 100644
index 0000000..3bbb472
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr04.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<!-- UTF-8 order: space, !, %, lower-case letters -->
+<doc>
+  <t>abc</t>
+  <t>a b</t>
+  <t>ab </t>
+  <t>ac </t>
+  <t>abcd</t>
+  <t>ab!</t>
+  <t>ab%</t>
+  <t>a!b</t>
+  <t>a!b!</t>
+  <t>ac!</t>
+  <t>a c%</t>
+  <t>abd</t>
+  <t>a!cd</t>
+  <t>ab</t>
+  <t>a c</t>
+  <t>a!b </t>
+  <t>a  d</t>
+  <t>a!c</t>
+  <t>acc</t>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr04.xsl b/test/tests/conferr/sorterr/sorterr04.xsl
new file mode 100644
index 0000000..7a1a009
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr04.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Undefined attribute on sort. -->
+  <!-- ExpectedException: xsl:sort has an illegal attribute: invalidattr -->
+  <!-- ExpectedException: "invalidattr" attribute is not allowed on the xsl:sort element! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="t">
+      <xsl:sort invalidattr="badvalue"/>
+      <xsl:value-of select="."/><xsl:text>|</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr05.xml b/test/tests/conferr/sorterr/sorterr05.xml
new file mode 100644
index 0000000..96ea9a3
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr05.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <num>99</num>
+  <num>3</num>
+  <num>100</num>
+  <num>40</num>
+  <num>69</num>
+  <num>82</num>
+  <num>1</num>
+  <num>0</num>
+  <num>803.23</num>
+  <num>803.05</num>
+  <num>803.33333333</num>
+  <num>803.33333332</num>
+  <num>23</num>
+  <num>1001001001</num>
+  <num>0008</num>
+  <num>5</num>
+  <num>04</num>
+  <num>002</num>
+  <num>666</num>
+  <num>777</num>
+  <num>Hello</num>
+  <num>617-939-5938</num>
+  <num>-13</num>
+  <num>-47</num>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr05.xsl b/test/tests/conferr/sorterr/sorterr05.xsl
new file mode 100644
index 0000000..11e7dc6
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr05.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to put a child node inside xsl:sort. -->
+  <!-- ExpectedException: xsl:comment is not allowed in this position in the stylesheet -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="num">
+      <xsl:sort data-type="number">
+        <xsl:comment>Can't do this here!</xsl:comment>
+      </xsl:sort>
+      <xsl:value-of select="."/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr06.xml b/test/tests/conferr/sorterr/sorterr06.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr06.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conferr/sorterr/sorterr06.xsl b/test/tests/conferr/sorterr/sorterr06.xsl
new file mode 100644
index 0000000..ec399f6
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr06.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of xsl:sort inside a directive where it's not allowed. -->
+  <!-- ExpectedException: xsl:sort can only be used with xsl:apply-templates or xsl:for-each. -->
+  <!-- ExpectedException: (StylesheetHandler) xsl:sort can only be used with xsl:apply-templates or xsl:for-each. -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:sort can only be used with xsl:apply-templates or xsl:for-each. -->
+  <!-- ExpectedException: xsl:sort is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="/">
+  <Out>
+    <xsl:comment>
+      <xsl:sort/>
+      <xsl:text>Comment content</xsl:text>
+    </xsl:comment>
+  </Out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr07.xml b/test/tests/conferr/sorterr/sorterr07.xml
new file mode 100644
index 0000000..487b1be
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr07.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<docs>
+</docs>
\ No newline at end of file
diff --git a/test/tests/conferr/sorterr/sorterr07.xsl b/test/tests/conferr/sorterr/sorterr07.xsl
new file mode 100644
index 0000000..9d319f2
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr07.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of xsl:sort at top level, where it's not allowed. -->
+  <!-- ExpectedException: xsl:sort is not allowed in this position in the stylesheet -->
+
+<xsl:sort select="docs"/>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr08.xml b/test/tests/conferr/sorterr/sorterr08.xml
new file mode 100644
index 0000000..3bbb472
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr08.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<!-- UTF-8 order: space, !, %, lower-case letters -->
+<doc>
+  <t>abc</t>
+  <t>a b</t>
+  <t>ab </t>
+  <t>ac </t>
+  <t>abcd</t>
+  <t>ab!</t>
+  <t>ab%</t>
+  <t>a!b</t>
+  <t>a!b!</t>
+  <t>ac!</t>
+  <t>a c%</t>
+  <t>abd</t>
+  <t>a!cd</t>
+  <t>ab</t>
+  <t>a c</t>
+  <t>a!b </t>
+  <t>a  d</t>
+  <t>a!c</t>
+  <t>acc</t>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr08.xsl b/test/tests/conferr/sorterr/sorterr08.xsl
new file mode 100644
index 0000000..6e074e7
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr08.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:baz1="http://xsl.lotus.com/ns1">
+
+  <!-- FileName: SORTerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Undefined value for data-type attribute on sort, but it's qualified. -->
+  <!-- ExpectedException: No known sort routine for baz1:badtype -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="t">
+      <xsl:sort data-type="baz1:badtype"/>
+      <xsl:value-of select="."/><xsl:text>|</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr09.xml b/test/tests/conferr/sorterr/sorterr09.xml
new file mode 100644
index 0000000..54f8201
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr09.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- Test for xsl:sort -->
+<doc>
+  <item>XSLT</item>
+  <item>processors</item>
+  <item>must</item>
+  <item>use</item>
+  <item>XML</item>
+  <item>namespaces</item>
+  <item>mechanism</item>
+  <item>to</item>
+  <item>recognize</item>
+  <item>XSLT-defined</item>
+  <item>elements</item>
+  <item>specified</item>
+  <item>document</item>
+  <item>prefix</item>
+  <item>recognized</item>
+  <item>URI</item>
+  <item>04</item>
+  <item>002</item>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr09.xsl b/test/tests/conferr/sorterr/sorterr09.xsl
new file mode 100644
index 0000000..e3f4a6d
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr09.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Try to use an AVT for the select value. -->
+  <!-- ExpectedException: select value for xsl:sort cannot contain {} -->
+  <!-- ExpectedException: Extra illegal tokens: '{.}' --><!-- Could use improvements for usability -sc -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort select="{.}"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/sorterr/sorterr11.dx b/test/tests/conferr/sorterr/sorterr11.dx
new file mode 100644
index 0000000..c1d14e3
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr11.dx
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+
+<!-- Test for xsl:sort -->
+<doc>
+  <num>99</num>
+  <num>3</num>
+  <num>100</num>
+  <num>40</num>
+  <num>69</num>
+  <num>82</num>
+  <num>1</num>
+  <num>0</num>
+  <num>803.23</num>
+  <num>803.05</num>
+  <num>803.33333333</num>
+  <num>803.33333332</num>
+  <num>23</num>
+  <num>1001001001</num>
+  <num>0008</num>
+  <num>5</num>
+  <num>04</num>
+  <num>002</num>
+  <num>666</num>
+  <num>777</num>
+  <num>Hello</num>
+  <num>617-939-5938</num>
+  <num>-13</num>
+  <num>-47</num>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr11.xml b/test/tests/conferr/sorterr/sorterr11.xml
new file mode 100644
index 0000000..c1d14e3
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr11.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+
+<!-- Test for xsl:sort -->
+<doc>
+  <num>99</num>
+  <num>3</num>
+  <num>100</num>
+  <num>40</num>
+  <num>69</num>
+  <num>82</num>
+  <num>1</num>
+  <num>0</num>
+  <num>803.23</num>
+  <num>803.05</num>
+  <num>803.33333333</num>
+  <num>803.33333332</num>
+  <num>23</num>
+  <num>1001001001</num>
+  <num>0008</num>
+  <num>5</num>
+  <num>04</num>
+  <num>002</num>
+  <num>666</num>
+  <num>777</num>
+  <num>Hello</num>
+  <num>617-939-5938</num>
+  <num>-13</num>
+  <num>-47</num>
+</doc>
+
diff --git a/test/tests/conferr/sorterr/sorterr11.xsl b/test/tests/conferr/sorterr/sorterr11.xsl
new file mode 100644
index 0000000..ac26a99
--- /dev/null
+++ b/test/tests/conferr/sorterr/sorterr11.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: SORTerr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 10 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: If the select-expression in a sort isn't useful, should throw good error. -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="num">
+      <xsl:sort select="document('sorterr11.dx')"/>
+      <xsl:value-of select="."/><xsl:text> </xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr01.xml b/test/tests/conferr/stringerr/stringerr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr01.xsl b/test/tests/conferr/stringerr/stringerr01.xsl
new file mode 100644
index 0000000..95ea1dd
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr01.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr01 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" with string(). -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="string(troo())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr02.xml b/test/tests/conferr/stringerr/stringerr02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr02.xsl b/test/tests/conferr/stringerr/stringerr02.xsl
new file mode 100644
index 0000000..42e40b6
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr02.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr02 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of invalid function that resembles "true" with string-length(). -->
+  <!-- ExpectedException: Could not find function: troo -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="string-length(troo())"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr03.xml b/test/tests/conferr/stringerr/stringerr03.xml
new file mode 100644
index 0000000..0ca266f
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc> 
+  <a>       This          is a       normalized          string.</a>    
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr03.xsl b/test/tests/conferr/stringerr/stringerr03.xsl
new file mode 100644
index 0000000..9b9bd70
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr03.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr03 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'normalize-space()' function with too many arguments -->
+  <!-- ExpectedException: normalize-space() has too many arguments -->
+  <!-- ExpectedException: FuncNormalizeSpace only allows 0 or 1 arguments -->
+
+<xsl:template match="/doc">
+  <out>
+    <xsl:value-of select="normalize-space(a,'&#9;&#10;&#13; ab    cd  ')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr04.xml b/test/tests/conferr/stringerr/stringerr04.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr04.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr04.xsl b/test/tests/conferr/stringerr/stringerr04.xsl
new file mode 100644
index 0000000..9e20185
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr04 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'contains()' with one argument -->
+  <!-- ExpectedException: contains() requires two arguments -->
+  <!-- ExpectedException: FuncContains only allows 2 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="contains('ENCYCLOPEDIA')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr05.xml b/test/tests/conferr/stringerr/stringerr05.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr05.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr05.xsl b/test/tests/conferr/stringerr/stringerr05.xsl
new file mode 100644
index 0000000..7b13294
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr05.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr05 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'contains()' with too many arguments -->
+  <!-- ExpectedException: contains() has too many arguments -->
+  <!-- ExpectedException: FuncContains only allows 2 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="contains('ENCYCLOPEDIA','LOPE',doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr06.xml b/test/tests/conferr/stringerr/stringerr06.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr06.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr06.xsl b/test/tests/conferr/stringerr/stringerr06.xsl
new file mode 100644
index 0000000..d3833ef
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr06.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr06 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'starts-with()' with one argument -->
+  <!-- ExpectedException: starts-with() requires two arguments -->
+  <!-- ExpectedException: FuncStartsWith only allows 2 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="starts-with('ENCYCLOPEDIA')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr07.xml b/test/tests/conferr/stringerr/stringerr07.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr07.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr07.xsl b/test/tests/conferr/stringerr/stringerr07.xsl
new file mode 100644
index 0000000..9387be5
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr07.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr07 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'starts-with()' with too many arguments -->
+  <!-- ExpectedException: starts-with() has too many arguments -->
+  <!-- ExpectedException: FuncStartsWith only allows 2 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="starts-with('ENCYCLOPEDIA','LOPE',doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr08.xml b/test/tests/conferr/stringerr/stringerr08.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr08.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr08.xsl b/test/tests/conferr/stringerr/stringerr08.xsl
new file mode 100644
index 0000000..e5d2747
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr08.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr08 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'substring-before()' with one argument -->
+  <!-- ExpectedException: substring-before() requires two arguments -->
+  <!-- ExpectedException: FuncSubstringBefore only allows 2 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="substring-before('ENCYCLOPEDIA')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr09.xml b/test/tests/conferr/stringerr/stringerr09.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr09.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr09.xsl b/test/tests/conferr/stringerr/stringerr09.xsl
new file mode 100644
index 0000000..cd37f47
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr09.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr09 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'substring-before()' with too many arguments -->
+  <!-- ExpectedException: substring-before() has too many arguments -->
+  <!-- ExpectedException: FuncSubstringBefore only allows 2 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="substring-before('ENCYCLOPEDIA','LOPE',doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr10.xml b/test/tests/conferr/stringerr/stringerr10.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr10.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr10.xsl b/test/tests/conferr/stringerr/stringerr10.xsl
new file mode 100644
index 0000000..3a0f902
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr10.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr10 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'substring-after()' with one argument -->
+  <!-- ExpectedException: substring-after() requires two arguments -->
+  <!-- ExpectedException: FuncSubstringAfter only allows 2 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="substring-after('ENCYCLOPEDIA')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr11.xml b/test/tests/conferr/stringerr/stringerr11.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr11.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr11.xsl b/test/tests/conferr/stringerr/stringerr11.xsl
new file mode 100644
index 0000000..0491f22
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr11.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr11 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'substring-after()' with too many arguments -->
+  <!-- ExpectedException: substring-after() has too many arguments -->
+  <!-- ExpectedException: FuncSubstringAfter only allows 2 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="substring-after('ENCYCLOPEDIA','LOPE',doc)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr12.xml b/test/tests/conferr/stringerr/stringerr12.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr12.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr12.xsl b/test/tests/conferr/stringerr/stringerr12.xsl
new file mode 100644
index 0000000..599ee77
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr12.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr12 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'substring()' with one argument -->
+  <!-- ExpectedException: substring() requires 2-3 arguments -->
+  <!-- ExpectedException: FuncSubstring only allows 2 or 3 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="substring('ENCYCLOPEDIA')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr13.xml b/test/tests/conferr/stringerr/stringerr13.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr13.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr13.xsl b/test/tests/conferr/stringerr/stringerr13.xsl
new file mode 100644
index 0000000..a2151c5
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr13.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr13 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'substring()' with too many arguments -->
+  <!-- ExpectedException: substring() has too many arguments -->
+  <!-- ExpectedException: FuncSubstring only allows 2 or 3 arguments -->
+  <!-- ExpectedException: FuncSubstring only allows 3 arguments --><!-- Old message to be removed when 2.4 ships -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="substring('ENCYCLOPEDIA',4,5,2)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr14.xml b/test/tests/conferr/stringerr/stringerr14.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr14.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr14.xsl b/test/tests/conferr/stringerr/stringerr14.xsl
new file mode 100644
index 0000000..f3688a8
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr14.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr14 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'concat()' with one argument -->
+  <!-- ExpectedException: concat() requires two or more arguments -->
+  <!-- ExpectedException: FuncConcat only allows >1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="concat('x')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr15.xml b/test/tests/conferr/stringerr/stringerr15.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr15.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr15.xsl b/test/tests/conferr/stringerr/stringerr15.xsl
new file mode 100644
index 0000000..450dc50
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr15.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr15 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'string-length()' with too many arguments -->
+  <!-- ExpectedException: string-length() has too many arguments. -->
+  <!-- ExpectedException: FuncStringLength only allows 0 or 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="string-length('ENCYCLOPEDIA','PEDI')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr16.xml b/test/tests/conferr/stringerr/stringerr16.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr16.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr16.xsl b/test/tests/conferr/stringerr/stringerr16.xsl
new file mode 100644
index 0000000..b1fd0d1
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr16.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr16 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'translate()' with 2 arguments -->
+  <!-- ExpectedException: The translate() function takes three arguments -->
+  <!-- ExpectedException: FuncTranslate only allows 3 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="translate('bar','abc')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr17.xml b/test/tests/conferr/stringerr/stringerr17.xml
new file mode 100644
index 0000000..91d7957
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr17.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc attr="slamwich">ENCYCLOPEDIA</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr17.xsl b/test/tests/conferr/stringerr/stringerr17.xsl
new file mode 100644
index 0000000..8bdb538
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr17.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr17 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'translate()' with too many arguments -->
+  <!-- ExpectedException: The translate() function takes three arguments -->
+  <!-- ExpectedException: FuncTranslate only allows 3 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="translate('bar','abc','ABC','output')"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr18.xml b/test/tests/conferr/stringerr/stringerr18.xml
new file mode 100644
index 0000000..572b67b
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr18.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?> 
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr18.xsl b/test/tests/conferr/stringerr/stringerr18.xsl
new file mode 100644
index 0000000..629bd92
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr18.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr18 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test of 'string()' with too many arguments -->
+  <!-- ExpectedException: string() has too many arguments. -->
+  <!-- ExpectedException: FuncString only allows 0 or 1 arguments -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="string(22,44)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/stringerr/stringerr19.xml b/test/tests/conferr/stringerr/stringerr19.xml
new file mode 100644
index 0000000..5b3290b
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr19.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<doc>
+<a>a</a>
+<b>b</b>
+<c>c</c>
+<d>d</d>
+<e attr="whatsup">what's up</e>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/stringerr/stringerr19.xsl b/test/tests/conferr/stringerr/stringerr19.xsl
new file mode 100644
index 0000000..3522417
--- /dev/null
+++ b/test/tests/conferr/stringerr/stringerr19.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: stringerr19 -->
+  <!-- Document: http://www.w3.org/TR/xpath -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 4.2 String Functions  -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Special case of concat() with one argument.
+       Strictly speaking, this should fail just like STRerr14. -->
+  <!-- ExpectedException: concat() requires two or more arguments -->
+  <!-- ExpectedException: FuncConcat only allows >1 arguments -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="concat(/*)"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr01.xml b/test/tests/conferr/variableerr/variableerr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr01.xsl b/test/tests/conferr/variableerr/variableerr01.xsl
new file mode 100644
index 0000000..0b57043
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr01.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Negative test, attempt to access undefined variable. -->
+  <!-- Author: David Marston -->
+  <!-- ExpectedException: Could not find variable with the name of input -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="$input"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr02.xml b/test/tests/conferr/variableerr/variableerr02.xml
new file mode 100644
index 0000000..8355779
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr02.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <inner/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr02.xsl b/test/tests/conferr/variableerr/variableerr02.xsl
new file mode 100644
index 0000000..071071c
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr02.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Negative test, attempt to access variable that's not in scope. -->
+  <!-- Author: David Marston -->
+  <!-- ExpectedException: Could not find variable with the name of input -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:apply-templates/>
+    Back to doc template.
+    <xsl:value-of select="$input"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="inner">
+  <xsl:variable name="input" select="2"/>
+  Now in inner template.
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr03.xml b/test/tests/conferr/variableerr/variableerr03.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr03.xsl b/test/tests/conferr/variableerr/variableerr03.xsl
new file mode 100644
index 0000000..0f157c9
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr03.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: VARerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test for missing name attribute in xsl:variable -->
+  <!-- ExpectedException: xsl:variable must have a name attribute. -->
+  <!-- ExpectedException: xsl:variable requires attribute: name -->
+
+<xsl:variable select="'ABC'"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="$ExpressionTest"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr04.xml b/test/tests/conferr/variableerr/variableerr04.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr04.xsl b/test/tests/conferr/variableerr/variableerr04.xsl
new file mode 100644
index 0000000..9e7221a
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr04.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Negative test, attempt to use variable RTF as a nodeset. -->
+  <!-- ExpectedException: Can not convert #RTREEFRAG to a NodeList! -->
+  <!-- Author: Paul Dick -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="foo">
+       <foo><bar>some text</bar></foo>
+    </xsl:variable>
+    <xsl:apply-templates select="$foo/*"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:value-of select="."/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr05.xml b/test/tests/conferr/variableerr/variableerr05.xml
new file mode 100644
index 0000000..c942fd2
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr05.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <item>1</item>
+  <item>2</item>
+  <item>3</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr05.xsl b/test/tests/conferr/variableerr/variableerr05.xsl
new file mode 100644
index 0000000..d332686
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr05.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test for xsl:variable with both content and select. -->
+  <!-- ExpectedException: xsl:variable element must not have both content and a select attribute. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:variable name="n" select="3">2</xsl:variable>
+  <out>
+    <xsl:value-of select="item[$n]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr06.xml b/test/tests/conferr/variableerr/variableerr06.xml
new file mode 100644
index 0000000..c942fd2
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr06.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <item>1</item>
+  <item>2</item>
+  <item>3</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr06.xsl b/test/tests/conferr/variableerr/variableerr06.xsl
new file mode 100644
index 0000000..521d662
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr06.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test for xsl:param with both content and select. -->
+  <!-- ExpectedException: xsl:param element must not have both content and a select attribute. -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="n" select="3">2</xsl:param>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="item[$n]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr07.xml b/test/tests/conferr/variableerr/variableerr07.xml
new file mode 100644
index 0000000..c942fd2
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr07.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <item>1</item>
+  <item>2</item>
+  <item>3</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr07.xsl b/test/tests/conferr/variableerr/variableerr07.xsl
new file mode 100644
index 0000000..8cb60a7
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr07.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: VARerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Test for xsl:variable with more than one select. -->
+  <!-- ExpectedException: Attribute "select" was already specified for element "xsl:variable". -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:variable name="n" select="3" select="2"/>
+  <out>
+    <xsl:value-of select="item[$n]"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr08.xml b/test/tests/conferr/variableerr/variableerr08.xml
new file mode 100644
index 0000000..d86dfba
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <item>Y</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr08.xsl b/test/tests/conferr/variableerr/variableerr08.xsl
new file mode 100644
index 0000000..1671562
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr08.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.5 -->
+  <!-- Purpose: Put xsl:param somewhere other than first in a template. -->
+  <!-- Author: David Marston -->
+  <!-- ExpectedException: xsl:param is not allowed in this position in the stylesheet -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:text>Output before setting param1...</xsl:text>
+    <xsl:param name="param1" select="item" />
+    <xsl:value-of select="$param1"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr09.xml b/test/tests/conferr/variableerr/variableerr09.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr09.xsl b/test/tests/conferr/variableerr/variableerr09.xsl
new file mode 100644
index 0000000..fc004ab
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr09.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Try to set same top-level xsl:variable twice -->
+  <!-- ExpectedException: Duplicate global variable declaration. -->
+  <!-- Author: David Marston -->
+
+<xsl:variable name="ExpressionTest" select="'ABC'"/>
+<xsl:variable name="ExpressionTest" select="'XYZ'"/>
+
+<xsl:template match="doc">
+   <out>
+      <xsl:value-of select="$ExpressionTest"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr10.xml b/test/tests/conferr/variableerr/variableerr10.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr10.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr10.xsl b/test/tests/conferr/variableerr/variableerr10.xsl
new file mode 100644
index 0000000..656f77e
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr10.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr10 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Try to set same top-level xsl:param twice -->
+  <!-- ExpectedException: Duplicate global variable declaration. -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="ExpressionTest" select="'ABC'"/>
+<xsl:param name="ExpressionTest" select="'XYZ'"/>
+
+<xsl:template match="doc">
+   <out>
+      <xsl:value-of select="$ExpressionTest"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr11.xml b/test/tests/conferr/variableerr/variableerr11.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr11.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr11.xsl b/test/tests/conferr/variableerr/variableerr11.xsl
new file mode 100644
index 0000000..f520a03
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr11.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr11 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Try to set same top-level param twice using different instructions, param first -->
+  <!-- ExpectedException: Duplicate global variable declaration. -->
+  <!-- Author: David Marston -->
+
+<xsl:param name="ExpressionTest" select="'ABC'"/>
+<xsl:variable name="ExpressionTest" select="'XYZ'"/>
+
+<xsl:template match="doc">
+   <out>
+      <xsl:value-of select="$ExpressionTest"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr12.xml b/test/tests/conferr/variableerr/variableerr12.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr12.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr12.xsl b/test/tests/conferr/variableerr/variableerr12.xsl
new file mode 100644
index 0000000..b6f5305
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr12.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr12 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Try to set same top-level param twice using different instructions, variable first -->
+  <!-- ExpectedException: Duplicate global variable declaration. -->
+  <!-- Author: David Marston -->
+
+<xsl:variable name="ExpressionTest" select="'ABC'"/>
+<xsl:param name="ExpressionTest" select="'XYZ'"/>
+
+<xsl:template match="doc">
+   <out>
+      <xsl:value-of select="$ExpressionTest"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr13.xml b/test/tests/conferr/variableerr/variableerr13.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr13.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr13.xsl b/test/tests/conferr/variableerr/variableerr13.xsl
new file mode 100644
index 0000000..3a3bb34
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr13.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr13 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Try to set same in-template param twice -->
+  <!-- ExpectedException: Duplicate variable declaration. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:param name="partest" select="contains('foo','of')"/>
+  <xsl:param name="partest" select="contains('foo','o')"/>
+  <out>
+    <xsl:value-of select="$partest"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr14.xml b/test/tests/conferr/variableerr/variableerr14.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr14.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr14.xsl b/test/tests/conferr/variableerr/variableerr14.xsl
new file mode 100644
index 0000000..d99cdd7
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr14.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr14 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Try to set same in-template variable twice -->
+  <!-- ExpectedException: Duplicate variable declaration. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:variable name="partest" select="contains('foo','of')"/>
+  <xsl:variable name="partest" select="contains('foo','o')"/>
+  <out>
+    <xsl:value-of select="$partest"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr15.xml b/test/tests/conferr/variableerr/variableerr15.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr15.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr15.xsl b/test/tests/conferr/variableerr/variableerr15.xsl
new file mode 100644
index 0000000..fc1ea51
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr15.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Try to set same in-template param twice using different instructions, param first -->
+  <!-- ExpectedException: Duplicate variable declaration. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:param name="partest" select="contains('foo','of')"/>
+  <xsl:variable name="partest" select="contains('foo','o')"/>
+  <out>
+    <xsl:value-of select="$partest"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr16.xml b/test/tests/conferr/variableerr/variableerr16.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr16.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr16.xsl b/test/tests/conferr/variableerr/variableerr16.xsl
new file mode 100644
index 0000000..6c06185
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr16.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr16 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Try to set same in-template param twice using different instructions, variable first -->
+  <!-- ExpectedException: Duplicate variable declaration. -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <xsl:variable name="partest" select="contains('foo','of')"/>
+  <xsl:param name="partest" select="contains('foo','o')"/>
+  <out>
+    <xsl:value-of select="$partest"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr17.xml b/test/tests/conferr/variableerr/variableerr17.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr17.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr17.xsl b/test/tests/conferr/variableerr/variableerr17.xsl
new file mode 100644
index 0000000..b5fa8df
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr17.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr17 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters  -->
+  <!-- Purpose: Try to set top-level params with circular references -->
+  <!-- ExpectedException: Variable defined using itself -->
+  <!-- Author: David Marston -->
+  <!-- ExpectedException: Variable circle0 is directly or indirectly referencing itself! -->
+
+<xsl:variable name="circle0" select="concat('help',$circle1)"/>
+<xsl:param name="circle1" select="concat('help',$circle0)"/>
+
+<xsl:template match="doc">
+   <out>
+      <xsl:value-of select="$circle0"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr18.xml b/test/tests/conferr/variableerr/variableerr18.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr18.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr18.xsl b/test/tests/conferr/variableerr/variableerr18.xsl
new file mode 100644
index 0000000..6d3dbfe
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr18.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr18 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.2 Values of Variables and Parameters -->
+  <!-- Purpose: Try to set in-template params with circular references -->
+  <!-- Author: David Marston -->
+  <!-- ExpectedException: Variable defined using itself -->
+  <!-- ExpectedException: Could not find variable with the name -->
+  <!-- ExpectedException: Variable reference given for variable out of context or without definition -->
+
+<xsl:template match="doc">
+  <xsl:param name="circle0" select="concat('help',$circle1)"/>
+  <xsl:param name="circle1" select="concat('help',$circle0)"/>
+  <out>
+    <xsl:value-of select="$circle0"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr19.xml b/test/tests/conferr/variableerr/variableerr19.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr19.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr19.xsl b/test/tests/conferr/variableerr/variableerr19.xsl
new file mode 100644
index 0000000..a233d9b
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr19.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr19 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.5 -->
+  <!-- Purpose: Try to set a variable inside a template based on variable defined later in that template. -->
+  <!-- Author: David Marston -->
+  <!-- ExpectedException: Could not find variable with the name -->
+  <!-- ExpectedException: Variable reference given for variable out of context or without definition -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:variable name="b" select="$a" />
+    <xsl:variable name="a" select="'second'" /><!-- Two sets of quotes make it a string -->
+    <xsl:value-of select="$b" />
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr20.xml b/test/tests/conferr/variableerr/variableerr20.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr20.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/variableerr/variableerr20.xsl b/test/tests/conferr/variableerr/variableerr20.xsl
new file mode 100644
index 0000000..4d0d607
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr20.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr20 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 -->
+  <!-- Purpose: Try to set same param twice inside a template, after setting via with-param. -->
+  <!-- ExpectedException: Variable is already declared in this template -->
+  <!-- Author: David Marston -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:call-template name="secondary">
+      <xsl:with-param name="a" select="'zero'"/><!-- Two sets of quotes make it a string -->
+    </xsl:call-template>
+  </out>
+</xsl:template>
+
+<xsl:template name="secondary">
+  <xsl:param name="a" select="'first'" />
+  <xsl:param name="a" select="'second'" />
+  <xsl:value-of select="$a" />
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/variableerr/variableerr21.xml b/test/tests/conferr/variableerr/variableerr21.xml
new file mode 100755
index 0000000..3d9e1fc
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr21.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+  <item>1</item>
+  <item>2</item>
+  <item>3</item>
+</doc>
diff --git a/test/tests/conferr/variableerr/variableerr21.xsl b/test/tests/conferr/variableerr/variableerr21.xsl
new file mode 100755
index 0000000..9719c2e
--- /dev/null
+++ b/test/tests/conferr/variableerr/variableerr21.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: variableerr21 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.6 Passing Parameters to Templates  -->
+  <!-- Purpose: Test for xsl:with-param with both content and select. -->
+  <!-- ExpectedException: xsl:with-param element must not have both content and a select attribute. -->
+  <!-- Author: Richard Cao -->
+
+<xsl:template match="doc">
+  <xsl:call-template name="foo">
+    <xsl:with-param name="bar" select="3">2</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="foo">
+  <xsl:param name="bar" select="0"/>
+  <out>
+    <xsl:value-of select="$bar"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr01.xml b/test/tests/conferr/vererr/vererr01.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr01.xsl b/test/tests/conferr/vererr/vererr01.xsl
new file mode 100644
index 0000000..a594824
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr01.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: VERerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 Forwards-Compatible Processing  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test validation when version matches supported version. -->
+  <!-- ExpectedException: xsl:exciting-new-8.5-feature is not allowed in this position in the stylesheet -->
+
+  <xsl:template match="/">
+    <out>
+      Choosing, based on value of version property.
+      <xsl:choose>
+        <xsl:when test="system-property('xsl:version') &gt;= 1.0">
+          We are trying to use the 8.5 feature in an earlier version.
+          <xsl:exciting-new-8.5-feature/>
+        </xsl:when>
+        <xsl:otherwise>
+          We didn't try to use the 8.5 feature, but we should have.
+          <xsl:message>This stylesheet requires XSLT 1.0 or higher</xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr02.xml b/test/tests/conferr/vererr/vererr02.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr02.xsl b/test/tests/conferr/vererr/vererr02.xsl
new file mode 100644
index 0000000..6612137
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr02.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="0.5">
+
+  <!-- FileName: VERerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.5 Forwards-Compatible Processing  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test validation when version is lower than supported version. -->
+  <!-- ExpectedException: xsl:exciting-new-8.5-feature is not allowed in this position in the stylesheet -->
+
+  <xsl:template match="/">
+    <out>
+      Choosing, based on value of version property.
+      <xsl:choose>
+        <xsl:when test="system-property('xsl:version') &gt;= 0.5">
+          We are trying to use the 8.5 feature in an earlier version.
+          <xsl:exciting-new-8.5-feature/>
+        </xsl:when>
+        <xsl:otherwise>
+          We didn't try to use the 8.5 feature, but we should have.
+          <xsl:message>This stylesheet requires XSLT 0.5 or higher</xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr03.xml b/test/tests/conferr/vererr/vererr03.xml
new file mode 100644
index 0000000..f41aad4
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr03.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <version theattrib="39"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr03.xsl b/test/tests/conferr/vererr/vererr03.xsl
new file mode 100644
index 0000000..4f35217
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr03.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+
+  <!-- FileName: VERerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet element -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Don't allow transform to be matched with stylesheet. -->
+  <!-- ExpectedException: The element type "xsl:transform" must be terminated by the matching end-tag "&lt;/xsl:transform&gt;". -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: The element type "xsl:transform" must be terminated by the matching end-tag "&lt;/xsl:transform&gt;". -->
+  <!-- ExpectedException: The element type "xsl:transform" must be terminated by the matching end-tag "</xsl:transform>". -->
+
+<!-- Explicitly match text nodes so the output is just 39 -->
+<xsl:template match="text()">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="doc/version">
+  <out>
+    <xsl:value-of select="./@theattrib"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr04.xml b/test/tests/conferr/vererr/vererr04.xml
new file mode 100644
index 0000000..f41aad4
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr04.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <version theattrib="39"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr04.xsl b/test/tests/conferr/vererr/vererr04.xsl
new file mode 100644
index 0000000..a2bd636
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr04.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+
+  <!-- FileName: VERerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet element -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Don't allow xsl:stylesheet inside the stylesheet element. -->
+  <!-- ExpectedException: xsl:stylesheet is not allowed in this position in the stylesheet -->
+
+  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+    <xsl:template match="doc">
+      <out>
+        This is from the nested stylesheet
+      </out>
+    </xsl:template>
+
+  </xsl:stylesheet>
+
+  <xsl:template match="doc">
+    <out>
+      Should have an error before this prints
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr05.xml b/test/tests/conferr/vererr/vererr05.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr05.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr05.xsl b/test/tests/conferr/vererr/vererr05.xsl
new file mode 100644
index 0000000..f87c05c
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr05.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: VERerr05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.1 XSLT Namespace  -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test use of an undefined element (garbage) as if was part of XSLT. -->
+  <!-- ExpectedException: Unknown XSL element: garbage -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Unknown XSL element: garbage -->
+  <!-- ExpectedException: xsl:garbage is not allowed in this position in the stylesheet! -->
+
+  <xsl:template match="/">
+    <out>
+      The garbage element is not part of XSLT!
+      <xsl:garbage/>
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr06.xml b/test/tests/conferr/vererr/vererr06.xml
new file mode 100644
index 0000000..f41aad4
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr06.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <version theattrib="39"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr06.xsl b/test/tests/conferr/vererr/vererr06.xsl
new file mode 100644
index 0000000..830a842
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr06.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+
+  <!-- FileName: VERerr06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet element -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Don't allow xsl:stylesheet inside a template. -->
+  <!-- ExpectedException: xsl:stylesheet is not allowed in this position in the stylesheet -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+      <xsl:text>This is from the nested stylesheet</xsl:text>
+    </xsl:stylesheet>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr07.xml b/test/tests/conferr/vererr/vererr07.xml
new file mode 100644
index 0000000..f41aad4
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr07.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <version theattrib="39"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr07.xsl b/test/tests/conferr/vererr/vererr07.xsl
new file mode 100644
index 0000000..2da7508
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr07.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+
+  <!-- FileName: VERerr07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet element -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Don't allow xsl:transform inside a template. -->
+  <!-- ExpectedException: xsl:transform is not allowed in this position in the stylesheet -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+      <xsl:text>This is from the nested stylesheet</xsl:text>
+    </xsl:transform>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr08.xml b/test/tests/conferr/vererr/vererr08.xml
new file mode 100644
index 0000000..f41aad4
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr08.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<doc>
+  <version theattrib="39"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr08.xsl b/test/tests/conferr/vererr/vererr08.xsl
new file mode 100644
index 0000000..aa95209
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr08.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+
+  <!-- FileName: VERerr08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 Stylesheet element -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Don't allow xsl:transform inside the stylesheet element. -->
+  <!-- ExpectedException: xsl:transform is not allowed in this position in the stylesheet -->
+
+  <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				version="1.0">
+    <xsl:template match="doc">
+      <out>
+        This is from the nested stylesheet
+      </out>
+    </xsl:template>
+
+  </xsl:transform>
+
+  <xsl:template match="doc">
+    <out>
+      Should have an error before this prints
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/vererr/vererr09.xml b/test/tests/conferr/vererr/vererr09.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr09.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/vererr/vererr09.xsl b/test/tests/conferr/vererr/vererr09.xsl
new file mode 100644
index 0000000..c95e7eb
--- /dev/null
+++ b/test/tests/conferr/vererr/vererr09.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: VERerr09 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 2.2 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test that version number is required. -->
+  <!-- ExpectedException: stylesheet must have version attribute -->
+  <!-- ExpectedException: xsl:stylesheet requires attribute: version -->
+
+<xsl:template match="/">
+  <out>
+    Choosing, based on value of version property.
+    <xsl:choose>
+      <xsl:when test="system-property('xsl:version') &gt;= 1.0">
+        We are ready to use the 1.0 feature.
+      </xsl:when>
+      <xsl:otherwise>
+        We didn't try to use the 1.0 feature, but we should have.
+        <xsl:message>This stylesheet requires XSLT 1.0 or higher</xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/whitespaceerr/whitespaceerr01.xml b/test/tests/conferr/whitespaceerr/whitespaceerr01.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/whitespaceerr/whitespaceerr01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/whitespaceerr/whitespaceerr01.xsl b/test/tests/conferr/whitespaceerr/whitespaceerr01.xsl
new file mode 100644
index 0000000..657c81c
--- /dev/null
+++ b/test/tests/conferr/whitespaceerr/whitespaceerr01.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespaceerr01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test error reporting when required attribute, elements, is missing
+       from xsl:strip-space. -->
+  <!-- ExpectedException: (StylesheetHandler) xsl:strip-space requires an elements attribute! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:strip-space requires an elements attribute! -->
+  <!-- ExpectedException: xsl:strip-space requires attribute: elements -->
+
+<xsl:strip-space/>
+
+<xsl:template match="doc">
+    <xsl:apply-templates select="*"/>
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/whitespaceerr/whitespaceerr02.xml b/test/tests/conferr/whitespaceerr/whitespaceerr02.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/whitespaceerr/whitespaceerr02.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/whitespaceerr/whitespaceerr02.xsl b/test/tests/conferr/whitespaceerr/whitespaceerr02.xsl
new file mode 100644
index 0000000..51baab1
--- /dev/null
+++ b/test/tests/conferr/whitespaceerr/whitespaceerr02.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespaceerr02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: Test error reporting when required attribute, elements, is missing
+       from xsl:preserve-space. -->
+  <!-- ExpectedException: (StylesheetHandler) xsl:preserve-space requires an elements attribute! -->
+  <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: (StylesheetHandler) xsl:preserve-space requires an elements attribute! -->
+  <!-- ExpectedException: xsl:preserve-space requires attribute: elements -->
+
+<xsl:preserve-space/>
+
+<xsl:template match="doc">
+    <xsl:apply-templates select="*"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/whitespaceerr/whitespaceerr03.xml b/test/tests/conferr/whitespaceerr/whitespaceerr03.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/whitespaceerr/whitespaceerr03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/whitespaceerr/whitespaceerr03.xsl b/test/tests/conferr/whitespaceerr/whitespaceerr03.xsl
new file mode 100644
index 0000000..868450c
--- /dev/null
+++ b/test/tests/conferr/whitespaceerr/whitespaceerr03.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespaceerr03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test placement of preserve-space inside a template, which is illegal. -->
+  <!-- ExpectedException: xsl:preserve-space is not allowed inside a template! -->
+  <!-- ExpectedException: XSLT: (StylesheetHandler) xsl:preserve-space is not allowed inside a template! -->
+  <!-- ExpectedException: xsl:preserve-space is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:preserve-space elements="test2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/conferr/whitespaceerr/whitespaceerr04.xml b/test/tests/conferr/whitespaceerr/whitespaceerr04.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/conferr/whitespaceerr/whitespaceerr04.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/conferr/whitespaceerr/whitespaceerr04.xsl b/test/tests/conferr/whitespaceerr/whitespaceerr04.xsl
new file mode 100644
index 0000000..feff97e
--- /dev/null
+++ b/test/tests/conferr/whitespaceerr/whitespaceerr04.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: whitespaceerr04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 3.4 Whitespace Stripping -->
+  <!-- Purpose: Test placement of strip-space inside atemplate, which is illegal. -->
+  <!-- ExpectedException: xsl:strip-space is not allowed inside a template! -->
+  <!-- ExpectedException: XSLT: (StylesheetHandler) xsl:strip-space is not allowed inside a template! -->
+  <!-- ExpectedException: xsl:strip-space is not allowed in this position in the stylesheet! -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:strip-space elements="test2"/>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib-gold/identity/identity01.out b/test/tests/contrib-gold/identity/identity01.out
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/contrib-gold/identity/identity01.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/var/var01.out b/test/tests/contrib-gold/var/var01.out
new file mode 100644
index 0000000..a13165a
--- /dev/null
+++ b/test/tests/contrib-gold/var/var01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><template1>abc-should-appear-oncedef-should-appear-once</template1></out>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/var/var01a.out b/test/tests/contrib-gold/var/var01a.out
new file mode 100644
index 0000000..a13165a
--- /dev/null
+++ b/test/tests/contrib-gold/var/var01a.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><template1>abc-should-appear-oncedef-should-appear-once</template1></out>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/var/var01b.out b/test/tests/contrib-gold/var/var01b.out
new file mode 100644
index 0000000..a13165a
--- /dev/null
+++ b/test/tests/contrib-gold/var/var01b.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><template1>abc-should-appear-oncedef-should-appear-once</template1></out>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/var/var01b2.out b/test/tests/contrib-gold/var/var01b2.out
new file mode 100644
index 0000000..a13165a
--- /dev/null
+++ b/test/tests/contrib-gold/var/var01b2.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><template1>abc-should-appear-oncedef-should-appear-once</template1></out>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/var/var01c.out b/test/tests/contrib-gold/var/var01c.out
new file mode 100644
index 0000000..a13165a
--- /dev/null
+++ b/test/tests/contrib-gold/var/var01c.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><template1>abc-should-appear-oncedef-should-appear-once</template1></out>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/var/var01d.out b/test/tests/contrib-gold/var/var01d.out
new file mode 100644
index 0000000..45ad564
--- /dev/null
+++ b/test/tests/contrib-gold/var/var01d.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><template1>def-should-appear-once,abc-should-appear-once.!!</template1></out>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/var/var02.out b/test/tests/contrib-gold/var/var02.out
new file mode 100644
index 0000000..a13165a
--- /dev/null
+++ b/test/tests/contrib-gold/var/var02.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><template1>abc-should-appear-oncedef-should-appear-once</template1></out>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/var/var03.out b/test/tests/contrib-gold/var/var03.out
new file mode 100644
index 0000000..a13165a
--- /dev/null
+++ b/test/tests/contrib-gold/var/var03.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><template1>abc-should-appear-oncedef-should-appear-once</template1></out>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk003.out b/test/tests/contrib-gold/xsltc/mk/mk003.out
new file mode 100644
index 0000000..0224b19
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk003.out
@@ -0,0 +1,20 @@
+
+<html>
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <title>Song</title>
+   </head>
+   <body>
+      <div align="center">
+         <h1>Song</h1>
+      </div>
+      <div align="center">
+         <h2>By Rupert Brooke</h2>
+      </div>
+      <p>And suddenly the wind comes soft,<br>&nbsp;&nbsp;And Spring is here again;<br>And the hawthorn quickens with buds of green<br>&nbsp;&nbsp;And my heart with buds of pain.<br></p>
+      <p>My heart all Winter lay so numb,<br>&nbsp;&nbsp;The earth so dead and frore,<br>That I never thought the Spring would come again<br>&nbsp;&nbsp;Or my heart wake any more.<br></p>
+      <p>But Winter's broken and earth has woken,<br>&nbsp;&nbsp;And the small birds cry again;<br>And the hawthorn hedge puts forth its buds,<br>&nbsp;&nbsp;And my heart puts forth its pain.<br></p>
+      <p><i>1912</i></p>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk004.out b/test/tests/contrib-gold/xsltc/mk/mk004.out
new file mode 100644
index 0000000..dd37ffb
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk004.out
@@ -0,0 +1,45 @@
+<html><body><h1>A list of books</h1>
+<table width="640">
+	<tr><td>1</td>
+
+		<td>Nigel Rees</td>
+
+		<td>Sayings of the Century</td>
+
+		<td>8.95</td>
+
+	</tr>
+
+	<tr><td>2</td>
+
+		<td>Evelyn Waugh</td>
+
+		<td>Sword of Honour</td>
+
+		<td>12.99</td>
+
+	</tr>
+
+	<tr><td>3</td>
+
+		<td>Herman Melville</td>
+
+		<td>Moby Dick</td>
+
+		<td>8.99</td>
+
+	</tr>
+
+	<tr><td>4</td>
+
+		<td>J. R. R. Tolkien</td>
+
+		<td>The Lord of the Rings</td>
+
+		<td>22.99</td>
+
+	</tr>
+
+</table>
+</body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk005.out b/test/tests/contrib-gold/xsltc/mk/mk005.out
new file mode 100644
index 0000000..d92a4e7
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk005.out
@@ -0,0 +1,35 @@
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>A list of books</title>
+  </head>
+  <body>
+    <h1>A list of books</h1>
+    <table border="2">
+      <tr>
+        <td>Evelyn Waugh</td>
+        <td>Sword of Honour</td>
+        <td>fiction</td>
+        <td>12.99</td>
+      </tr>
+      <tr>
+        <td>Herman Melville</td>
+        <td>Moby Dick</td>
+        <td>fiction</td>
+        <td>8.99</td>
+      </tr>
+      <tr>
+        <td>J. R. R. Tolkien</td>
+        <td>The Lord of the Rings</td>
+        <td>fiction</td>
+        <td>22.99</td>
+      </tr>
+      <tr>
+        <td>Nigel Rees</td>
+        <td>Sayings of the Century</td>
+        <td>reference</td>
+        <td>8.95</td>
+      </tr>
+    </table>
+  </body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk006.out b/test/tests/contrib-gold/xsltc/mk/mk006.out
new file mode 100644
index 0000000..c5090d2
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk006.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<div id="div1">Sayings of the Century</div>
+<div id="div2">Sword of Honour</div>
+<div id="div3">Moby Dick</div>
+<div id="div4">The Lord of the Rings</div>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk007.out b/test/tests/contrib-gold/xsltc/mk/mk007.out
new file mode 100644
index 0000000..651cb90
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk007.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<document>
+  <author>Michael Kay</author>
+  <title>XSLT Programmer's Reference</title>
+  <copyright>Copyright © Wrox Press 2000</copyright>
+  <date>2001</date>
+  <abstract>A comprehensive guide to the XSLT and XPath recommendations
+    published by the World Wide Web Consortium on 16 November 1999</abstract>
+</document>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk008.out b/test/tests/contrib-gold/xsltc/mk/mk008.out
new file mode 100644
index 0000000..408b342
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk008.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<document>
+   <author>Michael Kay</author>
+   <title>XSLT Programmer's Reference</title>
+   <copyright>Copyright © Wrox Press Ltd 2000</copyright>
+   <date>Mon Aug 07 13:35:40 EDT 2000</date>
+   <abstract>A comprehensive guide to the XSLT and XPath recommendations
+    published by the World Wide Web Consortium on 16 November 1999</abstract>
+</document>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk011.out b/test/tests/contrib-gold/xsltc/mk/mk011.out
new file mode 100644
index 0000000..7e939f5
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk011.out
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<LINE>That thou, Iago, who hast had my purse</LINE>
+;
+    <LINE>It is as sure as you are Roderigo,</LINE>
+;
+    <LINE>Were I the Moor, I would not be Iago:</LINE>
+;
+    <LINE>What, ho, Brabantio! Signior Brabantio, ho!</LINE>
+;
+    <LINE>Awake! what, ho, Brabantio! thieves! thieves! thieves!</LINE>
+;
+    <LINE>My name is Roderigo.</LINE>
+;
+    <LINE>Most grave Brabantio,</LINE>
+;
+    <LINE>This thou shalt answer; I know thee, Roderigo.</LINE>
+;
+    <LINE>Is nought but bitterness. Now, Roderigo,</LINE>
+;
+    <LINE>May be abused? Have you not read, Roderigo,</LINE>
+;
+    <LINE>On, good Roderigo: I'll deserve your pains.</LINE>
+;
+    
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk012.out b/test/tests/contrib-gold/xsltc/mk/mk012.out
new file mode 100644
index 0000000..ca8ed63
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk012.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+Longest speech is 26 lines.  
diff --git a/test/tests/contrib-gold/xsltc/mk/mk013.out b/test/tests/contrib-gold/xsltc/mk/mk013.out
new file mode 100644
index 0000000..3e00ae2
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk013.out
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<poem>
+   <author>Rupert Brooke</author>
+   <date>1912</date>
+   <title>Song</title>
+   <stanza>
+      <line number="1" of="4">And suddenly the wind comes soft,</line>
+      <line number="2" of="4">And Spring is here again;</line>
+      <line number="3" of="4">And the hawthorn quickens with buds of green</line>
+      <line number="4" of="4">And my heart with buds of pain.</line>
+   </stanza>
+   <stanza>
+      <line number="1" of="4">My heart all Winter lay so numb,</line>
+      <line number="2" of="4">The earth so dead and frore,</line>
+      <line number="3" of="4">That I never thought the Spring would come again</line>
+      <line number="4" of="4">Or my heart wake any more.</line>
+   </stanza>
+   <stanza>
+      <line number="1" of="4">But Winter's broken and earth has woken,</line>
+      <line number="2" of="4">And the small birds cry again;</line>
+      <line number="3" of="4">And the hawthorn hedge puts forth its buds,</line>
+      <line number="4" of="4">And my heart puts forth its pain.</line>
+   </stanza>
+</poem>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk014.out b/test/tests/contrib-gold/xsltc/mk/mk014.out
new file mode 100644
index 0000000..a5f2938
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk014.out
@@ -0,0 +1,15 @@
+<html>
+  <body>
+    <h1>Please select a country:</h1>
+    <select id="country">
+      <option value="France">France</option>
+      <option value="Germany">Germany</option>
+      <option value="Israel">Israel</option>
+      <option value="Japan">Japan</option>
+      <option value="Poland">Poland</option>
+      <option value="United States" selected="selected">United States</option>
+      <option value="Venezuela">Venezuela</option>
+    </select>
+    <hr>
+  </body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk015.out b/test/tests/contrib-gold/xsltc/mk/mk015.out
new file mode 100644
index 0000000..7b6d47c
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk015.out
@@ -0,0 +1,96 @@
+
+<html>
+   <body>
+      <h1>Matches in Group A</h1>
+      <h2>Brazil versus Scotland</h2>
+      <table bgcolor="#cccccc" border="1" cellpadding="5">
+         <tr>
+            <td><b>Date</b></td>
+            <td><b>Home Team</b></td>
+            <td><b>Away Team</b></td>
+            <td><b>Result</b></td>
+         </tr>
+         <tr>
+            <td>10-Jun-98&nbsp;</td>
+            <td>Brazil&nbsp;</td>
+            <td>Scotland&nbsp;</td>
+            <td>2-1&nbsp;</td>
+         </tr>
+      </table>
+      <h2>Morocco versus Norway</h2>
+      <table bgcolor="#cccccc" border="1" cellpadding="5">
+         <tr>
+            <td><b>Date</b></td>
+            <td><b>Home Team</b></td>
+            <td><b>Away Team</b></td>
+            <td><b>Result</b></td>
+         </tr>
+         <tr>
+            <td>10-Jun-98&nbsp;</td>
+            <td>Morocco&nbsp;</td>
+            <td>Norway&nbsp;</td>
+            <td>2-2&nbsp;</td>
+         </tr>
+      </table>
+      <h2>Scotland versus Norway</h2>
+      <table bgcolor="#cccccc" border="1" cellpadding="5">
+         <tr>
+            <td><b>Date</b></td>
+            <td><b>Home Team</b></td>
+            <td><b>Away Team</b></td>
+            <td><b>Result</b></td>
+         </tr>
+         <tr>
+            <td>16-Jun-98&nbsp;</td>
+            <td>Scotland&nbsp;</td>
+            <td>Norway&nbsp;</td>
+            <td>1-1&nbsp;</td>
+         </tr>
+      </table>
+      <h2>Brazil versus Morocco</h2>
+      <table bgcolor="#cccccc" border="1" cellpadding="5">
+         <tr>
+            <td><b>Date</b></td>
+            <td><b>Home Team</b></td>
+            <td><b>Away Team</b></td>
+            <td><b>Result</b></td>
+         </tr>
+         <tr>
+            <td>16-Jun-98&nbsp;</td>
+            <td>Brazil&nbsp;</td>
+            <td>Morocco&nbsp;</td>
+            <td>3-0&nbsp;</td>
+         </tr>
+      </table>
+      <h2>Brazil versus Norway</h2>
+      <table bgcolor="#cccccc" border="1" cellpadding="5">
+         <tr>
+            <td><b>Date</b></td>
+            <td><b>Home Team</b></td>
+            <td><b>Away Team</b></td>
+            <td><b>Result</b></td>
+         </tr>
+         <tr>
+            <td>23-Jun-98&nbsp;</td>
+            <td>Brazil&nbsp;</td>
+            <td>Norway&nbsp;</td>
+            <td>1-2&nbsp;</td>
+         </tr>
+      </table>
+      <h2>Scotland versus Morocco</h2>
+      <table bgcolor="#cccccc" border="1" cellpadding="5">
+         <tr>
+            <td><b>Date</b></td>
+            <td><b>Home Team</b></td>
+            <td><b>Away Team</b></td>
+            <td><b>Result</b></td>
+         </tr>
+         <tr>
+            <td>23-Jun-98&nbsp;</td>
+            <td>Scotland&nbsp;</td>
+            <td>Morocco&nbsp;</td>
+            <td>0-3&nbsp;</td>
+         </tr>
+      </table>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk016.out b/test/tests/contrib-gold/xsltc/mk/mk016.out
new file mode 100644
index 0000000..a6a7622
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk016.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<book>
+  <title>Object-oriented Languages</title>
+  <author>Michel Beaudouin-Lafon</author>
+  <translator>Jack Howlett</translator>
+  <publisher>Chapman &amp; Hall</publisher>
+  <isbn>0 412 55800 9</isbn>
+  <date>1994</date>
+</book>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk017.out b/test/tests/contrib-gold/xsltc/mk/mk017.out
new file mode 100644
index 0000000..c2d730a
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk017.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" ?><!--poem-->
+<!--author within poem-->Rupert Brooke
+<!--date within poem-->1912
+<!--title within poem-->Song
+<!--stanza within poem-->
+<!--line within stanza within poem-->And suddenly the wind comes soft,
+<!--line within stanza within poem-->And Spring is here again;
+<!--line within stanza within poem-->And the hawthorn quickens with buds of green
+<!--line within stanza within poem-->And my heart with buds of pain.
+
+<!--stanza within poem-->
+<!--line within stanza within poem-->My heart all Winter lay so numb,
+<!--line within stanza within poem-->The earth so dead and frore,
+<!--line within stanza within poem-->That I never thought the Spring would come again
+<!--line within stanza within poem-->Or my heart wake any more.
+
+<!--stanza within poem-->
+<!--line within stanza within poem-->But Winter's broken and earth has woken,
+<!--line within stanza within poem-->And the small birds cry again;
+<!--line within stanza within poem-->And the hawthorn hedge puts forth its buds,
+<!--line within stanza within poem-->And my heart puts forth its pain.
+
diff --git a/test/tests/contrib-gold/xsltc/mk/mk018.out b/test/tests/contrib-gold/xsltc/mk/mk018.out
new file mode 100644
index 0000000..f9f3d7f
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk018.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8" ?>
+Design Patterns
+   by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk019.out b/test/tests/contrib-gold/xsltc/mk/mk019.out
new file mode 100644
index 0000000..cd0c6c3
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk019.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<c>Copyright © Acme Widgets Limited</c>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk020.out b/test/tests/contrib-gold/xsltc/mk/mk020.out
new file mode 100644
index 0000000..01c0349
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk020.out
@@ -0,0 +1,41 @@
+
+<html>
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <title>Song</title>
+   </head>
+   <body>
+      
+      <div align="right"><i>by </i>Rupert Brooke
+      </div>
+      
+      
+      <h1>Song</h1>
+      
+      <p>
+         And suddenly the wind comes soft,<br>
+         And Spring is here again;<br>
+         And the hawthorn quickens with buds of green<br>
+         And my heart with buds of pain.<br>
+         
+      </p>
+      
+      <p>
+         My heart all Winter lay so numb,<br>
+         The earth so dead and frore,<br>
+         That I never thought the Spring would come again<br>
+         Or my heart wake any more.<br>
+         
+      </p>
+      
+      <p>
+         But Winter's broken and earth has woken,<br>
+         And the small birds cry again;<br>
+         And the hawthorn hedge puts forth its buds,<br>
+         And my heart puts forth its pain.<br>
+         
+      </p>
+      
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk021.out b/test/tests/contrib-gold/xsltc/mk/mk021.out
new file mode 100644
index 0000000..ecabd47
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk021.out
@@ -0,0 +1,53 @@
+
+<html>
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <title>Song</title>
+   </head>
+   <body>
+      
+      <div align="right"><i>by </i>Rupert Brooke
+      </div>
+      
+      
+      <h1>Song</h1>
+      
+      <p>
+         001&nbsp;&nbsp;
+         And suddenly the wind comes soft,<br>
+         002&nbsp;&nbsp;
+         And Spring is here again;<br>
+         003&nbsp;&nbsp;
+         And the hawthorn quickens with buds of green<br>
+         004&nbsp;&nbsp;
+         And my heart with buds of pain.<br>
+         
+      </p>
+      
+      <p>
+         005&nbsp;&nbsp;
+         My heart all Winter lay so numb,<br>
+         006&nbsp;&nbsp;
+         The earth so dead and frore,<br>
+         007&nbsp;&nbsp;
+         That I never thought the Spring would come again<br>
+         008&nbsp;&nbsp;
+         Or my heart wake any more.<br>
+         
+      </p>
+      
+      <p>
+         009&nbsp;&nbsp;
+         But Winter's broken and earth has woken,<br>
+         010&nbsp;&nbsp;
+         And the small birds cry again;<br>
+         011&nbsp;&nbsp;
+         And the hawthorn hedge puts forth its buds,<br>
+         012&nbsp;&nbsp;
+         And my heart puts forth its pain.<br>
+         
+      </p>
+      
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk022.out b/test/tests/contrib-gold/xsltc/mk/mk022.out
new file mode 100644
index 0000000..49c78b8
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk022.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<picture color="red" transparency="100"/>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk023.out b/test/tests/contrib-gold/xsltc/mk/mk023.out
new file mode 100644
index 0000000..7571a40
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk023.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<book>
+    <title>Design Patterns</title>
+    <author>Erich Gamma</author>
+    <author>Richard Helm</author>
+    <author>Ralph Johnson</author>
+    <author>John Vlissides</author>
+</book><book>
+    <title>Pattern Hatching</title>
+    <author>John Vlissides</author>
+</book>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk024.out b/test/tests/contrib-gold/xsltc/mk/mk024.out
new file mode 100644
index 0000000..45e881c
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk024.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out:stylesheet xmlns:out="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<out:variable name="v"/>
+</out:stylesheet>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk025.out b/test/tests/contrib-gold/xsltc/mk/mk025.out
new file mode 100644
index 0000000..9716ac9
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk025.out
@@ -0,0 +1,60 @@
+<html><body><p><p><table>
+<tr><td width="350">And suddenly the wind comes soft,</td>
+<td width="50"></td>
+</tr>
+
+<tr><td width="350">And Spring is here again;</td>
+<td width="50"></td>
+</tr>
+
+<tr><td width="350">And the hawthorn quickens with buds of green</td>
+<td width="50">3</td>
+</tr>
+
+<tr><td width="350">And my heart with buds of pain.</td>
+<td width="50"></td>
+</tr>
+
+</table>
+</p>
+<p><table>
+<tr><td width="350">My heart all Winter lay so numb,</td>
+<td width="50"></td>
+</tr>
+
+<tr><td width="350">The earth so dead and frore,</td>
+<td width="50">6</td>
+</tr>
+
+<tr><td width="350">That I never thought the Spring would come again</td>
+<td width="50"></td>
+</tr>
+
+<tr><td width="350">Or my heart wake any more.</td>
+<td width="50"></td>
+</tr>
+
+</table>
+</p>
+<p><table>
+<tr><td width="350">But Winter's broken and earth has woken,</td>
+<td width="50">9</td>
+</tr>
+
+<tr><td width="350">And the small birds cry again;</td>
+<td width="50"></td>
+</tr>
+
+<tr><td width="350">And the hawthorn hedge puts forth its buds,</td>
+<td width="50"></td>
+</tr>
+
+<tr><td width="350">And my heart puts forth its pain.</td>
+<td width="50">12</td>
+</tr>
+
+</table>
+</p>
+</p>
+</body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk026.out b/test/tests/contrib-gold/xsltc/mk/mk026.out
new file mode 100644
index 0000000..1c3497a
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk026.out
@@ -0,0 +1,19 @@
+poem -- 1;
+author -- 2;
+date -- 2;
+title -- 2;
+stanza -- 2;
+line -- 3;
+line -- 3;
+line -- 3;
+line -- 3;
+stanza -- 2;
+line -- 3;
+line -- 3;
+line -- 3;
+line -- 3;
+stanza -- 2;
+line -- 3;
+line -- 3;
+line -- 3;
+line -- 3;
diff --git a/test/tests/contrib-gold/xsltc/mk/mk027.out b/test/tests/contrib-gold/xsltc/mk/mk027.out
new file mode 100644
index 0000000..9a9630f
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk027.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<product sales="$359.70" name="plum jam"/><product sales="$215.66" name="raspberry jam"/><product sales="$70.00" name="strawberry jam"/>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk028.out b/test/tests/contrib-gold/xsltc/mk/mk028.out
new file mode 100644
index 0000000..58eb442
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk028.out
@@ -0,0 +1,24 @@
+<html><body>
+<p>
+
+<font face="arial">Early Music Review</font>
+ said of his debut Wigmore concert with
+Ensemble Sonnerie in 1998: "One of the finest concerts I have
+ever heard ... a singer to watch out for". 
+Other highlights include a
+televised production of Bach's <i>St. Matthew Passion</i>
+
+conducted by Jonathan Miller, in which he played
+<u>Judas</u>
+, an acclaimed performance of
+<i>Winterreise</i>
+ with Julius Drake in Leamington Hastings,
+ 
+<i>Die Schöne Müllerin</i>
+ last summer at St. John's Smith Square,
+and in the same venue the Good Friday St John Passion, conducted
+by Stephen Layton, broadcast on Radio Three. 
+</p>
+
+</body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk029.out b/test/tests/contrib-gold/xsltc/mk/mk029.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk029.out
diff --git a/test/tests/contrib-gold/xsltc/mk/mk030.out b/test/tests/contrib-gold/xsltc/mk/mk030.out
new file mode 100644
index 0000000..90c4414
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk030.out
@@ -0,0 +1,16 @@
+
+<html>
+   <body>
+      <center>
+         <h1>Programme</h1>
+         <h2>Wolfgang Amadeus Mozart (1756-1791)</h2>
+         <p>The Magic Flute</p>
+         <p>Don Giovanni</p>
+         <h2>Guiseppe Verdi (1813-1901)</h2>
+         <p>Ernani</p>
+         <p>Rigoletto</p>
+         <h2>Giacomo Puccini (1858-1924)</h2>
+         <p>Tosca</p>
+      </center>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk031.out b/test/tests/contrib-gold/xsltc/mk/mk031.out
new file mode 100644
index 0000000..434f5e8
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk031.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8" ?>
+    This week's composers are:
+    Wolfgang Amadeus Mozart; Guiseppe Verdi; and Giacomo Puccini
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk032.out b/test/tests/contrib-gold/xsltc/mk/mk032.out
new file mode 100644
index 0000000..b6a95ff
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk032.out
@@ -0,0 +1,24 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Itinerary</title>
+</head>
+<body><center><h3>Day 1</h3>
+<p>Arrive in Cairo</p>
+<h3>Day 2</h3>
+<p>Visit the Pyramids at Gaza</p>
+<h3>Day 3</h3>
+<p>Archaelogical Museum at Cairo</p>
+<h3>Day 4</h3>
+<p>Flight to Luxor; coach to Aswan</p>
+<h3>Day 5</h3>
+<p>Visit Temple at Philae and Aswan High Dam</p>
+<h3>Day 6</h3>
+<p>Cruise to Edfu</p>
+<h3>Day 7</h3>
+<p>Cruise to Luxor; visit Temple at Karnak</p>
+<h3>Day 8</h3>
+<p>Valley of the Kings</p>
+<h3>Day 9</h3>
+<p>Return flight from Luxor</p>
+</center>
+</body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk033.out b/test/tests/contrib-gold/xsltc/mk/mk033.out
new file mode 100644
index 0000000..c2c54e1
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk033.out
@@ -0,0 +1,30 @@
+
+<html>
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <title>Itinerary</title>
+   </head>
+   <body>
+      <center>
+         <h3>Day 1</h3>
+         <p>Arrive in Cairo</p>
+         <h3>Day 2</h3>
+         <p>Visit the Pyramids at Gaza</p>
+         <h3>Day 3</h3>
+         <p>Archaelogical Museum at Cairo</p>
+         <h3>Day 4</h3>
+         <p>Flight to Luxor; coach to Aswan</p>
+         <h3>Day 5</h3>
+         <p><font color="red">Visit Temple at Philae and Aswan High Dam</font></p>
+         <h3>Day 6</h3>
+         <p>Cruise to Edfu</p>
+         <h3>Day 7</h3>
+         <p>Cruise to Luxor; visit Temple at Karnak</p>
+         <h3>Day 8</h3>
+         <p>Valley of the Kings</p>
+         <h3>Day 9</h3>
+         <p>Return flight from Luxor</p>
+      </center>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk034.out b/test/tests/contrib-gold/xsltc/mk/mk034.out
new file mode 100644
index 0000000..e95b43f
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk034.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<out>
+  <city>Paris, France</city>
+  <city>Roma, Italia</city>
+  <city>Nice, France</city>
+  <city>Madrid, Espana</city>
+  <city>Milano, Italia</city>
+  <city>Firenze, Italia</city>
+  <city>Napoli, Italia</city>
+  <city>Lyon, France</city>
+  <city>Barcelona, Espana</city>
+</out>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk035.out b/test/tests/contrib-gold/xsltc/mk/mk035.out
new file mode 100644
index 0000000..965586e
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk035.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8" ?><count>3</count>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk036.out b/test/tests/contrib-gold/xsltc/mk/mk036.out
new file mode 100644
index 0000000..4287691
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk036.out
@@ -0,0 +1,25 @@
+
+<html>
+   <body>
+      <h1>Number, the Language of Science</h1>
+      <p><i>by </i>Danzig
+      </p>
+      <h1>The Young Visiters</h1>
+      <p><i>by </i>Daisy Ashford
+      </p>
+      <p>Other books in this category:</p>
+      <ul>
+         <li>When We Were Very Young</li>
+      </ul>
+      <h1>When We Were Very Young</h1>
+      <p><i>by </i>A. A. Milne
+      </p>
+      <p>Other books in this category:</p>
+      <ul>
+         <li>The Young Visiters</li>
+      </ul>
+      <h1>Design Patterns</h1>
+      <p><i>by </i>Erich Gamma and others
+      </p>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk037.out b/test/tests/contrib-gold/xsltc/mk/mk037.out
new file mode 100644
index 0000000..bf419f0
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk037.out
@@ -0,0 +1,18 @@
+
+<html>
+   <body>
+      <h1>Stylesheet Module Structure</h1>
+      <ul>
+         <li>includes dummya.xsl
+            <ul>
+               <li>imports dummyb.xsl
+                  <ul></ul>
+               </li>
+               <li>imports dummyc.xsl
+                  <ul></ul>
+               </li>
+            </ul>
+         </li>
+      </ul>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk038.out b/test/tests/contrib-gold/xsltc/mk/mk038.out
new file mode 100644
index 0000000..72438ee
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk038.out
@@ -0,0 +1,13 @@
+
+<html>
+   <body>
+      <h1>Number, the Language of Science</h1>
+      <p>Category: Science</p>
+      <h1>The Young Visiters</h1>
+      <p>Category: Children's Fiction</p>
+      <h1>When We Were Very Young</h1>
+      <p>Category: Children's Fiction</p>
+      <h1>Design Patterns</h1>
+      <p>Category: Computing</p>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk039.out b/test/tests/contrib-gold/xsltc/mk/mk039.out
new file mode 100644
index 0000000..718f9b6
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk039.out
@@ -0,0 +1,30 @@
+<html><body><h1>Hotels</h1>
+<h2>Grand Hotel</h2>
+<p>Address:  . . . </p>
+<p>Stars: 5</p>
+<p>Resort: <a href="#N4">Amsterdam</a>
+</p>
+<h2>Central Hotel</h2>
+<p>Address:  . . . </p>
+<p>Stars: 5</p>
+<p>Resort: <a href="#N37">Bruges</a>
+</p>
+<h2>Less Grand Hotel</h2>
+<p>Address:  . . . </p>
+<p>Stars: 2</p>
+<p>Resort: <a href="#N4">Amsterdam</a>
+</p>
+<h2>Peripheral Hotel</h2>
+<p>Address:  . . . </p>
+<p>Stars: 2</p>
+<p>Resort: <a href="#N37">Bruges</a>
+</p>
+<h1>Resorts</h1>
+<h2><a name="N4">Amsterdam</a>
+</h2>
+<p>A wordy description of Amsterdam</p>
+<h2><a name="N37">Bruges</a>
+</h2>
+<p>An eloquent description of Bruges</p>
+</body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk040.out b/test/tests/contrib-gold/xsltc/mk/mk040.out
new file mode 100644
index 0000000..25a8c7a
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk040.out
@@ -0,0 +1,43 @@
+
+<html>
+   <body>
+      <h1>Number, the Language of Science</h1>
+      <h2>Author</h2>
+      <h3>Danzig</h3>
+      <p> - </p>
+      <p></p>
+      <h1>The Young Visiters</h1>
+      <h2>Author</h2>
+      <h3>Daisy Ashford</h3>
+      <p>1881 - 1972</p>
+      <p>Daisy Ashford (Mrs George Norman) wrote The Young Visiters, a small
+         comic masterpiece, while still a young child in Lewes. It was found in a drawer
+         in 1919 and sent to Chatto and Windus, who published it in the same year with an
+         introduction by J. M. Barrie, who had first insisted on meeting the author in order
+         to check that she was genuine.
+      </p>
+      <h1>When We Were Very Young</h1>
+      <h2>Author</h2>
+      <h3>A. A. Milne</h3>
+      <p>1852 - 1956</p>
+      <p>Alan Alexander Milne, educated at Westminster School and Trinity College
+         Cambridge, became a prolific author of plays, novels, poetry, short stories, and essays,
+         all of which have been overshadowed by his children's books.
+         
+      </p>
+      <h1>Design Patterns</h1>
+      <h2>Authors</h2>
+      <h3>Erich Gamma</h3>
+      <p> - </p>
+      <p></p>
+      <h3>Richard Helm</h3>
+      <p> - </p>
+      <p></p>
+      <h3>Ralph Johnson</h3>
+      <p> - </p>
+      <p></p>
+      <h3>John Vlissides</h3>
+      <p> - </p>
+      <p></p>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk041.out b/test/tests/contrib-gold/xsltc/mk/mk041.out
new file mode 100644
index 0000000..f36afa5
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk041.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<date>16 November 1999</date>
+<date>08 October 1999</date>
+<date>13 August 1999</date>
+<date>09 July 1999</date>
+<date>21 April 1999</date>
+<date>16 December 1998</date>
+<date>18 August 1998</date>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk042.out b/test/tests/contrib-gold/xsltc/mk/mk042.out
new file mode 100644
index 0000000..ccec245
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk042.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<auth>Danzig</auth>
+<auth>Daisy Ashford</auth>
+<auth>A. A. Milne</auth>
+<auth>Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides</auth>
+
diff --git a/test/tests/contrib-gold/xsltc/mk/mk043.out b/test/tests/contrib-gold/xsltc/mk/mk043.out
new file mode 100644
index 0000000..f49f6f6
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk043.out
@@ -0,0 +1,188 @@
+
+<html>
+   <body>
+      <h1>Table of elements</h1>
+      <table border="1" cellpadding="5">
+         <tr>
+            <td>Element</td>
+            <td>Prefix</td>
+            <td>Local name</td>
+            <td>Namespace URI</td>
+         </tr>
+         <tr>
+            <td>body</td>
+            <td></td>
+            <td>body</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>h1</td>
+            <td></td>
+            <td>h1</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>html</td>
+            <td></td>
+            <td>html</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>table</td>
+            <td></td>
+            <td>table</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>td</td>
+            <td></td>
+            <td>td</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>td</td>
+            <td></td>
+            <td>td</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>td</td>
+            <td></td>
+            <td>td</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>td</td>
+            <td></td>
+            <td>td</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>td</td>
+            <td></td>
+            <td>td</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>td</td>
+            <td></td>
+            <td>td</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>td</td>
+            <td></td>
+            <td>td</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>td</td>
+            <td></td>
+            <td>td</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>tr</td>
+            <td></td>
+            <td>tr</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>tr</td>
+            <td></td>
+            <td>tr</td>
+            <td></td>
+         </tr>
+         <tr>
+            <td>xsl:apply-templates</td>
+            <td>xsl</td>
+            <td>apply-templates</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:choose</td>
+            <td>xsl</td>
+            <td>choose</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:otherwise</td>
+            <td>xsl</td>
+            <td>otherwise</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:sort</td>
+            <td>xsl</td>
+            <td>sort</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:sort</td>
+            <td>xsl</td>
+            <td>sort</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:template</td>
+            <td>xsl</td>
+            <td>template</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:template</td>
+            <td>xsl</td>
+            <td>template</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:transform</td>
+            <td>xsl</td>
+            <td>transform</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:value-of</td>
+            <td>xsl</td>
+            <td>value-of</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:value-of</td>
+            <td>xsl</td>
+            <td>value-of</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:value-of</td>
+            <td>xsl</td>
+            <td>value-of</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:value-of</td>
+            <td>xsl</td>
+            <td>value-of</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:value-of</td>
+            <td>xsl</td>
+            <td>value-of</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:variable</td>
+            <td>xsl</td>
+            <td>variable</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+         <tr>
+            <td>xsl:when</td>
+            <td>xsl</td>
+            <td>when</td>
+            <td>http://www.w3.org/1999/XSL/Transform</td>
+         </tr>
+      </table>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk044.out b/test/tests/contrib-gold/xsltc/mk/mk044.out
new file mode 100644
index 0000000..78921c6
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk044.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?><element name="authors" words="101"/>;
+    <element name="author" words="35"/>;
+    <element name="born" words="1"/>;
+    <element name="died" words="1"/>;
+    <element name="biog" words="33"/>;
+    <element name="author" words="66"/>;
+    <element name="born" words="1"/>;
+    <element name="died" words="1"/>;
+    <element name="biog" words="64"/>;
+    <element name="i" words="3"/>;
+    
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk045.out b/test/tests/contrib-gold/xsltc/mk/mk045.out
new file mode 100644
index 0000000..afede79
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk045.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8" ?>1079.159
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk046.out b/test/tests/contrib-gold/xsltc/mk/mk046.out
new file mode 100644
index 0000000..682ec8e
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk046.out
@@ -0,0 +1,21 @@
+<html><body><h1>Product sales by period</h1>
+<table border="1" width="100%" cellpadding="5"><tr><th width="50%">Product</th>
+<th width="17%">Q1</th>
+<th width="17%">Q2</th>
+<th width="17%">Q3</th>
+</tr>
+<tr><td>Windows 98
+      </td>
+<td>82</td>
+<td>64</td>
+<td>58</td>
+</tr>
+<tr><td>Windows NT
+      </td>
+<td>17</td>
+<td>44</td>
+<td>82</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk047.out b/test/tests/contrib-gold/xsltc/mk/mk047.out
new file mode 100644
index 0000000..729a8f7
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk047.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" ?><authors>
+
+<author name="A. A. Milne">
+<born>1852</born>
+<died>1956</died>
+<biog>Alan Alexander Milne, educated at Westminster School and Trinity College
+Cambridge, became a prolific **** of plays, novels, poetry, short stories, and essays,
+all of which have been overshadowed by his children's books.
+</biog>
+</author>
+
+<author name="Daisy Ashford">
+<born>1881</born>
+<died>1972</died>
+<biog>Daisy Ashford (Mrs George Norman) wrote <i>The Young Visiters</i>, a small
+comic masterpiece, while still a young child in Lewes. It was found in a drawer
+in 1919 and sent to Chatto and Windus, who published it in the same year with an
+introduction by J. M. Barrie, who had first insisted on meeting the **** in order
+to check that she was genuine.</biog>
+</author>
+
+</authors>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk048.out b/test/tests/contrib-gold/xsltc/mk/mk048.out
new file mode 100644
index 0000000..2a24e2c
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk048.out
@@ -0,0 +1,53 @@
+
+<html>
+   <body>
+      <h1>Results of Group A</h1>
+      <table cellpadding="5">
+         <tr>
+            <td>Team</td>
+            <td>Played</td>
+            <td>Won</td>
+            <td>Drawn</td>
+            <td>Lost</td>
+            <td>For</td>
+            <td>Against</td>
+         </tr>
+         <tr>
+            <td>Brazil</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>3</td>
+         </tr>
+         <tr>
+            <td>Scotland</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>2</td>
+            <td>6</td>
+         </tr>
+         <tr>
+            <td>Morocco</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>5</td>
+            <td>5</td>
+         </tr>
+         <tr>
+            <td>Norway</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>6</td>
+            <td>5</td>
+            <td>4</td>
+         </tr>
+      </table>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk049.out b/test/tests/contrib-gold/xsltc/mk/mk049.out
new file mode 100644
index 0000000..9eb8769
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk049.out
@@ -0,0 +1,46 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Management Structure</title>
+</head>
+<body><h1>Management Structure</h1>
+<p>The following responsibilies were announced on 
+      28 March 2000:</p>
+<table border="2" cellpadding="5"><tr><th>Name</th>
+<th>Role</th>
+<th>Reporting to</th>
+</tr>
+<tr><td>Keith Todd</td>
+<td>Chief Executive Officer</td>
+<td></td>
+</tr>
+<tr><td>Andrew Boswell</td>
+<td>Technical Director</td>
+<td>Keith Todd</td>
+</tr>
+<tr><td>Dave McVitie</td>
+<td>Chief Engineer</td>
+<td>Andrew Boswell</td>
+</tr>
+<tr><td>John Elmore</td>
+<td>Director of Research</td>
+<td>Andrew Boswell</td>
+</tr>
+<tr><td>Alan Gibson</td>
+<td>Operations and Finance</td>
+<td>Keith Todd</td>
+</tr>
+<tr><td>Fiona Colquhoun</td>
+<td>Human Resources</td>
+<td>Keith Todd</td>
+</tr>
+<tr><td>John Davison</td>
+<td>Marketing</td>
+<td>Keith Todd</td>
+</tr>
+<tr><td>Marie-Anne van Ingen</td>
+<td>International</td>
+<td>Keith Todd</td>
+</tr>
+</table>
+<hr>
+</body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk050.out b/test/tests/contrib-gold/xsltc/mk/mk050.out
new file mode 100644
index 0000000..4897db7
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk050.out
@@ -0,0 +1,16 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Sales volume by publisher</title>
+</head>
+<body><h1>Sales volume by publisher</h1>
+<table><tr><th>Publisher</th>
+<th>Total Sales Value</th>
+</tr>
+<tr><td>HarperCollins</td>
+<td>235</td>
+</tr>
+<tr><td>Penguin Books</td>
+<td>12</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk051.out b/test/tests/contrib-gold/xsltc/mk/mk051.out
new file mode 100644
index 0000000..77c9f3c
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk051.out
@@ -0,0 +1,341 @@
+<HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<TITLE>SCENE II.  Another street.</TITLE>
+</HEAD>
+<BODY BGCOLOR="#FFFFCC">
+   <H1><CENTER>SCENE II.  Another street.</CENTER>
+</H1>
+<HR>
+
+   <CENTER><H3>Enter OTHELLO, IAGO, and Attendants with torches</H3>
+</CENTER>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">Though in the trade of war I have slain men,<BR>
+Yet do I hold it very stuff o' the conscience<BR>
+To do no contrived murder: I lack iniquity<BR>
+Sometimes to do me service: nine or ten times<BR>
+I had thought to have yerk'd him here under the ribs.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">'Tis better as it is.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">Nay, but he prated,<BR>
+And spoke such scurvy and provoking terms<BR>
+Against your honour<BR>
+That, with the little godliness I have,<BR>
+I did full hard forbear him. But, I pray you, sir,<BR>
+Are you fast married? Be assured of this,<BR>
+That the magnifico is much beloved,<BR>
+And hath in his effect a voice potential<BR>
+As double as the duke's: he will divorce you;<BR>
+Or put upon you what restraint and grievance<BR>
+The law, with all his might to enforce it on,<BR>
+Will give him cable.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">Let him do his spite:<BR>
+My services which I have done the signiory<BR>
+Shall out-tongue his complaints. 'Tis yet to know,--<BR>
+Which, when I know that boasting is an honour,<BR>
+I shall promulgate--I fetch my life and being<BR>
+From men of royal siege, and my demerits<BR>
+May speak unbonneted to as proud a fortune<BR>
+As this that I have reach'd: for know, Iago,<BR>
+But that I love the gentle Desdemona,<BR>
+I would not my unhoused free condition<BR>
+Put into circumscription and confine<BR>
+For the sea's worth. But, look! what lights come yond?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">Those are the raised father and his friends:<BR>
+You were best go in.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">Not I I must be found:<BR>
+My parts, my title and my perfect soul<BR>
+Shall manifest me rightly. Is it they?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">By Janus, I think no.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <CENTER><H3>Enter CASSIO, and certain Officers with torches</H3>
+</CENTER>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">The servants of the duke, and my lieutenant.<BR>
+The goodness of the night upon you, friends!<BR>
+What is the news?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>CASSIO</B>
+</TD>
+<TD VALIGN="TOP">The duke does greet you, general,<BR>
+And he requires your haste-post-haste appearance,<BR>
+Even on the instant.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">What is the matter, think you?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>CASSIO</B>
+</TD>
+<TD VALIGN="TOP">Something from Cyprus as I may divine:<BR>
+It is a business of some heat: the galleys<BR>
+Have sent a dozen sequent messengers<BR>
+This very night at one another's heels,<BR>
+And many of the consuls, raised and met,<BR>
+Are at the duke's already: you have been<BR>
+hotly call'd for;<BR>
+When, being not at your lodging to be found,<BR>
+The senate hath sent about three several guests<BR>
+To search you out.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">'Tis well I am found by you.<BR>
+I will but spend a word here in the house,<BR>
+And go with you.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <CENTER><H3>Exit</H3>
+</CENTER>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>CASSIO</B>
+</TD>
+<TD VALIGN="TOP">Ancient, what makes he here?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">'Faith, he to-night hath boarded a land carack:<BR>
+If it prove lawful prize, he's made for ever.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>CASSIO</B>
+</TD>
+<TD VALIGN="TOP">I do not understand.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">He's married.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>CASSIO</B>
+</TD>
+<TD VALIGN="TOP">To who?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <CENTER><H3>Re-enter OTHELLO</H3>
+</CENTER>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">Marry, to--Come, captain, will you go?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">Have with you.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>CASSIO</B>
+</TD>
+<TD VALIGN="TOP">Here comes another troop to seek for you.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">It is Brabantio. General, be advised;<BR>
+He comes to bad intent.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <CENTER><H3>Enter BRABANTIO, RODERIGO, and Officers with
+torches and weapons</H3>
+</CENTER>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">Holla! stand there!<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>RODERIGO</B>
+</TD>
+<TD VALIGN="TOP">Signior, it is the Moor.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>BRABANTIO</B>
+</TD>
+<TD VALIGN="TOP">Down with him, thief!<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <CENTER><H3>They draw on both sides</H3>
+</CENTER>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>IAGO</B>
+</TD>
+<TD VALIGN="TOP">You, Roderigo! come, sir, I am for you.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">Keep up your bright swords, for the dew will rust them.<BR>
+Good signior, you shall more command with years<BR>
+Than with your weapons.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>BRABANTIO</B>
+</TD>
+<TD VALIGN="TOP">O thou foul thief, where hast thou stow'd my daughter?<BR>
+Damn'd as thou art, thou hast enchanted her;<BR>
+For I'll refer me to all things of sense,<BR>
+If she in chains of magic were not bound,<BR>
+Whether a maid so tender, fair and happy,<BR>
+So opposite to marriage that she shunned<BR>
+The wealthy curled darlings of our nation,<BR>
+Would ever have, to incur a general mock,<BR>
+Run from her guardage to the sooty bosom<BR>
+Of such a thing as thou, to fear, not to delight.<BR>
+Judge me the world, if 'tis not gross in sense<BR>
+That thou hast practised on her with foul charms,<BR>
+Abused her delicate youth with drugs or minerals<BR>
+That weaken motion: I'll have't disputed on;<BR>
+'Tis probable and palpable to thinking.<BR>
+I therefore apprehend and do attach thee<BR>
+For an abuser of the world, a practiser<BR>
+Of arts inhibited and out of warrant.<BR>
+Lay hold upon him: if he do resist,<BR>
+Subdue him at his peril.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">Hold your hands,<BR>
+Both you of my inclining, and the rest:<BR>
+Were it my cue to fight, I should have known it<BR>
+Without a prompter. Where will you that I go<BR>
+To answer this your charge?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>BRABANTIO</B>
+</TD>
+<TD VALIGN="TOP">To prison, till fit time<BR>
+Of law and course of direct session<BR>
+Call thee to answer.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>OTHELLO</B>
+</TD>
+<TD VALIGN="TOP">What if I do obey?<BR>
+How may the duke be therewith satisfied,<BR>
+Whose messengers are here about my side,<BR>
+Upon some present business of the state<BR>
+To bring me to him?<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>First Officer</B>
+</TD>
+<TD VALIGN="TOP">'Tis true, most worthy signior;<BR>
+The duke's in council and your noble self,<BR>
+I am sure, is sent for.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <TABLE><TR><TD VALIGN="TOP" WIDTH="160"><B>BRABANTIO</B>
+</TD>
+<TD VALIGN="TOP">How! the duke in council!<BR>
+In this time of the night! Bring him away:<BR>
+Mine's not an idle cause: the duke himself,<BR>
+Or any of my brothers of the state,<BR>
+Cannot but feel this wrong as 'twere their own;<BR>
+For if such actions may have passage free,<BR>
+Bond-slaves and pagans shall our statesmen be.<BR>
+</TD>
+</TR>
+</TABLE>
+
+   <CENTER><H3>Exeunt</H3>
+</CENTER>
+
+</BODY>
+</HTML>
diff --git a/test/tests/contrib-gold/xsltc/mk/mk052.out b/test/tests/contrib-gold/xsltc/mk/mk052.out
new file mode 100644
index 0000000..be19790
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk052.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8" ?>29.7
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk053.out b/test/tests/contrib-gold/xsltc/mk/mk053.out
new file mode 100644
index 0000000..a611ddb
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk053.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+Total sales value is: $1798.53
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk054.out b/test/tests/contrib-gold/xsltc/mk/mk054.out
new file mode 100644
index 0000000..a742301
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk054.out
@@ -0,0 +1,5849 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <title>Extensible Markup Language (XML) 1.0</title>
+      <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC"><style type="text/css">code { font-family: monospace }</style></head>
+   <body>
+      
+      <div class="head"><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/WWW/w3c_home" alt="W3C" height="48" width="72"></a><h1>Extensible Markup Language (XML) 1.0<br></h1>
+         <h2>W3C Recommendation 10 February 1998</h2>
+         <dl>
+            <dt>This version:</dt>
+            <dd>
+               <a href="http://www.w3.org/TR/1998/REC-xml-19980210">
+                  http://www.w3.org/TR/1998/REC-xml-19980210
+               </a><br>
+               <a href="http://www.w3.org/TR/1998/REC-xml-19980210.xml">
+                  http://www.w3.org/TR/1998/REC-xml-19980210.xml
+               </a><br>
+               <a href="http://www.w3.org/TR/1998/REC-xml-19980210.html">
+                  http://www.w3.org/TR/1998/REC-xml-19980210.html
+               </a><br>
+               <a href="http://www.w3.org/TR/1998/REC-xml-19980210.pdf">
+                  http://www.w3.org/TR/1998/REC-xml-19980210.pdf
+               </a><br>
+               <a href="http://www.w3.org/TR/1998/REC-xml-19980210.ps">
+                  http://www.w3.org/TR/1998/REC-xml-19980210.ps
+               </a><br>
+               
+            </dd>
+            <dt>Latest version:</dt>
+            <dd>
+               <a href="http://www.w3.org/TR/REC-xml">
+                  http://www.w3.org/TR/REC-xml
+               </a><br>
+               
+            </dd>
+            <dt>Previous version:</dt>
+            <dd>
+               <a href="http://www.w3.org/TR/PR-xml-971208">
+                  http://www.w3.org/TR/PR-xml-971208
+               </a><br>
+               
+               
+            </dd>
+            <dt>Editors:</dt>
+            <dd>
+               Tim Bray
+                (Textuality and Netscape) 
+               <a href="mailto:tbray@textuality.com">&lt;tbray@textuality.com></a><br>
+               Jean Paoli
+                (Microsoft) 
+               <a href="mailto:jeanpa@microsoft.com">&lt;jeanpa@microsoft.com></a><br>
+               C. M. Sperberg-McQueen
+                (University of Illinois at Chicago) 
+               <a href="mailto:cmsmcq@uic.edu">&lt;cmsmcq@uic.edu></a><br>
+               
+            </dd>
+         </dl>
+         <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright">
+               		Copyright
+            </a> &nbsp;&copy;&nbsp; 1999 <a href="http://www.w3.org">W3C</a>
+            		(<a href="http://www.lcs.mit.edu">MIT</a>,
+            		<a href="http://www.inria.fr/">INRIA</a>,
+            		<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C
+            		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Legal_Disclaimer">liability</a>,
+            		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#W3C_Trademarks">trademark</a>,
+            		<a href="http://www.w3.org/Consortium/Legal/copyright-documents.html">document use</a> and
+            		<a href="http://www.w3.org/Consortium/Legal/copyright-software.html">software licensing</a> rules apply.
+            	
+         </p>
+         <hr title="Separator for header">
+      </div>
+      <h2><a name="abstract">Abstract</a></h2>
+      
+      <p>The Extensible Markup Language (XML) is a subset of
+         SGML that is completely described in this document. Its goal is to
+         enable generic SGML to be served, received, and processed on the Web
+         in the way that is now possible with HTML. XML has been designed for
+         ease of implementation and for interoperability with both SGML and
+         HTML.
+      </p>
+      
+      <h2><a name="status">Status of this document</a></h2>
+      
+      <p>This document has been reviewed by W3C Members and
+         other interested parties and has been endorsed by the
+         Director as a W3C Recommendation. It is a stable
+         document and may be used as reference material or cited
+         as a normative reference from another document. W3C's
+         role in making the Recommendation is to draw attention
+         to the specification and to promote its widespread
+         deployment. This enhances the functionality and
+         interoperability of the Web.
+      </p>
+      
+      <p>
+         This document specifies a syntax created by subsetting an existing,
+         widely used international text processing standard (Standard
+         Generalized Markup Language, ISO 8879:1986(E) as amended and
+         corrected) for use on the World Wide Web.  It is a product of the W3C
+         XML Activity, details of which can be found at <a href="http://www.w3.org/XML">http://www.w3.org/XML</a>.  A list of
+         current W3C Recommendations and other technical documents can be found
+         at <a href="http://www.w3.org/TR">http://www.w3.org/TR</a>.
+         
+      </p>
+      
+      <p>This specification uses the term URI, which is defined by <a href="#Berners-Lee">[Berners-Lee et al.]</a>, a work in progress expected to update <a href="#RFC1738">[IETF RFC1738]</a> and <a href="#RFC1808">[IETF RFC1808]</a>. 
+         
+      </p>
+      
+      <p>The list of known errors in this specification is 
+         available at 
+         <a href="http://www.w3.org/XML/xml-19980210-errata">http://www.w3.org/XML/xml-19980210-errata</a>.
+      </p>
+      
+      <p>Please report errors in this document to 
+         <a href="mailto:xml-editor@w3.org">xml-editor@w3.org</a>.
+         
+      </p>
+      
+      
+      <h2><a name="contents">Table of contents</a></h2>1 <a href="#sec-intro">Introduction</a><br>&nbsp;&nbsp;&nbsp;&nbsp;1.1 <a href="#sec-origin-goals">Origin and Goals</a><br>&nbsp;&nbsp;&nbsp;&nbsp;1.2 <a href="#sec-terminology">Terminology</a><br>2 <a href="#sec-documents">Documents</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.1 <a href="#sec-well-formed">Well-Formed XML Documents</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.2 <a href="#charsets">Characters</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.3 <a href="#sec-common-syn">Common Syntactic Constructs</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.4 <a href="#syntax">Character Data and Markup</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.5 <a href="#sec-comments">Comments</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.6 <a href="#sec-pi">Processing Instructions</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.7 <a href="#sec-cdata-sect">CDATA Sections</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.8 <a href="#sec-prolog-dtd">Prolog and Document Type Declaration</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.9 <a href="#sec-rmd">Standalone Document Declaration</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.10 <a href="#sec-white-space">White Space Handling</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.11 <a href="#sec-line-ends">End-of-Line Handling</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.12 <a href="#sec-lang-tag">Language Identification</a><br>3 <a href="#sec-logical-struct">Logical Structures</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.1 <a href="#sec-starttags">Start-Tags, End-Tags, and Empty-Element Tags</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.2 <a href="#elemdecls">Element Type Declarations</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.2.1 <a href="#sec-element-content">Element Content</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.2.2 <a href="#sec-mixed-content">Mixed Content</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.3 <a href="#attdecls">Attribute-List Declarations</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.3.1 <a href="#sec-attribute-types">Attribute Types</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.3.2 <a href="#sec-attr-defaults">Attribute Defaults</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.3.3 <a href="#AVNormalize">Attribute-Value Normalization</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.4 <a href="#sec-condition-sect">Conditional Sections</a><br>4 <a href="#sec-physical-struct">Physical Structures</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.1 <a href="#sec-references">Character and Entity References</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.2 <a href="#sec-entity-decl">Entity Declarations</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.2.1 <a href="#sec-internal-ent">Internal Entities</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.2.2 <a href="#sec-external-ent">External Entities</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.3 <a href="#TextEntities">Parsed Entities</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.3.1 <a href="#sec-TextDecl">The Text Declaration</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.3.2 <a href="#wf-entities">Well-Formed Parsed Entities</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.3.3 <a href="#charencoding">Character Encoding in Entities</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.4 <a href="#entproc">XML Processor Treatment of Entities and References</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.1 <a href="#not-recognized">Not Recognized</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.2 <a href="#included">Included</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.3 <a href="#include-if-valid">Included If Validating</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.4 <a href="#forbidden">Forbidden</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.5 <a href="#inliteral">Included in Literal</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.6 <a href="#notify">Notify</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.7 <a href="#bypass">Bypassed</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.8 <a href="#as-PE">Included as PE</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.5 <a href="#intern-replacement">Construction of Internal Entity Replacement Text</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.6 <a href="#sec-predefined-ent">Predefined Entities</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.7 <a href="#Notations">Notation Declarations</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.8 <a href="#sec-doc-entity">Document Entity</a><br>5 <a href="#sec-conformance">Conformance</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.1 <a href="#proc-types">Validating and Non-Validating Processors</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.2 <a href="#safe-behavior">Using XML Processors</a><br>6 <a href="#sec-notation">Notation</a><br><h3>Appendices</h3>A <a href="#sec-bibliography">References</a><br>&nbsp;&nbsp;&nbsp;&nbsp;A.1 <a href="#sec-existing-stds">Normative References</a><br>&nbsp;&nbsp;&nbsp;&nbsp;A.2 <a href="#section-Other-References">Other References</a><br>B <a href="#CharClasses">Character Classes</a><br>C <a href="#sec-xml-and-sgml">XML and SGML</a> (Non-Normative)<br>D <a href="#sec-entexpand">Expansion of Entity and Character References</a> (Non-Normative)<br>E <a href="#determinism">Deterministic Content Models</a> (Non-Normative)<br>F <a href="#sec-guessing">Autodetection of Character Encodings</a> (Non-Normative)<br>G <a href="#sec-xml-wg">W3C XML Working Group</a> (Non-Normative)<br><hr> 
+      
+      
+      <h2><a name="sec-intro"></a>1 Introduction
+      </h2>
+      
+      <p>Extensible Markup Language, abbreviated XML, describes a class of
+         data objects called <a href="#dt-xml-doc">XML documents</a> and
+         partially describes the behavior of 
+         computer programs which process them. XML is an application profile or
+         restricted form of SGML, the Standard Generalized Markup 
+         Language <a href="#ISO8879">[ISO 8879]</a>.
+         By construction, XML documents 
+         are conforming SGML documents.
+         
+      </p>
+      
+      <p>XML documents are made up of storage units called <a href="#dt-entity">entities</a>, which contain either parsed
+         or unparsed data.
+         Parsed data is made up of <a href="#dt-character">characters</a>,
+         some 
+         of which form <a href="#dt-chardata">character data</a>, 
+         and some of which form <a href="#dt-markup">markup</a>.
+         Markup encodes a description of the document's storage layout and
+         logical structure. XML provides a mechanism to impose constraints on
+         the storage layout and logical structure.
+      </p>
+      
+      <p><a name="dt-xml-proc"></a>A software module
+         called an <b>XML processor</b> is used to read XML documents
+         and provide access to their content and structure. <a name="dt-app"></a>It is assumed that an XML processor is
+         doing its work on behalf of another module, called the
+         <b>application</b>. This specification describes the
+         required behavior of an XML processor in terms of how it must read XML
+         data and the information it must provide to the application.
+      </p>
+      
+      
+      
+      <h3><a name="sec-origin-goals"></a>1.1 Origin and Goals
+      </h3>
+      
+      <p>XML was developed by an XML Working Group (originally known as the
+         SGML Editorial Review Board) formed under the auspices of the World
+         Wide Web Consortium (W3C) in 1996.
+         It was chaired by Jon Bosak of Sun
+         Microsystems with the active participation of an XML Special
+         Interest Group (previously known as the SGML Working Group) also
+         organized by the W3C. The membership of the XML Working Group is given
+         in an appendix. Dan Connolly served as the WG's contact with the W3C.
+         
+      </p>
+      
+      <p>The design goals for XML are:
+         <ol>
+            
+            <li>
+               <p>XML shall be straightforwardly usable over the
+                  Internet.
+               </p>
+            </li>
+            
+            <li>
+               <p>XML shall support a wide variety of applications.</p>
+            </li>
+            
+            <li>
+               <p>XML shall be compatible with SGML.</p>
+            </li>
+            
+            <li>
+               <p>It shall be easy to write programs which process XML
+                  documents.
+               </p>
+            </li>
+            
+            <li>
+               <p>The number of optional features in XML is to be kept to the
+                  absolute minimum, ideally zero.
+               </p>
+            </li>
+            
+            <li>
+               <p>XML documents should be human-legible and reasonably
+                  clear.
+               </p>
+            </li>
+            
+            <li>
+               <p>The XML design should be prepared quickly.</p>
+            </li>
+            
+            <li>
+               <p>The design of XML shall be formal and concise.</p>
+            </li>
+            
+            <li>
+               <p>XML documents shall be easy to create.</p>
+            </li>
+            
+            <li>
+               <p>Terseness in XML markup is of minimal importance.</p>
+            </li>
+         </ol>
+         
+      </p>
+      
+      <p>This specification, 
+         together with associated standards
+         (Unicode and ISO/IEC 10646 for characters,
+         Internet RFC 1766 for language identification tags, 
+         ISO 639 for language name codes, and 
+         ISO 3166 for country name codes),
+         provides all the information necessary to understand 
+         XML Version 1.0
+         and construct computer programs to process it.
+      </p>
+      
+      <p>This version of the XML specification
+         
+         may be distributed freely, as long as
+         all text and legal notices remain intact.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="sec-terminology"></a>1.2 Terminology
+      </h3>
+      
+      
+      <p>The terminology used to describe XML documents is defined in the body of
+         this specification.
+         The terms defined in the following list are used in building those
+         definitions and in describing the actions of an XML processor:
+         
+         <dl>
+            
+            
+            <dt><b>may</b></dt>
+            
+            <dd>
+               <p><a name="dt-may"></a>Conforming documents and XML
+                  processors are permitted to but need not behave as
+                  described.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>must</b></dt>
+            
+            <dd>
+               <p>Conforming documents and XML processors 
+                  are required to behave as described; otherwise they are in error.
+                  
+                  
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>error</b></dt>
+            
+            <dd>
+               <p><a name="dt-error"></a>A violation of the rules of this
+                  specification; results are
+                  undefined.  Conforming software may detect and report an error and may
+                  recover from it.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>fatal error</b></dt>
+            
+            <dd>
+               <p><a name="dt-fatal"></a>An error
+                  which a conforming <a href="#dt-xml-proc">XML processor</a>
+                  must detect and report to the application.
+                  After encountering a fatal error, the
+                  processor may continue
+                  processing the data to search for further errors and may report such
+                  errors to the application.  In order to support correction of errors,
+                  the processor may make unprocessed data from the document (with
+                  intermingled character data and markup) available to the application.
+                  Once a fatal error is detected, however, the processor must not
+                  continue normal processing (i.e., it must not
+                  continue to pass character data and information about the document's
+                  logical structure to the application in the normal way).
+                  
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>at user option</b></dt>
+            
+            <dd>
+               <p>Conforming software may or must (depending on the modal verb in the
+                  sentence) behave as described; if it does, it must
+                  provide users a means to enable or disable the behavior
+                  described.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>validity constraint</b></dt>
+            
+            <dd>
+               <p>A rule which applies to all 
+                  <a href="#dt-valid">valid</a> XML documents.
+                  Violations of validity constraints are errors; they must, at user option, 
+                  be reported by 
+                  <a href="#dt-validating">validating XML processors</a>.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>well-formedness constraint</b></dt>
+            
+            <dd>
+               <p>A rule which applies to all <a href="#dt-wellformed">well-formed</a> XML documents.
+                  Violations of well-formedness constraints are 
+                  <a href="#dt-fatal">fatal errors</a>.
+               </p>
+            </dd>
+            
+            
+            
+            
+            <dt><b>match</b></dt>
+            
+            <dd>
+               <p><a name="dt-match"></a>(Of strings or names:) 
+                  Two strings or names being compared must be identical.
+                  Characters with multiple possible representations in ISO/IEC 10646 (e.g.
+                  characters with 
+                  both precomposed and base+diacritic forms) match only if they have the
+                  same representation in both strings.
+                  At user option, processors may normalize such characters to
+                  some canonical form.
+                  No case folding is performed. 
+                  (Of strings and rules in the grammar:)  
+                  A string matches a grammatical production if it belongs to the
+                  language generated by that production.
+                  (Of content and content models:)
+                  An element matches its declaration when it conforms
+                  in the fashion described in the constraint
+                  <a href="#elementvalid">[<b>3 Element Valid</b>]
+                  </a>.
+                  
+                  
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>for compatibility</b></dt>
+            
+            <dd>
+               <p><a name="dt-compat"></a>A feature of
+                  XML included solely to ensure that XML remains compatible with SGML.
+                  
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>for interoperability</b></dt>
+            
+            <dd>
+               <p><a name="dt-interop"></a>A
+                  non-binding recommendation included to increase the chances that XML
+                  documents can be processed by the existing installed base of SGML
+                  processors which predate the
+                  WebSGML Adaptations Annex to ISO 8879.
+               </p>
+            </dd>
+            
+            
+         </dl>
+         
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="sec-documents"></a>2 Documents
+      </h2>
+      
+      
+      <p><a name="dt-xml-doc"></a>
+         A data object is an
+         <b>XML document</b> if it is
+         <a href="#dt-wellformed">well-formed</a>, as
+         defined in this specification.
+         A well-formed XML document may in addition be
+         <a href="#dt-valid">valid</a> if it meets certain further 
+         constraints.
+      </p>
+      
+      
+      <p>Each XML document has both a logical and a physical structure.
+         Physically, the document is composed of units called <a href="#dt-entity">entities</a>.  An entity may <a href="#dt-entref">refer</a> to other entities to cause their
+         inclusion in the document. A document begins in a "root"  or <a href="#dt-docent">document entity</a>.
+         Logically, the document is composed of declarations, elements, 
+         comments,
+         character references, and
+         processing
+         instructions, all of which are indicated in the document by explicit
+         markup.
+         The logical and physical structures must nest properly, as described  
+         in <a href="#wf-entities">[<b>4.3.2 Well-Formed Parsed Entities</b>]
+         </a>.
+         
+      </p>
+      
+      
+      
+      <h3><a name="sec-well-formed"></a>2.1 Well-Formed XML Documents
+      </h3>
+      
+      
+      <p><a name="dt-wellformed"></a>
+         A textual object is 
+         a well-formed XML document if:
+         
+         <ol>
+            
+            <li>
+               <p>Taken as a whole, it
+                  matches the production labeled <a href="#NT-document">document</a>.
+               </p>
+            </li>
+            
+            <li>
+               <p>It
+                  meets all the well-formedness constraints given in this specification.
+               </p>
+               
+            </li>
+            
+            <li>
+               <p>Each of the <a href="#dt-parsedent">parsed entities</a> 
+                  which is referenced directly or indirectly within the document is
+                  <a href="#wf-entities">well-formed</a>.
+               </p>
+            </li>
+            
+         </ol>
+      </p>
+      
+      <p>
+         
+         <h5>Document</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-document"></a>[1]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>document</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-prolog">prolog</a> 
+                     <a href="#NT-element">element</a> 
+                     <a href="#NT-Misc">Misc</a>*
+                  </td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>Matching the <a href="#NT-document">document</a> production 
+         implies that:
+         
+         <ol>
+            
+            <li>
+               <p>It contains one or more
+                  <a href="#dt-element">elements</a>.
+               </p>
+               
+            </li>
+            
+            
+            <li>
+               <p><a name="dt-root"></a>There is  exactly
+                  one element, called the <b>root</b>, or document element,  no
+                  part of which appears in the <a href="#dt-content">content</a> of any other element.
+                  For all other elements, if the start-tag is in the content of another
+                  element, the end-tag is in the content of the same element.  More
+                  simply stated, the elements, delimited by start- and end-tags, nest
+                  properly within each other.
+                  
+               </p>
+            </li>
+            
+         </ol>
+         
+      </p>
+      
+      <p><a name="dt-parentchild"></a>As a consequence 
+         of this,
+         for each non-root element
+         <code>C</code> in the document, there is one other element <code>P</code>
+         in the document such that 
+         <code>C</code> is in the content of <code>P</code>, but is not in
+         the content of any other element that is in the content of
+         <code>P</code>.  
+         <code>P</code> is referred to as the
+         <b>parent</b> of <code>C</code>, and <code>C</code> as a
+         <b>child</b> of <code>P</code>.
+      </p>
+      
+      
+      
+      <h3><a name="charsets"></a>2.2 Characters
+      </h3>
+      
+      
+      <p><a name="dt-text"></a>A parsed entity contains
+         <b>text</b>, a sequence of 
+         <a href="#dt-character">characters</a>, 
+         which may represent markup or character data. 
+         <a name="dt-character"></a>A <b>character</b> 
+         is an atomic unit of text as specified by
+         ISO/IEC 10646 <a href="#ISO10646">[ISO/IEC 10646]</a>.
+         Legal characters are tab, carriage return, line feed, and the legal
+         graphic characters of Unicode and ISO/IEC 10646.
+         The use of "compatibility characters", as defined in section 6.8
+         of <a href="#Unicode">[Unicode]</a>, is discouraged.
+          
+         
+         <h5>Character Range</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Char"></a>[2]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Char</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] 
+                     | [#x10000-#x10FFFF]
+                  </td>
+                  <td>/*any Unicode character, excluding the
+                     surrogate blocks, FFFE, and FFFF.*/
+                  </td>
+               </tr>
+               
+            </tbody>
+         </table>
+         
+      </p>
+      
+      
+      <p>The mechanism for encoding character code points into bit patterns may
+         vary from entity to entity. All XML processors must accept the UTF-8
+         and UTF-16 encodings of 10646; the mechanisms for signaling which of
+         the two is in use, or for bringing other encodings into play, are
+         discussed later, in <a href="#charencoding">[<b>4.3.3 Character Encoding in Entities</b>]
+         </a>.
+         
+      </p>
+      
+      
+      
+      
+      
+      <h3><a name="sec-common-syn"></a>2.3 Common Syntactic Constructs
+      </h3>
+      
+      
+      <p>This section defines some symbols used widely in the grammar.</p>
+      
+      <p><a href="#NT-S">S</a> (white space) consists of one or more space (#x20)
+         characters, carriage returns, line feeds, or tabs.
+         
+         
+         <h5>White Space</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-S"></a>[3]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>S</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>(#x20 | #x9 | #xD | #xA)+</td>
+                  <td></td>
+               </tr>
+               
+            </tbody>
+         </table>
+      </p>
+      
+      <p>Characters are classified for convenience as letters, digits, or other
+         characters.  Letters consist of an alphabetic or syllabic 
+         base character possibly
+         followed by one or more combining characters, or of an ideographic
+         character.  
+         Full definitions of the specific characters in each class
+         are given in <a href="#CharClasses">[<b>B Character Classes</b>]
+         </a>.
+      </p>
+      
+      <p><a name="dt-name"></a>A <b>Name</b> is a token
+         beginning with a letter or one of a few punctuation characters, and continuing
+         with letters, digits, hyphens, underscores, colons, or full stops, together
+         known as name characters.
+         Names beginning with the string "<code>xml</code>", or any string
+         which would match <code>(('X'|'x') ('M'|'m') ('L'|'l'))</code>, are
+         reserved for standardization in this or future versions of this
+         specification.
+         
+      </p>
+      
+      <blockquote><b>NOTE: </b>
+         The colon character within XML names is reserved for experimentation with
+         name spaces.  
+         Its meaning is expected to be
+         standardized at some future point, at which point those documents 
+         using the colon for experimental purposes may need to be updated.
+         (There is no guarantee that any name-space mechanism
+         adopted for XML will in fact use the colon as a name-space delimiter.)
+         In practice, this means that authors should not use the colon in XML
+         names except as part of name-space experiments, but that XML processors
+         should accept the colon as a name character.
+         
+      </blockquote>
+      
+      <p>An
+         <a href="#NT-Nmtoken">Nmtoken</a> (name token) is any mixture of
+         name characters.
+         
+         <h5>Names and Tokens</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-NameChar"></a>[4]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>NameChar</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Letter">Letter</a> 
+                     | <a href="#NT-Digit">Digit</a> 
+                     | '.' | '-' | '_' | ':'
+                     | <a href="#NT-CombiningChar">CombiningChar</a> 
+                     | <a href="#NT-Extender">Extender</a></td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-Name"></a>[5]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Name</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>(<a href="#NT-Letter">Letter</a> | '_' | ':')
+                     (<a href="#NT-NameChar">NameChar</a>)*
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-Names"></a>[6]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Names</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Name">Name</a> 
+                     (<a href="#NT-S">S</a> <a href="#NT-Name">Name</a>)*
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-Nmtoken"></a>[7]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Nmtoken</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>(<a href="#NT-NameChar">NameChar</a>)+
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-Nmtokens"></a>[8]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Nmtokens</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Nmtoken">Nmtoken</a> (<a href="#NT-S">S</a> <a href="#NT-Nmtoken">Nmtoken</a>)*
+                  </td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>Literal data is any quoted string not containing
+         the quotation mark used as a delimiter for that string.
+         Literals are used
+         for specifying the content of internal entities
+         (<a href="#NT-EntityValue">EntityValue</a>),
+         the values of attributes (<a href="#NT-AttValue">AttValue</a>), 
+         and external identifiers 
+         (<a href="#NT-SystemLiteral">SystemLiteral</a>).  
+         Note that a <a href="#NT-SystemLiteral">SystemLiteral</a>
+         can be parsed without scanning for markup.
+         
+         <h5>Literals</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-EntityValue"></a>[9]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>EntityValue</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'"' 
+                     ([^%&amp;"] 
+                     | <a href="#NT-PEReference">PEReference</a> 
+                     | <a href="#NT-Reference">Reference</a>)*
+                     '"' 
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>|&nbsp; 
+                     "'" 
+                     ([^%&amp;'] 
+                     | <a href="#NT-PEReference">PEReference</a> 
+                     | <a href="#NT-Reference">Reference</a>)* 
+                     "'"
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-AttValue"></a>[10]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>AttValue</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'"' 
+                     ([^&lt;&amp;"] 
+                     | <a href="#NT-Reference">Reference</a>)* 
+                     '"' 
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>|&nbsp; 
+                     "'" 
+                     ([^&lt;&amp;'] 
+                     | <a href="#NT-Reference">Reference</a>)* 
+                     "'"
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-SystemLiteral"></a>[11]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>SystemLiteral</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>('"' [^"]* '"') |&nbsp;("'" [^']* "'")
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-PubidLiteral"></a>[12]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>PubidLiteral</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'"' <a href="#NT-PubidChar">PubidChar</a>* 
+                     '"' 
+                     | "'" (<a href="#NT-PubidChar">PubidChar</a> - "'")* "'"
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-PubidChar"></a>[13]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>PubidChar</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>#x20 | #xD | #xA 
+                     |&nbsp;[a-zA-Z0-9]
+                     |&nbsp;[-'()+,./:=?;!*#@$_%]
+                  </td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         
+      </p>
+      
+      
+      
+      
+      
+      <h3><a name="syntax"></a>2.4 Character Data and Markup
+      </h3>
+      
+      
+      <p><a href="#dt-text">Text</a> consists of intermingled 
+         <a href="#dt-chardata">character
+            data
+         </a> and markup.
+         <a name="dt-markup"></a><b>Markup</b> takes the form of
+         <a href="#dt-stag">start-tags</a>,
+         <a href="#dt-etag">end-tags</a>,
+         <a href="#dt-empty">empty-element tags</a>,
+         <a href="#dt-entref">entity references</a>,
+         <a href="#dt-charref">character references</a>,
+         <a href="#dt-comment">comments</a>,
+         <a href="#dt-cdsection">CDATA section</a> delimiters,
+         <a href="#dt-doctype">document type declarations</a>, and
+         <a href="#dt-pi">processing instructions</a>.
+         
+         
+      </p>
+      
+      <p><a name="dt-chardata"></a>All text that is not markup
+         constitutes the <b>character data</b> of
+         the document.
+      </p>
+      
+      <p>The ampersand character (&amp;) and the left angle bracket (&lt;)
+         may appear in their literal form <i>only</i> when used as markup
+         delimiters, or within a <a href="#dt-comment">comment</a>, a
+         <a href="#dt-pi">processing instruction</a>, 
+         or a <a href="#dt-cdsection">CDATA section</a>.  
+         
+         They are also legal within the <a href="#dt-litentval">literal entity
+            value
+         </a> of an internal entity declaration; see
+         <a href="#wf-entities">[<b>4.3.2 Well-Formed Parsed Entities</b>]
+         </a>.
+         
+         If they are needed elsewhere,
+         they must be <a href="#dt-escape">escaped</a>
+         using either <a href="#dt-charref">numeric character references</a>
+         or the strings
+         "<code>&amp;amp;</code>" and "<code>&amp;lt;</code>" respectively. 
+         The right angle
+         bracket (>) may be represented using the string
+         "<code>&amp;gt;</code>", and must, <a href="#dt-compat">for
+            compatibility
+         </a>, 
+         be escaped using
+         "<code>&amp;gt;</code>" or a character reference 
+         when it appears in the string
+         "<code>]]></code>"
+         in content, 
+         when that string is not marking the end of 
+         a <a href="#dt-cdsection">CDATA section</a>. 
+         
+      </p>
+      
+      <p>
+         In the content of elements, character data 
+         is any string of characters which does
+         not contain the start-delimiter of any markup.  
+         In a CDATA section, character data
+         is any string of characters not including the CDATA-section-close
+         delimiter, "<code>]]></code>".
+      </p>
+      
+      <p>
+         To allow attribute values to contain both single and double quotes, the
+         apostrophe or single-quote character (') may be represented as
+         "<code>&amp;apos;</code>", and the double-quote character (") as
+         "<code>&amp;quot;</code>".
+         
+         <h5>Character Data</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-CharData"></a>[14]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>CharData</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>[^&lt;&amp;]* - ([^&lt;&amp;]* ']]>' [^&lt;&amp;]*)</td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         
+      </p>
+      
+      
+      
+      
+      <h3><a name="sec-comments"></a>2.5 Comments
+      </h3>
+      
+      
+      <p><a name="dt-comment"></a><b>Comments</b> may 
+         appear anywhere in a document outside other 
+         <a href="#dt-markup">markup</a>; in addition,
+         they may appear within the document type declaration
+         at places allowed by the grammar.
+         They are not part of the document's <a href="#dt-chardata">character
+            data
+         </a>; an XML
+         processor may, but need not, make it possible for an application to
+         retrieve the text of comments.
+         <a href="#dt-compat">For compatibility</a>, the string
+         "<code>--</code>" (double-hyphen) must not occur within
+         comments.
+         
+         <h5>Comments</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-Comment"></a>[15]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Comment</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;!--'
+                     ((<a href="#NT-Char">Char</a> - '-') 
+                     | ('-' (<a href="#NT-Char">Char</a> - '-')))* 
+                     '-->'
+                  </td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>An example of a comment:
+         <pre>&lt;!-- declarations for &lt;head> &amp; &lt;body> --></pre>
+         </p>
+      
+      
+      
+      
+      <h3><a name="sec-pi"></a>2.6 Processing Instructions
+      </h3>
+      
+      
+      <p><a name="dt-pi"></a><b>Processing
+            instructions
+         </b> (PIs) allow documents to contain instructions
+         for applications.
+         
+         
+         <h5>Processing Instructions</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-PI"></a>[16]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>PI</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;?' <a href="#NT-PITarget">PITarget</a> 
+                     (<a href="#NT-S">S</a> 
+                     (<a href="#NT-Char">Char</a>* - 
+                     (<a href="#NT-Char">Char</a>* '?>' <a href="#NT-Char">Char</a>*)))?
+                     '?>'
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-PITarget"></a>[17]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>PITarget</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Name">Name</a> - 
+                     (('X' | 'x') ('M' | 'm') ('L' | 'l'))
+                  </td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         PIs are not part of the document's <a href="#dt-chardata">character
+            data
+         </a>, but must be passed through to the application. The
+         PI begins with a target (<a href="#NT-PITarget">PITarget</a>) used
+         to identify the application to which the instruction is directed.  
+         The target names "<code>XML</code>", "<code>xml</code>", and so on are
+         reserved for standardization in this or future versions of this
+         specification.
+         The 
+         XML <a href="#dt-notation">Notation</a> mechanism
+         may be used for
+         formal declaration of PI targets.
+         
+      </p>
+      
+      
+      
+      
+      <h3><a name="sec-cdata-sect"></a>2.7 CDATA Sections
+      </h3>
+      
+      
+      <p><a name="dt-cdsection"></a><b>CDATA sections</b>
+         may occur 
+         anywhere character data may occur; they are
+         used to escape blocks of text containing characters which would
+         otherwise be recognized as markup.  CDATA sections begin with the
+         string "<code>&lt;![CDATA[</code>" and end with the string
+         "<code>]]></code>":
+         
+         <h5>CDATA Sections</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-CDSect"></a>[18]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>CDSect</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-CDStart">CDStart</a> 
+                     <a href="#NT-CData">CData</a> 
+                     <a href="#NT-CDEnd">CDEnd</a></td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-CDStart"></a>[19]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>CDStart</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;![CDATA['</td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-CData"></a>[20]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>CData</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>(<a href="#NT-Char">Char</a>* - 
+                     (<a href="#NT-Char">Char</a>* ']]>' <a href="#NT-Char">Char</a>*))
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-CDEnd"></a>[21]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>CDEnd</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>']]>'</td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         
+         Within a CDATA section, only the <a href="#NT-CDEnd">CDEnd</a> string is
+         recognized as markup, so that left angle brackets and ampersands may occur in
+         their literal form; they need not (and cannot) be escaped using
+         "<code>&amp;lt;</code>" and "<code>&amp;amp;</code>".  CDATA sections
+         cannot nest.
+         
+      </p>
+      
+      
+      <p>An example of a CDATA section, in which "<code>&lt;greeting></code>" and 
+         "<code>&lt;/greeting></code>"
+         are recognized as <a href="#dt-chardata">character data</a>, not
+         <a href="#dt-markup">markup</a>:
+         <pre>&lt;![CDATA[&lt;greeting>Hello, world!&lt;/greeting>]]></pre>
+         </p>
+      
+      
+      
+      
+      <h3><a name="sec-prolog-dtd"></a>2.8 Prolog and Document Type Declaration
+      </h3>
+      
+      
+      <p><a name="dt-xmldecl"></a>XML documents 
+         may, and should, 
+         begin with an <b>XML declaration</b> which specifies
+         the version of
+         XML being used.
+         For example, the following is a complete XML document, <a href="#dt-wellformed">well-formed</a> but not
+         <a href="#dt-valid">valid</a>:
+         <pre>&lt;?xml version="1.0"?>
+&lt;greeting>Hello, world!&lt;/greeting>
+</pre>
+         and so is this:
+         <pre>&lt;greeting>Hello, world!&lt;/greeting>
+</pre>
+         </p>
+      
+      
+      <p>The version number "<code>1.0</code>" should be used to indicate
+         conformance to this version of this specification; it is an error
+         for a document to use the value "<code>1.0</code>" 
+         if it does not conform to this version of this specification.
+         It is the intent
+         of the XML working group to give later versions of this specification
+         numbers other than "<code>1.0</code>", but this intent does not
+         indicate a
+         commitment to produce any future versions of XML, nor if any are produced, to
+         use any particular numbering scheme.
+         Since future versions are not ruled out, this construct is provided 
+         as a means to allow the possibility of automatic version recognition, should
+         it become necessary.
+         Processors may signal an error if they receive documents labeled with 
+         versions they do not support. 
+         
+      </p>
+      
+      <p>The function of the markup in an XML document is to describe its
+         storage and logical structure and to associate attribute-value pairs
+         with its logical structures.  XML provides a mechanism, the <a href="#dt-doctype">document type declaration</a>, to define
+         constraints on the logical structure and to support the use of
+         predefined storage units.
+         
+         <a name="dt-valid"></a>An XML document is 
+         <b>valid</b> if it has an associated document type
+         declaration and if the document
+         complies with the constraints expressed in it.
+      </p>
+      
+      <p>The document type declaration must appear before
+         the first <a href="#dt-element">element</a> in the document.
+         
+         <h5>Prolog</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-prolog"></a>[22]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>prolog</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-XMLDecl">XMLDecl</a>? 
+                     <a href="#NT-Misc">Misc</a>* 
+                     (<a href="#NT-doctypedecl">doctypedecl</a> 
+                     <a href="#NT-Misc">Misc</a>*)?
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-XMLDecl"></a>[23]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>XMLDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;?xml' 
+                     <a href="#NT-VersionInfo">VersionInfo</a> 
+                     <a href="#NT-EncodingDecl">EncodingDecl</a>? 
+                     <a href="#NT-SDDecl">SDDecl</a>? 
+                     <a href="#NT-S">S</a>? 
+                     '?>'
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-VersionInfo"></a>[24]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>VersionInfo</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-S">S</a> 'version' <a href="#NT-Eq">Eq</a> 
+                     (' <a href="#NT-VersionNum">VersionNum</a> ' 
+                     | " <a href="#NT-VersionNum">VersionNum</a> ")
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Eq"></a>[25]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Eq</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-S">S</a>? '=' <a href="#NT-S">S</a>?
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-VersionNum"></a>[26]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>VersionNum</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>([a-zA-Z0-9_.:] | '-')+</td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Misc"></a>[27]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Misc</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Comment">Comment</a> | <a href="#NT-PI">PI</a> | 
+                     <a href="#NT-S">S</a></td>
+                  <td></td>
+               </tr>
+               
+            </tbody>
+         </table>
+      </p>
+      
+      
+      <p><a name="dt-doctype"></a>The XML
+         <b>document type declaration</b> 
+         contains or points to 
+         <a href="#dt-markupdecl">markup declarations</a> 
+         that provide a grammar for a
+         class of documents.  
+         This grammar is known as a document type definition,
+         or <b>DTD</b>.  
+         The document type declaration can point to an external subset (a
+         special kind of 
+         <a href="#dt-extent">external entity</a>) containing markup
+         declarations, or can 
+         contain the markup declarations directly in an internal subset, or can do
+         both.   
+         The DTD for a document consists of both subsets taken
+         together.
+         
+      </p>
+      
+      <p><a name="dt-markupdecl"></a>
+         A <b>markup declaration</b> is 
+         an <a href="#dt-eldecl">element type declaration</a>, 
+         an <a href="#dt-attdecl">attribute-list declaration</a>, 
+         an <a href="#dt-entdecl">entity declaration</a>, or
+         a <a href="#dt-notdecl">notation declaration</a>.
+         
+         These declarations may be contained in whole or in part
+         within <a href="#dt-PE">parameter entities</a>,
+         as described in the well-formedness and validity constraints below.
+         For fuller information, see
+         <a href="#sec-physical-struct">[<b>4 Physical Structures</b>]
+         </a>.
+      </p>
+      
+      <h5>Document Type Definition</h5>
+      <table class="scrap">
+         <tbody>
+            
+            <tr valign="baseline">
+               <td><a name="NT-doctypedecl"></a>[28]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>doctypedecl</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'&lt;!DOCTYPE' <a href="#NT-S">S</a> 
+                  <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> 
+                  <a href="#NT-ExternalID">ExternalID</a>)? 
+                  <a href="#NT-S">S</a>? ('[' 
+                  (<a href="#NT-markupdecl">markupdecl</a> 
+                  | <a href="#NT-PEReference">PEReference</a> 
+                  | <a href="#NT-S">S</a>)*
+                  ']' 
+                  <a href="#NT-S">S</a>?)? '>'
+               </td>
+               <td>[&nbsp;VC:&nbsp;<a href="#vc-roottype">Root Element Type</a>&nbsp;]
+               </td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-markupdecl"></a>[29]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>markupdecl</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-elementdecl">elementdecl</a> 
+                  | <a href="#NT-AttlistDecl">AttlistDecl</a> 
+                  | <a href="#NT-EntityDecl">EntityDecl</a> 
+                  | <a href="#NT-NotationDecl">NotationDecl</a> 
+                  | <a href="#NT-PI">PI</a> 
+                  | <a href="#NT-Comment">Comment</a>
+                  
+               </td>
+               <td>[&nbsp;VC:&nbsp;<a href="#vc-PEinMarkupDecl">Proper Declaration/PE Nesting</a>&nbsp;]
+               </td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>[&nbsp;WFC:&nbsp;<a href="#wfc-PEinInternalSubset">PEs in Internal Subset</a>&nbsp;]
+               </td>
+            </tr>
+            
+            
+         </tbody>
+      </table>
+      
+      
+      <p>The markup declarations may be made up in whole or in part of
+         the <a href="#dt-repltext">replacement text</a> of 
+         <a href="#dt-PE">parameter entities</a>.
+         The productions later in this specification for
+         individual nonterminals (<a href="#NT-elementdecl">elementdecl</a>,
+         <a href="#NT-AttlistDecl">AttlistDecl</a>, and so on) describe 
+         the declarations <i>after</i> all the parameter entities have been 
+         <a href="#dt-include">included</a>.
+      </p>
+      
+      <a name="vc-roottype"></a><p><b>Validity Constraint: Root Element Type</b></p>
+      Root Element Type
+      
+      <p>
+         The <a href="#NT-Name">Name</a> in the document type declaration must
+         match the element type of the <a href="#dt-root">root element</a>.
+         
+      </p>
+      
+      
+      <a name="vc-PEinMarkupDecl"></a><p><b>Validity Constraint: Proper Declaration/PE Nesting</b></p>
+      Proper Declaration/PE Nesting
+      
+      <p>Parameter-entity 
+         <a href="#dt-repltext">replacement text</a> must be properly nested
+         with markup declarations. 
+         That is to say, if either the first character
+         or the last character of a markup
+         declaration (<a href="#NT-markupdecl">markupdecl</a> above)
+         is contained in the replacement text for a 
+         <a href="#dt-PERef">parameter-entity reference</a>,
+         both must be contained in the same replacement text.
+      </p>
+      
+      <a name="wfc-PEinInternalSubset"></a><p><b>Well Formedness Constraint: PEs in Internal Subset</b></p>
+      PEs in Internal Subset
+      
+      <p>In the internal DTD subset, 
+         <a href="#dt-PERef">parameter-entity references</a>
+         can occur only where markup declarations can occur, not
+         within markup declarations.  (This does not apply to
+         references that occur in
+         external parameter entities or to the external subset.)
+         
+      </p>
+      
+      
+      <p>
+         Like the internal subset, the external subset and 
+         any external parameter entities referred to in the DTD 
+         must consist of a series of complete markup declarations of the types 
+         allowed by the non-terminal symbol
+         <a href="#NT-markupdecl">markupdecl</a>, interspersed with white space
+         or <a href="#dt-PERef">parameter-entity references</a>.
+         However, portions of the contents
+         of the 
+         external subset or of external parameter entities may conditionally be ignored
+         by using 
+         the <a href="#dt-cond-section">conditional section</a>
+         construct; this is not allowed in the internal subset.
+         
+         
+         <h5>External Subset</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-extSubset"></a>[30]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>extSubset</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-TextDecl">TextDecl</a>?
+                     <a href="#NT-extSubsetDecl">extSubsetDecl</a></td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-extSubsetDecl"></a>[31]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>extSubsetDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>(
+                     <a href="#NT-markupdecl">markupdecl</a> 
+                     | <a href="#NT-conditionalSect">conditionalSect</a> 
+                     | <a href="#NT-PEReference">PEReference</a> 
+                     | <a href="#NT-S">S</a>
+                     )*
+                  </td>
+                  <td></td>
+               </tr>
+               
+            </tbody>
+         </table>
+      </p>
+      
+      <p>The external subset and external parameter entities also differ 
+         from the internal subset in that in them,
+         <a href="#dt-PERef">parameter-entity references</a>
+         are permitted <i>within</i> markup declarations,
+         not only <i>between</i> markup declarations.
+      </p>
+      
+      <p>An example of an XML document with a document type declaration:
+         <pre>&lt;?xml version="1.0"?>
+&lt;!DOCTYPE greeting SYSTEM "hello.dtd">
+&lt;greeting>Hello, world!&lt;/greeting>
+</pre>
+         The <a href="#dt-sysid">system identifier</a> 
+         "<code>hello.dtd</code>" gives the URI of a DTD for the document.
+      </p>
+      
+      <p>The declarations can also be given locally, as in this 
+         example:
+         <pre>&lt;?xml version="1.0" encoding="UTF-8" ?>
+&lt;!DOCTYPE greeting [
+  &lt;!ELEMENT greeting (#PCDATA)>
+]>
+&lt;greeting>Hello, world!&lt;/greeting>
+</pre>
+         If both the external and internal subsets are used, the 
+         internal subset is considered to occur before the external subset.
+         
+         This has the effect that entity and attribute-list declarations in the
+         internal subset take precedence over those in the external subset.
+         </p>
+      
+      
+      
+      
+      <h3><a name="sec-rmd"></a>2.9 Standalone Document Declaration
+      </h3>
+      
+      <p>Markup declarations can affect the content of the document,
+         as passed from an <a href="#dt-xml-proc">XML processor</a> 
+         to an application; examples are attribute defaults and entity
+         declarations.
+         The standalone document declaration,
+         which may appear as a component of the XML declaration, signals
+         whether or not there are such declarations which appear external to 
+         the <a href="#dt-docent">document entity</a>.
+         
+         <h5>Standalone Document Declaration</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-SDDecl"></a>[32]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>SDDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>
+                     <a href="#NT-S">S</a> 
+                     'standalone' <a href="#NT-Eq">Eq</a> 
+                     (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
+                     
+                  </td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#vc-check-rmd">Standalone Document Declaration</a>&nbsp;]
+                  </td>
+               </tr>
+               
+            </tbody>
+         </table>
+      </p>
+      
+      <p>
+         In a standalone document declaration, the value "<code>yes</code>" indicates
+         that there 
+         are no markup declarations external to the <a href="#dt-docent">document
+            entity
+         </a> (either in the DTD external subset, or in an
+         external parameter entity referenced from the internal subset)
+         which affect the information passed from the XML processor to
+         the application.  
+         The value "<code>no</code>" indicates that there are or may be such
+         external markup declarations.
+         Note that the standalone document declaration only 
+         denotes the presence of external <i>declarations</i>; the presence, in a
+         document, of 
+         references to external <i>entities</i>, when those entities are
+         internally declared, 
+         does not change its standalone status.
+      </p>
+      
+      <p>If there are no external markup declarations, the standalone document
+         declaration has no meaning. 
+         If there are external markup declarations but there is no standalone
+         document declaration, the value "<code>no</code>" is assumed.
+      </p>
+      
+      <p>Any XML document for which <code>standalone="no"</code> holds can 
+         be converted algorithmically to a standalone document, 
+         which may be desirable for some network delivery applications.
+      </p>
+      <a name="vc-check-rmd"></a><p><b>Validity Constraint: Standalone Document Declaration</b></p>
+      Standalone Document Declaration
+      
+      <p>The standalone document declaration must have
+         the value "<code>no</code>" if any external markup declarations
+         contain declarations of:
+      </p>
+      <ul>
+         
+         <li>
+            <p>attributes with <a href="#dt-default">default</a> values, if
+               elements to which
+               these attributes apply appear in the document without
+               specifications of values for these attributes, or
+            </p>
+         </li>
+         
+         <li>
+            <p>entities (other than <code>amp</code>,
+               <code>lt</code>,
+               <code>gt</code>,
+               <code>apos</code>,
+               <code>quot</code>), 
+               if <a href="#dt-entref">references</a> to those
+               entities appear in the document, or
+            </p>
+            
+         </li>
+         
+         <li>
+            <p>attributes with values subject to
+               <a href="#AVNormalize">normalization</a>, where the
+               attribute appears in the document with a value which will
+               change as a result of normalization, or
+            </p>
+            
+         </li>
+         
+         <li>
+            
+            <p>element types with <a href="#dt-elemcontent">element content</a>, 
+               if white space occurs
+               directly within any instance of those types.
+               
+            </p>
+         </li>
+         
+      </ul>
+      
+      
+      
+      <p>An example XML declaration with a standalone document declaration:<pre>&lt;?xml version="1.0" standalone='yes'?></pre></p>
+      
+      
+      
+      <h3><a name="sec-white-space"></a>2.10 White Space Handling
+      </h3>
+      
+      
+      <p>In editing XML documents, it is often convenient to use "white space"
+         (spaces, tabs, and blank lines, denoted by the nonterminal 
+         <a href="#NT-S">S</a> in this specification) to
+         set apart the markup for greater readability.  Such white space is typically
+         not intended for inclusion in the delivered version of the document.
+         On the other hand, "significant" white space that should be preserved in the
+         delivered version is common, for example in poetry and
+         source code.
+      </p>
+      
+      <p>An <a href="#dt-xml-proc">XML processor</a> 
+         must always pass all characters in a document that are not
+         markup through to the application.   A <a href="#dt-validating">
+            validating XML processor
+         </a> must also inform the application
+         which  of these characters constitute white space appearing
+         in <a href="#dt-elemcontent">element content</a>.
+         
+      </p>
+      
+      <p>A special <a href="#dt-attr">attribute</a> 
+         named xml:space may be attached to an element
+         to signal an intention that in that element,
+         white space should be preserved by applications.
+         In valid documents, this attribute, like any other, must be 
+         <a href="#dt-attdecl">declared</a> if it is used.
+         When declared, it must be given as an 
+         <a href="#dt-enumerated">enumerated type</a> whose only
+         possible values are "<code>default</code>" and "<code>preserve</code>".
+         For example:<pre>    &lt;!ATTLIST poem   xml:space (default|preserve) 'preserve'></pre></p>
+      
+      <p>The value "<code>default</code>" signals that applications'
+         default white-space processing modes are acceptable for this element; the
+         value "<code>preserve</code>" indicates the intent that applications preserve
+         all the white space.
+         This declared intent is considered to apply to all elements within the content
+         of the element where it is specified, unless overriden with another instance
+         of the xml:space attribute.
+         
+      </p>
+      
+      <p>The <a href="#dt-root">root element</a> of any document
+         is considered to have signaled no intentions as regards application space
+         handling, unless it provides a value for 
+         this attribute or the attribute is declared with a default value.
+         
+      </p>
+      
+      
+      
+      
+      <h3><a name="sec-line-ends"></a>2.11 End-of-Line Handling
+      </h3>
+      
+      <p>XML <a href="#dt-parsedent">parsed entities</a> are often stored in
+         computer files which, for editing convenience, are organized into lines.
+         These lines are typically separated by some combination of the characters
+         carriage-return (#xD) and line-feed (#xA).
+      </p>
+      
+      <p>To simplify the tasks of <a href="#dt-app">applications</a>,
+         wherever an external parsed entity or the literal entity value
+         of an internal parsed entity contains either the literal 
+         two-character sequence "#xD#xA" or a standalone literal
+         #xD, an <a href="#dt-xml-proc">XML processor</a> must 
+         pass to the application the single character #xA.
+         (This behavior can 
+         conveniently be produced by normalizing all 
+         line breaks to #xA on input, before parsing.)
+         
+      </p>
+      
+      
+      
+      <h3><a name="sec-lang-tag"></a>2.12 Language Identification
+      </h3>
+      
+      <p>In document processing, it is often useful to
+         identify the natural or formal language 
+         in which the content is 
+         written.
+         A special <a href="#dt-attr">attribute</a> named
+         xml:lang may be inserted in
+         documents to specify the 
+         language used in the contents and attribute values 
+         of any element in an XML document.
+         In valid documents, this attribute, like any other, must be 
+         <a href="#dt-attdecl">declared</a> if it is used.
+         The values of the attribute are language identifiers as defined
+         by <a href="#RFC1766">[IETF RFC 1766]</a>, "Tags for the Identification of Languages":
+         
+         <h5>Language Identification</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-LanguageID"></a>[33]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>LanguageID</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Langcode">Langcode</a> 
+                     ('-' <a href="#NT-Subcode">Subcode</a>)*
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-Langcode"></a>[34]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Langcode</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-ISO639Code">ISO639Code</a> | 
+                     <a href="#NT-IanaCode">IanaCode</a> | 
+                     <a href="#NT-UserCode">UserCode</a></td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-ISO639Code"></a>[35]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>ISO639Code</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>([a-z] | [A-Z]) ([a-z] | [A-Z])</td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-IanaCode"></a>[36]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>IanaCode</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>('i' | 'I') '-' ([a-z] | [A-Z])+</td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-UserCode"></a>[37]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>UserCode</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>('x' | 'X') '-' ([a-z] | [A-Z])+</td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-Subcode"></a>[38]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Subcode</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>([a-z] | [A-Z])+</td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         The <a href="#NT-Langcode">Langcode</a> may be any of the following:
+         
+         <ul>
+            
+            <li>
+               <p>a two-letter language code as defined by 
+                  <a href="#ISO639">[ISO 639]</a>, "Codes
+                  for the representation of names of languages"
+               </p>
+            </li>
+            
+            <li>
+               <p>a language identifier registered with the Internet
+                  Assigned Numbers Authority <a href="#IANA">[IANA]</a>; these begin with the 
+                  prefix "<code>i-</code>" (or "<code>I-</code>")
+               </p>
+            </li>
+            
+            <li>
+               <p>a language identifier assigned by the user, or agreed on
+                  between parties in private use; these must begin with the
+                  prefix "<code>x-</code>" or "<code>X-</code>" in order to ensure that they do not conflict 
+                  with names later standardized or registered with IANA
+               </p>
+            </li>
+            
+         </ul>
+      </p>
+      
+      <p>There may be any number of <a href="#NT-Subcode">Subcode</a> segments; if
+         the first 
+         subcode segment exists and the Subcode consists of two 
+         letters, then it must be a country code from 
+         <a href="#ISO3166">[ISO 3166]</a>, "Codes 
+         for the representation of names of countries."
+         If the first 
+         subcode consists of more than two letters, it must be
+         a subcode for the language in question registered with IANA,
+         unless the <a href="#NT-Langcode">Langcode</a> begins with the prefix 
+         "<code>x-</code>" or
+         "<code>X-</code>". 
+      </p>
+      
+      <p>It is customary to give the language code in lower case, and
+         the country code (if any) in upper case.
+         Note that these values, unlike other names in XML documents,
+         are case insensitive.
+      </p>
+      
+      <p>For example:
+         <pre>&lt;p xml:lang="en">The quick brown fox jumps over the lazy dog.&lt;/p>
+&lt;p xml:lang="en-GB">What colour is it?&lt;/p>
+&lt;p xml:lang="en-US">What color is it?&lt;/p>
+&lt;sp who="Faust" desc='leise' xml:lang="de">
+  &lt;l>Habe nun, ach! Philosophie,&lt;/l>
+  &lt;l>Juristerei, und Medizin&lt;/l>
+  &lt;l>und leider auch Theologie&lt;/l>
+  &lt;l>durchaus studiert mit hei&szlig;em Bem&uuml;h'n.&lt;/l>
+  &lt;/sp></pre></p>
+      
+      
+      <p>The intent declared with xml:lang is considered to apply to
+         all attributes and content of the element where it is specified,
+         unless overridden with an instance of xml:lang
+         on another element within that content.
+      </p>
+      
+      
+      <p>A simple declaration for xml:lang might take
+         the form
+         <pre>xml:lang  NMTOKEN  #IMPLIED</pre>
+         but specific default values may also be given, if appropriate.  In a
+         collection of French poems for English students, with glosses and
+         notes in English, the xml:lang attribute might be declared this way:
+         <pre>    &lt;!ATTLIST poem   xml:lang NMTOKEN 'fr'>
+    &lt;!ATTLIST gloss  xml:lang NMTOKEN 'en'>
+    &lt;!ATTLIST note   xml:lang NMTOKEN 'en'></pre>
+         </p>
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="sec-logical-struct"></a>3 Logical Structures
+      </h2>
+      
+      
+      <p><a name="dt-element"></a>Each <a href="#dt-xml-doc">XML document</a> contains one or more
+         <b>elements</b>, the boundaries of which are 
+         either delimited by <a href="#dt-stag">start-tags</a> 
+         and <a href="#dt-etag">end-tags</a>, or, for <a href="#dt-empty">empty</a> elements, by an <a href="#dt-eetag">empty-element tag</a>. Each element has a type,
+         identified by name, sometimes called its "generic
+         identifier" (GI), and may have a set of
+         attribute specifications.  Each attribute specification 
+         has a <a href="#dt-attrname">name</a> and a <a href="#dt-attrval">value</a>.
+         
+      </p>
+      
+      <h5>Element</h5>
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-element"></a>[39]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>element</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-EmptyElemTag">EmptyElemTag</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-STag">STag</a> <a href="#NT-content">content</a> 
+                  <a href="#NT-ETag">ETag</a></td>
+               <td>[&nbsp;WFC:&nbsp;<a href="#GIMatch">Element Type Match</a>&nbsp;]
+               </td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>[&nbsp;VC:&nbsp;<a href="#elementvalid">Element Valid</a>&nbsp;]
+               </td>
+            </tr>
+         </tbody>
+      </table>
+      
+      <p>This specification does not constrain the semantics, use, or (beyond
+         syntax) names of the element types and attributes, except that names
+         beginning with a match to <code>(('X'|'x')('M'|'m')('L'|'l'))</code>
+         are reserved for standardization in this or future versions of this
+         specification.
+         
+      </p>
+      <a name="GIMatch"></a><p><b>Well Formedness Constraint: Element Type Match</b></p>
+      Element Type Match
+      
+      <p>
+         The <a href="#NT-Name">Name</a> in an element's end-tag must match 
+         the element type in
+         the start-tag.
+         
+      </p>
+      
+      <a name="elementvalid"></a><p><b>Validity Constraint: Element Valid</b></p>
+      Element Valid
+      
+      <p>An element is
+         valid if
+         there is a declaration matching 
+         <a href="#NT-elementdecl">elementdecl</a> where the
+         <a href="#NT-Name">Name</a> matches the element type, and
+         one of the following holds:
+      </p>
+      
+      <ol>
+         
+         <li>
+            <p>The declaration matches EMPTY and the element has no 
+               <a href="#dt-content">content</a>.
+            </p>
+         </li>
+         
+         <li>
+            <p>The declaration matches <a href="#NT-children">children</a> and
+               the sequence of 
+               <a href="#dt-parentchild">child elements</a>
+               belongs to the language generated by the regular expression in
+               the content model, with optional white space (characters 
+               matching the nonterminal <a href="#NT-S">S</a>) between each pair
+               of child elements.
+            </p>
+         </li>
+         
+         <li>
+            <p>The declaration matches <a href="#NT-Mixed">Mixed</a> and 
+               the content consists of <a href="#dt-chardata">character 
+                  data
+               </a> and <a href="#dt-parentchild">child elements</a>
+               whose types match names in the content model.
+            </p>
+         </li>
+         
+         <li>
+            <p>The declaration matches ANY, and the types
+               of any <a href="#dt-parentchild">child elements</a> have
+               been declared.
+            </p>
+         </li>
+         
+      </ol>
+      
+      
+      
+      
+      <h3><a name="sec-starttags"></a>3.1 Start-Tags, End-Tags, and Empty-Element Tags
+      </h3>
+      
+      
+      <p><a name="dt-stag"></a>The beginning of every
+         non-empty XML element is marked by a <b>start-tag</b>.
+         
+         <h5>Start-tag</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-STag"></a>[40]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>STag</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;' <a href="#NT-Name">Name</a> 
+                     (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* 
+                     <a href="#NT-S">S</a>? '>'
+                  </td>
+                  <td>[&nbsp;WFC:&nbsp;<a href="#uniqattspec">Unique Att Spec</a>&nbsp;]
+                  </td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Attribute"></a>[41]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Attribute</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Name">Name</a> <a href="#NT-Eq">Eq</a> 
+                     <a href="#NT-AttValue">AttValue</a></td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#ValueType">Attribute Value Type</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>[&nbsp;WFC:&nbsp;<a href="#NoExternalRefs">No External Entity References</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>[&nbsp;WFC:&nbsp;<a href="#CleanAttrVals">No &lt; in Attribute Values</a>&nbsp;]
+                  </td>
+               </tr>
+               
+            </tbody>
+         </table>
+         The <a href="#NT-Name">Name</a> in
+         the start- and end-tags gives the 
+         element's <b>type</b>.
+         <a name="dt-attr"></a>
+         The <a href="#NT-Name">Name</a>-<a href="#NT-AttValue">AttValue</a> pairs are
+         referred to as 
+         the <b>attribute specifications</b> of the element,
+         <a name="dt-attrname"></a>with the 
+         <a href="#NT-Name">Name</a> in each pair
+         referred to as the <b>attribute name</b> and
+         <a name="dt-attrval"></a>the content of the
+         <a href="#NT-AttValue">AttValue</a> (the text between the
+         <code>'</code> or <code>"</code> delimiters)
+         as the <b>attribute value</b>.
+         
+      </p>
+      <a name="uniqattspec"></a><p><b>Well Formedness Constraint: Unique Att Spec</b></p>
+      Unique Att Spec
+      
+      <p>
+         No attribute name may appear more than once in the same start-tag
+         or empty-element tag.
+         
+      </p>
+      
+      <a name="ValueType"></a><p><b>Validity Constraint: Attribute Value Type</b></p>
+      Attribute Value Type
+      
+      <p>
+         The attribute must have been declared; the value must be of the type 
+         declared for it.
+         (For attribute types, see <a href="#attdecls">[<b>3.3 Attribute-List Declarations</b>]
+         </a>.)
+         
+      </p>
+      
+      <a name="NoExternalRefs"></a><p><b>Well Formedness Constraint: No External Entity References</b></p>
+      No External Entity References
+      
+      <p>
+         Attribute values cannot contain direct or indirect entity references 
+         to external entities.
+         
+      </p>
+      
+      <a name="CleanAttrVals"></a><p><b>Well Formedness Constraint: No &lt; in Attribute Values</b></p>
+      No <code>&lt;</code> in Attribute Values
+      
+      <p>The <a href="#dt-repltext">replacement text</a> of any entity
+         referred to directly or indirectly in an attribute
+         value (other than "<code>&amp;lt;</code>") must not contain
+         a <code>&lt;</code>.
+         
+      </p>
+      
+      <p>An example of a start-tag:
+         <pre>&lt;termdef id="dt-dog" term="dog"></pre></p>
+      
+      <p><a name="dt-etag"></a>The end of every element 
+         that begins with a start-tag must
+         be marked by an <b>end-tag</b>
+         containing a name that echoes the element's type as given in the
+         start-tag:
+         
+         <h5>End-tag</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-ETag"></a>[42]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>ETag</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;/' <a href="#NT-Name">Name</a> 
+                     <a href="#NT-S">S</a>? '>'
+                  </td>
+                  <td></td>
+               </tr>
+               
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>An example of an end-tag:<pre>&lt;/termdef></pre></p>
+      
+      <p><a name="dt-content"></a>The 
+         <a href="#dt-text">text</a> between the start-tag and
+         end-tag is called the element's
+         <b>content</b>:
+         
+         <h5>Content of Elements</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-content"></a>[43]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>content</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>(<a href="#NT-element">element</a> | <a href="#NT-CharData">CharData</a> 
+                     | <a href="#NT-Reference">Reference</a> | <a href="#NT-CDSect">CDSect</a> 
+                     | <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a>)*
+                  </td>
+                  <td></td>
+               </tr>
+               
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p><a name="dt-empty"></a>If an element is <b>empty</b>,
+         it must be represented either by a start-tag immediately followed
+         by an end-tag or by an empty-element tag.
+         <a name="dt-eetag"></a>An 
+         <b>empty-element tag</b> takes a special form:
+         
+         <h5>Tags for Empty Elements</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-EmptyElemTag"></a>[44]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>EmptyElemTag</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> 
+                     <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? 
+                     '/>'
+                  </td>
+                  <td>[&nbsp;WFC:&nbsp;<a href="#uniqattspec">Unique Att Spec</a>&nbsp;]
+                  </td>
+               </tr>
+               
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>Empty-element tags may be used for any element which has no
+         content, whether or not it is declared using the keyword
+         EMPTY.
+         <a href="#dt-interop">For interoperability</a>, the empty-element
+         tag must be used, and can only be used, for elements which are
+         <a href="#dt-eldecl">declared</a> EMPTY.
+      </p>
+      
+      <p>Examples of empty elements:
+         <pre>&lt;IMG align="left"
+ src="http://www.w3.org/Icons/WWW/w3c_home" />
+&lt;br>&lt;/br>
+&lt;br/></pre></p>
+      
+      
+      
+      
+      <h3><a name="elemdecls"></a>3.2 Element Type Declarations
+      </h3>
+      
+      
+      <p>The <a href="#dt-element">element</a> structure of an
+         <a href="#dt-xml-doc">XML document</a> may, for 
+         <a href="#dt-valid">validation</a> purposes, 
+         be constrained
+         using element type and attribute-list declarations.
+         An element type declaration constrains the element's
+         <a href="#dt-content">content</a>.
+         
+      </p>
+      
+      
+      <p>Element type declarations often constrain which element types can
+         appear as <a href="#dt-parentchild">children</a> of the element.
+         At user option, an XML processor may issue a warning
+         when a declaration mentions an element type for which no declaration
+         is provided, but this is not an error.
+      </p>
+      
+      <p><a name="dt-eldecl"></a>An <b>element
+            type declaration
+         </b> takes the form:
+         
+         <h5>Element Type Declaration</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-elementdecl"></a>[45]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>elementdecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;!ELEMENT' <a href="#NT-S">S</a> 
+                     <a href="#NT-Name">Name</a> 
+                     <a href="#NT-S">S</a> 
+                     <a href="#NT-contentspec">contentspec</a>
+                     <a href="#NT-S">S</a>? '>'
+                  </td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#EDUnique">Unique Element Type Declaration</a>&nbsp;]
+                  </td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-contentspec"></a>[46]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>contentspec</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'EMPTY' 
+                     | 'ANY' 
+                     | <a href="#NT-Mixed">Mixed</a> 
+                     | <a href="#NT-children">children</a>
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+            </tbody>
+         </table>
+         where the <a href="#NT-Name">Name</a> gives the element type 
+         being declared.
+         
+      </p>
+      
+      <a name="EDUnique"></a><p><b>Validity Constraint: Unique Element Type Declaration</b></p>
+      Unique Element Type Declaration
+      
+      <p>
+         No element type may be declared more than once.
+         
+      </p>
+      
+      
+      
+      <p>Examples of element type declarations:
+         <pre>&lt;!ELEMENT br EMPTY>
+&lt;!ELEMENT p (#PCDATA|emph)* >
+&lt;!ELEMENT %name.para; %content.para; >
+&lt;!ELEMENT container ANY></pre></p>
+      
+      
+      
+      <h4><a name="sec-element-content"></a>3.2.1 Element Content
+      </h4>
+      
+      
+      <p><a name="dt-elemcontent"></a>An element <a href="#dt-stag">type</a> has
+         <b>element content</b> when elements of that
+         type must contain only <a href="#dt-parentchild">child</a> 
+         elements (no character data), optionally separated by 
+         white space (characters matching the nonterminal 
+         <a href="#NT-S">S</a>).
+         
+         In this case, the
+         constraint includes a content model, a simple grammar governing
+         the allowed types of the child
+         elements and the order in which they are allowed to appear.  
+         The grammar is built on
+         content particles (<a href="#NT-cp">cp</a>s), which consist of names, 
+         choice lists of content particles, or
+         sequence lists of content particles:
+         
+         <h5>Element-content Models</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-children"></a>[47]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>children</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>(<a href="#NT-choice">choice</a> 
+                     | <a href="#NT-seq">seq</a>) 
+                     ('?' | '*' | '+')?
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-cp"></a>[48]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>cp</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>(<a href="#NT-Name">Name</a> 
+                     | <a href="#NT-choice">choice</a> 
+                     | <a href="#NT-seq">seq</a>) 
+                     ('?' | '*' | '+')?
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-choice"></a>[49]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>choice</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'(' <a href="#NT-S">S</a>? cp 
+                     ( <a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )*
+                     <a href="#NT-S">S</a>? ')'
+                  </td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#vc-PEinGroup">Proper Group/PE Nesting</a>&nbsp;]
+                  </td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-seq"></a>[50]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>seq</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'(' <a href="#NT-S">S</a>? cp 
+                     ( <a href="#NT-S">S</a>? ',' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )*
+                     <a href="#NT-S">S</a>? ')'
+                  </td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#vc-PEinGroup">Proper Group/PE Nesting</a>&nbsp;]
+                  </td>
+               </tr>
+               
+               
+            </tbody>
+         </table>
+         where each <a href="#NT-Name">Name</a> is the type of an element which may
+         appear as a <a href="#dt-parentchild">child</a>.  
+         Any content
+         particle in a choice list may appear in the <a href="#dt-elemcontent">element content</a> at the location where
+         the choice list appears in the grammar;
+         content particles occurring in a sequence list must each
+         appear in the <a href="#dt-elemcontent">element content</a> in the
+         order given in the list.  
+         The optional character following a name or list governs
+         whether the element or the content particles in the list may occur one
+         or more (<code>+</code>), zero or more (<code>*</code>), or zero or 
+         one times (<code>?</code>).  
+         The absence of such an operator means that the element or content particle
+         must appear exactly once.
+         This syntax
+         and meaning are identical to those used in the productions in this
+         specification.
+      </p>
+      
+      <p>
+         The content of an element matches a content model if and only if it is
+         possible to trace out a path through the content model, obeying the
+         sequence, choice, and repetition operators and matching each element in
+         the content against an element type in the content model.  <a href="#dt-compat">For compatibility</a>, it is an error
+         if an element in the document can
+         match more than one occurrence of an element type in the content model.
+         For more information, see <a href="#determinism">[<b>E Deterministic Content Models</b>]
+         </a>.
+         
+         
+         
+      </p>
+      <a name="vc-PEinGroup"></a><p><b>Validity Constraint: Proper Group/PE Nesting</b></p>
+      Proper Group/PE Nesting
+      
+      <p>Parameter-entity 
+         <a href="#dt-repltext">replacement text</a> must be properly nested
+         with parenthetized groups.
+         That is to say, if either of the opening or closing parentheses
+         in a <a href="#NT-choice">choice</a>, <a href="#NT-seq">seq</a>, or
+         <a href="#NT-Mixed">Mixed</a> construct 
+         is contained in the replacement text for a 
+         <a href="#dt-PERef">parameter entity</a>,
+         both must be contained in the same replacement text.
+      </p>
+      
+      <p><a href="#dt-interop">For interoperability</a>, 
+         if a parameter-entity reference appears in a 
+         <a href="#NT-choice">choice</a>, <a href="#NT-seq">seq</a>, or
+         <a href="#NT-Mixed">Mixed</a> construct, its replacement text
+         should not be empty, and 
+         neither the first nor last non-blank
+         character of the replacement text should be a connector 
+         (<code>|</code> or <code>,</code>).
+         
+      </p>
+      
+      
+      <p>Examples of element-content models:
+         <pre>&lt;!ELEMENT spec (front, body, back?)>
+&lt;!ELEMENT div1 (head, (p | list | note)*, div2*)>
+&lt;!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*></pre></p>
+      
+      
+      
+      
+      <h4><a name="sec-mixed-content"></a>3.2.2 Mixed Content
+      </h4>
+      
+      
+      <p><a name="dt-mixed"></a>An element 
+         <a href="#dt-stag">type</a> has 
+         <b>mixed content</b> when elements of that type may contain
+         character data, optionally interspersed with
+         <a href="#dt-parentchild">child</a> elements.
+         In this case, the types of the child elements
+         may be constrained, but not their order or their number of occurrences:
+         
+         <h5>Mixed-content Declaration</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Mixed"></a>[51]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Mixed</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'(' <a href="#NT-S">S</a>? 
+                     '#PCDATA'
+                     (<a href="#NT-S">S</a>? 
+                     '|' 
+                     <a href="#NT-S">S</a>? 
+                     <a href="#NT-Name">Name</a>)* 
+                     <a href="#NT-S">S</a>? 
+                     ')*' 
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| '(' <a href="#NT-S">S</a>? '#PCDATA' <a href="#NT-S">S</a>? ')'
+                     
+                  </td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#vc-PEinGroup">Proper Group/PE Nesting</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#vc-MixedChildrenUnique">No Duplicate Types</a>&nbsp;]
+                  </td>
+               </tr>
+               
+               
+            </tbody>
+         </table>
+         where the <a href="#NT-Name">Name</a>s give the types of elements
+         that may appear as children.
+         
+      </p>
+      <a name="vc-MixedChildrenUnique"></a><p><b>Validity Constraint: No Duplicate Types</b></p>
+      No Duplicate Types
+      
+      <p>The same name must not appear more than once in a single mixed-content
+         declaration.
+         
+      </p>
+      
+      <p>Examples of mixed content declarations:
+         <pre>&lt;!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
+&lt;!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
+&lt;!ELEMENT b (#PCDATA)></pre></p>
+      
+      
+      
+      
+      
+      <h3><a name="attdecls"></a>3.3 Attribute-List Declarations
+      </h3>
+      
+      
+      <p><a href="#dt-attr">Attributes</a> are used to associate
+         name-value pairs with <a href="#dt-element">elements</a>.
+         Attribute specifications may appear only within <a href="#dt-stag">start-tags</a>
+         and <a href="#dt-eetag">empty-element tags</a>; 
+         thus, the productions used to
+         recognize them appear in <a href="#sec-starttags">[<b>3.1 Start-Tags, End-Tags, and Empty-Element Tags</b>]
+         </a>.  
+         Attribute-list
+         declarations may be used:
+         
+         <ul>
+            
+            <li>
+               <p>To define the set of attributes pertaining to a given
+                  element type.
+               </p>
+            </li>
+            
+            <li>
+               <p>To establish type constraints for these
+                  attributes.
+               </p>
+            </li>
+            
+            <li>
+               <p>To provide <a href="#dt-default">default values</a>
+                  for attributes.
+               </p>
+            </li>
+            
+         </ul>
+         
+      </p>
+      
+      <p><a name="dt-attdecl"></a>
+         <b>Attribute-list declarations</b> specify the name, data type, and default
+         value (if any) of each attribute associated with a given element type:
+         
+         <h5>Attribute-list Declaration</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-AttlistDecl"></a>[52]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>AttlistDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;!ATTLIST' <a href="#NT-S">S</a> 
+                     <a href="#NT-Name">Name</a> 
+                     <a href="#NT-AttDef">AttDef</a>*
+                     <a href="#NT-S">S</a>? '>'
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-AttDef"></a>[53]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>AttDef</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-S">S</a> <a href="#NT-Name">Name</a> 
+                     <a href="#NT-S">S</a> <a href="#NT-AttType">AttType</a> 
+                     <a href="#NT-S">S</a> <a href="#NT-DefaultDecl">DefaultDecl</a></td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         The <a href="#NT-Name">Name</a> in the
+         <a href="#NT-AttlistDecl">AttlistDecl</a> rule is the type of an element.  At
+         user option, an XML processor may issue a warning if attributes are
+         declared for an element type not itself declared, but this is not an
+         error.  The <a href="#NT-Name">Name</a> in the 
+         <a href="#NT-AttDef">AttDef</a> rule is
+         the name of the attribute.
+      </p>
+      
+      <p>
+         When more than one <a href="#NT-AttlistDecl">AttlistDecl</a> is provided for a
+         given element type, the contents of all those provided are merged.  When
+         more than one definition is provided for the same attribute of a
+         given element type, the first declaration is binding and later
+         declarations are ignored.  
+         <a href="#dt-interop">For interoperability,</a> writers of DTDs
+         may choose to provide at most one attribute-list declaration
+         for a given element type, at most one attribute definition
+         for a given attribute name, and at least one attribute definition
+         in each attribute-list declaration.
+         For interoperability, an XML processor may at user option
+         issue a warning when more than one attribute-list declaration is
+         provided for a given element type, or more than one attribute definition
+         is provided 
+         for a given attribute, but this is not an error.
+         
+      </p>
+      
+      
+      
+      <h4><a name="sec-attribute-types"></a>3.3.1 Attribute Types
+      </h4>
+      
+      
+      <p>XML attribute types are of three kinds:  a string type, a
+         set of tokenized types, and enumerated types.  The string type may take
+         any literal string as a value; the tokenized types have varying lexical
+         and semantic constraints, as noted:
+         
+         <h5>Attribute Types</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-AttType"></a>[54]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>AttType</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-StringType">StringType</a> 
+                     | <a href="#NT-TokenizedType">TokenizedType</a> 
+                     | <a href="#NT-EnumeratedType">EnumeratedType</a>
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-StringType"></a>[55]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>StringType</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'CDATA'</td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-TokenizedType"></a>[56]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>TokenizedType</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'ID'</td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#id">ID</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#one-id-per-el">One ID per Element Type</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#id-default">ID Attribute Default</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| 'IDREF'</td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#idref">IDREF</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| 'IDREFS'</td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#idref">IDREF</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| 'ENTITY'</td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#entname">Entity Name</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| 'ENTITIES'</td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#entname">Entity Name</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| 'NMTOKEN'</td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#nmtok">Name Token</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| 'NMTOKENS'</td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#nmtok">Name Token</a>&nbsp;]
+                  </td>
+               </tr>
+               
+            </tbody>
+         </table>
+         
+      </p>
+      <a name="id"></a><p><b>Validity Constraint: ID</b></p>
+      ID
+      
+      <p>
+         Values of type ID must match the 
+         <a href="#NT-Name">Name</a> production.  
+         A name must not appear more than once in
+         an XML document as a value of this type; i.e., ID values must uniquely
+         identify the elements which bear them.   
+         
+      </p>
+      
+      <a name="one-id-per-el"></a><p><b>Validity Constraint: One ID per Element Type</b></p>
+      One ID per Element Type
+      
+      <p>No element type may have more than one ID attribute specified.</p>
+      
+      <a name="id-default"></a><p><b>Validity Constraint: ID Attribute Default</b></p>
+      ID Attribute Default
+      
+      <p>An ID attribute must have a declared default of #IMPLIED or
+         #REQUIRED.
+      </p>
+      
+      <a name="idref"></a><p><b>Validity Constraint: IDREF</b></p>
+      IDREF
+      
+      <p>
+         Values of type IDREF must match
+         the <a href="#NT-Name">Name</a> production, and
+         values of type IDREFS must match
+         <a href="#NT-Names">Names</a>; 
+         each <a href="#NT-Name">Name</a> must match the value of an ID attribute on 
+         some element in the XML document; i.e. IDREF values must 
+         match the value of some ID attribute. 
+         
+      </p>
+      
+      <a name="entname"></a><p><b>Validity Constraint: Entity Name</b></p>
+      Entity Name
+      
+      <p>
+         Values of type ENTITY 
+         must match the <a href="#NT-Name">Name</a> production,
+         values of type ENTITIES must match
+         <a href="#NT-Names">Names</a>;
+         each <a href="#NT-Name">Name</a> must 
+         match the
+         name of an <a href="#dt-unparsed">unparsed entity</a> declared in the
+         <a href="#dt-doctype">DTD</a>.
+         
+      </p>
+      
+      <a name="nmtok"></a><p><b>Validity Constraint: Name Token</b></p>
+      Name Token
+      
+      <p>
+         Values of type NMTOKEN must match the
+         <a href="#NT-Nmtoken">Nmtoken</a> production;
+         values of type NMTOKENS must 
+         match <a href="#NT-Nmtokens">Nmtokens</a>.
+         
+      </p>
+      
+      
+      
+      <p><a name="dt-enumerated"></a><b>Enumerated attributes</b> can take one 
+         of a list of values provided in the declaration. There are two
+         kinds of enumerated types:
+         
+         <h5>Enumerated Attribute Types</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-EnumeratedType"></a>[57]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>EnumeratedType</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-NotationType">NotationType</a> 
+                     | <a href="#NT-Enumeration">Enumeration</a>
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-NotationType"></a>[58]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>NotationType</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'NOTATION' 
+                     <a href="#NT-S">S</a> 
+                     '(' 
+                     <a href="#NT-S">S</a>?  
+                     <a href="#NT-Name">Name</a> 
+                     (<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>?  
+                     <a href="#NT-Name">Name</a>)*
+                     <a href="#NT-S">S</a>? ')'
+                     
+                  </td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#notatn">Notation Attributes</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-Enumeration"></a>[59]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Enumeration</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'(' <a href="#NT-S">S</a>?
+                     <a href="#NT-Nmtoken">Nmtoken</a> 
+                     (<a href="#NT-S">S</a>? '|' 
+                     <a href="#NT-S">S</a>?  
+                     <a href="#NT-Nmtoken">Nmtoken</a>)* 
+                     <a href="#NT-S">S</a>? 
+                     ')'
+                  </td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#enum">Enumeration</a>&nbsp;]
+                  </td>
+               </tr>
+            </tbody>
+         </table>
+         A NOTATION attribute identifies a 
+         <a href="#dt-notation">notation</a>, declared in the 
+         DTD with associated system and/or public identifiers, to
+         be used in interpreting the element to which the attribute
+         is attached.
+         
+      </p>
+      
+      <a name="notatn"></a><p><b>Validity Constraint: Notation Attributes</b></p>
+      Notation Attributes
+      
+      <p>
+         Values of this type must match
+         one of the <a href="#Notations">notation</a> names included in
+         the declaration; all notation names in the declaration must
+         be declared.
+         
+      </p>
+      
+      <a name="enum"></a><p><b>Validity Constraint: Enumeration</b></p>
+      Enumeration
+      
+      <p>
+         Values of this type
+         must match one of the <a href="#NT-Nmtoken">Nmtoken</a> tokens in the
+         declaration. 
+         
+      </p>
+      
+      
+      <p><a href="#dt-interop">For interoperability,</a> the same
+         <a href="#NT-Nmtoken">Nmtoken</a> should not occur more than once in the
+         enumerated attribute types of a single element type.
+         
+      </p>
+      
+      
+      
+      
+      <h4><a name="sec-attr-defaults"></a>3.3.2 Attribute Defaults
+      </h4>
+      
+      
+      <p>An <a href="#dt-attdecl">attribute declaration</a> provides
+         information on whether
+         the attribute's presence is required, and if not, how an XML processor should
+         react if a declared attribute is absent in a document.
+         
+         <h5>Attribute Defaults</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-DefaultDecl"></a>[60]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>DefaultDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'#REQUIRED' 
+                     |&nbsp;'#IMPLIED' 
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| (('#FIXED' S)? <a href="#NT-AttValue">AttValue</a>)
+                  </td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#RequiredAttr">Required Attribute</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#defattrvalid">Attribute Default Legal</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>[&nbsp;WFC:&nbsp;<a href="#CleanAttrVals">No &lt; in Attribute Values</a>&nbsp;]
+                  </td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#FixedAttr">Fixed Attribute Default</a>&nbsp;]
+                  </td>
+               </tr>
+               
+            </tbody>
+         </table>
+         
+         
+      </p>
+      
+      <p>In an attribute declaration, #REQUIRED means that the
+         attribute must always be provided, #IMPLIED that no default 
+         value is provided.
+         
+         <a name="dt-default"></a>If the 
+         declaration
+         is neither #REQUIRED nor #IMPLIED, then the
+         <a href="#NT-AttValue">AttValue</a> value contains the declared
+         <b>default</b> value; the #FIXED keyword states that
+         the attribute must always have the default value.
+         If a default value
+         is declared, when an XML processor encounters an omitted attribute, it
+         is to behave as though the attribute were present with 
+         the declared default value.
+      </p>
+      <a name="RequiredAttr"></a><p><b>Validity Constraint: Required Attribute</b></p>
+      Required Attribute
+      
+      <p>If the default declaration is the keyword #REQUIRED, then
+         the attribute must be specified for
+         all elements of the type in the attribute-list declaration.
+         
+      </p>
+      <a name="defattrvalid"></a><p><b>Validity Constraint: Attribute Default Legal</b></p>
+      Attribute Default Legal
+      
+      <p>
+         The declared
+         default value must meet the lexical constraints of the declared attribute type.
+         
+      </p>
+      
+      <a name="FixedAttr"></a><p><b>Validity Constraint: Fixed Attribute Default</b></p>
+      Fixed Attribute Default
+      
+      <p>If an attribute has a default value declared with the 
+         #FIXED keyword, instances of that attribute must
+         match the default value.
+         
+      </p>
+      
+      
+      <p>Examples of attribute-list declarations:
+         <pre>&lt;!ATTLIST termdef
+          id      ID      #REQUIRED
+          name    CDATA   #IMPLIED>
+&lt;!ATTLIST list
+          type    (bullets|ordered|glossary)  "ordered">
+&lt;!ATTLIST form
+          method  CDATA   #FIXED "POST"></pre></p>
+      
+      
+      
+      <h4><a name="AVNormalize"></a>3.3.3 Attribute-Value Normalization
+      </h4>
+      
+      <p>Before the value of an attribute is passed to the application
+         or checked for validity, the
+         XML processor must normalize it as follows:
+         
+         <ul>
+            
+            <li>
+               <p>a character reference is processed by appending the referenced    
+                  character to the attribute value
+               </p>
+            </li>
+            
+            <li>
+               <p>an entity reference is processed by recursively processing the
+                  replacement text of the entity
+               </p>
+            </li>
+            
+            <li>
+               <p>a whitespace character (#x20, #xD, #xA, #x9) is processed by
+                  appending #x20 to the normalized value, except that only a single #x20
+                  is appended for a "#xD#xA" sequence that is part of an external
+                  parsed entity or the literal entity value of an internal parsed
+                  entity
+               </p>
+            </li>
+            
+            <li>
+               <p>other characters are processed by appending them to the normalized
+                  value
+               </p>
+               
+            </li>
+         </ul>
+         
+      </p>
+      
+      <p>If the declared value is not CDATA, then the XML processor must
+         further process the normalized attribute value by discarding any
+         leading and trailing space (#x20) characters, and by replacing
+         sequences of space (#x20) characters by a single space (#x20)
+         character.
+      </p>
+      
+      <p>
+         All attributes for which no declaration has been read should be treated
+         by a non-validating parser as if declared
+         CDATA.
+         
+      </p>
+      
+      
+      
+      
+      <h3><a name="sec-condition-sect"></a>3.4 Conditional Sections
+      </h3>
+      
+      <p><a name="dt-cond-section"></a>
+         <b>Conditional sections</b> are portions of the
+         <a href="#dt-doctype">document type declaration external subset</a>
+         which are 
+         included in, or excluded from, the logical structure of the DTD based on
+         the keyword which governs them.
+         
+         <h5>Conditional Section</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-conditionalSect"></a>[61]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>conditionalSect</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-includeSect">includeSect</a>
+                     | <a href="#NT-ignoreSect">ignoreSect</a>
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-includeSect"></a>[62]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>includeSect</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;![' S? 'INCLUDE' S? '[' 
+                     
+                     <a href="#NT-extSubsetDecl">extSubsetDecl</a>
+                     ']]>'
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-ignoreSect"></a>[63]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>ignoreSect</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;![' S? 'IGNORE' S? '[' 
+                     <a href="#NT-ignoreSectContents">ignoreSectContents</a>*
+                     ']]>'
+                  </td>
+                  <td></td>
+               </tr>
+               
+               
+               <tr valign="baseline">
+                  <td><a name="NT-ignoreSectContents"></a>[64]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>ignoreSectContents</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Ignore">Ignore</a>
+                     ('&lt;![' <a href="#NT-ignoreSectContents">ignoreSectContents</a> ']]>' 
+                     <a href="#NT-Ignore">Ignore</a>)*
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Ignore"></a>[65]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Ignore</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-Char">Char</a>* - 
+                     (<a href="#NT-Char">Char</a>* ('&lt;![' | ']]>') 
+                     <a href="#NT-Char">Char</a>*)
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>Like the internal and external DTD subsets, a conditional section
+         may contain one or more complete declarations,
+         comments, processing instructions, 
+         or nested conditional sections, intermingled with white space.
+         
+      </p>
+      
+      <p>If the keyword of the
+         conditional section is INCLUDE, then the contents of the conditional
+         section are part of the DTD.
+         If the keyword of the conditional
+         section is IGNORE, then the contents of the conditional section are
+         not logically part of the DTD.
+         Note that for reliable parsing, the contents of even ignored
+         conditional sections must be read in order to
+         detect nested conditional sections and ensure that the end of the
+         outermost (ignored) conditional section is properly detected.
+         If a conditional section with a
+         keyword of INCLUDE occurs within a larger conditional
+         section with a keyword of IGNORE, both the outer and the
+         inner conditional sections are ignored.
+      </p>
+      
+      <p>If the keyword of the conditional section is a 
+         parameter-entity reference, the parameter entity must be replaced by its
+         content before the processor decides whether to
+         include or ignore the conditional section.
+      </p>
+      
+      <p>An example:
+         <pre>&lt;!ENTITY % draft 'INCLUDE' >
+&lt;!ENTITY % final 'IGNORE' >
+ 
+&lt;![%draft;[
+&lt;!ELEMENT book (comments*, title, body, supplements?)>
+]]>
+&lt;![%final;[
+&lt;!ELEMENT book (title, body, supplements?)>
+]]>
+</pre>
+         </p>
+      
+      
+      
+       
+      
+      
+      
+      
+      
+      
+      <h2><a name="sec-physical-struct"></a>4 Physical Structures
+      </h2>
+      
+      
+      <p><a name="dt-entity"></a>An XML document may consist
+         of one or many storage units.   These are called
+         <b>entities</b>; they all have <b>content</b> and are all
+         (except for the document entity, see below, and 
+         the <a href="#dt-doctype">external DTD subset</a>) 
+         identified by <b>name</b>.
+         
+         Each XML document has one entity
+         called the <a href="#dt-docent">document entity</a>, which serves
+         as the starting point for the <a href="#dt-xml-proc">XML
+            processor
+         </a> and may contain the whole document.
+      </p>
+      
+      <p>Entities may be either parsed or unparsed.
+         <a name="dt-parsedent"></a>A <b>parsed entity's</b>
+         contents are referred to as its 
+         <a href="#dt-repltext">replacement text</a>;
+         this <a href="#dt-text">text</a> is considered an
+         integral part of the document.
+      </p>
+      
+      
+      <p><a name="dt-unparsed"></a>An 
+         <b>unparsed entity</b> 
+         is a resource whose contents may or may not be
+         <a href="#dt-text">text</a>, and if text, may not be XML.
+         Each unparsed entity
+         has an associated <a href="#dt-notation">notation</a>, identified by name.
+         Beyond a requirement
+         that an XML processor make the identifiers for the entity and 
+         notation available to the application,
+         XML places no constraints on the contents of unparsed entities. 
+         
+      </p>
+      
+      <p>
+         Parsed entities are invoked by name using entity references;
+         unparsed entities by name, given in the value of ENTITY
+         or ENTITIES
+         attributes.
+      </p>
+      
+      <p><a name="gen-entity"></a><b>General entities</b>
+         are entities for use within the document content.
+         In this specification, general entities are sometimes referred 
+         to with the unqualified term <i>entity</i> when this leads
+         to no ambiguity. 
+         <a name="dt-PE"></a>Parameter entities 
+         are parsed entities for use within the DTD.
+         These two types of entities use different forms of reference and
+         are recognized in different contexts.
+         Furthermore, they occupy different namespaces; a parameter entity and
+         a general entity with the same name are two distinct entities.
+         
+      </p>
+      
+      
+      
+      <h3><a name="sec-references"></a>4.1 Character and Entity References
+      </h3>
+      
+      <p><a name="dt-charref"></a>
+         A <b>character reference</b> refers to a specific character in the
+         ISO/IEC 10646 character set, for example one not directly accessible from
+         available input devices.
+         
+         <h5>Character Reference</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-CharRef"></a>[66]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>CharRef</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&amp;#' [0-9]+ ';' </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| '&amp;#x' [0-9a-fA-F]+ ';'</td>
+                  <td>[&nbsp;WFC:&nbsp;<a href="#wf-Legalchar">Legal Character</a>&nbsp;]
+                  </td>
+               </tr>
+            </tbody>
+         </table>
+         <a name="wf-Legalchar"></a><p><b>Well Formedness Constraint: Legal Character</b></p>
+         Legal Character
+         
+         <p>Characters referred to using character references must
+            match the production for
+            <a href="#NT-Char">Char</a>.
+         </p>
+         
+         If the character reference begins with "<code>&amp;#x</code>", the digits and
+         letters up to the terminating <code>;</code> provide a hexadecimal
+         representation of the character's code point in ISO/IEC 10646.
+         If it begins just with "<code>&amp;#</code>", the digits up to the terminating
+         <code>;</code> provide a decimal representation of the character's 
+         code point.
+         
+         
+      </p>
+      
+      <p><a name="dt-entref"></a>An <b>entity
+            reference
+         </b> refers to the content of a named entity.
+         <a name="dt-GERef"></a>References to 
+         parsed general entities
+         use ampersand (<code>&amp;</code>) and semicolon (<code>;</code>) as
+         delimiters.
+         <a name="dt-PERef"></a>
+         <b>Parameter-entity references</b> use percent-sign (<code>%</code>) and
+         semicolon 
+         (<code>;</code>) as delimiters.
+         
+      </p>
+      
+      <h5>Entity Reference</h5>
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-Reference"></a>[67]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Reference</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-EntityRef">EntityRef</a> 
+                  | <a href="#NT-CharRef">CharRef</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-EntityRef"></a>[68]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>EntityRef</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'&amp;' <a href="#NT-Name">Name</a> ';'
+               </td>
+               <td>[&nbsp;WFC:&nbsp;<a href="#wf-entdeclared">Entity Declared</a>&nbsp;]
+               </td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>[&nbsp;VC:&nbsp;<a href="#vc-entdeclared">Entity Declared</a>&nbsp;]
+               </td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>[&nbsp;WFC:&nbsp;<a href="#textent">Parsed Entity</a>&nbsp;]
+               </td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>[&nbsp;WFC:&nbsp;<a href="#norecursion">No Recursion</a>&nbsp;]
+               </td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-PEReference"></a>[69]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>PEReference</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'%' <a href="#NT-Name">Name</a> ';'
+               </td>
+               <td>[&nbsp;VC:&nbsp;<a href="#vc-entdeclared">Entity Declared</a>&nbsp;]
+               </td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>[&nbsp;WFC:&nbsp;<a href="#norecursion">No Recursion</a>&nbsp;]
+               </td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>[&nbsp;WFC:&nbsp;<a href="#indtd">In DTD</a>&nbsp;]
+               </td>
+            </tr>
+         </tbody>
+      </table>
+      
+      <a name="wf-entdeclared"></a><p><b>Well Formedness Constraint: Entity Declared</b></p>
+      Entity Declared
+      
+      <p>In a document without any DTD, a document with only an internal
+         DTD subset which contains no parameter entity references, or a document with
+         "<code>standalone='yes'</code>", 
+         the <a href="#NT-Name">Name</a> given in the entity reference must 
+         <a href="#dt-match">match</a> that in an 
+         <a href="#sec-entity-decl">entity declaration</a>, except that
+         well-formed documents need not declare 
+         any of the following entities: <code>amp</code>,
+         <code>lt</code>,
+         <code>gt</code>,
+         <code>apos</code>,
+         <code>quot</code>.  
+         The declaration of a parameter entity must precede any reference to it.
+         Similarly, the declaration of a general entity must precede any
+         reference to it which appears in a default value in an attribute-list
+         declaration.
+      </p>
+      
+      <p>Note that if entities are declared in the external subset or in 
+         external parameter entities, a non-validating processor is 
+         <a href="#include-if-valid">not obligated to</a> read
+         and process their declarations; for such documents, the rule that
+         an entity must be declared is a well-formedness constraint only
+         if <a href="#sec-rmd">standalone='yes'</a>.
+      </p>
+      
+      <a name="vc-entdeclared"></a><p><b>Validity Constraint: Entity Declared</b></p>
+      Entity Declared
+      
+      <p>In a document with an external subset or external parameter
+         entities with "<code>standalone='no'</code>",
+         the <a href="#NT-Name">Name</a> given in the entity reference must <a href="#dt-match">match</a> that in an 
+         <a href="#sec-entity-decl">entity declaration</a>.
+         For interoperability, valid documents should declare the entities 
+         <code>amp</code>,
+         <code>lt</code>,
+         <code>gt</code>,
+         <code>apos</code>,
+         <code>quot</code>, in the form
+         specified in <a href="#sec-predefined-ent">[<b>4.6 Predefined Entities</b>]
+         </a>.
+         The declaration of a parameter entity must precede any reference to it.
+         Similarly, the declaration of a general entity must precede any
+         reference to it which appears in a default value in an attribute-list
+         declaration.
+      </p>
+      
+      
+      <a name="textent"></a><p><b>Well Formedness Constraint: Parsed Entity</b></p>
+      Parsed Entity
+      
+      <p>
+         An entity reference must not contain the name of an <a href="#dt-unparsed">unparsed entity</a>. Unparsed entities may be referred
+         to only in <a href="#dt-attrval">attribute values</a> declared to
+         be of type ENTITY or ENTITIES.
+         
+      </p>
+      
+      <a name="norecursion"></a><p><b>Well Formedness Constraint: No Recursion</b></p>
+      No Recursion
+      
+      <p>
+         A parsed entity must not contain a recursive reference to itself,
+         either directly or indirectly.
+         
+      </p>
+      
+      <a name="indtd"></a><p><b>Well Formedness Constraint: In DTD</b></p>
+      In DTD
+      
+      <p>
+         Parameter-entity references may only appear in the 
+         <a href="#dt-doctype">DTD</a>.
+         
+      </p>
+      
+      
+      <p>Examples of character and entity references:
+         <pre>Type &lt;key>less-than&lt;/key> (&amp;#x3C;) to save options.
+This document was prepared on &amp;docdate; and
+is classified &amp;security-level;.</pre></p>
+      
+      <p>Example of a parameter-entity reference:
+         <pre>&lt;!-- declare the parameter entity "ISOLat2"... -->
+&lt;!ENTITY % ISOLat2
+         SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" >
+&lt;!-- ... now reference it. -->
+%ISOLat2;</pre></p>
+      
+      
+      
+      
+      <h3><a name="sec-entity-decl"></a>4.2 Entity Declarations
+      </h3>
+      
+      
+      <p><a name="dt-entdecl"></a>
+         Entities are declared thus:
+         
+         <h5>Entity Declaration</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-EntityDecl"></a>[70]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>EntityDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-GEDecl">GEDecl</a> | <a href="#NT-PEDecl">PEDecl</a></td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-GEDecl"></a>[71]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>GEDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;!ENTITY' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> 
+                     <a href="#NT-S">S</a> <a href="#NT-EntityDef">EntityDef</a> 
+                     <a href="#NT-S">S</a>? '>'
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-PEDecl"></a>[72]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>PEDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;!ENTITY' <a href="#NT-S">S</a> '%' <a href="#NT-S">S</a> 
+                     <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> 
+                     <a href="#NT-PEDef">PEDef</a> <a href="#NT-S">S</a>? '>'
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-EntityDef"></a>[73]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>EntityDef</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-EntityValue">EntityValue</a>
+                     | (<a href="#NT-ExternalID">ExternalID</a> 
+                     <a href="#NT-NDataDecl">NDataDecl</a>?)
+                  </td>
+                  <td></td>
+               </tr>
+               
+               
+               <tr valign="baseline">
+                  <td><a name="NT-PEDef"></a>[74]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>PEDef</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-EntityValue">EntityValue</a> 
+                     | <a href="#NT-ExternalID">ExternalID</a></td>
+                  <td></td>
+               </tr>
+               
+            </tbody>
+         </table>
+         The <a href="#NT-Name">Name</a> identifies the entity in an
+         <a href="#dt-entref">entity reference</a> or, in the case of an
+         unparsed entity, in the value of an ENTITY or ENTITIES
+         attribute.
+         If the same entity is declared more than once, the first declaration
+         encountered is binding; at user option, an XML processor may issue a
+         warning if entities are declared multiple times.
+         
+      </p>
+      
+      
+      
+      <h4><a name="sec-internal-ent"></a>4.2.1 Internal Entities
+      </h4>
+      
+      
+      <p><a name="dt-internent"></a>If 
+         the entity definition is an 
+         <a href="#NT-EntityValue">EntityValue</a>,  
+         the defined entity is called an <b>internal entity</b>.  
+         There is no separate physical
+         storage object, and the content of the entity is given in the
+         declaration. 
+         Note that some processing of entity and character references in the
+         <a href="#dt-litentval">literal entity value</a> may be required to
+         produce the correct <a href="#dt-repltext">replacement 
+            text
+         </a>: see <a href="#intern-replacement">[<b>4.5 Construction of Internal Entity Replacement Text</b>]
+         </a>.
+         
+      </p>
+      
+      <p>An internal entity is a <a href="#dt-parsedent">parsed
+            entity
+         </a>.
+      </p>
+      
+      <p>Example of an internal entity declaration:
+         <pre>&lt;!ENTITY Pub-Status "This is a pre-release of the
+ specification."></pre></p>
+      
+      
+      
+      
+      <h4><a name="sec-external-ent"></a>4.2.2 External Entities
+      </h4>
+      
+      
+      <p><a name="dt-extent"></a>If the entity is not
+         internal, it is an <b>external
+            entity
+         </b>, declared as follows:
+         
+         <h5>External Entity Declaration</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-ExternalID"></a>[75]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>ExternalID</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'SYSTEM' <a href="#NT-S">S</a> 
+                     <a href="#NT-SystemLiteral">SystemLiteral</a></td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td></td>
+                  <td></td>
+                  <td></td>
+                  <td>| 'PUBLIC' <a href="#NT-S">S</a> 
+                     <a href="#NT-PubidLiteral">PubidLiteral</a> 
+                     <a href="#NT-S">S</a> 
+                     <a href="#NT-SystemLiteral">SystemLiteral</a>
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-NDataDecl"></a>[76]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>NDataDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-S">S</a> 'NDATA' <a href="#NT-S">S</a> 
+                     <a href="#NT-Name">Name</a></td>
+                  <td>[&nbsp;VC:&nbsp;<a href="#not-declared">Notation Declared</a>&nbsp;]
+                  </td>
+               </tr>
+            </tbody>
+         </table>
+         If the <a href="#NT-NDataDecl">NDataDecl</a> is present, this is a
+         general <a href="#dt-unparsed">unparsed
+            entity
+         </a>; otherwise it is a parsed entity.
+      </p>
+      <a name="not-declared"></a><p><b>Validity Constraint: Notation Declared</b></p>
+      Notation Declared
+      
+      <p>
+         The <a href="#NT-Name">Name</a> must match the declared name of a
+         <a href="#dt-notation">notation</a>.
+         
+      </p>
+      
+      
+      <p><a name="dt-sysid"></a>The
+         <a href="#NT-SystemLiteral">SystemLiteral</a> 
+         is called the entity's <b>system identifier</b>. It is a URI,
+         which may be used to retrieve the entity.
+         Note that the hash mark (<code>#</code>) and fragment identifier 
+         frequently used with URIs are not, formally, part of the URI itself; 
+         an XML processor may signal an error if a fragment identifier is 
+         given as part of a system identifier.
+         Unless otherwise provided by information outside the scope of this
+         specification (e.g. a special XML element type defined by a particular
+         DTD, or a processing instruction defined by a particular application
+         specification), relative URIs are relative to the location of the
+         resource within which the entity declaration occurs.
+         A URI might thus be relative to the 
+         <a href="#dt-docent">document entity</a>, to the entity
+         containing the <a href="#dt-doctype">external DTD subset</a>, 
+         or to some other <a href="#dt-extent">external parameter entity</a>.
+         
+      </p>
+      
+      <p>An XML processor should handle a non-ASCII character in a URI by
+         representing the character in UTF-8 as one or more bytes, and then 
+         escaping these bytes with the URI escaping mechanism (i.e., by
+         converting each byte to %HH, where HH is the hexadecimal notation of the
+         byte value).
+      </p>
+      
+      <p><a name="dt-pubid"></a>
+         In addition to a system identifier, an external identifier may
+         include a <b>public identifier</b>.  
+         An XML processor attempting to retrieve the entity's content may use the public
+         identifier to try to generate an alternative URI.  If the processor
+         is unable to do so, it must use the URI specified in the system
+         literal.  Before a match is attempted, all strings
+         of white space in the public identifier must be normalized to single space characters (#x20),
+         and leading and trailing white space must be removed.
+      </p>
+      
+      <p>Examples of external entity declarations:
+         <pre>&lt;!ENTITY open-hatch
+         SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
+&lt;!ENTITY open-hatch
+         PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN"
+         "http://www.textuality.com/boilerplate/OpenHatch.xml">
+&lt;!ENTITY hatch-pic
+         SYSTEM "../grafix/OpenHatch.gif"
+         NDATA gif ></pre></p>
+      
+      
+      
+      
+      
+      
+      <h3><a name="TextEntities"></a>4.3 Parsed Entities
+      </h3>
+      
+      
+      <h4><a name="sec-TextDecl"></a>4.3.1 The Text Declaration
+      </h4>
+      
+      <p>External parsed entities may each begin with a <b>text
+            declaration
+         </b>. 
+         
+         <h5>Text Declaration</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-TextDecl"></a>[77]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>TextDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;?xml' 
+                     <a href="#NT-VersionInfo">VersionInfo</a>?
+                     <a href="#NT-EncodingDecl">EncodingDecl</a>
+                     <a href="#NT-S">S</a>? '?>'
+                  </td>
+                  <td></td>
+               </tr>
+               
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>The text declaration must be provided literally, not
+         by reference to a parsed entity.
+         No text declaration may appear at any position other than the beginning of
+         an external parsed entity.
+      </p>
+      
+      
+      
+      <h4><a name="wf-entities"></a>4.3.2 Well-Formed Parsed Entities
+      </h4>
+      
+      <p>The document entity is well-formed if it matches the production labeled
+         <a href="#NT-document">document</a>.
+         An external general 
+         parsed entity is well-formed if it matches the production labeled
+         <a href="#NT-extParsedEnt">extParsedEnt</a>.
+         An external parameter
+         entity is well-formed if it matches the production labeled
+         <a href="#NT-extPE">extPE</a>.
+         
+         <h5>Well-Formed External Parsed Entity</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-extParsedEnt"></a>[78]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>extParsedEnt</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-TextDecl">TextDecl</a>? 
+                     <a href="#NT-content">content</a></td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-extPE"></a>[79]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>extPE</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-TextDecl">TextDecl</a>? 
+                     <a href="#NT-extSubsetDecl">extSubsetDecl</a></td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         An internal general parsed entity is well-formed if its replacement text 
+         matches the production labeled
+         <a href="#NT-content">content</a>.
+         All internal parameter entities are well-formed by definition.
+         
+      </p>
+      
+      <p>A consequence of well-formedness in entities is that the logical 
+         and physical structures in an XML document are properly nested; no 
+         <a href="#dt-stag">start-tag</a>,
+         <a href="#dt-etag">end-tag</a>,
+         <a href="#dt-empty">empty-element tag</a>,
+         <a href="#dt-element">element</a>, 
+         <a href="#dt-comment">comment</a>, 
+         <a href="#dt-pi">processing instruction</a>, 
+         <a href="#dt-charref">character
+            reference
+         </a>, or
+         <a href="#dt-entref">entity reference</a> 
+         can begin in one entity and end in another.
+      </p>
+      
+      
+      
+      <h4><a name="charencoding"></a>4.3.3 Character Encoding in Entities
+      </h4>
+      
+      
+      <p>Each external parsed entity in an XML document may use a different
+         encoding for its characters. All XML processors must be able to read
+         entities in either UTF-8 or UTF-16. 
+         
+         
+      </p>
+      
+      <p>Entities encoded in UTF-16 must
+         begin with the Byte Order Mark described by ISO/IEC 10646 Annex E and
+         Unicode Appendix B (the ZERO WIDTH NO-BREAK SPACE character, #xFEFF).
+         This is an encoding signature, not part of either the markup or the
+         character data of the XML document.
+         XML processors must be able to use this character to
+         differentiate between UTF-8 and UTF-16 encoded documents.
+      </p>
+      
+      <p>Although an XML processor is required to read only entities in
+         the UTF-8 and UTF-16 encodings, it is recognized that other encodings are
+         used around the world, and it may be desired for XML processors
+         to read entities that use them.
+         Parsed entities which are stored in an encoding other than
+         UTF-8 or UTF-16 must begin with a <a href="#TextDecl">text
+            declaration
+         </a> containing an encoding declaration:
+         
+         <h5>Encoding Declaration</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-EncodingDecl"></a>[80]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>EncodingDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-S">S</a>
+                     'encoding' <a href="#NT-Eq">Eq</a> 
+                     ('"' <a href="#NT-EncName">EncName</a> '"' | 
+                     "'" <a href="#NT-EncName">EncName</a> "'" )
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-EncName"></a>[81]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>EncName</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>[A-Za-z] ([A-Za-z0-9._] | '-')*</td>
+                  <td>/*Encoding name contains only Latin characters*/</td>
+               </tr>
+            </tbody>
+         </table>
+         In the <a href="#dt-docent">document entity</a>, the encoding
+         declaration is part of the <a href="#dt-xmldecl">XML declaration</a>.
+         The <a href="#NT-EncName">EncName</a> is the name of the encoding used.
+         
+      </p>
+      
+      
+      <p>In an encoding declaration, the values
+         "<code>UTF-8</code>",
+         "<code>UTF-16</code>",
+         "<code>ISO-10646-UCS-2</code>", and
+         "<code>ISO-10646-UCS-4</code>" should be 
+         used for the various encodings and transformations of Unicode /
+         ISO/IEC 10646, the values
+         "<code>ISO-8859-1</code>",
+         "<code>ISO-8859-2</code>", ...
+         "<code>ISO-8859-9</code>" should be used for the parts of ISO 8859, and
+         the values
+         "<code>ISO-2022-JP</code>",
+         "<code>Shift_JIS</code>", and
+         "<code>EUC-JP</code>"
+         should be used for the various encoded forms of JIS X-0208-1997.  XML
+         processors may recognize other encodings; it is recommended that
+         character encodings registered (as <i>charset</i>s) 
+         with the Internet Assigned Numbers
+         Authority <a href="#IANA">[IANA]</a>, other than those just listed, should be
+         referred to
+         using their registered names.
+         Note that these registered names are defined to be 
+         case-insensitive, so processors wishing to match against them 
+         should do so in a case-insensitive
+         way.
+      </p>
+      
+      <p>In the absence of information provided by an external
+         transport protocol (e.g. HTTP or MIME), 
+         it is an <a href="#dt-error">error</a> for an entity including
+         an encoding declaration to be presented to the XML processor 
+         in an encoding other than that named in the declaration, 
+         for an encoding declaration to occur other than at the beginning 
+         of an external entity, or for
+         an entity which begins with neither a Byte Order Mark nor an encoding
+         declaration to use an encoding other than UTF-8.
+         Note that since ASCII
+         is a subset of UTF-8, ordinary ASCII entities do not strictly need
+         an encoding declaration.
+      </p>
+      
+      
+      <p>It is a <a href="#dt-fatal">fatal error</a> when an XML processor
+         encounters an entity with an encoding that it is unable to process.
+      </p>
+      
+      <p>Examples of encoding declarations:
+         <pre>&lt;?xml encoding='UTF-8'?>
+&lt;?xml encoding='EUC-JP'?></pre></p>
+      
+      
+      
+      
+      <h3><a name="entproc"></a>4.4 XML Processor Treatment of Entities and References
+      </h3>
+      
+      <p>The table below summarizes the contexts in which character references,
+         entity references, and invocations of unparsed entities might appear and the
+         required behavior of an <a href="#dt-xml-proc">XML processor</a> in
+         each case.  
+         The labels in the leftmost column describe the recognition context:
+         
+         <dl>
+            
+            <dt><b>Reference in Content</b></dt>
+            
+            <dd>
+               <p>as a reference
+                  anywhere after the <a href="#dt-stag">start-tag</a> and
+                  before the <a href="#dt-etag">end-tag</a> of an element; corresponds
+                  to the nonterminal <a href="#NT-content">content</a>.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b>Reference in Attribute Value</b></dt>
+            
+            <dd>
+               <p>as a reference within either the value of an attribute in a 
+                  <a href="#dt-stag">start-tag</a>, or a default
+                  value in an <a href="#dt-attdecl">attribute declaration</a>;
+                  corresponds to the nonterminal
+                  <a href="#NT-AttValue">AttValue</a>.
+               </p>
+            </dd>
+            
+            
+            <dt><b>Occurs as Attribute Value</b></dt>
+            
+            <dd>
+               <p>as a <a href="#NT-Name">Name</a>, not a reference, appearing either as
+                  the value of an 
+                  attribute which has been declared as type ENTITY, or as one of
+                  the space-separated tokens in the value of an attribute which has been
+                  declared as type ENTITIES.
+               </p>
+               
+            </dd>
+            
+            <dt><b>Reference in Entity Value</b></dt>
+            
+            <dd>
+               <p>as a reference
+                  within a parameter or internal entity's 
+                  <a href="#dt-litentval">literal entity value</a> in
+                  the entity's declaration; corresponds to the nonterminal 
+                  <a href="#NT-EntityValue">EntityValue</a>.
+               </p>
+            </dd>
+            
+            <dt><b>Reference in DTD</b></dt>
+            
+            <dd>
+               <p>as a reference within either the internal or external subsets of the 
+                  <a href="#dt-doctype">DTD</a>, but outside
+                  of an <a href="#NT-EntityValue">EntityValue</a> or
+                  <a href="#NT-AttValue">AttValue</a>.
+               </p>
+            </dd>
+            
+            
+         </dl>
+      </p>
+      
+      <table border="1" cellpadding="7" align="center">
+         
+         <tbody>
+            
+            <tr align="" valign="">
+               <td bgcolor="#c0d9c0" rowspan="2" colspan="1" align="" valign=""></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="4" align="center" valign="bottom">Entity Type</td>
+               
+               <td bgcolor="#c0d9c0" rowspan="2" colspan="1" align="center" valign="">Character</td>
+               
+            </tr>
+            
+            <tr align="center" valign="bottom">
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign="">Parameter</td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign="">Internal
+                  General
+               </td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign="">External Parsed
+                  General
+               </td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign="">Unparsed</td>
+               
+            </tr>
+            
+            <tr align="center" valign="middle">
+               
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="right" valign="">Reference
+                  in Content
+               </td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#not-recognized">Not recognized</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#included">Included</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#include-if-valid">Included if validating</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#forbidden">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#included">Included</a></td>
+               
+            </tr>
+            
+            <tr align="center" valign="middle">
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="right" valign="">Reference
+                  in Attribute Value
+               </td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#not-recognized">Not recognized</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#inliteral">Included in literal</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#forbidden">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#forbidden">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#included">Included</a></td>
+               
+            </tr>
+            
+            <tr align="center" valign="middle">
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="right" valign="">Occurs as
+                  Attribute Value
+               </td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#not-recognized">Not recognized</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#not-recognized">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#not-recognized">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#notify">Notify</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#not%20recognized">Not recognized</a></td>
+               
+            </tr>
+            
+            <tr align="center" valign="middle">
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="right" valign="">Reference
+                  in EntityValue
+               </td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#inliteral">Included in literal</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#bypass">Bypassed</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#bypass">Bypassed</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#forbidden">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#included">Included</a></td>
+               
+            </tr>
+            
+            <tr align="center" valign="middle">
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="right" valign="">Reference
+                  in DTD
+               </td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#as-PE">Included as PE</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#forbidden">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#forbidden">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#forbidden">Forbidden</a></td>
+               
+               <td bgcolor="#c0d9c0" rowspan="1" colspan="1" align="" valign=""><a href="#forbidden">Forbidden</a></td>
+               
+            </tr>
+            
+         </tbody>
+         
+      </table>
+      
+      
+      <h4><a name="not-recognized"></a>4.4.1 Not Recognized
+      </h4>
+      
+      <p>Outside the DTD, the <code>%</code> character has no
+         special significance; thus, what would be parameter entity references in the
+         DTD are not recognized as markup in <a href="#NT-content">content</a>.
+         Similarly, the names of unparsed entities are not recognized except
+         when they appear in the value of an appropriately declared attribute.
+         
+      </p>
+      
+      
+      
+      <h4><a name="included"></a>4.4.2 Included
+      </h4>
+      
+      <p><a name="dt-include"></a>An entity is 
+         <b>included</b> when its 
+         <a href="#dt-repltext">replacement text</a> is retrieved 
+         and processed, in place of the reference itself,
+         as though it were part of the document at the location the
+         reference was recognized.
+         The replacement text may contain both 
+         <a href="#dt-chardata">character data</a>
+         and (except for parameter entities) <a href="#dt-markup">markup</a>,
+         which must be recognized in
+         the usual way, except that the replacement text of entities used to escape
+         markup delimiters (the entities <code>amp</code>,
+         <code>lt</code>,
+         <code>gt</code>,
+         <code>apos</code>,
+         <code>quot</code>) is always treated as
+         data.  (The string "<code>AT&amp;amp;T;</code>" expands to
+         "<code>AT&amp;T;</code>" and the remaining ampersand is not recognized
+         as an entity-reference delimiter.) 
+         A character reference is <b>included</b> when the indicated
+         character is processed in place of the reference itself.
+         
+      </p>
+      
+      
+      
+      <h4><a name="include-if-valid"></a>4.4.3 Included If Validating
+      </h4>
+      
+      <p>When an XML processor recognizes a reference to a parsed entity, in order
+         to <a href="#dt-valid">validate</a>
+         the document, the processor must 
+         <a href="#dt-include">include</a> its
+         replacement text.
+         If the entity is external, and the processor is not
+         attempting to validate the XML document, the
+         processor <a href="#dt-may">may</a>, but need not, 
+         include the entity's replacement text.
+         If a non-validating parser does not include the replacement text,
+         it must inform the application that it recognized, but did not
+         read, the entity.
+      </p>
+      
+      <p>This rule is based on the recognition that the automatic inclusion
+         provided by the SGML and XML entity mechanism, primarily designed
+         to support modularity in authoring, is not necessarily 
+         appropriate for other applications, in particular document browsing.
+         Browsers, for example, when encountering an external parsed entity reference,
+         might choose to provide a visual indication of the entity's
+         presence and retrieve it for display only on demand.
+         
+      </p>
+      
+      
+      
+      <h4><a name="forbidden"></a>4.4.4 Forbidden
+      </h4>
+      
+      <p>The following are forbidden, and constitute
+         <a href="#dt-fatal">fatal</a> errors:
+         
+         <ul>
+            
+            <li>
+               <p>the appearance of a reference to an
+                  <a href="#dt-unparsed">unparsed entity</a>.
+                  
+               </p>
+            </li>
+            
+            <li>
+               <p>the appearance of any character or general-entity reference in the
+                  DTD except within an <a href="#NT-EntityValue">EntityValue</a> or 
+                  <a href="#NT-AttValue">AttValue</a>.
+               </p>
+            </li>
+            
+            <li>
+               <p>a reference to an external entity in an attribute value.</p>
+               
+            </li>
+            
+         </ul>
+         
+      </p>
+      
+      
+      
+      <h4><a name="inliteral"></a>4.4.5 Included in Literal
+      </h4>
+      
+      <p>When an <a href="#dt-entref">entity reference</a> appears in an
+         attribute value, or a parameter entity reference appears in a literal entity
+         value, its <a href="#dt-repltext">replacement text</a> is
+         processed in place of the reference itself as though it
+         were part of the document at the location the reference was recognized,
+         except that a single or double quote character in the replacement text
+         is always treated as a normal data character and will not terminate the
+         literal. 
+         For example, this is well-formed:
+         <pre>&lt;!ENTITY % YN '"Yes"' >
+&lt;!ENTITY WhatHeSaid "He said &amp;YN;" ></pre>
+         while this is not:
+         <pre>&lt;!ENTITY EndAttr "27'" >
+&lt;element attribute='a-&amp;EndAttr;></pre>
+         </p>
+      
+      
+      <h4><a name="notify"></a>4.4.6 Notify
+      </h4>
+      
+      <p>When the name of an <a href="#dt-unparsed">unparsed
+            entity
+         </a> appears as a token in the
+         value of an attribute of declared type ENTITY or ENTITIES,
+         a validating processor must inform the
+         application of the <a href="#dt-sysid">system</a> 
+         and <a href="#dt-pubid">public</a> (if any)
+         identifiers for both the entity and its associated
+         <a href="#dt-notation">notation</a>.
+      </p>
+      
+      
+      
+      <h4><a name="bypass"></a>4.4.7 Bypassed
+      </h4>
+      
+      <p>When a general entity reference appears in the
+         <a href="#NT-EntityValue">EntityValue</a> in an entity declaration,
+         it is bypassed and left as is.
+      </p>
+      
+      
+      
+      <h4><a name="as-PE"></a>4.4.8 Included as PE
+      </h4>
+      
+      <p>Just as with external parsed entities, parameter entities
+         need only be <a href="#include-if-valid">included if
+            validating
+         </a>. 
+         When a parameter-entity reference is recognized in the DTD
+         and included, its 
+         <a href="#dt-repltext">replacement
+            text
+         </a> is enlarged by the attachment of one leading and one following
+         space (#x20) character; the intent is to constrain the replacement
+         text of parameter 
+         entities to contain an integral number of grammatical tokens in the DTD.
+         
+      </p>
+      
+      
+      
+      
+      
+      <h3><a name="intern-replacement"></a>4.5 Construction of Internal Entity Replacement Text
+      </h3>
+      
+      <p>In discussing the treatment
+         of internal entities, it is  
+         useful to distinguish two forms of the entity's value.
+         <a name="dt-litentval"></a>The <b>literal
+            entity value
+         </b> is the quoted string actually
+         present in the entity declaration, corresponding to the
+         non-terminal <a href="#NT-EntityValue">EntityValue</a>.
+         <a name="dt-repltext"></a>The <b>replacement
+            text
+         </b> is the content of the entity, after
+         replacement of character references and parameter-entity
+         references.
+         
+      </p>
+      
+      
+      <p>The literal entity value 
+         as given in an internal entity declaration
+         (<a href="#NT-EntityValue">EntityValue</a>) may contain character,
+         parameter-entity, and general-entity references.
+         Such references must be contained entirely within the
+         literal entity value.
+         The actual replacement text that is 
+         <a href="#dt-include">included</a> as described above
+         must contain the <i>replacement text</i> of any 
+         parameter entities referred to, and must contain the character
+         referred to, in place of any character references in the
+         literal entity value; however,
+         general-entity references must be left as-is, unexpanded.
+         For example, given the following declarations:
+         
+         <pre>&lt;!ENTITY % pub    "&amp;#xc9;ditions Gallimard" >
+&lt;!ENTITY   rights "All rights reserved" >
+&lt;!ENTITY   book   "La Peste: Albert Camus, 
+&amp;#xA9; 1947 %pub;. &amp;rights;" ></pre>
+         then the replacement text for the entity "<code>book</code>" is:
+         <pre>La Peste: Albert Camus, 
+&copy; 1947 &Eacute;ditions Gallimard. &amp;rights;</pre>
+         The general-entity reference "<code>&amp;rights;</code>" would be expanded
+         should the reference "<code>&amp;book;</code>" appear in the document's
+         content or an attribute value.
+      </p>
+      
+      <p>These simple rules may have complex interactions; for a detailed
+         discussion of a difficult example, see
+         <a href="#sec-entexpand">[<b>D Expansion of Entity and Character References</b>]
+         </a>.
+         
+      </p>
+      
+      
+      
+      
+      <h3><a name="sec-predefined-ent"></a>4.6 Predefined Entities
+      </h3>
+      
+      <p><a name="dt-escape"></a>Entity and character
+         references can both be used to <b>escape</b> the left angle bracket,
+         ampersand, and other delimiters.   A set of general entities
+         (<code>amp</code>,
+         <code>lt</code>,
+         <code>gt</code>,
+         <code>apos</code>,
+         <code>quot</code>) is specified for this purpose.
+         Numeric character references may also be used; they are
+         expanded immediately when recognized and must be treated as
+         character data, so the numeric character references
+         "<code>&amp;#60;</code>" and "<code>&amp;#38;</code>" may be used to 
+         escape <code>&lt;</code> and <code>&amp;</code> when they occur
+         in character data.
+      </p>
+      
+      <p>All XML processors must recognize these entities whether they
+         are declared or not.  
+         <a href="#dt-interop">For interoperability</a>,
+         valid XML documents should declare these
+         entities, like any others, before using them.
+         If the entities in question are declared, they must be declared
+         as internal entities whose replacement text is the single
+         character being escaped or a character reference to
+         that character, as shown below.
+         <pre>&lt;!ENTITY lt     "&amp;#38;#60;"> 
+&lt;!ENTITY gt     "&amp;#62;"> 
+&lt;!ENTITY amp    "&amp;#38;#38;"> 
+&lt;!ENTITY apos   "&amp;#39;"> 
+&lt;!ENTITY quot   "&amp;#34;"> 
+</pre>
+         Note that the <code>&lt;</code> and <code>&amp;</code> characters
+         in the declarations of "<code>lt</code>" and "<code>amp</code>"
+         are doubly escaped to meet the requirement that entity replacement
+         be well-formed.
+         
+      </p>
+      
+      
+      
+      
+      <h3><a name="Notations"></a>4.7 Notation Declarations
+      </h3>
+      
+      
+      <p><a name="dt-notation"></a><b>Notations</b> identify by
+         name the format of <a href="#dt-extent">unparsed
+            entities
+         </a>, the
+         format of elements which bear a notation attribute, 
+         or the application to which  
+         a <a href="#dt-pi">processing instruction</a> is
+         addressed.
+      </p>
+      
+      <p><a name="dt-notdecl"></a>
+         <b>Notation declarations</b>
+         provide a name for the notation, for use in
+         entity and attribute-list declarations and in attribute specifications,
+         and an external identifier for the notation which may allow an XML
+         processor or its client application to locate a helper application
+         capable of processing data in the given notation.
+         
+         <h5>Notation Declarations</h5>
+         <table class="scrap">
+            <tbody>
+               <tr valign="baseline">
+                  <td><a name="NT-NotationDecl"></a>[82]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>NotationDecl</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'&lt;!NOTATION' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> 
+                     <a href="#NT-S">S</a> 
+                     (<a href="#NT-ExternalID">ExternalID</a> | 
+                     <a href="#NT-PublicID">PublicID</a>)
+                     <a href="#NT-S">S</a>? '>'
+                  </td>
+                  <td></td>
+               </tr>
+               <tr valign="baseline">
+                  <td><a name="NT-PublicID"></a>[83]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>PublicID</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>'PUBLIC' <a href="#NT-S">S</a> 
+                     <a href="#NT-PubidLiteral">PubidLiteral</a> 
+                     
+                  </td>
+                  <td></td>
+               </tr>
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>XML processors must provide applications with the name and external
+         identifier(s) of any notation declared and referred to in an attribute
+         value, attribute definition, or entity declaration.  They may
+         additionally resolve the external identifier into the
+         <a href="#dt-sysid">system identifier</a>,
+         file name, or other information needed to allow the
+         application to call a processor for data in the notation described.  (It
+         is not an error, however, for XML documents to declare and refer to
+         notations for which notation-specific applications are not available on
+         the system where the XML processor or application is running.)
+      </p>
+      
+      
+      
+      
+      
+      <h3><a name="sec-doc-entity"></a>4.8 Document Entity
+      </h3>
+      
+      
+      <p><a name="dt-docent"></a>The <b>document
+            entity
+         </b> serves as the root of the entity
+         tree and a starting-point for an <a href="#dt-xml-proc">XML
+            processor
+         </a>.
+         This specification does
+         not specify how the document entity is to be located by an XML
+         processor; unlike other entities, the document entity has no name and might
+         well appear on a processor input stream 
+         without any identification at all.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="sec-conformance"></a>5 Conformance
+      </h2>
+      
+      
+      
+      <h3><a name="proc-types"></a>5.1 Validating and Non-Validating Processors
+      </h3>
+      
+      <p>Conforming <a href="#dt-xml-proc">XML processors</a> fall into two
+         classes: validating and non-validating.
+      </p>
+      
+      <p>Validating and non-validating processors alike must report
+         violations of this specification's well-formedness constraints
+         in the content of the
+         <a href="#dt-docent">document entity</a> and any 
+         other <a href="#dt-parsedent">parsed entities</a> that 
+         they read.
+      </p>
+      
+      <p><a name="dt-validating"></a>
+         <b>Validating processors</b> must report
+         violations of the constraints expressed by the declarations in the
+         <a href="#dt-doctype">DTD</a>, and
+         failures to fulfill the validity constraints given
+         in this specification.
+         
+         To accomplish this, validating XML processors must read and process the entire
+         DTD and all external parsed entities referenced in the document.
+         
+      </p>
+      
+      <p>Non-validating processors are required to check only the 
+         <a href="#dt-docent">document entity</a>, including
+         the entire internal DTD subset, for well-formedness.
+         <a name="dt-use-mdecl"></a>
+         While they are not required to check the document for validity,
+         they are required to 
+         <b>process</b> all the declarations they read in the
+         internal DTD subset and in any parameter entity that they
+         read, up to the first reference
+         to a parameter entity that they do <i>not</i> read; that is to 
+         say, they must
+         use the information in those declarations to
+         <a href="#AVNormalize">normalize</a> attribute values,
+         <a href="#included">include</a> the replacement text of 
+         internal entities, and supply 
+         <a href="#sec-attr-defaults">default attribute values</a>.
+         
+         They must not <a href="#dt-use-mdecl">process</a>
+         <a href="#dt-entdecl">entity declarations</a> or 
+         <a href="#dt-attdecl">attribute-list declarations</a> 
+         encountered after a reference to a parameter entity that is not
+         read, since the entity may have contained overriding declarations.
+         
+      </p>
+      
+      
+      
+      <h3><a name="safe-behavior"></a>5.2 Using XML Processors
+      </h3>
+      
+      <p>The behavior of a validating XML processor is highly predictable; it
+         must read every piece of a document and report all well-formedness and
+         validity violations.
+         Less is required of a non-validating processor; it need not read any
+         part of the document other than the document entity.
+         This has two effects that may be important to users of XML processors:
+         
+         <ul>
+            
+            <li>
+               <p>Certain well-formedness errors, specifically those that require
+                  reading external entities, may not be detected by a non-validating processor.
+                  Examples include the constraints entitled 
+                  <a href="#wf-entdeclared">Entity Declared</a>, 
+                  <a href="#wf-textent">Parsed Entity</a>, and
+                  <a href="#wf-norecursion">No Recursion</a>, as well
+                  as some of the cases described as
+                  <a href="#forbidden">forbidden</a> in 
+                  <a href="#entproc">[<b>4.4 XML Processor Treatment of Entities and References</b>]
+                  </a>.
+               </p>
+            </li>
+            
+            <li>
+               <p>The information passed from the processor to the application may
+                  vary, depending on whether the processor reads
+                  parameter and external entities.
+                  For example, a non-validating processor may not 
+                  <a href="#AVNormalize">normalize</a> attribute values,
+                  <a href="#included">include</a> the replacement text of 
+                  internal entities, or supply 
+                  <a href="#sec-attr-defaults">default attribute values</a>,
+                  where doing so depends on having read declarations in 
+                  external or parameter entities.
+               </p>
+            </li>
+            
+         </ul>
+         
+      </p>
+      
+      <p>For maximum reliability in interoperating between different XML
+         processors, applications which use non-validating processors should not 
+         rely on any behaviors not required of such processors.
+         Applications which require facilities such as the use of default
+         attributes or internal entities which are declared in external
+         entities should use validating XML processors.
+      </p>
+      
+      
+      
+      
+      
+      <h2><a name="sec-notation"></a>6 Notation
+      </h2>
+      
+      
+      <p>The formal grammar of XML is given in this specification using a simple
+         Extended Backus-Naur Form (EBNF) notation.  Each rule in the grammar defines
+         one symbol, in the form
+         <pre>symbol ::= expression</pre></p>
+      
+      <p>Symbols are written with an initial capital letter if they are
+         defined by a regular expression, or with an initial lower case letter 
+         otherwise.
+         Literal strings are quoted.
+         
+         
+      </p>
+      
+      
+      <p>Within the expression on the right-hand side of a rule, the following
+         expressions are used to match strings of one or more characters:
+         
+         <dl>
+            
+            
+            <dt><b><code>#xN</code></b></dt>
+            
+            <dd>
+               <p>where <code>N</code> is a hexadecimal integer, the
+                  expression matches the character in ISO/IEC 10646 whose canonical
+                  (UCS-4) 
+                  code value, when interpreted as an unsigned binary number, has
+                  the value indicated.  The number of leading zeros in the
+                  <code>#xN</code> form is insignificant; the number of leading
+                  zeros in the corresponding code value 
+                  is governed by the character
+                  encoding in use and is not significant for XML.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>[a-zA-Z]</code>, <code>[#xN-#xN]</code></b></dt>
+            
+            <dd>
+               <p>matches any <a href="#dt-character">character</a> 
+                  with a value in the range(s) indicated (inclusive).
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>[^a-z]</code>, <code>[^#xN-#xN]</code></b></dt>
+            
+            <dd>
+               <p>matches any <a href="#dt-character">character</a> 
+                  with a value <i>outside</i> the
+                  range indicated.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>[^abc]</code>, <code>[^#xN#xN#xN]</code></b></dt>
+            
+            <dd>
+               <p>matches any <a href="#dt-character">character</a>
+                  with a value not among the characters given.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>"string"</code></b></dt>
+            
+            <dd>
+               <p>matches a literal string <a href="#dt-match">matching</a>
+                  that given inside the double quotes.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>'string'</code></b></dt>
+            
+            <dd>
+               <p>matches a literal string <a href="#dt-match">matching</a>
+                  that given inside the single quotes.
+               </p>
+            </dd>
+            
+            
+         </dl>
+         These symbols may be combined to match more complex patterns as follows,
+         where <code>A</code> and <code>B</code> represent simple expressions:
+         
+         <dl>
+            
+            
+            <dt><b>(<code>expression</code>)
+               </b>
+            </dt>
+            
+            <dd>
+               <p><code>expression</code> is treated as a unit 
+                  and may be combined as described in this list.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>A?</code></b></dt>
+            
+            <dd>
+               <p>matches <code>A</code> or nothing; optional <code>A</code>.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>A B</code></b></dt>
+            
+            <dd>
+               <p>matches <code>A</code> followed by <code>B</code>.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>A | B</code></b></dt>
+            
+            <dd>
+               <p>matches <code>A</code> or <code>B</code> but not both.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>A - B</code></b></dt>
+            
+            <dd>
+               <p>matches any string that matches <code>A</code> but does not match
+                  <code>B</code>.
+                  
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>A+</code></b></dt>
+            
+            <dd>
+               <p>matches one or more occurrences of <code>A</code>.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>A*</code></b></dt>
+            
+            <dd>
+               <p>matches zero or more occurrences of <code>A</code>.
+               </p>
+            </dd>
+            
+            
+            
+         </dl>
+         Other notations used in the productions are:
+         
+         <dl>
+            
+            
+            <dt><b><code>/* ... */</code></b></dt>
+            
+            <dd>
+               <p>comment.</p>
+            </dd>
+            
+            
+            
+            <dt><b><code>[ wfc: ... ]</code></b></dt>
+            
+            <dd>
+               <p>well-formedness constraint; this identifies by name a 
+                  constraint on 
+                  <a href="#dt-wellformed">well-formed</a> documents
+                  associated with a production.
+               </p>
+            </dd>
+            
+            
+            
+            <dt><b><code>[ vc: ... ]</code></b></dt>
+            
+            <dd>
+               <p>validity constraint; this identifies by name a constraint on
+                  <a href="#dt-valid">valid</a> documents associated with
+                  a production.
+               </p>
+            </dd>
+            
+            
+         </dl>
+         
+      </p>
+      
+      
+      
+      <hr title="Separator from footer">
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="sec-bibliography"></a>A References
+      </h2>
+      
+      
+      <h3><a name="sec-existing-stds"></a>A.1 Normative References
+      </h3>
+      
+      
+      <dl>
+         
+         <dt><a name="IANA">IANA</a></dt>
+         <dd>
+            (Internet Assigned Numbers Authority) <i>Official Names for 
+               Character Sets
+            </i>,
+            ed. Keld Simonsen et al.
+            See <a href="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</a>.
+            
+         </dd>
+         
+         
+         <dt><a name="RFC1766">IETF RFC 1766</a></dt>
+         <dd>
+            IETF (Internet Engineering Task Force).
+            <i>RFC 1766:  Tags for the Identification of Languages</i>,
+            ed. H. Alvestrand.
+            1995.
+            
+         </dd>
+         
+         
+         <dt><a name="ISO639">ISO 639</a></dt>
+         <dd>
+            (International Organization for Standardization).
+            <i>ISO 639:1988 (E).
+               Code for the representation of names of languages.
+            </i>
+            [Geneva]:  International Organization for
+            Standardization, 1988.
+         </dd>
+         
+         
+         <dt><a name="ISO3166">ISO 3166</a></dt>
+         <dd>
+            (International Organization for Standardization).
+            <i>ISO 3166-1:1997 (E).
+               Codes for the representation of names of countries and their subdivisions 
+               -- Part 1: Country codes
+            </i>
+            [Geneva]:  International Organization for
+            Standardization, 1997.
+         </dd>
+         
+         
+         <dt><a name="ISO10646">ISO/IEC 10646</a></dt>
+         <dd>ISO
+            (International Organization for Standardization).
+            <i>ISO/IEC 10646-1993 (E).  Information technology -- Universal
+               Multiple-Octet Coded Character Set (UCS) -- Part 1:
+               Architecture and Basic Multilingual Plane.
+            </i>
+            [Geneva]:  International Organization for
+            Standardization, 1993 (plus amendments AM 1 through AM 7).
+            
+         </dd>
+         
+         
+         <dt><a name="Unicode">Unicode</a></dt>
+         <dd>The Unicode Consortium.
+            <i>The Unicode Standard, Version 2.0.</i>
+            Reading, Mass.:  Addison-Wesley Developers Press, 1996.
+         </dd>
+         
+         
+      </dl>
+      
+      
+      
+      
+      <h3><a name="section-Other-References"></a>A.2 Other References
+      </h3> 
+      
+      
+      <dl>
+         
+         
+         <dt><a name="Aho">Aho/Ullman</a></dt>
+         <dd>Aho, Alfred V., 
+            Ravi Sethi, and Jeffrey D. Ullman.
+            <i>Compilers:  Principles, Techniques, and Tools</i>.
+            Reading:  Addison-Wesley, 1986, rpt. corr. 1988.
+         </dd>
+         
+         
+         <dt><a name="Berners-Lee">Berners-Lee et al.</a></dt>
+         <dd>
+            Berners-Lee, T., R. Fielding, and L. Masinter.
+            <i>Uniform Resource Identifiers (URI):  Generic Syntax and
+               Semantics
+            </i>.
+            1997.
+            (Work in progress; see updates to RFC1738.)
+         </dd>
+         
+         
+         <dt><a name="ABK">Br&uuml;ggemann-Klein</a></dt>
+         <dd>Br&uuml;ggemann-Klein, Anne.
+            <i>Regular Expressions into Finite Automata</i>.
+            Extended abstract in I. Simon, Hrsg., LATIN 1992, 
+            S. 97-98. Springer-Verlag, Berlin 1992. 
+            Full Version in Theoretical Computer Science 120: 197-213, 1993.
+            
+            
+         </dd>
+         
+         
+         <dt><a name="ABKDW">Br&uuml;ggemann-Klein and Wood</a></dt>
+         <dd>Br&uuml;ggemann-Klein, Anne,
+            and Derick Wood.
+            <i>Deterministic Regular Languages</i>.
+            Universit&auml;t Freiburg, Institut f&uuml;r Informatik,
+            Bericht 38, Oktober 1991.
+            
+         </dd>
+         
+         
+         <dt><a name="Clark">Clark</a></dt>
+         <dd>James Clark.
+            Comparison of SGML and XML. See
+            <a href="http://www.w3.org/TR/NOTE-sgml-xml-971215">http://www.w3.org/TR/NOTE-sgml-xml-971215</a>.
+            
+         </dd>
+         
+         <dt><a name="RFC1738">IETF RFC1738</a></dt>
+         <dd>
+            IETF (Internet Engineering Task Force).
+            <i>RFC 1738:  Uniform Resource Locators (URL)</i>, 
+            ed. T. Berners-Lee, L. Masinter, M. McCahill.
+            1994.
+            
+         </dd>
+         
+         
+         <dt><a name="RFC1808">IETF RFC1808</a></dt>
+         <dd>
+            IETF (Internet Engineering Task Force).
+            <i>RFC 1808:  Relative Uniform Resource Locators</i>, 
+            ed. R. Fielding.
+            1995.
+            
+         </dd>
+         
+         
+         <dt><a name="RFC2141">IETF RFC2141</a></dt>
+         <dd>
+            IETF (Internet Engineering Task Force).
+            <i>RFC 2141:  URN Syntax</i>, 
+            ed. R. Moats.
+            1997.
+            
+         </dd>
+         
+         
+         <dt><a name="ISO8879">ISO 8879</a></dt>
+         <dd>ISO
+            (International Organization for Standardization).
+            <i>ISO 8879:1986(E).  Information processing -- Text and Office
+               Systems -- Standard Generalized Markup Language (SGML).
+            </i>  First
+            edition -- 1986-10-15.  [Geneva]:  International Organization for
+            Standardization, 1986.
+            
+         </dd>
+         
+         
+         
+         <dt><a name="ISO10744">ISO/IEC 10744</a></dt>
+         <dd>ISO
+            (International Organization for Standardization).
+            <i>ISO/IEC 10744-1992 (E).  Information technology --
+               Hypermedia/Time-based Structuring Language (HyTime).
+               
+            </i>
+            [Geneva]:  International Organization for
+            Standardization, 1992.
+            <i>Extended Facilities Annexe.</i>
+            [Geneva]:  International Organization for
+            Standardization, 1996. 
+            
+         </dd>
+         
+         
+         
+         
+      </dl>
+      
+      
+      
+      
+      <h2><a name="CharClasses"></a>B Character Classes
+      </h2>
+      
+      <p>Following the characteristics defined in the Unicode standard,
+         characters are classed as base characters (among others, these
+         contain the alphabetic characters of the Latin alphabet, without
+         diacritics), ideographic characters, and combining characters (among
+         others, this class contains most diacritics); these classes combine
+         to form the class of letters.  Digits and extenders are
+         also distinguished.
+         
+         <h5>Characters</h5>
+         <table class="scrap">
+            <tbody>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Letter"></a>[84]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Letter</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td><a href="#NT-BaseChar">BaseChar</a> 
+                     | <a href="#NT-Ideographic">Ideographic</a></td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-BaseChar"></a>[85]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>BaseChar</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>[#x0041-#x005A]
+                     |&nbsp;[#x0061-#x007A]
+                     |&nbsp;[#x00C0-#x00D6]
+                     |&nbsp;[#x00D8-#x00F6]
+                     |&nbsp;[#x00F8-#x00FF]
+                     |&nbsp;[#x0100-#x0131]
+                     |&nbsp;[#x0134-#x013E]
+                     |&nbsp;[#x0141-#x0148]
+                     |&nbsp;[#x014A-#x017E]
+                     |&nbsp;[#x0180-#x01C3]
+                     |&nbsp;[#x01CD-#x01F0]
+                     |&nbsp;[#x01F4-#x01F5]
+                     |&nbsp;[#x01FA-#x0217]
+                     |&nbsp;[#x0250-#x02A8]
+                     |&nbsp;[#x02BB-#x02C1]
+                     |&nbsp;#x0386
+                     |&nbsp;[#x0388-#x038A]
+                     |&nbsp;#x038C
+                     |&nbsp;[#x038E-#x03A1]
+                     |&nbsp;[#x03A3-#x03CE]
+                     |&nbsp;[#x03D0-#x03D6]
+                     |&nbsp;#x03DA
+                     |&nbsp;#x03DC
+                     |&nbsp;#x03DE
+                     |&nbsp;#x03E0
+                     |&nbsp;[#x03E2-#x03F3]
+                     |&nbsp;[#x0401-#x040C]
+                     |&nbsp;[#x040E-#x044F]
+                     |&nbsp;[#x0451-#x045C]
+                     |&nbsp;[#x045E-#x0481]
+                     |&nbsp;[#x0490-#x04C4]
+                     |&nbsp;[#x04C7-#x04C8]
+                     |&nbsp;[#x04CB-#x04CC]
+                     |&nbsp;[#x04D0-#x04EB]
+                     |&nbsp;[#x04EE-#x04F5]
+                     |&nbsp;[#x04F8-#x04F9]
+                     |&nbsp;[#x0531-#x0556]
+                     |&nbsp;#x0559
+                     |&nbsp;[#x0561-#x0586]
+                     |&nbsp;[#x05D0-#x05EA]
+                     |&nbsp;[#x05F0-#x05F2]
+                     |&nbsp;[#x0621-#x063A]
+                     |&nbsp;[#x0641-#x064A]
+                     |&nbsp;[#x0671-#x06B7]
+                     |&nbsp;[#x06BA-#x06BE]
+                     |&nbsp;[#x06C0-#x06CE]
+                     |&nbsp;[#x06D0-#x06D3]
+                     |&nbsp;#x06D5
+                     |&nbsp;[#x06E5-#x06E6]
+                     |&nbsp;[#x0905-#x0939]
+                     |&nbsp;#x093D
+                     |&nbsp;[#x0958-#x0961]
+                     |&nbsp;[#x0985-#x098C]
+                     |&nbsp;[#x098F-#x0990]
+                     |&nbsp;[#x0993-#x09A8]
+                     |&nbsp;[#x09AA-#x09B0]
+                     |&nbsp;#x09B2
+                     |&nbsp;[#x09B6-#x09B9]
+                     |&nbsp;[#x09DC-#x09DD]
+                     |&nbsp;[#x09DF-#x09E1]
+                     |&nbsp;[#x09F0-#x09F1]
+                     |&nbsp;[#x0A05-#x0A0A]
+                     |&nbsp;[#x0A0F-#x0A10]
+                     |&nbsp;[#x0A13-#x0A28]
+                     |&nbsp;[#x0A2A-#x0A30]
+                     |&nbsp;[#x0A32-#x0A33]
+                     |&nbsp;[#x0A35-#x0A36]
+                     |&nbsp;[#x0A38-#x0A39]
+                     |&nbsp;[#x0A59-#x0A5C]
+                     |&nbsp;#x0A5E
+                     |&nbsp;[#x0A72-#x0A74]
+                     |&nbsp;[#x0A85-#x0A8B]
+                     |&nbsp;#x0A8D
+                     |&nbsp;[#x0A8F-#x0A91]
+                     |&nbsp;[#x0A93-#x0AA8]
+                     |&nbsp;[#x0AAA-#x0AB0]
+                     |&nbsp;[#x0AB2-#x0AB3]
+                     |&nbsp;[#x0AB5-#x0AB9]
+                     |&nbsp;#x0ABD
+                     |&nbsp;#x0AE0
+                     |&nbsp;[#x0B05-#x0B0C]
+                     |&nbsp;[#x0B0F-#x0B10]
+                     |&nbsp;[#x0B13-#x0B28]
+                     |&nbsp;[#x0B2A-#x0B30]
+                     |&nbsp;[#x0B32-#x0B33]
+                     |&nbsp;[#x0B36-#x0B39]
+                     |&nbsp;#x0B3D
+                     |&nbsp;[#x0B5C-#x0B5D]
+                     |&nbsp;[#x0B5F-#x0B61]
+                     |&nbsp;[#x0B85-#x0B8A]
+                     |&nbsp;[#x0B8E-#x0B90]
+                     |&nbsp;[#x0B92-#x0B95]
+                     |&nbsp;[#x0B99-#x0B9A]
+                     |&nbsp;#x0B9C
+                     |&nbsp;[#x0B9E-#x0B9F]
+                     |&nbsp;[#x0BA3-#x0BA4]
+                     |&nbsp;[#x0BA8-#x0BAA]
+                     |&nbsp;[#x0BAE-#x0BB5]
+                     |&nbsp;[#x0BB7-#x0BB9]
+                     |&nbsp;[#x0C05-#x0C0C]
+                     |&nbsp;[#x0C0E-#x0C10]
+                     |&nbsp;[#x0C12-#x0C28]
+                     |&nbsp;[#x0C2A-#x0C33]
+                     |&nbsp;[#x0C35-#x0C39]
+                     |&nbsp;[#x0C60-#x0C61]
+                     |&nbsp;[#x0C85-#x0C8C]
+                     |&nbsp;[#x0C8E-#x0C90]
+                     |&nbsp;[#x0C92-#x0CA8]
+                     |&nbsp;[#x0CAA-#x0CB3]
+                     |&nbsp;[#x0CB5-#x0CB9]
+                     |&nbsp;#x0CDE
+                     |&nbsp;[#x0CE0-#x0CE1]
+                     |&nbsp;[#x0D05-#x0D0C]
+                     |&nbsp;[#x0D0E-#x0D10]
+                     |&nbsp;[#x0D12-#x0D28]
+                     |&nbsp;[#x0D2A-#x0D39]
+                     |&nbsp;[#x0D60-#x0D61]
+                     |&nbsp;[#x0E01-#x0E2E]
+                     |&nbsp;#x0E30
+                     |&nbsp;[#x0E32-#x0E33]
+                     |&nbsp;[#x0E40-#x0E45]
+                     |&nbsp;[#x0E81-#x0E82]
+                     |&nbsp;#x0E84
+                     |&nbsp;[#x0E87-#x0E88]
+                     |&nbsp;#x0E8A
+                     |&nbsp;#x0E8D
+                     |&nbsp;[#x0E94-#x0E97]
+                     |&nbsp;[#x0E99-#x0E9F]
+                     |&nbsp;[#x0EA1-#x0EA3]
+                     |&nbsp;#x0EA5
+                     |&nbsp;#x0EA7
+                     |&nbsp;[#x0EAA-#x0EAB]
+                     |&nbsp;[#x0EAD-#x0EAE]
+                     |&nbsp;#x0EB0
+                     |&nbsp;[#x0EB2-#x0EB3]
+                     |&nbsp;#x0EBD
+                     |&nbsp;[#x0EC0-#x0EC4]
+                     |&nbsp;[#x0F40-#x0F47]
+                     |&nbsp;[#x0F49-#x0F69]
+                     |&nbsp;[#x10A0-#x10C5]
+                     |&nbsp;[#x10D0-#x10F6]
+                     |&nbsp;#x1100
+                     |&nbsp;[#x1102-#x1103]
+                     |&nbsp;[#x1105-#x1107]
+                     |&nbsp;#x1109
+                     |&nbsp;[#x110B-#x110C]
+                     |&nbsp;[#x110E-#x1112]
+                     |&nbsp;#x113C
+                     |&nbsp;#x113E
+                     |&nbsp;#x1140
+                     |&nbsp;#x114C
+                     |&nbsp;#x114E
+                     |&nbsp;#x1150
+                     |&nbsp;[#x1154-#x1155]
+                     |&nbsp;#x1159
+                     |&nbsp;[#x115F-#x1161]
+                     |&nbsp;#x1163
+                     |&nbsp;#x1165
+                     |&nbsp;#x1167
+                     |&nbsp;#x1169
+                     |&nbsp;[#x116D-#x116E]
+                     |&nbsp;[#x1172-#x1173]
+                     |&nbsp;#x1175
+                     |&nbsp;#x119E
+                     |&nbsp;#x11A8
+                     |&nbsp;#x11AB
+                     |&nbsp;[#x11AE-#x11AF]
+                     |&nbsp;[#x11B7-#x11B8]
+                     |&nbsp;#x11BA
+                     |&nbsp;[#x11BC-#x11C2]
+                     |&nbsp;#x11EB
+                     |&nbsp;#x11F0
+                     |&nbsp;#x11F9
+                     |&nbsp;[#x1E00-#x1E9B]
+                     |&nbsp;[#x1EA0-#x1EF9]
+                     |&nbsp;[#x1F00-#x1F15]
+                     |&nbsp;[#x1F18-#x1F1D]
+                     |&nbsp;[#x1F20-#x1F45]
+                     |&nbsp;[#x1F48-#x1F4D]
+                     |&nbsp;[#x1F50-#x1F57]
+                     |&nbsp;#x1F59
+                     |&nbsp;#x1F5B
+                     |&nbsp;#x1F5D
+                     |&nbsp;[#x1F5F-#x1F7D]
+                     |&nbsp;[#x1F80-#x1FB4]
+                     |&nbsp;[#x1FB6-#x1FBC]
+                     |&nbsp;#x1FBE
+                     |&nbsp;[#x1FC2-#x1FC4]
+                     |&nbsp;[#x1FC6-#x1FCC]
+                     |&nbsp;[#x1FD0-#x1FD3]
+                     |&nbsp;[#x1FD6-#x1FDB]
+                     |&nbsp;[#x1FE0-#x1FEC]
+                     |&nbsp;[#x1FF2-#x1FF4]
+                     |&nbsp;[#x1FF6-#x1FFC]
+                     |&nbsp;#x2126
+                     |&nbsp;[#x212A-#x212B]
+                     |&nbsp;#x212E
+                     |&nbsp;[#x2180-#x2182]
+                     |&nbsp;[#x3041-#x3094]
+                     |&nbsp;[#x30A1-#x30FA]
+                     |&nbsp;[#x3105-#x312C]
+                     |&nbsp;[#xAC00-#xD7A3]
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Ideographic"></a>[86]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Ideographic</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>[#x4E00-#x9FA5]
+                     |&nbsp;#x3007
+                     |&nbsp;[#x3021-#x3029]
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-CombiningChar"></a>[87]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>CombiningChar</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>[#x0300-#x0345]
+                     |&nbsp;[#x0360-#x0361]
+                     |&nbsp;[#x0483-#x0486]
+                     |&nbsp;[#x0591-#x05A1]
+                     |&nbsp;[#x05A3-#x05B9]
+                     |&nbsp;[#x05BB-#x05BD]
+                     |&nbsp;#x05BF
+                     |&nbsp;[#x05C1-#x05C2]
+                     |&nbsp;#x05C4
+                     |&nbsp;[#x064B-#x0652]
+                     |&nbsp;#x0670
+                     |&nbsp;[#x06D6-#x06DC]
+                     |&nbsp;[#x06DD-#x06DF]
+                     |&nbsp;[#x06E0-#x06E4]
+                     |&nbsp;[#x06E7-#x06E8]
+                     |&nbsp;[#x06EA-#x06ED]
+                     |&nbsp;[#x0901-#x0903]
+                     |&nbsp;#x093C
+                     |&nbsp;[#x093E-#x094C]
+                     |&nbsp;#x094D
+                     |&nbsp;[#x0951-#x0954]
+                     |&nbsp;[#x0962-#x0963]
+                     |&nbsp;[#x0981-#x0983]
+                     |&nbsp;#x09BC
+                     |&nbsp;#x09BE
+                     |&nbsp;#x09BF
+                     |&nbsp;[#x09C0-#x09C4]
+                     |&nbsp;[#x09C7-#x09C8]
+                     |&nbsp;[#x09CB-#x09CD]
+                     |&nbsp;#x09D7
+                     |&nbsp;[#x09E2-#x09E3]
+                     |&nbsp;#x0A02
+                     |&nbsp;#x0A3C
+                     |&nbsp;#x0A3E
+                     |&nbsp;#x0A3F
+                     |&nbsp;[#x0A40-#x0A42]
+                     |&nbsp;[#x0A47-#x0A48]
+                     |&nbsp;[#x0A4B-#x0A4D]
+                     |&nbsp;[#x0A70-#x0A71]
+                     |&nbsp;[#x0A81-#x0A83]
+                     |&nbsp;#x0ABC
+                     |&nbsp;[#x0ABE-#x0AC5]
+                     |&nbsp;[#x0AC7-#x0AC9]
+                     |&nbsp;[#x0ACB-#x0ACD]
+                     |&nbsp;[#x0B01-#x0B03]
+                     |&nbsp;#x0B3C
+                     |&nbsp;[#x0B3E-#x0B43]
+                     |&nbsp;[#x0B47-#x0B48]
+                     |&nbsp;[#x0B4B-#x0B4D]
+                     |&nbsp;[#x0B56-#x0B57]
+                     |&nbsp;[#x0B82-#x0B83]
+                     |&nbsp;[#x0BBE-#x0BC2]
+                     |&nbsp;[#x0BC6-#x0BC8]
+                     |&nbsp;[#x0BCA-#x0BCD]
+                     |&nbsp;#x0BD7
+                     |&nbsp;[#x0C01-#x0C03]
+                     |&nbsp;[#x0C3E-#x0C44]
+                     |&nbsp;[#x0C46-#x0C48]
+                     |&nbsp;[#x0C4A-#x0C4D]
+                     |&nbsp;[#x0C55-#x0C56]
+                     |&nbsp;[#x0C82-#x0C83]
+                     |&nbsp;[#x0CBE-#x0CC4]
+                     |&nbsp;[#x0CC6-#x0CC8]
+                     |&nbsp;[#x0CCA-#x0CCD]
+                     |&nbsp;[#x0CD5-#x0CD6]
+                     |&nbsp;[#x0D02-#x0D03]
+                     |&nbsp;[#x0D3E-#x0D43]
+                     |&nbsp;[#x0D46-#x0D48]
+                     |&nbsp;[#x0D4A-#x0D4D]
+                     |&nbsp;#x0D57
+                     |&nbsp;#x0E31
+                     |&nbsp;[#x0E34-#x0E3A]
+                     |&nbsp;[#x0E47-#x0E4E]
+                     |&nbsp;#x0EB1
+                     |&nbsp;[#x0EB4-#x0EB9]
+                     |&nbsp;[#x0EBB-#x0EBC]
+                     |&nbsp;[#x0EC8-#x0ECD]
+                     |&nbsp;[#x0F18-#x0F19]
+                     |&nbsp;#x0F35
+                     |&nbsp;#x0F37
+                     |&nbsp;#x0F39
+                     |&nbsp;#x0F3E
+                     |&nbsp;#x0F3F
+                     |&nbsp;[#x0F71-#x0F84]
+                     |&nbsp;[#x0F86-#x0F8B]
+                     |&nbsp;[#x0F90-#x0F95]
+                     |&nbsp;#x0F97
+                     |&nbsp;[#x0F99-#x0FAD]
+                     |&nbsp;[#x0FB1-#x0FB7]
+                     |&nbsp;#x0FB9
+                     |&nbsp;[#x20D0-#x20DC]
+                     |&nbsp;#x20E1
+                     |&nbsp;[#x302A-#x302F]
+                     |&nbsp;#x3099
+                     |&nbsp;#x309A
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Digit"></a>[88]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Digit</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>[#x0030-#x0039]
+                     |&nbsp;[#x0660-#x0669]
+                     |&nbsp;[#x06F0-#x06F9]
+                     |&nbsp;[#x0966-#x096F]
+                     |&nbsp;[#x09E6-#x09EF]
+                     |&nbsp;[#x0A66-#x0A6F]
+                     |&nbsp;[#x0AE6-#x0AEF]
+                     |&nbsp;[#x0B66-#x0B6F]
+                     |&nbsp;[#x0BE7-#x0BEF]
+                     |&nbsp;[#x0C66-#x0C6F]
+                     |&nbsp;[#x0CE6-#x0CEF]
+                     |&nbsp;[#x0D66-#x0D6F]
+                     |&nbsp;[#x0E50-#x0E59]
+                     |&nbsp;[#x0ED0-#x0ED9]
+                     |&nbsp;[#x0F20-#x0F29]
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               <tr valign="baseline">
+                  <td><a name="NT-Extender"></a>[89]&nbsp;&nbsp;&nbsp;
+                  </td>
+                  <td>Extender</td>
+                  <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+                  <td>#x00B7
+                     |&nbsp;#x02D0
+                     |&nbsp;#x02D1
+                     |&nbsp;#x0387
+                     |&nbsp;#x0640
+                     |&nbsp;#x0E46
+                     |&nbsp;#x0EC6
+                     |&nbsp;#x3005
+                     |&nbsp;[#x3031-#x3035]
+                     |&nbsp;[#x309D-#x309E]
+                     |&nbsp;[#x30FC-#x30FE]
+                     
+                  </td>
+                  <td></td>
+               </tr>
+               
+               
+            </tbody>
+         </table>
+         
+      </p>
+      
+      <p>The character classes defined here can be derived from the
+         Unicode character database as follows:
+         
+         <ul>
+            
+            <li>
+               
+               <p>Name start characters must have one of the categories Ll, Lu,
+                  Lo, Lt, Nl.
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>Name characters other than Name-start characters 
+                  must have one of the categories Mc, Me, Mn, Lm, or Nd.
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>Characters in the compatibility area (i.e. with character code
+                  greater than #xF900 and less than #xFFFE) are not allowed in XML
+                  names.
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>Characters which have a font or compatibility decomposition (i.e. those
+                  with a "compatibility formatting tag" in field 5 of the database --
+                  marked by field 5 beginning with a "&lt;") are not allowed.
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>The following characters are treated as name-start characters
+                  rather than name characters, because the property file classifies
+                  them as Alphabetic:  [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>Characters #x20DD-#x20E0 are excluded (in accordance with 
+                  Unicode, section 5.14).
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>Character #x00B7 is classified as an extender, because the
+                  property list so identifies it.
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>Character #x0387 is added as a name character, because #x00B7
+                  is its canonical equivalent.
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>Characters ':' and '_' are allowed as name-start characters.</p>
+               
+            </li>
+            
+            <li>
+               
+               <p>Characters '-' and '.' are allowed as name characters.</p>
+               
+            </li>
+            
+         </ul>
+         
+      </p>
+      
+      
+      
+      <h2><a name="sec-xml-and-sgml"></a>C XML and SGML (Non-Normative)
+      </h2>
+      
+      
+      <p>XML is designed to be a subset of SGML, in that every
+         <a href="#dt-valid">valid</a> XML document should also be a
+         conformant SGML document.
+         For a detailed comparison of the additional restrictions that XML places on
+         documents beyond those of SGML, see <a href="#Clark">[Clark]</a>.
+         
+      </p>
+      
+      
+      
+      <h2><a name="sec-entexpand"></a>D Expansion of Entity and Character References (Non-Normative)
+      </h2>
+      
+      <p>This appendix contains some examples illustrating the
+         sequence of entity- and character-reference recognition and
+         expansion, as specified in <a href="#entproc">[<b>4.4 XML Processor Treatment of Entities and References</b>]
+         </a>.
+      </p>
+      
+      <p>
+         If the DTD contains the declaration 
+         <pre>&lt;!ENTITY example "&lt;p>An ampersand (&amp;#38;#38;) may be escaped
+numerically (&amp;#38;#38;#38;) or with a general entity
+(&amp;amp;amp;).&lt;/p>" >
+</pre>
+         then the XML processor will recognize the character references 
+         when it parses the entity declaration, and resolve them before 
+         storing the following string as the
+         value of the entity "<code>example</code>":
+         <pre>&lt;p>An ampersand (&amp;#38;) may be escaped
+numerically (&amp;#38;#38;) or with a general entity
+(&amp;amp;amp;).&lt;/p>
+</pre>
+         A reference in the document to "<code>&amp;example;</code>" 
+         will cause the text to be reparsed, at which time the 
+         start- and end-tags of the "<code>p</code>" element will be recognized 
+         and the three references will be recognized and expanded, 
+         resulting in a "<code>p</code>" element with the following content
+         (all data, no delimiters or markup):
+         <pre>An ampersand (&amp;) may be escaped
+numerically (&amp;#38;) or with a general entity
+(&amp;amp;).
+</pre>
+         </p>
+      
+      <p>A more complex example will illustrate the rules and their
+         effects fully.  In the following example, the line numbers are
+         solely for reference.
+         <pre>1 &lt;?xml version='1.0'?>
+2 &lt;!DOCTYPE test [
+3 &lt;!ELEMENT test (#PCDATA) >
+4 &lt;!ENTITY % xx '&amp;#37;zz;'>
+5 &lt;!ENTITY % zz '&amp;#60;!ENTITY tricky "error-prone" >' >
+6 %xx;
+7 ]>
+8 &lt;test>This sample shows a &amp;tricky; method.&lt;/test>
+</pre>
+         This produces the following:
+         <ul>
+            
+            <li>
+               <p>in line 4, the reference to character 37 is expanded immediately,
+                  and the parameter entity "<code>xx</code>" is stored in the symbol
+                  table with the value "<code>%zz;</code>".  Since the replacement text
+                  is not rescanned, the reference to parameter entity "<code>zz</code>"
+                  is not recognized.  (And it would be an error if it were, since
+                  "<code>zz</code>" is not yet declared.)
+               </p>
+            </li>
+            
+            <li>
+               <p>in line 5, the character reference "<code>&amp;#60;</code>" is
+                  expanded immediately and the parameter entity "<code>zz</code>" is
+                  stored with the replacement text 
+                  "<code>&lt;!ENTITY tricky "error-prone" ></code>",
+                  which is a well-formed entity declaration.
+               </p>
+            </li>
+            
+            <li>
+               <p>in line 6, the reference to "<code>xx</code>" is recognized,
+                  and the replacement text of "<code>xx</code>" (namely 
+                  "<code>%zz;</code>") is parsed.  The reference to "<code>zz</code>"
+                  is recognized in its turn, and its replacement text 
+                  ("<code>&lt;!ENTITY tricky "error-prone" ></code>") is parsed.
+                  The general entity "<code>tricky</code>" has now been
+                  declared, with the replacement text "<code>error-prone</code>".
+               </p>
+            </li>
+            
+            <li>
+               <p>
+                  in line 8, the reference to the general entity "<code>tricky</code>" is
+                  recognized, and it is expanded, so the full content of the
+                  "<code>test</code>" element is the self-describing (and ungrammatical) string
+                  <i>This sample shows a error-prone method.</i>
+                  
+               </p>
+            </li>
+            
+         </ul>
+         
+      </p>
+       
+      
+      
+      <h2><a name="determinism"></a>E Deterministic Content Models (Non-Normative)
+      </h2>
+      
+      <p><a href="#dt-compat">For compatibility</a>, it is
+         required
+         that content models in element type declarations be deterministic.  
+         
+      </p>
+      
+      
+      <p>SGML
+         requires deterministic content models (it calls them
+         "unambiguous"); XML processors built using SGML systems may
+         flag non-deterministic content models as errors.
+      </p>
+      
+      <p>For example, the content model <code>((b, c) | (b, d))</code> is
+         non-deterministic, because given an initial <code>b</code> the parser
+         cannot know which <code>b</code> in the model is being matched without
+         looking ahead to see which element follows the <code>b</code>.
+         In this case, the two references to
+         <code>b</code> can be collapsed 
+         into a single reference, making the model read
+         <code>(b, (c | d))</code>.  An initial <code>b</code> now clearly
+         matches only a single name in the content model.  The parser doesn't
+         need to look ahead to see what follows; either <code>c</code> or
+         <code>d</code> would be accepted.
+      </p>
+      
+      <p>More formally:  a finite state automaton may be constructed from the
+         content model using the standard algorithms, e.g. algorithm 3.5 
+         in section 3.9
+         of Aho, Sethi, and Ullman <a href="#Aho">[Aho/Ullman]</a>.
+         In many such algorithms, a follow set is constructed for each 
+         position in the regular expression (i.e., each leaf 
+         node in the 
+         syntax tree for the regular expression);
+         if any position has a follow set in which 
+         more than one following position is 
+         labeled with the same element type name, 
+         then the content model is in error
+         and may be reported as an error.
+         
+      </p>
+      
+      <p>Algorithms exist which allow many but not all non-deterministic
+         content models to be reduced automatically to equivalent deterministic
+         models; see Br&uuml;ggemann-Klein 1991 <a href="#ABK">[Br&uuml;ggemann-Klein]</a>.
+      </p>
+      
+      
+      
+      <h2><a name="sec-guessing"></a>F Autodetection of Character Encodings (Non-Normative)
+      </h2>
+      
+      <p>The XML encoding declaration functions as an internal label on each
+         entity, indicating which character encoding is in use.  Before an XML
+         processor can read the internal label, however, it apparently has to
+         know what character encoding is in use--which is what the internal label
+         is trying to indicate.  In the general case, this is a hopeless
+         situation. It is not entirely hopeless in XML, however, because XML
+         limits the general case in two ways:  each implementation is assumed
+         to support only a  finite set of character encodings, and the XML
+         encoding declaration is restricted in position and content in order to
+         make it feasible to autodetect the character encoding in use in each
+         entity in normal cases.  Also, in many cases other sources of information
+         are available in addition to the XML data stream itself.  
+         Two cases may be distinguished, 
+         depending on whether the XML entity is presented to the
+         processor without, or with, any accompanying
+         (external) information.  We consider the first case first.
+         
+      </p>
+      
+      <p>
+         Because each XML entity not in UTF-8 or UTF-16 format <i>must</i>
+         begin with an XML encoding declaration, in which the first  characters
+         must be '<code>&lt;?xml</code>', any conforming processor can detect,
+         after two to four octets of input, which of the following cases apply. 
+         In reading this list, it may help to know that in UCS-4, '&lt;' is
+         "<code>#x0000003C</code>" and '?' is "<code>#x0000003F</code>", and the Byte
+         Order Mark required of UTF-16 data streams is "<code>#xFEFF</code>".
+      </p>
+      
+      <p>
+         
+         <ul>
+            
+            <li>
+               
+               <p><code>00 00 00 3C</code>: UCS-4, big-endian machine (1234 order)
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>3C 00 00 00</code>: UCS-4, little-endian machine (4321 order)
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>00 00 3C 00</code>: UCS-4, unusual octet order (2143)
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>00 3C 00 00</code>: UCS-4, unusual octet order (3412)
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>FE FF</code>: UTF-16, big-endian
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>FF FE</code>: UTF-16, little-endian
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>00 3C 00 3F</code>: UTF-16, big-endian, no Byte Order Mark
+                  (and thus, strictly speaking, in error)
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>3C 00 3F 00</code>: UTF-16, little-endian, no Byte Order Mark
+                  (and thus, strictly speaking, in error)
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>3C 3F 78 6D</code>: UTF-8, ISO 646, ASCII, some part of ISO 8859, 
+                  Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding
+                  which ensures that the characters of ASCII have their normal positions,
+                  width,
+                  and values; the actual encoding declaration must be read to 
+                  detect which of these applies, but since all of these encodings
+                  use the same bit patterns for the ASCII characters, the encoding 
+                  declaration itself may be read reliably
+                  
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p><code>4C 6F A7 94</code>: EBCDIC (in some flavor; the full
+                  encoding declaration must be read to tell which code page is in 
+                  use)
+               </p>
+               
+            </li>
+            
+            <li>
+               
+               <p>other: UTF-8 without an encoding declaration, or else 
+                  the data stream is corrupt, fragmentary, or enclosed in
+                  a wrapper of some kind
+               </p>
+               
+            </li>
+            
+         </ul>
+         
+      </p>
+      
+      <p>
+         This level of autodetection is enough to read the XML encoding
+         declaration and parse the character-encoding identifier, which is
+         still necessary to distinguish the individual members of each family
+         of encodings (e.g. to tell  UTF-8 from 8859, and the parts of 8859
+         from each other, or to distinguish the specific EBCDIC code page in
+         use, and so on).
+         
+      </p>
+      
+      <p>
+         Because the contents of the encoding declaration are restricted to
+         ASCII characters, a processor can reliably read the entire encoding
+         declaration as soon as it has detected which family of encodings is in
+         use.  Since in practice, all widely used character encodings fall into
+         one of the categories above, the XML encoding declaration allows
+         reasonably reliable in-band labeling of character encodings, even when
+         external sources of information at the operating-system or
+         transport-protocol level are unreliable.
+         
+      </p>
+      
+      <p>
+         Once the processor has detected the character encoding in use, it can
+         act appropriately, whether by invoking a separate input routine for
+         each case, or by calling the proper conversion function on each
+         character of input. 
+         
+      </p>
+      
+      <p>
+         Like any self-labeling system, the XML encoding declaration will not
+         work if any software changes the entity's character set or encoding
+         without updating the encoding declaration.  Implementors of
+         character-encoding routines should be careful to ensure the accuracy
+         of the internal and external information used to label the entity.
+         
+      </p>
+      
+      <p>The second possible case occurs when the XML entity is accompanied
+         by encoding information, as in some file systems and some network
+         protocols.
+         When multiple sources of information are available,
+         
+         their relative
+         priority and the preferred method of handling conflict should be
+         specified as part of the higher-level protocol used to deliver XML.
+         Rules for the relative priority of the internal label and the
+         MIME-type label in an external header, for example, should be part of the
+         RFC document defining the text/xml and application/xml MIME types. In
+         the interests of interoperability, however, the following rules
+         are recommended.
+         
+         <ul>
+            
+            <li>
+               <p>If an XML entity is in a file, the Byte-Order Mark
+                  and encoding-declaration PI are used (if present) to determine the
+                  character encoding.  All other heuristics and sources of information
+                  are solely for error recovery.
+                  
+               </p>
+            </li>
+            
+            <li>
+               <p>If an XML entity is delivered with a
+                  MIME type of text/xml, then the <code>charset</code> parameter
+                  on the MIME type determines the
+                  character encoding method; all other heuristics and sources of
+                  information are solely for error recovery.
+                  
+               </p>
+            </li>
+            
+            <li>
+               <p>If an XML entity is delivered 
+                  with a
+                  MIME type of application/xml, then the Byte-Order Mark and
+                  encoding-declaration PI are used (if present) to determine the
+                  character encoding.  All other heuristics and sources of
+                  information are solely for error recovery.
+                  
+               </p>
+            </li>
+            
+         </ul>
+         These rules apply only in the absence of protocol-level documentation;
+         in particular, when the MIME types text/xml and application/xml are
+         defined, the recommendations of the relevant RFC will supersede
+         these rules.
+         
+      </p>
+      
+      
+      
+      
+      
+      <h2><a name="sec-xml-wg"></a>G W3C XML Working Group (Non-Normative)
+      </h2>
+      
+      
+      <p>This specification was prepared and approved for publication by the
+         W3C XML Working Group (WG).  WG approval of this specification does
+         not necessarily imply that all WG members voted for its approval.  
+         The current and former members of the XML WG are:
+      </p>
+      
+      Jon Bosak, Sun (Chair); James Clark (Technical Lead); Tim Bray, Textuality and Netscape (XML Co-editor); Jean Paoli, Microsoft (XML Co-editor); C. M. Sperberg-McQueen, U. of Ill. (XML
+      Co-editor); Dan Connolly, W3C (W3C Liaison); Paula Angerstein, Texcel; Steve DeRose, INSO; Dave Hollander, HP; Eliot Kimber, ISOGEN; Eve Maler, ArborText; Tom Magliery, NCSA; Murray Maloney, Muzmo and Grif; Makoto Murata, Fuji Xerox Information Systems; Joel Nava, Adobe; Conleth O'Connell, Vignette; Peter Sharpe, SoftQuad; John Tigue, DataChannel
+      
+      
+      
+      
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk055.out b/test/tests/contrib-gold/xsltc/mk/mk055.out
new file mode 100644
index 0000000..ca545cf
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk055.out
@@ -0,0 +1,3972 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <title>XML Path Language (XPath)</title>
+      <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC"><style type="text/css">code { font-family: monospace }</style></head>
+   <body>
+      
+      <div class="head"><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/WWW/w3c_home" alt="W3C" height="48" width="72"></a><h1>XML Path Language (XPath)<br>Version 1.0
+         </h1>
+         <h2>W3C Recommendation 16 November 1999</h2>
+         <dl>
+            <dt>This version:</dt>
+            <dd>
+               <a href="http://www.w3.org/TR/1999/REC-xpath-19991116">http://www.w3.org/TR/1999/REC-xpath-19991116</a><br>
+               (available in <a href="http://www.w3.org/TR/1999/REC-xpath-19991116.xml">XML</a> or 
+               <a href="http://www.w3.org/TR/1999/REC-xpath-19991116.html">HTML</a>)
+               
+               
+            </dd>
+            <dt>Latest version:</dt>
+            <dd>
+               <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a><br>
+               
+            </dd>
+            <dt>Previous versions:</dt>
+            <dd>
+               <a href="http://www.w3.org/TR/1999/PR-xpath-19991008">http://www.w3.org/TR/1999/PR-xpath-19991008</a><br>
+               <a href="http://www.w3.org/1999/08/WD-xpath-19990813">http://www.w3.org/1999/08/WD-xpath-19990813</a><br>
+               <a href="http://www.w3.org/1999/07/WD-xpath-19990709">http://www.w3.org/1999/07/WD-xpath-19990709</a><br>
+               <a href="http://www.w3.org/TR/1999/WD-xslt-19990421">http://www.w3.org/TR/1999/WD-xslt-19990421</a><br>
+               
+            </dd>
+            <dt>Editors:</dt>
+            <dd>
+               
+               James Clark
+               <a href="mailto:jjc@jclark.com">&lt;jjc@jclark.com></a>
+               <br>
+               
+               Steve DeRose
+                (Inso Corp. and Brown University) 
+               <a href="mailto:Steven_DeRose@Brown.edu">&lt;Steven_DeRose@Brown.edu></a>
+               <br>
+               
+            </dd>
+         </dl>
+         <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright">
+               		Copyright
+            </a> &nbsp;&copy;&nbsp; 1999 <a href="http://www.w3.org">W3C</a>
+            		(<a href="http://www.lcs.mit.edu">MIT</a>,
+            		<a href="http://www.inria.fr/">INRIA</a>,
+            		<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C
+            		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Legal_Disclaimer">liability</a>,
+            		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#W3C_Trademarks">trademark</a>,
+            		<a href="http://www.w3.org/Consortium/Legal/copyright-documents.html">document use</a> and
+            		<a href="http://www.w3.org/Consortium/Legal/copyright-software.html">software licensing</a> rules apply.
+            	
+         </p>
+         <hr title="Separator for header">
+      </div>
+      <h2><a name="abstract">Abstract</a></h2>
+      <p>XPath is a language for addressing parts of an XML
+         document, designed to be used by both XSLT and
+         XPointer.
+      </p>
+      <h2><a name="status">Status of this document</a></h2>
+      
+      
+      <p>This document has been reviewed by W3C Members and other interested
+         parties and has been endorsed by the Director as a W3C <a href="http://www.w3.org/Consortium/Process/#RecsW3C">Recommendation</a>. It
+         is a stable document and may be used as reference material or cited as
+         a normative reference from other documents. W3C's role in making the
+         Recommendation is to draw attention to the specification and to
+         promote its widespread deployment. This enhances the functionality and
+         interoperability of the Web.
+      </p>
+      
+      
+      <p>The list of known errors in this specification is available at
+         <a href="http://www.w3.org/1999/11/REC-xpath-19991116-errata">http://www.w3.org/1999/11/REC-xpath-19991116-errata</a>.
+      </p>
+      
+      
+      <p>Comments on this specification may be sent to <a href="mailto:www-xpath-comments@w3.org">www-xpath-comments@w3.org</a>; <a href="http://lists.w3.org/Archives/Public/www-xpath-comments">archives</a>
+         of the comments are available.
+      </p>
+      
+      
+      <p>The English version of this specification is the only normative
+         version. However, for translations of this document, see <a href="http://www.w3.org/Style/XSL/translations.html">http://www.w3.org/Style/XSL/translations.html</a>.
+      </p>
+      
+      
+      <p>A list of current W3C Recommendations and other technical documents
+         can be found at <a href="http://www.w3.org/TR">http://www.w3.org/TR</a>.
+      </p>
+      
+      
+      <p>This specification is joint work of the XSL Working Group and the
+         XML Linking Working Group and so is part of the <a href="http://www.w3.org/Style/Activity">W3C Style activity</a> and
+         of the <a href="http://www.w3.org/XML/Activity">W3C XML
+            activity
+         </a>.
+      </p>
+      
+      
+      
+      <h2><a name="contents">Table of contents</a></h2>1 <a href="#section-Introduction">Introduction</a><br>2 <a href="#location-paths">Location Paths</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.1 <a href="#section-Location-Steps">Location Steps</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.2 <a href="#axes">Axes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.3 <a href="#node-tests">Node Tests</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.4 <a href="#predicates">Predicates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.5 <a href="#path-abbrev">Abbreviated Syntax</a><br>3 <a href="#section-Expressions">Expressions</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.1 <a href="#section-Basics">Basics</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.2 <a href="#section-Function-Calls">Function Calls</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.3 <a href="#node-sets">Node-sets</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.4 <a href="#booleans">Booleans</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.5 <a href="#numbers">Numbers</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.6 <a href="#strings">Strings</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.7 <a href="#exprlex">Lexical Structure</a><br>4 <a href="#corelib">Core Function Library</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.1 <a href="#section-Node-Set-Functions">Node Set Functions</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.2 <a href="#section-String-Functions">String Functions</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.3 <a href="#section-Boolean-Functions">Boolean Functions</a><br>&nbsp;&nbsp;&nbsp;&nbsp;4.4 <a href="#section-Number-Functions">Number Functions</a><br>5 <a href="#data-model">Data Model</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.1 <a href="#root-node">Root Node</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.2 <a href="#element-nodes">Element Nodes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.2.1 <a href="#unique-id">Unique IDs</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.3 <a href="#attribute-nodes">Attribute Nodes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.4 <a href="#namespace-nodes">Namespace Nodes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.5 <a href="#section-Processing-Instruction-Nodes">Processing Instruction Nodes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.6 <a href="#section-Comment-Nodes">Comment Nodes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.7 <a href="#section-Text-Nodes">Text Nodes</a><br>6 <a href="#section-Conformance">Conformance</a><br><h3>Appendices</h3>A <a href="#section-References">References</a><br>&nbsp;&nbsp;&nbsp;&nbsp;A.1 <a href="#section-Normative-References">Normative References</a><br>&nbsp;&nbsp;&nbsp;&nbsp;A.2 <a href="#section-Other-References">Other References</a><br>B <a href="#infoset">XML Information Set Mapping</a> (Non-Normative)<br><hr>
+      
+      
+      
+      <h2><a name="section-Introduction"></a>1 Introduction
+      </h2>
+      
+      
+      <p>XPath is the result of an effort to provide a common syntax and
+         semantics for functionality shared between XSL Transformations <a href="#XSLT">[XSLT]</a> and XPointer <a href="#XPTR">[XPointer]</a>.  The primary purpose
+         of XPath is to address parts of an XML <a href="#XML">[XML]</a> document.
+         In support of this primary purpose, it also provides basic facilities
+         for manipulation of strings, numbers and booleans.  XPath uses a
+         compact, non-XML syntax to facilitate use of XPath within URIs and XML
+         attribute values.  XPath operates on the abstract, logical structure
+         of an XML document, rather than its surface syntax.  XPath gets its
+         name from its use of a path notation as in URLs for navigating through
+         the hierarchical structure of an XML document.
+      </p>
+      
+      
+      <p>In addition to its use for addressing, XPath is also designed so
+         that it has a natural subset that can be used for matching (testing
+         whether or not a node matches a pattern); this use of XPath is
+         described in <a href="http://www.w3.org/TR/WD-xslt#patterns">XSLT</a>.
+      </p>
+      
+      
+      <p>XPath models an XML document as a tree of nodes.  There are
+         different types of nodes, including element nodes, attribute nodes and
+         text nodes.  XPath defines a way to compute a <a href="#dt-string-value">string-value</a> for each type of node.
+         Some types of nodes also have names.  XPath fully supports XML
+         Namespaces <a href="#XMLNAMES">[XML Names]</a>.  Thus, the name of a node is
+         modeled as a pair consisting of a local part and a possibly null
+         namespace URI; this is called an <a href="#dt-expanded-name">expanded-name</a>.  The data model is
+         described in detail in <a href="#data-model">[<b>5 Data Model</b>]
+         </a>.
+      </p>
+      
+      
+      <p>The primary syntactic construct in XPath is the expression.  An
+         expression matches the production <a href="#NT-Expr">Expr</a>.  An
+         expression is evaluated to yield an object, which has one of the
+         following four basic types:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>node-set (an unordered collection of nodes without duplicates)</li>
+         
+         
+         <li>boolean (true or false)</li>
+         
+         
+         <li>number (a floating-point number)</li>
+         
+         
+         <li>string (a sequence of UCS characters)</li>
+         
+         
+      </ul>
+      
+      
+      <p>Expression evaluation occurs with respect to a context.  XSLT and
+         XPointer specify how the context is determined for XPath expressions
+         used in XSLT and XPointer respectively.  The context consists of:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>a node (<a name="dt-context-node"></a>the
+            <b>context node</b>)
+         </li>
+         
+         
+         <li>a pair of non-zero positive integers (<a name="dt-context-position"></a>the <b>context
+               position
+            </b> and <a name="dt-context-size"></a>the <b>context size</b>)
+         </li>
+         
+         
+         <li>a set of variable bindings</li>
+         
+         
+         <li>a function library</li>
+         
+         
+         <li>the set of namespace declarations in scope for the
+            expression
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p>The context position is always less than or equal to the
+         context size.
+      </p>
+      
+      
+      <p>The variable bindings consist of a mapping from variable names to
+         variable values.  The value of a variable is an object, which can be of
+         any of the types that are possible for the value of an expression,
+         and may also be of additional types not specified here.
+      </p>
+      
+      
+      <p>The function library consists of a mapping from function names to
+         functions.  Each function takes zero or more arguments and returns a
+         single result.  This document defines a core function library that all
+         XPath implementations must support (see <a href="#corelib">[<b>4 Core Function Library</b>]
+         </a>).
+         For a function in the core function library, arguments and result are
+         of the four basic types.  Both XSLT and XPointer extend XPath by
+         defining additional functions; some of these functions operate on the
+         four basic types; others operate on additional data types defined by
+         XSLT and XPointer.
+      </p>
+      
+      
+      <p>The namespace declarations consist of a mapping from prefixes to
+         namespace URIs.
+      </p>
+      
+      
+      <p>The variable bindings, function library and namespace declarations
+         used to evaluate a subexpression are always the same as those used to
+         evaluate the containing expression.  The context node, context
+         position, and context size used to evaluate a subexpression are
+         sometimes different from those used to evaluate the containing
+         expression. Several kinds of expressions change the context node; only
+         predicates change the context position and context size (see <a href="#predicates">[<b>2.4 Predicates</b>]
+         </a>).  When the evaluation of a kind of expression is
+         described, it will always be explicitly stated if the context node,
+         context position, and context size change for the evaluation of
+         subexpressions; if nothing is said about the context node, context
+         position, and context size, they remain unchanged for the
+         evaluation of subexpressions of that kind of expression.
+      </p>
+      
+      
+      <p>XPath expressions often occur in XML attributes.  The grammar
+         specified in this section applies to the attribute value after XML 1.0
+         normalization.  So, for example, if the grammar uses the character
+         <code>&lt;</code>, this must not appear in the XML source as
+         <code>&lt;</code> but must be quoted according to XML 1.0 rules by,
+         for example, entering it as <code>&amp;lt;</code>. Within expressions,
+         literal strings are delimited by single or double quotation marks,
+         which are also used to delimit XML attributes. To avoid a quotation
+         mark in an expression being interpreted by the XML processor as
+         terminating the attribute value the quotation mark can be entered as a
+         character reference (<code>&amp;quot;</code> or
+         <code>&amp;apos;</code>).  Alternatively, the expression can use single
+         quotation marks if the XML attribute is delimited with double
+         quotation marks or vice-versa.
+      </p>
+      
+      
+      <p>One important kind of expression is a location path.  A location
+         path selects a set of nodes relative to the context node.  The result
+         of evaluating an expression that is a location path is the node-set
+         containing the nodes selected by the location path.  Location paths
+         can recursively contain expressions that are used to filter sets of
+         nodes.  A location path matches the production <a href="#NT-LocationPath">LocationPath</a>.
+      </p>
+      
+      
+      <p>In the following grammar, the non-terminals <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> and <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a> are defined in <a href="#XMLNAMES">[XML Names]</a>, and <a href="http://www.w3.org/TR/REC-xml#NT-S">S</a> is defined in
+         <a href="#XML">[XML]</a>.  The grammar uses the same EBNF notation as
+         <a href="#XML">[XML]</a> (except that grammar symbols always have initial
+         capital letters).
+      </p>
+      
+      
+      <p>Expressions are parsed by first dividing the character string to be
+         parsed into tokens and then parsing the resulting sequence of tokens.
+         Whitespace can be freely used between tokens.  The tokenization
+         process is described in <a href="#exprlex">[<b>3.7 Lexical Structure</b>]
+         </a>.
+      </p>
+      
+      
+      
+      
+      
+      <h2><a name="location-paths"></a>2 Location Paths
+      </h2>
+      
+      
+      <p>Although location paths are not the most general grammatical
+         construct in the language (a <a href="#NT-LocationPath">LocationPath</a> is a special case of an <a href="#NT-Expr">Expr</a>), they are the most important construct and
+         will therefore be described first.
+      </p>
+      
+      
+      <p>Every location path can be expressed using a straightforward but
+         rather verbose syntax.  There are also a number of syntactic
+         abbreviations that allow common cases to be expressed concisely.  This
+         section will explain the semantics of location paths using the
+         unabbreviated syntax.  The abbreviated syntax will then be explained
+         by showing how it expands into the unabbreviated syntax (see <a href="#path-abbrev">[<b>2.5 Abbreviated Syntax</b>]
+         </a>).
+      </p>
+      
+      
+      <p>Here are some examples of location paths using the unabbreviated
+         syntax:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p><code>child::para</code> selects the
+               <code>para</code> element children of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::*</code> selects all element
+               children of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::text()</code> selects all text
+               node children of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::node()</code> selects all the
+               children of the context node, whatever their node type
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>attribute::name</code> selects the
+               <code>name</code> attribute of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>attribute::*</code> selects all the
+               attributes of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>descendant::para</code> selects the
+               <code>para</code> element descendants of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>ancestor::div</code> selects all <code>div</code>
+               ancestors of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>ancestor-or-self::div</code> selects the
+               <code>div</code> ancestors of the context node and, if the context node is a
+               <code>div</code> element, the context node as well
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>descendant-or-self::para</code> selects the
+               <code>para</code> element descendants of the context node and, if the context node is
+               a <code>para</code> element, the context node as well
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>self::para</code> selects the context node if it is a
+               <code>para</code> element, and otherwise selects nothing
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::chapter/descendant::para</code>
+               selects the <code>para</code> element descendants of the
+               <code>chapter</code> element children of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::*/child::para</code> selects
+               all <code>para</code> grandchildren of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>/</code> selects the document root (which is
+               always the parent of the document element)
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>/descendant::para</code> selects all the
+               <code>para</code> elements in the same document as the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>/descendant::olist/child::item</code> selects all the
+               <code>item</code> elements that have an <code>olist</code> parent and
+               that are in the same document as the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::para[position()=1]</code> selects the first
+               <code>para</code> child of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::para[position()=last()]</code> selects the last
+               <code>para</code> child of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::para[position()=last()-1]</code> selects
+               the last but one <code>para</code> child of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::para[position()>1]</code> selects all
+               the <code>para</code> children of the context node other than the
+               first <code>para</code> child of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>following-sibling::chapter[position()=1]</code>
+               selects the next <code>chapter</code> sibling of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>preceding-sibling::chapter[position()=1]</code>
+               selects the previous <code>chapter</code> sibling of the context
+               node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>/descendant::figure[position()=42]</code> selects
+               the forty-second <code>figure</code> element in the
+               document
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>/child::doc/child::chapter[position()=5]/child::section[position()=2]</code>
+               selects the second <code>section</code> of the fifth
+               <code>chapter</code> of the <code>doc</code> document
+               element
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::para[attribute::type="warning"]</code>
+               selects all <code>para</code> children of the context node that have a
+               <code>type</code> attribute with value <code>warning</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::para[attribute::type='warning'][position()=5]</code>
+               selects the fifth <code>para</code> child of the context node that has
+               a <code>type</code> attribute with value
+               <code>warning</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::para[position()=5][attribute::type="warning"]</code>
+               selects the fifth <code>para</code> child of the context node if that
+               child has a <code>type</code> attribute with value
+               <code>warning</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::chapter[child::title='Introduction']</code>
+               selects the <code>chapter</code> children of the context node that
+               have one or more <code>title</code> children with <a href="#dt-string-value">string-value</a> equal to
+               <code>Introduction</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::chapter[child::title]</code> selects the
+               <code>chapter</code> children of the context node that have one or
+               more <code>title</code> children
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::*[self::chapter or self::appendix]</code>
+               selects the <code>chapter</code> and <code>appendix</code> children of
+               the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>child::*[self::chapter or
+                  self::appendix][position()=last()]
+               </code> selects the last
+               <code>chapter</code> or <code>appendix</code> child of the context
+               node
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p>There are two kinds of location path: relative location paths
+         and absolute location paths.
+      </p>
+      
+      
+      <p>A relative location path consists of a sequence of one or more
+         location steps separated by <code>/</code>.  The steps in a relative
+         location path are composed together from left to right.  Each step in
+         turn selects a set of nodes relative to a context node. An initial
+         sequence of steps is composed together with a following step as
+         follows.  The initial sequence of steps selects a set of nodes
+         relative to a context node.  Each node in that set is used as a
+         context node for the following step.  The sets of nodes identified by
+         that step are unioned together.  The set of nodes identified by
+         the composition of the steps is this union. For example,
+         <code>child::div/child::para</code> selects the
+         <code>para</code> element children of the <code>div</code> element
+         children of the context node, or, in other words, the
+         <code>para</code> element grandchildren that have <code>div</code>
+         parents.
+      </p>
+      
+      
+      <p>An absolute location path consists of <code>/</code> optionally
+         followed by a relative location path.  A <code>/</code> by itself
+         selects the root node of the document containing the context node.  If
+         it is followed by a relative location path, then the location path
+         selects the set of nodes that would be selected by the relative
+         location path relative to the root node of the document containing the
+         context node.
+      </p>
+      
+      
+      <h5>Location Paths</h5>
+      <table class="scrap">
+         <tbody>
+            
+            <tr valign="baseline">
+               <td><a name="NT-LocationPath"></a>[1]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>LocationPath</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-RelativeLocationPath">RelativeLocationPath</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AbsoluteLocationPath">AbsoluteLocationPath</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-AbsoluteLocationPath"></a>[2]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AbsoluteLocationPath</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'/' <a href="#NT-RelativeLocationPath">RelativeLocationPath</a>?
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AbbreviatedAbsoluteLocationPath">AbbreviatedAbsoluteLocationPath</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-RelativeLocationPath"></a>[3]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>RelativeLocationPath</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-Step">Step</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-RelativeLocationPath">RelativeLocationPath</a> '/' <a href="#NT-Step">Step</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AbbreviatedRelativeLocationPath">AbbreviatedRelativeLocationPath</a></td>
+               <td></td>
+            </tr>
+            
+         </tbody>
+      </table>
+      
+      
+      
+      <h3><a name="section-Location-Steps"></a>2.1 Location Steps
+      </h3>
+      
+      
+      <p>A location step has three parts:</p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>an axis, which specifies the tree relationship between the
+               nodes selected by the location step and the context node,
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>a node test, which specifies the node type and <a href="#dt-expanded-name">expanded-name</a> of the nodes selected
+               by the location step, and
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>zero or more predicates, which use arbitrary expressions to
+               further refine the set of nodes selected by the location
+               step.
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p>The syntax for a location step is the axis name and node test
+         separated by a double colon, followed by zero or more expressions each
+         in square brackets. For example, in
+         <code>child::para[position()=1]</code>, <code>child</code> is the name
+         of the axis, <code>para</code> is the node test and
+         <code>[position()=1]</code> is a predicate.
+      </p>
+      
+      
+      <p>The node-set selected by the location step is the node-set that
+         results from generating an initial node-set from the axis and
+         node-test, and then filtering that node-set by each of the predicates
+         in turn.
+      </p>
+      
+      
+      <p>The initial node-set consists of the nodes having the relationship
+         to the context node specified by the axis, and having the node type
+         and <a href="#dt-expanded-name">expanded-name</a> specified
+         by the node test.  For example, a location step
+         <code>descendant::para</code> selects the <code>para</code> element
+         descendants of the context node: <code>descendant</code> specifies
+         that each node in the initial node-set must be a descendant of the
+         context; <code>para</code> specifies that each node in the initial
+         node-set must be an element named <code>para</code>.  The available
+         axes are described in <a href="#axes">[<b>2.2 Axes</b>]
+         </a>.  The available node tests
+         are described in <a href="#node-tests">[<b>2.3 Node Tests</b>]
+         </a>.  The meaning of some
+         node tests is dependent on the axis.
+      </p>
+      
+      
+      <p>The initial node-set is filtered by the first predicate to generate
+         a new node-set; this new node-set is then filtered using the second
+         predicate, and so on. The final node-set is the node-set selected by
+         the location step. The axis affects how the expression in each
+         predicate is evaluated and so the semantics of a predicate is defined
+         with respect to an axis.  See <a href="#predicates">[<b>2.4 Predicates</b>]
+         </a>.
+      </p>
+      
+      
+      <h5>Location Steps</h5>
+      <table class="scrap">
+         <tbody>
+            
+            <tr valign="baseline">
+               <td><a name="NT-Step"></a>[4]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Step</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-AxisSpecifier">AxisSpecifier</a>
+                  <a href="#NT-NodeTest">NodeTest</a>
+                  <a href="#NT-Predicate">Predicate</a>*
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AbbreviatedStep">AbbreviatedStep</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-AxisSpecifier"></a>[5]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AxisSpecifier</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-AxisName">AxisName</a> '::'
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AbbreviatedAxisSpecifier">AbbreviatedAxisSpecifier</a>
+                  
+               </td>
+               <td></td>
+            </tr>
+            
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      <h3><a name="axes"></a>2.2 Axes
+      </h3>
+      
+      
+      <p>The following axes are available:</p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>the <code>child</code> axis contains the children of the
+               context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>descendant</code> axis contains the descendants of
+               the context node; a descendant is a child or a child of a child and so
+               on; thus the descendant axis never contains attribute or namespace
+               nodes
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>parent</code> axis contains the <a href="#dt-parent">parent</a> of the context node, if there is
+               one
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>ancestor</code> axis contains the ancestors of the
+               context node; the ancestors of the context node consist of the
+               <a href="#dt-parent">parent</a> of context node and the
+               parent's parent and so on; thus, the ancestor axis will always include
+               the root node, unless the context node is the root node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>following-sibling</code> axis contains all the
+               following siblings of the context node; if the
+               context node is an attribute node or namespace node, the
+               <code>following-sibling</code> axis is empty
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>preceding-sibling</code> axis contains all the
+               preceding siblings of the context node; if the context node is an
+               attribute node or namespace node, the <code>preceding-sibling</code>
+               axis is empty
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>following</code> axis contains all nodes in the
+               same document as the context node that are after the context node in
+               document order, excluding any descendants and excluding attribute
+               nodes and namespace nodes
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>preceding</code> axis contains all nodes in the
+               same document as the context node that are before the context node in
+               document order, excluding any ancestors and excluding attribute nodes
+               and namespace nodes
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>attribute</code> axis contains the attributes of
+               the context node; the axis will be empty unless the context node is an
+               element
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>namespace</code> axis contains the namespace nodes
+               of the context node; the axis will be empty unless the context node
+               is an element
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>self</code> axis contains just the context node
+               itself
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>descendant-or-self</code> axis contains the context
+               node and the descendants of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>the <code>ancestor-or-self</code> axis contains the context
+               node and the ancestors of the context node; thus, the ancestor axis
+               will always include the root node
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <blockquote><b>NOTE: </b>The <code>ancestor</code>, <code>descendant</code>,
+         <code>following</code>, <code>preceding</code> and <code>self</code>
+         axes partition a document (ignoring attribute and namespace nodes):
+         they do not overlap and together they contain all the nodes in the
+         document.
+      </blockquote>
+      
+      
+      <h5>Axes</h5>
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-AxisName"></a>[6]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AxisName</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'ancestor'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'ancestor-or-self'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'attribute'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'child'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'descendant'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'descendant-or-self'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'following'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'following-sibling'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'namespace'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'parent'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'preceding'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'preceding-sibling'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'self'</td>
+               <td></td>
+            </tr>
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      <h3><a name="node-tests"></a>2.3 Node Tests
+      </h3>
+      
+      
+      <p><a name="dt-principal-node-type"></a>Every axis has a <b>principal node type</b>.  If an axis
+         can contain elements, then the principal node type is element;
+         otherwise, it is the type of the nodes that the axis can
+         contain. Thus,
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>For the attribute axis, the principal node type is attribute.</li>
+         
+         
+         <li>For the namespace axis, the principal node type is namespace.</li>
+         
+         
+         <li>For other axes, the principal node type is element.</li>
+         
+         
+      </ul>
+      
+      
+      <p>A node test that is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>
+         is true if and only if the type of the node (see <a href="#data-model">[<b>5 Data Model</b>]
+         </a>)
+         is the principal node type and has
+         an <a href="#dt-expanded-name">expanded-name</a> equal to
+         the <a href="#dt-expanded-name">expanded-name</a> specified
+         by the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>.  For example,
+         <code>child::para</code> selects the <code>para</code> element
+         children of the context node; if the context node has no
+         <code>para</code> children, it will select an empty set of nodes.
+         <code>attribute::href</code> selects the <code>href</code> attribute
+         of the context node; if the context node has no <code>href</code>
+         attribute, it will select an empty set of nodes.
+      </p>
+      
+      
+      <p>A <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> in the node test is
+         expanded into an <a href="#dt-expanded-name">expanded-name</a> using the namespace
+         declarations from the expression context.  This is the same way
+         expansion is done for element type names in start and end-tags except
+         that the default namespace declared with <code>xmlns</code> is not
+         used: if the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> does not have
+         a prefix, then the namespace URI is null (this is the same way
+         attribute names are expanded).  It is an error if the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> has a prefix for which there is
+         no namespace declaration in the expression context.
+      </p>
+      
+      
+      <p>A node test <code>*</code> is true for any node of the principal
+         node type.  For example, <code>child::*</code> will select all element
+         children of the context node, and <code>attribute::*</code> will
+         select all attributes of the context node.
+      </p>
+      
+      
+      <p>A node test can have the form <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a><code>:*</code>.  In this
+         case, the prefix is expanded in the same way as with a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, using the context namespace
+         declarations.  It is an error if there is no namespace declaration for
+         the prefix in the expression context.  The node test will be true for
+         any node of the principal type whose <a href="#dt-expanded-name">expanded-name</a> has the namespace URI
+         to which the prefix expands, regardless of the local part of the
+         name.
+      </p>
+      
+      
+      <p>The node test <code>text()</code> is true for any text node. For
+         example, <code>child::text()</code> will select the text node
+         children of the context node.  Similarly, the node test
+         <code>comment()</code> is true for any comment node, and the node test
+         <code>processing-instruction()</code> is true for any processing
+         instruction. The <code>processing-instruction()</code> test may have
+         an argument that is <a href="#NT-Literal">Literal</a>; in this case, it
+         is true for any processing instruction that has a name equal to the
+         value of the <a href="#NT-Literal">Literal</a>.
+      </p>
+      
+      
+      <p>A node test <code>node()</code> is true for any node of any type
+         whatsoever.
+      </p>
+      
+      
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-NodeTest"></a>[7]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>NodeTest</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-NameTest">NameTest</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-NodeType">NodeType</a> '(' ')'
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'processing-instruction' '(' <a href="#NT-Literal">Literal</a> ')'
+               </td>
+               <td></td>
+            </tr>
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      <h3><a name="predicates"></a>2.4 Predicates
+      </h3>
+      
+      
+      <p>An axis is either a forward axis or a reverse axis.  An axis that
+         only ever contains the context node or nodes that are after the
+         context node in <a href="#dt-document-order">document
+            order
+         </a> is a forward axis.  An axis that only ever contains
+         the context node or nodes that are before the context node in <a href="#dt-document-order">document order</a> is a reverse axis.
+         Thus, the ancestor, ancestor-or-self, preceding, and preceding-sibling
+         axes are reverse axes; all other axes are forward axes. Since the self
+         axis always contains at most one node, it makes no difference whether
+         it is a forward or reverse axis.  <a name="dt-proximity-position"></a>The <b>proximity position</b> of a
+         member of a node-set with respect to an axis is defined to be the
+         position of the node in the node-set ordered in document order if the
+         axis is a forward axis and ordered in reverse document order if the
+         axis is a reverse axis. The first position is 1.
+      </p>
+      
+      
+      <p>A predicate filters a node-set with respect to an axis to produce a
+         new node-set.  For each node in the node-set to be filtered, the <a href="#NT-PredicateExpr">PredicateExpr</a> is evaluated with that node
+         as the context node, with the number of nodes in the node-set as the
+         context size, and with the <a href="#dt-proximity-position">proximity position</a> of the node
+         in the node-set with respect to the axis as the context position; if
+         <a href="#NT-PredicateExpr">PredicateExpr</a> evaluates to true for
+         that node, the node is included in the new node-set; otherwise, it is
+         not included.
+      </p>
+      
+      
+      <p>A <a href="#NT-PredicateExpr">PredicateExpr</a> is evaluated by
+         evaluating the <a href="#NT-Expr">Expr</a> and converting the result
+         to a boolean.  If the result is a number, the result will be converted
+         to true if the number is equal to the context position and will be
+         converted to false otherwise; if the result is not a number, then the
+         result will be converted as if by a call to the
+         <b><a href="#function-boolean">boolean</a></b> function.  Thus a location path
+         <code>para[3]</code> is equivalent to
+         <code>para[position()=3]</code>.
+      </p>
+      
+      
+      <h5>Predicates</h5>
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-Predicate"></a>[8]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Predicate</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'[' <a href="#NT-PredicateExpr">PredicateExpr</a> ']'
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-PredicateExpr"></a>[9]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>PredicateExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-Expr">Expr</a></td>
+               <td></td>
+            </tr>
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      <h3><a name="path-abbrev"></a>2.5 Abbreviated Syntax
+      </h3>
+      
+      
+      <p>Here are some examples of location paths using abbreviated
+         syntax:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p><code>para</code> selects the <code>para</code> element children of
+               the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>*</code> selects all element children of the
+               context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>text()</code> selects all text node children of the
+               context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>@name</code> selects the <code>name</code> attribute of
+               the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>@*</code> selects all the attributes of the
+               context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>para[1]</code> selects the first <code>para</code> child of
+               the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>para[last()]</code> selects the last <code>para</code> child
+               of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>*/para</code> selects all <code>para</code> grandchildren of
+               the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>/doc/chapter[5]/section[2]</code> selects the second
+               <code>section</code> of the fifth <code>chapter</code> of the
+               <code>doc</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>chapter//para</code> selects the <code>para</code> element
+               descendants of the <code>chapter</code> element children of the
+               context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>//para</code> selects all the <code>para</code> descendants of
+               the document root and thus selects all <code>para</code> elements in the
+               same document as the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>//olist/item</code> selects all the <code>item</code>
+               elements in the same document as the context node that have an
+               <code>olist</code> parent
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>.</code> selects the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>.//para</code> selects the <code>para</code> element
+               descendants of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>..</code> selects the parent of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>../@lang</code> selects the <code>lang</code> attribute
+               of the parent of the context node
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>para[@type="warning"]</code> selects all <code>para</code>
+               children of the context node that have a <code>type</code> attribute with
+               value <code>warning</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>para[@type="warning"][5]</code> selects the fifth
+               <code>para</code> child of the context node that has a <code>type</code>
+               attribute with value <code>warning</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>para[5][@type="warning"]</code> selects the fifth
+               <code>para</code> child of the context node if that child has a
+               <code>type</code> attribute with value <code>warning</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>chapter[title="Introduction"]</code> selects the
+               <code>chapter</code> children of the context node that have one or
+               more <code>title</code> children with <a href="#dt-string-value">string-value</a> equal to
+               <code>Introduction</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>chapter[title]</code> selects the <code>chapter</code>
+               children of the context node that have one or more <code>title</code>
+               children
+            </p>
+         </li>
+         
+         
+         <li>
+            <p><code>employee[@secretary and @assistant]</code> selects all
+               the <code>employee</code> children of the context node that have both a
+               <code>secretary</code> attribute and an <code>assistant</code>
+               attribute
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p>The most important abbreviation is that <code>child::</code> can be
+         omitted from a location step.  In effect, <code>child</code> is the
+         default axis.  For example, a location path <code>div/para</code> is
+         short for <code>child::div/child::para</code>.
+      </p>
+      
+      
+      <p>There is also an abbreviation for attributes:
+         <code>attribute::</code> can be abbreviated to <code>@</code>. For
+         example, a location path <code>para[@type="warning"]</code> is short
+         for <code>child::para[attribute::type="warning"]</code> and so selects
+         <code>para</code> children with a <code>type</code> attribute with
+         value equal to <code>warning</code>.
+      </p>
+      
+      
+      <p><code>//</code> is short for
+         <code>/descendant-or-self::node()/</code>.  For example,
+         <code>//para</code> is short for
+         <code>/descendant-or-self::node()/child::para</code> and so will
+         select any <code>para</code> element in the document (even a
+         <code>para</code> element that is a document element will be selected
+         by <code>//para</code> since the document element node is a child of
+         the root node); <code>div//para</code> is short for
+         <code>div/descendant-or-self::node()/child::para</code> and so
+         will select all <code>para</code> descendants of <code>div</code>
+         children.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The location path <code>//para[1]</code> does
+         <i>not</i> mean the same as the location path
+         <code>/descendant::para[1]</code>.  The latter selects the first
+         descendant <code>para</code> element; the former selects all descendant
+         <code>para</code> elements that are the first <code>para</code>
+         children of their parents.
+      </blockquote>
+      
+      
+      <p>A location step of <code>.</code> is short for
+         <code>self::node()</code>. This is particularly useful in
+         conjunction with <code>//</code>. For example, the location path
+         <code>.//para</code> is short for
+      </p>
+      
+      <pre>self::node()/descendant-or-self::node()/child::para</pre>
+      
+      <p>and so will select all <code>para</code> descendant elements of the
+         context node.
+      </p>
+      
+      
+      <p>Similarly, a location step of <code>..</code> is short for
+         <code>parent::node()</code>. For example, <code>../title</code> is
+         short for <code>parent::node()/child::title</code> and so will
+         select the <code>title</code> children of the parent of the context
+         node.
+      </p>
+      
+      
+      <h5>Abbreviations</h5>
+      <table class="scrap">
+         <tbody>
+            
+            <tr valign="baseline">
+               <td><a name="NT-AbbreviatedAbsoluteLocationPath"></a>[10]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AbbreviatedAbsoluteLocationPath</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'//' <a href="#NT-RelativeLocationPath">RelativeLocationPath</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-AbbreviatedRelativeLocationPath"></a>[11]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AbbreviatedRelativeLocationPath</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-RelativeLocationPath">RelativeLocationPath</a> '//' <a href="#NT-Step">Step</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-AbbreviatedStep"></a>[12]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AbbreviatedStep</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'.'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| '..'</td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-AbbreviatedAxisSpecifier"></a>[13]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AbbreviatedAxisSpecifier</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'@'?</td>
+               <td></td>
+            </tr>
+            
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Expressions"></a>3 Expressions
+      </h2>
+      
+      
+      
+      <h3><a name="section-Basics"></a>3.1 Basics
+      </h3>
+      
+      
+      <p>A <a href="#NT-VariableReference">VariableReference</a> evaluates
+         to the value to which the variable name is bound in the set of
+         variable bindings in the context.  It is an error if the variable name
+         is not bound to any value in the set of variable bindings in the
+         expression context.
+      </p>
+      
+      
+      <p>Parentheses may be used for grouping.</p>
+      
+      
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-Expr"></a>[14]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Expr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-OrExpr">OrExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-PrimaryExpr"></a>[15]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>PrimaryExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-VariableReference">VariableReference</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| '(' <a href="#NT-Expr">Expr</a> ')'
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-Literal">Literal</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-Number">Number</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-FunctionCall">FunctionCall</a></td>
+               <td></td>
+            </tr>
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      <h3><a name="section-Function-Calls"></a>3.2 Function Calls
+      </h3>
+      
+      
+      <p>A <a href="#NT-FunctionCall">FunctionCall</a> expression is
+         evaluated by using the <a href="#NT-FunctionName">FunctionName</a> to
+         identify a function in the expression evaluation context function
+         library, evaluating each of the <a href="#NT-Argument">Argument</a>s,
+         converting each argument to the type required by the function, and
+         finally calling the function, passing it the converted arguments.  It
+         is an error if the number of arguments is wrong or if an argument
+         cannot be converted to the required type.  The result of the <a href="#NT-FunctionCall">FunctionCall</a> expression is the result
+         returned by the function.
+      </p>
+      
+      
+      <p>An argument is converted to type string as if by calling the
+         <b><a href="#function-string">string</a></b> function.  An argument is converted to
+         type number as if by calling the <b><a href="#function-number">number</a></b> function.
+         An argument is converted to type boolean as if by calling the
+         <b><a href="#function-boolean">boolean</a></b> function.  An argument that is not of
+         type node-set cannot be converted to a node-set.
+      </p>
+      
+      
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-FunctionCall"></a>[16]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>FunctionCall</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-FunctionName">FunctionName</a> '(' ( <a href="#NT-Argument">Argument</a> ( ',' <a href="#NT-Argument">Argument</a> )* )? ')'
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-Argument"></a>[17]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Argument</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-Expr">Expr</a></td>
+               <td></td>
+            </tr>
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      <h3><a name="node-sets"></a>3.3 Node-sets
+      </h3>
+      
+      
+      <p>A location path can be used as an expression.  The expression
+         returns the set of nodes selected by the path.
+      </p>
+      
+      
+      <p>The <code>|</code> operator computes the union of its operands,
+         which must be node-sets.
+      </p>
+      
+      
+      <p><a href="#NT-Predicate">Predicate</a>s are used to filter
+         expressions in the same way that they are used in location paths. It
+         is an error if the expression to be filtered does not evaluate to a
+         node-set.  The <a href="#NT-Predicate">Predicate</a> filters the
+         node-set with respect to the child axis.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The meaning of a <a href="#NT-Predicate">Predicate</a>
+         depends crucially on which axis applies. For example,
+         <code>preceding::foo[1]</code> returns the first <code>foo</code>
+         element in <i>reverse document order</i>, because the axis that
+         applies to the <code>[1]</code> predicate is the preceding axis; by
+         contrast, <code>(preceding::foo)[1]</code> returns the first
+         <code>foo</code> element in <i>document order</i>, because the
+         axis that applies to the <code>[1]</code> predicate is the child
+         axis.
+      </blockquote>
+      
+      
+      <p>The <code>/</code> and <code>//</code> operators compose an
+         expression and a relative location path.  It is an error if the
+         expression does not evaluate to a node-set.  The <code>/</code>
+         operator does composition in the same way as when <code>/</code> is
+         used in a location path. As in location paths, <code>//</code> is
+         short for <code>/descendant-or-self::node()/</code>.
+      </p>
+      
+      
+      <p>There are no types of objects that can be converted to node-sets.</p>
+      
+      
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-UnionExpr"></a>[18]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>UnionExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-PathExpr">PathExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-UnionExpr">UnionExpr</a> '|' <a href="#NT-PathExpr">PathExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-PathExpr"></a>[19]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>PathExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-LocationPath">LocationPath</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-FilterExpr">FilterExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-FilterExpr">FilterExpr</a> '/' <a href="#NT-RelativeLocationPath">RelativeLocationPath</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-FilterExpr">FilterExpr</a> '//' <a href="#NT-RelativeLocationPath">RelativeLocationPath</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-FilterExpr"></a>[20]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>FilterExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-PrimaryExpr">PrimaryExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-FilterExpr">FilterExpr</a> <a href="#NT-Predicate">Predicate</a></td>
+               <td></td>
+            </tr>
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      <h3><a name="booleans"></a>3.4 Booleans
+      </h3>
+      
+      
+      <p>An object of type boolean can have one of two values, true and
+         false.
+      </p>
+      
+      
+      <p>An <code>or</code> expression is evaluated by evaluating each
+         operand and converting its value to a boolean as if by a call to the
+         <b><a href="#function-boolean">boolean</a></b> function.  The result is true if either
+         value is true and false otherwise.  The right operand is not evaluated
+         if the left operand evaluates to true.
+      </p>
+      
+      
+      <p>An <code>and</code> expression is evaluated by evaluating each
+         operand and converting its value to a boolean as if by a call to the
+         <b><a href="#function-boolean">boolean</a></b> function.  The result is true if both
+         values are true and false otherwise.  The right operand is not
+         evaluated if the left operand evaluates to false.
+      </p>
+      
+      
+      <p>An <a href="#NT-EqualityExpr">EqualityExpr</a> (that is not just
+         a <a href="#NT-RelationalExpr">RelationalExpr</a>) or a <a href="#NT-RelationalExpr">RelationalExpr</a> (that is not just an <a href="#NT-AdditiveExpr">AdditiveExpr</a>) is evaluated by comparing the
+         objects that result from evaluating the two operands.  Comparison of
+         the resulting objects is defined in the following three paragraphs.
+         First, comparisons that involve node-sets are defined in terms of
+         comparisons that do not involve node-sets; this is defined uniformly
+         for <code>=</code>, <code>!=</code>, <code>&lt;=</code>,
+         <code>&lt;</code>, <code>>=</code> and <code>></code>.  Second,
+         comparisons that do not involve node-sets are defined for
+         <code>=</code> and <code>!=</code>.  Third, comparisons that do not
+         involve node-sets are defined for <code>&lt;=</code>,
+         <code>&lt;</code>, <code>>=</code> and <code>></code>.
+      </p>
+      
+      
+      <p>If both objects to be compared are node-sets, then the comparison
+         will be true if and only if there is a node in the first node-set and
+         a node in the second node-set such that the result of performing the
+         comparison on the <a href="#dt-string-value">string-value</a>s of the two nodes is
+         true.  If one object to be compared is a node-set and the other is a
+         number, then the comparison will be true if and only if there is a
+         node in the node-set such that the result of performing the comparison
+         on the number to be compared and on the result of converting the
+         <a href="#dt-string-value">string-value</a> of that node to
+         a number using the <b><a href="#function-number">number</a></b> function is true.  If
+         one object to be compared is a node-set and the other is a string,
+         then the comparison will be true if and only if there is a node in the
+         node-set such that the result of performing the comparison on the
+         <a href="#dt-string-value">string-value</a> of the node and
+         the other string is true. If one object to be compared is a node-set
+         and the other is a boolean, then the comparison will be true if and
+         only if the result of performing the comparison on the boolean and on
+         the result of converting the node-set to a boolean using the
+         <b><a href="#function-boolean">boolean</a></b> function is true.
+      </p>
+      
+      
+      <p>When neither object to be compared is a node-set and the operator
+         is <code>=</code> or <code>!=</code>, then the objects are compared by
+         converting them to a common type as follows and then comparing them.
+         If at least one object to be compared is a boolean, then each object
+         to be compared is converted to a boolean as if by applying the
+         <b><a href="#function-boolean">boolean</a></b> function.  Otherwise, if at least one
+         object to be compared is a number, then each object to be compared is
+         converted to a number as if by applying the
+         <b><a href="#function-number">number</a></b> function.  Otherwise, both objects to be
+         compared are converted to strings as if by applying the
+         <b><a href="#function-string">string</a></b> function.  The <code>=</code> comparison
+         will be true if and only if the objects are equal; the <code>!=</code>
+         comparison will be true if and only if the objects are not equal.
+         Numbers are compared for equality according to IEEE 754 <a href="#IEEE754">[IEEE 754]</a>.  Two booleans are equal if either both are true or
+         both are false.  Two strings are equal if and only if they consist of
+         the same sequence of UCS characters.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>If <code>$x</code> is bound to a node-set, then
+         <code>$x="foo"</code> does not mean the same as
+         <code>not($x!="foo")</code>: the former is true if and only if
+         <i>some</i> node in <code>$x</code> has the string-value
+         <code>foo</code>; the latter is true if and only if <i>all</i>
+         nodes in <code>$x</code> have the string-value
+         <code>foo</code>.
+      </blockquote>
+      
+      
+      <p>When neither object to be compared is a node-set and the operator
+         is <code>&lt;=</code>, <code>&lt;</code>, <code>>=</code> or
+         <code>></code>, then the objects are compared by converting both
+         objects to numbers and comparing the numbers according to IEEE 754.
+         The <code>&lt;</code> comparison will be true if and only if the first
+         number is less than the second number.  The <code>&lt;=</code>
+         comparison will be true if and only if the first number is less than
+         or equal to the second number.  The <code>></code> comparison will
+         be true if and only if the first number is greater than the second
+         number.  The <code>>=</code> comparison will be true if and only if
+         the first number is greater than or equal to the second number.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>
+         
+         When an XPath expression occurs in an XML document, any
+         <code>&lt;</code> and <code>&lt;=</code> operators must be quoted
+         according to XML 1.0 rules by using, for example,
+         <code>&amp;lt;</code> and <code>&amp;lt;=</code>. In the following
+         example the value of the <code>test</code> attribute is an XPath
+         expression:
+         
+         <pre>&lt;xsl:if test="@value &amp;lt; 10">...&lt;/xsl:if></pre>
+         
+         </blockquote>
+      
+      
+      <table class="scrap">
+         <tbody>
+            <tr valign="baseline">
+               <td><a name="NT-OrExpr"></a>[21]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>OrExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-AndExpr">AndExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-OrExpr">OrExpr</a> 'or' <a href="#NT-AndExpr">AndExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-AndExpr"></a>[22]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AndExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-EqualityExpr">EqualityExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AndExpr">AndExpr</a> 'and' <a href="#NT-EqualityExpr">EqualityExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-EqualityExpr"></a>[23]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>EqualityExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-RelationalExpr">RelationalExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-EqualityExpr">EqualityExpr</a> '=' <a href="#NT-RelationalExpr">RelationalExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-EqualityExpr">EqualityExpr</a> '!=' <a href="#NT-RelationalExpr">RelationalExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td><a name="NT-RelationalExpr"></a>[24]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>RelationalExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-AdditiveExpr">AdditiveExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-RelationalExpr">RelationalExpr</a> '&lt;' <a href="#NT-AdditiveExpr">AdditiveExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-RelationalExpr">RelationalExpr</a> '>' <a href="#NT-AdditiveExpr">AdditiveExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-RelationalExpr">RelationalExpr</a> '&lt;=' <a href="#NT-AdditiveExpr">AdditiveExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-RelationalExpr">RelationalExpr</a> '>=' <a href="#NT-AdditiveExpr">AdditiveExpr</a></td>
+               <td></td>
+            </tr>
+         </tbody>
+      </table>
+      
+      
+      <blockquote><b>NOTE: </b>The effect of the above grammar is that the order of
+         precedence is (lowest precedence first):
+         
+         
+         <ul>
+            
+            
+            <li>
+               <p><code>or</code></p>
+            </li>
+            
+            
+            <li>
+               <p><code>and</code></p>
+            </li>
+            
+            
+            <li>
+               <p><code>=</code>, <code>!=</code></p>
+            </li>
+            
+            
+            <li>
+               <p><code>&lt;=</code>, <code>&lt;</code>, <code>>=</code>,
+                  <code>></code></p>
+            </li>
+            
+            
+         </ul>
+         
+         and the operators are all left associative.
+         
+         For example, <code>3 > 2 > 1</code> is equivalent to <code>(3
+            > 2) > 1
+         </code>, which evaluates to false.
+         
+         
+      </blockquote>
+      
+      
+      
+      
+      
+      <h3><a name="numbers"></a>3.5 Numbers
+      </h3>
+      
+      
+      <p>A number represents a floating-point number.  A number can have any
+         double-precision 64-bit format IEEE 754 value <a href="#IEEE754">[IEEE 754]</a>.
+         These include a special "Not-a-Number" (NaN) value,
+         positive and negative infinity, and positive and negative zero.  See
+         <a href="http://java.sun.com/docs/books/jls/html/4.doc.html#9208">Section 4.2.3</a> of <a href="#JLS">[JLS]</a> for a summary of the key
+         rules of the IEEE 754 standard.
+      </p>
+      
+      
+      <p>The numeric operators convert their operands to numbers as if by
+         calling the <b><a href="#function-number">number</a></b> function.
+      </p>
+      
+      
+      <p>The <code>+</code> operator performs addition.
+      </p>
+      
+      
+      <p>The <code>-</code> operator performs subtraction.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>Since XML allows <code>-</code> in names, the <code>-</code>
+         operator typically needs to be preceded by whitespace.  For example,
+         <code>foo-bar</code> evaluates to a node-set containing the child
+         elements named <code>foo-bar</code>; <code>foo - bar</code> evaluates
+         to the difference of the result of converting the <a href="#dt-string-value">string-value</a> of the first
+         <code>foo</code> child element to a number and the result of
+         converting the <a href="#dt-string-value">string-value</a>
+         of the first <code>bar</code> child to a number.
+      </blockquote>
+      
+      
+      <p>The <code>div</code> operator performs floating-point division
+         according to IEEE 754.
+      </p>
+      
+      
+      <p>The <code>mod</code> operator returns the remainder from a
+         truncating division.  For example,
+      </p>
+      
+      
+      <ul>
+         
+         <li>
+            <p><code>5 mod 2</code> returns <code>1</code></p>
+         </li>
+         
+         <li>
+            <p><code>5 mod -2</code> returns <code>1</code></p>
+         </li>
+         
+         <li>
+            <p><code>-5 mod 2</code> returns <code>-1</code></p>
+         </li>
+         
+         <li>
+            <p><code>-5 mod -2</code> returns <code>-1</code></p>
+         </li>
+         
+      </ul>
+      
+      
+      <blockquote><b>NOTE: </b>This is the same as the <code>%</code> operator in Java and
+         ECMAScript.
+      </blockquote>
+      
+      
+      <blockquote><b>NOTE: </b>This is not the same as the IEEE 754 remainder operation, which
+         returns the remainder from a rounding division.
+      </blockquote>
+      
+      
+      <h5>Numeric Expressions</h5>
+      <table class="scrap">
+         <tbody>
+            
+            <tr valign="baseline">
+               <td><a name="NT-AdditiveExpr"></a>[25]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>AdditiveExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-MultiplicativeExpr">MultiplicativeExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AdditiveExpr">AdditiveExpr</a> '+' <a href="#NT-MultiplicativeExpr">MultiplicativeExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AdditiveExpr">AdditiveExpr</a> '-' <a href="#NT-MultiplicativeExpr">MultiplicativeExpr</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-MultiplicativeExpr"></a>[26]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>MultiplicativeExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-UnaryExpr">UnaryExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-MultiplicativeExpr">MultiplicativeExpr</a> <a href="#NT-MultiplyOperator">MultiplyOperator</a> <a href="#NT-UnaryExpr">UnaryExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-MultiplicativeExpr">MultiplicativeExpr</a> 'div' <a href="#NT-UnaryExpr">UnaryExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-MultiplicativeExpr">MultiplicativeExpr</a> 'mod' <a href="#NT-UnaryExpr">UnaryExpr</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-UnaryExpr"></a>[27]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>UnaryExpr</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-UnionExpr">UnionExpr</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| '-' <a href="#NT-UnaryExpr">UnaryExpr</a></td>
+               <td></td>
+            </tr>
+            
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      <h3><a name="strings"></a>3.6 Strings
+      </h3>
+      
+      
+      <p>Strings consist of a sequence of zero or more characters, where a
+         character is defined as in the XML Recommendation <a href="#XML">[XML]</a>.
+         A single character in XPath thus corresponds to a single Unicode
+         abstract character with a single corresponding Unicode scalar value
+         (see <a href="#UNICODE">[Unicode]</a>); this is not the same thing as a 16-bit
+         Unicode code value: the Unicode coded character representation for an
+         abstract character with Unicode scalar value greater that U+FFFF is a
+         pair of 16-bit Unicode code values (a surrogate pair).  In many
+         programming languages, a string is represented by a sequence of 16-bit
+         Unicode code values; implementations of XPath in such languages must
+         take care to ensure that a surrogate pair is correctly treated as a
+         single XPath character.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>It is possible in Unicode for there to be two strings that
+         should be treated as identical even though they consist of the
+         distinct sequences of Unicode abstract characters.  For example, some
+         accented characters may be represented in either a precomposed or
+         decomposed form.  Therefore, XPath expressions may return unexpected
+         results unless both the characters in the XPath expression and in the
+         XML document have been normalized into a canonical form.  See <a href="#CHARMOD">[Character Model]</a>.
+      </blockquote>
+      
+      
+      
+      
+      
+      <h3><a name="exprlex"></a>3.7 Lexical Structure
+      </h3>
+      
+      
+      <p>When tokenizing, the longest possible token is always returned.</p>
+      
+      
+      <p>For readability, whitespace may be used in expressions even though not
+         explicitly allowed by the grammar: <a href="#NT-ExprWhitespace">ExprWhitespace</a> may be freely added within
+         patterns before or after any <a href="#NT-ExprToken">ExprToken</a>.
+      </p>
+      
+      
+      <p>The following special tokenization rules must be applied in the
+         order specified to disambiguate the <a href="#NT-ExprToken">ExprToken</a> grammar:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>If there is a preceding token and the preceding token is not
+               one of <code>@</code>, <code>::</code>, <code>(</code>,
+               <code>[</code>, <code>,</code> or an <a href="#NT-Operator">Operator</a>, then a <code>*</code> must be
+               recognized as a <a href="#NT-MultiplyOperator">MultiplyOperator</a>
+               and an <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a> must be
+               recognized as an <a href="#NT-OperatorName">OperatorName</a>.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>If the character following an <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a> (possibly after intervening
+               <a href="#NT-ExprWhitespace">ExprWhitespace</a>) is <code>(</code>,
+               then the token must be recognized as a <a href="#NT-NodeType">NodeType</a> or a <a href="#NT-FunctionName">FunctionName</a>.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>If the two characters following an <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a> (possibly after intervening
+               <a href="#NT-ExprWhitespace">ExprWhitespace</a>) are <code>::</code>,
+               then the token must be recognized as an <a href="#NT-AxisName">AxisName</a>.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>Otherwise, the token must not be recognized as a <a href="#NT-MultiplyOperator">MultiplyOperator</a>, an <a href="#NT-OperatorName">OperatorName</a>, a <a href="#NT-NodeType">NodeType</a>, a <a href="#NT-FunctionName">FunctionName</a>, or an <a href="#NT-AxisName">AxisName</a>.
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <h5>Expression Lexical Structure</h5>
+      <table class="scrap">
+         <tbody>
+            
+            <tr valign="baseline">
+               <td><a name="NT-ExprToken"></a>[28]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>ExprToken</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'(' | ')' | '[' | ']' | '.' | '..' | '@' | ',' | '::'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-NameTest">NameTest</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-NodeType">NodeType</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-Operator">Operator</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-FunctionName">FunctionName</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-AxisName">AxisName</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-Literal">Literal</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-Number">Number</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-VariableReference">VariableReference</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-Literal"></a>[29]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Literal</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'"' [^"]* '"'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| "'" [^']* "'"</td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-Number"></a>[30]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Number</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-Digits">Digits</a> ('.' <a href="#NT-Digits">Digits</a>?)?
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| '.' <a href="#NT-Digits">Digits</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-Digits"></a>[31]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Digits</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>[0-9]+</td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-Operator"></a>[32]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Operator</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-OperatorName">OperatorName</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-MultiplyOperator">MultiplyOperator</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| '/' | '//' | '|' | '+' | '-' | '=' | '!=' | '&lt;' | '&lt;=' | '>' | '>='</td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-OperatorName"></a>[33]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>OperatorName</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'and' | 'or' | 'mod' | 'div'</td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-MultiplyOperator"></a>[34]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>MultiplyOperator</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'*'</td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-FunctionName"></a>[35]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>FunctionName</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>
+                  <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>
+                  - <a href="#NT-NodeType">NodeType</a>
+                  
+               </td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-VariableReference"></a>[36]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>VariableReference</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'$' <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-NameTest"></a>[37]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>NameTest</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'*'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a> ':' '*'
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a></td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-NodeType"></a>[38]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>NodeType</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'comment'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'text'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'processing-instruction'</td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'node'</td>
+               <td></td>
+            </tr>
+            
+            <tr valign="baseline">
+               <td><a name="NT-ExprWhitespace"></a>[39]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>ExprWhitespace</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="http://www.w3.org/TR/REC-xml#NT-S">S</a></td>
+               <td></td>
+            </tr>
+            
+         </tbody>
+      </table>
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="corelib"></a>4 Core Function Library
+      </h2>
+      
+      
+      <p>This section describes functions that XPath implementations must
+         always include in the function library that is used to evaluate
+         expressions.
+      </p>
+      
+      
+      <p>Each function in the function library is specified using a function
+         prototype, which gives the return type, the name of the function, and
+         the type of the arguments.  If an argument type is followed by a
+         question mark, then the argument is optional; otherwise, the argument
+         is required.
+      </p>
+      
+      
+      
+      <h3><a name="section-Node-Set-Functions"></a>4.1 Node Set Functions
+      </h3>
+      
+      
+      <p><a name="function-last"><b>Function: </b><i>number</i> <b>last</b>()
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-last">last</a></b> function returns a number equal to
+         the <a href="#dt-context-size">context size</a> from the
+         expression evaluation context.
+      </p>
+      
+      
+      <p><a name="function-position"><b>Function: </b><i>number</i> <b>position</b>()
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-position">position</a></b> function returns a number equal to
+         the <a href="#dt-context-position">context position</a> from
+         the expression evaluation context.
+      </p>
+      
+      
+      <p><a name="function-count"><b>Function: </b><i>number</i> <b>count</b>(<i>node-set</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-count">count</a></b> function returns the number of nodes in the
+         argument node-set.
+      </p>
+      
+      
+      <p><a name="function-id"><b>Function: </b><i>node-set</i> <b>id</b>(<i>object</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-id">id</a></b> function selects elements by their
+         unique ID (see <a href="#unique-id">[<b>5.2.1 Unique IDs</b>]
+         </a>).  When the argument to
+         <b><a href="#function-id">id</a></b> is of type node-set, then the result is the
+         union of the result of applying <b><a href="#function-id">id</a></b> to the
+         <a href="#dt-string-value">string-value</a> of each of the
+         nodes in the argument node-set.  When the argument to
+         <b><a href="#function-id">id</a></b> is of any other type, the argument is
+         converted to a string as if by a call to the
+         <b><a href="#function-string">string</a></b> function; the string is split into a
+         whitespace-separated list of tokens (whitespace is any sequence of
+         characters matching the production <a href="http://www.w3.org/TR/REC-xml#NT-S">S</a>);
+         the result is a node-set containing the elements in the same document
+         as the context node that have a unique ID equal to any of the tokens
+         in the list.
+      </p>
+      
+      
+      <ul>
+         
+         <li>
+            <p><code>id("foo")</code> selects the element with unique ID
+               <code>foo</code></p>
+         </li>
+         
+         <li>
+            <p><code>id("foo")/child::para[position()=5]</code> selects
+               the fifth <code>para</code> child of the element with unique ID
+               <code>foo</code></p>
+         </li>
+         
+      </ul>
+      
+      
+      <p><a name="function-local-name"><b>Function: </b><i>string</i> <b>local-name</b>(<i>node-set</i>?)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-local-name">local-name</a></b> function returns the local part
+         of the <a href="#dt-expanded-name">expanded-name</a> of the
+         node in the argument node-set that is first in <a href="#dt-document-order">document order</a>. If the argument
+         node-set is empty or the first node has no <a href="#dt-expanded-name">expanded-name</a>, an empty string is
+         returned.  If the argument is omitted, it defaults to a node-set with
+         the context node as its only member.
+      </p>
+      
+      
+      <p><a name="function-namespace-uri"><b>Function: </b><i>string</i> <b>namespace-uri</b>(<i>node-set</i>?)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-namespace-uri">namespace-uri</a></b> function returns the
+         namespace URI of the <a href="#dt-expanded-name">expanded-name</a> of the node in the
+         argument node-set that is first in <a href="#dt-document-order">document order</a>. If the argument
+         node-set is empty, the first node has no <a href="#dt-expanded-name">expanded-name</a>, or the namespace URI
+         of the <a href="#dt-expanded-name">expanded-name</a> is
+         null, an empty string is returned.  If the argument is omitted, it
+         defaults to a node-set with the context node as its only member.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The string returned by the
+         <b><a href="#function-namespace-uri">namespace-uri</a></b> function will be empty except for
+         element nodes and attribute nodes.
+      </blockquote>
+      
+      
+      <p><a name="function-name"><b>Function: </b><i>string</i> <b>name</b>(<i>node-set</i>?)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-name">name</a></b> function returns a string containing
+         a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> representing the
+         <a href="#dt-expanded-name">expanded-name</a> of the node in
+         the argument node-set that is first in <a href="#dt-document-order">document order</a>. The <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> must represent the <a href="#dt-expanded-name">expanded-name</a> with respect to the
+         namespace declarations in effect on the node whose <a href="#dt-expanded-name">expanded-name</a> is being represented.
+         Typically, this will be the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> that occurred in the XML
+         source.  This need not be the case if there are namespace declarations
+         in effect on the node that associate multiple prefixes with the same
+         namespace.  However, an implementation may include information about
+         the original prefix in its representation of nodes; in this case, an
+         implementation can ensure that the returned string is always the same
+         as the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> used in the XML
+         source. If the argument node-set is empty or the first node has no
+         <a href="#dt-expanded-name">expanded-name</a>, an empty
+         string is returned.  If the argument it omitted, it defaults to a
+         node-set with the context node as its only member.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The string returned by the <b><a href="#function-name">name</a></b> function
+         will be the same as the string returned by the
+         <b><a href="#function-local-name">local-name</a></b> function except for element nodes and
+         attribute nodes.
+      </blockquote>
+      
+      
+      
+      
+      
+      <h3><a name="section-String-Functions"></a>4.2 String Functions
+      </h3>
+      
+      
+      <p><a name="function-string"><b>Function: </b><i>string</i> <b>string</b>(<i>object</i>?)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-string">string</a></b> function converts an object to a string
+         as follows:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>A node-set is converted to a string by returning the <a href="#dt-string-value">string-value</a> of the node in the
+               node-set that is first in <a href="#dt-document-order">document
+                  order
+               </a>.  If the node-set is empty, an empty string is
+               returned.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>A number is converted to a string as follows</p>
+            
+            
+            <ul>
+               
+               
+               <li>
+                  <p>NaN is converted to the string <code>NaN</code></p>
+               </li>
+               
+               
+               <li>
+                  <p>positive zero is converted to the string
+                     <code>0</code></p>
+               </li>
+               
+               
+               <li>
+                  <p>negative zero is converted to the string
+                     <code>0</code></p>
+               </li>
+               
+               
+               <li>
+                  <p>positive infinity is converted to the string
+                     <code>Infinity</code></p>
+               </li>
+               
+               
+               <li>
+                  <p>negative infinity is converted to the string
+                     <code>-Infinity</code></p>
+               </li>
+               
+               
+               <li>
+                  <p>if the number is an integer, the number is represented in
+                     decimal form as a <a href="#NT-Number">Number</a> with no decimal
+                     point and no leading zeros, preceded by a minus sign (<code>-</code>)
+                     if the number is negative
+                  </p>
+               </li>
+               
+               
+               <li>
+                  <p>otherwise, the number is represented in decimal form as a <a href="#NT-Number">Number</a> including a decimal point with at least
+                     one digit before the decimal point and at least one digit after the
+                     decimal point, preceded by a minus sign (<code>-</code>) if the number
+                     is negative; there must be no leading zeros before the decimal point
+                     apart possibly from the one required digit immediately before the
+                     decimal point; beyond the one required digit after the decimal point
+                     there must be as many, but only as many, more digits as are needed to
+                     uniquely distinguish the number from all other IEEE 754 numeric
+                     values.
+                  </p>
+               </li>
+               
+               
+            </ul>
+            
+            
+         </li>
+         
+         
+         <li>
+            <p>The boolean false value is converted to the string
+               <code>false</code>.  The boolean true value is converted to the
+               string <code>true</code>.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>An object of a type other than the four basic types is
+               converted to a string in a way that is dependent on that
+               type.
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p>If the argument is omitted, it defaults to a node-set with the
+         context node as its only member.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The <code>string</code> function is not intended for
+         converting numbers into strings for presentation to users.  The
+         <code>format-number</code> function and <code>xsl:number</code>
+         element in <a href="#XSLT">[XSLT]</a> provide this
+         functionality.
+      </blockquote>
+      
+      
+      <p><a name="function-concat"><b>Function: </b><i>string</i> <b>concat</b>(<i>string</i>, <i>string</i>, <i>string</i>*)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-concat">concat</a></b> function returns the concatenation of its
+         arguments.
+      </p>
+      
+      
+      <p><a name="function-starts-with"><b>Function: </b><i>boolean</i> <b>starts-with</b>(<i>string</i>, <i>string</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-starts-with">starts-with</a></b> function returns true if the
+         first argument string starts with the second argument string, and
+         otherwise returns false.
+      </p>
+      
+      
+      <p><a name="function-contains"><b>Function: </b><i>boolean</i> <b>contains</b>(<i>string</i>, <i>string</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-contains">contains</a></b> function returns true if the first
+         argument string contains the second argument string, and otherwise
+         returns false.
+      </p>
+      
+      
+      <p><a name="function-substring-before"><b>Function: </b><i>string</i> <b>substring-before</b>(<i>string</i>, <i>string</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-substring-before">substring-before</a></b> function returns the substring
+         of the first argument string that precedes the first occurrence of the
+         second argument string in the first argument string, or the empty
+         string if the first argument string does not contain the second
+         argument string.  For example,
+         <code>substring-before("1999/04/01","/")</code> returns
+         <code>1999</code>.
+      </p>
+      
+      
+      <p><a name="function-substring-after"><b>Function: </b><i>string</i> <b>substring-after</b>(<i>string</i>, <i>string</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-substring-after">substring-after</a></b> function returns the
+         substring of the first argument string that follows the first
+         occurrence of the second argument string in the first argument string,
+         or the empty string if the first argument string does not contain the
+         second argument string. For example,
+         <code>substring-after("1999/04/01","/")</code> returns
+         <code>04/01</code>, and
+         <code>substring-after("1999/04/01","19")</code> returns
+         <code>99/04/01</code>.
+      </p>
+      
+      
+      <p><a name="function-substring"><b>Function: </b><i>string</i> <b>substring</b>(<i>string</i>, <i>number</i>, <i>number</i>?)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-substring">substring</a></b> function returns the substring of the
+         first argument starting at the position specified in the second
+         argument with length specified in the third argument. For example,
+         <code>substring("12345",2,3)</code> returns <code>"234"</code>.
+         If the third argument is not specified, it returns
+         the substring starting at the position specified in the second
+         argument and continuing to the end of the string. For example,
+         <code>substring("12345",2)</code> returns <code>"2345"</code>.
+      </p>
+      
+      
+      <p>More precisely, each character in the string (see <a href="#strings">[<b>3.6 Strings</b>]
+         </a>) is considered to have a numeric position: the
+         position of the first character is 1, the position of the second
+         character is 2 and so on.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>This differs from Java and ECMAScript, in which the
+         <code>String.substring</code> method treats the position of the first
+         character as 0.
+      </blockquote>
+      
+      
+      <p>The returned substring contains those
+         characters for which the position of the character is greater than or
+         equal to the rounded value of the second argument and, if the third
+         argument is specified, less than the sum of the rounded value of the
+         second argument and the rounded value of the third argument; the
+         comparisons and addition used for the above follow the standard IEEE
+         754 rules; rounding is done as if by a call to the
+         <b><a href="#function-round">round</a></b> function. The following examples illustrate
+         various unusual cases:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p><code>substring("12345", 1.5, 2.6)</code> returns
+               <code>"234"</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>substring("12345", 0, 3)</code> returns
+               <code>"12"</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>substring("12345", 0 div 0, 3)</code> returns
+               <code>""</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>substring("12345", 1, 0 div 0)</code> returns
+               <code>""</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>substring("12345", -42, 1 div 0)</code> returns
+               <code>"12345"</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>substring("12345", -1 div 0, 1 div 0)</code> returns
+               <code>""</code></p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p><a name="function-string-length"><b>Function: </b><i>number</i> <b>string-length</b>(<i>string</i>?)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-string-length">string-length</a></b> returns the number of
+         characters in the string (see <a href="#strings">[<b>3.6 Strings</b>]
+         </a>).  If the
+         argument is omitted, it defaults to the context node converted to a
+         string, in other words the <a href="#dt-string-value">string-value</a> of the context node.
+      </p>
+      
+      
+      <p><a name="function-normalize-space"><b>Function: </b><i>string</i> <b>normalize-space</b>(<i>string</i>?)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-normalize-space">normalize-space</a></b> function returns the argument
+         string with whitespace normalized by stripping leading and trailing
+         whitespace and replacing sequences of whitespace characters by a
+         single space.  Whitespace characters are the same as those allowed by the <a href="http://www.w3.org/TR/REC-xml#NT-S">S</a> production in XML.  If the argument is
+         omitted, it defaults to the context node converted to a string, in
+         other words the <a href="#dt-string-value">string-value</a>
+         of the context node.
+      </p>
+      
+      
+      <p><a name="function-translate"><b>Function: </b><i>string</i> <b>translate</b>(<i>string</i>, <i>string</i>, <i>string</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-translate">translate</a></b> function returns the first
+         argument string with occurrences of characters in the second argument
+         string replaced by the character at the corresponding position in the
+         third argument string.  For example,
+         <code>translate("bar","abc","ABC")</code> returns the string
+         <code>BAr</code>.  If there is a character in the second argument
+         string with no character at a corresponding position in the third
+         argument string (because the second argument string is longer than the
+         third argument string), then occurrences of that character in the
+         first argument string are removed.  For example,
+         <code>translate("--aaa--","abc-","ABC")</code> returns
+         <code>"AAA"</code>. If a character occurs more than once in the second
+         argument string, then the first occurrence determines the replacement
+         character.  If the third argument string is longer than the second
+         argument string, then excess characters are ignored.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The <b><a href="#function-translate">translate</a></b> function is not a sufficient
+         solution for case conversion in all languages.  A future version of
+         XPath may provide additional functions for case conversion.
+      </blockquote>
+      
+      
+      
+      
+      
+      <h3><a name="section-Boolean-Functions"></a>4.3 Boolean Functions
+      </h3>
+      
+      
+      <p><a name="function-boolean"><b>Function: </b><i>boolean</i> <b>boolean</b>(<i>object</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-boolean">boolean</a></b> function converts its argument to a
+         boolean as follows:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>a number is true if and only if it is neither positive or
+               negative zero nor NaN
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>a node-set is true if and only if it is non-empty</p>
+         </li>
+         
+         
+         <li>
+            <p>a string is true if and only if its length is non-zero</p>
+         </li>
+         
+         
+         <li>
+            <p>an object of a type other than the four basic types is
+               converted to a boolean in a way that is dependent on that
+               type
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p><a name="function-not"><b>Function: </b><i>boolean</i> <b>not</b>(<i>boolean</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-not">not</a></b> function returns true if its argument is
+         false, and false otherwise.
+      </p>
+      
+      
+      <p><a name="function-true"><b>Function: </b><i>boolean</i> <b>true</b>()
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-true">true</a></b> function returns true.
+      </p>
+      
+      
+      <p><a name="function-false"><b>Function: </b><i>boolean</i> <b>false</b>()
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-false">false</a></b> function returns false.
+      </p>
+      
+      
+      <p><a name="function-lang"><b>Function: </b><i>boolean</i> <b>lang</b>(<i>string</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-lang">lang</a></b> function returns true or false depending on
+         whether the language of the context node as specified by
+         <code>xml:lang</code> attributes is the same as or is a sublanguage of
+         the language specified by the argument string.  The language of the
+         context node is determined by the value of the <code>xml:lang</code>
+         attribute on the context node, or, if the context node has no
+         <code>xml:lang</code> attribute, by the value of the
+         <code>xml:lang</code> attribute on the nearest ancestor of the context
+         node that has an <code>xml:lang</code> attribute.  If there is no such
+         attribute, then <b><a href="#function-lang">lang</a></b> returns false. If there is such an
+         attribute, then <b><a href="#function-lang">lang</a></b> returns true if the attribute
+         value is equal to the argument ignoring case, or if there is some
+         suffix starting with <code>-</code> such that the attribute value is
+         equal to the argument ignoring that suffix of the attribute value and
+         ignoring case. For example, <code>lang("en")</code> would return true
+         if the context node is any of these five elements:
+      </p>
+      
+      <pre>&lt;para xml:lang="en"/>
+&lt;div xml:lang="en">&lt;para/>&lt;/div>
+&lt;para xml:lang="EN"/>
+&lt;para xml:lang="en-us"/></pre>
+      
+      
+      
+      <h3><a name="section-Number-Functions"></a>4.4 Number Functions
+      </h3>
+      
+      
+      <p><a name="function-number"><b>Function: </b><i>number</i> <b>number</b>(<i>object</i>?)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-number">number</a></b> function converts its argument to a
+         number as follows:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>a string that consists of optional whitespace followed by an
+               optional minus sign followed by a <a href="#NT-Number">Number</a>
+               followed by whitespace is converted to the IEEE 754 number that is
+               nearest (according to the IEEE 754 round-to-nearest rule)
+               to the mathematical value represented by the string; any other
+               string is converted to NaN
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>boolean true is converted to 1; boolean false is converted to
+               0
+            </p>
+         </li>
+         
+         
+         <li>
+            
+            
+            <p>a node-set is first converted to a string as if by a call to the
+               <b><a href="#function-string">string</a></b> function and then converted in the same way as a
+               string argument
+            </p>
+            
+            
+         </li>
+         
+         
+         <li>
+            <p>an object of a type other than the four basic types is
+               converted to a number in a way that is dependent on that
+               type
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p>If the argument is omitted, it defaults to a node-set with the
+         context node as its only member.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The <b><a href="#function-number">number</a></b> function should not be used
+         for conversion of numeric data occurring in an element in an XML
+         document unless the element is of a type that represents numeric data
+         in a language-neutral format (which would typically be transformed
+         into a language-specific format for presentation to a user). In
+         addition, the <b><a href="#function-number">number</a></b> function cannot be used
+         unless the language-neutral format used by the element is consistent
+         with the XPath syntax for a <a href="#NT-Number">Number</a>.
+      </blockquote>
+      
+      
+      <p><a name="function-sum"><b>Function: </b><i>number</i> <b>sum</b>(<i>node-set</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-sum">sum</a></b> function returns the sum, for each
+         node in the argument node-set, of the result of converting the
+         <a href="#dt-string-value">string-value</a>s of the node to
+         a number.
+      </p>
+      
+      
+      <p><a name="function-floor"><b>Function: </b><i>number</i> <b>floor</b>(<i>number</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-floor">floor</a></b> function returns the largest (closest to
+         positive infinity) number that is not greater than the argument and
+         that is an integer.
+      </p>
+      
+      
+      <p><a name="function-ceiling"><b>Function: </b><i>number</i> <b>ceiling</b>(<i>number</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-ceiling">ceiling</a></b> function returns the smallest (closest
+         to negative infinity) number that is not less than the argument and
+         that is an integer.
+      </p>
+      
+      
+      <p><a name="function-round"><b>Function: </b><i>number</i> <b>round</b>(<i>number</i>)
+         </a>
+      </p>
+      
+      
+      <p>The <b><a href="#function-round">round</a></b> function returns the number that is
+         closest to the argument and that is an integer.  If there are two such
+         numbers, then the one that is closest to positive infinity is
+         returned. If the argument is NaN, then NaN is returned. If the
+         argument is positive infinity, then positive infinity is returned.  If
+         the argument is negative infinity, then negative infinity is
+         returned. If the argument is positive zero, then positive zero is
+         returned.  If the argument is negative zero, then negative zero is
+         returned.  If the argument is less than zero, but greater than or
+         equal to -0.5, then negative zero is returned.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>For these last two cases, the result of calling the
+         <b><a href="#function-round">round</a></b> function is not the same as the result of
+         adding 0.5 and then calling the <b><a href="#function-floor">floor</a></b>
+         function.
+      </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="data-model"></a>5 Data Model
+      </h2>
+      
+      
+      <p>XPath operates on an XML document as a tree. This section describes
+         how XPath models an XML document as a tree.  This model is conceptual
+         only and does not mandate any particular implementation.  The
+         relationship of this model to the XML Information Set <a href="#XINFO">[XML Infoset]</a> is described in <a href="#infoset">[<b>B XML Information Set Mapping</b>]
+         </a>.
+      </p>
+      
+      
+      <p>XML documents operated on by XPath must conform to the XML
+         Namespaces Recommendation <a href="#XMLNAMES">[XML Names]</a>.
+      </p>
+      
+      
+      <p>The tree contains nodes.  There are seven types of node:</p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>root nodes</p>
+         </li>
+         
+         
+         <li>
+            <p>element nodes</p>
+         </li>
+         
+         
+         <li>
+            <p>text nodes</p>
+         </li>
+         
+         
+         <li>
+            <p>attribute nodes</p>
+         </li>
+         
+         
+         <li>
+            <p>namespace nodes</p>
+         </li>
+         
+         
+         <li>
+            <p>processing instruction nodes</p>
+         </li>
+         
+         
+         <li>
+            <p>comment nodes</p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p><a name="dt-string-value"></a>For every type of
+         node, there is a way of determining a <b>string-value</b> for a
+         node of that type.  For some types of node, the string-value is part
+         of the node; for other types of node, the string-value is computed
+         from the string-value of descendant nodes.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>For element nodes and root nodes, the string-value of a node
+         is not the same as the string returned by the DOM
+         <code>nodeValue</code> method (see <a href="#DOM">[DOM]</a>).
+      </blockquote>
+      
+      
+      <p><a name="dt-expanded-name"></a>Some types of
+         node also have an <b>expanded-name</b>, which is a pair
+         consisting of a local part and a namespace URI. The local part is a
+         string.  The namespace URI is either null or a string.  The namespace
+         URI specified in the XML document can be a URI reference as defined in
+         <a href="#RFC2396">[RFC2396]</a>; this means it can have a fragment identifier
+         and can be relative.  A relative URI should be resolved into an
+         absolute URI during namespace processing: the namespace URIs of
+         <a href="#dt-expanded-name">expanded-name</a>s of nodes in
+         the data model should be absolute. Two <a href="#dt-expanded-name">expanded-name</a>s are equal if they have
+         the same local part, and either both have a null namespace URI or both
+         have non-null namespace URIs that are equal.
+      </p>
+      
+      
+      <p><a name="dt-document-order"></a>There is an
+         ordering, <b>document order</b>, defined on all the nodes in the
+         document corresponding to the order in which the first character of
+         the XML representation of each node occurs in the XML representation
+         of the document after expansion of general entities.  Thus, the root
+         node will be the first node. Element nodes occur before their
+         children. Thus, document order orders element nodes in order of the
+         occurrence of their start-tag in the XML (after expansion of
+         entities). The attribute nodes and namespace nodes of an element occur
+         before the children of the element.  The namespace nodes are defined
+         to occur before the attribute nodes. The relative order of namespace
+         nodes is implementation-dependent.  The relative order of attribute
+         nodes is implementation-dependent. <a name="dt-reverse-document-order"></a><b>Reverse document order</b> is the reverse of <a href="#dt-document-order">document order</a>.
+      </p>
+      
+      
+      <p>Root nodes and element nodes have an ordered list of child nodes.
+         Nodes never share children: if one node is not the same node as
+         another node, then none of the children of the one node will be the
+         same node as any of the children of another node.  <a name="dt-parent"></a>Every node other than the root node has
+         exactly one <b>parent</b>, which is either an element node or
+         the root node. A root node or an element node is the parent
+         of each of its child nodes. <a name="dt-descendants"></a>The <b>descendants</b> of a node are the
+         children of the node and the descendants of the children of the
+         node.
+      </p>
+      
+      
+      
+      <h3><a name="root-node"></a>5.1 Root Node
+      </h3>
+      
+      
+      <p>The root node is the root of the tree.  A root node does not occur
+         except as the root of the tree.  The element node for the document
+         element is a child of the root node.  The root node also has as
+         children processing instruction and comment nodes for processing
+         instructions and comments that occur in the prolog and after the end
+         of the document element.
+      </p>
+      
+      
+      <p>The <a href="#dt-string-value">string-value</a> of the
+         root node is the concatenation of the <a href="#dt-string-value">string-value</a>s of all text node
+         <a href="#dt-descendants">descendants</a> of the root
+         node in document order.
+      </p>
+      
+      
+      <p>The root node does not have an <a href="#dt-expanded-name">expanded-name</a>.
+      </p>
+      
+      
+      
+      
+      
+      <h3><a name="element-nodes"></a>5.2 Element Nodes
+      </h3>
+      
+      
+      <p>There is an element node for every element in the document.  An
+         element node has an <a href="#dt-expanded-name">expanded-name</a> computed by expanding
+         the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> of the element
+         specified in the tag in accordance with the XML Namespaces
+         Recommendation <a href="#XMLNAMES">[XML Names]</a>.  The namespace URI of the
+         element's <a href="#dt-expanded-name">expanded-name</a> will
+         be null if the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> has no
+         prefix and there is no applicable default namespace.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>In the notation of Appendix A.3 of <a href="#XMLNAMES">[XML Names]</a>,
+         the local part of the expanded-name corresponds to the
+         <code>type</code> attribute of the <code>ExpEType</code> element; the
+         namespace URI of the expanded-name corresponds to the <code>ns</code>
+         attribute of the <code>ExpEType</code> element, and is null if the
+         <code>ns</code> attribute of the <code>ExpEType</code> element is
+         omitted.
+      </blockquote>
+      
+      
+      <p>The children of an element node are the element nodes, comment
+         nodes, processing instruction nodes and text nodes for its content.
+         Entity references to both internal and external entities are expanded.
+         Character references are resolved.
+      </p>
+      
+      
+      <p>The <a href="#dt-string-value">string-value</a> of an
+         element node is the concatenation of the <a href="#dt-string-value">string-value</a>s of all text node
+         <a href="#dt-descendants">descendants</a> of the element
+         node in document order.
+      </p>
+      
+      
+      
+      <h4><a name="unique-id"></a>5.2.1 Unique IDs
+      </h4>
+      
+      
+      <p>An element node may have a unique identifier (ID).  This is the
+         value of the attribute that is declared in the DTD as type
+         <code>ID</code>.  No two elements in a document may have the same
+         unique ID.  If an XML processor reports two elements in a document as
+         having the same unique ID (which is possible only if the document is
+         invalid) then the second element in document order must be treated as
+         not having a unique ID.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>If a document does not have a DTD, then no element in the
+         document will have a unique ID.
+      </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="attribute-nodes"></a>5.3 Attribute Nodes
+      </h3>
+      
+      
+      <p>Each element node has an associated set of attribute nodes; the
+         element is the <a href="#dt-parent">parent</a> of each of
+         these attribute nodes; however, an attribute node is not a child of
+         its parent element.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>This is different from the DOM, which does not treat the
+         element bearing an attribute as the parent of the attribute (see
+         <a href="#DOM">[DOM]</a>).
+      </blockquote>
+      
+      
+      <p>Elements never share attribute nodes: if one element node is not
+         the same node as another element node, then none of the attribute
+         nodes of the one element node will be the same node as the attribute
+         nodes of another element node.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The <code>=</code> operator tests whether two nodes have the
+         same value, <i>not</i> whether they are the same node.  Thus
+         attributes of two different elements may compare as equal using
+         <code>=</code>, even though they are not the same node.
+      </blockquote>
+      
+      
+      <p>A defaulted attribute is treated the same as a specified attribute.
+         If an attribute was declared for the element type in the DTD, but the
+         default was declared as <code>#IMPLIED</code>, and the attribute was
+         not specified on the element, then the element's attribute set does
+         not contain a node for the attribute.
+      </p>
+      
+      
+      <p>Some attributes, such as <code>xml:lang</code> and
+         <code>xml:space</code>, have the semantics that they apply to all
+         elements that are descendants of the element bearing the attribute,
+         unless overridden with an instance of the same attribute on another
+         descendant element.  However, this does not affect where attribute
+         nodes appear in the tree: an element has attribute nodes only for
+         attributes that were explicitly specified in the start-tag or
+         empty-element tag of that element or that were explicitly declared in
+         the DTD with a default value.
+      </p>
+      
+      
+      <p>An attribute node has an <a href="#dt-expanded-name">expanded-name</a> and a <a href="#dt-string-value">string-value</a>.  The <a href="#dt-expanded-name">expanded-name</a> is computed by
+         expanding the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> specified in
+         the tag in the XML document in accordance with the XML Namespaces
+         Recommendation <a href="#XMLNAMES">[XML Names]</a>.  The namespace URI of the
+         attribute's name will be null if the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> of the attribute does not have
+         a prefix.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>In the notation of Appendix A.3 of <a href="#XMLNAMES">[XML Names]</a>,
+         the local part of the expanded-name corresponds to the
+         <code>name</code> attribute of the <code>ExpAName</code> element; the
+         namespace URI of the expanded-name corresponds to the <code>ns</code>
+         attribute of the <code>ExpAName</code> element, and is null if the
+         <code>ns</code> attribute of the <code>ExpAName</code> element is
+         omitted.
+      </blockquote>
+      
+      
+      <p>An attribute node has a <a href="#dt-string-value">string-value</a>.  The <a href="#dt-string-value">string-value</a> is the normalized value
+         as specified by the XML Recommendation <a href="#XML">[XML]</a>.  An
+         attribute whose normalized value is a zero-length string is not
+         treated specially: it results in an attribute node whose <a href="#dt-string-value">string-value</a> is a zero-length
+         string.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>It is possible for default attributes to be declared in an
+         external DTD or an external parameter entity.  The XML Recommendation
+         does not require an XML processor to read an external DTD or an
+         external parameter unless it is validating. A stylesheet or other facility that assumes
+         that the XPath tree contains default attribute values declared in an
+         external DTD or parameter entity may not work with some non-validating
+         XML processors.
+      </blockquote>
+      
+      
+      <p>There are no attribute nodes corresponding to attributes that
+         declare namespaces (see <a href="#XMLNAMES">[XML Names]</a>).
+      </p>
+      
+      
+      
+      
+      
+      <h3><a name="namespace-nodes"></a>5.4 Namespace Nodes
+      </h3>
+      
+      
+      <p>Each element has an associated set of namespace nodes, one for each
+         distinct namespace prefix that is in scope for the element (including
+         the <code>xml</code> prefix, which is implicitly declared by the XML
+         Namespaces Recommendation <a href="#XMLNAMES">[XML Names]</a>) and one for
+         the default namespace if one is in scope for the element.  The element
+         is the <a href="#dt-parent">parent</a> of each of these
+         namespace nodes; however, a namespace node is not a child of
+         its parent element.  Elements never share namespace nodes: if one element
+         node is not the same node as another element node, then none of the
+         namespace nodes of the one element node will be the same node as the
+         namespace nodes of another element node. This means that an element
+         will have a namespace node:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>for every attribute on the element whose name starts with
+               <code>xmlns:</code>;
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>for every attribute on an ancestor element whose name starts
+               <code>xmlns:</code> unless the element itself or a nearer ancestor
+               redeclares the prefix;
+            </p>
+         </li>
+         
+         
+         <li>
+            
+            
+            <p>for an <code>xmlns</code> attribute, if the element or some
+               ancestor has an <code>xmlns</code> attribute, and the value of the
+               <code>xmlns</code> attribute for the nearest such element is
+               non-empty
+            </p>
+            
+            
+            <blockquote><b>NOTE: </b>An attribute <code>xmlns=""</code> "undeclares"
+               the default namespace (see <a href="#XMLNAMES">[XML Names]</a>).
+            </blockquote>
+            
+            
+         </li>
+         
+         
+      </ul>
+      
+      
+      <p>A namespace node has an <a href="#dt-expanded-name">expanded-name</a>: the local part is
+         the namespace prefix (this is empty if the namespace node is for the
+         default namespace); the namespace URI is always null.
+      </p>
+      
+      
+      <p>The <a href="#dt-string-value">string-value</a> of a
+         namespace node is the namespace URI that is being bound to the
+         namespace prefix; if it is relative, it must be resolved just like a
+         namespace URI in an <a href="#dt-expanded-name">expanded-name</a>.
+      </p>
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Processing-Instruction-Nodes"></a>5.5 Processing Instruction Nodes
+      </h3>
+      
+      
+      <p>There is a processing instruction node for every processing
+         instruction, except for any processing instruction that occurs within
+         the document type declaration.
+      </p>
+      
+      
+      <p>A processing instruction has an <a href="#dt-expanded-name">expanded-name</a>: the local part is
+         the processing instruction's target; the namespace URI is null.  The
+         <a href="#dt-string-value">string-value</a> of a processing
+         instruction node is the part of the processing instruction following
+         the target and any whitespace.  It does not include the terminating
+         <code>?></code>.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>The XML declaration is not a processing instruction.
+         Therefore, there is no processing instruction node corresponding to the
+         XML declaration.
+      </blockquote>
+      
+      
+      
+      
+      
+      <h3><a name="section-Comment-Nodes"></a>5.6 Comment Nodes
+      </h3>
+      
+      
+      <p>There is a comment node for every comment, except for any comment that
+         occurs within the document type declaration.
+      </p>
+      
+      
+      <p>The <a href="#dt-string-value">string-value</a> of
+         comment is the content of the comment not including the opening
+         <code>&lt;!--</code> or the closing <code>--></code>.
+      </p>
+      
+      
+      <p>A comment node does not have an <a href="#dt-expanded-name">expanded-name</a>.
+      </p>
+      
+      
+      
+      
+      
+      <h3><a name="section-Text-Nodes"></a>5.7 Text Nodes
+      </h3>
+      
+      
+      <p>Character data is grouped into text nodes.  As much character data
+         as possible is grouped into each text node: a text node never has an
+         immediately following or preceding sibling that is a text node.  The
+         <a href="#dt-string-value">string-value</a> of a text node
+         is the character data.  A text node always has at least one character
+         of data.
+      </p>
+      
+      
+      <p>Each character within a CDATA section is treated as character data.
+         Thus, <code>&lt;![CDATA[&lt;]]></code> in the source document will
+         treated the same as <code>&amp;lt;</code>.  Both will result in a
+         single <code>&lt;</code> character in a text node in the tree.  Thus, a
+         CDATA section is treated as if the <code>&lt;![CDATA[</code> and
+         <code>]]></code> were removed and every occurrence of
+         <code>&lt;</code> and <code>&amp;</code> were replaced by
+         <code>&amp;lt;</code> and <code>&amp;amp;</code> respectively.
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>When a text node that contains a <code>&lt;</code> character
+         is written out as XML, the <code>&lt;</code> character must be escaped
+         by, for example, using <code>&amp;lt;</code>, or including it in a
+         CDATA section.
+      </blockquote>
+      
+      
+      <p>Characters inside comments, processing instructions and attribute
+         values do not produce text nodes. Line-endings in external entities
+         are normalized to #xA as specified in the XML Recommendation <a href="#XML">[XML]</a>.
+      </p>
+      
+      
+      <p>A text node does not have an <a href="#dt-expanded-name">expanded-name</a>.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Conformance"></a>6 Conformance
+      </h2>
+      
+      
+      <p>XPath is intended primarily as a component that can be used by
+         other specifications. Therefore, XPath relies on specifications that
+         use XPath (such as <a href="#XPTR">[XPointer]</a> and <a href="#XSLT">[XSLT]</a>) to
+         specify criteria for conformance of implementations of XPath and does
+         not define any conformance criteria for independent implementations of
+         XPath.
+      </p>
+      
+      
+      
+      
+      
+      
+      <hr title="Separator from footer">
+      
+      
+      <h2><a name="section-References"></a>A References
+      </h2>
+      
+      
+      <h3><a name="section-Normative-References"></a>A.1 Normative References
+      </h3>
+      
+      
+      <dl>
+         
+         
+         <dt><a name="IEEE754">IEEE 754</a></dt>
+         <dd>Institute of Electrical and
+            Electronics Engineers. <i>IEEE Standard for Binary Floating-Point
+               Arithmetic
+            </i>. ANSI/IEEE Std 754-1985.
+         </dd>
+         
+         
+         <dt><a name="RFC2396">RFC2396</a></dt>
+         <dd>T. Berners-Lee, R. Fielding, and
+            L. Masinter.  <i>Uniform Resource Identifiers (URI): Generic
+               Syntax
+            </i>. IETF RFC 2396. See <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a>.
+         </dd>
+         
+         
+         <dt><a name="XML">XML</a></dt>
+         <dd>World Wide Web Consortium. <i>Extensible
+               Markup Language (XML) 1.0.
+            </i> W3C Recommendation. See <a href="http://www.w3.org/TR/1998/REC-xml-19980210">http://www.w3.org/TR/1998/REC-xml-19980210</a></dd>
+         
+         
+         <dt><a name="XMLNAMES">XML Names</a></dt>
+         <dd>World Wide Web
+            Consortium. <i>Namespaces in XML.</i> W3C Recommendation. See
+            <a href="http://www.w3.org/TR/REC-xml-names">http://www.w3.org/TR/REC-xml-names</a></dd>
+         
+         
+      </dl>
+      
+      
+      
+      <h3><a name="section-Other-References"></a>A.2 Other References
+      </h3>
+      
+      
+      <dl>
+         
+         
+         <dt><a name="CHARMOD">Character Model</a></dt>
+         <dd>World Wide Web Consortium.
+            <i>Character Model for the World Wide Web.</i> W3C Working
+            Draft. See <a href="http://www.w3.org/TR/WD-charmod">http://www.w3.org/TR/WD-charmod</a></dd>
+         
+         
+         <dt><a name="DOM">DOM</a></dt>
+         <dd>World Wide Web Consortium.  <i>Document
+               Object Model (DOM) Level 1 Specification.
+            </i> W3C
+            Recommendation. See <a href="http://www.w3.org/TR/REC-DOM-Level-1">http://www.w3.org/TR/REC-DOM-Level-1</a></dd>
+         
+         
+         <dt><a name="JLS">JLS</a></dt>
+         <dd>J. Gosling, B. Joy, and G. Steele.  <i>The
+               Java Language Specification
+            </i>. See <a href="http://java.sun.com/docs/books/jls/index.html">http://java.sun.com/docs/books/jls/index.html</a>.
+         </dd>
+         
+         
+         <dt><a name="ISO10646">ISO/IEC 10646</a></dt>
+         <dd>ISO (International
+            Organization for Standardization).  <i>ISO/IEC 10646-1:1993,
+               Information technology -- Universal Multiple-Octet Coded Character Set
+               (UCS) -- Part 1: Architecture and Basic Multilingual Plane
+            </i>.
+            International Standard. See <a href="http://www.iso.ch/cate/d18741.html">http://www.iso.ch/cate/d18741.html</a>.
+         </dd>
+         
+         
+         <dt><a name="TEI">TEI</a></dt>
+         <dd>C.M. Sperberg-McQueen, L. Burnard
+            <i>Guidelines for Electronic Text Encoding and
+               Interchange
+            </i>. See <a href="http://etext.virginia.edu/TEI.html">http://etext.virginia.edu/TEI.html</a>.
+         </dd>
+         
+         
+         <dt><a name="UNICODE">Unicode</a></dt>
+         <dd>Unicode Consortium. <i>The Unicode
+               Standard
+            </i>.  See <a href="http://www.unicode.org/unicode/standard/standard.html">http://www.unicode.org/unicode/standard/standard.html</a>.
+         </dd>
+         
+         
+         <dt><a name="XINFO">XML Infoset</a></dt>
+         <dd>World Wide Web
+            Consortium. <i>XML Information Set.</i> W3C Working Draft. See
+            <a href="http://www.w3.org/TR/xml-infoset">http://www.w3.org/TR/xml-infoset</a>
+            
+         </dd>
+         
+         
+         <dt><a name="XPTR">XPointer</a></dt>
+         <dd>World Wide Web Consortium. <i>XML
+               Pointer Language (XPointer).
+            </i> W3C Working Draft. See <a href="http://www.w3.org/TR/WD-xptr">http://www.w3.org/TR/WD-xptr</a></dd>
+         
+         
+         <dt><a name="XQL">XQL</a></dt>
+         <dd>J. Robie, J. Lapp, D. Schach.
+            <i>XML Query Language (XQL)</i>. See
+            <a href="http://www.w3.org/TandS/QL/QL98/pp/xql.html">http://www.w3.org/TandS/QL/QL98/pp/xql.html</a></dd>
+         
+         
+         <dt><a name="XSLT">XSLT</a></dt>
+         <dd>World Wide Web Consortium.  <i>XSL
+               Transformations (XSLT).
+            </i> W3C Recommendation.  See <a href="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</a></dd>
+         
+         
+      </dl>
+      
+      
+      
+      
+      
+      
+      <h2><a name="infoset"></a>B XML Information Set Mapping (Non-Normative)
+      </h2>
+      
+      
+      <p>The nodes in the XPath data model can be derived from the
+         information items provided by the XML Information Set <a href="#XINFO">[XML Infoset]</a> as follows:
+      </p>
+      
+      
+      <blockquote><b>NOTE: </b>A new version of the XML Information Set Working Draft, which
+         will replace the May 17 version, was close to completion at the time
+         when the preparation of this version of XPath was completed and was
+         expected to be released at the same time or shortly after the release
+         of this version of XPath.  The mapping is given for this new version
+         of the XML Information Set Working Draft. If the new version of the
+         XML Information Set Working has not yet been released, W3C members may
+         consult the internal Working Group version <a href="http://www.w3.org/XML/Group/1999/09/WD-xml-infoset-19990915.html">
+            http://www.w3.org/XML/Group/1999/09/WD-xml-infoset-19990915.html
+         </a>
+         (<a href="http://cgi.w3.org/MemberAccess/">members
+            only
+         </a>).
+      </blockquote>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p>The root node comes from the document information item.  The
+               children of the root node come from the <i>children</i> and <i>children - comments</i>
+               properties.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>An element node comes from an element information item.  The
+               children of an element node come from the <i>children</i> and <i>children - comments</i> properties. The
+               attributes of an element node come from the <i>attributes</i> property.  The namespaces
+               of an element node come from the <i>in-scope namespaces</i> property.  The
+               local part of the <a href="#dt-expanded-name">expanded-name</a> of the element node
+               comes from the <i>local name</i>
+               property.  The namespace URI of the <a href="#dt-expanded-name">expanded-name</a> of the element node
+               comes from the <i>namespace URI</i>
+               property. The unique ID of the element node comes from the <i>children</i> property of the attribute
+               information item in the <i>attributes</i> property that has an <i>attribute type</i> property equal to
+               <code>ID</code>.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>An attribute node comes from an attribute information item.
+               The local part of the <a href="#dt-expanded-name">expanded-name</a> of the attribute node
+               comes from the <i>local name</i>
+               property.  The namespace URI of the <a href="#dt-expanded-name">expanded-name</a> of the attribute node
+               comes from the <i>namespace URI</i>
+               property. The <a href="#dt-string-value">string-value</a> of
+               the node comes from concatenating the <i>character code</i> property of each member
+               of the <i>children</i>
+               property.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>A text node comes from a sequence of one or more consecutive
+               character information items.  The <a href="#dt-string-value">string-value</a> of the node comes from
+               concatenating the <i>character code</i>
+               property of each of the character information items.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>A processing instruction node comes from a processing
+               instruction information item.  The local part of the <a href="#dt-expanded-name">expanded-name</a> of the node comes from
+               the <i>target</i> property. (The
+               namespace URI part of the <a href="#dt-expanded-name">expanded-name</a> of the node is null.)
+               The <a href="#dt-string-value">string-value</a> of the node
+               comes from the <i>content</i>
+               property. There are no processing instruction nodes for processing
+               instruction items that are children of document type declaration
+               information item.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>A comment node comes from a comment information item.  The
+               <a href="#dt-string-value">string-value</a> of the node
+               comes from the <i>content</i> property.
+               There are no comment nodes for comment information items that are
+               children of document type declaration information item.
+            </p>
+         </li>
+         
+         
+         <li>
+            <p>A namespace node comes from a namespace declaration
+               information item.  The local part of the <a href="#dt-expanded-name">expanded-name</a> of the node comes from
+               the <i>prefix</i> property.  (The
+               namespace URI part of the <a href="#dt-expanded-name">expanded-name</a> of the node is null.)
+               The <a href="#dt-string-value">string-value</a> of the node
+               comes from the <i>namespace URI</i>
+               property.
+            </p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk056.out b/test/tests/contrib-gold/xsltc/mk/mk056.out
new file mode 100644
index 0000000..7b2bdc6
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk056.out
@@ -0,0 +1,13076 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <title>XSL Transformations (XSLT)</title>
+      <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC"><style type="text/css">p.element-syntax { border: solid thin }code { font-family: monospace }</style></head>
+   <body>
+      
+      
+      <div class="head"><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/WWW/w3c_home" alt="W3C" height="48" width="72"></a><h1>XSL Transformations (XSLT)<br>Version 1.0
+         </h1>
+         <h2>W3C Recommendation 16 November 1999</h2>
+         <dl>
+            <dt>This version:</dt>
+            <dd>
+               
+               <a href="http://www.w3.org/TR/1999/REC-xslt-19991116">http://www.w3.org/TR/1999/REC-xslt-19991116</a><br>
+               
+               (available in <a href="http://www.w3.org/TR/1999/REC-xslt-19991116.xml">XML</a> or 
+               
+               <a href="http://www.w3.org/TR/1999/REC-xslt-19991116.html">HTML</a>)
+               
+               
+               
+               
+            </dd>
+            <dt>Latest version:</dt>
+            <dd>
+               
+               <a href="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</a><br>
+               
+               
+            </dd>
+            <dt>Previous versions:</dt>
+            <dd>
+               
+               <a href="http://www.w3.org/TR/1999/PR-xslt-19991008">http://www.w3.org/TR/1999/PR-xslt-19991008</a><br>
+               
+               <a href="http://www.w3.org/1999/08/WD-xslt-19990813">http://www.w3.org/1999/08/WD-xslt-19990813</a><br>
+               
+               <a href="http://www.w3.org/1999/07/WD-xslt-19990709">http://www.w3.org/1999/07/WD-xslt-19990709</a><br>
+               
+               <a href="http://www.w3.org/TR/1999/WD-xslt-19990421">http://www.w3.org/TR/1999/WD-xslt-19990421</a><br>
+               
+               <a href="http://www.w3.org/TR/1998/WD-xsl-19981216">http://www.w3.org/TR/1998/WD-xsl-19981216</a><br>
+               
+               <a href="http://www.w3.org/TR/1998/WD-xsl-19980818">http://www.w3.org/TR/1998/WD-xsl-19980818</a><br>
+               
+               
+            </dd>
+            <dt>Editor:</dt>
+            <dd>
+               
+               
+               
+               James Clark
+               
+               <a href="mailto:jjc@jclark.com">&lt;jjc@jclark.com></a>
+               
+               <br>
+               
+               
+            </dd>
+         </dl>
+         <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright">
+               		Copyright
+            </a> &nbsp;&copy;&nbsp; 1999 <a href="http://www.w3.org">W3C</a>
+            		(<a href="http://www.lcs.mit.edu">MIT</a>,
+            		<a href="http://www.inria.fr/">INRIA</a>,
+            		<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C
+            		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Legal_Disclaimer">liability</a>,
+            		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#W3C_Trademarks">trademark</a>,
+            		<a href="http://www.w3.org/Consortium/Legal/copyright-documents.html">document use</a> and
+            		<a href="http://www.w3.org/Consortium/Legal/copyright-software.html">software licensing</a> rules apply.
+            	
+         </p>
+         <hr title="Separator for header">
+      </div>
+      <h2><a name="abstract">Abstract</a></h2>
+      
+      
+      
+      
+      <p>This specification defines the syntax and semantics of XSLT, which
+         
+         is a language for transforming XML documents into other XML
+         
+         documents.
+      </p>
+      
+      
+      
+      
+      <p>XSLT is designed for use as part of XSL, which is a stylesheet
+         
+         language for XML. In addition to XSLT, XSL includes an XML vocabulary
+         
+         for specifying formatting.  XSL specifies the styling of an XML
+         
+         document by using XSLT to describe how the document is transformed
+         
+         into another XML document that uses the formatting vocabulary.
+      </p>
+      
+      
+      
+      
+      <p>XSLT is also designed to be used independently of XSL.  However,
+         
+         XSLT is not intended as a completely general-purpose XML
+         
+         transformation language.  Rather it is designed primarily for the
+         
+         kinds of transformations that are needed when XSLT is used as part of
+         
+         XSL.
+      </p>
+      
+      
+      
+      
+      <h2><a name="status">Status of this document</a></h2>
+      
+      
+      
+      
+      <p>This document has been reviewed by W3C Members and other interested
+         
+         parties and has been endorsed by the Director as a W3C <a href="http://www.w3.org/Consortium/Process/#RecsW3C">Recommendation</a>. It
+         
+         is a stable document and may be used as reference material or cited as
+         
+         a normative reference from other documents. W3C's role in making the
+         
+         Recommendation is to draw attention to the specification and to
+         
+         promote its widespread deployment. This enhances the functionality and
+         
+         interoperability of the Web.
+      </p>
+      
+      
+      
+      
+      <p>The list of known errors in this specification is available at
+         
+         <a href="http://www.w3.org/1999/11/REC-xslt-19991116-errata">http://www.w3.org/1999/11/REC-xslt-19991116-errata</a>.
+      </p>
+      
+      
+      
+      
+      <p>Comments on this specification may be sent to <a href="mailto:xsl-editors@w3.org">xsl-editors@w3.org</a>; <a href="http://lists.w3.org/Archives/Public/xsl-editors">archives</a>
+         
+         of the comments are available.  Public discussion of XSL, including
+         
+         XSL Transformations, takes place on the <a href="http://www.mulberrytech.com/xsl/xsl-list/index.html">XSL-List</a>
+         
+         mailing list.
+      </p>
+      
+      
+      
+      
+      <p>The English version of this specification is the only normative
+         
+         version. However, for translations of this document, see <a href="http://www.w3.org/Style/XSL/translations.html">http://www.w3.org/Style/XSL/translations.html</a>.
+      </p>
+      
+      
+      
+      
+      <p>A list of current W3C Recommendations and other technical documents
+         
+         can be found at <a href="http://www.w3.org/TR">http://www.w3.org/TR</a>.
+      </p>
+      
+      
+      
+      
+      <p>This specification has been produced as part of the <a href="http://www.w3.org/Style/Activity">W3C Style activity</a>.
+      </p>
+      
+      
+      
+      
+      
+      
+      <h2><a name="contents">Table of contents</a></h2>1 <a href="#section-Introduction">Introduction</a><br>2 <a href="#section-Stylesheet-Structure">Stylesheet Structure</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.1 <a href="#xslt-namespace">XSLT Namespace</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.2 <a href="#stylesheet-element">Stylesheet Element</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.3 <a href="#result-element-stylesheet">Literal Result Element as Stylesheet</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.4 <a href="#qname">Qualified Names</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.5 <a href="#forwards">Forwards-Compatible Processing</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.6 <a href="#section-Combining-Stylesheets">Combining Stylesheets</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.6.1 <a href="#include">Stylesheet Inclusion</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.6.2 <a href="#import">Stylesheet Import</a><br>&nbsp;&nbsp;&nbsp;&nbsp;2.7 <a href="#section-Embedding-Stylesheets">Embedding Stylesheets</a><br>3 <a href="#data-model">Data Model</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.1 <a href="#root-node-children">Root Node Children</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.2 <a href="#base-uri">Base URI</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.3 <a href="#unparsed-entities">Unparsed Entities</a><br>&nbsp;&nbsp;&nbsp;&nbsp;3.4 <a href="#strip">Whitespace Stripping</a><br>4 <a href="#section-Expressions">Expressions</a><br>5 <a href="#rules">Template Rules</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.1 <a href="#section-Processing-Model">Processing Model</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.2 <a href="#patterns">Patterns</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.3 <a href="#section-Defining-Template-Rules">Defining Template Rules</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.4 <a href="#section-Applying-Template-Rules">Applying Template Rules</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.5 <a href="#conflict">Conflict Resolution for Template Rules</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.6 <a href="#apply-imports">Overriding Template Rules</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.7 <a href="#modes">Modes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;5.8 <a href="#built-in-rule">Built-in Template Rules</a><br>6 <a href="#named-templates">Named Templates</a><br>7 <a href="#section-Creating-the-Result-Tree">Creating the Result Tree</a><br>&nbsp;&nbsp;&nbsp;&nbsp;7.1 <a href="#section-Creating-Elements-and-Attributes">Creating Elements and Attributes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.1.1 <a href="#literal-result-element">Literal Result Elements</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.1.2 <a href="#section-Creating-Elements-with-xsl:element">Creating Elements with xsl:element</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.1.3 <a href="#creating-attributes">Creating Attributes with xsl:attribute</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.1.4 <a href="#attribute-sets">Named Attribute Sets</a><br>&nbsp;&nbsp;&nbsp;&nbsp;7.2 <a href="#section-Creating-Text">Creating Text</a><br>&nbsp;&nbsp;&nbsp;&nbsp;7.3 <a href="#section-Creating-Processing-Instructions">Creating Processing Instructions</a><br>&nbsp;&nbsp;&nbsp;&nbsp;7.4 <a href="#section-Creating-Comments">Creating Comments</a><br>&nbsp;&nbsp;&nbsp;&nbsp;7.5 <a href="#copying">Copying</a><br>&nbsp;&nbsp;&nbsp;&nbsp;7.6 <a href="#section-Computing-Generated-Text">Computing Generated Text</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.6.1 <a href="#value-of">Generating Text with xsl:value-of</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.6.2 <a href="#attribute-value-templates">Attribute Value Templates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;7.7 <a href="#number">Numbering</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.7.1 <a href="#convert">Number to String Conversion Attributes</a><br>8 <a href="#for-each">Repetition</a><br>9 <a href="#section-Conditional-Processing">Conditional Processing</a><br>&nbsp;&nbsp;&nbsp;&nbsp;9.1 <a href="#section-Conditional-Processing-with-xsl:if">Conditional Processing with xsl:if</a><br>&nbsp;&nbsp;&nbsp;&nbsp;9.2 <a href="#section-Conditional-Processing-with-xsl:choose">Conditional Processing with xsl:choose</a><br>10 <a href="#sorting">Sorting</a><br>11 <a href="#variables">Variables and Parameters</a><br>&nbsp;&nbsp;&nbsp;&nbsp;11.1 <a href="#section-Result-Tree-Fragments">Result Tree Fragments</a><br>&nbsp;&nbsp;&nbsp;&nbsp;11.2 <a href="#variable-values">Values of Variables and Parameters</a><br>&nbsp;&nbsp;&nbsp;&nbsp;11.3 <a href="#copy-of">Using Values of Variables and Parameters with
+         
+         xsl:copy-of
+      </a><br>&nbsp;&nbsp;&nbsp;&nbsp;11.4 <a href="#top-level-variables">Top-level Variables and Parameters</a><br>&nbsp;&nbsp;&nbsp;&nbsp;11.5 <a href="#local-variables">Variables and Parameters within Templates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;11.6 <a href="#section-Passing-Parameters-to-Templates">Passing Parameters to Templates</a><br>12 <a href="#add-func">Additional Functions</a><br>&nbsp;&nbsp;&nbsp;&nbsp;12.1 <a href="#document">Multiple Source Documents</a><br>&nbsp;&nbsp;&nbsp;&nbsp;12.2 <a href="#key">Keys</a><br>&nbsp;&nbsp;&nbsp;&nbsp;12.3 <a href="#format-number">Number Formatting</a><br>&nbsp;&nbsp;&nbsp;&nbsp;12.4 <a href="#misc-func">Miscellaneous Additional Functions</a><br>13 <a href="#message">Messages</a><br>14 <a href="#extension">Extensions</a><br>&nbsp;&nbsp;&nbsp;&nbsp;14.1 <a href="#extension-element">Extension Elements</a><br>&nbsp;&nbsp;&nbsp;&nbsp;14.2 <a href="#section-Extension-Functions">Extension Functions</a><br>15 <a href="#fallback">Fallback</a><br>16 <a href="#output">Output</a><br>&nbsp;&nbsp;&nbsp;&nbsp;16.1 <a href="#section-XML-Output-Method">XML Output Method</a><br>&nbsp;&nbsp;&nbsp;&nbsp;16.2 <a href="#section-HTML-Output-Method">HTML Output Method</a><br>&nbsp;&nbsp;&nbsp;&nbsp;16.3 <a href="#section-Text-Output-Method">Text Output Method</a><br>&nbsp;&nbsp;&nbsp;&nbsp;16.4 <a href="#disable-output-escaping">Disabling Output Escaping</a><br>17 <a href="#conformance">Conformance</a><br>18 <a href="#notation">Notation</a><br><h3>Appendices</h3>A <a href="#section-References">References</a><br>&nbsp;&nbsp;&nbsp;&nbsp;A.1 <a href="#section-Normative-References">Normative References</a><br>&nbsp;&nbsp;&nbsp;&nbsp;A.2 <a href="#section-Other-References">Other References</a><br>B <a href="#element-syntax-summary">Element Syntax Summary</a><br>C <a href="#dtd">DTD Fragment for XSLT Stylesheets</a> (Non-Normative)<br>D <a href="#section-Examples">Examples</a> (Non-Normative)<br>&nbsp;&nbsp;&nbsp;&nbsp;D.1 <a href="#section-Document-Example">Document Example</a><br>&nbsp;&nbsp;&nbsp;&nbsp;D.2 <a href="#data-example">Data Example</a><br>E <a href="#section-Acknowledgements">Acknowledgements</a> (Non-Normative)<br>F <a href="#section-Changes-from-Proposed-Recommendation">Changes from Proposed Recommendation</a> (Non-Normative)<br>G <a href="#section-Features-under-Consideration-for-Future-Versions-of-XSLT">Features under Consideration for Future Versions of XSLT</a> (Non-Normative)<br><hr>
+      
+      
+      
+      
+      <h2><a name="section-Introduction"></a>1 Introduction
+      </h2>
+      
+      
+      
+      
+      <p>This specification defines the syntax and semantics of the XSLT
+         
+         language.  A transformation in the XSLT language is expressed as a
+         
+         well-formed XML document <a href="#XML">[XML]</a> conforming to the
+         
+         Namespaces in XML Recommendation <a href="#XMLNAMES">[XML Names]</a>, which may
+         
+         include both elements that are defined by XSLT and elements that are
+         
+         not defined by XSLT.  <a name="dt-xslt-namespace"></a>XSLT-defined elements are distinguished by belonging to a
+         
+         specific XML namespace (see <a href="#xslt-namespace">[<b>2.1 XSLT Namespace</b>]
+         </a>), which is
+         
+         referred to in this specification as the <b>XSLT
+            
+            namespace
+         </b>. Thus this specification is a definition of
+         
+         the syntax and semantics of the XSLT namespace.
+      </p>
+      
+      
+      
+      
+      <p>A transformation expressed in XSLT describes rules for transforming
+         
+         a source tree into a result tree.  The transformation is achieved by
+         
+         associating patterns with templates.  A pattern is matched against
+         
+         elements in the source tree.  A template is instantiated to create
+         
+         part of the result tree.  The result tree is separate from the source
+         
+         tree.  The structure of the result tree can be completely different
+         
+         from the structure of the source tree. In constructing the result
+         
+         tree, elements from the source tree can be filtered and reordered, and
+         
+         arbitrary structure can be added.
+      </p>
+      
+      
+      
+      
+      <p>A transformation expressed in XSLT is called a stylesheet.  This is
+         
+         because, in the case when XSLT is transforming into the XSL formatting
+         
+         vocabulary, the transformation functions as a stylesheet.
+      </p>
+      
+      
+      
+      
+      <p>This document does not specify how an XSLT stylesheet is associated
+         
+         with an XML document.  It is recommended that XSL processors support
+         
+         the mechanism described in <a href="#XMLSTYLE">[XML Stylesheet]</a>.  When this or any
+         
+         other mechanism yields a sequence of more than one XSLT stylesheet to
+         
+         be applied simultaneously to a XML document, then the effect
+         
+         should be the same as applying a single stylesheet that imports each
+         
+         member of the sequence in order (see <a href="#import">[<b>2.6.2 Stylesheet Import</b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p>A stylesheet contains a set of template rules.  A template rule has
+         
+         two parts: a pattern which is matched against nodes in the source tree
+         
+         and a template which can be instantiated to form part of the result
+         
+         tree.  This allows a stylesheet to be applicable to a wide class of
+         
+         documents that have similar source tree structures.
+      </p>
+      
+      
+      
+      
+      <p>A template is instantiated for a particular source element
+         
+         to create part of the result tree. A template can contain elements
+         
+         that specify literal result element structure.  A template can also
+         
+         contain elements from the XSLT namespace
+         
+         that are instructions for creating result tree
+         
+         fragments.  When a template is instantiated, each instruction is
+         
+         executed and replaced by the result tree fragment that it creates.
+         
+         Instructions can select and process descendant source elements.  Processing a
+         
+         descendant element creates a result tree fragment by finding the
+         
+         applicable template rule and instantiating its template. Note
+         
+         that elements are only processed when they have been selected by the
+         
+         execution of an instruction.  The result tree is constructed by
+         
+         finding the template rule for the root node and instantiating
+         
+         its template.
+      </p>
+      
+      
+      
+      
+      <p>In the process of finding the applicable template rule, more
+         
+         than one template rule may have a pattern that matches a given
+         
+         element. However, only one template rule will be applied. The
+         
+         method for deciding which template rule to apply is described
+         
+         in <a href="#conflict">[<b>5.5 Conflict Resolution for Template Rules</b>]
+         </a>.
+      </p>
+      
+      
+      
+      
+      <p>A single template by itself has considerable power: it can create
+         
+         structures of arbitrary complexity; it can pull string values out of
+         
+         arbitrary locations in the source tree; it can generate structures
+         
+         that are repeated according to the occurrence of elements in the
+         
+         source tree.  For simple transformations where the structure of the
+         
+         result tree is independent of the structure of the source tree, a
+         
+         stylesheet can often consist of only a single template, which
+         
+         functions as a template for the complete result tree.  Transformations
+         
+         on XML documents that represent data are often of this kind (see
+         
+         <a href="#data-example">[<b>D.2 Data Example</b>]
+         </a>). XSLT allows a simplified syntax for
+         
+         such stylesheets (see <a href="#result-element-stylesheet">[<b>2.3 Literal Result Element as Stylesheet</b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p>When a template is instantiated, it is always instantiated with
+         
+         respect to a <a name="dt-current-node"></a><b>current node</b> and a <a name="dt-current-node-list"></a><b>current node
+            
+            list
+         </b>. The current node is always a member of the
+         
+         current node list.  Many operations in XSLT are relative to the
+         
+         current node. Only a few instructions change the current node list or
+         
+         the current node (see <a href="#rules">[<b>5 Template Rules</b>]
+         </a> and <a href="#for-each">[<b>8 Repetition</b>]
+         </a>); during the instantiation of one of these
+         
+         instructions, the current node list changes to a new list of nodes and
+         
+         each member of this new list becomes the current node in turn; after
+         
+         the instantiation of the instruction is complete, the current node and
+         
+         current node list revert to what they were before the instruction was
+         
+         instantiated.
+      </p>
+      
+      
+      
+      
+      <p>XSLT makes use of the expression language defined by <a href="#XPATH">[XPath]</a> for selecting elements for processing, for conditional
+         
+         processing and for generating text.
+      </p>
+      
+      
+      
+      
+      <p>XSLT provides two "hooks" for extending the language,
+         
+         one hook for extending the set of instruction elements used in
+         
+         templates and one hook for extending the set of functions used in
+         
+         XPath expressions.  These hooks are both based on XML namespaces.
+         
+         This version of XSLT does not define a mechanism for implementing the
+         
+         hooks. See <a href="#extension">[<b>14 Extensions</b>]
+         </a>.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>The XSL WG intends to define such a mechanism in a future
+         
+         version of this specification or in a separate
+         
+         specification.
+      </blockquote>
+      
+      
+      
+      
+      <p>The element syntax summary notation used to describe the syntax of
+         
+         XSLT-defined elements is described in <a href="#notation">[<b>18 Notation</b>]
+         </a>.
+      </p>
+      
+      
+      
+      
+      <p>The MIME media types <code>text/xml</code> and
+         
+         <code>application/xml</code> <a href="#RFC2376">[RFC2376]</a> should be used
+         
+         for XSLT stylesheets.  It is possible that a media type will be
+         
+         registered specifically for XSLT stylesheets; if and when it is, that
+         
+         media type may also be used.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Stylesheet-Structure"></a>2 Stylesheet Structure
+      </h2>
+      
+      
+      
+      
+      
+      
+      <h3><a name="xslt-namespace"></a>2.1 XSLT Namespace
+      </h3>
+      
+      
+      
+      
+      <p>The XSLT namespace has the URI <code>http://www.w3.org/1999/XSL/Transform</code>.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>The <code>1999</code> in the URI indicates the year in which
+         
+         the URI was allocated by the W3C.  It does not indicate the version of
+         
+         XSLT being used, which is specified by attributes (see <a href="#stylesheet-element">[<b>2.2 Stylesheet Element</b>]
+         </a> and <a href="#result-element-stylesheet">[<b>2.3 Literal Result Element as Stylesheet</b>]
+         </a>).
+      </blockquote>
+      
+      
+      
+      
+      <p>XSLT processors must use the XML namespaces mechanism <a href="#XMLNAMES">[XML Names]</a> to recognize elements and attributes from this
+         
+         namespace. Elements from the XSLT namespace are recognized only in the
+         
+         stylesheet not in the source document. The complete list of
+         
+         XSLT-defined elements is specified in <a href="#element-syntax-summary">[<b>B Element Syntax Summary</b>]
+         </a>.  Vendors must not extend the XSLT
+         
+         namespace with additional elements or attributes. Instead, any
+         
+         extension must be in a separate namespace.  Any namespace that is used
+         
+         for additional instruction elements must be identified by means of the
+         
+         extension element mechanism specified in <a href="#extension-element">[<b>14.1 Extension Elements</b>]
+         </a>.
+      </p>
+      
+      
+      
+      
+      <p>This specification uses a prefix of <code>xsl:</code> for referring
+         
+         to elements in the XSLT namespace. However, XSLT stylesheets are free
+         
+         to use any prefix, provided that there is a namespace declaration that
+         
+         binds the prefix to the URI of the XSLT namespace.
+      </p>
+      
+      
+      
+      
+      <p>An element from the XSLT namespace may have any attribute not from
+         
+         the XSLT namespace, provided that the <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a> of the
+         
+         attribute has a non-null namespace URI.  The presence of such
+         
+         attributes must not change the behavior of XSLT elements and functions
+         
+         defined in this document. Thus, an XSLT processor is always free to
+         
+         ignore such attributes, and must ignore such attributes without giving
+         
+         an error if it does not recognize the namespace URI. Such attributes
+         
+         can provide, for example, unique identifiers, optimization hints, or
+         
+         documentation.
+      </p>
+      
+      
+      
+      
+      <p>It is an error for an element from the XSLT namespace to have
+         
+         attributes with expanded-names that have null namespace URIs
+         
+         (i.e. attributes with unprefixed names) other than attributes defined
+         
+         for the element in this document.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>The conventions used for the names of XSLT elements,
+         
+         attributes and functions are that names are all lower-case, use
+         
+         hyphens to separate words, and use abbreviations only if they already
+         
+         appear in the syntax of a related language such as XML or
+         
+         HTML.
+      </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="stylesheet-element"></a>2.2 Stylesheet Element
+      </h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-stylesheet"></a><code>&lt;xsl:stylesheet<br>&nbsp;&nbsp;id = <var>id</var><br>&nbsp;&nbsp;extension-element-prefixes = <var>tokens</var><br>&nbsp;&nbsp;exclude-result-prefixes = <var>tokens</var><br>&nbsp;&nbsp;<b>version</b> = <var>number</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-import">xsl:import</a>*, <var>top-level-elements</var>) --><br>&lt;/xsl:stylesheet>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-transform"></a><code>&lt;xsl:transform<br>&nbsp;&nbsp;id = <var>id</var><br>&nbsp;&nbsp;extension-element-prefixes = <var>tokens</var><br>&nbsp;&nbsp;exclude-result-prefixes = <var>tokens</var><br>&nbsp;&nbsp;<b>version</b> = <var>number</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-import">xsl:import</a>*, <var>top-level-elements</var>) --><br>&lt;/xsl:transform>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>A stylesheet is represented by an <code>xsl:stylesheet</code>
+         
+         element in an XML document.  <code>xsl:transform</code> is allowed as
+         
+         a synonym for <code>xsl:stylesheet</code>.
+      </p>
+      
+      
+      
+      
+      <p>An <code>xsl:stylesheet</code> element must have a
+         
+         <code>version</code> attribute, indicating the version of XSLT that
+         
+         the stylesheet requires.  For this version of XSLT, the value should
+         
+         be <code>1.0</code>.  When the value is not equal to <code>1.0</code>,
+         
+         forwards-compatible processing mode is enabled (see <a href="#forwards">[<b>2.5 Forwards-Compatible Processing</b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:stylesheet</code> element may contain the following types
+         
+         of elements:
+      </p>
+      
+      
+      <ul>
+         
+         
+         <li>
+            <p><code>xsl:import</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:include</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:strip-space</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:preserve-space</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:output</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:key</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:decimal-format</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:namespace-alias</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:attribute-set</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:variable</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:param</code></p>
+         </li>
+         
+         
+         <li>
+            <p><code>xsl:template</code></p>
+         </li>
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p><a name="dt-top-level"></a>An element occurring as
+         
+         a child of an <code>xsl:stylesheet</code> element is called a
+         
+         <b>top-level</b> element.
+      </p>
+      
+      
+      
+      
+      <p>This example shows the structure of a stylesheet.  Ellipses
+         
+         (<code>...</code>) indicate where attribute values or content have
+         
+         been omitted.  Although this example shows one of each type of allowed
+         
+         element, stylesheets may contain zero or more of each of these
+         
+         elements.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  &lt;xsl:import href="..."/>
+
+
+
+  &lt;xsl:include href="..."/>
+
+
+
+  &lt;xsl:strip-space elements="..."/>
+
+  
+
+  &lt;xsl:preserve-space elements="..."/>
+
+
+
+  &lt;xsl:output method="..."/>
+
+
+
+  &lt;xsl:key name="..." match="..." use="..."/>
+
+
+
+  &lt;xsl:decimal-format name="..."/>
+
+
+
+  &lt;xsl:namespace-alias stylesheet-prefix="..." result-prefix="..."/>
+
+
+
+  &lt;xsl:attribute-set name="...">
+
+    ...
+
+  &lt;/xsl:attribute-set>
+
+
+
+  &lt;xsl:variable name="...">...&lt;/xsl:variable>
+
+
+
+  &lt;xsl:param name="...">...&lt;/xsl:param>
+
+
+
+  &lt;xsl:template match="...">
+
+    ...
+
+  &lt;/xsl:template>
+
+
+
+  &lt;xsl:template name="...">
+
+    ...
+
+  &lt;/xsl:template>
+
+
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <p>The order in which the children of the <code>xsl:stylesheet</code>
+         
+         element occur is not significant except for <code>xsl:import</code>
+         
+         elements and for error recovery.  Users are free to order the elements
+         
+         as they prefer, and stylesheet creation tools need not provide control
+         
+         over the order in which the elements occur.
+      </p>
+      
+      
+      
+      
+      <p>In addition, the <code>xsl:stylesheet</code> element may contain
+         
+         any element not from the XSLT namespace, provided that the
+         
+         expanded-name of the element has a non-null namespace URI.  The presence of
+         
+         such top-level elements must not change the behavior of XSLT elements
+         
+         and functions defined in this document; for example, it would not be
+         
+         permitted for such a top-level element to specify that
+         
+         <code>xsl:apply-templates</code> was to use different rules to resolve
+         
+         conflicts. Thus, an XSLT processor is always free to ignore such
+         
+         top-level elements, and must ignore a top-level element without giving
+         
+         an error if it does not recognize the namespace URI. Such elements can
+         
+         provide, for example,
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>information used by extension elements or extension functions
+               
+               (see <a href="#extension">[<b>14 Extensions</b>]
+               </a>),
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>information about what to do with the result tree,</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>information about how to obtain the source tree,</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>metadata about the stylesheet,</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>structured documentation for the stylesheet.</p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="result-element-stylesheet"></a>2.3 Literal Result Element as Stylesheet
+      </h3>
+      
+      
+      
+      
+      <p>A simplified syntax is allowed for stylesheets that consist of only
+         
+         a single template for the root node.  The stylesheet may consist of
+         
+         just a literal result element (see <a href="#literal-result-element">[<b>7.1.1 Literal Result Elements</b>]
+         </a>).  Such a stylesheet is equivalent to a
+         
+         stylesheet with an <code>xsl:stylesheet</code> element containing a
+         
+         template rule containing the literal result element; the template rule
+         
+         has a match pattern of <code>/</code>. For example
+      </p>
+      
+      
+      
+      <pre>&lt;html xsl:version="1.0"
+
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+      xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+  &lt;head>
+
+    &lt;title>Expense Report Summary&lt;/title>
+
+  &lt;/head>
+
+  &lt;body>
+
+    &lt;p>Total Amount: &lt;xsl:value-of select="expense-report/total"/>&lt;/p>
+
+  &lt;/body>
+
+&lt;/html></pre>
+      
+      
+      
+      <p>has the same meaning as</p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+                xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+&lt;xsl:template match="/">
+
+&lt;html>
+
+  &lt;head>
+
+    &lt;title>Expense Report Summary&lt;/title>
+
+  &lt;/head>
+
+  &lt;body>
+
+    &lt;p>Total Amount: &lt;xsl:value-of select="expense-report/total"/>&lt;/p>
+
+  &lt;/body>
+
+&lt;/html>
+
+&lt;/xsl:template>
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <p>A literal result element that is the document element of a
+         
+         stylesheet must have an <code>xsl:version</code> attribute, which
+         
+         indicates the version of XSLT that the stylesheet requires.  For this
+         
+         version of XSLT, the value should be <code>1.0</code>; the value must
+         
+         be a <a href="http://www.w3.org/TR/xpath#NT-Number">Number</a>.  Other literal result
+         
+         elements may also have an <code>xsl:version</code> attribute. When the
+         
+         <code>xsl:version</code> attribute is not equal to <code>1.0</code>,
+         
+         forwards-compatible processing mode is enabled (see <a href="#forwards">[<b>2.5 Forwards-Compatible Processing</b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p>The allowed content of a literal result element when used as a
+         
+         stylesheet is no different from when it occurs within a
+         
+         stylesheet. Thus, a literal result element used as a stylesheet cannot
+         
+         contain <a href="#dt-top-level">top-level</a> elements.
+      </p>
+      
+      
+      
+      
+      <p>In some situations, the only way that a system can recognize that an
+         
+         XML document needs to be processed by an XSLT processor as an XSLT
+         
+         stylesheet is by examining the XML document itself.  Using the
+         
+         simplified syntax makes this harder.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>For example, another XML language (AXL) might also use an
+         
+         <code>axl:version</code> on the document element to indicate that an
+         
+         XML document was an AXL document that required processing by an AXL
+         
+         processor; if a document had both an <code>axl:version</code>
+         
+         attribute and an <code>xsl:version</code> attribute, it would be
+         
+         unclear whether the document should be processed by an XSLT processor
+         
+         or an AXL processor.
+      </blockquote>
+      
+      
+      
+      
+      <p>Therefore, the simplified syntax should not be used for XSLT
+         
+         stylesheets that may be used in such a situation.  This situation can,
+         
+         for example, arise when an XSLT stylesheet is transmitted as a message
+         
+         with a MIME media type of <code>text/xml</code> or
+         
+         <code>application/xml</code> to a recipient that will use the MIME
+         
+         media type to determine how the message is processed.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="qname"></a>2.4 Qualified Names
+      </h3>
+      
+      
+      
+      
+      <p>The name of an internal XSLT object, specifically a named template
+         
+         (see <a href="#named-templates">[<b>6 Named Templates</b>]
+         </a>), a mode (see <a href="#modes">[<b>5.7 Modes</b>]
+         </a>), an attribute set (see <a href="#attribute-sets">[<b>7.1.4 Named Attribute Sets</b>]
+         </a>), a key (see <a href="#key">[<b>12.2 Keys</b>]
+         </a>), a
+         
+         decimal-format (see <a href="#format-number">[<b>12.3 Number Formatting</b>]
+         </a>), a variable or a
+         
+         parameter (see <a href="#variables">[<b>11 Variables and Parameters</b>]
+         </a>) is specified as a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>.  If it has a prefix, then the
+         
+         prefix is expanded into a URI reference using the namespace
+         
+         declarations in effect on the attribute in which the name occurs.  The
+         
+         <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a>
+         
+         consisting of the local part of the name and the possibly null URI
+         
+         reference is used as the name of the object.  The default namespace is
+         
+         <i>not</i> used for unprefixed names.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="forwards"></a>2.5 Forwards-Compatible Processing
+      </h3>
+      
+      
+      
+      
+      <p>An element enables forwards-compatible mode for itself, its
+         
+         attributes, its descendants and their attributes if either it is an
+         
+         <code>xsl:stylesheet</code> element whose <code>version</code>
+         
+         attribute is not equal to <code>1.0</code>, or it is a literal result
+         
+         element that has an <code>xsl:version</code> attribute whose value is
+         
+         not equal to <code>1.0</code>, or it is a literal result element that
+         
+         does not have an <code>xsl:version</code> attribute and that is the
+         
+         document element of a stylesheet using the simplified syntax (see
+         
+         <a href="#result-element-stylesheet">[<b>2.3 Literal Result Element as Stylesheet</b>]
+         </a>).  A literal result element
+         
+         that has an <code>xsl:version</code> attribute whose value is equal to
+         
+         <code>1.0</code> disables forwards-compatible mode for itself, its
+         
+         attributes, its descendants and their attributes.
+      </p>
+      
+      
+      
+      
+      <p>If an element is processed in forwards-compatible mode, then:</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>if it is a <a href="#dt-top-level">top-level</a>
+               
+               element and XSLT 1.0 does not allow such elements as top-level
+               
+               elements, then the element must be ignored along with its
+               
+               content;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>if it is an element in a template and XSLT 1.0 does not allow
+               
+               such elements to occur in templates, then if the element is not
+               
+               instantiated, an error must not be signaled, and if the element is
+               
+               instantiated, the XSLT must perform fallback for the element as
+               
+               specified in <a href="#fallback">[<b>15 Fallback</b>]
+               </a>;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>if the element has an attribute that XSLT 1.0 does not allow
+               
+               the element to have or if the element has an optional attribute with a
+               
+               value that the XSLT 1.0 does not allow the attribute to have, then the
+               
+               attribute must be ignored.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>Thus, any XSLT 1.0 processor must be able to process the following
+         
+         stylesheet without error, although the stylesheet includes elements
+         
+         from the XSLT namespace that are not defined in this
+         
+         specification:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet version="1.1"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  &lt;xsl:template match="/">
+
+    &lt;xsl:choose>
+
+      &lt;xsl:when test="system-property('xsl:version') >= 1.1">
+
+        &lt;xsl:exciting-new-1.1-feature/>
+
+      &lt;/xsl:when>
+
+      &lt;xsl:otherwise>
+
+        &lt;html>
+
+        &lt;head>
+
+          &lt;title>XSLT 1.1 required&lt;/title>
+
+        &lt;/head>
+
+        &lt;body>
+
+          &lt;p>Sorry, this stylesheet requires XSLT 1.1.&lt;/p>
+
+        &lt;/body>
+
+        &lt;/html>
+
+      &lt;/xsl:otherwise>
+
+    &lt;/xsl:choose>
+
+  &lt;/xsl:template>
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <blockquote><b>NOTE: </b>If a stylesheet depends crucially on a top-level element
+         
+         introduced by a version of XSL after 1.0, then the stylesheet can use
+         
+         an <code>xsl:message</code> element with <code>terminate="yes"</code>
+         
+         (see <a href="#message">[<b>13 Messages</b>]
+         </a>) to ensure that XSLT processors
+         
+         implementing earlier versions of XSL will not silently ignore the
+         
+         top-level element. For example,
+         
+         
+         
+         <pre>&lt;xsl:stylesheet version="1.5"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+
+  &lt;xsl:important-new-1.1-declaration/>
+
+
+
+  &lt;xsl:template match="/">
+
+    &lt;xsl:choose>
+
+      &lt;xsl:when test="system-property('xsl:version') &amp;lt; 1.1">
+
+        &lt;xsl:message terminate="yes">
+
+          &lt;xsl:text>Sorry, this stylesheet requires XSLT 1.1.&lt;/xsl:text>
+
+        &lt;/xsl:message>
+
+      &lt;/xsl:when>
+
+      &lt;xsl:otherwise>
+
+        ...
+
+      &lt;/xsl:otherwise>
+
+    &lt;/xsl:choose>
+
+  &lt;/xsl:template>
+
+  ...
+
+&lt;/xsl:stylesheet></pre>
+         
+         </blockquote>
+      
+      
+      
+      
+      <p>If an <a href="#dt-expression">expression</a> occurs in
+         
+         an attribute that is processed in forwards-compatible mode, then an
+         
+         XSLT processor must recover from errors in the expression as
+         
+         follows:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>if the expression does not match the syntax allowed by the
+               
+               XPath grammar, then an error must not be signaled unless the
+               
+               expression is actually evaluated;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>if the expression calls a function with an unprefixed name
+               
+               that is not part of the XSLT library, then an error must not be
+               
+               signaled unless the function is actually called;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>if the expression calls a function with a number of arguments
+               
+               that XSLT does not allow or with arguments of types that XSLT does not
+               
+               allow, then an error must not be signaled unless the function is
+               
+               actually called.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Combining-Stylesheets"></a>2.6 Combining Stylesheets
+      </h3>
+      
+      
+      
+      
+      <p>XSLT provides two mechanisms to combine stylesheets:</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>an inclusion mechanism that allows stylesheets to be combined
+            
+            without changing the semantics of the stylesheets being combined,
+            
+            and
+         </li>
+         
+         
+         
+         
+         <li>an import mechanism that allows stylesheets to override each
+            
+            other.
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      <h4><a name="include"></a>2.6.1 Stylesheet Inclusion
+      </h4>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-include"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:include<br>&nbsp;&nbsp;<b>href</b> = <var>uri-reference</var>&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>An XSLT stylesheet may include another XSLT stylesheet using an
+         
+         <code>xsl:include</code> element. The <code>xsl:include</code> element
+         
+         has an <code>href</code> attribute whose value is a URI reference
+         
+         identifying the stylesheet to be included.  A relative URI is resolved
+         
+         relative to the base URI of the <code>xsl:include</code> element (see
+         
+         <a href="#base-uri">[<b>3.2 Base URI</b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:include</code> element is only allowed as a <a href="#dt-top-level">top-level</a> element.
+      </p>
+      
+      
+      
+      
+      <p>The inclusion works at the XML tree level.  The resource located by
+         
+         the <code>href</code> attribute value is parsed as an XML document,
+         
+         and the children of the <code>xsl:stylesheet</code> element in this
+         
+         document replace the <code>xsl:include</code> element in the including
+         
+         document.  The fact that template rules or definitions are included
+         
+         does not affect the way they are processed.
+      </p>
+      
+      
+      
+      
+      <p>The included stylesheet may use the simplified syntax described in
+         
+         <a href="#result-element-stylesheet">[<b>2.3 Literal Result Element as Stylesheet</b>]
+         </a>.  The included stylesheet
+         
+         is treated the same as the equivalent <code>xsl:stylesheet</code>
+         
+         element.
+      </p>
+      
+      
+      
+      
+      <p>It is an error if a stylesheet directly or indirectly includes
+         
+         itself.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Including a stylesheet multiple times can cause errors
+         
+         because of duplicate definitions.  Such multiple inclusions are less
+         
+         obvious when they are indirect. For example, if stylesheet
+         
+         <var>B</var> includes stylesheet <var>A</var>, stylesheet <var>C</var>
+         
+         includes stylesheet <var>A</var>, and stylesheet <var>D</var> includes
+         
+         both stylesheet <var>B</var> and stylesheet <var>C</var>, then
+         
+         <var>A</var> will be included indirectly by <var>D</var> twice.  If
+         
+         all of <var>B</var>, <var>C</var> and <var>D</var> are used as
+         
+         independent stylesheets, then the error can be avoided by separating
+         
+         everything in <var>B</var> other than the inclusion of <var>A</var>
+         
+         into a separate stylesheet <var>B'</var> and changing <var>B</var> to
+         
+         contain just inclusions of <var>B'</var> and <var>A</var>, similarly
+         
+         for <var>C</var>, and then changing <var>D</var> to include
+         
+         <var>A</var>, <var>B'</var>, <var>C'</var>.
+      </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h4><a name="import"></a>2.6.2 Stylesheet Import
+      </h4>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-import"></a><code>&lt;xsl:import<br>&nbsp;&nbsp;<b>href</b> = <var>uri-reference</var>&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>An XSLT stylesheet may import another XSLT stylesheet using an
+         
+         <code>xsl:import</code> element.  Importing a stylesheet is the same
+         
+         as including it (see <a href="#include">[<b>2.6.1 Stylesheet Inclusion</b>]
+         </a>) except that definitions
+         
+         and template rules in the importing stylesheet take precedence over
+         
+         template rules and definitions in the imported stylesheet; this is
+         
+         described in more detail below.  The <code>xsl:import</code> element
+         
+         has an <code>href</code> attribute whose value is a URI reference
+         
+         identifying the stylesheet to be imported.  A relative URI is resolved
+         
+         relative to the base URI of the <code>xsl:import</code> element (see
+         
+         <a href="#base-uri">[<b>3.2 Base URI</b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:import</code> element is only allowed as a <a href="#dt-top-level">top-level</a> element.  The
+         
+         <code>xsl:import</code> element children must precede all other
+         
+         element children of an <code>xsl:stylesheet</code> element, including
+         
+         any <code>xsl:include</code> element children.  When
+         
+         <code>xsl:include</code> is used to include a stylesheet, any
+         
+         <code>xsl:import</code> elements in the included document are moved up
+         
+         in the including document to after any existing
+         
+         <code>xsl:import</code> elements in the including document.
+      </p>
+      
+      
+      
+      
+      <p>For example,</p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  &lt;xsl:import href="article.xsl"/>
+
+  &lt;xsl:import href="bigfont.xsl"/>
+
+  &lt;xsl:attribute-set name="note-style">
+
+    &lt;xsl:attribute name="font-style">italic&lt;/xsl:attribute>
+
+  &lt;/xsl:attribute-set>
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <p><a name="dt-import-tree"></a>The
+         
+         <code>xsl:stylesheet</code> elements encountered during processing of
+         
+         a stylesheet that contains <code>xsl:import</code> elements are
+         
+         treated as forming an <b>import tree</b>.  In the import tree,
+         
+         each <code>xsl:stylesheet</code> element has one import child for each
+         
+         <code>xsl:import</code> element that it contains. Any
+         
+         <code>xsl:include</code> elements are resolved before constructing the
+         
+         import tree. <a name="dt-import-precedence"></a>An <code>xsl:stylesheet</code> element in the import tree
+         
+         is defined to have lower <b>import precedence</b> than another
+         
+         <code>xsl:stylesheet</code> element in the import tree if it would be
+         
+         visited before that <code>xsl:stylesheet</code> element in a
+         
+         post-order traversal of the import tree (i.e. a traversal of the
+         
+         import tree in which an <code>xsl:stylesheet</code> element is visited
+         
+         after its import children). Each definition and template
+         
+         rule has import precedence determined by the
+         
+         <code>xsl:stylesheet</code> element that contains it.
+      </p>
+      
+      
+      
+      
+      <p>For example, suppose</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>stylesheet <var>A</var> imports stylesheets <var>B</var>
+               
+               and <var>C</var> in that order;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>stylesheet <var>B</var> imports stylesheet
+               
+               <var>D</var>;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>stylesheet <var>C</var> imports stylesheet
+               
+               <var>E</var>.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>Then the order of import precedence (lowest first) is
+         
+         <var>D</var>, <var>B</var>, <var>E</var>, <var>C</var>,
+         
+         <var>A</var>.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Since <code>xsl:import</code> elements are required to occur
+         
+         before any definitions or template rules, an implementation that
+         
+         processes imported stylesheets at the point at which it encounters the
+         
+         <code>xsl:import</code> element will encounter definitions and
+         
+         template rules in increasing order of import precedence.
+      </blockquote>
+      
+      
+      
+      
+      <p>In general, a definition or template rule with higher import
+         
+         precedence takes precedence over a definition or template rule with
+         
+         lower import precedence.  This is defined in detail for each kind of
+         
+         definition and for template rules.
+      </p>
+      
+      
+      
+      
+      <p>It is an error if a stylesheet directly or indirectly imports
+         
+         itself. Apart from this, the case where a stylesheet with a particular
+         
+         URI is imported in multiple places is not treated specially. The
+         
+         <a href="#dt-import-tree">import tree</a> will have a
+         
+         separate <code>xsl:stylesheet</code> for each place that it is
+         
+         imported.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>If <code>xsl:apply-imports</code> is used (see <a href="#apply-imports">[<b>5.6 Overriding Template Rules</b>]
+         </a>), the behavior may be different from the
+         
+         behavior if the stylesheet had been imported only at the place with
+         
+         the highest <a href="#dt-import-precedence">import
+            
+            precedence
+         </a>.
+      </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Embedding-Stylesheets"></a>2.7 Embedding Stylesheets
+      </h3>
+      
+      
+      
+      
+      <p>Normally an XSLT stylesheet is a complete XML document with the
+         
+         <code>xsl:stylesheet</code> element as the document element. However,
+         
+         an XSLT stylesheet may also be embedded in another resource. Two forms
+         
+         of embedding are possible:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>the XSLT stylesheet may be textually embedded in a non-XML
+            
+            resource, or
+         </li>
+         
+         
+         
+         
+         <li>the <code>xsl:stylesheet</code> element may occur in an XML
+            
+            document other than as the document element.
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>To facilitate the second form of embedding, the
+         
+         <code>xsl:stylesheet</code> element is allowed to have an ID attribute
+         
+         that specifies a unique identifier.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>In order for such an attribute to be used with the XPath
+         
+         <b><a href="http://www.w3.org/TR/xpath#function-id">id</a></b> function, it must actually be declared in
+         
+         the DTD as being an ID.
+      </blockquote>
+      
+      
+      
+      
+      <p>The following example shows how the <code>xml-stylesheet</code>
+         
+         processing instruction <a href="#XMLSTYLE">[XML Stylesheet]</a> can be used to allow a
+         
+         document to contain its own stylesheet.  The URI reference uses a
+         
+         relative URI with a fragment identifier to locate the
+         
+         <code>xsl:stylesheet</code> element:
+      </p>
+      
+      
+      
+      <pre>&lt;?xml-stylesheet type="text/xml" href="#style1"?>
+
+&lt;!DOCTYPE doc SYSTEM "doc.dtd">
+
+&lt;doc>
+
+&lt;head>
+
+&lt;xsl:stylesheet id="style1"
+
+                version="1.0"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+                xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+&lt;xsl:import href="doc.xsl"/>
+
+&lt;xsl:template match="id('foo')">
+
+  &lt;fo:block font-weight="bold">&lt;xsl:apply-templates/>&lt;/fo:block>
+
+&lt;/xsl:template>
+
+&lt;xsl:template match="xsl:stylesheet">
+
+  &lt;!-- ignore -->
+
+&lt;/xsl:template>
+
+&lt;/xsl:stylesheet>
+
+&lt;/head>
+
+&lt;body>
+
+&lt;para id="foo">
+
+...
+
+&lt;/para>
+
+&lt;/body>
+
+&lt;/doc>
+
+</pre>
+      
+      
+      
+      <blockquote><b>NOTE: </b>A stylesheet that is embedded in the document to which it is
+         
+         to be applied or that may be included or imported into an stylesheet
+         
+         that is so embedded typically needs to contain a template rule that
+         
+         specifies that <code>xsl:stylesheet</code> elements are to be
+         
+         ignored.
+      </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="data-model"></a>3 Data Model
+      </h2>
+      
+      
+      
+      
+      <p>The data model used by XSLT is the same as that used by <a href="http://www.w3.org/TR/xpath#data-model">XPath</a> with the additions
+         
+         described in this section.  XSLT operates on source, result and
+         
+         stylesheet documents using the same data model.  Any two XML documents
+         
+         that have the same tree will be treated the same by XSLT.
+      </p>
+      
+      
+      
+      
+      <p>Processing instructions and comments in the stylesheet are ignored:
+         
+         the stylesheet is treated as if neither processing instruction nodes
+         
+         nor comment nodes were included in the tree that represents the
+         
+         stylesheet.
+      </p>
+      
+      
+      
+      
+      
+      
+      <h3><a name="root-node-children"></a>3.1 Root Node Children
+      </h3>
+      
+      
+      
+      
+      <p>The normal restrictions on the children of the root node are
+         
+         relaxed for the result tree.  The result tree may have any sequence of
+         
+         nodes as children that would be possible for an element node. In
+         
+         particular, it may have text node children, and any number of element
+         
+         node children. When written out using the XML output method (see
+         
+         <a href="#output">[<b>16 Output</b>]
+         </a>), it is possible that a result tree will not
+         
+         be a well-formed XML document; however, it will always be a
+         
+         well-formed external general parsed entity.
+      </p>
+      
+      
+      
+      
+      <p>When the source tree is created by parsing a well-formed XML
+         
+         document, the root node of the source tree will automatically satisfy
+         
+         the normal restrictions of having no text node children and exactly
+         
+         one element child.  When the source tree is created in some other way,
+         
+         for example by using the DOM, the usual restrictions are relaxed for
+         
+         the source tree as for the result tree.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="base-uri"></a>3.2 Base URI
+      </h3>
+      
+      
+      
+      
+      <p>Every node also has an associated URI called its base URI, which is
+         
+         used for resolving attribute values that represent relative URIs into
+         
+         absolute URIs.  If an element or processing instruction occurs in an
+         
+         external entity, the base URI of that element or processing
+         
+         instruction is the URI of the external entity; otherwise, the base URI
+         
+         is the base URI of the document.  The base URI of the document node is
+         
+         the URI of the document entity.  The base URI for a text node, a
+         
+         comment node, an attribute node or a namespace node is the base URI of
+         
+         the parent of the node.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="unparsed-entities"></a>3.3 Unparsed Entities
+      </h3>
+      
+      
+      
+      
+      <p>The root node has a mapping that gives the URI for each unparsed
+         
+         entity declared in the document's DTD.  The URI is generated from the
+         
+         system identifier and public identifier specified in the entity
+         
+         declaration. The XSLT processor may use the public identifier to
+         
+         generate a URI for the entity instead of the URI specified in the
+         
+         system identifier.  If the XSLT processor does not use the public
+         
+         identifier to generate the URI, it must use the system identifier; if
+         
+         the system identifier is a relative URI, it must be resolved into an
+         
+         absolute URI using the URI of the resource containing the entity
+         
+         declaration as the base URI <a href="#RFC2396">[RFC2396]</a>.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="strip"></a>3.4 Whitespace Stripping
+      </h3>
+      
+      
+      
+      
+      <p>After the tree for a source document or stylesheet document has
+         
+         been constructed, but before it is otherwise processed by XSLT,
+         
+         some text nodes are stripped.  A text node is never stripped
+         
+         unless it contains only whitespace characters.  Stripping the text
+         
+         node removes the text node from the tree.  The stripping process takes
+         
+         as input a set of element names for which whitespace must be
+         
+         preserved.  The stripping process is applied to both stylesheets and
+         
+         source documents, but the set of whitespace-preserving element names
+         
+         is determined differently for stylesheets and for source
+         
+         documents.
+      </p>
+      
+      
+      
+      
+      <p>A text node is preserved if any of the following apply:</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>The element name of the parent of the text node is in the set
+               
+               of whitespace-preserving element names.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The text node contains at least one non-whitespace character.
+               
+               As in XML, a whitespace character is #x20, #x9, #xD or #xA.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>An ancestor element of the text node has an
+               
+               <code>xml:space</code> attribute with a value of
+               
+               <code>preserve</code>, and no closer ancestor element has
+               
+               <code>xml:space</code> with a value of
+               
+               <code>default</code>.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>Otherwise, the text node is stripped.</p>
+      
+      
+      
+      
+      <p>The <code>xml:space</code> attributes are not stripped from the
+         
+         tree.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>This implies that if an <code>xml:space</code> attribute is
+         
+         specified on a literal result element, it will be included in the
+         
+         result.
+      </blockquote>
+      
+      
+      
+      
+      <p>For stylesheets, the set of whitespace-preserving element names
+         
+         consists of just <code>xsl:text</code>.
+      </p>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-strip-space"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:strip-space<br>&nbsp;&nbsp;<b>elements</b> = <var>tokens</var>&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-preserve-space"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:preserve-space<br>&nbsp;&nbsp;<b>elements</b> = <var>tokens</var>&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>For source documents, the set of whitespace-preserving element
+         
+         names is specified by <code>xsl:strip-space</code> and
+         
+         <code>xsl:preserve-space</code> <a href="#dt-top-level">top-level</a> elements.  These elements each
+         
+         have an <code>elements</code> attribute whose value is a
+         
+         whitespace-separated list of <a href="http://www.w3.org/TR/xpath#NT-NameTest">NameTest</a>s.  Initially, the
+         
+         set of whitespace-preserving element names contains all element names.
+         
+         If an element name matches a <a href="http://www.w3.org/TR/xpath#NT-NameTest">NameTest</a> in an
+         
+         <code>xsl:strip-space</code> element, then it is removed from the set
+         
+         of whitespace-preserving element names.  If an element name matches a
+         
+         <a href="http://www.w3.org/TR/xpath#NT-NameTest">NameTest</a> in an
+         
+         <code>xsl:preserve-space</code> element, then it is added to the set
+         
+         of whitespace-preserving element names.  An element matches a <a href="http://www.w3.org/TR/xpath#NT-NameTest">NameTest</a> if and only if the
+         
+         <a href="http://www.w3.org/TR/xpath#NT-NameTest">NameTest</a> would be true
+         
+         for the element as an <a href="http://www.w3.org/TR/xpath#node-tests">XPath node
+            
+            test
+         </a>.  Conflicts between matches to
+         
+         <code>xsl:strip-space</code> and <code>xsl:preserve-space</code>
+         
+         elements are resolved the same way as conflicts between template rules
+         
+         (see <a href="#conflict">[<b>5.5 Conflict Resolution for Template Rules</b>]
+         </a>).  Thus, the applicable match for a
+         
+         particular element name is determined as follows:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>First, any match with lower <a href="#dt-import-precedence">import precedence</a> than another
+               
+               match is ignored.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>Next, any match with a <a href="http://www.w3.org/TR/xpath#NT-NameTest">NameTest</a> that has a lower
+               
+               <a href="#dt-default-priority">default priority</a> than the
+               
+               <a href="#dt-default-priority">default priority</a> of the
+               
+               <a href="http://www.w3.org/TR/xpath#NT-NameTest">NameTest</a> of another
+               
+               match is ignored.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>It is an error if this leaves more than one match.  An XSLT
+         
+         processor may signal the error; if it does not signal the error, it
+         
+         must recover by choosing, from amongst the matches that are left, the
+         
+         one that occurs last in the stylesheet.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Expressions"></a>4 Expressions
+      </h2>
+      
+      
+      
+      
+      <p>XSLT uses the expression language defined by XPath <a href="#XPATH">[XPath]</a>.  Expressions are used in XSLT for a variety of purposes
+         
+         including:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         <li>selecting nodes for processing;</li>
+         
+         
+         <li>specifying conditions for different ways of processing a node;</li>
+         
+         
+         <li>generating text to be inserted in the result tree.</li>
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p><a name="dt-expression"></a>An
+         
+         <b>expression</b> must match the XPath production <a href="http://www.w3.org/TR/xpath#NT-Expr">Expr</a>.
+      </p>
+      
+      
+      
+      
+      <p>Expressions occur as the value of certain attributes on
+         
+         XSLT-defined elements and within curly braces in <a href="#dt-attribute-value-template">attribute value
+            
+            template
+         </a>s.
+      </p>
+      
+      
+      
+      
+      <p>In XSLT, an outermost expression (i.e. an expression that is not
+         
+         part of another expression) gets its context as follows:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>the context node comes from the <a href="#dt-current-node">current node</a></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the context position comes from the position of the <a href="#dt-current-node">current node</a> in the <a href="#dt-current-node-list">current node list</a>; the first
+               
+               position is 1
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the context size comes from the size of the <a href="#dt-current-node-list">current node list</a></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the variable bindings are the bindings in scope on the
+               
+               element which has the attribute in which the expression occurs (see
+               
+               <a href="#variables">[<b>11 Variables and Parameters</b>]
+               </a>)
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the set of namespace declarations are those in scope on the
+               
+               element which has the attribute in which the expression occurs;
+               
+               this includes the implicit declaration of the prefix <code>xml</code>
+               
+               required by the the XML Namespaces Recommendation <a href="#XMLNAMES">[XML Names]</a>;
+               
+               the default
+               
+               namespace (as declared by <code>xmlns</code>) is not part of this
+               
+               set
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the function library consists of the core function library
+               
+               together with the additional functions defined in <a href="#add-func">[<b>12 Additional Functions</b>]
+               </a> and extension functions as described in <a href="#extension">[<b>14 Extensions</b>]
+               </a>; it is an error for an expression to include a call
+               
+               to any other function
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="rules"></a>5 Template Rules
+      </h2>
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Processing-Model"></a>5.1 Processing Model
+      </h3>
+      
+      
+      
+      
+      <p>A list of source nodes is processed to create a result tree
+         
+         fragment.  The result tree is constructed by processing a list
+         
+         containing just the root node.  A list of source nodes is processed by
+         
+         appending the result tree structure created by processing each of the
+         
+         members of the list in order.  A node is processed by finding all the
+         
+         template rules with patterns that match the node, and choosing the
+         
+         best amongst them; the chosen rule's template is then instantiated
+         
+         with the node as the <a href="#dt-current-node">current
+            
+            node
+         </a> and with the list of source nodes as the <a href="#dt-current-node-list">current node list</a>.  A template
+         
+         typically contains instructions that select an additional list of
+         
+         source nodes for processing.  The process of matching, instantiation
+         
+         and selection is continued recursively until no new source nodes are
+         
+         selected for processing.
+      </p>
+      
+      
+      
+      
+      <p>Implementations are free to process the source document in any way
+         
+         that produces the same result as if it were processed using this
+         
+         processing model.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="patterns"></a>5.2 Patterns
+      </h3>
+      
+      
+      
+      
+      <p><a name="dt-pattern"></a>Template rules identify the
+         
+         nodes to which they apply by using a <b>pattern</b>.  As well as
+         
+         being used in template rules, patterns are used for numbering (see
+         
+         <a href="#number">[<b>7.7 Numbering</b>]
+         </a>) and for declaring keys (see <a href="#key">[<b>12.2 Keys</b>]
+         </a>).  A pattern specifies a set of conditions on a node.  A
+         
+         node that satisfies the conditions matches the pattern; a node that
+         
+         does not satisfy the conditions does not match the pattern.  The
+         
+         syntax for patterns is a subset of the syntax for expressions. In
+         
+         particular, location paths that meet certain restrictions can be used
+         
+         as patterns.  An expression that is also a pattern always evaluates to
+         
+         an object of type node-set.  A node matches a pattern if the node is a
+         
+         member of the result of evaluating the pattern as an expression with
+         
+         respect to some possible context; the possible contexts are those
+         
+         whose context node is the node being matched or one of its
+         
+         ancestors.
+      </p>
+      
+      
+      
+      
+      <p>Here are some examples of patterns:</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p><code>para</code> matches any <code>para</code> element
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>*</code> matches any element
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>chapter|appendix</code> matches any
+               
+               <code>chapter</code> element and any <code>appendix</code>
+               
+               element
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>olist/item</code> matches any <code>item</code> element with
+               
+               an <code>olist</code> parent
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>appendix//para</code> matches any <code>para</code> element with
+               
+               an <code>appendix</code> ancestor element
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>/</code> matches the root node
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>text()</code> matches any text node
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>processing-instruction()</code> matches any processing
+               
+               instruction
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>node()</code> matches any node other than an attribute
+               
+               node and the root node
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>id("W11")</code> matches the element with unique ID
+               
+               <code>W11</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>para[1]</code> matches any <code>para</code> element
+               
+               that is the first <code>para</code> child element of its
+               
+               parent
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>*[position()=1 and self::para]</code> matches any
+               
+               <code>para</code> element that is the first child element of its
+               
+               parent
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>para[last()=1]</code> matches any <code>para</code>
+               
+               element that is the only <code>para</code> child element of its
+               
+               parent
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>items/item[position()>1]</code> matches any
+               
+               <code>item</code> element that has a <code>items</code> parent and
+               
+               that is not the first <code>item</code> child of its parent
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>item[position() mod 2 = 1]</code> would be true for any
+               
+               <code>item</code> element that is an odd-numbered <code>item</code>
+               
+               child of its parent.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>div[@class="appendix"]//p</code> matches any
+               
+               <code>p</code> element with a <code>div</code> ancestor element that
+               
+               has a <code>class</code> attribute with value
+               
+               <code>appendix</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>@class</code> matches any <code>class</code> attribute
+               
+               (<i>not</i> any element that has a <code>class</code>
+               
+               attribute)
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>@*</code> matches any attribute
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>A pattern must match the grammar for <a href="#NT-Pattern">Pattern</a>.  A <a href="#NT-Pattern">Pattern</a> is
+         
+         a set of location path patterns separated by <code>|</code>.  A
+         
+         location path pattern is a location path whose steps all use only the
+         
+         <code>child</code> or <code>attribute</code> axes.  Although patterns
+         
+         must not use the <code>descendant-or-self</code> axis, patterns may
+         
+         use the <code>//</code> operator as well as the <code>/</code>
+         
+         operator.  Location path patterns can also start with an
+         
+         <b><a href="http://www.w3.org/TR/xpath#function-id">id</a></b> or <b><a href="#function-key">key</a></b> function call
+         
+         with a literal argument.  Predicates in a pattern can use arbitrary
+         
+         expressions just like predicates in a location path.
+      </p>
+      
+      
+      
+      
+      <h5>Patterns</h5>
+      <table class="scrap">
+         <tbody>
+            
+            
+            <tr valign="baseline">
+               <td><a name="NT-Pattern"></a>[1]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>Pattern</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-LocationPathPattern">LocationPathPattern</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-Pattern">Pattern</a> '|' <a href="#NT-LocationPathPattern">LocationPathPattern</a></td>
+               <td></td>
+            </tr>
+            
+            
+            <tr valign="baseline">
+               <td><a name="NT-LocationPathPattern"></a>[2]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>LocationPathPattern</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'/' <a href="#NT-RelativePathPattern">RelativePathPattern</a>?
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-IdKeyPattern">IdKeyPattern</a> (('/' | '//') <a href="#NT-RelativePathPattern">RelativePathPattern</a>)?
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| '//'? <a href="#NT-RelativePathPattern">RelativePathPattern</a></td>
+               <td></td>
+            </tr>
+            
+            
+            <tr valign="baseline">
+               <td><a name="NT-IdKeyPattern"></a>[3]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>IdKeyPattern</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>'id' '(' <a href="http://www.w3.org/TR/xpath#NT-Literal">Literal</a> ')'
+               </td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| 'key' '(' <a href="http://www.w3.org/TR/xpath#NT-Literal">Literal</a> ',' <a href="http://www.w3.org/TR/xpath#NT-Literal">Literal</a> ')'
+               </td>
+               <td></td>
+            </tr>
+            
+            
+            <tr valign="baseline">
+               <td><a name="NT-RelativePathPattern"></a>[4]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>RelativePathPattern</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="#NT-StepPattern">StepPattern</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-RelativePathPattern">RelativePathPattern</a> '/' <a href="#NT-StepPattern">StepPattern</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| <a href="#NT-RelativePathPattern">RelativePathPattern</a> '//' <a href="#NT-StepPattern">StepPattern</a></td>
+               <td></td>
+            </tr>
+            
+            
+            <tr valign="baseline">
+               <td><a name="NT-StepPattern"></a>[5]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>StepPattern</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td>
+                  
+                  <a href="#NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</a>
+                  
+                  <a href="http://www.w3.org/TR/xpath#NT-NodeTest">NodeTest</a>
+                  
+                  <a href="http://www.w3.org/TR/xpath#NT-Predicate">Predicate</a>*
+                  
+                  
+               </td>
+               <td></td>
+            </tr>
+            
+            
+            <tr valign="baseline">
+               <td><a name="NT-ChildOrAttributeAxisSpecifier"></a>[6]&nbsp;&nbsp;&nbsp;
+               </td>
+               <td>ChildOrAttributeAxisSpecifier</td>
+               <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+               <td><a href="http://www.w3.org/TR/xpath#NT-AbbreviatedAxisSpecifier">AbbreviatedAxisSpecifier</a></td>
+               <td></td>
+            </tr>
+            <tr valign="baseline">
+               <td></td>
+               <td></td>
+               <td></td>
+               <td>| ('child' | 'attribute') '::'</td>
+               <td></td>
+            </tr>
+            
+            
+         </tbody>
+      </table>
+      
+      
+      
+      
+      <p>A pattern is defined to match a node if and only if there is
+         
+         possible context such that when the pattern is evaluated as an
+         
+         expression with that context, the node is a member of the resulting
+         
+         node-set.  When a node is being matched, the possible contexts have a
+         
+         context node that is the node being matched or any ancestor of that
+         
+         node, and a context node list containing just the context node.
+      </p>
+      
+      
+      
+      
+      <p>For example, <code>p</code> matches any <code>p</code> element,
+         
+         because for any <code>p</code> if the expression <code>p</code> is
+         
+         evaluated with the parent of the <code>p</code> element as context the
+         
+         resulting node-set will contain that <code>p</code> element as one of
+         
+         its members.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>This matches even a <code>p</code> element that is the
+         
+         document element, since the document root is the parent of the
+         
+         document element.
+      </blockquote>
+      
+      
+      
+      
+      <p>Although the semantics of patterns are specified indirectly in
+         
+         terms of expression evaluation, it is easy to understand the meaning
+         
+         of a pattern directly without thinking in terms of expression
+         
+         evaluation.  In a pattern, <code>|</code> indicates alternatives; a
+         
+         pattern with one or more <code>|</code> separated alternatives matches
+         
+         if any one of the alternative matches.  A pattern that consists of a
+         
+         sequence of <a href="#NT-StepPattern">StepPattern</a>s separated by
+         
+         <code>/</code> or <code>//</code> is matched from right to left.  The
+         
+         pattern only matches if the rightmost <a href="#NT-StepPattern">StepPattern</a> matches and a suitable element
+         
+         matches the rest of the pattern; if the separator is <code>/</code>
+         
+         then only the parent is a suitable element; if the separator is
+         
+         <code>//</code>, then any ancestor is a suitable element.  A <a href="#NT-StepPattern">StepPattern</a> that uses the child axis matches
+         
+         if the <a href="http://www.w3.org/TR/xpath#NT-NodeTest">NodeTest</a> is true for the
+         
+         node and the node is not an attribute node.  A <a href="#NT-StepPattern">StepPattern</a> that uses the attribute axis
+         
+         matches if the <a href="http://www.w3.org/TR/xpath#NT-NodeTest">NodeTest</a> is true
+         
+         for the node and the node is an attribute node.  When <code>[]</code>
+         
+         is present, then the first <a href="http://www.w3.org/TR/xpath#NT-PredicateExpr">PredicateExpr</a> in a <a href="#NT-StepPattern">StepPattern</a> is evaluated with the node being
+         
+         matched as the context node and the siblings of the context node that
+         
+         match the <a href="http://www.w3.org/TR/xpath#NT-NodeTest">NodeTest</a> as the
+         
+         context node list, unless the node being matched is an attribute node,
+         
+         in which case the context node list is all the attributes that have
+         
+         the same parent as the attribute being matched and that match the <a href="http://www.w3.org/TR/xpath#NT-NameTest">NameTest</a>.
+      </p>
+      
+      
+      
+      
+      <p>For example</p>
+      
+      
+      
+      <pre>appendix//ulist/item[position()=1]</pre>
+      
+      
+      
+      <p>matches a node if and only if all of the following are true:</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>the <a href="http://www.w3.org/TR/xpath#NT-NodeTest">NodeTest</a> <code>item</code> is
+               
+               true for the node and the node is not an attribute; in other words the
+               
+               node is an <code>item</code> element
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>evaluating the <a href="http://www.w3.org/TR/xpath#NT-PredicateExpr">PredicateExpr</a>
+               
+               <code>position()=1</code> with the node as context node and the
+               
+               siblings of the node that are <code>item</code> elements as the
+               
+               context node list yields true
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the node has a parent that matches
+               
+               <code>appendix//ulist</code>; this will be true if the parent is a
+               
+               <code>ulist</code> element that has an <code>appendix</code> ancestor
+               
+               element.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Defining-Template-Rules"></a>5.3 Defining Template Rules
+      </h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-template"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:template<br>&nbsp;&nbsp;match = <var>pattern</var><br>&nbsp;&nbsp;name = <var>qname</var><br>&nbsp;&nbsp;priority = <var>number</var><br>&nbsp;&nbsp;mode = <var>qname</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-param">xsl:param</a>*, <var>template</var>) --><br>&lt;/xsl:template>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>A template rule is specified with the <code>xsl:template</code>
+         
+         element. The <code>match</code> attribute is a <a href="#NT-Pattern">Pattern</a> that identifies the source node or nodes
+         
+         to which the rule applies.  The <code>match</code> attribute is
+         
+         required unless the <code>xsl:template</code> element has a
+         
+         <code>name</code> attribute (see <a href="#named-templates">[<b>6 Named Templates</b>]
+         </a>).
+         
+         It is an error for the value of the <code>match</code> attribute to
+         
+         contain a <a href="http://www.w3.org/TR/xpath#NT-VariableReference">VariableReference</a>. The
+         
+         content of the <code>xsl:template</code> element is the template that
+         
+         is instantiated when the template rule is applied.
+      </p>
+      
+      
+      
+      
+      <p>For example, an XML document might contain:</p>
+      
+      
+      
+      <pre>This is an &lt;emph>important&lt;/emph> point.</pre>
+      
+      
+      
+      <p>The following template rule matches <code>emph</code> elements and
+         
+         produces a <code>fo:inline-sequence</code> formatting object with a
+         
+         <code>font-weight</code> property of <code>bold</code>.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="emph">
+
+  &lt;fo:inline-sequence font-weight="bold">
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/fo:inline-sequence>
+
+&lt;/xsl:template>
+
+</pre>
+      
+      
+      
+      <blockquote><b>NOTE: </b>Examples in this document use the <code>fo:</code> prefix for
+         
+         the namespace <code>http://www.w3.org/1999/XSL/Format</code>, which is
+         
+         the namespace of the formatting objects defined in <a href="#XSL">[XSL]</a>.
+      </blockquote>
+      
+      
+      
+      
+      <p>As described next, the <code>xsl:apply-templates</code> element
+         
+         recursively processes the children of the source element.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Applying-Template-Rules"></a>5.4 Applying Template Rules
+      </h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-apply-templates"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:apply-templates<br>&nbsp;&nbsp;select = <var>node-set-expression</var><br>&nbsp;&nbsp;mode = <var>qname</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-sort">xsl:sort</a> | <a href="#element-with-param">xsl:with-param</a>)* --><br>&lt;/xsl:apply-templates>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>This example creates a block for a <code>chapter</code> element and
+         
+         then processes its immediate children.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="chapter">
+
+  &lt;fo:block>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/fo:block>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>In the absence of a <code>select</code> attribute, the
+         
+         <code>xsl:apply-templates</code> instruction processes all of the
+         
+         children of the current node, including text nodes.  However, text
+         
+         nodes that have been stripped as specified in <a href="#strip">[<b>3.4 Whitespace Stripping</b>]
+         </a>
+         
+         will not be processed.  If stripping of whitespace nodes has not been
+         
+         enabled for an element, then all whitespace in the content of the
+         
+         element will be processed as text, and thus whitespace
+         
+         between child elements will count in determining the position of a
+         
+         child element as returned by the <b><a href="http://www.w3.org/TR/xpath#function-position">position</a></b>
+         
+         function.
+      </p>
+      
+      
+      
+      
+      <p>A <code>select</code> attribute can be used to process nodes
+         
+         selected by an expression instead of processing all children.  The
+         
+         value of the <code>select</code> attribute is an <a href="#dt-expression">expression</a>.  The expression must
+         
+         evaluate to a node-set.  The selected set of nodes is processed in
+         
+         document order, unless a sorting specification is present (see
+         
+         <a href="#sorting">[<b>10 Sorting</b>]
+         </a>).  The following example processes all of the
+         
+         <code>author</code> children of the <code>author-group</code>:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="author-group">
+
+  &lt;fo:inline-sequence>
+
+    &lt;xsl:apply-templates select="author"/>
+
+  &lt;/fo:inline-sequence>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>The following example processes all of the <code>given-name</code>s
+         
+         of the <code>author</code>s that are children of
+         
+         <code>author-group</code>:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="author-group">
+
+  &lt;fo:inline-sequence>
+
+    &lt;xsl:apply-templates select="author/given-name"/>
+
+  &lt;/fo:inline-sequence>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>This example processes all of the <code>heading</code> descendant
+         
+         elements of the <code>book</code> element.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="book">
+
+  &lt;fo:block>
+
+    &lt;xsl:apply-templates select=".//heading"/>
+
+  &lt;/fo:block>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>It is also possible to process elements that are not descendants of
+         
+         the current node.  This example assumes that a <code>department</code>
+         
+         element has <code>group</code> children and <code>employee</code>
+         
+         descendants. It finds an employee's department and then processes
+         
+         the <code>group</code> children of the <code>department</code>.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="employee">
+
+  &lt;fo:block>
+
+    Employee &lt;xsl:apply-templates select="name"/> belongs to group
+
+    &lt;xsl:apply-templates select="ancestor::department/group"/>
+
+  &lt;/fo:block>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>Multiple <code>xsl:apply-templates</code> elements can be used within a
+         
+         single template to do simple reordering.  The following example
+         
+         creates two HTML tables. The first table is filled with domestic sales
+         
+         while the second table is filled with foreign sales.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="product">
+
+  &lt;table>
+
+    &lt;xsl:apply-templates select="sales/domestic"/>
+
+  &lt;/table>
+
+  &lt;table>
+
+    &lt;xsl:apply-templates select="sales/foreign"/>
+
+  &lt;/table>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <blockquote><b>NOTE: </b>
+         
+         
+         
+         It is possible for there to be two matching descendants where one
+         
+         is a descendant of the other.  This case is not treated specially:
+         
+         both descendants will be processed as usual. For example, given a
+         
+         source document
+         
+         
+         
+         <pre>&lt;doc>&lt;div>&lt;div>&lt;/div>&lt;/div>&lt;/doc></pre>
+         
+         
+         
+         the rule
+         
+         
+         
+         <pre>&lt;xsl:template match="doc">
+
+  &lt;xsl:apply-templates select=".//div"/>
+
+&lt;/xsl:template></pre>
+         
+         
+         
+         will process both the outer <code>div</code> and inner <code>div</code>
+         
+         elements.
+         
+         
+         
+         
+      </blockquote>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Typically, <code>xsl:apply-templates</code> is used to
+         
+         process only nodes that are descendants of the current node.  Such use
+         
+         of <code>xsl:apply-templates</code> cannot result in non-terminating
+         
+         processing loops.  However, when <code>xsl:apply-templates</code> is
+         
+         used to process elements that are not descendants of the current node,
+         
+         the possibility arises of non-terminating loops. For example,
+         
+         
+         
+         <pre style="color: red">&lt;xsl:template match="foo">
+
+  &lt;xsl:apply-templates select="."/>
+
+&lt;/xsl:template></pre>
+         
+         
+         
+         Implementations may be able to detect such loops in some cases, but
+         
+         the possibility exists that a stylesheet may enter a non-terminating
+         
+         loop that an implementation is unable to detect. This may present a
+         
+         denial of service security risk.</blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="conflict"></a>5.5 Conflict Resolution for Template Rules
+      </h3>
+      
+      
+      
+      
+      <p>It is possible for a source node to match more than one template
+         
+         rule. The template rule to be used is determined as follows:
+      </p>
+      
+      
+      
+      
+      <ol>
+         
+         
+         
+         
+         <li>
+            <p>First, all matching template rules that have lower <a href="#dt-import-precedence">import precedence</a> than the
+               
+               matching template rule or rules with the highest import precedence are
+               
+               eliminated from consideration.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>Next, all matching template rules that have lower priority
+               
+               than the matching template rule or rules with the highest priority are
+               
+               eliminated from consideration.  The priority of a template rule is
+               
+               specified by the <code>priority</code> attribute on the template rule.
+               
+               The value of this must be a real number (positive or negative),
+               
+               matching the production <a href="http://www.w3.org/TR/xpath#NT-Number">Number</a>
+               
+               with an optional leading minus sign (<code>-</code>).  <a name="dt-default-priority"></a>The <b>default
+                  
+                  priority
+               </b> is computed as follows:
+            </p>
+            
+            
+            
+            
+            <ul>
+               
+               
+               
+               
+               <li>
+                  <p>If the pattern contains multiple alternatives separated by
+                     
+                     <code>|</code>, then it is treated equivalently to a set of template
+                     
+                     rules, one for each alternative.
+                  </p>
+               </li>
+               
+               
+               
+               
+               <li>
+                  <p>If the pattern has the form of a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> preceded by a <a href="#NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</a>
+                     
+                     or has the form
+                     
+                     <code>processing-instruction(</code><a href="http://www.w3.org/TR/xpath#NT-Literal">Literal</a><code>)</code> preceded by a <a href="#NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</a>,
+                     
+                     then the priority is 0.
+                  </p>
+               </li>
+               
+               
+               
+               
+               <li>
+                  <p>If the pattern has the form <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a><code>:*</code> preceded by a
+                     
+                     <a href="#NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</a>,
+                     
+                     then the priority is -0.25.
+                  </p>
+               </li>
+               
+               
+               
+               
+               <li>
+                  <p>Otherwise, if the pattern consists of just a <a href="http://www.w3.org/TR/xpath#NT-NodeTest">NodeTest</a> preceded by a <a href="#NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</a>,
+                     
+                     then the priority is -0.5.
+                  </p>
+               </li>
+               
+               
+               
+               
+               <li>
+                  <p>Otherwise, the priority is 0.5.</p>
+               </li>
+               
+               
+               
+               
+            </ul>
+            
+            
+            
+            
+            <p>Thus, the most common kind of pattern (a pattern that tests for a
+               
+               node with a particular type and a particular expanded-name) has
+               
+               priority 0. The next less specific kind of pattern (a pattern that
+               
+               tests for a node with a particular type and an expanded-name with a
+               
+               particular namespace URI) has priority -0.25.  Patterns less specific
+               
+               than this (patterns that just tests for nodes with particular types)
+               
+               have priority -0.5.  Patterns more specific than the most common kind
+               
+               of pattern have priority 0.5.
+            </p>
+            
+            
+            
+            
+         </li>
+         
+         
+         
+         
+      </ol>
+      
+      
+      
+      
+      <p>It is an error if this leaves more than one matching template
+         
+         rule.  An XSLT processor may signal the error; if it does not signal
+         
+         the error, it must recover by choosing, from amongst the matching
+         
+         template rules that are left, the one that occurs last in the
+         
+         stylesheet.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="apply-imports"></a>5.6 Overriding Template Rules
+      </h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-apply-imports"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:apply-imports&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>A template rule that is being used to override a template rule in
+         
+         an imported stylesheet (see <a href="#conflict">[<b>5.5 Conflict Resolution for Template Rules</b>]
+         </a>) can use the
+         
+         <code>xsl:apply-imports</code> element to invoke the overridden
+         
+         template rule.
+      </p>
+      
+      
+      
+      
+      <p><a name="dt-current-template-rule"></a>At any point in the processing of a stylesheet, there is a
+         
+         <b>current template rule</b>.  Whenever a template rule is
+         
+         chosen by matching a pattern, the template rule becomes the current
+         
+         template rule for the instantiation of the rule's template. When an
+         
+         <code>xsl:for-each</code> element is instantiated, the current
+         
+         template rule becomes null for the instantiation of the content of the
+         
+         <code>xsl:for-each</code> element.
+      </p>
+      
+      
+      
+      
+      <p><code>xsl:apply-imports</code> processes the current node using
+         
+         only template rules that were imported into the stylesheet element
+         
+         containing the current template rule; the node is processed in the
+         
+         current template rule's mode.  It is an error if
+         
+         <code>xsl:apply-imports</code> is instantiated when the current
+         
+         template rule is null.
+      </p>
+      
+      
+      
+      
+      <p>For example, suppose the stylesheet <code>doc.xsl</code> contains a
+         
+         template rule for <code>example</code> elements:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="example">
+
+  &lt;pre>&lt;xsl:apply-templates/>&lt;/pre>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>Another stylesheet could import <code>doc.xsl</code> and modify the
+         
+         treatment of <code>example</code> elements as follows:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:import href="doc.xsl"/>
+
+
+
+&lt;xsl:template match="example">
+
+  &lt;div style="border: solid red">
+
+     &lt;xsl:apply-imports/>
+
+  &lt;/div>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>The combined effect would be to transform an <code>example</code>
+         
+         into an element of the form:
+      </p>
+      
+      
+      
+      <pre>&lt;div style="border: solid red">&lt;pre>...&lt;/pre>&lt;/div></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="modes"></a>5.7 Modes
+      </h3>
+      
+      
+      
+      
+      <p>Modes allow an element to be processed multiple times, each time
+         
+         producing a different result.
+      </p>
+      
+      
+      
+      
+      <p>Both <code>xsl:template</code> and <code>xsl:apply-templates</code>
+         
+         have an optional <code>mode</code> attribute.  The value of the
+         
+         <code>mode</code> attribute is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>. If <code>xsl:template</code> does not have
+         
+         a <code>match</code> attribute, it must not have a <code>mode</code>
+         
+         attribute.  If an <code>xsl:apply-templates</code> element has a
+         
+         <code>mode</code> attribute, then it applies only to those template
+         
+         rules from <code>xsl:template</code> elements that have a
+         
+         <code>mode</code> attribute with the same value; if an
+         
+         <code>xsl:apply-templates</code> element does not have a
+         
+         <code>mode</code> attribute, then it applies only to those template
+         
+         rules from <code>xsl:template</code> elements that do not have a
+         
+         <code>mode</code> attribute.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="built-in-rule"></a>5.8 Built-in Template Rules
+      </h3>
+      
+      
+      
+      
+      <p>There is a built-in template rule to allow recursive processing to
+         
+         continue in the absence of a successful pattern match by an explicit
+         
+         template rule in the stylesheet.  This template rule applies to both
+         
+         element nodes and the root node.  The following shows the equivalent
+         
+         of the built-in template rule:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="*|/">
+
+  &lt;xsl:apply-templates/>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>There is also a built-in template rule for each mode, which allows
+         
+         recursive processing to continue in the same mode in the absence of a
+         
+         successful pattern match by an explicit template rule in the
+         
+         stylesheet.  This template rule applies to both element nodes and the
+         
+         root node.  The following shows the equivalent of the built-in
+         
+         template rule for mode <code><var>m</var></code>.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="*|/" mode="<var>m</var>">
+         
+         &lt;xsl:apply-templates mode="<var>m</var>"/>
+         
+         &lt;/xsl:template>
+      </pre>
+      
+      
+      
+      
+      <p>There is also a built-in template rule for text and attribute nodes
+         
+         that copies text through:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="text()|@*">
+
+  &lt;xsl:value-of select="."/>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>The built-in template rule for processing instructions and comments
+         
+         is to do nothing.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="processing-instruction()|comment()"/></pre>
+      
+      
+      
+      <p>The built-in template rule for namespace nodes is also to do
+         
+         nothing. There is no pattern that can match a namespace node; so, the
+         
+         built-in template rule is the only template rule that is applied for
+         
+         namespace nodes.
+      </p>
+      
+      
+      
+      
+      <p>The built-in template rules are treated as if they were imported
+         
+         implicitly before the stylesheet and so have lower <a href="#dt-import-precedence">import precedence</a> than all other
+         
+         template rules.  Thus, the author can override a built-in template
+         
+         rule by including an explicit template rule.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="named-templates"></a>6 Named Templates
+      </h2>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-call-template"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:call-template<br>&nbsp;&nbsp;<b>name</b> = <var>qname</var>><br>&nbsp;&nbsp;&lt;!-- Content: <a href="#element-with-param">xsl:with-param</a>* --><br>&lt;/xsl:call-template>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>Templates can be invoked by name.  An <code>xsl:template</code>
+         
+         element with a <code>name</code> attribute specifies a named template.
+         
+         The value of the <code>name</code> attribute is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>. If an <code>xsl:template</code> element has
+         
+         a <code>name</code> attribute, it may, but need not, also have a
+         
+         <code>match</code> attribute.  An <code>xsl:call-template</code>
+         
+         element invokes a template by name; it has a required
+         
+         <code>name</code> attribute that identifies the template to be
+         
+         invoked.  Unlike <code>xsl:apply-templates</code>,
+         
+         <code>xsl:call-template</code> does not change the current node or the
+         
+         current node list.
+      </p>
+      
+      
+      
+      
+      <p>The <code>match</code>, <code>mode</code> and <code>priority</code> attributes on an
+         
+         <code>xsl:template</code> element do not affect whether the template
+         
+         is invoked by an <code>xsl:call-template</code> element.  Similarly,
+         
+         the <code>name</code> attribute on an <code>xsl:template</code>
+         
+         element does not affect whether the template is invoked by an
+         
+         <code>xsl:apply-templates</code> element.
+      </p>
+      
+      
+      
+      
+      <p>It is an error if a stylesheet contains more than one template with
+         
+         the same name and same <a href="#dt-import-precedence">import
+            
+            precedence
+         </a>.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Creating-the-Result-Tree"></a>7 Creating the Result Tree
+      </h2>
+      
+      
+      
+      
+      <p>This section describes instructions that directly create nodes in
+         
+         the result tree.
+      </p>
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Creating-Elements-and-Attributes"></a>7.1 Creating Elements and Attributes
+      </h3>
+      
+      
+      
+      
+      
+      
+      <h4><a name="literal-result-element"></a>7.1.1 Literal Result Elements
+      </h4>
+      
+      
+      
+      
+      <p>In a template, an element in the stylesheet that does not belong to
+         
+         the XSLT namespace and that is not an extension element (see <a href="#extension-element">[<b>14.1 Extension Elements</b>]
+         </a>) is instantiated to create an element node
+         
+         with the same <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a>.  The content
+         
+         of the element is a template, which is instantiated to give the
+         
+         content of the created element node. The created element node will
+         
+         have the attribute nodes that were present on the element node in the
+         
+         stylesheet tree, other than attributes with names in the XSLT
+         
+         namespace.
+      </p>
+      
+      
+      
+      
+      <p>The created element node will also have a copy of the namespace
+         
+         nodes that were present on the element node in the stylesheet tree
+         
+         with the exception of any namespace node whose string-value is the
+         
+         XSLT namespace URI (<code>http://www.w3.org/1999/XSL/Transform</code>), a
+         
+         namespace URI declared as an extension namespace (see <a href="#extension-element">[<b>14.1 Extension Elements</b>]
+         </a>), or a namespace URI designated as an
+         
+         excluded namespace.  A namespace URI is designated as an excluded
+         
+         namespace by using an <code>exclude-result-prefixes</code> attribute
+         
+         on an <code>xsl:stylesheet</code> element or an
+         
+         <code>xsl:exclude-result-prefixes</code> attribute on a literal result
+         
+         element.  The value of both these attributes is a whitespace-separated
+         
+         list of namespace prefixes. The namespace bound to each of the
+         
+         prefixes is designated as an excluded namespace.  It is an error if
+         
+         there is no namespace bound to the prefix on the element bearing the
+         
+         <code>exclude-result-prefixes</code> or
+         
+         <code>xsl:exclude-result-prefixes</code> attribute.  The default
+         
+         namespace (as declared by <code>xmlns</code>) may be designated as an
+         
+         excluded namespace by including <code>#default</code> in the list of
+         
+         namespace prefixes.  The designation of a namespace as an excluded
+         
+         namespace is effective within the subtree of the stylesheet rooted at
+         
+         the element bearing the <code>exclude-result-prefixes</code> or
+         
+         <code>xsl:exclude-result-prefixes</code> attribute;
+         
+         a subtree rooted at an <code>xsl:stylesheet</code> element
+         
+         does not include any stylesheets imported or included by children
+         
+         of that <code>xsl:stylesheet</code> element.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>When a stylesheet uses a namespace declaration only for the
+         
+         purposes of addressing the source tree, specifying the prefix in the
+         
+         <code>exclude-result-prefixes</code> attribute will avoid superfluous
+         
+         namespace declarations in the result tree.
+      </blockquote>
+      
+      
+      
+      
+      <p>The value of an attribute of a literal result element is
+         
+         interpreted as an <a href="#dt-attribute-value-template">attribute
+            
+            value template
+         </a>: it can contain expressions contained
+         
+         in curly braces (<code>{}</code>).
+      </p>
+      
+      
+      
+      
+      <p><a name="dt-literal-namespace-uri"></a>A namespace URI in the stylesheet tree that is being used to
+         
+         specify a namespace URI in the result tree is called a <b>literal
+            
+            namespace URI
+         </b>. This applies to:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>the namespace URI in the expanded-name of a literal
+               
+               result element in the stylesheet
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the namespace URI in the expanded-name of an attribute
+               
+               specified on a literal result element in the stylesheet
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the string-value of a namespace node on a literal result
+               
+               element in the stylesheet
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-namespace-alias"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:namespace-alias<br>&nbsp;&nbsp;<b>stylesheet-prefix</b> = <var>prefix</var> | "#default"<br>&nbsp;&nbsp;<b>result-prefix</b> = <var>prefix</var> | "#default"&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p><a name="dt-alias"></a>A stylesheet can use the
+         
+         <code>xsl:namespace-alias</code> element to declare that one namespace
+         
+         URI is an <b>alias</b> for another namespace URI. When
+         
+         a <a href="#dt-literal-namespace-uri">literal namespace
+            
+            URI
+         </a> has been declared to be an alias for another namespace
+         
+         URI, then the namespace URI in the result tree will be the namespace
+         
+         URI that the literal namespace URI is an alias for, instead of the
+         
+         literal namespace URI itself.  The <code>xsl:namespace-alias</code>
+         
+         element declares that the namespace URI bound to the prefix specified
+         
+         by the <code>stylesheet-prefix</code> attribute is an alias for the
+         
+         namespace URI bound to the prefix specified by the
+         
+         <code>result-prefix</code> attribute.  Thus, the
+         
+         <code>stylesheet-prefix</code> attribute specifies the namespace URI
+         
+         that will appear in the stylesheet, and the
+         
+         <code>result-prefix</code> attribute specifies the corresponding
+         
+         namespace URI that will appear in the result tree.  The default
+         
+         namespace (as declared by <code>xmlns</code>) may be specified by
+         
+         using <code>#default</code> instead of a prefix.  If a namespace URI
+         
+         is declared to be an alias for multiple different namespace URIs, then
+         
+         the declaration with the highest <a href="#dt-import-precedence">import precedence</a> is used. It is
+         
+         an error if there is more than one such declaration.  An XSLT
+         
+         processor may signal the error; if it does not signal the error, it
+         
+         must recover by choosing, from amongst the declarations with the
+         
+         highest import precedence, the one that occurs last in the
+         
+         stylesheet.
+      </p>
+      
+      
+      
+      
+      <p>When literal result elements are being used to create element,
+         
+         attribute, or namespace nodes that use the XSLT namespace URI, the
+         
+         stylesheet must use an alias.  For example, the stylesheet
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet
+
+  version="1.0"
+
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+  xmlns:fo="http://www.w3.org/1999/XSL/Format"
+
+  xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias">
+
+
+
+&lt;xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
+
+
+
+&lt;xsl:template match="/">
+
+  &lt;axsl:stylesheet>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/axsl:stylesheet>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="block">
+
+  &lt;axsl:template match="{.}">
+
+     &lt;fo:block>&lt;axsl:apply-templates/>&lt;/fo:block>
+
+  &lt;/axsl:template>
+
+&lt;/xsl:template>
+
+
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <p>will generate an XSLT stylesheet from a document of the form:</p>
+      
+      
+      
+      <pre>&lt;elements>
+
+&lt;block>p&lt;/block>
+
+&lt;block>h1&lt;/block>
+
+&lt;block>h2&lt;/block>
+
+&lt;block>h3&lt;/block>
+
+&lt;block>h4&lt;/block>
+
+&lt;/elements></pre>
+      
+      
+      
+      <blockquote><b>NOTE: </b>It may be necessary also to use aliases for namespaces other
+         
+         than the XSLT namespace URI.  For example, literal result elements
+         
+         belonging to a namespace dealing with digital signatures might cause
+         
+         XSLT stylesheets to be mishandled by general-purpose security
+         
+         software; using an alias for the namespace would avoid the possibility
+         
+         of such mishandling.
+      </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h4><a name="section-Creating-Elements-with-xsl:element"></a>7.1.2 Creating Elements with <code>xsl:element</code></h4>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-element"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:element<br>&nbsp;&nbsp;<b>name</b> = { <var>qname</var> }<br>&nbsp;&nbsp;namespace = { <var>uri-reference</var> }<br>&nbsp;&nbsp;use-attribute-sets = <var>qnames</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:element>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:element</code> element allows an element to be
+         
+         created with a computed name.  The <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a> of the
+         
+         element to be created is specified by a required <code>name</code>
+         
+         attribute and an optional <code>namespace</code> attribute.  The
+         
+         content of the <code>xsl:element</code> element is a template for the
+         
+         attributes and children of the created element.
+      </p>
+      
+      
+      
+      
+      <p>The <code>name</code> attribute is interpreted as an <a href="#dt-attribute-value-template">attribute value template</a>.
+         
+         It is an error if the string that results from instantiating the
+         
+         attribute value template is not a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>.  An XSLT processor may signal
+         
+         the error; if it does not signal the error, then it must recover
+         
+         by making the the result of instantiating the <code>xsl:element</code>
+         
+         element be the sequence of nodes created by instantiating
+         
+         the content of the  <code>xsl:element</code> element, excluding
+         
+         any initial attribute nodes. If the <code>namespace</code> attribute is
+         
+         not present then the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> is
+         
+         expanded into an expanded-name using the namespace declarations in
+         
+         effect for the <code>xsl:element</code> element, including any default
+         
+         namespace declaration.
+      </p>
+      
+      
+      
+      
+      <p>If the <code>namespace</code> attribute is present, then it also is
+         
+         interpreted as an <a href="#dt-attribute-value-template">attribute
+            
+            value template
+         </a>. The string that results from instantiating
+         
+         the attribute value template should be a URI reference.  It is not an
+         
+         error if the string is not a syntactically legal URI reference.  If
+         
+         the string is empty, then the expanded-name of the element has a null
+         
+         namespace URI.  Otherwise, the string is used as the namespace URI of
+         
+         the expanded-name of the element to be created. The local part of the
+         
+         <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> specified by the
+         
+         <code>name</code> attribute is used as the local part of the
+         
+         expanded-name of the element to be created.
+      </p>
+      
+      
+      
+      
+      <p>XSLT processors may make use of the prefix of the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> specified in the
+         
+         <code>name</code> attribute when selecting the prefix used for
+         
+         outputting the created element as XML; however, they are not required
+         
+         to do so.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h4><a name="creating-attributes"></a>7.1.3 Creating Attributes with <code>xsl:attribute</code></h4>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-attribute"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:attribute<br>&nbsp;&nbsp;<b>name</b> = { <var>qname</var> }<br>&nbsp;&nbsp;namespace = { <var>uri-reference</var> }><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:attribute>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:attribute</code> element can be used to add
+         
+         attributes to result elements whether created by literal result
+         
+         elements in the stylesheet or by instructions such as
+         
+         <code>xsl:element</code>. The <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a> of the
+         
+         attribute to be created is specified by a required <code>name</code>
+         
+         attribute and an optional <code>namespace</code> attribute.
+         
+         Instantiating an <code>xsl:attribute</code> element adds an attribute
+         
+         node to the containing result element node. The content of the
+         
+         <code>xsl:attribute</code> element is a template for the value of the
+         
+         created attribute.
+      </p>
+      
+      
+      
+      
+      <p>The <code>name</code> attribute is interpreted as an <a href="#dt-attribute-value-template">attribute value template</a>.
+         
+         It is an error if the string that results from instantiating the
+         
+         attribute value template is not a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> or is the string
+         
+         <code>xmlns</code>.  An XSLT processor may signal the error; if it
+         
+         does not signal the error, it must recover by not adding the attribute
+         
+         to the result tree. If the <code>namespace</code> attribute is not
+         
+         present, then the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> is
+         
+         expanded into an expanded-name using the namespace declarations in
+         
+         effect for the <code>xsl:attribute</code> element, <i>not</i>
+         
+         including any default namespace declaration.
+      </p>
+      
+      
+      
+      
+      <p>If the <code>namespace</code> attribute is present, then it also is
+         
+         interpreted as an <a href="#dt-attribute-value-template">attribute
+            
+            value template
+         </a>. The string that results from instantiating
+         
+         it should be a URI reference.  It is not an error if the string is not
+         
+         a syntactically legal URI reference.  If the string is empty, then the
+         
+         expanded-name of the attribute has a null namespace URI.  Otherwise,
+         
+         the string is used as the namespace URI of the expanded-name of the
+         
+         attribute to be created. The local part of the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> specified by the
+         
+         <code>name</code> attribute is used as the local part of the
+         
+         expanded-name of the attribute to be created.
+      </p>
+      
+      
+      
+      
+      <p>XSLT processors may make use of the prefix of the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> specified in the
+         
+         <code>name</code> attribute when selecting the prefix used for
+         
+         outputting the created attribute as XML; however, they are not
+         
+         required to do so and, if the prefix is <code>xmlns</code>, they must
+         
+         not do so. Thus, although it is not an error to do:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:attribute name="xmlns:xsl" namespace="whatever">http://www.w3.org/1999/XSL/Transform&lt;/xsl:attribute></pre>
+      
+      
+      
+      <p>it will not result in a namespace declaration being output.</p>
+      
+      
+      
+      
+      <p>Adding an attribute to an element replaces any existing attribute
+         
+         of that element with the same expanded-name.
+      </p>
+      
+      
+      
+      
+      <p>The following are all errors:</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>Adding an attribute to an element after children have been
+               
+               added to it; implementations may either signal the error or ignore the
+               
+               attribute.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>Adding an attribute to a node that is not an element;
+               
+               implementations may either signal the error or ignore the
+               
+               attribute.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>Creating nodes other than text nodes during the
+               
+               instantiation of the content of the <code>xsl:attribute</code>
+               
+               element; implementations may either signal the error or ignore the
+               
+               offending nodes.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>When an <code>xsl:attribute</code> contains a text node with
+         
+         a newline, then the XML output must contain a character reference.
+         
+         For example,
+         
+         
+         
+         <pre>&lt;xsl:attribute name="a">x
+
+y&lt;/xsl:attribute></pre>
+         
+         
+         
+         will result in the output
+         
+         
+         
+         <pre>a="x&amp;#xA;y"</pre>
+         
+         
+         
+         (or with any equivalent character reference). The XML output cannot
+         
+         be
+         
+         
+         
+         <pre>a="x
+
+y"</pre>
+         
+         
+         
+         This is because XML 1.0 requires newline characters in attribute
+         
+         values to be normalized into spaces but requires character references
+         
+         to newline characters not to be normalized.  The attribute values in
+         
+         the data model represent the attribute value after normalization.  If
+         
+         a newline occurring in an attribute value in the tree were output as a
+         
+         newline character rather than as character reference, then the
+         
+         attribute value in the tree created by reparsing the XML would contain
+         
+         a space not a newline, which would mean that the tree had not been
+         
+         output correctly.</blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h4><a name="attribute-sets"></a>7.1.4 Named Attribute Sets
+      </h4>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-attribute-set"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:attribute-set<br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;use-attribute-sets = <var>qnames</var>><br>&nbsp;&nbsp;&lt;!-- Content: <a href="#element-attribute">xsl:attribute</a>* --><br>&lt;/xsl:attribute-set>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:attribute-set</code> element defines a named set of
+         
+         attributes.  The <code>name</code> attribute specifies the name of the
+         
+         attribute set.  The value of the <code>name</code> attribute is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>. The content of the <code>xsl:attribute-set</code>
+         
+         element consists of zero or more <code>xsl:attribute</code> elements
+         
+         that specify the attributes in the set.
+      </p>
+      
+      
+      
+      
+      <p>Attribute sets are used by specifying a
+         
+         <code>use-attribute-sets</code> attribute on <code>xsl:element</code>,
+         
+         <code>xsl:copy</code> (see <a href="#copying">[<b>7.5 Copying</b>]
+         </a>) or
+         
+         <code>xsl:attribute-set</code> elements.  The value of the
+         
+         <code>use-attribute-sets</code> attribute is a whitespace-separated
+         
+         list of names of attribute sets.  Each name is specified as a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>.  Specifying a
+         
+         <code>use-attribute-sets</code> attribute is equivalent to adding
+         
+         <code>xsl:attribute</code> elements for each of the attributes in each
+         
+         of the named attribute sets to the beginning of the content of the
+         
+         element with the <code>use-attribute-sets</code> attribute, in the
+         
+         same order in which the names of the attribute sets are specified in
+         
+         the <code>use-attribute-sets</code> attribute.  It is an error if use
+         
+         of <code>use-attribute-sets</code> attributes on
+         
+         <code>xsl:attribute-set</code> elements causes an attribute set to
+         
+         directly or indirectly use itself.
+      </p>
+      
+      
+      
+      
+      <p>Attribute sets can also be used by specifying an
+         
+         <code>xsl:use-attribute-sets</code> attribute on a literal result
+         
+         element.  The value of the <code>xsl:use-attribute-sets</code>
+         
+         attribute is a whitespace-separated list of names of attribute sets.
+         
+         The <code>xsl:use-attribute-sets</code> attribute has the same effect
+         
+         as the <code>use-attribute-sets</code> attribute on
+         
+         <code>xsl:element</code> with the additional rule that attributes
+         
+         specified on the literal result element itself are treated as if they
+         
+         were specified by <code>xsl:attribute</code> elements before any
+         
+         actual <code>xsl:attribute</code> elements but after any
+         
+         <code>xsl:attribute</code> elements implied by the
+         
+         <code>xsl:use-attribute-sets</code> attribute.  Thus, for a literal
+         
+         result element, attributes from attribute sets named in an
+         
+         <code>xsl:use-attribute-sets</code> attribute will be added first, in
+         
+         the order listed in the attribute; next, attributes specified on the
+         
+         literal result element will be added; finally, any attributes
+         
+         specified by <code>xsl:attribute</code> elements will be added.  Since
+         
+         adding an attribute to an element replaces any existing attribute of
+         
+         that element with the same name, this means that attributes specified
+         
+         in attribute sets can be overridden by attributes specified on the
+         
+         literal result element itself.
+      </p>
+      
+      
+      
+      
+      <p>The template within each <code>xsl:attribute</code> element in an
+         
+         <code>xsl:attribute-set</code> element is instantiated each time the
+         
+         attribute set is used; it is instantiated using the same current node
+         
+         and current node list as is used for instantiating the element bearing
+         
+         the <code>use-attribute-sets</code> or
+         
+         <code>xsl:use-attribute-sets</code> attribute. However, it is the
+         
+         position in the stylesheet of the <code>xsl:attribute</code> element
+         
+         rather than of the element bearing the <code>use-attribute-sets</code>
+         
+         or <code>xsl:use-attribute-sets</code> attribute that determines which
+         
+         variable bindings are visible (see <a href="#variables">[<b>11 Variables and Parameters</b>]
+         </a>); thus,
+         
+         only variables and parameters declared by <a href="#dt-top-level">top-level</a> <code>xsl:variable</code> and
+         
+         <code>xsl:param</code> elements are visible.
+      </p>
+      
+      
+      
+      
+      <p>The following example creates a named attribute set
+         
+         <code>title-style</code> and uses it in a template rule.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="chapter/heading">
+
+  &lt;fo:block quadding="start" xsl:use-attribute-sets="title-style">
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/fo:block>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:attribute-set name="title-style">
+
+  &lt;xsl:attribute name="font-size">12pt&lt;/xsl:attribute>
+
+  &lt;xsl:attribute name="font-weight">bold&lt;/xsl:attribute>
+
+&lt;/xsl:attribute-set></pre>
+      
+      
+      
+      <p>Multiple definitions of an attribute set with the same
+         
+         expanded-name are merged.  An attribute from a definition that has
+         
+         higher <a href="#dt-import-precedence">import precedence</a>
+         
+         takes precedence over an attribute from a definition that has lower
+         
+         <a href="#dt-import-precedence">import precedence</a>.  It
+         
+         is an error if there are two attribute sets that have the same
+         
+         expanded-name and equal import precedence and that both contain
+         
+         the same attribute, unless there is a definition of the attribute set
+         
+         with higher <a href="#dt-import-precedence">import
+            
+            precedence
+         </a> that also contains the attribute.  An XSLT
+         
+         processor may signal the error; if it does not signal the error, it
+         
+         must recover by choosing from amongst the definitions that specify the
+         
+         attribute that have the highest import precedence the one that was
+         
+         specified last in the stylesheet.  Where the attributes in an
+         
+         attribute set were specified is relevant only in merging the
+         
+         attributes into the attribute set; it makes no difference when the
+         
+         attribute set is used.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Creating-Text"></a>7.2 Creating Text
+      </h3>
+      
+      
+      
+      
+      <p>A template can also contain text nodes.  Each text node in a
+         
+         template remaining after whitespace has been stripped as specified in
+         
+         <a href="#strip">[<b>3.4 Whitespace Stripping</b>]
+         </a> will create a text node with the same
+         
+         string-value in the result tree.  Adjacent text nodes in the result
+         
+         tree are automatically merged.
+      </p>
+      
+      
+      
+      
+      <p>Note that text is processed at the tree level. Thus, markup of
+         
+         <code>&amp;lt;</code> in a template will be represented in the
+         
+         stylesheet tree by a text node that includes the character
+         
+         <code>&lt;</code>. This will create a text node in the result tree
+         
+         that contains a <code>&lt;</code> character, which will be represented
+         
+         by the markup <code>&amp;lt;</code> (or an equivalent character
+         
+         reference) when the result tree is externalized as an XML document
+         
+         (unless output escaping is disabled as described in <a href="#disable-output-escaping">[<b>16.4 Disabling Output Escaping</b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-text"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:text<br>&nbsp;&nbsp;disable-output-escaping = "yes" | "no"><br>&nbsp;&nbsp;&lt;!-- Content: #PCDATA --><br>&lt;/xsl:text>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>Literal data characters may also be wrapped in an
+         
+         <code>xsl:text</code> element.  This wrapping may change what
+         
+         whitespace characters are stripped (see <a href="#strip">[<b>3.4 Whitespace Stripping</b>]
+         </a>) but
+         
+         does not affect how the characters are handled by the XSLT processor
+         
+         thereafter.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>The <code>xml:lang</code> and <code>xml:space</code>
+         
+         attributes are not treated specially by XSLT. In particular,
+         
+         
+         
+         
+         <ul>
+            
+            
+            <li>
+               <p>it is the responsibility of the stylesheet author explicitly
+                  
+                  to generate any <code>xml:lang</code> or <code>xml:space</code>
+                  
+                  attributes that are needed in the result;
+               </p>
+            </li>
+            
+            
+            
+            
+            <li>
+               <p>specifying an <code>xml:lang</code> or <code>xml:space</code>
+                  
+                  attribute on an element in the XSLT namespace will not cause any
+                  
+                  <code>xml:lang</code> or <code>xml:space</code> attributes to appear
+                  
+                  in the result.
+               </p>
+            </li>
+            
+            
+         </ul>
+         
+         
+      </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Creating-Processing-Instructions"></a>7.3 Creating Processing Instructions
+      </h3>
+      
+      
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-processing-instruction"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:processing-instruction<br>&nbsp;&nbsp;<b>name</b> = { <var>ncname</var> }><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:processing-instruction>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:processing-instruction</code> element is instantiated
+         
+         to create a processing instruction node.  The content of the
+         
+         <code>xsl:processing-instruction</code> element is a template for the
+         
+         string-value of the processing instruction node.  The
+         
+         <code>xsl:processing-instruction</code> element has a required
+         
+         <code>name</code> attribute that specifies the name of the processing
+         
+         instruction node.  The value of the <code>name</code> attribute is
+         
+         interpreted as an <a href="#dt-attribute-value-template">attribute
+            
+            value template
+         </a>.
+      </p>
+      
+      
+      
+      
+      <p>For example, this</p>
+      
+      
+      
+      <pre>&lt;xsl:processing-instruction name="xml-stylesheet">href="book.css" type="text/css"&lt;/xsl:processing-instruction></pre>
+      
+      
+      
+      <p>would create the processing instruction</p>
+      
+      
+      
+      <pre>&lt;?xml-stylesheet href="book.css" type="text/css"?></pre>
+      
+      
+      
+      <p>It is an error if the string that results from instantiating the
+         
+         <code>name</code> attribute is not both an <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a> and a <a href="http://www.w3.org/TR/REC-xml#NT-PITarget">PITarget</a>.  An XSLT processor may signal
+         
+         the error; if it does not signal the error, it must recover by not
+         
+         adding the processing instruction to the result tree.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>This means that <code>xsl:processing-instruction</code>
+         
+         cannot be used to output an XML declaration.  The
+         
+         <code>xsl:output</code> element should be used instead (see <a href="#output">[<b>16 Output</b>]
+         </a>).
+      </blockquote>
+      
+      
+      
+      
+      <p>It is an error if instantiating the content of
+         
+         <code>xsl:processing-instruction</code> creates nodes other than
+         
+         text nodes.  An XSLT processor may signal the error; if it does not
+         
+         signal the error, it must recover by ignoring the offending nodes
+         
+         together with their content.
+      </p>
+      
+      
+      
+      
+      <p>It is an error if the result of instantiating the content of the
+         
+         <code>xsl:processing-instruction</code> contains the string
+         
+         <code>?></code>.  An XSLT processor may signal the error; if it does
+         
+         not signal the error, it must recover by inserting a space after any
+         
+         occurrence of <code>?</code> that is followed by a <code>></code>.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Creating-Comments"></a>7.4 Creating Comments
+      </h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-comment"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:comment><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:comment>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:comment</code> element is instantiated to create a
+         
+         comment node in the result tree.  The content of the
+         
+         <code>xsl:comment</code> element is a template for the string-value of
+         
+         the comment node.
+      </p>
+      
+      
+      
+      
+      <p>For example, this</p>
+      
+      
+      
+      <pre>&lt;xsl:comment>This file is automatically generated. Do not edit!&lt;/xsl:comment></pre>
+      
+      
+      
+      <p>would create the comment</p>
+      
+      
+      
+      <pre>&lt;!--This file is automatically generated. Do not edit!--></pre>
+      
+      
+      
+      <p>It is an error if instantiating the content of
+         
+         <code>xsl:comment</code> creates nodes other than text nodes.  An
+         
+         XSLT processor may signal the error; if it does not signal the error,
+         
+         it must recover by ignoring the offending nodes together with their
+         
+         content.
+      </p>
+      
+      
+      
+      
+      <p>It is an error if the result of instantiating the content of the
+         
+         <code>xsl:comment</code> contains the string <code>--</code> or ends
+         
+         with <code>-</code>.  An XSLT processor may signal the error; if it
+         
+         does not signal the error, it must recover by inserting a space after
+         
+         any occurrence of <code>-</code> that is followed by another
+         
+         <code>-</code> or that ends the comment.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="copying"></a>7.5 Copying
+      </h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-copy"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:copy<br>&nbsp;&nbsp;use-attribute-sets = <var>qnames</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:copy>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:copy</code> element provides an easy way of copying
+         
+         the current node. Instantiating the <code>xsl:copy</code> element
+         
+         creates a copy of the current node.  The namespace nodes of the
+         
+         current node are automatically copied as well, but the attributes and
+         
+         children of the node are not automatically copied.  The content of the
+         
+         <code>xsl:copy</code> element is a template for the attributes and
+         
+         children of the created node; the content is instantiated only for
+         
+         nodes of types that can have attributes or children (i.e. root
+         
+         nodes and element nodes).
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:copy</code> element may have a
+         
+         <code>use-attribute-sets</code> attribute (see <a href="#attribute-sets">[<b>7.1.4 Named Attribute Sets</b>]
+         </a>). This is used only when copying element
+         
+         nodes.
+      </p>
+      
+      
+      
+      
+      <p>The root node is treated specially because the root node of the
+         
+         result tree is created implicitly.  When the current node is the root
+         
+         node, <code>xsl:copy</code> will not create a root node, but will just
+         
+         use the content template.
+      </p>
+      
+      
+      
+      
+      <p>For example, the identity transformation can be written using
+         
+         <code>xsl:copy</code> as follows:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="@*|node()">
+
+  &lt;xsl:copy>
+
+    &lt;xsl:apply-templates select="@*|node()"/>
+
+  &lt;/xsl:copy>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>When the current node is an attribute, then if it would be an error
+         
+         to use <code>xsl:attribute</code> to create an attribute with the same
+         
+         name as the current node, then it is also an error to use
+         
+         <code>xsl:copy</code> (see <a href="#creating-attributes">[<b>7.1.3 Creating Attributes with <code>xsl:attribute</code></b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p>The following example shows how <code>xml:lang</code> attributes
+         
+         can be easily copied through from source to result. If a stylesheet
+         
+         defines the following named template:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template name="apply-templates-copy-lang">
+
+ &lt;xsl:for-each select="@xml:lang">
+
+   &lt;xsl:copy/>
+
+ &lt;/xsl:for-each>
+
+ &lt;xsl:apply-templates/>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>then it can simply do</p>
+      
+      
+      
+      <pre>&lt;xsl:call-template name="apply-templates-copy-lang"/></pre>
+      
+      
+      
+      <p>instead of</p>
+      
+      
+      
+      <pre>&lt;xsl:apply-templates/></pre>
+      
+      
+      
+      <p>when it wants to copy the <code>xml:lang</code> attribute.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Computing-Generated-Text"></a>7.6 Computing Generated Text
+      </h3>
+      
+      
+      
+      
+      <p>Within a template, the <code>xsl:value-of</code> element can be
+         
+         used to compute generated text, for example by extracting text from
+         
+         the source tree or by inserting the value of a variable.  The
+         
+         <code>xsl:value-of</code> element does this with an <a href="#dt-expression">expression</a> that is specified as the
+         
+         value of the <code>select</code> attribute.  Expressions can
+         
+         also be used inside attribute values of literal result elements by
+         
+         enclosing the expression in curly braces (<code>{}</code>).
+      </p>
+      
+      
+      
+      
+      
+      
+      <h4><a name="value-of"></a>7.6.1 Generating Text with <code>xsl:value-of</code></h4>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-value-of"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:value-of<br>&nbsp;&nbsp;<b>select</b> = <var>string-expression</var><br>&nbsp;&nbsp;disable-output-escaping = "yes" | "no"&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:value-of</code> element is instantiated to create a
+         
+         text node in the result tree.  The required <code>select</code>
+         
+         attribute is an <a href="#dt-expression">expression</a>;
+         
+         this expression is evaluated and the resulting object is converted to
+         
+         a string as if by a call to the <b><a href="http://www.w3.org/TR/xpath#function-string">string</a></b>
+         
+         function. The string specifies the string-value of the created text
+         
+         node.  If the string is empty, no text node will be created.  The
+         
+         created text node will be merged with any adjacent text nodes.
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:copy-of</code> element can be used to copy a node-set
+         
+         over to the result tree without converting it to a string. See <a href="#copy-of">[<b>11.3 Using Values of Variables and Parameters with
+               
+               <code>xsl:copy-of</code></b>]
+         </a>.
+      </p>
+      
+      
+      
+      
+      <p>For example, the following creates an HTML paragraph from a
+         
+         <code>person</code> element with <code>given-name</code> and
+         
+         <code>family-name</code> attributes.  The paragraph will contain the value
+         
+         of the <code>given-name</code> attribute of the current node followed
+         
+         by a space and the value of the <code>family-name</code> attribute of the
+         
+         current node.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="person">
+
+  &lt;p>
+
+   &lt;xsl:value-of select="@given-name"/>
+
+   &lt;xsl:text> &lt;/xsl:text>
+
+   &lt;xsl:value-of select="@family-name"/>
+
+  &lt;/p>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>For another example, the following creates an HTML paragraph from a
+         
+         <code>person</code> element with <code>given-name</code> and
+         
+         <code>family-name</code> children elements.  The paragraph will
+         
+         contain the string-value of the first <code>given-name</code> child
+         
+         element of the current node followed by a space and the string-value
+         
+         of the first <code>family-name</code> child element of the current
+         
+         node.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="person">
+
+  &lt;p>
+
+   &lt;xsl:value-of select="given-name"/>
+
+   &lt;xsl:text> &lt;/xsl:text>
+
+   &lt;xsl:value-of select="family-name"/>
+
+  &lt;/p>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>The following precedes each <code>procedure</code> element with a
+         
+         paragraph containing the security level of the procedure.  It assumes
+         
+         that the security level that applies to a procedure is determined by a
+         
+         <code>security</code> attribute on the procedure element or on an
+         
+         ancestor element of the procedure. It also assumes that if more than
+         
+         one such element has a <code>security</code> attribute then the
+         
+         security level is determined by the element that is closest to the
+         
+         procedure.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="procedure">
+
+  &lt;fo:block>
+
+    &lt;xsl:value-of select="ancestor-or-self::*[@security][1]/@security"/>
+
+  &lt;/fo:block>
+
+  &lt;xsl:apply-templates/>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h4><a name="attribute-value-templates"></a>7.6.2 Attribute Value Templates
+      </h4>
+      
+      
+      
+      
+      <p><a name="dt-attribute-value-template"></a>In an attribute value that is interpreted as an
+         
+         <b>attribute value template</b>, such as an attribute of a
+         
+         literal result element, an <a href="#dt-expression">expression</a> can be used by surrounding
+         
+         the expression with curly braces (<code>{}</code>).  The
+         
+         attribute value template is instantiated by replacing the expression
+         
+         together with surrounding curly braces by the result of evaluating the
+         
+         expression and converting the resulting object to a string as if by a
+         
+         call to the <b><a href="http://www.w3.org/TR/xpath#function-string">string</a></b> function.  Curly braces are
+         
+         not recognized in an attribute value in an XSLT stylesheet unless the
+         
+         attribute is specifically stated to be one that is interpreted as an
+         
+         attribute value template; in an element syntax summary, the value
+         
+         of such attributes is surrounded by curly braces.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Not all attributes are interpreted as attribute value
+         
+         templates.  Attributes whose value is an expression or pattern,
+         
+         attributes of <a href="#dt-top-level">top-level</a> elements
+         
+         and attributes that refer to named XSLT objects are not interpreted as
+         
+         attribute value templates. In addition, <code>xmlns</code> attributes
+         
+         are not interpreted as attribute value templates; it would not be
+         
+         conformant with the XML Namespaces Recommendation to do
+         
+         this.
+      </blockquote>
+      
+      
+      
+      
+      <p>The following example creates an <code>img</code> result element
+         
+         from a <code>photograph</code> element in the source; the value of the
+         
+         <code>src</code> attribute of the <code>img</code> element is computed
+         
+         from the value of the <code>image-dir</code> variable and the
+         
+         string-value of the <code>href</code> child of the
+         
+         <code>photograph</code> element; the value of the <code>width</code>
+         
+         attribute of the <code>img</code> element is computed from the value
+         
+         of the <code>width</code> attribute of the <code>size</code> child of
+         
+         the <code>photograph</code> element:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:variable name="image-dir">/images&lt;/xsl:variable>
+
+
+
+&lt;xsl:template match="photograph">
+
+&lt;img src="{$image-dir}/{href}" width="{size/@width}"/>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>With this source</p>
+      
+      
+      
+      <pre>&lt;photograph>
+
+  &lt;href>headquarters.jpg&lt;/href>
+
+  &lt;size width="300"/>
+
+&lt;/photograph></pre>
+      
+      
+      
+      <p>the result would be</p>
+      
+      
+      
+      <pre>&lt;img src="/images/headquarters.jpg" width="300"/></pre>
+      
+      
+      
+      <p>When an attribute value template is instantiated, a double left or
+         
+         right curly brace outside an expression will be replaced by a single
+         
+         curly brace.  It is an error if a right curly brace occurs in an
+         
+         attribute value template outside an expression without being followed
+         
+         by a second right curly brace.  A right curly brace inside a <a href="http://www.w3.org/TR/xpath#NT-Literal">Literal</a> in an expression is not
+         
+         recognized as terminating the expression.
+      </p>
+      
+      
+      
+      
+      <p>Curly braces are <i>not</i> recognized recursively inside
+         
+         expressions.  For example:
+      </p>
+      
+      
+      
+      <pre style="color: red">&lt;a href="#{id({@ref})/title}"></pre>
+      
+      
+      
+      <p>is <i>not</i> allowed.  Instead, use simply:
+      </p>
+      
+      
+      
+      <pre>&lt;a href="#{id(@ref)/title}"></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="number"></a>7.7 Numbering
+      </h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-number"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:number<br>&nbsp;&nbsp;level = "single" | "multiple" | "any"<br>&nbsp;&nbsp;count = <var>pattern</var><br>&nbsp;&nbsp;from = <var>pattern</var><br>&nbsp;&nbsp;value = <var>number-expression</var><br>&nbsp;&nbsp;format = { <var>string</var> }<br>&nbsp;&nbsp;lang = { <var>nmtoken</var> }<br>&nbsp;&nbsp;letter-value = { "alphabetic" | "traditional" }<br>&nbsp;&nbsp;grouping-separator = { <var>char</var> }<br>&nbsp;&nbsp;grouping-size = { <var>number</var> }&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:number</code> element is used to insert a formatted
+         
+         number into the result tree.  The number to be inserted may be
+         
+         specified by an expression. The <code>value</code> attribute contains
+         
+         an <a href="#dt-expression">expression</a>.  The expression
+         
+         is evaluated and the resulting object is converted to a number as if
+         
+         by a call to the <b><a href="http://www.w3.org/TR/xpath#function-number">number</a></b> function.  The number is
+         
+         rounded to an integer and then converted to a string using the
+         
+         attributes specified in <a href="#convert">[<b>7.7.1 Number to String Conversion Attributes</b>]
+         </a>; in this
+         
+         context, the value of each of these attributes is
+         
+         interpreted as an <a href="#dt-attribute-value-template">attribute
+            
+            value template
+         </a>.  After conversion, the resulting string is
+         
+         inserted in the result tree. For example, the following example
+         
+         numbers a sorted list:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="items">
+
+  &lt;xsl:for-each select="item">
+
+    &lt;xsl:sort select="."/>
+
+    &lt;p>
+
+      &lt;xsl:number value="position()" format="1. "/>
+
+      &lt;xsl:value-of select="."/>
+
+    &lt;/p>
+
+  &lt;/xsl:for-each>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>If no <code>value</code> attribute is specified, then the
+         
+         <code>xsl:number</code> element inserts a number based on the position
+         
+         of the current node in the source tree. The following attributes
+         
+         control how the current node is to be numbered:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>The <code>level</code> attribute specifies what levels of the
+               
+               source tree should be considered; it has the values
+               
+               <code>single</code>, <code>multiple</code> or <code>any</code>. The
+               
+               default is <code>single</code>.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The <code>count</code> attribute is a pattern that specifies
+               
+               what nodes should be counted at those levels.  If <code>count</code>
+               
+               attribute is not specified, then it defaults to the pattern that
+               
+               matches any node with the same node type as the current node and, if
+               
+               the current node has an expanded-name, with the same expanded-name as
+               
+               the current node.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The <code>from</code> attribute is a pattern that specifies
+               
+               where counting starts.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>In addition, the attributes specified in <a href="#convert">[<b>7.7.1 Number to String Conversion Attributes</b>]
+         </a>
+         
+         are used for number to string conversion, as in the case when the
+         
+         <code>value</code> attribute is specified.
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:number</code> element first constructs a list of
+         
+         positive integers using the <code>level</code>, <code>count</code> and
+         
+         <code>from</code> attributes:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>When <code>level="single"</code>, it goes up to the first
+               
+               node in the ancestor-or-self axis that matches
+               
+               the <code>count</code> pattern, and constructs a list of length one
+               
+               containing one plus the number of preceding siblings of that ancestor
+               
+               that match the <code>count</code> pattern. If there is no such
+               
+               ancestor, it constructs an empty list.  If the <code>from</code>
+               
+               attribute is specified, then the only ancestors that are searched are
+               
+               those that are descendants of the nearest ancestor that matches the
+               
+               <code>from</code> pattern. Preceding siblings has the same meaning
+               
+               here as with the <code>preceding-sibling</code> axis.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>When <code>level="multiple"</code>, it constructs a list of all
+               
+               ancestors of the current node in document order followed by the
+               
+               element itself; it then selects from the list those nodes that match
+               
+               the <code>count</code> pattern; it then maps each node in the list to
+               
+               one plus the number of preceding siblings of that node that match the
+               
+               <code>count</code> pattern.  If the <code>from</code> attribute is
+               
+               specified, then the only ancestors that are searched are those that
+               
+               are descendants of the nearest ancestor that matches the
+               
+               <code>from</code> pattern. Preceding siblings has the same meaning
+               
+               here as with the <code>preceding-sibling</code> axis.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>When <code>level="any"</code>, it constructs a list of length
+               
+               one containing the number of nodes that match the <code>count</code>
+               
+               pattern and belong to the set containing the current node and all
+               
+               nodes at any level of the document that are before the current node in
+               
+               document order, excluding any namespace and attribute nodes (in other
+               
+               words the union of the members of the <code>preceding</code> and
+               
+               <code>ancestor-or-self</code> axes). If the <code>from</code>
+               
+               attribute is specified, then only nodes after the first node before
+               
+               the current node that match the <code>from</code> pattern are
+               
+               considered.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>The list of numbers is then converted into a string using the
+         
+         attributes specified in <a href="#convert">[<b>7.7.1 Number to String Conversion Attributes</b>]
+         </a>; in this
+         
+         context, the value of each of these attributes is
+         
+         interpreted as an <a href="#dt-attribute-value-template">attribute
+            
+            value template
+         </a>.  After conversion, the resulting string is
+         
+         inserted in the result tree.
+      </p>
+      
+      
+      
+      
+      <p>The following would number the items in an ordered list:</p>
+      
+      
+      
+      <pre>&lt;xsl:template match="ol/item">
+
+  &lt;fo:block>
+
+    &lt;xsl:number/>&lt;xsl:text>. &lt;/xsl:text>&lt;xsl:apply-templates/>
+
+  &lt;/fo:block>
+
+&lt;xsl:template></pre>
+      
+      
+      
+      <p>The following two rules would number <code>title</code> elements.
+         
+         This is intended for a document that contains a sequence of chapters
+         
+         followed by a sequence of appendices, where both chapters and
+         
+         appendices contain sections, which in turn contain subsections.
+         
+         Chapters are numbered 1, 2, 3; appendices are numbered A, B, C;
+         
+         sections in chapters are numbered 1.1, 1.2, 1.3; sections in
+         
+         appendices are numbered A.1, A.2, A.3.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="title">
+
+  &lt;fo:block>
+
+     &lt;xsl:number level="multiple"
+
+                 count="chapter|section|subsection"
+
+                 format="1.1 "/>
+
+     &lt;xsl:apply-templates/>
+
+  &lt;/fo:block>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="appendix//title" priority="1">
+
+  &lt;fo:block>
+
+     &lt;xsl:number level="multiple"
+
+                 count="appendix|section|subsection"
+
+                 format="A.1 "/>
+
+     &lt;xsl:apply-templates/>
+
+  &lt;/fo:block>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>The following example numbers notes sequentially within a
+         
+         chapter:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="note">
+
+  &lt;fo:block>
+
+     &lt;xsl:number level="any" from="chapter" format="(1) "/>
+
+     &lt;xsl:apply-templates/>
+
+  &lt;/fo:block>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>The following example would number <code>H4</code> elements in HTML
+         
+         with a three-part label:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="H4">
+
+ &lt;fo:block>
+
+   &lt;xsl:number level="any" from="H1" count="H2"/>
+
+   &lt;xsl:text>.&lt;/xsl:text>
+
+   &lt;xsl:number level="any" from="H2" count="H3"/>
+
+   &lt;xsl:text>.&lt;/xsl:text>
+
+   &lt;xsl:number level="any" from="H3" count="H4"/>
+
+   &lt;xsl:text> &lt;/xsl:text>
+
+   &lt;xsl:apply-templates/>
+
+ &lt;/fo:block>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      <h4><a name="convert"></a>7.7.1 Number to String Conversion Attributes
+      </h4>
+      
+      
+      
+      
+      <p>The following attributes are used to control conversion of a list
+         
+         of numbers into a string. The numbers are integers greater than
+         
+         0. The attributes are all optional.
+      </p>
+      
+      
+      
+      
+      <p>The main attribute is <code>format</code>.  The default value for
+         
+         the <code>format</code> attribute is <code>1</code>.  The
+         
+         <code>format</code> attribute is split into a sequence of tokens where
+         
+         each token is a maximal sequence of alphanumeric characters or a
+         
+         maximal sequence of non-alphanumeric characters.  Alphanumeric means
+         
+         any character that has a Unicode category of Nd, Nl, No, Lu, Ll, Lt,
+         
+         Lm or Lo.  The alphanumeric tokens (format tokens) specify the format
+         
+         to be used for each number in the list.  If the first token is a
+         
+         non-alphanumeric token, then the constructed string will start with
+         
+         that token; if the last token is non-alphanumeric token, then the
+         
+         constructed string will end with that token.  Non-alphanumeric tokens
+         
+         that occur between two format tokens are separator tokens that are
+         
+         used to join numbers in the list.  The <var>n</var>th format token
+         
+         will be used to format the <var>n</var>th number in the list.  If
+         
+         there are more numbers than format tokens, then the last format token
+         
+         will be used to format remaining numbers.  If there are no format
+         
+         tokens, then a format token of <code>1</code> is used to format all
+         
+         numbers.  The format token specifies the string to be used to
+         
+         represent the number 1.  Each number after the first will be separated
+         
+         from the preceding number by the separator token preceding the format
+         
+         token used to format that number, or, if there are no separator
+         
+         tokens, then by <code>.</code> (a period character).
+      </p>
+      
+      
+      
+      
+      <p>Format tokens are a superset of the allowed values for the
+         
+         <code>type</code> attribute for the <code>OL</code> element in HTML
+         
+         4.0 and are interpreted as follows:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>Any token where the last character has a decimal digit value
+               
+               of 1 (as specified in the Unicode character property database),
+               
+               and the Unicode value of preceding characters is one less than the
+               
+               Unicode value of the last character generates a decimal
+               
+               representation of the number where each number is at least as long as
+               
+               the format token.  Thus, a format token <code>1</code> generates the
+               
+               sequence <code>1 2 ... 10 11 12 ...</code>, and a format token
+               
+               <code>01</code> generates the sequence <code>01 02 ... 09 10 11 12
+                  
+                  ... 99 100 101
+               </code>.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>A format token <code>A</code> generates the sequence <code>A
+                  
+                  B C ... Z AA AB AC...
+               </code>.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>A format token <code>a</code> generates the sequence <code>a
+                  
+                  b c ... z aa ab ac...
+               </code>.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>A format token <code>i</code> generates the sequence <code>i
+                  
+                  ii iii iv v vi vii viii ix x ...
+               </code>.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>A format token <code>I</code> generates the sequence <code>I
+                  
+                  II III IV V VI VII VIII IX X ...
+               </code>.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>Any other format token indicates a numbering sequence that
+               
+               starts with that token.  If an implementation does not support a
+               
+               numbering sequence that starts with that token, it must use a format
+               
+               token of <code>1</code>.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>When numbering with an alphabetic sequence, the <code>lang</code>
+         
+         attribute specifies which language's alphabet is to be used; it has
+         
+         the same range of values as <code>xml:lang</code> <a href="#XML">[XML]</a>;
+         
+         if no <code>lang</code> value is specified, the language should be
+         
+         determined from the system environment.  Implementers should document
+         
+         for which languages they support numbering.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Implementers should not make any assumptions about how
+         
+         numbering works in particular languages and should properly research
+         
+         the languages that they wish to support.  The numbering conventions of
+         
+         many languages are very different from English.
+      </blockquote>
+      
+      
+      
+      
+      <p>The <code>letter-value</code> attribute disambiguates between
+         
+         numbering sequences that use letters.  In many languages there are two
+         
+         commonly used numbering sequences that use letters.  One numbering
+         
+         sequence assigns numeric values to letters in alphabetic sequence, and
+         
+         the other assigns numeric values to each letter in some other manner
+         
+         traditional in that language.  In English, these would correspond to
+         
+         the numbering sequences specified by the format tokens <code>a</code>
+         
+         and <code>i</code>.  In some languages, the first member of each
+         
+         sequence is the same, and so the format token alone would be
+         
+         ambiguous.  A value of <code>alphabetic</code> specifies the
+         
+         alphabetic sequence; a value of <code>traditional</code> specifies the
+         
+         other sequence.  If the <code>letter-value</code> attribute is not
+         
+         specified, then it is implementation-dependent how any ambiguity is
+         
+         resolved.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>It is possible for two conforming XSLT processors not to
+         
+         convert a number to exactly the same string.  Some XSLT processors may not
+         
+         support some languages.  Furthermore, there may be variations possible
+         
+         in the way conversions are performed for any particular language that
+         
+         are not specifiable by the attributes on <code>xsl:number</code>.
+         
+         Future versions of XSLT may provide additional attributes to provide
+         
+         control over these variations.  Implementations may also use
+         
+         implementation-specific namespaced attributes on
+         
+         <code>xsl:number</code> for this.
+      </blockquote>
+      
+      
+      
+      
+      <p>The <code>grouping-separator</code> attribute gives the separator
+         
+         used as a grouping (e.g. thousands) separator in decimal numbering
+         
+         sequences, and the optional <code>grouping-size</code> specifies the
+         
+         size (normally 3) of the grouping.  For example,
+         
+         <code>grouping-separator=","</code> and <code>grouping-size="3"</code>
+         
+         would produce numbers of the form <code>1,000,000</code>.  If only one
+         
+         of the <code>grouping-separator</code> and <code>grouping-size</code>
+         
+         attributes is specified, then it is ignored.
+      </p>
+      
+      
+      
+      
+      <p>Here are some examples of conversion specifications:</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p><code>format="&amp;#x30A2;"</code> specifies Katakana
+               
+               numbering
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>format="&amp;#x30A4;"</code> specifies Katakana
+               
+               numbering in the "iroha" order
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>format="&amp;#x0E51;"</code> specifies numbering with
+               
+               Thai digits
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>format="&amp;#x05D0;" letter-value="traditional"</code>
+               
+               specifies "traditional" Hebrew numbering
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>format="&amp;#x10D0;" letter-value="traditional"</code>
+               
+               specifies Georgian numbering
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>format="&amp;#x03B1;" letter-value="traditional"</code>
+               
+               specifies "classical" Greek numbering
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>format="&amp;#x0430;" letter-value="traditional"</code>
+               
+               specifies Old Slavic numbering
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="for-each"></a>8 Repetition
+      </h2>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-for-each"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:for-each<br>&nbsp;&nbsp;<b>select</b> = <var>node-set-expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-sort">xsl:sort</a>*, <var>template</var>) --><br>&lt;/xsl:for-each>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>When the result has a known regular structure, it is useful to be
+         
+         able to specify directly the template for selected nodes.  The
+         
+         <code>xsl:for-each</code> instruction contains a template, which is
+         
+         instantiated for each node selected by the <a href="#dt-expression">expression</a> specified by the
+         
+         <code>select</code> attribute. The <code>select</code> attribute is
+         
+         required.  The expression must evaluate to a node-set.  The template
+         
+         is instantiated with the selected node as the <a href="#dt-current-node">current node</a>, and with a list of all
+         
+         of the selected nodes as the <a href="#dt-current-node-list">current node list</a>.  The nodes are
+         
+         processed in document order, unless a sorting specification is present
+         
+         (see <a href="#sorting">[<b>10 Sorting</b>]
+         </a>).
+      </p>
+      
+      
+      
+      
+      <p>For example, given an XML document with this structure</p>
+      
+      
+      
+      <pre>&lt;customers>
+
+  &lt;customer>
+
+    &lt;name>...&lt;/name>
+
+    &lt;order>...&lt;/order>
+
+    &lt;order>...&lt;/order>
+
+  &lt;/customer>
+
+  &lt;customer>
+
+    &lt;name>...&lt;/name>
+
+    &lt;order>...&lt;/order>
+
+    &lt;order>...&lt;/order>
+
+  &lt;/customer>
+
+&lt;/customers></pre>
+      
+      
+      
+      <p>the following would create an HTML document containing a table with
+         
+         a row for each <code>customer</code> element
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="/">
+
+  &lt;html>
+
+    &lt;head>
+
+      &lt;title>Customers&lt;/title>
+
+    &lt;/head>
+
+    &lt;body>
+
+      &lt;table>
+
+	&lt;tbody>
+
+	  &lt;xsl:for-each select="customers/customer">
+
+	    &lt;tr>
+
+	      &lt;th>
+
+		&lt;xsl:apply-templates select="name"/>
+
+	      &lt;/th>
+
+	      &lt;xsl:for-each select="order">
+
+		&lt;td>
+
+		  &lt;xsl:apply-templates/>
+
+		&lt;/td>
+
+	      &lt;/xsl:for-each>
+
+	    &lt;/tr>
+
+	  &lt;/xsl:for-each>
+
+	&lt;/tbody>
+
+      &lt;/table>
+
+    &lt;/body>
+
+  &lt;/html>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Conditional-Processing"></a>9 Conditional Processing
+      </h2>
+      
+      
+      
+      
+      <p>There are two instructions in XSLT that support conditional
+         
+         processing in a template: <code>xsl:if</code> and
+         
+         <code>xsl:choose</code>. The <code>xsl:if</code> instruction provides
+         
+         simple if-then conditionality; the <code>xsl:choose</code> instruction
+         
+         supports selection of one choice when there are several
+         
+         possibilities.
+      </p>
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Conditional-Processing-with-xsl:if"></a>9.1 Conditional Processing with <code>xsl:if</code></h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-if"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:if<br>&nbsp;&nbsp;<b>test</b> = <var>boolean-expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:if>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:if</code> element has a <code>test</code> attribute,
+         
+         which specifies an <a href="#dt-expression">expression</a>.
+         
+         The content is a template.  The expression is evaluated and the
+         
+         resulting object is converted to a boolean as if by a call to the
+         
+         <b><a href="http://www.w3.org/TR/xpath#function-boolean">boolean</a></b> function.  If the result is true, then
+         
+         the content template is instantiated; otherwise, nothing is created.
+         
+         In the following example, the names in a group of names are formatted
+         
+         as a comma separated list:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="namelist/name">
+
+  &lt;xsl:apply-templates/>
+
+  &lt;xsl:if test="not(position()=last())">, &lt;/xsl:if>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>The following colors every other table row yellow:</p>
+      
+      
+      
+      <pre>&lt;xsl:template match="item">
+
+  &lt;tr>
+
+    &lt;xsl:if test="position() mod 2 = 0">
+
+       &lt;xsl:attribute name="bgcolor">yellow&lt;/xsl:attribute>
+
+    &lt;/xsl:if>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/tr>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Conditional-Processing-with-xsl:choose"></a>9.2 Conditional Processing with <code>xsl:choose</code></h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-choose"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:choose><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-when">xsl:when</a>+, <a href="#element-otherwise">xsl:otherwise</a>?) --><br>&lt;/xsl:choose>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-when"></a><code>&lt;xsl:when<br>&nbsp;&nbsp;<b>test</b> = <var>boolean-expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:when>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-otherwise"></a><code>&lt;xsl:otherwise><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:otherwise>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:choose</code> element selects one among a number of
+         
+         possible alternatives. It consists of a sequence of
+         
+         <code>xsl:when</code> elements followed by an optional
+         
+         <code>xsl:otherwise</code> element.  Each <code>xsl:when</code>
+         
+         element has a single attribute, <code>test</code>, which specifies an
+         
+         <a href="#dt-expression">expression</a>. The content of the
+         
+         <code>xsl:when</code> and <code>xsl:otherwise</code> elements is a
+         
+         template.  When an <code>xsl:choose</code> element is processed, each
+         
+         of the <code>xsl:when</code> elements is tested in turn, by evaluating
+         
+         the expression and converting the resulting object to a boolean as if
+         
+         by a call to the <b><a href="http://www.w3.org/TR/xpath#function-boolean">boolean</a></b> function.  The content
+         
+         of the first, and only the first, <code>xsl:when</code> element whose
+         
+         test is true is instantiated.  If no <code>xsl:when</code> is true,
+         
+         the content of the <code>xsl:otherwise</code> element is
+         
+         instantiated. If no <code>xsl:when</code> element is true, and no
+         
+         <code>xsl:otherwise</code> element is present, nothing is created.
+      </p>
+      
+      
+      
+      
+      <p>The following example enumerates items in an ordered list using
+         
+         arabic numerals, letters, or roman numerals depending on the depth to
+         
+         which the ordered lists are nested.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="orderedlist/listitem">
+
+  &lt;fo:list-item indent-start='2pi'>
+
+    &lt;fo:list-item-label>
+
+      &lt;xsl:variable name="level"
+
+                    select="count(ancestor::orderedlist) mod 3"/>
+
+      &lt;xsl:choose>
+
+        &lt;xsl:when test='$level=1'>
+
+          &lt;xsl:number format="i"/>
+
+        &lt;/xsl:when>
+
+        &lt;xsl:when test='$level=2'>
+
+          &lt;xsl:number format="a"/>
+
+        &lt;/xsl:when>
+
+        &lt;xsl:otherwise>
+
+          &lt;xsl:number format="1"/>
+
+        &lt;/xsl:otherwise>
+
+      &lt;/xsl:choose>
+
+      &lt;xsl:text>. &lt;/xsl:text>
+
+    &lt;/fo:list-item-label>
+
+    &lt;fo:list-item-body>
+
+      &lt;xsl:apply-templates/>
+
+    &lt;/fo:list-item-body>
+
+  &lt;/fo:list-item>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="sorting"></a>10 Sorting
+      </h2>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-sort"></a><code>&lt;xsl:sort<br>&nbsp;&nbsp;select = <var>string-expression</var><br>&nbsp;&nbsp;lang = { <var>nmtoken</var> }<br>&nbsp;&nbsp;data-type = { "text" | "number" | <var>qname-but-not-ncname</var> }<br>&nbsp;&nbsp;order = { "ascending" | "descending" }<br>&nbsp;&nbsp;case-order = { "upper-first" | "lower-first" }&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>Sorting is specified by adding <code>xsl:sort</code> elements as
+         
+         children of an <code>xsl:apply-templates</code> or
+         
+         <code>xsl:for-each</code> element.  The first <code>xsl:sort</code>
+         
+         child specifies the primary sort key, the second <code>xsl:sort</code>
+         
+         child specifies the secondary sort key and so on.  When an
+         
+         <code>xsl:apply-templates</code> or <code>xsl:for-each</code> element
+         
+         has one or more <code>xsl:sort</code> children, then instead of
+         
+         processing the selected nodes in document order, it sorts the nodes
+         
+         according to the specified sort keys and then processes them in sorted
+         
+         order.  When used in <code>xsl:for-each</code>, <code>xsl:sort</code>
+         
+         elements must occur first.  When a template is instantiated by
+         
+         <code>xsl:apply-templates</code> and <code>xsl:for-each</code>, the
+         
+         <a href="#dt-current-node-list">current node list</a> list
+         
+         consists of the complete list of nodes being processed in sorted
+         
+         order.
+      </p>
+      
+      
+      
+      
+      <p><code>xsl:sort</code> has a <code>select</code> attribute whose
+         
+         value is an <a href="#dt-expression">expression</a>. For
+         
+         each node to be processed, the expression is evaluated with that node
+         
+         as the current node and with the complete list of nodes being
+         
+         processed in unsorted order as the current node list.
+         
+         The resulting object is converted to a string as
+         
+         if by a call to the <b><a href="http://www.w3.org/TR/xpath#function-string">string</a></b> function; this string
+         
+         is used as the sort key for that node. The default value of the
+         
+         <code>select</code> attribute is <code>.</code>, which will cause the
+         
+         string-value of the current node to be used as the sort key.
+      </p>
+      
+      
+      
+      
+      <p>This string serves as a sort key for the node.  The following
+         
+         optional attributes on <code>xsl:sort</code> control how the list of
+         
+         sort keys are sorted; the values of all of these attributes are
+         
+         interpreted as <a href="#dt-attribute-value-template">attribute
+            
+            value templates
+         </a>.
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p><code>order</code> specifies whether the strings should be
+               
+               sorted in ascending or descending order; <code>ascending</code>
+               
+               specifies ascending order; <code>descending</code> specifies
+               
+               descending order; the default is <code>ascending</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>lang</code> specifies the language of the sort keys; it
+               
+               has the same range of values as <code>xml:lang</code> <a href="#XML">[XML]</a>; if no <code>lang</code> value is specified, the language
+               
+               should be determined from the system environment
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>data-type</code> specifies the data type of the
+               
+               strings; the following values are allowed:
+            </p>
+            
+            
+            
+            
+            <ul>
+               
+               
+               
+               
+               <li>
+                  <p><code>text</code> specifies that the sort keys should be
+                     
+                     sorted lexicographically in the culturally correct manner for the
+                     
+                     language specified by <code>lang</code></p>
+               </li>
+               
+               
+               
+               
+               <li>
+                  <p><code>number</code> specifies that the sort keys should be
+                     
+                     converted to numbers and then sorted according to the numeric value;
+                     
+                     the sort key is converted to a number as if by a call to the
+                     
+                     <b><a href="http://www.w3.org/TR/xpath#function-number">number</a></b> function; the <code>lang</code>
+                     
+                     attribute is ignored
+                  </p>
+               </li>
+               
+               
+               
+               
+               <li>
+                  <p>a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> with a prefix
+                     
+                     is expanded into an <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a> as described
+                     
+                     in <a href="#qname">[<b>2.4 Qualified Names</b>]
+                     </a>; the expanded-name identifies the data-type;
+                     
+                     the behavior in this case is not specified by this document
+                  </p>
+               </li>
+               
+               
+               
+               
+            </ul>
+            
+            
+            
+            
+            <p>The default value is <code>text</code>.
+            </p>
+            
+            
+            
+            
+            <blockquote><b>NOTE: </b>The XSL Working Group plans that future versions of XSLT will
+               
+               leverage XML Schemas to define further values for this
+               
+               attribute.
+            </blockquote>
+            
+            
+            
+            
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>case-order</code> has the value
+               
+               <code>upper-first</code> or <code>lower-first</code>; this applies
+               
+               when <code>data-type="text"</code>, and specifies that upper-case
+               
+               letters should sort before lower-case letters or vice-versa
+               
+               respectively. For example, if <code>lang="en"</code>, then <code>A a B
+                  
+                  b
+               </code> are sorted with <code>case-order="upper-first"</code> and
+               
+               <code>a A b B</code> are sorted with
+               
+               <code>case-order="lower-first"</code>. The default value is language
+               
+               dependent.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>It is possible for two conforming XSLT processors not to sort
+         
+         exactly the same.  Some XSLT processors may not support some
+         
+         languages.  Furthermore, there may be variations possible in the
+         
+         sorting of any particular language that are not specified by the
+         
+         attributes on <code>xsl:sort</code>, for example, whether Hiragana or
+         
+         Katakana is sorted first in Japanese.  Future versions of XSLT may
+         
+         provide additional attributes to provide control over these
+         
+         variations.  Implementations may also use implementation-specific
+         
+         namespaced attributes on <code>xsl:sort</code> for this.
+      </blockquote>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>It is recommended that implementers consult <a href="#UNICODE-TR10">[UNICODE TR10]</a> for information on internationalized
+         
+         sorting.
+      </blockquote>
+      
+      
+      
+      
+      <p>The sort must be stable: in the sorted list of nodes, any sub list
+         
+         that has sort keys that all compare equal must be in document
+         
+         order.
+      </p>
+      
+      
+      
+      
+      <p>For example, suppose an employee database has the form</p>
+      
+      
+      
+      <pre>&lt;employees>
+
+  &lt;employee>
+
+    &lt;name>
+
+      &lt;given>James&lt;/given>
+
+      &lt;family>Clark&lt;/family>
+
+    &lt;/name>
+
+    ...
+
+  &lt;/employee>
+
+&lt;/employees>
+
+</pre>
+      
+      
+      
+      <p>Then a list of employees sorted by name could be generated
+         
+         using:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template match="employees">
+
+  &lt;ul>
+
+    &lt;xsl:apply-templates select="employee">
+
+      &lt;xsl:sort select="name/family"/>
+
+      &lt;xsl:sort select="name/given"/>
+
+    &lt;/xsl:apply-templates>
+
+  &lt;/ul>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="employee">
+
+  &lt;li>
+
+    &lt;xsl:value-of select="name/given"/>
+
+    &lt;xsl:text> &lt;/xsl:text>
+
+    &lt;xsl:value-of select="name/family"/>
+
+  &lt;/li>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="variables"></a>11 Variables and Parameters
+      </h2>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-variable"></a><code>&lt;!-- Category: top-level-element --><br>&lt;!-- Category: instruction --><br>&lt;xsl:variable<br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;select = <var>expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:variable>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-param"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:param<br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;select = <var>expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:param>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>A variable is a name that may be bound to a value.  The value to
+         
+         which a variable is bound (the <b>value</b> of the variable) can
+         
+         be an object of any of the types that can be returned by expressions.
+         
+         There are two elements that can be used to bind variables:
+         
+         <code>xsl:variable</code> and <code>xsl:param</code>. The difference
+         
+         is that the value specified on the <code>xsl:param</code> variable is
+         
+         only a default value for the binding; when the template or stylesheet
+         
+         within which the <code>xsl:param</code> element occurs is invoked,
+         
+         parameters may be passed that are used in place of the default
+         
+         values.
+      </p>
+      
+      
+      
+      
+      <p>Both <code>xsl:variable</code> and <code>xsl:param</code> have a
+         
+         required <code>name</code> attribute, which specifies the name of the
+         
+         variable.  The value of the <code>name</code> attribute is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>.
+      </p>
+      
+      
+      
+      
+      <p>For any use of these variable-binding elements, there is a region
+         
+         of the stylesheet tree within which the binding is visible; within
+         
+         this region, any binding of the variable that was visible on the
+         
+         variable-binding element itself is hidden.  Thus, only the innermost
+         
+         binding of a variable is visible.  The set of variable bindings in
+         
+         scope for an expression consists of those bindings that are visible at
+         
+         the point in the stylesheet where the expression occurs.
+      </p>
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Result-Tree-Fragments"></a>11.1 Result Tree Fragments
+      </h3>
+      
+      
+      
+      
+      <p>Variables introduce an additional data-type into the expression
+         
+         language.  <a name="dt-result-tree-fragment"></a>This additional data type is called <b>result tree
+            
+            fragment
+         </b>.  A variable may be bound to a result tree fragment
+         
+         instead of one of the four basic XPath data-types (string, number,
+         
+         boolean, node-set).  A result tree fragment represents a fragment of
+         
+         the result tree. A result tree fragment is treated equivalently to a
+         
+         node-set that contains just a single root node. However, the
+         
+         operations permitted on a result tree fragment are a subset of those
+         
+         permitted on a node-set.  An operation is permitted on a result tree
+         
+         fragment only if that operation would be permitted on a string (the
+         
+         operation on the string may involve first converting the string to a
+         
+         number or boolean). In particular, it is not permitted to use the
+         
+         <code>/</code>, <code>//</code>, and <code>[]</code> operators on
+         
+         result tree fragments.  When a permitted operation is performed on a
+         
+         result tree fragment, it is performed exactly as it would be on the
+         
+         equivalent node-set.
+      </p>
+      
+      
+      
+      
+      <p>When a result tree fragment is copied into the result tree (see
+         
+         <a href="#copy-of">[<b>11.3 Using Values of Variables and Parameters with
+               
+               <code>xsl:copy-of</code></b>]
+         </a>), then all the nodes that are children of the
+         
+         root node in the equivalent node-set are added in sequence to the
+         
+         result tree.
+      </p>
+      
+      
+      
+      
+      <p>Expressions can only return values of type result tree fragment by
+         
+         referencing variables of type result tree fragment or calling
+         
+         extension functions that return a result tree fragment or getting a
+         
+         system property whose value is a result tree fragment.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="variable-values"></a>11.2 Values of Variables and Parameters
+      </h3>
+      
+      
+      
+      
+      <p>A variable-binding element can specify the value of the variable in
+         
+         three alternative ways.
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>If the variable-binding element has a <code>select</code>
+               
+               attribute, then the value of the attribute must be an <a href="#dt-expression">expression</a> and the value of the variable
+               
+               is the object that results from evaluating the expression.  In this
+               
+               case, the content must be empty.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            
+            
+            
+            
+            <p>If the variable-binding element does not have a <code>select</code>
+               
+               attribute and has non-empty content (i.e. the variable-binding element
+               
+               has one or more child nodes), then the content of the
+               
+               variable-binding element specifies the value. The content of the
+               
+               variable-binding element is a template, which is instantiated to give
+               
+               the value of the variable. The value is a result tree fragment
+               
+               equivalent to a node-set containing just a single root node having as
+               
+               children the sequence of nodes produced by instantiating the template.
+               
+               The base URI of the nodes in the result tree fragment is the base URI
+               
+               of the variable-binding element.
+            </p>
+            
+            
+            
+            
+            <p>It is an error if a member of the sequence of nodes created by
+               
+               instantiating the template is an attribute node or a namespace node,
+               
+               since a root node cannot have an attribute node or a namespace node as
+               
+               a child. An XSLT processor may signal the error; if it does not signal
+               
+               the error, it must recover by not adding the attribute node or
+               
+               namespace node.
+            </p>
+            
+            
+            
+            
+         </li>
+         
+         
+         
+         
+         <li>
+            
+            
+            
+            
+            <p>If the variable-binding element has empty content and does not have
+               
+               a <code>select</code> attribute, then the value of the variable is an
+               
+               empty string. Thus
+            </p>
+            
+            
+            
+            <pre>&lt;xsl:variable name="x"/></pre>
+            
+            
+            
+            <p>is equivalent to</p>
+            
+            
+            
+            <pre>&lt;xsl:variable name="x" select="''"/></pre>
+            
+            
+            
+            </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>When a variable is used to select nodes by position, be careful
+         
+         not to do:
+         
+         
+         
+         <pre>&lt;xsl:variable name="n">2&lt;/xsl:variable>
+
+...
+
+&lt;xsl:value-of select="item[$n]"/></pre>
+         
+         
+         
+         This will output the value of the first item element, because the
+         
+         variable <code>n</code> will be bound to a result tree fragment, not a
+         
+         number. Instead, do either
+         
+         
+         
+         <pre>&lt;xsl:variable name="n" select="2"/>
+
+...
+
+&lt;xsl:value-of select="item[$n]"/></pre>
+         
+         
+         
+         or
+         
+         
+         
+         <pre>&lt;xsl:variable name="n">2&lt;/xsl:variable>
+
+...
+
+&lt;xsl:value-of select="item[position()=$n]"/></pre>
+         
+         </blockquote>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>One convenient way to specify the empty node-set as the default
+         
+         value of a parameter is:
+         
+         
+         
+         <pre>&lt;xsl:param name="x" select="/.."/></pre>
+         
+         </blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="copy-of"></a>11.3 Using Values of Variables and Parameters with
+         
+         <code>xsl:copy-of</code></h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-copy-of"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:copy-of<br>&nbsp;&nbsp;<b>select</b> = <var>expression</var>&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:copy-of</code> element can be used to insert a result
+         
+         tree fragment into the result tree, without first converting it to a
+         
+         string as <code>xsl:value-of</code> does (see <a href="#value-of">[<b>7.6.1 Generating Text with <code>xsl:value-of</code></b>]
+         </a>).  The required <code>select</code> attribute
+         
+         contains an <a href="#dt-expression">expression</a>.  When
+         
+         the result of evaluating the expression is a result tree fragment, the
+         
+         complete fragment is copied into the result tree.  When the result is
+         
+         a node-set, all the nodes in the set are copied in document order into
+         
+         the result tree; copying an element node copies the attribute nodes,
+         
+         namespace nodes and children of the element node as well as the
+         
+         element node itself; a root node is copied by copying its children.
+         
+         When the result is neither a node-set nor a result tree fragment, the
+         
+         result is converted to a string and then inserted into the result
+         
+         tree, as with <code>xsl:value-of</code>.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="top-level-variables"></a>11.4 Top-level Variables and Parameters
+      </h3>
+      
+      
+      
+      
+      <p>Both <code>xsl:variable</code> and <code>xsl:param</code> are
+         
+         allowed as <a href="#dt-top-level">top-level</a> elements.
+         
+         A top-level variable-binding element declares a global variable that
+         
+         is visible everywhere.  A top-level <code>xsl:param</code> element
+         
+         declares a parameter to the stylesheet; XSLT does not define the
+         
+         mechanism by which parameters are passed to the stylesheet.  It is an
+         
+         error if a stylesheet contains more than one binding of a top-level
+         
+         variable with the same name and same <a href="#dt-import-precedence">import precedence</a>. At the
+         
+         top-level, the expression or template specifying the variable value is
+         
+         evaluated with the same context as that used to process the root node
+         
+         of the source document: the current node is the root node of the
+         
+         source document and the current node list is a list containing just
+         
+         the root node of the source document.  If the template or expression
+         
+         specifying the value of a global variable <var>x</var> references a
+         
+         global variable <var>y</var>, then the value for <var>y</var> must
+         
+         be computed before the value of <var>x</var>.  It is an error if it
+         
+         is impossible to do this for all global variable definitions; in other
+         
+         words, it is an error if the definitions are circular.
+      </p>
+      
+      
+      
+      
+      <p>This example declares a global variable <code>para-font-size</code>,
+         
+         which it references in an attribute value template.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:variable name="para-font-size">12pt&lt;/xsl:variable>
+
+
+
+&lt;xsl:template match="para">
+
+ &lt;fo:block font-size="{$para-font-size}">
+
+   &lt;xsl:apply-templates/>
+
+ &lt;/fo:block>
+
+&lt;/xsl:template>
+
+</pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="local-variables"></a>11.5 Variables and Parameters within Templates
+      </h3>
+      
+      
+      
+      
+      <p>As well as being allowed at the top-level, both
+         
+         <code>xsl:variable</code> and <code>xsl:param</code> are also
+         
+         allowed in templates.  <code>xsl:variable</code> is allowed anywhere
+         
+         within a template that an instruction is allowed.  In this case, the
+         
+         binding is visible for all following siblings and their descendants.
+         
+         Note that the binding is not visible for the <code>xsl:variable</code>
+         
+         element itself.  <code>xsl:param</code> is allowed as a child
+         
+         at the beginning of an <code>xsl:template</code> element.  In this
+         
+         context, the binding is visible for all following siblings and their
+         
+         descendants.  Note that the binding is not visible for the
+         
+         <code>xsl:param</code> element itself.
+      </p>
+      
+      
+      
+      
+      <p><a name="dt-shadows"></a>A binding
+         
+         <b>shadows</b> another binding if the binding occurs at a point
+         
+         where the other binding is visible, and the bindings have the same
+         
+         name. It is an error if a binding established by an
+         
+         <code>xsl:variable</code> or <code>xsl:param</code> element within a
+         
+         template <a href="#dt-shadows">shadows</a> another binding
+         
+         established by an <code>xsl:variable</code> or <code>xsl:param</code>
+         
+         element also within the template.  It is not an error if a binding
+         
+         established by an <code>xsl:variable</code> or <code>xsl:param</code>
+         
+         element in a template <a href="#dt-shadows">shadows</a>
+         
+         another binding established by an <code>xsl:variable</code> or
+         
+         <code>xsl:param</code> <a href="#dt-top-level">top-level</a>
+         
+         element.  Thus, the following is an error:
+      </p>
+      
+      
+      
+      <pre style="color: red">&lt;xsl:template name="foo">
+
+&lt;xsl:param name="x" select="1"/>
+
+&lt;xsl:variable name="x" select="2"/>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>However, the following is allowed:</p>
+      
+      
+      
+      <pre>&lt;xsl:param name="x" select="1"/>
+
+&lt;xsl:template name="foo">
+
+&lt;xsl:variable name="x" select="2"/>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <blockquote><b>NOTE: </b>The nearest equivalent in Java to an <code>xsl:variable</code>
+         
+         element in a template is a final local variable declaration with an
+         
+         initializer.  For example,
+         
+         
+         
+         <pre>&lt;xsl:variable name="x" select="'value'"/></pre>
+         
+         
+         
+         has similar semantics to
+         
+         
+         
+         <pre>final Object x = "value";</pre>
+         
+         
+         
+         XSLT does not provide an equivalent to the Java assignment operator
+         
+         
+         
+         <pre>x = "value";</pre>
+         
+         
+         
+         because this would make it harder to create an implementation that
+         
+         processes a document other than in a batch-like way, starting at the
+         
+         beginning and continuing through to the end.</blockquote>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Passing-Parameters-to-Templates"></a>11.6 Passing Parameters to Templates
+      </h3>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-with-param"></a><code>&lt;xsl:with-param<br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;select = <var>expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:with-param>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>Parameters are passed to templates using the
+         
+         <code>xsl:with-param</code> element.  The required <code>name</code>
+         
+         attribute specifies the name of the parameter (the variable the value
+         
+         of whose binding is to be replaced).  The value of the
+         
+         <code>name</code> attribute is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>.  <code>xsl:with-param</code> is allowed
+         
+         within both <code>xsl:call-template</code> and
+         
+         <code>xsl:apply-templates</code>.  The value of the parameter is
+         
+         specified in the same way as for <code>xsl:variable</code> and
+         
+         <code>xsl:param</code>.  The current node and current node list used
+         
+         for computing the value specified by <code>xsl:with-param</code>
+         
+         element is the same as that used for the
+         
+         <code>xsl:apply-templates</code> or <code>xsl:call-template</code>
+         
+         element within which it occurs.  It is not an error to pass a
+         
+         parameter <var>x</var> to a template that does not have an
+         
+         <code>xsl:param</code> element for <var>x</var>; the parameter is
+         
+         simply ignored.
+      </p>
+      
+      
+      
+      
+      <p>This example defines a named template for a
+         
+         <code>numbered-block</code> with an argument to control the format of
+         
+         the number.
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:template name="numbered-block">
+
+  &lt;xsl:param name="format">1. &lt;/xsl:param>
+
+  &lt;fo:block>
+
+    &lt;xsl:number format="{$format}"/>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/fo:block>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="ol//ol/li">
+
+  &lt;xsl:call-template name="numbered-block">
+
+    &lt;xsl:with-param name="format">a. &lt;/xsl:with-param>
+
+  &lt;/xsl:call-template>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="add-func"></a>12 Additional Functions
+      </h2>
+      
+      
+      
+      
+      <p>This section describes XSLT-specific additions to the core XPath
+         
+         function library.  Some of these additional functions also make use of
+         
+         information specified by <a href="#dt-top-level">top-level</a>
+         
+         elements in the stylesheet; this section also describes these
+         
+         elements.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="document"></a>12.1 Multiple Source Documents
+      </h3>
+      
+      
+      
+      
+      <p><a name="function-document"><b>Function: </b><i>node-set</i> <b>document</b>(<i>object</i>, <i>node-set</i>?)
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The <b><a href="#function-document">document</a></b> function allows
+         
+         access to XML documents other than the main source document.
+      </p>
+      
+      
+      
+      
+      <p>When the <b><a href="#function-document">document</a></b> function has exactly one
+         
+         argument and the argument is a node-set, then the result is the union,
+         
+         for each node in the argument node-set, of the result of calling the
+         
+         <b><a href="#function-document">document</a></b> function with the first argument being
+         
+         the <a href="http://www.w3.org/TR/xpath#dt-string-value">string-value</a>
+         
+         of the node, and the second argument being a node-set with the node as
+         
+         its only member. When the <b><a href="#function-document">document</a></b> function has
+         
+         two arguments and the first argument is a node-set, then the result is
+         
+         the union, for each node in the argument node-set, of the result of
+         
+         calling the <b><a href="#function-document">document</a></b> function with the first
+         
+         argument being the <a href="http://www.w3.org/TR/xpath#dt-string-value">string-value</a> of the node,
+         
+         and with the second argument being the second argument passed to the
+         
+         <b><a href="#function-document">document</a></b> function.
+      </p>
+      
+      
+      
+      
+      <p>When the first argument to the <b><a href="#function-document">document</a></b>
+         
+         function is not a node-set, the first argument is converted to a
+         
+         string as if by a call to the <b><a href="http://www.w3.org/TR/xpath#function-string">string</a></b> function.
+         
+         This string is treated as a URI reference; the resource identified by
+         
+         the URI is retrieved. The data resulting from the retrieval action is
+         
+         parsed as an XML document and a tree is constructed in accordance with
+         
+         the data model (see <a href="#data-model">[<b>3 Data Model</b>]
+         </a>).  If there is an
+         
+         error retrieving the resource, then the XSLT processor may signal an
+         
+         error; if it does not signal an error, it must recover by returning an
+         
+         empty node-set.  One possible kind of retrieval error is that the XSLT
+         
+         processor does not support the URI scheme used by the URI.  An XSLT
+         
+         processor is not required to support any particular URI schemes.  The
+         
+         documentation for an XSLT processor should specify which URI schemes
+         
+         the XSLT processor supports.
+      </p>
+      
+      
+      
+      
+      <p>If the URI reference does not contain a fragment identifier, then a
+         
+         node-set containing just the root node of the document is returned.
+         
+         If the URI reference does contain a fragment identifier, the function
+         
+         returns a node-set containing the nodes in the tree identified by the
+         
+         fragment identifier of the URI reference. The semantics of the
+         
+         fragment identifier is dependent on the media type of the result of
+         
+         retrieving the URI.  If there is an error in processing the fragment
+         
+         identifier, the XSLT processor may signal the error; if it does not
+         
+         signal the error, it must recover by returning an empty node-set.
+         
+         Possible errors include:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>The fragment identifier identifies something that cannot be
+               
+               represented by an XSLT node-set (such as a range of characters within
+               
+               a text node).
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The XSLT processor does not support fragment identifiers for
+               
+               the media-type of the retrieval result.  An XSLT processor is not
+               
+               required to support any particular media types.  The documentation for
+               
+               an XSLT processor should specify for which media types the XSLT
+               
+               processor supports fragment identifiers.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>The data resulting from the retrieval action is parsed as an XML
+         
+         document regardless of the media type of the retrieval result; if the
+         
+         top-level media type is <code>text</code>, then it is parsed in the
+         
+         same way as if the media type were <code>text/xml</code>; otherwise,
+         
+         it is parsed in the same way as if the media type were
+         
+         <code>application/xml</code>.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Since there is no top-level <code>xml</code> media type, data
+         
+         with a media type other than <code>text/xml</code> or
+         
+         <code>application/xml</code> may in fact be XML.
+      </blockquote>
+      
+      
+      
+      
+      <p>The URI reference may be relative. The base URI (see <a href="#base-uri">[<b>3.2 Base URI</b>]
+         </a>) of the node in the second argument node-set that is
+         
+         first in document order is used as the base URI for resolving the
+         
+         relative URI into an absolute URI.  If the second argument is omitted,
+         
+         then it defaults to the node in the stylesheet that contains the
+         
+         expression that includes the call to the <b><a href="#function-document">document</a></b>
+         
+         function.  Note that a zero-length URI reference is a reference to the
+         
+         document relative to which the URI reference is being resolved; thus
+         
+         <code>document("")</code> refers to the root node of the stylesheet;
+         
+         the tree representation of the stylesheet is exactly the same as if
+         
+         the XML document containing the stylesheet was the initial source
+         
+         document.
+      </p>
+      
+      
+      
+      
+      <p>Two documents are treated as the same document if they are
+         
+         identified by the same URI. The URI used for the comparison is the
+         
+         absolute URI into which any relative URI was resolved and does not
+         
+         include any fragment identifier.  One root node is treated as the same
+         
+         node as another root node if the two nodes are from the same document.
+         
+         Thus, the following expression will always be true:
+      </p>
+      
+      
+      
+      <pre>generate-id(document("foo.xml"))=generate-id(document("foo.xml"))</pre>
+      
+      
+      
+      <p>The <b><a href="#function-document">document</a></b> function gives rise to the
+         
+         possibility that a node-set may contain nodes from more than one
+         
+         document.  With such a node-set, the relative document order of two
+         
+         nodes in the same document is the normal <a href="http://www.w3.org/TR/xpath#dt-document-order">document order</a> defined by
+         
+         XPath <a href="#XPATH">[XPath]</a>.  The relative document order of two nodes
+         
+         in different documents is determined by an implementation-dependent
+         
+         ordering of the documents containing the two nodes.  There are no
+         
+         constraints on how the implementation orders documents other than that
+         
+         it must do so consistently: an implementation must always use the same
+         
+         order for the same set of documents.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="key"></a>12.2 Keys
+      </h3>
+      
+      
+      
+      
+      <p>Keys provide a way to work with documents that contain an implicit
+         
+         cross-reference structure.  The <code>ID</code>, <code>IDREF</code>
+         
+         and <code>IDREFS</code> attribute types in XML provide a mechanism to
+         
+         allow XML documents to make their cross-reference explicit.  XSLT
+         
+         supports this through the XPath <b><a href="http://www.w3.org/TR/xpath#function-id">id</a></b> function.
+         
+         However, this mechanism has a number of limitations:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>ID attributes must be declared as such in the DTD.  If an ID
+               
+               attribute is declared as an ID attribute only in the external DTD
+               
+               subset, then it will be recognized as an ID attribute only if the XML
+               
+               processor reads the external DTD subset.  However, XML does not require
+               
+               XML processors to read the external DTD, and they may well choose not
+               
+               to do so, especially if the document is declared
+               
+               <code>standalone="yes"</code>.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>A document can contain only a single set of unique IDs.
+               
+               There cannot be separate independent sets of unique IDs.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The ID of an element can only be specified in an attribute;
+               
+               it cannot be specified by the content of the element, or by a child
+               
+               element.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>An ID is constrained to be an XML name.  For example, it
+               
+               cannot contain spaces.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>An element can have at most one ID.</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>At most one element can have a particular ID.</p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>Because of these limitations XML documents sometimes contain a
+         
+         cross-reference structure that is not explicitly declared by
+         
+         ID/IDREF/IDREFS attributes.
+      </p>
+      
+      
+      
+      
+      <p>A key is a triple containing:</p>
+      
+      
+      
+      
+      <ol>
+         
+         
+         
+         
+         <li>
+            <p>the node which has the key</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the name of the key (an <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a>)
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the value of the key (a string)</p>
+         </li>
+         
+         
+         
+         
+      </ol>
+      
+      
+      
+      
+      <p>A stylesheet declares a set of keys for each document using the
+         
+         <code>xsl:key</code> element.  When this set of keys contains a member
+         
+         with node <var>x</var>, name <var>y</var> and value
+         
+         <var>z</var>, we say that node <var>x</var> has a key with name
+         
+         <var>y</var> and value <var>z</var>.
+      </p>
+      
+      
+      
+      
+      <p>Thus, a key is a kind of generalized ID, which is not subject to the
+         
+         same limitations as an XML ID:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>Keys are declared in the stylesheet using
+               
+               <code>xsl:key</code> elements.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>A key has a name as well as a value; each key name may be
+               
+               thought of as distinguishing a separate, independent space of
+               
+               identifiers.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The value of a named key for an element may be specified in
+               
+               any convenient place; for example, in an attribute, in a child element
+               
+               or in content.  An XPath expression is used to specify where to find
+               
+               the value for a particular named key.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The value of a key can be an arbitrary string; it is not
+               
+               constrained to be a name.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>There can be multiple keys in a document with the same node,
+               
+               same key name, but different key values.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>There can be multiple keys in a document with the same key
+               
+               name, same key value, but different nodes.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-key"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:key<br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;<b>match</b> = <var>pattern</var><br>&nbsp;&nbsp;<b>use</b> = <var>expression</var>&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:key</code> element is used to declare keys.  The
+         
+         <code>name</code> attribute specifies the name of the key.  The value
+         
+         of the <code>name</code> attribute is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>. The <code>match</code> attribute is a <a href="#NT-Pattern">Pattern</a>; an <code>xsl:key</code> element gives
+         
+         information about the keys of any node that matches the pattern
+         
+         specified in the match attribute.  The <code>use</code> attribute is
+         
+         an <a href="#dt-expression">expression</a> specifying the
+         
+         values of the key; the expression is evaluated once for each node that
+         
+         matches the pattern.  If the result is a node-set, then for each node
+         
+         in the node-set, the node that matches the pattern has a key of the
+         
+         specified name whose value is the string-value of the node in the
+         
+         node-set; otherwise, the result is converted to a string, and the node
+         
+         that matches the pattern has a key of the specified name with value
+         
+         equal to that string.  Thus, a node <var>x</var> has a key with name
+         
+         <var>y</var> and value <var>z</var> if and only if there is an
+         
+         <code>xsl:key</code> element such that:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p><var>x</var> matches the pattern specified in the
+               
+               <code>match</code> attribute of the <code>xsl:key</code> element;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the value of the <code>name</code> attribute of the
+               
+               <code>xsl:key</code> element is equal to <var>y</var>;
+               
+               and
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>when the expression specified in the <code>use</code>
+               
+               attribute of the <code>xsl:key</code> element is evaluated with
+               
+               <var>x</var> as the current node and with a node list containing
+               
+               just <var>x</var> as the current node list resulting in an object
+               
+               <var>u</var>, then either <var>z</var> is equal to the result of
+               
+               converting <var>u</var> to a string as if by a call to the
+               
+               <b><a href="http://www.w3.org/TR/xpath#function-string">string</a></b> function, or <var>u</var> is a
+               
+               node-set and <var>z</var> is equal to the string-value of one or
+               
+               more of the nodes in <var>u</var>.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>Note also that there may be more than one <code>xsl:key</code>
+         
+         element that matches a given node; all of the matching
+         
+         <code>xsl:key</code> elements are used, even if they do not have the
+         
+         same <a href="#dt-import-precedence">import
+            
+            precedence
+         </a>.
+      </p>
+      
+      
+      
+      
+      <p>It is an error for the value of either the <code>use</code>
+         
+         attribute or the <code>match</code> attribute to contain a <a href="http://www.w3.org/TR/xpath#NT-VariableReference">VariableReference</a>.
+      </p>
+      
+      
+      
+      
+      <p><a name="function-key"><b>Function: </b><i>node-set</i> <b>key</b>(<i>string</i>, <i>object</i>)
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The <b><a href="#function-key">key</a></b> function does for keys what the
+         
+         <b><a href="http://www.w3.org/TR/xpath#function-id">id</a></b> function does for IDs.  The first argument
+         
+         specifies the name of the key. The value of the argument must be a
+         
+         <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as
+         
+         described in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>. When the second argument to the
+         
+         <b><a href="#function-key">key</a></b> function is of type node-set, then the result
+         
+         is the union of the result of applying the <b><a href="#function-key">key</a></b>
+         
+         function to the string <a href="http://www.w3.org/TR/xpath#dt-value">value</a> of each of the nodes in the
+         
+         argument node-set.  When the second argument to
+         
+         <b><a href="#function-key">key</a></b> is of any other type, the argument is
+         
+         converted to a string as if by a call to the
+         
+         <b><a href="http://www.w3.org/TR/xpath#function-string">string</a></b> function; it returns a node-set
+         
+         containing the nodes in the same document as the context node that
+         
+         have a value for the named key equal to this string.
+      </p>
+      
+      
+      
+      
+      <p>For example, given a declaration</p>
+      
+      
+      
+      <pre>&lt;xsl:key name="idkey" match="div" use="@id"/></pre>
+      
+      
+      
+      <p>an expression <code>key("idkey",@ref)</code> will return the same
+         
+         node-set as <code>id(@ref)</code>, assuming that the only ID attribute
+         
+         declared in the XML source document is:
+      </p>
+      
+      
+      
+      <pre>&lt;!ATTLIST div id ID #IMPLIED></pre>
+      
+      
+      
+      <p>and that the <code>ref</code> attribute of the current node
+         
+         contains no whitespace.
+      </p>
+      
+      
+      
+      
+      <p>Suppose a document describing a function library uses a
+         
+         <code>prototype</code> element to define functions
+      </p>
+      
+      
+      
+      <pre>&lt;prototype name="key" return-type="node-set">
+
+&lt;arg type="string"/>
+
+&lt;arg type="object"/>
+
+&lt;/prototype></pre>
+      
+      
+      
+      <p>and a <code>function</code> element to refer to function names
+      </p>
+      
+      
+      
+      <pre>&lt;function>key&lt;/function></pre>
+      
+      
+      
+      <p>Then the stylesheet could generate hyperlinks between the
+         
+         references and definitions as follows:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:key name="func" match="prototype" use="@name"/>
+
+
+
+&lt;xsl:template match="function">
+
+&lt;b>
+
+  &lt;a href="#{generate-id(key('func',.))}">
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/a>
+
+&lt;/b>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="prototype">
+
+&lt;p>&lt;a name="{generate-id()}">
+
+&lt;b>Function: &lt;/b>
+
+...
+
+&lt;/a>&lt;/p>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      <p>The <b><a href="#function-key">key</a></b> can be used to retrieve a key from a
+         
+         document other than the document containing the context node.  For
+         
+         example, suppose a document contains bibliographic references in the
+         
+         form <code>&lt;bibref>XSLT&lt;/bibref></code>, and there is a
+         
+         separate XML document <code>bib.xml</code> containing a bibliographic
+         
+         database with entries in the form:
+      </p>
+      
+      
+      
+      <pre>&lt;entry name="XSLT">...&lt;/entry></pre>
+      
+      
+      
+      <p>Then the stylesheet could use the following to transform the
+         
+         <code>bibref</code> elements:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:key name="bib" match="entry" use="@name"/>
+
+
+
+&lt;xsl:template match="bibref">
+
+  &lt;xsl:variable name="name" select="."/>
+
+  &lt;xsl:for-each select="document('bib.xml')">
+
+    &lt;xsl:apply-templates select="key('bib',$name)"/>
+
+  &lt;/xsl:for-each>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="format-number"></a>12.3 Number Formatting
+      </h3>
+      
+      
+      
+      
+      <p><a name="function-format-number"><b>Function: </b><i>string</i> <b>format-number</b>(<i>number</i>, <i>string</i>, <i>string</i>?)
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The <b><a href="#function-format-number">format-number</a></b> function converts its first
+         
+         argument to a string using the format pattern string specified by the
+         
+         second argument and the decimal-format named by the third argument, or
+         
+         the default decimal-format, if there is no third argument.  The format
+         
+         pattern string is in the syntax specified by the JDK 1.1 <a href="http://java.sun.com/products/jdk/1.1/docs/api/java.text.DecimalFormat.html">DecimalFormat</a> class. The format pattern string is in a
+         
+         localized notation: the decimal-format determines what characters have
+         
+         a special meaning in the pattern (with the exception of the quote
+         
+         character, which is not localized).  The format pattern must not
+         
+         contain the currency sign (#x00A4); support for this feature was added
+         
+         after the initial release of JDK 1.1.  The decimal-format name must be
+         
+         a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as
+         
+         described in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>.  It is an error if the stylesheet
+         
+         does not contain a declaration of the decimal-format with the specified
+         
+         <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a>.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Implementations are not required to use the JDK 1.1
+         
+         implementation, nor are implementations required to be implemented in
+         
+         Java.
+      </blockquote>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Stylesheets can use other facilities in XPath to control
+         
+         rounding.
+      </blockquote>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-decimal-format"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:decimal-format<br>&nbsp;&nbsp;name = <var>qname</var><br>&nbsp;&nbsp;decimal-separator = <var>char</var><br>&nbsp;&nbsp;grouping-separator = <var>char</var><br>&nbsp;&nbsp;infinity = <var>string</var><br>&nbsp;&nbsp;minus-sign = <var>char</var><br>&nbsp;&nbsp;NaN = <var>string</var><br>&nbsp;&nbsp;percent = <var>char</var><br>&nbsp;&nbsp;per-mille = <var>char</var><br>&nbsp;&nbsp;zero-digit = <var>char</var><br>&nbsp;&nbsp;digit = <var>char</var><br>&nbsp;&nbsp;pattern-separator = <var>char</var>&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:decimal-format</code> element declares a
+         
+         decimal-format, which controls the interpretation of a format pattern
+         
+         used by the <b><a href="#function-format-number">format-number</a></b> function.  If there is
+         
+         a <code>name</code> attribute, then the element declares a named
+         
+         decimal-format; otherwise, it declares the default decimal-format.
+         
+         The value of the <code>name</code> attribute is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>, which is expanded as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>.  It is an error to declare either the
+         
+         default decimal-format or a decimal-format with a given name more than
+         
+         once (even with different <a href="#dt-import-precedence">import
+            
+            precedence
+         </a>), unless it is declared every time with the same
+         
+         value for all attributes (taking into account any default values).
+      </p>
+      
+      
+      
+      
+      <p>The other attributes on <code>xsl:decimal-format</code> correspond
+         
+         to the methods on the JDK 1.1 <a href="http://java.sun.com/products/jdk/1.1/docs/api/java.text.DecimalFormatSymbols.html">DecimalFormatSymbols</a> class.  For each
+         
+         <code>get</code>/<code>set</code> method pair there is an attribute
+         
+         defined for the <code>xsl:decimal-format</code> element.
+      </p>
+      
+      
+      
+      
+      <p>The following attributes both control the interpretation of
+         
+         characters in the format pattern and specify characters that may
+         
+         appear in the result of formatting the number:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p><code>decimal-separator</code> specifies the character used
+               
+               for the decimal sign; the default value is the period character
+               
+               (<code>.</code>)
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>grouping-separator</code> specifies the character used
+               
+               as a grouping (e.g. thousands) separator; the default value is the
+               
+               comma character (<code>,</code>)
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>percent</code> specifies the character used as a
+               
+               percent sign; the default value is the percent character
+               
+               (<code>%</code>)
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>per-mille</code> specifies the character used as a per
+               
+               mille sign; the default value is the Unicode per-mille character
+               
+               (#x2030)
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>zero-digit</code> specifies the character used as the
+               
+               digit zero; the default value is the digit zero
+               
+               (<code>0</code>)
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>The following attributes control the interpretation of characters
+         
+         in the format pattern:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p><code>digit</code> specifies the character used for a digit
+               
+               in the format pattern; the default value is the number sign character
+               
+               (<code>#</code>)
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>pattern-separator</code> specifies the character used
+               
+               to separate positive and negative sub patterns in a pattern; the
+               
+               default value is the semi-colon character (<code>;</code>)
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>The following attributes specify characters or strings that may
+         
+         appear in the result of formatting the number:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p><code>infinity</code> specifies the string used to represent
+               
+               infinity; the default value is the string
+               
+               <code>Infinity</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>NaN</code> specifies the string used to represent the
+               
+               NaN value; the default value is the string <code>NaN</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>minus-sign</code> specifies the character used as the
+               
+               default minus sign; the default value is the hyphen-minus character
+               
+               (<code>-</code>, #x2D)
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="misc-func"></a>12.4 Miscellaneous Additional Functions
+      </h3>
+      
+      
+      
+      
+      <p><a name="function-current"><b>Function: </b><i>node-set</i> <b>current</b>()
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The <b><a href="#function-current">current</a></b> function returns a node-set that
+         
+         has the <a href="#dt-current-node">current node</a> as its
+         
+         only member.  For an outermost expression (an expression not occurring
+         
+         within another expression), the current node is always the same as the
+         
+         context node.  Thus,
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:value-of select="current()"/></pre>
+      
+      
+      
+      <p>means the same as</p>
+      
+      
+      
+      <pre>&lt;xsl:value-of select="."/></pre>
+      
+      
+      
+      <p>However, within square brackets the current node is usually
+         
+         different from the context node. For example,
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:apply-templates select="//glossary/item[@name=current()/@ref]"/></pre>
+      
+      
+      
+      <p>will process all <code>item</code> elements that have a
+         
+         <code>glossary</code> parent element and that have a <code>name</code>
+         
+         attribute with value equal to the value of the current node's
+         
+         <code>ref</code> attribute. This is different from
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:apply-templates select="//glossary/item[@name=./@ref]"/></pre>
+      
+      
+      
+      <p>which means the same as</p>
+      
+      
+      
+      <pre>&lt;xsl:apply-templates select="//glossary/item[@name=@ref]"/></pre>
+      
+      
+      
+      <p>and so would process all <code>item</code> elements that have a
+         
+         <code>glossary</code> parent element and that have a <code>name</code>
+         
+         attribute and a <code>ref</code> attribute with the same value.
+      </p>
+      
+      
+      
+      
+      <p>It is an error to use the <b><a href="#function-current">current</a></b> function in
+         
+         a <a href="#dt-pattern">pattern</a>.
+      </p>
+      
+      
+      
+      
+      <p><a name="function-unparsed-entity-uri"><b>Function: </b><i>string</i> <b>unparsed-entity-uri</b>(<i>string</i>)
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The <b><a href="#function-unparsed-entity-uri">unparsed-entity-uri</a></b> returns the URI of the
+         
+         unparsed entity with the specified name in the same document as the
+         
+         context node (see <a href="#unparsed-entities">[<b>3.3 Unparsed Entities</b>]
+         </a>).  It returns the
+         
+         empty string if there is no such entity.
+      </p>
+      
+      
+      
+      
+      <p><a name="function-generate-id"><b>Function: </b><i>string</i> <b>generate-id</b>(<i>node-set</i>?)
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The <b><a href="#function-generate-id">generate-id</a></b> function returns a string that
+         
+         uniquely identifies the node in the argument node-set that is first in
+         
+         document order.  The unique identifier must consist of ASCII
+         
+         alphanumeric characters and must start with an alphabetic character.
+         
+         Thus, the string is syntactically an XML name.  An implementation is
+         
+         free to generate an identifier in any convenient way provided that it
+         
+         always generates the same identifier for the same node and that
+         
+         different identifiers are always generated from different nodes. An
+         
+         implementation is under no obligation to generate the same identifiers
+         
+         each time a document is transformed.  There is no guarantee that a
+         
+         generated unique identifier will be distinct from any unique IDs
+         
+         specified in the source document.  If the argument node-set is empty,
+         
+         the empty string is returned. If the argument is omitted, it defaults
+         
+         to the context node.
+      </p>
+      
+      
+      
+      
+      <p><a name="function-system-property"><b>Function: </b><i>object</i> <b>system-property</b>(<i>string</i>)
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The argument must evaluate to a string that is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>.  The <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> is expanded into a name using
+         
+         the namespace declarations in scope for the expression. The
+         
+         <b><a href="#function-system-property">system-property</a></b> function returns an object
+         
+         representing the value of the system property identified by the name.
+         
+         If there is no such system property, the empty string should be
+         
+         returned.
+      </p>
+      
+      
+      
+      
+      <p>Implementations must provide the following system properties, which
+         
+         are all in the XSLT namespace:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li><code>xsl:version</code>, a number giving the version of XSLT
+            
+            implemented by the processor; for XSLT processors implementing the
+            
+            version of XSLT specified by this document, this is the number
+            
+            1.0
+         </li>
+         
+         
+         
+         
+         <li><code>xsl:vendor</code>, a string identifying the vendor of the
+            
+            XSLT processor
+         </li>
+         
+         
+         
+         
+         <li><code>xsl:vendor-url</code>, a string containing a URL
+            
+            identifying the vendor of the XSLT processor; typically this is the
+            
+            host page (home page) of the vendor's Web site.
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="message"></a>13 Messages
+      </h2>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-message"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:message<br>&nbsp;&nbsp;terminate = "yes" | "no"><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:message>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:message</code> instruction sends a message in a way
+         
+         that is dependent on the XSLT processor.  The content of the
+         
+         <code>xsl:message</code> instruction is a template.  The
+         
+         <code>xsl:message</code> is instantiated by instantiating the content
+         
+         to create an XML fragment.  This XML fragment is the content of the
+         
+         message.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>An XSLT processor might implement <code>xsl:message</code> by
+         
+         popping up an alert box or by writing to a log file.
+      </blockquote>
+      
+      
+      
+      
+      <p>If the <code>terminate</code> attribute has the value
+         
+         <code>yes</code>, then the XSLT processor should terminate processing
+         
+         after sending the message.  The default value is <code>no</code>.
+      </p>
+      
+      
+      
+      
+      <p>One convenient way to do localization is to put the localized
+         
+         information (message text, etc.) in an XML document, which becomes an
+         
+         additional input file to the stylesheet.  For example, suppose
+         
+         messages for a language <code><var>L</var></code> are stored in an XML
+         
+         file <code>resources/<var>L</var>.xml
+         </code> in the form:
+      </p>
+      
+      
+      
+      <pre>&lt;messages>
+
+  &lt;message name="problem">A problem was detected.&lt;/message>
+
+  &lt;message name="error">An error was detected.&lt;/message>
+
+&lt;/messages>
+
+</pre>
+      
+      
+      
+      <p>Then a stylesheet could use the following approach to localize
+         
+         messages:
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:param name="lang" select="en"/>
+
+&lt;xsl:variable name="messages"
+
+  select="document(concat('resources/', $lang, '.xml'))/messages"/>
+
+
+
+&lt;xsl:template name="localized-message">
+
+  &lt;xsl:param name="name"/>
+
+  &lt;xsl:message>
+
+    &lt;xsl:value-of select="$messages/message[@name=$name]"/>
+
+  &lt;/xsl:message>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template name="problem">
+
+  &lt;xsl:call-template name="localized-message"/>
+
+    &lt;xsl:with-param name="name">problem&lt;/xsl:with-param>
+
+  &lt;/xsl:call-template>
+
+&lt;/xsl:template></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="extension"></a>14 Extensions
+      </h2>
+      
+      
+      
+      
+      <p>XSLT allows two kinds of extension, extension elements and
+         
+         extension functions.
+      </p>
+      
+      
+      
+      
+      <p>This version of XSLT does not provide a mechanism for defining
+         
+         implementations of extensions.  Therefore, an XSLT stylesheet that must
+         
+         be portable between XSLT implementations cannot rely on particular
+         
+         extensions being available.  XSLT provides mechanisms that allow an
+         
+         XSLT stylesheet to determine whether the XSLT processor by which it is
+         
+         being processed has implementations of particular extensions
+         
+         available, and to specify what should happen if those extensions are
+         
+         not available.  If an XSLT stylesheet is careful to make use of these
+         
+         mechanisms, it is possible for it to take advantage of extensions and
+         
+         still work with any XSLT implementation.
+      </p>
+      
+      
+      
+      
+      
+      
+      <h3><a name="extension-element"></a>14.1 Extension Elements
+      </h3>
+      
+      
+      
+      
+      <p><a name="dt-extension-namespace"></a>The
+         
+         element extension mechanism allows namespaces to be designated as
+         
+         <b>extension namespace</b>s. When a namespace is designated as
+         
+         an extension namespace and an element with a name from that namespace
+         
+         occurs in a template, then the element is treated as an instruction
+         
+         rather than as a literal result element. The namespace
+         
+         determines the semantics of the instruction.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Since an element that is a child of an
+         
+         <code>xsl:stylesheet</code> element is not occurring <i>in a
+            
+            template
+         </i>, non-XSLT <a href="#dt-top-level">top-level</a> elements are not extension
+         
+         elements as defined here, and nothing in this section applies to
+         
+         them.
+      </blockquote>
+      
+      
+      
+      
+      <p>A namespace is designated as an extension namespace by using an
+         
+         <code>extension-element-prefixes</code> attribute on an
+         
+         <code>xsl:stylesheet</code> element or an
+         
+         <code>xsl:extension-element-prefixes</code> attribute on a literal
+         
+         result element or extension element.
+         
+         The value of both these attributes is a
+         
+         whitespace-separated list of namespace prefixes. The namespace bound
+         
+         to each of the prefixes is designated as an extension namespace.  It
+         
+         is an error if there is no namespace bound to the prefix on the
+         
+         element bearing the <code>extension-element-prefixes</code> or
+         
+         <code>xsl:extension-element-prefixes</code> attribute.  The default
+         
+         namespace (as declared by <code>xmlns</code>) may be designated as an
+         
+         extension namespace by including <code>#default</code> in the list of
+         
+         namespace prefixes.  The designation of a namespace as an extension
+         
+         namespace is effective within the subtree of the stylesheet rooted at
+         
+         the element bearing the <code>extension-element-prefixes</code> or
+         
+         <code>xsl:extension-element-prefixes</code> attribute;
+         
+         a subtree rooted at an <code>xsl:stylesheet</code> element
+         
+         does not include any stylesheets imported or included by children
+         
+         of that <code>xsl:stylesheet</code> element.
+      </p>
+      
+      
+      
+      
+      <p>If the XSLT processor does not have an implementation of a
+         
+         particular extension element available, then the
+         
+         <b><a href="#function-element-available">element-available</a></b> function must return false for
+         
+         the name of the element.  When such an extension element is
+         
+         instantiated, then the XSLT processor must perform fallback for the
+         
+         element as specified in <a href="#fallback">[<b>15 Fallback</b>]
+         </a>.  An XSLT processor
+         
+         must not signal an error merely because a template contains an
+         
+         extension element for which no implementation is available.
+      </p>
+      
+      
+      
+      
+      <p>If the XSLT processor has an implementation of a particular
+         
+         extension element available, then the
+         
+         <b><a href="#function-element-available">element-available</a></b> function must return true for
+         
+         the name of the element.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Extension-Functions"></a>14.2 Extension Functions
+      </h3>
+      
+      
+      
+      
+      <p>If a <a href="http://www.w3.org/TR/xpath#NT-FunctionName">FunctionName</a> in a
+         
+         <a href="http://www.w3.org/TR/xpath#NT-FunctionCall">FunctionCall</a> expression is
+         
+         not an <a href="http://www.w3.org/TR/REC-xml-names#NT-NCName">NCName</a> (i.e. if it
+         
+         contains a colon), then it is treated as a call to an extension
+         
+         function.  The <a href="http://www.w3.org/TR/xpath#NT-FunctionName">FunctionName</a>
+         
+         is expanded to a name using the namespace declarations from the
+         
+         evaluation context.
+      </p>
+      
+      
+      
+      
+      <p>If the XSLT processor does not have an implementation of an
+         
+         extension function of a particular name available, then the
+         
+         <b><a href="#function-function-available">function-available</a></b> function must return false for
+         
+         that name.  If such an extension function occurs in an expression and
+         
+         the extension function is actually called, the XSLT processor must
+         
+         signal an error.  An XSLT processor must not signal an error merely
+         
+         because an expression contains an extension function for which no
+         
+         implementation is available.
+      </p>
+      
+      
+      
+      
+      <p>If the XSLT processor has an implementation of an extension
+         
+         function of a particular name available, then the
+         
+         <b><a href="#function-function-available">function-available</a></b> function must return
+         
+         true for that name. If such an extension is called, then the XSLT
+         
+         processor must call the implementation passing it the function call
+         
+         arguments; the result returned by the implementation is returned as
+         
+         the result of the function call.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="fallback"></a>15 Fallback
+      </h2>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-fallback"></a><code>&lt;!-- Category: instruction --><br>&lt;xsl:fallback><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:fallback>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>Normally, instantiating an <code>xsl:fallback</code> element does
+         
+         nothing.  However, when an XSLT processor performs fallback for an
+         
+         instruction element, if the instruction element has one or more
+         
+         <code>xsl:fallback</code> children, then the content of each of the
+         
+         <code>xsl:fallback</code> children must be instantiated in sequence;
+         
+         otherwise, an error must be signaled. The content of an
+         
+         <code>xsl:fallback</code> element is a template.
+      </p>
+      
+      
+      
+      
+      <p>The following functions can be used with the
+         
+         <code>xsl:choose</code> and <code>xsl:if</code> instructions to
+         
+         explicitly control how a stylesheet should behave if particular
+         
+         elements or functions are not available.
+      </p>
+      
+      
+      
+      
+      <p><a name="function-element-available"><b>Function: </b><i>boolean</i> <b>element-available</b>(<i>string</i>)
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The argument must evaluate to a string that is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>.  The <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> is expanded into an <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a> using the
+         
+         namespace declarations in scope for the expression. The
+         
+         <b><a href="#function-element-available">element-available</a></b> function returns true if and
+         
+         only if the expanded-name is the name of an instruction.  If the
+         
+         expanded-name has a namespace URI equal to the XSLT namespace URI,
+         
+         then it refers to an element defined by XSLT.  Otherwise, it refers to
+         
+         an extension element. If the expanded-name has a null namespace URI,
+         
+         the <b><a href="#function-element-available">element-available</a></b> function will return
+         
+         false.
+      </p>
+      
+      
+      
+      
+      <p><a name="function-function-available"><b>Function: </b><i>boolean</i> <b>function-available</b>(<i>string</i>)
+         </a>
+      </p>
+      
+      
+      
+      
+      <p>The argument must evaluate to a string that is a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>.  The <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> is expanded into an <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a> using the
+         
+         namespace declarations in scope for the expression. The
+         
+         <b><a href="#function-function-available">function-available</a></b> function returns true if and
+         
+         only if the expanded-name is the name of a function in the function
+         
+         library. If the expanded-name has a non-null namespace URI, then it
+         
+         refers to an extension function; otherwise, it refers to a function
+         
+         defined by XPath or XSLT.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="output"></a>16 Output
+      </h2>
+      
+      
+      
+      
+      <p class="element-syntax"><a name="element-output"></a><code>&lt;!-- Category: top-level-element --><br>&lt;xsl:output<br>&nbsp;&nbsp;method = "xml" | "html" | "text" | <var>qname-but-not-ncname</var><br>&nbsp;&nbsp;version = <var>nmtoken</var><br>&nbsp;&nbsp;encoding = <var>string</var><br>&nbsp;&nbsp;omit-xml-declaration = "yes" | "no"<br>&nbsp;&nbsp;standalone = "yes" | "no"<br>&nbsp;&nbsp;doctype-public = <var>string</var><br>&nbsp;&nbsp;doctype-system = <var>string</var><br>&nbsp;&nbsp;cdata-section-elements = <var>qnames</var><br>&nbsp;&nbsp;indent = "yes" | "no"<br>&nbsp;&nbsp;media-type = <var>string</var>&nbsp;/>
+         </code>
+      </p>
+      
+      
+      
+      
+      <p>An XSLT processor may output the result tree as a sequence of
+         
+         bytes, although it is not required to be able to do so (see <a href="#conformance">[<b>17 Conformance</b>]
+         </a>). The <code>xsl:output</code> element allows
+         
+         stylesheet authors to specify how they wish the result tree to be
+         
+         output. If an XSLT processor outputs the result tree, it should do so
+         
+         as specified by the <code>xsl:output</code> element; however, it is
+         
+         not required to do so.
+      </p>
+      
+      
+      
+      
+      <p>The <code>xsl:output</code> element is only allowed as a <a href="#dt-top-level">top-level</a> element.
+      </p>
+      
+      
+      
+      
+      <p>The <code>method</code> attribute on <code>xsl:output</code>
+         
+         identifies the overall method that should be used for outputting the
+         
+         result tree.  The value must be a <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>.  If the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> does not have a prefix, then it
+         
+         identifies a method specified in this document and must be one of
+         
+         <code>xml</code>, <code>html</code> or <code>text</code>.  If the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> has a prefix, then the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> is expanded into an <a href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a> as described
+         
+         in <a href="#qname">[<b>2.4 Qualified Names</b>]
+         </a>; the expanded-name identifies the output
+         
+         method; the behavior in this case is not specified by this
+         
+         document.
+      </p>
+      
+      
+      
+      
+      <p>The default for the <code>method</code> attribute is chosen as
+         
+         follows.  If
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>the root node of the result tree has an element
+               
+               child,
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>the expanded-name of the first element child of the root node
+               
+               (i.e. the document element) of the result tree has local part
+               
+               <code>html</code> (in any combination of upper and lower case) and a
+               
+               null namespace URI, and
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>any text nodes preceding the first element child of the root
+               
+               node of the result tree contain only whitespace characters,
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>then the default output method is <code>html</code>; otherwise, the
+         
+         default output method is <code>xml</code>.  The default output method
+         
+         should be used if there are no <code>xsl:output</code> elements or if
+         
+         none of the <code>xsl:output</code> elements specifies a value for the
+         
+         <code>method</code> attribute.
+      </p>
+      
+      
+      
+      
+      <p>The other attributes on <code>xsl:output</code> provide parameters
+         
+         for the output method.  The following attributes are allowed:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p><code>version</code> specifies the version of the output
+               
+               method
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>indent</code> specifies whether the XSLT processor may
+               
+               add additional whitespace when outputting the result tree; the value
+               
+               must be <code>yes</code> or <code>no</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>encoding</code> specifies the preferred character
+               
+               encoding that the XSLT processor should use to encode sequences of
+               
+               characters as sequences of bytes; the value of the attribute should be
+               
+               treated case-insensitively; the value must contain only characters in
+               
+               the range #x21 to #x7E (i.e. printable ASCII characters); the value
+               
+               should either be a <code>charset</code> registered with the Internet
+               
+               Assigned Numbers Authority <a href="#IANA">[IANA]</a>, <a href="#RFC2278">[RFC2278]</a> or start with <code>X-</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>media-type</code> specifies the media type (MIME
+               
+               content type) of the data that results from outputting the result
+               
+               tree; the <code>charset</code> parameter should not be specified
+               
+               explicitly; instead, when the top-level media type is
+               
+               <code>text</code>, a <code>charset</code> parameter should be added
+               
+               according to the character encoding actually used by the output
+               
+               method
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>doctype-system</code> specifies the system identifier
+               
+               to be used in the document type declaration
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>doctype-public</code> specifies the public identifier
+               
+               to be used in the document type declaration
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>omit-xml-declaration</code> specifies whether the XSLT
+               
+               processor should output an XML declaration; the value must be
+               
+               <code>yes</code> or <code>no</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>standalone</code> specifies whether the XSLT processor
+               
+               should output a standalone document declaration; the value must be
+               
+               <code>yes</code> or <code>no</code></p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p><code>cdata-section-elements</code> specifies a list of the
+               
+               names of elements whose text node children should be output using
+               
+               CDATA sections
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>The detailed semantics of each attribute will be described
+         
+         separately for each output method for which it is applicable.  If the
+         
+         semantics of an attribute are not described for an output method, then
+         
+         it is not applicable to that output method.
+      </p>
+      
+      
+      
+      
+      <p>A stylesheet may contain multiple <code>xsl:output</code> elements
+         
+         and may include or import stylesheets that also contain
+         
+         <code>xsl:output</code> elements.  All the <code>xsl:output</code>
+         
+         elements occurring in a stylesheet are merged into a single effective
+         
+         <code>xsl:output</code> element. For the
+         
+         <code>cdata-section-elements</code> attribute, the effective value is
+         
+         the union of the specified values.  For other attributes, the
+         
+         effective value is the specified value with the highest <a href="#dt-import-precedence">import precedence</a>. It is an error
+         
+         if there is more than one such value for an attribute.  An XSLT
+         
+         processor may signal the error; if it does not signal the error, if
+         
+         should recover by using the value that occurs last in the stylesheet.
+         
+         The values of attributes are defaulted after the
+         
+         <code>xsl:output</code> elements have been merged; different output
+         
+         methods may have different default values for an attribute.
+      </p>
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-XML-Output-Method"></a>16.1 XML Output Method
+      </h3>
+      
+      
+      
+      
+      <p>The <code>xml</code> output method outputs the result tree as a
+         
+         well-formed XML external general parsed entity. If the root node of
+         
+         the result tree has a single element node child and no text node
+         
+         children, then the entity should also be a well-formed XML document
+         
+         entity. When the entity is referenced within a trivial XML document
+         
+         wrapper like this
+      </p>
+      
+      
+      
+      <pre>
+
+&lt;!DOCTYPE doc [
+
+&lt;!ENTITY e SYSTEM "<var>entity-URI</var>">
+         
+         ]>
+         
+         &lt;doc>&amp;e;&lt;/doc>
+      </pre>
+      
+      
+      
+      
+      <p>where <code><var>entity-URI</var></code> is a URI for the entity,
+         
+         then the wrapper
+         
+         document as a whole should be a well-formed XML document conforming to
+         
+         the XML Namespaces Recommendation <a href="#XMLNAMES">[XML Names]</a>.  In
+         
+         addition, the output should be such that if a new tree was constructed
+         
+         by parsing the wrapper as an XML document as specified in <a href="#data-model">[<b>3 Data Model</b>]
+         </a>, and then removing the document element, making its
+         
+         children instead be children of the root node, then the new tree would
+         
+         be the same as the result tree, with the following possible
+         
+         exceptions:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>The order of attributes in the two trees may be
+               
+               different.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The new tree may contain namespace nodes that were not
+               
+               present in the result tree.
+            </p>
+            
+            
+            <blockquote><b>NOTE: </b>An XSLT processor may need to add
+               
+               namespace declarations in the course of outputting the result tree as
+               
+               XML.
+            </blockquote>
+            
+            
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>If the XSLT processor generated a document type declaration because
+         
+         of the <code>doctype-system</code> attribute, then the above
+         
+         requirements apply to the entity with the generated document type
+         
+         declaration removed.
+      </p>
+      
+      
+      
+      
+      <p>The <code>version</code> attribute specifies the version of XML to
+         
+         be used for outputting the result tree.  If the XSLT processor does
+         
+         not support this version of XML, it should use a version of XML that
+         
+         it does support.  The version output in the XML declaration (if an XML
+         
+         declaration is output) should correspond to the version of XML that
+         
+         the processor used for outputting the result tree. The value of the
+         
+         <code>version</code> attribute should match the <a href="http://www.w3.org/TR/REC-xml#NT-VersionNum">VersionNum</a> production of the XML
+         
+         Recommendation <a href="#XML">[XML]</a>. The default value is
+         
+         <code>1.0</code>.
+      </p>
+      
+      
+      
+      
+      <p>The <code>encoding</code> attribute specifies the preferred
+         
+         encoding to use for outputting the result tree.  XSLT processors are
+         
+         required to respect values of <code>UTF-8</code> and
+         
+         <code>UTF-16</code>.  For other values, if the XSLT processor does not
+         
+         support the specified encoding it may signal an error; if it does not
+         
+         signal an error it should use <code>UTF-8</code> or
+         
+         <code>UTF-16</code> instead.  The XSLT processor must not use an
+         
+         encoding whose name does not match the <a href="http://www.w3.org/TR/REC-xml#NT-EncName">EncName</a> production of the XML
+         
+         Recommendation <a href="#XML">[XML]</a>.  If no <code>encoding</code>
+         
+         attribute is specified, then the XSLT processor should use either
+         
+         <code>UTF-8</code> or <code>UTF-16</code>.  It is possible that the
+         
+         result tree will contain a character that cannot be represented in the
+         
+         encoding that the XSLT processor is using for output.  In this case,
+         
+         if the character occurs in a context where XML recognizes character
+         
+         references (i.e. in the value of an attribute node or text node), then
+         
+         the character should be output as a character reference; otherwise
+         
+         (for example if the character occurs in the name of an element) the
+         
+         XSLT processor should signal an error.
+      </p>
+      
+      
+      
+      
+      <p>If the <code>indent</code> attribute has the value
+         
+         <code>yes</code>, then the <code>xml</code> output method may output
+         
+         whitespace in addition to the whitespace in the result tree (possibly
+         
+         based on whitespace stripped from either the source document or the
+         
+         stylesheet) in order to indent the result nicely; if the
+         
+         <code>indent</code> attribute has the value <code>no</code>, it should
+         
+         not output any additional whitespace. The default value is
+         
+         <code>no</code>.  The <code>xml</code> output method should use an
+         
+         algorithm to output additional whitespace that ensures that the result
+         
+         if whitespace were to be stripped from the output using the process
+         
+         described in <a href="#strip">[<b>3.4 Whitespace Stripping</b>]
+         </a> with the set of
+         
+         whitespace-preserving elements consisting of just
+         
+         <code>xsl:text</code> would be the same when additional whitespace is
+         
+         output as when additional whitespace is not output.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>It is usually not safe to use <code>indent="yes"</code> with
+         
+         document types that include element types with mixed content.
+      </blockquote>
+      
+      
+      
+      
+      <p>The <code>cdata-section-elements</code> attribute contains a
+         
+         whitespace-separated list of <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>s.  Each <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> is expanded into an
+         
+         expanded-name using the namespace declarations in effect on the
+         
+         <code>xsl:output</code> element in which the <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> occurs; if there is a default
+         
+         namespace, it is used for <a href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a>s
+         
+         that do not have a prefix.  The expansion is performed before the
+         
+         merging of multiple <code>xsl:output</code> elements into a single
+         
+         effective <code>xsl:output</code> element. If the expanded-name of the
+         
+         parent of a text node is a member of the list, then the text node
+         
+         should be output as a CDATA section. For example,
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:output cdata-section-elements="example"/></pre>
+      
+      
+      
+      <p>would cause a literal result element written in the stylesheet as</p>
+      
+      
+      
+      <pre>&lt;example>&amp;lt;foo>&lt;/example></pre>
+      
+      
+      
+      <p>or as</p>
+      
+      
+      
+      <pre>&lt;example>&lt;![CDATA[&lt;foo>]]>&lt;/example></pre>
+      
+      
+      
+      <p>to be output as</p>
+      
+      
+      
+      <pre>&lt;example>&lt;![CDATA[&lt;foo>]]>&lt;/example></pre>
+      
+      
+      
+      <p>If the text node contains the sequence of characters
+         
+         <code>]]></code>, then the currently open CDATA section should be
+         
+         closed following the <code>]]</code> and a new CDATA section opened
+         
+         before the <code>></code>. For example, a literal result element
+         
+         written in the stylesheet as
+      </p>
+      
+      
+      
+      <pre>&lt;example>]]&amp;gt;&lt;/example></pre>
+      
+      
+      
+      <p>would be output as</p>
+      
+      
+      
+      <pre>&lt;example>&lt;![CDATA[]]]]>&lt;![CDATA[>]]>&lt;/example></pre>
+      
+      
+      
+      <p>If the text node contains a character that is not representable in
+         
+         the character encoding being used to output the result tree, then the
+         
+         currently open CDATA section should be closed before the character,
+         
+         the character should be output using a character reference or entity
+         
+         reference, and a new CDATA section should be opened for any further
+         
+         characters in the text node.
+      </p>
+      
+      
+      
+      
+      <p>CDATA sections should not be used except for text nodes that the
+         
+         <code>cdata-section-elements</code> attribute explicitly specifies
+         
+         should be output using CDATA sections.
+      </p>
+      
+      
+      
+      
+      <p>The <code>xml</code> output method should output an XML declaration
+         
+         unless the <code>omit-xml-declaration</code> attribute has the value
+         
+         <code>yes</code>. The XML declaration should include both version
+         
+         information and an encoding declaration. If the
+         
+         <code>standalone</code> attribute is specified, it should include a
+         
+         standalone document declaration with the same value as the value as
+         
+         the value of the <code>standalone</code> attribute.  Otherwise, it
+         
+         should not include a standalone document declaration; this ensures
+         
+         that it is both a XML declaration (allowed at the beginning of a
+         
+         document entity) and a text declaration (allowed at the beginning of
+         
+         an external general parsed entity).
+      </p>
+      
+      
+      
+      
+      <p>If the <code>doctype-system</code> attribute is specified, the
+         
+         <code>xml</code> output method should output a document type
+         
+         declaration immediately before the first element.  The name following
+         
+         <code>&lt;!DOCTYPE</code> should be the name of the first element.  If
+         
+         <code>doctype-public</code> attribute is also specified, then the
+         
+         <code>xml</code> output method should output <code>PUBLIC</code>
+         
+         followed by the public identifier and then the system identifier;
+         
+         otherwise, it should output <code>SYSTEM</code> followed by the system
+         
+         identifier.  The internal subset should be empty.  The
+         
+         <code>doctype-public</code> attribute should be ignored unless the
+         
+         <code>doctype-system</code> attribute is specified.
+      </p>
+      
+      
+      
+      
+      <p>The <code>media-type</code> attribute is applicable for the
+         
+         <code>xml</code> output method.  The default value for the
+         
+         <code>media-type</code> attribute is <code>text/xml</code>.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-HTML-Output-Method"></a>16.2 HTML Output Method
+      </h3>
+      
+      
+      
+      
+      <p>The <code>html</code> output method outputs the result tree as
+         
+         HTML; for example,
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+
+&lt;xsl:output method="html"/>
+
+
+
+&lt;xsl:template match="/">
+
+  &lt;html>
+
+   &lt;xsl:apply-templates/>
+
+  &lt;/html>
+
+&lt;/xsl:template>
+
+
+
+...
+
+
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <p>The <code>version</code> attribute indicates the version of the
+         
+         HTML.  The default value is <code>4.0</code>, which specifies that the
+         
+         result should be output as HTML conforming to the HTML 4.0
+         
+         Recommendation <a href="#HTML">[HTML]</a>.
+      </p>
+      
+      
+      
+      
+      <p>The <code>html</code> output method should not output an element
+         
+         differently from the <code>xml</code> output method unless the
+         
+         expanded-name of the element has a null namespace URI; an element
+         
+         whose expanded-name has a non-null namespace URI should be output as
+         
+         XML.  If the expanded-name of the element has a null namespace URI,
+         
+         but the local part of the expanded-name is not recognized as the name
+         
+         of an HTML element, the element should output in the same way as a
+         
+         non-empty, inline element such as <code>span</code>.
+      </p>
+      
+      
+      
+      
+      <p>The <code>html</code> output method should not output an end-tag
+         
+         for empty elements.  For HTML 4.0, the empty elements are
+         
+         <code>area</code>, <code>base</code>, <code>basefont</code>,
+         
+         <code>br</code>, <code>col</code>, <code>frame</code>,
+         
+         <code>hr</code>, <code>img</code>, <code>input</code>,
+         
+         <code>isindex</code>, <code>link</code>, <code>meta</code> and
+         
+         <code>param</code>. For example, an element written as
+         
+         <code>&lt;br/></code> or <code>&lt;br>&lt;/br></code> in the
+         
+         stylesheet should be output as <code>&lt;br></code>.
+      </p>
+      
+      
+      
+      
+      <p>The <code>html</code> output method should recognize the names of
+         
+         HTML elements regardless of case.  For example, elements named
+         
+         <code>br</code>, <code>BR</code> or <code>Br</code> should all be
+         
+         recognized as the HTML <code>br</code> element and output without an
+         
+         end-tag.
+      </p>
+      
+      
+      
+      
+      <p>The <code>html</code> output method should not perform escaping for
+         
+         the content of the <code>script</code> and <code>style</code>
+         
+         elements. For example, a literal result element written in the
+         
+         stylesheet as
+      </p>
+      
+      
+      
+      <pre>&lt;script>if (a &amp;lt; b) foo()&lt;/script></pre>
+      
+      
+      
+      <p>or</p>
+      
+      
+      
+      <pre>&lt;script>&lt;![CDATA[if (a &lt; b) foo()]]>&lt;/script></pre>
+      
+      
+      
+      <p>should be output as</p>
+      
+      
+      
+      <pre>&lt;script>if (a &lt; b) foo()&lt;/script></pre>
+      
+      
+      
+      <p>The <code>html</code> output method should not escape
+         
+         <code>&lt;</code> characters occurring in attribute values.
+      </p>
+      
+      
+      
+      
+      <p>If the <code>indent</code> attribute has the value
+         
+         <code>yes</code>, then the <code>html</code> output method may add or
+         
+         remove whitespace as it outputs the result tree, so long as it does
+         
+         not change how an HTML user agent would render the output.  The
+         
+         default value is <code>yes</code>.
+      </p>
+      
+      
+      
+      
+      <p>The <code>html</code> output method should escape non-ASCII
+         
+         characters in URI attribute values using the method recommended in
+         
+         <a href="http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.1">Section
+            
+            B.2.1
+         </a> of the HTML 4.0 Recommendation.
+      </p>
+      
+      
+      
+      
+      <p>The <code>html</code> output method may output a character using a
+         
+         character entity reference, if one is defined for it in the version of
+         
+         HTML that the output method is using.
+      </p>
+      
+      
+      
+      
+      <p>The <code>html</code> output method should terminate processing
+         
+         instructions with <code>></code> rather than
+         
+         <code>?></code>.
+      </p>
+      
+      
+      
+      
+      <p>The <code>html</code> output method should output boolean
+         
+         attributes (that is attributes with only a single allowed value that
+         
+         is equal to the name of the attribute) in minimized form. For example,
+         
+         a start-tag written in the stylesheet as
+      </p>
+      
+      
+      
+      <pre>&lt;OPTION selected="selected"></pre>
+      
+      
+      
+      <p>should be output as</p>
+      
+      
+      
+      <pre>&lt;OPTION selected></pre>
+      
+      
+      
+      <p>The <code>html</code> output method should not escape a
+         
+         <code>&amp;</code> character occurring in an attribute value
+         
+         immediately followed by a <code>{</code> character (see <a href="http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.7.1.1">Section
+            
+            B.7.1
+         </a> of the HTML 4.0 Recommendation). For example, a start-tag
+         
+         written in the stylesheet as
+      </p>
+      
+      
+      
+      <pre>&lt;BODY bgcolor='&amp;amp;{{randomrbg}};'></pre>
+      
+      
+      
+      <p>should be output as</p>
+      
+      
+      
+      <pre>&lt;BODY bgcolor='&amp;{randomrbg};'></pre>
+      
+      
+      
+      <p>The <code>encoding</code> attribute specifies the preferred
+         
+         encoding to be used. If there is a <code>HEAD</code> element, then the
+         
+         <code>html</code> output method should add a <code>META</code> element
+         
+         immediately after the start-tag of the <code>HEAD</code> element
+         
+         specifying the character encoding actually used. For example,
+      </p>
+      
+      
+      
+      <pre>&lt;HEAD>
+
+&lt;META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
+
+...</pre>
+      
+      
+      
+      <p>It is possible that the result tree will contain a character that
+         
+         cannot be represented in the encoding that the XSLT processor is using
+         
+         for output.  In this case, if the character occurs in a context where
+         
+         HTML recognizes character references, then the character should be
+         
+         output as a character entity reference or decimal numeric character
+         
+         reference; otherwise (for example, in a
+         
+         <code>script</code> or <code>style</code> element or in a comment),
+         
+         the XSLT processor should signal an error.
+      </p>
+      
+      
+      
+      
+      <p>If the <code>doctype-public</code> or <code>doctype-system</code>
+         
+         attributes are specified, then the <code>html</code> output method
+         
+         should output a document type declaration immediately before the first
+         
+         element.  The name following <code>&lt;!DOCTYPE</code> should be
+         
+         <code>HTML</code> or <code>html</code>.  If the
+         
+         <code>doctype-public</code> attribute is specified, then the output
+         
+         method should output <code>PUBLIC</code> followed by the specified
+         
+         public identifier; if the <code>doctype-system</code> attribute is
+         
+         also specified, it should also output the specified system identifier
+         
+         following the public identifier.  If the <code>doctype-system</code>
+         
+         attribute is specified but the <code>doctype-public</code> attribute
+         
+         is not specified, then the output method should output
+         
+         <code>SYSTEM</code> followed by the specified system identifier.
+      </p>
+      
+      
+      
+      
+      <p>The <code>media-type</code> attribute is applicable for the
+         
+         <code>html</code> output method.  The default value is
+         
+         <code>text/html</code>.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Text-Output-Method"></a>16.3 Text Output Method
+      </h3>
+      
+      
+      
+      
+      <p>The <code>text</code> output method outputs the result tree by
+         
+         outputting the string-value of every text node in the result tree in
+         
+         document order without any escaping.
+      </p>
+      
+      
+      
+      
+      <p>The <code>media-type</code> attribute is applicable for the
+         
+         <code>text</code> output method.  The default value for the
+         
+         <code>media-type</code> attribute is <code>text/plain</code>.
+      </p>
+      
+      
+      
+      
+      <p>The <code>encoding</code> attribute identifies the encoding that
+         
+         the <code>text</code> output method should use to convert sequences of
+         
+         characters to sequences of bytes.  The default is system-dependent. If
+         
+         the result tree contains a character that cannot be represented in the
+         
+         encoding that the XSLT processor is using for output, the XSLT
+         
+         processor should signal an error.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="disable-output-escaping"></a>16.4 Disabling Output Escaping
+      </h3>
+      
+      
+      
+      
+      <p>Normally, the <code>xml</code> output method escapes &amp; and &lt;
+         
+         (and possibly other characters) when outputting text nodes.  This
+         
+         ensures that the output is well-formed XML. However, it is sometimes
+         
+         convenient to be able to produce output that is almost, but not quite
+         
+         well-formed XML; for example, the output may include ill-formed
+         
+         sections which are intended to be transformed into well-formed XML by
+         
+         a subsequent non-XML aware process.  For this reason, XSLT provides a
+         
+         mechanism for disabling output escaping. An <code>xsl:value-of</code>
+         
+         or <code>xsl:text</code> element may have a
+         
+         <code>disable-output-escaping</code> attribute; the allowed values are
+         
+         <code>yes</code> or <code>no</code>; the default is <code>no</code>;
+         
+         if the value is <code>yes</code>, then a text node generated by
+         
+         instantiating the <code>xsl:value-of</code> or <code>xsl:text</code>
+         
+         element should be output without any escaping. For example,
+      </p>
+      
+      
+      
+      <pre>&lt;xsl:text disable-output-escaping="yes">&amp;lt;&lt;/xsl:text></pre>
+      
+      
+      
+      <p>should generate the single character <code>&lt;</code>.
+      </p>
+      
+      
+      
+      
+      <p>It is an error for output escaping to be disabled for a text node
+         
+         that is used for something other than a text node in the result tree.
+         
+         Thus, it is an error to disable output escaping for an
+         
+         <code>xsl:value-of</code> or <code>xsl:text</code> element that is
+         
+         used to generate the string-value of a comment, processing instruction
+         
+         or attribute node; it is also an error to convert a <a href="#dt-result-tree-fragment">result tree fragment</a> to a
+         
+         number or a string if the result tree fragment contains a text node for
+         
+         which escaping was disabled.  In both cases, an XSLT processor may
+         
+         signal the error; if it does not signal the error, it must recover by
+         
+         ignoring the <code>disable-output-escaping</code> attribute.
+      </p>
+      
+      
+      
+      
+      <p>The <code>disable-output-escaping</code> attribute may be used with
+         
+         the <code>html</code> output method as well as with the
+         
+         <code>xml</code> output method.  The <code>text</code> output method
+         
+         ignores the <code>disable-output-escaping</code> attribute, since it
+         
+         does not perform any output escaping.
+      </p>
+      
+      
+      
+      
+      <p>An XSLT processor will only be able to disable output escaping if
+         
+         it controls how the result tree is output. This may not always be the
+         
+         case.  For example, the result tree may be used as the source tree for
+         
+         another XSLT transformation instead of being output.  An XSLT
+         
+         processor is not required to support disabling output escaping.  If an
+         
+         <code>xsl:value-of</code> or <code>xsl:text</code> specifies that
+         
+         output escaping should be disabled and the XSLT processor does not
+         
+         support this, the XSLT processor may signal an error; if it does not
+         
+         signal an error, it must recover by not disabling output escaping.
+      </p>
+      
+      
+      
+      
+      <p>If output escaping is disabled for a character that is not
+         
+         representable in the encoding that the XSLT processor is using for
+         
+         output, then the XSLT processor may signal an error; if it does not
+         
+         signal an error, it must recover by not disabling output escaping.
+      </p>
+      
+      
+      
+      
+      <p>Since disabling output escaping may not work with all XSLT
+         
+         processors and can result in XML that is not well-formed, it should be
+         
+         used only when there is no alternative.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="conformance"></a>17 Conformance
+      </h2>
+      
+      
+      
+      
+      <p>A conforming XSLT processor must be able to use a stylesheet to
+         
+         transform a source tree into a result tree as specified in this
+         
+         document.  A conforming XSLT processor need not be able to output the
+         
+         result in XML or in any other form.
+      </p>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>Vendors of XSLT processors are strongly encouraged to provide
+         
+         a way to verify that their processor is behaving conformingly by
+         
+         allowing the result tree to be output as XML or by providing access to
+         
+         the result tree through a standard API such as the DOM or
+         
+         SAX.
+      </blockquote>
+      
+      
+      
+      
+      <p>A conforming XSLT processor must signal any errors except for those
+         
+         that this document specifically allows an XSLT processor not to
+         
+         signal. A conforming XSLT processor may but need not recover from any
+         
+         errors that it signals.
+      </p>
+      
+      
+      
+      
+      <p>A conforming XSLT processor may impose limits on the processing
+         
+         resources consumed by the processing of a stylesheet.
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="notation"></a>18 Notation
+      </h2>
+      
+      
+      
+      
+      <p>The specification of each XSLT-defined element type is preceded by
+         
+         a summary of its syntax in the form of a model for elements of that
+         
+         element type.  The meaning of syntax summary notation is as
+         
+         follows:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>An attribute is required if and only if its name is in
+               
+               bold.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The string that occurs in the place of an attribute value
+               
+               specifies the allowed values of the attribute.  If this is surrounded
+               
+               by curly braces, then the attribute value is treated as an <a href="#dt-attribute-value-template">attribute value template</a>,
+               
+               and the string occurring within curly braces specifies the allowed
+               
+               values of the result of instantiating the attribute value template.
+               
+               Alternative allowed values are separated by <code>|</code>.  A quoted
+               
+               string indicates a value equal to that specific string. An unquoted,
+               
+               italicized name specifies a particular type of value.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>If the element is allowed not to be empty, then the element
+               
+               contains a comment specifying the allowed content.  The allowed
+               
+               content is specified in a similar way to an element type declaration
+               
+               in XML; <i>template</i> means that any mixture of text nodes,
+               
+               literal result elements, extension elements, and XSLT elements from
+               
+               the <code>instruction</code> category is allowed;
+               
+               <i>top-level-elements</i> means that any mixture of XSLT
+               
+               elements from the <code>top-level-element</code> category is
+               
+               allowed.
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The element is prefaced by comments indicating if it belongs
+               
+               to the <code>instruction</code> category or
+               
+               <code>top-level-element</code> category or both.  The category of an
+               
+               element just affects whether it is allowed in the content of elements
+               
+               that allow a <i>template</i> or
+               
+               <i>top-level-elements</i>.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <hr title="Separator from footer">
+      
+      
+      
+      
+      <h2><a name="section-References"></a>A References
+      </h2>
+      
+      
+      
+      
+      <h3><a name="section-Normative-References"></a>A.1 Normative References
+      </h3>
+      
+      
+      
+      
+      <dl>
+         
+         
+         
+         
+         <dt><a name="XML">XML</a></dt>
+         <dd>World Wide Web Consortium. <i>Extensible
+               
+               Markup Language (XML) 1.0.
+            </i> W3C Recommendation. See <a href="http://www.w3.org/TR/1998/REC-xml-19980210">http://www.w3.org/TR/1998/REC-xml-19980210</a></dd>
+         
+         
+         
+         
+         <dt><a name="XMLNAMES">XML Names</a></dt>
+         <dd>World Wide Web
+            
+            Consortium. <i>Namespaces in XML.</i> W3C Recommendation. See
+            
+            <a href="http://www.w3.org/TR/REC-xml-names">http://www.w3.org/TR/REC-xml-names</a></dd>
+         
+         
+         
+         
+         <dt><a name="XPATH">XPath</a></dt>
+         <dd>World Wide Web Consortium. <i>XML Path
+               
+               Language.
+            </i> W3C Recommendation. See <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></dd>
+         
+         
+         
+         
+      </dl>
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Other-References"></a>A.2 Other References
+      </h3>
+      
+      
+      
+      
+      <dl>
+         
+         
+         
+         
+         <dt><a name="CSS2">CSS2</a></dt>
+         <dd>World Wide Web Consortium.  <i>Cascading
+               
+               Style Sheets, level 2 (CSS2)
+            </i>.  W3C Recommendation.  See <a href="http://www.w3.org/TR/1998/REC-CSS2-19980512">http://www.w3.org/TR/1998/REC-CSS2-19980512</a></dd>
+         
+         
+         
+         
+         <dt><a name="DSSSL">DSSSL</a></dt>
+         <dd>International Organization
+            
+            for Standardization, International Electrotechnical Commission.
+            
+            <i>ISO/IEC 10179:1996.  Document Style Semantics and Specification
+               
+               Language (DSSSL)
+            </i>.  International Standard.
+         </dd>
+         
+         
+         
+         
+         <dt><a name="HTML">HTML</a></dt>
+         <dd>World Wide Web Consortium. <i>HTML 4.0
+               
+               specification
+            </i>. W3C Recommendation. See <a href="http://www.w3.org/TR/REC-html40">http://www.w3.org/TR/REC-html40</a></dd>
+         
+         
+         
+         
+         <dt><a name="IANA">IANA</a></dt>
+         <dd>Internet Assigned Numbers
+            
+            Authority. <i>Character Sets</i>. See <a href="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</a>.
+         </dd>
+         
+         
+         
+         
+         <dt><a name="RFC2278">RFC2278</a></dt>
+         <dd>N. Freed, J. Postel.  <i>IANA
+               
+               Charset Registration Procedures
+            </i>.  IETF RFC 2278. See <a href="http://www.ietf.org/rfc/rfc2278.txt">http://www.ietf.org/rfc/rfc2278.txt</a>.
+         </dd>
+         
+         
+         
+         
+         <dt><a name="RFC2376">RFC2376</a></dt>
+         <dd>E. Whitehead, M. Murata.  <i>XML
+               
+               Media Types
+            </i>. IETF RFC 2376. See <a href="http://www.ietf.org/rfc/rfc2376.txt">http://www.ietf.org/rfc/rfc2376.txt</a>.
+         </dd>
+         
+         
+         
+         
+         <dt><a name="RFC2396">RFC2396</a></dt>
+         <dd>T. Berners-Lee, R. Fielding, and
+            
+            L. Masinter.  <i>Uniform Resource Identifiers (URI): Generic
+               
+               Syntax
+            </i>. IETF RFC 2396. See <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a>.
+         </dd>
+         
+         
+         
+         
+         <dt><a name="UNICODE-TR10">UNICODE TR10</a></dt>
+         <dd>Unicode Consortium.
+            
+            <i>Unicode Technical Report #10. Unicode Collation
+               
+               Algorithm
+            </i>.  Unicode Technical Report.  See <a href="http://www.unicode.org/unicode/reports/tr10/index.html">http://www.unicode.org/unicode/reports/tr10/index.html</a>.
+         </dd>
+         
+         
+         
+         
+         <dt><a name="XHTML">XHTML</a></dt>
+         <dd>World Wide Web Consortium. <i>XHTML
+               
+               1.0: The Extensible HyperText Markup Language.
+            </i> W3C Proposed
+            
+            Recommendation. See <a href="http://www.w3.org/TR/xhtml1">http://www.w3.org/TR/xhtml1</a></dd>
+         
+         
+         
+         
+         <dt><a name="XPTR">XPointer</a></dt>
+         <dd>World Wide Web
+            
+            Consortium. <i>XML Pointer Language (XPointer).</i> W3C Working
+            
+            Draft. See <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></dd>
+         
+         
+         
+         
+         <dt><a name="XMLSTYLE">XML Stylesheet</a></dt>
+         <dd>World Wide Web
+            
+            Consortium. <i>Associating stylesheets with XML documents.</i>
+            
+            W3C Recommendation. See <a href="http://www.w3.org/TR/xml-stylesheet">http://www.w3.org/TR/xml-stylesheet</a></dd>
+         
+         
+         
+         
+         <dt><a name="XSL">XSL</a></dt>
+         <dd>World Wide Web Consortium.  <i>Extensible
+               
+               Stylesheet Language (XSL).
+            </i>  W3C Working Draft.  See <a href="http://www.w3.org/TR/WD-xsl">http://www.w3.org/TR/WD-xsl</a></dd>
+         
+         
+         
+         
+      </dl>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="element-syntax-summary"></a>B Element Syntax Summary
+      </h2>
+      
+      
+      
+      
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-apply-imports">xsl:apply-imports</a>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-apply-templates">xsl:apply-templates</a><br>&nbsp;&nbsp;select = <var>node-set-expression</var><br>&nbsp;&nbsp;mode = <var>qname</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-sort">xsl:sort</a> | <a href="#element-with-param">xsl:with-param</a>)* --><br>&lt;/xsl:apply-templates>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-attribute">xsl:attribute</a><br>&nbsp;&nbsp;<b>name</b> = { <var>qname</var> }<br>&nbsp;&nbsp;namespace = { <var>uri-reference</var> }><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:attribute>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-attribute-set">xsl:attribute-set</a><br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;use-attribute-sets = <var>qnames</var>><br>&nbsp;&nbsp;&lt;!-- Content: <a href="#element-attribute">xsl:attribute</a>* --><br>&lt;/xsl:attribute-set>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-call-template">xsl:call-template</a><br>&nbsp;&nbsp;<b>name</b> = <var>qname</var>><br>&nbsp;&nbsp;&lt;!-- Content: <a href="#element-with-param">xsl:with-param</a>* --><br>&lt;/xsl:call-template>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-choose">xsl:choose</a>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-when">xsl:when</a>+, <a href="#element-otherwise">xsl:otherwise</a>?) --><br>&lt;/xsl:choose>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-comment">xsl:comment</a>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:comment>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-copy">xsl:copy</a><br>&nbsp;&nbsp;use-attribute-sets = <var>qnames</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:copy>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-copy-of">xsl:copy-of</a><br>&nbsp;&nbsp;<b>select</b> = <var>expression</var>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-decimal-format">xsl:decimal-format</a><br>&nbsp;&nbsp;name = <var>qname</var><br>&nbsp;&nbsp;decimal-separator = <var>char</var><br>&nbsp;&nbsp;grouping-separator = <var>char</var><br>&nbsp;&nbsp;infinity = <var>string</var><br>&nbsp;&nbsp;minus-sign = <var>char</var><br>&nbsp;&nbsp;NaN = <var>string</var><br>&nbsp;&nbsp;percent = <var>char</var><br>&nbsp;&nbsp;per-mille = <var>char</var><br>&nbsp;&nbsp;zero-digit = <var>char</var><br>&nbsp;&nbsp;digit = <var>char</var><br>&nbsp;&nbsp;pattern-separator = <var>char</var>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-element">xsl:element</a><br>&nbsp;&nbsp;<b>name</b> = { <var>qname</var> }<br>&nbsp;&nbsp;namespace = { <var>uri-reference</var> }<br>&nbsp;&nbsp;use-attribute-sets = <var>qnames</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:element>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-fallback">xsl:fallback</a>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:fallback>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-for-each">xsl:for-each</a><br>&nbsp;&nbsp;<b>select</b> = <var>node-set-expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-sort">xsl:sort</a>*, <var>template</var>) --><br>&lt;/xsl:for-each>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-if">xsl:if</a><br>&nbsp;&nbsp;<b>test</b> = <var>boolean-expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:if>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;<a href="#element-import">xsl:import</a><br>&nbsp;&nbsp;<b>href</b> = <var>uri-reference</var>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-include">xsl:include</a><br>&nbsp;&nbsp;<b>href</b> = <var>uri-reference</var>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-key">xsl:key</a><br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;<b>match</b> = <var>pattern</var><br>&nbsp;&nbsp;<b>use</b> = <var>expression</var>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-message">xsl:message</a><br>&nbsp;&nbsp;terminate = "yes" | "no"><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:message>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-namespace-alias">xsl:namespace-alias</a><br>&nbsp;&nbsp;<b>stylesheet-prefix</b> = <var>prefix</var> | "#default"<br>&nbsp;&nbsp;<b>result-prefix</b> = <var>prefix</var> | "#default"&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-number">xsl:number</a><br>&nbsp;&nbsp;level = "single" | "multiple" | "any"<br>&nbsp;&nbsp;count = <var>pattern</var><br>&nbsp;&nbsp;from = <var>pattern</var><br>&nbsp;&nbsp;value = <var>number-expression</var><br>&nbsp;&nbsp;format = { <var>string</var> }<br>&nbsp;&nbsp;lang = { <var>nmtoken</var> }<br>&nbsp;&nbsp;letter-value = { "alphabetic" | "traditional" }<br>&nbsp;&nbsp;grouping-separator = { <var>char</var> }<br>&nbsp;&nbsp;grouping-size = { <var>number</var> }&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;<a href="#element-otherwise">xsl:otherwise</a>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:otherwise>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-output">xsl:output</a><br>&nbsp;&nbsp;method = "xml" | "html" | "text" | <var>qname-but-not-ncname</var><br>&nbsp;&nbsp;version = <var>nmtoken</var><br>&nbsp;&nbsp;encoding = <var>string</var><br>&nbsp;&nbsp;omit-xml-declaration = "yes" | "no"<br>&nbsp;&nbsp;standalone = "yes" | "no"<br>&nbsp;&nbsp;doctype-public = <var>string</var><br>&nbsp;&nbsp;doctype-system = <var>string</var><br>&nbsp;&nbsp;cdata-section-elements = <var>qnames</var><br>&nbsp;&nbsp;indent = "yes" | "no"<br>&nbsp;&nbsp;media-type = <var>string</var>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-param">xsl:param</a><br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;select = <var>expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:param>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-preserve-space">xsl:preserve-space</a><br>&nbsp;&nbsp;<b>elements</b> = <var>tokens</var>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-processing-instruction">xsl:processing-instruction</a><br>&nbsp;&nbsp;<b>name</b> = { <var>ncname</var> }><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:processing-instruction>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;<a href="#element-sort">xsl:sort</a><br>&nbsp;&nbsp;select = <var>string-expression</var><br>&nbsp;&nbsp;lang = { <var>nmtoken</var> }<br>&nbsp;&nbsp;data-type = { "text" | "number" | <var>qname-but-not-ncname</var> }<br>&nbsp;&nbsp;order = { "ascending" | "descending" }<br>&nbsp;&nbsp;case-order = { "upper-first" | "lower-first" }&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-strip-space">xsl:strip-space</a><br>&nbsp;&nbsp;<b>elements</b> = <var>tokens</var>&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;<a href="#element-stylesheet">xsl:stylesheet</a><br>&nbsp;&nbsp;id = <var>id</var><br>&nbsp;&nbsp;extension-element-prefixes = <var>tokens</var><br>&nbsp;&nbsp;exclude-result-prefixes = <var>tokens</var><br>&nbsp;&nbsp;<b>version</b> = <var>number</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-import">xsl:import</a>*, <var>top-level-elements</var>) --><br>&lt;/xsl:stylesheet>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;<a href="#element-template">xsl:template</a><br>&nbsp;&nbsp;match = <var>pattern</var><br>&nbsp;&nbsp;name = <var>qname</var><br>&nbsp;&nbsp;priority = <var>number</var><br>&nbsp;&nbsp;mode = <var>qname</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-param">xsl:param</a>*, <var>template</var>) --><br>&lt;/xsl:template>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-text">xsl:text</a><br>&nbsp;&nbsp;disable-output-escaping = "yes" | "no"><br>&nbsp;&nbsp;&lt;!-- Content: #PCDATA --><br>&lt;/xsl:text>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;<a href="#element-transform">xsl:transform</a><br>&nbsp;&nbsp;id = <var>id</var><br>&nbsp;&nbsp;extension-element-prefixes = <var>tokens</var><br>&nbsp;&nbsp;exclude-result-prefixes = <var>tokens</var><br>&nbsp;&nbsp;<b>version</b> = <var>number</var>><br>&nbsp;&nbsp;&lt;!-- Content: (<a href="#element-import">xsl:import</a>*, <var>top-level-elements</var>) --><br>&lt;/xsl:transform>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: instruction --><br>&lt;<a href="#element-value-of">xsl:value-of</a><br>&nbsp;&nbsp;<b>select</b> = <var>string-expression</var><br>&nbsp;&nbsp;disable-output-escaping = "yes" | "no"&nbsp;/>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;!-- Category: top-level-element --><br>&lt;!-- Category: instruction --><br>&lt;<a href="#element-variable">xsl:variable</a><br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;select = <var>expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:variable>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;<a href="#element-when">xsl:when</a><br>&nbsp;&nbsp;<b>test</b> = <var>boolean-expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:when>
+         </code>
+      </p>
+      <p class="element-syntax-summary"><code>&lt;<a href="#element-with-param">xsl:with-param</a><br>&nbsp;&nbsp;<b>name</b> = <var>qname</var><br>&nbsp;&nbsp;select = <var>expression</var>><br>&nbsp;&nbsp;&lt;!-- Content: <var>template</var> --><br>&lt;/xsl:with-param>
+         </code>
+      </p>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="dtd"></a>C DTD Fragment for XSLT Stylesheets (Non-Normative)
+      </h2>
+      
+      
+      
+      
+      <blockquote><b>NOTE: </b>This DTD Fragment is not normative because XML 1.0 DTDs do
+         
+         not support XML Namespaces and thus cannot correctly describe the
+         
+         allowed structure of an XSLT stylesheet.
+      </blockquote>
+      
+      
+      
+      
+      <p>The following entity can be used to construct a DTD for XSLT
+         
+         stylesheets that create instances of a particular result DTD.  Before
+         
+         referencing the entity, the stylesheet DTD must define a
+         
+         <code>result-elements</code> parameter entity listing the allowed
+         
+         result element types.  For example:
+      </p>
+      
+      
+      
+      <pre>&lt;!ENTITY % result-elements "
+
+  | fo:inline-sequence
+
+  | fo:block
+
+"></pre>
+      
+      
+      
+      <p>Such result elements should be declared to have
+         
+         <code>xsl:use-attribute-sets</code> and
+         
+         <code>xsl:extension-element-prefixes</code> attributes.  The following
+         
+         entity declares the <code>result-element-atts</code> parameter for
+         
+         this purpose. The content that XSLT allows for result elements is the
+         
+         same as it allows for the XSLT elements that are declared in the
+         
+         following entity with a content model of <code>%template;</code>.  The
+         
+         DTD may use a more restrictive content model than
+         
+         <code>%template;</code> to reflect the constraints of the result
+         
+         DTD.
+      </p>
+      
+      
+      
+      
+      <p>The DTD may define the <code>non-xsl-top-level</code> parameter
+         
+         entity to allow additional top-level elements from namespaces other
+         
+         than the XSLT namespace.
+      </p>
+      
+      
+      
+      
+      <p>The use of the <code>xsl:</code> prefix in this DTD does not imply
+         
+         that XSLT stylesheets are required to use this prefix.  Any of the
+         
+         elements declared in this DTD may have attributes whose name starts
+         
+         with <code>xmlns:</code> or is equal to <code>xmlns</code> in addition
+         
+         to the attributes declared in this DTD.
+      </p>
+      
+      
+      
+      <pre>&lt;!ENTITY % char-instructions "
+
+  | xsl:apply-templates
+
+  | xsl:call-template
+
+  | xsl:apply-imports
+
+  | xsl:for-each
+
+  | xsl:value-of
+
+  | xsl:copy-of
+
+  | xsl:number
+
+  | xsl:choose
+
+  | xsl:if
+
+  | xsl:text
+
+  | xsl:copy
+
+  | xsl:variable
+
+  | xsl:message
+
+  | xsl:fallback
+
+">
+
+
+
+&lt;!ENTITY % instructions "
+
+  %char-instructions;
+
+  | xsl:processing-instruction
+
+  | xsl:comment
+
+  | xsl:element
+
+  | xsl:attribute
+
+">
+
+
+
+&lt;!ENTITY % char-template "
+
+ (#PCDATA
+
+  %char-instructions;)*
+
+">
+
+
+
+&lt;!ENTITY % template "
+
+ (#PCDATA
+
+  %instructions;
+
+  %result-elements;)*
+
+">
+
+
+
+&lt;!-- Used for the type of an attribute value that is a URI reference.-->
+
+&lt;!ENTITY % URI "CDATA">
+
+
+
+&lt;!-- Used for the type of an attribute value that is a pattern.-->
+
+&lt;!ENTITY % pattern "CDATA">
+
+
+
+&lt;!-- Used for the type of an attribute value that is an
+
+     attribute value template.-->
+
+&lt;!ENTITY % avt "CDATA">
+
+
+
+&lt;!-- Used for the type of an attribute value that is a QName; the prefix
+
+     gets expanded by the XSLT processor. -->
+
+&lt;!ENTITY % qname "NMTOKEN">
+
+
+
+&lt;!-- Like qname but a whitespace-separated list of QNames. -->
+
+&lt;!ENTITY % qnames "NMTOKENS">
+
+
+
+&lt;!-- Used for the type of an attribute value that is an expression.-->
+
+&lt;!ENTITY % expr "CDATA">
+
+
+
+&lt;!-- Used for the type of an attribute value that consists
+
+     of a single character.-->
+
+&lt;!ENTITY % char "CDATA">
+
+
+
+&lt;!-- Used for the type of an attribute value that is a priority. -->
+
+&lt;!ENTITY % priority "NMTOKEN">
+
+
+
+&lt;!ENTITY % space-att "xml:space (default|preserve) #IMPLIED">
+
+
+
+&lt;!-- This may be overridden to customize the set of elements allowed
+
+at the top-level. -->
+
+
+
+&lt;!ENTITY % non-xsl-top-level "">
+
+
+
+&lt;!ENTITY % top-level "
+
+ (xsl:import*,
+
+  (xsl:include
+
+  | xsl:strip-space
+
+  | xsl:preserve-space
+
+  | xsl:output
+
+  | xsl:key
+
+  | xsl:decimal-format
+
+  | xsl:attribute-set
+
+  | xsl:variable
+
+  | xsl:param
+
+  | xsl:template
+
+  | xsl:namespace-alias
+
+  %non-xsl-top-level;)*)
+
+">
+
+
+
+&lt;!ENTITY % top-level-atts '
+
+  extension-element-prefixes CDATA #IMPLIED
+
+  exclude-result-prefixes CDATA #IMPLIED
+
+  id ID #IMPLIED
+
+  version NMTOKEN #REQUIRED
+
+  xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform"
+
+  %space-att;
+
+'>
+
+
+
+&lt;!-- This entity is defined for use in the ATTLIST declaration
+
+for result elements. -->
+
+
+
+&lt;!ENTITY % result-element-atts '
+
+  xsl:extension-element-prefixes CDATA #IMPLIED
+
+  xsl:exclude-result-prefixes CDATA #IMPLIED
+
+  xsl:use-attribute-sets %qnames; #IMPLIED
+
+  xsl:version NMTOKEN #IMPLIED
+
+'>
+
+
+
+&lt;!ELEMENT xsl:stylesheet %top-level;>
+
+&lt;!ATTLIST xsl:stylesheet %top-level-atts;>
+
+
+
+&lt;!ELEMENT xsl:transform %top-level;>
+
+&lt;!ATTLIST xsl:transform %top-level-atts;>
+
+
+
+&lt;!ELEMENT xsl:import EMPTY>
+
+&lt;!ATTLIST xsl:import href %URI; #REQUIRED>
+
+
+
+&lt;!ELEMENT xsl:include EMPTY>
+
+&lt;!ATTLIST xsl:include href %URI; #REQUIRED>
+
+
+
+&lt;!ELEMENT xsl:strip-space EMPTY>
+
+&lt;!ATTLIST xsl:strip-space elements CDATA #REQUIRED>
+
+
+
+&lt;!ELEMENT xsl:preserve-space EMPTY>
+
+&lt;!ATTLIST xsl:preserve-space elements CDATA #REQUIRED>
+
+
+
+&lt;!ELEMENT xsl:output EMPTY>
+
+&lt;!ATTLIST xsl:output
+
+  method %qname; #IMPLIED
+
+  version NMTOKEN #IMPLIED
+
+  encoding CDATA #IMPLIED
+
+  omit-xml-declaration (yes|no) #IMPLIED
+
+  standalone (yes|no) #IMPLIED
+
+  doctype-public CDATA #IMPLIED
+
+  doctype-system CDATA #IMPLIED
+
+  cdata-section-elements %qnames; #IMPLIED
+
+  indent (yes|no) #IMPLIED
+
+  media-type CDATA #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:key EMPTY>
+
+&lt;!ATTLIST xsl:key
+
+  name %qname; #REQUIRED
+
+  match %pattern; #REQUIRED
+
+  use %expr; #REQUIRED
+
+>
+
+
+
+&lt;!ELEMENT xsl:decimal-format EMPTY>
+
+&lt;!ATTLIST xsl:decimal-format
+
+  name %qname; #IMPLIED
+
+  decimal-separator %char; "."
+
+  grouping-separator %char; ","
+
+  infinity CDATA "Infinity"
+
+  minus-sign %char; "-"
+
+  NaN CDATA "NaN"
+
+  percent %char; "%"
+
+  per-mille %char; "&amp;#x2030;"
+
+  zero-digit %char; "0"
+
+  digit %char; "#"
+
+  pattern-separator %char; ";"
+
+>
+
+
+
+&lt;!ELEMENT xsl:namespace-alias EMPTY>
+
+&lt;!ATTLIST xsl:namespace-alias
+
+  stylesheet-prefix CDATA #REQUIRED
+
+  result-prefix CDATA #REQUIRED
+
+>
+
+
+
+&lt;!ELEMENT xsl:template
+
+ (#PCDATA
+
+  %instructions;
+
+  %result-elements;
+
+  | xsl:param)*
+
+>
+
+
+
+&lt;!ATTLIST xsl:template
+
+  match %pattern; #IMPLIED
+
+  name %qname; #IMPLIED
+
+  priority %priority; #IMPLIED
+
+  mode %qname; #IMPLIED
+
+  %space-att;
+
+>
+
+
+
+&lt;!ELEMENT xsl:value-of EMPTY>
+
+&lt;!ATTLIST xsl:value-of
+
+  select %expr; #REQUIRED
+
+  disable-output-escaping (yes|no) "no"
+
+>
+
+
+
+&lt;!ELEMENT xsl:copy-of EMPTY>
+
+&lt;!ATTLIST xsl:copy-of select %expr; #REQUIRED>
+
+
+
+&lt;!ELEMENT xsl:number EMPTY>
+
+&lt;!ATTLIST xsl:number
+
+   level (single|multiple|any) "single"
+
+   count %pattern; #IMPLIED
+
+   from %pattern; #IMPLIED
+
+   value %expr; #IMPLIED
+
+   format %avt; '1'
+
+   lang %avt; #IMPLIED
+
+   letter-value %avt; #IMPLIED
+
+   grouping-separator %avt; #IMPLIED
+
+   grouping-size %avt; #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*>
+
+&lt;!ATTLIST xsl:apply-templates
+
+  select %expr; "node()"
+
+  mode %qname; #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:apply-imports EMPTY>
+
+
+
+&lt;!-- xsl:sort cannot occur after any other elements or
+
+any non-whitespace character -->
+
+
+
+&lt;!ELEMENT xsl:for-each
+
+ (#PCDATA
+
+  %instructions;
+
+  %result-elements;
+
+  | xsl:sort)*
+
+>
+
+
+
+&lt;!ATTLIST xsl:for-each
+
+  select %expr; #REQUIRED
+
+  %space-att;
+
+>
+
+
+
+&lt;!ELEMENT xsl:sort EMPTY>
+
+&lt;!ATTLIST xsl:sort
+
+  select %expr; "."
+
+  lang %avt; #IMPLIED
+
+  data-type %avt; "text"
+
+  order %avt; "ascending"
+
+  case-order %avt; #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:if %template;>
+
+&lt;!ATTLIST xsl:if
+
+  test %expr; #REQUIRED
+
+  %space-att;
+
+>
+
+
+
+&lt;!ELEMENT xsl:choose (xsl:when+, xsl:otherwise?)>
+
+&lt;!ATTLIST xsl:choose %space-att;>
+
+
+
+&lt;!ELEMENT xsl:when %template;>
+
+&lt;!ATTLIST xsl:when
+
+  test %expr; #REQUIRED
+
+  %space-att;
+
+>
+
+
+
+&lt;!ELEMENT xsl:otherwise %template;>
+
+&lt;!ATTLIST xsl:otherwise %space-att;>
+
+
+
+&lt;!ELEMENT xsl:attribute-set (xsl:attribute)*>
+
+&lt;!ATTLIST xsl:attribute-set
+
+  name %qname; #REQUIRED
+
+  use-attribute-sets %qnames; #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:call-template (xsl:with-param)*>
+
+&lt;!ATTLIST xsl:call-template
+
+  name %qname; #REQUIRED
+
+>
+
+
+
+&lt;!ELEMENT xsl:with-param %template;>
+
+&lt;!ATTLIST xsl:with-param
+
+  name %qname; #REQUIRED
+
+  select %expr; #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:variable %template;>
+
+&lt;!ATTLIST xsl:variable 
+
+  name %qname; #REQUIRED
+
+  select %expr; #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:param %template;>
+
+&lt;!ATTLIST xsl:param 
+
+  name %qname; #REQUIRED
+
+  select %expr; #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:text (#PCDATA)>
+
+&lt;!ATTLIST xsl:text
+
+  disable-output-escaping (yes|no) "no"
+
+>
+
+
+
+&lt;!ELEMENT xsl:processing-instruction %char-template;>
+
+&lt;!ATTLIST xsl:processing-instruction 
+
+  name %avt; #REQUIRED
+
+  %space-att;
+
+>
+
+
+
+&lt;!ELEMENT xsl:element %template;>
+
+&lt;!ATTLIST xsl:element 
+
+  name %avt; #REQUIRED
+
+  namespace %avt; #IMPLIED
+
+  use-attribute-sets %qnames; #IMPLIED
+
+  %space-att;
+
+>
+
+
+
+&lt;!ELEMENT xsl:attribute %char-template;>
+
+&lt;!ATTLIST xsl:attribute 
+
+  name %avt; #REQUIRED
+
+  namespace %avt; #IMPLIED
+
+  %space-att;
+
+>
+
+
+
+&lt;!ELEMENT xsl:comment %char-template;>
+
+&lt;!ATTLIST xsl:comment %space-att;>
+
+
+
+&lt;!ELEMENT xsl:copy %template;>
+
+&lt;!ATTLIST xsl:copy
+
+  %space-att;
+
+  use-attribute-sets %qnames; #IMPLIED
+
+>
+
+
+
+&lt;!ELEMENT xsl:message %template;>
+
+&lt;!ATTLIST xsl:message
+
+  %space-att;
+
+  terminate (yes|no) "no"
+
+>
+
+
+
+&lt;!ELEMENT xsl:fallback %template;>
+
+&lt;!ATTLIST xsl:fallback %space-att;></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Examples"></a>D Examples (Non-Normative)
+      </h2>
+      
+      
+      
+      
+      
+      
+      <h3><a name="section-Document-Example"></a>D.1 Document Example
+      </h3>
+      
+      
+      
+      
+      <p>This example is a stylesheet for transforming documents that
+         
+         conform to a simple DTD into XHTML <a href="#XHTML">[XHTML]</a>.  The DTD
+         
+         is:
+      </p>
+      
+      
+      
+      <pre>&lt;!ELEMENT doc (title, chapter*)>
+
+&lt;!ELEMENT chapter (title, (para|note)*, section*)>
+
+&lt;!ELEMENT section (title, (para|note)*)>
+
+&lt;!ELEMENT title (#PCDATA|emph)*>
+
+&lt;!ELEMENT para (#PCDATA|emph)*>
+
+&lt;!ELEMENT note (#PCDATA|emph)*>
+
+&lt;!ELEMENT emph (#PCDATA|emph)*></pre>
+      
+      
+      
+      <p>The stylesheet is:</p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+                xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+
+
+&lt;xsl:strip-space elements="doc chapter section"/>
+
+&lt;xsl:output
+
+   method="xml"
+
+   indent="yes"
+
+   encoding="iso-8859-1"
+
+/>
+
+
+
+&lt;xsl:template match="doc">
+
+ &lt;html>
+
+   &lt;head>
+
+     &lt;title>
+
+       &lt;xsl:value-of select="title"/>
+
+     &lt;/title>
+
+   &lt;/head>
+
+   &lt;body>
+
+     &lt;xsl:apply-templates/>
+
+   &lt;/body>
+
+ &lt;/html>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="doc/title">
+
+  &lt;h1>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/h1>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="chapter/title">
+
+  &lt;h2>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/h2>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="section/title">
+
+  &lt;h3>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/h3>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="para">
+
+  &lt;p>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/p>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="note">
+
+  &lt;p class="note">
+
+    &lt;b>NOTE: &lt;/b>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/p>
+
+&lt;/xsl:template>
+
+
+
+&lt;xsl:template match="emph">
+
+  &lt;em>
+
+    &lt;xsl:apply-templates/>
+
+  &lt;/em>
+
+&lt;/xsl:template>
+
+
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <p>With the following input document</p>
+      
+      
+      
+      <pre>&lt;!DOCTYPE doc SYSTEM "doc.dtd">
+
+&lt;doc>
+
+&lt;title>Document Title&lt;/title>
+
+&lt;chapter>
+
+&lt;title>Chapter Title&lt;/title>
+
+&lt;section>
+
+&lt;title>Section Title&lt;/title>
+
+&lt;para>This is a test.&lt;/para>
+
+&lt;note>This is a note.&lt;/note>
+
+&lt;/section>
+
+&lt;section>
+
+&lt;title>Another Section Title&lt;/title>
+
+&lt;para>This is &lt;emph>another&lt;/emph> test.&lt;/para>
+
+&lt;note>This is another note.&lt;/note>
+
+&lt;/section>
+
+&lt;/chapter>
+
+&lt;/doc></pre>
+      
+      
+      
+      <p>it would produce the following result</p>
+      
+      
+      
+      <pre>&lt;?xml version="1.0" encoding="iso-8859-1"?>
+
+&lt;html xmlns="http://www.w3.org/TR/xhtml1/strict">
+
+&lt;head>
+
+&lt;title>Document Title&lt;/title>
+
+&lt;/head>
+
+&lt;body>
+
+&lt;h1>Document Title&lt;/h1>
+
+&lt;h2>Chapter Title&lt;/h2>
+
+&lt;h3>Section Title&lt;/h3>
+
+&lt;p>This is a test.&lt;/p>
+
+&lt;p class="note">
+
+&lt;b>NOTE: &lt;/b>This is a note.&lt;/p>
+
+&lt;h3>Another Section Title&lt;/h3>
+
+&lt;p>This is &lt;em>another&lt;/em> test.&lt;/p>
+
+&lt;p class="note">
+
+&lt;b>NOTE: &lt;/b>This is another note.&lt;/p>
+
+&lt;/body>
+
+&lt;/html></pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h3><a name="data-example"></a>D.2 Data Example
+      </h3>
+      
+      
+      
+      
+      <p>This is an example of transforming some data represented in XML
+         
+         using three different XSLT stylesheets to produce three different
+         
+         representations of the data, HTML, SVG and VRML.
+      </p>
+      
+      
+      
+      
+      <p>The input data is:</p>
+      
+      
+      
+      <pre>&lt;sales>
+
+
+
+        &lt;division id="North">
+
+                &lt;revenue>10&lt;/revenue>
+
+                &lt;growth>9&lt;/growth>
+
+                &lt;bonus>7&lt;/bonus>
+
+        &lt;/division>
+
+
+
+        &lt;division id="South">
+
+                &lt;revenue>4&lt;/revenue>
+
+                &lt;growth>3&lt;/growth>
+
+                &lt;bonus>4&lt;/bonus>
+
+        &lt;/division>
+
+
+
+        &lt;division id="West">
+
+                &lt;revenue>6&lt;/revenue>
+
+                &lt;growth>-1.5&lt;/growth>
+
+                &lt;bonus>2&lt;/bonus>
+
+        &lt;/division>
+
+
+
+&lt;/sales></pre>
+      
+      
+      
+      <p>The following stylesheet, which uses the simplified syntax
+         
+         described in <a href="#result-element-stylesheet">[<b>2.3 Literal Result Element as Stylesheet</b>]
+         </a>, transforms
+         
+         the data into HTML:
+      </p>
+      
+      
+      
+      <pre>&lt;html xsl:version="1.0"
+
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+      lang="en">
+
+    &lt;head>
+
+	&lt;title>Sales Results By Division&lt;/title>
+
+    &lt;/head>
+
+    &lt;body>
+
+	&lt;table border="1">
+
+	    &lt;tr>
+
+		&lt;th>Division&lt;/th>
+
+		&lt;th>Revenue&lt;/th>
+
+		&lt;th>Growth&lt;/th>
+
+		&lt;th>Bonus&lt;/th>
+
+	    &lt;/tr>
+
+	    &lt;xsl:for-each select="sales/division">
+
+		&lt;!-- order the result by revenue -->
+
+		&lt;xsl:sort select="revenue"
+
+			  data-type="number"
+
+			  order="descending"/>
+
+		&lt;tr>
+
+		    &lt;td>
+
+			&lt;em>&lt;xsl:value-of select="@id"/>&lt;/em>
+
+		    &lt;/td>
+
+		    &lt;td>
+
+			&lt;xsl:value-of select="revenue"/>
+
+		    &lt;/td>
+
+		    &lt;td>
+
+			&lt;!-- highlight negative growth in red -->
+
+			&lt;xsl:if test="growth &amp;lt; 0">
+
+			     &lt;xsl:attribute name="style">
+
+				 &lt;xsl:text>color:red&lt;/xsl:text>
+
+			     &lt;/xsl:attribute>
+
+			&lt;/xsl:if>
+
+			&lt;xsl:value-of select="growth"/>
+
+		    &lt;/td>
+
+		    &lt;td>
+
+			&lt;xsl:value-of select="bonus"/>
+
+		    &lt;/td>
+
+		&lt;/tr>
+
+	    &lt;/xsl:for-each>
+
+	&lt;/table>
+
+    &lt;/body>
+
+&lt;/html></pre>
+      
+      
+      
+      <p>The HTML output is:</p>
+      
+      
+      
+      <pre>&lt;html lang="en">
+
+&lt;head>
+
+&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+&lt;title>Sales Results By Division&lt;/title>
+
+&lt;/head>
+
+&lt;body>
+
+&lt;table border="1">
+
+&lt;tr>
+
+&lt;th>Division&lt;/th>&lt;th>Revenue&lt;/th>&lt;th>Growth&lt;/th>&lt;th>Bonus&lt;/th>
+
+&lt;/tr>
+
+&lt;tr>
+
+&lt;td>&lt;em>North&lt;/em>&lt;/td>&lt;td>10&lt;/td>&lt;td>9&lt;/td>&lt;td>7&lt;/td>
+
+&lt;/tr>
+
+&lt;tr>
+
+&lt;td>&lt;em>West&lt;/em>&lt;/td>&lt;td>6&lt;/td>&lt;td style="color:red">-1.5&lt;/td>&lt;td>2&lt;/td>
+
+&lt;/tr>
+
+&lt;tr>
+
+&lt;td>&lt;em>South&lt;/em>&lt;/td>&lt;td>4&lt;/td>&lt;td>3&lt;/td>&lt;td>4&lt;/td>
+
+&lt;/tr>
+
+&lt;/table>
+
+&lt;/body>
+
+&lt;/html></pre>
+      
+      
+      
+      <p>The following stylesheet transforms the data into SVG:</p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+                xmlns="http://www.w3.org/Graphics/SVG/SVG-19990812.dtd">
+
+
+
+&lt;xsl:output method="xml" indent="yes" media-type="image/svg"/>
+
+
+
+&lt;xsl:template match="/">
+
+
+
+&lt;svg width = "3in" height="3in">
+
+    &lt;g style = "stroke: #000000"> 
+
+        &lt;!-- draw the axes -->
+
+        &lt;line x1="0" x2="150" y1="150" y2="150"/>
+
+        &lt;line x1="0" x2="0" y1="0" y2="150"/>
+
+        &lt;text x="0" y="10">Revenue&lt;/text>
+
+        &lt;text x="150" y="165">Division&lt;/text>
+
+        &lt;xsl:for-each select="sales/division">
+
+	    &lt;!-- define some useful variables -->
+
+
+
+	    &lt;!-- the bar's x position -->
+
+	    &lt;xsl:variable name="pos"
+
+	                  select="(position()*40)-30"/>
+
+
+
+	    &lt;!-- the bar's height -->
+
+	    &lt;xsl:variable name="height"
+
+	                  select="revenue*10"/>
+
+
+
+	    &lt;!-- the rectangle -->
+
+	    &lt;rect x="{$pos}" y="{150-$height}"
+
+                  width="20" height="{$height}"/>
+
+
+
+	    &lt;!-- the text label -->
+
+	    &lt;text x="{$pos}" y="165">
+
+	        &lt;xsl:value-of select="@id"/>
+
+	    &lt;/text> 
+
+
+
+	    &lt;!-- the bar value -->
+
+	    &lt;text x="{$pos}" y="{145-$height}">
+
+	        &lt;xsl:value-of select="revenue"/>
+
+	    &lt;/text>
+
+        &lt;/xsl:for-each>
+
+    &lt;/g>
+
+&lt;/svg>
+
+
+
+&lt;/xsl:template>
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <p>The SVG output is:</p>
+      
+      
+      
+      <pre>&lt;svg width="3in" height="3in"
+
+     xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
+
+    &lt;g style="stroke: #000000">
+
+	&lt;line x1="0" x2="150" y1="150" y2="150"/>
+
+	&lt;line x1="0" x2="0" y1="0" y2="150"/>
+
+	&lt;text x="0" y="10">Revenue&lt;/text>
+
+	&lt;text x="150" y="165">Division&lt;/text>
+
+	&lt;rect x="10" y="50" width="20" height="100"/>
+
+	&lt;text x="10" y="165">North&lt;/text>
+
+	&lt;text x="10" y="45">10&lt;/text>
+
+	&lt;rect x="50" y="110" width="20" height="40"/>
+
+	&lt;text x="50" y="165">South&lt;/text>
+
+	&lt;text x="50" y="105">4&lt;/text>
+
+	&lt;rect x="90" y="90" width="20" height="60"/>
+
+	&lt;text x="90" y="165">West&lt;/text>
+
+	&lt;text x="90" y="85">6&lt;/text>
+
+    &lt;/g>
+
+&lt;/svg></pre>
+      
+      
+      
+      <p>The following stylesheet transforms the data into VRML:</p>
+      
+      
+      
+      <pre>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+
+&lt;!-- generate text output as mime type model/vrml, using default charset -->
+
+&lt;xsl:output method="text" encoding="UTF-8" media-type="model/vrml"/>  
+
+
+
+        &lt;xsl:template match="/">#VRML V2.0 utf8 
+
+ 
+
+# externproto definition of a single bar element 
+
+EXTERNPROTO bar [ 
+
+  field SFInt32 x  
+
+  field SFInt32 y  
+
+  field SFInt32 z  
+
+  field SFString name  
+
+  ] 
+
+  "http://www.vrml.org/WorkingGroups/dbwork/barProto.wrl" 
+
+ 
+
+# inline containing the graph axes 
+
+Inline {  
+
+        url "http://www.vrml.org/WorkingGroups/dbwork/barAxes.wrl" 
+
+        } 
+
+        
+
+                &lt;xsl:for-each select="sales/division">
+
+bar {
+
+        x &lt;xsl:value-of select="revenue"/>
+
+        y &lt;xsl:value-of select="growth"/>
+
+        z &lt;xsl:value-of select="bonus"/>
+
+        name "&lt;xsl:value-of select="@id"/>" 
+
+        }
+
+                &lt;/xsl:for-each>
+
+        
+
+        &lt;/xsl:template> 
+
+ 
+
+&lt;/xsl:stylesheet></pre>
+      
+      
+      
+      <p>The VRML output is:</p>
+      
+      
+      
+      <pre>#VRML V2.0 utf8 
+
+ 
+
+# externproto definition of a single bar element 
+
+EXTERNPROTO bar [ 
+
+  field SFInt32 x  
+
+  field SFInt32 y  
+
+  field SFInt32 z  
+
+  field SFString name  
+
+  ] 
+
+  "http://www.vrml.org/WorkingGroups/dbwork/barProto.wrl" 
+
+ 
+
+# inline containing the graph axes 
+
+Inline {  
+
+        url "http://www.vrml.org/WorkingGroups/dbwork/barAxes.wrl" 
+
+        } 
+
+        
+
+                
+
+bar {
+
+        x 10
+
+        y 9
+
+        z 7
+
+        name "North" 
+
+        }
+
+                
+
+bar {
+
+        x 4
+
+        y 3
+
+        z 4
+
+        name "South" 
+
+        }
+
+                
+
+bar {
+
+        x 6
+
+        y -1.5
+
+        z 2
+
+        name "West" 
+
+        }</pre>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Acknowledgements"></a>E Acknowledgements (Non-Normative)
+      </h2>
+      
+      
+      <p>The following have contributed to authoring this draft:</p>
+      
+      
+      <ul>
+         
+         
+         <li>Daniel Lipkin, Saba</li>
+         
+         
+         <li>Jonathan Marsh, Microsoft</li>
+         
+         
+         <li>Henry Thompson, University of Edinburgh</li>
+         
+         
+         <li>Norman Walsh, Arbortext</li>
+         
+         
+         <li>Steve Zilles, Adobe</li>
+         
+         
+      </ul>
+      
+      
+      
+      
+      <p>This specification was developed and approved for publication by the
+         
+         W3C XSL Working Group (WG). WG approval of this specification does not
+         
+         necessarily imply that all WG members voted for its approval. The
+         
+         current members of the XSL WG are:
+      </p>
+      
+      
+      
+      Sharon Adler, IBM (Co-Chair); Anders Berglund, IBM; Perin Blanchard, Novell; Scott Boag, Lotus; Larry Cable, Sun; Jeff Caruso, Bitstream; James Clark; Peter Danielsen, Bell Labs; Don Day, IBM; Stephen Deach, Adobe; Dwayne Dicks, SoftQuad; Andrew Greene, Bitstream; Paul Grosso, Arbortext; Eduardo Gutentag, Sun; Juliane Harbarth, Software AG; Mickey Kimchi, Enigma; Chris Lilley, W3C; Chris Maden, Exemplary Technologies; Jonathan Marsh, Microsoft; Alex Milowski, Lexica; Steve Muench, Oracle; Scott Parnell, Xerox; Vincent Quint, W3C; Dan Rapp, Novell; Gregg Reynolds, Datalogics; Jonathan Robie, Software AG; Mark Scardina, Oracle; Henry Thompson, University of Edinburgh; Philip Wadler, Bell Labs; Norman Walsh, Arbortext; Sanjiva Weerawarana, IBM; Steve Zilles, Adobe (Co-Chair)
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Changes-from-Proposed-Recommendation"></a>F Changes from Proposed Recommendation (Non-Normative)
+      </h2>
+      
+      
+      
+      
+      <p>The following are the changes since the Proposed Recommendation:</p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>The <code>xsl:version</code> attribute is required on a
+               
+               literal result element used as a stylesheet (see <a href="#result-element-stylesheet">[<b>2.3 Literal Result Element as Stylesheet</b>]
+               </a>).
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>The <code>data-type</code> attribute on <code>xsl:sort</code>
+               
+               can use a prefixed name to specify a data-type not defined by
+               
+               XSLT (see <a href="#sorting">[<b>10 Sorting</b>]
+               </a>).
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      <h2><a name="section-Features-under-Consideration-for-Future-Versions-of-XSLT"></a>G Features under Consideration for Future Versions of XSLT (Non-Normative)
+      </h2>
+      
+      
+      
+      
+      <p>The following features are under consideration for versions of XSLT
+         
+         after XSLT 1.0:
+      </p>
+      
+      
+      
+      
+      <ul>
+         
+         
+         
+         
+         <li>
+            <p>a conditional expression;</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>support for XML Schema datatypes and archetypes;</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>support for something like style rules in the original XSL
+               
+               submission;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>an attribute to control the default namespace for names
+               
+               occurring in XSLT attributes;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>support for entity references;</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>support for DTDs in the data model;</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>support for notations in the data model;</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>a way to get back from an element to the elements that
+               
+               reference it (e.g. by IDREF attributes);
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>an easier way to get an ID or key in another document;</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>support for regular expressions for matching against any or
+               
+               all of text nodes, attribute values, attribute names, element type
+               
+               names;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>case-insensitive comparisons;</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>normalization of strings before comparison, for example for
+               
+               compatibility characters;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>a function <code>string resolve(node-set)</code> function
+               
+               that treats the value of the argument as a relative URI and turns it
+               
+               into an absolute URI using the base URI of the node;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>multiple result documents;</p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>defaulting the <code>select</code> attribute on
+               
+               <code>xsl:value-of</code> to the current node;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>an attribute on <code>xsl:attribute</code> to control how the
+               
+               attribute value is normalized;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>additional attributes on <code>xsl:sort</code> to provide
+               
+               further control over sorting, such as relative order of
+               
+               scripts;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>a way to put the text of a resource identified by a URI into
+               
+               the result tree;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>allow unions in steps (e.g. <code>foo/(bar|baz)</code>);
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>allow for result tree fragments all operations that are
+               
+               allowed for node-sets;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>a way to group together consecutive nodes having duplicate
+               
+               subelements or attributes;
+            </p>
+         </li>
+         
+         
+         
+         
+         <li>
+            <p>features to make handling of the HTML <code>style</code>
+               
+               attribute more convenient.
+            </p>
+         </li>
+         
+         
+         
+         
+      </ul>
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk057.out b/test/tests/contrib-gold/xsltc/mk/mk057.out
new file mode 100644
index 0000000..e426177
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk057.out
@@ -0,0 +1,95 @@
+
+<html>
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <title>Knight's tour</title>
+   </head>
+   <body>
+      <div align="center">
+         <h1>Knight's tour starting at a1</h1>
+         <table border="1" cellpadding="4">
+            <tr>
+               <td align="center" bgcolor="white">36</td>
+               <td align="center" bgcolor="xffff44">19</td>
+               <td align="center" bgcolor="white">22</td>
+               <td align="center" bgcolor="xffff44">05</td>
+               <td align="center" bgcolor="white">38</td>
+               <td align="center" bgcolor="xffff44">09</td>
+               <td align="center" bgcolor="white">24</td>
+               <td align="center" bgcolor="xffff44">07</td>
+            </tr>
+            <tr>
+               <td align="center" bgcolor="xffff44">21</td>
+               <td align="center" bgcolor="white">04</td>
+               <td align="center" bgcolor="xffff44">37</td>
+               <td align="center" bgcolor="white">42</td>
+               <td align="center" bgcolor="xffff44">23</td>
+               <td align="center" bgcolor="white">06</td>
+               <td align="center" bgcolor="xffff44">39</td>
+               <td align="center" bgcolor="white">10</td>
+            </tr>
+            <tr>
+               <td align="center" bgcolor="white">18</td>
+               <td align="center" bgcolor="xffff44">35</td>
+               <td align="center" bgcolor="white">20</td>
+               <td align="center" bgcolor="xffff44">49</td>
+               <td align="center" bgcolor="white">44</td>
+               <td align="center" bgcolor="xffff44">41</td>
+               <td align="center" bgcolor="white">08</td>
+               <td align="center" bgcolor="xffff44">25</td>
+            </tr>
+            <tr>
+               <td align="center" bgcolor="xffff44">03</td>
+               <td align="center" bgcolor="white">50</td>
+               <td align="center" bgcolor="xffff44">43</td>
+               <td align="center" bgcolor="white">46</td>
+               <td align="center" bgcolor="xffff44">55</td>
+               <td align="center" bgcolor="white">62</td>
+               <td align="center" bgcolor="xffff44">11</td>
+               <td align="center" bgcolor="white">40</td>
+            </tr>
+            <tr>
+               <td align="center" bgcolor="white">34</td>
+               <td align="center" bgcolor="xffff44">17</td>
+               <td align="center" bgcolor="white">54</td>
+               <td align="center" bgcolor="xffff44">59</td>
+               <td align="center" bgcolor="white">48</td>
+               <td align="center" bgcolor="xffff44">45</td>
+               <td align="center" bgcolor="white">26</td>
+               <td align="center" bgcolor="xffff44">63</td>
+            </tr>
+            <tr>
+               <td align="center" bgcolor="xffff44">51</td>
+               <td align="center" bgcolor="white">02</td>
+               <td align="center" bgcolor="xffff44">47</td>
+               <td align="center" bgcolor="white">56</td>
+               <td align="center" bgcolor="xffff44">61</td>
+               <td align="center" bgcolor="white">58</td>
+               <td align="center" bgcolor="xffff44">29</td>
+               <td align="center" bgcolor="white">12</td>
+            </tr>
+            <tr>
+               <td align="center" bgcolor="white">16</td>
+               <td align="center" bgcolor="xffff44">33</td>
+               <td align="center" bgcolor="white">60</td>
+               <td align="center" bgcolor="xffff44">53</td>
+               <td align="center" bgcolor="white">14</td>
+               <td align="center" bgcolor="xffff44">31</td>
+               <td align="center" bgcolor="white">64</td>
+               <td align="center" bgcolor="xffff44">27</td>
+            </tr>
+            <tr>
+               <td align="center" bgcolor="xffff44">01</td>
+               <td align="center" bgcolor="white">52</td>
+               <td align="center" bgcolor="xffff44">15</td>
+               <td align="center" bgcolor="white">32</td>
+               <td align="center" bgcolor="xffff44">57</td>
+               <td align="center" bgcolor="white">28</td>
+               <td align="center" bgcolor="xffff44">13</td>
+               <td align="center" bgcolor="white">30</td>
+            </tr>
+         </table>
+      </div>
+   </body>
+</html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/mk/mk062.out b/test/tests/contrib-gold/xsltc/mk/mk062.out
new file mode 100644
index 0000000..830170f
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/mk/mk062.out
@@ -0,0 +1,10 @@
+
+Title,Author,Category
+"Number, the Language of Science","Danzig","S(Science)"
+"Tales of Grandpa Cat","Wardlaw, Lee","F(Fiction)"
+"Language & the Science of Number","Danzig","S(Science)"
+"Evolution of Complexity in Animal Culture","Bonner","S(Science)"
+"Patterns of Crime in Animal Culture","Bonner","X(Crime)"
+"When We Were Very Young","Milne, A. A.","F(Fiction)"
+"Learn Java Now","Stephen R. Davis","C(Computing)"
+"Design Patterns","Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides","U(Unclassified)"
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/SQLjoin.out b/test/tests/contrib-gold/xsltc/schemasoft/SQLjoin.out
new file mode 100644
index 0000000..cc0515b
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/SQLjoin.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+<orders>
+ my_reference
+</orders><customer id="c1">
+ <name>Dupont</name>
+</customer>
+
+
+</root>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/XMLSchema2cplusplus.out b/test/tests/contrib-gold/xsltc/schemasoft/XMLSchema2cplusplus.out
new file mode 100644
index 0000000..984aff3
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/XMLSchema2cplusplus.out
@@ -0,0 +1,34 @@
+
+typedef int integer;
+   
+class genericMessage
+{
+  
+};
+
+class genericField
+{
+  
+};
+
+class InstrumentType : public genericField
+{
+  string content;
+  
+};
+
+class CounterParty : public genericField
+{
+  string content;
+  
+};
+
+class enquiry : public genericMessage
+{
+  bm:InstrumentType InstrumentType ;
+bm:CounterParty CounterParty ;
+
+};
+
+  no_type_specified 
+  bizmess ;
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/attributes2elements.out b/test/tests/contrib-gold/xsltc/schemasoft/attributes2elements.out
new file mode 100644
index 0000000..079ce73
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/attributes2elements.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<a><b><href>hrefIn_b-1rstLevel</href><d/></b><c><d/><g><href>hrefIn_g-2ndLevel</href></g></c><e/><f><g><d/></g></f></a>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/bottles.out b/test/tests/contrib-gold/xsltc/schemasoft/bottles.out
new file mode 100644
index 0000000..9373163
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/bottles.out
@@ -0,0 +1,497 @@
+
+
+99 bottles of beer on the wall,
+99 bottles of beer,
+You take one down, pass it around,
+98.0 bottles of beer on the wall.
+
+98.0 bottles of beer on the wall,
+98.0 bottles of beer,
+You take one down, pass it around,
+97.0 bottles of beer on the wall.
+
+97.0 bottles of beer on the wall,
+97.0 bottles of beer,
+You take one down, pass it around,
+96.0 bottles of beer on the wall.
+
+96.0 bottles of beer on the wall,
+96.0 bottles of beer,
+You take one down, pass it around,
+95.0 bottles of beer on the wall.
+
+95.0 bottles of beer on the wall,
+95.0 bottles of beer,
+You take one down, pass it around,
+94.0 bottles of beer on the wall.
+
+94.0 bottles of beer on the wall,
+94.0 bottles of beer,
+You take one down, pass it around,
+93.0 bottles of beer on the wall.
+
+93.0 bottles of beer on the wall,
+93.0 bottles of beer,
+You take one down, pass it around,
+92.0 bottles of beer on the wall.
+
+92.0 bottles of beer on the wall,
+92.0 bottles of beer,
+You take one down, pass it around,
+91.0 bottles of beer on the wall.
+
+91.0 bottles of beer on the wall,
+91.0 bottles of beer,
+You take one down, pass it around,
+90.0 bottles of beer on the wall.
+
+90.0 bottles of beer on the wall,
+90.0 bottles of beer,
+You take one down, pass it around,
+89.0 bottles of beer on the wall.
+
+89.0 bottles of beer on the wall,
+89.0 bottles of beer,
+You take one down, pass it around,
+88.0 bottles of beer on the wall.
+
+88.0 bottles of beer on the wall,
+88.0 bottles of beer,
+You take one down, pass it around,
+87.0 bottles of beer on the wall.
+
+87.0 bottles of beer on the wall,
+87.0 bottles of beer,
+You take one down, pass it around,
+86.0 bottles of beer on the wall.
+
+86.0 bottles of beer on the wall,
+86.0 bottles of beer,
+You take one down, pass it around,
+85.0 bottles of beer on the wall.
+
+85.0 bottles of beer on the wall,
+85.0 bottles of beer,
+You take one down, pass it around,
+84.0 bottles of beer on the wall.
+
+84.0 bottles of beer on the wall,
+84.0 bottles of beer,
+You take one down, pass it around,
+83.0 bottles of beer on the wall.
+
+83.0 bottles of beer on the wall,
+83.0 bottles of beer,
+You take one down, pass it around,
+82.0 bottles of beer on the wall.
+
+82.0 bottles of beer on the wall,
+82.0 bottles of beer,
+You take one down, pass it around,
+81.0 bottles of beer on the wall.
+
+81.0 bottles of beer on the wall,
+81.0 bottles of beer,
+You take one down, pass it around,
+80.0 bottles of beer on the wall.
+
+80.0 bottles of beer on the wall,
+80.0 bottles of beer,
+You take one down, pass it around,
+79.0 bottles of beer on the wall.
+
+79.0 bottles of beer on the wall,
+79.0 bottles of beer,
+You take one down, pass it around,
+78.0 bottles of beer on the wall.
+
+78.0 bottles of beer on the wall,
+78.0 bottles of beer,
+You take one down, pass it around,
+77.0 bottles of beer on the wall.
+
+77.0 bottles of beer on the wall,
+77.0 bottles of beer,
+You take one down, pass it around,
+76.0 bottles of beer on the wall.
+
+76.0 bottles of beer on the wall,
+76.0 bottles of beer,
+You take one down, pass it around,
+75.0 bottles of beer on the wall.
+
+75.0 bottles of beer on the wall,
+75.0 bottles of beer,
+You take one down, pass it around,
+74.0 bottles of beer on the wall.
+
+74.0 bottles of beer on the wall,
+74.0 bottles of beer,
+You take one down, pass it around,
+73.0 bottles of beer on the wall.
+
+73.0 bottles of beer on the wall,
+73.0 bottles of beer,
+You take one down, pass it around,
+72.0 bottles of beer on the wall.
+
+72.0 bottles of beer on the wall,
+72.0 bottles of beer,
+You take one down, pass it around,
+71.0 bottles of beer on the wall.
+
+71.0 bottles of beer on the wall,
+71.0 bottles of beer,
+You take one down, pass it around,
+70.0 bottles of beer on the wall.
+
+70.0 bottles of beer on the wall,
+70.0 bottles of beer,
+You take one down, pass it around,
+69.0 bottles of beer on the wall.
+
+69.0 bottles of beer on the wall,
+69.0 bottles of beer,
+You take one down, pass it around,
+68.0 bottles of beer on the wall.
+
+68.0 bottles of beer on the wall,
+68.0 bottles of beer,
+You take one down, pass it around,
+67.0 bottles of beer on the wall.
+
+67.0 bottles of beer on the wall,
+67.0 bottles of beer,
+You take one down, pass it around,
+66.0 bottles of beer on the wall.
+
+66.0 bottles of beer on the wall,
+66.0 bottles of beer,
+You take one down, pass it around,
+65.0 bottles of beer on the wall.
+
+65.0 bottles of beer on the wall,
+65.0 bottles of beer,
+You take one down, pass it around,
+64.0 bottles of beer on the wall.
+
+64.0 bottles of beer on the wall,
+64.0 bottles of beer,
+You take one down, pass it around,
+63.0 bottles of beer on the wall.
+
+63.0 bottles of beer on the wall,
+63.0 bottles of beer,
+You take one down, pass it around,
+62.0 bottles of beer on the wall.
+
+62.0 bottles of beer on the wall,
+62.0 bottles of beer,
+You take one down, pass it around,
+61.0 bottles of beer on the wall.
+
+61.0 bottles of beer on the wall,
+61.0 bottles of beer,
+You take one down, pass it around,
+60.0 bottles of beer on the wall.
+
+60.0 bottles of beer on the wall,
+60.0 bottles of beer,
+You take one down, pass it around,
+59.0 bottles of beer on the wall.
+
+59.0 bottles of beer on the wall,
+59.0 bottles of beer,
+You take one down, pass it around,
+58.0 bottles of beer on the wall.
+
+58.0 bottles of beer on the wall,
+58.0 bottles of beer,
+You take one down, pass it around,
+57.0 bottles of beer on the wall.
+
+57.0 bottles of beer on the wall,
+57.0 bottles of beer,
+You take one down, pass it around,
+56.0 bottles of beer on the wall.
+
+56.0 bottles of beer on the wall,
+56.0 bottles of beer,
+You take one down, pass it around,
+55.0 bottles of beer on the wall.
+
+55.0 bottles of beer on the wall,
+55.0 bottles of beer,
+You take one down, pass it around,
+54.0 bottles of beer on the wall.
+
+54.0 bottles of beer on the wall,
+54.0 bottles of beer,
+You take one down, pass it around,
+53.0 bottles of beer on the wall.
+
+53.0 bottles of beer on the wall,
+53.0 bottles of beer,
+You take one down, pass it around,
+52.0 bottles of beer on the wall.
+
+52.0 bottles of beer on the wall,
+52.0 bottles of beer,
+You take one down, pass it around,
+51.0 bottles of beer on the wall.
+
+51.0 bottles of beer on the wall,
+51.0 bottles of beer,
+You take one down, pass it around,
+50.0 bottles of beer on the wall.
+
+50.0 bottles of beer on the wall,
+50.0 bottles of beer,
+You take one down, pass it around,
+49.0 bottles of beer on the wall.
+
+49.0 bottles of beer on the wall,
+49.0 bottles of beer,
+You take one down, pass it around,
+48.0 bottles of beer on the wall.
+
+48.0 bottles of beer on the wall,
+48.0 bottles of beer,
+You take one down, pass it around,
+47.0 bottles of beer on the wall.
+
+47.0 bottles of beer on the wall,
+47.0 bottles of beer,
+You take one down, pass it around,
+46.0 bottles of beer on the wall.
+
+46.0 bottles of beer on the wall,
+46.0 bottles of beer,
+You take one down, pass it around,
+45.0 bottles of beer on the wall.
+
+45.0 bottles of beer on the wall,
+45.0 bottles of beer,
+You take one down, pass it around,
+44.0 bottles of beer on the wall.
+
+44.0 bottles of beer on the wall,
+44.0 bottles of beer,
+You take one down, pass it around,
+43.0 bottles of beer on the wall.
+
+43.0 bottles of beer on the wall,
+43.0 bottles of beer,
+You take one down, pass it around,
+42.0 bottles of beer on the wall.
+
+42.0 bottles of beer on the wall,
+42.0 bottles of beer,
+You take one down, pass it around,
+41.0 bottles of beer on the wall.
+
+41.0 bottles of beer on the wall,
+41.0 bottles of beer,
+You take one down, pass it around,
+40.0 bottles of beer on the wall.
+
+40.0 bottles of beer on the wall,
+40.0 bottles of beer,
+You take one down, pass it around,
+39.0 bottles of beer on the wall.
+
+39.0 bottles of beer on the wall,
+39.0 bottles of beer,
+You take one down, pass it around,
+38.0 bottles of beer on the wall.
+
+38.0 bottles of beer on the wall,
+38.0 bottles of beer,
+You take one down, pass it around,
+37.0 bottles of beer on the wall.
+
+37.0 bottles of beer on the wall,
+37.0 bottles of beer,
+You take one down, pass it around,
+36.0 bottles of beer on the wall.
+
+36.0 bottles of beer on the wall,
+36.0 bottles of beer,
+You take one down, pass it around,
+35.0 bottles of beer on the wall.
+
+35.0 bottles of beer on the wall,
+35.0 bottles of beer,
+You take one down, pass it around,
+34.0 bottles of beer on the wall.
+
+34.0 bottles of beer on the wall,
+34.0 bottles of beer,
+You take one down, pass it around,
+33.0 bottles of beer on the wall.
+
+33.0 bottles of beer on the wall,
+33.0 bottles of beer,
+You take one down, pass it around,
+32.0 bottles of beer on the wall.
+
+32.0 bottles of beer on the wall,
+32.0 bottles of beer,
+You take one down, pass it around,
+31.0 bottles of beer on the wall.
+
+31.0 bottles of beer on the wall,
+31.0 bottles of beer,
+You take one down, pass it around,
+30.0 bottles of beer on the wall.
+
+30.0 bottles of beer on the wall,
+30.0 bottles of beer,
+You take one down, pass it around,
+29.0 bottles of beer on the wall.
+
+29.0 bottles of beer on the wall,
+29.0 bottles of beer,
+You take one down, pass it around,
+28.0 bottles of beer on the wall.
+
+28.0 bottles of beer on the wall,
+28.0 bottles of beer,
+You take one down, pass it around,
+27.0 bottles of beer on the wall.
+
+27.0 bottles of beer on the wall,
+27.0 bottles of beer,
+You take one down, pass it around,
+26.0 bottles of beer on the wall.
+
+26.0 bottles of beer on the wall,
+26.0 bottles of beer,
+You take one down, pass it around,
+25.0 bottles of beer on the wall.
+
+25.0 bottles of beer on the wall,
+25.0 bottles of beer,
+You take one down, pass it around,
+24.0 bottles of beer on the wall.
+
+24.0 bottles of beer on the wall,
+24.0 bottles of beer,
+You take one down, pass it around,
+23.0 bottles of beer on the wall.
+
+23.0 bottles of beer on the wall,
+23.0 bottles of beer,
+You take one down, pass it around,
+22.0 bottles of beer on the wall.
+
+22.0 bottles of beer on the wall,
+22.0 bottles of beer,
+You take one down, pass it around,
+21.0 bottles of beer on the wall.
+
+21.0 bottles of beer on the wall,
+21.0 bottles of beer,
+You take one down, pass it around,
+20.0 bottles of beer on the wall.
+
+20.0 bottles of beer on the wall,
+20.0 bottles of beer,
+You take one down, pass it around,
+19.0 bottles of beer on the wall.
+
+19.0 bottles of beer on the wall,
+19.0 bottles of beer,
+You take one down, pass it around,
+18.0 bottles of beer on the wall.
+
+18.0 bottles of beer on the wall,
+18.0 bottles of beer,
+You take one down, pass it around,
+17.0 bottles of beer on the wall.
+
+17.0 bottles of beer on the wall,
+17.0 bottles of beer,
+You take one down, pass it around,
+16.0 bottles of beer on the wall.
+
+16.0 bottles of beer on the wall,
+16.0 bottles of beer,
+You take one down, pass it around,
+15.0 bottles of beer on the wall.
+
+15.0 bottles of beer on the wall,
+15.0 bottles of beer,
+You take one down, pass it around,
+14.0 bottles of beer on the wall.
+
+14.0 bottles of beer on the wall,
+14.0 bottles of beer,
+You take one down, pass it around,
+13.0 bottles of beer on the wall.
+
+13.0 bottles of beer on the wall,
+13.0 bottles of beer,
+You take one down, pass it around,
+12.0 bottles of beer on the wall.
+
+12.0 bottles of beer on the wall,
+12.0 bottles of beer,
+You take one down, pass it around,
+11.0 bottles of beer on the wall.
+
+11.0 bottles of beer on the wall,
+11.0 bottles of beer,
+You take one down, pass it around,
+10.0 bottles of beer on the wall.
+
+10.0 bottles of beer on the wall,
+10.0 bottles of beer,
+You take one down, pass it around,
+9.0 bottles of beer on the wall.
+
+9.0 bottles of beer on the wall,
+9.0 bottles of beer,
+You take one down, pass it around,
+8.0 bottles of beer on the wall.
+
+8.0 bottles of beer on the wall,
+8.0 bottles of beer,
+You take one down, pass it around,
+7.0 bottles of beer on the wall.
+
+7.0 bottles of beer on the wall,
+7.0 bottles of beer,
+You take one down, pass it around,
+6.0 bottles of beer on the wall.
+
+6.0 bottles of beer on the wall,
+6.0 bottles of beer,
+You take one down, pass it around,
+5.0 bottles of beer on the wall.
+
+5.0 bottles of beer on the wall,
+5.0 bottles of beer,
+You take one down, pass it around,
+4.0 bottles of beer on the wall.
+
+4.0 bottles of beer on the wall,
+4.0 bottles of beer,
+You take one down, pass it around,
+3.0 bottles of beer on the wall.
+
+3.0 bottles of beer on the wall,
+3.0 bottles of beer,
+You take one down, pass it around,
+2.0 bottles of beer on the wall.
+
+2.0 bottles of beer on the wall,
+2.0 bottles of beer,
+You take one down, pass it around,
+1.0 bottle of beer on the wall.
+
+1.0 bottle of beer on the wall,
+1.0 bottle of beer,
+You take one down, pass it around,
+No more bottles of beer on the wall.
+
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/calendar.out b/test/tests/contrib-gold/xsltc/schemasoft/calendar.out
new file mode 100644
index 0000000..e4ece43
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/calendar.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html><head><title>May 2001</title></head><body bgcolor="lightyellow"><h1 align="center">May 2001</h1><table border="1" bgcolor="lightblue" noshade="yes" align="center"><tr bgcolor="white"><th>Sun</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th></tr><tr><td>-</td><td>-</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr><tr><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td><td>19</td></tr><tr><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>25</td><td>26</td></tr><tr><td>27</td><td>28</td><td>29</td><td>30</td><td>31</td><td>-</td><td>-</td></tr></table></body></html>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/compare.out b/test/tests/contrib-gold/xsltc/schemasoft/compare.out
new file mode 100755
index 0000000..a9a7a59
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/compare.out
@@ -0,0 +1,10 @@
+a = 3
+b = 1
+x = 3
+a > b
+b < a
+a == x
+a <= x
+a >= x
+b <= a
+a >= b
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/differentiate.out b/test/tests/contrib-gold/xsltc/schemasoft/differentiate.out
new file mode 100644
index 0000000..b20d70a
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/differentiate.out
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<function-of-x>
+<term>
+<coeff>3</coeff>
+<x/>
+<power>2</power>
+</term>
+<term>
+<coeff>4</coeff>
+<x/>
+<power>1</power>
+</term>
+<term>
+<coeff>3</coeff>
+<x/>
+<power>0</power>
+</term>
+<term>
+<coeff>0</coeff>
+<x/>
+<power>-1</power>
+</term>
+</function-of-x>
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/eratosthenes.out b/test/tests/contrib-gold/xsltc/schemasoft/eratosthenes.out
new file mode 100644
index 0000000..0c298b7
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/eratosthenes.out
@@ -0,0 +1 @@
+2, 3.0, 5.0, 7.0, 11.0, 13.0, 17.0, 19.0, 23.0, 29.0, 31.0, 37.0, 41.0, 43.0, 47.0, 53.0, 59.0, 61.0, 67.0, 71.0, 73.0, 79.0, 83.0, 89.0, 97.0, 101.0, 103.0, 107.0, 109.0, 113.0, 127.0, 131.0, 137.0, 139.0, 149.0, 151.0, 157.0, 163.0, 167.0, 173.0, 179.0, 181.0, 191.0, 193.0, 197.0, 199.0, 211.0, 223.0, 227.0, 229.0, 233.0, 239.0, 241.0, 251.0, 257.0, 263.0, 269.0, 271.0, 277.0, 281.0, 283.0, 293.0, 307.0, 311.0, 313.0, 317.0, 331.0, 337.0, 347.0, 349.0, 353.0, 359.0, 367.0, 373.0, 379.0, 383.0, 389.0, 397.0, 401.0, 409.0, 419.0, 421.0, 431.0, 433.0, 439.0, 443.0, 449.0, 457.0, 461.0, 463.0, 467.0, 479.0, 487.0, 491.0, 499.0, 503.0, 509.0, 521.0, 523.0, 541.0, 547.0, 557.0, 563.0, 569.0, 571.0, 577.0, 587.0, 593.0, 599.0, 601.0, 607.0, 613.0, 617.0, 619.0, 631.0, 641.0, 643.0, 647.0, 653.0, 659.0, 661.0, 673.0, 677.0, 683.0, 691.0, 701.0, 709.0, 719.0, 727.0, 733.0, 739.0, 743.0, 751.0, 757.0, 761.0, 769.0, 773.0, 787.0, 797.0, 809.0, 811.0, 821.0, 823.0, 827.0, 829.0, 839.0, 853.0, 857.0, 859.0, 863.0, 877.0, 881.0, 883.0, 887.0, 907.0, 911.0, 919.0, 929.0, 937.0, 941.0, 947.0, 953.0, 967.0, 971.0, 977.0, 983.0, 991.0, 997.0, 
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/factorial.out b/test/tests/contrib-gold/xsltc/schemasoft/factorial.out
new file mode 100644
index 0000000..9328053
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/factorial.out
@@ -0,0 +1,2 @@
+factorial(5) = 120
+factorial(4) = 120
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/log10.out b/test/tests/contrib-gold/xsltc/schemasoft/log10.out
new file mode 100644
index 0000000..662a691
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/log10.out
@@ -0,0 +1,28 @@
+
+Value: 1 Log10: 0
+Value: 2 Log10: 0.3010299956639811
+Value: 3 Log10: 0.47712125471966205
+Value: 4 Log10: 0.6020599913279626
+Value: 5 Log10: 0.6989700043360187
+Value: 6 Log10: 0.7781512503836436
+Value: 7 Log10: 0.8450980400142523
+Value: 8 Log10: 0.9030899869917436
+Value: 9 Log10: 0.9542425094355578
+Value: 10 Log10: 0.9999999999999801
+Value: 11 Log10: 1.041392684886557
+Value: 12 Log10: 1.0791812446874016
+Value: 13 Log10: 1.1139433469688733
+Value: 14 Log10: 1.1461280183804925
+Value: 15 Log10: 1.1760912109674229
+Value: 16 Log10: 1.2041198646367919
+Value: 17 Log10: 1.2304486600243556
+Value: 18 Log10: 1.2552719739053042
+Value: 19 Log10: 1.2787525966423559
+Value: 20 Log10: 1.3010299956639415
+Value: 21 Log10: 1.3222192947338411
+Value: 22 Log10: 1.3424226808219357
+Value: 23 Log10: 1.3617278360167488
+Value: 24 Log10: 1.3802112417092156
+Value: 25 Log10: 1.3979400086658083
+Value: 26 Log10: 1.4149733479557316
+Value: 27 Log10: 1.431363764124744
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/pi.out b/test/tests/contrib-gold/xsltc/schemasoft/pi.out
new file mode 100644
index 0000000..ccd00d0
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/pi.out
@@ -0,0 +1 @@
+3.1411482091672975
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/queryOnSubElement.out b/test/tests/contrib-gold/xsltc/schemasoft/queryOnSubElement.out
new file mode 100644
index 0000000..dc48b98
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/queryOnSubElement.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Collection><b>b content,
+  <d>d in b,</d>
+ </b></Collection>
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/selectHREF.out b/test/tests/contrib-gold/xsltc/schemasoft/selectHREF.out
new file mode 100644
index 0000000..5630e62
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/selectHREF.out
@@ -0,0 +1,3 @@
+
+   href=hrefInA-1rstLevel
+   href=hrefIn_g-2ndLevel
\ No newline at end of file
diff --git a/test/tests/contrib-gold/xsltc/schemasoft/suppressEmptyElements.out b/test/tests/contrib-gold/xsltc/schemasoft/suppressEmptyElements.out
new file mode 100644
index 0000000..e57e020
--- /dev/null
+++ b/test/tests/contrib-gold/xsltc/schemasoft/suppressEmptyElements.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Collection><a>
+<f><g><d>d in f/g </d></g></f></a></Collection>
\ No newline at end of file
diff --git a/test/tests/contrib/enc/encSmoke.xml b/test/tests/contrib/enc/encSmoke.xml
new file mode 100644
index 0000000..d12165b
--- /dev/null
+++ b/test/tests/contrib/enc/encSmoke.xml
@@ -0,0 +1,952 @@
+<?xml version="1.0" encoding="ISO-8859-7"?>
+<chartables>
+<chars enc="ISO-8859-7">
+<char dec="32" desc="SPACE"><c> </c><e>&#x20;</e></char>
+<char dec="33" desc="EXCLAMATION MARK"><c>!</c><e>&#x21;</e></char>
+<char dec="34" desc="QUOTATION MARK"><c>"</c><e>&#x22;</e></char>
+<char dec="35" desc="NUMBER SIGN"><c>#</c><e>&#x23;</e></char>
+<char dec="36" desc="DOLLAR SIGN"><c>$</c><e>&#x24;</e></char>
+<char dec="37" desc="PERCENT SIGN"><c>%</c><e>&#x25;</e></char>
+<char dec="38" desc="AMPERSAND"><c>&amp;</c><e>&#x26;</e></char>
+<char dec="39" desc="APOSTROPHE"><c>'</c><e>&#x27;</e></char>
+<char dec="40" desc="LEFT PARENTHESIS"><c>(</c><e>&#x28;</e></char>
+<char dec="41" desc="RIGHT PARENTHESIS"><c>)</c><e>&#x29;</e></char>
+<char dec="42" desc="ASTERISK"><c>*</c><e>&#x2a;</e></char>
+<char dec="43" desc="PLUS SIGN"><c>+</c><e>&#x2b;</e></char>
+<char dec="44" desc="COMMA"><c>,</c><e>&#x2c;</e></char>
+<char dec="45" desc="HYPHEN-MINUS"><c>-</c><e>&#x2d;</e></char>
+<char dec="46" desc="FULL STOP"><c>.</c><e>&#x2e;</e></char>
+<char dec="47" desc="SOLIDUS"><c>/</c><e>&#x2f;</e></char>
+<char dec="48" desc="DIGIT ZERO"><c>0</c><e>&#x30;</e></char>
+<char dec="49" desc="DIGIT ONE"><c>1</c><e>&#x31;</e></char>
+<char dec="50" desc="DIGIT TWO"><c>2</c><e>&#x32;</e></char>
+<char dec="51" desc="DIGIT THREE"><c>3</c><e>&#x33;</e></char>
+<char dec="52" desc="DIGIT FOUR"><c>4</c><e>&#x34;</e></char>
+<char dec="53" desc="DIGIT FIVE"><c>5</c><e>&#x35;</e></char>
+<char dec="54" desc="DIGIT SIX"><c>6</c><e>&#x36;</e></char>
+<char dec="55" desc="DIGIT SEVEN"><c>7</c><e>&#x37;</e></char>
+<char dec="56" desc="DIGIT EIGHT"><c>8</c><e>&#x38;</e></char>
+<char dec="57" desc="DIGIT NINE"><c>9</c><e>&#x39;</e></char>
+<char dec="58" desc="COLON"><c>:</c><e>&#x3a;</e></char>
+<char dec="59" desc="SEMICOLON"><c>;</c><e>&#x3b;</e></char>
+<char dec="60" desc="LESS-THAN SIGN"><c>&lt;</c><e>&#x3c;</e></char>
+<char dec="61" desc="EQUALS SIGN"><c>=</c><e>&#x3d;</e></char>
+<char dec="62" desc="GREATER-THAN SIGN"><c>></c><e>&#x3e;</e></char>
+<char dec="63" desc="QUESTION MARK"><c>?</c><e>&#x3f;</e></char>
+<char dec="64" desc="COMMERCIAL AT"><c>@</c><e>&#x40;</e></char>
+<char dec="65" desc="LATIN CAPITAL LETTER A"><c>A</c><e>&#x41;</e></char>
+<char dec="66" desc="LATIN CAPITAL LETTER B"><c>B</c><e>&#x42;</e></char>
+<char dec="67" desc="LATIN CAPITAL LETTER C"><c>C</c><e>&#x43;</e></char>
+<char dec="68" desc="LATIN CAPITAL LETTER D"><c>D</c><e>&#x44;</e></char>
+<char dec="69" desc="LATIN CAPITAL LETTER E"><c>E</c><e>&#x45;</e></char>
+<char dec="70" desc="LATIN CAPITAL LETTER F"><c>F</c><e>&#x46;</e></char>
+<char dec="71" desc="LATIN CAPITAL LETTER G"><c>G</c><e>&#x47;</e></char>
+<char dec="72" desc="LATIN CAPITAL LETTER H"><c>H</c><e>&#x48;</e></char>
+<char dec="73" desc="LATIN CAPITAL LETTER I"><c>I</c><e>&#x49;</e></char>
+<char dec="74" desc="LATIN CAPITAL LETTER J"><c>J</c><e>&#x4a;</e></char>
+<char dec="75" desc="LATIN CAPITAL LETTER K"><c>K</c><e>&#x4b;</e></char>
+<char dec="76" desc="LATIN CAPITAL LETTER L"><c>L</c><e>&#x4c;</e></char>
+<char dec="77" desc="LATIN CAPITAL LETTER M"><c>M</c><e>&#x4d;</e></char>
+<char dec="78" desc="LATIN CAPITAL LETTER N"><c>N</c><e>&#x4e;</e></char>
+<char dec="79" desc="LATIN CAPITAL LETTER O"><c>O</c><e>&#x4f;</e></char>
+<char dec="80" desc="LATIN CAPITAL LETTER P"><c>P</c><e>&#x50;</e></char>
+<char dec="81" desc="LATIN CAPITAL LETTER Q"><c>Q</c><e>&#x51;</e></char>
+<char dec="82" desc="LATIN CAPITAL LETTER R"><c>R</c><e>&#x52;</e></char>
+<char dec="83" desc="LATIN CAPITAL LETTER S"><c>S</c><e>&#x53;</e></char>
+<char dec="84" desc="LATIN CAPITAL LETTER T"><c>T</c><e>&#x54;</e></char>
+<char dec="85" desc="LATIN CAPITAL LETTER U"><c>U</c><e>&#x55;</e></char>
+<char dec="86" desc="LATIN CAPITAL LETTER V"><c>V</c><e>&#x56;</e></char>
+<char dec="87" desc="LATIN CAPITAL LETTER W"><c>W</c><e>&#x57;</e></char>
+<char dec="88" desc="LATIN CAPITAL LETTER X"><c>X</c><e>&#x58;</e></char>
+<char dec="89" desc="LATIN CAPITAL LETTER Y"><c>Y</c><e>&#x59;</e></char>
+<char dec="90" desc="LATIN CAPITAL LETTER Z"><c>Z</c><e>&#x5a;</e></char>
+<char dec="91" desc="LEFT SQUARE BRACKET"><c>[</c><e>&#x5b;</e></char>
+<char dec="92" desc="REVERSE SOLIDUS"><c>\</c><e>&#x5c;</e></char>
+<char dec="93" desc="RIGHT SQUARE BRACKET"><c>]</c><e>&#x5d;</e></char>
+<char dec="94" desc="CIRCUMFLEX ACCENT"><c>^</c><e>&#x5e;</e></char>
+<char dec="95" desc="LOW LINE"><c>_</c><e>&#x5f;</e></char>
+<char dec="96" desc="GRAVE ACCENT"><c>`</c><e>&#x60;</e></char>
+<char dec="97" desc="LATIN SMALL LETTER A"><c>a</c><e>&#x61;</e></char>
+<char dec="98" desc="LATIN SMALL LETTER B"><c>b</c><e>&#x62;</e></char>
+<char dec="99" desc="LATIN SMALL LETTER C"><c>c</c><e>&#x63;</e></char>
+<char dec="100" desc="LATIN SMALL LETTER D"><c>d</c><e>&#x64;</e></char>
+<char dec="101" desc="LATIN SMALL LETTER E"><c>e</c><e>&#x65;</e></char>
+<char dec="102" desc="LATIN SMALL LETTER F"><c>f</c><e>&#x66;</e></char>
+<char dec="103" desc="LATIN SMALL LETTER G"><c>g</c><e>&#x67;</e></char>
+<char dec="104" desc="LATIN SMALL LETTER H"><c>h</c><e>&#x68;</e></char>
+<char dec="105" desc="LATIN SMALL LETTER I"><c>i</c><e>&#x69;</e></char>
+<char dec="106" desc="LATIN SMALL LETTER J"><c>j</c><e>&#x6a;</e></char>
+<char dec="107" desc="LATIN SMALL LETTER K"><c>k</c><e>&#x6b;</e></char>
+<char dec="108" desc="LATIN SMALL LETTER L"><c>l</c><e>&#x6c;</e></char>
+<char dec="109" desc="LATIN SMALL LETTER M"><c>m</c><e>&#x6d;</e></char>
+<char dec="110" desc="LATIN SMALL LETTER N"><c>n</c><e>&#x6e;</e></char>
+<char dec="111" desc="LATIN SMALL LETTER O"><c>o</c><e>&#x6f;</e></char>
+<char dec="112" desc="LATIN SMALL LETTER P"><c>p</c><e>&#x70;</e></char>
+<char dec="113" desc="LATIN SMALL LETTER Q"><c>q</c><e>&#x71;</e></char>
+<char dec="114" desc="LATIN SMALL LETTER R"><c>r</c><e>&#x72;</e></char>
+<char dec="115" desc="LATIN SMALL LETTER S"><c>s</c><e>&#x73;</e></char>
+<char dec="116" desc="LATIN SMALL LETTER T"><c>t</c><e>&#x74;</e></char>
+<char dec="117" desc="LATIN SMALL LETTER U"><c>u</c><e>&#x75;</e></char>
+<char dec="118" desc="LATIN SMALL LETTER V"><c>v</c><e>&#x76;</e></char>
+<char dec="119" desc="LATIN SMALL LETTER W"><c>w</c><e>&#x77;</e></char>
+<char dec="120" desc="LATIN SMALL LETTER X"><c>x</c><e>&#x78;</e></char>
+<char dec="121" desc="LATIN SMALL LETTER Y"><c>y</c><e>&#x79;</e></char>
+<char dec="122" desc="LATIN SMALL LETTER Z"><c>z</c><e>&#x7a;</e></char>
+<char dec="123" desc="LEFT CURLY BRACKET"><c>{</c><e>&#x7b;</e></char>
+<char dec="124" desc="VERTICAL LINE"><c>|</c><e>&#x7c;</e></char>
+<char dec="125" desc="RIGHT CURLY BRACKET"><c>}</c><e>&#x7d;</e></char>
+<char dec="126" desc="TILDE"><c>~</c><e>&#x7e;</e></char>
+<char dec="127" desc="not encoded"><e>&#x7f;</e></char>
+<char dec="128" desc="not encoded"><e>&#x80;</e></char>
+<char dec="129" desc="not encoded"><e>&#x81;</e></char>
+<char dec="130" desc="not encoded"><e>&#x82;</e></char>
+<char dec="131" desc="not encoded"><e>&#x83;</e></char>
+<char dec="132" desc="not encoded"><e>&#x84;</e></char>
+<char dec="133" desc="not encoded"><e>&#x85;</e></char>
+<char dec="134" desc="not encoded"><e>&#x86;</e></char>
+<char dec="135" desc="not encoded"><e>&#x87;</e></char>
+<char dec="136" desc="not encoded"><e>&#x88;</e></char>
+<char dec="137" desc="not encoded"><e>&#x89;</e></char>
+<char dec="138" desc="not encoded"><e>&#x8a;</e></char>
+<char dec="139" desc="not encoded"><e>&#x8b;</e></char>
+<char dec="140" desc="not encoded"><e>&#x8c;</e></char>
+<char dec="141" desc="not encoded"><e>&#x8d;</e></char>
+<char dec="142" desc="not encoded"><e>&#x8e;</e></char>
+<char dec="143" desc="not encoded"><e>&#x8f;</e></char>
+<char dec="144" desc="not encoded"><e>&#x90;</e></char>
+<char dec="145" desc="not encoded"><e>&#x91;</e></char>
+<char dec="146" desc="not encoded"><e>&#x92;</e></char>
+<char dec="147" desc="not encoded"><e>&#x93;</e></char>
+<char dec="148" desc="not encoded"><e>&#x94;</e></char>
+<char dec="149" desc="not encoded"><e>&#x95;</e></char>
+<char dec="150" desc="not encoded"><e>&#x96;</e></char>
+<char dec="151" desc="not encoded"><e>&#x97;</e></char>
+<char dec="152" desc="not encoded"><e>&#x98;</e></char>
+<char dec="153" desc="not encoded"><e>&#x99;</e></char>
+<char dec="154" desc="not encoded"><e>&#x9a;</e></char>
+<char dec="155" desc="not encoded"><e>&#x9b;</e></char>
+<char dec="156" desc="not encoded"><e>&#x9c;</e></char>
+<char dec="157" desc="not encoded"><e>&#x9d;</e></char>
+<char dec="158" desc="not encoded"><e>&#x9e;</e></char>
+<char dec="159" desc="not encoded"><e>&#x9f;</e></char>
+<char dec="160" desc="NO-BREAK SPACE"><c> </c><e>&#xa0;</e></char>
+<char dec="161" desc="not encoded"><e>&#xa1;</e></char>
+<char dec="162" desc="not encoded"><e>&#xa2;</e></char>
+<char dec="163" desc="POUND SIGN"><c>£</c><e>&#xa3;</e></char>
+<char dec="164" desc="not encoded"><e>&#xa4;</e></char>
+<char dec="165" desc="not encoded"><e>&#xa5;</e></char>
+<char dec="166" desc="BROKEN BAR"><c>¦</c><e>&#xa6;</e></char>
+<char dec="167" desc="SECTION SIGN"><c>§</c><e>&#xa7;</e></char>
+<char dec="168" desc="DIAERESIS"><c>¨</c><e>&#xa8;</e></char>
+<char dec="169" desc="COPYRIGHT SIGN"><c>©</c><e>&#xa9;</e></char>
+<char dec="170" desc="not encoded"><e>&#xaa;</e></char>
+<char dec="171" desc="LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"><c>«</c><e>&#xab;</e></char>
+<char dec="172" desc="NOT SIGN"><c>¬</c><e>&#xac;</e></char>
+<char dec="173" desc="SOFT HYPHEN"><c>­</c><e>&#xad;</e></char>
+<char dec="174" desc="not encoded"><e>&#xae;</e></char>
+<char dec="175" desc="not encoded"><e>&#xaf;</e></char>
+<char dec="176" desc="DEGREE SIGN"><c>°</c><e>&#xb0;</e></char>
+<char dec="177" desc="PLUS-MINUS SIGN"><c>±</c><e>&#xb1;</e></char>
+<char dec="178" desc="SUPERSCRIPT TWO"><c>²</c><e>&#xb2;</e></char>
+<char dec="179" desc="SUPERSCRIPT THREE"><c>³</c><e>&#xb3;</e></char>
+<char dec="180" desc="not encoded"><e>&#xb4;</e></char>
+<char dec="181" desc="not encoded"><e>&#xb5;</e></char>
+<char dec="182" desc="not encoded"><e>&#xb6;</e></char>
+<char dec="183" desc="MIDDLE DOT"><c>·</c><e>&#xb7;</e></char>
+<char dec="184" desc="not encoded"><e>&#xb8;</e></char>
+<char dec="185" desc="not encoded"><e>&#xb9;</e></char>
+<char dec="186" desc="not encoded"><e>&#xba;</e></char>
+<char dec="187" desc="RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"><c>»</c><e>&#xbb;</e></char>
+<char dec="188" desc="not encoded"><e>&#xbc;</e></char>
+<char dec="189" desc="VULGAR FRACTION ONE HALF"><c>½</c><e>&#xbd;</e></char>
+<char dec="190" desc="not encoded"><e>&#xbe;</e></char>
+<char dec="191" desc="not encoded"><e>&#xbf;</e></char>
+<char dec="192" desc="not encoded"><e>&#xc0;</e></char>
+<char dec="193" desc="not encoded"><e>&#xc1;</e></char>
+<char dec="194" desc="not encoded"><e>&#xc2;</e></char>
+<char dec="195" desc="not encoded"><e>&#xc3;</e></char>
+<char dec="196" desc="not encoded"><e>&#xc4;</e></char>
+<char dec="197" desc="not encoded"><e>&#xc5;</e></char>
+<char dec="198" desc="not encoded"><e>&#xc6;</e></char>
+<char dec="199" desc="not encoded"><e>&#xc7;</e></char>
+<char dec="200" desc="not encoded"><e>&#xc8;</e></char>
+<char dec="201" desc="not encoded"><e>&#xc9;</e></char>
+<char dec="202" desc="not encoded"><e>&#xca;</e></char>
+<char dec="203" desc="not encoded"><e>&#xcb;</e></char>
+<char dec="204" desc="not encoded"><e>&#xcc;</e></char>
+<char dec="205" desc="not encoded"><e>&#xcd;</e></char>
+<char dec="206" desc="not encoded"><e>&#xce;</e></char>
+<char dec="207" desc="not encoded"><e>&#xcf;</e></char>
+<char dec="208" desc="not encoded"><e>&#xd0;</e></char>
+<char dec="209" desc="not encoded"><e>&#xd1;</e></char>
+<char dec="210" desc="not encoded"><e>&#xd2;</e></char>
+<char dec="211" desc="not encoded"><e>&#xd3;</e></char>
+<char dec="212" desc="not encoded"><e>&#xd4;</e></char>
+<char dec="213" desc="not encoded"><e>&#xd5;</e></char>
+<char dec="214" desc="not encoded"><e>&#xd6;</e></char>
+<char dec="215" desc="not encoded"><e>&#xd7;</e></char>
+<char dec="216" desc="not encoded"><e>&#xd8;</e></char>
+<char dec="217" desc="not encoded"><e>&#xd9;</e></char>
+<char dec="218" desc="not encoded"><e>&#xda;</e></char>
+<char dec="219" desc="not encoded"><e>&#xdb;</e></char>
+<char dec="220" desc="not encoded"><e>&#xdc;</e></char>
+<char dec="221" desc="not encoded"><e>&#xdd;</e></char>
+<char dec="222" desc="not encoded"><e>&#xde;</e></char>
+<char dec="223" desc="not encoded"><e>&#xdf;</e></char>
+<char dec="224" desc="not encoded"><e>&#xe0;</e></char>
+<char dec="225" desc="not encoded"><e>&#xe1;</e></char>
+<char dec="226" desc="not encoded"><e>&#xe2;</e></char>
+<char dec="227" desc="not encoded"><e>&#xe3;</e></char>
+<char dec="228" desc="not encoded"><e>&#xe4;</e></char>
+<char dec="229" desc="not encoded"><e>&#xe5;</e></char>
+<char dec="230" desc="not encoded"><e>&#xe6;</e></char>
+<char dec="231" desc="not encoded"><e>&#xe7;</e></char>
+<char dec="232" desc="not encoded"><e>&#xe8;</e></char>
+<char dec="233" desc="not encoded"><e>&#xe9;</e></char>
+<char dec="234" desc="not encoded"><e>&#xea;</e></char>
+<char dec="235" desc="not encoded"><e>&#xeb;</e></char>
+<char dec="236" desc="not encoded"><e>&#xec;</e></char>
+<char dec="237" desc="not encoded"><e>&#xed;</e></char>
+<char dec="238" desc="not encoded"><e>&#xee;</e></char>
+<char dec="239" desc="not encoded"><e>&#xef;</e></char>
+<char dec="240" desc="not encoded"><e>&#xf0;</e></char>
+<char dec="241" desc="not encoded"><e>&#xf1;</e></char>
+<char dec="242" desc="not encoded"><e>&#xf2;</e></char>
+<char dec="243" desc="not encoded"><e>&#xf3;</e></char>
+<char dec="244" desc="not encoded"><e>&#xf4;</e></char>
+<char dec="245" desc="not encoded"><e>&#xf5;</e></char>
+<char dec="246" desc="not encoded"><e>&#xf6;</e></char>
+<char dec="247" desc="not encoded"><e>&#xf7;</e></char>
+<char dec="248" desc="not encoded"><e>&#xf8;</e></char>
+<char dec="249" desc="not encoded"><e>&#xf9;</e></char>
+<char dec="250" desc="not encoded"><e>&#xfa;</e></char>
+<char dec="251" desc="not encoded"><e>&#xfb;</e></char>
+<char dec="252" desc="not encoded"><e>&#xfc;</e></char>
+<char dec="253" desc="not encoded"><e>&#xfd;</e></char>
+<char dec="254" desc="not encoded"><e>&#xfe;</e></char>
+<char dec="255" desc="not encoded"><e>&#xff;</e></char>
+<char dec="256" desc="not encoded"><e>&#x100;</e></char>
+<char dec="257" desc="not encoded"><e>&#x101;</e></char>
+<char dec="258" desc="not encoded"><e>&#x102;</e></char>
+<char dec="259" desc="not encoded"><e>&#x103;</e></char>
+<char dec="260" desc="not encoded"><e>&#x104;</e></char>
+<char dec="261" desc="not encoded"><e>&#x105;</e></char>
+<char dec="262" desc="not encoded"><e>&#x106;</e></char>
+<char dec="263" desc="not encoded"><e>&#x107;</e></char>
+<char dec="264" desc="not encoded"><e>&#x108;</e></char>
+<char dec="265" desc="not encoded"><e>&#x109;</e></char>
+<char dec="266" desc="not encoded"><e>&#x10a;</e></char>
+<char dec="267" desc="not encoded"><e>&#x10b;</e></char>
+<char dec="268" desc="not encoded"><e>&#x10c;</e></char>
+<char dec="269" desc="not encoded"><e>&#x10d;</e></char>
+<char dec="270" desc="not encoded"><e>&#x10e;</e></char>
+<char dec="271" desc="not encoded"><e>&#x10f;</e></char>
+<char dec="272" desc="not encoded"><e>&#x110;</e></char>
+<char dec="273" desc="not encoded"><e>&#x111;</e></char>
+<char dec="274" desc="not encoded"><e>&#x112;</e></char>
+<char dec="275" desc="not encoded"><e>&#x113;</e></char>
+<char dec="276" desc="not encoded"><e>&#x114;</e></char>
+<char dec="277" desc="not encoded"><e>&#x115;</e></char>
+<char dec="278" desc="not encoded"><e>&#x116;</e></char>
+<char dec="279" desc="not encoded"><e>&#x117;</e></char>
+<char dec="280" desc="not encoded"><e>&#x118;</e></char>
+<char dec="281" desc="not encoded"><e>&#x119;</e></char>
+<char dec="282" desc="not encoded"><e>&#x11a;</e></char>
+<char dec="283" desc="not encoded"><e>&#x11b;</e></char>
+<char dec="284" desc="not encoded"><e>&#x11c;</e></char>
+<char dec="285" desc="not encoded"><e>&#x11d;</e></char>
+<char dec="286" desc="not encoded"><e>&#x11e;</e></char>
+<char dec="287" desc="not encoded"><e>&#x11f;</e></char>
+<char dec="288" desc="not encoded"><e>&#x120;</e></char>
+<char dec="289" desc="not encoded"><e>&#x121;</e></char>
+<char dec="290" desc="not encoded"><e>&#x122;</e></char>
+<char dec="291" desc="not encoded"><e>&#x123;</e></char>
+<char dec="292" desc="not encoded"><e>&#x124;</e></char>
+<char dec="293" desc="not encoded"><e>&#x125;</e></char>
+<char dec="294" desc="not encoded"><e>&#x126;</e></char>
+<char dec="295" desc="not encoded"><e>&#x127;</e></char>
+<char dec="296" desc="not encoded"><e>&#x128;</e></char>
+<char dec="297" desc="not encoded"><e>&#x129;</e></char>
+<char dec="298" desc="not encoded"><e>&#x12a;</e></char>
+<char dec="299" desc="not encoded"><e>&#x12b;</e></char>
+<char dec="300" desc="not encoded"><e>&#x12c;</e></char>
+<char dec="301" desc="not encoded"><e>&#x12d;</e></char>
+<char dec="302" desc="not encoded"><e>&#x12e;</e></char>
+<char dec="303" desc="not encoded"><e>&#x12f;</e></char>
+<char dec="304" desc="not encoded"><e>&#x130;</e></char>
+<char dec="305" desc="not encoded"><e>&#x131;</e></char>
+<char dec="306" desc="not encoded"><e>&#x132;</e></char>
+<char dec="307" desc="not encoded"><e>&#x133;</e></char>
+<char dec="308" desc="not encoded"><e>&#x134;</e></char>
+<char dec="309" desc="not encoded"><e>&#x135;</e></char>
+<char dec="310" desc="not encoded"><e>&#x136;</e></char>
+<char dec="311" desc="not encoded"><e>&#x137;</e></char>
+<char dec="312" desc="not encoded"><e>&#x138;</e></char>
+<char dec="313" desc="not encoded"><e>&#x139;</e></char>
+<char dec="314" desc="not encoded"><e>&#x13a;</e></char>
+<char dec="315" desc="not encoded"><e>&#x13b;</e></char>
+<char dec="316" desc="not encoded"><e>&#x13c;</e></char>
+<char dec="317" desc="not encoded"><e>&#x13d;</e></char>
+<char dec="318" desc="not encoded"><e>&#x13e;</e></char>
+<char dec="319" desc="not encoded"><e>&#x13f;</e></char>
+<char dec="320" desc="not encoded"><e>&#x140;</e></char>
+<char dec="321" desc="not encoded"><e>&#x141;</e></char>
+<char dec="322" desc="not encoded"><e>&#x142;</e></char>
+<char dec="323" desc="not encoded"><e>&#x143;</e></char>
+<char dec="324" desc="not encoded"><e>&#x144;</e></char>
+<char dec="325" desc="not encoded"><e>&#x145;</e></char>
+<char dec="326" desc="not encoded"><e>&#x146;</e></char>
+<char dec="327" desc="not encoded"><e>&#x147;</e></char>
+<char dec="328" desc="not encoded"><e>&#x148;</e></char>
+<char dec="329" desc="not encoded"><e>&#x149;</e></char>
+<char dec="330" desc="not encoded"><e>&#x14a;</e></char>
+<char dec="331" desc="not encoded"><e>&#x14b;</e></char>
+<char dec="332" desc="not encoded"><e>&#x14c;</e></char>
+<char dec="333" desc="not encoded"><e>&#x14d;</e></char>
+<char dec="334" desc="not encoded"><e>&#x14e;</e></char>
+<char dec="335" desc="not encoded"><e>&#x14f;</e></char>
+<char dec="336" desc="not encoded"><e>&#x150;</e></char>
+<char dec="337" desc="not encoded"><e>&#x151;</e></char>
+<char dec="338" desc="not encoded"><e>&#x152;</e></char>
+<char dec="339" desc="not encoded"><e>&#x153;</e></char>
+<char dec="340" desc="not encoded"><e>&#x154;</e></char>
+<char dec="341" desc="not encoded"><e>&#x155;</e></char>
+<char dec="342" desc="not encoded"><e>&#x156;</e></char>
+<char dec="343" desc="not encoded"><e>&#x157;</e></char>
+<char dec="344" desc="not encoded"><e>&#x158;</e></char>
+<char dec="345" desc="not encoded"><e>&#x159;</e></char>
+<char dec="346" desc="not encoded"><e>&#x15a;</e></char>
+<char dec="347" desc="not encoded"><e>&#x15b;</e></char>
+<char dec="348" desc="not encoded"><e>&#x15c;</e></char>
+<char dec="349" desc="not encoded"><e>&#x15d;</e></char>
+<char dec="350" desc="not encoded"><e>&#x15e;</e></char>
+<char dec="351" desc="not encoded"><e>&#x15f;</e></char>
+<char dec="352" desc="not encoded"><e>&#x160;</e></char>
+<char dec="353" desc="not encoded"><e>&#x161;</e></char>
+<char dec="354" desc="not encoded"><e>&#x162;</e></char>
+<char dec="355" desc="not encoded"><e>&#x163;</e></char>
+<char dec="356" desc="not encoded"><e>&#x164;</e></char>
+<char dec="357" desc="not encoded"><e>&#x165;</e></char>
+<char dec="358" desc="not encoded"><e>&#x166;</e></char>
+<char dec="359" desc="not encoded"><e>&#x167;</e></char>
+<char dec="360" desc="not encoded"><e>&#x168;</e></char>
+<char dec="361" desc="not encoded"><e>&#x169;</e></char>
+<char dec="362" desc="not encoded"><e>&#x16a;</e></char>
+<char dec="363" desc="not encoded"><e>&#x16b;</e></char>
+<char dec="364" desc="not encoded"><e>&#x16c;</e></char>
+<char dec="365" desc="not encoded"><e>&#x16d;</e></char>
+<char dec="366" desc="not encoded"><e>&#x16e;</e></char>
+<char dec="367" desc="not encoded"><e>&#x16f;</e></char>
+<char dec="368" desc="not encoded"><e>&#x170;</e></char>
+<char dec="369" desc="not encoded"><e>&#x171;</e></char>
+<char dec="370" desc="not encoded"><e>&#x172;</e></char>
+<char dec="371" desc="not encoded"><e>&#x173;</e></char>
+<char dec="372" desc="not encoded"><e>&#x174;</e></char>
+<char dec="373" desc="not encoded"><e>&#x175;</e></char>
+<char dec="374" desc="not encoded"><e>&#x176;</e></char>
+<char dec="375" desc="not encoded"><e>&#x177;</e></char>
+<char dec="376" desc="not encoded"><e>&#x178;</e></char>
+<char dec="377" desc="not encoded"><e>&#x179;</e></char>
+<char dec="378" desc="not encoded"><e>&#x17a;</e></char>
+<char dec="379" desc="not encoded"><e>&#x17b;</e></char>
+<char dec="380" desc="not encoded"><e>&#x17c;</e></char>
+<char dec="381" desc="not encoded"><e>&#x17d;</e></char>
+<char dec="382" desc="not encoded"><e>&#x17e;</e></char>
+<char dec="383" desc="not encoded"><e>&#x17f;</e></char>
+<char dec="384" desc="not encoded"><e>&#x180;</e></char>
+<char dec="385" desc="not encoded"><e>&#x181;</e></char>
+<char dec="386" desc="not encoded"><e>&#x182;</e></char>
+<char dec="387" desc="not encoded"><e>&#x183;</e></char>
+<char dec="388" desc="not encoded"><e>&#x184;</e></char>
+<char dec="389" desc="not encoded"><e>&#x185;</e></char>
+<char dec="390" desc="not encoded"><e>&#x186;</e></char>
+<char dec="391" desc="not encoded"><e>&#x187;</e></char>
+<char dec="392" desc="not encoded"><e>&#x188;</e></char>
+<char dec="393" desc="not encoded"><e>&#x189;</e></char>
+<char dec="394" desc="not encoded"><e>&#x18a;</e></char>
+<char dec="395" desc="not encoded"><e>&#x18b;</e></char>
+<char dec="396" desc="not encoded"><e>&#x18c;</e></char>
+<char dec="397" desc="not encoded"><e>&#x18d;</e></char>
+<char dec="398" desc="not encoded"><e>&#x18e;</e></char>
+<char dec="399" desc="not encoded"><e>&#x18f;</e></char>
+<char dec="400" desc="not encoded"><e>&#x190;</e></char>
+<char dec="401" desc="not encoded"><e>&#x191;</e></char>
+<char dec="402" desc="not encoded"><e>&#x192;</e></char>
+<char dec="403" desc="not encoded"><e>&#x193;</e></char>
+<char dec="404" desc="not encoded"><e>&#x194;</e></char>
+<char dec="405" desc="not encoded"><e>&#x195;</e></char>
+<char dec="406" desc="not encoded"><e>&#x196;</e></char>
+<char dec="407" desc="not encoded"><e>&#x197;</e></char>
+<char dec="408" desc="not encoded"><e>&#x198;</e></char>
+<char dec="409" desc="not encoded"><e>&#x199;</e></char>
+<char dec="410" desc="not encoded"><e>&#x19a;</e></char>
+<char dec="411" desc="not encoded"><e>&#x19b;</e></char>
+<char dec="412" desc="not encoded"><e>&#x19c;</e></char>
+<char dec="413" desc="not encoded"><e>&#x19d;</e></char>
+<char dec="414" desc="not encoded"><e>&#x19e;</e></char>
+<char dec="415" desc="not encoded"><e>&#x19f;</e></char>
+<char dec="416" desc="not encoded"><e>&#x1a0;</e></char>
+<char dec="417" desc="not encoded"><e>&#x1a1;</e></char>
+<char dec="418" desc="not encoded"><e>&#x1a2;</e></char>
+<char dec="419" desc="not encoded"><e>&#x1a3;</e></char>
+<char dec="420" desc="not encoded"><e>&#x1a4;</e></char>
+<char dec="421" desc="not encoded"><e>&#x1a5;</e></char>
+<char dec="422" desc="not encoded"><e>&#x1a6;</e></char>
+<char dec="423" desc="not encoded"><e>&#x1a7;</e></char>
+<char dec="424" desc="not encoded"><e>&#x1a8;</e></char>
+<char dec="425" desc="not encoded"><e>&#x1a9;</e></char>
+<char dec="426" desc="not encoded"><e>&#x1aa;</e></char>
+<char dec="427" desc="not encoded"><e>&#x1ab;</e></char>
+<char dec="428" desc="not encoded"><e>&#x1ac;</e></char>
+<char dec="429" desc="not encoded"><e>&#x1ad;</e></char>
+<char dec="430" desc="not encoded"><e>&#x1ae;</e></char>
+<char dec="431" desc="not encoded"><e>&#x1af;</e></char>
+<char dec="432" desc="not encoded"><e>&#x1b0;</e></char>
+<char dec="433" desc="not encoded"><e>&#x1b1;</e></char>
+<char dec="434" desc="not encoded"><e>&#x1b2;</e></char>
+<char dec="435" desc="not encoded"><e>&#x1b3;</e></char>
+<char dec="436" desc="not encoded"><e>&#x1b4;</e></char>
+<char dec="437" desc="not encoded"><e>&#x1b5;</e></char>
+<char dec="438" desc="not encoded"><e>&#x1b6;</e></char>
+<char dec="439" desc="not encoded"><e>&#x1b7;</e></char>
+<char dec="440" desc="not encoded"><e>&#x1b8;</e></char>
+<char dec="441" desc="not encoded"><e>&#x1b9;</e></char>
+<char dec="442" desc="not encoded"><e>&#x1ba;</e></char>
+<char dec="443" desc="not encoded"><e>&#x1bb;</e></char>
+<char dec="444" desc="not encoded"><e>&#x1bc;</e></char>
+<char dec="445" desc="not encoded"><e>&#x1bd;</e></char>
+<char dec="446" desc="not encoded"><e>&#x1be;</e></char>
+<char dec="447" desc="not encoded"><e>&#x1bf;</e></char>
+<char dec="448" desc="not encoded"><e>&#x1c0;</e></char>
+<char dec="449" desc="not encoded"><e>&#x1c1;</e></char>
+<char dec="450" desc="not encoded"><e>&#x1c2;</e></char>
+<char dec="451" desc="not encoded"><e>&#x1c3;</e></char>
+<char dec="452" desc="not encoded"><e>&#x1c4;</e></char>
+<char dec="453" desc="not encoded"><e>&#x1c5;</e></char>
+<char dec="454" desc="not encoded"><e>&#x1c6;</e></char>
+<char dec="455" desc="not encoded"><e>&#x1c7;</e></char>
+<char dec="456" desc="not encoded"><e>&#x1c8;</e></char>
+<char dec="457" desc="not encoded"><e>&#x1c9;</e></char>
+<char dec="458" desc="not encoded"><e>&#x1ca;</e></char>
+<char dec="459" desc="not encoded"><e>&#x1cb;</e></char>
+<char dec="460" desc="not encoded"><e>&#x1cc;</e></char>
+<char dec="461" desc="not encoded"><e>&#x1cd;</e></char>
+<char dec="462" desc="not encoded"><e>&#x1ce;</e></char>
+<char dec="463" desc="not encoded"><e>&#x1cf;</e></char>
+<char dec="464" desc="not encoded"><e>&#x1d0;</e></char>
+<char dec="465" desc="not encoded"><e>&#x1d1;</e></char>
+<char dec="466" desc="not encoded"><e>&#x1d2;</e></char>
+<char dec="467" desc="not encoded"><e>&#x1d3;</e></char>
+<char dec="468" desc="not encoded"><e>&#x1d4;</e></char>
+<char dec="469" desc="not encoded"><e>&#x1d5;</e></char>
+<char dec="470" desc="not encoded"><e>&#x1d6;</e></char>
+<char dec="471" desc="not encoded"><e>&#x1d7;</e></char>
+<char dec="472" desc="not encoded"><e>&#x1d8;</e></char>
+<char dec="473" desc="not encoded"><e>&#x1d9;</e></char>
+<char dec="474" desc="not encoded"><e>&#x1da;</e></char>
+<char dec="475" desc="not encoded"><e>&#x1db;</e></char>
+<char dec="476" desc="not encoded"><e>&#x1dc;</e></char>
+<char dec="477" desc="not encoded"><e>&#x1dd;</e></char>
+<char dec="478" desc="not encoded"><e>&#x1de;</e></char>
+<char dec="479" desc="not encoded"><e>&#x1df;</e></char>
+<char dec="480" desc="not encoded"><e>&#x1e0;</e></char>
+<char dec="481" desc="not encoded"><e>&#x1e1;</e></char>
+<char dec="482" desc="not encoded"><e>&#x1e2;</e></char>
+<char dec="483" desc="not encoded"><e>&#x1e3;</e></char>
+<char dec="484" desc="not encoded"><e>&#x1e4;</e></char>
+<char dec="485" desc="not encoded"><e>&#x1e5;</e></char>
+<char dec="486" desc="not encoded"><e>&#x1e6;</e></char>
+<char dec="487" desc="not encoded"><e>&#x1e7;</e></char>
+<char dec="488" desc="not encoded"><e>&#x1e8;</e></char>
+<char dec="489" desc="not encoded"><e>&#x1e9;</e></char>
+<char dec="490" desc="not encoded"><e>&#x1ea;</e></char>
+<char dec="491" desc="not encoded"><e>&#x1eb;</e></char>
+<char dec="492" desc="not encoded"><e>&#x1ec;</e></char>
+<char dec="493" desc="not encoded"><e>&#x1ed;</e></char>
+<char dec="494" desc="not encoded"><e>&#x1ee;</e></char>
+<char dec="495" desc="not encoded"><e>&#x1ef;</e></char>
+<char dec="496" desc="not encoded"><e>&#x1f0;</e></char>
+<char dec="497" desc="not encoded"><e>&#x1f1;</e></char>
+<char dec="498" desc="not encoded"><e>&#x1f2;</e></char>
+<char dec="499" desc="not encoded"><e>&#x1f3;</e></char>
+<char dec="500" desc="not encoded"><e>&#x1f4;</e></char>
+<char dec="501" desc="not encoded"><e>&#x1f5;</e></char>
+<char dec="502" desc="not encoded"><e>&#x1f6;</e></char>
+<char dec="503" desc="not encoded"><e>&#x1f7;</e></char>
+<char dec="504" desc="not encoded"><e>&#x1f8;</e></char>
+<char dec="505" desc="not encoded"><e>&#x1f9;</e></char>
+<char dec="506" desc="not encoded"><e>&#x1fa;</e></char>
+<char dec="507" desc="not encoded"><e>&#x1fb;</e></char>
+<char dec="508" desc="not encoded"><e>&#x1fc;</e></char>
+<char dec="509" desc="not encoded"><e>&#x1fd;</e></char>
+<char dec="510" desc="not encoded"><e>&#x1fe;</e></char>
+<char dec="511" desc="not encoded"><e>&#x1ff;</e></char>
+<char dec="512" desc="not encoded"><e>&#x200;</e></char>
+<char dec="513" desc="not encoded"><e>&#x201;</e></char>
+<char dec="514" desc="not encoded"><e>&#x202;</e></char>
+<char dec="515" desc="not encoded"><e>&#x203;</e></char>
+<char dec="516" desc="not encoded"><e>&#x204;</e></char>
+<char dec="517" desc="not encoded"><e>&#x205;</e></char>
+<char dec="518" desc="not encoded"><e>&#x206;</e></char>
+<char dec="519" desc="not encoded"><e>&#x207;</e></char>
+<char dec="520" desc="not encoded"><e>&#x208;</e></char>
+<char dec="521" desc="not encoded"><e>&#x209;</e></char>
+<char dec="522" desc="not encoded"><e>&#x20a;</e></char>
+<char dec="523" desc="not encoded"><e>&#x20b;</e></char>
+<char dec="524" desc="not encoded"><e>&#x20c;</e></char>
+<char dec="525" desc="not encoded"><e>&#x20d;</e></char>
+<char dec="526" desc="not encoded"><e>&#x20e;</e></char>
+<char dec="527" desc="not encoded"><e>&#x20f;</e></char>
+<char dec="528" desc="not encoded"><e>&#x210;</e></char>
+<char dec="529" desc="not encoded"><e>&#x211;</e></char>
+<char dec="530" desc="not encoded"><e>&#x212;</e></char>
+<char dec="531" desc="not encoded"><e>&#x213;</e></char>
+<char dec="532" desc="not encoded"><e>&#x214;</e></char>
+<char dec="533" desc="not encoded"><e>&#x215;</e></char>
+<char dec="534" desc="not encoded"><e>&#x216;</e></char>
+<char dec="535" desc="not encoded"><e>&#x217;</e></char>
+<char dec="536" desc="not encoded"><e>&#x218;</e></char>
+<char dec="537" desc="not encoded"><e>&#x219;</e></char>
+<char dec="538" desc="not encoded"><e>&#x21a;</e></char>
+<char dec="539" desc="not encoded"><e>&#x21b;</e></char>
+<char dec="540" desc="not encoded"><e>&#x21c;</e></char>
+<char dec="541" desc="not encoded"><e>&#x21d;</e></char>
+<char dec="542" desc="not encoded"><e>&#x21e;</e></char>
+<char dec="543" desc="not encoded"><e>&#x21f;</e></char>
+<char dec="544" desc="not encoded"><e>&#x220;</e></char>
+<char dec="545" desc="not encoded"><e>&#x221;</e></char>
+<char dec="546" desc="not encoded"><e>&#x222;</e></char>
+<char dec="547" desc="not encoded"><e>&#x223;</e></char>
+<char dec="548" desc="not encoded"><e>&#x224;</e></char>
+<char dec="549" desc="not encoded"><e>&#x225;</e></char>
+<char dec="550" desc="not encoded"><e>&#x226;</e></char>
+<char dec="551" desc="not encoded"><e>&#x227;</e></char>
+<char dec="552" desc="not encoded"><e>&#x228;</e></char>
+<char dec="553" desc="not encoded"><e>&#x229;</e></char>
+<char dec="554" desc="not encoded"><e>&#x22a;</e></char>
+<char dec="555" desc="not encoded"><e>&#x22b;</e></char>
+<char dec="556" desc="not encoded"><e>&#x22c;</e></char>
+<char dec="557" desc="not encoded"><e>&#x22d;</e></char>
+<char dec="558" desc="not encoded"><e>&#x22e;</e></char>
+<char dec="559" desc="not encoded"><e>&#x22f;</e></char>
+<char dec="560" desc="not encoded"><e>&#x230;</e></char>
+<char dec="561" desc="not encoded"><e>&#x231;</e></char>
+<char dec="562" desc="not encoded"><e>&#x232;</e></char>
+<char dec="563" desc="not encoded"><e>&#x233;</e></char>
+<char dec="564" desc="not encoded"><e>&#x234;</e></char>
+<char dec="565" desc="not encoded"><e>&#x235;</e></char>
+<char dec="566" desc="not encoded"><e>&#x236;</e></char>
+<char dec="567" desc="not encoded"><e>&#x237;</e></char>
+<char dec="568" desc="not encoded"><e>&#x238;</e></char>
+<char dec="569" desc="not encoded"><e>&#x239;</e></char>
+<char dec="570" desc="not encoded"><e>&#x23a;</e></char>
+<char dec="571" desc="not encoded"><e>&#x23b;</e></char>
+<char dec="572" desc="not encoded"><e>&#x23c;</e></char>
+<char dec="573" desc="not encoded"><e>&#x23d;</e></char>
+<char dec="574" desc="not encoded"><e>&#x23e;</e></char>
+<char dec="575" desc="not encoded"><e>&#x23f;</e></char>
+<char dec="576" desc="not encoded"><e>&#x240;</e></char>
+<char dec="577" desc="not encoded"><e>&#x241;</e></char>
+<char dec="578" desc="not encoded"><e>&#x242;</e></char>
+<char dec="579" desc="not encoded"><e>&#x243;</e></char>
+<char dec="580" desc="not encoded"><e>&#x244;</e></char>
+<char dec="581" desc="not encoded"><e>&#x245;</e></char>
+<char dec="582" desc="not encoded"><e>&#x246;</e></char>
+<char dec="583" desc="not encoded"><e>&#x247;</e></char>
+<char dec="584" desc="not encoded"><e>&#x248;</e></char>
+<char dec="585" desc="not encoded"><e>&#x249;</e></char>
+<char dec="586" desc="not encoded"><e>&#x24a;</e></char>
+<char dec="587" desc="not encoded"><e>&#x24b;</e></char>
+<char dec="588" desc="not encoded"><e>&#x24c;</e></char>
+<char dec="589" desc="not encoded"><e>&#x24d;</e></char>
+<char dec="590" desc="not encoded"><e>&#x24e;</e></char>
+<char dec="591" desc="not encoded"><e>&#x24f;</e></char>
+<char dec="592" desc="not encoded"><e>&#x250;</e></char>
+<char dec="593" desc="not encoded"><e>&#x251;</e></char>
+<char dec="594" desc="not encoded"><e>&#x252;</e></char>
+<char dec="595" desc="not encoded"><e>&#x253;</e></char>
+<char dec="596" desc="not encoded"><e>&#x254;</e></char>
+<char dec="597" desc="not encoded"><e>&#x255;</e></char>
+<char dec="598" desc="not encoded"><e>&#x256;</e></char>
+<char dec="599" desc="not encoded"><e>&#x257;</e></char>
+<char dec="600" desc="not encoded"><e>&#x258;</e></char>
+<char dec="601" desc="not encoded"><e>&#x259;</e></char>
+<char dec="602" desc="not encoded"><e>&#x25a;</e></char>
+<char dec="603" desc="not encoded"><e>&#x25b;</e></char>
+<char dec="604" desc="not encoded"><e>&#x25c;</e></char>
+<char dec="605" desc="not encoded"><e>&#x25d;</e></char>
+<char dec="606" desc="not encoded"><e>&#x25e;</e></char>
+<char dec="607" desc="not encoded"><e>&#x25f;</e></char>
+<char dec="608" desc="not encoded"><e>&#x260;</e></char>
+<char dec="609" desc="not encoded"><e>&#x261;</e></char>
+<char dec="610" desc="not encoded"><e>&#x262;</e></char>
+<char dec="611" desc="not encoded"><e>&#x263;</e></char>
+<char dec="612" desc="not encoded"><e>&#x264;</e></char>
+<char dec="613" desc="not encoded"><e>&#x265;</e></char>
+<char dec="614" desc="not encoded"><e>&#x266;</e></char>
+<char dec="615" desc="not encoded"><e>&#x267;</e></char>
+<char dec="616" desc="not encoded"><e>&#x268;</e></char>
+<char dec="617" desc="not encoded"><e>&#x269;</e></char>
+<char dec="618" desc="not encoded"><e>&#x26a;</e></char>
+<char dec="619" desc="not encoded"><e>&#x26b;</e></char>
+<char dec="620" desc="not encoded"><e>&#x26c;</e></char>
+<char dec="621" desc="not encoded"><e>&#x26d;</e></char>
+<char dec="622" desc="not encoded"><e>&#x26e;</e></char>
+<char dec="623" desc="not encoded"><e>&#x26f;</e></char>
+<char dec="624" desc="not encoded"><e>&#x270;</e></char>
+<char dec="625" desc="not encoded"><e>&#x271;</e></char>
+<char dec="626" desc="not encoded"><e>&#x272;</e></char>
+<char dec="627" desc="not encoded"><e>&#x273;</e></char>
+<char dec="628" desc="not encoded"><e>&#x274;</e></char>
+<char dec="629" desc="not encoded"><e>&#x275;</e></char>
+<char dec="630" desc="not encoded"><e>&#x276;</e></char>
+<char dec="631" desc="not encoded"><e>&#x277;</e></char>
+<char dec="632" desc="not encoded"><e>&#x278;</e></char>
+<char dec="633" desc="not encoded"><e>&#x279;</e></char>
+<char dec="634" desc="not encoded"><e>&#x27a;</e></char>
+<char dec="635" desc="not encoded"><e>&#x27b;</e></char>
+<char dec="636" desc="not encoded"><e>&#x27c;</e></char>
+<char dec="637" desc="not encoded"><e>&#x27d;</e></char>
+<char dec="638" desc="not encoded"><e>&#x27e;</e></char>
+<char dec="639" desc="not encoded"><e>&#x27f;</e></char>
+<char dec="640" desc="not encoded"><e>&#x280;</e></char>
+<char dec="641" desc="not encoded"><e>&#x281;</e></char>
+<char dec="642" desc="not encoded"><e>&#x282;</e></char>
+<char dec="643" desc="not encoded"><e>&#x283;</e></char>
+<char dec="644" desc="not encoded"><e>&#x284;</e></char>
+<char dec="645" desc="not encoded"><e>&#x285;</e></char>
+<char dec="646" desc="not encoded"><e>&#x286;</e></char>
+<char dec="647" desc="not encoded"><e>&#x287;</e></char>
+<char dec="648" desc="not encoded"><e>&#x288;</e></char>
+<char dec="649" desc="not encoded"><e>&#x289;</e></char>
+<char dec="650" desc="not encoded"><e>&#x28a;</e></char>
+<char dec="651" desc="not encoded"><e>&#x28b;</e></char>
+<char dec="652" desc="not encoded"><e>&#x28c;</e></char>
+<char dec="653" desc="not encoded"><e>&#x28d;</e></char>
+<char dec="654" desc="not encoded"><e>&#x28e;</e></char>
+<char dec="655" desc="not encoded"><e>&#x28f;</e></char>
+<char dec="656" desc="not encoded"><e>&#x290;</e></char>
+<char dec="657" desc="not encoded"><e>&#x291;</e></char>
+<char dec="658" desc="not encoded"><e>&#x292;</e></char>
+<char dec="659" desc="not encoded"><e>&#x293;</e></char>
+<char dec="660" desc="not encoded"><e>&#x294;</e></char>
+<char dec="661" desc="not encoded"><e>&#x295;</e></char>
+<char dec="662" desc="not encoded"><e>&#x296;</e></char>
+<char dec="663" desc="not encoded"><e>&#x297;</e></char>
+<char dec="664" desc="not encoded"><e>&#x298;</e></char>
+<char dec="665" desc="not encoded"><e>&#x299;</e></char>
+<char dec="666" desc="not encoded"><e>&#x29a;</e></char>
+<char dec="667" desc="not encoded"><e>&#x29b;</e></char>
+<char dec="668" desc="not encoded"><e>&#x29c;</e></char>
+<char dec="669" desc="not encoded"><e>&#x29d;</e></char>
+<char dec="670" desc="not encoded"><e>&#x29e;</e></char>
+<char dec="671" desc="not encoded"><e>&#x29f;</e></char>
+<char dec="672" desc="not encoded"><e>&#x2a0;</e></char>
+<char dec="673" desc="not encoded"><e>&#x2a1;</e></char>
+<char dec="674" desc="not encoded"><e>&#x2a2;</e></char>
+<char dec="675" desc="not encoded"><e>&#x2a3;</e></char>
+<char dec="676" desc="not encoded"><e>&#x2a4;</e></char>
+<char dec="677" desc="not encoded"><e>&#x2a5;</e></char>
+<char dec="678" desc="not encoded"><e>&#x2a6;</e></char>
+<char dec="679" desc="not encoded"><e>&#x2a7;</e></char>
+<char dec="680" desc="not encoded"><e>&#x2a8;</e></char>
+<char dec="681" desc="not encoded"><e>&#x2a9;</e></char>
+<char dec="682" desc="not encoded"><e>&#x2aa;</e></char>
+<char dec="683" desc="not encoded"><e>&#x2ab;</e></char>
+<char dec="684" desc="not encoded"><e>&#x2ac;</e></char>
+<char dec="685" desc="not encoded"><e>&#x2ad;</e></char>
+<char dec="686" desc="not encoded"><e>&#x2ae;</e></char>
+<char dec="687" desc="not encoded"><e>&#x2af;</e></char>
+<char dec="688" desc="not encoded"><e>&#x2b0;</e></char>
+<char dec="689" desc="not encoded"><e>&#x2b1;</e></char>
+<char dec="690" desc="not encoded"><e>&#x2b2;</e></char>
+<char dec="691" desc="not encoded"><e>&#x2b3;</e></char>
+<char dec="692" desc="not encoded"><e>&#x2b4;</e></char>
+<char dec="693" desc="not encoded"><e>&#x2b5;</e></char>
+<char dec="694" desc="not encoded"><e>&#x2b6;</e></char>
+<char dec="695" desc="not encoded"><e>&#x2b7;</e></char>
+<char dec="696" desc="not encoded"><e>&#x2b8;</e></char>
+<char dec="697" desc="not encoded"><e>&#x2b9;</e></char>
+<char dec="698" desc="not encoded"><e>&#x2ba;</e></char>
+<char dec="699" desc="not encoded"><e>&#x2bb;</e></char>
+<char dec="700" desc="MODIFIER LETTER APOSTROPHE"><c>¢</c><e>&#x2bc;</e></char>
+<char dec="701" desc="MODIFIER LETTER REVERSED COMMA"><c>¡</c><e>&#x2bd;</e></char>
+<char dec="702" desc="not encoded"><e>&#x2be;</e></char>
+<char dec="703" desc="not encoded"><e>&#x2bf;</e></char>
+<char dec="704" desc="not encoded"><e>&#x2c0;</e></char>
+<char dec="705" desc="not encoded"><e>&#x2c1;</e></char>
+<char dec="706" desc="not encoded"><e>&#x2c2;</e></char>
+<char dec="707" desc="not encoded"><e>&#x2c3;</e></char>
+<char dec="708" desc="not encoded"><e>&#x2c4;</e></char>
+<char dec="709" desc="not encoded"><e>&#x2c5;</e></char>
+<char dec="710" desc="not encoded"><e>&#x2c6;</e></char>
+<char dec="711" desc="not encoded"><e>&#x2c7;</e></char>
+<char dec="712" desc="not encoded"><e>&#x2c8;</e></char>
+<char dec="713" desc="not encoded"><e>&#x2c9;</e></char>
+<char dec="714" desc="not encoded"><e>&#x2ca;</e></char>
+<char dec="715" desc="not encoded"><e>&#x2cb;</e></char>
+<char dec="716" desc="not encoded"><e>&#x2cc;</e></char>
+<char dec="717" desc="not encoded"><e>&#x2cd;</e></char>
+<char dec="718" desc="not encoded"><e>&#x2ce;</e></char>
+<char dec="719" desc="not encoded"><e>&#x2cf;</e></char>
+<char dec="720" desc="not encoded"><e>&#x2d0;</e></char>
+<char dec="721" desc="not encoded"><e>&#x2d1;</e></char>
+<char dec="722" desc="not encoded"><e>&#x2d2;</e></char>
+<char dec="723" desc="not encoded"><e>&#x2d3;</e></char>
+<char dec="724" desc="not encoded"><e>&#x2d4;</e></char>
+<char dec="725" desc="not encoded"><e>&#x2d5;</e></char>
+<char dec="726" desc="not encoded"><e>&#x2d6;</e></char>
+<char dec="727" desc="not encoded"><e>&#x2d7;</e></char>
+<char dec="728" desc="not encoded"><e>&#x2d8;</e></char>
+<char dec="729" desc="not encoded"><e>&#x2d9;</e></char>
+<char dec="730" desc="not encoded"><e>&#x2da;</e></char>
+<char dec="731" desc="not encoded"><e>&#x2db;</e></char>
+<char dec="732" desc="not encoded"><e>&#x2dc;</e></char>
+<char dec="733" desc="not encoded"><e>&#x2dd;</e></char>
+<char dec="734" desc="not encoded"><e>&#x2de;</e></char>
+<char dec="735" desc="not encoded"><e>&#x2df;</e></char>
+<char dec="736" desc="not encoded"><e>&#x2e0;</e></char>
+<char dec="737" desc="not encoded"><e>&#x2e1;</e></char>
+<char dec="738" desc="not encoded"><e>&#x2e2;</e></char>
+<char dec="739" desc="not encoded"><e>&#x2e3;</e></char>
+<char dec="740" desc="not encoded"><e>&#x2e4;</e></char>
+<char dec="741" desc="not encoded"><e>&#x2e5;</e></char>
+<char dec="742" desc="not encoded"><e>&#x2e6;</e></char>
+<char dec="743" desc="not encoded"><e>&#x2e7;</e></char>
+<char dec="744" desc="not encoded"><e>&#x2e8;</e></char>
+<char dec="745" desc="not encoded"><e>&#x2e9;</e></char>
+<char dec="746" desc="not encoded"><e>&#x2ea;</e></char>
+<char dec="747" desc="not encoded"><e>&#x2eb;</e></char>
+<char dec="748" desc="not encoded"><e>&#x2ec;</e></char>
+<char dec="749" desc="not encoded"><e>&#x2ed;</e></char>
+<char dec="750" desc="not encoded"><e>&#x2ee;</e></char>
+<char dec="751" desc="not encoded"><e>&#x2ef;</e></char>
+<char dec="752" desc="not encoded"><e>&#x2f0;</e></char>
+<char dec="753" desc="not encoded"><e>&#x2f1;</e></char>
+<char dec="754" desc="not encoded"><e>&#x2f2;</e></char>
+<char dec="755" desc="not encoded"><e>&#x2f3;</e></char>
+<char dec="756" desc="not encoded"><e>&#x2f4;</e></char>
+<char dec="757" desc="not encoded"><e>&#x2f5;</e></char>
+<char dec="758" desc="not encoded"><e>&#x2f6;</e></char>
+<char dec="759" desc="not encoded"><e>&#x2f7;</e></char>
+<char dec="760" desc="not encoded"><e>&#x2f8;</e></char>
+<char dec="761" desc="not encoded"><e>&#x2f9;</e></char>
+<char dec="762" desc="not encoded"><e>&#x2fa;</e></char>
+<char dec="763" desc="not encoded"><e>&#x2fb;</e></char>
+<char dec="764" desc="not encoded"><e>&#x2fc;</e></char>
+<char dec="765" desc="not encoded"><e>&#x2fd;</e></char>
+<char dec="766" desc="not encoded"><e>&#x2fe;</e></char>
+<char dec="767" desc="not encoded"><e>&#x2ff;</e></char>
+<char dec="768" desc="not encoded"><e>&#x300;</e></char>
+<char dec="769" desc="not encoded"><e>&#x301;</e></char>
+<char dec="770" desc="not encoded"><e>&#x302;</e></char>
+<char dec="771" desc="not encoded"><e>&#x303;</e></char>
+<char dec="772" desc="not encoded"><e>&#x304;</e></char>
+<char dec="773" desc="not encoded"><e>&#x305;</e></char>
+<char dec="774" desc="not encoded"><e>&#x306;</e></char>
+<char dec="775" desc="not encoded"><e>&#x307;</e></char>
+<char dec="776" desc="not encoded"><e>&#x308;</e></char>
+<char dec="777" desc="not encoded"><e>&#x309;</e></char>
+<char dec="778" desc="not encoded"><e>&#x30a;</e></char>
+<char dec="779" desc="not encoded"><e>&#x30b;</e></char>
+<char dec="780" desc="not encoded"><e>&#x30c;</e></char>
+<char dec="781" desc="not encoded"><e>&#x30d;</e></char>
+<char dec="782" desc="not encoded"><e>&#x30e;</e></char>
+<char dec="783" desc="not encoded"><e>&#x30f;</e></char>
+<char dec="784" desc="not encoded"><e>&#x310;</e></char>
+<char dec="785" desc="not encoded"><e>&#x311;</e></char>
+<char dec="786" desc="not encoded"><e>&#x312;</e></char>
+<char dec="787" desc="not encoded"><e>&#x313;</e></char>
+<char dec="788" desc="not encoded"><e>&#x314;</e></char>
+<char dec="789" desc="not encoded"><e>&#x315;</e></char>
+<char dec="790" desc="not encoded"><e>&#x316;</e></char>
+<char dec="791" desc="not encoded"><e>&#x317;</e></char>
+<char dec="792" desc="not encoded"><e>&#x318;</e></char>
+<char dec="793" desc="not encoded"><e>&#x319;</e></char>
+<char dec="794" desc="not encoded"><e>&#x31a;</e></char>
+<char dec="795" desc="not encoded"><e>&#x31b;</e></char>
+<char dec="796" desc="not encoded"><e>&#x31c;</e></char>
+<char dec="797" desc="not encoded"><e>&#x31d;</e></char>
+<char dec="798" desc="not encoded"><e>&#x31e;</e></char>
+<char dec="799" desc="not encoded"><e>&#x31f;</e></char>
+<char dec="800" desc="not encoded"><e>&#x320;</e></char>
+<char dec="801" desc="not encoded"><e>&#x321;</e></char>
+<char dec="802" desc="not encoded"><e>&#x322;</e></char>
+<char dec="803" desc="not encoded"><e>&#x323;</e></char>
+<char dec="804" desc="not encoded"><e>&#x324;</e></char>
+<char dec="805" desc="not encoded"><e>&#x325;</e></char>
+<char dec="806" desc="not encoded"><e>&#x326;</e></char>
+<char dec="807" desc="not encoded"><e>&#x327;</e></char>
+<char dec="808" desc="not encoded"><e>&#x328;</e></char>
+<char dec="809" desc="not encoded"><e>&#x329;</e></char>
+<char dec="810" desc="not encoded"><e>&#x32a;</e></char>
+<char dec="811" desc="not encoded"><e>&#x32b;</e></char>
+<char dec="812" desc="not encoded"><e>&#x32c;</e></char>
+<char dec="813" desc="not encoded"><e>&#x32d;</e></char>
+<char dec="814" desc="not encoded"><e>&#x32e;</e></char>
+<char dec="815" desc="not encoded"><e>&#x32f;</e></char>
+<char dec="816" desc="not encoded"><e>&#x330;</e></char>
+<char dec="817" desc="not encoded"><e>&#x331;</e></char>
+<char dec="818" desc="not encoded"><e>&#x332;</e></char>
+<char dec="819" desc="not encoded"><e>&#x333;</e></char>
+<char dec="820" desc="not encoded"><e>&#x334;</e></char>
+<char dec="821" desc="not encoded"><e>&#x335;</e></char>
+<char dec="822" desc="not encoded"><e>&#x336;</e></char>
+<char dec="823" desc="not encoded"><e>&#x337;</e></char>
+<char dec="824" desc="not encoded"><e>&#x338;</e></char>
+<char dec="825" desc="not encoded"><e>&#x339;</e></char>
+<char dec="826" desc="not encoded"><e>&#x33a;</e></char>
+<char dec="827" desc="not encoded"><e>&#x33b;</e></char>
+<char dec="828" desc="not encoded"><e>&#x33c;</e></char>
+<char dec="829" desc="not encoded"><e>&#x33d;</e></char>
+<char dec="830" desc="not encoded"><e>&#x33e;</e></char>
+<char dec="831" desc="not encoded"><e>&#x33f;</e></char>
+<char dec="832" desc="not encoded"><e>&#x340;</e></char>
+<char dec="833" desc="not encoded"><e>&#x341;</e></char>
+<char dec="834" desc="not encoded"><e>&#x342;</e></char>
+<char dec="835" desc="not encoded"><e>&#x343;</e></char>
+<char dec="836" desc="not encoded"><e>&#x344;</e></char>
+<char dec="837" desc="not encoded"><e>&#x345;</e></char>
+<char dec="838" desc="not encoded"><e>&#x346;</e></char>
+<char dec="839" desc="not encoded"><e>&#x347;</e></char>
+<char dec="840" desc="not encoded"><e>&#x348;</e></char>
+<char dec="841" desc="not encoded"><e>&#x349;</e></char>
+<char dec="842" desc="not encoded"><e>&#x34a;</e></char>
+<char dec="843" desc="not encoded"><e>&#x34b;</e></char>
+<char dec="844" desc="not encoded"><e>&#x34c;</e></char>
+<char dec="845" desc="not encoded"><e>&#x34d;</e></char>
+<char dec="846" desc="not encoded"><e>&#x34e;</e></char>
+<char dec="847" desc="not encoded"><e>&#x34f;</e></char>
+<char dec="848" desc="not encoded"><e>&#x350;</e></char>
+<char dec="849" desc="not encoded"><e>&#x351;</e></char>
+<char dec="850" desc="not encoded"><e>&#x352;</e></char>
+<char dec="851" desc="not encoded"><e>&#x353;</e></char>
+<char dec="852" desc="not encoded"><e>&#x354;</e></char>
+<char dec="853" desc="not encoded"><e>&#x355;</e></char>
+<char dec="854" desc="not encoded"><e>&#x356;</e></char>
+<char dec="855" desc="not encoded"><e>&#x357;</e></char>
+<char dec="856" desc="not encoded"><e>&#x358;</e></char>
+<char dec="857" desc="not encoded"><e>&#x359;</e></char>
+<char dec="858" desc="not encoded"><e>&#x35a;</e></char>
+<char dec="859" desc="not encoded"><e>&#x35b;</e></char>
+<char dec="860" desc="not encoded"><e>&#x35c;</e></char>
+<char dec="861" desc="not encoded"><e>&#x35d;</e></char>
+<char dec="862" desc="not encoded"><e>&#x35e;</e></char>
+<char dec="863" desc="not encoded"><e>&#x35f;</e></char>
+<char dec="864" desc="not encoded"><e>&#x360;</e></char>
+<char dec="865" desc="not encoded"><e>&#x361;</e></char>
+<char dec="866" desc="not encoded"><e>&#x362;</e></char>
+<char dec="867" desc="not encoded"><e>&#x363;</e></char>
+<char dec="868" desc="not encoded"><e>&#x364;</e></char>
+<char dec="869" desc="not encoded"><e>&#x365;</e></char>
+<char dec="870" desc="not encoded"><e>&#x366;</e></char>
+<char dec="871" desc="not encoded"><e>&#x367;</e></char>
+<char dec="872" desc="not encoded"><e>&#x368;</e></char>
+<char dec="873" desc="not encoded"><e>&#x369;</e></char>
+<char dec="874" desc="not encoded"><e>&#x36a;</e></char>
+<char dec="875" desc="not encoded"><e>&#x36b;</e></char>
+<char dec="876" desc="not encoded"><e>&#x36c;</e></char>
+<char dec="877" desc="not encoded"><e>&#x36d;</e></char>
+<char dec="878" desc="not encoded"><e>&#x36e;</e></char>
+<char dec="879" desc="not encoded"><e>&#x36f;</e></char>
+<char dec="880" desc="not encoded"><e>&#x370;</e></char>
+<char dec="881" desc="not encoded"><e>&#x371;</e></char>
+<char dec="882" desc="not encoded"><e>&#x372;</e></char>
+<char dec="883" desc="not encoded"><e>&#x373;</e></char>
+<char dec="884" desc="not encoded"><e>&#x374;</e></char>
+<char dec="885" desc="not encoded"><e>&#x375;</e></char>
+<char dec="886" desc="not encoded"><e>&#x376;</e></char>
+<char dec="887" desc="not encoded"><e>&#x377;</e></char>
+<char dec="888" desc="not encoded"><e>&#x378;</e></char>
+<char dec="889" desc="not encoded"><e>&#x379;</e></char>
+<char dec="890" desc="not encoded"><e>&#x37a;</e></char>
+<char dec="891" desc="not encoded"><e>&#x37b;</e></char>
+<char dec="892" desc="not encoded"><e>&#x37c;</e></char>
+<char dec="893" desc="not encoded"><e>&#x37d;</e></char>
+<char dec="894" desc="not encoded"><e>&#x37e;</e></char>
+<char dec="895" desc="not encoded"><e>&#x37f;</e></char>
+<char dec="896" desc="not encoded"><e>&#x380;</e></char>
+<char dec="897" desc="not encoded"><e>&#x381;</e></char>
+<char dec="898" desc="not encoded"><e>&#x382;</e></char>
+<char dec="899" desc="not encoded"><e>&#x383;</e></char>
+<char dec="900" desc="GREEK TONOS"><c>´</c><e>&#x384;</e></char>
+<char dec="901" desc="GREEK DIALYTIKA TONOS"><c>µ</c><e>&#x385;</e></char>
+<char dec="902" desc="GREEK CAPITAL LETTER ALPHA WITH TONOS"><c>¶</c><e>&#x386;</e></char>
+<char dec="903" desc="not encoded"><e>&#x387;</e></char>
+<char dec="904" desc="GREEK CAPITAL LETTER EPSILON WITH TONOS"><c>¸</c><e>&#x388;</e></char>
+<char dec="905" desc="GREEK CAPITAL LETTER ETA WITH TONOS"><c>¹</c><e>&#x389;</e></char>
+<char dec="906" desc="GREEK CAPITAL LETTER IOTA WITH TONOS"><c>º</c><e>&#x38a;</e></char>
+<char dec="907" desc="not encoded"><e>&#x38b;</e></char>
+<char dec="908" desc="GREEK CAPITAL LETTER OMICRON WITH TONOS"><c>¼</c><e>&#x38c;</e></char>
+<char dec="909" desc="not encoded"><e>&#x38d;</e></char>
+<char dec="910" desc="GREEK CAPITAL LETTER UPSILON WITH TONOS"><c>¾</c><e>&#x38e;</e></char>
+<char dec="911" desc="GREEK CAPITAL LETTER OMEGA WITH TONOS"><c>¿</c><e>&#x38f;</e></char>
+<char dec="912" desc="GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS"><c>À</c><e>&#x390;</e></char>
+<char dec="913" desc="GREEK CAPITAL LETTER ALPHA"><c>Á</c><e>&#x391;</e></char>
+<char dec="914" desc="GREEK CAPITAL LETTER BETA"><c>Â</c><e>&#x392;</e></char>
+<char dec="915" desc="GREEK CAPITAL LETTER GAMMA"><c>Ã</c><e>&#x393;</e></char>
+<char dec="916" desc="GREEK CAPITAL LETTER DELTA"><c>Ä</c><e>&#x394;</e></char>
+<char dec="917" desc="GREEK CAPITAL LETTER EPSILON"><c>Å</c><e>&#x395;</e></char>
+<char dec="918" desc="GREEK CAPITAL LETTER ZETA"><c>Æ</c><e>&#x396;</e></char>
+<char dec="919" desc="GREEK CAPITAL LETTER ETA"><c>Ç</c><e>&#x397;</e></char>
+<char dec="920" desc="GREEK CAPITAL LETTER THETA"><c>È</c><e>&#x398;</e></char>
+<char dec="921" desc="GREEK CAPITAL LETTER IOTA"><c>É</c><e>&#x399;</e></char>
+<char dec="922" desc="GREEK CAPITAL LETTER KAPPA"><c>Ê</c><e>&#x39a;</e></char>
+<char dec="923" desc="GREEK CAPITAL LETTER LAMDA"><c>Ë</c><e>&#x39b;</e></char>
+<char dec="924" desc="GREEK CAPITAL LETTER MU"><c>Ì</c><e>&#x39c;</e></char>
+<char dec="925" desc="GREEK CAPITAL LETTER NU"><c>Í</c><e>&#x39d;</e></char>
+<char dec="926" desc="GREEK CAPITAL LETTER XI"><c>Î</c><e>&#x39e;</e></char>
+<char dec="927" desc="GREEK CAPITAL LETTER OMICRON"><c>Ï</c><e>&#x39f;</e></char>
+<char dec="928" desc="GREEK CAPITAL LETTER PI"><c>Ð</c><e>&#x3a0;</e></char>
+<char dec="929" desc="GREEK CAPITAL LETTER RHO"><c>Ñ</c><e>&#x3a1;</e></char>
+<char dec="930" desc="not encoded"><e>&#x3a2;</e></char>
+<char dec="931" desc="GREEK CAPITAL LETTER SIGMA"><c>Ó</c><e>&#x3a3;</e></char>
+<char dec="932" desc="GREEK CAPITAL LETTER TAU"><c>Ô</c><e>&#x3a4;</e></char>
+<char dec="933" desc="GREEK CAPITAL LETTER UPSILON"><c>Õ</c><e>&#x3a5;</e></char>
+<char dec="934" desc="GREEK CAPITAL LETTER PHI"><c>Ö</c><e>&#x3a6;</e></char>
+<char dec="935" desc="GREEK CAPITAL LETTER CHI"><c>×</c><e>&#x3a7;</e></char>
+<char dec="936" desc="GREEK CAPITAL LETTER PSI"><c>Ø</c><e>&#x3a8;</e></char>
+<char dec="937" desc="GREEK CAPITAL LETTER OMEGA"><c>Ù</c><e>&#x3a9;</e></char>
+<char dec="938" desc="GREEK CAPITAL LETTER IOTA WITH DIALYTIKA"><c>Ú</c><e>&#x3aa;</e></char>
+<char dec="939" desc="GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA"><c>Û</c><e>&#x3ab;</e></char>
+<char dec="940" desc="GREEK SMALL LETTER ALPHA WITH TONOS"><c>Ü</c><e>&#x3ac;</e></char>
+<char dec="941" desc="GREEK SMALL LETTER EPSILON WITH TONOS"><c>Ý</c><e>&#x3ad;</e></char>
+<char dec="942" desc="GREEK SMALL LETTER ETA WITH TONOS"><c>Þ</c><e>&#x3ae;</e></char>
+<char dec="943" desc="GREEK SMALL LETTER IOTA WITH TONOS"><c>ß</c><e>&#x3af;</e></char>
+<char dec="944" desc="GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS"><c>à</c><e>&#x3b0;</e></char>
+<char dec="945" desc="GREEK SMALL LETTER ALPHA"><c>á</c><e>&#x3b1;</e></char>
+<char dec="946" desc="GREEK SMALL LETTER BETA"><c>â</c><e>&#x3b2;</e></char>
+<char dec="947" desc="GREEK SMALL LETTER GAMMA"><c>ã</c><e>&#x3b3;</e></char>
+<char dec="948" desc="GREEK SMALL LETTER DELTA"><c>ä</c><e>&#x3b4;</e></char>
+<char dec="949" desc="GREEK SMALL LETTER EPSILON"><c>å</c><e>&#x3b5;</e></char>
+<char dec="950" desc="GREEK SMALL LETTER ZETA"><c>æ</c><e>&#x3b6;</e></char>
+<char dec="951" desc="GREEK SMALL LETTER ETA"><c>ç</c><e>&#x3b7;</e></char>
+<char dec="952" desc="GREEK SMALL LETTER THETA"><c>è</c><e>&#x3b8;</e></char>
+<char dec="953" desc="GREEK SMALL LETTER IOTA"><c>é</c><e>&#x3b9;</e></char>
+<char dec="954" desc="GREEK SMALL LETTER KAPPA"><c>ê</c><e>&#x3ba;</e></char>
+<char dec="955" desc="GREEK SMALL LETTER LAMDA"><c>ë</c><e>&#x3bb;</e></char>
+<char dec="956" desc="GREEK SMALL LETTER MU"><c>ì</c><e>&#x3bc;</e></char>
+<char dec="957" desc="GREEK SMALL LETTER NU"><c>í</c><e>&#x3bd;</e></char>
+<char dec="958" desc="GREEK SMALL LETTER XI"><c>î</c><e>&#x3be;</e></char>
+<char dec="959" desc="GREEK SMALL LETTER OMICRON"><c>ï</c><e>&#x3bf;</e></char>
+<char dec="960" desc="GREEK SMALL LETTER PI"><c>ð</c><e>&#x3c0;</e></char>
+<char dec="961" desc="GREEK SMALL LETTER RHO"><c>ñ</c><e>&#x3c1;</e></char>
+<char dec="962" desc="GREEK SMALL LETTER FINAL SIGMA"><c>ò</c><e>&#x3c2;</e></char>
+<char dec="963" desc="GREEK SMALL LETTER SIGMA"><c>ó</c><e>&#x3c3;</e></char>
+<char dec="964" desc="GREEK SMALL LETTER TAU"><c>ô</c><e>&#x3c4;</e></char>
+<char dec="965" desc="GREEK SMALL LETTER UPSILON"><c>õ</c><e>&#x3c5;</e></char>
+<char dec="966" desc="GREEK SMALL LETTER PHI"><c>ö</c><e>&#x3c6;</e></char>
+<char dec="967" desc="GREEK SMALL LETTER CHI"><c>÷</c><e>&#x3c7;</e></char>
+<char dec="968" desc="GREEK SMALL LETTER PSI"><c>ø</c><e>&#x3c8;</e></char>
+<char dec="969" desc="GREEK SMALL LETTER OMEGA"><c>ù</c><e>&#x3c9;</e></char>
+<char dec="970" desc="GREEK SMALL LETTER IOTA WITH DIALYTIKA"><c>ú</c><e>&#x3ca;</e></char>
+<char dec="971" desc="GREEK SMALL LETTER UPSILON WITH DIALYTIKA"><c>û</c><e>&#x3cb;</e></char>
+<char dec="972" desc="GREEK SMALL LETTER OMICRON WITH TONOS"><c>ü</c><e>&#x3cc;</e></char>
+<char dec="973" desc="GREEK SMALL LETTER UPSILON WITH TONOS"><c>ý</c><e>&#x3cd;</e></char>
+<char dec="974" desc="GREEK SMALL LETTER OMEGA WITH TONOS"><c>þ</c><e>&#x3ce;</e></char>
+<char dec="975" desc="not encoded"><e>&#x3cf;</e></char>
+<char dec="976" desc="not encoded"><e>&#x3d0;</e></char>
+<char dec="977" desc="not encoded"><e>&#x3d1;</e></char>
+<char dec="978" desc="not encoded"><e>&#x3d2;</e></char>
+</chars>
+</chartables>
diff --git a/test/tests/contrib/enc/encSmoke.xsl b/test/tests/contrib/enc/encSmoke.xsl
new file mode 100644
index 0000000..959cc66
--- /dev/null
+++ b/test/tests/contrib/enc/encSmoke.xsl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" indent="yes"/>
+
+<!-- XML Encoding tests -->
+<!-- The generic Identity transform -->
+
+  <xsl:template match="chartables">
+    <out>
+      <xsl:apply-templates select="chars"/>
+    </out>
+  </xsl:template>
+
+
+  <!-- Only bother with characters actually in this encoding -->
+  <xsl:template match="chars">
+    <chars-out>
+      <xsl:attribute name="enc"><xsl:value-of select="@enc"/></xsl:attribute>
+      <xsl:apply-templates select="char[c]"/>
+    </chars-out>
+  </xsl:template>
+
+  <xsl:template match="char">
+    <char-out>
+      <xsl:attribute name="dec"><xsl:value-of select="@dec"/></xsl:attribute>
+      <xsl:attribute name="desc"><xsl:value-of select="@desc"/></xsl:attribute>
+      <xsl:apply-templates select="c | e"/>
+    </char-out>
+  </xsl:template>
+
+  <xsl:template match="c">
+    <c-out><xsl:call-template name="output-chars"/></c-out>
+  </xsl:template>
+
+  <xsl:template match="e">
+    <e-out><xsl:call-template name="output-chars"/></e-out>
+  </xsl:template>
+
+  <!-- Avoid extra whitespace to limit test -->
+  <xsl:template name="output-chars">
+    <cpo><xsl:copy-of select="."/></cpo>
+    <vo><xsl:value-of select="."/></vo>
+    <vod><xsl:value-of disable-output-escaping="yes" select="."/></vod>
+    <xsl:variable name="var" select="."/>
+    <var><xsl:value-of select="$var"/></var>
+    <vard><xsl:value-of disable-output-escaping="yes" select="$var"/></vard>
+  </xsl:template>
+
+<!-- Override plain text() processing -->
+<xsl:template match="text()"></xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/garypeskin/SAX2DTMDesign.html b/test/tests/contrib/garypeskin/SAX2DTMDesign.html
new file mode 100644
index 0000000..6094941
--- /dev/null
+++ b/test/tests/contrib/garypeskin/SAX2DTMDesign.html
@@ -0,0 +1,169 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<html><head><title></title></head><body>
+<center><h1>SAX2DTM Design Notes</h1></center>
+<p>The current implementation is subject to change and this class
+should be accessed only through published interface methods.  However,
+the following information is provided to aid in an understanding of how this
+class currently works and is provided for debugging purposes only.
+This implementation stores information about each node in a series of arrays.  Conceptually,
+the arrays can be thought of as either <code>String</code> Vectors or <code>int</code>
+Vectors although they are implemented using some internal classes. The <code>m_chars</code>
+array is conceptually a Vector of <code>chars</code>.  The chief arrays of
+interest are shown in the following table:</p>
+
+<table border="1"
+summary="Key arrays used: the first cell contains the array name and the second contains the
+ conceptual type, and the third contains the description of the contents">
+<tr>
+<th>Array Name</th>
+<th>Array Type</th>
+<th>Contents</th>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1"><code>m_exptype</code></td>
+<td rowspan="1" colspan="1">int</td>
+<td rowspan="1" colspan="1">An integer representing a unique value for a Node.  The first 6
+bits represent the Node type, as shown below.  The next 10 bits represent an index
+into m_namespaceNames.  The remaining 16 bits represent an index into m_locNamesPool.
+<b>Start here.</b>  This Vector represents the list of Nodes.</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1"><code>m_locNamesPool</code></td>
+<td rowspan="1" colspan="1">String</td>
+<td rowspan="1" colspan="1">Local (prefixed) names.  Field of m_expandedNameTable.</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1"><code>m_namespaceNames</code></td>
+<td rowspan="1" colspan="1">String</td>
+<td rowspan="1" colspan="1">Namespace URIs.  Field of m_expandedNameTable.</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1"><code>m_dataOrQName</code></td>
+<td rowspan="1" colspan="1">int</td>
+<td rowspan="1" colspan="1">An index into either m_data or m_valuesOrPrefixes, as explained
+in the next table.</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1"><code>m_valuesOrPrefixes</code></td>
+<td rowspan="1" colspan="1">String</td>
+<td rowspan="1" colspan="1">Values and prefixes.</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1"><code>m_data</code></td>
+<td rowspan="1" colspan="1">int</td>
+<td rowspan="1" colspan="1">Entries here occur in pairs.  The use of this array is explained
+in the next table.</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1"><code>m_chars</code></td>
+<td rowspan="1" colspan="1">char</td>
+<td rowspan="1" colspan="1">Characters used to form Strings as explained in the next table.</td>
+</tr>
+</table>
+
+<p>This table shows how the array values are used for each type of Node supported by
+this implementation.  An <i>n</i> represents an index into <code>m_namespaceNames</code>
+for the namespace URI associated with the attribute or element.  It actually consists
+of the 10 bits, including the rightmost two bits of the leftmost byte.  The <i>eeee</i>
+represents an index into <code>m_locNamesPool</code> for the value indicated in the table.</p>
+
+<table border="1"
+summary="Node table">
+<tr>
+<th>NodeType</th>
+<th>m_exptype</th>
+<th>m_dataOrQName</th>
+<th>m_data</th>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1">Attr</td>
+<td rowspan="1" colspan="1">&nbsp;08<i>neeee</i><br>-0b<i>neeee</i><br>
+<i>eeee</i> is local name of attribute.</td>
+<td rowspan="1" colspan="1"><b>No namespace</b>: an index into
+<code>m_valuesOrPrefixes</code> pointing to the attribute value.
+<br><b>Namespace</b>: a negative number, the absolute value of which is an index
+into m_data.</td>
+<td rowspan="1" colspan="1"><b>index</b>: an int containing the index into
+<code>m_valuesOrPrefixes</code> for the Attr QName.
+<br><b>index+1</b>: an int
+containing the index into <code>m_valuesOrPrefixes</code> for the attribute value.</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1">Comment</td>
+<td rowspan="1" colspan="1">&nbsp;20000000</td>
+<td rowspan="1" colspan="1">index into <code>m_valuesOrPrefixes</code>
+for comment text.</td>
+<td rowspan="1" colspan="1">unused</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1">Document</td>
+<td rowspan="1" colspan="1">&nbsp;24000000</td>
+<td rowspan="1" colspan="1">0</td>
+<td rowspan="1" colspan="1">unused</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1">Element</td>
+<td rowspan="1" colspan="1">&nbsp;04<i>neeee</i><br>-07<i>neeee</i><br>
+<i>eeee</i> is local name of element.</td>
+<td rowspan="1" colspan="1"><b>No namespace</b>: 0.
+<br><b>Namespace</b>: an index into
+<code>m_valuesOrPrefixes</code> pointing to the QName.</td>
+<td rowspan="1" colspan="1">unused</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1">Text</td>
+<td rowspan="1" colspan="1">&nbsp;0C000000</td>
+<td rowspan="1" colspan="1">an index into m_data.</td>
+<td rowspan="1" colspan="1"><b>index</b>: an int containing starting subscript in
+<code>m_chars</code> for the text.
+<br><b>index+1</b>: an int
+containing the length of the text.</td>
+
+<tr>
+<td rowspan="1" colspan="1">ProcessingInstruction</td>
+<td rowspan="1" colspan="1">&nbsp;1C0<i>eeee</i>
+<br><i>eeee</i> is the target name.</td>
+<td rowspan="1" colspan="1">index into <code>m_valuesOrPrefixes</code>
+for PI data.</td>
+<td rowspan="1" colspan="1">unused</td>
+</tr>
+
+<tr>
+<td rowspan="1" colspan="1">Namespace</td>
+<td rowspan="1" colspan="1">&nbsp;34<i>neeee</i><br>
+<i>eeee</i> is namespace prefix.</td>
+<td rowspan="1" colspan="1">index into
+<code>m_valuesOrPrefixes</code> pointing to the namespace URI.</td>
+<td rowspan="1" colspan="1">unused</td>
+</tr>
+
+</table>
+</body>
diff --git a/test/tests/contrib/garypeskin/namespace47.out b/test/tests/contrib/garypeskin/namespace47.out
new file mode 100644
index 0000000..47501a2
--- /dev/null
+++ b/test/tests/contrib/garypeskin/namespace47.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ixsl:stylesheet xmlns:ixsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+   <ixsl:template match="foo"><ixsl:text>Recognized foo</ixsl:text></ixsl:template>
+   <ixsl:template match="bar"><ixsl:text>Recognized bar</ixsl:text></ixsl:template>
+</ixsl:stylesheet>
\ No newline at end of file
diff --git a/test/tests/contrib/garypeskin/namespace47.xml b/test/tests/contrib/garypeskin/namespace47.xml
new file mode 100644
index 0000000..a6db2b7
--- /dev/null
+++ b/test/tests/contrib/garypeskin/namespace47.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<source>
+   <gen_a name="foo"/>
+   <gen_b name="bar"/>
+</source>
\ No newline at end of file
diff --git a/test/tests/contrib/garypeskin/namespace47.xsl b/test/tests/contrib/garypeskin/namespace47.xsl
new file mode 100644
index 0000000..5730656
--- /dev/null
+++ b/test/tests/contrib/garypeskin/namespace47.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+ <xsl:stylesheet version="1.0"
+                 xmlns:ixsl="http://www.w3.org/1999/XSL/TransformAlias"
+                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: namespace47 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: Gary L Peskin based on test case from Jens Lautenbacher -->
+  <!-- Purpose: Verify that namespace-alias is honored in included stylesheets. -->
+ 
+   <xsl:include href="namespace47a.xsl"/>
+   <xsl:namespace-alias stylesheet-prefix="ixsl" result-prefix="xsl"/>
+   
+   <xsl:template match="/"> 
+     <ixsl:stylesheet version="1.0">
+       <xsl:apply-templates/>
+     </ixsl:stylesheet>
+   </xsl:template>
+   
+   <xsl:template match="gen_b">
+     <ixsl:template>
+       <xsl:attribute name="match"><xsl:value-of select="@name"/></xsl:attribute>
+       <ixsl:text>Recognized <xsl:value-of select="@name"/></ixsl:text>
+     </ixsl:template>
+   </xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/garypeskin/namespace47a.xsl b/test/tests/contrib/garypeskin/namespace47a.xsl
new file mode 100644
index 0000000..11d9e16
--- /dev/null
+++ b/test/tests/contrib/garypeskin/namespace47a.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+                xmlns:ixsl="http://www.w3.org/1999/XSL/TransformAlias"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- FileName: namespace47a -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.1 Literal Result Elements -->
+  <!-- Creator: Gary L Peskin based on test case from Jens Lautenbacher -->
+  <!-- Purpose: Included stylesheet for test case namespace47. -->
+
+  <xsl:template match="gen_a">
+    <ixsl:template>
+      <xsl:attribute name="match"><xsl:value-of select="@name"/></xsl:attribute>
+      <ixsl:text>Recognized <xsl:value-of select="@name"/></ixsl:text>
+    </ixsl:template>
+  </xsl:template>
+   
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/garypeskin/namespace99.out b/test/tests/contrib/garypeskin/namespace99.out
new file mode 100644
index 0000000..f33d515
--- /dev/null
+++ b/test/tests/contrib/garypeskin/namespace99.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OUTLINE xmlns:xlink="http://www.w3.org/1999/xlink"><NODE type="book" xlink:href
+="hello.htm" xlink:type="simple"><LABEL>Hello, world!
+</LABEL></NODE></OUTLINE>
diff --git a/test/tests/contrib/garypeskin/namespace99.xml b/test/tests/contrib/garypeskin/namespace99.xml
new file mode 100644
index 0000000..71cec0b
--- /dev/null
+++ b/test/tests/contrib/garypeskin/namespace99.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<OUTLINE xmlns:xlink="http://www.w3.org/1999/xlink"><NODE type="book" 
+xlink:href="hello.htm" xlink:type="simple"><LABEL>Hello, world!
+</LABEL></NODE></OUTLINE>
diff --git a/test/tests/contrib/garypeskin/namespace99.xsl b/test/tests/contrib/garypeskin/namespace99.xsl
new file mode 100644
index 0000000..dd40912
--- /dev/null
+++ b/test/tests/contrib/garypeskin/namespace99.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: namespace99 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.5 Copying -->
+  <!-- Creator: <Jochen.Schwarze@cit.de> -->
+  <!-- Purpose: Use prefixed attributes with no preceding text nodes. -->
+
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/identity/identity01.xml b/test/tests/contrib/identity/identity01.xml
new file mode 100644
index 0000000..ac35672
--- /dev/null
+++ b/test/tests/contrib/identity/identity01.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list>
+  <item>Xalan-J 1.x</item>
+  <item>Xalan-J 2.x</item>
+  <item>Xalan-C 1.x</item>
+  <list>
+    <item>Xalan documentation</item>
+    <item>Xalan tests</item>
+  </list>
+</list>
\ No newline at end of file
diff --git a/test/tests/contrib/identity/identity01.xsl b/test/tests/contrib/identity/identity01.xsl
new file mode 100644
index 0000000..28bb7c2
--- /dev/null
+++ b/test/tests/contrib/identity/identity01.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+     
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/var/var01.xml b/test/tests/contrib/var/var01.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/contrib/var/var01.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/contrib/var/var01.xsl b/test/tests/contrib/var/var01.xsl
new file mode 100644
index 0000000..2d43c47
--- /dev/null
+++ b/test/tests/contrib/var/var01.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- var01.xsl: variations on a theme:Bugzilla#4218; input .xml is ignored-->
+
+<!-- Theme: passing with-param, somehow variable stack frame gets messed up -->
+<xsl:template match="/">
+    <out>
+      <!-- Variables declared at same level as call-template -->
+      <xsl:variable name="v1" select="'abc-should-appear-once'"/>
+      <xsl:variable name="v2" select="'def-should-appear-once'"/>
+      <!-- Extraneous variable decl -->
+      <xsl:variable name="v3" select="'ghi-should-appear-once'"/>
+      
+      <xsl:call-template name="template1">
+        <!-- Param name is same in all cases -->
+        <xsl:with-param name="param1">
+          <xsl:call-template name="template2">
+            <xsl:with-param name="param1" select="$v1"/>
+          </xsl:call-template>
+          <xsl:value-of select="$v2"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="template1">
+    <xsl:param name="param1" select="'error'"/>
+    <template1><xsl:value-of select="$param1"/></template1>
+  </xsl:template>
+ 
+  <xsl:template name="template2">
+    <xsl:param name="param1" select="'error'"/>
+    <template2><xsl:value-of select="$param1"/></template2>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/var/var01a.xml b/test/tests/contrib/var/var01a.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/contrib/var/var01a.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/contrib/var/var01a.xsl b/test/tests/contrib/var/var01a.xsl
new file mode 100644
index 0000000..4285479
--- /dev/null
+++ b/test/tests/contrib/var/var01a.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- var01.xsl: variations on a theme:Bugzilla#4218; input .xml is ignored-->
+
+<!-- Theme: passing with-param, somehow variable stack frame gets messed up -->
+<xsl:template match="/">
+<!-- Theme-change: variables declared outside <out> -->
+    <xsl:variable name="v1" select="'abc-should-appear-once'"/>
+    <xsl:variable name="v2" select="'def-should-appear-once'"/>
+    <out>
+      <xsl:call-template name="template1">
+        <xsl:with-param name="param1">
+          <xsl:call-template name="template2">
+            <!-- Theme-change: with-param uses different names -->
+            <xsl:with-param name="param2" select="$v1"/>
+          </xsl:call-template>
+          <xsl:value-of select="$v2"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="template1">
+    <xsl:param name="param1" select="'error'"/>
+    <template1><xsl:value-of select="$param1"/></template1>
+  </xsl:template>
+ 
+  <xsl:template name="template2">
+    <xsl:param name="param2" select="'error'"/>
+    <template2><xsl:value-of select="$param2"/></template2>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/var/var01b.xml b/test/tests/contrib/var/var01b.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/contrib/var/var01b.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/contrib/var/var01b.xsl b/test/tests/contrib/var/var01b.xsl
new file mode 100644
index 0000000..c1fde4d
--- /dev/null
+++ b/test/tests/contrib/var/var01b.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- var01b.xsl: variations on a theme:Bugzilla#4218; input .xml is ignored-->
+
+<!-- Theme: passing with-param, somehow variable stack frame gets messed up -->
+<!-- Theme-change: variables declared outside root template -->
+<xsl:variable name="v1" select="'abc-should-appear-once'"/>
+<xsl:variable name="v2" select="'def-should-appear-once'"/>
+<xsl:template match="/">
+    <out>
+      <xsl:call-template name="template1">
+        <xsl:with-param name="param1">
+          <xsl:call-template name="template2">
+            <xsl:with-param name="param2" select="$v1"/>
+          </xsl:call-template>
+          <xsl:value-of select="$v2"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="template1">
+    <xsl:param name="param1" select="'error'"/>
+    <template1><xsl:value-of select="$param1"/></template1>
+  </xsl:template>
+ 
+  <xsl:template name="template2">
+    <xsl:param name="param2" select="'error'"/>
+    <template2><xsl:value-of select="$param2"/></template2>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/var/var01b2.xml b/test/tests/contrib/var/var01b2.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/contrib/var/var01b2.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/contrib/var/var01b2.xsl b/test/tests/contrib/var/var01b2.xsl
new file mode 100644
index 0000000..5d26dc8
--- /dev/null
+++ b/test/tests/contrib/var/var01b2.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- var01b2.xsl: variations on a theme:Bugzilla#4218; input .xml is ignored-->
+
+<!-- Theme: passing with-param, somehow variable stack frame gets messed up -->
+<!-- Theme-change: params declared outside root template -->
+<xsl:param name="v1" select="'abc-should-appear-once'"/>
+<xsl:param name="v2" select="'def-should-appear-once'"/>
+<xsl:template match="/">
+    <out>
+      <xsl:call-template name="template1">
+        <xsl:with-param name="param1">
+          <xsl:call-template name="template2">
+            <xsl:with-param name="param2" select="$v1"/>
+          </xsl:call-template>
+          <xsl:value-of select="$v2"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="template1">
+    <xsl:param name="param1" select="'error'"/>
+    <template1><xsl:value-of select="$param1"/></template1>
+  </xsl:template>
+ 
+  <xsl:template name="template2">
+    <xsl:param name="param2" select="'error'"/>
+    <template2><xsl:value-of select="$param2"/></template2>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/var/var01c.xml b/test/tests/contrib/var/var01c.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/contrib/var/var01c.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/contrib/var/var01c.xsl b/test/tests/contrib/var/var01c.xsl
new file mode 100644
index 0000000..618a2e2
--- /dev/null
+++ b/test/tests/contrib/var/var01c.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- var01.xsl: variations on a theme:Bugzilla#4218; input .xml is ignored-->
+
+<!-- Theme: passing with-param, somehow variable stack frame gets messed up -->
+<xsl:template match="/">
+    <out>
+      <!-- Variables declared at same level as call-template -->
+      <xsl:variable name="v1" select="'abc-should-appear-once'"/>
+      <xsl:variable name="v2" select="'def-should-appear-once'"/>
+      
+      <xsl:call-template name="template1">
+        <!-- Param name is same in all cases -->
+        <xsl:with-param name="param1">
+          <xsl:call-template name="template2">
+            <xsl:with-param name="param1" select="$v1"/>
+          </xsl:call-template>
+          <!-- Theme change: use xsl:text instead of value-of: PASSES 18-Oct-01 -->
+          <xsl:text>def-should-appear-once</xsl:text>
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="template1">
+    <xsl:param name="param1" select="'error'"/>
+    <template1><xsl:value-of select="$param1"/></template1>
+  </xsl:template>
+ 
+  <xsl:template name="template2">
+    <xsl:param name="param1" select="'error'"/>
+    <template2><xsl:value-of select="$param1"/></template2>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/var/var01d.xml b/test/tests/contrib/var/var01d.xml
new file mode 100644
index 0000000..aa33d84
--- /dev/null
+++ b/test/tests/contrib/var/var01d.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/contrib/var/var01d.xsl b/test/tests/contrib/var/var01d.xsl
new file mode 100644
index 0000000..5d0d284
--- /dev/null
+++ b/test/tests/contrib/var/var01d.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+   
+<!-- var01.xsl: variations on a theme:Bugzilla#4218; input .xml is ignored-->
+
+<!-- Theme: passing with-param, somehow variable stack frame gets messed up -->
+
+<!-- The result does not contain <template2> tags because the returned RTF is -->
+<!-- converted to a string in which element tags are nixed.  -->
+
+<xsl:template match="/">
+    <out>
+      <!-- Variables declared at same level as call-template -->
+      <xsl:variable name="v1" select="'abc-should-appear-once'"/>
+      <xsl:variable name="v2" select="'def-should-appear-once'"/>
+
+      <!-- Param name is same in all cases -->      
+      <xsl:call-template name="template1">
+        <xsl:with-param name="param1">
+
+          <!-- Theme change: value-of before call-template -->
+          <xsl:value-of select="$v2"/><xsl:text>,</xsl:text>
+          <xsl:call-template name="template2">
+            <xsl:with-param name="param1" select="$v1"/>
+          </xsl:call-template>
+        </xsl:with-param>
+
+      </xsl:call-template>
+
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="template1">
+    <xsl:param name="param1" select="'error'"/>
+    <template1><xsl:value-of select="$param1"/><xsl:text>!!</xsl:text></template1>
+  </xsl:template>
+ 
+  <xsl:template name="template2">
+    <xsl:param name="param1" select="'error'"/>
+    <template2><xsl:value-of select="$param1"/><xsl:text>.</xsl:text></template2>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/var/var02.xml b/test/tests/contrib/var/var02.xml
new file mode 100644
index 0000000..eada7a6
--- /dev/null
+++ b/test/tests/contrib/var/var02.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<list number="1">
+  <item number="1">one</item>
+  <item number="2">two</item>
+  <item number="3">three</item>
+</list>
+<list number="2">
+  <item number="a">aaa</item>
+  <item number="b">bbb</item>
+</list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/contrib/var/var02.xsl b/test/tests/contrib/var/var02.xsl
new file mode 100644
index 0000000..3ff5aa3
--- /dev/null
+++ b/test/tests/contrib/var/var02.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- var02.xsl: variations on a theme:Bugzilla#4218 related stylesheets-->
+
+<xsl:template match="doc">
+    <out>
+      <!-- Variables declared at same level as call-template -->
+      <xsl:variable name="v1" select="'abc-should-appear-once'"/>
+      <xsl:variable name="v2" select="'def-should-appear-once'"/>
+      
+      <xsl:call-template name="template1">
+        <!-- Param name is same in all cases -->
+        <xsl:with-param name="param1">
+          <!-- Theme change: apply-templates instead of call-template -->
+          <xsl:apply-templates select="list[@number='1']">
+            <xsl:with-param name="param1" select="$v1"/>
+          </xsl:apply-templates>
+          <xsl:value-of select="$v2"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="template1">
+    <xsl:param name="param1" select="'error'"/>
+    <template1><xsl:value-of select="$param1"/></template1>
+  </xsl:template>
+ 
+  <xsl:template name="template2" match="list">
+    <xsl:param name="param1" select="'error'"/>
+    <template2><xsl:value-of select="$param1"/></template2>
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/var/var03.xml b/test/tests/contrib/var/var03.xml
new file mode 100644
index 0000000..7d2a5c3
--- /dev/null
+++ b/test/tests/contrib/var/var03.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<list number="1">
+  <item number="1">one</item>
+  <item number="2">two</item>
+  <item number="3">three</item>
+</list>
+<singleton/>
+<list number="2">
+  <item number="a">aaa</item>
+  <item number="b">bbb</item>
+</list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/contrib/var/var03.xsl b/test/tests/contrib/var/var03.xsl
new file mode 100644
index 0000000..3ec8f76
--- /dev/null
+++ b/test/tests/contrib/var/var03.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">   
+<!-- var02.xsl: variations on a theme:Bugzilla#4218 related stylesheets-->
+
+<xsl:template match="doc">
+    <out>
+      <!-- Variables declared at same level as call-template -->
+      <xsl:variable name="v1" select="'abc-should-appear-once'"/>
+      <xsl:variable name="v2" select="'def-should-appear-once'"/>
+      
+      <xsl:call-template name="template1">
+        <!-- Param name is same in all cases -->
+        <xsl:with-param name="param1">
+          <!-- Theme change: apply-templates instead of call-template -->
+          <xsl:apply-templates mode="singleton">
+            <xsl:with-param name="param1" select="$v1"/>
+          </xsl:apply-templates>
+          <xsl:value-of select="$v2"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </out>
+  </xsl:template>
+ 
+  <xsl:template name="template1">
+    <xsl:param name="param1" select="'error'"/>
+    <template1><xsl:value-of select="$param1"/></template1>
+  </xsl:template>
+ 
+  <xsl:template name="template2" match="//singleton" mode="singleton">
+    <xsl:param name="param1" select="'error'"/>
+    <template2><xsl:value-of select="$param1"/></template2>
+  </xsl:template>
+  <xsl:template match="text()" mode="singleton"/>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/inc/attributes.xsl b/test/tests/contrib/xsltc/mk/inc/attributes.xsl
new file mode 100644
index 0000000..c0e0f2b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/attributes.xsl
@@ -0,0 +1,33 @@
+<xsl:stylesheet version="1.0"
+
+                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+
+<xsl:attribute-set name="picture-attributes">
+
+   <xsl:attribute name="color">blue</xsl:attribute>
+
+   <xsl:attribute name="transparency">100</xsl:attribute>
+
+</xsl:attribute-set>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/inc/authors.xml b/test/tests/contrib/xsltc/mk/inc/authors.xml
new file mode 100644
index 0000000..5c82464
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/authors.xml
@@ -0,0 +1,23 @@
+<authors>
+
+<author name="A. A. Milne">
+<born>1852</born>
+<died>1956</died>
+<biog>Alan Alexander Milne, educated at Westminster School and Trinity College
+Cambridge, became a prolific author of plays, novels, poetry, short stories, and essays,
+all of which have been overshadowed by his children's books.
+</biog>
+</author>
+
+<author name="Daisy Ashford">
+<born>1881</born>
+<died>1972</died>
+<biog>Daisy Ashford (Mrs George Norman) wrote <i>The Young Visiters</i>, a small
+comic masterpiece, while still a young child in Lewes. It was found in a drawer
+in 1919 and sent to Chatto and Windus, who published it in the same year with an
+introduction by J. M. Barrie, who had first insisted on meeting the author in order
+to check that she was genuine.</biog>
+</author>
+
+</authors>
+ 
diff --git a/test/tests/contrib/xsltc/mk/inc/boilerplate.xsl b/test/tests/contrib/xsltc/mk/inc/boilerplate.xsl
new file mode 100644
index 0000000..6ffb96f
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/boilerplate.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<xsl:stylesheet version="1.0"
+
+                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+                      xmlns:co="http://acme.com/xslt">
+
+
+
+
+
+<xsl:variable name="co:company-name" select="'Acme Widgets Incorporated'"/>
+
+
+
+<xsl:variable name="co:copyright" 
+
+                      select="concat('Copyright © ', $co:company-name)"/>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/inc/books-attsets.xsl b/test/tests/contrib/xsltc/mk/inc/books-attsets.xsl
new file mode 100644
index 0000000..bce419f
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/books-attsets.xsl
@@ -0,0 +1,47 @@
+<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+
+<xsl:attribute-set name="attset1" use-attribute-sets="attset2">
+
+    <xsl:attribute name="LEFTMARGIN">150</xsl:attribute>
+
+    <xsl:attribute name="RIGHTMARGIN">150</xsl:attribute>
+
+    <xsl:attribute name="TOPMARGIN">190</xsl:attribute>
+
+</xsl:attribute-set>
+
+
+
+<xsl:variable name="x">attsets.xsl</xsl:variable>
+
+
+
+<xsl:attribute-set name="attset2">
+
+    <xsl:attribute name="TOPMARGIN">180</xsl:attribute>
+
+    <xsl:attribute name="BOTTOMMARGIN">200</xsl:attribute>
+
+</xsl:attribute-set>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/inc/books.dtd b/test/tests/contrib/xsltc/mk/inc/books.dtd
new file mode 100644
index 0000000..8ed1cb9
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/books.dtd
@@ -0,0 +1,26 @@
+<!ELEMENT AUTHOR ( #PCDATA ) >
+
+<!ELEMENT BOOKLIST ( BOOKS, CATEGORIES ) >
+
+<!ELEMENT BOOKS ( ITEM+ ) >
+
+<!ELEMENT CATEGORIES ( #PCDATA | CATEGORY )* >
+<!ATTLIST CATEGORIES DESC CDATA #REQUIRED >
+
+<!ELEMENT CATEGORY EMPTY >
+<!ATTLIST CATEGORY CODE ID #REQUIRED >
+<!ATTLIST CATEGORY DESC NMTOKEN #REQUIRED >
+<!ATTLIST CATEGORY NOTE CDATA #IMPLIED >
+
+<!ELEMENT ITEM ( AUTHOR | PRICE | PUBLISHER | QUANTITY | TITLE )* >
+<!ATTLIST ITEM CAT IDREF #REQUIRED >
+<!ATTLIST ITEM TAX NMTOKEN #IMPLIED >
+
+<!ELEMENT PRICE ( #PCDATA ) >
+
+<!ELEMENT PUBLISHER ( #PCDATA ) >
+
+<!ELEMENT QUANTITY ( #PCDATA ) >
+
+<!ELEMENT TITLE ( #PCDATA ) >
+
diff --git a/test/tests/contrib/xsltc/mk/inc/copyright.xsl b/test/tests/contrib/xsltc/mk/inc/copyright.xsl
new file mode 100644
index 0000000..e66d831
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/copyright.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<xsl:stylesheet 
+
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+		version="1.0"
+
+>
+
+<xsl:variable name="owner">Wrox Press</xsl:variable>
+
+
+
+<xsl:template name="copyright"
+
+>Copyright © <xsl:value-of select="$owner"/> 2000</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/inc/date.xsl b/test/tests/contrib/xsltc/mk/inc/date.xsl
new file mode 100644
index 0000000..9b3cd8b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/date.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<xsl:stylesheet 
+
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+		version="1.0"
+
+>
+
+<xsl:variable name="date"
+
+		select="Date:toString(Date:new())"
+
+		xmlns:Date="http://www.sun.com/xsltc/java/java.util.Date"/>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/inc/dummya.xsl b/test/tests/contrib/xsltc/mk/inc/dummya.xsl
new file mode 100644
index 0000000..eb14f3b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/dummya.xsl
@@ -0,0 +1,33 @@
+<xsl:transform
+
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+ version="1.0"
+
+>
+
+
+
+<xsl:import href="dummyb.xsl"/>
+
+<xsl:import href="dummyc.xsl"/>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/inc/dummyb.xsl b/test/tests/contrib/xsltc/mk/inc/dummyb.xsl
new file mode 100644
index 0000000..09d7922
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/dummyb.xsl
@@ -0,0 +1,27 @@
+<xsl:transform
+
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+ version="1.0"
+
+>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/inc/dummyc.xsl b/test/tests/contrib/xsltc/mk/inc/dummyc.xsl
new file mode 100644
index 0000000..09d7922
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/dummyc.xsl
@@ -0,0 +1,27 @@
+<xsl:transform
+
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+ version="1.0"
+
+>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/inc/soloist.xsl b/test/tests/contrib/xsltc/mk/inc/soloist.xsl
new file mode 100644
index 0000000..69a69bc
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/inc/soloist.xsl
@@ -0,0 +1,77 @@
+<xsl:stylesheet version="1.0"
+
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+
+<xsl:template match="/">
+
+<html><body>
+
+<xsl:apply-templates/>
+
+</body></html>
+
+</xsl:template>
+
+
+
+
+
+<xsl:template match="para">
+
+   <p><xsl:apply-templates/></p>
+
+</xsl:template>
+
+
+
+<xsl:template match="publication">
+
+   <font face="arial"><xsl:apply-templates/></font>
+
+</xsl:template>
+
+
+
+<xsl:template match="quote">
+
+   <xsl:text/>"<xsl:apply-templates/>"<xsl:text/>
+
+</xsl:template>
+
+
+
+<xsl:template match="work">
+
+   <i><xsl:apply-templates/></i>
+
+</xsl:template>
+
+
+
+<xsl:template match="role">
+
+   <u><xsl:apply-templates/></u>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk003.xml b/test/tests/contrib/xsltc/mk/mk003.xml
new file mode 100644
index 0000000..edb48b2
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk003.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<?xml-stylesheet type="text/xsl" href="poem.xsl"?>
+<poem>
+<author>Rupert Brooke</author>
+<date>1912</date>
+<title>Song</title>
+<stanza>
+<line>And suddenly the wind comes soft,</line>
+<line>And Spring is here again;</line>
+<line>And the hawthorn quickens with buds of green</line>
+<line>And my heart with buds of pain.</line>
+</stanza>
+<stanza>
+<line>My heart all Winter lay so numb,</line>
+<line>The earth so dead and frore,</line>
+<line>That I never thought the Spring would come again</line>
+<line>Or my heart wake any more.</line>
+</stanza>
+<stanza>
+<line>But Winter's broken and earth has woken,</line>
+<line>And the small birds cry again;</line>
+<line>And the hawthorn hedge puts forth its buds,</line>
+<line>And my heart puts forth its pain.</line>
+</stanza>
+</poem>
+
diff --git a/test/tests/contrib/xsltc/mk/mk003.xsl b/test/tests/contrib/xsltc/mk/mk003.xsl
new file mode 100644
index 0000000..57dbd00
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk003.xsl
@@ -0,0 +1,125 @@
+<xsl:stylesheet
+
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+
+   version="1.0">
+
+   
+
+  <!-- Test FileName: mk003.xsl -->
+
+  <!-- Source Attribution: 
+
+       This test was written by Michael Kay and is taken from 
+
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+
+       No part of this book may be reproduced, stored in a retrieval system or 
+
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+
+       photocopying, recording or otherwise - without the prior written permission of 
+
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+
+  -->
+
+  <!-- Example:  Displaying a Poem (poem.xml, poem.xsl) -->
+
+  <!-- Chapter/Page: 1-36 -->
+
+  <!-- Purpose:  Show rules based approach to formatting -->
+
+
+
+<xsl:template match="poem">
+
+<html>
+
+<head>
+
+	<title><xsl:value-of select="title"/></title>
+
+</head>
+
+<body>
+
+	<xsl:apply-templates select="title"/>
+
+	<xsl:apply-templates select="author"/>
+
+	<xsl:apply-templates select="stanza"/>
+
+	<xsl:apply-templates select="date"/>
+
+</body>
+
+</html>
+
+</xsl:template>
+
+
+
+<xsl:template match="title">
+
+<div align="center"><h1><xsl:value-of select="."/></h1></div>
+
+</xsl:template>
+
+
+
+<xsl:template match="author">
+
+<div align="center"><h2>By <xsl:value-of select="."/></h2></div>
+
+</xsl:template>
+
+
+
+<xsl:template match="stanza">
+
+<p><xsl:apply-templates select="line"/></p>
+
+</xsl:template>
+
+
+
+<xsl:template match="line">
+
+<xsl:if test="position() mod 2 = 0">&#160;&#160;</xsl:if>
+
+<xsl:value-of select="."/><br/>
+
+</xsl:template>
+
+
+
+<xsl:template match="date">
+
+<p><i><xsl:value-of select="."/></i></p>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk004.xml b/test/tests/contrib/xsltc/mk/mk004.xml
new file mode 100644
index 0000000..913e68b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk004.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<books>
+	<book category="reference">
+		<author>Nigel Rees</author>
+		<title>Sayings of the Century</title>
+		<price>8.95</price>
+	</book>
+	<book category="fiction">
+		<author>Evelyn Waugh</author>
+		<title>Sword of Honour</title>
+		<price>12.99</price>
+	</book>
+	<book category="fiction">
+		<author>Herman Melville</author>
+		<title>Moby Dick</title>
+		<price>8.99</price>
+	</book>
+	<book category="fiction">
+		<author>J. R. R. Tolkien</author>
+		<title>The Lord of the Rings</title>
+		<price>22.99</price>
+	</book>
+</books>
+
diff --git a/test/tests/contrib/xsltc/mk/mk004.xsl b/test/tests/contrib/xsltc/mk/mk004.xsl
new file mode 100644
index 0000000..a3a1301
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk004.xsl
@@ -0,0 +1,97 @@
+<xsl:stylesheet 
+
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+	version="1.0">
+
+  
+
+  <!-- Test FileName: mk004.xsl -->
+
+  <!-- Source Attribution: 
+
+       This test was written by Michael Kay and is taken from 
+
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+
+       No part of this book may be reproduced, stored in a retrieval system or 
+
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+
+       photocopying, recording or otherwise - without the prior written permission of 
+
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+
+  -->
+
+  <!-- Example:  Simple Recursive-Decent Processing (books.xml, booklist.xsl) -->
+
+  <!-- Chapter/Page: 2-70 -->
+
+  <!-- Purpose: Using templates for each kind of node -->
+
+
+
+
+
+<xsl:template match="books">
+
+	<html><body>
+
+	<h1>A list of books</h1>
+
+	<table width="640">
+
+	<xsl:apply-templates/>
+
+	</table>
+
+	</body></html>
+
+</xsl:template>
+
+
+
+<xsl:template match="book">
+
+	<tr>
+
+	<td><xsl:number/></td>
+
+	<xsl:apply-templates/>
+
+	</tr>
+
+</xsl:template>
+
+
+
+<xsl:template match="author | title | price">
+
+	<td><xsl:value-of select="."/></td>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk005.xml b/test/tests/contrib/xsltc/mk/mk005.xml
new file mode 100644
index 0000000..80a600c
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk005.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<books>
+	<book category="reference">
+		<author>Nigel Rees</author>
+		<title>Sayings of the Century</title>
+		<price>8.95</price>
+	</book>
+	<book category="fiction">
+		<author>Evelyn Waugh</author>
+		<title>Sword of Honour</title>
+		<price>12.99</price>
+	</book>
+	<book category="fiction">
+		<author>Herman Melville</author>
+		<title>Moby Dick</title>
+		<price>8.99</price>
+	</book>
+	<book category="fiction">
+		<author>J. R. R. Tolkien</author>
+		<title>The Lord of the Rings</title>
+		<price>22.99</price>
+	</book>
+</books>
diff --git a/test/tests/contrib/xsltc/mk/mk005.xsl b/test/tests/contrib/xsltc/mk/mk005.xsl
new file mode 100644
index 0000000..3da4329
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk005.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+      version="1.0">
+  
+  <!-- Test FileName: mk005.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example:  A Simplified Styleshet (books.xml, simplified.xsl) -->
+  <!-- Chapter/Page: 3-105 -->
+  <!-- Purpose: Using simplified stylesheet with html skeleton -->
+
+<xsl:output method="html" indent="yes"/>
+<xsl:template match="/">
+<html>
+  <head>
+    <title>A list of books</title>
+  </head>
+  <body>
+  <h1>A list of books</h1>
+   <table border="2">
+   <xsl:for-each select="//book">
+      <xsl:sort select="author"/>
+      <tr>
+        <td><xsl:value-of select="author"/></td>
+        <td><xsl:value-of select="title"/></td>
+        <td><xsl:value-of select="@category"/></td>
+        <td><xsl:value-of select="price"/></td>
+      </tr>
+   </xsl:for-each>
+   </table>
+</body>
+</html>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk006.xml b/test/tests/contrib/xsltc/mk/mk006.xml
new file mode 100644
index 0000000..ef0ab07
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk006.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="simplified.xsl"?>
+<books>
+	<book category="reference">
+		<author>Nigel Rees</author>
+		<title>Sayings of the Century</title>
+		<price>8.95</price>
+	</book>
+	<book category="fiction">
+		<author>Evelyn Waugh</author>
+		<title>Sword of Honour</title>
+		<price>12.99</price>
+	</book>
+	<book category="fiction">
+		<author>Herman Melville</author>
+		<title>Moby Dick</title>
+		<price>8.99</price>
+	</book>
+	<book category="fiction">
+		<author>J. R. R. Tolkien</author>
+		<title>The Lord of the Rings</title>
+		<price>22.99</price>
+	</book>
+</books>
+
diff --git a/test/tests/contrib/xsltc/mk/mk006.xsl b/test/tests/contrib/xsltc/mk/mk006.xsl
new file mode 100644
index 0000000..8c84ee8
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk006.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:stylesheet 
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+		version="1.0">
+  
+  <!-- Test FileName: mk006.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example:  books.xml, avt.xsl -->
+  <!-- Chapter/Page: 3-113 -->
+  <!-- Purpose: Using Attribute Value Template in Literal Result Element -->
+
+<xsl:output indent="yes"/>
+<xsl:template match="/">
+<xsl:for-each select="//book">
+<div id="div{position()}">
+<xsl:value-of select="title"/>
+</div>
+</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk007.xml b/test/tests/contrib/xsltc/mk/mk007.xml
new file mode 100644
index 0000000..f21d646
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk007.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<document>
+    <author>Michael Kay</author>
+    <title>XSLT Programmer's Reference</title>
+    <copyright/>
+    <date/>
+    <abstract>A comprehensive guide to the XSLT and XPath recommendations
+    published by the World Wide Web Consortium on 16 November 1999</abstract>
+</document>
+
diff --git a/test/tests/contrib/xsltc/mk/mk007.xsl b/test/tests/contrib/xsltc/mk/mk007.xsl
new file mode 100644
index 0000000..0589d72
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk007.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:stylesheet 
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+		version="1.0">
+  
+  <!-- Test FileName: mk007.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: sample.xml, principal.xsl (includes date.xsl, copyright.xsl) -->
+  <!-- Chapter/Page: 3-91 -->
+  <!-- Purpose: Including stylesheets -->
+
+<!--<xsl:include href="./inc/date.xsl"/> -->
+<xsl:variable name="date" select="'2001'" />
+<xsl:include href="./inc/copyright.xsl"/>
+
+<xsl:output method="xml" encoding="iso-8859-1" indent="yes"/>
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="date">
+    <date><xsl:value-of select="$date"/></date>
+</xsl:template>
+
+<xsl:template match="copyright">
+    <copyright><xsl:call-template name="copyright"/></copyright>
+</xsl:template>
+
+<xsl:template match="*">
+    <xsl:copy>
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates/>
+    </xsl:copy>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk008.xml b/test/tests/contrib/xsltc/mk/mk008.xml
new file mode 100644
index 0000000..f21d646
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk008.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<document>
+    <author>Michael Kay</author>
+    <title>XSLT Programmer's Reference</title>
+    <copyright/>
+    <date/>
+    <abstract>A comprehensive guide to the XSLT and XPath recommendations
+    published by the World Wide Web Consortium on 16 November 1999</abstract>
+</document>
+
diff --git a/test/tests/contrib/xsltc/mk/mk008.xsl b/test/tests/contrib/xsltc/mk/mk008.xsl
new file mode 100644
index 0000000..7cbbdb8
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk008.xsl
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:stylesheet 
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+		version="1.0"
+>
+  
+  <!-- Test FileName: mk008.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: sample.xml, principal2.xsl (includes date.xsl, copyright.xsl) -->
+  <!-- Chapter/Page: 3-91 -->
+  <!-- Purpose: Importing stylesheets -->
+
+<xsl:import href="./inc/copyright.xsl"/>
+<xsl:variable name="owner">Wrox Press Ltd</xsl:variable>
+<xsl:variable name="date">2001</xsl:variable>
+<!--<xsl:include href="./inc/date.xsl/>-->
+
+<xsl:output method="xml" encoding="iso-8859-1" indent="yes"/>
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="date">
+    <date><xsl:value-of select="$date"/></date>
+</xsl:template>
+
+<xsl:template match="copyright">
+    <copyright><xsl:call-template name="copyright"/></copyright>
+</xsl:template>
+
+<xsl:template match="*">
+    <xsl:copy>
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates/>
+    </xsl:copy>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk011.xml b/test/tests/contrib/xsltc/mk/mk011.xml
new file mode 100644
index 0000000..43d28c5
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk011.xml
@@ -0,0 +1,390 @@
+<SCENE><TITLE>SCENE I.  Venice. A street.</TITLE>
+<STAGEDIR>Enter RODERIGO and IAGO</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Tush! never tell me; I take it much unkindly</LINE>
+<LINE>That thou, Iago, who hast had my purse</LINE>
+<LINE>As if the strings were thine, shouldst know of this.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>'Sblood, but you will not hear me:</LINE>
+<LINE>If ever I did dream of such a matter, Abhor me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Thou told'st me thou didst hold him in thy hate.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Despise me, if I do not. Three great ones of the city,</LINE>
+<LINE>In personal suit to make me his lieutenant,</LINE>
+<LINE>Off-capp'd to him: and, by the faith of man,</LINE>
+<LINE>I know my price, I am worth no worse a place:</LINE>
+<LINE>But he; as loving his own pride and purposes,</LINE>
+<LINE>Evades them, with a bombast circumstance</LINE>
+<LINE>Horribly stuff'd with epithets of war;</LINE>
+<LINE>And, in conclusion,</LINE>
+<LINE>Nonsuits my mediators; for, 'Certes,' says he,</LINE>
+<LINE>'I have already chose my officer.'</LINE>
+<LINE>And what was he?</LINE>
+<LINE>Forsooth, a great arithmetician,</LINE>
+<LINE>One Michael Cassio, a Florentine,</LINE>
+<LINE>A fellow almost damn'd in a fair wife;</LINE>
+<LINE>That never set a squadron in the field,</LINE>
+<LINE>Nor the division of a battle knows</LINE>
+<LINE>More than a spinster; unless the bookish theoric,</LINE>
+<LINE>Wherein the toged consuls can propose</LINE>
+<LINE>As masterly as he: mere prattle, without practise,</LINE>
+<LINE>Is all his soldiership. But he, sir, had the election:</LINE>
+<LINE>And I, of whom his eyes had seen the proof</LINE>
+<LINE>At Rhodes, at Cyprus and on other grounds</LINE>
+<LINE>Christian and heathen, must be be-lee'd and calm'd</LINE>
+<LINE>By debitor and creditor: this counter-caster,</LINE>
+<LINE>He, in good time, must his lieutenant be,</LINE>
+<LINE>And I--God bless the mark!--his Moorship's ancient.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>By heaven, I rather would have been his hangman.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Why, there's no remedy; 'tis the curse of service,</LINE>
+<LINE>Preferment goes by letter and affection,</LINE>
+<LINE>And not by old gradation, where each second</LINE>
+<LINE>Stood heir to the first. Now, sir, be judge yourself,</LINE>
+<LINE>Whether I in any just term am affined</LINE>
+<LINE>To love the Moor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>I would not follow him then.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>O, sir, content you;</LINE>
+<LINE>I follow him to serve my turn upon him:</LINE>
+<LINE>We cannot all be masters, nor all masters</LINE>
+<LINE>Cannot be truly follow'd. You shall mark</LINE>
+<LINE>Many a duteous and knee-crooking knave,</LINE>
+<LINE>That, doting on his own obsequious bondage,</LINE>
+<LINE>Wears out his time, much like his master's ass,</LINE>
+<LINE>For nought but provender, and when he's old, cashier'd:</LINE>
+<LINE>Whip me such honest knaves. Others there are</LINE>
+<LINE>Who, trimm'd in forms and visages of duty,</LINE>
+<LINE>Keep yet their hearts attending on themselves,</LINE>
+<LINE>And, throwing but shows of service on their lords,</LINE>
+<LINE>Do well thrive by them and when they have lined</LINE>
+<LINE>their coats</LINE>
+<LINE>Do themselves homage: these fellows have some soul;</LINE>
+<LINE>And such a one do I profess myself. For, sir,</LINE>
+<LINE>It is as sure as you are Roderigo,</LINE>
+<LINE>Were I the Moor, I would not be Iago:</LINE>
+<LINE>In following him, I follow but myself;</LINE>
+<LINE>Heaven is my judge, not I for love and duty,</LINE>
+<LINE>But seeming so, for my peculiar end:</LINE>
+<LINE>For when my outward action doth demonstrate</LINE>
+<LINE>The native act and figure of my heart</LINE>
+<LINE>In compliment extern, 'tis not long after</LINE>
+<LINE>But I will wear my heart upon my sleeve</LINE>
+<LINE>For daws to peck at: I am not what I am.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>What a full fortune does the thicklips owe</LINE>
+<LINE>If he can carry't thus!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Call up her father,</LINE>
+<LINE>Rouse him: make after him, poison his delight,</LINE>
+<LINE>Proclaim him in the streets; incense her kinsmen,</LINE>
+<LINE>And, though he in a fertile climate dwell,</LINE>
+<LINE>Plague him with flies: though that his joy be joy,</LINE>
+<LINE>Yet throw such changes of vexation on't,</LINE>
+<LINE>As it may lose some colour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Here is her father's house; I'll call aloud.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Do, with like timorous accent and dire yell</LINE>
+<LINE>As when, by night and negligence, the fire</LINE>
+<LINE>Is spied in populous cities.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>What, ho, Brabantio! Signior Brabantio, ho!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Awake! what, ho, Brabantio! thieves! thieves! thieves!</LINE>
+<LINE>Look to your house, your daughter and your bags!</LINE>
+<LINE>Thieves! thieves!</LINE>
+</SPEECH>
+
+
+<STAGEDIR>BRABANTIO appears above, at a window</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>What is the reason of this terrible summons?</LINE>
+<LINE>What is the matter there?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Signior, is all your family within?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Are your doors lock'd?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Why, wherefore ask you this?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>'Zounds, sir, you're robb'd; for shame, put on</LINE>
+<LINE>your gown;</LINE>
+<LINE>Your heart is burst, you have lost half your soul;</LINE>
+<LINE>Even now, now, very now, an old black ram</LINE>
+<LINE>Is topping your white ewe. Arise, arise;</LINE>
+<LINE>Awake the snorting citizens with the bell,</LINE>
+<LINE>Or else the devil will make a grandsire of you:</LINE>
+<LINE>Arise, I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>What, have you lost your wits?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Most reverend signior, do you know my voice?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Not I what are you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>My name is Roderigo.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>The worser welcome:</LINE>
+<LINE>I have charged thee not to haunt about my doors:</LINE>
+<LINE>In honest plainness thou hast heard me say</LINE>
+<LINE>My daughter is not for thee; and now, in madness,</LINE>
+<LINE>Being full of supper and distempering draughts,</LINE>
+<LINE>Upon malicious bravery, dost thou come</LINE>
+<LINE>To start my quiet.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Sir, sir, sir,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>But thou must needs be sure</LINE>
+<LINE>My spirit and my place have in them power</LINE>
+<LINE>To make this bitter to thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Patience, good sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>What tell'st thou me of robbing? this is Venice;</LINE>
+<LINE>My house is not a grange.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Most grave Brabantio,</LINE>
+<LINE>In simple and pure soul I come to you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>'Zounds, sir, you are one of those that will not</LINE>
+<LINE>serve God, if the devil bid you. Because we come to</LINE>
+<LINE>do you service and you think we are ruffians, you'll</LINE>
+<LINE>have your daughter covered with a Barbary horse;</LINE>
+<LINE>you'll have your nephews neigh to you; you'll have</LINE>
+<LINE>coursers for cousins and gennets for germans.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>What profane wretch art thou?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>I am one, sir, that comes to tell you your daughter</LINE>
+<LINE>and the Moor are now making the beast with two backs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Thou art a villain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>You are--a senator.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>This thou shalt answer; I know thee, Roderigo.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Sir, I will answer any thing. But, I beseech you,</LINE>
+<LINE>If't be your pleasure and most wise consent,</LINE>
+<LINE>As partly I find it is, that your fair daughter,</LINE>
+<LINE>At this odd-even and dull watch o' the night,</LINE>
+<LINE>Transported, with no worse nor better guard</LINE>
+<LINE>But with a knave of common hire, a gondolier,</LINE>
+<LINE>To the gross clasps of a lascivious Moor--</LINE>
+<LINE>If this be known to you and your allowance,</LINE>
+<LINE>We then have done you bold and saucy wrongs;</LINE>
+<LINE>But if you know not this, my manners tell me</LINE>
+<LINE>We have your wrong rebuke. Do not believe</LINE>
+<LINE>That, from the sense of all civility,</LINE>
+<LINE>I thus would play and trifle with your reverence:</LINE>
+<LINE>Your daughter, if you have not given her leave,</LINE>
+<LINE>I say again, hath made a gross revolt;</LINE>
+<LINE>Tying her duty, beauty, wit and fortunes</LINE>
+<LINE>In an extravagant and wheeling stranger</LINE>
+<LINE>Of here and every where. Straight satisfy yourself:</LINE>
+<LINE>If she be in her chamber or your house,</LINE>
+<LINE>Let loose on me the justice of the state</LINE>
+<LINE>For thus deluding you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Strike on the tinder, ho!</LINE>
+<LINE>Give me a taper! call up all my people!</LINE>
+<LINE>This accident is not unlike my dream:</LINE>
+<LINE>Belief of it oppresses me already.</LINE>
+<LINE>Light, I say! light!</LINE>
+</SPEECH>
+
+
+<STAGEDIR>Exit above</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Farewell; for I must leave you:</LINE>
+<LINE>It seems not meet, nor wholesome to my place,</LINE>
+<LINE>To be produced--as, if I stay, I shall--</LINE>
+<LINE>Against the Moor: for, I do know, the state,</LINE>
+<LINE>However this may gall him with some cheque,</LINE>
+<LINE>Cannot with safety cast him, for he's embark'd</LINE>
+<LINE>With such loud reason to the Cyprus wars,</LINE>
+<LINE>Which even now stand in act, that, for their souls,</LINE>
+<LINE>Another of his fathom they have none,</LINE>
+<LINE>To lead their business: in which regard,</LINE>
+<LINE>Though I do hate him as I do hell-pains.</LINE>
+<LINE>Yet, for necessity of present life,</LINE>
+<LINE>I must show out a flag and sign of love,</LINE>
+<LINE>Which is indeed but sign. That you shall surely find him,</LINE>
+<LINE>Lead to the Sagittary the raised search;</LINE>
+<LINE>And there will I be with him. So, farewell.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+<STAGEDIR>Enter, below, BRABANTIO, and Servants with torches</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>It is too true an evil: gone she is;</LINE>
+<LINE>And what's to come of my despised time</LINE>
+<LINE>Is nought but bitterness. Now, Roderigo,</LINE>
+<LINE>Where didst thou see her? O unhappy girl!</LINE>
+<LINE>With the Moor, say'st thou? Who would be a father!</LINE>
+<LINE>How didst thou know 'twas she? O she deceives me</LINE>
+<LINE>Past thought! What said she to you? Get more tapers:</LINE>
+<LINE>Raise all my kindred. Are they married, think you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Truly, I think they are.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>O heaven! How got she out? O treason of the blood!</LINE>
+<LINE>Fathers, from hence trust not your daughters' minds</LINE>
+<LINE>By what you see them act. Is there not charms</LINE>
+<LINE>By which the property of youth and maidhood</LINE>
+<LINE>May be abused? Have you not read, Roderigo,</LINE>
+<LINE>Of some such thing?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Yes, sir, I have indeed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Call up my brother. O, would you had had her!</LINE>
+<LINE>Some one way, some another. Do you know</LINE>
+<LINE>Where we may apprehend her and the Moor?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>I think I can discover him, if you please,</LINE>
+<LINE>To get good guard and go along with me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Pray you, lead on. At every house I'll call;</LINE>
+<LINE>I may command at most. Get weapons, ho!</LINE>
+<LINE>And raise some special officers of night.</LINE>
+<LINE>On, good Roderigo: I'll deserve your pains.</LINE>
+</SPEECH>
+
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
diff --git a/test/tests/contrib/xsltc/mk/mk011.xsl b/test/tests/contrib/xsltc/mk/mk011.xsl
new file mode 100644
index 0000000..dfeb024
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk011.xsl
@@ -0,0 +1,80 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk011.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: scene.xml, naming-lines.xsl -->
+  <!-- Chapter/Page: 4-173 -->
+  <!-- Purpose: Using recursion to process a separated string -->
+
+<xsl:variable name="speakers" select="//SPEAKER"/>
+
+<xsl:template name="contains-name">
+   <xsl:param name="line"/>
+   <xsl:variable name="line1" 
+        select="translate($line, 'abcdefghijklmnopqrstuvwxyz.,:?!;',
+                    'ABCDEFGHIJKLMNOPQRSTUVWXYZ      ')"/>
+   <xsl:variable name="line2" select="concat(normalize-space($line1), ' ')"/>
+   <xsl:variable name="first" select="substring-before($line2,' ')"/>
+   <xsl:choose>
+   <xsl:when test="$first">
+      <xsl:choose>
+      <xsl:when test="$speakers[.=$first]">true</xsl:when>
+      <xsl:otherwise>
+         <xsl:variable name="rest" select="substring-after($line2,' ')"/>    
+         <xsl:call-template name="contains-name">
+            <xsl:with-param name="line" select="$rest"/>
+         </xsl:call-template>
+      </xsl:otherwise>
+      </xsl:choose>
+   </xsl:when>
+   <xsl:otherwise>false</xsl:otherwise>
+   </xsl:choose>
+</xsl:template>
+
+<xsl:template match="/">
+
+<xsl:for-each select="//LINE">
+    <xsl:variable name="contains-name">
+        <xsl:call-template name="contains-name">
+            <xsl:with-param name="line" select="."/>
+        </xsl:call-template>
+    </xsl:variable>
+    <xsl:if test="$contains-name='true'">
+        <xsl:copy-of select="."/>;
+    </xsl:if>
+</xsl:for-each>
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk012.xml b/test/tests/contrib/xsltc/mk/mk012.xml
new file mode 100644
index 0000000..43d28c5
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk012.xml
@@ -0,0 +1,390 @@
+<SCENE><TITLE>SCENE I.  Venice. A street.</TITLE>
+<STAGEDIR>Enter RODERIGO and IAGO</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Tush! never tell me; I take it much unkindly</LINE>
+<LINE>That thou, Iago, who hast had my purse</LINE>
+<LINE>As if the strings were thine, shouldst know of this.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>'Sblood, but you will not hear me:</LINE>
+<LINE>If ever I did dream of such a matter, Abhor me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Thou told'st me thou didst hold him in thy hate.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Despise me, if I do not. Three great ones of the city,</LINE>
+<LINE>In personal suit to make me his lieutenant,</LINE>
+<LINE>Off-capp'd to him: and, by the faith of man,</LINE>
+<LINE>I know my price, I am worth no worse a place:</LINE>
+<LINE>But he; as loving his own pride and purposes,</LINE>
+<LINE>Evades them, with a bombast circumstance</LINE>
+<LINE>Horribly stuff'd with epithets of war;</LINE>
+<LINE>And, in conclusion,</LINE>
+<LINE>Nonsuits my mediators; for, 'Certes,' says he,</LINE>
+<LINE>'I have already chose my officer.'</LINE>
+<LINE>And what was he?</LINE>
+<LINE>Forsooth, a great arithmetician,</LINE>
+<LINE>One Michael Cassio, a Florentine,</LINE>
+<LINE>A fellow almost damn'd in a fair wife;</LINE>
+<LINE>That never set a squadron in the field,</LINE>
+<LINE>Nor the division of a battle knows</LINE>
+<LINE>More than a spinster; unless the bookish theoric,</LINE>
+<LINE>Wherein the toged consuls can propose</LINE>
+<LINE>As masterly as he: mere prattle, without practise,</LINE>
+<LINE>Is all his soldiership. But he, sir, had the election:</LINE>
+<LINE>And I, of whom his eyes had seen the proof</LINE>
+<LINE>At Rhodes, at Cyprus and on other grounds</LINE>
+<LINE>Christian and heathen, must be be-lee'd and calm'd</LINE>
+<LINE>By debitor and creditor: this counter-caster,</LINE>
+<LINE>He, in good time, must his lieutenant be,</LINE>
+<LINE>And I--God bless the mark!--his Moorship's ancient.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>By heaven, I rather would have been his hangman.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Why, there's no remedy; 'tis the curse of service,</LINE>
+<LINE>Preferment goes by letter and affection,</LINE>
+<LINE>And not by old gradation, where each second</LINE>
+<LINE>Stood heir to the first. Now, sir, be judge yourself,</LINE>
+<LINE>Whether I in any just term am affined</LINE>
+<LINE>To love the Moor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>I would not follow him then.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>O, sir, content you;</LINE>
+<LINE>I follow him to serve my turn upon him:</LINE>
+<LINE>We cannot all be masters, nor all masters</LINE>
+<LINE>Cannot be truly follow'd. You shall mark</LINE>
+<LINE>Many a duteous and knee-crooking knave,</LINE>
+<LINE>That, doting on his own obsequious bondage,</LINE>
+<LINE>Wears out his time, much like his master's ass,</LINE>
+<LINE>For nought but provender, and when he's old, cashier'd:</LINE>
+<LINE>Whip me such honest knaves. Others there are</LINE>
+<LINE>Who, trimm'd in forms and visages of duty,</LINE>
+<LINE>Keep yet their hearts attending on themselves,</LINE>
+<LINE>And, throwing but shows of service on their lords,</LINE>
+<LINE>Do well thrive by them and when they have lined</LINE>
+<LINE>their coats</LINE>
+<LINE>Do themselves homage: these fellows have some soul;</LINE>
+<LINE>And such a one do I profess myself. For, sir,</LINE>
+<LINE>It is as sure as you are Roderigo,</LINE>
+<LINE>Were I the Moor, I would not be Iago:</LINE>
+<LINE>In following him, I follow but myself;</LINE>
+<LINE>Heaven is my judge, not I for love and duty,</LINE>
+<LINE>But seeming so, for my peculiar end:</LINE>
+<LINE>For when my outward action doth demonstrate</LINE>
+<LINE>The native act and figure of my heart</LINE>
+<LINE>In compliment extern, 'tis not long after</LINE>
+<LINE>But I will wear my heart upon my sleeve</LINE>
+<LINE>For daws to peck at: I am not what I am.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>What a full fortune does the thicklips owe</LINE>
+<LINE>If he can carry't thus!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Call up her father,</LINE>
+<LINE>Rouse him: make after him, poison his delight,</LINE>
+<LINE>Proclaim him in the streets; incense her kinsmen,</LINE>
+<LINE>And, though he in a fertile climate dwell,</LINE>
+<LINE>Plague him with flies: though that his joy be joy,</LINE>
+<LINE>Yet throw such changes of vexation on't,</LINE>
+<LINE>As it may lose some colour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Here is her father's house; I'll call aloud.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Do, with like timorous accent and dire yell</LINE>
+<LINE>As when, by night and negligence, the fire</LINE>
+<LINE>Is spied in populous cities.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>What, ho, Brabantio! Signior Brabantio, ho!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Awake! what, ho, Brabantio! thieves! thieves! thieves!</LINE>
+<LINE>Look to your house, your daughter and your bags!</LINE>
+<LINE>Thieves! thieves!</LINE>
+</SPEECH>
+
+
+<STAGEDIR>BRABANTIO appears above, at a window</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>What is the reason of this terrible summons?</LINE>
+<LINE>What is the matter there?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Signior, is all your family within?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Are your doors lock'd?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Why, wherefore ask you this?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>'Zounds, sir, you're robb'd; for shame, put on</LINE>
+<LINE>your gown;</LINE>
+<LINE>Your heart is burst, you have lost half your soul;</LINE>
+<LINE>Even now, now, very now, an old black ram</LINE>
+<LINE>Is topping your white ewe. Arise, arise;</LINE>
+<LINE>Awake the snorting citizens with the bell,</LINE>
+<LINE>Or else the devil will make a grandsire of you:</LINE>
+<LINE>Arise, I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>What, have you lost your wits?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Most reverend signior, do you know my voice?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Not I what are you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>My name is Roderigo.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>The worser welcome:</LINE>
+<LINE>I have charged thee not to haunt about my doors:</LINE>
+<LINE>In honest plainness thou hast heard me say</LINE>
+<LINE>My daughter is not for thee; and now, in madness,</LINE>
+<LINE>Being full of supper and distempering draughts,</LINE>
+<LINE>Upon malicious bravery, dost thou come</LINE>
+<LINE>To start my quiet.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Sir, sir, sir,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>But thou must needs be sure</LINE>
+<LINE>My spirit and my place have in them power</LINE>
+<LINE>To make this bitter to thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Patience, good sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>What tell'st thou me of robbing? this is Venice;</LINE>
+<LINE>My house is not a grange.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Most grave Brabantio,</LINE>
+<LINE>In simple and pure soul I come to you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>'Zounds, sir, you are one of those that will not</LINE>
+<LINE>serve God, if the devil bid you. Because we come to</LINE>
+<LINE>do you service and you think we are ruffians, you'll</LINE>
+<LINE>have your daughter covered with a Barbary horse;</LINE>
+<LINE>you'll have your nephews neigh to you; you'll have</LINE>
+<LINE>coursers for cousins and gennets for germans.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>What profane wretch art thou?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>I am one, sir, that comes to tell you your daughter</LINE>
+<LINE>and the Moor are now making the beast with two backs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Thou art a villain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>You are--a senator.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>This thou shalt answer; I know thee, Roderigo.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Sir, I will answer any thing. But, I beseech you,</LINE>
+<LINE>If't be your pleasure and most wise consent,</LINE>
+<LINE>As partly I find it is, that your fair daughter,</LINE>
+<LINE>At this odd-even and dull watch o' the night,</LINE>
+<LINE>Transported, with no worse nor better guard</LINE>
+<LINE>But with a knave of common hire, a gondolier,</LINE>
+<LINE>To the gross clasps of a lascivious Moor--</LINE>
+<LINE>If this be known to you and your allowance,</LINE>
+<LINE>We then have done you bold and saucy wrongs;</LINE>
+<LINE>But if you know not this, my manners tell me</LINE>
+<LINE>We have your wrong rebuke. Do not believe</LINE>
+<LINE>That, from the sense of all civility,</LINE>
+<LINE>I thus would play and trifle with your reverence:</LINE>
+<LINE>Your daughter, if you have not given her leave,</LINE>
+<LINE>I say again, hath made a gross revolt;</LINE>
+<LINE>Tying her duty, beauty, wit and fortunes</LINE>
+<LINE>In an extravagant and wheeling stranger</LINE>
+<LINE>Of here and every where. Straight satisfy yourself:</LINE>
+<LINE>If she be in her chamber or your house,</LINE>
+<LINE>Let loose on me the justice of the state</LINE>
+<LINE>For thus deluding you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Strike on the tinder, ho!</LINE>
+<LINE>Give me a taper! call up all my people!</LINE>
+<LINE>This accident is not unlike my dream:</LINE>
+<LINE>Belief of it oppresses me already.</LINE>
+<LINE>Light, I say! light!</LINE>
+</SPEECH>
+
+
+<STAGEDIR>Exit above</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>IAGO</SPEAKER>
+<LINE>Farewell; for I must leave you:</LINE>
+<LINE>It seems not meet, nor wholesome to my place,</LINE>
+<LINE>To be produced--as, if I stay, I shall--</LINE>
+<LINE>Against the Moor: for, I do know, the state,</LINE>
+<LINE>However this may gall him with some cheque,</LINE>
+<LINE>Cannot with safety cast him, for he's embark'd</LINE>
+<LINE>With such loud reason to the Cyprus wars,</LINE>
+<LINE>Which even now stand in act, that, for their souls,</LINE>
+<LINE>Another of his fathom they have none,</LINE>
+<LINE>To lead their business: in which regard,</LINE>
+<LINE>Though I do hate him as I do hell-pains.</LINE>
+<LINE>Yet, for necessity of present life,</LINE>
+<LINE>I must show out a flag and sign of love,</LINE>
+<LINE>Which is indeed but sign. That you shall surely find him,</LINE>
+<LINE>Lead to the Sagittary the raised search;</LINE>
+<LINE>And there will I be with him. So, farewell.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+<STAGEDIR>Enter, below, BRABANTIO, and Servants with torches</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>It is too true an evil: gone she is;</LINE>
+<LINE>And what's to come of my despised time</LINE>
+<LINE>Is nought but bitterness. Now, Roderigo,</LINE>
+<LINE>Where didst thou see her? O unhappy girl!</LINE>
+<LINE>With the Moor, say'st thou? Who would be a father!</LINE>
+<LINE>How didst thou know 'twas she? O she deceives me</LINE>
+<LINE>Past thought! What said she to you? Get more tapers:</LINE>
+<LINE>Raise all my kindred. Are they married, think you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Truly, I think they are.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>O heaven! How got she out? O treason of the blood!</LINE>
+<LINE>Fathers, from hence trust not your daughters' minds</LINE>
+<LINE>By what you see them act. Is there not charms</LINE>
+<LINE>By which the property of youth and maidhood</LINE>
+<LINE>May be abused? Have you not read, Roderigo,</LINE>
+<LINE>Of some such thing?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>Yes, sir, I have indeed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Call up my brother. O, would you had had her!</LINE>
+<LINE>Some one way, some another. Do you know</LINE>
+<LINE>Where we may apprehend her and the Moor?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>RODERIGO</SPEAKER>
+<LINE>I think I can discover him, if you please,</LINE>
+<LINE>To get good guard and go along with me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BRABANTIO</SPEAKER>
+<LINE>Pray you, lead on. At every house I'll call;</LINE>
+<LINE>I may command at most. Get weapons, ho!</LINE>
+<LINE>And raise some special officers of night.</LINE>
+<LINE>On, good Roderigo: I'll deserve your pains.</LINE>
+</SPEECH>
+
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
diff --git a/test/tests/contrib/xsltc/mk/mk012.xsl b/test/tests/contrib/xsltc/mk/mk012.xsl
new file mode 100644
index 0000000..ef34b4f
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk012.xsl
@@ -0,0 +1,72 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk012.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: scene.xml, longest-speech.xsl -->
+  <!-- Chapter/Page: 4-171 -->
+  <!-- Purpose: Using recursion to process a node set -->
+
+<xsl:template name="max">
+<xsl:param name="list"/>
+<xsl:choose>
+<xsl:when test="$list">
+   <xsl:variable name="first" select="count($list[1]/LINE)"/>
+   <xsl:variable name="max-of-rest">
+      <xsl:call-template name="max">
+         <xsl:with-param name="list" select="$list[position()!=1]"/>
+      </xsl:call-template>
+   </xsl:variable>
+   <xsl:choose>
+   <xsl:when test="$first &gt; $max-of-rest">
+      <xsl:value-of select="$first"/>
+   </xsl:when>
+   <xsl:otherwise>
+      <xsl:value-of select="$max-of-rest"/>
+   </xsl:otherwise>
+   </xsl:choose>
+</xsl:when>
+<xsl:otherwise>0</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+<xsl:template match="/">
+Longest speech is <xsl:text/>
+	<xsl:call-template name="max">
+        <xsl:with-param name="list" select="//SPEECH"/>
+	</xsl:call-template>
+<xsl:text/> lines.  
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk013.xml b/test/tests/contrib/xsltc/mk/mk013.xml
new file mode 100644
index 0000000..76ed9db
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk013.xml
@@ -0,0 +1,24 @@
+<poem>
+<author>Rupert Brooke</author>
+<date>1912</date>
+<title>Song</title>
+<stanza>
+<line>And suddenly the wind comes soft,</line>
+<line>And Spring is here again;</line>
+<line>And the hawthorn quickens with buds of green</line>
+<line>And my heart with buds of pain.</line>
+</stanza>
+<stanza>
+<line>My heart all Winter lay so numb,</line>
+<line>The earth so dead and frore,</line>
+<line>That I never thought the Spring would come again</line>
+<line>Or my heart wake any more.</line>
+</stanza>
+<stanza>
+<line>But Winter's broken and earth has woken,</line>
+<line>And the small birds cry again;</line>
+<line>And the hawthorn hedge puts forth its buds,</line>
+<line>And my heart puts forth its pain.</line>
+</stanza>
+</poem>
+
diff --git a/test/tests/contrib/xsltc/mk/mk013.xsl b/test/tests/contrib/xsltc/mk/mk013.xsl
new file mode 100644
index 0000000..e229c7b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk013.xsl
@@ -0,0 +1,60 @@
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk013.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: poem.xml, number-lines.xsl -->
+  <!-- Chapter/Page: 4-165 -->
+  <!-- Purpose: Using an attribute set for numbering -->
+
+<xsl:strip-space elements="*"/>
+<xsl:output method="xml" indent="yes"/>
+
+<xsl:template match="*">
+	<xsl:copy>
+	<xsl:apply-templates/>
+	</xsl:copy>   
+</xsl:template>
+
+<xsl:template match="line">
+	<xsl:copy use-attribute-sets="sequence">
+	<xsl:apply-templates/>
+	</xsl:copy>   
+</xsl:template>
+
+<xsl:attribute-set name="sequence">
+	<xsl:attribute name="number"><xsl:value-of select="position()"/></xsl:attribute>
+	<xsl:attribute name="of"><xsl:value-of select="last()"/></xsl:attribute>
+</xsl:attribute-set>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk014.xml b/test/tests/contrib/xsltc/mk/mk014.xml
new file mode 100644
index 0000000..8ce43bd
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk014.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" ?>
+<countries>
+<country name="France"/>
+<country name="Germany"/>
+<country name="Israel"/>
+<country name="Japan"/>
+<country name="Poland"/>
+<country name="United States" selected="yes"/>
+<country name="Venezuela"/>
+</countries>
diff --git a/test/tests/contrib/xsltc/mk/mk014.xsl b/test/tests/contrib/xsltc/mk/mk014.xsl
new file mode 100644
index 0000000..7103a55
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk014.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version="1.0"
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk014.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: countries.xml, options.xsl -->
+  <!-- Chapter/Page: 4-160 -->
+  <!-- Purpose: Generating an attribute conditionally -->
+
+<xsl:output method="html" indent="yes" />
+<xsl:template match="/">
+<html>
+  <body>
+  <h1>Please select a country:</h1>
+  <select id="country">
+  <xsl:for-each select="//country">
+    <option value="{@name}">
+	<xsl:if test="@selected='yes'">
+	    <xsl:attribute name="selected">selected</xsl:attribute>
+	</xsl:if>
+    <xsl:value-of select="@name"/>
+    </option>
+  </xsl:for-each>
+  </select>
+<hr/>
+</body>
+</html>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk015.xml b/test/tests/contrib/xsltc/mk/mk015.xml
new file mode 100644
index 0000000..0c3f66d
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk015.xml
@@ -0,0 +1,34 @@
+<results group="A">
+<match>
+<date>10-Jun-98</date>
+<team score="2">Brazil</team>
+<team score="1">Scotland</team>
+</match>
+<match>
+<date>10-Jun-98</date>
+<team score="2">Morocco</team>
+<team score="2">Norway</team>
+</match>
+<match>
+<date>16-Jun-98</date>
+<team score="1">Scotland</team>
+<team score="1">Norway</team>
+</match>
+<match>
+<date>16-Jun-98</date>
+<team score="3">Brazil</team>
+<team score="0">Morocco</team>
+</match>
+<match>
+<date>23-Jun-98</date>
+<team score="1">Brazil</team>
+<team score="2">Norway</team>
+</match>
+<match>
+<date>23-Jun-98</date>
+<team score="0">Scotland</team>
+<team score="3">Morocco</team>
+</match>
+</results>
+
+
diff --git a/test/tests/contrib/xsltc/mk/mk015.xsl b/test/tests/contrib/xsltc/mk/mk015.xsl
new file mode 100644
index 0000000..f8f9684
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk015.xsl
@@ -0,0 +1,68 @@
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk015.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: copy-of/soccer.xml, copy-of/soccer.xsl -->
+  <!-- Chapter/Page: 4-185 -->
+  <!-- Purpose: Using copy-of for repeated output -->
+
+<xsl:variable name="table-heading">
+    <tr>
+        <td><b>Date</b></td>
+        <td><b>Home Team</b></td>
+        <td><b>Away Team</b></td>
+        <td><b>Result</b></td>
+    </tr>
+</xsl:variable>
+
+<xsl:template match="/">
+<html><body>
+    <h1>Matches in Group <xsl:value-of select="/*/@group"/></h1>
+
+    <xsl:for-each select="//match">
+
+    <h2><xsl:value-of select="concat(team[1], ' versus ', team[2])"/></h2>
+
+    <table bgcolor="#cccccc" border="1" cellpadding="5">
+        <xsl:copy-of select="$table-heading"/>        
+        <tr>
+        <td><xsl:value-of select="date"/>&#xa0;</td>
+        <td><xsl:value-of select="team[1]"/>&#xa0;</td>
+        <td><xsl:value-of select="team[2]"/>&#xa0;</td>   
+        <td><xsl:value-of select="concat(team[1]/@score, '-', team[2]/@score)"/>&#xa0;</td>   
+        </tr>        
+    </table>
+    </xsl:for-each>   
+</body></html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk016.xml b/test/tests/contrib/xsltc/mk/mk016.xml
new file mode 100644
index 0000000..a813565
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk016.xml
@@ -0,0 +1,7 @@
+<book title="Object-oriented Languages"
+   author="Michel Beaudouin-Lafon"
+   translator="Jack Howlett"
+   publisher="Chapman &amp; Hall"
+   isbn="0 412 55800 9"
+   date="1994"/>
+
diff --git a/test/tests/contrib/xsltc/mk/mk016.xsl b/test/tests/contrib/xsltc/mk/mk016.xsl
new file mode 100644
index 0000000..e7cf4dd
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk016.xsl
@@ -0,0 +1,50 @@
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk016.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: element/book.xml, element/atts-to-elements.xsl -->
+  <!-- Chapter/Page: 4-196 -->
+  <!-- Purpose: Converting attributes to child elements -->
+
+<xsl:output indent="yes"/>
+<xsl:template match="book">
+  <book>
+	<xsl:for-each select="@*">
+	 <xsl:element name="{name()}">
+	    <xsl:value-of select="."/>
+	 </xsl:element>
+	</xsl:for-each>
+  </book>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk017.xml b/test/tests/contrib/xsltc/mk/mk017.xml
new file mode 100644
index 0000000..edb48b2
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk017.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<?xml-stylesheet type="text/xsl" href="poem.xsl"?>
+<poem>
+<author>Rupert Brooke</author>
+<date>1912</date>
+<title>Song</title>
+<stanza>
+<line>And suddenly the wind comes soft,</line>
+<line>And Spring is here again;</line>
+<line>And the hawthorn quickens with buds of green</line>
+<line>And my heart with buds of pain.</line>
+</stanza>
+<stanza>
+<line>My heart all Winter lay so numb,</line>
+<line>The earth so dead and frore,</line>
+<line>That I never thought the Spring would come again</line>
+<line>Or my heart wake any more.</line>
+</stanza>
+<stanza>
+<line>But Winter's broken and earth has woken,</line>
+<line>And the small birds cry again;</line>
+<line>And the hawthorn hedge puts forth its buds,</line>
+<line>And my heart puts forth its pain.</line>
+</stanza>
+</poem>
+
diff --git a/test/tests/contrib/xsltc/mk/mk017.xsl b/test/tests/contrib/xsltc/mk/mk017.xsl
new file mode 100644
index 0000000..50eb5b3
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk017.xsl
@@ -0,0 +1,52 @@
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk017.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: for-each/poem.xml, for-each/nesting.xsl -->
+  <!-- Chapter/Page: 4-203 -->
+  <!-- Purpose: Showing the ancestors of a node -->
+
+<xsl:template match="*">
+   <xsl:comment>
+      <xsl:value-of select="name()"/>
+      <xsl:for-each select="ancestor::*">
+         <xsl:sort select="position()" order="descending"/>
+         <xsl:text> within </xsl:text>
+         <xsl:value-of select="name()"/>
+      </xsl:for-each>
+   </xsl:comment>
+   <xsl:apply-templates/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>	
diff --git a/test/tests/contrib/xsltc/mk/mk018.xml b/test/tests/contrib/xsltc/mk/mk018.xml
new file mode 100644
index 0000000..8db814c
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk018.xml
@@ -0,0 +1,7 @@
+<book>
+     <title>Design Patterns</title>
+     <author>Erich Gamma</author>
+     <author>Richard Helm</author>
+     <author>Ralph Johnson</author>
+     <author>John Vlissides</author>
+</book>
diff --git a/test/tests/contrib/xsltc/mk/mk018.xsl b/test/tests/contrib/xsltc/mk/mk018.xsl
new file mode 100644
index 0000000..0ba1d54
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk018.xsl
@@ -0,0 +1,49 @@
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk018.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: authors.xml, authors.xsl -->
+  <!-- Chapter/Page: 4-207 -->
+  <!-- Purpose: Formatting a list of names -->
+
+<xsl:template match="book">
+   <xsl:value-of select="title"/>
+   by <xsl:for-each select="author">
+      <xsl:value-of select="."/>
+      <xsl:if test="position()!=last()">, </xsl:if>
+      <xsl:if test="position()=last()-1">and </xsl:if>
+</xsl:for-each>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk019.xml b/test/tests/contrib/xsltc/mk/mk019.xml
new file mode 100644
index 0000000..76ed9db
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk019.xml
@@ -0,0 +1,24 @@
+<poem>
+<author>Rupert Brooke</author>
+<date>1912</date>
+<title>Song</title>
+<stanza>
+<line>And suddenly the wind comes soft,</line>
+<line>And Spring is here again;</line>
+<line>And the hawthorn quickens with buds of green</line>
+<line>And my heart with buds of pain.</line>
+</stanza>
+<stanza>
+<line>My heart all Winter lay so numb,</line>
+<line>The earth so dead and frore,</line>
+<line>That I never thought the Spring would come again</line>
+<line>Or my heart wake any more.</line>
+</stanza>
+<stanza>
+<line>But Winter's broken and earth has woken,</line>
+<line>And the small birds cry again;</line>
+<line>And the hawthorn hedge puts forth its buds,</line>
+<line>And my heart puts forth its pain.</line>
+</stanza>
+</poem>
+
diff --git a/test/tests/contrib/xsltc/mk/mk019.xsl b/test/tests/contrib/xsltc/mk/mk019.xsl
new file mode 100644
index 0000000..8da45ab
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk019.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:acme="http://acme.com/xslt"
+    exclude-result-prefixes="acme">
+
+  <!-- Test FileName: mk019.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: any xml, import/variables.xsl, boilerplate.xsl -->
+  <!-- Chapter/Page: 4-215 -->
+  <!-- Purpose: Precedence of variables with imported stylesheet -->
+
+<xsl:import href="./inc/boilerplate.xsl"/>
+<xsl:output encoding="iso-8859-1" indent="yes"/>
+
+<xsl:variable name="acme:company-name" select="'Acme Widgets Limited'"/>
+
+<xsl:template match="/">
+<c><xsl:value-of select="$acme:copyright"/></c>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk020.xml b/test/tests/contrib/xsltc/mk/mk020.xml
new file mode 100644
index 0000000..76ed9db
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk020.xml
@@ -0,0 +1,24 @@
+<poem>
+<author>Rupert Brooke</author>
+<date>1912</date>
+<title>Song</title>
+<stanza>
+<line>And suddenly the wind comes soft,</line>
+<line>And Spring is here again;</line>
+<line>And the hawthorn quickens with buds of green</line>
+<line>And my heart with buds of pain.</line>
+</stanza>
+<stanza>
+<line>My heart all Winter lay so numb,</line>
+<line>The earth so dead and frore,</line>
+<line>That I never thought the Spring would come again</line>
+<line>Or my heart wake any more.</line>
+</stanza>
+<stanza>
+<line>But Winter's broken and earth has woken,</line>
+<line>And the small birds cry again;</line>
+<line>And the hawthorn hedge puts forth its buds,</line>
+<line>And my heart puts forth its pain.</line>
+</stanza>
+</poem>
+
diff --git a/test/tests/contrib/xsltc/mk/mk020.xsl b/test/tests/contrib/xsltc/mk/mk020.xsl
new file mode 100644
index 0000000..eb94e01
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk020.xsl
@@ -0,0 +1,72 @@
+<xsl:stylesheet version="1.0"
+                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk020.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: poem.xml, standard-style.xsl -->
+  <!-- Chapter/Page: 4-216 -->
+  <!-- Purpose: Precedence of template rules -->
+
+<xsl:template match="/">
+   <html>
+   <head>
+   <title><xsl:value-of select="//title"/></title>
+   </head>
+   <body>
+      <xsl:apply-templates/>
+   </body>
+   </html>
+</xsl:template>
+
+<xsl:template match="title">
+   <h1><xsl:apply-templates/></h1>
+</xsl:template>
+
+<xsl:template match="author">
+   <div align="right"><i>by </i>
+      <xsl:apply-templates/>
+   </div>
+</xsl:template>
+
+<xsl:template match="stanza">
+   <p><xsl:apply-templates/></p>
+</xsl:template>
+
+<xsl:template match="line">
+   <xsl:apply-templates/><br/><xsl:text/>
+</xsl:template>
+
+<xsl:template match="date"/>
+
+<xsl:template match="text()">
+<xsl:value-of select="."/><xsl:text />
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk021.xml b/test/tests/contrib/xsltc/mk/mk021.xml
new file mode 100644
index 0000000..76ed9db
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk021.xml
@@ -0,0 +1,24 @@
+<poem>
+<author>Rupert Brooke</author>
+<date>1912</date>
+<title>Song</title>
+<stanza>
+<line>And suddenly the wind comes soft,</line>
+<line>And Spring is here again;</line>
+<line>And the hawthorn quickens with buds of green</line>
+<line>And my heart with buds of pain.</line>
+</stanza>
+<stanza>
+<line>My heart all Winter lay so numb,</line>
+<line>The earth so dead and frore,</line>
+<line>That I never thought the Spring would come again</line>
+<line>Or my heart wake any more.</line>
+</stanza>
+<stanza>
+<line>But Winter's broken and earth has woken,</line>
+<line>And the small birds cry again;</line>
+<line>And the hawthorn hedge puts forth its buds,</line>
+<line>And my heart puts forth its pain.</line>
+</stanza>
+</poem>
+
diff --git a/test/tests/contrib/xsltc/mk/mk021.xsl b/test/tests/contrib/xsltc/mk/mk021.xsl
new file mode 100644
index 0000000..fe54076
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk021.xsl
@@ -0,0 +1,67 @@
+<xsl:stylesheet version="1.0"
+
+                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+
+  <!-- Test FileName: mk021.xsl -->
+
+  <!-- Source Attribution: 
+
+       This test was written by Michael Kay and is taken from 
+
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+
+       No part of this book may be reproduced, stored in a retrieval system or 
+
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+
+       photocopying, recording or otherwise - without the prior written permission of 
+
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+
+  -->
+
+  <!-- Example: poem.xml, numbered-style.xsl -->
+
+  <!-- Chapter/Page: 4-217 -->
+
+  <!-- Purpose: Precedence of template rules -->
+
+
+
+<xsl:import href="mk020.xsl"/>
+
+
+
+<xsl:template match="line">
+
+   <xsl:number level="any" format="001"/>&#xa0;&#xa0;
+
+   <xsl:apply-imports/>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk022.xml b/test/tests/contrib/xsltc/mk/mk022.xml
new file mode 100644
index 0000000..913e68b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk022.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<books>
+	<book category="reference">
+		<author>Nigel Rees</author>
+		<title>Sayings of the Century</title>
+		<price>8.95</price>
+	</book>
+	<book category="fiction">
+		<author>Evelyn Waugh</author>
+		<title>Sword of Honour</title>
+		<price>12.99</price>
+	</book>
+	<book category="fiction">
+		<author>Herman Melville</author>
+		<title>Moby Dick</title>
+		<price>8.99</price>
+	</book>
+	<book category="fiction">
+		<author>J. R. R. Tolkien</author>
+		<title>The Lord of the Rings</title>
+		<price>22.99</price>
+	</book>
+</books>
+
diff --git a/test/tests/contrib/xsltc/mk/mk022.xsl b/test/tests/contrib/xsltc/mk/mk022.xsl
new file mode 100644
index 0000000..2adda3b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk022.xsl
@@ -0,0 +1,46 @@
+<xsl:stylesheet version="1.0"
+                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk022.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: poem.xml, picture.xsl, attributes.xsl -->
+  <!-- Chapter/Page: 4-221 -->
+  <!-- Purpose: Using xsl:include with named attribute sets -->
+
+<xsl:include href="./inc/attributes.xsl"/>
+
+<xsl:template match="/">
+   <picture xsl:use-attribute-sets="picture-attributes">
+      <xsl:attribute name="color">red</xsl:attribute>
+   </picture>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk023.xml b/test/tests/contrib/xsltc/mk/mk023.xml
new file mode 100644
index 0000000..ff61d26
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk023.xml
@@ -0,0 +1,25 @@
+<booklist>
+<book>
+    <title>Design Patterns</title>
+    <author>Erich Gamma</author>
+    <author>Richard Helm</author>
+    <author>Ralph Johnson</author>
+    <author>John Vlissides</author>
+</book>
+<book>
+    <title>Pattern Hatching</title>
+    <author>John Vlissides</author>
+</book>
+<book>
+    <title>Building Applications Frameworks</title>
+    <author>Mohamed Fayad</author>
+    <author>Douglas C. Schmidt</author>
+    <author>Ralph Johnson</author>
+</book>
+<book>
+    <title>Implementing Applications Frameworks</title>
+    <author>Mohamed Fayad</author>
+    <author>Douglas C. Schmidt</author>
+    <author>Ralph Johnson</author>
+</book>
+</booklist>
diff --git a/test/tests/contrib/xsltc/mk/mk023.xsl b/test/tests/contrib/xsltc/mk/mk023.xsl
new file mode 100644
index 0000000..482e900
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk023.xsl
@@ -0,0 +1,47 @@
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk023.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: booklist.xml, author-key.xsl -->
+  <!-- Chapter/Page: 4-227 -->
+  <!-- Purpose: Multi-valued Non-unique keys -->
+
+<xsl:key name="author-name" match="book" use="author"/>
+
+<xsl:param name="author" select="'John Vlissides'"/>
+
+<xsl:template match="/">
+<xsl:copy-of select="key('author-name', translate($author, '_', ' '))"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk024.xml b/test/tests/contrib/xsltc/mk/mk024.xml
new file mode 100644
index 0000000..7bbbd72
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk024.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<test></test>
\ No newline at end of file
diff --git a/test/tests/contrib/xsltc/mk/mk024.xsl b/test/tests/contrib/xsltc/mk/mk024.xsl
new file mode 100644
index 0000000..47fc02e
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk024.xsl
@@ -0,0 +1,53 @@
+<xsl:stylesheet version="1.0"
+                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                      xmlns:out="output.xsl">
+
+  <!-- Test FileName: mk024.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: any xml, alias.xsl -->
+  <!-- Chapter/Page: 4-236 -->
+  <!-- Purpose: Example of namespace alias -->
+
+<xsl:param name="variable-name">v</xsl:param>
+<xsl:param name="default-value"/>
+<xsl:output indent="yes"/>
+<xsl:namespace-alias
+               stylesheet-prefix="out"
+               result-prefix="xsl"/>
+
+<xsl:template match="/">
+   <out:stylesheet version="1.0">
+   <out:variable name="{$variable-name}">
+      <xsl:value-of select="$default-value"/>
+   </out:variable>
+   </out:stylesheet>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk025.xml b/test/tests/contrib/xsltc/mk/mk025.xml
new file mode 100644
index 0000000..76ed9db
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk025.xml
@@ -0,0 +1,24 @@
+<poem>
+<author>Rupert Brooke</author>
+<date>1912</date>
+<title>Song</title>
+<stanza>
+<line>And suddenly the wind comes soft,</line>
+<line>And Spring is here again;</line>
+<line>And the hawthorn quickens with buds of green</line>
+<line>And my heart with buds of pain.</line>
+</stanza>
+<stanza>
+<line>My heart all Winter lay so numb,</line>
+<line>The earth so dead and frore,</line>
+<line>That I never thought the Spring would come again</line>
+<line>Or my heart wake any more.</line>
+</stanza>
+<stanza>
+<line>But Winter's broken and earth has woken,</line>
+<line>And the small birds cry again;</line>
+<line>And the hawthorn hedge puts forth its buds,</line>
+<line>And my heart puts forth its pain.</line>
+</stanza>
+</poem>
+
diff --git a/test/tests/contrib/xsltc/mk/mk025.xsl b/test/tests/contrib/xsltc/mk/mk025.xsl
new file mode 100644
index 0000000..cea4e02
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk025.xsl
@@ -0,0 +1,61 @@
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk025.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: poem.xml, poem.xsl -->
+  <!-- Chapter/Page: 4-247 -->
+  <!-- Purpose: Numbering the lines of a poem -->
+
+<xsl:template match="/">
+<html><body>
+<p><xsl:apply-templates select="/poem/stanza"/></p>
+</body></html>
+</xsl:template>
+
+<xsl:template match="stanza">
+<p><table><xsl:apply-templates/></table></p>
+</xsl:template> 
+
+<xsl:template match="line">
+<tr>
+<td width="350"><xsl:value-of select="."/></td>
+<td width="50">
+   <xsl:variable name="line-nr">
+      <xsl:number level="any" from="poem"/>
+   </xsl:variable>
+   <xsl:if test="$line-nr mod 3 = 0">
+      <xsl:value-of select="$line-nr"/>
+   </xsl:if>
+</td>
+</tr>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk026.xml b/test/tests/contrib/xsltc/mk/mk026.xml
new file mode 100644
index 0000000..76ed9db
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk026.xml
@@ -0,0 +1,24 @@
+<poem>
+<author>Rupert Brooke</author>
+<date>1912</date>
+<title>Song</title>
+<stanza>
+<line>And suddenly the wind comes soft,</line>
+<line>And Spring is here again;</line>
+<line>And the hawthorn quickens with buds of green</line>
+<line>And my heart with buds of pain.</line>
+</stanza>
+<stanza>
+<line>My heart all Winter lay so numb,</line>
+<line>The earth so dead and frore,</line>
+<line>That I never thought the Spring would come again</line>
+<line>Or my heart wake any more.</line>
+</stanza>
+<stanza>
+<line>But Winter's broken and earth has woken,</line>
+<line>And the small birds cry again;</line>
+<line>And the hawthorn hedge puts forth its buds,</line>
+<line>And my heart puts forth its pain.</line>
+</stanza>
+</poem>
+
diff --git a/test/tests/contrib/xsltc/mk/mk026.xsl b/test/tests/contrib/xsltc/mk/mk026.xsl
new file mode 100644
index 0000000..98b6c84
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk026.xsl
@@ -0,0 +1,53 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk026.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: poem.xml, call.xsl -->
+  <!-- Chapter/Page: 4-265 -->
+  <!-- Purpose: Using xsl:param with a default value -->
+
+<xsl:output method="text"/>
+
+<xsl:template match="/">
+<xsl:for-each select="//*">
+    <xsl:value-of select="concat(name(), ' -- ')"/>
+    <xsl:call-template name="depth"/>;
+</xsl:for-each>
+</xsl:template>
+
+<xsl:template name="depth">
+    <xsl:param name="node" select="."/>
+    <xsl:value-of select="count($node/ancestor::node())"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk027.xml b/test/tests/contrib/xsltc/mk/mk027.xml
new file mode 100644
index 0000000..691158c
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk027.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" ?>
+<products>
+<product name="strawberry jam">
+   <region name="south" sales="20.00"/>
+   <region name="north" sales="50.00"/>
+</product>
+<product name="raspberry jam">
+   <region name="south" sales="205.16"/>
+   <region name="north" sales="10.50"/>
+</product>
+<product name="plum jam">
+   <region name="east" sales="320.20"/>
+   <region name="north" sales="39.50"/>
+</product>
+</products>
+
diff --git a/test/tests/contrib/xsltc/mk/mk027.xsl b/test/tests/contrib/xsltc/mk/mk027.xsl
new file mode 100644
index 0000000..7eeea96
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk027.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- From MKay Ref manual p-276; was simplified style sheet; converted it -->
+
+  <!-- Test FileName: mk027.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: products.xml, products.xsl -->
+  <!-- Chapter/Page: 4-276 -->
+  <!-- Purpose: Sorting on the result of a calculation -->
+
+<xsl:template match="/">
+<xsl:for-each select="products/product">
+   <xsl:sort select="sum(region/@sales)"
+                                data-type="number"
+                                order="descending"/>
+   <product name="{@name}" sales="{format-number(sum(region/@sales), '$####0.00')}"/>
+</xsl:for-each>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk028.xml b/test/tests/contrib/xsltc/mk/mk028.xml
new file mode 100644
index 0000000..af7454d
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk028.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<cv>
+<para>
+<performance>
+<publication>Early Music Review</publication> said of his debut <venue>Wigmore</venue> concert with
+<group>Ensemble Sonnerie</group> in <date>1998</date>: <quote>One of the finest concerts I have
+ever heard ... a singer to watch out for</quote>. </performance>
+<performance>Other highlights include a
+televised production of <composer>Bach</composer>'s <work>St. Matthew Passion</work>
+conducted by <artist>Jonathan Miller</artist>, in which he played
+<role>Judas</role>,</performance> <performance>an acclaimed performance of
+<work>Winterreise</work> with <artist>Julius Drake</artist> in <venue>Leamington Hastings</venue>,
+</performance> <performance>
+<work>Die Schöne Müllerin</work> <date>last summer</date> at <venue>St. John's Smith Square</venue>,
+and in the same venue the Good Friday <i>St John Passion</i>, conducted
+by <artist>Stephen Layton</artist>, broadcast on Radio Three.</performance> 
+</para>
+</cv>
diff --git a/test/tests/contrib/xsltc/mk/mk028.xsl b/test/tests/contrib/xsltc/mk/mk028.xsl
new file mode 100644
index 0000000..c7aeea4
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk028.xsl
@@ -0,0 +1,65 @@
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk028.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: soloist.xml, soloist.xsl -->
+  <!-- Chapter/Page: 4-295 -->
+  <!-- Purpose: Rules-based processing of template rules -->
+
+<xsl:template match="/">
+<html><body>
+<xsl:apply-templates/>
+</body></html>
+</xsl:template>
+
+
+<xsl:template match="para">
+   <p><xsl:apply-templates/></p>
+</xsl:template>
+
+<xsl:template match="publication">
+   <font face="arial"><xsl:apply-templates/></font>
+</xsl:template>
+
+<xsl:template match="quote">
+   <xsl:text/>"<xsl:apply-templates/>"<xsl:text/>
+</xsl:template>
+
+<xsl:template match="work">
+   <i><xsl:apply-templates/></i>
+</xsl:template>
+
+<xsl:template match="role">
+   <u><xsl:apply-templates/></u>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk029.xml b/test/tests/contrib/xsltc/mk/mk029.xml
new file mode 100644
index 0000000..af7454d
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk029.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<cv>
+<para>
+<performance>
+<publication>Early Music Review</publication> said of his debut <venue>Wigmore</venue> concert with
+<group>Ensemble Sonnerie</group> in <date>1998</date>: <quote>One of the finest concerts I have
+ever heard ... a singer to watch out for</quote>. </performance>
+<performance>Other highlights include a
+televised production of <composer>Bach</composer>'s <work>St. Matthew Passion</work>
+conducted by <artist>Jonathan Miller</artist>, in which he played
+<role>Judas</role>,</performance> <performance>an acclaimed performance of
+<work>Winterreise</work> with <artist>Julius Drake</artist> in <venue>Leamington Hastings</venue>,
+</performance> <performance>
+<work>Die Schöne Müllerin</work> <date>last summer</date> at <venue>St. John's Smith Square</venue>,
+and in the same venue the Good Friday <i>St John Passion</i>, conducted
+by <artist>Stephen Layton</artist>, broadcast on Radio Three.</performance> 
+</para>
+</cv>
diff --git a/test/tests/contrib/xsltc/mk/mk029.xsl b/test/tests/contrib/xsltc/mk/mk029.xsl
new file mode 100644
index 0000000..8d288a5
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk029.xsl
@@ -0,0 +1,67 @@
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk030.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: soloist.xml, soloist+index.xsl -->
+  <!-- Chapter/Page: 4-296 -->
+  <!-- Purpose: Using modes -->
+
+<xsl:import href="inc/soloist.xsl"/>
+
+<xsl:template match="/">
+<html><body>
+    <xsl:apply-templates/>
+    <table bgcolor="#cccccc" border="1" cellpadding="5">
+    <tr>
+        <td><b>Date</b></td>
+        <td><b>Venue</b></td>
+        <td><b>Composer</b></td>
+        <td><b>Work</b></td>
+        <td><b>Role</b></td>
+    </tr>
+    <xsl:apply-templates mode="index"/>
+    </table>
+</body></html>
+</xsl:template>
+
+<xsl:template match="performance" mode="index">
+    <tr>
+    <td><xsl:value-of select="date"/>&#xa0;</td>
+    <td><xsl:value-of select="venue"/>&#xa0;</td>
+    <td><xsl:value-of select="composer"/>&#xa0;</td>   
+    <td><xsl:value-of select="work"/>&#xa0;</td>   
+    <td><xsl:value-of select="role"/>&#xa0;</td>
+    </tr>   
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk030.xml b/test/tests/contrib/xsltc/mk/mk030.xml
new file mode 100644
index 0000000..8411911
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk030.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<programme>
+	<opera>
+		<title>The Magic Flute</title>
+		<composer>Mozart</composer>
+        <date>1791</date>
+	</opera>
+	<opera>
+		<title>Don Giovanni</title>
+		<composer>Mozart</composer>
+        <date>1787</date>
+	</opera>
+	<opera>
+		<title>Ernani</title>
+		<composer>Verdi</composer>
+        <date>1843</date>
+	</opera>
+	<opera>
+		<title>Rigoletto</title>
+		<composer>Verdi</composer>
+        <date>1850</date>
+	</opera>
+	<opera>
+		<title>Tosca</title>
+		<composer>Puccini</composer>
+        <date>1897</date>
+	</opera>
+    <composer name="Mozart">
+        <fullname>Wolfgang Amadeus Mozart</fullname>
+        <born>1756</born>
+        <died>1791</died>
+    </composer>
+    <composer name="Verdi">
+        <fullname>Guiseppe Verdi</fullname>
+        <born>1813</born>
+        <died>1901</died>
+    </composer>
+    <composer name="Puccini">
+        <fullname>Giacomo Puccini</fullname>
+        <born>1858</born>
+        <died>1924</died>
+    </composer>
+</programme>
+
diff --git a/test/tests/contrib/xsltc/mk/mk030.xsl b/test/tests/contrib/xsltc/mk/mk030.xsl
new file mode 100644
index 0000000..ec0cf5a
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk030.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+   version="1.0">
+
+  <!-- Test FileName: mk030.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: opera.xml, opera.xsl -->
+  <!-- Chapter/Page: 4-312 -->
+  <!-- Purpose: Using a variable for context sensitive variables -->
+
+<xsl:output method="html" indent="yes" />
+<xsl:template match="/">
+<html>
+  <body>
+    <center>
+     <h1>Programme</h1>
+     <xsl:for-each select="/programme/composer">
+       <h2><xsl:value-of select="concat(fullname, ' (', born, '-', died, ')')"/></h2>
+       <xsl:variable name="c" select="."/>
+       <xsl:for-each select="/programme/opera[composer=$c/@name]">
+           <p><xsl:value-of select="title"/></p>
+       </xsl:for-each>
+     </xsl:for-each>
+    </center>
+  </body>
+</html>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk031.xml b/test/tests/contrib/xsltc/mk/mk031.xml
new file mode 100644
index 0000000..8411911
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk031.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<programme>
+	<opera>
+		<title>The Magic Flute</title>
+		<composer>Mozart</composer>
+        <date>1791</date>
+	</opera>
+	<opera>
+		<title>Don Giovanni</title>
+		<composer>Mozart</composer>
+        <date>1787</date>
+	</opera>
+	<opera>
+		<title>Ernani</title>
+		<composer>Verdi</composer>
+        <date>1843</date>
+	</opera>
+	<opera>
+		<title>Rigoletto</title>
+		<composer>Verdi</composer>
+        <date>1850</date>
+	</opera>
+	<opera>
+		<title>Tosca</title>
+		<composer>Puccini</composer>
+        <date>1897</date>
+	</opera>
+    <composer name="Mozart">
+        <fullname>Wolfgang Amadeus Mozart</fullname>
+        <born>1756</born>
+        <died>1791</died>
+    </composer>
+    <composer name="Verdi">
+        <fullname>Guiseppe Verdi</fullname>
+        <born>1813</born>
+        <died>1901</died>
+    </composer>
+    <composer name="Puccini">
+        <fullname>Giacomo Puccini</fullname>
+        <born>1858</born>
+        <died>1924</died>
+    </composer>
+</programme>
+
diff --git a/test/tests/contrib/xsltc/mk/mk031.xsl b/test/tests/contrib/xsltc/mk/mk031.xsl
new file mode 100644
index 0000000..3d79e04
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk031.xsl
@@ -0,0 +1,57 @@
+<xsl:stylesheet
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+   xsl:version="1.0">
+
+  <!-- Test FileName: mk031.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: opera.xml, composers.xsl -->
+  <!-- Chapter/Page: 4-316 -->
+  <!-- Purpose: Getting the result of call-template in a variable -->
+
+<xsl:template match="/">
+    <xsl:variable name="list">
+         <xsl:call-template name="make-list">
+              <xsl:with-param name="names" select="/programme/composer/fullname"/>
+         </xsl:call-template>
+    </xsl:variable>
+    This week's composers are:
+    <xsl:value-of select="translate($list, ',', ';')"/>
+</xsl:template>
+
+<xsl:template name="make-list">
+    <xsl:param name="names"/>
+    <xsl:for-each select="$names">
+        <xsl:value-of select="."/>
+        <xsl:if test="position()!=last()">, </xsl:if>
+        <xsl:if test="position()=last()-1">and </xsl:if>
+    </xsl:for-each>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk032.xml b/test/tests/contrib/xsltc/mk/mk032.xml
new file mode 100644
index 0000000..9876017
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk032.xml
@@ -0,0 +1,11 @@
+<itinerary>
+<day number="1">Arrive in Cairo</day>
+<day number="2">Visit the Pyramids at Gaza</day>
+<day number="3">Archaelogical Museum at Cairo</day>
+<day number="4">Flight to Luxor; coach to Aswan</day>
+<day number="5">Visit Temple at Philae and Aswan High Dam</day>
+<day number="6">Cruise to Edfu</day>
+<day number="7">Cruise to Luxor; visit Temple at Karnak</day>
+<day number="8">Valley of the Kings</day>
+<day number="9">Return flight from Luxor</day>
+</itinerary>
diff --git a/test/tests/contrib/xsltc/mk/mk032.xsl b/test/tests/contrib/xsltc/mk/mk032.xsl
new file mode 100644
index 0000000..3503cbd
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk032.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:stylesheet
+	version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk032.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: itinerary.xml, itinerary.xsl -->
+  <!-- Chapter/Page: 4-421 -->
+  <!-- Purpose: Using the key() pattern to format a specific node -->
+
+<xsl:template match="/">
+	<html>
+	<head>
+		<title>Itinerary</title>
+	</head>
+	<body><center>
+		<xsl:apply-templates select="//day"/>
+	</center></body>
+	</html>
+</xsl:template>
+
+<xsl:template match="day">
+    <h3>Day <xsl:value-of select="@number"/></h3>
+    <p><xsl:apply-templates/></p>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk033.xml b/test/tests/contrib/xsltc/mk/mk033.xml
new file mode 100644
index 0000000..9876017
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk033.xml
@@ -0,0 +1,11 @@
+<itinerary>
+<day number="1">Arrive in Cairo</day>
+<day number="2">Visit the Pyramids at Gaza</day>
+<day number="3">Archaelogical Museum at Cairo</day>
+<day number="4">Flight to Luxor; coach to Aswan</day>
+<day number="5">Visit Temple at Philae and Aswan High Dam</day>
+<day number="6">Cruise to Edfu</day>
+<day number="7">Cruise to Luxor; visit Temple at Karnak</day>
+<day number="8">Valley of the Kings</day>
+<day number="9">Return flight from Luxor</day>
+</itinerary>
diff --git a/test/tests/contrib/xsltc/mk/mk033.xsl b/test/tests/contrib/xsltc/mk/mk033.xsl
new file mode 100644
index 0000000..dd73898
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk033.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:stylesheet
+	version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk033.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: itinerary.xml, today.xsl, itinerary.xsl -->
+  <!-- Chapter/Page: 4-422 -->
+  <!-- Purpose: Using the key() pattern to format a specific node -->
+
+<xsl:import href="mk032.xsl"/>
+<xsl:key name="day-number" match="day" use="@number"/>
+
+<xsl:template match="key('day-number','5')//text()">
+    <font color="red"><xsl:value-of select="."/></font>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk034.xml b/test/tests/contrib/xsltc/mk/mk034.xml
new file mode 100644
index 0000000..f7972ed
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk034.xml
@@ -0,0 +1,12 @@
+<cities>
+   <city name="Paris" country="France"/>
+   <city name="Roma" country="Italia"/>
+   <city name="Nice" country="France"/>
+   <city name="Madrid" country="Espana"/>
+   <city name="Milano" country="Italia"/>
+   <city name="Firenze" country="Italia"/>
+   <city name="Napoli" country="Italia"/>
+   <city name="Lyon" country="France"/>
+   <city name="Barcelona" country="Espana"/>
+</cities>
+
diff --git a/test/tests/contrib/xsltc/mk/mk034.xsl b/test/tests/contrib/xsltc/mk/mk034.xsl
new file mode 100644
index 0000000..015ca89
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk034.xsl
@@ -0,0 +1,48 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk034.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: cities.xml, list-cities.xsl -->
+  <!-- Chapter/Page: 7-431 -->
+  <!-- Purpose: Creating a comma-separated list (concat function) -->
+
+<xsl:output indent="yes"/>
+<xsl:template match="/">
+  <out>
+    <xsl:for-each select="//city">
+      <city><xsl:value-of select="concat(@name, ', ', @country)"/></city>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk035.xml b/test/tests/contrib/xsltc/mk/mk035.xml
new file mode 100644
index 0000000..f7972ed
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk035.xml
@@ -0,0 +1,12 @@
+<cities>
+   <city name="Paris" country="France"/>
+   <city name="Roma" country="Italia"/>
+   <city name="Nice" country="France"/>
+   <city name="Madrid" country="Espana"/>
+   <city name="Milano" country="Italia"/>
+   <city name="Firenze" country="Italia"/>
+   <city name="Napoli" country="Italia"/>
+   <city name="Lyon" country="France"/>
+   <city name="Barcelona" country="Espana"/>
+</cities>
+
diff --git a/test/tests/contrib/xsltc/mk/mk035.xsl b/test/tests/contrib/xsltc/mk/mk035.xsl
new file mode 100644
index 0000000..b5d89ec
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk035.xsl
@@ -0,0 +1,45 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version="1.0"
+     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- Test FileName: mk035.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: cities.xml, count-countries.xsl -->
+  <!-- Chapter/Page: 7-436 -->
+  <!-- Purpose: Counting distinct values (count function) -->
+
+<xsl:template match="/">
+<count>
+<xsl:value-of 
+      select="count(//city[not(@country=preceding::city/@country)])"/>
+</count>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk036.xml b/test/tests/contrib/xsltc/mk/mk036.xml
new file mode 100644
index 0000000..dc8f315
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk036.xml
@@ -0,0 +1,21 @@
+<booklist>
+<book category="S">
+     <title>Number, the Language of Science</title>
+     <author>Danzig</author>
+</book>
+<book category="FC">
+     <title>The Young Visiters</title>
+     <author>Daisy Ashford</author>
+</book>
+<book category="FC">
+     <title>When We Were Very Young</title>
+     <author>A. A. Milne</author>
+</book>
+<book category="CS">
+     <title>Design Patterns</title>
+     <author>Erich Gamma</author>
+     <author>Richard Helm</author>
+     <author>Ralph Johnson</author>
+     <author>John Vlissides</author>
+</book>
+</booklist>
diff --git a/test/tests/contrib/xsltc/mk/mk036.xsl b/test/tests/contrib/xsltc/mk/mk036.xsl
new file mode 100644
index 0000000..1ba8e78
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk036.xsl
@@ -0,0 +1,61 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk036.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: booklist.xml, list-books.xsl -->
+  <!-- Chapter/Page: 4-438 -->
+  <!-- Purpose: Counting distinct values (current function) -->
+
+<xsl:template match="/">
+  <html><body>
+    <xsl:variable name="all-books" select="//book"/>
+    <xsl:for-each select="$all-books">
+      <h1><xsl:value-of select="title"/></h1>
+      <p><i>by </i><xsl:value-of select="author"/> 
+         <xsl:if test="count(author)!=1"> and others</xsl:if>
+      </p>
+      <xsl:variable name="others"
+        select="$all-books[./@category=current()/@category and
+                             generate-id(.)!=generate-id(current())]"/>
+        <xsl:if test="$others">
+          <p>Other books in this category:</p><ul>
+          <xsl:for-each select="$others">
+             <li><xsl:value-of select="title"/></li>
+          </xsl:for-each>
+          </ul>
+        </xsl:if>
+    </xsl:for-each>
+  </body></html>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk037.xml b/test/tests/contrib/xsltc/mk/mk037.xml
new file mode 100644
index 0000000..9632424
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk037.xml
@@ -0,0 +1,7 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+<xsl:include href="./inc/dummya.xsl"/>
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk037.xsl b/test/tests/contrib/xsltc/mk/mk037.xsl
new file mode 100644
index 0000000..6377d5b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk037.xsl
@@ -0,0 +1,57 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk037.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: dummy.xsl renamed to dummy.xml, list-includes.xsl -->
+  <!-- Chapter/Page: 7-444 -->
+  <!-- Purpose: Using document function to analyze a stylesheet -->
+
+<xsl:template match="/">
+  <html><body>
+    <h1>Stylesheet Module Structure</h1>
+    <ul>
+    <xsl:apply-templates select="*/xsl:include | */xsl:import"/>
+    </ul>
+  </body></html>
+</xsl:template>
+
+<xsl:template match="xsl:include | xsl:import">
+    <li><xsl:value-of select="concat(local-name(),'s ',@href)"/>
+    <xsl:variable name="module" select="document(@href)"/>
+    <ul>
+    <xsl:apply-templates select="$module/*/xsl:include | $module/*/xsl:import"/>
+    </ul>
+    </li>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk038.xml b/test/tests/contrib/xsltc/mk/mk038.xml
new file mode 100644
index 0000000..dc8f315
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk038.xml
@@ -0,0 +1,21 @@
+<booklist>
+<book category="S">
+     <title>Number, the Language of Science</title>
+     <author>Danzig</author>
+</book>
+<book category="FC">
+     <title>The Young Visiters</title>
+     <author>Daisy Ashford</author>
+</book>
+<book category="FC">
+     <title>When We Were Very Young</title>
+     <author>A. A. Milne</author>
+</book>
+<book category="CS">
+     <title>Design Patterns</title>
+     <author>Erich Gamma</author>
+     <author>Richard Helm</author>
+     <author>Ralph Johnson</author>
+     <author>John Vlissides</author>
+</book>
+</booklist>
diff --git a/test/tests/contrib/xsltc/mk/mk038.xsl b/test/tests/contrib/xsltc/mk/mk038.xsl
new file mode 100644
index 0000000..8c3426b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk038.xsl
@@ -0,0 +1,56 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns:book="books.uri"
+ exclude-result-prefixes="book"
+>
+
+  <!-- Test FileName: mk038.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: booklist.xml, list-categories.xsl -->
+  <!-- Chapter/Page: 7-449 -->
+  <!-- Purpose: A lookup table in the stylesheet -->
+
+<xsl:template match="/">
+  <html><body>
+    <xsl:for-each select="//book">
+       <h1><xsl:value-of select="title"/></h1>
+       <p>Category: <xsl:value-of 
+         select="document('')/*/book:category[@code=current()/@category]/@desc"/>
+       </p>
+    </xsl:for-each>
+  </body></html>
+</xsl:template>
+
+<book:category code="S" desc="Science"/>
+<book:category code="CS" desc="Computing"/>
+<book:category code="FC" desc="Children's Fiction"/>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk039.xml b/test/tests/contrib/xsltc/mk/mk039.xml
new file mode 100644
index 0000000..c8f0562
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk039.xml
@@ -0,0 +1,31 @@
+<resorts>
+   <resort>
+      <name>Amsterdam</name>
+      <details>A wordy description of Amsterdam</details>
+      <hotel>
+         <name>Grand Hotel</name>
+         <stars>5</stars>
+         <address> . . . </address>
+      </hotel>
+      <hotel>
+         <name>Less Grand Hotel</name>
+         <stars>2</stars>
+         <address> . . . </address>
+      </hotel>
+   </resort>
+   <resort>
+      <name>Bruges</name>
+      <details>An eloquent description of Bruges</details>
+      <hotel>
+         <name>Central Hotel</name>
+         <stars>5</stars>
+         <address> . . . </address>
+      </hotel>
+      <hotel>
+         <name>Peripheral Hotel</name>
+         <stars>2</stars>
+         <address> . . . </address>
+      </hotel>
+   </resort>
+</resorts>
+
diff --git a/test/tests/contrib/xsltc/mk/mk039.xsl b/test/tests/contrib/xsltc/mk/mk039.xsl
new file mode 100644
index 0000000..af5a78d
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk039.xsl
@@ -0,0 +1,64 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet 
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk039.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: resorts.xml, resorts.xsl -->
+  <!-- Chapter/Page: 7-464 -->
+  <!-- Purpose: Using generate id to create links  -->
+
+<xsl:template match="/">
+<html>
+<body>
+   <h1>Hotels</h1>
+   <xsl:for-each select="//hotel">
+   <xsl:sort select="stars" order="descending" data-type="number"/>
+      <h2><xsl:value-of select="name"/></h2>
+      <p>Address: <xsl:value-of select="address"/></p>
+      <p>Stars: <xsl:value-of select="stars"/></p>
+      <p>Resort: <a href="#{generate-id(parent::resort)}">
+            <xsl:value-of select="parent::resort/name"/></a></p>
+   </xsl:for-each>
+
+   <h1>Resorts</h1>
+   <xsl:for-each select="//resort">
+      <h2><a name="{generate-id()}">
+         <xsl:value-of select="name"/>
+      </a></h2>
+      <p><xsl:value-of select="details"/></p>
+   </xsl:for-each>
+</body>
+</html>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk040.xml b/test/tests/contrib/xsltc/mk/mk040.xml
new file mode 100644
index 0000000..dc8f315
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk040.xml
@@ -0,0 +1,21 @@
+<booklist>
+<book category="S">
+     <title>Number, the Language of Science</title>
+     <author>Danzig</author>
+</book>
+<book category="FC">
+     <title>The Young Visiters</title>
+     <author>Daisy Ashford</author>
+</book>
+<book category="FC">
+     <title>When We Were Very Young</title>
+     <author>A. A. Milne</author>
+</book>
+<book category="CS">
+     <title>Design Patterns</title>
+     <author>Erich Gamma</author>
+     <author>Richard Helm</author>
+     <author>Ralph Johnson</author>
+     <author>John Vlissides</author>
+</book>
+</booklist>
diff --git a/test/tests/contrib/xsltc/mk/mk040.xsl b/test/tests/contrib/xsltc/mk/mk040.xsl
new file mode 100644
index 0000000..37ab402
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk040.xsl
@@ -0,0 +1,61 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk040.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: booklist.xml, authors.xml, author-biogs.xsl -->
+  <!-- Chapter/Page: 7-472 -->
+  <!-- Purpose: Using keys -->
+
+<xsl:key name="biog" match="author" use="@name"/>
+<xsl:variable name="biogs" select="document('./inc/authors.xml')"/>
+
+<xsl:template match="/">
+  <html><body>
+    <xsl:variable name="all-books" select="//book"/>
+    <xsl:for-each select="$all-books">
+      <h1><xsl:value-of select="title"/></h1>
+      <h2>Author<xsl:if test="count(author)!=1">s</xsl:if></h2>
+      <xsl:for-each select="author">
+         <xsl:variable name="name" select="."/>
+         <h3><xsl:value-of select="$name"/></h3>
+         <xsl:for-each select="$biogs">
+           <xsl:variable name="auth" select="key('biog', $name)"/>
+           <p><xsl:value-of select="concat($auth/born, ' - ', $auth/died)"/></p>
+           <p><xsl:value-of select="$auth/biog"/></p>
+         </xsl:for-each>
+      </xsl:for-each>
+    </xsl:for-each>
+  </body></html>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk041.xml b/test/tests/contrib/xsltc/mk/mk041.xml
new file mode 100644
index 0000000..e89d496
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk041.xml
@@ -0,0 +1,9 @@
+<issues>
+<iso-date>19991116</iso-date>
+<iso-date>19991008</iso-date>
+<iso-date>19990813</iso-date>
+<iso-date>19990709</iso-date>
+<iso-date>19990421</iso-date>
+<iso-date>19981216</iso-date>
+<iso-date>19980818</iso-date>
+</issues>
diff --git a/test/tests/contrib/xsltc/mk/mk041.xsl b/test/tests/contrib/xsltc/mk/mk041.xsl
new file mode 100644
index 0000000..9d576dc
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk041.xsl
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk041.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: issue-dates.xml, format-dates.xsl -->
+  <!-- Chapter/Page: 7-476 -->
+  <!-- Purpose: Using lang function for localizing dates -->
+
+<xsl:output encoding="iso-8859-1"/>
+
+<data xmlns="data.uri">
+<months xml:lang="en">
+   <m>January</m><m>February</m><m>March</m><m>April</m>
+   <m>May</m><m>June</m><m>July</m><m>August</m>
+   <m>September</m><m>October</m><m>November</m><m>December</m>
+</months>
+<months xml:lang="fr">
+   <m>Janvier</m><m>Février</m><m>Mars</m><m>Avril</m>
+   <m>Mai</m><m>Juin</m><m>Juillet</m><m>Août</m>
+   <m>Septembre</m><m>Octobre</m><m>Novembre</m><m>Décembre</m>
+</months>
+<months xml:lang="de">
+   <m>Januar</m><m>Februar</m><m>März</m><m>April</m>
+   <m>Mai</m><m>Juni</m><m>Juli</m><m>August</m>
+   <m>September</m><m>Oktober</m><m>November</m><m>Dezember</m>
+</months>
+</data>
+
+<xsl:param name="language" select="'en'"/>
+
+<xsl:template match="iso-date">
+<date xmlns:data="data.uri" xsl:exclude-result-prefixes="data">
+   <xsl:value-of select="substring(., 7, 2)"/>
+   <xsl:text> </xsl:text>
+   <xsl:variable name="month" select="number(substring(.,5,2))"/>
+   <xsl:value-of select="document('')/*/data:data/data:months[lang($language)]/data:m[$month]"/>
+   <xsl:text> </xsl:text>
+   <xsl:value-of select="substring(., 1, 4)"/>
+</date>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk042.xml b/test/tests/contrib/xsltc/mk/mk042.xml
new file mode 100644
index 0000000..dc8f315
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk042.xml
@@ -0,0 +1,21 @@
+<booklist>
+<book category="S">
+     <title>Number, the Language of Science</title>
+     <author>Danzig</author>
+</book>
+<book category="FC">
+     <title>The Young Visiters</title>
+     <author>Daisy Ashford</author>
+</book>
+<book category="FC">
+     <title>When We Were Very Young</title>
+     <author>A. A. Milne</author>
+</book>
+<book category="CS">
+     <title>Design Patterns</title>
+     <author>Erich Gamma</author>
+     <author>Richard Helm</author>
+     <author>Ralph Johnson</author>
+     <author>John Vlissides</author>
+</book>
+</booklist>
diff --git a/test/tests/contrib/xsltc/mk/mk042.xsl b/test/tests/contrib/xsltc/mk/mk042.xsl
new file mode 100644
index 0000000..4667161
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk042.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk042.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: booklist.xml, format-names.xsl -->
+  <!-- Chapter/Page: 7-480 -->
+  <!-- Purpose: Formatting a list using position and last functions -->
+
+<xsl:template match="book">
+<auth>
+    <xsl:for-each select="author">
+        <xsl:value-of select="."/>
+        <xsl:choose>
+            <xsl:when test="position() = last()"/>
+            <xsl:when test="position() = last()-1"> and </xsl:when>
+            <xsl:otherwise>, </xsl:otherwise>
+        </xsl:choose>
+    </xsl:for-each>
+</auth>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk043.xml b/test/tests/contrib/xsltc/mk/mk043.xml
new file mode 100644
index 0000000..58e64b6
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk043.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+<xsl:template match="/">
+<html><body>
+<h1>Table of elements</h1>
+<table border="1" cellpadding="5">
+<tr><td>Element</td><td>Prefix</td><td>Local name</td><td>Namespace URI</td></tr>
+    <xsl:apply-templates select="//*">
+         <xsl:sort select="namespace-uri()"/>
+         <xsl:sort select="local-name()"/>
+    </xsl:apply-templates>
+</table></body></html>
+</xsl:template>
+
+<xsl:template match="*">
+     <xsl:variable name="prefix">
+        <xsl:choose>
+        <xsl:when test="contains(name(), ':')">
+           <xsl:value-of select="substring-before(name(),':')"/>
+        </xsl:when>
+        <xsl:otherwise/>
+        </xsl:choose>
+     </xsl:variable>
+     <tr>
+     <td><xsl:value-of select="name()"/></td>
+     <td><xsl:value-of select="$prefix"/></td>
+     <td><xsl:value-of select="local-name()"/></td>
+     <td><xsl:value-of select="namespace-uri()"/></td>
+     </tr>
+</xsl:template>
+
+
+</xsl:transform>
+
diff --git a/test/tests/contrib/xsltc/mk/mk043.xsl b/test/tests/contrib/xsltc/mk/mk043.xsl
new file mode 100644
index 0000000..e287db3
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk043.xsl
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk043.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: any xml, list-elements.xsl -->
+  <!-- Chapter/Page: 7-489 -->
+  <!-- Purpose: Listing the element names that appear in a doc -->
+
+<xsl:template match="/">
+<html><body>
+<h1>Table of elements</h1>
+<table border="1" cellpadding="5">
+<tr><td>Element</td><td>Prefix</td><td>Local name</td><td>Namespace URI</td></tr>
+    <xsl:apply-templates select="//*">
+         <xsl:sort select="namespace-uri()"/>
+         <xsl:sort select="local-name()"/>
+    </xsl:apply-templates>
+</table></body></html>
+</xsl:template>
+
+<xsl:template match="*">
+     <xsl:variable name="prefix">
+        <xsl:choose>
+        <xsl:when test="contains(name(), ':')">
+           <xsl:value-of select="substring-before(name(),':')"/>
+        </xsl:when>
+        <xsl:otherwise/>
+        </xsl:choose>
+     </xsl:variable>
+     <tr>
+     <td><xsl:value-of select="name()"/></td>
+     <td><xsl:value-of select="$prefix"/></td>
+     <td><xsl:value-of select="local-name()"/></td>
+     <td><xsl:value-of select="namespace-uri()"/></td>
+     </tr>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk044.xml b/test/tests/contrib/xsltc/mk/mk044.xml
new file mode 100644
index 0000000..5c82464
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk044.xml
@@ -0,0 +1,23 @@
+<authors>
+
+<author name="A. A. Milne">
+<born>1852</born>
+<died>1956</died>
+<biog>Alan Alexander Milne, educated at Westminster School and Trinity College
+Cambridge, became a prolific author of plays, novels, poetry, short stories, and essays,
+all of which have been overshadowed by his children's books.
+</biog>
+</author>
+
+<author name="Daisy Ashford">
+<born>1881</born>
+<died>1972</died>
+<biog>Daisy Ashford (Mrs George Norman) wrote <i>The Young Visiters</i>, a small
+comic masterpiece, while still a young child in Lewes. It was found in a drawer
+in 1919 and sent to Chatto and Windus, who published it in the same year with an
+introduction by J. M. Barrie, who had first insisted on meeting the author in order
+to check that she was genuine.</biog>
+</author>
+
+</authors>
+ 
diff --git a/test/tests/contrib/xsltc/mk/mk044.xsl b/test/tests/contrib/xsltc/mk/mk044.xsl
new file mode 100644
index 0000000..a663db4
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk044.xsl
@@ -0,0 +1,66 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk044.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: authors.xml, word-count.xsl -->
+  <!-- Chapter/Page: 7-494 -->
+  <!-- Purpose: Using normalize-space to get a word count -->
+
+<xsl:template name="word-count">
+    <xsl:param name="text"/>
+    <xsl:variable name="ntext" select="normalize-space($text)"/>
+    <xsl:choose>
+    <xsl:when test="$ntext">        
+        <xsl:variable name="remainder">
+            <xsl:call-template name="word-count">
+                <xsl:with-param name="text" select="substring-after($ntext, ' ')"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select="$remainder + 1"/>
+    </xsl:when>    
+    <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template match="/">
+    <xsl:for-each select="//*">
+        <xsl:variable name="length">
+            <xsl:call-template name="word-count">
+                <xsl:with-param name="text" select="."/>
+            </xsl:call-template>
+        </xsl:variable>
+        <element name="{name()}" words="{$length}"/>;
+    </xsl:for-each>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk045.xml b/test/tests/contrib/xsltc/mk/mk045.xml
new file mode 100644
index 0000000..7a28ec9
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk045.xml
@@ -0,0 +1,6 @@
+<shapes>
+<rectangle width="10" height="30"/>
+<square side="15"/>
+<rectangle width="3" height="80"/>
+<circle radius="10"/>
+</shapes>
diff --git a/test/tests/contrib/xsltc/mk/mk045.xsl b/test/tests/contrib/xsltc/mk/mk045.xsl
new file mode 100644
index 0000000..55093b4
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk045.xsl
@@ -0,0 +1,78 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk045.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: shapes.xml, area.xsl -->
+  <!-- Chapter/Page: 7-502 -->
+  <!-- Purpose: Using position() to process node set recursively -->
+  
+<xsl:template match="rectangle" mode="area">
+    <xsl:value-of select="@width * @height"/>
+</xsl:template>
+
+<xsl:template match="square" mode="area">
+    <xsl:value-of select="@side * @side"/>
+</xsl:template>
+
+<xsl:template match="circle" mode="area">
+    <xsl:value-of select="3.14159 * @radius * @radius"/>
+</xsl:template>
+
+<xsl:template name="total-area">
+    <xsl:param name="set-of-shapes"/>
+    <xsl:choose>
+    <xsl:when test="$set-of-shapes">
+        <xsl:variable name="first">
+            <xsl:apply-templates select="$set-of-shapes[1]" mode="area"/>
+        </xsl:variable>
+        <xsl:variable name="rest">
+            <xsl:call-template name="total-area">
+                <xsl:with-param name="set-of-shapes"
+                    select="$set-of-shapes[position()!=1]"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select="$first + $rest"/>
+    </xsl:when>
+    <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template match="shapes">
+    <xsl:call-template name="total-area">
+        <xsl:with-param name="set-of-shapes" select="*"/>
+    </xsl:call-template>
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk046.xml b/test/tests/contrib/xsltc/mk/mk046.xml
new file mode 100644
index 0000000..6c32a5e
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk046.xml
@@ -0,0 +1,13 @@
+<sales>
+   <product>Windows 98
+      <period name="Q1">82</period>
+      <period name="Q2">64</period>
+      <period name="Q3">58</period>
+   </product>
+   <product>Windows NT
+      <period name="Q1">17</period>
+      <period name="Q2">44</period>
+      <period name="Q3">82</period>
+   </product>
+</sales>
+
diff --git a/test/tests/contrib/xsltc/mk/mk046.xsl b/test/tests/contrib/xsltc/mk/mk046.xsl
new file mode 100644
index 0000000..4aa5b14
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk046.xsl
@@ -0,0 +1,67 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk046.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: shapes.xml, area.xsl -->
+  <!-- Chapter/Page: 7-505 -->
+  <!-- Purpose: Using position() to process node set recursively -->
+  
+<xsl:template match="sales">
+<html><body>
+   <h1>Product sales by period</h1>
+   <xsl:variable name="cols" select="count(product[1]/period)"/>
+   <table border="1" cellpadding="5" width="100%">
+      <tr>
+      <th width="50%">Product</th>
+      <xsl:for-each select="product[1]/period">
+         <th width="{round(50 div $cols)}%">
+            <xsl:value-of select="@name"/>
+         </th>
+      </xsl:for-each>
+   </tr>
+   <xsl:for-each select="product">
+   <tr>
+      <td><xsl:value-of select="text()"/></td>
+      <xsl:for-each select="period">
+         <td>
+            <xsl:value-of select="."/>
+         </td>
+      </xsl:for-each>
+   </tr>
+   </xsl:for-each>
+   </table>
+</body></html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk047.xml b/test/tests/contrib/xsltc/mk/mk047.xml
new file mode 100644
index 0000000..5c82464
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk047.xml
@@ -0,0 +1,23 @@
+<authors>
+
+<author name="A. A. Milne">
+<born>1852</born>
+<died>1956</died>
+<biog>Alan Alexander Milne, educated at Westminster School and Trinity College
+Cambridge, became a prolific author of plays, novels, poetry, short stories, and essays,
+all of which have been overshadowed by his children's books.
+</biog>
+</author>
+
+<author name="Daisy Ashford">
+<born>1881</born>
+<died>1972</died>
+<biog>Daisy Ashford (Mrs George Norman) wrote <i>The Young Visiters</i>, a small
+comic masterpiece, while still a young child in Lewes. It was found in a drawer
+in 1919 and sent to Chatto and Windus, who published it in the same year with an
+introduction by J. M. Barrie, who had first insisted on meeting the author in order
+to check that she was genuine.</biog>
+</author>
+
+</authors>
+ 
diff --git a/test/tests/contrib/xsltc/mk/mk047.xsl b/test/tests/contrib/xsltc/mk/mk047.xsl
new file mode 100644
index 0000000..89484a4
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk047.xsl
@@ -0,0 +1,73 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk047.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: authors.xml, replace.xsl -->
+  <!-- Chapter/Page: 7-519 -->
+  <!-- Purpose: Replace all occurrences of a string -->
+  
+<xsl:param name="replace" select="'author'"/>
+<xsl:param name="by" select="'****'"/>
+
+<xsl:template name="do-replace">
+     <xsl:param name="text"/>
+   <xsl:choose>
+   <xsl:when test="contains($text, $replace)">
+      <xsl:value-of select="substring-before($text, $replace)"/>
+      <xsl:value-of select="$by"/>
+      <xsl:call-template name="do-replace">
+         <xsl:with-param name="text"
+                         select="substring-after($text, $replace)"/>
+      </xsl:call-template>
+   </xsl:when>
+   <xsl:otherwise>
+      <xsl:value-of select="$text"/>
+   </xsl:otherwise>
+   </xsl:choose>
+
+</xsl:template>
+
+<xsl:template match="*">
+    <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/>
+    </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()">
+    <xsl:call-template name="do-replace">
+        <xsl:with-param name="text" select="."/>
+    </xsl:call-template>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk048.xml b/test/tests/contrib/xsltc/mk/mk048.xml
new file mode 100644
index 0000000..0c3f66d
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk048.xml
@@ -0,0 +1,34 @@
+<results group="A">
+<match>
+<date>10-Jun-98</date>
+<team score="2">Brazil</team>
+<team score="1">Scotland</team>
+</match>
+<match>
+<date>10-Jun-98</date>
+<team score="2">Morocco</team>
+<team score="2">Norway</team>
+</match>
+<match>
+<date>16-Jun-98</date>
+<team score="1">Scotland</team>
+<team score="1">Norway</team>
+</match>
+<match>
+<date>16-Jun-98</date>
+<team score="3">Brazil</team>
+<team score="0">Morocco</team>
+</match>
+<match>
+<date>23-Jun-98</date>
+<team score="1">Brazil</team>
+<team score="2">Norway</team>
+</match>
+<match>
+<date>23-Jun-98</date>
+<team score="0">Scotland</team>
+<team score="3">Morocco</team>
+</match>
+</results>
+
+
diff --git a/test/tests/contrib/xsltc/mk/mk048.xsl b/test/tests/contrib/xsltc/mk/mk048.xsl
new file mode 100644
index 0000000..54162be
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk048.xsl
@@ -0,0 +1,85 @@
+<xsl:transform
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+>
+
+  <!-- Test FileName: mk048.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: soccer.xml, league.xsl -->
+  <!-- Chapter/Page: 7-521 -->
+  <!-- Purpose: Creates scorecard for soccer league using count() and sum() functions -->
+  
+<xsl:variable name="teams" select="//team[not(.=preceding::team)]"/>
+<xsl:variable name="matches" select="//match"/>
+
+<xsl:template match="results">
+<html><body>
+   <h1>Results of Group <xsl:value-of select="@group"/></h1>
+
+   <table cellpadding="5">
+      <tr>
+        <td>Team</td>
+        <td>Played</td>
+        <td>Won</td>
+        <td>Drawn</td>
+        <td>Lost</td>
+        <td>For</td>
+        <td>Against</td>
+     </tr>
+   <xsl:for-each select="$teams">
+        <xsl:variable name="this" select="."/>
+        <xsl:variable name="played" select="count($matches[team=$this])"/>
+        <xsl:variable name="won" 
+            select="count($matches[team[.=$this]/@score &gt; team[.!=$this]/@score])"/>
+        <xsl:variable name="lost"
+            select="count($matches[team[.=$this]/@score &lt; team[.!=$this]/@score])"/>
+        <xsl:variable name="drawn"
+            select="count($matches[team[.=$this]/@score = team[.!=$this]/@score])"/>
+        <xsl:variable name="for"
+            select="sum($matches/team[.=current()]/@score)"/>
+        <xsl:variable name="against"
+            select="sum($matches[team=current()]/team/@score) - $for"/>
+
+        <tr>
+        <td><xsl:value-of select="."/></td>
+        <td><xsl:value-of select="$played"/></td>
+        <td><xsl:value-of select="$won"/></td>
+        <td><xsl:value-of select="$drawn"/></td>
+        <td><xsl:value-of select="$lost"/></td>
+        <td><xsl:value-of select="$for"/></td>
+        <td><xsl:value-of select="$against"/></td>
+        </tr>
+   </xsl:for-each>
+   </table>
+</body></html>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:transform>
diff --git a/test/tests/contrib/xsltc/mk/mk049.xml b/test/tests/contrib/xsltc/mk/mk049.xml
new file mode 100644
index 0000000..6e9d8cc
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk049.xml
@@ -0,0 +1,38 @@
+<orgchart date="28 March 2000">
+<person>
+<name>Keith Todd</name>
+<title>Chief Executive Officer</title>
+<reports>
+	<person>
+   		<name>Andrew Boswell</name>
+   		<title>Technical Director</title>
+		<reports>
+			<person>
+			    <name>Dave McVitie</name>
+			    <title>Chief Engineer</title>
+			</person>
+			<person>
+			    <name>John Elmore</name>
+			    <title>Director of Research</title>
+			</person>
+		</reports>			
+	</person>
+	<person>
+		<name>Alan Gibson</name>
+		<title>Operations and Finance</title>
+	</person>
+	<person>
+		<name>Fiona Colquhoun</name>
+		<title>Human Resources</title>
+	</person>
+	<person>
+		<name>John Davison</name>
+		<title>Marketing</title>
+	</person>
+	<person>
+		<name>Marie-Anne van Ingen</name>
+		<title>International</title>
+	</person>
+</reports>
+</person>
+</orgchart>       
diff --git a/test/tests/contrib/xsltc/mk/mk049.xsl b/test/tests/contrib/xsltc/mk/mk049.xsl
new file mode 100644
index 0000000..0c6dab8
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk049.xsl
@@ -0,0 +1,64 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+   version="1.0">
+
+  <!-- Test FileName: mk049.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: orgchart.xml, orgchart.xsl -->
+  <!-- Chapter/Page: 8-534 -->
+  <!-- Purpose: Illustrate a fill-in the blanks stylesheet -->
+  
+<xsl:template match="/">
+<html>
+<head>
+   <title>Management Structure</title>
+</head>
+<body>
+   <h1>Management Structure</h1>
+   <p>The following responsibilies were announced on 
+      <xsl:value-of select="/orgchart/@date"/>:</p>
+   <table border="2" cellpadding="5">
+   <tr>
+      <th>Name</th><th>Role</th><th>Reporting to</th>
+   </tr>
+   <xsl:for-each select="//person">
+      <tr>
+         <td><xsl:value-of select="name"/></td>
+         <td><xsl:value-of select="title"/></td>
+         <td><xsl:value-of select="ancestor::person[1]/name"/></td>
+      </tr>
+   </xsl:for-each>
+   </table>
+   <hr/>
+</body>
+</html>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk050.xml b/test/tests/contrib/xsltc/mk/mk050.xml
new file mode 100644
index 0000000..ca895a8
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk050.xml
@@ -0,0 +1,19 @@
+<booklist>
+   <book>
+      <title>Angela's Ashes</title>
+      <author>Frank McCourt</author>
+      <publisher>HarperCollins</publisher>
+      <isbn>0 00 649840 X</isbn>
+      <price>6.99</price>
+      <sales>235</sales>
+   </book>
+   <book>
+      <title>Sword of Honour</title>
+      <author>Evelyn Waugh</author>
+      <publisher>Penguin Books</publisher>
+      <isbn>0 14 018967 X</isbn>
+      <price>12.99</price>
+      <sales>12</sales>
+   </book>
+</booklist>
+
diff --git a/test/tests/contrib/xsltc/mk/mk050.xsl b/test/tests/contrib/xsltc/mk/mk050.xsl
new file mode 100644
index 0000000..a2cc876
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk050.xsl
@@ -0,0 +1,70 @@
+<xsl:stylesheet 
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+   version="1.0">
+
+  <!-- Test FileName: mk050.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: booklist.xml, booksales.xsl -->
+  <!-- Chapter/Page: 8-537 -->
+  <!-- Purpose: Illustrate a navigational stylesheet -->
+  
+<xsl:key name="pub" match="book" use="publisher"/>
+
+<xsl:variable name="publishers" 
+   select="//publisher[not(.=preceding::publisher)]"/>
+
+<xsl:template match="/">
+<html>
+<head>
+   <title>Sales volume by publisher</title>
+</head>
+<body>
+   <h1>Sales volume by publisher</h1>
+   <table>
+      <tr>
+      <th>Publisher</th><th>Total Sales Value</th>
+      </tr>
+   <xsl:for-each select="$publishers">
+      <tr>
+         <td><xsl:value-of select="."/></td>
+         <td><xsl:call-template name="total-sales"/></td>
+      </tr>
+   </xsl:for-each>
+   </table>
+</body>
+</html>
+</xsl:template>
+
+<!-- calculate total book sales for the current publisher -->
+<xsl:template name="total-sales">
+   <xsl:value-of select="sum(key('pub',string(.))/sales)"/>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk051.xml b/test/tests/contrib/xsltc/mk/mk051.xml
new file mode 100644
index 0000000..aa4d7c8
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk051.xml
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<SCENE>
+   <TITLE>SCENE II.  Another street.</TITLE>
+   <STAGEDIR>Enter OTHELLO, IAGO, and Attendants with torches</STAGEDIR>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>Though in the trade of war I have slain men,</LINE>
+      <LINE>Yet do I hold it very stuff o' the conscience</LINE>
+      <LINE>To do no contrived murder: I lack iniquity</LINE>
+      <LINE>Sometimes to do me service: nine or ten times</LINE>
+      <LINE>I had thought to have yerk'd him here under the ribs.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>'Tis better as it is.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>Nay, but he prated,</LINE>
+      <LINE>And spoke such scurvy and provoking terms</LINE>
+      <LINE>Against your honour</LINE>
+      <LINE>That, with the little godliness I have,</LINE>
+      <LINE>I did full hard forbear him. But, I pray you, sir,</LINE>
+      <LINE>Are you fast married? Be assured of this,</LINE>
+      <LINE>That the magnifico is much beloved,</LINE>
+      <LINE>And hath in his effect a voice potential</LINE>
+      <LINE>As double as the duke's: he will divorce you;</LINE>
+      <LINE>Or put upon you what restraint and grievance</LINE>
+      <LINE>The law, with all his might to enforce it on,</LINE>
+      <LINE>Will give him cable.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>Let him do his spite:</LINE>
+      <LINE>My services which I have done the signiory</LINE>
+      <LINE>Shall out-tongue his complaints. 'Tis yet to know,--</LINE>
+      <LINE>Which, when I know that boasting is an honour,</LINE>
+      <LINE>I shall promulgate--I fetch my life and being</LINE>
+      <LINE>From men of royal siege, and my demerits</LINE>
+      <LINE>May speak unbonneted to as proud a fortune</LINE>
+      <LINE>As this that I have reach'd: for know, Iago,</LINE>
+      <LINE>But that I love the gentle Desdemona,</LINE>
+      <LINE>I would not my unhoused free condition</LINE>
+      <LINE>Put into circumscription and confine</LINE>
+      <LINE>For the sea's worth. But, look! what lights come yond?</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>Those are the raised father and his friends:</LINE>
+      <LINE>You were best go in.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>Not I I must be found:</LINE>
+      <LINE>My parts, my title and my perfect soul</LINE>
+      <LINE>Shall manifest me rightly. Is it they?</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>By Janus, I think no.</LINE>
+   </SPEECH>
+   <STAGEDIR>Enter CASSIO, and certain Officers with torches</STAGEDIR>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>The servants of the duke, and my lieutenant.</LINE>
+      <LINE>The goodness of the night upon you, friends!</LINE>
+      <LINE>What is the news?</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>CASSIO</SPEAKER>
+      <LINE>The duke does greet you, general,</LINE>
+      <LINE>And he requires your haste-post-haste appearance,</LINE>
+      <LINE>Even on the instant.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>What is the matter, think you?</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>CASSIO</SPEAKER>
+      <LINE>Something from Cyprus as I may divine:</LINE>
+      <LINE>It is a business of some heat: the galleys</LINE>
+      <LINE>Have sent a dozen sequent messengers</LINE>
+      <LINE>This very night at one another's heels,</LINE>
+      <LINE>And many of the consuls, raised and met,</LINE>
+      <LINE>Are at the duke's already: you have been</LINE>
+      <LINE>hotly call'd for;</LINE>
+      <LINE>When, being not at your lodging to be found,</LINE>
+      <LINE>The senate hath sent about three several guests</LINE>
+      <LINE>To search you out.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>'Tis well I am found by you.</LINE>
+      <LINE>I will but spend a word here in the house,</LINE>
+      <LINE>And go with you.</LINE>
+   </SPEECH>
+   <STAGEDIR>Exit</STAGEDIR>
+   <SPEECH>
+      <SPEAKER>CASSIO</SPEAKER>
+      <LINE>Ancient, what makes he here?</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>'Faith, he to-night hath boarded a land carack:</LINE>
+      <LINE>If it prove lawful prize, he's made for ever.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>CASSIO</SPEAKER>
+      <LINE>I do not understand.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>He's married.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>CASSIO</SPEAKER>
+      <LINE>To who?</LINE>
+   </SPEECH>
+   <STAGEDIR>Re-enter OTHELLO</STAGEDIR>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>Marry, to--Come, captain, will you go?</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>Have with you.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>CASSIO</SPEAKER>
+      <LINE>Here comes another troop to seek for you.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>It is Brabantio. General, be advised;</LINE>
+      <LINE>He comes to bad intent.</LINE>
+   </SPEECH>
+   <STAGEDIR>Enter BRABANTIO, RODERIGO, and Officers with
+torches and weapons</STAGEDIR>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>Holla! stand there!</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>RODERIGO</SPEAKER>
+      <LINE>Signior, it is the Moor.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>BRABANTIO</SPEAKER>
+      <LINE>Down with him, thief!</LINE>
+   </SPEECH>
+   <STAGEDIR>They draw on both sides</STAGEDIR>
+   <SPEECH>
+      <SPEAKER>IAGO</SPEAKER>
+      <LINE>You, Roderigo! come, sir, I am for you.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>Keep up your bright swords, for the dew will rust them.</LINE>
+      <LINE>Good signior, you shall more command with years</LINE>
+      <LINE>Than with your weapons.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>BRABANTIO</SPEAKER>
+      <LINE>O thou foul thief, where hast thou stow'd my daughter?</LINE>
+      <LINE>Damn'd as thou art, thou hast enchanted her;</LINE>
+      <LINE>For I'll refer me to all things of sense,</LINE>
+      <LINE>If she in chains of magic were not bound,</LINE>
+      <LINE>Whether a maid so tender, fair and happy,</LINE>
+      <LINE>So opposite to marriage that she shunned</LINE>
+      <LINE>The wealthy curled darlings of our nation,</LINE>
+      <LINE>Would ever have, to incur a general mock,</LINE>
+      <LINE>Run from her guardage to the sooty bosom</LINE>
+      <LINE>Of such a thing as thou, to fear, not to delight.</LINE>
+      <LINE>Judge me the world, if 'tis not gross in sense</LINE>
+      <LINE>That thou hast practised on her with foul charms,</LINE>
+      <LINE>Abused her delicate youth with drugs or minerals</LINE>
+      <LINE>That weaken motion: I'll have't disputed on;</LINE>
+      <LINE>'Tis probable and palpable to thinking.</LINE>
+      <LINE>I therefore apprehend and do attach thee</LINE>
+      <LINE>For an abuser of the world, a practiser</LINE>
+      <LINE>Of arts inhibited and out of warrant.</LINE>
+      <LINE>Lay hold upon him: if he do resist,</LINE>
+      <LINE>Subdue him at his peril.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>Hold your hands,</LINE>
+      <LINE>Both you of my inclining, and the rest:</LINE>
+      <LINE>Were it my cue to fight, I should have known it</LINE>
+      <LINE>Without a prompter. Where will you that I go</LINE>
+      <LINE>To answer this your charge?</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>BRABANTIO</SPEAKER>
+      <LINE>To prison, till fit time</LINE>
+      <LINE>Of law and course of direct session</LINE>
+      <LINE>Call thee to answer.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>OTHELLO</SPEAKER>
+      <LINE>What if I do obey?</LINE>
+      <LINE>How may the duke be therewith satisfied,</LINE>
+      <LINE>Whose messengers are here about my side,</LINE>
+      <LINE>Upon some present business of the state</LINE>
+      <LINE>To bring me to him?</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>First Officer</SPEAKER>
+      <LINE>'Tis true, most worthy signior;</LINE>
+      <LINE>The duke's in council and your noble self,</LINE>
+      <LINE>I am sure, is sent for.</LINE>
+   </SPEECH>
+   <SPEECH>
+      <SPEAKER>BRABANTIO</SPEAKER>
+      <LINE>How! the duke in council!</LINE>
+      <LINE>In this time of the night! Bring him away:</LINE>
+      <LINE>Mine's not an idle cause: the duke himself,</LINE>
+      <LINE>Or any of my brothers of the state,</LINE>
+      <LINE>Cannot but feel this wrong as 'twere their own;</LINE>
+      <LINE>For if such actions may have passage free,</LINE>
+      <LINE>Bond-slaves and pagans shall our statesmen be.</LINE>
+   </SPEECH>
+   <STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
diff --git a/test/tests/contrib/xsltc/mk/mk051.xsl b/test/tests/contrib/xsltc/mk/mk051.xsl
new file mode 100644
index 0000000..4f05a9a
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk051.xsl
@@ -0,0 +1,112 @@
+<xsl:stylesheet 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+>
+
+  <!-- Test FileName: mk051.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: scene.xml, scene.xsl -->
+  <!-- Chapter/Page: 8-544 -->
+  <!-- Purpose: Illustrate a rules-based stylesheet -->
+  
+<xsl:variable name="backcolor" select="'#FFFFCC'" />
+
+<xsl:template match="SCENE|PROLOGUE|EPILOGUE">
+    <HTML>
+    <HEAD>
+        <TITLE><xsl:value-of select="TITLE"/></TITLE>
+    </HEAD>
+    <BODY BGCOLOR='{$backcolor}'>
+        <xsl:apply-templates/>
+    </BODY>
+    </HTML>
+</xsl:template>
+
+<xsl:template match="SPEECH">
+    <TABLE><TR>
+    <TD WIDTH="160" VALIGN="TOP">
+	<xsl:apply-templates select="SPEAKER"/>
+    </TD>
+    <TD VALIGN="TOP">
+    <xsl:apply-templates select="STAGEDIR|LINE"/>
+    </TD>
+	</TR></TABLE>
+</xsl:template>
+
+<xsl:template match="TITLE">
+    <H1><CENTER>
+	<xsl:apply-templates/>
+	</CENTER></H1><HR/>
+</xsl:template>
+
+<xsl:template match="SPEAKER">
+    <B>
+    <xsl:apply-templates/>
+    <xsl:if test="not(position()=last())"><BR/></xsl:if>
+    </B>
+</xsl:template>
+
+<xsl:template match="SCENE/STAGEDIR">
+    <CENTER><H3>
+	<xsl:apply-templates/>
+	</H3></CENTER>
+</xsl:template>
+
+<xsl:template match="SPEECH/STAGEDIR">
+    <P><I>
+	<xsl:apply-templates/>
+	</I></P>
+</xsl:template>
+
+<xsl:template match="LINE/STAGEDIR">
+     [ <I>
+	<xsl:apply-templates/>
+	</I> ] 
+</xsl:template>
+
+<xsl:template match="SCENE/SUBHEAD">
+    <CENTER><H3>
+	<xsl:apply-templates/>
+	</H3></CENTER>
+</xsl:template>
+
+<xsl:template match="SPEECH/SUBHEAD">
+    <P><B>
+	<xsl:apply-templates/>
+	</B></P>
+</xsl:template>
+
+<xsl:template match="LINE">
+	<xsl:apply-templates/>
+	<BR/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>	
diff --git a/test/tests/contrib/xsltc/mk/mk052.xml b/test/tests/contrib/xsltc/mk/mk052.xml
new file mode 100644
index 0000000..77774f0
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk052.xml
@@ -0,0 +1 @@
+<numbers>12  34.5  18.2  -35</numbers>
diff --git a/test/tests/contrib/xsltc/mk/mk052.xsl b/test/tests/contrib/xsltc/mk/mk052.xsl
new file mode 100644
index 0000000..f37258b
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk052.xsl
@@ -0,0 +1,67 @@
+<xsl:stylesheet 
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+   version="1.0">
+
+  <!-- Test FileName: mk052.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: number-list.xml, number-total.xsl -->
+  <!-- Chapter/Page: 8-553 -->
+  <!-- Purpose: Totaling a list of numbers -->
+  
+<xsl:template name="total-numbers">
+   <xsl:param name="list"/>
+   <xsl:variable name="wlist" 
+      select="concat(normalize-space($list), ' ')"/>
+   <xsl:choose>
+      <xsl:when test="$wlist!=' '">
+         <xsl:variable name="first" 
+            select="substring-before($wlist, ' ')"/>
+         <xsl:variable name="rest" 
+            select="substring-after($wlist, ' ')"/>
+         <xsl:variable name="total">
+            <xsl:call-template name="total-numbers">
+               <xsl:with-param name="list" select="$rest"/>
+            </xsl:call-template>
+         </xsl:variable>
+         <xsl:value-of select="number($first) + number($total)"/>
+      </xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+   </xsl:choose>
+</xsl:template>
+
+<xsl:template match="/">
+   <xsl:call-template name="total-numbers">
+      <xsl:with-param name="list" select="."/>
+   </xsl:call-template>
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk053.xml b/test/tests/contrib/xsltc/mk/mk053.xml
new file mode 100644
index 0000000..ca895a8
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk053.xml
@@ -0,0 +1,19 @@
+<booklist>
+   <book>
+      <title>Angela's Ashes</title>
+      <author>Frank McCourt</author>
+      <publisher>HarperCollins</publisher>
+      <isbn>0 00 649840 X</isbn>
+      <price>6.99</price>
+      <sales>235</sales>
+   </book>
+   <book>
+      <title>Sword of Honour</title>
+      <author>Evelyn Waugh</author>
+      <publisher>Penguin Books</publisher>
+      <isbn>0 14 018967 X</isbn>
+      <price>12.99</price>
+      <sales>12</sales>
+   </book>
+</booklist>
+
diff --git a/test/tests/contrib/xsltc/mk/mk053.xsl b/test/tests/contrib/xsltc/mk/mk053.xsl
new file mode 100644
index 0000000..da5cfab
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk053.xsl
@@ -0,0 +1,66 @@
+<xsl:stylesheet 
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+   version="1.0">
+
+  <!-- Test FileName: mk053.xsl -->
+  <!-- Source Attribution: 
+       This test was written by Michael Kay and is taken from 
+       'XSLT Programmer's Reference' published by Wrox Press Limited in 2000;
+       ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 
+       Now updated in the second edition (ISBN 1861005067), http://www.wrox.com.
+       No part of this book may be reproduced, stored in a retrieval system or 
+       transmitted in any form or by any means - electronic, electrostatic, mechanical, 
+       photocopying, recording or otherwise - without the prior written permission of 
+       the publisher, except in the case of brief quotations embodied in critical articles or reviews.
+  -->
+  <!-- Example: booklist.xml, booksales.xsl -->
+  <!-- Chapter/Page: 8-555 -->
+  <!-- Purpose: Finding the total sales value -->
+  
+<xsl:template name="total-sales-value">
+   <xsl:param name="list"/>
+   <xsl:choose>
+      <xsl:when test="$list">
+         <xsl:variable name="first" select="$list[1]"/>
+         <xsl:variable name="total-of-rest">
+            <xsl:call-template name="total-sales-value">
+               <xsl:with-param name="list" select="$list[position()!=1]"/>
+            </xsl:call-template>
+         </xsl:variable>
+         <xsl:value-of select="$first/sales * $first/price + $total-of-rest"/>
+      </xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+   </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="/">   
+   <xsl:variable name="total">
+        <xsl:call-template name="total-sales-value">
+            <xsl:with-param name="list" select="//book"/>
+        </xsl:call-template>
+   </xsl:variable>
+Total sales value is: <xsl:value-of select="format-number($total, '$#.00')"/>   
+</xsl:template>
+
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk054.xml b/test/tests/contrib/xsltc/mk/mk054.xml
new file mode 100644
index 0000000..bf0aefd
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk054.xml
@@ -0,0 +1,4201 @@
+<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
+<!DOCTYPE spec SYSTEM "spec.dtd" [
+
+<!-- Modified by Michael Kay, 12 February 2000, to remove the declaration
+     of the lt entity, because is not in the form prescribed by the XML specification,
+     and is rejected by Internet Explorer 5 -->
+
+<!-- LAST TOUCHED BY: Tim Bray, 8 February 1997 -->
+<!-- I think that should read 1998 - Michael Kay -->
+
+<!-- The words 'FINAL EDIT' in comments mark places where changes
+need to be made after approval of the document by the ERB, before
+publication.  -->
+
+<!ENTITY XML.version "1.0">
+<!ENTITY doc.date "10 February 1998">
+<!ENTITY iso6.doc.date "19980210">
+<!ENTITY w3c.doc.date "02-Feb-1998">
+<!ENTITY draft.day '10'>
+<!ENTITY draft.month 'February'>
+<!ENTITY draft.year '1998'>
+
+<!ENTITY WebSGML 
+ 'WebSGML Adaptations Annex to ISO 8879'>
+
+<!ENTITY gt     ">"> 
+<!ENTITY xmlpio "'&lt;?xml'">
+<!ENTITY pic    "'?>'">
+<!ENTITY br     "\n">
+<!ENTITY cellback '#c0d9c0'>
+<!ENTITY mdash  "--"> <!-- &#x2014, but nsgmls doesn't grok hex -->
+<!ENTITY com    "--">
+<!ENTITY como   "--">
+<!ENTITY comc   "--">
+<!ENTITY hcro   "&amp;#x">
+<!-- <!ENTITY nbsp " "> -->
+<!-- <!ENTITY nbsp   "&#160;"> -->
+<!ENTITY magicents "<code>amp</code>,
+<code>lt</code>,
+<code>gt</code>,
+<code>apos</code>,
+<code>quot</code>">
+ 
+<!-- audience and distribution status:  for use at publication time -->
+<!ENTITY doc.audience "public review and discussion">
+<!ENTITY doc.distribution "may be distributed freely, as long as
+all text and legal notices remain intact">
+
+]>
+<?xml-stylesheet href="xmlspec.xsl" type="text/xsl"?>
+<!-- for Panorama *-->
+<?VERBATIM "eg" ?>
+
+<spec>
+<header>
+<title>Extensible Markup Language (XML) 1.0</title>
+<version></version>
+<w3c-designation>REC-xml-&iso6.doc.date;</w3c-designation>
+<w3c-doctype>W3C Recommendation</w3c-doctype>
+<pubdate><day>&draft.day;</day><month>&draft.month;</month><year>&draft.year;</year></pubdate>
+
+<publoc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps</loc>
+</publoc>
+<latestloc>
+<loc  href="http://www.w3.org/TR/REC-xml">
+http://www.w3.org/TR/REC-xml</loc>
+</latestloc>
+<prevlocs>
+<loc  href="http://www.w3.org/TR/PR-xml-971208">
+http://www.w3.org/TR/PR-xml-971208</loc>
+<!--
+<loc  href='http://www.w3.org/TR/WD-xml-961114'>
+http://www.w3.org/TR/WD-xml-961114</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970331'>
+http://www.w3.org/TR/WD-xml-lang-970331</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970630'>
+http://www.w3.org/TR/WD-xml-lang-970630</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-970807'>
+http://www.w3.org/TR/WD-xml-970807</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-971117'>
+http://www.w3.org/TR/WD-xml-971117</loc>-->
+</prevlocs>
+<authlist>
+<author><name>Tim Bray</name>
+<affiliation>Textuality and Netscape</affiliation>
+<email 
+href="mailto:tbray@textuality.com">tbray@textuality.com</email></author>
+<author><name>Jean Paoli</name>
+<affiliation>Microsoft</affiliation>
+<email href="mailto:jeanpa@microsoft.com">jeanpa@microsoft.com</email></author>
+<author><name>C. M. Sperberg-McQueen</name>
+<affiliation>University of Illinois at Chicago</affiliation>
+<email href="mailto:cmsmcq@uic.edu">cmsmcq@uic.edu</email></author>
+</authlist>
+<abstract>
+<p>The Extensible Markup Language (XML) is a subset of
+SGML that is completely described in this document. Its goal is to
+enable generic SGML to be served, received, and processed on the Web
+in the way that is now possible with HTML. XML has been designed for
+ease of implementation and for interoperability with both SGML and
+HTML.</p>
+</abstract>
+<status>
+<p>This document has been reviewed by W3C Members and
+other interested parties and has been endorsed by the
+Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited
+as a normative reference from another document. W3C's
+role in making the Recommendation is to draw attention
+to the specification and to promote its widespread
+deployment. This enhances the functionality and
+interoperability of the Web.</p>
+<p>
+This document specifies a syntax created by subsetting an existing,
+widely used international text processing standard (Standard
+Generalized Markup Language, ISO 8879:1986(E) as amended and
+corrected) for use on the World Wide Web.  It is a product of the W3C
+XML Activity, details of which can be found at <loc
+href='http://www.w3.org/XML'>http://www.w3.org/XML</loc>.  A list of
+current W3C Recommendations and other technical documents can be found
+at <loc href='http://www.w3.org/TR'>http://www.w3.org/TR</loc>.
+</p>
+<p>This specification uses the term URI, which is defined by <bibref
+ref="Berners-Lee"/>, a work in progress expected to update <bibref
+ref="RFC1738"/> and <bibref ref="RFC1808"/>. 
+</p>
+<p>The list of known errors in this specification is 
+available at 
+<loc href='http://www.w3.org/XML/xml-19980210-errata'>http://www.w3.org/XML/xml-19980210-errata</loc>.</p>
+<p>Please report errors in this document to 
+<loc href='mailto:xml-editor@w3.org'>xml-editor@w3.org</loc>.
+</p>
+</status>
+
+
+<pubstmt>
+<p>Chicago, Vancouver, Mountain View, et al.:
+World-Wide Web Consortium, XML Working Group, 1996, 1997.</p>
+</pubstmt>
+<sourcedesc>
+<p>Created in electronic form.</p>
+</sourcedesc>
+<langusage>
+<language id='EN'>English</language>
+<language id='ebnf'>Extended Backus-Naur Form (formal grammar)</language>
+</langusage>
+<revisiondesc>
+<slist>
+<sitem>1997-12-03 : CMSMcQ : yet further changes</sitem>
+<sitem>1997-12-02 : TB : further changes (see TB to XML WG,
+2 December 1997)</sitem>
+<sitem>1997-12-02 : CMSMcQ : deal with as many corrections and
+comments from the proofreaders as possible:
+entify hard-coded document date in pubdate element,
+change expansion of entity WebSGML,
+update status description as per Dan Connolly (am not sure
+about refernece to Berners-Lee et al.),
+add 'The' to abstract as per WG decision,
+move Relationship to Existing Standards to back matter and
+combine with References,
+re-order back matter so normative appendices come first,
+re-tag back matter so informative appendices are tagged informdiv1,
+remove XXX XXX from list of 'normative' specs in prose,
+move some references from Other References to Normative References,
+add RFC 1738, 1808, and 2141 to Other References (they are not
+normative since we do not require the processor to enforce any 
+rules based on them),
+add reference to 'Fielding draft' (Berners-Lee et al.),
+move notation section to end of body,
+drop URIchar non-terminal and use SkipLit instead,
+lose stray reference to defunct nonterminal 'markupdecls',
+move reference to Aho et al. into appendix (Tim's right),
+add prose note saying that hash marks and fragment identifiers are
+NOT part of the URI formally speaking, and are NOT legal in 
+system identifiers (processor 'may' signal an error).
+Work through:
+Tim Bray reacting to James Clark,
+Tim Bray on his own,
+Eve Maler,
+
+NOT DONE YET:
+change binary / text to unparsed / parsed.
+handle James's suggestion about &lt; in attriubte values
+uppercase hex characters,
+namechar list,
+</sitem>
+<sitem>1997-12-01 : JB : add some column-width parameters</sitem>
+<sitem>1997-12-01 : CMSMcQ : begin round of changes to incorporate
+recent WG decisions and other corrections:
+binding sources of character encoding info (27 Aug / 3 Sept),
+correct wording of Faust quotation (restore dropped line),
+drop SDD from EncodingDecl,
+change text at version number 1.0,
+drop misleading (wrong!) sentence about ignorables and extenders,
+modify definition of PCData to make bar on msc grammatical,
+change grammar's handling of internal subset (drop non-terminal markupdecls),
+change definition of includeSect to allow conditional sections,
+add integral-declaration constraint on internal subset,
+drop misleading / dangerous sentence about relationship of
+entities with system storage objects,
+change table body tag to htbody as per EM change to DTD,
+add rule about space normalization in public identifiers,
+add description of how to generate our name-space rules from 
+Unicode character database (needs further work!).
+</sitem>
+<sitem>1997-10-08 : TB : Removed %-constructs again, new rules
+for PE appearance.</sitem>
+<sitem>1997-10-01 : TB : Case-sensitive markup; cleaned up
+element-type defs, lotsa little edits for style</sitem>
+<sitem>1997-09-25 : TB : Change to elm's new DTD, with
+substantial detail cleanup as a side-effect</sitem>
+<sitem>1997-07-24 : CMSMcQ : correct error (lost *) in definition 
+of ignoreSectContents (thanks to Makoto Murata)</sitem>
+<sitem>Allow all empty elements to have end-tags, consistent with
+SGML TC (as per JJC).</sitem>
+<sitem>1997-07-23 : CMSMcQ : pre-emptive strike on pending corrections:
+introduce the term 'empty-element tag', note that all empty elements
+may use it, and elements declared EMPTY must use it.
+Add WFC requiring encoding decl to come first in an entity.
+Redefine notations to point to PIs as well as binary entities.
+Change autodetection table by removing bytes 3 and 4 from 
+examples with Byte Order Mark.
+Add content model as a term and clarify that it applies to both
+mixed and element content.
+</sitem>
+<sitem>1997-06-30 : CMSMcQ : change date, some cosmetic changes,
+changes to productions for choice, seq, Mixed, NotationType,
+Enumeration.  Follow James Clark's suggestion and prohibit 
+conditional sections in internal subset.  TO DO:  simplify
+production for ignored sections as a result, since we don't 
+need to worry about parsers which don't expand PErefs finding
+a conditional section.</sitem>
+<sitem>1997-06-29 : TB : various edits</sitem>
+<sitem>1997-06-29 : CMSMcQ : further changes:
+Suppress old FINAL EDIT comments and some dead material.
+Revise occurrences of % in grammar to exploit Henry Thompson's pun,
+especially markupdecl and attdef.
+Remove RMD requirement relating to element content (?).
+</sitem>
+<sitem>1997-06-28 : CMSMcQ : Various changes for 1 July draft:
+Add text for draconian error handling (introduce
+the term Fatal Error).
+RE deleta est (changing wording from 
+original announcement to restrict the requirement to validating
+parsers).
+Tag definition of validating processor and link to it.
+Add colon as name character.
+Change def of %operator.
+Change standard definitions of lt, gt, amp.
+Strip leading zeros from #x00nn forms.</sitem>
+<sitem>1997-04-02 : CMSMcQ : final corrections of editorial errors
+found in last night's proofreading.  Reverse course once more on
+well-formed:   Webster's Second hyphenates it, and that's enough
+for me.</sitem>
+<sitem>1997-04-01 : CMSMcQ : corrections from JJC, EM, HT, and self</sitem>
+<sitem>1997-03-31 : Tim Bray : many changes</sitem>
+<sitem>1997-03-29 : CMSMcQ : some Henry Thompson (on entity handling),
+some Charles Goldfarb, some ERB decisions (PE handling in miscellaneous
+declarations.  Changed Ident element to accept def attribute.
+Allow normalization of Unicode characters.  move def of systemliteral
+into section on literals.</sitem>
+<sitem>1997-03-28 : CMSMcQ : make as many corrections as possible, from
+Terry Allen, Norbert Mikula, James Clark, Jon Bosak, Henry Thompson,
+Paul Grosso, and self.  Among other things:  give in on "well formed"
+(Terry is right), tentatively rename QuotedCData as AttValue
+and Literal as EntityValue to be more informative, since attribute
+values are the <emph>only</emph> place QuotedCData was used, and
+vice versa for entity text and Literal. (I'd call it Entity Text, 
+but 8879 uses that name for both internal and external entities.)</sitem>
+<sitem>1997-03-26 : CMSMcQ : resynch the two forks of this draft, reapply
+my changes dated 03-20 and 03-21.  Normalize old 'may not' to 'must not'
+except in the one case where it meant 'may or may not'.</sitem>
+<sitem>1997-03-21 : TB : massive changes on plane flight from Chicago
+to Vancouver</sitem>
+<sitem>1997-03-21 : CMSMcQ : correct as many reported errors as possible.
+</sitem>
+<sitem>1997-03-20 : CMSMcQ : correct typos listed in CMSMcQ hand copy of spec.</sitem>
+<sitem>1997-03-20 : CMSMcQ : cosmetic changes preparatory to revision for
+WWW conference April 1997:  restore some of the internal entity 
+references (e.g. to docdate, etc.), change character xA0 to &amp;nbsp;
+and define nbsp as &amp;#160;, and refill a lot of paragraphs for
+legibility.</sitem>
+<sitem>1996-11-12 : CMSMcQ : revise using Tim's edits:
+Add list type of NUMBERED and change most lists either to
+BULLETS or to NUMBERED.
+Suppress QuotedNames, Names (not used).
+Correct trivial-grammar doc type decl.
+Rename 'marked section' as 'CDATA section' passim.
+Also edits from James Clark:
+Define the set of characters from which [^abc] subtracts.
+Charref should use just [0-9] not Digit.
+Location info needs cleaner treatment:  remove?  (ERB
+question).
+One example of a PI has wrong pic.
+Clarify discussion of encoding names.
+Encoding failure should lead to unspecified results; don't
+prescribe error recovery.
+Don't require exposure of entity boundaries.
+Ignore white space in element content.
+Reserve entity names of the form u-NNNN.
+Clarify relative URLs.
+And some of my own:
+Correct productions for content model:  model cannot
+consist of a name, so "elements ::= cp" is no good.
+</sitem>
+<sitem>1996-11-11 : CMSMcQ : revise for style.
+Add new rhs to entity declaration, for parameter entities.</sitem>
+<sitem>1996-11-10 : CMSMcQ : revise for style.
+Fix / complete section on names, characters.
+Add sections on parameter entities, conditional sections.
+Still to do:  Add compatibility note on deterministic content models.
+Finish stylistic revision.</sitem>
+<sitem>1996-10-31 : TB : Add Entity Handling section</sitem>
+<sitem>1996-10-30 : TB : Clean up term &amp; termdef.  Slip in
+ERB decision re EMPTY.</sitem>
+<sitem>1996-10-28 : TB : Change DTD.  Implement some of Michael's
+suggestions.  Change comments back to //.  Introduce language for
+XML namespace reservation.  Add section on white-space handling.
+Lots more cleanup.</sitem>
+<sitem>1996-10-24 : CMSMcQ : quick tweaks, implement some ERB
+decisions.  Characters are not integers.  Comments are /* */ not //.
+Add bibliographic refs to 10646, HyTime, Unicode.
+Rename old Cdata as MsData since it's <emph>only</emph> seen
+in marked sections.  Call them attribute-value pairs not
+name-value pairs, except once.  Internal subset is optional, needs
+'?'.  Implied attributes should be signaled to the app, not
+have values supplied by processor.</sitem>
+<sitem>1996-10-16 : TB : track down &amp; excise all DSD references;
+introduce some EBNF for entity declarations.</sitem>
+<sitem>1996-10-?? : TB : consistency check, fix up scraps so
+they all parse, get formatter working, correct a few productions.</sitem>
+<sitem>1996-10-10/11 : CMSMcQ : various maintenance, stylistic, and
+organizational changes:
+Replace a few literals with xmlpio and
+pic entities, to make them consistent and ensure we can change pic
+reliably when the ERB votes.
+Drop paragraph on recognizers from notation section.
+Add match, exact match to terminology.
+Move old 2.2 XML Processors and Apps into intro.
+Mention comments, PIs, and marked sections in discussion of
+delimiter escaping.
+Streamline discussion of doctype decl syntax.
+Drop old section of 'PI syntax' for doctype decl, and add
+section on partial-DTD summary PIs to end of Logical Structures
+section.
+Revise DSD syntax section to use Tim's subset-in-a-PI
+mechanism.</sitem>
+<sitem>1996-10-10 : TB : eliminate name recognizers (and more?)</sitem>
+<sitem>1996-10-09 : CMSMcQ : revise for style, consistency through 2.3
+(Characters)</sitem>
+<sitem>1996-10-09 : CMSMcQ : re-unite everything for convenience,
+at least temporarily, and revise quickly</sitem>
+<sitem>1996-10-08 : TB : first major homogenization pass</sitem>
+<sitem>1996-10-08 : TB : turn "current" attribute on div type into 
+CDATA</sitem>
+<sitem>1996-10-02 : TB : remould into skeleton + entities</sitem>
+<sitem>1996-09-30 : CMSMcQ : add a few more sections prior to exchange
+                            with Tim.</sitem>
+<sitem>1996-09-20 : CMSMcQ : finish transcribing notes.</sitem>
+<sitem>1996-09-19 : CMSMcQ : begin transcribing notes for draft.</sitem>
+<sitem>1996-09-13 : CMSMcQ : made outline from notes of 09-06,
+do some housekeeping</sitem>
+</slist>
+</revisiondesc>
+</header>
+<body> 
+<div1 id='sec-intro'>
+<head>Introduction</head>
+<p>Extensible Markup Language, abbreviated XML, describes a class of
+data objects called <termref def="dt-xml-doc">XML documents</termref> and
+partially describes the behavior of 
+computer programs which process them. XML is an application profile or
+restricted form of SGML, the Standard Generalized Markup 
+Language <bibref ref='ISO8879'/>.
+By construction, XML documents 
+are conforming SGML documents.
+</p>
+<p>XML documents are made up of storage units called <termref
+def="dt-entity">entities</termref>, which contain either parsed
+or unparsed data.
+Parsed data is made up of <termref def="dt-character">characters</termref>,
+some 
+of which form <termref def="dt-chardata">character data</termref>, 
+and some of which form <termref def="dt-markup">markup</termref>.
+Markup encodes a description of the document's storage layout and
+logical structure. XML provides a mechanism to impose constraints on
+the storage layout and logical structure.</p>
+<p><termdef id="dt-xml-proc" term="XML Processor">A software module
+called an <term>XML processor</term> is used to read XML documents
+and provide access to their content and structure.</termdef> <termdef
+id="dt-app" term="Application">It is assumed that an XML processor is
+doing its work on behalf of another module, called the
+<term>application</term>.</termdef> This specification describes the
+required behavior of an XML processor in terms of how it must read XML
+data and the information it must provide to the application.</p>
+ 
+<div2 id='sec-origin-goals'>
+<head>Origin and Goals</head>
+<p>XML was developed by an XML Working Group (originally known as the
+SGML Editorial Review Board) formed under the auspices of the World
+Wide Web Consortium (W3C) in 1996.
+It was chaired by Jon Bosak of Sun
+Microsystems with the active participation of an XML Special
+Interest Group (previously known as the SGML Working Group) also
+organized by the W3C. The membership of the XML Working Group is given
+in an appendix. Dan Connolly served as the WG's contact with the W3C.
+</p>
+<p>The design goals for XML are:<olist>
+<item><p>XML shall be straightforwardly usable over the
+Internet.</p></item>
+<item><p>XML shall support a wide variety of applications.</p></item>
+<item><p>XML shall be compatible with SGML.</p></item>
+<item><p>It shall be easy to write programs which process XML
+documents.</p></item>
+<item><p>The number of optional features in XML is to be kept to the
+absolute minimum, ideally zero.</p></item>
+<item><p>XML documents should be human-legible and reasonably
+clear.</p></item>
+<item><p>The XML design should be prepared quickly.</p></item>
+<item><p>The design of XML shall be formal and concise.</p></item>
+<item><p>XML documents shall be easy to create.</p></item>
+<item><p>Terseness in XML markup is of minimal importance.</p></item></olist>
+</p>
+<p>This specification, 
+together with associated standards
+(Unicode and ISO/IEC 10646 for characters,
+Internet RFC 1766 for language identification tags, 
+ISO 639 for language name codes, and 
+ISO 3166 for country name codes),
+provides all the information necessary to understand 
+XML Version &XML.version;
+and construct computer programs to process it.</p>
+<p>This version of the XML specification
+<!-- is for &doc.audience;.-->
+&doc.distribution;.</p>
+
+</div2>
+ 
+
+
+ 
+<div2 id='sec-terminology'>
+<head>Terminology</head>
+ 
+<p>The terminology used to describe XML documents is defined in the body of
+this specification.
+The terms defined in the following list are used in building those
+definitions and in describing the actions of an XML processor:
+<glist>
+<gitem>
+<label>may</label>
+<def><p><termdef id="dt-may" term="May">Conforming documents and XML
+processors are permitted to but need not behave as
+described.</termdef></p></def>
+</gitem>
+<gitem>
+<label>must</label>
+<def><p>Conforming documents and XML processors 
+are required to behave as described; otherwise they are in error.
+<!-- do NOT change this! this is what defines a violation of
+a 'must' clause as 'an error'. -MSM -->
+</p></def>
+</gitem>
+<gitem>
+<label>error</label>
+<def><p><termdef id='dt-error' term='Error'
+>A violation of the rules of this
+specification; results are
+undefined.  Conforming software may detect and report an error and may
+recover from it.</termdef></p></def>
+</gitem>
+<gitem>
+<label>fatal error</label>
+<def><p><termdef id="dt-fatal" term="Fatal Error">An error
+which a conforming <termref def="dt-xml-proc">XML processor</termref>
+must detect and report to the application.
+After encountering a fatal error, the
+processor may continue
+processing the data to search for further errors and may report such
+errors to the application.  In order to support correction of errors,
+the processor may make unprocessed data from the document (with
+intermingled character data and markup) available to the application.
+Once a fatal error is detected, however, the processor must not
+continue normal processing (i.e., it must not
+continue to pass character data and information about the document's
+logical structure to the application in the normal way).
+</termdef></p></def>
+</gitem>
+<gitem>
+<label>at user option</label>
+<def><p>Conforming software may or must (depending on the modal verb in the
+sentence) behave as described; if it does, it must
+provide users a means to enable or disable the behavior
+described.</p></def>
+</gitem>
+<gitem>
+<label>validity constraint</label>
+<def><p>A rule which applies to all 
+<termref def="dt-valid">valid</termref> XML documents.
+Violations of validity constraints are errors; they must, at user option, 
+be reported by 
+<termref def="dt-validating">validating XML processors</termref>.</p></def>
+</gitem>
+<gitem>
+<label>well-formedness constraint</label>
+<def><p>A rule which applies to all <termref
+def="dt-wellformed">well-formed</termref> XML documents.
+Violations of well-formedness constraints are 
+<termref def="dt-fatal">fatal errors</termref>.</p></def>
+</gitem>
+
+<gitem>
+<label>match</label>
+<def><p><termdef id="dt-match" term="match">(Of strings or names:) 
+Two strings or names being compared must be identical.
+Characters with multiple possible representations in ISO/IEC 10646 (e.g.
+characters with 
+both precomposed and base+diacritic forms) match only if they have the
+same representation in both strings.
+At user option, processors may normalize such characters to
+some canonical form.
+No case folding is performed. 
+(Of strings and rules in the grammar:)  
+A string matches a grammatical production if it belongs to the
+language generated by that production.
+(Of content and content models:)
+An element matches its declaration when it conforms
+in the fashion described in the constraint
+<specref ref='elementvalid'/>.
+</termdef>
+</p></def>
+</gitem>
+<gitem>
+<label>for compatibility</label>
+<def><p><termdef id="dt-compat" term="For Compatibility">A feature of
+XML included solely to ensure that XML remains compatible with SGML.
+</termdef></p></def>
+</gitem>
+<gitem>
+<label>for interoperability</label>
+<def><p><termdef id="dt-interop" term="For interoperability">A
+non-binding recommendation included to increase the chances that XML
+documents can be processed by the existing installed base of SGML
+processors which predate the
+&WebSGML;.</termdef></p></def>
+</gitem>
+</glist>
+</p>
+</div2>
+
+ 
+</div1>
+<!-- &Docs; -->
+ 
+<div1 id='sec-documents'>
+<head>Documents</head>
+ 
+<p><termdef id="dt-xml-doc" term="XML Document">
+A data object is an
+<term>XML document</term> if it is
+<termref def="dt-wellformed">well-formed</termref>, as
+defined in this specification.
+A well-formed XML document may in addition be
+<termref def="dt-valid">valid</termref> if it meets certain further 
+constraints.</termdef></p>
+ 
+<p>Each XML document has both a logical and a physical structure.
+Physically, the document is composed of units called <termref
+def="dt-entity">entities</termref>.  An entity may <termref
+def="dt-entref">refer</termref> to other entities to cause their
+inclusion in the document. A document begins in a "root"  or <termref
+def="dt-docent">document entity</termref>.
+Logically, the document is composed of declarations, elements, 
+comments,
+character references, and
+processing
+instructions, all of which are indicated in the document by explicit
+markup.
+The logical and physical structures must nest properly, as described  
+in <specref ref='wf-entities'/>.
+</p>
+ 
+<div2 id='sec-well-formed'>
+<head>Well-Formed XML Documents</head>
+ 
+<p><termdef id="dt-wellformed" term="Well-Formed">
+A textual object is 
+a well-formed XML document if:</termdef>
+<olist>
+<item><p>Taken as a whole, it
+matches the production labeled <nt def='NT-document'>document</nt>.</p></item>
+<item><p>It
+meets all the well-formedness constraints given in this specification.</p>
+</item>
+<item><p>Each of the <termref def='dt-parsedent'>parsed entities</termref> 
+which is referenced directly or indirectly within the document is
+<titleref href='wf-entities'>well-formed</titleref>.</p></item>
+</olist></p>
+<p>
+<scrap lang='ebnf' id='document'>
+<head>Document</head>
+<prod id='NT-document'><lhs>document</lhs>
+<rhs><nt def='NT-prolog'>prolog</nt> 
+<nt def='NT-element'>element</nt> 
+<nt def='NT-Misc'>Misc</nt>*</rhs></prod>
+</scrap>
+</p>
+<p>Matching the <nt def="NT-document">document</nt> production 
+implies that:
+<olist>
+<item><p>It contains one or more
+<termref def="dt-element">elements</termref>.</p>
+</item>
+<!--* N.B. some readers (notably JC) find the following
+paragraph awkward and redundant.  I agree it's logically redundant:
+it *says* it is summarizing the logical implications of
+matching the grammar, and that means by definition it's
+logically redundant.  I don't think it's rhetorically
+redundant or unnecessary, though, so I'm keeping it.  It
+could however use some recasting when the editors are feeling
+stronger. -MSM *-->
+<item><p><termdef id="dt-root" term="Root Element">There is  exactly
+one element, called the <term>root</term>, or document element,  no
+part of which appears in the <termref
+def="dt-content">content</termref> of any other element.</termdef>
+For all other elements, if the start-tag is in the content of another
+element, the end-tag is in the content of the same element.  More
+simply stated, the elements, delimited by start- and end-tags, nest
+properly within each other.
+</p></item>
+</olist>
+</p>
+<p><termdef id="dt-parentchild" term="Parent/Child">As a consequence 
+of this,
+for each non-root element
+<code>C</code> in the document, there is one other element <code>P</code>
+in the document such that 
+<code>C</code> is in the content of <code>P</code>, but is not in
+the content of any other element that is in the content of
+<code>P</code>.  
+<code>P</code> is referred to as the
+<term>parent</term> of <code>C</code>, and <code>C</code> as a
+<term>child</term> of <code>P</code>.</termdef></p></div2>
+ 
+<div2 id="charsets">
+<head>Characters</head>
+ 
+<p><termdef id="dt-text" term="Text">A parsed entity contains
+<term>text</term>, a sequence of 
+<termref def="dt-character">characters</termref>, 
+which may represent markup or character data.</termdef> 
+<termdef id="dt-character" term="Character">A <term>character</term> 
+is an atomic unit of text as specified by
+ISO/IEC 10646 <bibref ref="ISO10646"/>.
+Legal characters are tab, carriage return, line feed, and the legal
+graphic characters of Unicode and ISO/IEC 10646.
+The use of "compatibility characters", as defined in section 6.8
+of <bibref ref='Unicode'/>, is discouraged.
+</termdef> 
+<scrap lang="ebnf" id="char32">
+<head>Character Range</head>
+<prodgroup pcw2="4" pcw4="17.5" pcw5="11">
+<prod id="NT-Char"><lhs>Char</lhs> 
+<rhs>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] 
+| [#x10000-#x10FFFF]</rhs> 
+<com>any Unicode character, excluding the
+surrogate blocks, FFFE, and FFFF.</com> </prod>
+</prodgroup>
+</scrap>
+</p>
+
+<p>The mechanism for encoding character code points into bit patterns may
+vary from entity to entity. All XML processors must accept the UTF-8
+and UTF-16 encodings of 10646; the mechanisms for signaling which of
+the two is in use, or for bringing other encodings into play, are
+discussed later, in <specref ref='charencoding'/>.
+</p>
+<!--
+<p>Regardless of the specific encoding used, any character in the ISO/IEC
+10646 character set may be referred to by the decimal or hexadecimal
+equivalent of its 
+UCS-4 code value.
+</p>-->
+</div2>
+ 
+<div2 id='sec-common-syn'>
+<head>Common Syntactic Constructs</head>
+ 
+<p>This section defines some symbols used widely in the grammar.</p>
+<p><nt def="NT-S">S</nt> (white space) consists of one or more space (#x20)
+characters, carriage returns, line feeds, or tabs.
+
+<scrap lang="ebnf" id='white'>
+<head>White Space</head>
+<prodgroup pcw2="4" pcw4="17.5" pcw5="11">
+<prod id='NT-S'><lhs>S</lhs>
+<rhs>(#x20 | #x9 | #xD | #xA)+</rhs>
+</prod>
+</prodgroup>
+</scrap></p>
+<p>Characters are classified for convenience as letters, digits, or other
+characters.  Letters consist of an alphabetic or syllabic 
+base character possibly
+followed by one or more combining characters, or of an ideographic
+character.  
+Full definitions of the specific characters in each class
+are given in <specref ref='CharClasses'/>.</p>
+<p><termdef id="dt-name" term="Name">A <term>Name</term> is a token
+beginning with a letter or one of a few punctuation characters, and continuing
+with letters, digits, hyphens, underscores, colons, or full stops, together
+known as name characters.</termdef>
+Names beginning with the string "<code>xml</code>", or any string
+which would match <code>(('X'|'x') ('M'|'m') ('L'|'l'))</code>, are
+reserved for standardization in this or future versions of this
+specification.
+</p>
+<note>
+<p>The colon character within XML names is reserved for experimentation with
+name spaces.  
+Its meaning is expected to be
+standardized at some future point, at which point those documents 
+using the colon for experimental purposes may need to be updated.
+(There is no guarantee that any name-space mechanism
+adopted for XML will in fact use the colon as a name-space delimiter.)
+In practice, this means that authors should not use the colon in XML
+names except as part of name-space experiments, but that XML processors
+should accept the colon as a name character.</p>
+</note>
+<p>An
+<nt def='NT-Nmtoken'>Nmtoken</nt> (name token) is any mixture of
+name characters.
+<scrap lang='ebnf'>
+<head>Names and Tokens</head>
+<prod id='NT-NameChar'><lhs>NameChar</lhs>
+<rhs><nt def="NT-Letter">Letter</nt> 
+| <nt def='NT-Digit'>Digit</nt> 
+| '.' | '-' | '_' | ':'
+| <nt def='NT-CombiningChar'>CombiningChar</nt> 
+| <nt def='NT-Extender'>Extender</nt></rhs>
+</prod>
+<prod id='NT-Name'><lhs>Name</lhs>
+<rhs>(<nt def='NT-Letter'>Letter</nt> | '_' | ':')
+(<nt def='NT-NameChar'>NameChar</nt>)*</rhs></prod>
+<prod id='NT-Names'><lhs>Names</lhs>
+<rhs><nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt>)*</rhs></prod>
+<prod id='NT-Nmtoken'><lhs>Nmtoken</lhs>
+<rhs>(<nt def='NT-NameChar'>NameChar</nt>)+</rhs></prod>
+<prod id='NT-Nmtokens'><lhs>Nmtokens</lhs>
+<rhs><nt def='NT-Nmtoken'>Nmtoken</nt> (<nt def='NT-S'>S</nt> <nt def='NT-Nmtoken'>Nmtoken</nt>)*</rhs></prod>
+</scrap>
+</p>
+<p>Literal data is any quoted string not containing
+the quotation mark used as a delimiter for that string.
+Literals are used
+for specifying the content of internal entities
+(<nt def='NT-EntityValue'>EntityValue</nt>),
+the values of attributes (<nt def='NT-AttValue'>AttValue</nt>), 
+and external identifiers 
+(<nt def="NT-SystemLiteral">SystemLiteral</nt>).  
+Note that a <nt def='NT-SystemLiteral'>SystemLiteral</nt>
+can be parsed without scanning for markup.
+<scrap lang='ebnf'>
+<head>Literals</head>
+<prod id='NT-EntityValue'><lhs>EntityValue</lhs>
+<rhs>'"' 
+([^%&amp;"] 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-Reference'>Reference</nt>)*
+'"' 
+</rhs>
+<rhs>|&nbsp; 
+"'" 
+([^%&amp;'] 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-Reference'>Reference</nt>)* 
+"'"</rhs>
+</prod>
+<prod id='NT-AttValue'><lhs>AttValue</lhs>
+<rhs>'"' 
+([^&lt;&amp;"] 
+| <nt def='NT-Reference'>Reference</nt>)* 
+'"' 
+</rhs>
+<rhs>|&nbsp; 
+"'" 
+([^&lt;&amp;'] 
+| <nt def='NT-Reference'>Reference</nt>)* 
+"'"</rhs>
+</prod>
+<prod id="NT-SystemLiteral"><lhs>SystemLiteral</lhs>
+<rhs>('"' [^"]* '"') |&nbsp;("'" [^']* "'")
+</rhs>
+</prod>
+<prod id="NT-PubidLiteral"><lhs>PubidLiteral</lhs>
+<rhs>'"' <nt def='NT-PubidChar'>PubidChar</nt>* 
+'"' 
+| "'" (<nt def='NT-PubidChar'>PubidChar</nt> - "'")* "'"</rhs>
+</prod>
+<prod id="NT-PubidChar"><lhs>PubidChar</lhs>
+<rhs>#x20 | #xD | #xA 
+|&nbsp;[a-zA-Z0-9]
+|&nbsp;[-'()+,./:=?;!*#@$_%]</rhs>
+</prod>
+</scrap>
+</p>
+
+</div2>
+
+<div2 id='syntax'>
+<head>Character Data and Markup</head>
+ 
+<p><termref def='dt-text'>Text</termref> consists of intermingled 
+<termref def="dt-chardata">character
+data</termref> and markup.
+<termdef id="dt-markup" term="Markup"><term>Markup</term> takes the form of
+<termref def="dt-stag">start-tags</termref>,
+<termref def="dt-etag">end-tags</termref>,
+<termref def="dt-empty">empty-element tags</termref>,
+<termref def="dt-entref">entity references</termref>,
+<termref def="dt-charref">character references</termref>,
+<termref def="dt-comment">comments</termref>,
+<termref def="dt-cdsection">CDATA section</termref> delimiters,
+<termref def="dt-doctype">document type declarations</termref>, and
+<termref def="dt-pi">processing instructions</termref>.
+</termdef>
+</p>
+<p><termdef id="dt-chardata" term="Character Data">All text that is not markup
+constitutes the <term>character data</term> of
+the document.</termdef></p>
+<p>The ampersand character (&amp;) and the left angle bracket (&lt;)
+may appear in their literal form <emph>only</emph> when used as markup
+delimiters, or within a <termref def="dt-comment">comment</termref>, a
+<termref def="dt-pi">processing instruction</termref>, 
+or a <termref def="dt-cdsection">CDATA section</termref>.  
+
+They are also legal within the <termref def='dt-litentval'>literal entity
+value</termref> of an internal entity declaration; see
+<specref ref='wf-entities'/>.
+<!-- FINAL EDIT:  restore internal entity decl or leave it out. -->
+If they are needed elsewhere,
+they must be <termref def="dt-escape">escaped</termref>
+using either <termref def='dt-charref'>numeric character references</termref>
+or the strings
+"<code>&amp;amp;</code>" and "<code>&amp;lt;</code>" respectively. 
+The right angle
+bracket (>) may be represented using the string
+"<code>&amp;gt;</code>", and must, <termref def='dt-compat'>for
+compatibility</termref>, 
+be escaped using
+"<code>&amp;gt;</code>" or a character reference 
+when it appears in the string
+"<code>]]&gt;</code>"
+in content, 
+when that string is not marking the end of 
+a <termref def="dt-cdsection">CDATA section</termref>. 
+</p>
+<p>
+In the content of elements, character data 
+is any string of characters which does
+not contain the start-delimiter of any markup.  
+In a CDATA section, character data
+is any string of characters not including the CDATA-section-close
+delimiter, "<code>]]&gt;</code>".</p>
+<p>
+To allow attribute values to contain both single and double quotes, the
+apostrophe or single-quote character (') may be represented as
+"<code>&amp;apos;</code>", and the double-quote character (") as
+"<code>&amp;quot;</code>".
+<scrap lang="ebnf">
+<head>Character Data</head>
+<prod id='NT-CharData'>
+<lhs>CharData</lhs>
+<rhs>[^&lt;&amp;]* - ([^&lt;&amp;]* ']]&gt;' [^&lt;&amp;]*)</rhs>
+</prod>
+</scrap>
+</p>
+</div2>
+ 
+<div2 id='sec-comments'>
+<head>Comments</head>
+ 
+<p><termdef id="dt-comment" term="Comment"><term>Comments</term> may 
+appear anywhere in a document outside other 
+<termref def='dt-markup'>markup</termref>; in addition,
+they may appear within the document type declaration
+at places allowed by the grammar.
+They are not part of the document's <termref def="dt-chardata">character
+data</termref>; an XML
+processor may, but need not, make it possible for an application to
+retrieve the text of comments.
+<termref def="dt-compat">For compatibility</termref>, the string
+"<code>--</code>" (double-hyphen) must not occur within
+comments.
+<scrap lang="ebnf">
+<head>Comments</head>
+<prod id='NT-Comment'><lhs>Comment</lhs>
+<rhs>'&lt;!--'
+((<nt def='NT-Char'>Char</nt> - '-') 
+| ('-' (<nt def='NT-Char'>Char</nt> - '-')))* 
+'-->'</rhs>
+</prod>
+</scrap>
+</termdef></p>
+<p>An example of a comment:
+<eg>&lt;!&como; declarations for &lt;head> &amp; &lt;body> &comc;&gt;</eg>
+</p>
+</div2>
+ 
+<div2 id='sec-pi'>
+<head>Processing Instructions</head>
+ 
+<p><termdef id="dt-pi" term="Processing instruction"><term>Processing
+instructions</term> (PIs) allow documents to contain instructions
+for applications.
+ 
+<scrap lang="ebnf">
+<head>Processing Instructions</head>
+<prod id='NT-PI'><lhs>PI</lhs>
+<rhs>'&lt;?' <nt def='NT-PITarget'>PITarget</nt> 
+(<nt def='NT-S'>S</nt> 
+(<nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* &pic; <nt def='NT-Char'>Char</nt>*)))?
+&pic;</rhs></prod>
+<prod id='NT-PITarget'><lhs>PITarget</lhs>
+<rhs><nt def='NT-Name'>Name</nt> - 
+(('X' | 'x') ('M' | 'm') ('L' | 'l'))</rhs>
+</prod>
+</scrap></termdef>
+PIs are not part of the document's <termref def="dt-chardata">character
+data</termref>, but must be passed through to the application. The
+PI begins with a target (<nt def='NT-PITarget'>PITarget</nt>) used
+to identify the application to which the instruction is directed.  
+The target names "<code>XML</code>", "<code>xml</code>", and so on are
+reserved for standardization in this or future versions of this
+specification.
+The 
+XML <termref def='dt-notation'>Notation</termref> mechanism
+may be used for
+formal declaration of PI targets.
+</p>
+</div2>
+ 
+<div2 id='sec-cdata-sect'>
+<head>CDATA Sections</head>
+ 
+<p><termdef id="dt-cdsection" term="CDATA Section"><term>CDATA sections</term>
+may occur 
+anywhere character data may occur; they are
+used to escape blocks of text containing characters which would
+otherwise be recognized as markup.  CDATA sections begin with the
+string "<code>&lt;![CDATA[</code>" and end with the string
+"<code>]]&gt;</code>":
+<scrap lang="ebnf">
+<head>CDATA Sections</head>
+<prod id='NT-CDSect'><lhs>CDSect</lhs>
+<rhs><nt def='NT-CDStart'>CDStart</nt> 
+<nt def='NT-CData'>CData</nt> 
+<nt def='NT-CDEnd'>CDEnd</nt></rhs></prod>
+<prod id='NT-CDStart'><lhs>CDStart</lhs>
+<rhs>'&lt;![CDATA['</rhs>
+</prod>
+<prod id='NT-CData'><lhs>CData</lhs>
+<rhs>(<nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* ']]&gt;' <nt def='NT-Char'>Char</nt>*))
+</rhs>
+</prod>
+<prod id='NT-CDEnd'><lhs>CDEnd</lhs>
+<rhs>']]&gt;'</rhs>
+</prod>
+</scrap>
+
+Within a CDATA section, only the <nt def='NT-CDEnd'>CDEnd</nt> string is
+recognized as markup, so that left angle brackets and ampersands may occur in
+their literal form; they need not (and cannot) be escaped using
+"<code>&amp;lt;</code>" and "<code>&amp;amp;</code>".  CDATA sections
+cannot nest.</termdef>
+</p>
+
+<p>An example of a CDATA section, in which "<code>&lt;greeting></code>" and 
+"<code>&lt;/greeting></code>"
+are recognized as <termref def='dt-chardata'>character data</termref>, not
+<termref def='dt-markup'>markup</termref>:
+<eg>&lt;![CDATA[&lt;greeting>Hello, world!&lt;/greeting>]]&gt;</eg>
+</p>
+</div2>
+ 
+<div2 id='sec-prolog-dtd'>
+<head>Prolog and Document Type Declaration</head>
+ 
+<p><termdef id='dt-xmldecl' term='XML Declaration'>XML documents 
+may, and should, 
+begin with an <term>XML declaration</term> which specifies
+the version of
+XML being used.</termdef>
+For example, the following is a complete XML document, <termref
+def="dt-wellformed">well-formed</termref> but not
+<termref def="dt-valid">valid</termref>:
+<eg><![CDATA[<?xml version="1.0"?>
+<greeting>Hello, world!</greeting>
+]]></eg>
+and so is this:
+<eg><![CDATA[<greeting>Hello, world!</greeting>
+]]></eg>
+</p>
+
+<p>The version number "<code>1.0</code>" should be used to indicate
+conformance to this version of this specification; it is an error
+for a document to use the value "<code>1.0</code>" 
+if it does not conform to this version of this specification.
+It is the intent
+of the XML working group to give later versions of this specification
+numbers other than "<code>1.0</code>", but this intent does not
+indicate a
+commitment to produce any future versions of XML, nor if any are produced, to
+use any particular numbering scheme.
+Since future versions are not ruled out, this construct is provided 
+as a means to allow the possibility of automatic version recognition, should
+it become necessary.
+Processors may signal an error if they receive documents labeled with 
+versions they do not support. 
+</p>
+<p>The function of the markup in an XML document is to describe its
+storage and logical structure and to associate attribute-value pairs
+with its logical structures.  XML provides a mechanism, the <termref
+def="dt-doctype">document type declaration</termref>, to define
+constraints on the logical structure and to support the use of
+predefined storage units.
+
+<termdef id="dt-valid" term="Validity">An XML document is 
+<term>valid</term> if it has an associated document type
+declaration and if the document
+complies with the constraints expressed in it.</termdef></p>
+<p>The document type declaration must appear before
+the first <termref def="dt-element">element</termref> in the document.
+<scrap lang="ebnf" id='xmldoc'>
+<head>Prolog</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-prolog'><lhs>prolog</lhs>
+<rhs><nt def='NT-XMLDecl'>XMLDecl</nt>? 
+<nt def='NT-Misc'>Misc</nt>* 
+(<nt def='NT-doctypedecl'>doctypedecl</nt> 
+<nt def='NT-Misc'>Misc</nt>*)?</rhs></prod>
+<prod id='NT-XMLDecl'><lhs>XMLDecl</lhs>
+<rhs>&xmlpio; 
+<nt def='NT-VersionInfo'>VersionInfo</nt> 
+<nt def='NT-EncodingDecl'>EncodingDecl</nt>? 
+<nt def='NT-SDDecl'>SDDecl</nt>? 
+<nt def="NT-S">S</nt>? 
+&pic;</rhs>
+</prod>
+<prod id='NT-VersionInfo'><lhs>VersionInfo</lhs>
+<rhs><nt def="NT-S">S</nt> 'version' <nt def='NT-Eq'>Eq</nt> 
+(' <nt def="NT-VersionNum">VersionNum</nt> ' 
+| " <nt def="NT-VersionNum">VersionNum</nt> ")</rhs>
+</prod>
+<prod id='NT-Eq'><lhs>Eq</lhs>
+<rhs><nt def='NT-S'>S</nt>? '=' <nt def='NT-S'>S</nt>?</rhs></prod>
+<prod id="NT-VersionNum">
+<lhs>VersionNum</lhs>
+<rhs>([a-zA-Z0-9_.:] | '-')+</rhs>
+</prod>
+<prod id='NT-Misc'><lhs>Misc</lhs>
+<rhs><nt def='NT-Comment'>Comment</nt> | <nt def='NT-PI'>PI</nt> | 
+<nt def='NT-S'>S</nt></rhs></prod>
+</prodgroup>
+</scrap></p>
+
+<p><termdef id="dt-doctype" term="Document Type Declaration">The XML
+<term>document type declaration</term> 
+contains or points to 
+<termref def='dt-markupdecl'>markup declarations</termref> 
+that provide a grammar for a
+class of documents.  
+This grammar is known as a document type definition,
+or <term>DTD</term>.  
+The document type declaration can point to an external subset (a
+special kind of 
+<termref def='dt-extent'>external entity</termref>) containing markup
+declarations, or can 
+contain the markup declarations directly in an internal subset, or can do
+both.   
+The DTD for a document consists of both subsets taken
+together.</termdef>
+</p>
+<p><termdef id="dt-markupdecl" term="markup declaration">
+A <term>markup declaration</term> is 
+an <termref def="dt-eldecl">element type declaration</termref>, 
+an <termref def="dt-attdecl">attribute-list declaration</termref>, 
+an <termref def="dt-entdecl">entity declaration</termref>, or
+a <termref def="dt-notdecl">notation declaration</termref>.
+</termdef>
+These declarations may be contained in whole or in part
+within <termref def='dt-PE'>parameter entities</termref>,
+as described in the well-formedness and validity constraints below.
+For fuller information, see
+<specref ref="sec-physical-struct"/>.</p>
+<scrap lang="ebnf" id='dtd'>
+<head>Document Type Definition</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-doctypedecl'><lhs>doctypedecl</lhs>
+<rhs>'&lt;!DOCTYPE' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> (<nt def='NT-S'>S</nt> 
+<nt def='NT-ExternalID'>ExternalID</nt>)? 
+<nt def='NT-S'>S</nt>? ('[' 
+(<nt def='NT-markupdecl'>markupdecl</nt> 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-S'>S</nt>)*
+']' 
+<nt def='NT-S'>S</nt>?)? '>'</rhs>
+<vc def="vc-roottype"/>
+</prod>
+<prod id='NT-markupdecl'><lhs>markupdecl</lhs>
+<rhs><nt def='NT-elementdecl'>elementdecl</nt> 
+| <nt def='NT-AttlistDecl'>AttlistDecl</nt> 
+| <nt def='NT-EntityDecl'>EntityDecl</nt> 
+| <nt def='NT-NotationDecl'>NotationDecl</nt> 
+| <nt def='NT-PI'>PI</nt> 
+| <nt def='NT-Comment'>Comment</nt>
+</rhs>
+<vc def='vc-PEinMarkupDecl'/>
+<wfc def="wfc-PEinInternalSubset"/>
+</prod>
+
+</prodgroup>
+</scrap>
+
+<p>The markup declarations may be made up in whole or in part of
+the <termref def='dt-repltext'>replacement text</termref> of 
+<termref def='dt-PE'>parameter entities</termref>.
+The productions later in this specification for
+individual nonterminals (<nt def='NT-elementdecl'>elementdecl</nt>,
+<nt def='NT-AttlistDecl'>AttlistDecl</nt>, and so on) describe 
+the declarations <emph>after</emph> all the parameter entities have been 
+<termref def='dt-include'>included</termref>.</p>
+
+<vcnote id="vc-roottype">
+<head>Root Element Type</head>
+<p>
+The <nt def='NT-Name'>Name</nt> in the document type declaration must
+match the element type of the <termref def='dt-root'>root element</termref>.
+</p>
+</vcnote>
+
+<vcnote id='vc-PEinMarkupDecl'>
+<head>Proper Declaration/PE Nesting</head>
+<p>Parameter-entity 
+<termref def='dt-repltext'>replacement text</termref> must be properly nested
+with markup declarations. 
+That is to say, if either the first character
+or the last character of a markup
+declaration (<nt def='NT-markupdecl'>markupdecl</nt> above)
+is contained in the replacement text for a 
+<termref def='dt-PERef'>parameter-entity reference</termref>,
+both must be contained in the same replacement text.</p>
+</vcnote>
+<wfcnote id="wfc-PEinInternalSubset">
+<head>PEs in Internal Subset</head>
+<p>In the internal DTD subset, 
+<termref def='dt-PERef'>parameter-entity references</termref>
+can occur only where markup declarations can occur, not
+within markup declarations.  (This does not apply to
+references that occur in
+external parameter entities or to the external subset.)
+</p>
+</wfcnote>
+<p>
+Like the internal subset, the external subset and 
+any external parameter entities referred to in the DTD 
+must consist of a series of complete markup declarations of the types 
+allowed by the non-terminal symbol
+<nt def="NT-markupdecl">markupdecl</nt>, interspersed with white space
+or <termref def="dt-PERef">parameter-entity references</termref>.
+However, portions of the contents
+of the 
+external subset or of external parameter entities may conditionally be ignored
+by using 
+the <termref def="dt-cond-section">conditional section</termref>
+construct; this is not allowed in the internal subset.
+
+<scrap id="ext-Subset">
+<head>External Subset</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-extSubset'><lhs>extSubset</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>?
+<nt def='NT-extSubsetDecl'>extSubsetDecl</nt></rhs></prod>
+<prod id='NT-extSubsetDecl'><lhs>extSubsetDecl</lhs>
+<rhs>(
+<nt def='NT-markupdecl'>markupdecl</nt> 
+| <nt def='NT-conditionalSect'>conditionalSect</nt> 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-S'>S</nt>
+)*</rhs>
+</prod>
+</prodgroup>
+</scrap></p>
+<p>The external subset and external parameter entities also differ 
+from the internal subset in that in them,
+<termref def="dt-PERef">parameter-entity references</termref>
+are permitted <emph>within</emph> markup declarations,
+not only <emph>between</emph> markup declarations.</p>
+<p>An example of an XML document with a document type declaration:
+<eg><![CDATA[<?xml version="1.0"?>
+<!DOCTYPE greeting SYSTEM "hello.dtd">
+<greeting>Hello, world!</greeting>
+]]></eg>
+The <termref def="dt-sysid">system identifier</termref> 
+"<code>hello.dtd</code>" gives the URI of a DTD for the document.</p>
+<p>The declarations can also be given locally, as in this 
+example:
+<eg><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE greeting [
+  <!ELEMENT greeting (#PCDATA)>
+]>
+<greeting>Hello, world!</greeting>
+]]></eg>
+If both the external and internal subsets are used, the 
+internal subset is considered to occur before the external subset.
+<!-- 'is considered to'? boo. whazzat mean? -->
+This has the effect that entity and attribute-list declarations in the
+internal subset take precedence over those in the external subset.
+</p>
+</div2>
+ 
+<div2 id='sec-rmd'>
+<head>Standalone Document Declaration</head>
+<p>Markup declarations can affect the content of the document,
+as passed from an <termref def="dt-xml-proc">XML processor</termref> 
+to an application; examples are attribute defaults and entity
+declarations.
+The standalone document declaration,
+which may appear as a component of the XML declaration, signals
+whether or not there are such declarations which appear external to 
+the <termref def='dt-docent'>document entity</termref>.
+<scrap lang="ebnf" id='fulldtd'>
+<head>Standalone Document Declaration</head>
+<prodgroup pcw2="4" pcw4="19.5" pcw5="9">
+<prod id='NT-SDDecl'><lhs>SDDecl</lhs>
+<rhs>
+<nt def="NT-S">S</nt> 
+'standalone' <nt def='NT-Eq'>Eq</nt> 
+(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
+</rhs>
+<vc def='vc-check-rmd'/></prod>
+</prodgroup>
+</scrap></p>
+<p>
+In a standalone document declaration, the value "<code>yes</code>" indicates
+that there 
+are no markup declarations external to the <termref def='dt-docent'>document
+entity</termref> (either in the DTD external subset, or in an
+external parameter entity referenced from the internal subset)
+which affect the information passed from the XML processor to
+the application.  
+The value "<code>no</code>" indicates that there are or may be such
+external markup declarations.
+Note that the standalone document declaration only 
+denotes the presence of external <emph>declarations</emph>; the presence, in a
+document, of 
+references to external <emph>entities</emph>, when those entities are
+internally declared, 
+does not change its standalone status.</p>
+<p>If there are no external markup declarations, the standalone document
+declaration has no meaning. 
+If there are external markup declarations but there is no standalone
+document declaration, the value "<code>no</code>" is assumed.</p>
+<p>Any XML document for which <code>standalone="no"</code> holds can 
+be converted algorithmically to a standalone document, 
+which may be desirable for some network delivery applications.</p>
+<vcnote id='vc-check-rmd'>
+<head>Standalone Document Declaration</head>
+<p>The standalone document declaration must have
+the value "<code>no</code>" if any external markup declarations
+contain declarations of:</p><ulist>
+<item><p>attributes with <termref def="dt-default">default</termref> values, if
+elements to which
+these attributes apply appear in the document without
+specifications of values for these attributes, or</p></item>
+<item><p>entities (other than &magicents;), 
+if <termref def="dt-entref">references</termref> to those
+entities appear in the document, or</p>
+</item>
+<item><p>attributes with values subject to
+<titleref href='AVNormalize'>normalization</titleref>, where the
+attribute appears in the document with a value which will
+change as a result of normalization, or</p>
+</item>
+<item>
+<p>element types with <termref def="dt-elemcontent">element content</termref>, 
+if white space occurs
+directly within any instance of those types.
+</p></item>
+</ulist>
+
+</vcnote>
+<p>An example XML declaration with a standalone document declaration:<eg
+>&lt;?xml version="&XML.version;" standalone='yes'?></eg></p>
+</div2>
+<div2 id='sec-white-space'>
+<head>White Space Handling</head>
+
+<p>In editing XML documents, it is often convenient to use "white space"
+(spaces, tabs, and blank lines, denoted by the nonterminal 
+<nt def='NT-S'>S</nt> in this specification) to
+set apart the markup for greater readability.  Such white space is typically
+not intended for inclusion in the delivered version of the document.
+On the other hand, "significant" white space that should be preserved in the
+delivered version is common, for example in poetry and
+source code.</p>
+<p>An <termref def='dt-xml-proc'>XML processor</termref> 
+must always pass all characters in a document that are not
+markup through to the application.   A <termref def='dt-validating'>
+validating XML processor</termref> must also inform the application
+which  of these characters constitute white space appearing
+in <termref def="dt-elemcontent">element content</termref>.
+</p>
+<p>A special <termref def='dt-attr'>attribute</termref> 
+named <kw>xml:space</kw> may be attached to an element
+to signal an intention that in that element,
+white space should be preserved by applications.
+In valid documents, this attribute, like any other, must be 
+<termref def="dt-attdecl">declared</termref> if it is used.
+When declared, it must be given as an 
+<termref def='dt-enumerated'>enumerated type</termref> whose only
+possible values are "<code>default</code>" and "<code>preserve</code>".
+For example:<eg><![CDATA[    <!ATTLIST poem   xml:space (default|preserve) 'preserve'>]]></eg></p>
+<p>The value "<code>default</code>" signals that applications'
+default white-space processing modes are acceptable for this element; the
+value "<code>preserve</code>" indicates the intent that applications preserve
+all the white space.
+This declared intent is considered to apply to all elements within the content
+of the element where it is specified, unless overriden with another instance
+of the <kw>xml:space</kw> attribute.
+</p>
+<p>The <termref def='dt-root'>root element</termref> of any document
+is considered to have signaled no intentions as regards application space
+handling, unless it provides a value for 
+this attribute or the attribute is declared with a default value.
+</p>
+
+</div2>
+<div2 id='sec-line-ends'>
+<head>End-of-Line Handling</head>
+<p>XML <termref def='dt-parsedent'>parsed entities</termref> are often stored in
+computer files which, for editing convenience, are organized into lines.
+These lines are typically separated by some combination of the characters
+carriage-return (#xD) and line-feed (#xA).</p>
+<p>To simplify the tasks of <termref def='dt-app'>applications</termref>,
+wherever an external parsed entity or the literal entity value
+of an internal parsed entity contains either the literal 
+two-character sequence "#xD#xA" or a standalone literal
+#xD, an <termref def='dt-xml-proc'>XML processor</termref> must 
+pass to the application the single character #xA.
+(This behavior can 
+conveniently be produced by normalizing all 
+line breaks to #xA on input, before parsing.)
+</p>
+</div2>
+<div2 id='sec-lang-tag'>
+<head>Language Identification</head>
+<p>In document processing, it is often useful to
+identify the natural or formal language 
+in which the content is 
+written.
+A special <termref def="dt-attr">attribute</termref> named
+<kw>xml:lang</kw> may be inserted in
+documents to specify the 
+language used in the contents and attribute values 
+of any element in an XML document.
+In valid documents, this attribute, like any other, must be 
+<termref def="dt-attdecl">declared</termref> if it is used.
+The values of the attribute are language identifiers as defined
+by <bibref ref="RFC1766"/>, "Tags for the Identification of Languages":
+<scrap lang='ebnf'>
+<head>Language Identification</head>
+<prod id='NT-LanguageID'><lhs>LanguageID</lhs>
+<rhs><nt def='NT-Langcode'>Langcode</nt> 
+('-' <nt def='NT-Subcode'>Subcode</nt>)*</rhs></prod>
+<prod id='NT-Langcode'><lhs>Langcode</lhs>
+<rhs><nt def='NT-ISO639Code'>ISO639Code</nt> | 
+<nt def='NT-IanaCode'>IanaCode</nt> | 
+<nt def='NT-UserCode'>UserCode</nt></rhs>
+</prod>
+<prod id='NT-ISO639Code'><lhs>ISO639Code</lhs>
+<rhs>([a-z] | [A-Z]) ([a-z] | [A-Z])</rhs></prod>
+<prod id='NT-IanaCode'><lhs>IanaCode</lhs>
+<rhs>('i' | 'I') '-' ([a-z] | [A-Z])+</rhs></prod>
+<prod id='NT-UserCode'><lhs>UserCode</lhs>
+<rhs>('x' | 'X') '-' ([a-z] | [A-Z])+</rhs></prod>
+<prod id='NT-Subcode'><lhs>Subcode</lhs>
+<rhs>([a-z] | [A-Z])+</rhs></prod>
+</scrap>
+The <nt def='NT-Langcode'>Langcode</nt> may be any of the following:
+<ulist>
+<item><p>a two-letter language code as defined by 
+<bibref ref="ISO639"/>, "Codes
+for the representation of names of languages"</p></item>
+<item><p>a language identifier registered with the Internet
+Assigned Numbers Authority <bibref ref='IANA'/>; these begin with the 
+prefix "<code>i-</code>" (or "<code>I-</code>")</p></item>
+<item><p>a language identifier assigned by the user, or agreed on
+between parties in private use; these must begin with the
+prefix "<code>x-</code>" or "<code>X-</code>" in order to ensure that they do not conflict 
+with names later standardized or registered with IANA</p></item>
+</ulist></p>
+<p>There may be any number of <nt def='NT-Subcode'>Subcode</nt> segments; if
+the first 
+subcode segment exists and the Subcode consists of two 
+letters, then it must be a country code from 
+<bibref ref="ISO3166"/>, "Codes 
+for the representation of names of countries."
+If the first 
+subcode consists of more than two letters, it must be
+a subcode for the language in question registered with IANA,
+unless the <nt def='NT-Langcode'>Langcode</nt> begins with the prefix 
+"<code>x-</code>" or
+"<code>X-</code>". </p>
+<p>It is customary to give the language code in lower case, and
+the country code (if any) in upper case.
+Note that these values, unlike other names in XML documents,
+are case insensitive.</p>
+<p>For example:
+<eg><![CDATA[<p xml:lang="en">The quick brown fox jumps over the lazy dog.</p>
+<p xml:lang="en-GB">What colour is it?</p>
+<p xml:lang="en-US">What color is it?</p>
+<sp who="Faust" desc='leise' xml:lang="de">
+  <l>Habe nun, ach! Philosophie,</l>
+  <l>Juristerei, und Medizin</l>
+  <l>und leider auch Theologie</l>
+  <l>durchaus studiert mit heißem Bemüh'n.</l>
+  </sp>]]></eg></p>
+<!--<p>The xml:lang value is considered to apply both to the contents of an
+element and 
+(unless otherwise via attribute default values) to the
+values of all of its attributes with free-text (CDATA) values.  -->
+<p>The intent declared with <kw>xml:lang</kw> is considered to apply to
+all attributes and content of the element where it is specified,
+unless overridden with an instance of <kw>xml:lang</kw>
+on another element within that content.</p>
+<!--
+If no
+value is specified for xml:lang on an element, and no default value is
+defined for it in the DTD, then the xml:lang attribute of any element
+takes the same value it has in the parent element, if any.  The two
+technical terms in the following example both have the same effective
+value for xml:lang:
+
+  <p xml:lang="en">Here the keywords are
+  <term xml:lang="en">shift</term> and
+  <term>reduce</term>. ...</p>
+
+The application, not the XML processor, is responsible for this '
+inheritance' of attribute values.
+-->
+<p>A simple declaration for <kw>xml:lang</kw> might take
+the form
+<eg>xml:lang  NMTOKEN  #IMPLIED</eg>
+but specific default values may also be given, if appropriate.  In a
+collection of French poems for English students, with glosses and
+notes in English, the xml:lang attribute might be declared this way:
+<eg><![CDATA[    <!ATTLIST poem   xml:lang NMTOKEN 'fr'>
+    <!ATTLIST gloss  xml:lang NMTOKEN 'en'>
+    <!ATTLIST note   xml:lang NMTOKEN 'en'>]]></eg>
+</p>
+
+</div2>
+</div1>
+<!-- &Elements; -->
+ 
+<div1 id='sec-logical-struct'>
+<head>Logical Structures</head>
+ 
+<p><termdef id="dt-element" term="Element">Each <termref
+def="dt-xml-doc">XML document</termref> contains one or more
+<term>elements</term>, the boundaries of which are 
+either delimited by <termref def="dt-stag">start-tags</termref> 
+and <termref def="dt-etag">end-tags</termref>, or, for <termref
+def="dt-empty">empty</termref> elements, by an <termref
+def="dt-eetag">empty-element tag</termref>. Each element has a type,
+identified by name, sometimes called its "generic
+identifier" (GI), and may have a set of
+attribute specifications.</termdef>  Each attribute specification 
+has a <termref
+def="dt-attrname">name</termref> and a <termref
+def="dt-attrval">value</termref>.
+</p>
+<scrap lang='ebnf'><head>Element</head>
+<prod id='NT-element'><lhs>element</lhs>
+<rhs><nt def='NT-EmptyElemTag'>EmptyElemTag</nt></rhs>
+<rhs>| <nt def='NT-STag'>STag</nt> <nt def='NT-content'>content</nt> 
+<nt def='NT-ETag'>ETag</nt></rhs>
+<wfc def='GIMatch'/>
+<vc def='elementvalid'/>
+</prod>
+</scrap>
+<p>This specification does not constrain the semantics, use, or (beyond
+syntax) names of the element types and attributes, except that names
+beginning with a match to <code>(('X'|'x')('M'|'m')('L'|'l'))</code>
+are reserved for standardization in this or future versions of this
+specification.
+</p>
+<wfcnote id='GIMatch'>
+<head>Element Type Match</head>
+<p>
+The <nt def='NT-Name'>Name</nt> in an element's end-tag must match 
+the element type in
+the start-tag.
+</p>
+</wfcnote>
+<vcnote id='elementvalid'>
+<head>Element Valid</head>
+<p>An element is
+valid if
+there is a declaration matching 
+<nt def='NT-elementdecl'>elementdecl</nt> where the
+<nt def='NT-Name'>Name</nt> matches the element type, and
+one of the following holds:</p>
+<olist>
+<item><p>The declaration matches <kw>EMPTY</kw> and the element has no 
+<termref def='dt-content'>content</termref>.</p></item>
+<item><p>The declaration matches <nt def='NT-children'>children</nt> and
+the sequence of 
+<termref def="dt-parentchild">child elements</termref>
+belongs to the language generated by the regular expression in
+the content model, with optional white space (characters 
+matching the nonterminal <nt def='NT-S'>S</nt>) between each pair
+of child elements.</p></item>
+<item><p>The declaration matches <nt def='NT-Mixed'>Mixed</nt> and 
+the content consists of <termref def='dt-chardata'>character 
+data</termref> and <termref def='dt-parentchild'>child elements</termref>
+whose types match names in the content model.</p></item>
+<item><p>The declaration matches <kw>ANY</kw>, and the types
+of any <termref def='dt-parentchild'>child elements</termref> have
+been declared.</p></item>
+</olist>
+</vcnote>
+
+<div2 id='sec-starttags'>
+<head>Start-Tags, End-Tags, and Empty-Element Tags</head>
+ 
+<p><termdef id="dt-stag" term="Start-Tag">The beginning of every
+non-empty XML element is marked by a <term>start-tag</term>.
+<scrap lang='ebnf'>
+<head>Start-tag</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-STag'><lhs>STag</lhs>
+<rhs>'&lt;' <nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt> <nt def='NT-Attribute'>Attribute</nt>)* 
+<nt def='NT-S'>S</nt>? '>'</rhs>
+<wfc def="uniqattspec"/>
+</prod>
+<prod id='NT-Attribute'><lhs>Attribute</lhs>
+<rhs><nt def='NT-Name'>Name</nt> <nt def='NT-Eq'>Eq</nt> 
+<nt def='NT-AttValue'>AttValue</nt></rhs>
+<vc def='ValueType'/>
+<wfc def='NoExternalRefs'/>
+<wfc def='CleanAttrVals'/></prod>
+</prodgroup>
+</scrap>
+The <nt def='NT-Name'>Name</nt> in
+the start- and end-tags gives the 
+element's <term>type</term>.</termdef>
+<termdef id="dt-attr" term="Attribute">
+The <nt def='NT-Name'>Name</nt>-<nt def='NT-AttValue'>AttValue</nt> pairs are
+referred to as 
+the <term>attribute specifications</term> of the element</termdef>,
+<termdef id="dt-attrname" term="Attribute Name">with the 
+<nt def='NT-Name'>Name</nt> in each pair
+referred to as the <term>attribute name</term></termdef> and
+<termdef id="dt-attrval" term="Attribute Value">the content of the
+<nt def='NT-AttValue'>AttValue</nt> (the text between the
+<code>'</code> or <code>"</code> delimiters)
+as the <term>attribute value</term>.</termdef>
+</p>
+<wfcnote id='uniqattspec'>
+<head>Unique Att Spec</head>
+<p>
+No attribute name may appear more than once in the same start-tag
+or empty-element tag.
+</p>
+</wfcnote>
+<vcnote id='ValueType'>
+<head>Attribute Value Type</head>
+<p>
+The attribute must have been declared; the value must be of the type 
+declared for it.
+(For attribute types, see <specref ref='attdecls'/>.)
+</p>
+</vcnote>
+<wfcnote id='NoExternalRefs'>
+<head>No External Entity References</head>
+<p>
+Attribute values cannot contain direct or indirect entity references 
+to external entities.
+</p>
+</wfcnote>
+<wfcnote id='CleanAttrVals'>
+<head>No <code>&lt;</code> in Attribute Values</head>
+<p>The <termref def='dt-repltext'>replacement text</termref> of any entity
+referred to directly or indirectly in an attribute
+value (other than "<code>&amp;lt;</code>") must not contain
+a <code>&lt;</code>.
+</p></wfcnote>
+<p>An example of a start-tag:
+<eg>&lt;termdef id="dt-dog" term="dog"></eg></p>
+<p><termdef id="dt-etag" term="End Tag">The end of every element 
+that begins with a start-tag must
+be marked by an <term>end-tag</term>
+containing a name that echoes the element's type as given in the
+start-tag:
+<scrap lang='ebnf'>
+<head>End-tag</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-ETag'><lhs>ETag</lhs>
+<rhs>'&lt;/' <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt>? '>'</rhs></prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p>An example of an end-tag:<eg>&lt;/termdef></eg></p>
+<p><termdef id="dt-content" term="Content">The 
+<termref def='dt-text'>text</termref> between the start-tag and
+end-tag is called the element's
+<term>content</term>:
+<scrap lang='ebnf'>
+<head>Content of Elements</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-content'><lhs>content</lhs>
+<rhs>(<nt def='NT-element'>element</nt> | <nt def='NT-CharData'>CharData</nt> 
+| <nt def='NT-Reference'>Reference</nt> | <nt def='NT-CDSect'>CDSect</nt> 
+| <nt def='NT-PI'>PI</nt> | <nt def='NT-Comment'>Comment</nt>)*</rhs>
+</prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p><termdef id="dt-empty" term="Empty">If an element is <term>empty</term>,
+it must be represented either by a start-tag immediately followed
+by an end-tag or by an empty-element tag.</termdef>
+<termdef id="dt-eetag" term="empty-element tag">An 
+<term>empty-element tag</term> takes a special form:
+<scrap lang='ebnf'>
+<head>Tags for Empty Elements</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-EmptyElemTag'><lhs>EmptyElemTag</lhs>
+<rhs>'&lt;' <nt def='NT-Name'>Name</nt> (<nt def='NT-S'>S</nt> 
+<nt def='NT-Attribute'>Attribute</nt>)* <nt def='NT-S'>S</nt>? 
+'/&gt;'</rhs>
+<wfc def="uniqattspec"/>
+</prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p>Empty-element tags may be used for any element which has no
+content, whether or not it is declared using the keyword
+<kw>EMPTY</kw>.
+<termref def='dt-interop'>For interoperability</termref>, the empty-element
+tag must be used, and can only be used, for elements which are
+<termref def='dt-eldecl'>declared</termref> <kw>EMPTY</kw>.</p>
+<p>Examples of empty elements:
+<eg>&lt;IMG align="left"
+ src="http://www.w3.org/Icons/WWW/w3c_home" />
+&lt;br>&lt;/br>
+&lt;br/></eg></p>
+</div2>
+ 
+<div2 id='elemdecls'>
+<head>Element Type Declarations</head>
+ 
+<p>The <termref def="dt-element">element</termref> structure of an
+<termref def="dt-xml-doc">XML document</termref> may, for 
+<termref def="dt-valid">validation</termref> purposes, 
+be constrained
+using element type and attribute-list declarations.
+An element type declaration constrains the element's
+<termref def="dt-content">content</termref>.
+</p>
+
+<p>Element type declarations often constrain which element types can
+appear as <termref def="dt-parentchild">children</termref> of the element.
+At user option, an XML processor may issue a warning
+when a declaration mentions an element type for which no declaration
+is provided, but this is not an error.</p>
+<p><termdef id="dt-eldecl" term="Element Type declaration">An <term>element
+type declaration</term> takes the form:
+<scrap lang='ebnf'>
+<head>Element Type Declaration</head>
+<prodgroup pcw2="5.5" pcw4="18" pcw5="9">
+<prod id='NT-elementdecl'><lhs>elementdecl</lhs>
+<rhs>'&lt;!ELEMENT' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> 
+<nt def='NT-contentspec'>contentspec</nt>
+<nt def='NT-S'>S</nt>? '>'</rhs>
+<vc def='EDUnique'/></prod>
+<prod id='NT-contentspec'><lhs>contentspec</lhs>
+<rhs>'EMPTY' 
+| 'ANY' 
+| <nt def='NT-Mixed'>Mixed</nt> 
+| <nt def='NT-children'>children</nt>
+</rhs>
+</prod>
+</prodgroup>
+</scrap>
+where the <nt def='NT-Name'>Name</nt> gives the element type 
+being declared.</termdef>
+</p>
+
+<vcnote id='EDUnique'>
+<head>Unique Element Type Declaration</head>
+<p>
+No element type may be declared more than once.
+</p>
+</vcnote>
+
+<p>Examples of element type declarations:
+<eg>&lt;!ELEMENT br EMPTY>
+&lt;!ELEMENT p (#PCDATA|emph)* >
+&lt;!ELEMENT %name.para; %content.para; >
+&lt;!ELEMENT container ANY></eg></p>
+ 
+<div3 id='sec-element-content'>
+<head>Element Content</head>
+ 
+<p><termdef id='dt-elemcontent' term='Element content'>An element <termref
+def="dt-stag">type</termref> has
+<term>element content</term> when elements of that
+type must contain only <termref def='dt-parentchild'>child</termref> 
+elements (no character data), optionally separated by 
+white space (characters matching the nonterminal 
+<nt def='NT-S'>S</nt>).
+</termdef>
+In this case, the
+constraint includes a content model, a simple grammar governing
+the allowed types of the child
+elements and the order in which they are allowed to appear.  
+The grammar is built on
+content particles (<nt def='NT-cp'>cp</nt>s), which consist of names, 
+choice lists of content particles, or
+sequence lists of content particles:
+<scrap lang='ebnf'>
+<head>Element-content Models</head>
+<prodgroup pcw2="5.5" pcw4="16" pcw5="11">
+<prod id='NT-children'><lhs>children</lhs>
+<rhs>(<nt def='NT-choice'>choice</nt> 
+| <nt def='NT-seq'>seq</nt>) 
+('?' | '*' | '+')?</rhs></prod>
+<prod id='NT-cp'><lhs>cp</lhs>
+<rhs>(<nt def='NT-Name'>Name</nt> 
+| <nt def='NT-choice'>choice</nt> 
+| <nt def='NT-seq'>seq</nt>) 
+('?' | '*' | '+')?</rhs></prod>
+<prod id='NT-choice'><lhs>choice</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? cp 
+( <nt def='NT-S'>S</nt>? '|' <nt def='NT-S'>S</nt>? <nt def='NT-cp'>cp</nt> )*
+<nt def='NT-S'>S</nt>? ')'</rhs>
+<vc def='vc-PEinGroup'/></prod>
+<prod id='NT-seq'><lhs>seq</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? cp 
+( <nt def='NT-S'>S</nt>? ',' <nt def='NT-S'>S</nt>? <nt def='NT-cp'>cp</nt> )*
+<nt def='NT-S'>S</nt>? ')'</rhs>
+<vc def='vc-PEinGroup'/></prod>
+
+</prodgroup>
+</scrap>
+where each <nt def='NT-Name'>Name</nt> is the type of an element which may
+appear as a <termref def="dt-parentchild">child</termref>.  
+Any content
+particle in a choice list may appear in the <termref
+def="dt-elemcontent">element content</termref> at the location where
+the choice list appears in the grammar;
+content particles occurring in a sequence list must each
+appear in the <termref def="dt-elemcontent">element content</termref> in the
+order given in the list.  
+The optional character following a name or list governs
+whether the element or the content particles in the list may occur one
+or more (<code>+</code>), zero or more (<code>*</code>), or zero or 
+one times (<code>?</code>).  
+The absence of such an operator means that the element or content particle
+must appear exactly once.
+This syntax
+and meaning are identical to those used in the productions in this
+specification.</p>
+<p>
+The content of an element matches a content model if and only if it is
+possible to trace out a path through the content model, obeying the
+sequence, choice, and repetition operators and matching each element in
+the content against an element type in the content model.  <termref
+def='dt-compat'>For compatibility</termref>, it is an error
+if an element in the document can
+match more than one occurrence of an element type in the content model.
+For more information, see <specref ref="determinism"/>.
+<!-- appendix <specref ref="determinism"/>. -->
+<!-- appendix on deterministic content models. -->
+</p>
+<vcnote id='vc-PEinGroup'>
+<head>Proper Group/PE Nesting</head>
+<p>Parameter-entity 
+<termref def='dt-repltext'>replacement text</termref> must be properly nested
+with parenthetized groups.
+That is to say, if either of the opening or closing parentheses
+in a <nt def='NT-choice'>choice</nt>, <nt def='NT-seq'>seq</nt>, or
+<nt def='NT-Mixed'>Mixed</nt> construct 
+is contained in the replacement text for a 
+<termref def='dt-PERef'>parameter entity</termref>,
+both must be contained in the same replacement text.</p>
+<p><termref def='dt-interop'>For interoperability</termref>, 
+if a parameter-entity reference appears in a 
+<nt def='NT-choice'>choice</nt>, <nt def='NT-seq'>seq</nt>, or
+<nt def='NT-Mixed'>Mixed</nt> construct, its replacement text
+should not be empty, and 
+neither the first nor last non-blank
+character of the replacement text should be a connector 
+(<code>|</code> or <code>,</code>).
+</p>
+</vcnote>
+<p>Examples of element-content models:
+<eg>&lt;!ELEMENT spec (front, body, back?)>
+&lt;!ELEMENT div1 (head, (p | list | note)*, div2*)>
+&lt;!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*></eg></p>
+</div3>
+
+<div3 id='sec-mixed-content'>
+<head>Mixed Content</head>
+ 
+<p><termdef id='dt-mixed' term='Mixed Content'>An element 
+<termref def='dt-stag'>type</termref> has 
+<term>mixed content</term> when elements of that type may contain
+character data, optionally interspersed with
+<termref def="dt-parentchild">child</termref> elements.</termdef>
+In this case, the types of the child elements
+may be constrained, but not their order or their number of occurrences:
+<scrap lang='ebnf'>
+<head>Mixed-content Declaration</head>
+<prodgroup pcw2="5.5" pcw4="16" pcw5="11">
+<prod id='NT-Mixed'><lhs>Mixed</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? 
+'#PCDATA'
+(<nt def='NT-S'>S</nt>? 
+'|' 
+<nt def='NT-S'>S</nt>? 
+<nt def='NT-Name'>Name</nt>)* 
+<nt def='NT-S'>S</nt>? 
+')*' </rhs>
+<rhs>| '(' <nt def='NT-S'>S</nt>? '#PCDATA' <nt def='NT-S'>S</nt>? ')'
+</rhs><vc def='vc-PEinGroup'/>
+<vc def='vc-MixedChildrenUnique'/>
+</prod>
+
+</prodgroup>
+</scrap>
+where the <nt def='NT-Name'>Name</nt>s give the types of elements
+that may appear as children.
+</p>
+<vcnote id='vc-MixedChildrenUnique'>
+<head>No Duplicate Types</head>
+<p>The same name must not appear more than once in a single mixed-content
+declaration.
+</p></vcnote>
+<p>Examples of mixed content declarations:
+<eg>&lt;!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
+&lt;!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
+&lt;!ELEMENT b (#PCDATA)></eg></p>
+</div3>
+</div2>
+ 
+<div2 id='attdecls'>
+<head>Attribute-List Declarations</head>
+ 
+<p><termref def="dt-attr">Attributes</termref> are used to associate
+name-value pairs with <termref def="dt-element">elements</termref>.
+Attribute specifications may appear only within <termref
+def="dt-stag">start-tags</termref>
+and <termref def="dt-eetag">empty-element tags</termref>; 
+thus, the productions used to
+recognize them appear in <specref ref='sec-starttags'/>.  
+Attribute-list
+declarations may be used:
+<ulist>
+<item><p>To define the set of attributes pertaining to a given
+element type.</p></item>
+<item><p>To establish type constraints for these
+attributes.</p></item>
+<item><p>To provide <termref def="dt-default">default values</termref>
+for attributes.</p></item>
+</ulist>
+</p>
+<p><termdef id="dt-attdecl" term="Attribute-List Declaration">
+<term>Attribute-list declarations</term> specify the name, data type, and default
+value (if any) of each attribute associated with a given element type:
+<scrap lang='ebnf'>
+<head>Attribute-list Declaration</head>
+<prod id='NT-AttlistDecl'><lhs>AttlistDecl</lhs>
+<rhs>'&lt;!ATTLIST' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> 
+<nt def='NT-AttDef'>AttDef</nt>*
+<nt def='NT-S'>S</nt>? '&gt;'</rhs>
+</prod>
+<prod id='NT-AttDef'><lhs>AttDef</lhs>
+<rhs><nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-AttType'>AttType</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-DefaultDecl'>DefaultDecl</nt></rhs>
+</prod>
+</scrap>
+The <nt def="NT-Name">Name</nt> in the
+<nt def='NT-AttlistDecl'>AttlistDecl</nt> rule is the type of an element.  At
+user option, an XML processor may issue a warning if attributes are
+declared for an element type not itself declared, but this is not an
+error.  The <nt def='NT-Name'>Name</nt> in the 
+<nt def='NT-AttDef'>AttDef</nt> rule is
+the name of the attribute.</termdef></p>
+<p>
+When more than one <nt def='NT-AttlistDecl'>AttlistDecl</nt> is provided for a
+given element type, the contents of all those provided are merged.  When
+more than one definition is provided for the same attribute of a
+given element type, the first declaration is binding and later
+declarations are ignored.  
+<termref def='dt-interop'>For interoperability,</termref> writers of DTDs
+may choose to provide at most one attribute-list declaration
+for a given element type, at most one attribute definition
+for a given attribute name, and at least one attribute definition
+in each attribute-list declaration.
+For interoperability, an XML processor may at user option
+issue a warning when more than one attribute-list declaration is
+provided for a given element type, or more than one attribute definition
+is provided 
+for a given attribute, but this is not an error.
+</p>
+
+<div3 id='sec-attribute-types'>
+<head>Attribute Types</head>
+ 
+<p>XML attribute types are of three kinds:  a string type, a
+set of tokenized types, and enumerated types.  The string type may take
+any literal string as a value; the tokenized types have varying lexical
+and semantic constraints, as noted:
+<scrap lang='ebnf'>
+<head>Attribute Types</head>
+<prodgroup pcw4="14" pcw5="11.5">
+<prod id='NT-AttType'><lhs>AttType</lhs>
+<rhs><nt def='NT-StringType'>StringType</nt> 
+| <nt def='NT-TokenizedType'>TokenizedType</nt> 
+| <nt def='NT-EnumeratedType'>EnumeratedType</nt>
+</rhs>
+</prod>
+<prod id='NT-StringType'><lhs>StringType</lhs>
+<rhs>'CDATA'</rhs>
+</prod>
+<prod id='NT-TokenizedType'><lhs>TokenizedType</lhs>
+<rhs>'ID'</rhs>
+<vc def='id'/>
+<vc def='one-id-per-el'/>
+<vc def='id-default'/>
+<rhs>| 'IDREF'</rhs>
+<vc def='idref'/>
+<rhs>| 'IDREFS'</rhs>
+<vc def='idref'/>
+<rhs>| 'ENTITY'</rhs>
+<vc def='entname'/>
+<rhs>| 'ENTITIES'</rhs>
+<vc def='entname'/>
+<rhs>| 'NMTOKEN'</rhs>
+<vc def='nmtok'/>
+<rhs>| 'NMTOKENS'</rhs>
+<vc def='nmtok'/></prod>
+</prodgroup>
+</scrap>
+</p>
+<vcnote id='id' >
+<head>ID</head>
+<p>
+Values of type <kw>ID</kw> must match the 
+<nt def='NT-Name'>Name</nt> production.  
+A name must not appear more than once in
+an XML document as a value of this type; i.e., ID values must uniquely
+identify the elements which bear them.   
+</p>
+</vcnote>
+<vcnote id='one-id-per-el'>
+<head>One ID per Element Type</head>
+<p>No element type may have more than one ID attribute specified.</p>
+</vcnote>
+<vcnote id='id-default'>
+<head>ID Attribute Default</head>
+<p>An ID attribute must have a declared default of <kw>#IMPLIED</kw> or
+<kw>#REQUIRED</kw>.</p>
+</vcnote>
+<vcnote id='idref'>
+<head>IDREF</head>
+<p>
+Values of type <kw>IDREF</kw> must match
+the <nt def="NT-Name">Name</nt> production, and
+values of type <kw>IDREFS</kw> must match
+<nt def="NT-Names">Names</nt>; 
+each <nt def='NT-Name'>Name</nt> must match the value of an ID attribute on 
+some element in the XML document; i.e. <kw>IDREF</kw> values must 
+match the value of some ID attribute. 
+</p>
+</vcnote>
+<vcnote id='entname'>
+<head>Entity Name</head>
+<p>
+Values of type <kw>ENTITY</kw> 
+must match the <nt def="NT-Name">Name</nt> production,
+values of type <kw>ENTITIES</kw> must match
+<nt def="NT-Names">Names</nt>;
+each <nt def="NT-Name">Name</nt> must 
+match the
+name of an <termref def="dt-unparsed">unparsed entity</termref> declared in the
+<termref def="dt-doctype">DTD</termref>.
+</p>
+</vcnote>
+<vcnote id='nmtok'>
+<head>Name Token</head>
+<p>
+Values of type <kw>NMTOKEN</kw> must match the
+<nt def="NT-Nmtoken">Nmtoken</nt> production;
+values of type <kw>NMTOKENS</kw> must 
+match <termref def="NT-Nmtokens">Nmtokens</termref>.
+</p>
+</vcnote>
+<!-- why?
+<p>The XML processor must normalize attribute values before
+passing them to the application, as described in 
+<specref ref="AVNormalize"/>.</p>-->
+<p><termdef id='dt-enumerated' term='Enumerated Attribute
+Values'><term>Enumerated attributes</term> can take one 
+of a list of values provided in the declaration</termdef>. There are two
+kinds of enumerated types:
+<scrap lang='ebnf'>
+<head>Enumerated Attribute Types</head>
+<prod id='NT-EnumeratedType'><lhs>EnumeratedType</lhs> 
+<rhs><nt def='NT-NotationType'>NotationType</nt> 
+| <nt def='NT-Enumeration'>Enumeration</nt>
+</rhs></prod>
+<prod id='NT-NotationType'><lhs>NotationType</lhs> 
+<rhs>'NOTATION' 
+<nt def='NT-S'>S</nt> 
+'(' 
+<nt def='NT-S'>S</nt>?  
+<nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt>? '|' <nt def='NT-S'>S</nt>?  
+<nt def='NT-Name'>Name</nt>)*
+<nt def='NT-S'>S</nt>? ')'
+</rhs>
+<vc def='notatn' /></prod>
+<prod id='NT-Enumeration'><lhs>Enumeration</lhs> 
+<rhs>'(' <nt def='NT-S'>S</nt>?
+<nt def='NT-Nmtoken'>Nmtoken</nt> 
+(<nt def='NT-S'>S</nt>? '|' 
+<nt def='NT-S'>S</nt>?  
+<nt def='NT-Nmtoken'>Nmtoken</nt>)* 
+<nt def='NT-S'>S</nt>? 
+')'</rhs> 
+<vc def='enum'/></prod>
+</scrap>
+A <kw>NOTATION</kw> attribute identifies a 
+<termref def='dt-notation'>notation</termref>, declared in the 
+DTD with associated system and/or public identifiers, to
+be used in interpreting the element to which the attribute
+is attached.
+</p>
+
+<vcnote id='notatn'>
+<head>Notation Attributes</head>
+<p>
+Values of this type must match
+one of the <titleref href='Notations'>notation</titleref> names included in
+the declaration; all notation names in the declaration must
+be declared.
+</p>
+</vcnote>
+<vcnote id='enum'>
+<head>Enumeration</head>
+<p>
+Values of this type
+must match one of the <nt def='NT-Nmtoken'>Nmtoken</nt> tokens in the
+declaration. 
+</p>
+</vcnote>
+<p><termref def='dt-interop'>For interoperability,</termref> the same
+<nt def='NT-Nmtoken'>Nmtoken</nt> should not occur more than once in the
+enumerated attribute types of a single element type.
+</p>
+</div3>
+
+<div3 id='sec-attr-defaults'>
+<head>Attribute Defaults</head>
+ 
+<p>An <termref def="dt-attdecl">attribute declaration</termref> provides
+information on whether
+the attribute's presence is required, and if not, how an XML processor should
+react if a declared attribute is absent in a document.
+<scrap lang='ebnf'>
+<head>Attribute Defaults</head>
+<prodgroup pcw4="14" pcw5="11.5">
+<prod id='NT-DefaultDecl'><lhs>DefaultDecl</lhs>
+<rhs>'#REQUIRED' 
+|&nbsp;'#IMPLIED' </rhs>
+<rhs>| (('#FIXED' S)? <nt def='NT-AttValue'>AttValue</nt>)</rhs>
+<vc def='RequiredAttr'/>
+<vc def='defattrvalid'/>
+<wfc def="CleanAttrVals"/>
+<vc def='FixedAttr'/>
+</prod>
+</prodgroup>
+</scrap>
+
+</p>
+<p>In an attribute declaration, <kw>#REQUIRED</kw> means that the
+attribute must always be provided, <kw>#IMPLIED</kw> that no default 
+value is provided.
+<!-- not any more!!
+<kw>#IMPLIED</kw> means that if the attribute is omitted
+from an element of this type,
+the XML processor must inform the application
+that no value was specified; no constraint is placed on the behavior
+of the application. -->
+<termdef id="dt-default" term="Attribute Default">If the 
+declaration
+is neither <kw>#REQUIRED</kw> nor <kw>#IMPLIED</kw>, then the
+<nt def='NT-AttValue'>AttValue</nt> value contains the declared
+<term>default</term> value; the <kw>#FIXED</kw> keyword states that
+the attribute must always have the default value.
+If a default value
+is declared, when an XML processor encounters an omitted attribute, it
+is to behave as though the attribute were present with 
+the declared default value.</termdef></p>
+<vcnote id='RequiredAttr'>
+<head>Required Attribute</head>
+<p>If the default declaration is the keyword <kw>#REQUIRED</kw>, then
+the attribute must be specified for
+all elements of the type in the attribute-list declaration.
+</p></vcnote>
+<vcnote id='defattrvalid'>
+<head>Attribute Default Legal</head>
+<p>
+The declared
+default value must meet the lexical constraints of the declared attribute type.
+</p>
+</vcnote>
+<vcnote id='FixedAttr'>
+<head>Fixed Attribute Default</head>
+<p>If an attribute has a default value declared with the 
+<kw>#FIXED</kw> keyword, instances of that attribute must
+match the default value.
+</p></vcnote>
+
+<p>Examples of attribute-list declarations:
+<eg>&lt;!ATTLIST termdef
+          id      ID      #REQUIRED
+          name    CDATA   #IMPLIED>
+&lt;!ATTLIST list
+          type    (bullets|ordered|glossary)  "ordered">
+&lt;!ATTLIST form
+          method  CDATA   #FIXED "POST"></eg></p>
+</div3>
+<div3 id='AVNormalize'>
+<head>Attribute-Value Normalization</head>
+<p>Before the value of an attribute is passed to the application
+or checked for validity, the
+XML processor must normalize it as follows:
+<ulist>
+<item><p>a character reference is processed by appending the referenced    
+character to the attribute value</p></item>
+<item><p>an entity reference is processed by recursively processing the
+replacement text of the entity</p></item>
+<item><p>a whitespace character (#x20, #xD, #xA, #x9) is processed by
+appending #x20 to the normalized value, except that only a single #x20
+is appended for a "#xD#xA" sequence that is part of an external
+parsed entity or the literal entity value of an internal parsed
+entity</p></item>
+<item><p>other characters are processed by appending them to the normalized
+value</p>
+</item></ulist>
+</p>
+<p>If the declared value is not CDATA, then the XML processor must
+further process the normalized attribute value by discarding any
+leading and trailing space (#x20) characters, and by replacing
+sequences of space (#x20) characters by a single space (#x20)
+character.</p>
+<p>
+All attributes for which no declaration has been read should be treated
+by a non-validating parser as if declared
+<kw>CDATA</kw>.
+</p>
+</div3>
+</div2>
+<div2 id='sec-condition-sect'>
+<head>Conditional Sections</head>
+<p><termdef id='dt-cond-section' term='conditional section'>
+<term>Conditional sections</term> are portions of the
+<termref def='dt-doctype'>document type declaration external subset</termref>
+which are 
+included in, or excluded from, the logical structure of the DTD based on
+the keyword which governs them.</termdef>
+<scrap lang='ebnf'>
+<head>Conditional Section</head>
+<prodgroup pcw2="9" pcw4="14.5">
+<prod id='NT-conditionalSect'><lhs>conditionalSect</lhs>
+<rhs><nt def='NT-includeSect'>includeSect</nt>
+| <nt def='NT-ignoreSect'>ignoreSect</nt>
+</rhs>
+</prod>
+<prod id='NT-includeSect'><lhs>includeSect</lhs>
+<rhs>'&lt;![' S? 'INCLUDE' S? '[' 
+
+<nt def="NT-extSubsetDecl">extSubsetDecl</nt>
+']]&gt;'
+</rhs>
+</prod>
+<prod id='NT-ignoreSect'><lhs>ignoreSect</lhs>
+<rhs>'&lt;![' S? 'IGNORE' S? '[' 
+<nt def="NT-ignoreSectContents">ignoreSectContents</nt>*
+']]&gt;'</rhs>
+</prod>
+
+<prod id='NT-ignoreSectContents'><lhs>ignoreSectContents</lhs>
+<rhs><nt def='NT-Ignore'>Ignore</nt>
+('&lt;![' <nt def='NT-ignoreSectContents'>ignoreSectContents</nt> ']]&gt;' 
+<nt def='NT-Ignore'>Ignore</nt>)*</rhs></prod>
+<prod id='NT-Ignore'><lhs>Ignore</lhs>
+<rhs><nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* ('&lt;![' | ']]&gt;') 
+<nt def='NT-Char'>Char</nt>*)
+</rhs></prod>
+
+</prodgroup>
+</scrap>
+</p>
+<p>Like the internal and external DTD subsets, a conditional section
+may contain one or more complete declarations,
+comments, processing instructions, 
+or nested conditional sections, intermingled with white space.
+</p>
+<p>If the keyword of the
+conditional section is <kw>INCLUDE</kw>, then the contents of the conditional
+section are part of the DTD.
+If the keyword of the conditional
+section is <kw>IGNORE</kw>, then the contents of the conditional section are
+not logically part of the DTD.
+Note that for reliable parsing, the contents of even ignored
+conditional sections must be read in order to
+detect nested conditional sections and ensure that the end of the
+outermost (ignored) conditional section is properly detected.
+If a conditional section with a
+keyword of <kw>INCLUDE</kw> occurs within a larger conditional
+section with a keyword of <kw>IGNORE</kw>, both the outer and the
+inner conditional sections are ignored.</p>
+<p>If the keyword of the conditional section is a 
+parameter-entity reference, the parameter entity must be replaced by its
+content before the processor decides whether to
+include or ignore the conditional section.</p>
+<p>An example:
+<eg>&lt;!ENTITY % draft 'INCLUDE' >
+&lt;!ENTITY % final 'IGNORE' >
+ 
+&lt;![%draft;[
+&lt;!ELEMENT book (comments*, title, body, supplements?)>
+]]&gt;
+&lt;![%final;[
+&lt;!ELEMENT book (title, body, supplements?)>
+]]&gt;
+</eg>
+</p>
+</div2>
+
+
+<!-- 
+<div2 id='sec-pass-to-app'>
+<head>XML Processor Treatment of Logical Structure</head>
+<p>When an XML processor encounters a start-tag, it must make
+at least the following information available to the application:
+<ulist>
+<item>
+<p>the element type's generic identifier</p>
+</item>
+<item>
+<p>the names of attributes known to apply to this element type
+(validating processors must make available names of all attributes
+declared for the element type; non-validating processors must
+make available at least the names of the attributes for which
+values are specified.
+</p>
+</item>
+</ulist>
+</p>
+</div2>
+--> 
+
+</div1>
+<!-- &Entities; -->
+ 
+<div1 id='sec-physical-struct'>
+<head>Physical Structures</head>
+ 
+<p><termdef id="dt-entity" term="Entity">An XML document may consist
+of one or many storage units.   These are called
+<term>entities</term>; they all have <term>content</term> and are all
+(except for the document entity, see below, and 
+the <termref def='dt-doctype'>external DTD subset</termref>) 
+identified by <term>name</term>.
+</termdef>
+Each XML document has one entity
+called the <termref def="dt-docent">document entity</termref>, which serves
+as the starting point for the <termref def="dt-xml-proc">XML
+processor</termref> and may contain the whole document.</p>
+<p>Entities may be either parsed or unparsed.
+<termdef id="dt-parsedent" term="Text Entity">A <term>parsed entity's</term>
+contents are referred to as its 
+<termref def='dt-repltext'>replacement text</termref>;
+this <termref def="dt-text">text</termref> is considered an
+integral part of the document.</termdef></p>
+
+<p><termdef id="dt-unparsed" term="Unparsed Entity">An 
+<term>unparsed entity</term> 
+is a resource whose contents may or may not be
+<termref def='dt-text'>text</termref>, and if text, may not be XML.
+Each unparsed entity
+has an associated <termref
+def="dt-notation">notation</termref>, identified by name.
+Beyond a requirement
+that an XML processor make the identifiers for the entity and 
+notation available to the application,
+XML places no constraints on the contents of unparsed entities.</termdef> 
+</p>
+<p>
+Parsed entities are invoked by name using entity references;
+unparsed entities by name, given in the value of <kw>ENTITY</kw>
+or <kw>ENTITIES</kw>
+attributes.</p>
+<p><termdef id='gen-entity' term='general entity'
+><term>General entities</term>
+are entities for use within the document content.
+In this specification, general entities are sometimes referred 
+to with the unqualified term <emph>entity</emph> when this leads
+to no ambiguity.</termdef> 
+<termdef id='dt-PE' term='Parameter entity'>Parameter entities 
+are parsed entities for use within the DTD.</termdef>
+These two types of entities use different forms of reference and
+are recognized in different contexts.
+Furthermore, they occupy different namespaces; a parameter entity and
+a general entity with the same name are two distinct entities.
+</p>
+
+<div2 id='sec-references'>
+<head>Character and Entity References</head>
+<p><termdef id="dt-charref" term="Character Reference">
+A <term>character reference</term> refers to a specific character in the
+ISO/IEC 10646 character set, for example one not directly accessible from
+available input devices.
+<scrap lang='ebnf'>
+<head>Character Reference</head>
+<prod id='NT-CharRef'><lhs>CharRef</lhs>
+<rhs>'&amp;#' [0-9]+ ';' </rhs>
+<rhs>| '&hcro;' [0-9a-fA-F]+ ';'</rhs>
+<wfc def="wf-Legalchar"/>
+</prod>
+</scrap>
+<wfcnote id="wf-Legalchar">
+<head>Legal Character</head>
+<p>Characters referred to using character references must
+match the production for
+<termref def="NT-Char">Char</termref>.</p>
+</wfcnote>
+If the character reference begins with "<code>&amp;#x</code>", the digits and
+letters up to the terminating <code>;</code> provide a hexadecimal
+representation of the character's code point in ISO/IEC 10646.
+If it begins just with "<code>&amp;#</code>", the digits up to the terminating
+<code>;</code> provide a decimal representation of the character's 
+code point.
+</termdef>
+</p>
+<p><termdef id="dt-entref" term="Entity Reference">An <term>entity
+reference</term> refers to the content of a named entity.</termdef>
+<termdef id='dt-GERef' term='General Entity Reference'>References to 
+parsed general entities
+use ampersand (<code>&amp;</code>) and semicolon (<code>;</code>) as
+delimiters.</termdef>
+<termdef id='dt-PERef' term='Parameter-entity reference'>
+<term>Parameter-entity references</term> use percent-sign (<code>%</code>) and
+semicolon 
+(<code>;</code>) as delimiters.</termdef>
+</p>
+<scrap lang="ebnf">
+<head>Entity Reference</head>
+<prod id='NT-Reference'><lhs>Reference</lhs>
+<rhs><nt def='NT-EntityRef'>EntityRef</nt> 
+| <nt def='NT-CharRef'>CharRef</nt></rhs></prod>
+<prod id='NT-EntityRef'><lhs>EntityRef</lhs>
+<rhs>'&amp;' <nt def='NT-Name'>Name</nt> ';'</rhs>
+<wfc def='wf-entdeclared'/>
+<vc def='vc-entdeclared'/>
+<wfc def='textent'/>
+<wfc def='norecursion'/>
+</prod>
+<prod id='NT-PEReference'><lhs>PEReference</lhs>
+<rhs>'%' <nt def='NT-Name'>Name</nt> ';'</rhs>
+<vc def='vc-entdeclared'/>
+<wfc def='norecursion'/>
+<wfc def='indtd'/>
+</prod>
+</scrap>
+
+<wfcnote id='wf-entdeclared'>
+<head>Entity Declared</head>
+<p>In a document without any DTD, a document with only an internal
+DTD subset which contains no parameter entity references, or a document with
+"<code>standalone='yes'</code>", 
+the <nt def='NT-Name'>Name</nt> given in the entity reference must 
+<termref def="dt-match">match</termref> that in an 
+<titleref href='sec-entity-decl'>entity declaration</titleref>, except that
+well-formed documents need not declare 
+any of the following entities: &magicents;.  
+The declaration of a parameter entity must precede any reference to it.
+Similarly, the declaration of a general entity must precede any
+reference to it which appears in a default value in an attribute-list
+declaration.</p>
+<p>Note that if entities are declared in the external subset or in 
+external parameter entities, a non-validating processor is 
+<titleref href='include-if-valid'>not obligated to</titleref> read
+and process their declarations; for such documents, the rule that
+an entity must be declared is a well-formedness constraint only
+if <titleref href='sec-rmd'>standalone='yes'</titleref>.</p>
+</wfcnote>
+<vcnote id="vc-entdeclared">
+<head>Entity Declared</head>
+<p>In a document with an external subset or external parameter
+entities with "<code>standalone='no'</code>",
+the <nt def='NT-Name'>Name</nt> given in the entity reference must <termref
+def="dt-match">match</termref> that in an 
+<titleref href='sec-entity-decl'>entity declaration</titleref>.
+For interoperability, valid documents should declare the entities 
+&magicents;, in the form
+specified in <specref ref="sec-predefined-ent"/>.
+The declaration of a parameter entity must precede any reference to it.
+Similarly, the declaration of a general entity must precede any
+reference to it which appears in a default value in an attribute-list
+declaration.</p>
+</vcnote>
+<!-- FINAL EDIT:  is this duplication too clumsy? -->
+<wfcnote id='textent'>
+<head>Parsed Entity</head>
+<p>
+An entity reference must not contain the name of an <termref
+def="dt-unparsed">unparsed entity</termref>. Unparsed entities may be referred
+to only in <termref def="dt-attrval">attribute values</termref> declared to
+be of type <kw>ENTITY</kw> or <kw>ENTITIES</kw>.
+</p>
+</wfcnote>
+<wfcnote id='norecursion'>
+<head>No Recursion</head>
+<p>
+A parsed entity must not contain a recursive reference to itself,
+either directly or indirectly.
+</p>
+</wfcnote>
+<wfcnote id='indtd'>
+<head>In DTD</head>
+<p>
+Parameter-entity references may only appear in the 
+<termref def='dt-doctype'>DTD</termref>.
+</p>
+</wfcnote>
+<p>Examples of character and entity references:
+<eg>Type &lt;key>less-than&lt;/key> (&hcro;3C;) to save options.
+This document was prepared on &amp;docdate; and
+is classified &amp;security-level;.</eg></p>
+<p>Example of a parameter-entity reference:
+<eg><![CDATA[<!-- declare the parameter entity "ISOLat2"... -->
+<!ENTITY % ISOLat2
+         SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" >
+<!-- ... now reference it. -->
+%ISOLat2;]]></eg></p>
+</div2>
+ 
+<div2 id='sec-entity-decl'>
+<head>Entity Declarations</head>
+ 
+<p><termdef id="dt-entdecl" term="entity declaration">
+Entities are declared thus:
+<scrap lang='ebnf'>
+<head>Entity Declaration</head>
+<prodgroup pcw2="5" pcw4="18.5">
+<prod id='NT-EntityDecl'><lhs>EntityDecl</lhs>
+<rhs><nt def="NT-GEDecl">GEDecl</nt><!--</rhs><com>General entities</com>
+<rhs>--> | <nt def="NT-PEDecl">PEDecl</nt></rhs>
+<!--<com>Parameter entities</com>-->
+</prod>
+<prod id='NT-GEDecl'><lhs>GEDecl</lhs>
+<rhs>'&lt;!ENTITY' <nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-EntityDef'>EntityDef</nt> 
+<nt def='NT-S'>S</nt>? '&gt;'</rhs>
+</prod>
+<prod id='NT-PEDecl'><lhs>PEDecl</lhs>
+<rhs>'&lt;!ENTITY' <nt def='NT-S'>S</nt> '%' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> <nt def='NT-S'>S</nt> 
+<nt def='NT-PEDef'>PEDef</nt> <nt def='NT-S'>S</nt>? '&gt;'</rhs>
+<!--<com>Parameter entities</com>-->
+</prod>
+<prod id='NT-EntityDef'><lhs>EntityDef</lhs>
+<rhs><nt def='NT-EntityValue'>EntityValue</nt>
+<!--</rhs>
+<rhs>-->| (<nt def='NT-ExternalID'>ExternalID</nt> 
+<nt def='NT-NDataDecl'>NDataDecl</nt>?)</rhs>
+<!-- <nt def='NT-ExternalDef'>ExternalDef</nt></rhs> -->
+</prod>
+<!-- FINAL EDIT: what happened to WFs here? -->
+<prod id='NT-PEDef'><lhs>PEDef</lhs>
+<rhs><nt def='NT-EntityValue'>EntityValue</nt> 
+| <nt def='NT-ExternalID'>ExternalID</nt></rhs></prod>
+</prodgroup>
+</scrap>
+The <nt def='NT-Name'>Name</nt> identifies the entity in an
+<termref def="dt-entref">entity reference</termref> or, in the case of an
+unparsed entity, in the value of an <kw>ENTITY</kw> or <kw>ENTITIES</kw>
+attribute.
+If the same entity is declared more than once, the first declaration
+encountered is binding; at user option, an XML processor may issue a
+warning if entities are declared multiple times.</termdef>
+</p>
+
+<div3 id='sec-internal-ent'>
+<head>Internal Entities</head>
+ 
+<p><termdef id='dt-internent' term="Internal Entity Replacement Text">If 
+the entity definition is an 
+<nt def='NT-EntityValue'>EntityValue</nt>,  
+the defined entity is called an <term>internal entity</term>.  
+There is no separate physical
+storage object, and the content of the entity is given in the
+declaration. </termdef>
+Note that some processing of entity and character references in the
+<termref def='dt-litentval'>literal entity value</termref> may be required to
+produce the correct <termref def='dt-repltext'>replacement 
+text</termref>: see <specref ref='intern-replacement'/>.
+</p>
+<p>An internal entity is a <termref def="dt-parsedent">parsed
+entity</termref>.</p>
+<p>Example of an internal entity declaration:
+<eg>&lt;!ENTITY Pub-Status "This is a pre-release of the
+ specification."></eg></p>
+</div3>
+ 
+<div3 id='sec-external-ent'>
+<head>External Entities</head>
+ 
+<p><termdef id="dt-extent" term="External Entity">If the entity is not
+internal, it is an <term>external
+entity</term>, declared as follows:
+<scrap lang='ebnf'>
+<head>External Entity Declaration</head>
+<!--
+<prod id='NT-ExternalDef'><lhs>ExternalDef</lhs>
+<rhs></prod> -->
+<prod id='NT-ExternalID'><lhs>ExternalID</lhs>
+<rhs>'SYSTEM' <nt def='NT-S'>S</nt> 
+<nt def='NT-SystemLiteral'>SystemLiteral</nt></rhs>
+<rhs>| 'PUBLIC' <nt def='NT-S'>S</nt> 
+<nt def='NT-PubidLiteral'>PubidLiteral</nt> 
+<nt def='NT-S'>S</nt> 
+<nt def='NT-SystemLiteral'>SystemLiteral</nt>
+</rhs>
+</prod>
+<prod id='NT-NDataDecl'><lhs>NDataDecl</lhs>
+<rhs><nt def='NT-S'>S</nt> 'NDATA' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt></rhs>
+<vc def='not-declared'/></prod>
+</scrap>
+If the <nt def='NT-NDataDecl'>NDataDecl</nt> is present, this is a
+general <termref def="dt-unparsed">unparsed
+entity</termref>; otherwise it is a parsed entity.</termdef></p>
+<vcnote id='not-declared'>
+<head>Notation Declared</head>
+<p>
+The <nt def='NT-Name'>Name</nt> must match the declared name of a
+<termref def="dt-notation">notation</termref>.
+</p>
+</vcnote>
+<p><termdef id="dt-sysid" term="System Identifier">The
+<nt def='NT-SystemLiteral'>SystemLiteral</nt> 
+is called the entity's <term>system identifier</term>. It is a URI,
+which may be used to retrieve the entity.</termdef>
+Note that the hash mark (<code>#</code>) and fragment identifier 
+frequently used with URIs are not, formally, part of the URI itself; 
+an XML processor may signal an error if a fragment identifier is 
+given as part of a system identifier.
+Unless otherwise provided by information outside the scope of this
+specification (e.g. a special XML element type defined by a particular
+DTD, or a processing instruction defined by a particular application
+specification), relative URIs are relative to the location of the
+resource within which the entity declaration occurs.
+A URI might thus be relative to the 
+<termref def='dt-docent'>document entity</termref>, to the entity
+containing the <termref def='dt-doctype'>external DTD subset</termref>, 
+or to some other <termref def='dt-extent'>external parameter entity</termref>.
+</p>
+<p>An XML processor should handle a non-ASCII character in a URI by
+representing the character in UTF-8 as one or more bytes, and then 
+escaping these bytes with the URI escaping mechanism (i.e., by
+converting each byte to %HH, where HH is the hexadecimal notation of the
+byte value).</p>
+<p><termdef id="dt-pubid" term="Public identifier">
+In addition to a system identifier, an external identifier may
+include a <term>public identifier</term>.</termdef>  
+An XML processor attempting to retrieve the entity's content may use the public
+identifier to try to generate an alternative URI.  If the processor
+is unable to do so, it must use the URI specified in the system
+literal.  Before a match is attempted, all strings
+of white space in the public identifier must be normalized to single space characters (#x20),
+and leading and trailing white space must be removed.</p>
+<p>Examples of external entity declarations:
+<eg>&lt;!ENTITY open-hatch
+         SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
+&lt;!ENTITY open-hatch
+         PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN"
+         "http://www.textuality.com/boilerplate/OpenHatch.xml">
+&lt;!ENTITY hatch-pic
+         SYSTEM "../grafix/OpenHatch.gif"
+         NDATA gif ></eg></p>
+</div3>
+ 
+</div2>
+
+<div2 id='TextEntities'>
+<head>Parsed Entities</head>
+<div3 id='sec-TextDecl'>
+<head>The Text Declaration</head>
+<p>External parsed entities may each begin with a <term>text
+declaration</term>. 
+<scrap lang='ebnf'>
+<head>Text Declaration</head>
+<prodgroup pcw4="12.5" pcw5="13">
+<prod id='NT-TextDecl'><lhs>TextDecl</lhs>
+<rhs>&xmlpio; 
+<nt def='NT-VersionInfo'>VersionInfo</nt>?
+<nt def='NT-EncodingDecl'>EncodingDecl</nt>
+<nt def='NT-S'>S</nt>? &pic;</rhs>
+</prod>
+</prodgroup>
+</scrap>
+</p>
+<p>The text declaration must be provided literally, not
+by reference to a parsed entity.
+No text declaration may appear at any position other than the beginning of
+an external parsed entity.</p>
+</div3>
+<div3 id='wf-entities'>
+<head>Well-Formed Parsed Entities</head>
+<p>The document entity is well-formed if it matches the production labeled
+<nt def='NT-document'>document</nt>.
+An external general 
+parsed entity is well-formed if it matches the production labeled
+<nt def='NT-extParsedEnt'>extParsedEnt</nt>.
+An external parameter
+entity is well-formed if it matches the production labeled
+<nt def='NT-extPE'>extPE</nt>.
+<scrap lang='ebnf'>
+<head>Well-Formed External Parsed Entity</head>
+<prod id='NT-extParsedEnt'><lhs>extParsedEnt</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>? 
+<nt def='NT-content'>content</nt></rhs>
+</prod>
+<prod id='NT-extPE'><lhs>extPE</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>? 
+<nt def='NT-extSubsetDecl'>extSubsetDecl</nt></rhs>
+</prod>
+</scrap>
+An internal general parsed entity is well-formed if its replacement text 
+matches the production labeled
+<nt def='NT-content'>content</nt>.
+All internal parameter entities are well-formed by definition.
+</p>
+<p>A consequence of well-formedness in entities is that the logical 
+and physical structures in an XML document are properly nested; no 
+<termref def='dt-stag'>start-tag</termref>,
+<termref def='dt-etag'>end-tag</termref>,
+<termref def="dt-empty">empty-element tag</termref>,
+<termref def='dt-element'>element</termref>, 
+<termref def='dt-comment'>comment</termref>, 
+<termref def='dt-pi'>processing instruction</termref>, 
+<termref def='dt-charref'>character
+reference</termref>, or
+<termref def='dt-entref'>entity reference</termref> 
+can begin in one entity and end in another.</p>
+</div3>
+<div3 id='charencoding'>
+<head>Character Encoding in Entities</head>
+ 
+<p>Each external parsed entity in an XML document may use a different
+encoding for its characters. All XML processors must be able to read
+entities in either UTF-8 or UTF-16. 
+
+</p>
+<p>Entities encoded in UTF-16 must
+begin with the Byte Order Mark described by ISO/IEC 10646 Annex E and
+Unicode Appendix B (the ZERO WIDTH NO-BREAK SPACE character, #xFEFF).
+This is an encoding signature, not part of either the markup or the
+character data of the XML document.
+XML processors must be able to use this character to
+differentiate between UTF-8 and UTF-16 encoded documents.</p>
+<p>Although an XML processor is required to read only entities in
+the UTF-8 and UTF-16 encodings, it is recognized that other encodings are
+used around the world, and it may be desired for XML processors
+to read entities that use them.
+Parsed entities which are stored in an encoding other than
+UTF-8 or UTF-16 must begin with a <titleref href='TextDecl'>text
+declaration</titleref> containing an encoding declaration:
+<scrap lang='ebnf'>
+<head>Encoding Declaration</head>
+<prod id='NT-EncodingDecl'><lhs>EncodingDecl</lhs>
+<rhs><nt def="NT-S">S</nt>
+'encoding' <nt def='NT-Eq'>Eq</nt> 
+('"' <nt def='NT-EncName'>EncName</nt> '"' | 
+"'" <nt def='NT-EncName'>EncName</nt> "'" )
+</rhs>
+</prod>
+<prod id='NT-EncName'><lhs>EncName</lhs>
+<rhs>[A-Za-z] ([A-Za-z0-9._] | '-')*</rhs>
+<com>Encoding name contains only Latin characters</com>
+</prod>
+</scrap>
+In the <termref def='dt-docent'>document entity</termref>, the encoding
+declaration is part of the <termref def="dt-xmldecl">XML declaration</termref>.
+The <nt def="NT-EncName">EncName</nt> is the name of the encoding used.
+</p>
+<!-- FINAL EDIT:  check name of IANA and charset names -->
+<p>In an encoding declaration, the values
+"<code>UTF-8</code>",
+"<code>UTF-16</code>",
+"<code>ISO-10646-UCS-2</code>", and
+"<code>ISO-10646-UCS-4</code>" should be 
+used for the various encodings and transformations of Unicode /
+ISO/IEC 10646, the values
+"<code>ISO-8859-1</code>",
+"<code>ISO-8859-2</code>", ...
+"<code>ISO-8859-9</code>" should be used for the parts of ISO 8859, and
+the values
+"<code>ISO-2022-JP</code>",
+"<code>Shift_JIS</code>", and
+"<code>EUC-JP</code>"
+should be used for the various encoded forms of JIS X-0208-1997.  XML
+processors may recognize other encodings; it is recommended that
+character encodings registered (as <emph>charset</emph>s) 
+with the Internet Assigned Numbers
+Authority <bibref ref='IANA'/>, other than those just listed, should be
+referred to
+using their registered names.
+Note that these registered names are defined to be 
+case-insensitive, so processors wishing to match against them 
+should do so in a case-insensitive
+way.</p>
+<p>In the absence of information provided by an external
+transport protocol (e.g. HTTP or MIME), 
+it is an <termref def="dt-error">error</termref> for an entity including
+an encoding declaration to be presented to the XML processor 
+in an encoding other than that named in the declaration, 
+for an encoding declaration to occur other than at the beginning 
+of an external entity, or for
+an entity which begins with neither a Byte Order Mark nor an encoding
+declaration to use an encoding other than UTF-8.
+Note that since ASCII
+is a subset of UTF-8, ordinary ASCII entities do not strictly need
+an encoding declaration.</p>
+
+<p>It is a <termref def='dt-fatal'>fatal error</termref> when an XML processor
+encounters an entity with an encoding that it is unable to process.</p>
+<p>Examples of encoding declarations:
+<eg>&lt;?xml encoding='UTF-8'?>
+&lt;?xml encoding='EUC-JP'?></eg></p>
+</div3>
+</div2>
+<div2 id='entproc'>
+<head>XML Processor Treatment of Entities and References</head>
+<p>The table below summarizes the contexts in which character references,
+entity references, and invocations of unparsed entities might appear and the
+required behavior of an <termref def='dt-xml-proc'>XML processor</termref> in
+each case.  
+The labels in the leftmost column describe the recognition context:
+<glist>
+<gitem><label>Reference in Content</label>
+<def><p>as a reference
+anywhere after the <termref def='dt-stag'>start-tag</termref> and
+before the <termref def='dt-etag'>end-tag</termref> of an element; corresponds
+to the nonterminal <nt def='NT-content'>content</nt>.</p></def>
+</gitem>
+<gitem>
+<label>Reference in Attribute Value</label>
+<def><p>as a reference within either the value of an attribute in a 
+<termref def='dt-stag'>start-tag</termref>, or a default
+value in an <termref def='dt-attdecl'>attribute declaration</termref>;
+corresponds to the nonterminal
+<nt def='NT-AttValue'>AttValue</nt>.</p></def></gitem>
+<gitem>
+<label>Occurs as Attribute Value</label>
+<def><p>as a <nt def='NT-Name'>Name</nt>, not a reference, appearing either as
+the value of an 
+attribute which has been declared as type <kw>ENTITY</kw>, or as one of
+the space-separated tokens in the value of an attribute which has been
+declared as type <kw>ENTITIES</kw>.</p>
+</def></gitem>
+<gitem><label>Reference in Entity Value</label>
+<def><p>as a reference
+within a parameter or internal entity's 
+<termref def='dt-litentval'>literal entity value</termref> in
+the entity's declaration; corresponds to the nonterminal 
+<nt def='NT-EntityValue'>EntityValue</nt>.</p></def></gitem>
+<gitem><label>Reference in DTD</label>
+<def><p>as a reference within either the internal or external subsets of the 
+<termref def='dt-doctype'>DTD</termref>, but outside
+of an <nt def='NT-EntityValue'>EntityValue</nt> or
+<nt def="NT-AttValue">AttValue</nt>.</p></def>
+</gitem>
+</glist></p>
+<htable border='1' cellpadding='7' align='center'>
+<htbody>
+<tr><td bgcolor='&cellback;' rowspan='2' colspan='1'></td>
+<td bgcolor='&cellback;' align='center' valign='bottom' colspan='4'>Entity Type</td>
+<td bgcolor='&cellback;' rowspan='2' align='center'>Character</td>
+</tr>
+<tr align='center' valign='bottom'>
+<td bgcolor='&cellback;'>Parameter</td>
+<td bgcolor='&cellback;'>Internal
+General</td>
+<td bgcolor='&cellback;'>External Parsed
+General</td>
+<td bgcolor='&cellback;'>Unparsed</td>
+</tr>
+<tr align='center' valign='middle'>
+
+<td bgcolor='&cellback;' align='right'>Reference
+in Content</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+<td bgcolor='&cellback;'><titleref href='include-if-valid'>Included if validating</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in Attribute Value</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='inliteral'>Included in literal</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Occurs as
+Attribute Value</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='notify'>Notify</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not recognized'>Not recognized</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in EntityValue</td>
+<td bgcolor='&cellback;'><titleref href='inliteral'>Included in literal</titleref></td>
+<td bgcolor='&cellback;'><titleref href='bypass'>Bypassed</titleref></td>
+<td bgcolor='&cellback;'><titleref href='bypass'>Bypassed</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in DTD</td>
+<td bgcolor='&cellback;'><titleref href='as-PE'>Included as PE</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+</tr>
+</htbody>
+</htable>
+<div3 id='not-recognized'>
+<head>Not Recognized</head>
+<p>Outside the DTD, the <code>%</code> character has no
+special significance; thus, what would be parameter entity references in the
+DTD are not recognized as markup in <nt def='NT-content'>content</nt>.
+Similarly, the names of unparsed entities are not recognized except
+when they appear in the value of an appropriately declared attribute.
+</p>
+</div3>
+<div3 id='included'>
+<head>Included</head>
+<p><termdef id="dt-include" term="Include">An entity is 
+<term>included</term> when its 
+<termref def='dt-repltext'>replacement text</termref> is retrieved 
+and processed, in place of the reference itself,
+as though it were part of the document at the location the
+reference was recognized.
+The replacement text may contain both 
+<termref def='dt-chardata'>character data</termref>
+and (except for parameter entities) <termref def="dt-markup">markup</termref>,
+which must be recognized in
+the usual way, except that the replacement text of entities used to escape
+markup delimiters (the entities &magicents;) is always treated as
+data.  (The string "<code>AT&amp;amp;T;</code>" expands to
+"<code>AT&amp;T;</code>" and the remaining ampersand is not recognized
+as an entity-reference delimiter.) 
+A character reference is <term>included</term> when the indicated
+character is processed in place of the reference itself.
+</termdef></p>
+</div3>
+<div3 id='include-if-valid'>
+<head>Included If Validating</head>
+<p>When an XML processor recognizes a reference to a parsed entity, in order
+to <termref def="dt-valid">validate</termref>
+the document, the processor must 
+<termref def="dt-include">include</termref> its
+replacement text.
+If the entity is external, and the processor is not
+attempting to validate the XML document, the
+processor <termref def="dt-may">may</termref>, but need not, 
+include the entity's replacement text.
+If a non-validating parser does not include the replacement text,
+it must inform the application that it recognized, but did not
+read, the entity.</p>
+<p>This rule is based on the recognition that the automatic inclusion
+provided by the SGML and XML entity mechanism, primarily designed
+to support modularity in authoring, is not necessarily 
+appropriate for other applications, in particular document browsing.
+Browsers, for example, when encountering an external parsed entity reference,
+might choose to provide a visual indication of the entity's
+presence and retrieve it for display only on demand.
+</p>
+</div3>
+<div3 id='forbidden'>
+<head>Forbidden</head>
+<p>The following are forbidden, and constitute
+<termref def='dt-fatal'>fatal</termref> errors:
+<ulist>
+<item><p>the appearance of a reference to an
+<termref def='dt-unparsed'>unparsed entity</termref>.
+</p></item>
+<item><p>the appearance of any character or general-entity reference in the
+DTD except within an <nt def='NT-EntityValue'>EntityValue</nt> or 
+<nt def="NT-AttValue">AttValue</nt>.</p></item>
+<item><p>a reference to an external entity in an attribute value.</p>
+</item>
+</ulist>
+</p>
+</div3>
+<div3 id='inliteral'>
+<head>Included in Literal</head>
+<p>When an <termref def='dt-entref'>entity reference</termref> appears in an
+attribute value, or a parameter entity reference appears in a literal entity
+value, its <termref def='dt-repltext'>replacement text</termref> is
+processed in place of the reference itself as though it
+were part of the document at the location the reference was recognized,
+except that a single or double quote character in the replacement text
+is always treated as a normal data character and will not terminate the
+literal. 
+For example, this is well-formed:
+<eg><![CDATA[<!ENTITY % YN '"Yes"' >
+<!ENTITY WhatHeSaid "He said &YN;" >]]></eg>
+while this is not:
+<eg>&lt;!ENTITY EndAttr "27'" >
+&lt;element attribute='a-&amp;EndAttr;></eg>
+</p></div3>
+<div3 id='notify'>
+<head>Notify</head>
+<p>When the name of an <termref def='dt-unparsed'>unparsed
+entity</termref> appears as a token in the
+value of an attribute of declared type <kw>ENTITY</kw> or <kw>ENTITIES</kw>,
+a validating processor must inform the
+application of the <termref def='dt-sysid'>system</termref> 
+and <termref def='dt-pubid'>public</termref> (if any)
+identifiers for both the entity and its associated
+<termref def="dt-notation">notation</termref>.</p>
+</div3>
+<div3 id='bypass'>
+<head>Bypassed</head>
+<p>When a general entity reference appears in the
+<nt def='NT-EntityValue'>EntityValue</nt> in an entity declaration,
+it is bypassed and left as is.</p>
+</div3>
+<div3 id='as-PE'>
+<head>Included as PE</head>
+<p>Just as with external parsed entities, parameter entities
+need only be <titleref href='include-if-valid'>included if
+validating</titleref>. 
+When a parameter-entity reference is recognized in the DTD
+and included, its 
+<termref def='dt-repltext'>replacement
+text</termref> is enlarged by the attachment of one leading and one following
+space (#x20) character; the intent is to constrain the replacement
+text of parameter 
+entities to contain an integral number of grammatical tokens in the DTD.
+</p>
+</div3>
+
+</div2>
+<div2 id='intern-replacement'>
+<head>Construction of Internal Entity Replacement Text</head>
+<p>In discussing the treatment
+of internal entities, it is  
+useful to distinguish two forms of the entity's value.
+<termdef id="dt-litentval" term='Literal Entity Value'>The <term>literal
+entity value</term> is the quoted string actually
+present in the entity declaration, corresponding to the
+non-terminal <nt def='NT-EntityValue'>EntityValue</nt>.</termdef>
+<termdef id='dt-repltext' term='Replacement Text'>The <term>replacement
+text</term> is the content of the entity, after
+replacement of character references and parameter-entity
+references.
+</termdef></p>
+
+<p>The literal entity value 
+as given in an internal entity declaration
+(<nt def='NT-EntityValue'>EntityValue</nt>) may contain character,
+parameter-entity, and general-entity references.
+Such references must be contained entirely within the
+literal entity value.
+The actual replacement text that is 
+<termref def='dt-include'>included</termref> as described above
+must contain the <emph>replacement text</emph> of any 
+parameter entities referred to, and must contain the character
+referred to, in place of any character references in the
+literal entity value; however,
+general-entity references must be left as-is, unexpanded.
+For example, given the following declarations:
+
+<eg><![CDATA[<!ENTITY % pub    "&#xc9;ditions Gallimard" >
+<!ENTITY   rights "All rights reserved" >
+<!ENTITY   book   "La Peste: Albert Camus, 
+&#xA9; 1947 %pub;. &rights;" >]]></eg>
+then the replacement text for the entity "<code>book</code>" is:
+<eg>La Peste: Albert Camus, 
+&#169; 1947 &#201;ditions Gallimard. &amp;rights;</eg>
+The general-entity reference "<code>&amp;rights;</code>" would be expanded
+should the reference "<code>&amp;book;</code>" appear in the document's
+content or an attribute value.</p>
+<p>These simple rules may have complex interactions; for a detailed
+discussion of a difficult example, see
+<specref ref='sec-entexpand'/>.
+</p>
+
+</div2>
+<div2 id='sec-predefined-ent'>
+<head>Predefined Entities</head>
+<p><termdef id="dt-escape" term="escape">Entity and character
+references can both be used to <term>escape</term> the left angle bracket,
+ampersand, and other delimiters.   A set of general entities
+(&magicents;) is specified for this purpose.
+Numeric character references may also be used; they are
+expanded immediately when recognized and must be treated as
+character data, so the numeric character references
+"<code>&amp;#60;</code>" and "<code>&amp;#38;</code>" may be used to 
+escape <code>&lt;</code> and <code>&amp;</code> when they occur
+in character data.</termdef></p>
+<p>All XML processors must recognize these entities whether they
+are declared or not.  
+<termref def='dt-interop'>For interoperability</termref>,
+valid XML documents should declare these
+entities, like any others, before using them.
+If the entities in question are declared, they must be declared
+as internal entities whose replacement text is the single
+character being escaped or a character reference to
+that character, as shown below.
+<eg><![CDATA[<!ENTITY lt     "&#38;#60;"> 
+<!ENTITY gt     "&#62;"> 
+<!ENTITY amp    "&#38;#38;"> 
+<!ENTITY apos   "&#39;"> 
+<!ENTITY quot   "&#34;"> 
+]]></eg>
+Note that the <code>&lt;</code> and <code>&amp;</code> characters
+in the declarations of "<code>lt</code>" and "<code>amp</code>"
+are doubly escaped to meet the requirement that entity replacement
+be well-formed.
+</p>
+</div2>
+
+<div2 id='Notations'>
+<head>Notation Declarations</head>
+ 
+<p><termdef id="dt-notation" term="Notation"><term>Notations</term> identify by
+name the format of <termref def="dt-extent">unparsed
+entities</termref>, the
+format of elements which bear a notation attribute, 
+or the application to which  
+a <termref def="dt-pi">processing instruction</termref> is
+addressed.</termdef></p>
+<p><termdef id="dt-notdecl" term="Notation Declaration">
+<term>Notation declarations</term>
+provide a name for the notation, for use in
+entity and attribute-list declarations and in attribute specifications,
+and an external identifier for the notation which may allow an XML
+processor or its client application to locate a helper application
+capable of processing data in the given notation.
+<scrap lang='ebnf'>
+<head>Notation Declarations</head>
+<prod id='NT-NotationDecl'><lhs>NotationDecl</lhs>
+<rhs>'&lt;!NOTATION' <nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> 
+(<nt def='NT-ExternalID'>ExternalID</nt> | 
+<nt def='NT-PublicID'>PublicID</nt>)
+<nt def='NT-S'>S</nt>? '>'</rhs></prod>
+<prod id='NT-PublicID'><lhs>PublicID</lhs>
+<rhs>'PUBLIC' <nt def='NT-S'>S</nt> 
+<nt def='NT-PubidLiteral'>PubidLiteral</nt> 
+</rhs></prod>
+</scrap>
+</termdef></p>
+<p>XML processors must provide applications with the name and external
+identifier(s) of any notation declared and referred to in an attribute
+value, attribute definition, or entity declaration.  They may
+additionally resolve the external identifier into the
+<termref def="dt-sysid">system identifier</termref>,
+file name, or other information needed to allow the
+application to call a processor for data in the notation described.  (It
+is not an error, however, for XML documents to declare and refer to
+notations for which notation-specific applications are not available on
+the system where the XML processor or application is running.)</p>
+</div2>
+
+ 
+<div2 id='sec-doc-entity'>
+<head>Document Entity</head>
+ 
+<p><termdef id="dt-docent" term="Document Entity">The <term>document
+entity</term> serves as the root of the entity
+tree and a starting-point for an <termref def="dt-xml-proc">XML
+processor</termref>.</termdef>
+This specification does
+not specify how the document entity is to be located by an XML
+processor; unlike other entities, the document entity has no name and might
+well appear on a processor input stream 
+without any identification at all.</p>
+</div2>
+
+
+</div1>
+<!-- &Conformance; -->
+ 
+<div1 id='sec-conformance'>
+<head>Conformance</head>
+ 
+<div2 id='proc-types'>
+<head>Validating and Non-Validating Processors</head>
+<p>Conforming <termref def="dt-xml-proc">XML processors</termref> fall into two
+classes: validating and non-validating.</p>
+<p>Validating and non-validating processors alike must report
+violations of this specification's well-formedness constraints
+in the content of the
+<termref def='dt-docent'>document entity</termref> and any 
+other <termref def='dt-parsedent'>parsed entities</termref> that 
+they read.</p>
+<p><termdef id="dt-validating" term="Validating Processor">
+<term>Validating processors</term> must report
+violations of the constraints expressed by the declarations in the
+<termref def="dt-doctype">DTD</termref>, and
+failures to fulfill the validity constraints given
+in this specification.
+</termdef>
+To accomplish this, validating XML processors must read and process the entire
+DTD and all external parsed entities referenced in the document.
+</p>
+<p>Non-validating processors are required to check only the 
+<termref def='dt-docent'>document entity</termref>, including
+the entire internal DTD subset, for well-formedness.
+<termdef id='dt-use-mdecl' term='Process Declarations'>
+While they are not required to check the document for validity,
+they are required to 
+<term>process</term> all the declarations they read in the
+internal DTD subset and in any parameter entity that they
+read, up to the first reference
+to a parameter entity that they do <emph>not</emph> read; that is to 
+say, they must
+use the information in those declarations to
+<titleref href='AVNormalize'>normalize</titleref> attribute values,
+<titleref href='included'>include</titleref> the replacement text of 
+internal entities, and supply 
+<titleref href='sec-attr-defaults'>default attribute values</titleref>.
+</termdef>
+They must not <termref def='dt-use-mdecl'>process</termref>
+<termref def='dt-entdecl'>entity declarations</termref> or 
+<termref def='dt-attdecl'>attribute-list declarations</termref> 
+encountered after a reference to a parameter entity that is not
+read, since the entity may have contained overriding declarations.
+</p>
+</div2>
+<div2 id='safe-behavior'>
+<head>Using XML Processors</head>
+<p>The behavior of a validating XML processor is highly predictable; it
+must read every piece of a document and report all well-formedness and
+validity violations.
+Less is required of a non-validating processor; it need not read any
+part of the document other than the document entity.
+This has two effects that may be important to users of XML processors:
+<ulist>
+<item><p>Certain well-formedness errors, specifically those that require
+reading external entities, may not be detected by a non-validating processor.
+Examples include the constraints entitled 
+<titleref href='wf-entdeclared'>Entity Declared</titleref>, 
+<titleref href='wf-textent'>Parsed Entity</titleref>, and
+<titleref href='wf-norecursion'>No Recursion</titleref>, as well
+as some of the cases described as
+<titleref href='forbidden'>forbidden</titleref> in 
+<specref ref='entproc'/>.</p></item>
+<item><p>The information passed from the processor to the application may
+vary, depending on whether the processor reads
+parameter and external entities.
+For example, a non-validating processor may not 
+<titleref href='AVNormalize'>normalize</titleref> attribute values,
+<titleref href='included'>include</titleref> the replacement text of 
+internal entities, or supply 
+<titleref href='sec-attr-defaults'>default attribute values</titleref>,
+where doing so depends on having read declarations in 
+external or parameter entities.</p></item>
+</ulist>
+</p>
+<p>For maximum reliability in interoperating between different XML
+processors, applications which use non-validating processors should not 
+rely on any behaviors not required of such processors.
+Applications which require facilities such as the use of default
+attributes or internal entities which are declared in external
+entities should use validating XML processors.</p>
+</div2>
+</div1>
+
+<div1 id='sec-notation'>
+<head>Notation</head>
+ 
+<p>The formal grammar of XML is given in this specification using a simple
+Extended Backus-Naur Form (EBNF) notation.  Each rule in the grammar defines
+one symbol, in the form
+<eg>symbol ::= expression</eg></p>
+<p>Symbols are written with an initial capital letter if they are
+defined by a regular expression, or with an initial lower case letter 
+otherwise.
+Literal strings are quoted.
+
+</p>
+
+<p>Within the expression on the right-hand side of a rule, the following
+expressions are used to match strings of one or more characters:
+<glist>
+<gitem>
+<label><code>#xN</code></label>
+<def><p>where <code>N</code> is a hexadecimal integer, the
+expression matches the character in ISO/IEC 10646 whose canonical
+(UCS-4) 
+code value, when interpreted as an unsigned binary number, has
+the value indicated.  The number of leading zeros in the
+<code>#xN</code> form is insignificant; the number of leading
+zeros in the corresponding code value 
+is governed by the character
+encoding in use and is not significant for XML.</p></def>
+</gitem>
+<gitem>
+<label><code>[a-zA-Z]</code>, <code>[#xN-#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref> 
+with a value in the range(s) indicated (inclusive).</p></def>
+</gitem>
+<gitem>
+<label><code>[^a-z]</code>, <code>[^#xN-#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref> 
+with a value <emph>outside</emph> the
+range indicated.</p></def>
+</gitem>
+<gitem>
+<label><code>[^abc]</code>, <code>[^#xN#xN#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref>
+with a value not among the characters given.</p></def>
+</gitem>
+<gitem>
+<label><code>"string"</code></label>
+<def><p>matches a literal string <termref def="dt-match">matching</termref>
+that given inside the double quotes.</p></def>
+</gitem>
+<gitem>
+<label><code>'string'</code></label>
+<def><p>matches a literal string <termref def="dt-match">matching</termref>
+that given inside the single quotes.</p></def>
+</gitem>
+</glist>
+These symbols may be combined to match more complex patterns as follows,
+where <code>A</code> and <code>B</code> represent simple expressions:
+<glist>
+<gitem>
+<label>(<code>expression</code>)</label>
+<def><p><code>expression</code> is treated as a unit 
+and may be combined as described in this list.</p></def>
+</gitem>
+<gitem>
+<label><code>A?</code></label>
+<def><p>matches <code>A</code> or nothing; optional <code>A</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A B</code></label>
+<def><p>matches <code>A</code> followed by <code>B</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A | B</code></label>
+<def><p>matches <code>A</code> or <code>B</code> but not both.</p></def>
+</gitem>
+<gitem>
+<label><code>A - B</code></label>
+<def><p>matches any string that matches <code>A</code> but does not match
+<code>B</code>.
+</p></def>
+</gitem>
+<gitem>
+<label><code>A+</code></label>
+<def><p>matches one or more occurrences of <code>A</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A*</code></label>
+<def><p>matches zero or more occurrences of <code>A</code>.</p></def>
+</gitem>
+
+</glist>
+Other notations used in the productions are:
+<glist>
+<gitem>
+<label><code>/* ... */</code></label>
+<def><p>comment.</p></def>
+</gitem>
+<gitem>
+<label><code>[ wfc: ... ]</code></label>
+<def><p>well-formedness constraint; this identifies by name a 
+constraint on 
+<termref def="dt-wellformed">well-formed</termref> documents
+associated with a production.</p></def>
+</gitem>
+<gitem>
+<label><code>[ vc: ... ]</code></label>
+<def><p>validity constraint; this identifies by name a constraint on
+<termref def="dt-valid">valid</termref> documents associated with
+a production.</p></def>
+</gitem>
+</glist>
+</p></div1>
+
+</body>
+<back>
+<!-- &SGML; -->
+ 
+
+<!-- &Biblio; -->
+<div1 id='sec-bibliography'>
+
+<head>References</head>
+<div2 id='sec-existing-stds'>
+<head>Normative References</head>
+
+<blist>
+<bibl id='IANA' key='IANA'>
+(Internet Assigned Numbers Authority) <emph>Official Names for 
+Character Sets</emph>,
+ed. Keld Simonsen et al.
+See <loc href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</loc>.
+</bibl>
+
+<bibl id='RFC1766' key='IETF RFC 1766'>
+IETF (Internet Engineering Task Force).
+<emph>RFC 1766:  Tags for the Identification of Languages</emph>,
+ed. H. Alvestrand.
+1995.
+</bibl>
+
+<bibl id='ISO639' key='ISO 639'>
+(International Organization for Standardization).
+<emph>ISO 639:1988 (E).
+Code for the representation of names of languages.</emph>
+[Geneva]:  International Organization for
+Standardization, 1988.</bibl>
+
+<bibl id='ISO3166' key='ISO 3166'>
+(International Organization for Standardization).
+<emph>ISO 3166-1:1997 (E).
+Codes for the representation of names of countries and their subdivisions 
+&mdash; Part 1: Country codes</emph>
+[Geneva]:  International Organization for
+Standardization, 1997.</bibl>
+
+<bibl id='ISO10646' key='ISO/IEC 10646'>ISO
+(International Organization for Standardization).
+<emph>ISO/IEC 10646-1993 (E).  Information technology &mdash; Universal
+Multiple-Octet Coded Character Set (UCS) &mdash; Part 1:
+Architecture and Basic Multilingual Plane.</emph>
+[Geneva]:  International Organization for
+Standardization, 1993 (plus amendments AM 1 through AM 7).
+</bibl>
+
+<bibl id='Unicode' key='Unicode'>The Unicode Consortium.
+<emph>The Unicode Standard, Version 2.0.</emph>
+Reading, Mass.:  Addison-Wesley Developers Press, 1996.</bibl>
+
+</blist>
+
+</div2>
+
+<div2><head>Other References</head> 
+
+<blist>
+
+<bibl id='Aho' key='Aho/Ullman'>Aho, Alfred V., 
+Ravi Sethi, and Jeffrey D. Ullman.
+<emph>Compilers:  Principles, Techniques, and Tools</emph>.
+Reading:  Addison-Wesley, 1986, rpt. corr. 1988.</bibl>
+
+<bibl id="Berners-Lee" xml-link="simple" key="Berners-Lee et al.">
+Berners-Lee, T., R. Fielding, and L. Masinter.
+<emph>Uniform Resource Identifiers (URI):  Generic Syntax and
+Semantics</emph>.
+1997.
+(Work in progress; see updates to RFC1738.)</bibl>
+
+<bibl id='ABK' key='Brüggemann-Klein'>Brüggemann-Klein, Anne.
+<emph>Regular Expressions into Finite Automata</emph>.
+Extended abstract in I. Simon, Hrsg., LATIN 1992, 
+S. 97-98. Springer-Verlag, Berlin 1992. 
+Full Version in Theoretical Computer Science 120: 197-213, 1993.
+
+</bibl>
+
+<bibl id='ABKDW' key='Brüggemann-Klein and Wood'>Brüggemann-Klein, Anne,
+and Derick Wood.
+<emph>Deterministic Regular Languages</emph>.
+Universität Freiburg, Institut für Informatik,
+Bericht 38, Oktober 1991.
+</bibl>
+
+<bibl id='Clark' key='Clark'>James Clark.
+Comparison of SGML and XML. See
+<loc href='http://www.w3.org/TR/NOTE-sgml-xml-971215'>http://www.w3.org/TR/NOTE-sgml-xml-971215</loc>.
+</bibl>
+<bibl id="RFC1738" xml-link="simple" key="IETF RFC1738">
+IETF (Internet Engineering Task Force).
+<emph>RFC 1738:  Uniform Resource Locators (URL)</emph>, 
+ed. T. Berners-Lee, L. Masinter, M. McCahill.
+1994.
+</bibl>
+
+<bibl id="RFC1808" xml-link="simple" key="IETF RFC1808">
+IETF (Internet Engineering Task Force).
+<emph>RFC 1808:  Relative Uniform Resource Locators</emph>, 
+ed. R. Fielding.
+1995.
+</bibl>
+
+<bibl id="RFC2141" xml-link="simple" key="IETF RFC2141">
+IETF (Internet Engineering Task Force).
+<emph>RFC 2141:  URN Syntax</emph>, 
+ed. R. Moats.
+1997.
+</bibl>
+
+<bibl id='ISO8879' key='ISO 8879'>ISO
+(International Organization for Standardization).
+<emph>ISO 8879:1986(E).  Information processing &mdash; Text and Office
+Systems &mdash; Standard Generalized Markup Language (SGML).</emph>  First
+edition &mdash; 1986-10-15.  [Geneva]:  International Organization for
+Standardization, 1986.
+</bibl>
+
+
+<bibl id='ISO10744' key='ISO/IEC 10744'>ISO
+(International Organization for Standardization).
+<emph>ISO/IEC 10744-1992 (E).  Information technology &mdash;
+Hypermedia/Time-based Structuring Language (HyTime).
+</emph>
+[Geneva]:  International Organization for
+Standardization, 1992.
+<emph>Extended Facilities Annexe.</emph>
+[Geneva]:  International Organization for
+Standardization, 1996. 
+</bibl>
+
+
+
+</blist>
+</div2>
+</div1>
+<div1 id='CharClasses'>
+<head>Character Classes</head>
+<p>Following the characteristics defined in the Unicode standard,
+characters are classed as base characters (among others, these
+contain the alphabetic characters of the Latin alphabet, without
+diacritics), ideographic characters, and combining characters (among
+others, this class contains most diacritics); these classes combine
+to form the class of letters.  Digits and extenders are
+also distinguished.
+<scrap lang="ebnf" id="CHARACTERS">
+<head>Characters</head>
+<prodgroup pcw3="3" pcw4="15">
+<prod id="NT-Letter"><lhs>Letter</lhs>
+<rhs><nt def="NT-BaseChar">BaseChar</nt> 
+| <nt def="NT-Ideographic">Ideographic</nt></rhs> </prod>
+<prod id='NT-BaseChar'><lhs>BaseChar</lhs>
+<rhs>[#x0041-#x005A]
+|&nbsp;[#x0061-#x007A]
+|&nbsp;[#x00C0-#x00D6]
+|&nbsp;[#x00D8-#x00F6]
+|&nbsp;[#x00F8-#x00FF]
+|&nbsp;[#x0100-#x0131]
+|&nbsp;[#x0134-#x013E]
+|&nbsp;[#x0141-#x0148]
+|&nbsp;[#x014A-#x017E]
+|&nbsp;[#x0180-#x01C3]
+|&nbsp;[#x01CD-#x01F0]
+|&nbsp;[#x01F4-#x01F5]
+|&nbsp;[#x01FA-#x0217]
+|&nbsp;[#x0250-#x02A8]
+|&nbsp;[#x02BB-#x02C1]
+|&nbsp;#x0386
+|&nbsp;[#x0388-#x038A]
+|&nbsp;#x038C
+|&nbsp;[#x038E-#x03A1]
+|&nbsp;[#x03A3-#x03CE]
+|&nbsp;[#x03D0-#x03D6]
+|&nbsp;#x03DA
+|&nbsp;#x03DC
+|&nbsp;#x03DE
+|&nbsp;#x03E0
+|&nbsp;[#x03E2-#x03F3]
+|&nbsp;[#x0401-#x040C]
+|&nbsp;[#x040E-#x044F]
+|&nbsp;[#x0451-#x045C]
+|&nbsp;[#x045E-#x0481]
+|&nbsp;[#x0490-#x04C4]
+|&nbsp;[#x04C7-#x04C8]
+|&nbsp;[#x04CB-#x04CC]
+|&nbsp;[#x04D0-#x04EB]
+|&nbsp;[#x04EE-#x04F5]
+|&nbsp;[#x04F8-#x04F9]
+|&nbsp;[#x0531-#x0556]
+|&nbsp;#x0559
+|&nbsp;[#x0561-#x0586]
+|&nbsp;[#x05D0-#x05EA]
+|&nbsp;[#x05F0-#x05F2]
+|&nbsp;[#x0621-#x063A]
+|&nbsp;[#x0641-#x064A]
+|&nbsp;[#x0671-#x06B7]
+|&nbsp;[#x06BA-#x06BE]
+|&nbsp;[#x06C0-#x06CE]
+|&nbsp;[#x06D0-#x06D3]
+|&nbsp;#x06D5
+|&nbsp;[#x06E5-#x06E6]
+|&nbsp;[#x0905-#x0939]
+|&nbsp;#x093D
+|&nbsp;[#x0958-#x0961]
+|&nbsp;[#x0985-#x098C]
+|&nbsp;[#x098F-#x0990]
+|&nbsp;[#x0993-#x09A8]
+|&nbsp;[#x09AA-#x09B0]
+|&nbsp;#x09B2
+|&nbsp;[#x09B6-#x09B9]
+|&nbsp;[#x09DC-#x09DD]
+|&nbsp;[#x09DF-#x09E1]
+|&nbsp;[#x09F0-#x09F1]
+|&nbsp;[#x0A05-#x0A0A]
+|&nbsp;[#x0A0F-#x0A10]
+|&nbsp;[#x0A13-#x0A28]
+|&nbsp;[#x0A2A-#x0A30]
+|&nbsp;[#x0A32-#x0A33]
+|&nbsp;[#x0A35-#x0A36]
+|&nbsp;[#x0A38-#x0A39]
+|&nbsp;[#x0A59-#x0A5C]
+|&nbsp;#x0A5E
+|&nbsp;[#x0A72-#x0A74]
+|&nbsp;[#x0A85-#x0A8B]
+|&nbsp;#x0A8D
+|&nbsp;[#x0A8F-#x0A91]
+|&nbsp;[#x0A93-#x0AA8]
+|&nbsp;[#x0AAA-#x0AB0]
+|&nbsp;[#x0AB2-#x0AB3]
+|&nbsp;[#x0AB5-#x0AB9]
+|&nbsp;#x0ABD
+|&nbsp;#x0AE0
+|&nbsp;[#x0B05-#x0B0C]
+|&nbsp;[#x0B0F-#x0B10]
+|&nbsp;[#x0B13-#x0B28]
+|&nbsp;[#x0B2A-#x0B30]
+|&nbsp;[#x0B32-#x0B33]
+|&nbsp;[#x0B36-#x0B39]
+|&nbsp;#x0B3D
+|&nbsp;[#x0B5C-#x0B5D]
+|&nbsp;[#x0B5F-#x0B61]
+|&nbsp;[#x0B85-#x0B8A]
+|&nbsp;[#x0B8E-#x0B90]
+|&nbsp;[#x0B92-#x0B95]
+|&nbsp;[#x0B99-#x0B9A]
+|&nbsp;#x0B9C
+|&nbsp;[#x0B9E-#x0B9F]
+|&nbsp;[#x0BA3-#x0BA4]
+|&nbsp;[#x0BA8-#x0BAA]
+|&nbsp;[#x0BAE-#x0BB5]
+|&nbsp;[#x0BB7-#x0BB9]
+|&nbsp;[#x0C05-#x0C0C]
+|&nbsp;[#x0C0E-#x0C10]
+|&nbsp;[#x0C12-#x0C28]
+|&nbsp;[#x0C2A-#x0C33]
+|&nbsp;[#x0C35-#x0C39]
+|&nbsp;[#x0C60-#x0C61]
+|&nbsp;[#x0C85-#x0C8C]
+|&nbsp;[#x0C8E-#x0C90]
+|&nbsp;[#x0C92-#x0CA8]
+|&nbsp;[#x0CAA-#x0CB3]
+|&nbsp;[#x0CB5-#x0CB9]
+|&nbsp;#x0CDE
+|&nbsp;[#x0CE0-#x0CE1]
+|&nbsp;[#x0D05-#x0D0C]
+|&nbsp;[#x0D0E-#x0D10]
+|&nbsp;[#x0D12-#x0D28]
+|&nbsp;[#x0D2A-#x0D39]
+|&nbsp;[#x0D60-#x0D61]
+|&nbsp;[#x0E01-#x0E2E]
+|&nbsp;#x0E30
+|&nbsp;[#x0E32-#x0E33]
+|&nbsp;[#x0E40-#x0E45]
+|&nbsp;[#x0E81-#x0E82]
+|&nbsp;#x0E84
+|&nbsp;[#x0E87-#x0E88]
+|&nbsp;#x0E8A
+|&nbsp;#x0E8D
+|&nbsp;[#x0E94-#x0E97]
+|&nbsp;[#x0E99-#x0E9F]
+|&nbsp;[#x0EA1-#x0EA3]
+|&nbsp;#x0EA5
+|&nbsp;#x0EA7
+|&nbsp;[#x0EAA-#x0EAB]
+|&nbsp;[#x0EAD-#x0EAE]
+|&nbsp;#x0EB0
+|&nbsp;[#x0EB2-#x0EB3]
+|&nbsp;#x0EBD
+|&nbsp;[#x0EC0-#x0EC4]
+|&nbsp;[#x0F40-#x0F47]
+|&nbsp;[#x0F49-#x0F69]
+|&nbsp;[#x10A0-#x10C5]
+|&nbsp;[#x10D0-#x10F6]
+|&nbsp;#x1100
+|&nbsp;[#x1102-#x1103]
+|&nbsp;[#x1105-#x1107]
+|&nbsp;#x1109
+|&nbsp;[#x110B-#x110C]
+|&nbsp;[#x110E-#x1112]
+|&nbsp;#x113C
+|&nbsp;#x113E
+|&nbsp;#x1140
+|&nbsp;#x114C
+|&nbsp;#x114E
+|&nbsp;#x1150
+|&nbsp;[#x1154-#x1155]
+|&nbsp;#x1159
+|&nbsp;[#x115F-#x1161]
+|&nbsp;#x1163
+|&nbsp;#x1165
+|&nbsp;#x1167
+|&nbsp;#x1169
+|&nbsp;[#x116D-#x116E]
+|&nbsp;[#x1172-#x1173]
+|&nbsp;#x1175
+|&nbsp;#x119E
+|&nbsp;#x11A8
+|&nbsp;#x11AB
+|&nbsp;[#x11AE-#x11AF]
+|&nbsp;[#x11B7-#x11B8]
+|&nbsp;#x11BA
+|&nbsp;[#x11BC-#x11C2]
+|&nbsp;#x11EB
+|&nbsp;#x11F0
+|&nbsp;#x11F9
+|&nbsp;[#x1E00-#x1E9B]
+|&nbsp;[#x1EA0-#x1EF9]
+|&nbsp;[#x1F00-#x1F15]
+|&nbsp;[#x1F18-#x1F1D]
+|&nbsp;[#x1F20-#x1F45]
+|&nbsp;[#x1F48-#x1F4D]
+|&nbsp;[#x1F50-#x1F57]
+|&nbsp;#x1F59
+|&nbsp;#x1F5B
+|&nbsp;#x1F5D
+|&nbsp;[#x1F5F-#x1F7D]
+|&nbsp;[#x1F80-#x1FB4]
+|&nbsp;[#x1FB6-#x1FBC]
+|&nbsp;#x1FBE
+|&nbsp;[#x1FC2-#x1FC4]
+|&nbsp;[#x1FC6-#x1FCC]
+|&nbsp;[#x1FD0-#x1FD3]
+|&nbsp;[#x1FD6-#x1FDB]
+|&nbsp;[#x1FE0-#x1FEC]
+|&nbsp;[#x1FF2-#x1FF4]
+|&nbsp;[#x1FF6-#x1FFC]
+|&nbsp;#x2126
+|&nbsp;[#x212A-#x212B]
+|&nbsp;#x212E
+|&nbsp;[#x2180-#x2182]
+|&nbsp;[#x3041-#x3094]
+|&nbsp;[#x30A1-#x30FA]
+|&nbsp;[#x3105-#x312C]
+|&nbsp;[#xAC00-#xD7A3]
+</rhs></prod>
+<prod id='NT-Ideographic'><lhs>Ideographic</lhs>
+<rhs>[#x4E00-#x9FA5]
+|&nbsp;#x3007
+|&nbsp;[#x3021-#x3029]
+</rhs></prod>
+<prod id='NT-CombiningChar'><lhs>CombiningChar</lhs>
+<rhs>[#x0300-#x0345]
+|&nbsp;[#x0360-#x0361]
+|&nbsp;[#x0483-#x0486]
+|&nbsp;[#x0591-#x05A1]
+|&nbsp;[#x05A3-#x05B9]
+|&nbsp;[#x05BB-#x05BD]
+|&nbsp;#x05BF
+|&nbsp;[#x05C1-#x05C2]
+|&nbsp;#x05C4
+|&nbsp;[#x064B-#x0652]
+|&nbsp;#x0670
+|&nbsp;[#x06D6-#x06DC]
+|&nbsp;[#x06DD-#x06DF]
+|&nbsp;[#x06E0-#x06E4]
+|&nbsp;[#x06E7-#x06E8]
+|&nbsp;[#x06EA-#x06ED]
+|&nbsp;[#x0901-#x0903]
+|&nbsp;#x093C
+|&nbsp;[#x093E-#x094C]
+|&nbsp;#x094D
+|&nbsp;[#x0951-#x0954]
+|&nbsp;[#x0962-#x0963]
+|&nbsp;[#x0981-#x0983]
+|&nbsp;#x09BC
+|&nbsp;#x09BE
+|&nbsp;#x09BF
+|&nbsp;[#x09C0-#x09C4]
+|&nbsp;[#x09C7-#x09C8]
+|&nbsp;[#x09CB-#x09CD]
+|&nbsp;#x09D7
+|&nbsp;[#x09E2-#x09E3]
+|&nbsp;#x0A02
+|&nbsp;#x0A3C
+|&nbsp;#x0A3E
+|&nbsp;#x0A3F
+|&nbsp;[#x0A40-#x0A42]
+|&nbsp;[#x0A47-#x0A48]
+|&nbsp;[#x0A4B-#x0A4D]
+|&nbsp;[#x0A70-#x0A71]
+|&nbsp;[#x0A81-#x0A83]
+|&nbsp;#x0ABC
+|&nbsp;[#x0ABE-#x0AC5]
+|&nbsp;[#x0AC7-#x0AC9]
+|&nbsp;[#x0ACB-#x0ACD]
+|&nbsp;[#x0B01-#x0B03]
+|&nbsp;#x0B3C
+|&nbsp;[#x0B3E-#x0B43]
+|&nbsp;[#x0B47-#x0B48]
+|&nbsp;[#x0B4B-#x0B4D]
+|&nbsp;[#x0B56-#x0B57]
+|&nbsp;[#x0B82-#x0B83]
+|&nbsp;[#x0BBE-#x0BC2]
+|&nbsp;[#x0BC6-#x0BC8]
+|&nbsp;[#x0BCA-#x0BCD]
+|&nbsp;#x0BD7
+|&nbsp;[#x0C01-#x0C03]
+|&nbsp;[#x0C3E-#x0C44]
+|&nbsp;[#x0C46-#x0C48]
+|&nbsp;[#x0C4A-#x0C4D]
+|&nbsp;[#x0C55-#x0C56]
+|&nbsp;[#x0C82-#x0C83]
+|&nbsp;[#x0CBE-#x0CC4]
+|&nbsp;[#x0CC6-#x0CC8]
+|&nbsp;[#x0CCA-#x0CCD]
+|&nbsp;[#x0CD5-#x0CD6]
+|&nbsp;[#x0D02-#x0D03]
+|&nbsp;[#x0D3E-#x0D43]
+|&nbsp;[#x0D46-#x0D48]
+|&nbsp;[#x0D4A-#x0D4D]
+|&nbsp;#x0D57
+|&nbsp;#x0E31
+|&nbsp;[#x0E34-#x0E3A]
+|&nbsp;[#x0E47-#x0E4E]
+|&nbsp;#x0EB1
+|&nbsp;[#x0EB4-#x0EB9]
+|&nbsp;[#x0EBB-#x0EBC]
+|&nbsp;[#x0EC8-#x0ECD]
+|&nbsp;[#x0F18-#x0F19]
+|&nbsp;#x0F35
+|&nbsp;#x0F37
+|&nbsp;#x0F39
+|&nbsp;#x0F3E
+|&nbsp;#x0F3F
+|&nbsp;[#x0F71-#x0F84]
+|&nbsp;[#x0F86-#x0F8B]
+|&nbsp;[#x0F90-#x0F95]
+|&nbsp;#x0F97
+|&nbsp;[#x0F99-#x0FAD]
+|&nbsp;[#x0FB1-#x0FB7]
+|&nbsp;#x0FB9
+|&nbsp;[#x20D0-#x20DC]
+|&nbsp;#x20E1
+|&nbsp;[#x302A-#x302F]
+|&nbsp;#x3099
+|&nbsp;#x309A
+</rhs></prod>
+<prod id='NT-Digit'><lhs>Digit</lhs>
+<rhs>[#x0030-#x0039]
+|&nbsp;[#x0660-#x0669]
+|&nbsp;[#x06F0-#x06F9]
+|&nbsp;[#x0966-#x096F]
+|&nbsp;[#x09E6-#x09EF]
+|&nbsp;[#x0A66-#x0A6F]
+|&nbsp;[#x0AE6-#x0AEF]
+|&nbsp;[#x0B66-#x0B6F]
+|&nbsp;[#x0BE7-#x0BEF]
+|&nbsp;[#x0C66-#x0C6F]
+|&nbsp;[#x0CE6-#x0CEF]
+|&nbsp;[#x0D66-#x0D6F]
+|&nbsp;[#x0E50-#x0E59]
+|&nbsp;[#x0ED0-#x0ED9]
+|&nbsp;[#x0F20-#x0F29]
+</rhs></prod>
+<prod id='NT-Extender'><lhs>Extender</lhs>
+<rhs>#x00B7
+|&nbsp;#x02D0
+|&nbsp;#x02D1
+|&nbsp;#x0387
+|&nbsp;#x0640
+|&nbsp;#x0E46
+|&nbsp;#x0EC6
+|&nbsp;#x3005
+|&nbsp;[#x3031-#x3035]
+|&nbsp;[#x309D-#x309E]
+|&nbsp;[#x30FC-#x30FE]
+</rhs></prod>
+
+</prodgroup>
+</scrap>
+</p>
+<p>The character classes defined here can be derived from the
+Unicode character database as follows:
+<ulist>
+<item>
+<p>Name start characters must have one of the categories Ll, Lu,
+Lo, Lt, Nl.</p>
+</item>
+<item>
+<p>Name characters other than Name-start characters 
+must have one of the categories Mc, Me, Mn, Lm, or Nd.</p>
+</item>
+<item>
+<p>Characters in the compatibility area (i.e. with character code
+greater than #xF900 and less than #xFFFE) are not allowed in XML
+names.</p>
+</item>
+<item>
+<p>Characters which have a font or compatibility decomposition (i.e. those
+with a "compatibility formatting tag" in field 5 of the database --
+marked by field 5 beginning with a "&lt;") are not allowed.</p>
+</item>
+<item>
+<p>The following characters are treated as name-start characters
+rather than name characters, because the property file classifies
+them as Alphabetic:  [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.</p>
+</item>
+<item>
+<p>Characters #x20DD-#x20E0 are excluded (in accordance with 
+Unicode, section 5.14).</p>
+</item>
+<item>
+<p>Character #x00B7 is classified as an extender, because the
+property list so identifies it.</p>
+</item>
+<item>
+<p>Character #x0387 is added as a name character, because #x00B7
+is its canonical equivalent.</p>
+</item>
+<item>
+<p>Characters ':' and '_' are allowed as name-start characters.</p>
+</item>
+<item>
+<p>Characters '-' and '.' are allowed as name characters.</p>
+</item>
+</ulist>
+</p>
+</div1>
+<inform-div1 id="sec-xml-and-sgml">
+<head>XML and SGML</head>
+ 
+<p>XML is designed to be a subset of SGML, in that every
+<termref def="dt-valid">valid</termref> XML document should also be a
+conformant SGML document.
+For a detailed comparison of the additional restrictions that XML places on
+documents beyond those of SGML, see <bibref ref='Clark'/>.
+</p>
+</inform-div1>
+<inform-div1 id="sec-entexpand">
+<head>Expansion of Entity and Character References</head>
+<p>This appendix contains some examples illustrating the
+sequence of entity- and character-reference recognition and
+expansion, as specified in <specref ref='entproc'/>.</p>
+<p>
+If the DTD contains the declaration 
+<eg><![CDATA[<!ENTITY example "<p>An ampersand (&#38;#38;) may be escaped
+numerically (&#38;#38;#38;) or with a general entity
+(&amp;amp;).</p>" >
+]]></eg>
+then the XML processor will recognize the character references 
+when it parses the entity declaration, and resolve them before 
+storing the following string as the
+value of the entity "<code>example</code>":
+<eg><![CDATA[<p>An ampersand (&#38;) may be escaped
+numerically (&#38;#38;) or with a general entity
+(&amp;amp;).</p>
+]]></eg>
+A reference in the document to "<code>&amp;example;</code>" 
+will cause the text to be reparsed, at which time the 
+start- and end-tags of the "<code>p</code>" element will be recognized 
+and the three references will be recognized and expanded, 
+resulting in a "<code>p</code>" element with the following content
+(all data, no delimiters or markup):
+<eg><![CDATA[An ampersand (&) may be escaped
+numerically (&#38;) or with a general entity
+(&amp;).
+]]></eg>
+</p>
+<p>A more complex example will illustrate the rules and their
+effects fully.  In the following example, the line numbers are
+solely for reference.
+<eg><![CDATA[1 <?xml version='1.0'?>
+2 <!DOCTYPE test [
+3 <!ELEMENT test (#PCDATA) >
+4 <!ENTITY % xx '&#37;zz;'>
+5 <!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >
+6 %xx;
+7 ]>
+8 <test>This sample shows a &tricky; method.</test>
+]]></eg>
+This produces the following:
+<ulist spacing="compact">
+<item><p>in line 4, the reference to character 37 is expanded immediately,
+and the parameter entity "<code>xx</code>" is stored in the symbol
+table with the value "<code>%zz;</code>".  Since the replacement text
+is not rescanned, the reference to parameter entity "<code>zz</code>"
+is not recognized.  (And it would be an error if it were, since
+"<code>zz</code>" is not yet declared.)</p></item>
+<item><p>in line 5, the character reference "<code>&amp;#60;</code>" is
+expanded immediately and the parameter entity "<code>zz</code>" is
+stored with the replacement text 
+"<code>&lt;!ENTITY tricky "error-prone" ></code>",
+which is a well-formed entity declaration.</p></item>
+<item><p>in line 6, the reference to "<code>xx</code>" is recognized,
+and the replacement text of "<code>xx</code>" (namely 
+"<code>%zz;</code>") is parsed.  The reference to "<code>zz</code>"
+is recognized in its turn, and its replacement text 
+("<code>&lt;!ENTITY tricky "error-prone" ></code>") is parsed.
+The general entity "<code>tricky</code>" has now been
+declared, with the replacement text "<code>error-prone</code>".</p></item>
+<item><p>
+in line 8, the reference to the general entity "<code>tricky</code>" is
+recognized, and it is expanded, so the full content of the
+"<code>test</code>" element is the self-describing (and ungrammatical) string
+<emph>This sample shows a error-prone method.</emph>
+</p></item>
+</ulist>
+</p>
+</inform-div1> 
+<inform-div1 id="determinism">
+<head>Deterministic Content Models</head>
+<p><termref def='dt-compat'>For compatibility</termref>, it is
+required
+that content models in element type declarations be deterministic.  
+</p>
+<!-- FINAL EDIT:  WebSGML allows ambiguity? -->
+<p>SGML
+requires deterministic content models (it calls them
+"unambiguous"); XML processors built using SGML systems may
+flag non-deterministic content models as errors.</p>
+<p>For example, the content model <code>((b, c) | (b, d))</code> is
+non-deterministic, because given an initial <code>b</code> the parser
+cannot know which <code>b</code> in the model is being matched without
+looking ahead to see which element follows the <code>b</code>.
+In this case, the two references to
+<code>b</code> can be collapsed 
+into a single reference, making the model read
+<code>(b, (c | d))</code>.  An initial <code>b</code> now clearly
+matches only a single name in the content model.  The parser doesn't
+need to look ahead to see what follows; either <code>c</code> or
+<code>d</code> would be accepted.</p>
+<p>More formally:  a finite state automaton may be constructed from the
+content model using the standard algorithms, e.g. algorithm 3.5 
+in section 3.9
+of Aho, Sethi, and Ullman <bibref ref='Aho'/>.
+In many such algorithms, a follow set is constructed for each 
+position in the regular expression (i.e., each leaf 
+node in the 
+syntax tree for the regular expression);
+if any position has a follow set in which 
+more than one following position is 
+labeled with the same element type name, 
+then the content model is in error
+and may be reported as an error.
+</p>
+<p>Algorithms exist which allow many but not all non-deterministic
+content models to be reduced automatically to equivalent deterministic
+models; see Brüggemann-Klein 1991 <bibref ref='ABK'/>.</p>
+</inform-div1>
+<inform-div1 id="sec-guessing">
+<head>Autodetection of Character Encodings</head>
+<p>The XML encoding declaration functions as an internal label on each
+entity, indicating which character encoding is in use.  Before an XML
+processor can read the internal label, however, it apparently has to
+know what character encoding is in use&mdash;which is what the internal label
+is trying to indicate.  In the general case, this is a hopeless
+situation. It is not entirely hopeless in XML, however, because XML
+limits the general case in two ways:  each implementation is assumed
+to support only a  finite set of character encodings, and the XML
+encoding declaration is restricted in position and content in order to
+make it feasible to autodetect the character encoding in use in each
+entity in normal cases.  Also, in many cases other sources of information
+are available in addition to the XML data stream itself.  
+Two cases may be distinguished, 
+depending on whether the XML entity is presented to the
+processor without, or with, any accompanying
+(external) information.  We consider the first case first.
+</p>
+<p>
+Because each XML entity not in UTF-8 or UTF-16 format <emph>must</emph>
+begin with an XML encoding declaration, in which the first  characters
+must be '<code>&lt;?xml</code>', any conforming processor can detect,
+after two to four octets of input, which of the following cases apply. 
+In reading this list, it may help to know that in UCS-4, '&lt;' is
+"<code>#x0000003C</code>" and '?' is "<code>#x0000003F</code>", and the Byte
+Order Mark required of UTF-16 data streams is "<code>#xFEFF</code>".</p>
+<p>
+<ulist>
+<item>
+<p><code>00 00 00 3C</code>: UCS-4, big-endian machine (1234 order)</p>
+</item>
+<item>
+<p><code>3C 00 00 00</code>: UCS-4, little-endian machine (4321 order)</p>
+</item>
+<item>
+<p><code>00 00 3C 00</code>: UCS-4, unusual octet order (2143)</p>
+</item>
+<item>
+<p><code>00 3C 00 00</code>: UCS-4, unusual octet order (3412)</p>
+</item>
+<item>
+<p><code>FE FF</code>: UTF-16, big-endian</p>
+</item>
+<item>
+<p><code>FF FE</code>: UTF-16, little-endian</p>
+</item>
+<item>
+<p><code>00 3C 00 3F</code>: UTF-16, big-endian, no Byte Order Mark
+(and thus, strictly speaking, in error)</p>
+</item>
+<item>
+<p><code>3C 00 3F 00</code>: UTF-16, little-endian, no Byte Order Mark
+(and thus, strictly speaking, in error)</p>
+</item>
+<item>
+<p><code>3C 3F 78 6D</code>: UTF-8, ISO 646, ASCII, some part of ISO 8859, 
+Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding
+which ensures that the characters of ASCII have their normal positions,
+width,
+and values; the actual encoding declaration must be read to 
+detect which of these applies, but since all of these encodings
+use the same bit patterns for the ASCII characters, the encoding 
+declaration itself may be read reliably
+</p>
+</item>
+<item>
+<p><code>4C 6F A7 94</code>: EBCDIC (in some flavor; the full
+encoding declaration must be read to tell which code page is in 
+use)</p>
+</item>
+<item>
+<p>other: UTF-8 without an encoding declaration, or else 
+the data stream is corrupt, fragmentary, or enclosed in
+a wrapper of some kind</p>
+</item>
+</ulist>
+</p>
+<p>
+This level of autodetection is enough to read the XML encoding
+declaration and parse the character-encoding identifier, which is
+still necessary to distinguish the individual members of each family
+of encodings (e.g. to tell  UTF-8 from 8859, and the parts of 8859
+from each other, or to distinguish the specific EBCDIC code page in
+use, and so on).
+</p>
+<p>
+Because the contents of the encoding declaration are restricted to
+ASCII characters, a processor can reliably read the entire encoding
+declaration as soon as it has detected which family of encodings is in
+use.  Since in practice, all widely used character encodings fall into
+one of the categories above, the XML encoding declaration allows
+reasonably reliable in-band labeling of character encodings, even when
+external sources of information at the operating-system or
+transport-protocol level are unreliable.
+</p>
+<p>
+Once the processor has detected the character encoding in use, it can
+act appropriately, whether by invoking a separate input routine for
+each case, or by calling the proper conversion function on each
+character of input. 
+</p>
+<p>
+Like any self-labeling system, the XML encoding declaration will not
+work if any software changes the entity's character set or encoding
+without updating the encoding declaration.  Implementors of
+character-encoding routines should be careful to ensure the accuracy
+of the internal and external information used to label the entity.
+</p>
+<p>The second possible case occurs when the XML entity is accompanied
+by encoding information, as in some file systems and some network
+protocols.
+When multiple sources of information are available,
+
+their relative
+priority and the preferred method of handling conflict should be
+specified as part of the higher-level protocol used to deliver XML.
+Rules for the relative priority of the internal label and the
+MIME-type label in an external header, for example, should be part of the
+RFC document defining the text/xml and application/xml MIME types. In
+the interests of interoperability, however, the following rules
+are recommended.
+<ulist>
+<item><p>If an XML entity is in a file, the Byte-Order Mark
+and encoding-declaration PI are used (if present) to determine the
+character encoding.  All other heuristics and sources of information
+are solely for error recovery.
+</p></item>
+<item><p>If an XML entity is delivered with a
+MIME type of text/xml, then the <code>charset</code> parameter
+on the MIME type determines the
+character encoding method; all other heuristics and sources of
+information are solely for error recovery.
+</p></item>
+<item><p>If an XML entity is delivered 
+with a
+MIME type of application/xml, then the Byte-Order Mark and
+encoding-declaration PI are used (if present) to determine the
+character encoding.  All other heuristics and sources of
+information are solely for error recovery.
+</p></item>
+</ulist>
+These rules apply only in the absence of protocol-level documentation;
+in particular, when the MIME types text/xml and application/xml are
+defined, the recommendations of the relevant RFC will supersede
+these rules.
+</p>
+
+</inform-div1>
+
+<inform-div1 id="sec-xml-wg">
+<head>W3C XML Working Group</head>
+ 
+<p>This specification was prepared and approved for publication by the
+W3C XML Working Group (WG).  WG approval of this specification does
+not necessarily imply that all WG members voted for its approval.  
+The current and former members of the XML WG are:</p>
+ 
+<orglist>
+<member><name>Jon Bosak, Sun</name><role>Chair</role></member>
+<member><name>James Clark</name><role>Technical Lead</role></member>
+<member><name>Tim Bray, Textuality and Netscape</name><role>XML Co-editor</role></member>
+<member><name>Jean Paoli, Microsoft</name><role>XML Co-editor</role></member>
+<member><name>C. M. Sperberg-McQueen, U. of Ill.</name><role>XML
+Co-editor</role></member>
+<member><name>Dan Connolly, W3C</name><role>W3C Liaison</role></member>
+<member><name>Paula Angerstein, Texcel</name></member>
+<member><name>Steve DeRose, INSO</name></member>
+<member><name>Dave Hollander, HP</name></member>
+<member><name>Eliot Kimber, ISOGEN</name></member>
+<member><name>Eve Maler, ArborText</name></member>
+<member><name>Tom Magliery, NCSA</name></member>
+<member><name>Murray Maloney, Muzmo and Grif</name></member>
+<member><name>Makoto Murata, Fuji Xerox Information Systems</name></member>
+<member><name>Joel Nava, Adobe</name></member>
+<member><name>Conleth O'Connell, Vignette</name></member>
+<member><name>Peter Sharpe, SoftQuad</name></member>
+<member><name>John Tigue, DataChannel</name></member>
+</orglist>
+
+</inform-div1>
+</back>
+</spec>
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-default-dtd-file:"~/sgml/spec.ced"
+sgml-omittag:t
+sgml-shorttag:t
+End:
+-->
diff --git a/test/tests/contrib/xsltc/mk/mk054.xsl b/test/tests/contrib/xsltc/mk/mk054.xsl
new file mode 100644
index 0000000..8d20761
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk054.xsl
@@ -0,0 +1,774 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- @(#)xslspec.xsl 1.3 99/01/11 SMI; Style Sheet for the XML and XSL Recommendations and Working Drafts; written by Eduardo Gutentag -->
+<!-- $Id$ Hacked by James Clark -->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY copy   "&#169;">
+<!ENTITY nbsp   "&#160;">
+]>
+<!-- XSL Style sheet, DTD omitted -->
+<xsl:stylesheet
+	version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
+
+<xsl:param name="w3">http://www.w3.org/</xsl:param>
+<!--
+++++++++++++++++++++++++
+
+Inclusions
+
+++++++++++++++++++++++++
+-->
+
+<xsl:template match="spec" mode="css">
+<xsl:text>code { font-family: monospace }</xsl:text>
+</xsl:template>
+
+<!--
+*******************************************************************
+
+Basic framework to format W3C specs (as in the XML spec)
+
+*******************************************************************
+-->
+	<xsl:template match="spec">
+		<html>
+		<head>
+		<title>
+		<xsl:value-of select="header/title"/>
+		</title>
+		<link rel="stylesheet" type="text/css"
+                      href="{$w3}StyleSheets/TR/W3C-{substring-before(header/w3c-designation,'-')}"/>
+		<!-- This stops Netscape 4.5 from messing up. -->
+		<style type="text/css">
+                <xsl:apply-templates select="." mode="css"/>
+                </style>
+		</head>
+		<body>
+			<xsl:apply-templates/>
+		</body>
+		</html>
+	</xsl:template>
+<!-- 
+*******************************************************************
+
+Prologue
+
+*******************************************************************
+-->
+
+        <xsl:template match="header">
+                <div class="head">
+                        <a href="http://www.w3.org/">
+			  <img src="{$w3}Icons/WWW/w3c_home"
+			       alt="W3C" height="48" width="72"/>
+                        </a>
+			<h1>
+                            <xsl:value-of select="title"/>
+			    <br/>
+                            <xsl:value-of select="version"/>
+                        </h1>
+                        <h2>
+				<xsl:value-of select="w3c-doctype"/>
+				<xsl:text> </xsl:text>
+				<xsl:value-of select="pubdate/day"/>
+				<xsl:text> </xsl:text>
+				<xsl:value-of select="pubdate/month"/>
+				<xsl:text> </xsl:text>
+				<xsl:value-of select="pubdate/year"/>
+			</h2>
+                        <dl>
+                        	<xsl:apply-templates select="publoc"/>
+		                <xsl:apply-templates select="latestloc"/>
+                		<xsl:apply-templates select="prevlocs"/>
+                		<xsl:apply-templates select="authlist"/>
+                	</dl>
+                	<xsl:call-template name="copyright"/>
+                	<hr title="Separator for header"/>
+                </div>
+		<xsl:apply-templates select="abstract"/>
+		<xsl:apply-templates select="status"/>
+        </xsl:template>
+
+	<xsl:template match="publoc">
+		<dt>This version:</dt>
+	        <dd><xsl:apply-templates/></dd>
+	</xsl:template>
+	<xsl:template match="publoc/loc|latestloc/loc|prevlocs/loc">
+			<a href="{@href}"><xsl:apply-templates/></a>
+			<br/>
+	</xsl:template>
+	<xsl:template match="latestloc">
+		<dt>Latest version:</dt>
+	        <dd><xsl:apply-templates/></dd>
+	</xsl:template>
+
+	<xsl:template match="prevlocs">
+		<dt>
+                  <xsl:text>Previous version</xsl:text>
+                  <xsl:if test="count(loc)>1">s</xsl:if>
+		  <xsl:text>:</xsl:text>
+                </dt>
+                <dd><xsl:apply-templates/></dd>
+	</xsl:template>
+	<xsl:template match="authlist">
+		<dt>
+                  <xsl:text>Editor</xsl:text>
+                  <xsl:if test="count(author)>1">s</xsl:if>
+		  <xsl:text>:</xsl:text>
+                </dt>
+		<dd> <xsl:apply-templates/></dd>
+	</xsl:template>
+	<xsl:template match="author">
+		<xsl:apply-templates/>
+		<br/>
+	</xsl:template>
+
+	<xsl:template match="author/name">
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="author/affiliation">
+		<xsl:text> (</xsl:text>
+			<xsl:apply-templates/>
+		<xsl:text>) </xsl:text>
+	</xsl:template>
+
+	<xsl:template match="author/email">
+		<a href="{@href}">
+			<xsl:text>&lt;</xsl:text>
+				<xsl:apply-templates/>
+			<xsl:text>&gt;</xsl:text>
+		</a>
+	</xsl:template>
+
+	<xsl:template match="abstract">
+		<h2><a name="abstract">Abstract</a></h2>
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="status">
+		<h2><a name="status">Status of this document</a></h2>
+		<xsl:apply-templates/>
+	</xsl:template>
+		
+<!-- 
+*******************************************************************
+
+Real body work
+
+*******************************************************************
+-->
+
+	<xsl:template match="body">
+		<h2><a name="contents">Table of contents</a></h2>
+		<xsl:call-template name="toc"/>
+		<hr/>
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="back">
+	<hr title="Separator from footer"/>
+	<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="div1/head|inform-div1/head">
+		<h2><xsl:call-template name="head"/></h2>
+	</xsl:template>
+
+	<xsl:template match="div2/head">
+		<h3><xsl:call-template name="head"/></h3>
+	</xsl:template>
+
+	<xsl:template match="div3/head">
+		<h4><xsl:call-template name="head"/></h4>
+	</xsl:template>
+
+	<xsl:template match="div4/head">
+		<h5><xsl:call-template name="head"/></h5>
+	</xsl:template>
+
+        <xsl:template name="head">
+                <xsl:for-each select="..">
+			<xsl:call-template name="insertID"/>
+                	<xsl:apply-templates select="." mode="number"/>
+                </xsl:for-each>
+		<xsl:apply-templates/>
+                <xsl:call-template name="inform"/>
+        </xsl:template>
+
+<!-- 
+*******************************************************************
+
+Blocks
+
+*******************************************************************
+-->
+	<xsl:template match="item/p" priority="1">
+	<p>
+		<xsl:apply-templates/>
+	</p>
+	</xsl:template>
+
+	<xsl:template match="p">
+		<p>
+			<xsl:apply-templates/>
+		</p>
+	</xsl:template>
+
+
+	<xsl:template match="eg">
+		<pre>
+                        <xsl:if test="@role='error'">
+                            <xsl:attribute name="style">color: red</xsl:attribute>
+                        </xsl:if>
+			<xsl:apply-templates/>
+		</pre>
+	</xsl:template>
+
+	<xsl:template match="htable">
+		<table border="{@border}"
+			   cellpadding="{@cellpadding}"
+			   align="{@align}">
+			<xsl:apply-templates/>
+		</table>
+	</xsl:template>
+
+	<xsl:template match="htbody">
+		<tbody>
+			<xsl:apply-templates/>
+		</tbody>
+	</xsl:template>
+
+	<xsl:template match="tr">
+		<tr align="{@align}"
+			valign="{@valign}">
+			<xsl:apply-templates/>
+		</tr>
+	</xsl:template>
+
+	<xsl:template match="td">
+		<td bgcolor="{@bgcolor}"
+			rowspan="{@rowspan}"
+			colspan="{@colspan}"
+			align="{@align}"
+			valign="{@valign}">
+			<xsl:apply-templates/>
+		</td>
+	</xsl:template>
+
+	<xsl:template match="ednote">
+		<blockquote>
+		<p><b>Ed. Note: </b><xsl:apply-templates/></p>
+		</blockquote>
+	</xsl:template>
+
+	<xsl:template match="edtext">
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="issue">
+		<xsl:call-template name="insertID"/>
+		<blockquote>
+			<p>
+			<b>Issue (<xsl:value-of select="substring-after(@id,'-')"/>): </b>
+			<xsl:apply-templates/>
+			</p>
+		</blockquote>
+	</xsl:template>
+
+
+	<xsl:template match="note">
+	<blockquote>
+		<b>NOTE: </b>
+		<xsl:apply-templates/>
+	</blockquote>
+	</xsl:template>
+
+	<xsl:template match="issue/p|note/p">
+	<xsl:apply-templates/>
+	</xsl:template>
+<!-- 
+*******************************************************************
+
+Productions
+
+*******************************************************************
+-->
+	<xsl:template match="scrap">
+                <xsl:if test="string(head)">
+		  <h5><xsl:value-of select="head"/></h5>
+                </xsl:if>
+		<table class="scrap">
+		<tbody>
+		<xsl:apply-templates select="prodgroup|prod"/>
+		</tbody>
+		</table>
+	</xsl:template>
+
+
+	<xsl:template match="prod">
+	    <!-- select elements that start a row -->
+	    <xsl:apply-templates select="
+*[self::lhs
+  or ((self::vc or self::wfc or self::com)
+      and not(preceding-sibling::*[1][self::rhs]))
+  or (self::rhs
+      and not(preceding-sibling::*[1][self::lhs]))]
+"/>
+	</xsl:template>
+
+	<xsl:template match="lhs">
+		<tr valign="baseline">
+		<td><a name="{../@id}"/>
+		<xsl:number from="body" level="any" format="[1]&nbsp;&nbsp;&nbsp;"/>
+		</td>
+		<td><xsl:apply-templates/></td>
+		<td><xsl:text>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</xsl:text></td>
+		<xsl:for-each select="following-sibling::*[1]">
+		  <td><xsl:apply-templates mode="cell" select="."/></td>
+		  <td><xsl:apply-templates mode="cell" select="following-sibling::*[1][self::vc or self::wfc or self::com]"/></td>
+		</xsl:for-each>
+		</tr>
+	</xsl:template>
+
+	<xsl:template match="rhs">
+		<tr valign="baseline">
+                  <td></td>
+                  <td></td>
+		  <td></td>
+		  <td><xsl:apply-templates mode="cell" select="."/></td>
+		  <td><xsl:apply-templates mode="cell" select="following-sibling::*[1][self::vc or self::wfc or self::com]"/></td>
+		</tr>
+	</xsl:template>
+
+	<xsl:template match="vc|wfc|com">
+		<tr valign="baseline">
+                  <td></td>
+                  <td></td>
+		<td></td>
+		<td></td>
+		<td><xsl:apply-templates mode="cell" select="."/></td>
+		</tr>
+	</xsl:template>
+
+
+	<xsl:template match="prodgroup">
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="com" mode="cell">
+		<xsl:text>/*</xsl:text>
+		<xsl:apply-templates/>
+		<xsl:text>*/</xsl:text>
+	</xsl:template>
+
+	<xsl:template match="rhs" mode="cell">
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="vc" mode="cell">
+		<xsl:text>[&nbsp;VC:&nbsp;</xsl:text>
+	<a href="#{@def}">
+		<xsl:value-of select="id(@def)/head"/>
+	</a>
+		<xsl:text>&nbsp;]</xsl:text>
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="wfc" mode="cell">
+		<xsl:text>[&nbsp;WFC:&nbsp;</xsl:text>
+	<a href="#{@def}">
+		<xsl:value-of select="id(@def)/head"/>
+	</a>
+		<xsl:text>&nbsp;]</xsl:text>
+		<xsl:apply-templates/>
+	</xsl:template>
+<!-- 
+*******************************************************************
+
+References
+
+*******************************************************************
+-->
+	<xsl:template match="p/loc" priority="1">
+		<a href="{@href}"><xsl:apply-templates/></a>
+	</xsl:template>
+
+	<xsl:template match="publoc/loc|latestloc/loc|prevlocs/loc">
+		<a href="{@href}"><xsl:apply-templates/></a>
+		<br/>
+	</xsl:template>
+
+	<xsl:template match="loc">
+		<a href="{@href}"><xsl:apply-templates/></a>
+	</xsl:template>
+
+
+	<xsl:template match="bibref">
+		<a href="#{@ref}">
+		<xsl:text>[</xsl:text>
+		<xsl:value-of select="id(@ref)/@key"/>
+		<xsl:apply-templates/>
+		<xsl:text>]</xsl:text>
+		</a>
+	</xsl:template>
+
+	<xsl:template match="specref">
+		<a href="#{@ref}">
+		<xsl:text>[</xsl:text>
+		<b>
+                <xsl:for-each select="id(@ref)/head">
+                        <xsl:apply-templates select=".." mode="number"/>
+                        <xsl:apply-templates/>
+		</xsl:for-each>
+		</b>
+		<xsl:apply-templates/>
+		<xsl:text>]</xsl:text>
+		</a>
+	</xsl:template>
+	<xsl:template match="xspecref|xtermref">
+		<a href="{@href}">
+		<xsl:apply-templates/>
+		</a>
+	</xsl:template>
+	<xsl:template match="termref">
+		<a href="#{@def}">
+		<xsl:apply-templates/>
+		</a>
+	</xsl:template>
+
+	<xsl:template match="titleref">
+		<a href="#{@href}">
+		<xsl:apply-templates/>
+		</a>
+	</xsl:template>
+
+	<xsl:template match="termdef">
+		<a name="{@id}">
+		</a>
+			<xsl:apply-templates/>
+	</xsl:template>
+
+
+	<xsl:template match="vcnote">
+		<a name="{@id}"></a>
+		<p><b>Validity Constraint: <xsl:value-of select="head"/></b></p>
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="wfcnote">
+		<a name="{@id}"></a>
+		<p><b>Well Formedness Constraint: <xsl:value-of select="head"/></b></p>
+		<xsl:apply-templates/>
+	</xsl:template>
+
+<!-- 
+*******************************************************************
+
+Inlines
+
+*******************************************************************
+-->
+	<xsl:template match="termdef">
+		<a name="{@id}">
+		</a>
+		<xsl:apply-templates/>
+	</xsl:template>
+	
+	<xsl:template match="term">
+		<b><xsl:apply-templates/></b>
+	</xsl:template>
+
+	<xsl:template match="orglist/member[1]" priority="2">
+		<xsl:apply-templates select="*"/>
+	</xsl:template>
+
+	<xsl:template match="orglist/member">
+	        <xsl:text>; </xsl:text>
+		<xsl:apply-templates select="*"/>
+	</xsl:template>
+	
+	<xsl:template match="orglist/member/affiliation">
+                 <xsl:text>, </xsl:text>
+                 <xsl:apply-templates/>
+        </xsl:template>
+	<xsl:template match="orglist/member/role">
+			<xsl:text> (</xsl:text>
+			<xsl:apply-templates/>
+			<xsl:text>)</xsl:text>
+	</xsl:template>
+
+	<xsl:template match="code">
+		<code>
+			<xsl:apply-templates/>
+		</code>
+	</xsl:template>
+
+	<xsl:template match="emph">
+		<i>
+			<xsl:apply-templates/>
+		</i>
+	</xsl:template>
+<!-- 
+*******************************************************************
+
+Lists
+
+*******************************************************************
+-->
+	<xsl:template match="blist">
+	<dl>
+		<xsl:apply-templates/>
+	</dl>
+	</xsl:template>
+
+	<xsl:template match="slist">
+	<ul>
+		<xsl:apply-templates/>
+	</ul>
+	</xsl:template>
+	<xsl:template match="sitem">
+	<li>
+		<xsl:apply-templates/>
+	</li>
+	</xsl:template>
+
+	<xsl:template match="blist/bibl">
+		<dt>
+			<a name="{@id}">
+			<xsl:value-of select="@key"/>
+			</a>
+		</dt>
+		<dd>
+			<xsl:apply-templates/>
+		</dd>
+	</xsl:template>
+
+	<xsl:template match="olist">
+	<ol>
+		<xsl:apply-templates/>
+	</ol>
+	</xsl:template>
+
+	<xsl:template match="ulist">
+	<!--
+	<ul type="circle">
+	-->
+	<ul>
+		<xsl:apply-templates/>
+	</ul>
+	</xsl:template>
+
+	<xsl:template match="glist">
+		<dl>
+			<xsl:apply-templates/>
+		</dl>
+	</xsl:template>
+
+	<xsl:template match="item">
+	<li>
+		<xsl:apply-templates/>
+	</li>
+	</xsl:template>
+
+	<xsl:template match="label">
+	<dt>
+		<b><xsl:apply-templates/></b>
+	</dt>
+	</xsl:template>
+
+	<xsl:template match="def">
+	<dd>
+		<xsl:apply-templates/>
+	</dd>
+	</xsl:template>
+
+	<xsl:template match="orglist">
+		<xsl:apply-templates select="*"/>
+	</xsl:template>
+
+
+	<xsl:template match="olist">
+	<ol>
+		<xsl:apply-templates/>
+	</ol>
+	</xsl:template>
+
+
+<!-- 
+*******************************************************************
+
+Empty templates
+
+*******************************************************************
+-->
+	<xsl:template match="w3c-designation">
+	</xsl:template>
+
+	<xsl:template match="w3c-doctype">
+	</xsl:template>
+
+	<xsl:template match="header/pubdate">
+	</xsl:template>
+
+
+	<xsl:template match="spec/header/title">
+	</xsl:template>
+
+	<xsl:template match="revisiondesc">
+	</xsl:template>
+	
+	<xsl:template match="pubstmt">
+	</xsl:template>
+
+	<xsl:template match="sourcedesc">
+	</xsl:template>
+
+	<xsl:template match="langusage">
+	</xsl:template>
+
+	<xsl:template match="version">
+	</xsl:template>
+<!-- 
+*******************************************************************
+
+Macros
+
+
+*******************************************************************
+-->
+
+	<xsl:template name="copyright">
+	<p class="copyright">
+		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright">
+		Copyright</a> &nbsp;&copy;&nbsp; 1999 <a href="http://www.w3.org">W3C</a>
+		(<a href="http://www.lcs.mit.edu">MIT</a>,
+		<a href="http://www.inria.fr/">INRIA</a>,
+		<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C
+		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Legal_Disclaimer">liability</a>,
+		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#W3C_Trademarks">trademark</a>,
+		<a href="http://www.w3.org/Consortium/Legal/copyright-documents.html">document use</a> and
+		<a href="http://www.w3.org/Consortium/Legal/copyright-software.html">software licensing</a> rules apply.
+	</p>
+	</xsl:template>
+
+	<xsl:template name="toc">
+		<xsl:for-each select="/spec/body/div1">
+				<xsl:call-template name="makeref"/>
+				<br/>
+
+				<xsl:for-each select="div2">
+					<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+					<xsl:call-template name="makeref"/>
+					<br/>
+						<xsl:for-each select="div3">
+							<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+								<xsl:call-template name="makeref"/>
+							<br/>
+						</xsl:for-each>
+				</xsl:for-each>
+		</xsl:for-each>
+
+		<h3>Appendices</h3>
+
+		<xsl:for-each select="/spec/back/div1 | /spec/back/inform-div1">
+				<xsl:call-template name="makeref"/>
+				<br/>
+
+				<xsl:for-each select="div2">
+						<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+						<xsl:call-template name="makeref"/>
+						<br/>
+
+						<xsl:for-each select="div3">
+								<xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+								<xsl:call-template name="makeref"/>
+								<br/>
+						</xsl:for-each>
+				</xsl:for-each>
+		</xsl:for-each>
+	</xsl:template>
+
+	<xsl:template name="insertID">
+		<xsl:choose>
+			<xsl:when test="@id">
+				<a name="{@id}"/>
+			</xsl:when>
+			<xsl:otherwise>
+				<a name="section-{translate(head,' ','-')}"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+
+	<xsl:template name="makeref">
+                <xsl:apply-templates select="." mode="number"/>
+		<xsl:choose>
+			<xsl:when test="@id">
+				<a href="#{@id}">
+					<xsl:value-of select="head"/>
+				</a>
+			</xsl:when>
+			<xsl:otherwise>
+				<a href="#section-{translate(head,' ','-')}">
+					<xsl:value-of select="head"/>
+				</a>
+			</xsl:otherwise>
+		</xsl:choose>
+                <xsl:for-each select="head">
+                  <xsl:call-template name="inform"/>
+                </xsl:for-each>
+	</xsl:template>
+
+        <xsl:template name="inform">
+           <xsl:if test="parent::inform-div1">
+              <xsl:text> (Non-Normative)</xsl:text>
+           </xsl:if>
+        </xsl:template>
+
+	<xsl:template match="nt">
+		<a href="#{@def}"><xsl:apply-templates/></a>
+        </xsl:template>
+
+	<xsl:template match="xnt">
+		<a href="{@href}"><xsl:apply-templates/></a>
+        </xsl:template>
+
+	<xsl:template match="quote">
+		<xsl:text>"</xsl:text>
+		<xsl:apply-templates/>
+		<xsl:text>"</xsl:text>
+	</xsl:template>
+	
+	<xsl:template mode="number" match="back//*">
+           <xsl:number level="multiple"
+                       count="inform-div1|div1|div2|div3|div4"
+                       format="A.1 "/>
+        </xsl:template>
+	<xsl:template mode="number" match="*">
+           <xsl:number level="multiple"
+                       count="inform-div1|div1|div2|div3|div4"
+                       format="1.1 "/>
+        </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk055.xml b/test/tests/contrib/xsltc/mk/mk055.xml
new file mode 100644
index 0000000..6adccb1
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk055.xml
@@ -0,0 +1,2481 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $Id$ -->
+<!DOCTYPE spec SYSTEM "spec.dtd" [
+<!ENTITY XML "http://www.w3.org/TR/REC-xml">
+<!ENTITY XMLNames "http://www.w3.org/TR/REC-xml-names">
+<!ENTITY year "1999">
+<!ENTITY month "November">
+<!ENTITY MM "11">
+<!ENTITY day "16">
+<!ENTITY DD "16">
+<!ENTITY YYYYMMDD "&year;&MM;&DD;">
+<!ENTITY LEV "REC">
+<!-- DTD customizations -->
+<!ELEMENT proto (arg*)>
+<!ATTLIST proto
+  name NMTOKEN #REQUIRED
+  return-type (number|string|boolean|node-set|object) #REQUIRED
+>
+<!ELEMENT arg EMPTY>
+<!ATTLIST arg
+  type (number|string|boolean|node-set|object) #REQUIRED
+  occur (opt|rep) #IMPLIED
+>
+<!ELEMENT function (#PCDATA)>
+<!ENTITY % local.illus.class "|proto">
+<!ENTITY % local.tech.class "|function">
+]>
+<spec>
+<header>
+<title>XML Path Language (XPath)</title>
+<version>Version 1.0</version>
+<w3c-designation>&LEV;-xpath-&YYYYMMDD;</w3c-designation>
+<w3c-doctype>W3C Recommendation</w3c-doctype>
+<pubdate><day>&day;</day><month>&month;</month><year>&year;</year></pubdate>
+<publoc>
+<loc href="http://www.w3.org/TR/&year;/&LEV;-xpath-&YYYYMMDD;"
+          >http://www.w3.org/TR/&year;/&LEV;-xpath-&YYYYMMDD;</loc>
+<loc role="available-format"
+href="http://www.w3.org/TR/&year;/&LEV;-xpath-&YYYYMMDD;.xml">XML</loc>
+<loc role="available-format"
+href="http://www.w3.org/TR/&year;/&LEV;-xpath-&YYYYMMDD;.html">HTML</loc>
+<!--
+<loc href="http://www.w3.org/TR/&year;/&LEV;-xpath-&YYYYMMDD;.pdf"
+          >http://www.w3.org/TR/&year;/&LEV;-xpath-&YYYYMMDD;.pdf</loc>
+-->
+</publoc>
+<latestloc>
+<loc href="http://www.w3.org/TR/xpath"
+          >http://www.w3.org/TR/xpath</loc>
+</latestloc>
+<prevlocs>
+<loc href="http://www.w3.org/TR/1999/PR-xpath-19991008"
+          >http://www.w3.org/TR/1999/PR-xpath-19991008</loc>
+<loc href="http://www.w3.org/1999/08/WD-xpath-19990813"
+          >http://www.w3.org/1999/08/WD-xpath-19990813</loc>
+<loc href="http://www.w3.org/1999/07/WD-xpath-19990709"
+          >http://www.w3.org/1999/07/WD-xpath-19990709</loc>
+<loc href="http://www.w3.org/TR/1999/WD-xslt-19990421"
+          >http://www.w3.org/TR/1999/WD-xslt-19990421</loc>
+</prevlocs>
+<authlist>
+<author>
+<name>James Clark</name>
+<email href="mailto:jjc@jclark.com">jjc@jclark.com</email>
+</author>
+<author>
+<name>Steve DeRose</name>
+<affiliation>Inso Corp. and Brown University</affiliation>
+<email href="mailto:Steven_DeRose@Brown.edu">Steven_DeRose@Brown.edu</email>
+</author>
+</authlist>
+
+<status>
+
+<p>This document has been reviewed by W3C Members and other interested
+parties and has been endorsed by the Director as a W3C <loc
+href="http://www.w3.org/Consortium/Process/#RecsW3C">Recommendation</loc>. It
+is a stable document and may be used as reference material or cited as
+a normative reference from other documents. W3C's role in making the
+Recommendation is to draw attention to the specification and to
+promote its widespread deployment. This enhances the functionality and
+interoperability of the Web.</p>
+
+<p>The list of known errors in this specification is available at
+<loc href="http://www.w3.org/&year;/&MM;/&LEV;-xpath-&YYYYMMDD;-errata"
+>http://www.w3.org/&year;/&MM;/&LEV;-xpath-&YYYYMMDD;-errata</loc>.</p>
+
+<p>Comments on this specification may be sent to <loc
+href="mailto:www-xpath-comments@w3.org"
+>www-xpath-comments@w3.org</loc>; <loc
+href="http://lists.w3.org/Archives/Public/www-xpath-comments">archives</loc>
+of the comments are available.</p>
+
+<p>The English version of this specification is the only normative
+version. However, for translations of this document, see <loc
+href="http://www.w3.org/Style/XSL/translations.html"
+>http://www.w3.org/Style/XSL/translations.html</loc>.</p>
+
+<p>A list of current W3C Recommendations and other technical documents
+can be found at <loc
+href="http://www.w3.org/TR">http://www.w3.org/TR</loc>.</p>
+
+<p>This specification is joint work of the XSL Working Group and the
+XML Linking Working Group and so is part of the <loc
+href="http://www.w3.org/Style/Activity">W3C Style activity</loc> and
+of the <loc href="http://www.w3.org/XML/Activity">W3C XML
+activity</loc>.</p>
+
+</status>
+
+<abstract><p>XPath is a language for addressing parts of an XML
+document, designed to be used by both XSLT and
+XPointer.</p></abstract>
+
+<langusage>
+<language id="EN">English</language>
+<language id="ebnf">EBNF</language>
+</langusage>
+<revisiondesc>
+<slist>
+<sitem>See RCS log for revision history.</sitem>
+</slist>
+</revisiondesc>
+</header>
+<body>
+
+<div1>
+<head>Introduction</head>
+
+<p>XPath is the result of an effort to provide a common syntax and
+semantics for functionality shared between XSL Transformations <bibref
+ref="XSLT"/> and XPointer <bibref ref="XPTR"/>.  The primary purpose
+of XPath is to address parts of an XML <bibref ref="XML"/> document.
+In support of this primary purpose, it also provides basic facilities
+for manipulation of strings, numbers and booleans.  XPath uses a
+compact, non-XML syntax to facilitate use of XPath within URIs and XML
+attribute values.  XPath operates on the abstract, logical structure
+of an XML document, rather than its surface syntax.  XPath gets its
+name from its use of a path notation as in URLs for navigating through
+the hierarchical structure of an XML document.</p>
+
+<p>In addition to its use for addressing, XPath is also designed so
+that it has a natural subset that can be used for matching (testing
+whether or not a node matches a pattern); this use of XPath is
+described in <xspecref href="http://www.w3.org/TR/WD-xslt#patterns"
+>XSLT</xspecref>.</p>
+
+<p>XPath models an XML document as a tree of nodes.  There are
+different types of nodes, including element nodes, attribute nodes and
+text nodes.  XPath defines a way to compute a <termref
+def="dt-string-value">string-value</termref> for each type of node.
+Some types of nodes also have names.  XPath fully supports XML
+Namespaces <bibref ref="XMLNAMES"/>.  Thus, the name of a node is
+modeled as a pair consisting of a local part and a possibly null
+namespace URI; this is called an <termref
+def="dt-expanded-name">expanded-name</termref>.  The data model is
+described in detail in <specref ref="data-model"/>.</p>
+
+<p>The primary syntactic construct in XPath is the expression.  An
+expression matches the production <nt def="NT-Expr">Expr</nt>.  An
+expression is evaluated to yield an object, which has one of the
+following four basic types:</p>
+
+<slist>
+
+<sitem>node-set (an unordered collection of nodes without duplicates)</sitem>
+
+<sitem>boolean (true or false)</sitem>
+
+<sitem>number (a floating-point number)</sitem>
+
+<sitem>string (a sequence of UCS characters)</sitem>
+
+</slist>
+
+<p>Expression evaluation occurs with respect to a context.  XSLT and
+XPointer specify how the context is determined for XPath expressions
+used in XSLT and XPointer respectively.  The context consists of:</p>
+
+<slist>
+
+<sitem>a node (<termdef id="dt-context-node" term="Context Node">the
+<term>context node</term></termdef>)</sitem>
+
+<sitem>a pair of non-zero positive integers (<termdef
+id="dt-context-position" term="Context Position">the <term>context
+position</term></termdef> and <termdef id="dt-context-size"
+term="Context Size">the <term>context size</term></termdef>)</sitem>
+
+<sitem>a set of variable bindings</sitem>
+
+<sitem>a function library</sitem>
+
+<sitem>the set of namespace declarations in scope for the
+expression</sitem>
+
+</slist>
+
+<p>The context position is always less than or equal to the
+context size.</p>
+
+<p>The variable bindings consist of a mapping from variable names to
+variable values.  The value of a variable is an object, which can be of
+any of the types that are possible for the value of an expression,
+and may also be of additional types not specified here.</p>
+
+<p>The function library consists of a mapping from function names to
+functions.  Each function takes zero or more arguments and returns a
+single result.  This document defines a core function library that all
+XPath implementations must support (see <specref ref="corelib"/>).
+For a function in the core function library, arguments and result are
+of the four basic types.  Both XSLT and XPointer extend XPath by
+defining additional functions; some of these functions operate on the
+four basic types; others operate on additional data types defined by
+XSLT and XPointer.</p>
+
+<p>The namespace declarations consist of a mapping from prefixes to
+namespace URIs.</p>
+
+<p>The variable bindings, function library and namespace declarations
+used to evaluate a subexpression are always the same as those used to
+evaluate the containing expression.  The context node, context
+position, and context size used to evaluate a subexpression are
+sometimes different from those used to evaluate the containing
+expression. Several kinds of expressions change the context node; only
+predicates change the context position and context size (see <specref
+ref="predicates"/>).  When the evaluation of a kind of expression is
+described, it will always be explicitly stated if the context node,
+context position, and context size change for the evaluation of
+subexpressions; if nothing is said about the context node, context
+position, and context size, they remain unchanged for the
+evaluation of subexpressions of that kind of expression.</p>
+
+<p>XPath expressions often occur in XML attributes.  The grammar
+specified in this section applies to the attribute value after XML 1.0
+normalization.  So, for example, if the grammar uses the character
+<code>&lt;</code>, this must not appear in the XML source as
+<code>&lt;</code> but must be quoted according to XML 1.0 rules by,
+for example, entering it as <code>&amp;lt;</code>. Within expressions,
+literal strings are delimited by single or double quotation marks,
+which are also used to delimit XML attributes. To avoid a quotation
+mark in an expression being interpreted by the XML processor as
+terminating the attribute value the quotation mark can be entered as a
+character reference (<code>&amp;quot;</code> or
+<code>&amp;apos;</code>).  Alternatively, the expression can use single
+quotation marks if the XML attribute is delimited with double
+quotation marks or vice-versa.</p>
+
+<p>One important kind of expression is a location path.  A location
+path selects a set of nodes relative to the context node.  The result
+of evaluating an expression that is a location path is the node-set
+containing the nodes selected by the location path.  Location paths
+can recursively contain expressions that are used to filter sets of
+nodes.  A location path matches the production <nt
+def="NT-LocationPath">LocationPath</nt>.</p>
+
+<p>In the following grammar, the non-terminals <xnt
+href="&XMLNames;#NT-QName">QName</xnt> and <xnt
+href="&XMLNames;#NT-NCName">NCName</xnt> are defined in <bibref
+ref="XMLNAMES"/>, and <xnt href="&XML;#NT-S">S</xnt> is defined in
+<bibref ref="XML"/>.  The grammar uses the same EBNF notation as
+<bibref ref="XML"/> (except that grammar symbols always have initial
+capital letters).</p>
+
+<p>Expressions are parsed by first dividing the character string to be
+parsed into tokens and then parsing the resulting sequence of tokens.
+Whitespace can be freely used between tokens.  The tokenization
+process is described in <specref ref="exprlex"/>.</p>
+
+</div1>
+
+<div1 id="location-paths">
+<head>Location Paths</head>
+
+<p>Although location paths are not the most general grammatical
+construct in the language (a <nt
+def="NT-LocationPath">LocationPath</nt> is a special case of an <nt
+def="NT-Expr">Expr</nt>), they are the most important construct and
+will therefore be described first.</p>
+
+<p>Every location path can be expressed using a straightforward but
+rather verbose syntax.  There are also a number of syntactic
+abbreviations that allow common cases to be expressed concisely.  This
+section will explain the semantics of location paths using the
+unabbreviated syntax.  The abbreviated syntax will then be explained
+by showing how it expands into the unabbreviated syntax (see <specref
+ref="path-abbrev"/>).</p>
+
+<p>Here are some examples of location paths using the unabbreviated
+syntax:</p>
+
+<ulist>
+
+<item><p><code>child::para</code> selects the
+<code>para</code> element children of the context node</p></item>
+
+<item><p><code>child::*</code> selects all element
+children of the context node</p></item>
+
+<item><p><code>child::text()</code> selects all text
+node children of the context node</p></item>
+
+<item><p><code>child::node()</code> selects all the
+children of the context node, whatever their node type</p></item>
+
+<item><p><code>attribute::name</code> selects the
+<code>name</code> attribute of the context node</p></item>
+
+<item><p><code>attribute::*</code> selects all the
+attributes of the context node</p></item>
+
+<item><p><code>descendant::para</code> selects the
+<code>para</code> element descendants of the context node</p></item>
+
+<item><p><code>ancestor::div</code> selects all <code>div</code>
+ancestors of the context node</p></item>
+
+<item><p><code>ancestor-or-self::div</code> selects the
+<code>div</code> ancestors of the context node and, if the context node is a
+<code>div</code> element, the context node as well</p></item>
+
+<item><p><code>descendant-or-self::para</code> selects the
+<code>para</code> element descendants of the context node and, if the context node is
+a <code>para</code> element, the context node as well</p></item>
+
+<item><p><code>self::para</code> selects the context node if it is a
+<code>para</code> element, and otherwise selects nothing</p></item>
+
+<item><p><code>child::chapter/descendant::para</code>
+selects the <code>para</code> element descendants of the
+<code>chapter</code> element children of the context node</p></item>
+
+<item><p><code>child::*/child::para</code> selects
+all <code>para</code> grandchildren of the context node</p></item>
+
+<item><p><code>/</code> selects the document root (which is
+always the parent of the document element)</p></item>
+
+<item><p><code>/descendant::para</code> selects all the
+<code>para</code> elements in the same document as the context node</p></item>
+
+<item><p><code>/descendant::olist/child::item</code> selects all the
+<code>item</code> elements that have an <code>olist</code> parent and
+that are in the same document as the context node</p></item>
+
+<item><p><code>child::para[position()=1]</code> selects the first
+<code>para</code> child of the context node</p></item>
+
+<item><p><code>child::para[position()=last()]</code> selects the last
+<code>para</code> child of the context node</p></item>
+
+<item><p><code>child::para[position()=last()-1]</code> selects
+the last but one <code>para</code> child of the context node</p></item>
+
+<item><p><code>child::para[position()>1]</code> selects all
+the <code>para</code> children of the context node other than the
+first <code>para</code> child of the context node</p></item>
+
+<item><p><code>following-sibling::chapter[position()=1]</code>
+selects the next <code>chapter</code> sibling of the context node</p></item>
+
+<item><p><code>preceding-sibling::chapter[position()=1]</code>
+selects the previous <code>chapter</code> sibling of the context
+node</p></item>
+
+<item><p><code>/descendant::figure[position()=42]</code> selects
+the forty-second <code>figure</code> element in the
+document</p></item>
+
+<item><p><code>/child::doc/child::chapter[position()=5]/child::section[position()=2]</code>
+selects the second <code>section</code> of the fifth
+<code>chapter</code> of the <code>doc</code> document
+element</p></item>
+
+<item><p><code>child::para[attribute::type="warning"]</code>
+selects all <code>para</code> children of the context node that have a
+<code>type</code> attribute with value <code>warning</code></p></item>
+
+<item><p><code>child::para[attribute::type='warning'][position()=5]</code>
+selects the fifth <code>para</code> child of the context node that has
+a <code>type</code> attribute with value
+<code>warning</code></p></item>
+
+<item><p><code>child::para[position()=5][attribute::type="warning"]</code>
+selects the fifth <code>para</code> child of the context node if that
+child has a <code>type</code> attribute with value
+<code>warning</code></p></item>
+
+<item><p><code>child::chapter[child::title='Introduction']</code>
+selects the <code>chapter</code> children of the context node that
+have one or more <code>title</code> children with <termref
+def="dt-string-value">string-value</termref> equal to
+<code>Introduction</code></p></item>
+
+<item><p><code>child::chapter[child::title]</code> selects the
+<code>chapter</code> children of the context node that have one or
+more <code>title</code> children</p></item>
+
+<item><p><code>child::*[self::chapter or self::appendix]</code>
+selects the <code>chapter</code> and <code>appendix</code> children of
+the context node</p></item>
+
+<item><p><code>child::*[self::chapter or
+self::appendix][position()=last()]</code> selects the last
+<code>chapter</code> or <code>appendix</code> child of the context
+node</p></item>
+
+</ulist>
+
+<p>There are two kinds of location path: relative location paths
+and absolute location paths.</p>
+
+<p>A relative location path consists of a sequence of one or more
+location steps separated by <code>/</code>.  The steps in a relative
+location path are composed together from left to right.  Each step in
+turn selects a set of nodes relative to a context node. An initial
+sequence of steps is composed together with a following step as
+follows.  The initial sequence of steps selects a set of nodes
+relative to a context node.  Each node in that set is used as a
+context node for the following step.  The sets of nodes identified by
+that step are unioned together.  The set of nodes identified by
+the composition of the steps is this union. For example,
+<code>child::div/child::para</code> selects the
+<code>para</code> element children of the <code>div</code> element
+children of the context node, or, in other words, the
+<code>para</code> element grandchildren that have <code>div</code>
+parents.</p>
+
+<p>An absolute location path consists of <code>/</code> optionally
+followed by a relative location path.  A <code>/</code> by itself
+selects the root node of the document containing the context node.  If
+it is followed by a relative location path, then the location path
+selects the set of nodes that would be selected by the relative
+location path relative to the root node of the document containing the
+context node.</p>
+
+<scrap>
+<head>Location Paths</head>
+<prodgroup pcw5="1" pcw2="10" pcw4="18">
+<prod id="NT-LocationPath">
+<lhs>LocationPath</lhs>
+<rhs><nt def="NT-RelativeLocationPath">RelativeLocationPath</nt></rhs>
+<rhs>| <nt def="NT-AbsoluteLocationPath">AbsoluteLocationPath</nt></rhs>
+</prod>
+<prod id="NT-AbsoluteLocationPath">
+<lhs>AbsoluteLocationPath</lhs>
+<rhs>'/' <nt def="NT-RelativeLocationPath">RelativeLocationPath</nt>?</rhs>
+<rhs>| <nt def="NT-AbbreviatedAbsoluteLocationPath">AbbreviatedAbsoluteLocationPath</nt></rhs>
+</prod>
+<prod id="NT-RelativeLocationPath">
+<lhs>RelativeLocationPath</lhs>
+<rhs><nt def="NT-Step">Step</nt></rhs>
+<rhs>| <nt def="NT-RelativeLocationPath">RelativeLocationPath</nt> '/' <nt def="NT-Step">Step</nt></rhs>
+<rhs>| <nt def="NT-AbbreviatedRelativeLocationPath">AbbreviatedRelativeLocationPath</nt></rhs>
+</prod>
+</prodgroup>
+</scrap>
+
+<div2>
+<head>Location Steps</head>
+
+<p>A location step has three parts:</p>
+
+<ulist>
+
+<item><p>an axis, which specifies the tree relationship between the
+nodes selected by the location step and the context node,</p></item>
+
+<item><p>a node test, which specifies the node type and <termref
+def="dt-expanded-name">expanded-name</termref> of the nodes selected
+by the location step, and</p></item>
+
+<item><p>zero or more predicates, which use arbitrary expressions to
+further refine the set of nodes selected by the location
+step.</p></item>
+
+</ulist>
+
+<p>The syntax for a location step is the axis name and node test
+separated by a double colon, followed by zero or more expressions each
+in square brackets. For example, in
+<code>child::para[position()=1]</code>, <code>child</code> is the name
+of the axis, <code>para</code> is the node test and
+<code>[position()=1]</code> is a predicate.</p>
+
+<p>The node-set selected by the location step is the node-set that
+results from generating an initial node-set from the axis and
+node-test, and then filtering that node-set by each of the predicates
+in turn.</p>
+
+<p>The initial node-set consists of the nodes having the relationship
+to the context node specified by the axis, and having the node type
+and <termref def="dt-expanded-name">expanded-name</termref> specified
+by the node test.  For example, a location step
+<code>descendant::para</code> selects the <code>para</code> element
+descendants of the context node: <code>descendant</code> specifies
+that each node in the initial node-set must be a descendant of the
+context; <code>para</code> specifies that each node in the initial
+node-set must be an element named <code>para</code>.  The available
+axes are described in <specref ref="axes"/>.  The available node tests
+are described in <specref ref="node-tests"/>.  The meaning of some
+node tests is dependent on the axis.</p>
+
+<p>The initial node-set is filtered by the first predicate to generate
+a new node-set; this new node-set is then filtered using the second
+predicate, and so on. The final node-set is the node-set selected by
+the location step. The axis affects how the expression in each
+predicate is evaluated and so the semantics of a predicate is defined
+with respect to an axis.  See <specref ref="predicates"/>.</p>
+
+<scrap>
+<head>Location Steps</head>
+<prodgroup pcw5="1" pcw2="10" pcw4="18">
+<prod id="NT-Step">
+<lhs>Step</lhs>
+<rhs><nt def="NT-AxisSpecifier">AxisSpecifier</nt>
+<nt def="NT-NodeTest">NodeTest</nt>
+<nt def="NT-Predicate">Predicate</nt>*</rhs>
+<rhs>| <nt def="NT-AbbreviatedStep">AbbreviatedStep</nt></rhs>
+</prod>
+<prod id="NT-AxisSpecifier">
+<lhs>AxisSpecifier</lhs>
+<rhs><nt def="NT-AxisName">AxisName</nt> '::'</rhs>
+<rhs>| <nt def="NT-AbbreviatedAxisSpecifier">AbbreviatedAxisSpecifier</nt>
+</rhs>
+</prod>
+</prodgroup>
+</scrap>
+
+</div2>
+
+<div2 id="axes">
+<head>Axes</head>
+
+<p>The following axes are available:</p>
+
+<ulist>
+
+<item><p>the <code>child</code> axis contains the children of the
+context node</p></item>
+
+<item><p>the <code>descendant</code> axis contains the descendants of
+the context node; a descendant is a child or a child of a child and so
+on; thus the descendant axis never contains attribute or namespace
+nodes</p></item>
+
+<item><p>the <code>parent</code> axis contains the <termref
+def="dt-parent">parent</termref> of the context node, if there is
+one</p></item>
+
+<item><p>the <code>ancestor</code> axis contains the ancestors of the
+context node; the ancestors of the context node consist of the
+<termref def="dt-parent">parent</termref> of context node and the
+parent's parent and so on; thus, the ancestor axis will always include
+the root node, unless the context node is the root node</p></item>
+
+<item><p>the <code>following-sibling</code> axis contains all the
+following siblings of the context node; if the
+context node is an attribute node or namespace node, the
+<code>following-sibling</code> axis is empty</p></item>
+
+<item><p>the <code>preceding-sibling</code> axis contains all the
+preceding siblings of the context node; if the context node is an
+attribute node or namespace node, the <code>preceding-sibling</code>
+axis is empty</p></item>
+
+<item><p>the <code>following</code> axis contains all nodes in the
+same document as the context node that are after the context node in
+document order, excluding any descendants and excluding attribute
+nodes and namespace nodes</p></item>
+
+<item><p>the <code>preceding</code> axis contains all nodes in the
+same document as the context node that are before the context node in
+document order, excluding any ancestors and excluding attribute nodes
+and namespace nodes</p></item>
+
+<item><p>the <code>attribute</code> axis contains the attributes of
+the context node; the axis will be empty unless the context node is an
+element</p></item>
+
+<item><p>the <code>namespace</code> axis contains the namespace nodes
+of the context node; the axis will be empty unless the context node
+is an element</p></item>
+
+<item><p>the <code>self</code> axis contains just the context node
+itself</p></item>
+
+<item><p>the <code>descendant-or-self</code> axis contains the context
+node and the descendants of the context node</p></item>
+
+<item><p>the <code>ancestor-or-self</code> axis contains the context
+node and the ancestors of the context node; thus, the ancestor axis
+will always include the root node</p></item>
+
+</ulist>
+
+<note><p>The <code>ancestor</code>, <code>descendant</code>,
+<code>following</code>, <code>preceding</code> and <code>self</code>
+axes partition a document (ignoring attribute and namespace nodes):
+they do not overlap and together they contain all the nodes in the
+document.</p></note>
+
+<scrap>
+<head>Axes</head>
+<prod id="NT-AxisName">
+<lhs>AxisName</lhs>
+<rhs>'ancestor'</rhs>
+<rhs>| 'ancestor-or-self'</rhs>
+<rhs>| 'attribute'</rhs>
+<rhs>| 'child'</rhs>
+<rhs>| 'descendant'</rhs>
+<rhs>| 'descendant-or-self'</rhs>
+<rhs>| 'following'</rhs>
+<rhs>| 'following-sibling'</rhs>
+<rhs>| 'namespace'</rhs>
+<rhs>| 'parent'</rhs>
+<rhs>| 'preceding'</rhs>
+<rhs>| 'preceding-sibling'</rhs>
+<rhs>| 'self'</rhs>
+</prod>
+</scrap>
+
+</div2>
+
+<div2 id="node-tests">
+<head>Node Tests</head>
+
+<p><termdef id="dt-principal-node-type" term="Principal Node
+Type">Every axis has a <term>principal node type</term>.  If an axis
+can contain elements, then the principal node type is element;
+otherwise, it is the type of the nodes that the axis can
+contain.</termdef> Thus,</p>
+
+<slist>
+
+<sitem>For the attribute axis, the principal node type is attribute.</sitem>
+
+<sitem>For the namespace axis, the principal node type is namespace.</sitem>
+
+<sitem>For other axes, the principal node type is element.</sitem>
+
+</slist>
+
+<p>A node test that is a <xnt href="&XMLNames;#NT-QName">QName</xnt>
+is true if and only if the type of the node (see <specref ref="data-model"/>)
+is the principal node type and has
+an <termref def="dt-expanded-name">expanded-name</termref> equal to
+the <termref def="dt-expanded-name">expanded-name</termref> specified
+by the <xnt href="&XMLNames;#NT-QName">QName</xnt>.  For example,
+<code>child::para</code> selects the <code>para</code> element
+children of the context node; if the context node has no
+<code>para</code> children, it will select an empty set of nodes.
+<code>attribute::href</code> selects the <code>href</code> attribute
+of the context node; if the context node has no <code>href</code>
+attribute, it will select an empty set of nodes.</p>
+
+<p>A <xnt href="&XMLNames;#NT-QName">QName</xnt> in the node test is
+expanded into an <termref
+def="dt-expanded-name">expanded-name</termref> using the namespace
+declarations from the expression context.  This is the same way
+expansion is done for element type names in start and end-tags except
+that the default namespace declared with <code>xmlns</code> is not
+used: if the <xnt href="&XMLNames;#NT-QName">QName</xnt> does not have
+a prefix, then the namespace URI is null (this is the same way
+attribute names are expanded).  It is an error if the <xnt
+href="&XMLNames;#NT-QName">QName</xnt> has a prefix for which there is
+no namespace declaration in the expression context.</p>
+
+<p>A node test <code>*</code> is true for any node of the principal
+node type.  For example, <code>child::*</code> will select all element
+children of the context node, and <code>attribute::*</code> will
+select all attributes of the context node.</p>
+
+<p>A node test can have the form <xnt
+href="&XMLNames;#NT-NCName">NCName</xnt><code>:*</code>.  In this
+case, the prefix is expanded in the same way as with a <xnt
+href="&XMLNames;#NT-QName">QName</xnt>, using the context namespace
+declarations.  It is an error if there is no namespace declaration for
+the prefix in the expression context.  The node test will be true for
+any node of the principal type whose <termref
+def="dt-expanded-name">expanded-name</termref> has the namespace URI
+to which the prefix expands, regardless of the local part of the
+name.</p>
+
+<p>The node test <code>text()</code> is true for any text node. For
+example, <code>child::text()</code> will select the text node
+children of the context node.  Similarly, the node test
+<code>comment()</code> is true for any comment node, and the node test
+<code>processing-instruction()</code> is true for any processing
+instruction. The <code>processing-instruction()</code> test may have
+an argument that is <nt def="NT-Literal">Literal</nt>; in this case, it
+is true for any processing instruction that has a name equal to the
+value of the <nt def="NT-Literal">Literal</nt>.</p>
+
+<p>A node test <code>node()</code> is true for any node of any type
+whatsoever.</p>
+
+<scrap>
+<head></head>
+<prod id="NT-NodeTest">
+<lhs>NodeTest</lhs>
+<rhs><nt def="NT-NameTest">NameTest</nt></rhs>
+<rhs>| <nt def="NT-NodeType">NodeType</nt> '(' ')'</rhs>
+<rhs>| 'processing-instruction' '(' <nt def="NT-Literal">Literal</nt> ')'</rhs>
+</prod>
+</scrap>
+
+</div2>
+
+<div2 id="predicates">
+<head>Predicates</head>
+
+<p>An axis is either a forward axis or a reverse axis.  An axis that
+only ever contains the context node or nodes that are after the
+context node in <termref def="dt-document-order">document
+order</termref> is a forward axis.  An axis that only ever contains
+the context node or nodes that are before the context node in <termref
+def="dt-document-order">document order</termref> is a reverse axis.
+Thus, the ancestor, ancestor-or-self, preceding, and preceding-sibling
+axes are reverse axes; all other axes are forward axes. Since the self
+axis always contains at most one node, it makes no difference whether
+it is a forward or reverse axis.  <termdef term="Proximity Position"
+id="dt-proximity-position">The <term>proximity position</term> of a
+member of a node-set with respect to an axis is defined to be the
+position of the node in the node-set ordered in document order if the
+axis is a forward axis and ordered in reverse document order if the
+axis is a reverse axis. The first position is 1.</termdef></p>
+
+<p>A predicate filters a node-set with respect to an axis to produce a
+new node-set.  For each node in the node-set to be filtered, the <nt
+def="NT-PredicateExpr">PredicateExpr</nt> is evaluated with that node
+as the context node, with the number of nodes in the node-set as the
+context size, and with the <termref
+def="dt-proximity-position">proximity position</termref> of the node
+in the node-set with respect to the axis as the context position; if
+<nt def="NT-PredicateExpr">PredicateExpr</nt> evaluates to true for
+that node, the node is included in the new node-set; otherwise, it is
+not included.</p>
+
+<p>A <nt def="NT-PredicateExpr">PredicateExpr</nt> is evaluated by
+evaluating the <nt def="NT-Expr">Expr</nt> and converting the result
+to a boolean.  If the result is a number, the result will be converted
+to true if the number is equal to the context position and will be
+converted to false otherwise; if the result is not a number, then the
+result will be converted as if by a call to the
+<function>boolean</function> function.  Thus a location path
+<code>para[3]</code> is equivalent to
+<code>para[position()=3]</code>.</p>
+
+<scrap>
+<head>Predicates</head>
+<prod id="NT-Predicate">
+<lhs>Predicate</lhs>
+<rhs>'[' <nt def="NT-PredicateExpr">PredicateExpr</nt> ']'</rhs>
+</prod>
+<prod id="NT-PredicateExpr">
+<lhs>PredicateExpr</lhs>
+<rhs><nt def="NT-Expr">Expr</nt></rhs>
+</prod>
+</scrap>
+
+</div2>
+
+<div2 id="path-abbrev">
+<head>Abbreviated Syntax</head>
+
+<p>Here are some examples of location paths using abbreviated
+syntax:</p>
+
+<ulist>
+
+<item><p><code>para</code> selects the <code>para</code> element children of
+the context node</p></item>
+
+<item><p><code>*</code> selects all element children of the
+context node</p></item>
+
+<item><p><code>text()</code> selects all text node children of the
+context node</p></item>
+
+<item><p><code>@name</code> selects the <code>name</code> attribute of
+the context node</p></item>
+
+<item><p><code>@*</code> selects all the attributes of the
+context node</p></item>
+
+<item><p><code>para[1]</code> selects the first <code>para</code> child of
+the context node</p></item>
+
+<item><p><code>para[last()]</code> selects the last <code>para</code> child
+of the context node</p></item>
+
+<item><p><code>*/para</code> selects all <code>para</code> grandchildren of
+the context node</p></item>
+
+<item><p><code>/doc/chapter[5]/section[2]</code> selects the second
+<code>section</code> of the fifth <code>chapter</code> of the
+<code>doc</code></p></item>
+
+<item><p><code>chapter//para</code> selects the <code>para</code> element
+descendants of the <code>chapter</code> element children of the
+context node</p></item>
+
+<item><p><code>//para</code> selects all the <code>para</code> descendants of
+the document root and thus selects all <code>para</code> elements in the
+same document as the context node</p></item>
+
+<item><p><code>//olist/item</code> selects all the <code>item</code>
+elements in the same document as the context node that have an
+<code>olist</code> parent</p></item>
+
+<item><p><code>.</code> selects the context node</p></item>
+
+<item><p><code>.//para</code> selects the <code>para</code> element
+descendants of the context node</p></item>
+
+<item><p><code>..</code> selects the parent of the context node</p></item>
+
+<item><p><code>../@lang</code> selects the <code>lang</code> attribute
+of the parent of the context node</p></item>
+
+<item><p><code>para[@type="warning"]</code> selects all <code>para</code>
+children of the context node that have a <code>type</code> attribute with
+value <code>warning</code></p></item>
+
+<item><p><code>para[@type="warning"][5]</code> selects the fifth
+<code>para</code> child of the context node that has a <code>type</code>
+attribute with value <code>warning</code></p></item>
+
+<item><p><code>para[5][@type="warning"]</code> selects the fifth
+<code>para</code> child of the context node if that child has a
+<code>type</code> attribute with value <code>warning</code></p></item>
+
+<item><p><code>chapter[title="Introduction"]</code> selects the
+<code>chapter</code> children of the context node that have one or
+more <code>title</code> children with <termref
+def="dt-string-value">string-value</termref> equal to
+<code>Introduction</code></p></item>
+
+<item><p><code>chapter[title]</code> selects the <code>chapter</code>
+children of the context node that have one or more <code>title</code>
+children</p></item>
+
+<item><p><code>employee[@secretary and @assistant]</code> selects all
+the <code>employee</code> children of the context node that have both a
+<code>secretary</code> attribute and an <code>assistant</code>
+attribute</p></item>
+
+</ulist>
+
+<p>The most important abbreviation is that <code>child::</code> can be
+omitted from a location step.  In effect, <code>child</code> is the
+default axis.  For example, a location path <code>div/para</code> is
+short for <code>child::div/child::para</code>.</p>
+
+<p>There is also an abbreviation for attributes:
+<code>attribute::</code> can be abbreviated to <code>@</code>. For
+example, a location path <code>para[@type="warning"]</code> is short
+for <code>child::para[attribute::type="warning"]</code> and so selects
+<code>para</code> children with a <code>type</code> attribute with
+value equal to <code>warning</code>.</p>
+
+<p><code>//</code> is short for
+<code>/descendant-or-self::node()/</code>.  For example,
+<code>//para</code> is short for
+<code>/descendant-or-self::node()/child::para</code> and so will
+select any <code>para</code> element in the document (even a
+<code>para</code> element that is a document element will be selected
+by <code>//para</code> since the document element node is a child of
+the root node); <code>div//para</code> is short for
+<code>div/descendant-or-self::node()/child::para</code> and so
+will select all <code>para</code> descendants of <code>div</code>
+children.</p>
+
+<note><p>The location path <code>//para[1]</code> does
+<emph>not</emph> mean the same as the location path
+<code>/descendant::para[1]</code>.  The latter selects the first
+descendant <code>para</code> element; the former selects all descendant
+<code>para</code> elements that are the first <code>para</code>
+children of their parents.</p></note>
+
+<p>A location step of <code>.</code> is short for
+<code>self::node()</code>. This is particularly useful in
+conjunction with <code>//</code>. For example, the location path
+<code>.//para</code> is short for</p>
+
+<eg>self::node()/descendant-or-self::node()/child::para</eg>
+
+<p>and so will select all <code>para</code> descendant elements of the
+context node.</p>
+
+<p>Similarly, a location step of <code>..</code> is short for
+<code>parent::node()</code>. For example, <code>../title</code> is
+short for <code>parent::node()/child::title</code> and so will
+select the <code>title</code> children of the parent of the context
+node.</p>
+
+<scrap>
+<head>Abbreviations</head>
+<prodgroup pcw5="1" pcw2="15" pcw4="16">
+<prod id="NT-AbbreviatedAbsoluteLocationPath">
+<lhs>AbbreviatedAbsoluteLocationPath</lhs>
+<rhs>'//' <nt def="NT-RelativeLocationPath">RelativeLocationPath</nt></rhs>
+</prod>
+<prod id="NT-AbbreviatedRelativeLocationPath">
+<lhs>AbbreviatedRelativeLocationPath</lhs>
+<rhs><nt def="NT-RelativeLocationPath">RelativeLocationPath</nt> '//' <nt def="NT-Step">Step</nt></rhs>
+</prod>
+<prod id="NT-AbbreviatedStep">
+<lhs>AbbreviatedStep</lhs>
+<rhs>'.'</rhs>
+<rhs>| '..'</rhs>
+</prod>
+<prod id="NT-AbbreviatedAxisSpecifier">
+<lhs>AbbreviatedAxisSpecifier</lhs>
+<rhs>'@'?</rhs>
+</prod>
+</prodgroup>
+</scrap>
+
+</div2>
+
+</div1>
+
+<div1>
+<head>Expressions</head>
+
+<div2>
+<head>Basics</head>
+
+<p>A <nt def="NT-VariableReference">VariableReference</nt> evaluates
+to the value to which the variable name is bound in the set of
+variable bindings in the context.  It is an error if the variable name
+is not bound to any value in the set of variable bindings in the
+expression context.</p>
+
+<p>Parentheses may be used for grouping.</p>
+
+<scrap>
+<head></head>
+<prod id="NT-Expr">
+<lhs>Expr</lhs>
+<rhs><nt def="NT-OrExpr">OrExpr</nt></rhs>
+</prod>
+<prod id="NT-PrimaryExpr">
+<lhs>PrimaryExpr</lhs>
+<rhs><nt def="NT-VariableReference">VariableReference</nt></rhs>
+<rhs>| '(' <nt def="NT-Expr">Expr</nt> ')'</rhs>
+<rhs>| <nt def="NT-Literal">Literal</nt></rhs>
+<rhs>| <nt def="NT-Number">Number</nt></rhs>
+<rhs>| <nt def="NT-FunctionCall">FunctionCall</nt></rhs>
+</prod>
+</scrap>
+
+</div2>
+
+<div2>
+<head>Function Calls</head>
+
+<p>A <nt def="NT-FunctionCall">FunctionCall</nt> expression is
+evaluated by using the <nt def="NT-FunctionName">FunctionName</nt> to
+identify a function in the expression evaluation context function
+library, evaluating each of the <nt def="NT-Argument">Argument</nt>s,
+converting each argument to the type required by the function, and
+finally calling the function, passing it the converted arguments.  It
+is an error if the number of arguments is wrong or if an argument
+cannot be converted to the required type.  The result of the <nt
+def="NT-FunctionCall">FunctionCall</nt> expression is the result
+returned by the function.</p>
+
+<p>An argument is converted to type string as if by calling the
+<function>string</function> function.  An argument is converted to
+type number as if by calling the <function>number</function> function.
+An argument is converted to type boolean as if by calling the
+<function>boolean</function> function.  An argument that is not of
+type node-set cannot be converted to a node-set.</p>
+
+<scrap>
+<head></head>
+<prod id="NT-FunctionCall">
+<lhs>FunctionCall</lhs>
+<rhs><nt def="NT-FunctionName">FunctionName</nt> '(' ( <nt def="NT-Argument">Argument</nt> ( ',' <nt def="NT-Argument">Argument</nt> )* )? ')'</rhs>
+</prod>
+<prod id="NT-Argument">
+<lhs>Argument</lhs>
+<rhs><nt def="NT-Expr">Expr</nt></rhs>
+</prod>
+</scrap>
+
+</div2>
+
+<div2 id="node-sets">
+<head>Node-sets</head>
+
+<p>A location path can be used as an expression.  The expression
+returns the set of nodes selected by the path.</p>
+
+<p>The <code>|</code> operator computes the union of its operands,
+which must be node-sets.</p>
+
+<p><nt def="NT-Predicate">Predicate</nt>s are used to filter
+expressions in the same way that they are used in location paths. It
+is an error if the expression to be filtered does not evaluate to a
+node-set.  The <nt def="NT-Predicate">Predicate</nt> filters the
+node-set with respect to the child axis.</p>
+
+<note><p>The meaning of a <nt def="NT-Predicate">Predicate</nt>
+depends crucially on which axis applies. For example,
+<code>preceding::foo[1]</code> returns the first <code>foo</code>
+element in <emph>reverse document order</emph>, because the axis that
+applies to the <code>[1]</code> predicate is the preceding axis; by
+contrast, <code>(preceding::foo)[1]</code> returns the first
+<code>foo</code> element in <emph>document order</emph>, because the
+axis that applies to the <code>[1]</code> predicate is the child
+axis.</p></note>
+
+<p>The <code>/</code> and <code>//</code> operators compose an
+expression and a relative location path.  It is an error if the
+expression does not evaluate to a node-set.  The <code>/</code>
+operator does composition in the same way as when <code>/</code> is
+used in a location path. As in location paths, <code>//</code> is
+short for <code>/descendant-or-self::node()/</code>.</p>
+
+<p>There are no types of objects that can be converted to node-sets.</p>
+
+<scrap>
+<head></head>
+<prod id="NT-UnionExpr">
+<lhs>UnionExpr</lhs>
+<rhs><nt def="NT-PathExpr">PathExpr</nt></rhs>
+<rhs>| <nt def="NT-UnionExpr">UnionExpr</nt> '|' <nt def="NT-PathExpr">PathExpr</nt></rhs>
+</prod>
+<prod id="NT-PathExpr">
+<lhs>PathExpr</lhs>
+<rhs><nt def="NT-LocationPath">LocationPath</nt></rhs>
+<rhs>| <nt def="NT-FilterExpr">FilterExpr</nt></rhs>
+<rhs>| <nt def="NT-FilterExpr">FilterExpr</nt> '/' <nt def="NT-RelativeLocationPath">RelativeLocationPath</nt></rhs>
+<rhs>| <nt def="NT-FilterExpr">FilterExpr</nt> '//' <nt def="NT-RelativeLocationPath">RelativeLocationPath</nt></rhs>
+</prod>
+<prod id="NT-FilterExpr">
+<lhs>FilterExpr</lhs>
+<rhs><nt def="NT-PrimaryExpr">PrimaryExpr</nt></rhs>
+<rhs>| <nt def="NT-FilterExpr">FilterExpr</nt> <nt def="NT-Predicate">Predicate</nt></rhs>
+</prod>
+</scrap>
+
+</div2>
+
+<div2 id="booleans">
+<head>Booleans</head>
+
+<p>An object of type boolean can have one of two values, true and
+false.</p>
+
+<p>An <code>or</code> expression is evaluated by evaluating each
+operand and converting its value to a boolean as if by a call to the
+<function>boolean</function> function.  The result is true if either
+value is true and false otherwise.  The right operand is not evaluated
+if the left operand evaluates to true.</p>
+
+<p>An <code>and</code> expression is evaluated by evaluating each
+operand and converting its value to a boolean as if by a call to the
+<function>boolean</function> function.  The result is true if both
+values are true and false otherwise.  The right operand is not
+evaluated if the left operand evaluates to false.</p>
+
+<p>An <nt def="NT-EqualityExpr">EqualityExpr</nt> (that is not just
+a <nt def="NT-RelationalExpr">RelationalExpr</nt>) or a <nt
+def="NT-RelationalExpr">RelationalExpr</nt> (that is not just an <nt
+def="NT-AdditiveExpr">AdditiveExpr</nt>) is evaluated by comparing the
+objects that result from evaluating the two operands.  Comparison of
+the resulting objects is defined in the following three paragraphs.
+First, comparisons that involve node-sets are defined in terms of
+comparisons that do not involve node-sets; this is defined uniformly
+for <code>=</code>, <code>!=</code>, <code>&lt;=</code>,
+<code>&lt;</code>, <code>&gt;=</code> and <code>&gt;</code>.  Second,
+comparisons that do not involve node-sets are defined for
+<code>=</code> and <code>!=</code>.  Third, comparisons that do not
+involve node-sets are defined for <code>&lt;=</code>,
+<code>&lt;</code>, <code>&gt;=</code> and <code>&gt;</code>.</p>
+
+<p>If both objects to be compared are node-sets, then the comparison
+will be true if and only if there is a node in the first node-set and
+a node in the second node-set such that the result of performing the
+comparison on the <termref
+def="dt-string-value">string-value</termref>s of the two nodes is
+true.  If one object to be compared is a node-set and the other is a
+number, then the comparison will be true if and only if there is a
+node in the node-set such that the result of performing the comparison
+on the number to be compared and on the result of converting the
+<termref def="dt-string-value">string-value</termref> of that node to
+a number using the <function>number</function> function is true.  If
+one object to be compared is a node-set and the other is a string,
+then the comparison will be true if and only if there is a node in the
+node-set such that the result of performing the comparison on the
+<termref def="dt-string-value">string-value</termref> of the node and
+the other string is true. If one object to be compared is a node-set
+and the other is a boolean, then the comparison will be true if and
+only if the result of performing the comparison on the boolean and on
+the result of converting the node-set to a boolean using the
+<function>boolean</function> function is true.</p>
+
+<p>When neither object to be compared is a node-set and the operator
+is <code>=</code> or <code>!=</code>, then the objects are compared by
+converting them to a common type as follows and then comparing them.
+If at least one object to be compared is a boolean, then each object
+to be compared is converted to a boolean as if by applying the
+<function>boolean</function> function.  Otherwise, if at least one
+object to be compared is a number, then each object to be compared is
+converted to a number as if by applying the
+<function>number</function> function.  Otherwise, both objects to be
+compared are converted to strings as if by applying the
+<function>string</function> function.  The <code>=</code> comparison
+will be true if and only if the objects are equal; the <code>!=</code>
+comparison will be true if and only if the objects are not equal.
+Numbers are compared for equality according to IEEE 754 <bibref
+ref="IEEE754"/>.  Two booleans are equal if either both are true or
+both are false.  Two strings are equal if and only if they consist of
+the same sequence of UCS characters.</p>
+
+<note><p>If <code>$x</code> is bound to a node-set, then
+<code>$x="foo"</code> does not mean the same as
+<code>not($x!="foo")</code>: the former is true if and only if
+<emph>some</emph> node in <code>$x</code> has the string-value
+<code>foo</code>; the latter is true if and only if <emph>all</emph>
+nodes in <code>$x</code> have the string-value
+<code>foo</code>.</p></note>
+
+<p>When neither object to be compared is a node-set and the operator
+is <code>&lt;=</code>, <code>&lt;</code>, <code>&gt;=</code> or
+<code>&gt;</code>, then the objects are compared by converting both
+objects to numbers and comparing the numbers according to IEEE 754.
+The <code>&lt;</code> comparison will be true if and only if the first
+number is less than the second number.  The <code>&lt;=</code>
+comparison will be true if and only if the first number is less than
+or equal to the second number.  The <code>&gt;</code> comparison will
+be true if and only if the first number is greater than the second
+number.  The <code>&gt;=</code> comparison will be true if and only if
+the first number is greater than or equal to the second number.</p>
+
+<note>
+
+<p>When an XPath expression occurs in an XML document, any
+<code>&lt;</code> and <code>&lt;=</code> operators must be quoted
+according to XML 1.0 rules by using, for example,
+<code>&amp;lt;</code> and <code>&amp;lt;=</code>. In the following
+example the value of the <code>test</code> attribute is an XPath
+expression:</p>
+
+<eg><![CDATA[<xsl:if test="@value &lt; 10">...</xsl:if>]]></eg>
+
+</note>
+
+<scrap>
+<head></head>
+<prod id="NT-OrExpr">
+<lhs>OrExpr</lhs>
+<rhs><nt def="NT-AndExpr">AndExpr</nt></rhs>
+<rhs>| <nt def="NT-OrExpr">OrExpr</nt> 'or' <nt def="NT-AndExpr">AndExpr</nt></rhs>
+</prod>
+<prod id="NT-AndExpr">
+<lhs>AndExpr</lhs>
+<rhs><nt def="NT-EqualityExpr">EqualityExpr</nt></rhs>
+<rhs>| <nt def="NT-AndExpr">AndExpr</nt> 'and' <nt def="NT-EqualityExpr">EqualityExpr</nt></rhs>
+</prod>
+<prod id="NT-EqualityExpr">
+<lhs>EqualityExpr</lhs>
+<rhs><nt def="NT-RelationalExpr">RelationalExpr</nt></rhs>
+<rhs>| <nt def="NT-EqualityExpr">EqualityExpr</nt> '=' <nt def="NT-RelationalExpr">RelationalExpr</nt></rhs>
+<rhs>| <nt def="NT-EqualityExpr">EqualityExpr</nt> '!=' <nt def="NT-RelationalExpr">RelationalExpr</nt></rhs>
+</prod>
+<prod id="NT-RelationalExpr">
+<lhs>RelationalExpr</lhs>
+<rhs><nt def="NT-AdditiveExpr">AdditiveExpr</nt></rhs>
+<rhs>| <nt def="NT-RelationalExpr">RelationalExpr</nt> '&lt;' <nt def="NT-AdditiveExpr">AdditiveExpr</nt></rhs>
+<rhs>| <nt def="NT-RelationalExpr">RelationalExpr</nt> '>' <nt def="NT-AdditiveExpr">AdditiveExpr</nt></rhs>
+<rhs>| <nt def="NT-RelationalExpr">RelationalExpr</nt> '&lt;=' <nt def="NT-AdditiveExpr">AdditiveExpr</nt></rhs>
+<rhs>| <nt def="NT-RelationalExpr">RelationalExpr</nt> '>=' <nt def="NT-AdditiveExpr">AdditiveExpr</nt></rhs>
+</prod>
+</scrap>
+
+<note><p>The effect of the above grammar is that the order of
+precedence is (lowest precedence first):</p>
+
+<ulist>
+
+<item><p><code>or</code></p></item>
+
+<item><p><code>and</code></p></item>
+
+<item><p><code>=</code>, <code>!=</code></p></item>
+
+<item><p><code>&lt;=</code>, <code>&lt;</code>, <code>&gt;=</code>,
+<code>&gt;</code></p></item>
+
+</ulist>
+
+<p>and the operators are all left associative.</p>
+
+<p>For example, <code>3 &gt; 2 &gt; 1</code> is equivalent to <code>(3
+&gt; 2) &gt; 1</code>, which evaluates to false.</p>
+
+</note>
+
+</div2>
+
+<div2 id="numbers">
+<head>Numbers</head>
+
+<p>A number represents a floating-point number.  A number can have any
+double-precision 64-bit format IEEE 754 value <bibref ref="IEEE754"/>.
+These include a special <quote>Not-a-Number</quote> (NaN) value,
+positive and negative infinity, and positive and negative zero.  See
+<loc href="http://java.sun.com/docs/books/jls/html/4.doc.html#9208"
+>Section 4.2.3</loc> of <bibref ref="JLS"/> for a summary of the key
+rules of the IEEE 754 standard.</p>
+
+<p>The numeric operators convert their operands to numbers as if by
+calling the <function>number</function> function.</p>
+
+<p>The <code>+</code> operator performs addition.</p>
+
+<p>The <code>-</code> operator performs subtraction.</p>
+
+<note><p>Since XML allows <code>-</code> in names, the <code>-</code>
+operator typically needs to be preceded by whitespace.  For example,
+<code>foo-bar</code> evaluates to a node-set containing the child
+elements named <code>foo-bar</code>; <code>foo - bar</code> evaluates
+to the difference of the result of converting the <termref
+def="dt-string-value">string-value</termref> of the first
+<code>foo</code> child element to a number and the result of
+converting the <termref def="dt-string-value">string-value</termref>
+of the first <code>bar</code> child to a number.</p></note>
+ 
+<p>The <code>div</code> operator performs floating-point division
+according to IEEE 754.</p>
+
+<p>The <code>mod</code> operator returns the remainder from a
+truncating division.  For example,</p>
+
+<ulist>
+<item><p><code>5 mod 2</code> returns <code>1</code></p></item>
+<item><p><code>5 mod -2</code> returns <code>1</code></p></item>
+<item><p><code>-5 mod 2</code> returns <code>-1</code></p></item>
+<item><p><code>-5 mod -2</code> returns <code>-1</code></p></item>
+</ulist>
+
+<note><p>This is the same as the <code>%</code> operator in Java and
+ECMAScript.</p></note>
+
+<note><p>This is not the same as the IEEE 754 remainder operation, which
+returns the remainder from a rounding division.</p></note>
+
+<scrap>
+<head>Numeric Expressions</head>
+<prodgroup pcw5="1" pcw2="10" pcw4="21">
+<prod id="NT-AdditiveExpr">
+<lhs>AdditiveExpr</lhs>
+<rhs><nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt></rhs>
+<rhs>| <nt def="NT-AdditiveExpr">AdditiveExpr</nt> '+' <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt></rhs>
+<rhs>| <nt def="NT-AdditiveExpr">AdditiveExpr</nt> '-' <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt></rhs>
+</prod>
+<prod id="NT-MultiplicativeExpr">
+<lhs>MultiplicativeExpr</lhs>
+<rhs><nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
+<rhs>| <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt> <nt def="NT-MultiplyOperator">MultiplyOperator</nt> <nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
+<rhs>| <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt> 'div' <nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
+<rhs>| <nt def="NT-MultiplicativeExpr">MultiplicativeExpr</nt> 'mod' <nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
+</prod>
+<prod id="NT-UnaryExpr">  
+<lhs>UnaryExpr</lhs>
+<rhs><nt def="NT-UnionExpr">UnionExpr</nt></rhs>
+<rhs>| '-' <nt def="NT-UnaryExpr">UnaryExpr</nt></rhs>
+</prod>
+</prodgroup>
+</scrap>
+
+</div2>
+
+<div2 id="strings">
+<head>Strings</head>
+
+<p>Strings consist of a sequence of zero or more characters, where a
+character is defined as in the XML Recommendation <bibref ref="XML"/>.
+A single character in XPath thus corresponds to a single Unicode
+abstract character with a single corresponding Unicode scalar value
+(see <bibref ref="UNICODE"/>); this is not the same thing as a 16-bit
+Unicode code value: the Unicode coded character representation for an
+abstract character with Unicode scalar value greater that U+FFFF is a
+pair of 16-bit Unicode code values (a surrogate pair).  In many
+programming languages, a string is represented by a sequence of 16-bit
+Unicode code values; implementations of XPath in such languages must
+take care to ensure that a surrogate pair is correctly treated as a
+single XPath character.</p>
+
+<note><p>It is possible in Unicode for there to be two strings that
+should be treated as identical even though they consist of the
+distinct sequences of Unicode abstract characters.  For example, some
+accented characters may be represented in either a precomposed or
+decomposed form.  Therefore, XPath expressions may return unexpected
+results unless both the characters in the XPath expression and in the
+XML document have been normalized into a canonical form.  See <bibref
+ref="CHARMOD"/>.</p></note>
+
+</div2>
+
+<div2 id="exprlex">
+<head>Lexical Structure</head>
+
+<p>When tokenizing, the longest possible token is always returned.</p>
+
+<p>For readability, whitespace may be used in expressions even though not
+explicitly allowed by the grammar: <nt
+def="NT-ExprWhitespace">ExprWhitespace</nt> may be freely added within
+patterns before or after any <nt
+def="NT-ExprToken">ExprToken</nt>.</p>
+
+<p>The following special tokenization rules must be applied in the
+order specified to disambiguate the <nt
+def="NT-ExprToken">ExprToken</nt> grammar:</p>
+
+<ulist>
+
+<item><p>If there is a preceding token and the preceding token is not
+one of <code>@</code>, <code>::</code>, <code>(</code>,
+<code>[</code>, <code>,</code> or an <nt
+def="NT-Operator">Operator</nt>, then a <code>*</code> must be
+recognized as a <nt def="NT-MultiplyOperator">MultiplyOperator</nt>
+and an <xnt href="&XMLNames;#NT-NCName">NCName</xnt> must be
+recognized as an <nt
+def="NT-OperatorName">OperatorName</nt>.</p></item>
+
+<item><p>If the character following an <xnt
+href="&XMLNames;#NT-NCName">NCName</xnt> (possibly after intervening
+<nt def="NT-ExprWhitespace">ExprWhitespace</nt>) is <code>(</code>,
+then the token must be recognized as a <nt
+def="NT-NodeType">NodeType</nt> or a <nt
+def="NT-FunctionName">FunctionName</nt>.</p></item>
+
+<item><p>If the two characters following an <xnt
+href="&XMLNames;#NT-NCName">NCName</xnt> (possibly after intervening
+<nt def="NT-ExprWhitespace">ExprWhitespace</nt>) are <code>::</code>,
+then the token must be recognized as an <nt
+def="NT-AxisName">AxisName</nt>.</p></item>
+
+<item><p>Otherwise, the token must not be recognized as a <nt
+def="NT-MultiplyOperator">MultiplyOperator</nt>, an <nt
+def="NT-OperatorName">OperatorName</nt>, a <nt
+def="NT-NodeType">NodeType</nt>, a <nt
+def="NT-FunctionName">FunctionName</nt>, or an <nt
+def="NT-AxisName">AxisName</nt>.</p></item>
+
+</ulist>
+
+<scrap>
+<head>Expression Lexical Structure</head>
+<prodgroup pcw5="1" pcw2="8" pcw4="21">
+<prod id="NT-ExprToken">
+<lhs>ExprToken</lhs>
+<rhs>'(' | ')' | '[' | ']' | '.' | '..' | '@' | ',' | '::'</rhs>
+<rhs>| <nt def="NT-NameTest">NameTest</nt></rhs>
+<rhs>| <nt def="NT-NodeType">NodeType</nt></rhs>
+<rhs>| <nt def="NT-Operator">Operator</nt></rhs>
+<rhs>| <nt def="NT-FunctionName">FunctionName</nt></rhs>
+<rhs>| <nt def="NT-AxisName">AxisName</nt></rhs>
+<rhs>| <nt def="NT-Literal">Literal</nt></rhs>
+<rhs>| <nt def="NT-Number">Number</nt></rhs>
+<rhs>| <nt def="NT-VariableReference">VariableReference</nt></rhs>
+</prod>
+<prod id="NT-Literal">
+<lhs>Literal</lhs>
+<rhs>'"' [^"]* '"'</rhs>
+<rhs>| "'" [^']* "'"</rhs>
+</prod>
+<prod id="NT-Number">
+<lhs>Number</lhs>
+<rhs><nt def="NT-Digits">Digits</nt> ('.' <nt def="NT-Digits">Digits</nt>?)?</rhs>
+<rhs>| '.' <nt def="NT-Digits">Digits</nt></rhs>
+</prod>
+<prod id="NT-Digits">
+<lhs>Digits</lhs>
+<rhs>[0-9]+</rhs>
+</prod>
+<prod id="NT-Operator">
+<lhs>Operator</lhs>
+<rhs><nt def="NT-OperatorName">OperatorName</nt></rhs>
+<rhs>| <nt def="NT-MultiplyOperator">MultiplyOperator</nt></rhs>
+<rhs>| '/' | '//' | '|' | '+' | '-' | '=' | '!=' | '&lt;' | '&lt;=' | '&gt;' | '&gt;='</rhs>
+</prod>
+<prod id="NT-OperatorName">
+<lhs>OperatorName</lhs>
+<rhs>'and' | 'or' | 'mod' | 'div'</rhs>
+</prod>
+<prod id="NT-MultiplyOperator">
+<lhs>MultiplyOperator</lhs>
+<rhs>'*'</rhs>
+</prod>
+<prod id="NT-FunctionName">
+<lhs>FunctionName</lhs>
+<rhs>
+<xnt href="&XMLNames;#NT-QName">QName</xnt>
+- <nt def="NT-NodeType">NodeType</nt>
+</rhs>
+</prod>
+<prod id="NT-VariableReference">
+<lhs>VariableReference</lhs>
+<rhs>'$' <xnt href="&XMLNames;#NT-QName">QName</xnt></rhs>
+</prod>
+<prod id="NT-NameTest">
+<lhs>NameTest</lhs>
+<rhs>'*'</rhs>
+<rhs>| <xnt href="&XMLNames;#NT-NCName">NCName</xnt> ':' '*'</rhs>
+<rhs>| <xnt href="&XMLNames;#NT-QName">QName</xnt></rhs>
+</prod>
+<prod id="NT-NodeType">
+<lhs>NodeType</lhs>
+<rhs>'comment'</rhs>
+<rhs>| 'text'</rhs>
+<rhs>| 'processing-instruction'</rhs>
+<rhs>| 'node'</rhs>
+</prod>
+<prod id="NT-ExprWhitespace">
+<lhs>ExprWhitespace</lhs>
+<rhs><xnt href="&XML;#NT-S">S</xnt></rhs>
+</prod>
+</prodgroup>
+</scrap>
+
+</div2>
+
+</div1>
+
+<div1 id="corelib">
+<head>Core Function Library</head>
+
+<p>This section describes functions that XPath implementations must
+always include in the function library that is used to evaluate
+expressions.</p>
+
+<p>Each function in the function library is specified using a function
+prototype, which gives the return type, the name of the function, and
+the type of the arguments.  If an argument type is followed by a
+question mark, then the argument is optional; otherwise, the argument
+is required.</p>
+
+<div2>
+<head>Node Set Functions</head>
+
+<proto name="last" return-type="number"></proto>
+
+<p>The <function>last</function> function returns a number equal to
+the <termref def="dt-context-size">context size</termref> from the
+expression evaluation context.</p>
+
+<proto name="position" return-type="number"></proto>
+
+<p>The <function>position</function> function returns a number equal to
+the <termref def="dt-context-position">context position</termref> from
+the expression evaluation context.</p>
+
+<proto name="count" return-type="number"><arg type="node-set"/></proto>
+
+<p>The <function>count</function> function returns the number of nodes in the
+argument node-set.</p>
+
+<proto name="id" return-type="node-set"><arg type="object"/></proto>
+
+<p>The <function>id</function> function selects elements by their
+unique ID (see <specref ref="unique-id"/>).  When the argument to
+<function>id</function> is of type node-set, then the result is the
+union of the result of applying <function>id</function> to the
+<termref def="dt-string-value">string-value</termref> of each of the
+nodes in the argument node-set.  When the argument to
+<function>id</function> is of any other type, the argument is
+converted to a string as if by a call to the
+<function>string</function> function; the string is split into a
+whitespace-separated list of tokens (whitespace is any sequence of
+characters matching the production <xnt href="&XML;#NT-S">S</xnt>);
+the result is a node-set containing the elements in the same document
+as the context node that have a unique ID equal to any of the tokens
+in the list.</p>
+
+<ulist>
+<item><p><code>id("foo")</code> selects the element with unique ID
+<code>foo</code></p></item>
+<item><p><code>id("foo")/child::para[position()=5]</code> selects
+the fifth <code>para</code> child of the element with unique ID
+<code>foo</code></p></item>
+</ulist>
+
+<proto name="local-name" return-type="string"><arg occur="opt" type="node-set"/></proto>
+
+<p>The <function>local-name</function> function returns the local part
+of the <termref def="dt-expanded-name">expanded-name</termref> of the
+node in the argument node-set that is first in <termref
+def="dt-document-order">document order</termref>. If the argument
+node-set is empty or the first node has no <termref
+def="dt-expanded-name">expanded-name</termref>, an empty string is
+returned.  If the argument is omitted, it defaults to a node-set with
+the context node as its only member.</p>
+
+<proto name="namespace-uri" return-type="string"><arg occur="opt"
+type="node-set"/></proto>
+
+<p>The <function>namespace-uri</function> function returns the
+namespace URI of the <termref
+def="dt-expanded-name">expanded-name</termref> of the node in the
+argument node-set that is first in <termref
+def="dt-document-order">document order</termref>. If the argument
+node-set is empty, the first node has no <termref
+def="dt-expanded-name">expanded-name</termref>, or the namespace URI
+of the <termref def="dt-expanded-name">expanded-name</termref> is
+null, an empty string is returned.  If the argument is omitted, it
+defaults to a node-set with the context node as its only member.</p>
+
+<note><p>The string returned by the
+<function>namespace-uri</function> function will be empty except for
+element nodes and attribute nodes.</p></note>
+
+<proto name="name" return-type="string"><arg occur="opt" type="node-set"/></proto>
+
+<p>The <function>name</function> function returns a string containing
+a <xnt href="&XMLNames;#NT-QName">QName</xnt> representing the
+<termref def="dt-expanded-name">expanded-name</termref> of the node in
+the argument node-set that is first in <termref
+def="dt-document-order">document order</termref>. The <xnt
+href="&XMLNames;#NT-QName">QName</xnt> must represent the <termref
+def="dt-expanded-name">expanded-name</termref> with respect to the
+namespace declarations in effect on the node whose <termref
+def="dt-expanded-name">expanded-name</termref> is being represented.
+Typically, this will be the <xnt
+href="&XMLNames;#NT-QName">QName</xnt> that occurred in the XML
+source.  This need not be the case if there are namespace declarations
+in effect on the node that associate multiple prefixes with the same
+namespace.  However, an implementation may include information about
+the original prefix in its representation of nodes; in this case, an
+implementation can ensure that the returned string is always the same
+as the <xnt href="&XMLNames;#NT-QName">QName</xnt> used in the XML
+source. If the argument node-set is empty or the first node has no
+<termref def="dt-expanded-name">expanded-name</termref>, an empty
+string is returned.  If the argument it omitted, it defaults to a
+node-set with the context node as its only member.</p>
+
+<note><p>The string returned by the <function>name</function> function
+will be the same as the string returned by the
+<function>local-name</function> function except for element nodes and
+attribute nodes.</p></note>
+
+</div2>
+
+<div2>
+<head>String Functions</head>
+
+<proto name="string" return-type="string"><arg occur="opt" type="object"/></proto>
+
+<p>The <function>string</function> function converts an object to a string
+as follows:</p>
+
+<ulist>
+
+<item><p>A node-set is converted to a string by returning the <termref
+def="dt-string-value">string-value</termref> of the node in the
+node-set that is first in <termref def="dt-document-order">document
+order</termref>.  If the node-set is empty, an empty string is
+returned.</p></item>
+
+<item><p>A number is converted to a string as follows</p>
+
+<ulist>
+
+<item><p>NaN is converted to the string <code>NaN</code></p></item>
+
+<item><p>positive zero is converted to the string
+<code>0</code></p></item>
+
+<item><p>negative zero is converted to the string
+<code>0</code></p></item>
+
+<item><p>positive infinity is converted to the string
+<code>Infinity</code></p></item>
+
+<item><p>negative infinity is converted to the string
+<code>-Infinity</code></p></item>
+
+<item><p>if the number is an integer, the number is represented in
+decimal form as a <nt def="NT-Number">Number</nt> with no decimal
+point and no leading zeros, preceded by a minus sign (<code>-</code>)
+if the number is negative</p></item>
+
+<item><p>otherwise, the number is represented in decimal form as a <nt
+def="NT-Number">Number</nt> including a decimal point with at least
+one digit before the decimal point and at least one digit after the
+decimal point, preceded by a minus sign (<code>-</code>) if the number
+is negative; there must be no leading zeros before the decimal point
+apart possibly from the one required digit immediately before the
+decimal point; beyond the one required digit after the decimal point
+there must be as many, but only as many, more digits as are needed to
+uniquely distinguish the number from all other IEEE 754 numeric
+values.</p></item>
+
+</ulist>
+
+</item>
+
+<item><p>The boolean false value is converted to the string
+<code>false</code>.  The boolean true value is converted to the
+string <code>true</code>.</p></item>
+
+<item><p>An object of a type other than the four basic types is
+converted to a string in a way that is dependent on that
+type.</p></item>
+
+</ulist>
+
+<p>If the argument is omitted, it defaults to a node-set with the
+context node as its only member.</p>
+
+<note><p>The <code>string</code> function is not intended for
+converting numbers into strings for presentation to users.  The
+<code>format-number</code> function and <code>xsl:number</code>
+element in <bibref ref="XSLT"/> provide this
+functionality.</p></note>
+
+<proto name="concat" return-type="string"><arg type="string"/><arg type="string"/><arg occur="rep" type="string"/></proto>
+
+<p>The <function>concat</function> function returns the concatenation of its
+arguments.</p>
+
+<proto name="starts-with" return-type="boolean"><arg type="string"/><arg type="string"/></proto>
+
+<p>The <function>starts-with</function> function returns true if the
+first argument string starts with the second argument string, and
+otherwise returns false.</p>
+
+<proto name="contains" return-type="boolean"><arg type="string"/><arg type="string"/></proto>
+
+<p>The <function>contains</function> function returns true if the first
+argument string contains the second argument string, and otherwise
+returns false.</p>
+
+<proto name="substring-before" return-type="string"><arg type="string"/><arg type="string"/></proto>
+
+<p>The <function>substring-before</function> function returns the substring
+of the first argument string that precedes the first occurrence of the
+second argument string in the first argument string, or the empty
+string if the first argument string does not contain the second
+argument string.  For example,
+<code>substring-before("1999/04/01","/")</code> returns
+<code>1999</code>.</p>
+
+<proto name="substring-after" return-type="string"><arg type="string"/><arg type="string"/></proto>
+
+<p>The <function>substring-after</function> function returns the
+substring of the first argument string that follows the first
+occurrence of the second argument string in the first argument string,
+or the empty string if the first argument string does not contain the
+second argument string. For example,
+<code>substring-after("1999/04/01","/")</code> returns
+<code>04/01</code>, and
+<code>substring-after("1999/04/01","19")</code> returns
+<code>99/04/01</code>.</p>
+
+<proto name="substring" return-type="string">
+<arg type="string"/>
+<arg type="number"/>
+<arg type="number" occur="opt"/>
+</proto>
+
+<p>The <function>substring</function> function returns the substring of the
+first argument starting at the position specified in the second
+argument with length specified in the third argument. For example,
+<code>substring("12345",2,3)</code> returns <code>"234"</code>.
+If the third argument is not specified, it returns
+the substring starting at the position specified in the second
+argument and continuing to the end of the string. For example,
+<code>substring("12345",2)</code> returns <code>"2345"</code>.</p>
+
+<p>More precisely, each character in the string (see <specref
+ref="strings"/>) is considered to have a numeric position: the
+position of the first character is 1, the position of the second
+character is 2 and so on.</p>
+
+<note><p>This differs from Java and ECMAScript, in which the
+<code>String.substring</code> method treats the position of the first
+character as 0.</p></note>
+
+<p>The returned substring contains those
+characters for which the position of the character is greater than or
+equal to the rounded value of the second argument and, if the third
+argument is specified, less than the sum of the rounded value of the
+second argument and the rounded value of the third argument; the
+comparisons and addition used for the above follow the standard IEEE
+754 rules; rounding is done as if by a call to the
+<function>round</function> function. The following examples illustrate
+various unusual cases:</p>
+
+<ulist>
+
+<item><p><code>substring("12345", 1.5, 2.6)</code> returns
+<code>"234"</code></p></item>
+
+<item><p><code>substring("12345", 0, 3)</code> returns
+<code>"12"</code></p></item>
+
+<item><p><code>substring("12345", 0 div 0, 3)</code> returns
+<code>""</code></p></item>
+
+<item><p><code>substring("12345", 1, 0 div 0)</code> returns
+<code>""</code></p></item>
+
+<item><p><code>substring("12345", -42, 1 div 0)</code> returns
+<code>"12345"</code></p></item>
+
+<item><p><code>substring("12345", -1 div 0, 1 div 0)</code> returns
+<code>""</code></p></item>
+
+</ulist>
+
+<proto name="string-length" return-type="number">
+<arg type="string" occur="opt"/>
+</proto>
+
+<p>The <function>string-length</function> returns the number of
+characters in the string (see <specref ref="strings"/>).  If the
+argument is omitted, it defaults to the context node converted to a
+string, in other words the <termref
+def="dt-string-value">string-value</termref> of the context node.</p>
+
+<proto name="normalize-space" return-type="string"><arg occur="opt" type="string"/></proto>
+
+<p>The <function>normalize-space</function> function returns the argument
+string with whitespace normalized by stripping leading and trailing
+whitespace and replacing sequences of whitespace characters by a
+single space.  Whitespace characters are the same as those allowed by the <xnt
+href="&XML;#NT-S">S</xnt> production in XML.  If the argument is
+omitted, it defaults to the context node converted to a string, in
+other words the <termref def="dt-string-value">string-value</termref>
+of the context node.</p>
+
+<proto name="translate" return-type="string"><arg type="string"/><arg type="string"/><arg type="string"/></proto>
+
+<p>The <function>translate</function> function returns the first
+argument string with occurrences of characters in the second argument
+string replaced by the character at the corresponding position in the
+third argument string.  For example,
+<code>translate("bar","abc","ABC")</code> returns the string
+<code>BAr</code>.  If there is a character in the second argument
+string with no character at a corresponding position in the third
+argument string (because the second argument string is longer than the
+third argument string), then occurrences of that character in the
+first argument string are removed.  For example,
+<code>translate("--aaa--","abc-","ABC")</code> returns
+<code>"AAA"</code>. If a character occurs more than once in the second
+argument string, then the first occurrence determines the replacement
+character.  If the third argument string is longer than the second
+argument string, then excess characters are ignored.</p>
+
+<note><p>The <function>translate</function> function is not a sufficient
+solution for case conversion in all languages.  A future version of
+XPath may provide additional functions for case conversion.</p></note>
+
+</div2>
+
+<div2>
+<head>Boolean Functions</head>
+
+<proto name="boolean" return-type="boolean"><arg type="object"/></proto>
+
+<p>The <function>boolean</function> function converts its argument to a
+boolean as follows:</p>
+
+<ulist>
+
+<item><p>a number is true if and only if it is neither positive or
+negative zero nor NaN</p></item>
+
+<item><p>a node-set is true if and only if it is non-empty</p></item>
+
+<item><p>a string is true if and only if its length is non-zero</p></item>
+
+<item><p>an object of a type other than the four basic types is
+converted to a boolean in a way that is dependent on that
+type</p></item>
+
+</ulist>
+
+<proto name="not" return-type="boolean"><arg type="boolean"/></proto>
+
+<p>The <function>not</function> function returns true if its argument is
+false, and false otherwise.</p>
+
+<proto name="true" return-type="boolean"></proto>
+
+<p>The <function>true</function> function returns true.</p>
+
+<proto name="false" return-type="boolean"></proto>
+
+<p>The <function>false</function> function returns false.</p>
+
+<proto name="lang" return-type="boolean"><arg type="string"/></proto>
+
+<p>The <function>lang</function> function returns true or false depending on
+whether the language of the context node as specified by
+<code>xml:lang</code> attributes is the same as or is a sublanguage of
+the language specified by the argument string.  The language of the
+context node is determined by the value of the <code>xml:lang</code>
+attribute on the context node, or, if the context node has no
+<code>xml:lang</code> attribute, by the value of the
+<code>xml:lang</code> attribute on the nearest ancestor of the context
+node that has an <code>xml:lang</code> attribute.  If there is no such
+attribute, then <function>lang</function> returns false. If there is such an
+attribute, then <function>lang</function> returns true if the attribute
+value is equal to the argument ignoring case, or if there is some
+suffix starting with <code>-</code> such that the attribute value is
+equal to the argument ignoring that suffix of the attribute value and
+ignoring case. For example, <code>lang("en")</code> would return true
+if the context node is any of these five elements:</p>
+
+<eg><![CDATA[<para xml:lang="en"/>
+<div xml:lang="en"><para/></div>
+<para xml:lang="EN"/>
+<para xml:lang="en-us"/>]]></eg>
+</div2>
+
+<div2>
+<head>Number Functions</head>
+
+<proto name="number" return-type="number"><arg occur="opt" type="object"/></proto>
+
+<p>The <function>number</function> function converts its argument to a
+number as follows:</p>
+
+<ulist>
+
+<item><p>a string that consists of optional whitespace followed by an
+optional minus sign followed by a <nt def="NT-Number">Number</nt>
+followed by whitespace is converted to the IEEE 754 number that is
+nearest (according to the IEEE 754 round-to-nearest rule)
+to the mathematical value represented by the string; any other
+string is converted to NaN</p></item>
+
+<item><p>boolean true is converted to 1; boolean false is converted to
+0</p></item>
+
+<item>
+
+<p>a node-set is first converted to a string as if by a call to the
+<function>string</function> function and then converted in the same way as a
+string argument</p>
+
+</item>
+
+<item><p>an object of a type other than the four basic types is
+converted to a number in a way that is dependent on that
+type</p></item>
+
+</ulist>
+
+<p>If the argument is omitted, it defaults to a node-set with the
+context node as its only member.</p>
+
+<note><p>The <function>number</function> function should not be used
+for conversion of numeric data occurring in an element in an XML
+document unless the element is of a type that represents numeric data
+in a language-neutral format (which would typically be transformed
+into a language-specific format for presentation to a user). In
+addition, the <function>number</function> function cannot be used
+unless the language-neutral format used by the element is consistent
+with the XPath syntax for a <nt
+def="NT-Number">Number</nt>.</p></note>
+
+<proto name="sum" return-type="number"><arg type="node-set"/></proto>
+
+<p>The <function>sum</function> function returns the sum, for each
+node in the argument node-set, of the result of converting the
+<termref def="dt-string-value">string-value</termref>s of the node to
+a number.</p>
+
+<proto name="floor" return-type="number"><arg type="number"/></proto>
+
+<p>The <function>floor</function> function returns the largest (closest to
+positive infinity) number that is not greater than the argument and
+that is an integer.</p>
+
+<proto name="ceiling" return-type="number"><arg type="number"/></proto>
+
+<p>The <function>ceiling</function> function returns the smallest (closest
+to negative infinity) number that is not less than the argument and
+that is an integer.</p>
+
+<proto name="round" return-type="number"><arg type="number"/></proto>
+
+<p>The <function>round</function> function returns the number that is
+closest to the argument and that is an integer.  If there are two such
+numbers, then the one that is closest to positive infinity is
+returned. If the argument is NaN, then NaN is returned. If the
+argument is positive infinity, then positive infinity is returned.  If
+the argument is negative infinity, then negative infinity is
+returned. If the argument is positive zero, then positive zero is
+returned.  If the argument is negative zero, then negative zero is
+returned.  If the argument is less than zero, but greater than or
+equal to -0.5, then negative zero is returned.</p>
+
+<note><p>For these last two cases, the result of calling the
+<function>round</function> function is not the same as the result of
+adding 0.5 and then calling the <function>floor</function>
+function.</p></note>
+
+</div2>
+
+
+</div1>
+
+
+<div1 id="data-model">
+<head>Data Model</head>
+
+<p>XPath operates on an XML document as a tree. This section describes
+how XPath models an XML document as a tree.  This model is conceptual
+only and does not mandate any particular implementation.  The
+relationship of this model to the XML Information Set <bibref
+ref="XINFO"/> is described in <specref ref="infoset"/>.</p>
+
+<p>XML documents operated on by XPath must conform to the XML
+Namespaces Recommendation <bibref ref="XMLNAMES"/>.</p>
+
+<p>The tree contains nodes.  There are seven types of node:</p>
+
+<ulist>
+
+<item><p>root nodes</p></item>
+
+<item><p>element nodes</p></item>
+
+<item><p>text nodes</p></item>
+
+<item><p>attribute nodes</p></item>
+
+<item><p>namespace nodes</p></item>
+
+<item><p>processing instruction nodes</p></item>
+
+<item><p>comment nodes</p></item>
+
+</ulist>
+
+<p><termdef term="String Value" id="dt-string-value">For every type of
+node, there is a way of determining a <term>string-value</term> for a
+node of that type.  For some types of node, the string-value is part
+of the node; for other types of node, the string-value is computed
+from the string-value of descendant nodes.</termdef></p>
+
+<note><p>For element nodes and root nodes, the string-value of a node
+is not the same as the string returned by the DOM
+<code>nodeValue</code> method (see <bibref ref="DOM"/>).</p></note>
+
+<p><termdef term="Expanded Name" id="dt-expanded-name">Some types of
+node also have an <term>expanded-name</term>, which is a pair
+consisting of a local part and a namespace URI. The local part is a
+string.  The namespace URI is either null or a string.  The namespace
+URI specified in the XML document can be a URI reference as defined in
+<bibref ref="RFC2396"/>; this means it can have a fragment identifier
+and can be relative.  A relative URI should be resolved into an
+absolute URI during namespace processing: the namespace URIs of
+<termref def="dt-expanded-name">expanded-name</termref>s of nodes in
+the data model should be absolute.</termdef> Two <termref
+def="dt-expanded-name">expanded-name</termref>s are equal if they have
+the same local part, and either both have a null namespace URI or both
+have non-null namespace URIs that are equal.</p>
+
+<p><termdef id="dt-document-order" term="Document Order">There is an
+ordering, <term>document order</term>, defined on all the nodes in the
+document corresponding to the order in which the first character of
+the XML representation of each node occurs in the XML representation
+of the document after expansion of general entities.  Thus, the root
+node will be the first node. Element nodes occur before their
+children. Thus, document order orders element nodes in order of the
+occurrence of their start-tag in the XML (after expansion of
+entities). The attribute nodes and namespace nodes of an element occur
+before the children of the element.  The namespace nodes are defined
+to occur before the attribute nodes. The relative order of namespace
+nodes is implementation-dependent.  The relative order of attribute
+nodes is implementation-dependent.</termdef> <termdef
+id="dt-reverse-document-order" term="Reverse Document
+Order"><term>Reverse document order</term> is the reverse of <termref
+def="dt-document-order">document order</termref>.</termdef></p>
+
+<p>Root nodes and element nodes have an ordered list of child nodes.
+Nodes never share children: if one node is not the same node as
+another node, then none of the children of the one node will be the
+same node as any of the children of another node.  <termdef
+id="dt-parent" term="Parent">Every node other than the root node has
+exactly one <term>parent</term>, which is either an element node or
+the root node.</termdef> A root node or an element node is the parent
+of each of its child nodes. <termdef id="dt-descendants"
+term="Descendants">The <term>descendants</term> of a node are the
+children of the node and the descendants of the children of the
+node.</termdef></p>
+
+<div2 id="root-node">
+<head>Root Node</head>
+
+<p>The root node is the root of the tree.  A root node does not occur
+except as the root of the tree.  The element node for the document
+element is a child of the root node.  The root node also has as
+children processing instruction and comment nodes for processing
+instructions and comments that occur in the prolog and after the end
+of the document element.</p>
+
+<p>The <termref def="dt-string-value">string-value</termref> of the
+root node is the concatenation of the <termref
+def="dt-string-value">string-value</termref>s of all text node
+<termref def="dt-descendants">descendants</termref> of the root
+node in document order.</p>
+
+<p>The root node does not have an <termref
+def="dt-expanded-name">expanded-name</termref>.</p>
+
+</div2>
+
+<div2 id="element-nodes">
+<head>Element Nodes</head>
+
+<p>There is an element node for every element in the document.  An
+element node has an <termref
+def="dt-expanded-name">expanded-name</termref> computed by expanding
+the <xnt href="&XMLNames;#NT-QName">QName</xnt> of the element
+specified in the tag in accordance with the XML Namespaces
+Recommendation <bibref ref="XMLNAMES"/>.  The namespace URI of the
+element's <termref def="dt-expanded-name">expanded-name</termref> will
+be null if the <xnt href="&XMLNames;#NT-QName">QName</xnt> has no
+prefix and there is no applicable default namespace.</p>
+
+<note><p>In the notation of Appendix A.3 of <bibref ref="XMLNAMES"/>,
+the local part of the expanded-name corresponds to the
+<code>type</code> attribute of the <code>ExpEType</code> element; the
+namespace URI of the expanded-name corresponds to the <code>ns</code>
+attribute of the <code>ExpEType</code> element, and is null if the
+<code>ns</code> attribute of the <code>ExpEType</code> element is
+omitted.</p></note>
+
+<p>The children of an element node are the element nodes, comment
+nodes, processing instruction nodes and text nodes for its content.
+Entity references to both internal and external entities are expanded.
+Character references are resolved.</p>
+
+<p>The <termref def="dt-string-value">string-value</termref> of an
+element node is the concatenation of the <termref
+def="dt-string-value">string-value</termref>s of all text node
+<termref def="dt-descendants">descendants</termref> of the element
+node in document order.</p>
+
+<div3 id="unique-id">
+<head>Unique IDs</head>
+
+<p>An element node may have a unique identifier (ID).  This is the
+value of the attribute that is declared in the DTD as type
+<code>ID</code>.  No two elements in a document may have the same
+unique ID.  If an XML processor reports two elements in a document as
+having the same unique ID (which is possible only if the document is
+invalid) then the second element in document order must be treated as
+not having a unique ID.</p>
+
+<note><p>If a document does not have a DTD, then no element in the
+document will have a unique ID.</p></note>
+
+</div3>
+
+</div2>
+
+<div2 id="attribute-nodes">
+<head>Attribute Nodes</head>
+
+<p>Each element node has an associated set of attribute nodes; the
+element is the <termref def="dt-parent">parent</termref> of each of
+these attribute nodes; however, an attribute node is not a child of
+its parent element.</p>
+
+<note><p>This is different from the DOM, which does not treat the
+element bearing an attribute as the parent of the attribute (see
+<bibref ref="DOM"/>).</p></note>
+
+<p>Elements never share attribute nodes: if one element node is not
+the same node as another element node, then none of the attribute
+nodes of the one element node will be the same node as the attribute
+nodes of another element node.</p>
+
+<note><p>The <code>=</code> operator tests whether two nodes have the
+same value, <emph>not</emph> whether they are the same node.  Thus
+attributes of two different elements may compare as equal using
+<code>=</code>, even though they are not the same node.</p></note>
+
+<p>A defaulted attribute is treated the same as a specified attribute.
+If an attribute was declared for the element type in the DTD, but the
+default was declared as <code>#IMPLIED</code>, and the attribute was
+not specified on the element, then the element's attribute set does
+not contain a node for the attribute.</p>
+
+<p>Some attributes, such as <code>xml:lang</code> and
+<code>xml:space</code>, have the semantics that they apply to all
+elements that are descendants of the element bearing the attribute,
+unless overridden with an instance of the same attribute on another
+descendant element.  However, this does not affect where attribute
+nodes appear in the tree: an element has attribute nodes only for
+attributes that were explicitly specified in the start-tag or
+empty-element tag of that element or that were explicitly declared in
+the DTD with a default value.</p>
+
+<p>An attribute node has an <termref
+def="dt-expanded-name">expanded-name</termref> and a <termref
+def="dt-string-value">string-value</termref>.  The <termref
+def="dt-expanded-name">expanded-name</termref> is computed by
+expanding the <xnt href="&XMLNames;#NT-QName">QName</xnt> specified in
+the tag in the XML document in accordance with the XML Namespaces
+Recommendation <bibref ref="XMLNAMES"/>.  The namespace URI of the
+attribute's name will be null if the <xnt
+href="&XMLNames;#NT-QName">QName</xnt> of the attribute does not have
+a prefix.</p>
+
+<note><p>In the notation of Appendix A.3 of <bibref ref="XMLNAMES"/>,
+the local part of the expanded-name corresponds to the
+<code>name</code> attribute of the <code>ExpAName</code> element; the
+namespace URI of the expanded-name corresponds to the <code>ns</code>
+attribute of the <code>ExpAName</code> element, and is null if the
+<code>ns</code> attribute of the <code>ExpAName</code> element is
+omitted.</p></note>
+
+<p>An attribute node has a <termref
+def="dt-string-value">string-value</termref>.  The <termref
+def="dt-string-value">string-value</termref> is the normalized value
+as specified by the XML Recommendation <bibref ref="XML"/>.  An
+attribute whose normalized value is a zero-length string is not
+treated specially: it results in an attribute node whose <termref
+def="dt-string-value">string-value</termref> is a zero-length
+string.</p>
+
+<note><p>It is possible for default attributes to be declared in an
+external DTD or an external parameter entity.  The XML Recommendation
+does not require an XML processor to read an external DTD or an
+external parameter unless it is validating. A stylesheet or other facility that assumes
+that the XPath tree contains default attribute values declared in an
+external DTD or parameter entity may not work with some non-validating
+XML processors.</p></note>
+
+<p>There are no attribute nodes corresponding to attributes that
+declare namespaces (see <bibref ref="XMLNAMES"/>).</p>
+
+</div2>
+
+<div2 id="namespace-nodes">
+<head>Namespace Nodes</head>
+
+<p>Each element has an associated set of namespace nodes, one for each
+distinct namespace prefix that is in scope for the element (including
+the <code>xml</code> prefix, which is implicitly declared by the XML
+Namespaces Recommendation <bibref ref="XMLNAMES"/>) and one for
+the default namespace if one is in scope for the element.  The element
+is the <termref def="dt-parent">parent</termref> of each of these
+namespace nodes; however, a namespace node is not a child of
+its parent element.  Elements never share namespace nodes: if one element
+node is not the same node as another element node, then none of the
+namespace nodes of the one element node will be the same node as the
+namespace nodes of another element node. This means that an element
+will have a namespace node:</p>
+
+<ulist>
+
+<item><p>for every attribute on the element whose name starts with
+<code>xmlns:</code>;</p></item>
+
+<item><p>for every attribute on an ancestor element whose name starts
+<code>xmlns:</code> unless the element itself or a nearer ancestor
+redeclares the prefix;</p></item>
+
+<item>
+
+<p>for an <code>xmlns</code> attribute, if the element or some
+ancestor has an <code>xmlns</code> attribute, and the value of the
+<code>xmlns</code> attribute for the nearest such element is
+non-empty</p>
+
+<note><p>An attribute <code>xmlns=""</code> <quote>undeclares</quote>
+the default namespace (see <bibref ref="XMLNAMES"/>).</p></note>
+
+</item>
+
+</ulist>
+
+<p>A namespace node has an <termref
+def="dt-expanded-name">expanded-name</termref>: the local part is
+the namespace prefix (this is empty if the namespace node is for the
+default namespace); the namespace URI is always null.</p>
+
+<p>The <termref def="dt-string-value">string-value</termref> of a
+namespace node is the namespace URI that is being bound to the
+namespace prefix; if it is relative, it must be resolved just like a
+namespace URI in an <termref
+def="dt-expanded-name">expanded-name</termref>.</p>
+
+</div2>
+
+
+<div2>
+<head>Processing Instruction Nodes</head>
+
+<p>There is a processing instruction node for every processing
+instruction, except for any processing instruction that occurs within
+the document type declaration.</p>
+
+<p>A processing instruction has an <termref
+def="dt-expanded-name">expanded-name</termref>: the local part is
+the processing instruction's target; the namespace URI is null.  The
+<termref def="dt-string-value">string-value</termref> of a processing
+instruction node is the part of the processing instruction following
+the target and any whitespace.  It does not include the terminating
+<code>?&gt;</code>.</p>
+
+<note><p>The XML declaration is not a processing instruction.
+Therefore, there is no processing instruction node corresponding to the
+XML declaration.</p></note>
+
+</div2>
+
+<div2>
+<head>Comment Nodes</head>
+
+<p>There is a comment node for every comment, except for any comment that
+occurs within the document type declaration.</p>
+
+<p>The <termref def="dt-string-value">string-value</termref> of
+comment is the content of the comment not including the opening
+<code>&lt;!--</code> or the closing <code>--&gt;</code>.</p>
+
+<p>A comment node does not have an <termref
+def="dt-expanded-name">expanded-name</termref>.</p>
+
+</div2>
+
+<div2>
+<head>Text Nodes</head>
+
+<p>Character data is grouped into text nodes.  As much character data
+as possible is grouped into each text node: a text node never has an
+immediately following or preceding sibling that is a text node.  The
+<termref def="dt-string-value">string-value</termref> of a text node
+is the character data.  A text node always has at least one character
+of data.</p>
+
+<p>Each character within a CDATA section is treated as character data.
+Thus, <code>&lt;![CDATA[&lt;]]&gt;</code> in the source document will
+treated the same as <code>&amp;lt;</code>.  Both will result in a
+single <code>&lt;</code> character in a text node in the tree.  Thus, a
+CDATA section is treated as if the <code>&lt;![CDATA[</code> and
+<code>]]&gt;</code> were removed and every occurrence of
+<code>&lt;</code> and <code>&amp;</code> were replaced by
+<code>&amp;lt;</code> and <code>&amp;amp;</code> respectively.</p>
+
+<note><p>When a text node that contains a <code>&lt;</code> character
+is written out as XML, the <code>&lt;</code> character must be escaped
+by, for example, using <code>&amp;lt;</code>, or including it in a
+CDATA section.</p></note>
+
+<p>Characters inside comments, processing instructions and attribute
+values do not produce text nodes. Line-endings in external entities
+are normalized to #xA as specified in the XML Recommendation <bibref
+ref="XML"/>.</p>
+
+<p>A text node does not have an <termref
+def="dt-expanded-name">expanded-name</termref>.</p>
+
+</div2>
+
+</div1>
+
+<div1>
+<head>Conformance</head>
+
+<p>XPath is intended primarily as a component that can be used by
+other specifications. Therefore, XPath relies on specifications that
+use XPath (such as <bibref ref="XPTR"/> and <bibref ref="XSLT"/>) to
+specify criteria for conformance of implementations of XPath and does
+not define any conformance criteria for independent implementations of
+XPath.</p>
+
+</div1>
+
+</body>
+
+<back>
+<div1>
+<head>References</head>
+<div2>
+<head>Normative References</head>
+
+<blist>
+
+<bibl id="IEEE754" key="IEEE 754">Institute of Electrical and
+Electronics Engineers. <emph>IEEE Standard for Binary Floating-Point
+Arithmetic</emph>. ANSI/IEEE Std 754-1985.</bibl>
+
+<bibl id="RFC2396" key="RFC2396">T. Berners-Lee, R. Fielding, and
+L. Masinter.  <emph>Uniform Resource Identifiers (URI): Generic
+Syntax</emph>. IETF RFC 2396. See <loc
+href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</loc>.</bibl>
+
+<bibl id="XML" key="XML">World Wide Web Consortium. <emph>Extensible
+Markup Language (XML) 1.0.</emph> W3C Recommendation. See <loc
+href="http://www.w3.org/TR/1998/REC-xml-19980210">http://www.w3.org/TR/1998/REC-xml-19980210</loc></bibl>
+
+<bibl id="XMLNAMES" key="XML Names">World Wide Web
+Consortium. <emph>Namespaces in XML.</emph> W3C Recommendation. See
+<loc
+href="http://www.w3.org/TR/REC-xml-names">http://www.w3.org/TR/REC-xml-names</loc></bibl>
+
+</blist>
+</div2>
+<div2>
+<head>Other References</head>
+
+<blist>
+
+<bibl id="CHARMOD" key="Character Model">World Wide Web Consortium.
+<emph>Character Model for the World Wide Web.</emph> W3C Working
+Draft. See <loc
+href="http://www.w3.org/TR/WD-charmod">http://www.w3.org/TR/WD-charmod</loc></bibl>
+
+<bibl id="DOM" key="DOM">World Wide Web Consortium.  <emph>Document
+Object Model (DOM) Level 1 Specification.</emph> W3C
+Recommendation. See <loc href="http://www.w3.org/TR/REC-DOM-Level-1"
+>http://www.w3.org/TR/REC-DOM-Level-1</loc></bibl>
+
+<bibl id="JLS" key="JLS">J. Gosling, B. Joy, and G. Steele.  <emph>The
+Java Language Specification</emph>. See <loc
+href="http://java.sun.com/docs/books/jls/index.html"
+>http://java.sun.com/docs/books/jls/index.html</loc>.</bibl>
+
+<bibl id="ISO10646" key="ISO/IEC 10646">ISO (International
+Organization for Standardization).  <emph>ISO/IEC 10646-1:1993,
+Information technology -- Universal Multiple-Octet Coded Character Set
+(UCS) -- Part 1: Architecture and Basic Multilingual Plane</emph>.
+International Standard. See <loc
+href="http://www.iso.ch/cate/d18741.html">http://www.iso.ch/cate/d18741.html</loc>.</bibl>
+
+<bibl id="TEI" key="TEI">C.M. Sperberg-McQueen, L. Burnard
+<emph>Guidelines for Electronic Text Encoding and
+Interchange</emph>. See <loc href="http://etext.virginia.edu/TEI.html"
+>http://etext.virginia.edu/TEI.html</loc>.</bibl>
+
+<bibl id="UNICODE" key="Unicode">Unicode Consortium. <emph>The Unicode
+Standard</emph>.  See <loc
+href="http://www.unicode.org/unicode/standard/standard.html"
+>http://www.unicode.org/unicode/standard/standard.html</loc>.</bibl>
+
+<bibl id="XINFO" key="XML Infoset">World Wide Web
+Consortium. <emph>XML Information Set.</emph> W3C Working Draft. See
+<loc
+href="http://www.w3.org/TR/xml-infoset">http://www.w3.org/TR/xml-infoset</loc>
+</bibl>
+
+<bibl id="XPTR" key="XPointer">World Wide Web Consortium. <emph>XML
+Pointer Language (XPointer).</emph> W3C Working Draft. See <loc
+href="http://www.w3.org/TR/WD-xptr"
+>http://www.w3.org/TR/WD-xptr</loc></bibl>
+
+<bibl id="XQL" key="XQL">J. Robie, J. Lapp, D. Schach.
+<emph>XML Query Language (XQL)</emph>. See
+<loc href="http://www.w3.org/TandS/QL/QL98/pp/xql.html"
+>http://www.w3.org/TandS/QL/QL98/pp/xql.html</loc></bibl>
+
+<bibl id="XSLT" key="XSLT">World Wide Web Consortium.  <emph>XSL
+Transformations (XSLT).</emph> W3C Recommendation.  See <loc
+href="http://www.w3.org/TR/xslt"
+>http://www.w3.org/TR/xslt</loc></bibl>
+
+</blist>
+
+</div2>
+</div1>
+
+<inform-div1 id="infoset">
+<head>XML Information Set Mapping</head>
+
+<p>The nodes in the XPath data model can be derived from the
+information items provided by the XML Information Set <bibref
+ref="XINFO"/> as follows:</p>
+
+<note><p>A new version of the XML Information Set Working Draft, which
+will replace the May 17 version, was close to completion at the time
+when the preparation of this version of XPath was completed and was
+expected to be released at the same time or shortly after the release
+of this version of XPath.  The mapping is given for this new version
+of the XML Information Set Working Draft. If the new version of the
+XML Information Set Working has not yet been released, W3C members may
+consult the internal Working Group version <loc
+href="http://www.w3.org/XML/Group/1999/09/WD-xml-infoset-19990915.html">
+http://www.w3.org/XML/Group/1999/09/WD-xml-infoset-19990915.html</loc>
+(<loc href="http://cgi.w3.org/MemberAccess/">members
+only</loc>).</p></note>
+
+<ulist>
+
+<item><p>The root node comes from the document information item.  The
+children of the root node come from the <emph
+role="infoset-property">children</emph> and <emph
+role="infoset-property">children - comments</emph>
+properties.</p></item>
+
+<item><p>An element node comes from an element information item.  The
+children of an element node come from the <emph
+role="infoset-property">children</emph> and <emph
+role="infoset-property">children - comments</emph> properties. The
+attributes of an element node come from the <emph
+role="infoset-property">attributes</emph> property.  The namespaces
+of an element node come from the <emph
+role="infoset-property">in-scope namespaces</emph> property.  The
+local part of the <termref
+def="dt-expanded-name">expanded-name</termref> of the element node
+comes from the <emph role="infoset-property">local name</emph>
+property.  The namespace URI of the <termref
+def="dt-expanded-name">expanded-name</termref> of the element node
+comes from the <emph role="infoset-property">namespace URI</emph>
+property. The unique ID of the element node comes from the <emph
+role="infoset-property">children</emph> property of the attribute
+information item in the <emph
+role="infoset-property">attributes</emph> property that has an <emph
+role="infoset-property">attribute type</emph> property equal to
+<code>ID</code>.</p></item>
+
+<item><p>An attribute node comes from an attribute information item.
+The local part of the <termref
+def="dt-expanded-name">expanded-name</termref> of the attribute node
+comes from the <emph role="infoset-property">local name</emph>
+property.  The namespace URI of the <termref
+def="dt-expanded-name">expanded-name</termref> of the attribute node
+comes from the <emph role="infoset-property">namespace URI</emph>
+property. The <termref def="dt-string-value">string-value</termref> of
+the node comes from concatenating the <emph
+role="infoset-property">character code</emph> property of each member
+of the <emph role="infoset-property">children</emph>
+property.</p></item>
+
+<item><p>A text node comes from a sequence of one or more consecutive
+character information items.  The <termref
+def="dt-string-value">string-value</termref> of the node comes from
+concatenating the <emph role="infoset-property">character code</emph>
+property of each of the character information items.</p></item>
+
+<item><p>A processing instruction node comes from a processing
+instruction information item.  The local part of the <termref
+def="dt-expanded-name">expanded-name</termref> of the node comes from
+the <emph role="infoset-property">target</emph> property. (The
+namespace URI part of the <termref
+def="dt-expanded-name">expanded-name</termref> of the node is null.)
+The <termref def="dt-string-value">string-value</termref> of the node
+comes from the <emph role="infoset-property">content</emph>
+property. There are no processing instruction nodes for processing
+instruction items that are children of document type declaration
+information item.</p></item>
+
+<item><p>A comment node comes from a comment information item.  The
+<termref def="dt-string-value">string-value</termref> of the node
+comes from the <emph role="infoset-property">content</emph> property.
+There are no comment nodes for comment information items that are
+children of document type declaration information item.</p></item>
+
+<item><p>A namespace node comes from a namespace declaration
+information item.  The local part of the <termref
+def="dt-expanded-name">expanded-name</termref> of the node comes from
+the <emph role="infoset-property">prefix</emph> property.  (The
+namespace URI part of the <termref
+def="dt-expanded-name">expanded-name</termref> of the node is null.)
+The <termref def="dt-string-value">string-value</termref> of the node
+comes from the <emph role="infoset-property">namespace URI</emph>
+property.</p></item>
+
+</ulist>
+
+</inform-div1>
+
+</back>
+</spec>
diff --git a/test/tests/contrib/xsltc/mk/mk055.xsl b/test/tests/contrib/xsltc/mk/mk055.xsl
new file mode 100644
index 0000000..6f472b4
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk055.xsl
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<xsl:stylesheet
+        version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	
+  <!-- Test FileName: mk055.xsl -->
+  <!-- Source Document: XSLT Programmer's Reference by Michael Kay -->
+  <!-- Example: REC-xpath-19991116.xml, spec.dtd, xpath.xsl -->
+  <!-- Chapter/Page: 9-588 -->
+  <!-- Purpose: Formatting the XPath Specification -->
+  
+<xsl:import href="mk054.xsl"/>
+<xsl:template match="proto">
+<p><a name="function-{@name}">
+<b>Function: </b>
+<i><xsl:value-of select="@return-type"/></i>
+<xsl:text> </xsl:text>
+<b><xsl:value-of select="@name"/></b>
+<xsl:text>(</xsl:text>
+<xsl:for-each select="arg">
+<xsl:if test="not(position()=1)">
+<xsl:text>, </xsl:text>
+</xsl:if>
+<i><xsl:value-of select="@type"/></i>
+<xsl:choose>
+<xsl:when test="@occur='rep'">*</xsl:when>
+<xsl:when test="@occur='opt'">?</xsl:when>
+</xsl:choose>
+</xsl:for-each>
+<xsl:text>)</xsl:text>
+</a></p>
+</xsl:template>
+<xsl:template match="function">
+<b><a href="#function-{.}"><xsl:apply-templates/></a></b>
+</xsl:template>
+<xsl:template match="xfunction">
+<b><a href="{@href}#function-{.}"><xsl:apply-templates/></a></b>
+</xsl:template>
+
+<!-- Support for <loc role="available-format">...</loc> -->
+<xsl:template match="publoc/loc[@role='available-format']">
+  <xsl:if test="not(preceding-sibling::loc[@role='available-format'])">
+    <xsl:text>(available in </xsl:text>
+  </xsl:if>
+  <a href="{@href}"><xsl:apply-templates/></a>
+  <xsl:variable name="nf"
+    select="count(following-sibling::loc[@role='available-format'])"/>
+  <xsl:choose>
+   <xsl:when test="not($nf)">
+     <xsl:text>)</xsl:text>
+   </xsl:when>
+   <xsl:when test="$nf = 1">
+     <xsl:choose>
+       <xsl:when test="count(../loc[@role='available-format'])=2">
+	 <xsl:text> or </xsl:text>
+       </xsl:when>
+       <xsl:otherwise>
+	 <xsl:text>, or </xsl:text>
+       </xsl:otherwise>
+     </xsl:choose>
+   </xsl:when>
+   <xsl:otherwise>
+     <xsl:text>, </xsl:text>
+   </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk056.xml b/test/tests/contrib/xsltc/mk/mk056.xml
new file mode 100644
index 0000000..6dfaf68
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk056.xml
@@ -0,0 +1,12724 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<!-- $Id$ -->
+
+<!DOCTYPE spec SYSTEM "spec.dtd" [
+
+<!ENTITY XML "http://www.w3.org/TR/REC-xml">
+
+<!ENTITY XMLNames "http://www.w3.org/TR/REC-xml-names">
+
+<!ENTITY XSLT.ns "http://www.w3.org/1999/XSL/Transform">
+
+<!ENTITY XSLTA.ns "http://www.w3.org/1999/XSL/TransformAlias">
+
+<!ENTITY XSLFO.ns "http://www.w3.org/1999/XSL/Format">
+
+<!ENTITY XHTML.ns "http://www.w3.org/TR/xhtml1/strict">
+
+<!ENTITY year "1999">
+
+<!ENTITY month "November">
+
+<!ENTITY MM "11">
+
+<!ENTITY day "16">
+
+<!ENTITY DD "16">
+
+<!ENTITY YYYYMMDD "&year;&MM;&DD;">
+
+<!ENTITY LEV "REC">
+
+<!ENTITY XPath "http://www.w3.org/TR/xpath">
+
+<!ATTLIST xfunction href CDATA "&XPath;">
+
+<!-- DTD customizations -->
+
+<!ELEMENT proto (arg*)>
+
+<!ATTLIST proto
+
+  name NMTOKEN #REQUIRED
+
+  return-type (number|string|boolean|node-set|object) #REQUIRED
+
+>
+
+<!ELEMENT arg EMPTY>
+
+<!ATTLIST arg
+
+  type (number|string|boolean|node-set|object) #REQUIRED
+
+  occur (opt|rep) #IMPLIED
+
+>
+
+<!ELEMENT function (#PCDATA)>
+
+<!ELEMENT xfunction (#PCDATA)>
+
+<!ATTLIST xfunction href CDATA #REQUIRED>
+
+<!ELEMENT e:element-syntax
+
+  (e:in-category*, e:attribute*, (e:empty|e:text|e:element|e:model|e:sequence|e:choice))
+
+>
+
+<!ATTLIST e:element-syntax
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+  name NMTOKEN #REQUIRED
+
+>
+
+<!ELEMENT e:in-category EMPTY>
+
+<!ATTLIST
+
+  e:in-category name NMTOKEN #REQUIRED
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:attribute (e:attribute-value-template|(e:constant|e:data-type)+)>
+
+<!ATTLIST e:attribute
+
+  name NMTOKEN #REQUIRED
+
+  required (yes) #IMPLIED
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:attribute-value-template (e:constant|e:data-type)+>
+
+<!ATTLIST e:attribute-value-template
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:constant EMPTY>
+
+<!ATTLIST
+
+  e:constant value CDATA #REQUIRED
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:data-type EMPTY>
+
+<!ATTLIST e:data-type
+
+  name NMTOKEN #REQUIRED
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:empty EMPTY>
+
+<!ATTLIST e:empty
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:text EMPTY>
+
+<!ATTLIST e:text
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:element EMPTY>
+
+<!ATTLIST e:element
+
+  name NMTOKEN #REQUIRED
+
+  repeat (zero-or-one|zero-or-more|one-or-more) #IMPLIED
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:model EMPTY>
+
+<!ATTLIST e:model
+
+  name NMTOKEN #REQUIRED
+
+  repeat (zero-or-one|zero-or-more|one-or-more) #IMPLIED
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:sequence (e:element|e:model|e:choice)+>
+
+<!ATTLIST e:sequence
+
+  repeat (zero-or-one|zero-or-more|one-or-more) #IMPLIED
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:choice (e:element|e:model|e:sequence)+>
+
+<!ATTLIST e:choice
+
+  repeat (zero-or-one|zero-or-more|one-or-more) #IMPLIED
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ELEMENT e:element-syntax-summary EMPTY>
+
+<!ATTLIST e:element-syntax-summary 
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+<!ENTITY % local.illus.class "|proto|e:element-syntax|e:element-syntax-summary">
+
+<!ENTITY % local.tech.class "|function|xfunction">
+
+<!ENTITY % local.loc.class "|var">
+
+<!ELEMENT var (#PCDATA)>
+
+<!ATTLIST spec
+
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+
+>
+
+]>
+
+<spec xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">
+
+<header>
+
+<title>XSL Transformations (XSLT)</title>
+
+<version>Version 1.0</version>
+
+<w3c-designation>&LEV;-xslt-&YYYYMMDD;</w3c-designation>
+
+<w3c-doctype>W3C Recommendation</w3c-doctype>
+
+<pubdate><day>&day;</day><month>&month;</month><year>&year;</year></pubdate>
+
+<publoc>
+
+<loc href="http://www.w3.org/TR/&year;/&LEV;-xslt-&YYYYMMDD;"
+
+          >http://www.w3.org/TR/&year;/&LEV;-xslt-&YYYYMMDD;</loc>
+
+<loc role="available-format"
+
+href="http://www.w3.org/TR/&year;/&LEV;-xslt-&YYYYMMDD;.xml">XML</loc>
+
+<loc role="available-format"
+
+href="http://www.w3.org/TR/&year;/&LEV;-xslt-&YYYYMMDD;.html">HTML</loc>
+
+<!--
+
+<loc href="http://www.w3.org/TR/&year;/&LEV;-xslt-&YYYYMMDD;.pdf"
+
+          >http://www.w3.org/TR/&year;/&LEV;-xslt-&YYYYMMDD;.pdf</loc>
+
+-->
+
+</publoc>
+
+<latestloc>
+
+<loc href="http://www.w3.org/TR/xslt"
+
+          >http://www.w3.org/TR/xslt</loc>
+
+</latestloc>
+
+<prevlocs>
+
+<loc href="http://www.w3.org/TR/1999/PR-xslt-19991008"
+
+          >http://www.w3.org/TR/1999/PR-xslt-19991008</loc>
+
+<loc href="http://www.w3.org/1999/08/WD-xslt-19990813"
+
+          >http://www.w3.org/1999/08/WD-xslt-19990813</loc>
+
+<loc href="http://www.w3.org/1999/07/WD-xslt-19990709"
+
+          >http://www.w3.org/1999/07/WD-xslt-19990709</loc>
+
+<loc href="http://www.w3.org/TR/1999/WD-xslt-19990421"
+
+          >http://www.w3.org/TR/1999/WD-xslt-19990421</loc>
+
+<loc href="http://www.w3.org/TR/1998/WD-xsl-19981216"
+
+          >http://www.w3.org/TR/1998/WD-xsl-19981216</loc>
+
+<loc href="http://www.w3.org/TR/1998/WD-xsl-19980818"
+
+          >http://www.w3.org/TR/1998/WD-xsl-19980818</loc>
+
+</prevlocs>
+
+<authlist>
+
+<author>
+
+<name>James Clark</name>
+
+<email href="mailto:jjc@jclark.com">jjc@jclark.com</email>
+
+</author>
+
+</authlist>
+
+
+
+<status>
+
+
+
+<p>This document has been reviewed by W3C Members and other interested
+
+parties and has been endorsed by the Director as a W3C <loc
+
+href="http://www.w3.org/Consortium/Process/#RecsW3C">Recommendation</loc>. It
+
+is a stable document and may be used as reference material or cited as
+
+a normative reference from other documents. W3C's role in making the
+
+Recommendation is to draw attention to the specification and to
+
+promote its widespread deployment. This enhances the functionality and
+
+interoperability of the Web.</p>
+
+
+
+<p>The list of known errors in this specification is available at
+
+<loc href="http://www.w3.org/&year;/&MM;/&LEV;-xslt-&YYYYMMDD;-errata"
+
+>http://www.w3.org/&year;/&MM;/&LEV;-xslt-&YYYYMMDD;-errata</loc>.</p>
+
+
+
+<p>Comments on this specification may be sent to <loc
+
+href="mailto:xsl-editors@w3.org">xsl-editors@w3.org</loc>; <loc
+
+href="http://lists.w3.org/Archives/Public/xsl-editors">archives</loc>
+
+of the comments are available.  Public discussion of XSL, including
+
+XSL Transformations, takes place on the <loc
+
+href="http://www.mulberrytech.com/xsl/xsl-list/index.html">XSL-List</loc>
+
+mailing list.</p>
+
+
+
+<p>The English version of this specification is the only normative
+
+version. However, for translations of this document, see <loc
+
+href="http://www.w3.org/Style/XSL/translations.html"
+
+>http://www.w3.org/Style/XSL/translations.html</loc>.</p>
+
+
+
+<p>A list of current W3C Recommendations and other technical documents
+
+can be found at <loc
+
+href="http://www.w3.org/TR">http://www.w3.org/TR</loc>.</p>
+
+
+
+<p>This specification has been produced as part of the <loc
+
+href="http://www.w3.org/Style/Activity">W3C Style activity</loc>.</p>
+
+
+
+</status>
+
+
+
+<abstract>
+
+
+
+<p>This specification defines the syntax and semantics of XSLT, which
+
+is a language for transforming XML documents into other XML
+
+documents.</p>
+
+
+
+<p>XSLT is designed for use as part of XSL, which is a stylesheet
+
+language for XML. In addition to XSLT, XSL includes an XML vocabulary
+
+for specifying formatting.  XSL specifies the styling of an XML
+
+document by using XSLT to describe how the document is transformed
+
+into another XML document that uses the formatting vocabulary.</p>
+
+
+
+<p>XSLT is also designed to be used independently of XSL.  However,
+
+XSLT is not intended as a completely general-purpose XML
+
+transformation language.  Rather it is designed primarily for the
+
+kinds of transformations that are needed when XSLT is used as part of
+
+XSL.</p>
+
+
+
+</abstract>
+
+
+
+<langusage>
+
+<language id="EN">English</language>
+
+<language id="ebnf">EBNF</language>
+
+</langusage>
+
+<revisiondesc>
+
+<slist>
+
+<sitem>See RCS log for revision history.</sitem>
+
+</slist>
+
+</revisiondesc>
+
+</header>
+
+<body>
+
+<div1>
+
+<head>Introduction</head>
+
+
+
+<p>This specification defines the syntax and semantics of the XSLT
+
+language.  A transformation in the XSLT language is expressed as a
+
+well-formed XML document <bibref ref="XML"/> conforming to the
+
+Namespaces in XML Recommendation <bibref ref="XMLNAMES"/>, which may
+
+include both elements that are defined by XSLT and elements that are
+
+not defined by XSLT.  <termdef id="dt-xslt-namespace" term="XSLT
+
+Namespace">XSLT-defined elements are distinguished by belonging to a
+
+specific XML namespace (see <specref ref="xslt-namespace"/>), which is
+
+referred to in this specification as the <term>XSLT
+
+namespace</term>.</termdef> Thus this specification is a definition of
+
+the syntax and semantics of the XSLT namespace.</p>
+
+
+
+<p>A transformation expressed in XSLT describes rules for transforming
+
+a source tree into a result tree.  The transformation is achieved by
+
+associating patterns with templates.  A pattern is matched against
+
+elements in the source tree.  A template is instantiated to create
+
+part of the result tree.  The result tree is separate from the source
+
+tree.  The structure of the result tree can be completely different
+
+from the structure of the source tree. In constructing the result
+
+tree, elements from the source tree can be filtered and reordered, and
+
+arbitrary structure can be added.</p>
+
+
+
+<p>A transformation expressed in XSLT is called a stylesheet.  This is
+
+because, in the case when XSLT is transforming into the XSL formatting
+
+vocabulary, the transformation functions as a stylesheet.</p>
+
+
+
+<p>This document does not specify how an XSLT stylesheet is associated
+
+with an XML document.  It is recommended that XSL processors support
+
+the mechanism described in <bibref ref="XMLSTYLE"/>.  When this or any
+
+other mechanism yields a sequence of more than one XSLT stylesheet to
+
+be applied simultaneously to a XML document, then the effect
+
+should be the same as applying a single stylesheet that imports each
+
+member of the sequence in order (see <specref ref="import"/>).</p>
+
+
+
+<p>A stylesheet contains a set of template rules.  A template rule has
+
+two parts: a pattern which is matched against nodes in the source tree
+
+and a template which can be instantiated to form part of the result
+
+tree.  This allows a stylesheet to be applicable to a wide class of
+
+documents that have similar source tree structures.</p>
+
+
+
+<p>A template is instantiated for a particular source element
+
+to create part of the result tree. A template can contain elements
+
+that specify literal result element structure.  A template can also
+
+contain elements from the XSLT namespace
+
+that are instructions for creating result tree
+
+fragments.  When a template is instantiated, each instruction is
+
+executed and replaced by the result tree fragment that it creates.
+
+Instructions can select and process descendant source elements.  Processing a
+
+descendant element creates a result tree fragment by finding the
+
+applicable template rule and instantiating its template. Note
+
+that elements are only processed when they have been selected by the
+
+execution of an instruction.  The result tree is constructed by
+
+finding the template rule for the root node and instantiating
+
+its template.</p>
+
+
+
+<p>In the process of finding the applicable template rule, more
+
+than one template rule may have a pattern that matches a given
+
+element. However, only one template rule will be applied. The
+
+method for deciding which template rule to apply is described
+
+in <specref ref="conflict"/>.</p>
+
+
+
+<p>A single template by itself has considerable power: it can create
+
+structures of arbitrary complexity; it can pull string values out of
+
+arbitrary locations in the source tree; it can generate structures
+
+that are repeated according to the occurrence of elements in the
+
+source tree.  For simple transformations where the structure of the
+
+result tree is independent of the structure of the source tree, a
+
+stylesheet can often consist of only a single template, which
+
+functions as a template for the complete result tree.  Transformations
+
+on XML documents that represent data are often of this kind (see
+
+<specref ref="data-example"/>). XSLT allows a simplified syntax for
+
+such stylesheets (see <specref ref="result-element-stylesheet"/>).</p>
+
+
+
+<p>When a template is instantiated, it is always instantiated with
+
+respect to a <termdef id="dt-current-node" term="Current
+
+Node"><term>current node</term></termdef> and a <termdef
+
+id="dt-current-node-list" term="Current Node List"><term>current node
+
+list</term></termdef>. The current node is always a member of the
+
+current node list.  Many operations in XSLT are relative to the
+
+current node. Only a few instructions change the current node list or
+
+the current node (see <specref ref="rules"/> and <specref
+
+ref="for-each"/>); during the instantiation of one of these
+
+instructions, the current node list changes to a new list of nodes and
+
+each member of this new list becomes the current node in turn; after
+
+the instantiation of the instruction is complete, the current node and
+
+current node list revert to what they were before the instruction was
+
+instantiated.</p>
+
+
+
+<p>XSLT makes use of the expression language defined by <bibref
+
+ref="XPATH"/> for selecting elements for processing, for conditional
+
+processing and for generating text.</p>
+
+
+
+<p>XSLT provides two <quote>hooks</quote> for extending the language,
+
+one hook for extending the set of instruction elements used in
+
+templates and one hook for extending the set of functions used in
+
+XPath expressions.  These hooks are both based on XML namespaces.
+
+This version of XSLT does not define a mechanism for implementing the
+
+hooks. See <specref ref="extension"/>.</p>
+
+
+
+<note><p>The XSL WG intends to define such a mechanism in a future
+
+version of this specification or in a separate
+
+specification.</p></note>
+
+
+
+<p>The element syntax summary notation used to describe the syntax of
+
+XSLT-defined elements is described in <specref ref="notation"/>.</p>
+
+
+
+<p>The MIME media types <code>text/xml</code> and
+
+<code>application/xml</code> <bibref ref="RFC2376"/> should be used
+
+for XSLT stylesheets.  It is possible that a media type will be
+
+registered specifically for XSLT stylesheets; if and when it is, that
+
+media type may also be used.</p>
+
+
+
+</div1>
+
+
+
+<div1>
+
+<head>Stylesheet Structure</head>
+
+
+
+<div2 id="xslt-namespace">
+
+<head>XSLT Namespace</head>
+
+
+
+<p>The XSLT namespace has the URI <code>&XSLT.ns;</code>.</p>
+
+
+
+<note><p>The <code>1999</code> in the URI indicates the year in which
+
+the URI was allocated by the W3C.  It does not indicate the version of
+
+XSLT being used, which is specified by attributes (see <specref
+
+ref="stylesheet-element"/> and <specref
+
+ref="result-element-stylesheet"/>).</p></note>
+
+
+
+<p>XSLT processors must use the XML namespaces mechanism <bibref
+
+ref="XMLNAMES"/> to recognize elements and attributes from this
+
+namespace. Elements from the XSLT namespace are recognized only in the
+
+stylesheet not in the source document. The complete list of
+
+XSLT-defined elements is specified in <specref
+
+ref="element-syntax-summary"/>.  Vendors must not extend the XSLT
+
+namespace with additional elements or attributes. Instead, any
+
+extension must be in a separate namespace.  Any namespace that is used
+
+for additional instruction elements must be identified by means of the
+
+extension element mechanism specified in <specref
+
+ref="extension-element"/>.</p>
+
+
+
+<p>This specification uses a prefix of <code>xsl:</code> for referring
+
+to elements in the XSLT namespace. However, XSLT stylesheets are free
+
+to use any prefix, provided that there is a namespace declaration that
+
+binds the prefix to the URI of the XSLT namespace.</p>
+
+
+
+<p>An element from the XSLT namespace may have any attribute not from
+
+the XSLT namespace, provided that the <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref> of the
+
+attribute has a non-null namespace URI.  The presence of such
+
+attributes must not change the behavior of XSLT elements and functions
+
+defined in this document. Thus, an XSLT processor is always free to
+
+ignore such attributes, and must ignore such attributes without giving
+
+an error if it does not recognize the namespace URI. Such attributes
+
+can provide, for example, unique identifiers, optimization hints, or
+
+documentation.</p>
+
+
+
+<p>It is an error for an element from the XSLT namespace to have
+
+attributes with expanded-names that have null namespace URIs
+
+(i.e. attributes with unprefixed names) other than attributes defined
+
+for the element in this document.</p>
+
+
+
+<note><p>The conventions used for the names of XSLT elements,
+
+attributes and functions are that names are all lower-case, use
+
+hyphens to separate words, and use abbreviations only if they already
+
+appear in the syntax of a related language such as XML or
+
+HTML.</p></note>
+
+
+
+
+
+</div2>
+
+
+
+<div2 id="stylesheet-element">
+
+<head>Stylesheet Element</head>
+
+
+
+<e:element-syntax name="stylesheet">
+
+  <e:attribute name="id">
+
+    <e:data-type name="id"/>
+
+  </e:attribute>
+
+  <e:attribute name="extension-element-prefixes">
+
+    <e:data-type name="tokens"/>
+
+  </e:attribute>
+
+  <e:attribute name="exclude-result-prefixes">
+
+    <e:data-type name="tokens"/>
+
+  </e:attribute>
+
+  <e:attribute name="version" required="yes">
+
+    <e:data-type name="number"/>
+
+  </e:attribute>
+
+  <e:sequence>
+
+    <e:element repeat="zero-or-more" name="import"/>
+
+    <e:model name="top-level-elements"/>
+
+  </e:sequence>
+
+</e:element-syntax>
+
+
+
+<e:element-syntax name="transform">
+
+  <e:attribute name="id">
+
+    <e:data-type name="id"/>
+
+  </e:attribute>
+
+  <e:attribute name="extension-element-prefixes">
+
+    <e:data-type name="tokens"/>
+
+  </e:attribute>
+
+  <e:attribute name="exclude-result-prefixes">
+
+    <e:data-type name="tokens"/>
+
+  </e:attribute>
+
+  <e:attribute name="version" required="yes">
+
+    <e:data-type name="number"/>
+
+  </e:attribute>
+
+  <e:sequence>
+
+    <e:element repeat="zero-or-more" name="import"/>
+
+    <e:model name="top-level-elements"/>
+
+  </e:sequence>
+
+</e:element-syntax>
+
+
+
+<p>A stylesheet is represented by an <code>xsl:stylesheet</code>
+
+element in an XML document.  <code>xsl:transform</code> is allowed as
+
+a synonym for <code>xsl:stylesheet</code>.</p>
+
+
+
+<p>An <code>xsl:stylesheet</code> element must have a
+
+<code>version</code> attribute, indicating the version of XSLT that
+
+the stylesheet requires.  For this version of XSLT, the value should
+
+be <code>1.0</code>.  When the value is not equal to <code>1.0</code>,
+
+forwards-compatible processing mode is enabled (see <specref
+
+ref="forwards"/>).</p>
+
+
+
+<p>The <code>xsl:stylesheet</code> element may contain the following types
+
+of elements:</p>
+
+<ulist>
+
+<item><p><code>xsl:import</code></p></item>
+
+<item><p><code>xsl:include</code></p></item>
+
+<item><p><code>xsl:strip-space</code></p></item>
+
+<item><p><code>xsl:preserve-space</code></p></item>
+
+<item><p><code>xsl:output</code></p></item>
+
+<item><p><code>xsl:key</code></p></item>
+
+<item><p><code>xsl:decimal-format</code></p></item>
+
+<item><p><code>xsl:namespace-alias</code></p></item>
+
+<item><p><code>xsl:attribute-set</code></p></item>
+
+<item><p><code>xsl:variable</code></p></item>
+
+<item><p><code>xsl:param</code></p></item>
+
+<item><p><code>xsl:template</code></p></item>
+
+</ulist>
+
+
+
+<p><termdef id="dt-top-level" term="Top-level">An element occurring as
+
+a child of an <code>xsl:stylesheet</code> element is called a
+
+<term>top-level</term> element.</termdef></p>
+
+
+
+<p>This example shows the structure of a stylesheet.  Ellipses
+
+(<code>...</code>) indicate where attribute values or content have
+
+been omitted.  Although this example shows one of each type of allowed
+
+element, stylesheets may contain zero or more of each of these
+
+elements.</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="&XSLT.ns;"><![CDATA[
+
+  <xsl:import href="..."/>
+
+
+
+  <xsl:include href="..."/>
+
+
+
+  <xsl:strip-space elements="..."/>
+
+  
+
+  <xsl:preserve-space elements="..."/>
+
+
+
+  <xsl:output method="..."/>
+
+
+
+  <xsl:key name="..." match="..." use="..."/>
+
+
+
+  <xsl:decimal-format name="..."/>
+
+
+
+  <xsl:namespace-alias stylesheet-prefix="..." result-prefix="..."/>
+
+
+
+  <xsl:attribute-set name="...">
+
+    ...
+
+  </xsl:attribute-set>
+
+
+
+  <xsl:variable name="...">...</xsl:variable>
+
+
+
+  <xsl:param name="...">...</xsl:param>
+
+
+
+  <xsl:template match="...">
+
+    ...
+
+  </xsl:template>
+
+
+
+  <xsl:template name="...">
+
+    ...
+
+  </xsl:template>
+
+
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<p>The order in which the children of the <code>xsl:stylesheet</code>
+
+element occur is not significant except for <code>xsl:import</code>
+
+elements and for error recovery.  Users are free to order the elements
+
+as they prefer, and stylesheet creation tools need not provide control
+
+over the order in which the elements occur.</p>
+
+
+
+<p>In addition, the <code>xsl:stylesheet</code> element may contain
+
+any element not from the XSLT namespace, provided that the
+
+expanded-name of the element has a non-null namespace URI.  The presence of
+
+such top-level elements must not change the behavior of XSLT elements
+
+and functions defined in this document; for example, it would not be
+
+permitted for such a top-level element to specify that
+
+<code>xsl:apply-templates</code> was to use different rules to resolve
+
+conflicts. Thus, an XSLT processor is always free to ignore such
+
+top-level elements, and must ignore a top-level element without giving
+
+an error if it does not recognize the namespace URI. Such elements can
+
+provide, for example,</p>
+
+
+
+<ulist>
+
+
+
+<item><p>information used by extension elements or extension functions
+
+(see <specref ref="extension"/>),</p></item>
+
+
+
+<item><p>information about what to do with the result tree,</p></item>
+
+
+
+<item><p>information about how to obtain the source tree,</p></item>
+
+
+
+<item><p>metadata about the stylesheet,</p></item>
+
+
+
+<item><p>structured documentation for the stylesheet.</p></item>
+
+
+
+</ulist>
+
+
+
+</div2>
+
+
+
+<div2 id="result-element-stylesheet">
+
+<head>Literal Result Element as Stylesheet</head>
+
+
+
+<p>A simplified syntax is allowed for stylesheets that consist of only
+
+a single template for the root node.  The stylesheet may consist of
+
+just a literal result element (see <specref
+
+ref="literal-result-element"/>).  Such a stylesheet is equivalent to a
+
+stylesheet with an <code>xsl:stylesheet</code> element containing a
+
+template rule containing the literal result element; the template rule
+
+has a match pattern of <code>/</code>. For example</p>
+
+
+
+<eg>&lt;html xsl:version="1.0"
+
+      xmlns:xsl="&XSLT.ns;"
+
+      xmlns="&XHTML.ns;"><![CDATA[
+
+  <head>
+
+    <title>Expense Report Summary</title>
+
+  </head>
+
+  <body>
+
+    <p>Total Amount: <xsl:value-of select="expense-report/total"/></p>
+
+  </body>
+
+</html>]]></eg>
+
+
+
+<p>has the same meaning as</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="&XSLT.ns;"
+
+                xmlns="&XHTML.ns;"><![CDATA[
+
+<xsl:template match="/">
+
+<html>
+
+  <head>
+
+    <title>Expense Report Summary</title>
+
+  </head>
+
+  <body>
+
+    <p>Total Amount: <xsl:value-of select="expense-report/total"/></p>
+
+  </body>
+
+</html>
+
+</xsl:template>
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<p>A literal result element that is the document element of a
+
+stylesheet must have an <code>xsl:version</code> attribute, which
+
+indicates the version of XSLT that the stylesheet requires.  For this
+
+version of XSLT, the value should be <code>1.0</code>; the value must
+
+be a <xnt href="&XPath;#NT-Number">Number</xnt>.  Other literal result
+
+elements may also have an <code>xsl:version</code> attribute. When the
+
+<code>xsl:version</code> attribute is not equal to <code>1.0</code>,
+
+forwards-compatible processing mode is enabled (see <specref
+
+ref="forwards"/>).</p>
+
+
+
+<p>The allowed content of a literal result element when used as a
+
+stylesheet is no different from when it occurs within a
+
+stylesheet. Thus, a literal result element used as a stylesheet cannot
+
+contain <termref def="dt-top-level">top-level</termref> elements.</p>
+
+
+
+<p>In some situations, the only way that a system can recognize that an
+
+XML document needs to be processed by an XSLT processor as an XSLT
+
+stylesheet is by examining the XML document itself.  Using the
+
+simplified syntax makes this harder.</p>
+
+
+
+<note><p>For example, another XML language (AXL) might also use an
+
+<code>axl:version</code> on the document element to indicate that an
+
+XML document was an AXL document that required processing by an AXL
+
+processor; if a document had both an <code>axl:version</code>
+
+attribute and an <code>xsl:version</code> attribute, it would be
+
+unclear whether the document should be processed by an XSLT processor
+
+or an AXL processor.</p></note>
+
+
+
+<p>Therefore, the simplified syntax should not be used for XSLT
+
+stylesheets that may be used in such a situation.  This situation can,
+
+for example, arise when an XSLT stylesheet is transmitted as a message
+
+with a MIME media type of <code>text/xml</code> or
+
+<code>application/xml</code> to a recipient that will use the MIME
+
+media type to determine how the message is processed.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="qname">
+
+<head>Qualified Names</head>
+
+
+
+<p>The name of an internal XSLT object, specifically a named template
+
+(see <specref ref="named-templates"/>), a mode (see <specref
+
+ref="modes"/>), an attribute set (see <specref
+
+ref="attribute-sets"/>), a key (see <specref ref="key"/>), a
+
+decimal-format (see <specref ref="format-number"/>), a variable or a
+
+parameter (see <specref ref="variables"/>) is specified as a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>.  If it has a prefix, then the
+
+prefix is expanded into a URI reference using the namespace
+
+declarations in effect on the attribute in which the name occurs.  The
+
+<xtermref href="&XPath;#dt-expanded-name">expanded-name</xtermref>
+
+consisting of the local part of the name and the possibly null URI
+
+reference is used as the name of the object.  The default namespace is
+
+<emph>not</emph> used for unprefixed names.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="forwards">
+
+<head>Forwards-Compatible Processing</head>
+
+
+
+<p>An element enables forwards-compatible mode for itself, its
+
+attributes, its descendants and their attributes if either it is an
+
+<code>xsl:stylesheet</code> element whose <code>version</code>
+
+attribute is not equal to <code>1.0</code>, or it is a literal result
+
+element that has an <code>xsl:version</code> attribute whose value is
+
+not equal to <code>1.0</code>, or it is a literal result element that
+
+does not have an <code>xsl:version</code> attribute and that is the
+
+document element of a stylesheet using the simplified syntax (see
+
+<specref ref="result-element-stylesheet"/>).  A literal result element
+
+that has an <code>xsl:version</code> attribute whose value is equal to
+
+<code>1.0</code> disables forwards-compatible mode for itself, its
+
+attributes, its descendants and their attributes.</p>
+
+
+
+<p>If an element is processed in forwards-compatible mode, then:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>if it is a <termref def="dt-top-level">top-level</termref>
+
+element and XSLT 1.0 does not allow such elements as top-level
+
+elements, then the element must be ignored along with its
+
+content;</p></item>
+
+
+
+<item><p>if it is an element in a template and XSLT 1.0 does not allow
+
+such elements to occur in templates, then if the element is not
+
+instantiated, an error must not be signaled, and if the element is
+
+instantiated, the XSLT must perform fallback for the element as
+
+specified in <specref ref="fallback"/>;</p></item>
+
+
+
+<item><p>if the element has an attribute that XSLT 1.0 does not allow
+
+the element to have or if the element has an optional attribute with a
+
+value that the XSLT 1.0 does not allow the attribute to have, then the
+
+attribute must be ignored.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>Thus, any XSLT 1.0 processor must be able to process the following
+
+stylesheet without error, although the stylesheet includes elements
+
+from the XSLT namespace that are not defined in this
+
+specification:</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.1"
+
+                xmlns:xsl="&XSLT.ns;"><![CDATA[
+
+  <xsl:template match="/">
+
+    <xsl:choose>
+
+      <xsl:when test="system-property('xsl:version') >= 1.1">
+
+        <xsl:exciting-new-1.1-feature/>
+
+      </xsl:when>
+
+      <xsl:otherwise>
+
+        <html>
+
+        <head>
+
+          <title>XSLT 1.1 required</title>
+
+        </head>
+
+        <body>
+
+          <p>Sorry, this stylesheet requires XSLT 1.1.</p>
+
+        </body>
+
+        </html>
+
+      </xsl:otherwise>
+
+    </xsl:choose>
+
+  </xsl:template>
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<note><p>If a stylesheet depends crucially on a top-level element
+
+introduced by a version of XSL after 1.0, then the stylesheet can use
+
+an <code>xsl:message</code> element with <code>terminate="yes"</code>
+
+(see <specref ref="message"/>) to ensure that XSLT processors
+
+implementing earlier versions of XSL will not silently ignore the
+
+top-level element. For example,</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.5"
+
+                xmlns:xsl="&XSLT.ns;"><![CDATA[
+
+
+
+  <xsl:important-new-1.1-declaration/>
+
+
+
+  <xsl:template match="/">
+
+    <xsl:choose>
+
+      <xsl:when test="system-property('xsl:version') &lt; 1.1">
+
+        <xsl:message terminate="yes">
+
+          <xsl:text>Sorry, this stylesheet requires XSLT 1.1.</xsl:text>
+
+        </xsl:message>
+
+      </xsl:when>
+
+      <xsl:otherwise>
+
+        ...
+
+      </xsl:otherwise>
+
+    </xsl:choose>
+
+  </xsl:template>
+
+  ...
+
+</xsl:stylesheet>]]></eg>
+
+</note>
+
+
+
+<p>If an <termref def="dt-expression">expression</termref> occurs in
+
+an attribute that is processed in forwards-compatible mode, then an
+
+XSLT processor must recover from errors in the expression as
+
+follows:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>if the expression does not match the syntax allowed by the
+
+XPath grammar, then an error must not be signaled unless the
+
+expression is actually evaluated;</p></item>
+
+
+
+<item><p>if the expression calls a function with an unprefixed name
+
+that is not part of the XSLT library, then an error must not be
+
+signaled unless the function is actually called;</p></item>
+
+
+
+<item><p>if the expression calls a function with a number of arguments
+
+that XSLT does not allow or with arguments of types that XSLT does not
+
+allow, then an error must not be signaled unless the function is
+
+actually called.</p></item>
+
+
+
+</ulist>
+
+
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Combining Stylesheets</head>
+
+
+
+<p>XSLT provides two mechanisms to combine stylesheets:</p>
+
+
+
+<slist>
+
+
+
+<sitem>an inclusion mechanism that allows stylesheets to be combined
+
+without changing the semantics of the stylesheets being combined,
+
+and</sitem>
+
+
+
+<sitem>an import mechanism that allows stylesheets to override each
+
+other.</sitem>
+
+
+
+</slist>
+
+
+
+<div3 id="include">
+
+<head>Stylesheet Inclusion</head>
+
+
+
+<e:element-syntax name="include">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="href" required="yes">
+
+    <e:data-type name="uri-reference"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>An XSLT stylesheet may include another XSLT stylesheet using an
+
+<code>xsl:include</code> element. The <code>xsl:include</code> element
+
+has an <code>href</code> attribute whose value is a URI reference
+
+identifying the stylesheet to be included.  A relative URI is resolved
+
+relative to the base URI of the <code>xsl:include</code> element (see
+
+<specref ref="base-uri"/>).</p>
+
+
+
+<p>The <code>xsl:include</code> element is only allowed as a <termref
+
+def="dt-top-level">top-level</termref> element.</p>
+
+
+
+<p>The inclusion works at the XML tree level.  The resource located by
+
+the <code>href</code> attribute value is parsed as an XML document,
+
+and the children of the <code>xsl:stylesheet</code> element in this
+
+document replace the <code>xsl:include</code> element in the including
+
+document.  The fact that template rules or definitions are included
+
+does not affect the way they are processed.</p>
+
+
+
+<p>The included stylesheet may use the simplified syntax described in
+
+<specref ref="result-element-stylesheet"/>.  The included stylesheet
+
+is treated the same as the equivalent <code>xsl:stylesheet</code>
+
+element.</p>
+
+
+
+<p>It is an error if a stylesheet directly or indirectly includes
+
+itself.</p>
+
+
+
+<note><p>Including a stylesheet multiple times can cause errors
+
+because of duplicate definitions.  Such multiple inclusions are less
+
+obvious when they are indirect. For example, if stylesheet
+
+<var>B</var> includes stylesheet <var>A</var>, stylesheet <var>C</var>
+
+includes stylesheet <var>A</var>, and stylesheet <var>D</var> includes
+
+both stylesheet <var>B</var> and stylesheet <var>C</var>, then
+
+<var>A</var> will be included indirectly by <var>D</var> twice.  If
+
+all of <var>B</var>, <var>C</var> and <var>D</var> are used as
+
+independent stylesheets, then the error can be avoided by separating
+
+everything in <var>B</var> other than the inclusion of <var>A</var>
+
+into a separate stylesheet <var>B'</var> and changing <var>B</var> to
+
+contain just inclusions of <var>B'</var> and <var>A</var>, similarly
+
+for <var>C</var>, and then changing <var>D</var> to include
+
+<var>A</var>, <var>B'</var>, <var>C'</var>.</p></note>
+
+
+
+</div3>
+
+
+
+<div3 id="import">
+
+<head>Stylesheet Import</head>
+
+
+
+<e:element-syntax name="import">
+
+  <e:attribute name="href" required="yes">
+
+    <e:data-type name="uri-reference"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>An XSLT stylesheet may import another XSLT stylesheet using an
+
+<code>xsl:import</code> element.  Importing a stylesheet is the same
+
+as including it (see <specref ref="include"/>) except that definitions
+
+and template rules in the importing stylesheet take precedence over
+
+template rules and definitions in the imported stylesheet; this is
+
+described in more detail below.  The <code>xsl:import</code> element
+
+has an <code>href</code> attribute whose value is a URI reference
+
+identifying the stylesheet to be imported.  A relative URI is resolved
+
+relative to the base URI of the <code>xsl:import</code> element (see
+
+<specref ref="base-uri"/>).</p>
+
+
+
+<p>The <code>xsl:import</code> element is only allowed as a <termref
+
+def="dt-top-level">top-level</termref> element.  The
+
+<code>xsl:import</code> element children must precede all other
+
+element children of an <code>xsl:stylesheet</code> element, including
+
+any <code>xsl:include</code> element children.  When
+
+<code>xsl:include</code> is used to include a stylesheet, any
+
+<code>xsl:import</code> elements in the included document are moved up
+
+in the including document to after any existing
+
+<code>xsl:import</code> elements in the including document.</p>
+
+
+
+<p>For example,</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="&XSLT.ns;"><![CDATA[
+
+  <xsl:import href="article.xsl"/>
+
+  <xsl:import href="bigfont.xsl"/>
+
+  <xsl:attribute-set name="note-style">
+
+    <xsl:attribute name="font-style">italic</xsl:attribute>
+
+  </xsl:attribute-set>
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<p><termdef id="dt-import-tree" term="Import Tree">The
+
+<code>xsl:stylesheet</code> elements encountered during processing of
+
+a stylesheet that contains <code>xsl:import</code> elements are
+
+treated as forming an <term>import tree</term>.  In the import tree,
+
+each <code>xsl:stylesheet</code> element has one import child for each
+
+<code>xsl:import</code> element that it contains. Any
+
+<code>xsl:include</code> elements are resolved before constructing the
+
+import tree.</termdef> <termdef id="dt-import-precedence" term="Import
+
+Precedence">An <code>xsl:stylesheet</code> element in the import tree
+
+is defined to have lower <term>import precedence</term> than another
+
+<code>xsl:stylesheet</code> element in the import tree if it would be
+
+visited before that <code>xsl:stylesheet</code> element in a
+
+post-order traversal of the import tree (i.e. a traversal of the
+
+import tree in which an <code>xsl:stylesheet</code> element is visited
+
+after its import children).</termdef> Each definition and template
+
+rule has import precedence determined by the
+
+<code>xsl:stylesheet</code> element that contains it.</p>
+
+
+
+<p>For example, suppose</p>
+
+
+
+<ulist>
+
+
+
+<item><p>stylesheet <var>A</var> imports stylesheets <var>B</var>
+
+and <var>C</var> in that order;</p></item>
+
+
+
+<item><p>stylesheet <var>B</var> imports stylesheet
+
+<var>D</var>;</p></item>
+
+
+
+<item><p>stylesheet <var>C</var> imports stylesheet
+
+<var>E</var>.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>Then the order of import precedence (lowest first) is
+
+<var>D</var>, <var>B</var>, <var>E</var>, <var>C</var>,
+
+<var>A</var>.</p>
+
+
+
+<note><p>Since <code>xsl:import</code> elements are required to occur
+
+before any definitions or template rules, an implementation that
+
+processes imported stylesheets at the point at which it encounters the
+
+<code>xsl:import</code> element will encounter definitions and
+
+template rules in increasing order of import precedence.</p></note>
+
+
+
+<p>In general, a definition or template rule with higher import
+
+precedence takes precedence over a definition or template rule with
+
+lower import precedence.  This is defined in detail for each kind of
+
+definition and for template rules.</p>
+
+
+
+<p>It is an error if a stylesheet directly or indirectly imports
+
+itself. Apart from this, the case where a stylesheet with a particular
+
+URI is imported in multiple places is not treated specially. The
+
+<termref def="dt-import-tree">import tree</termref> will have a
+
+separate <code>xsl:stylesheet</code> for each place that it is
+
+imported.</p>
+
+
+
+<note><p>If <code>xsl:apply-imports</code> is used (see <specref
+
+ref="apply-imports"/>), the behavior may be different from the
+
+behavior if the stylesheet had been imported only at the place with
+
+the highest <termref def="dt-import-precedence">import
+
+precedence</termref>.</p></note>
+
+
+
+</div3>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Embedding Stylesheets</head>
+
+
+
+<p>Normally an XSLT stylesheet is a complete XML document with the
+
+<code>xsl:stylesheet</code> element as the document element. However,
+
+an XSLT stylesheet may also be embedded in another resource. Two forms
+
+of embedding are possible:</p>
+
+
+
+<slist>
+
+
+
+<sitem>the XSLT stylesheet may be textually embedded in a non-XML
+
+resource, or</sitem>
+
+
+
+<sitem>the <code>xsl:stylesheet</code> element may occur in an XML
+
+document other than as the document element.</sitem>
+
+
+
+</slist>
+
+
+
+<p>To facilitate the second form of embedding, the
+
+<code>xsl:stylesheet</code> element is allowed to have an ID attribute
+
+that specifies a unique identifier.</p>
+
+
+
+<note><p>In order for such an attribute to be used with the XPath
+
+<xfunction>id</xfunction> function, it must actually be declared in
+
+the DTD as being an ID.</p></note>
+
+
+
+<p>The following example shows how the <code>xml-stylesheet</code>
+
+processing instruction <bibref ref="XMLSTYLE"/> can be used to allow a
+
+document to contain its own stylesheet.  The URI reference uses a
+
+relative URI with a fragment identifier to locate the
+
+<code>xsl:stylesheet</code> element:</p>
+
+
+
+<eg><![CDATA[<?xml-stylesheet type="text/xml" href="#style1"?>
+
+<!DOCTYPE doc SYSTEM "doc.dtd">
+
+<doc>
+
+<head>
+
+<xsl:stylesheet id="style1"
+
+                version="1.0"]]>
+
+                xmlns:xsl="&XSLT.ns;"
+
+                xmlns:fo="&XSLFO.ns;"><![CDATA[
+
+<xsl:import href="doc.xsl"/>
+
+<xsl:template match="id('foo')">
+
+  <fo:block font-weight="bold"><xsl:apply-templates/></fo:block>
+
+</xsl:template>
+
+<xsl:template match="xsl:stylesheet">
+
+  <!-- ignore -->
+
+</xsl:template>
+
+</xsl:stylesheet>
+
+</head>
+
+<body>
+
+<para id="foo">
+
+...
+
+</para>
+
+</body>
+
+</doc>
+
+]]></eg>
+
+
+
+<note><p>A stylesheet that is embedded in the document to which it is
+
+to be applied or that may be included or imported into an stylesheet
+
+that is so embedded typically needs to contain a template rule that
+
+specifies that <code>xsl:stylesheet</code> elements are to be
+
+ignored.</p></note>
+
+
+
+</div2>
+
+
+
+</div1>
+
+
+
+<div1 id="data-model">
+
+<head>Data Model</head>
+
+
+
+<p>The data model used by XSLT is the same as that used by <xspecref
+
+href="&XPath;#data-model">XPath</xspecref> with the additions
+
+described in this section.  XSLT operates on source, result and
+
+stylesheet documents using the same data model.  Any two XML documents
+
+that have the same tree will be treated the same by XSLT.</p>
+
+
+
+<p>Processing instructions and comments in the stylesheet are ignored:
+
+the stylesheet is treated as if neither processing instruction nodes
+
+nor comment nodes were included in the tree that represents the
+
+stylesheet.</p>
+
+
+
+<div2 id="root-node-children">
+
+<head>Root Node Children</head>
+
+
+
+<p>The normal restrictions on the children of the root node are
+
+relaxed for the result tree.  The result tree may have any sequence of
+
+nodes as children that would be possible for an element node. In
+
+particular, it may have text node children, and any number of element
+
+node children. When written out using the XML output method (see
+
+<specref ref="output"/>), it is possible that a result tree will not
+
+be a well-formed XML document; however, it will always be a
+
+well-formed external general parsed entity.</p>
+
+
+
+<p>When the source tree is created by parsing a well-formed XML
+
+document, the root node of the source tree will automatically satisfy
+
+the normal restrictions of having no text node children and exactly
+
+one element child.  When the source tree is created in some other way,
+
+for example by using the DOM, the usual restrictions are relaxed for
+
+the source tree as for the result tree.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="base-uri">
+
+<head>Base URI</head>
+
+
+
+<p>Every node also has an associated URI called its base URI, which is
+
+used for resolving attribute values that represent relative URIs into
+
+absolute URIs.  If an element or processing instruction occurs in an
+
+external entity, the base URI of that element or processing
+
+instruction is the URI of the external entity; otherwise, the base URI
+
+is the base URI of the document.  The base URI of the document node is
+
+the URI of the document entity.  The base URI for a text node, a
+
+comment node, an attribute node or a namespace node is the base URI of
+
+the parent of the node.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="unparsed-entities">
+
+<head>Unparsed Entities</head>
+
+
+
+<p>The root node has a mapping that gives the URI for each unparsed
+
+entity declared in the document's DTD.  The URI is generated from the
+
+system identifier and public identifier specified in the entity
+
+declaration. The XSLT processor may use the public identifier to
+
+generate a URI for the entity instead of the URI specified in the
+
+system identifier.  If the XSLT processor does not use the public
+
+identifier to generate the URI, it must use the system identifier; if
+
+the system identifier is a relative URI, it must be resolved into an
+
+absolute URI using the URI of the resource containing the entity
+
+declaration as the base URI <bibref ref="RFC2396"/>.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="strip">
+
+<head>Whitespace Stripping</head>
+
+
+
+<p>After the tree for a source document or stylesheet document has
+
+been constructed, but before it is otherwise processed by XSLT,
+
+some text nodes are stripped.  A text node is never stripped
+
+unless it contains only whitespace characters.  Stripping the text
+
+node removes the text node from the tree.  The stripping process takes
+
+as input a set of element names for which whitespace must be
+
+preserved.  The stripping process is applied to both stylesheets and
+
+source documents, but the set of whitespace-preserving element names
+
+is determined differently for stylesheets and for source
+
+documents.</p>
+
+
+
+<p>A text node is preserved if any of the following apply:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>The element name of the parent of the text node is in the set
+
+of whitespace-preserving element names.</p></item>
+
+
+
+<item><p>The text node contains at least one non-whitespace character.
+
+As in XML, a whitespace character is #x20, #x9, #xD or #xA.</p></item>
+
+
+
+<item><p>An ancestor element of the text node has an
+
+<code>xml:space</code> attribute with a value of
+
+<code>preserve</code>, and no closer ancestor element has
+
+<code>xml:space</code> with a value of
+
+<code>default</code>.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>Otherwise, the text node is stripped.</p>
+
+
+
+<p>The <code>xml:space</code> attributes are not stripped from the
+
+tree.</p>
+
+
+
+<note><p>This implies that if an <code>xml:space</code> attribute is
+
+specified on a literal result element, it will be included in the
+
+result.</p></note>
+
+
+
+<p>For stylesheets, the set of whitespace-preserving element names
+
+consists of just <code>xsl:text</code>.</p>
+
+
+
+<e:element-syntax name="strip-space">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="elements" required="yes">
+
+    <e:data-type name="tokens"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<e:element-syntax name="preserve-space">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="elements" required="yes">
+
+    <e:data-type name="tokens"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>For source documents, the set of whitespace-preserving element
+
+names is specified by <code>xsl:strip-space</code> and
+
+<code>xsl:preserve-space</code> <termref
+
+def="dt-top-level">top-level</termref> elements.  These elements each
+
+have an <code>elements</code> attribute whose value is a
+
+whitespace-separated list of <xnt
+
+href="&XPath;#NT-NameTest">NameTest</xnt>s.  Initially, the
+
+set of whitespace-preserving element names contains all element names.
+
+If an element name matches a <xnt
+
+href="&XPath;#NT-NameTest">NameTest</xnt> in an
+
+<code>xsl:strip-space</code> element, then it is removed from the set
+
+of whitespace-preserving element names.  If an element name matches a
+
+<xnt href="&XPath;#NT-NameTest">NameTest</xnt> in an
+
+<code>xsl:preserve-space</code> element, then it is added to the set
+
+of whitespace-preserving element names.  An element matches a <xnt
+
+href="&XPath;#NT-NameTest">NameTest</xnt> if and only if the
+
+<xnt href="&XPath;#NT-NameTest">NameTest</xnt> would be true
+
+for the element as an <xspecref href="&XPath;#node-tests">XPath node
+
+test</xspecref>.  Conflicts between matches to
+
+<code>xsl:strip-space</code> and <code>xsl:preserve-space</code>
+
+elements are resolved the same way as conflicts between template rules
+
+(see <specref ref="conflict"/>).  Thus, the applicable match for a
+
+particular element name is determined as follows:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>First, any match with lower <termref
+
+def="dt-import-precedence">import precedence</termref> than another
+
+match is ignored.</p></item>
+
+
+
+<item><p>Next, any match with a <xnt
+
+href="&XPath;#NT-NameTest">NameTest</xnt> that has a lower
+
+<termref def="dt-default-priority">default priority</termref> than the
+
+<termref def="dt-default-priority">default priority</termref> of the
+
+<xnt href="&XPath;#NT-NameTest">NameTest</xnt> of another
+
+match is ignored.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>It is an error if this leaves more than one match.  An XSLT
+
+processor may signal the error; if it does not signal the error, it
+
+must recover by choosing, from amongst the matches that are left, the
+
+one that occurs last in the stylesheet.</p>
+
+
+
+</div2>
+
+
+
+</div1>
+
+
+
+<div1>
+
+<head>Expressions</head>
+
+
+
+<p>XSLT uses the expression language defined by XPath <bibref
+
+ref="XPATH"/>.  Expressions are used in XSLT for a variety of purposes
+
+including:</p>
+
+
+
+<slist>
+
+<sitem>selecting nodes for processing;</sitem>
+
+<sitem>specifying conditions for different ways of processing a node;</sitem>
+
+<sitem>generating text to be inserted in the result tree.</sitem>
+
+</slist>
+
+
+
+<p><termdef id="dt-expression" term="Expression">An
+
+<term>expression</term> must match the XPath production <xnt
+
+href="&XPath;#NT-Expr">Expr</xnt>.</termdef></p>
+
+
+
+<p>Expressions occur as the value of certain attributes on
+
+XSLT-defined elements and within curly braces in <termref
+
+def="dt-attribute-value-template">attribute value
+
+template</termref>s.</p>
+
+
+
+<p>In XSLT, an outermost expression (i.e. an expression that is not
+
+part of another expression) gets its context as follows:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>the context node comes from the <termref
+
+def="dt-current-node">current node</termref></p></item>
+
+
+
+<item><p>the context position comes from the position of the <termref
+
+def="dt-current-node">current node</termref> in the <termref
+
+def="dt-current-node-list">current node list</termref>; the first
+
+position is 1</p></item>
+
+
+
+<item><p>the context size comes from the size of the <termref
+
+def="dt-current-node-list">current node list</termref></p></item>
+
+
+
+<item><p>the variable bindings are the bindings in scope on the
+
+element which has the attribute in which the expression occurs (see
+
+<specref ref="variables"/>)</p></item>
+
+
+
+<item><p>the set of namespace declarations are those in scope on the
+
+element which has the attribute in which the expression occurs;
+
+this includes the implicit declaration of the prefix <code>xml</code>
+
+required by the the XML Namespaces Recommendation <bibref ref="XMLNAMES"/>;
+
+the default
+
+namespace (as declared by <code>xmlns</code>) is not part of this
+
+set</p></item>
+
+
+
+<item><p>the function library consists of the core function library
+
+together with the additional functions defined in <specref
+
+ref="add-func"/> and extension functions as described in <specref
+
+ref="extension"/>; it is an error for an expression to include a call
+
+to any other function</p></item>
+
+
+
+</ulist>
+
+
+
+</div1>
+
+
+
+<div1 id="rules">
+
+<head>Template Rules</head>
+
+
+
+<div2>
+
+<head>Processing Model</head>
+
+
+
+<p>A list of source nodes is processed to create a result tree
+
+fragment.  The result tree is constructed by processing a list
+
+containing just the root node.  A list of source nodes is processed by
+
+appending the result tree structure created by processing each of the
+
+members of the list in order.  A node is processed by finding all the
+
+template rules with patterns that match the node, and choosing the
+
+best amongst them; the chosen rule's template is then instantiated
+
+with the node as the <termref def="dt-current-node">current
+
+node</termref> and with the list of source nodes as the <termref
+
+def="dt-current-node-list">current node list</termref>.  A template
+
+typically contains instructions that select an additional list of
+
+source nodes for processing.  The process of matching, instantiation
+
+and selection is continued recursively until no new source nodes are
+
+selected for processing.</p>
+
+
+
+<p>Implementations are free to process the source document in any way
+
+that produces the same result as if it were processed using this
+
+processing model.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="patterns">
+
+<head>Patterns</head>
+
+
+
+<p><termdef id="dt-pattern" term="Pattern">Template rules identify the
+
+nodes to which they apply by using a <term>pattern</term>.  As well as
+
+being used in template rules, patterns are used for numbering (see
+
+<specref ref="number"/>) and for declaring keys (see <specref
+
+ref="key"/>).  A pattern specifies a set of conditions on a node.  A
+
+node that satisfies the conditions matches the pattern; a node that
+
+does not satisfy the conditions does not match the pattern.  The
+
+syntax for patterns is a subset of the syntax for expressions. In
+
+particular, location paths that meet certain restrictions can be used
+
+as patterns.  An expression that is also a pattern always evaluates to
+
+an object of type node-set.  A node matches a pattern if the node is a
+
+member of the result of evaluating the pattern as an expression with
+
+respect to some possible context; the possible contexts are those
+
+whose context node is the node being matched or one of its
+
+ancestors.</termdef></p>
+
+
+
+<p>Here are some examples of patterns:</p>
+
+
+
+<ulist>
+
+
+
+<item><p><code>para</code> matches any <code>para</code> element</p></item>
+
+
+
+<item><p><code>*</code> matches any element</p></item>
+
+
+
+<item><p><code>chapter|appendix</code> matches any
+
+<code>chapter</code> element and any <code>appendix</code>
+
+element</p></item>
+
+
+
+<item><p><code>olist/item</code> matches any <code>item</code> element with
+
+an <code>olist</code> parent</p></item>
+
+
+
+<item><p><code>appendix//para</code> matches any <code>para</code> element with
+
+an <code>appendix</code> ancestor element</p></item>
+
+
+
+<item><p><code>/</code> matches the root node</p></item>
+
+
+
+<item><p><code>text()</code> matches any text node</p></item>
+
+
+
+<item><p><code>processing-instruction()</code> matches any processing
+
+instruction</p></item>
+
+
+
+<item><p><code>node()</code> matches any node other than an attribute
+
+node and the root node</p></item>
+
+
+
+<item><p><code>id("W11")</code> matches the element with unique ID
+
+<code>W11</code></p></item>
+
+
+
+<item><p><code>para[1]</code> matches any <code>para</code> element
+
+that is the first <code>para</code> child element of its
+
+parent</p></item>
+
+
+
+<item><p><code>*[position()=1 and self::para]</code> matches any
+
+<code>para</code> element that is the first child element of its
+
+parent</p></item>
+
+
+
+<item><p><code>para[last()=1]</code> matches any <code>para</code>
+
+element that is the only <code>para</code> child element of its
+
+parent</p></item>
+
+
+
+<item><p><code>items/item[position()>1]</code> matches any
+
+<code>item</code> element that has a <code>items</code> parent and
+
+that is not the first <code>item</code> child of its parent</p></item>
+
+
+
+<item><p><code>item[position() mod 2 = 1]</code> would be true for any
+
+<code>item</code> element that is an odd-numbered <code>item</code>
+
+child of its parent.</p></item>
+
+
+
+<item><p><code>div[@class="appendix"]//p</code> matches any
+
+<code>p</code> element with a <code>div</code> ancestor element that
+
+has a <code>class</code> attribute with value
+
+<code>appendix</code></p></item>
+
+
+
+<item><p><code>@class</code> matches any <code>class</code> attribute
+
+(<emph>not</emph> any element that has a <code>class</code>
+
+attribute)</p></item>
+
+
+
+<item><p><code>@*</code> matches any attribute</p></item>
+
+
+
+</ulist>
+
+
+
+<p>A pattern must match the grammar for <nt
+
+def="NT-Pattern">Pattern</nt>.  A <nt def="NT-Pattern">Pattern</nt> is
+
+a set of location path patterns separated by <code>|</code>.  A
+
+location path pattern is a location path whose steps all use only the
+
+<code>child</code> or <code>attribute</code> axes.  Although patterns
+
+must not use the <code>descendant-or-self</code> axis, patterns may
+
+use the <code>//</code> operator as well as the <code>/</code>
+
+operator.  Location path patterns can also start with an
+
+<xfunction>id</xfunction> or <function>key</function> function call
+
+with a literal argument.  Predicates in a pattern can use arbitrary
+
+expressions just like predicates in a location path.</p>
+
+
+
+<scrap>
+
+<head>Patterns</head>
+
+<prodgroup pcw5="1" pcw2="10">
+
+<prod id="NT-Pattern">
+
+<lhs>Pattern</lhs>
+
+<rhs><nt def="NT-LocationPathPattern">LocationPathPattern</nt></rhs>
+
+<rhs>| <nt def="NT-Pattern">Pattern</nt> '|' <nt def="NT-LocationPathPattern">LocationPathPattern</nt></rhs>
+
+</prod>
+
+<prod id="NT-LocationPathPattern">
+
+<lhs>LocationPathPattern</lhs>
+
+<rhs>'/' <nt def="NT-RelativePathPattern">RelativePathPattern</nt>?</rhs>
+
+<rhs>| <nt def="NT-IdKeyPattern">IdKeyPattern</nt> (('/' | '//') <nt def="NT-RelativePathPattern">RelativePathPattern</nt>)?</rhs>
+
+<rhs>| '//'? <nt def="NT-RelativePathPattern">RelativePathPattern</nt></rhs>
+
+</prod>
+
+<prod id="NT-IdKeyPattern">
+
+<lhs>IdKeyPattern</lhs>
+
+<rhs>'id' '(' <xnt href="&XPath;#NT-Literal">Literal</xnt> ')'</rhs>
+
+<rhs>| 'key' '(' <xnt href="&XPath;#NT-Literal">Literal</xnt> ',' <xnt href="&XPath;#NT-Literal">Literal</xnt> ')'</rhs>
+
+</prod>
+
+<prod id="NT-RelativePathPattern">
+
+<lhs>RelativePathPattern</lhs>
+
+<rhs><nt def="NT-StepPattern">StepPattern</nt></rhs>
+
+<rhs>| <nt def="NT-RelativePathPattern">RelativePathPattern</nt> '/' <nt def="NT-StepPattern">StepPattern</nt></rhs>
+
+<rhs>| <nt def="NT-RelativePathPattern">RelativePathPattern</nt> '//' <nt def="NT-StepPattern">StepPattern</nt></rhs>
+
+</prod>
+
+<prod id="NT-StepPattern">
+
+<lhs>StepPattern</lhs>
+
+<rhs>
+
+<nt def="NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</nt>
+
+<xnt href="&XPath;#NT-NodeTest">NodeTest</xnt>
+
+<xnt href="&XPath;#NT-Predicate">Predicate</xnt>*
+
+</rhs>
+
+</prod>
+
+<prod id="NT-ChildOrAttributeAxisSpecifier">
+
+<lhs>ChildOrAttributeAxisSpecifier</lhs>
+
+<rhs><xnt href="&XPath;#NT-AbbreviatedAxisSpecifier">AbbreviatedAxisSpecifier</xnt></rhs>
+
+<rhs>| ('child' | 'attribute') '::'</rhs>
+
+</prod>
+
+</prodgroup>
+
+</scrap>
+
+
+
+<p>A pattern is defined to match a node if and only if there is
+
+possible context such that when the pattern is evaluated as an
+
+expression with that context, the node is a member of the resulting
+
+node-set.  When a node is being matched, the possible contexts have a
+
+context node that is the node being matched or any ancestor of that
+
+node, and a context node list containing just the context node.</p>
+
+
+
+<p>For example, <code>p</code> matches any <code>p</code> element,
+
+because for any <code>p</code> if the expression <code>p</code> is
+
+evaluated with the parent of the <code>p</code> element as context the
+
+resulting node-set will contain that <code>p</code> element as one of
+
+its members.</p>
+
+
+
+<note><p>This matches even a <code>p</code> element that is the
+
+document element, since the document root is the parent of the
+
+document element.</p></note>
+
+
+
+<p>Although the semantics of patterns are specified indirectly in
+
+terms of expression evaluation, it is easy to understand the meaning
+
+of a pattern directly without thinking in terms of expression
+
+evaluation.  In a pattern, <code>|</code> indicates alternatives; a
+
+pattern with one or more <code>|</code> separated alternatives matches
+
+if any one of the alternative matches.  A pattern that consists of a
+
+sequence of <nt def="NT-StepPattern">StepPattern</nt>s separated by
+
+<code>/</code> or <code>//</code> is matched from right to left.  The
+
+pattern only matches if the rightmost <nt
+
+def="NT-StepPattern">StepPattern</nt> matches and a suitable element
+
+matches the rest of the pattern; if the separator is <code>/</code>
+
+then only the parent is a suitable element; if the separator is
+
+<code>//</code>, then any ancestor is a suitable element.  A <nt
+
+def="NT-StepPattern">StepPattern</nt> that uses the child axis matches
+
+if the <xnt href="&XPath;#NT-NodeTest">NodeTest</xnt> is true for the
+
+node and the node is not an attribute node.  A <nt
+
+def="NT-StepPattern">StepPattern</nt> that uses the attribute axis
+
+matches if the <xnt href="&XPath;#NT-NodeTest">NodeTest</xnt> is true
+
+for the node and the node is an attribute node.  When <code>[]</code>
+
+is present, then the first <xnt
+
+href="&XPath;#NT-PredicateExpr">PredicateExpr</xnt> in a <nt
+
+def="NT-StepPattern">StepPattern</nt> is evaluated with the node being
+
+matched as the context node and the siblings of the context node that
+
+match the <xnt href="&XPath;#NT-NodeTest">NodeTest</xnt> as the
+
+context node list, unless the node being matched is an attribute node,
+
+in which case the context node list is all the attributes that have
+
+the same parent as the attribute being matched and that match the <xnt
+
+href="&XPath;#NT-NameTest">NameTest</xnt>.</p>
+
+
+
+<p>For example</p>
+
+
+
+<eg>appendix//ulist/item[position()=1]</eg>
+
+
+
+<p>matches a node if and only if all of the following are true:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>the <xnt href="&XPath;#NT-NodeTest">NodeTest</xnt> <code>item</code> is
+
+true for the node and the node is not an attribute; in other words the
+
+node is an <code>item</code> element</p></item>
+
+
+
+<item><p>evaluating the <xnt href="&XPath;#NT-PredicateExpr">PredicateExpr</xnt>
+
+<code>position()=1</code> with the node as context node and the
+
+siblings of the node that are <code>item</code> elements as the
+
+context node list yields true</p></item>
+
+
+
+<item><p>the node has a parent that matches
+
+<code>appendix//ulist</code>; this will be true if the parent is a
+
+<code>ulist</code> element that has an <code>appendix</code> ancestor
+
+element.</p></item>
+
+
+
+</ulist>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Defining Template Rules</head>
+
+
+
+<e:element-syntax name="template">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="match">
+
+    <e:data-type name="pattern"/>
+
+  </e:attribute>
+
+  <e:attribute name="name">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:attribute name="priority">
+
+    <e:data-type name="number"/>
+
+  </e:attribute>
+
+  <e:attribute name="mode">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:sequence>
+
+    <e:element repeat="zero-or-more" name="param"/>
+
+    <e:model name="template"/>
+
+  </e:sequence>
+
+</e:element-syntax>
+
+
+
+<p>A template rule is specified with the <code>xsl:template</code>
+
+element. The <code>match</code> attribute is a <nt
+
+def="NT-Pattern">Pattern</nt> that identifies the source node or nodes
+
+to which the rule applies.  The <code>match</code> attribute is
+
+required unless the <code>xsl:template</code> element has a
+
+<code>name</code> attribute (see <specref ref="named-templates"/>).
+
+It is an error for the value of the <code>match</code> attribute to
+
+contain a <xnt
+
+href="&XPath;#NT-VariableReference">VariableReference</xnt>. The
+
+content of the <code>xsl:template</code> element is the template that
+
+is instantiated when the template rule is applied.</p>
+
+
+
+<p>For example, an XML document might contain:</p>
+
+
+
+<eg><![CDATA[This is an <emph>important</emph> point.]]></eg>
+
+
+
+<p>The following template rule matches <code>emph</code> elements and
+
+produces a <code>fo:inline-sequence</code> formatting object with a
+
+<code>font-weight</code> property of <code>bold</code>.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="emph">
+
+  <fo:inline-sequence font-weight="bold">
+
+    <xsl:apply-templates/>
+
+  </fo:inline-sequence>
+
+</xsl:template>
+
+]]></eg>
+
+
+
+<note><p>Examples in this document use the <code>fo:</code> prefix for
+
+the namespace <code>&XSLFO.ns;</code>, which is
+
+the namespace of the formatting objects defined in <bibref
+
+ref="XSL"/>.</p></note>
+
+
+
+<p>As described next, the <code>xsl:apply-templates</code> element
+
+recursively processes the children of the source element.</p>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Applying Template Rules</head>
+
+
+
+<e:element-syntax name="apply-templates">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="select">
+
+    <e:data-type name="node-set-expression"/>
+
+  </e:attribute>
+
+  <e:attribute name="mode">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:choice repeat="zero-or-more">
+
+    <e:element name="sort"/>
+
+    <e:element name="with-param"/>
+
+  </e:choice>
+
+</e:element-syntax>
+
+
+
+<p>This example creates a block for a <code>chapter</code> element and
+
+then processes its immediate children.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="chapter">
+
+  <fo:block>
+
+    <xsl:apply-templates/>
+
+  </fo:block>
+
+</xsl:template>]]></eg>
+
+
+
+<p>In the absence of a <code>select</code> attribute, the
+
+<code>xsl:apply-templates</code> instruction processes all of the
+
+children of the current node, including text nodes.  However, text
+
+nodes that have been stripped as specified in <specref ref="strip"/>
+
+will not be processed.  If stripping of whitespace nodes has not been
+
+enabled for an element, then all whitespace in the content of the
+
+element will be processed as text, and thus whitespace
+
+between child elements will count in determining the position of a
+
+child element as returned by the <xfunction>position</xfunction>
+
+function.</p>
+
+
+
+<p>A <code>select</code> attribute can be used to process nodes
+
+selected by an expression instead of processing all children.  The
+
+value of the <code>select</code> attribute is an <termref
+
+def="dt-expression">expression</termref>.  The expression must
+
+evaluate to a node-set.  The selected set of nodes is processed in
+
+document order, unless a sorting specification is present (see
+
+<specref ref="sorting"/>).  The following example processes all of the
+
+<code>author</code> children of the <code>author-group</code>:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="author-group">
+
+  <fo:inline-sequence>
+
+    <xsl:apply-templates select="author"/>
+
+  </fo:inline-sequence>
+
+</xsl:template>]]></eg>
+
+
+
+<p>The following example processes all of the <code>given-name</code>s
+
+of the <code>author</code>s that are children of
+
+<code>author-group</code>:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="author-group">
+
+  <fo:inline-sequence>
+
+    <xsl:apply-templates select="author/given-name"/>
+
+  </fo:inline-sequence>
+
+</xsl:template>]]></eg>
+
+
+
+<p>This example processes all of the <code>heading</code> descendant
+
+elements of the <code>book</code> element.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="book">
+
+  <fo:block>
+
+    <xsl:apply-templates select=".//heading"/>
+
+  </fo:block>
+
+</xsl:template>]]></eg>
+
+
+
+<p>It is also possible to process elements that are not descendants of
+
+the current node.  This example assumes that a <code>department</code>
+
+element has <code>group</code> children and <code>employee</code>
+
+descendants. It finds an employee's department and then processes
+
+the <code>group</code> children of the <code>department</code>.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="employee">
+
+  <fo:block>
+
+    Employee <xsl:apply-templates select="name"/> belongs to group
+
+    <xsl:apply-templates select="ancestor::department/group"/>
+
+  </fo:block>
+
+</xsl:template>]]></eg>
+
+
+
+<p>Multiple <code>xsl:apply-templates</code> elements can be used within a
+
+single template to do simple reordering.  The following example
+
+creates two HTML tables. The first table is filled with domestic sales
+
+while the second table is filled with foreign sales.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="product">
+
+  <table>
+
+    <xsl:apply-templates select="sales/domestic"/>
+
+  </table>
+
+  <table>
+
+    <xsl:apply-templates select="sales/foreign"/>
+
+  </table>
+
+</xsl:template>]]></eg>
+
+
+
+<note>
+
+
+
+<p>It is possible for there to be two matching descendants where one
+
+is a descendant of the other.  This case is not treated specially:
+
+both descendants will be processed as usual. For example, given a
+
+source document</p>
+
+
+
+<eg><![CDATA[<doc><div><div></div></div></doc>]]></eg>
+
+
+
+<p>the rule</p>
+
+
+
+<eg><![CDATA[<xsl:template match="doc">
+
+  <xsl:apply-templates select=".//div"/>
+
+</xsl:template>]]></eg>
+
+
+
+<p>will process both the outer <code>div</code> and inner <code>div</code>
+
+elements.</p>
+
+
+
+</note>
+
+
+
+<note><p>Typically, <code>xsl:apply-templates</code> is used to
+
+process only nodes that are descendants of the current node.  Such use
+
+of <code>xsl:apply-templates</code> cannot result in non-terminating
+
+processing loops.  However, when <code>xsl:apply-templates</code> is
+
+used to process elements that are not descendants of the current node,
+
+the possibility arises of non-terminating loops. For example,</p>
+
+
+
+<eg role="error"><![CDATA[<xsl:template match="foo">
+
+  <xsl:apply-templates select="."/>
+
+</xsl:template>]]></eg>
+
+
+
+<p>Implementations may be able to detect such loops in some cases, but
+
+the possibility exists that a stylesheet may enter a non-terminating
+
+loop that an implementation is unable to detect. This may present a
+
+denial of service security risk.</p></note>
+
+
+
+</div2>
+
+
+
+<div2 id="conflict">
+
+<head>Conflict Resolution for Template Rules</head>
+
+
+
+<p>It is possible for a source node to match more than one template
+
+rule. The template rule to be used is determined as follows:</p>
+
+
+
+<olist>
+
+
+
+<item><p>First, all matching template rules that have lower <termref
+
+def="dt-import-precedence">import precedence</termref> than the
+
+matching template rule or rules with the highest import precedence are
+
+eliminated from consideration.</p></item>
+
+
+
+<item><p>Next, all matching template rules that have lower priority
+
+than the matching template rule or rules with the highest priority are
+
+eliminated from consideration.  The priority of a template rule is
+
+specified by the <code>priority</code> attribute on the template rule.
+
+The value of this must be a real number (positive or negative),
+
+matching the production <xnt href="&XPath;#NT-Number">Number</xnt>
+
+with an optional leading minus sign (<code>-</code>).  <termdef
+
+id="dt-default-priority" term="Default Priority">The <term>default
+
+priority</term> is computed as follows:</termdef></p>
+
+
+
+<ulist>
+
+
+
+<item><p>If the pattern contains multiple alternatives separated by
+
+<code>|</code>, then it is treated equivalently to a set of template
+
+rules, one for each alternative.</p></item>
+
+
+
+<item><p>If the pattern has the form of a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> preceded by a <nt
+
+def="NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</nt>
+
+or has the form
+
+<code>processing-instruction(</code><xnt href="&XPath;#NT-Literal"
+
+>Literal</xnt><code>)</code> preceded by a <nt
+
+def="NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</nt>,
+
+then the priority is 0.</p></item>
+
+
+
+<item><p>If the pattern has the form <xnt
+
+href="&XMLNames;#NT-NCName">NCName</xnt><code>:*</code> preceded by a
+
+<nt
+
+def="NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</nt>,
+
+then the priority is -0.25.</p></item>
+
+
+
+<item><p>Otherwise, if the pattern consists of just a <xnt
+
+href="&XPath;#NT-NodeTest">NodeTest</xnt> preceded by a <nt
+
+def="NT-ChildOrAttributeAxisSpecifier">ChildOrAttributeAxisSpecifier</nt>,
+
+then the priority is -0.5.</p></item>
+
+
+
+<item><p>Otherwise, the priority is 0.5.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>Thus, the most common kind of pattern (a pattern that tests for a
+
+node with a particular type and a particular expanded-name) has
+
+priority 0. The next less specific kind of pattern (a pattern that
+
+tests for a node with a particular type and an expanded-name with a
+
+particular namespace URI) has priority -0.25.  Patterns less specific
+
+than this (patterns that just tests for nodes with particular types)
+
+have priority -0.5.  Patterns more specific than the most common kind
+
+of pattern have priority 0.5.</p>
+
+
+
+</item>
+
+
+
+</olist>
+
+
+
+<p>It is an error if this leaves more than one matching template
+
+rule.  An XSLT processor may signal the error; if it does not signal
+
+the error, it must recover by choosing, from amongst the matching
+
+template rules that are left, the one that occurs last in the
+
+stylesheet.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="apply-imports">
+
+<head>Overriding Template Rules</head>
+
+
+
+<e:element-syntax name="apply-imports">
+
+  <e:in-category name="instruction"/>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>A template rule that is being used to override a template rule in
+
+an imported stylesheet (see <specref ref="conflict"/>) can use the
+
+<code>xsl:apply-imports</code> element to invoke the overridden
+
+template rule.</p>
+
+
+
+<p><termdef id="dt-current-template-rule" term="Current Template
+
+Rule">At any point in the processing of a stylesheet, there is a
+
+<term>current template rule</term>.  Whenever a template rule is
+
+chosen by matching a pattern, the template rule becomes the current
+
+template rule for the instantiation of the rule's template. When an
+
+<code>xsl:for-each</code> element is instantiated, the current
+
+template rule becomes null for the instantiation of the content of the
+
+<code>xsl:for-each</code> element.</termdef></p>
+
+
+
+<p><code>xsl:apply-imports</code> processes the current node using
+
+only template rules that were imported into the stylesheet element
+
+containing the current template rule; the node is processed in the
+
+current template rule's mode.  It is an error if
+
+<code>xsl:apply-imports</code> is instantiated when the current
+
+template rule is null.</p>
+
+
+
+<p>For example, suppose the stylesheet <code>doc.xsl</code> contains a
+
+template rule for <code>example</code> elements:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="example">
+
+  <pre><xsl:apply-templates/></pre>
+
+</xsl:template>]]></eg>
+
+
+
+<p>Another stylesheet could import <code>doc.xsl</code> and modify the
+
+treatment of <code>example</code> elements as follows:</p>
+
+
+
+<eg><![CDATA[<xsl:import href="doc.xsl"/>
+
+
+
+<xsl:template match="example">
+
+  <div style="border: solid red">
+
+     <xsl:apply-imports/>
+
+  </div>
+
+</xsl:template>]]></eg>
+
+
+
+<p>The combined effect would be to transform an <code>example</code>
+
+into an element of the form:</p>
+
+
+
+<eg><![CDATA[<div style="border: solid red"><pre>...</pre></div>]]></eg>
+
+
+
+</div2>
+
+
+
+<div2 id="modes">
+
+<head>Modes</head>
+
+
+
+<p>Modes allow an element to be processed multiple times, each time
+
+producing a different result.</p>
+
+
+
+<p>Both <code>xsl:template</code> and <code>xsl:apply-templates</code>
+
+have an optional <code>mode</code> attribute.  The value of the
+
+<code>mode</code> attribute is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as described
+
+in <specref ref="qname"/>. If <code>xsl:template</code> does not have
+
+a <code>match</code> attribute, it must not have a <code>mode</code>
+
+attribute.  If an <code>xsl:apply-templates</code> element has a
+
+<code>mode</code> attribute, then it applies only to those template
+
+rules from <code>xsl:template</code> elements that have a
+
+<code>mode</code> attribute with the same value; if an
+
+<code>xsl:apply-templates</code> element does not have a
+
+<code>mode</code> attribute, then it applies only to those template
+
+rules from <code>xsl:template</code> elements that do not have a
+
+<code>mode</code> attribute.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="built-in-rule">
+
+<head>Built-in Template Rules</head>
+
+
+
+<p>There is a built-in template rule to allow recursive processing to
+
+continue in the absence of a successful pattern match by an explicit
+
+template rule in the stylesheet.  This template rule applies to both
+
+element nodes and the root node.  The following shows the equivalent
+
+of the built-in template rule:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="*|/">
+
+  <xsl:apply-templates/>
+
+</xsl:template>]]></eg>
+
+
+
+<p>There is also a built-in template rule for each mode, which allows
+
+recursive processing to continue in the same mode in the absence of a
+
+successful pattern match by an explicit template rule in the
+
+stylesheet.  This template rule applies to both element nodes and the
+
+root node.  The following shows the equivalent of the built-in
+
+template rule for mode <code><var>m</var></code>.</p>
+
+
+
+<eg>&lt;xsl:template match="*|/" mode="<var>m</var>">
+
+  &lt;xsl:apply-templates mode="<var>m</var>"/>
+
+&lt;/xsl:template></eg>
+
+
+
+<p>There is also a built-in template rule for text and attribute nodes
+
+that copies text through:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="text()|@*">
+
+  <xsl:value-of select="."/>
+
+</xsl:template>]]></eg>
+
+
+
+<p>The built-in template rule for processing instructions and comments
+
+is to do nothing.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="processing-instruction()|comment()"/>]]></eg>
+
+
+
+<p>The built-in template rule for namespace nodes is also to do
+
+nothing. There is no pattern that can match a namespace node; so, the
+
+built-in template rule is the only template rule that is applied for
+
+namespace nodes.</p>
+
+
+
+<p>The built-in template rules are treated as if they were imported
+
+implicitly before the stylesheet and so have lower <termref
+
+def="dt-import-precedence">import precedence</termref> than all other
+
+template rules.  Thus, the author can override a built-in template
+
+rule by including an explicit template rule.</p>
+
+
+
+</div2>
+
+
+
+
+
+</div1>
+
+
+
+<div1 id="named-templates">
+
+<head>Named Templates</head>
+
+
+
+<e:element-syntax name="call-template">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="name" required="yes">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:element repeat="zero-or-more" name="with-param"/>
+
+</e:element-syntax>
+
+
+
+<p>Templates can be invoked by name.  An <code>xsl:template</code>
+
+element with a <code>name</code> attribute specifies a named template.
+
+The value of the <code>name</code> attribute is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as described
+
+in <specref ref="qname"/>. If an <code>xsl:template</code> element has
+
+a <code>name</code> attribute, it may, but need not, also have a
+
+<code>match</code> attribute.  An <code>xsl:call-template</code>
+
+element invokes a template by name; it has a required
+
+<code>name</code> attribute that identifies the template to be
+
+invoked.  Unlike <code>xsl:apply-templates</code>,
+
+<code>xsl:call-template</code> does not change the current node or the
+
+current node list.</p>
+
+
+
+<p>The <code>match</code>, <code>mode</code> and <code>priority</code> attributes on an
+
+<code>xsl:template</code> element do not affect whether the template
+
+is invoked by an <code>xsl:call-template</code> element.  Similarly,
+
+the <code>name</code> attribute on an <code>xsl:template</code>
+
+element does not affect whether the template is invoked by an
+
+<code>xsl:apply-templates</code> element.</p>
+
+
+
+<p>It is an error if a stylesheet contains more than one template with
+
+the same name and same <termref def="dt-import-precedence">import
+
+precedence</termref>.</p>
+
+
+
+</div1>
+
+
+
+
+
+<div1>
+
+<head>Creating the Result Tree</head>
+
+
+
+<p>This section describes instructions that directly create nodes in
+
+the result tree.</p>
+
+
+
+<div2>
+
+<head>Creating Elements and Attributes</head>
+
+
+
+<div3 id="literal-result-element">
+
+<head>Literal Result Elements</head>
+
+
+
+<p>In a template, an element in the stylesheet that does not belong to
+
+the XSLT namespace and that is not an extension element (see <specref
+
+ref="extension-element"/>) is instantiated to create an element node
+
+with the same <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref>.  The content
+
+of the element is a template, which is instantiated to give the
+
+content of the created element node. The created element node will
+
+have the attribute nodes that were present on the element node in the
+
+stylesheet tree, other than attributes with names in the XSLT
+
+namespace.</p>
+
+
+
+<p>The created element node will also have a copy of the namespace
+
+nodes that were present on the element node in the stylesheet tree
+
+with the exception of any namespace node whose string-value is the
+
+XSLT namespace URI (<code>&XSLT.ns;</code>), a
+
+namespace URI declared as an extension namespace (see <specref
+
+ref="extension-element"/>), or a namespace URI designated as an
+
+excluded namespace.  A namespace URI is designated as an excluded
+
+namespace by using an <code>exclude-result-prefixes</code> attribute
+
+on an <code>xsl:stylesheet</code> element or an
+
+<code>xsl:exclude-result-prefixes</code> attribute on a literal result
+
+element.  The value of both these attributes is a whitespace-separated
+
+list of namespace prefixes. The namespace bound to each of the
+
+prefixes is designated as an excluded namespace.  It is an error if
+
+there is no namespace bound to the prefix on the element bearing the
+
+<code>exclude-result-prefixes</code> or
+
+<code>xsl:exclude-result-prefixes</code> attribute.  The default
+
+namespace (as declared by <code>xmlns</code>) may be designated as an
+
+excluded namespace by including <code>#default</code> in the list of
+
+namespace prefixes.  The designation of a namespace as an excluded
+
+namespace is effective within the subtree of the stylesheet rooted at
+
+the element bearing the <code>exclude-result-prefixes</code> or
+
+<code>xsl:exclude-result-prefixes</code> attribute;
+
+a subtree rooted at an <code>xsl:stylesheet</code> element
+
+does not include any stylesheets imported or included by children
+
+of that <code>xsl:stylesheet</code> element.</p>
+
+
+
+<note><p>When a stylesheet uses a namespace declaration only for the
+
+purposes of addressing the source tree, specifying the prefix in the
+
+<code>exclude-result-prefixes</code> attribute will avoid superfluous
+
+namespace declarations in the result tree.</p></note>
+
+
+
+<p>The value of an attribute of a literal result element is
+
+interpreted as an <termref def="dt-attribute-value-template">attribute
+
+value template</termref>: it can contain expressions contained
+
+in curly braces (<code>{}</code>).</p>
+
+
+
+<p><termdef id="dt-literal-namespace-uri" term="Literal Namespace
+
+URI">A namespace URI in the stylesheet tree that is being used to
+
+specify a namespace URI in the result tree is called a <term>literal
+
+namespace URI</term>.</termdef> This applies to:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>the namespace URI in the expanded-name of a literal
+
+result element in the stylesheet</p></item>
+
+
+
+<item><p>the namespace URI in the expanded-name of an attribute
+
+specified on a literal result element in the stylesheet</p></item>
+
+
+
+<item><p>the string-value of a namespace node on a literal result
+
+element in the stylesheet</p></item>
+
+
+
+</ulist>
+
+
+
+<e:element-syntax name="namespace-alias">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="stylesheet-prefix" required="yes">
+
+    <e:data-type name="prefix"/>
+
+    <e:constant value="#default"/>
+
+  </e:attribute>
+
+  <e:attribute name="result-prefix" required="yes">
+
+    <e:data-type name="prefix"/>
+
+    <e:constant value="#default"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p><termdef id="dt-alias" term="Alias">A stylesheet can use the
+
+<code>xsl:namespace-alias</code> element to declare that one namespace
+
+URI is an <term>alias</term> for another namespace URI.</termdef> When
+
+a <termref def="dt-literal-namespace-uri">literal namespace
+
+URI</termref> has been declared to be an alias for another namespace
+
+URI, then the namespace URI in the result tree will be the namespace
+
+URI that the literal namespace URI is an alias for, instead of the
+
+literal namespace URI itself.  The <code>xsl:namespace-alias</code>
+
+element declares that the namespace URI bound to the prefix specified
+
+by the <code>stylesheet-prefix</code> attribute is an alias for the
+
+namespace URI bound to the prefix specified by the
+
+<code>result-prefix</code> attribute.  Thus, the
+
+<code>stylesheet-prefix</code> attribute specifies the namespace URI
+
+that will appear in the stylesheet, and the
+
+<code>result-prefix</code> attribute specifies the corresponding
+
+namespace URI that will appear in the result tree.  The default
+
+namespace (as declared by <code>xmlns</code>) may be specified by
+
+using <code>#default</code> instead of a prefix.  If a namespace URI
+
+is declared to be an alias for multiple different namespace URIs, then
+
+the declaration with the highest <termref
+
+def="dt-import-precedence">import precedence</termref> is used. It is
+
+an error if there is more than one such declaration.  An XSLT
+
+processor may signal the error; if it does not signal the error, it
+
+must recover by choosing, from amongst the declarations with the
+
+highest import precedence, the one that occurs last in the
+
+stylesheet.</p>
+
+
+
+<p>When literal result elements are being used to create element,
+
+attribute, or namespace nodes that use the XSLT namespace URI, the
+
+stylesheet must use an alias.  For example, the stylesheet</p>
+
+
+
+<eg>&lt;xsl:stylesheet
+
+  version="1.0"
+
+  xmlns:xsl="&XSLT.ns;"
+
+  xmlns:fo="&XSLFO.ns;"
+
+  xmlns:axsl="&XSLTA.ns;"><![CDATA[
+
+
+
+<xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
+
+
+
+<xsl:template match="/">
+
+  <axsl:stylesheet>
+
+    <xsl:apply-templates/>
+
+  </axsl:stylesheet>
+
+</xsl:template>
+
+
+
+<xsl:template match="block">
+
+  <axsl:template match="{.}">
+
+     <fo:block><axsl:apply-templates/></fo:block>
+
+  </axsl:template>
+
+</xsl:template>
+
+
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<p>will generate an XSLT stylesheet from a document of the form:</p>
+
+
+
+<eg><![CDATA[<elements>
+
+<block>p</block>
+
+<block>h1</block>
+
+<block>h2</block>
+
+<block>h3</block>
+
+<block>h4</block>
+
+</elements>]]></eg>
+
+
+
+<note><p>It may be necessary also to use aliases for namespaces other
+
+than the XSLT namespace URI.  For example, literal result elements
+
+belonging to a namespace dealing with digital signatures might cause
+
+XSLT stylesheets to be mishandled by general-purpose security
+
+software; using an alias for the namespace would avoid the possibility
+
+of such mishandling.</p></note>
+
+
+
+</div3>
+
+
+
+<div3>
+
+<head>Creating Elements with <code>xsl:element</code></head>
+
+
+
+<e:element-syntax name="element">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="name" required="yes">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="qname"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="namespace">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="uri-reference"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="use-attribute-sets">
+
+    <e:data-type name="qnames"/>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:element</code> element allows an element to be
+
+created with a computed name.  The <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref> of the
+
+element to be created is specified by a required <code>name</code>
+
+attribute and an optional <code>namespace</code> attribute.  The
+
+content of the <code>xsl:element</code> element is a template for the
+
+attributes and children of the created element.</p>
+
+
+
+<p>The <code>name</code> attribute is interpreted as an <termref
+
+def="dt-attribute-value-template">attribute value template</termref>.
+
+It is an error if the string that results from instantiating the
+
+attribute value template is not a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>.  An XSLT processor may signal
+
+the error; if it does not signal the error, then it must recover
+
+by making the the result of instantiating the <code>xsl:element</code>
+
+element be the sequence of nodes created by instantiating
+
+the content of the  <code>xsl:element</code> element, excluding
+
+any initial attribute nodes. If the <code>namespace</code> attribute is
+
+not present then the <xnt href="&XMLNames;#NT-QName">QName</xnt> is
+
+expanded into an expanded-name using the namespace declarations in
+
+effect for the <code>xsl:element</code> element, including any default
+
+namespace declaration.</p>
+
+
+
+<p>If the <code>namespace</code> attribute is present, then it also is
+
+interpreted as an <termref def="dt-attribute-value-template">attribute
+
+value template</termref>. The string that results from instantiating
+
+the attribute value template should be a URI reference.  It is not an
+
+error if the string is not a syntactically legal URI reference.  If
+
+the string is empty, then the expanded-name of the element has a null
+
+namespace URI.  Otherwise, the string is used as the namespace URI of
+
+the expanded-name of the element to be created. The local part of the
+
+<xnt href="&XMLNames;#NT-QName">QName</xnt> specified by the
+
+<code>name</code> attribute is used as the local part of the
+
+expanded-name of the element to be created.</p>
+
+
+
+<p>XSLT processors may make use of the prefix of the <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> specified in the
+
+<code>name</code> attribute when selecting the prefix used for
+
+outputting the created element as XML; however, they are not required
+
+to do so.</p>
+
+
+
+</div3>
+
+
+
+<div3 id="creating-attributes">
+
+<head>Creating Attributes with <code>xsl:attribute</code></head>
+
+
+
+<e:element-syntax name="attribute">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="name" required="yes">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="qname"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="namespace">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="uri-reference"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:attribute</code> element can be used to add
+
+attributes to result elements whether created by literal result
+
+elements in the stylesheet or by instructions such as
+
+<code>xsl:element</code>. The <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref> of the
+
+attribute to be created is specified by a required <code>name</code>
+
+attribute and an optional <code>namespace</code> attribute.
+
+Instantiating an <code>xsl:attribute</code> element adds an attribute
+
+node to the containing result element node. The content of the
+
+<code>xsl:attribute</code> element is a template for the value of the
+
+created attribute.</p>
+
+
+
+<p>The <code>name</code> attribute is interpreted as an <termref
+
+def="dt-attribute-value-template">attribute value template</termref>.
+
+It is an error if the string that results from instantiating the
+
+attribute value template is not a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> or is the string
+
+<code>xmlns</code>.  An XSLT processor may signal the error; if it
+
+does not signal the error, it must recover by not adding the attribute
+
+to the result tree. If the <code>namespace</code> attribute is not
+
+present, then the <xnt href="&XMLNames;#NT-QName">QName</xnt> is
+
+expanded into an expanded-name using the namespace declarations in
+
+effect for the <code>xsl:attribute</code> element, <emph>not</emph>
+
+including any default namespace declaration.</p>
+
+
+
+<p>If the <code>namespace</code> attribute is present, then it also is
+
+interpreted as an <termref def="dt-attribute-value-template">attribute
+
+value template</termref>. The string that results from instantiating
+
+it should be a URI reference.  It is not an error if the string is not
+
+a syntactically legal URI reference.  If the string is empty, then the
+
+expanded-name of the attribute has a null namespace URI.  Otherwise,
+
+the string is used as the namespace URI of the expanded-name of the
+
+attribute to be created. The local part of the <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> specified by the
+
+<code>name</code> attribute is used as the local part of the
+
+expanded-name of the attribute to be created.</p>
+
+
+
+<p>XSLT processors may make use of the prefix of the <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> specified in the
+
+<code>name</code> attribute when selecting the prefix used for
+
+outputting the created attribute as XML; however, they are not
+
+required to do so and, if the prefix is <code>xmlns</code>, they must
+
+not do so. Thus, although it is not an error to do:</p>
+
+
+
+<eg>&lt;xsl:attribute name="xmlns:xsl" namespace="whatever">&XSLT.ns;&lt;/xsl:attribute></eg>
+
+
+
+<p>it will not result in a namespace declaration being output.</p>
+
+
+
+<p>Adding an attribute to an element replaces any existing attribute
+
+of that element with the same expanded-name.</p>
+
+
+
+<p>The following are all errors:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>Adding an attribute to an element after children have been
+
+added to it; implementations may either signal the error or ignore the
+
+attribute.</p></item>
+
+
+
+<item><p>Adding an attribute to a node that is not an element;
+
+implementations may either signal the error or ignore the
+
+attribute.</p></item>
+
+
+
+<item><p>Creating nodes other than text nodes during the
+
+instantiation of the content of the <code>xsl:attribute</code>
+
+element; implementations may either signal the error or ignore the
+
+offending nodes.</p></item>
+
+
+
+</ulist>
+
+
+
+<note><p>When an <code>xsl:attribute</code> contains a text node with
+
+a newline, then the XML output must contain a character reference.
+
+For example,</p>
+
+
+
+<eg><![CDATA[<xsl:attribute name="a">x
+
+y</xsl:attribute>]]></eg>
+
+
+
+<p>will result in the output</p>
+
+
+
+<eg><![CDATA[a="x&#xA;y"]]></eg>
+
+
+
+<p>(or with any equivalent character reference). The XML output cannot
+
+be</p>
+
+
+
+<eg><![CDATA[a="x
+
+y"]]></eg>
+
+
+
+<p>This is because XML 1.0 requires newline characters in attribute
+
+values to be normalized into spaces but requires character references
+
+to newline characters not to be normalized.  The attribute values in
+
+the data model represent the attribute value after normalization.  If
+
+a newline occurring in an attribute value in the tree were output as a
+
+newline character rather than as character reference, then the
+
+attribute value in the tree created by reparsing the XML would contain
+
+a space not a newline, which would mean that the tree had not been
+
+output correctly.</p></note>
+
+
+
+</div3>
+
+
+
+<div3 id="attribute-sets">
+
+
+
+<head>Named Attribute Sets</head>
+
+
+
+<e:element-syntax name="attribute-set">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="name" required="yes">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:attribute name="use-attribute-sets">
+
+    <e:data-type name="qnames"/>
+
+  </e:attribute>
+
+  <e:element repeat="zero-or-more" name="attribute"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:attribute-set</code> element defines a named set of
+
+attributes.  The <code>name</code> attribute specifies the name of the
+
+attribute set.  The value of the <code>name</code> attribute is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as described
+
+in <specref ref="qname"/>. The content of the <code>xsl:attribute-set</code>
+
+element consists of zero or more <code>xsl:attribute</code> elements
+
+that specify the attributes in the set.</p>
+
+
+
+<p>Attribute sets are used by specifying a
+
+<code>use-attribute-sets</code> attribute on <code>xsl:element</code>,
+
+<code>xsl:copy</code> (see <specref ref="copying"/>) or
+
+<code>xsl:attribute-set</code> elements.  The value of the
+
+<code>use-attribute-sets</code> attribute is a whitespace-separated
+
+list of names of attribute sets.  Each name is specified as a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as described
+
+in <specref ref="qname"/>.  Specifying a
+
+<code>use-attribute-sets</code> attribute is equivalent to adding
+
+<code>xsl:attribute</code> elements for each of the attributes in each
+
+of the named attribute sets to the beginning of the content of the
+
+element with the <code>use-attribute-sets</code> attribute, in the
+
+same order in which the names of the attribute sets are specified in
+
+the <code>use-attribute-sets</code> attribute.  It is an error if use
+
+of <code>use-attribute-sets</code> attributes on
+
+<code>xsl:attribute-set</code> elements causes an attribute set to
+
+directly or indirectly use itself.</p>
+
+
+
+<p>Attribute sets can also be used by specifying an
+
+<code>xsl:use-attribute-sets</code> attribute on a literal result
+
+element.  The value of the <code>xsl:use-attribute-sets</code>
+
+attribute is a whitespace-separated list of names of attribute sets.
+
+The <code>xsl:use-attribute-sets</code> attribute has the same effect
+
+as the <code>use-attribute-sets</code> attribute on
+
+<code>xsl:element</code> with the additional rule that attributes
+
+specified on the literal result element itself are treated as if they
+
+were specified by <code>xsl:attribute</code> elements before any
+
+actual <code>xsl:attribute</code> elements but after any
+
+<code>xsl:attribute</code> elements implied by the
+
+<code>xsl:use-attribute-sets</code> attribute.  Thus, for a literal
+
+result element, attributes from attribute sets named in an
+
+<code>xsl:use-attribute-sets</code> attribute will be added first, in
+
+the order listed in the attribute; next, attributes specified on the
+
+literal result element will be added; finally, any attributes
+
+specified by <code>xsl:attribute</code> elements will be added.  Since
+
+adding an attribute to an element replaces any existing attribute of
+
+that element with the same name, this means that attributes specified
+
+in attribute sets can be overridden by attributes specified on the
+
+literal result element itself.</p>
+
+
+
+<p>The template within each <code>xsl:attribute</code> element in an
+
+<code>xsl:attribute-set</code> element is instantiated each time the
+
+attribute set is used; it is instantiated using the same current node
+
+and current node list as is used for instantiating the element bearing
+
+the <code>use-attribute-sets</code> or
+
+<code>xsl:use-attribute-sets</code> attribute. However, it is the
+
+position in the stylesheet of the <code>xsl:attribute</code> element
+
+rather than of the element bearing the <code>use-attribute-sets</code>
+
+or <code>xsl:use-attribute-sets</code> attribute that determines which
+
+variable bindings are visible (see <specref ref="variables"/>); thus,
+
+only variables and parameters declared by <termref
+
+def="dt-top-level">top-level</termref> <code>xsl:variable</code> and
+
+<code>xsl:param</code> elements are visible.</p>
+
+
+
+<p>The following example creates a named attribute set
+
+<code>title-style</code> and uses it in a template rule.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="chapter/heading">
+
+  <fo:block quadding="start" xsl:use-attribute-sets="title-style">
+
+    <xsl:apply-templates/>
+
+  </fo:block>
+
+</xsl:template>
+
+
+
+<xsl:attribute-set name="title-style">
+
+  <xsl:attribute name="font-size">12pt</xsl:attribute>
+
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+
+</xsl:attribute-set>]]></eg>
+
+
+
+<p>Multiple definitions of an attribute set with the same
+
+expanded-name are merged.  An attribute from a definition that has
+
+higher <termref def="dt-import-precedence">import precedence</termref>
+
+takes precedence over an attribute from a definition that has lower
+
+<termref def="dt-import-precedence">import precedence</termref>.  It
+
+is an error if there are two attribute sets that have the same
+
+expanded-name and equal import precedence and that both contain
+
+the same attribute, unless there is a definition of the attribute set
+
+with higher <termref def="dt-import-precedence">import
+
+precedence</termref> that also contains the attribute.  An XSLT
+
+processor may signal the error; if it does not signal the error, it
+
+must recover by choosing from amongst the definitions that specify the
+
+attribute that have the highest import precedence the one that was
+
+specified last in the stylesheet.  Where the attributes in an
+
+attribute set were specified is relevant only in merging the
+
+attributes into the attribute set; it makes no difference when the
+
+attribute set is used.</p>
+
+
+
+</div3>
+
+
+
+</div2>
+
+
+
+<div2>
+
+
+
+<head>Creating Text</head>
+
+
+
+<p>A template can also contain text nodes.  Each text node in a
+
+template remaining after whitespace has been stripped as specified in
+
+<specref ref="strip"/> will create a text node with the same
+
+string-value in the result tree.  Adjacent text nodes in the result
+
+tree are automatically merged.</p>
+
+
+
+<p>Note that text is processed at the tree level. Thus, markup of
+
+<code>&amp;lt;</code> in a template will be represented in the
+
+stylesheet tree by a text node that includes the character
+
+<code>&lt;</code>. This will create a text node in the result tree
+
+that contains a <code>&lt;</code> character, which will be represented
+
+by the markup <code>&amp;lt;</code> (or an equivalent character
+
+reference) when the result tree is externalized as an XML document
+
+(unless output escaping is disabled as described in <specref
+
+ref="disable-output-escaping"/>).</p>
+
+
+
+<e:element-syntax name="text">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="disable-output-escaping">
+
+    <e:constant value="yes"/>
+
+    <e:constant value="no"/>
+
+  </e:attribute>
+
+  <e:text/>  
+
+</e:element-syntax>
+
+
+
+<p>Literal data characters may also be wrapped in an
+
+<code>xsl:text</code> element.  This wrapping may change what
+
+whitespace characters are stripped (see <specref ref="strip"/>) but
+
+does not affect how the characters are handled by the XSLT processor
+
+thereafter.</p>
+
+
+
+<note><p>The <code>xml:lang</code> and <code>xml:space</code>
+
+attributes are not treated specially by XSLT. In particular,</p>
+
+
+
+<ulist>
+
+<item><p>it is the responsibility of the stylesheet author explicitly
+
+to generate any <code>xml:lang</code> or <code>xml:space</code>
+
+attributes that are needed in the result;</p></item>
+
+
+
+<item><p>specifying an <code>xml:lang</code> or <code>xml:space</code>
+
+attribute on an element in the XSLT namespace will not cause any
+
+<code>xml:lang</code> or <code>xml:space</code> attributes to appear
+
+in the result.</p></item>
+
+</ulist>
+
+</note>
+
+
+
+</div2>
+
+
+
+
+
+<div2>
+
+<head>Creating Processing Instructions</head>
+
+
+
+
+
+<e:element-syntax name="processing-instruction">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="name" required="yes">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="ncname"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:processing-instruction</code> element is instantiated
+
+to create a processing instruction node.  The content of the
+
+<code>xsl:processing-instruction</code> element is a template for the
+
+string-value of the processing instruction node.  The
+
+<code>xsl:processing-instruction</code> element has a required
+
+<code>name</code> attribute that specifies the name of the processing
+
+instruction node.  The value of the <code>name</code> attribute is
+
+interpreted as an <termref def="dt-attribute-value-template">attribute
+
+value template</termref>.</p>
+
+
+
+<p>For example, this</p>
+
+
+
+<eg><![CDATA[<xsl:processing-instruction name="xml-stylesheet">href="book.css" type="text/css"</xsl:processing-instruction>]]></eg>
+
+
+
+<p>would create the processing instruction</p>
+
+
+
+<eg><![CDATA[<?xml-stylesheet href="book.css" type="text/css"?>]]></eg>
+
+
+
+<p>It is an error if the string that results from instantiating the
+
+<code>name</code> attribute is not both an <xnt
+
+href="&XMLNames;#NT-NCName">NCName</xnt> and a <xnt
+
+href="&XML;#NT-PITarget">PITarget</xnt>.  An XSLT processor may signal
+
+the error; if it does not signal the error, it must recover by not
+
+adding the processing instruction to the result tree.</p>
+
+
+
+<note><p>This means that <code>xsl:processing-instruction</code>
+
+cannot be used to output an XML declaration.  The
+
+<code>xsl:output</code> element should be used instead (see <specref
+
+ref="output"/>).</p></note>
+
+
+
+<p>It is an error if instantiating the content of
+
+<code>xsl:processing-instruction</code> creates nodes other than
+
+text nodes.  An XSLT processor may signal the error; if it does not
+
+signal the error, it must recover by ignoring the offending nodes
+
+together with their content.</p>
+
+
+
+<p>It is an error if the result of instantiating the content of the
+
+<code>xsl:processing-instruction</code> contains the string
+
+<code>?&gt;</code>.  An XSLT processor may signal the error; if it does
+
+not signal the error, it must recover by inserting a space after any
+
+occurrence of <code>?</code> that is followed by a <code>&gt;</code>.</p>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Creating Comments</head>
+
+
+
+<e:element-syntax name="comment">
+
+  <e:in-category name="instruction"/>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:comment</code> element is instantiated to create a
+
+comment node in the result tree.  The content of the
+
+<code>xsl:comment</code> element is a template for the string-value of
+
+the comment node.</p>
+
+
+
+<p>For example, this</p>
+
+
+
+<eg><![CDATA[<xsl:comment>This file is automatically generated. Do not edit!</xsl:comment>]]></eg>
+
+
+
+<p>would create the comment</p>
+
+
+
+<eg><![CDATA[<!--This file is automatically generated. Do not edit!-->]]></eg>
+
+
+
+<p>It is an error if instantiating the content of
+
+<code>xsl:comment</code> creates nodes other than text nodes.  An
+
+XSLT processor may signal the error; if it does not signal the error,
+
+it must recover by ignoring the offending nodes together with their
+
+content.</p>
+
+
+
+<p>It is an error if the result of instantiating the content of the
+
+<code>xsl:comment</code> contains the string <code>--</code> or ends
+
+with <code>-</code>.  An XSLT processor may signal the error; if it
+
+does not signal the error, it must recover by inserting a space after
+
+any occurrence of <code>-</code> that is followed by another
+
+<code>-</code> or that ends the comment.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="copying">
+
+<head>Copying</head>
+
+
+
+<e:element-syntax name="copy">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="use-attribute-sets">
+
+    <e:data-type name="qnames"/>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:copy</code> element provides an easy way of copying
+
+the current node. Instantiating the <code>xsl:copy</code> element
+
+creates a copy of the current node.  The namespace nodes of the
+
+current node are automatically copied as well, but the attributes and
+
+children of the node are not automatically copied.  The content of the
+
+<code>xsl:copy</code> element is a template for the attributes and
+
+children of the created node; the content is instantiated only for
+
+nodes of types that can have attributes or children (i.e. root
+
+nodes and element nodes).</p>
+
+
+
+<p>The <code>xsl:copy</code> element may have a
+
+<code>use-attribute-sets</code> attribute (see <specref
+
+ref="attribute-sets"/>). This is used only when copying element
+
+nodes.</p>
+
+
+
+<p>The root node is treated specially because the root node of the
+
+result tree is created implicitly.  When the current node is the root
+
+node, <code>xsl:copy</code> will not create a root node, but will just
+
+use the content template.</p>
+
+
+
+<p>For example, the identity transformation can be written using
+
+<code>xsl:copy</code> as follows:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="@*|node()">
+
+  <xsl:copy>
+
+    <xsl:apply-templates select="@*|node()"/>
+
+  </xsl:copy>
+
+</xsl:template>]]></eg>
+
+
+
+<p>When the current node is an attribute, then if it would be an error
+
+to use <code>xsl:attribute</code> to create an attribute with the same
+
+name as the current node, then it is also an error to use
+
+<code>xsl:copy</code> (see <specref ref="creating-attributes"/>).</p>
+
+
+
+<p>The following example shows how <code>xml:lang</code> attributes
+
+can be easily copied through from source to result. If a stylesheet
+
+defines the following named template:</p>
+
+
+
+<eg><![CDATA[<xsl:template name="apply-templates-copy-lang">
+
+ <xsl:for-each select="@xml:lang">
+
+   <xsl:copy/>
+
+ </xsl:for-each>
+
+ <xsl:apply-templates/>
+
+</xsl:template>]]></eg>
+
+
+
+<p>then it can simply do</p>
+
+
+
+<eg><![CDATA[<xsl:call-template name="apply-templates-copy-lang"/>]]></eg>
+
+
+
+<p>instead of</p>
+
+
+
+<eg><![CDATA[<xsl:apply-templates/>]]></eg>
+
+
+
+<p>when it wants to copy the <code>xml:lang</code> attribute.</p>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Computing Generated Text</head>
+
+
+
+<p>Within a template, the <code>xsl:value-of</code> element can be
+
+used to compute generated text, for example by extracting text from
+
+the source tree or by inserting the value of a variable.  The
+
+<code>xsl:value-of</code> element does this with an <termref
+
+def="dt-expression">expression</termref> that is specified as the
+
+value of the <code>select</code> attribute.  Expressions can
+
+also be used inside attribute values of literal result elements by
+
+enclosing the expression in curly braces (<code>{}</code>).</p>
+
+
+
+<div3 id="value-of">
+
+<head>Generating Text with <code>xsl:value-of</code></head>
+
+
+
+<e:element-syntax name="value-of">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="select" required="yes">
+
+    <e:data-type name="string-expression"/>
+
+  </e:attribute>
+
+  <e:attribute name="disable-output-escaping">
+
+    <e:constant value="yes"/>
+
+    <e:constant value="no"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:value-of</code> element is instantiated to create a
+
+text node in the result tree.  The required <code>select</code>
+
+attribute is an <termref def="dt-expression">expression</termref>;
+
+this expression is evaluated and the resulting object is converted to
+
+a string as if by a call to the <xfunction>string</xfunction>
+
+function. The string specifies the string-value of the created text
+
+node.  If the string is empty, no text node will be created.  The
+
+created text node will be merged with any adjacent text nodes.</p>
+
+
+
+<p>The <code>xsl:copy-of</code> element can be used to copy a node-set
+
+over to the result tree without converting it to a string. See <specref
+
+ref="copy-of"/>.</p>
+
+
+
+<p>For example, the following creates an HTML paragraph from a
+
+<code>person</code> element with <code>given-name</code> and
+
+<code>family-name</code> attributes.  The paragraph will contain the value
+
+of the <code>given-name</code> attribute of the current node followed
+
+by a space and the value of the <code>family-name</code> attribute of the
+
+current node.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="person">
+
+  <p>
+
+   <xsl:value-of select="@given-name"/>
+
+   <xsl:text> </xsl:text>
+
+   <xsl:value-of select="@family-name"/>
+
+  </p>
+
+</xsl:template>]]></eg>
+
+
+
+<p>For another example, the following creates an HTML paragraph from a
+
+<code>person</code> element with <code>given-name</code> and
+
+<code>family-name</code> children elements.  The paragraph will
+
+contain the string-value of the first <code>given-name</code> child
+
+element of the current node followed by a space and the string-value
+
+of the first <code>family-name</code> child element of the current
+
+node.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="person">
+
+  <p>
+
+   <xsl:value-of select="given-name"/>
+
+   <xsl:text> </xsl:text>
+
+   <xsl:value-of select="family-name"/>
+
+  </p>
+
+</xsl:template>]]></eg>
+
+
+
+<p>The following precedes each <code>procedure</code> element with a
+
+paragraph containing the security level of the procedure.  It assumes
+
+that the security level that applies to a procedure is determined by a
+
+<code>security</code> attribute on the procedure element or on an
+
+ancestor element of the procedure. It also assumes that if more than
+
+one such element has a <code>security</code> attribute then the
+
+security level is determined by the element that is closest to the
+
+procedure.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="procedure">
+
+  <fo:block>
+
+    <xsl:value-of select="ancestor-or-self::*[@security][1]/@security"/>
+
+  </fo:block>
+
+  <xsl:apply-templates/>
+
+</xsl:template>]]></eg>
+
+
+
+</div3>
+
+
+
+<div3 id="attribute-value-templates">
+
+<head>Attribute Value Templates</head>
+
+
+
+<p><termdef id="dt-attribute-value-template" term="Attribute Value
+
+Template">In an attribute value that is interpreted as an
+
+<term>attribute value template</term>, such as an attribute of a
+
+literal result element, an <termref
+
+def="dt-expression">expression</termref> can be used by surrounding
+
+the expression with curly braces (<code>{}</code>)</termdef>.  The
+
+attribute value template is instantiated by replacing the expression
+
+together with surrounding curly braces by the result of evaluating the
+
+expression and converting the resulting object to a string as if by a
+
+call to the <xfunction>string</xfunction> function.  Curly braces are
+
+not recognized in an attribute value in an XSLT stylesheet unless the
+
+attribute is specifically stated to be one that is interpreted as an
+
+attribute value template; in an element syntax summary, the value
+
+of such attributes is surrounded by curly braces.</p>
+
+
+
+<note><p>Not all attributes are interpreted as attribute value
+
+templates.  Attributes whose value is an expression or pattern,
+
+attributes of <termref def="dt-top-level">top-level</termref> elements
+
+and attributes that refer to named XSLT objects are not interpreted as
+
+attribute value templates. In addition, <code>xmlns</code> attributes
+
+are not interpreted as attribute value templates; it would not be
+
+conformant with the XML Namespaces Recommendation to do
+
+this.</p></note>
+
+
+
+<p>The following example creates an <code>img</code> result element
+
+from a <code>photograph</code> element in the source; the value of the
+
+<code>src</code> attribute of the <code>img</code> element is computed
+
+from the value of the <code>image-dir</code> variable and the
+
+string-value of the <code>href</code> child of the
+
+<code>photograph</code> element; the value of the <code>width</code>
+
+attribute of the <code>img</code> element is computed from the value
+
+of the <code>width</code> attribute of the <code>size</code> child of
+
+the <code>photograph</code> element:</p>
+
+
+
+<eg><![CDATA[<xsl:variable name="image-dir">/images</xsl:variable>
+
+
+
+<xsl:template match="photograph">
+
+<img src="{$image-dir}/{href}" width="{size/@width}"/>
+
+</xsl:template>]]></eg>
+
+
+
+<p>With this source</p>
+
+
+
+<eg><![CDATA[<photograph>
+
+  <href>headquarters.jpg</href>
+
+  <size width="300"/>
+
+</photograph>]]></eg>
+
+
+
+<p>the result would be</p>
+
+
+
+<eg><![CDATA[<img src="/images/headquarters.jpg" width="300"/>]]></eg>
+
+
+
+<p>When an attribute value template is instantiated, a double left or
+
+right curly brace outside an expression will be replaced by a single
+
+curly brace.  It is an error if a right curly brace occurs in an
+
+attribute value template outside an expression without being followed
+
+by a second right curly brace.  A right curly brace inside a <xnt
+
+href="&XPath;#NT-Literal">Literal</xnt> in an expression is not
+
+recognized as terminating the expression.</p>
+
+
+
+<p>Curly braces are <emph>not</emph> recognized recursively inside
+
+expressions.  For example:</p>
+
+
+
+<eg role="error"><![CDATA[<a href="#{id({@ref})/title}">]]></eg>
+
+
+
+<p>is <emph>not</emph> allowed.  Instead, use simply:</p>
+
+
+
+<eg><![CDATA[<a href="#{id(@ref)/title}">]]></eg>
+
+
+
+</div3>
+
+
+
+</div2>
+
+
+
+<div2 id="number">
+
+<head>Numbering</head>
+
+
+
+<e:element-syntax name="number">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="level">
+
+    <e:constant value="single"/>
+
+    <e:constant value="multiple"/>
+
+    <e:constant value="any"/>
+
+  </e:attribute>
+
+  <e:attribute name="count">
+
+    <e:data-type name="pattern"/>
+
+  </e:attribute>
+
+  <e:attribute name="from">
+
+    <e:data-type name="pattern"/>
+
+  </e:attribute>
+
+  <e:attribute name="value">
+
+    <e:data-type name="number-expression"/>
+
+  </e:attribute>
+
+  <e:attribute name="format">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="string"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="lang">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="nmtoken"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="letter-value">
+
+    <e:attribute-value-template>
+
+      <e:constant value="alphabetic"/>
+
+      <e:constant value="traditional"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="grouping-separator">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="char"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="grouping-size">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="number"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:number</code> element is used to insert a formatted
+
+number into the result tree.  The number to be inserted may be
+
+specified by an expression. The <code>value</code> attribute contains
+
+an <termref def="dt-expression">expression</termref>.  The expression
+
+is evaluated and the resulting object is converted to a number as if
+
+by a call to the <xfunction>number</xfunction> function.  The number is
+
+rounded to an integer and then converted to a string using the
+
+attributes specified in <specref ref="convert"/>; in this
+
+context, the value of each of these attributes is
+
+interpreted as an <termref def="dt-attribute-value-template">attribute
+
+value template</termref>.  After conversion, the resulting string is
+
+inserted in the result tree. For example, the following example
+
+numbers a sorted list:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="items">
+
+  <xsl:for-each select="item">
+
+    <xsl:sort select="."/>
+
+    <p>
+
+      <xsl:number value="position()" format="1. "/>
+
+      <xsl:value-of select="."/>
+
+    </p>
+
+  </xsl:for-each>
+
+</xsl:template>]]></eg>
+
+
+
+<p>If no <code>value</code> attribute is specified, then the
+
+<code>xsl:number</code> element inserts a number based on the position
+
+of the current node in the source tree. The following attributes
+
+control how the current node is to be numbered:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>The <code>level</code> attribute specifies what levels of the
+
+source tree should be considered; it has the values
+
+<code>single</code>, <code>multiple</code> or <code>any</code>. The
+
+default is <code>single</code>.</p></item>
+
+
+
+<item><p>The <code>count</code> attribute is a pattern that specifies
+
+what nodes should be counted at those levels.  If <code>count</code>
+
+attribute is not specified, then it defaults to the pattern that
+
+matches any node with the same node type as the current node and, if
+
+the current node has an expanded-name, with the same expanded-name as
+
+the current node.</p></item>
+
+
+
+<item><p>The <code>from</code> attribute is a pattern that specifies
+
+where counting starts.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>In addition, the attributes specified in <specref ref="convert"/>
+
+are used for number to string conversion, as in the case when the
+
+<code>value</code> attribute is specified.</p>
+
+
+
+<p>The <code>xsl:number</code> element first constructs a list of
+
+positive integers using the <code>level</code>, <code>count</code> and
+
+<code>from</code> attributes:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>When <code>level="single"</code>, it goes up to the first
+
+node in the ancestor-or-self axis that matches
+
+the <code>count</code> pattern, and constructs a list of length one
+
+containing one plus the number of preceding siblings of that ancestor
+
+that match the <code>count</code> pattern. If there is no such
+
+ancestor, it constructs an empty list.  If the <code>from</code>
+
+attribute is specified, then the only ancestors that are searched are
+
+those that are descendants of the nearest ancestor that matches the
+
+<code>from</code> pattern. Preceding siblings has the same meaning
+
+here as with the <code>preceding-sibling</code> axis.</p></item>
+
+
+
+<item><p>When <code>level="multiple"</code>, it constructs a list of all
+
+ancestors of the current node in document order followed by the
+
+element itself; it then selects from the list those nodes that match
+
+the <code>count</code> pattern; it then maps each node in the list to
+
+one plus the number of preceding siblings of that node that match the
+
+<code>count</code> pattern.  If the <code>from</code> attribute is
+
+specified, then the only ancestors that are searched are those that
+
+are descendants of the nearest ancestor that matches the
+
+<code>from</code> pattern. Preceding siblings has the same meaning
+
+here as with the <code>preceding-sibling</code> axis.</p></item>
+
+
+
+<item><p>When <code>level="any"</code>, it constructs a list of length
+
+one containing the number of nodes that match the <code>count</code>
+
+pattern and belong to the set containing the current node and all
+
+nodes at any level of the document that are before the current node in
+
+document order, excluding any namespace and attribute nodes (in other
+
+words the union of the members of the <code>preceding</code> and
+
+<code>ancestor-or-self</code> axes). If the <code>from</code>
+
+attribute is specified, then only nodes after the first node before
+
+the current node that match the <code>from</code> pattern are
+
+considered.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>The list of numbers is then converted into a string using the
+
+attributes specified in <specref ref="convert"/>; in this
+
+context, the value of each of these attributes is
+
+interpreted as an <termref def="dt-attribute-value-template">attribute
+
+value template</termref>.  After conversion, the resulting string is
+
+inserted in the result tree.</p>
+
+
+
+<p>The following would number the items in an ordered list:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="ol/item">
+
+  <fo:block>
+
+    <xsl:number/><xsl:text>. </xsl:text><xsl:apply-templates/>
+
+  </fo:block>
+
+<xsl:template>]]></eg>
+
+
+
+<p>The following two rules would number <code>title</code> elements.
+
+This is intended for a document that contains a sequence of chapters
+
+followed by a sequence of appendices, where both chapters and
+
+appendices contain sections, which in turn contain subsections.
+
+Chapters are numbered 1, 2, 3; appendices are numbered A, B, C;
+
+sections in chapters are numbered 1.1, 1.2, 1.3; sections in
+
+appendices are numbered A.1, A.2, A.3.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="title">
+
+  <fo:block>
+
+     <xsl:number level="multiple"
+
+                 count="chapter|section|subsection"
+
+                 format="1.1 "/>
+
+     <xsl:apply-templates/>
+
+  </fo:block>
+
+</xsl:template>
+
+
+
+<xsl:template match="appendix//title" priority="1">
+
+  <fo:block>
+
+     <xsl:number level="multiple"
+
+                 count="appendix|section|subsection"
+
+                 format="A.1 "/>
+
+     <xsl:apply-templates/>
+
+  </fo:block>
+
+</xsl:template>]]></eg>
+
+
+
+<p>The following example numbers notes sequentially within a
+
+chapter:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="note">
+
+  <fo:block>
+
+     <xsl:number level="any" from="chapter" format="(1) "/>
+
+     <xsl:apply-templates/>
+
+  </fo:block>
+
+</xsl:template>]]></eg>
+
+
+
+<p>The following example would number <code>H4</code> elements in HTML
+
+with a three-part label:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="H4">
+
+ <fo:block>
+
+   <xsl:number level="any" from="H1" count="H2"/>
+
+   <xsl:text>.</xsl:text>
+
+   <xsl:number level="any" from="H2" count="H3"/>
+
+   <xsl:text>.</xsl:text>
+
+   <xsl:number level="any" from="H3" count="H4"/>
+
+   <xsl:text> </xsl:text>
+
+   <xsl:apply-templates/>
+
+ </fo:block>
+
+</xsl:template>]]></eg>
+
+
+
+<div3 id="convert">
+
+<head>Number to String Conversion Attributes</head>
+
+
+
+<p>The following attributes are used to control conversion of a list
+
+of numbers into a string. The numbers are integers greater than
+
+0. The attributes are all optional.</p>
+
+
+
+<p>The main attribute is <code>format</code>.  The default value for
+
+the <code>format</code> attribute is <code>1</code>.  The
+
+<code>format</code> attribute is split into a sequence of tokens where
+
+each token is a maximal sequence of alphanumeric characters or a
+
+maximal sequence of non-alphanumeric characters.  Alphanumeric means
+
+any character that has a Unicode category of Nd, Nl, No, Lu, Ll, Lt,
+
+Lm or Lo.  The alphanumeric tokens (format tokens) specify the format
+
+to be used for each number in the list.  If the first token is a
+
+non-alphanumeric token, then the constructed string will start with
+
+that token; if the last token is non-alphanumeric token, then the
+
+constructed string will end with that token.  Non-alphanumeric tokens
+
+that occur between two format tokens are separator tokens that are
+
+used to join numbers in the list.  The <var>n</var>th format token
+
+will be used to format the <var>n</var>th number in the list.  If
+
+there are more numbers than format tokens, then the last format token
+
+will be used to format remaining numbers.  If there are no format
+
+tokens, then a format token of <code>1</code> is used to format all
+
+numbers.  The format token specifies the string to be used to
+
+represent the number 1.  Each number after the first will be separated
+
+from the preceding number by the separator token preceding the format
+
+token used to format that number, or, if there are no separator
+
+tokens, then by <code>.</code> (a period character).</p>
+
+
+
+<p>Format tokens are a superset of the allowed values for the
+
+<code>type</code> attribute for the <code>OL</code> element in HTML
+
+4.0 and are interpreted as follows:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>Any token where the last character has a decimal digit value
+
+of 1 (as specified in the Unicode character property database),
+
+and the Unicode value of preceding characters is one less than the
+
+Unicode value of the last character generates a decimal
+
+representation of the number where each number is at least as long as
+
+the format token.  Thus, a format token <code>1</code> generates the
+
+sequence <code>1 2 ... 10 11 12 ...</code>, and a format token
+
+<code>01</code> generates the sequence <code>01 02 ... 09 10 11 12
+
+... 99 100 101</code>.</p></item>
+
+
+
+<item><p>A format token <code>A</code> generates the sequence <code>A
+
+B C ... Z AA AB AC...</code>.</p></item>
+
+
+
+<item><p>A format token <code>a</code> generates the sequence <code>a
+
+b c ... z aa ab ac...</code>.</p></item>
+
+
+
+<item><p>A format token <code>i</code> generates the sequence <code>i
+
+ii iii iv v vi vii viii ix x ...</code>.</p></item>
+
+
+
+<item><p>A format token <code>I</code> generates the sequence <code>I
+
+II III IV V VI VII VIII IX X ...</code>.</p></item>
+
+
+
+<item><p>Any other format token indicates a numbering sequence that
+
+starts with that token.  If an implementation does not support a
+
+numbering sequence that starts with that token, it must use a format
+
+token of <code>1</code>.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>When numbering with an alphabetic sequence, the <code>lang</code>
+
+attribute specifies which language's alphabet is to be used; it has
+
+the same range of values as <code>xml:lang</code> <bibref ref="XML"/>;
+
+if no <code>lang</code> value is specified, the language should be
+
+determined from the system environment.  Implementers should document
+
+for which languages they support numbering.</p>
+
+
+
+<note><p>Implementers should not make any assumptions about how
+
+numbering works in particular languages and should properly research
+
+the languages that they wish to support.  The numbering conventions of
+
+many languages are very different from English.</p></note>
+
+
+
+<p>The <code>letter-value</code> attribute disambiguates between
+
+numbering sequences that use letters.  In many languages there are two
+
+commonly used numbering sequences that use letters.  One numbering
+
+sequence assigns numeric values to letters in alphabetic sequence, and
+
+the other assigns numeric values to each letter in some other manner
+
+traditional in that language.  In English, these would correspond to
+
+the numbering sequences specified by the format tokens <code>a</code>
+
+and <code>i</code>.  In some languages, the first member of each
+
+sequence is the same, and so the format token alone would be
+
+ambiguous.  A value of <code>alphabetic</code> specifies the
+
+alphabetic sequence; a value of <code>traditional</code> specifies the
+
+other sequence.  If the <code>letter-value</code> attribute is not
+
+specified, then it is implementation-dependent how any ambiguity is
+
+resolved.</p>
+
+
+
+<note><p>It is possible for two conforming XSLT processors not to
+
+convert a number to exactly the same string.  Some XSLT processors may not
+
+support some languages.  Furthermore, there may be variations possible
+
+in the way conversions are performed for any particular language that
+
+are not specifiable by the attributes on <code>xsl:number</code>.
+
+Future versions of XSLT may provide additional attributes to provide
+
+control over these variations.  Implementations may also use
+
+implementation-specific namespaced attributes on
+
+<code>xsl:number</code> for this.</p></note>
+
+
+
+<p>The <code>grouping-separator</code> attribute gives the separator
+
+used as a grouping (e.g. thousands) separator in decimal numbering
+
+sequences, and the optional <code>grouping-size</code> specifies the
+
+size (normally 3) of the grouping.  For example,
+
+<code>grouping-separator=","</code> and <code>grouping-size="3"</code>
+
+would produce numbers of the form <code>1,000,000</code>.  If only one
+
+of the <code>grouping-separator</code> and <code>grouping-size</code>
+
+attributes is specified, then it is ignored.</p>
+
+
+
+<p>Here are some examples of conversion specifications:</p>
+
+
+
+<ulist>
+
+
+
+<item><p><code>format="&amp;#x30A2;"</code> specifies Katakana
+
+numbering</p></item>
+
+
+
+<item><p><code>format="&amp;#x30A4;"</code> specifies Katakana
+
+numbering in the <quote>iroha</quote> order</p></item>
+
+
+
+<item><p><code>format="&amp;#x0E51;"</code> specifies numbering with
+
+Thai digits</p></item>
+
+
+
+<item><p><code>format="&amp;#x05D0;" letter-value="traditional"</code>
+
+specifies <quote>traditional</quote> Hebrew numbering</p></item>
+
+
+
+<item><p><code>format="&amp;#x10D0;" letter-value="traditional"</code>
+
+specifies Georgian numbering</p></item>
+
+
+
+<item><p><code>format="&amp;#x03B1;" letter-value="traditional"</code>
+
+specifies <quote>classical</quote> Greek numbering</p></item>
+
+
+
+<item><p><code>format="&amp;#x0430;" letter-value="traditional"</code>
+
+specifies Old Slavic numbering</p></item>
+
+
+
+</ulist>
+
+
+
+</div3>
+
+</div2>
+
+</div1>
+
+
+
+<div1 id="for-each">
+
+
+
+<head>Repetition</head>
+
+
+
+<e:element-syntax name="for-each">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="select" required="yes">
+
+    <e:data-type name="node-set-expression"/>
+
+  </e:attribute>
+
+  <e:sequence>
+
+    <e:element repeat="zero-or-more" name="sort"/>
+
+    <e:model name="template"/>
+
+  </e:sequence>
+
+</e:element-syntax>
+
+
+
+<p>When the result has a known regular structure, it is useful to be
+
+able to specify directly the template for selected nodes.  The
+
+<code>xsl:for-each</code> instruction contains a template, which is
+
+instantiated for each node selected by the <termref
+
+def="dt-expression">expression</termref> specified by the
+
+<code>select</code> attribute. The <code>select</code> attribute is
+
+required.  The expression must evaluate to a node-set.  The template
+
+is instantiated with the selected node as the <termref
+
+def="dt-current-node">current node</termref>, and with a list of all
+
+of the selected nodes as the <termref
+
+def="dt-current-node-list">current node list</termref>.  The nodes are
+
+processed in document order, unless a sorting specification is present
+
+(see <specref ref="sorting"/>).</p>
+
+
+
+<p>For example, given an XML document with this structure</p>
+
+
+
+<eg><![CDATA[<customers>
+
+  <customer>
+
+    <name>...</name>
+
+    <order>...</order>
+
+    <order>...</order>
+
+  </customer>
+
+  <customer>
+
+    <name>...</name>
+
+    <order>...</order>
+
+    <order>...</order>
+
+  </customer>
+
+</customers>]]></eg>
+
+
+
+<p>the following would create an HTML document containing a table with
+
+a row for each <code>customer</code> element</p>
+
+
+
+<eg><![CDATA[<xsl:template match="/">
+
+  <html>
+
+    <head>
+
+      <title>Customers</title>
+
+    </head>
+
+    <body>
+
+      <table>
+
+	<tbody>
+
+	  <xsl:for-each select="customers/customer">
+
+	    <tr>
+
+	      <th>
+
+		<xsl:apply-templates select="name"/>
+
+	      </th>
+
+	      <xsl:for-each select="order">
+
+		<td>
+
+		  <xsl:apply-templates/>
+
+		</td>
+
+	      </xsl:for-each>
+
+	    </tr>
+
+	  </xsl:for-each>
+
+	</tbody>
+
+      </table>
+
+    </body>
+
+  </html>
+
+</xsl:template>]]></eg>
+
+
+
+</div1>
+
+
+
+<div1>
+
+<head>Conditional Processing</head>
+
+
+
+<p>There are two instructions in XSLT that support conditional
+
+processing in a template: <code>xsl:if</code> and
+
+<code>xsl:choose</code>. The <code>xsl:if</code> instruction provides
+
+simple if-then conditionality; the <code>xsl:choose</code> instruction
+
+supports selection of one choice when there are several
+
+possibilities.</p>
+
+
+
+<div2>
+
+<head>Conditional Processing with <code>xsl:if</code></head>
+
+
+
+<e:element-syntax name="if">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="test" required="yes">
+
+    <e:data-type name="boolean-expression"/>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:if</code> element has a <code>test</code> attribute,
+
+which specifies an <termref def="dt-expression">expression</termref>.
+
+The content is a template.  The expression is evaluated and the
+
+resulting object is converted to a boolean as if by a call to the
+
+<xfunction>boolean</xfunction> function.  If the result is true, then
+
+the content template is instantiated; otherwise, nothing is created.
+
+In the following example, the names in a group of names are formatted
+
+as a comma separated list:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="namelist/name">
+
+  <xsl:apply-templates/>
+
+  <xsl:if test="not(position()=last())">, </xsl:if>
+
+</xsl:template>]]></eg>
+
+
+
+<p>The following colors every other table row yellow:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="item">
+
+  <tr>
+
+    <xsl:if test="position() mod 2 = 0">
+
+       <xsl:attribute name="bgcolor">yellow</xsl:attribute>
+
+    </xsl:if>
+
+    <xsl:apply-templates/>
+
+  </tr>
+
+</xsl:template>]]></eg>
+
+
+
+</div2>
+
+
+
+
+
+<div2>
+
+<head>Conditional Processing with <code>xsl:choose</code></head>
+
+
+
+<e:element-syntax name="choose">
+
+  <e:in-category name="instruction"/>
+
+  <e:sequence>
+
+    <e:element repeat="one-or-more" name="when"/>
+
+    <e:element repeat="zero-or-one" name="otherwise"/>
+
+  </e:sequence>
+
+</e:element-syntax>
+
+
+
+<e:element-syntax name="when">
+
+  <e:attribute name="test" required="yes">
+
+    <e:data-type name="boolean-expression"/>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<e:element-syntax name="otherwise">
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:choose</code> element selects one among a number of
+
+possible alternatives. It consists of a sequence of
+
+<code>xsl:when</code> elements followed by an optional
+
+<code>xsl:otherwise</code> element.  Each <code>xsl:when</code>
+
+element has a single attribute, <code>test</code>, which specifies an
+
+<termref def="dt-expression">expression</termref>. The content of the
+
+<code>xsl:when</code> and <code>xsl:otherwise</code> elements is a
+
+template.  When an <code>xsl:choose</code> element is processed, each
+
+of the <code>xsl:when</code> elements is tested in turn, by evaluating
+
+the expression and converting the resulting object to a boolean as if
+
+by a call to the <xfunction>boolean</xfunction> function.  The content
+
+of the first, and only the first, <code>xsl:when</code> element whose
+
+test is true is instantiated.  If no <code>xsl:when</code> is true,
+
+the content of the <code>xsl:otherwise</code> element is
+
+instantiated. If no <code>xsl:when</code> element is true, and no
+
+<code>xsl:otherwise</code> element is present, nothing is created.</p>
+
+
+
+<p>The following example enumerates items in an ordered list using
+
+arabic numerals, letters, or roman numerals depending on the depth to
+
+which the ordered lists are nested.</p>
+
+
+
+<eg><![CDATA[<xsl:template match="orderedlist/listitem">
+
+  <fo:list-item indent-start='2pi'>
+
+    <fo:list-item-label>
+
+      <xsl:variable name="level"
+
+                    select="count(ancestor::orderedlist) mod 3"/>
+
+      <xsl:choose>
+
+        <xsl:when test='$level=1'>
+
+          <xsl:number format="i"/>
+
+        </xsl:when>
+
+        <xsl:when test='$level=2'>
+
+          <xsl:number format="a"/>
+
+        </xsl:when>
+
+        <xsl:otherwise>
+
+          <xsl:number format="1"/>
+
+        </xsl:otherwise>
+
+      </xsl:choose>
+
+      <xsl:text>. </xsl:text>
+
+    </fo:list-item-label>
+
+    <fo:list-item-body>
+
+      <xsl:apply-templates/>
+
+    </fo:list-item-body>
+
+  </fo:list-item>
+
+</xsl:template>]]></eg>
+
+
+
+</div2>
+
+</div1>
+
+
+
+<div1 id="sorting">
+
+<head>Sorting</head>
+
+
+
+<e:element-syntax name="sort">
+
+  <e:attribute name="select">
+
+    <e:data-type name="string-expression"/>
+
+  </e:attribute>
+
+  <e:attribute name="lang">
+
+    <e:attribute-value-template>
+
+      <e:data-type name="nmtoken"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="data-type">
+
+    <e:attribute-value-template>
+
+       <e:constant value="text"/>
+
+       <e:constant value="number"/>
+
+       <e:data-type name="qname-but-not-ncname"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="order">
+
+    <e:attribute-value-template>
+
+       <e:constant value="ascending"/>
+
+       <e:constant value="descending"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:attribute name="case-order">
+
+    <e:attribute-value-template>
+
+       <e:constant value="upper-first"/>
+
+       <e:constant value="lower-first"/>
+
+    </e:attribute-value-template>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>Sorting is specified by adding <code>xsl:sort</code> elements as
+
+children of an <code>xsl:apply-templates</code> or
+
+<code>xsl:for-each</code> element.  The first <code>xsl:sort</code>
+
+child specifies the primary sort key, the second <code>xsl:sort</code>
+
+child specifies the secondary sort key and so on.  When an
+
+<code>xsl:apply-templates</code> or <code>xsl:for-each</code> element
+
+has one or more <code>xsl:sort</code> children, then instead of
+
+processing the selected nodes in document order, it sorts the nodes
+
+according to the specified sort keys and then processes them in sorted
+
+order.  When used in <code>xsl:for-each</code>, <code>xsl:sort</code>
+
+elements must occur first.  When a template is instantiated by
+
+<code>xsl:apply-templates</code> and <code>xsl:for-each</code>, the
+
+<termref def="dt-current-node-list">current node list</termref> list
+
+consists of the complete list of nodes being processed in sorted
+
+order.</p>
+
+
+
+<p><code>xsl:sort</code> has a <code>select</code> attribute whose
+
+value is an <termref def="dt-expression">expression</termref>. For
+
+each node to be processed, the expression is evaluated with that node
+
+as the current node and with the complete list of nodes being
+
+processed in unsorted order as the current node list.
+
+The resulting object is converted to a string as
+
+if by a call to the <xfunction>string</xfunction> function; this string
+
+is used as the sort key for that node. The default value of the
+
+<code>select</code> attribute is <code>.</code>, which will cause the
+
+string-value of the current node to be used as the sort key.</p>
+
+
+
+<p>This string serves as a sort key for the node.  The following
+
+optional attributes on <code>xsl:sort</code> control how the list of
+
+sort keys are sorted; the values of all of these attributes are
+
+interpreted as <termref def="dt-attribute-value-template">attribute
+
+value templates</termref>.</p>
+
+
+
+<ulist>
+
+
+
+<item><p><code>order</code> specifies whether the strings should be
+
+sorted in ascending or descending order; <code>ascending</code>
+
+specifies ascending order; <code>descending</code> specifies
+
+descending order; the default is <code>ascending</code></p></item>
+
+
+
+<item><p><code>lang</code> specifies the language of the sort keys; it
+
+has the same range of values as <code>xml:lang</code> <bibref
+
+ref="XML"/>; if no <code>lang</code> value is specified, the language
+
+should be determined from the system environment</p></item>
+
+
+
+<item><p><code>data-type</code> specifies the data type of the
+
+strings; the following values are allowed:</p>
+
+
+
+<ulist>
+
+
+
+<item><p><code>text</code> specifies that the sort keys should be
+
+sorted lexicographically in the culturally correct manner for the
+
+language specified by <code>lang</code></p></item>
+
+
+
+<item><p><code>number</code> specifies that the sort keys should be
+
+converted to numbers and then sorted according to the numeric value;
+
+the sort key is converted to a number as if by a call to the
+
+<xfunction>number</xfunction> function; the <code>lang</code>
+
+attribute is ignored</p></item>
+
+
+
+<item><p>a <xnt href="&XMLNames;#NT-QName">QName</xnt> with a prefix
+
+is expanded into an <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref> as described
+
+in <specref ref="qname"/>; the expanded-name identifies the data-type;
+
+the behavior in this case is not specified by this document</p></item>
+
+
+
+</ulist>
+
+
+
+<p>The default value is <code>text</code>.</p>
+
+
+
+<note><p>The XSL Working Group plans that future versions of XSLT will
+
+leverage XML Schemas to define further values for this
+
+attribute.</p></note>
+
+
+
+</item>
+
+
+
+<item><p><code>case-order</code> has the value
+
+<code>upper-first</code> or <code>lower-first</code>; this applies
+
+when <code>data-type="text"</code>, and specifies that upper-case
+
+letters should sort before lower-case letters or vice-versa
+
+respectively. For example, if <code>lang="en"</code>, then <code>A a B
+
+b</code> are sorted with <code>case-order="upper-first"</code> and
+
+<code>a A b B</code> are sorted with
+
+<code>case-order="lower-first"</code>. The default value is language
+
+dependent.</p></item>
+
+
+
+</ulist>
+
+
+
+<note><p>It is possible for two conforming XSLT processors not to sort
+
+exactly the same.  Some XSLT processors may not support some
+
+languages.  Furthermore, there may be variations possible in the
+
+sorting of any particular language that are not specified by the
+
+attributes on <code>xsl:sort</code>, for example, whether Hiragana or
+
+Katakana is sorted first in Japanese.  Future versions of XSLT may
+
+provide additional attributes to provide control over these
+
+variations.  Implementations may also use implementation-specific
+
+namespaced attributes on <code>xsl:sort</code> for this.</p></note>
+
+
+
+<note><p>It is recommended that implementers consult <bibref
+
+ref="UNICODE-TR10"/> for information on internationalized
+
+sorting.</p></note>
+
+
+
+<p>The sort must be stable: in the sorted list of nodes, any sub list
+
+that has sort keys that all compare equal must be in document
+
+order.</p>
+
+
+
+<p>For example, suppose an employee database has the form</p>
+
+
+
+<eg><![CDATA[<employees>
+
+  <employee>
+
+    <name>
+
+      <given>James</given>
+
+      <family>Clark</family>
+
+    </name>
+
+    ...
+
+  </employee>
+
+</employees>
+
+]]></eg>
+
+  
+
+<p>Then a list of employees sorted by name could be generated
+
+using:</p>
+
+
+
+<eg><![CDATA[<xsl:template match="employees">
+
+  <ul>
+
+    <xsl:apply-templates select="employee">
+
+      <xsl:sort select="name/family"/>
+
+      <xsl:sort select="name/given"/>
+
+    </xsl:apply-templates>
+
+  </ul>
+
+</xsl:template>
+
+
+
+<xsl:template match="employee">
+
+  <li>
+
+    <xsl:value-of select="name/given"/>
+
+    <xsl:text> </xsl:text>
+
+    <xsl:value-of select="name/family"/>
+
+  </li>
+
+</xsl:template>]]></eg>
+
+
+
+</div1>
+
+
+
+<div1 id="variables">
+
+<head>Variables and Parameters</head>
+
+
+
+<e:element-syntax name="variable">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="name" required="yes">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:attribute name="select">
+
+    <e:data-type name="expression"/>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<e:element-syntax name="param">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="name" required="yes">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:attribute name="select">
+
+    <e:data-type name="expression"/>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>A variable is a name that may be bound to a value.  The value to
+
+which a variable is bound (the <term>value</term> of the variable) can
+
+be an object of any of the types that can be returned by expressions.
+
+There are two elements that can be used to bind variables:
+
+<code>xsl:variable</code> and <code>xsl:param</code>. The difference
+
+is that the value specified on the <code>xsl:param</code> variable is
+
+only a default value for the binding; when the template or stylesheet
+
+within which the <code>xsl:param</code> element occurs is invoked,
+
+parameters may be passed that are used in place of the default
+
+values.</p>
+
+
+
+<p>Both <code>xsl:variable</code> and <code>xsl:param</code> have a
+
+required <code>name</code> attribute, which specifies the name of the
+
+variable.  The value of the <code>name</code> attribute is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as described
+
+in <specref ref="qname"/>.</p>
+
+
+
+<p>For any use of these variable-binding elements, there is a region
+
+of the stylesheet tree within which the binding is visible; within
+
+this region, any binding of the variable that was visible on the
+
+variable-binding element itself is hidden.  Thus, only the innermost
+
+binding of a variable is visible.  The set of variable bindings in
+
+scope for an expression consists of those bindings that are visible at
+
+the point in the stylesheet where the expression occurs.</p>
+
+
+
+<div2>
+
+<head>Result Tree Fragments</head>
+
+
+
+<p>Variables introduce an additional data-type into the expression
+
+language.  <termdef id="dt-result-tree-fragment" term="Result Tree
+
+Fragment">This additional data type is called <term>result tree
+
+fragment</term>.  A variable may be bound to a result tree fragment
+
+instead of one of the four basic XPath data-types (string, number,
+
+boolean, node-set).  A result tree fragment represents a fragment of
+
+the result tree. A result tree fragment is treated equivalently to a
+
+node-set that contains just a single root node.</termdef> However, the
+
+operations permitted on a result tree fragment are a subset of those
+
+permitted on a node-set.  An operation is permitted on a result tree
+
+fragment only if that operation would be permitted on a string (the
+
+operation on the string may involve first converting the string to a
+
+number or boolean). In particular, it is not permitted to use the
+
+<code>/</code>, <code>//</code>, and <code>[]</code> operators on
+
+result tree fragments.  When a permitted operation is performed on a
+
+result tree fragment, it is performed exactly as it would be on the
+
+equivalent node-set.</p>
+
+
+
+<p>When a result tree fragment is copied into the result tree (see
+
+<specref ref="copy-of"/>), then all the nodes that are children of the
+
+root node in the equivalent node-set are added in sequence to the
+
+result tree.</p>
+
+
+
+<p>Expressions can only return values of type result tree fragment by
+
+referencing variables of type result tree fragment or calling
+
+extension functions that return a result tree fragment or getting a
+
+system property whose value is a result tree fragment.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="variable-values">
+
+<head>Values of Variables and Parameters</head>
+
+
+
+<p>A variable-binding element can specify the value of the variable in
+
+three alternative ways.</p>
+
+
+
+<ulist>
+
+
+
+<item><p>If the variable-binding element has a <code>select</code>
+
+attribute, then the value of the attribute must be an <termref
+
+def="dt-expression">expression</termref> and the value of the variable
+
+is the object that results from evaluating the expression.  In this
+
+case, the content must be empty.</p></item>
+
+
+
+<item>
+
+
+
+<p>If the variable-binding element does not have a <code>select</code>
+
+attribute and has non-empty content (i.e. the variable-binding element
+
+has one or more child nodes), then the content of the
+
+variable-binding element specifies the value. The content of the
+
+variable-binding element is a template, which is instantiated to give
+
+the value of the variable. The value is a result tree fragment
+
+equivalent to a node-set containing just a single root node having as
+
+children the sequence of nodes produced by instantiating the template.
+
+The base URI of the nodes in the result tree fragment is the base URI
+
+of the variable-binding element.</p>
+
+
+
+<p>It is an error if a member of the sequence of nodes created by
+
+instantiating the template is an attribute node or a namespace node,
+
+since a root node cannot have an attribute node or a namespace node as
+
+a child. An XSLT processor may signal the error; if it does not signal
+
+the error, it must recover by not adding the attribute node or
+
+namespace node.</p>
+
+
+
+</item>
+
+
+
+<item>
+
+
+
+<p>If the variable-binding element has empty content and does not have
+
+a <code>select</code> attribute, then the value of the variable is an
+
+empty string. Thus</p>
+
+
+
+<eg><![CDATA[<xsl:variable name="x"/>]]></eg>
+
+
+
+<p>is equivalent to</p>
+
+
+
+<eg><![CDATA[<xsl:variable name="x" select="''"/>]]></eg>
+
+
+
+</item>
+
+
+
+</ulist>
+
+
+
+<note><p>When a variable is used to select nodes by position, be careful
+
+not to do:</p>
+
+
+
+<eg><![CDATA[<xsl:variable name="n">2</xsl:variable>
+
+...
+
+<xsl:value-of select="item[$n]"/>]]></eg>
+
+
+
+<p>This will output the value of the first item element, because the
+
+variable <code>n</code> will be bound to a result tree fragment, not a
+
+number. Instead, do either</p>
+
+
+
+<eg><![CDATA[<xsl:variable name="n" select="2"/>
+
+...
+
+<xsl:value-of select="item[$n]"/>]]></eg>
+
+
+
+<p>or</p>
+
+
+
+<eg><![CDATA[<xsl:variable name="n">2</xsl:variable>
+
+...
+
+<xsl:value-of select="item[position()=$n]"/>]]></eg>
+
+</note>
+
+
+
+<note><p>One convenient way to specify the empty node-set as the default
+
+value of a parameter is:</p>
+
+
+
+<eg><![CDATA[<xsl:param name="x" select="/.."/>]]></eg>
+
+</note>
+
+
+
+</div2>
+
+
+
+<div2 id="copy-of">
+
+<head>Using Values of Variables and Parameters with
+
+<code>xsl:copy-of</code></head>
+
+
+
+<e:element-syntax name="copy-of">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="select" required="yes">
+
+    <e:data-type name="expression"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:copy-of</code> element can be used to insert a result
+
+tree fragment into the result tree, without first converting it to a
+
+string as <code>xsl:value-of</code> does (see <specref
+
+ref="value-of"/>).  The required <code>select</code> attribute
+
+contains an <termref def="dt-expression">expression</termref>.  When
+
+the result of evaluating the expression is a result tree fragment, the
+
+complete fragment is copied into the result tree.  When the result is
+
+a node-set, all the nodes in the set are copied in document order into
+
+the result tree; copying an element node copies the attribute nodes,
+
+namespace nodes and children of the element node as well as the
+
+element node itself; a root node is copied by copying its children.
+
+When the result is neither a node-set nor a result tree fragment, the
+
+result is converted to a string and then inserted into the result
+
+tree, as with <code>xsl:value-of</code>.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="top-level-variables">
+
+<head>Top-level Variables and Parameters</head>
+
+
+
+<p>Both <code>xsl:variable</code> and <code>xsl:param</code> are
+
+allowed as <termref def="dt-top-level">top-level</termref> elements.
+
+A top-level variable-binding element declares a global variable that
+
+is visible everywhere.  A top-level <code>xsl:param</code> element
+
+declares a parameter to the stylesheet; XSLT does not define the
+
+mechanism by which parameters are passed to the stylesheet.  It is an
+
+error if a stylesheet contains more than one binding of a top-level
+
+variable with the same name and same <termref
+
+def="dt-import-precedence">import precedence</termref>. At the
+
+top-level, the expression or template specifying the variable value is
+
+evaluated with the same context as that used to process the root node
+
+of the source document: the current node is the root node of the
+
+source document and the current node list is a list containing just
+
+the root node of the source document.  If the template or expression
+
+specifying the value of a global variable <var>x</var> references a
+
+global variable <var>y</var>, then the value for <var>y</var> must
+
+be computed before the value of <var>x</var>.  It is an error if it
+
+is impossible to do this for all global variable definitions; in other
+
+words, it is an error if the definitions are circular.</p>
+
+
+
+<p>This example declares a global variable <code>para-font-size</code>,
+
+which it references in an attribute value template.</p>
+
+
+
+<eg><![CDATA[<xsl:variable name="para-font-size">12pt</xsl:variable>
+
+
+
+<xsl:template match="para">
+
+ <fo:block font-size="{$para-font-size}">
+
+   <xsl:apply-templates/>
+
+ </fo:block>
+
+</xsl:template>
+
+]]></eg>
+
+
+
+</div2>
+
+
+
+<div2 id="local-variables">
+
+<head>Variables and Parameters within Templates</head>
+
+
+
+<p>As well as being allowed at the top-level, both
+
+<code>xsl:variable</code> and <code>xsl:param</code> are also
+
+allowed in templates.  <code>xsl:variable</code> is allowed anywhere
+
+within a template that an instruction is allowed.  In this case, the
+
+binding is visible for all following siblings and their descendants.
+
+Note that the binding is not visible for the <code>xsl:variable</code>
+
+element itself.  <code>xsl:param</code> is allowed as a child
+
+at the beginning of an <code>xsl:template</code> element.  In this
+
+context, the binding is visible for all following siblings and their
+
+descendants.  Note that the binding is not visible for the
+
+<code>xsl:param</code> element itself.</p>
+
+
+
+<p><termdef id="dt-shadows" term="Shadows">A binding
+
+<term>shadows</term> another binding if the binding occurs at a point
+
+where the other binding is visible, and the bindings have the same
+
+name.</termdef> It is an error if a binding established by an
+
+<code>xsl:variable</code> or <code>xsl:param</code> element within a
+
+template <termref def="dt-shadows">shadows</termref> another binding
+
+established by an <code>xsl:variable</code> or <code>xsl:param</code>
+
+element also within the template.  It is not an error if a binding
+
+established by an <code>xsl:variable</code> or <code>xsl:param</code>
+
+element in a template <termref def="dt-shadows">shadows</termref>
+
+another binding established by an <code>xsl:variable</code> or
+
+<code>xsl:param</code> <termref def="dt-top-level">top-level</termref>
+
+element.  Thus, the following is an error:</p>
+
+
+
+<eg role="error"><![CDATA[<xsl:template name="foo">
+
+<xsl:param name="x" select="1"/>
+
+<xsl:variable name="x" select="2"/>
+
+</xsl:template>]]></eg>
+
+
+
+<p>However, the following is allowed:</p>
+
+
+
+<eg><![CDATA[<xsl:param name="x" select="1"/>
+
+<xsl:template name="foo">
+
+<xsl:variable name="x" select="2"/>
+
+</xsl:template>]]></eg>
+
+
+
+<note><p>The nearest equivalent in Java to an <code>xsl:variable</code>
+
+element in a template is a final local variable declaration with an
+
+initializer.  For example,</p>
+
+
+
+<eg><![CDATA[<xsl:variable name="x" select="'value'"/>]]></eg>
+
+
+
+<p>has similar semantics to</p>
+
+
+
+<eg>final Object x = "value";</eg>
+
+
+
+<p>XSLT does not provide an equivalent to the Java assignment operator</p>
+
+
+
+<eg>x = "value";</eg>
+
+
+
+<p>because this would make it harder to create an implementation that
+
+processes a document other than in a batch-like way, starting at the
+
+beginning and continuing through to the end.</p></note>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Passing Parameters to Templates</head>
+
+
+
+<e:element-syntax name="with-param">
+
+  <e:attribute name="name" required="yes">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:attribute name="select">
+
+    <e:data-type name="expression"/>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>Parameters are passed to templates using the
+
+<code>xsl:with-param</code> element.  The required <code>name</code>
+
+attribute specifies the name of the parameter (the variable the value
+
+of whose binding is to be replaced).  The value of the
+
+<code>name</code> attribute is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as described
+
+in <specref ref="qname"/>.  <code>xsl:with-param</code> is allowed
+
+within both <code>xsl:call-template</code> and
+
+<code>xsl:apply-templates</code>.  The value of the parameter is
+
+specified in the same way as for <code>xsl:variable</code> and
+
+<code>xsl:param</code>.  The current node and current node list used
+
+for computing the value specified by <code>xsl:with-param</code>
+
+element is the same as that used for the
+
+<code>xsl:apply-templates</code> or <code>xsl:call-template</code>
+
+element within which it occurs.  It is not an error to pass a
+
+parameter <var>x</var> to a template that does not have an
+
+<code>xsl:param</code> element for <var>x</var>; the parameter is
+
+simply ignored.</p>
+
+
+
+<p>This example defines a named template for a
+
+<code>numbered-block</code> with an argument to control the format of
+
+the number.</p>
+
+
+
+<eg><![CDATA[<xsl:template name="numbered-block">
+
+  <xsl:param name="format">1. </xsl:param>
+
+  <fo:block>
+
+    <xsl:number format="{$format}"/>
+
+    <xsl:apply-templates/>
+
+  </fo:block>
+
+</xsl:template>
+
+
+
+<xsl:template match="ol//ol/li">
+
+  <xsl:call-template name="numbered-block">
+
+    <xsl:with-param name="format">a. </xsl:with-param>
+
+  </xsl:call-template>
+
+</xsl:template>]]></eg>
+
+
+
+</div2>
+
+
+
+</div1>
+
+
+
+<div1 id="add-func">
+
+<head>Additional Functions</head>
+
+
+
+<p>This section describes XSLT-specific additions to the core XPath
+
+function library.  Some of these additional functions also make use of
+
+information specified by <termref def="dt-top-level">top-level</termref>
+
+elements in the stylesheet; this section also describes these
+
+elements.</p>
+
+
+
+<div2 id="document">
+
+
+
+<head>Multiple Source Documents</head>
+
+
+
+<proto name="document" return-type="node-set"><arg type="object"/>
+
+<arg type="node-set" occur="opt"/></proto>
+
+
+
+<p>The <function>document</function> function allows
+
+access to XML documents other than the main source document.</p>
+
+
+
+<p>When the <function>document</function> function has exactly one
+
+argument and the argument is a node-set, then the result is the union,
+
+for each node in the argument node-set, of the result of calling the
+
+<function>document</function> function with the first argument being
+
+the <xtermref href="&XPath;#dt-string-value">string-value</xtermref>
+
+of the node, and the second argument being a node-set with the node as
+
+its only member. When the <function>document</function> function has
+
+two arguments and the first argument is a node-set, then the result is
+
+the union, for each node in the argument node-set, of the result of
+
+calling the <function>document</function> function with the first
+
+argument being the <xtermref
+
+href="&XPath;#dt-string-value">string-value</xtermref> of the node,
+
+and with the second argument being the second argument passed to the
+
+<function>document</function> function.</p>
+
+
+
+<p>When the first argument to the <function>document</function>
+
+function is not a node-set, the first argument is converted to a
+
+string as if by a call to the <xfunction>string</xfunction> function.
+
+This string is treated as a URI reference; the resource identified by
+
+the URI is retrieved. The data resulting from the retrieval action is
+
+parsed as an XML document and a tree is constructed in accordance with
+
+the data model (see <specref ref="data-model"/>).  If there is an
+
+error retrieving the resource, then the XSLT processor may signal an
+
+error; if it does not signal an error, it must recover by returning an
+
+empty node-set.  One possible kind of retrieval error is that the XSLT
+
+processor does not support the URI scheme used by the URI.  An XSLT
+
+processor is not required to support any particular URI schemes.  The
+
+documentation for an XSLT processor should specify which URI schemes
+
+the XSLT processor supports.</p>
+
+
+
+<p>If the URI reference does not contain a fragment identifier, then a
+
+node-set containing just the root node of the document is returned.
+
+If the URI reference does contain a fragment identifier, the function
+
+returns a node-set containing the nodes in the tree identified by the
+
+fragment identifier of the URI reference. The semantics of the
+
+fragment identifier is dependent on the media type of the result of
+
+retrieving the URI.  If there is an error in processing the fragment
+
+identifier, the XSLT processor may signal the error; if it does not
+
+signal the error, it must recover by returning an empty node-set.
+
+Possible errors include:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>The fragment identifier identifies something that cannot be
+
+represented by an XSLT node-set (such as a range of characters within
+
+a text node).</p></item>
+
+
+
+<item><p>The XSLT processor does not support fragment identifiers for
+
+the media-type of the retrieval result.  An XSLT processor is not
+
+required to support any particular media types.  The documentation for
+
+an XSLT processor should specify for which media types the XSLT
+
+processor supports fragment identifiers.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>The data resulting from the retrieval action is parsed as an XML
+
+document regardless of the media type of the retrieval result; if the
+
+top-level media type is <code>text</code>, then it is parsed in the
+
+same way as if the media type were <code>text/xml</code>; otherwise,
+
+it is parsed in the same way as if the media type were
+
+<code>application/xml</code>.</p>
+
+
+
+<note><p>Since there is no top-level <code>xml</code> media type, data
+
+with a media type other than <code>text/xml</code> or
+
+<code>application/xml</code> may in fact be XML.</p></note>
+
+
+
+<p>The URI reference may be relative. The base URI (see <specref
+
+ref="base-uri"/>) of the node in the second argument node-set that is
+
+first in document order is used as the base URI for resolving the
+
+relative URI into an absolute URI.  If the second argument is omitted,
+
+then it defaults to the node in the stylesheet that contains the
+
+expression that includes the call to the <function>document</function>
+
+function.  Note that a zero-length URI reference is a reference to the
+
+document relative to which the URI reference is being resolved; thus
+
+<code>document("")</code> refers to the root node of the stylesheet;
+
+the tree representation of the stylesheet is exactly the same as if
+
+the XML document containing the stylesheet was the initial source
+
+document.</p>
+
+
+
+<p>Two documents are treated as the same document if they are
+
+identified by the same URI. The URI used for the comparison is the
+
+absolute URI into which any relative URI was resolved and does not
+
+include any fragment identifier.  One root node is treated as the same
+
+node as another root node if the two nodes are from the same document.
+
+Thus, the following expression will always be true:</p>
+
+
+
+<eg>generate-id(document("foo.xml"))=generate-id(document("foo.xml"))</eg>
+
+
+
+<p>The <function>document</function> function gives rise to the
+
+possibility that a node-set may contain nodes from more than one
+
+document.  With such a node-set, the relative document order of two
+
+nodes in the same document is the normal <xtermref
+
+href="&XPath;#dt-document-order">document order</xtermref> defined by
+
+XPath <bibref ref="XPATH"/>.  The relative document order of two nodes
+
+in different documents is determined by an implementation-dependent
+
+ordering of the documents containing the two nodes.  There are no
+
+constraints on how the implementation orders documents other than that
+
+it must do so consistently: an implementation must always use the same
+
+order for the same set of documents.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="key">
+
+<head>Keys</head>
+
+
+
+<p>Keys provide a way to work with documents that contain an implicit
+
+cross-reference structure.  The <code>ID</code>, <code>IDREF</code>
+
+and <code>IDREFS</code> attribute types in XML provide a mechanism to
+
+allow XML documents to make their cross-reference explicit.  XSLT
+
+supports this through the XPath <xfunction>id</xfunction> function.
+
+However, this mechanism has a number of limitations:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>ID attributes must be declared as such in the DTD.  If an ID
+
+attribute is declared as an ID attribute only in the external DTD
+
+subset, then it will be recognized as an ID attribute only if the XML
+
+processor reads the external DTD subset.  However, XML does not require
+
+XML processors to read the external DTD, and they may well choose not
+
+to do so, especially if the document is declared
+
+<code>standalone="yes"</code>.</p></item>
+
+
+
+<item><p>A document can contain only a single set of unique IDs.
+
+There cannot be separate independent sets of unique IDs.</p></item>
+
+
+
+<item><p>The ID of an element can only be specified in an attribute;
+
+it cannot be specified by the content of the element, or by a child
+
+element.</p></item>
+
+
+
+<item><p>An ID is constrained to be an XML name.  For example, it
+
+cannot contain spaces.</p></item>
+
+
+
+<item><p>An element can have at most one ID.</p></item>
+
+
+
+<item><p>At most one element can have a particular ID.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>Because of these limitations XML documents sometimes contain a
+
+cross-reference structure that is not explicitly declared by
+
+ID/IDREF/IDREFS attributes.</p>
+
+
+
+<p>A key is a triple containing:</p>
+
+
+
+<olist>
+
+
+
+<item><p>the node which has the key</p></item>
+
+
+
+<item><p>the name of the key (an <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref>)</p></item>
+
+
+
+<item><p>the value of the key (a string)</p></item>
+
+
+
+</olist>
+
+
+
+<p>A stylesheet declares a set of keys for each document using the
+
+<code>xsl:key</code> element.  When this set of keys contains a member
+
+with node <var>x</var>, name <var>y</var> and value
+
+<var>z</var>, we say that node <var>x</var> has a key with name
+
+<var>y</var> and value <var>z</var>.</p>
+
+
+
+<p>Thus, a key is a kind of generalized ID, which is not subject to the
+
+same limitations as an XML ID:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>Keys are declared in the stylesheet using
+
+<code>xsl:key</code> elements.</p></item>
+
+
+
+<item><p>A key has a name as well as a value; each key name may be
+
+thought of as distinguishing a separate, independent space of
+
+identifiers.</p></item>
+
+
+
+<item><p>The value of a named key for an element may be specified in
+
+any convenient place; for example, in an attribute, in a child element
+
+or in content.  An XPath expression is used to specify where to find
+
+the value for a particular named key.</p></item>
+
+
+
+<item><p>The value of a key can be an arbitrary string; it is not
+
+constrained to be a name.</p></item>
+
+
+
+<item><p>There can be multiple keys in a document with the same node,
+
+same key name, but different key values.</p></item>
+
+
+
+<item><p>There can be multiple keys in a document with the same key
+
+name, same key value, but different nodes.</p></item>
+
+
+
+</ulist>
+
+
+
+<e:element-syntax name="key">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="name" required="yes">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:attribute name="match" required="yes">
+
+    <e:data-type name="pattern"/>
+
+  </e:attribute>
+
+  <e:attribute name="use" required="yes">
+
+    <e:data-type name="expression"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:key</code> element is used to declare keys.  The
+
+<code>name</code> attribute specifies the name of the key.  The value
+
+of the <code>name</code> attribute is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as described
+
+in <specref ref="qname"/>. The <code>match</code> attribute is a <nt
+
+def="NT-Pattern">Pattern</nt>; an <code>xsl:key</code> element gives
+
+information about the keys of any node that matches the pattern
+
+specified in the match attribute.  The <code>use</code> attribute is
+
+an <termref def="dt-expression">expression</termref> specifying the
+
+values of the key; the expression is evaluated once for each node that
+
+matches the pattern.  If the result is a node-set, then for each node
+
+in the node-set, the node that matches the pattern has a key of the
+
+specified name whose value is the string-value of the node in the
+
+node-set; otherwise, the result is converted to a string, and the node
+
+that matches the pattern has a key of the specified name with value
+
+equal to that string.  Thus, a node <var>x</var> has a key with name
+
+<var>y</var> and value <var>z</var> if and only if there is an
+
+<code>xsl:key</code> element such that:</p>
+
+
+
+<ulist>
+
+
+
+<item><p><var>x</var> matches the pattern specified in the
+
+<code>match</code> attribute of the <code>xsl:key</code> element;</p></item>
+
+
+
+<item><p>the value of the <code>name</code> attribute of the
+
+<code>xsl:key</code> element is equal to <var>y</var>;
+
+and</p></item>
+
+
+
+<item><p>when the expression specified in the <code>use</code>
+
+attribute of the <code>xsl:key</code> element is evaluated with
+
+<var>x</var> as the current node and with a node list containing
+
+just <var>x</var> as the current node list resulting in an object
+
+<var>u</var>, then either <var>z</var> is equal to the result of
+
+converting <var>u</var> to a string as if by a call to the
+
+<xfunction>string</xfunction> function, or <var>u</var> is a
+
+node-set and <var>z</var> is equal to the string-value of one or
+
+more of the nodes in <var>u</var>.</p></item>
+
+
+
+</ulist>
+
+
+
+<p>Note also that there may be more than one <code>xsl:key</code>
+
+element that matches a given node; all of the matching
+
+<code>xsl:key</code> elements are used, even if they do not have the
+
+same <termref def="dt-import-precedence">import
+
+precedence</termref>.</p>
+
+
+
+<p>It is an error for the value of either the <code>use</code>
+
+attribute or the <code>match</code> attribute to contain a <xnt
+
+href="&XPath;#NT-VariableReference">VariableReference</xnt>.</p>
+
+
+
+<proto name="key" return-type="node-set"><arg type="string"/><arg type="object"/></proto>
+
+
+
+<p>The <function>key</function> function does for keys what the
+
+<xfunction>id</xfunction> function does for IDs.  The first argument
+
+specifies the name of the key. The value of the argument must be a
+
+<xnt href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as
+
+described in <specref ref="qname"/>. When the second argument to the
+
+<function>key</function> function is of type node-set, then the result
+
+is the union of the result of applying the <function>key</function>
+
+function to the string <xtermref
+
+href="&XPath;#dt-value">value</xtermref> of each of the nodes in the
+
+argument node-set.  When the second argument to
+
+<function>key</function> is of any other type, the argument is
+
+converted to a string as if by a call to the
+
+<xfunction>string</xfunction> function; it returns a node-set
+
+containing the nodes in the same document as the context node that
+
+have a value for the named key equal to this string.</p>
+
+
+
+<p>For example, given a declaration</p>
+
+
+
+<eg><![CDATA[<xsl:key name="idkey" match="div" use="@id"/>]]></eg>
+
+
+
+<p>an expression <code>key("idkey",@ref)</code> will return the same
+
+node-set as <code>id(@ref)</code>, assuming that the only ID attribute
+
+declared in the XML source document is:</p>
+
+
+
+<eg><![CDATA[<!ATTLIST div id ID #IMPLIED>]]></eg>
+
+
+
+<p>and that the <code>ref</code> attribute of the current node
+
+contains no whitespace.</p>
+
+
+
+<p>Suppose a document describing a function library uses a
+
+<code>prototype</code> element to define functions</p>
+
+
+
+<eg><![CDATA[<prototype name="key" return-type="node-set">
+
+<arg type="string"/>
+
+<arg type="object"/>
+
+</prototype>]]></eg>
+
+
+
+<p>and a <code>function</code> element to refer to function names</p>
+
+
+
+<eg><![CDATA[<function>key</function>]]></eg>
+
+
+
+<p>Then the stylesheet could generate hyperlinks between the
+
+references and definitions as follows:</p>
+
+
+
+<eg><![CDATA[<xsl:key name="func" match="prototype" use="@name"/>
+
+
+
+<xsl:template match="function">
+
+<b>
+
+  <a href="#{generate-id(key('func',.))}">
+
+    <xsl:apply-templates/>
+
+  </a>
+
+</b>
+
+</xsl:template>
+
+
+
+<xsl:template match="prototype">
+
+<p><a name="{generate-id()}">
+
+<b>Function: </b>
+
+...
+
+</a></p>
+
+</xsl:template>]]></eg>
+
+
+
+<p>The <function>key</function> can be used to retrieve a key from a
+
+document other than the document containing the context node.  For
+
+example, suppose a document contains bibliographic references in the
+
+form <code><![CDATA[<bibref>XSLT</bibref>]]></code>, and there is a
+
+separate XML document <code>bib.xml</code> containing a bibliographic
+
+database with entries in the form:</p>
+
+
+
+<eg><![CDATA[<entry name="XSLT">...</entry>]]></eg>
+
+
+
+<p>Then the stylesheet could use the following to transform the
+
+<code>bibref</code> elements:</p>
+
+
+
+<eg><![CDATA[<xsl:key name="bib" match="entry" use="@name"/>
+
+
+
+<xsl:template match="bibref">
+
+  <xsl:variable name="name" select="."/>
+
+  <xsl:for-each select="document('bib.xml')">
+
+    <xsl:apply-templates select="key('bib',$name)"/>
+
+  </xsl:for-each>
+
+</xsl:template>]]></eg>
+
+
+
+</div2>
+
+
+
+<div2 id="format-number">
+
+<head>Number Formatting</head>
+
+
+
+<proto name="format-number" return-type="string"><arg type="number"/><arg type="string"/><arg occur="opt" type="string"/></proto>
+
+
+
+<p>The <function>format-number</function> function converts its first
+
+argument to a string using the format pattern string specified by the
+
+second argument and the decimal-format named by the third argument, or
+
+the default decimal-format, if there is no third argument.  The format
+
+pattern string is in the syntax specified by the JDK 1.1 <loc href=
+
+"http://java.sun.com/products/jdk/1.1/docs/api/java.text.DecimalFormat.html"
+
+>DecimalFormat</loc> class. The format pattern string is in a
+
+localized notation: the decimal-format determines what characters have
+
+a special meaning in the pattern (with the exception of the quote
+
+character, which is not localized).  The format pattern must not
+
+contain the currency sign (#x00A4); support for this feature was added
+
+after the initial release of JDK 1.1.  The decimal-format name must be
+
+a <xnt href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as
+
+described in <specref ref="qname"/>.  It is an error if the stylesheet
+
+does not contain a declaration of the decimal-format with the specified
+
+<xtermref href="&XPath;#dt-expanded-name">expanded-name</xtermref>.</p>
+
+
+
+<note><p>Implementations are not required to use the JDK 1.1
+
+implementation, nor are implementations required to be implemented in
+
+Java.</p></note>
+
+
+
+<note><p>Stylesheets can use other facilities in XPath to control
+
+rounding.</p></note>
+
+
+
+<e:element-syntax name="decimal-format">
+
+  <e:in-category name="top-level-element"/>
+
+  
+
+  <e:attribute name="name">
+
+    <e:data-type name="qname"/>
+
+  </e:attribute>
+
+  <e:attribute name="decimal-separator">
+
+    <e:data-type name="char"/>
+
+  </e:attribute>
+
+  <e:attribute name="grouping-separator">
+
+    <e:data-type name="char"/>
+
+  </e:attribute>
+
+  <e:attribute name="infinity">
+
+    <e:data-type name="string"/>
+
+  </e:attribute>
+
+  <e:attribute name="minus-sign">
+
+    <e:data-type name="char"/>
+
+  </e:attribute>
+
+  <e:attribute name="NaN">
+
+    <e:data-type name="string"/>
+
+  </e:attribute>
+
+  <e:attribute name="percent">
+
+    <e:data-type name="char"/>
+
+  </e:attribute>
+
+  <e:attribute name="per-mille">
+
+    <e:data-type name="char"/>
+
+  </e:attribute>
+
+  <e:attribute name="zero-digit">
+
+    <e:data-type name="char"/>
+
+  </e:attribute>
+
+  <e:attribute name="digit">
+
+    <e:data-type name="char"/>
+
+  </e:attribute>
+
+  <e:attribute name="pattern-separator">
+
+    <e:data-type name="char"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:decimal-format</code> element declares a
+
+decimal-format, which controls the interpretation of a format pattern
+
+used by the <function>format-number</function> function.  If there is
+
+a <code>name</code> attribute, then the element declares a named
+
+decimal-format; otherwise, it declares the default decimal-format.
+
+The value of the <code>name</code> attribute is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>, which is expanded as described
+
+in <specref ref="qname"/>.  It is an error to declare either the
+
+default decimal-format or a decimal-format with a given name more than
+
+once (even with different <termref def="dt-import-precedence">import
+
+precedence</termref>), unless it is declared every time with the same
+
+value for all attributes (taking into account any default values).</p>
+
+
+
+<p>The other attributes on <code>xsl:decimal-format</code> correspond
+
+to the methods on the JDK 1.1 <loc href=
+
+"http://java.sun.com/products/jdk/1.1/docs/api/java.text.DecimalFormatSymbols.html"
+
+>DecimalFormatSymbols</loc> class.  For each
+
+<code>get</code>/<code>set</code> method pair there is an attribute
+
+defined for the <code>xsl:decimal-format</code> element.</p>
+
+
+
+<p>The following attributes both control the interpretation of
+
+characters in the format pattern and specify characters that may
+
+appear in the result of formatting the number:</p>
+
+
+
+<ulist>
+
+
+
+<item><p><code>decimal-separator</code> specifies the character used
+
+for the decimal sign; the default value is the period character
+
+(<code>.</code>)</p></item>
+
+
+
+<item><p><code>grouping-separator</code> specifies the character used
+
+as a grouping (e.g. thousands) separator; the default value is the
+
+comma character (<code>,</code>)</p></item>
+
+
+
+<item><p><code>percent</code> specifies the character used as a
+
+percent sign; the default value is the percent character
+
+(<code>%</code>)</p></item>
+
+
+
+<item><p><code>per-mille</code> specifies the character used as a per
+
+mille sign; the default value is the Unicode per-mille character
+
+(#x2030)</p></item>
+
+
+
+<item><p><code>zero-digit</code> specifies the character used as the
+
+digit zero; the default value is the digit zero
+
+(<code>0</code>)</p></item>
+
+
+
+</ulist>
+
+
+
+<p>The following attributes control the interpretation of characters
+
+in the format pattern:</p>
+
+
+
+<ulist>
+
+
+
+<item><p><code>digit</code> specifies the character used for a digit
+
+in the format pattern; the default value is the number sign character
+
+(<code>#</code>)</p></item>
+
+
+
+<item><p><code>pattern-separator</code> specifies the character used
+
+to separate positive and negative sub patterns in a pattern; the
+
+default value is the semi-colon character (<code>;</code>)</p></item>
+
+
+
+</ulist>
+
+
+
+<p>The following attributes specify characters or strings that may
+
+appear in the result of formatting the number:</p>
+
+
+
+<ulist>
+
+
+
+<item><p><code>infinity</code> specifies the string used to represent
+
+infinity; the default value is the string
+
+<code>Infinity</code></p></item>
+
+
+
+<item><p><code>NaN</code> specifies the string used to represent the
+
+NaN value; the default value is the string <code>NaN</code></p></item>
+
+
+
+<item><p><code>minus-sign</code> specifies the character used as the
+
+default minus sign; the default value is the hyphen-minus character
+
+(<code>-</code>, #x2D)</p></item>
+
+
+
+</ulist>
+
+
+
+</div2>
+
+
+
+<div2 id="misc-func">
+
+<head>Miscellaneous Additional Functions</head>
+
+
+
+<proto name="current" return-type="node-set"></proto>
+
+
+
+<p>The <function>current</function> function returns a node-set that
+
+has the <termref def="dt-current-node">current node</termref> as its
+
+only member.  For an outermost expression (an expression not occurring
+
+within another expression), the current node is always the same as the
+
+context node.  Thus,</p>
+
+
+
+<eg><![CDATA[<xsl:value-of select="current()"/>]]></eg>
+
+
+
+<p>means the same as</p>
+
+
+
+<eg><![CDATA[<xsl:value-of select="."/>]]></eg>
+
+
+
+<p>However, within square brackets the current node is usually
+
+different from the context node. For example,</p>
+
+
+
+<eg><![CDATA[<xsl:apply-templates select="//glossary/item[@name=current()/@ref]"/>]]></eg>
+
+
+
+<p>will process all <code>item</code> elements that have a
+
+<code>glossary</code> parent element and that have a <code>name</code>
+
+attribute with value equal to the value of the current node's
+
+<code>ref</code> attribute. This is different from</p>
+
+
+
+<eg><![CDATA[<xsl:apply-templates select="//glossary/item[@name=./@ref]"/>]]></eg>
+
+
+
+<p>which means the same as</p>
+
+
+
+<eg><![CDATA[<xsl:apply-templates select="//glossary/item[@name=@ref]"/>]]></eg>
+
+
+
+<p>and so would process all <code>item</code> elements that have a
+
+<code>glossary</code> parent element and that have a <code>name</code>
+
+attribute and a <code>ref</code> attribute with the same value.</p>
+
+
+
+<p>It is an error to use the <function>current</function> function in
+
+a <termref def="dt-pattern">pattern</termref>.</p>
+
+
+
+<proto name="unparsed-entity-uri" return-type="string"><arg type="string"/></proto>
+
+
+
+<p>The <function>unparsed-entity-uri</function> returns the URI of the
+
+unparsed entity with the specified name in the same document as the
+
+context node (see <specref ref="unparsed-entities"/>).  It returns the
+
+empty string if there is no such entity.</p>
+
+
+
+<proto name="generate-id" return-type="string"><arg occur="opt" type="node-set"/></proto>
+
+
+
+<p>The <function>generate-id</function> function returns a string that
+
+uniquely identifies the node in the argument node-set that is first in
+
+document order.  The unique identifier must consist of ASCII
+
+alphanumeric characters and must start with an alphabetic character.
+
+Thus, the string is syntactically an XML name.  An implementation is
+
+free to generate an identifier in any convenient way provided that it
+
+always generates the same identifier for the same node and that
+
+different identifiers are always generated from different nodes. An
+
+implementation is under no obligation to generate the same identifiers
+
+each time a document is transformed.  There is no guarantee that a
+
+generated unique identifier will be distinct from any unique IDs
+
+specified in the source document.  If the argument node-set is empty,
+
+the empty string is returned. If the argument is omitted, it defaults
+
+to the context node.</p>
+
+
+
+<proto name="system-property" return-type="object"><arg type="string"/></proto>
+
+
+
+<p>The argument must evaluate to a string that is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>.  The <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> is expanded into a name using
+
+the namespace declarations in scope for the expression. The
+
+<function>system-property</function> function returns an object
+
+representing the value of the system property identified by the name.
+
+If there is no such system property, the empty string should be
+
+returned.</p>
+
+
+
+<p>Implementations must provide the following system properties, which
+
+are all in the XSLT namespace:</p>
+
+
+
+<slist>
+
+
+
+<sitem><code>xsl:version</code>, a number giving the version of XSLT
+
+implemented by the processor; for XSLT processors implementing the
+
+version of XSLT specified by this document, this is the number
+
+1.0</sitem>
+
+
+
+<sitem><code>xsl:vendor</code>, a string identifying the vendor of the
+
+XSLT processor</sitem>
+
+
+
+<sitem><code>xsl:vendor-url</code>, a string containing a URL
+
+identifying the vendor of the XSLT processor; typically this is the
+
+host page (home page) of the vendor's Web site.</sitem>
+
+
+
+</slist>
+
+
+
+</div2>
+
+
+
+</div1>
+
+
+
+<div1 id="message">
+
+<head>Messages</head>
+
+
+
+<e:element-syntax name="message">
+
+  <e:in-category name="instruction"/>
+
+  <e:attribute name="terminate">
+
+    <e:constant value="yes"/>
+
+    <e:constant value="no"/>
+
+  </e:attribute>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>The <code>xsl:message</code> instruction sends a message in a way
+
+that is dependent on the XSLT processor.  The content of the
+
+<code>xsl:message</code> instruction is a template.  The
+
+<code>xsl:message</code> is instantiated by instantiating the content
+
+to create an XML fragment.  This XML fragment is the content of the
+
+message.</p>
+
+
+
+<note><p>An XSLT processor might implement <code>xsl:message</code> by
+
+popping up an alert box or by writing to a log file.</p></note>
+
+
+
+<p>If the <code>terminate</code> attribute has the value
+
+<code>yes</code>, then the XSLT processor should terminate processing
+
+after sending the message.  The default value is <code>no</code>.</p>
+
+
+
+<p>One convenient way to do localization is to put the localized
+
+information (message text, etc.) in an XML document, which becomes an
+
+additional input file to the stylesheet.  For example, suppose
+
+messages for a language <code><var>L</var></code> are stored in an XML
+
+file <code>resources/<var>L</var>.xml</code> in the form:</p>
+
+
+
+<eg><![CDATA[<messages>
+
+  <message name="problem">A problem was detected.</message>
+
+  <message name="error">An error was detected.</message>
+
+</messages>
+
+]]></eg>
+
+
+
+<p>Then a stylesheet could use the following approach to localize
+
+messages:</p>
+
+
+
+<eg><![CDATA[<xsl:param name="lang" select="en"/>
+
+<xsl:variable name="messages"
+
+  select="document(concat('resources/', $lang, '.xml'))/messages"/>
+
+
+
+<xsl:template name="localized-message">
+
+  <xsl:param name="name"/>
+
+  <xsl:message>
+
+    <xsl:value-of select="$messages/message[@name=$name]"/>
+
+  </xsl:message>
+
+</xsl:template>
+
+
+
+<xsl:template name="problem">
+
+  <xsl:call-template name="localized-message"/>
+
+    <xsl:with-param name="name">problem</xsl:with-param>
+
+  </xsl:call-template>
+
+</xsl:template>]]></eg>
+
+
+
+</div1>
+
+
+
+<div1 id="extension">
+
+<head>Extensions</head>
+
+
+
+<p>XSLT allows two kinds of extension, extension elements and
+
+extension functions.</p>
+
+
+
+<p>This version of XSLT does not provide a mechanism for defining
+
+implementations of extensions.  Therefore, an XSLT stylesheet that must
+
+be portable between XSLT implementations cannot rely on particular
+
+extensions being available.  XSLT provides mechanisms that allow an
+
+XSLT stylesheet to determine whether the XSLT processor by which it is
+
+being processed has implementations of particular extensions
+
+available, and to specify what should happen if those extensions are
+
+not available.  If an XSLT stylesheet is careful to make use of these
+
+mechanisms, it is possible for it to take advantage of extensions and
+
+still work with any XSLT implementation.</p>
+
+
+
+<div2 id="extension-element">
+
+<head>Extension Elements</head>
+
+
+
+<p><termdef id="dt-extension-namespace" term="Extension Namespace">The
+
+element extension mechanism allows namespaces to be designated as
+
+<term>extension namespace</term>s. When a namespace is designated as
+
+an extension namespace and an element with a name from that namespace
+
+occurs in a template, then the element is treated as an instruction
+
+rather than as a literal result element.</termdef> The namespace
+
+determines the semantics of the instruction.</p>
+
+
+
+<note><p>Since an element that is a child of an
+
+<code>xsl:stylesheet</code> element is not occurring <emph>in a
+
+template</emph>, non-XSLT <termref
+
+def="dt-top-level">top-level</termref> elements are not extension
+
+elements as defined here, and nothing in this section applies to
+
+them.</p></note>
+
+
+
+<p>A namespace is designated as an extension namespace by using an
+
+<code>extension-element-prefixes</code> attribute on an
+
+<code>xsl:stylesheet</code> element or an
+
+<code>xsl:extension-element-prefixes</code> attribute on a literal
+
+result element or extension element.
+
+The value of both these attributes is a
+
+whitespace-separated list of namespace prefixes. The namespace bound
+
+to each of the prefixes is designated as an extension namespace.  It
+
+is an error if there is no namespace bound to the prefix on the
+
+element bearing the <code>extension-element-prefixes</code> or
+
+<code>xsl:extension-element-prefixes</code> attribute.  The default
+
+namespace (as declared by <code>xmlns</code>) may be designated as an
+
+extension namespace by including <code>#default</code> in the list of
+
+namespace prefixes.  The designation of a namespace as an extension
+
+namespace is effective within the subtree of the stylesheet rooted at
+
+the element bearing the <code>extension-element-prefixes</code> or
+
+<code>xsl:extension-element-prefixes</code> attribute;
+
+a subtree rooted at an <code>xsl:stylesheet</code> element
+
+does not include any stylesheets imported or included by children
+
+of that <code>xsl:stylesheet</code> element.</p>
+
+
+
+<p>If the XSLT processor does not have an implementation of a
+
+particular extension element available, then the
+
+<function>element-available</function> function must return false for
+
+the name of the element.  When such an extension element is
+
+instantiated, then the XSLT processor must perform fallback for the
+
+element as specified in <specref ref="fallback"/>.  An XSLT processor
+
+must not signal an error merely because a template contains an
+
+extension element for which no implementation is available.</p>
+
+
+
+<p>If the XSLT processor has an implementation of a particular
+
+extension element available, then the
+
+<function>element-available</function> function must return true for
+
+the name of the element.</p>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Extension Functions</head>
+
+
+
+<p>If a <xnt href="&XPath;#NT-FunctionName">FunctionName</xnt> in a
+
+<xnt href="&XPath;#NT-FunctionCall">FunctionCall</xnt> expression is
+
+not an <xnt href="&XMLNames;#NT-NCName">NCName</xnt> (i.e. if it
+
+contains a colon), then it is treated as a call to an extension
+
+function.  The <xnt href="&XPath;#NT-FunctionName">FunctionName</xnt>
+
+is expanded to a name using the namespace declarations from the
+
+evaluation context.</p>
+
+
+
+<p>If the XSLT processor does not have an implementation of an
+
+extension function of a particular name available, then the
+
+<function>function-available</function> function must return false for
+
+that name.  If such an extension function occurs in an expression and
+
+the extension function is actually called, the XSLT processor must
+
+signal an error.  An XSLT processor must not signal an error merely
+
+because an expression contains an extension function for which no
+
+implementation is available.</p>
+
+
+
+<p>If the XSLT processor has an implementation of an extension
+
+function of a particular name available, then the
+
+<function>function-available</function> function must return
+
+true for that name. If such an extension is called, then the XSLT
+
+processor must call the implementation passing it the function call
+
+arguments; the result returned by the implementation is returned as
+
+the result of the function call.</p>
+
+
+
+</div2>
+
+
+
+</div1>
+
+
+
+<div1 id="fallback">
+
+<head>Fallback</head>
+
+
+
+<e:element-syntax name="fallback">
+
+  <e:in-category name="instruction"/>
+
+  <e:model name="template"/>
+
+</e:element-syntax>
+
+
+
+<p>Normally, instantiating an <code>xsl:fallback</code> element does
+
+nothing.  However, when an XSLT processor performs fallback for an
+
+instruction element, if the instruction element has one or more
+
+<code>xsl:fallback</code> children, then the content of each of the
+
+<code>xsl:fallback</code> children must be instantiated in sequence;
+
+otherwise, an error must be signaled. The content of an
+
+<code>xsl:fallback</code> element is a template.</p>
+
+
+
+<p>The following functions can be used with the
+
+<code>xsl:choose</code> and <code>xsl:if</code> instructions to
+
+explicitly control how a stylesheet should behave if particular
+
+elements or functions are not available.</p>
+
+
+
+<proto name="element-available" return-type="boolean"><arg
+
+type="string"/></proto>
+
+
+
+<p>The argument must evaluate to a string that is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>.  The <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> is expanded into an <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref> using the
+
+namespace declarations in scope for the expression. The
+
+<function>element-available</function> function returns true if and
+
+only if the expanded-name is the name of an instruction.  If the
+
+expanded-name has a namespace URI equal to the XSLT namespace URI,
+
+then it refers to an element defined by XSLT.  Otherwise, it refers to
+
+an extension element. If the expanded-name has a null namespace URI,
+
+the <function>element-available</function> function will return
+
+false.</p>
+
+
+
+<proto name="function-available" return-type="boolean"><arg
+
+type="string"/></proto>
+
+
+
+<p>The argument must evaluate to a string that is a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>.  The <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> is expanded into an <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref> using the
+
+namespace declarations in scope for the expression. The
+
+<function>function-available</function> function returns true if and
+
+only if the expanded-name is the name of a function in the function
+
+library. If the expanded-name has a non-null namespace URI, then it
+
+refers to an extension function; otherwise, it refers to a function
+
+defined by XPath or XSLT.</p>
+
+
+
+</div1>
+
+
+
+<div1 id="output">
+
+<head>Output</head>
+
+
+
+<e:element-syntax name="output">
+
+  <e:in-category name="top-level-element"/>
+
+  <e:attribute name="method">
+
+    <e:constant value="xml"/>
+
+    <e:constant value="html"/>
+
+    <e:constant value="text"/>
+
+    <e:data-type name="qname-but-not-ncname"/>
+
+  </e:attribute>
+
+  <e:attribute name="version">
+
+    <e:data-type name="nmtoken"/>
+
+  </e:attribute>
+
+  <e:attribute name="encoding">
+
+    <e:data-type name="string"/>
+
+  </e:attribute>
+
+  <e:attribute name="omit-xml-declaration">
+
+    <e:constant value="yes"/>
+
+    <e:constant value="no"/>
+
+  </e:attribute>
+
+  <e:attribute name="standalone">
+
+    <e:constant value="yes"/>
+
+    <e:constant value="no"/>
+
+  </e:attribute>
+
+  <e:attribute name="doctype-public">
+
+    <e:data-type name="string"/>
+
+  </e:attribute>
+
+  <e:attribute name="doctype-system">
+
+    <e:data-type name="string"/>
+
+  </e:attribute>
+
+  <e:attribute name="cdata-section-elements">
+
+    <e:data-type name="qnames"/>
+
+  </e:attribute>
+
+  <e:attribute name="indent">
+
+    <e:constant value="yes"/>
+
+    <e:constant value="no"/>
+
+  </e:attribute>
+
+  <e:attribute name="media-type">
+
+    <e:data-type name="string"/>
+
+  </e:attribute>
+
+  <e:empty/>
+
+</e:element-syntax>
+
+
+
+<p>An XSLT processor may output the result tree as a sequence of
+
+bytes, although it is not required to be able to do so (see <specref
+
+ref="conformance"/>). The <code>xsl:output</code> element allows
+
+stylesheet authors to specify how they wish the result tree to be
+
+output. If an XSLT processor outputs the result tree, it should do so
+
+as specified by the <code>xsl:output</code> element; however, it is
+
+not required to do so.</p>
+
+
+
+<p>The <code>xsl:output</code> element is only allowed as a <termref
+
+def="dt-top-level">top-level</termref> element.</p>
+
+
+
+<p>The <code>method</code> attribute on <code>xsl:output</code>
+
+identifies the overall method that should be used for outputting the
+
+result tree.  The value must be a <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>.  If the <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> does not have a prefix, then it
+
+identifies a method specified in this document and must be one of
+
+<code>xml</code>, <code>html</code> or <code>text</code>.  If the <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> has a prefix, then the <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> is expanded into an <xtermref
+
+href="&XPath;#dt-expanded-name">expanded-name</xtermref> as described
+
+in <specref ref="qname"/>; the expanded-name identifies the output
+
+method; the behavior in this case is not specified by this
+
+document.</p>
+
+
+
+<p>The default for the <code>method</code> attribute is chosen as
+
+follows.  If</p>
+
+
+
+<ulist>
+
+
+
+<item><p>the root node of the result tree has an element
+
+child,</p></item>
+
+
+
+<item><p>the expanded-name of the first element child of the root node
+
+(i.e. the document element) of the result tree has local part
+
+<code>html</code> (in any combination of upper and lower case) and a
+
+null namespace URI, and</p></item>
+
+
+
+<item><p>any text nodes preceding the first element child of the root
+
+node of the result tree contain only whitespace characters,</p></item>
+
+
+
+</ulist>
+
+
+
+<p>then the default output method is <code>html</code>; otherwise, the
+
+default output method is <code>xml</code>.  The default output method
+
+should be used if there are no <code>xsl:output</code> elements or if
+
+none of the <code>xsl:output</code> elements specifies a value for the
+
+<code>method</code> attribute.</p>
+
+
+
+<p>The other attributes on <code>xsl:output</code> provide parameters
+
+for the output method.  The following attributes are allowed:</p>
+
+
+
+<ulist>
+
+
+
+<item><p><code>version</code> specifies the version of the output
+
+method</p></item>
+
+
+
+<item><p><code>indent</code> specifies whether the XSLT processor may
+
+add additional whitespace when outputting the result tree; the value
+
+must be <code>yes</code> or <code>no</code></p></item>
+
+
+
+<item><p><code>encoding</code> specifies the preferred character
+
+encoding that the XSLT processor should use to encode sequences of
+
+characters as sequences of bytes; the value of the attribute should be
+
+treated case-insensitively; the value must contain only characters in
+
+the range #x21 to #x7E (i.e. printable ASCII characters); the value
+
+should either be a <code>charset</code> registered with the Internet
+
+Assigned Numbers Authority <bibref ref="IANA"/>, <bibref
+
+ref="RFC2278"/> or start with <code>X-</code></p></item>
+
+
+
+<item><p><code>media-type</code> specifies the media type (MIME
+
+content type) of the data that results from outputting the result
+
+tree; the <code>charset</code> parameter should not be specified
+
+explicitly; instead, when the top-level media type is
+
+<code>text</code>, a <code>charset</code> parameter should be added
+
+according to the character encoding actually used by the output
+
+method</p></item>
+
+
+
+<item><p><code>doctype-system</code> specifies the system identifier
+
+to be used in the document type declaration</p></item>
+
+
+
+<item><p><code>doctype-public</code> specifies the public identifier
+
+to be used in the document type declaration</p></item>
+
+
+
+<item><p><code>omit-xml-declaration</code> specifies whether the XSLT
+
+processor should output an XML declaration; the value must be
+
+<code>yes</code> or <code>no</code></p></item>
+
+
+
+<item><p><code>standalone</code> specifies whether the XSLT processor
+
+should output a standalone document declaration; the value must be
+
+<code>yes</code> or <code>no</code></p></item>
+
+
+
+<item><p><code>cdata-section-elements</code> specifies a list of the
+
+names of elements whose text node children should be output using
+
+CDATA sections</p></item>
+
+
+
+</ulist>
+
+
+
+<p>The detailed semantics of each attribute will be described
+
+separately for each output method for which it is applicable.  If the
+
+semantics of an attribute are not described for an output method, then
+
+it is not applicable to that output method.</p>
+
+
+
+<p>A stylesheet may contain multiple <code>xsl:output</code> elements
+
+and may include or import stylesheets that also contain
+
+<code>xsl:output</code> elements.  All the <code>xsl:output</code>
+
+elements occurring in a stylesheet are merged into a single effective
+
+<code>xsl:output</code> element. For the
+
+<code>cdata-section-elements</code> attribute, the effective value is
+
+the union of the specified values.  For other attributes, the
+
+effective value is the specified value with the highest <termref
+
+def="dt-import-precedence">import precedence</termref>. It is an error
+
+if there is more than one such value for an attribute.  An XSLT
+
+processor may signal the error; if it does not signal the error, if
+
+should recover by using the value that occurs last in the stylesheet.
+
+The values of attributes are defaulted after the
+
+<code>xsl:output</code> elements have been merged; different output
+
+methods may have different default values for an attribute.</p>
+
+
+
+<div2>
+
+<head>XML Output Method</head>
+
+
+
+<p>The <code>xml</code> output method outputs the result tree as a
+
+well-formed XML external general parsed entity. If the root node of
+
+the result tree has a single element node child and no text node
+
+children, then the entity should also be a well-formed XML document
+
+entity. When the entity is referenced within a trivial XML document
+
+wrapper like this</p>
+
+
+
+<eg><![CDATA[
+
+<!DOCTYPE doc [
+
+<!ENTITY e SYSTEM "]]><var>entity-URI</var><![CDATA[">
+
+]>
+
+<doc>&e;</doc>]]></eg>
+
+
+
+<p>where <code><var>entity-URI</var></code> is a URI for the entity,
+
+then the wrapper
+
+document as a whole should be a well-formed XML document conforming to
+
+the XML Namespaces Recommendation <bibref ref="XMLNAMES"/>.  In
+
+addition, the output should be such that if a new tree was constructed
+
+by parsing the wrapper as an XML document as specified in <specref
+
+ref="data-model"/>, and then removing the document element, making its
+
+children instead be children of the root node, then the new tree would
+
+be the same as the result tree, with the following possible
+
+exceptions:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>The order of attributes in the two trees may be
+
+different.</p></item>
+
+
+
+<item><p>The new tree may contain namespace nodes that were not
+
+present in the result tree.</p>
+
+<note><p>An XSLT processor may need to add
+
+namespace declarations in the course of outputting the result tree as
+
+XML.</p></note>
+
+</item>
+
+
+
+</ulist>
+
+
+
+<p>If the XSLT processor generated a document type declaration because
+
+of the <code>doctype-system</code> attribute, then the above
+
+requirements apply to the entity with the generated document type
+
+declaration removed.</p>
+
+
+
+<p>The <code>version</code> attribute specifies the version of XML to
+
+be used for outputting the result tree.  If the XSLT processor does
+
+not support this version of XML, it should use a version of XML that
+
+it does support.  The version output in the XML declaration (if an XML
+
+declaration is output) should correspond to the version of XML that
+
+the processor used for outputting the result tree. The value of the
+
+<code>version</code> attribute should match the <xnt
+
+href="&XML;#NT-VersionNum">VersionNum</xnt> production of the XML
+
+Recommendation <bibref ref="XML"/>. The default value is
+
+<code>1.0</code>.</p>
+
+
+
+<p>The <code>encoding</code> attribute specifies the preferred
+
+encoding to use for outputting the result tree.  XSLT processors are
+
+required to respect values of <code>UTF-8</code> and
+
+<code>UTF-16</code>.  For other values, if the XSLT processor does not
+
+support the specified encoding it may signal an error; if it does not
+
+signal an error it should use <code>UTF-8</code> or
+
+<code>UTF-16</code> instead.  The XSLT processor must not use an
+
+encoding whose name does not match the <xnt
+
+href="&XML;#NT-EncName">EncName</xnt> production of the XML
+
+Recommendation <bibref ref="XML"/>.  If no <code>encoding</code>
+
+attribute is specified, then the XSLT processor should use either
+
+<code>UTF-8</code> or <code>UTF-16</code>.  It is possible that the
+
+result tree will contain a character that cannot be represented in the
+
+encoding that the XSLT processor is using for output.  In this case,
+
+if the character occurs in a context where XML recognizes character
+
+references (i.e. in the value of an attribute node or text node), then
+
+the character should be output as a character reference; otherwise
+
+(for example if the character occurs in the name of an element) the
+
+XSLT processor should signal an error.</p>
+
+
+
+<p>If the <code>indent</code> attribute has the value
+
+<code>yes</code>, then the <code>xml</code> output method may output
+
+whitespace in addition to the whitespace in the result tree (possibly
+
+based on whitespace stripped from either the source document or the
+
+stylesheet) in order to indent the result nicely; if the
+
+<code>indent</code> attribute has the value <code>no</code>, it should
+
+not output any additional whitespace. The default value is
+
+<code>no</code>.  The <code>xml</code> output method should use an
+
+algorithm to output additional whitespace that ensures that the result
+
+if whitespace were to be stripped from the output using the process
+
+described in <specref ref="strip"/> with the set of
+
+whitespace-preserving elements consisting of just
+
+<code>xsl:text</code> would be the same when additional whitespace is
+
+output as when additional whitespace is not output.</p>
+
+
+
+<note><p>It is usually not safe to use <code>indent="yes"</code> with
+
+document types that include element types with mixed content.</p></note>
+
+
+
+<p>The <code>cdata-section-elements</code> attribute contains a
+
+whitespace-separated list of <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt>s.  Each <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> is expanded into an
+
+expanded-name using the namespace declarations in effect on the
+
+<code>xsl:output</code> element in which the <xnt
+
+href="&XMLNames;#NT-QName">QName</xnt> occurs; if there is a default
+
+namespace, it is used for <xnt href="&XMLNames;#NT-QName">QName</xnt>s
+
+that do not have a prefix.  The expansion is performed before the
+
+merging of multiple <code>xsl:output</code> elements into a single
+
+effective <code>xsl:output</code> element. If the expanded-name of the
+
+parent of a text node is a member of the list, then the text node
+
+should be output as a CDATA section. For example,</p>
+
+
+
+<eg><![CDATA[<xsl:output cdata-section-elements="example"/>]]></eg>
+
+
+
+<p>would cause a literal result element written in the stylesheet as</p>
+
+
+
+<eg><![CDATA[<example>&lt;foo></example>]]></eg>
+
+
+
+<p>or as</p>
+
+
+
+<eg>&lt;example>&lt;![CDATA[&lt;foo>]]&gt;&lt;/example></eg>
+
+
+
+<p>to be output as</p>
+
+
+
+<eg>&lt;example>&lt;![CDATA[&lt;foo>]]&gt;&lt;/example></eg>
+
+
+
+<p>If the text node contains the sequence of characters
+
+<code>]]&gt;</code>, then the currently open CDATA section should be
+
+closed following the <code>]]</code> and a new CDATA section opened
+
+before the <code>&gt;</code>. For example, a literal result element
+
+written in the stylesheet as</p>
+
+
+
+<eg>&lt;example&gt;]]&amp;gt;&lt;/example&gt;</eg>
+
+
+
+<p>would be output as</p>
+
+
+
+<eg>&lt;example&gt;&lt;![CDATA[]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/example&gt;</eg>
+
+
+
+<p>If the text node contains a character that is not representable in
+
+the character encoding being used to output the result tree, then the
+
+currently open CDATA section should be closed before the character,
+
+the character should be output using a character reference or entity
+
+reference, and a new CDATA section should be opened for any further
+
+characters in the text node.</p>
+
+
+
+<p>CDATA sections should not be used except for text nodes that the
+
+<code>cdata-section-elements</code> attribute explicitly specifies
+
+should be output using CDATA sections.</p>
+
+
+
+<p>The <code>xml</code> output method should output an XML declaration
+
+unless the <code>omit-xml-declaration</code> attribute has the value
+
+<code>yes</code>. The XML declaration should include both version
+
+information and an encoding declaration. If the
+
+<code>standalone</code> attribute is specified, it should include a
+
+standalone document declaration with the same value as the value as
+
+the value of the <code>standalone</code> attribute.  Otherwise, it
+
+should not include a standalone document declaration; this ensures
+
+that it is both a XML declaration (allowed at the beginning of a
+
+document entity) and a text declaration (allowed at the beginning of
+
+an external general parsed entity).</p>
+
+
+
+<p>If the <code>doctype-system</code> attribute is specified, the
+
+<code>xml</code> output method should output a document type
+
+declaration immediately before the first element.  The name following
+
+<code>&lt;!DOCTYPE</code> should be the name of the first element.  If
+
+<code>doctype-public</code> attribute is also specified, then the
+
+<code>xml</code> output method should output <code>PUBLIC</code>
+
+followed by the public identifier and then the system identifier;
+
+otherwise, it should output <code>SYSTEM</code> followed by the system
+
+identifier.  The internal subset should be empty.  The
+
+<code>doctype-public</code> attribute should be ignored unless the
+
+<code>doctype-system</code> attribute is specified.</p>
+
+
+
+<p>The <code>media-type</code> attribute is applicable for the
+
+<code>xml</code> output method.  The default value for the
+
+<code>media-type</code> attribute is <code>text/xml</code>.</p>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>HTML Output Method</head>
+
+
+
+<p>The <code>html</code> output method outputs the result tree as
+
+HTML; for example,</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="&XSLT.ns;"><![CDATA[
+
+
+
+<xsl:output method="html"/>
+
+
+
+<xsl:template match="/">
+
+  <html>
+
+   <xsl:apply-templates/>
+
+  </html>
+
+</xsl:template>
+
+
+
+...
+
+
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<p>The <code>version</code> attribute indicates the version of the
+
+HTML.  The default value is <code>4.0</code>, which specifies that the
+
+result should be output as HTML conforming to the HTML 4.0
+
+Recommendation <bibref ref="HTML"/>.</p>
+
+
+
+<p>The <code>html</code> output method should not output an element
+
+differently from the <code>xml</code> output method unless the
+
+expanded-name of the element has a null namespace URI; an element
+
+whose expanded-name has a non-null namespace URI should be output as
+
+XML.  If the expanded-name of the element has a null namespace URI,
+
+but the local part of the expanded-name is not recognized as the name
+
+of an HTML element, the element should output in the same way as a
+
+non-empty, inline element such as <code>span</code>.</p>
+
+
+
+<p>The <code>html</code> output method should not output an end-tag
+
+for empty elements.  For HTML 4.0, the empty elements are
+
+<code>area</code>, <code>base</code>, <code>basefont</code>,
+
+<code>br</code>, <code>col</code>, <code>frame</code>,
+
+<code>hr</code>, <code>img</code>, <code>input</code>,
+
+<code>isindex</code>, <code>link</code>, <code>meta</code> and
+
+<code>param</code>. For example, an element written as
+
+<code>&lt;br/></code> or <code>&lt;br>&lt;/br></code> in the
+
+stylesheet should be output as <code>&lt;br></code>.</p>
+
+
+
+<p>The <code>html</code> output method should recognize the names of
+
+HTML elements regardless of case.  For example, elements named
+
+<code>br</code>, <code>BR</code> or <code>Br</code> should all be
+
+recognized as the HTML <code>br</code> element and output without an
+
+end-tag.</p>
+
+
+
+<p>The <code>html</code> output method should not perform escaping for
+
+the content of the <code>script</code> and <code>style</code>
+
+elements. For example, a literal result element written in the
+
+stylesheet as</p>
+
+
+
+<eg><![CDATA[<script>if (a &lt; b) foo()</script>]]></eg>
+
+
+
+<p>or</p>
+
+
+
+<eg><![CDATA[<script><![CDATA[if (a < b) foo()]]]]><![CDATA[></script>]]></eg>
+
+
+
+<p>should be output as</p>
+
+
+
+<eg><![CDATA[<script>if (a < b) foo()</script>]]></eg>
+
+
+
+<p>The <code>html</code> output method should not escape
+
+<code>&lt;</code> characters occurring in attribute values.</p>
+
+
+
+<p>If the <code>indent</code> attribute has the value
+
+<code>yes</code>, then the <code>html</code> output method may add or
+
+remove whitespace as it outputs the result tree, so long as it does
+
+not change how an HTML user agent would render the output.  The
+
+default value is <code>yes</code>.</p>
+
+
+
+<p>The <code>html</code> output method should escape non-ASCII
+
+characters in URI attribute values using the method recommended in
+
+<loc
+
+href="http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.1">Section
+
+B.2.1</loc> of the HTML 4.0 Recommendation.</p>
+
+
+
+<p>The <code>html</code> output method may output a character using a
+
+character entity reference, if one is defined for it in the version of
+
+HTML that the output method is using.</p>
+
+
+
+<p>The <code>html</code> output method should terminate processing
+
+instructions with <code>&gt;</code> rather than
+
+<code>?&gt;</code>.</p>
+
+
+
+<p>The <code>html</code> output method should output boolean
+
+attributes (that is attributes with only a single allowed value that
+
+is equal to the name of the attribute) in minimized form. For example,
+
+a start-tag written in the stylesheet as</p>
+
+
+
+<eg><![CDATA[<OPTION selected="selected">]]></eg>
+
+
+
+<p>should be output as</p>
+
+
+
+<eg><![CDATA[<OPTION selected>]]></eg>
+
+
+
+<p>The <code>html</code> output method should not escape a
+
+<code>&amp;</code> character occurring in an attribute value
+
+immediately followed by a <code>{</code> character (see <loc
+
+href="http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.7.1.1">Section
+
+B.7.1</loc> of the HTML 4.0 Recommendation). For example, a start-tag
+
+written in the stylesheet as</p>
+
+
+
+<eg><![CDATA[<BODY bgcolor='&amp;{{randomrbg}};'>]]></eg>
+
+
+
+<p>should be output as</p>
+
+
+
+<eg><![CDATA[<BODY bgcolor='&{randomrbg};'>]]></eg>
+
+
+
+<p>The <code>encoding</code> attribute specifies the preferred
+
+encoding to be used. If there is a <code>HEAD</code> element, then the
+
+<code>html</code> output method should add a <code>META</code> element
+
+immediately after the start-tag of the <code>HEAD</code> element
+
+specifying the character encoding actually used. For example,</p>
+
+
+
+<eg><![CDATA[<HEAD>
+
+<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
+
+...]]></eg>
+
+
+
+<p>It is possible that the result tree will contain a character that
+
+cannot be represented in the encoding that the XSLT processor is using
+
+for output.  In this case, if the character occurs in a context where
+
+HTML recognizes character references, then the character should be
+
+output as a character entity reference or decimal numeric character
+
+reference; otherwise (for example, in a
+
+<code>script</code> or <code>style</code> element or in a comment),
+
+the XSLT processor should signal an error.</p>
+
+
+
+<p>If the <code>doctype-public</code> or <code>doctype-system</code>
+
+attributes are specified, then the <code>html</code> output method
+
+should output a document type declaration immediately before the first
+
+element.  The name following <code>&lt;!DOCTYPE</code> should be
+
+<code>HTML</code> or <code>html</code>.  If the
+
+<code>doctype-public</code> attribute is specified, then the output
+
+method should output <code>PUBLIC</code> followed by the specified
+
+public identifier; if the <code>doctype-system</code> attribute is
+
+also specified, it should also output the specified system identifier
+
+following the public identifier.  If the <code>doctype-system</code>
+
+attribute is specified but the <code>doctype-public</code> attribute
+
+is not specified, then the output method should output
+
+<code>SYSTEM</code> followed by the specified system identifier.</p>
+
+
+
+<p>The <code>media-type</code> attribute is applicable for the
+
+<code>html</code> output method.  The default value is
+
+<code>text/html</code>.</p>
+
+
+
+</div2>
+
+
+
+<div2>
+
+<head>Text Output Method</head>
+
+
+
+<p>The <code>text</code> output method outputs the result tree by
+
+outputting the string-value of every text node in the result tree in
+
+document order without any escaping.</p>
+
+
+
+<p>The <code>media-type</code> attribute is applicable for the
+
+<code>text</code> output method.  The default value for the
+
+<code>media-type</code> attribute is <code>text/plain</code>.</p>
+
+
+
+<p>The <code>encoding</code> attribute identifies the encoding that
+
+the <code>text</code> output method should use to convert sequences of
+
+characters to sequences of bytes.  The default is system-dependent. If
+
+the result tree contains a character that cannot be represented in the
+
+encoding that the XSLT processor is using for output, the XSLT
+
+processor should signal an error.</p>
+
+
+
+</div2>
+
+
+
+<div2 id="disable-output-escaping">
+
+<head>Disabling Output Escaping</head>
+
+
+
+<p>Normally, the <code>xml</code> output method escapes &amp; and &lt;
+
+(and possibly other characters) when outputting text nodes.  This
+
+ensures that the output is well-formed XML. However, it is sometimes
+
+convenient to be able to produce output that is almost, but not quite
+
+well-formed XML; for example, the output may include ill-formed
+
+sections which are intended to be transformed into well-formed XML by
+
+a subsequent non-XML aware process.  For this reason, XSLT provides a
+
+mechanism for disabling output escaping. An <code>xsl:value-of</code>
+
+or <code>xsl:text</code> element may have a
+
+<code>disable-output-escaping</code> attribute; the allowed values are
+
+<code>yes</code> or <code>no</code>; the default is <code>no</code>;
+
+if the value is <code>yes</code>, then a text node generated by
+
+instantiating the <code>xsl:value-of</code> or <code>xsl:text</code>
+
+element should be output without any escaping. For example,</p>
+
+
+
+<eg><![CDATA[<xsl:text disable-output-escaping="yes">&lt;</xsl:text>]]></eg>
+
+
+
+<p>should generate the single character <code>&lt;</code>.</p>
+
+
+
+<p>It is an error for output escaping to be disabled for a text node
+
+that is used for something other than a text node in the result tree.
+
+Thus, it is an error to disable output escaping for an
+
+<code>xsl:value-of</code> or <code>xsl:text</code> element that is
+
+used to generate the string-value of a comment, processing instruction
+
+or attribute node; it is also an error to convert a <termref
+
+def="dt-result-tree-fragment">result tree fragment</termref> to a
+
+number or a string if the result tree fragment contains a text node for
+
+which escaping was disabled.  In both cases, an XSLT processor may
+
+signal the error; if it does not signal the error, it must recover by
+
+ignoring the <code>disable-output-escaping</code> attribute.</p>
+
+
+
+<p>The <code>disable-output-escaping</code> attribute may be used with
+
+the <code>html</code> output method as well as with the
+
+<code>xml</code> output method.  The <code>text</code> output method
+
+ignores the <code>disable-output-escaping</code> attribute, since it
+
+does not perform any output escaping.</p>
+
+
+
+<p>An XSLT processor will only be able to disable output escaping if
+
+it controls how the result tree is output. This may not always be the
+
+case.  For example, the result tree may be used as the source tree for
+
+another XSLT transformation instead of being output.  An XSLT
+
+processor is not required to support disabling output escaping.  If an
+
+<code>xsl:value-of</code> or <code>xsl:text</code> specifies that
+
+output escaping should be disabled and the XSLT processor does not
+
+support this, the XSLT processor may signal an error; if it does not
+
+signal an error, it must recover by not disabling output escaping.</p>
+
+
+
+<p>If output escaping is disabled for a character that is not
+
+representable in the encoding that the XSLT processor is using for
+
+output, then the XSLT processor may signal an error; if it does not
+
+signal an error, it must recover by not disabling output escaping.</p>
+
+
+
+<p>Since disabling output escaping may not work with all XSLT
+
+processors and can result in XML that is not well-formed, it should be
+
+used only when there is no alternative.</p>
+
+
+
+
+
+</div2>
+
+
+
+</div1>
+
+
+
+<div1 id="conformance">
+
+<head>Conformance</head>
+
+
+
+<p>A conforming XSLT processor must be able to use a stylesheet to
+
+transform a source tree into a result tree as specified in this
+
+document.  A conforming XSLT processor need not be able to output the
+
+result in XML or in any other form.</p>
+
+
+
+<note><p>Vendors of XSLT processors are strongly encouraged to provide
+
+a way to verify that their processor is behaving conformingly by
+
+allowing the result tree to be output as XML or by providing access to
+
+the result tree through a standard API such as the DOM or
+
+SAX.</p></note>
+
+
+
+<p>A conforming XSLT processor must signal any errors except for those
+
+that this document specifically allows an XSLT processor not to
+
+signal. A conforming XSLT processor may but need not recover from any
+
+errors that it signals.</p>
+
+
+
+<p>A conforming XSLT processor may impose limits on the processing
+
+resources consumed by the processing of a stylesheet.</p>
+
+
+
+</div1>
+
+
+
+<div1 id="notation">
+
+<head>Notation</head>
+
+
+
+<p>The specification of each XSLT-defined element type is preceded by
+
+a summary of its syntax in the form of a model for elements of that
+
+element type.  The meaning of syntax summary notation is as
+
+follows:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>An attribute is required if and only if its name is in
+
+bold.</p></item>
+
+
+
+<item><p>The string that occurs in the place of an attribute value
+
+specifies the allowed values of the attribute.  If this is surrounded
+
+by curly braces, then the attribute value is treated as an <termref
+
+def="dt-attribute-value-template">attribute value template</termref>,
+
+and the string occurring within curly braces specifies the allowed
+
+values of the result of instantiating the attribute value template.
+
+Alternative allowed values are separated by <code>|</code>.  A quoted
+
+string indicates a value equal to that specific string. An unquoted,
+
+italicized name specifies a particular type of value.</p></item>
+
+
+
+<item><p>If the element is allowed not to be empty, then the element
+
+contains a comment specifying the allowed content.  The allowed
+
+content is specified in a similar way to an element type declaration
+
+in XML; <emph>template</emph> means that any mixture of text nodes,
+
+literal result elements, extension elements, and XSLT elements from
+
+the <code>instruction</code> category is allowed;
+
+<emph>top-level-elements</emph> means that any mixture of XSLT
+
+elements from the <code>top-level-element</code> category is
+
+allowed.</p></item>
+
+
+
+<item><p>The element is prefaced by comments indicating if it belongs
+
+to the <code>instruction</code> category or
+
+<code>top-level-element</code> category or both.  The category of an
+
+element just affects whether it is allowed in the content of elements
+
+that allow a <emph>template</emph> or
+
+<emph>top-level-elements</emph>.</p></item>
+
+
+
+</ulist>
+
+
+
+</div1>
+
+
+
+</body>
+
+
+
+<back>
+
+<div1>
+
+<head>References</head>
+
+<div2>
+
+<head>Normative References</head>
+
+
+
+<blist>
+
+
+
+<bibl id="XML" key="XML">World Wide Web Consortium. <emph>Extensible
+
+Markup Language (XML) 1.0.</emph> W3C Recommendation. See <loc
+
+href="http://www.w3.org/TR/1998/REC-xml-19980210">http://www.w3.org/TR/1998/REC-xml-19980210</loc></bibl>
+
+
+
+<bibl id="XMLNAMES" key="XML Names">World Wide Web
+
+Consortium. <emph>Namespaces in XML.</emph> W3C Recommendation. See
+
+<loc
+
+href="http://www.w3.org/TR/REC-xml-names">http://www.w3.org/TR/REC-xml-names</loc></bibl>
+
+
+
+<bibl id="XPATH" key="XPath">World Wide Web Consortium. <emph>XML Path
+
+Language.</emph> W3C Recommendation. See <loc
+
+href="&XPath;">http://www.w3.org/TR/xpath</loc></bibl>
+
+
+
+</blist>
+
+</div2>
+
+<div2>
+
+<head>Other References</head>
+
+
+
+<blist>
+
+
+
+<bibl id="CSS2" key="CSS2">World Wide Web Consortium.  <emph>Cascading
+
+Style Sheets, level 2 (CSS2)</emph>.  W3C Recommendation.  See <loc
+
+href="http://www.w3.org/TR/1998/REC-CSS2-19980512"
+
+>http://www.w3.org/TR/1998/REC-CSS2-19980512</loc></bibl>
+
+
+
+<bibl id="DSSSL" key="DSSSL">International Organization
+
+for Standardization, International Electrotechnical Commission.
+
+<emph>ISO/IEC 10179:1996.  Document Style Semantics and Specification
+
+Language (DSSSL)</emph>.  International Standard.</bibl>
+
+
+
+<bibl id="HTML" key="HTML">World Wide Web Consortium. <emph>HTML 4.0
+
+specification</emph>. W3C Recommendation. See <loc
+
+href="http://www.w3.org/TR/REC-html40"
+
+>http://www.w3.org/TR/REC-html40</loc></bibl>
+
+
+
+<bibl id="IANA" key="IANA">Internet Assigned Numbers
+
+Authority. <emph>Character Sets</emph>. See <loc
+
+href="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets"
+
+>ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</loc>.</bibl>
+
+
+
+<bibl id="RFC2278" key="RFC2278">N. Freed, J. Postel.  <emph>IANA
+
+Charset Registration Procedures</emph>.  IETF RFC 2278. See <loc
+
+href="http://www.ietf.org/rfc/rfc2278.txt"
+
+>http://www.ietf.org/rfc/rfc2278.txt</loc>.</bibl>
+
+
+
+<bibl id="RFC2376" key="RFC2376">E. Whitehead, M. Murata.  <emph>XML
+
+Media Types</emph>. IETF RFC 2376. See <loc
+
+href="http://www.ietf.org/rfc/rfc2376.txt"
+
+>http://www.ietf.org/rfc/rfc2376.txt</loc>.</bibl>
+
+
+
+<bibl id="RFC2396" key="RFC2396">T. Berners-Lee, R. Fielding, and
+
+L. Masinter.  <emph>Uniform Resource Identifiers (URI): Generic
+
+Syntax</emph>. IETF RFC 2396. See <loc
+
+href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</loc>.</bibl>
+
+
+
+<bibl id="UNICODE-TR10" key="UNICODE TR10">Unicode Consortium.
+
+<emph>Unicode Technical Report #10. Unicode Collation
+
+Algorithm</emph>.  Unicode Technical Report.  See <loc
+
+href="http://www.unicode.org/unicode/reports/tr10/index.html"
+
+>http://www.unicode.org/unicode/reports/tr10/index.html</loc>.</bibl>
+
+
+
+<bibl id="XHTML" key="XHTML">World Wide Web Consortium. <emph>XHTML
+
+1.0: The Extensible HyperText Markup Language.</emph> W3C Proposed
+
+Recommendation. See <loc href="http://www.w3.org/TR/xhtml1"
+
+>http://www.w3.org/TR/xhtml1</loc></bibl>
+
+
+
+<bibl id="XPTR" key="XPointer">World Wide Web
+
+Consortium. <emph>XML Pointer Language (XPointer).</emph> W3C Working
+
+Draft. See <loc href="http://www.w3.org/TR/xptr"
+
+>http://www.w3.org/TR/xptr</loc></bibl>
+
+
+
+<bibl id="XMLSTYLE" key="XML Stylesheet">World Wide Web
+
+Consortium. <emph>Associating stylesheets with XML documents.</emph>
+
+W3C Recommendation. See <loc
+
+href="http://www.w3.org/TR/xml-stylesheet"
+
+>http://www.w3.org/TR/xml-stylesheet</loc></bibl>
+
+
+
+<bibl id="XSL" key="XSL">World Wide Web Consortium.  <emph>Extensible
+
+Stylesheet Language (XSL).</emph>  W3C Working Draft.  See <loc
+
+href="http://www.w3.org/TR/WD-xsl"
+
+     >http://www.w3.org/TR/WD-xsl</loc></bibl>
+
+
+
+</blist>
+
+
+
+</div2>
+
+</div1>
+
+
+
+<div1 id="element-syntax-summary">
+
+<head>Element Syntax Summary</head>
+
+
+
+<e:element-syntax-summary/>
+
+
+
+</div1>
+
+
+
+<inform-div1 id="dtd">
+
+<head>DTD Fragment for XSLT Stylesheets</head>
+
+
+
+<note><p>This DTD Fragment is not normative because XML 1.0 DTDs do
+
+not support XML Namespaces and thus cannot correctly describe the
+
+allowed structure of an XSLT stylesheet.</p></note>
+
+
+
+<p>The following entity can be used to construct a DTD for XSLT
+
+stylesheets that create instances of a particular result DTD.  Before
+
+referencing the entity, the stylesheet DTD must define a
+
+<code>result-elements</code> parameter entity listing the allowed
+
+result element types.  For example:</p>
+
+
+
+<eg><![CDATA[<!ENTITY % result-elements "
+
+  | fo:inline-sequence
+
+  | fo:block
+
+">]]></eg>
+
+
+
+<p>Such result elements should be declared to have
+
+<code>xsl:use-attribute-sets</code> and
+
+<code>xsl:extension-element-prefixes</code> attributes.  The following
+
+entity declares the <code>result-element-atts</code> parameter for
+
+this purpose. The content that XSLT allows for result elements is the
+
+same as it allows for the XSLT elements that are declared in the
+
+following entity with a content model of <code>%template;</code>.  The
+
+DTD may use a more restrictive content model than
+
+<code>%template;</code> to reflect the constraints of the result
+
+DTD.</p>
+
+
+
+<p>The DTD may define the <code>non-xsl-top-level</code> parameter
+
+entity to allow additional top-level elements from namespaces other
+
+than the XSLT namespace.</p>
+
+
+
+<p>The use of the <code>xsl:</code> prefix in this DTD does not imply
+
+that XSLT stylesheets are required to use this prefix.  Any of the
+
+elements declared in this DTD may have attributes whose name starts
+
+with <code>xmlns:</code> or is equal to <code>xmlns</code> in addition
+
+to the attributes declared in this DTD.</p>
+
+
+
+<eg><![CDATA[<!ENTITY % char-instructions "
+
+  | xsl:apply-templates
+
+  | xsl:call-template
+
+  | xsl:apply-imports
+
+  | xsl:for-each
+
+  | xsl:value-of
+
+  | xsl:copy-of
+
+  | xsl:number
+
+  | xsl:choose
+
+  | xsl:if
+
+  | xsl:text
+
+  | xsl:copy
+
+  | xsl:variable
+
+  | xsl:message
+
+  | xsl:fallback
+
+">
+
+
+
+<!ENTITY % instructions "
+
+  %char-instructions;
+
+  | xsl:processing-instruction
+
+  | xsl:comment
+
+  | xsl:element
+
+  | xsl:attribute
+
+">
+
+
+
+<!ENTITY % char-template "
+
+ (#PCDATA
+
+  %char-instructions;)*
+
+">
+
+
+
+<!ENTITY % template "
+
+ (#PCDATA
+
+  %instructions;
+
+  %result-elements;)*
+
+">
+
+
+
+<!-- Used for the type of an attribute value that is a URI reference.-->
+
+<!ENTITY % URI "CDATA">
+
+
+
+<!-- Used for the type of an attribute value that is a pattern.-->
+
+<!ENTITY % pattern "CDATA">
+
+
+
+<!-- Used for the type of an attribute value that is an
+
+     attribute value template.-->
+
+<!ENTITY % avt "CDATA">
+
+
+
+<!-- Used for the type of an attribute value that is a QName; the prefix
+
+     gets expanded by the XSLT processor. -->
+
+<!ENTITY % qname "NMTOKEN">
+
+
+
+<!-- Like qname but a whitespace-separated list of QNames. -->
+
+<!ENTITY % qnames "NMTOKENS">
+
+
+
+<!-- Used for the type of an attribute value that is an expression.-->
+
+<!ENTITY % expr "CDATA">
+
+
+
+<!-- Used for the type of an attribute value that consists
+
+     of a single character.-->
+
+<!ENTITY % char "CDATA">
+
+
+
+<!-- Used for the type of an attribute value that is a priority. -->
+
+<!ENTITY % priority "NMTOKEN">
+
+
+
+<!ENTITY % space-att "xml:space (default|preserve) #IMPLIED">
+
+
+
+<!-- This may be overridden to customize the set of elements allowed
+
+at the top-level. -->
+
+
+
+<!ENTITY % non-xsl-top-level "">
+
+
+
+<!ENTITY % top-level "
+
+ (xsl:import*,
+
+  (xsl:include
+
+  | xsl:strip-space
+
+  | xsl:preserve-space
+
+  | xsl:output
+
+  | xsl:key
+
+  | xsl:decimal-format
+
+  | xsl:attribute-set
+
+  | xsl:variable
+
+  | xsl:param
+
+  | xsl:template
+
+  | xsl:namespace-alias
+
+  %non-xsl-top-level;)*)
+
+">
+
+
+
+<!ENTITY % top-level-atts '
+
+  extension-element-prefixes CDATA #IMPLIED
+
+  exclude-result-prefixes CDATA #IMPLIED
+
+  id ID #IMPLIED
+
+  version NMTOKEN #REQUIRED
+
+  xmlns:xsl CDATA #FIXED "]]>&XSLT.ns;<![CDATA["
+
+  %space-att;
+
+'>
+
+
+
+<!-- This entity is defined for use in the ATTLIST declaration
+
+for result elements. -->
+
+
+
+<!ENTITY % result-element-atts '
+
+  xsl:extension-element-prefixes CDATA #IMPLIED
+
+  xsl:exclude-result-prefixes CDATA #IMPLIED
+
+  xsl:use-attribute-sets %qnames; #IMPLIED
+
+  xsl:version NMTOKEN #IMPLIED
+
+'>
+
+
+
+<!ELEMENT xsl:stylesheet %top-level;>
+
+<!ATTLIST xsl:stylesheet %top-level-atts;>
+
+
+
+<!ELEMENT xsl:transform %top-level;>
+
+<!ATTLIST xsl:transform %top-level-atts;>
+
+
+
+<!ELEMENT xsl:import EMPTY>
+
+<!ATTLIST xsl:import href %URI; #REQUIRED>
+
+
+
+<!ELEMENT xsl:include EMPTY>
+
+<!ATTLIST xsl:include href %URI; #REQUIRED>
+
+
+
+<!ELEMENT xsl:strip-space EMPTY>
+
+<!ATTLIST xsl:strip-space elements CDATA #REQUIRED>
+
+
+
+<!ELEMENT xsl:preserve-space EMPTY>
+
+<!ATTLIST xsl:preserve-space elements CDATA #REQUIRED>
+
+
+
+<!ELEMENT xsl:output EMPTY>
+
+<!ATTLIST xsl:output
+
+  method %qname; #IMPLIED
+
+  version NMTOKEN #IMPLIED
+
+  encoding CDATA #IMPLIED
+
+  omit-xml-declaration (yes|no) #IMPLIED
+
+  standalone (yes|no) #IMPLIED
+
+  doctype-public CDATA #IMPLIED
+
+  doctype-system CDATA #IMPLIED
+
+  cdata-section-elements %qnames; #IMPLIED
+
+  indent (yes|no) #IMPLIED
+
+  media-type CDATA #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:key EMPTY>
+
+<!ATTLIST xsl:key
+
+  name %qname; #REQUIRED
+
+  match %pattern; #REQUIRED
+
+  use %expr; #REQUIRED
+
+>
+
+
+
+<!ELEMENT xsl:decimal-format EMPTY>
+
+<!ATTLIST xsl:decimal-format
+
+  name %qname; #IMPLIED
+
+  decimal-separator %char; "."
+
+  grouping-separator %char; ","
+
+  infinity CDATA "Infinity"
+
+  minus-sign %char; "-"
+
+  NaN CDATA "NaN"
+
+  percent %char; "%"
+
+  per-mille %char; "&#x2030;"
+
+  zero-digit %char; "0"
+
+  digit %char; "#"
+
+  pattern-separator %char; ";"
+
+>
+
+
+
+<!ELEMENT xsl:namespace-alias EMPTY>
+
+<!ATTLIST xsl:namespace-alias
+
+  stylesheet-prefix CDATA #REQUIRED
+
+  result-prefix CDATA #REQUIRED
+
+>
+
+
+
+<!ELEMENT xsl:template
+
+ (#PCDATA
+
+  %instructions;
+
+  %result-elements;
+
+  | xsl:param)*
+
+>
+
+
+
+<!ATTLIST xsl:template
+
+  match %pattern; #IMPLIED
+
+  name %qname; #IMPLIED
+
+  priority %priority; #IMPLIED
+
+  mode %qname; #IMPLIED
+
+  %space-att;
+
+>
+
+
+
+<!ELEMENT xsl:value-of EMPTY>
+
+<!ATTLIST xsl:value-of
+
+  select %expr; #REQUIRED
+
+  disable-output-escaping (yes|no) "no"
+
+>
+
+
+
+<!ELEMENT xsl:copy-of EMPTY>
+
+<!ATTLIST xsl:copy-of select %expr; #REQUIRED>
+
+
+
+<!ELEMENT xsl:number EMPTY>
+
+<!ATTLIST xsl:number
+
+   level (single|multiple|any) "single"
+
+   count %pattern; #IMPLIED
+
+   from %pattern; #IMPLIED
+
+   value %expr; #IMPLIED
+
+   format %avt; '1'
+
+   lang %avt; #IMPLIED
+
+   letter-value %avt; #IMPLIED
+
+   grouping-separator %avt; #IMPLIED
+
+   grouping-size %avt; #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*>
+
+<!ATTLIST xsl:apply-templates
+
+  select %expr; "node()"
+
+  mode %qname; #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:apply-imports EMPTY>
+
+
+
+<!-- xsl:sort cannot occur after any other elements or
+
+any non-whitespace character -->
+
+
+
+<!ELEMENT xsl:for-each
+
+ (#PCDATA
+
+  %instructions;
+
+  %result-elements;
+
+  | xsl:sort)*
+
+>
+
+
+
+<!ATTLIST xsl:for-each
+
+  select %expr; #REQUIRED
+
+  %space-att;
+
+>
+
+
+
+<!ELEMENT xsl:sort EMPTY>
+
+<!ATTLIST xsl:sort
+
+  select %expr; "."
+
+  lang %avt; #IMPLIED
+
+  data-type %avt; "text"
+
+  order %avt; "ascending"
+
+  case-order %avt; #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:if %template;>
+
+<!ATTLIST xsl:if
+
+  test %expr; #REQUIRED
+
+  %space-att;
+
+>
+
+
+
+<!ELEMENT xsl:choose (xsl:when+, xsl:otherwise?)>
+
+<!ATTLIST xsl:choose %space-att;>
+
+
+
+<!ELEMENT xsl:when %template;>
+
+<!ATTLIST xsl:when
+
+  test %expr; #REQUIRED
+
+  %space-att;
+
+>
+
+
+
+<!ELEMENT xsl:otherwise %template;>
+
+<!ATTLIST xsl:otherwise %space-att;>
+
+
+
+<!ELEMENT xsl:attribute-set (xsl:attribute)*>
+
+<!ATTLIST xsl:attribute-set
+
+  name %qname; #REQUIRED
+
+  use-attribute-sets %qnames; #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:call-template (xsl:with-param)*>
+
+<!ATTLIST xsl:call-template
+
+  name %qname; #REQUIRED
+
+>
+
+
+
+<!ELEMENT xsl:with-param %template;>
+
+<!ATTLIST xsl:with-param
+
+  name %qname; #REQUIRED
+
+  select %expr; #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:variable %template;>
+
+<!ATTLIST xsl:variable 
+
+  name %qname; #REQUIRED
+
+  select %expr; #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:param %template;>
+
+<!ATTLIST xsl:param 
+
+  name %qname; #REQUIRED
+
+  select %expr; #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:text (#PCDATA)>
+
+<!ATTLIST xsl:text
+
+  disable-output-escaping (yes|no) "no"
+
+>
+
+
+
+<!ELEMENT xsl:processing-instruction %char-template;>
+
+<!ATTLIST xsl:processing-instruction 
+
+  name %avt; #REQUIRED
+
+  %space-att;
+
+>
+
+
+
+<!ELEMENT xsl:element %template;>
+
+<!ATTLIST xsl:element 
+
+  name %avt; #REQUIRED
+
+  namespace %avt; #IMPLIED
+
+  use-attribute-sets %qnames; #IMPLIED
+
+  %space-att;
+
+>
+
+
+
+<!ELEMENT xsl:attribute %char-template;>
+
+<!ATTLIST xsl:attribute 
+
+  name %avt; #REQUIRED
+
+  namespace %avt; #IMPLIED
+
+  %space-att;
+
+>
+
+
+
+<!ELEMENT xsl:comment %char-template;>
+
+<!ATTLIST xsl:comment %space-att;>
+
+
+
+<!ELEMENT xsl:copy %template;>
+
+<!ATTLIST xsl:copy
+
+  %space-att;
+
+  use-attribute-sets %qnames; #IMPLIED
+
+>
+
+
+
+<!ELEMENT xsl:message %template;>
+
+<!ATTLIST xsl:message
+
+  %space-att;
+
+  terminate (yes|no) "no"
+
+>
+
+
+
+<!ELEMENT xsl:fallback %template;>
+
+<!ATTLIST xsl:fallback %space-att;>]]></eg>
+
+
+
+</inform-div1>
+
+
+
+<inform-div1>
+
+<head>Examples</head>
+
+
+
+<div2>
+
+<head>Document Example</head>
+
+
+
+<p>This example is a stylesheet for transforming documents that
+
+conform to a simple DTD into XHTML <bibref ref="XHTML"/>.  The DTD
+
+is:</p>
+
+
+
+<eg><![CDATA[<!ELEMENT doc (title, chapter*)>
+
+<!ELEMENT chapter (title, (para|note)*, section*)>
+
+<!ELEMENT section (title, (para|note)*)>
+
+<!ELEMENT title (#PCDATA|emph)*>
+
+<!ELEMENT para (#PCDATA|emph)*>
+
+<!ELEMENT note (#PCDATA|emph)*>
+
+<!ELEMENT emph (#PCDATA|emph)*>]]></eg>
+
+
+
+<p>The stylesheet is:</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="&XSLT.ns;"
+
+                xmlns="&XHTML.ns;"><![CDATA[
+
+
+
+<xsl:strip-space elements="doc chapter section"/>
+
+<xsl:output
+
+   method="xml"
+
+   indent="yes"
+
+   encoding="iso-8859-1"
+
+/>
+
+
+
+<xsl:template match="doc">
+
+ <html>
+
+   <head>
+
+     <title>
+
+       <xsl:value-of select="title"/>
+
+     </title>
+
+   </head>
+
+   <body>
+
+     <xsl:apply-templates/>
+
+   </body>
+
+ </html>
+
+</xsl:template>
+
+
+
+<xsl:template match="doc/title">
+
+  <h1>
+
+    <xsl:apply-templates/>
+
+  </h1>
+
+</xsl:template>
+
+
+
+<xsl:template match="chapter/title">
+
+  <h2>
+
+    <xsl:apply-templates/>
+
+  </h2>
+
+</xsl:template>
+
+
+
+<xsl:template match="section/title">
+
+  <h3>
+
+    <xsl:apply-templates/>
+
+  </h3>
+
+</xsl:template>
+
+
+
+<xsl:template match="para">
+
+  <p>
+
+    <xsl:apply-templates/>
+
+  </p>
+
+</xsl:template>
+
+
+
+<xsl:template match="note">
+
+  <p class="note">
+
+    <b>NOTE: </b>
+
+    <xsl:apply-templates/>
+
+  </p>
+
+</xsl:template>
+
+
+
+<xsl:template match="emph">
+
+  <em>
+
+    <xsl:apply-templates/>
+
+  </em>
+
+</xsl:template>
+
+
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<p>With the following input document</p>
+
+
+
+<eg><![CDATA[<!DOCTYPE doc SYSTEM "doc.dtd">
+
+<doc>
+
+<title>Document Title</title>
+
+<chapter>
+
+<title>Chapter Title</title>
+
+<section>
+
+<title>Section Title</title>
+
+<para>This is a test.</para>
+
+<note>This is a note.</note>
+
+</section>
+
+<section>
+
+<title>Another Section Title</title>
+
+<para>This is <emph>another</emph> test.</para>
+
+<note>This is another note.</note>
+
+</section>
+
+</chapter>
+
+</doc>]]></eg>
+
+
+
+<p>it would produce the following result</p>
+
+
+
+<eg>&lt;?xml version="1.0" encoding="iso-8859-1"?>
+
+&lt;html xmlns="&XHTML.ns;"><![CDATA[
+
+<head>
+
+<title>Document Title</title>
+
+</head>
+
+<body>
+
+<h1>Document Title</h1>
+
+<h2>Chapter Title</h2>
+
+<h3>Section Title</h3>
+
+<p>This is a test.</p>
+
+<p class="note">
+
+<b>NOTE: </b>This is a note.</p>
+
+<h3>Another Section Title</h3>
+
+<p>This is <em>another</em> test.</p>
+
+<p class="note">
+
+<b>NOTE: </b>This is another note.</p>
+
+</body>
+
+</html>]]></eg>
+
+
+
+</div2>
+
+
+
+<div2 id="data-example">
+
+<head>Data Example</head>
+
+
+
+<p>This is an example of transforming some data represented in XML
+
+using three different XSLT stylesheets to produce three different
+
+representations of the data, HTML, SVG and VRML.</p>
+
+
+
+<p>The input data is:</p>
+
+
+
+<eg><![CDATA[<sales>
+
+
+
+        <division id="North">
+
+                <revenue>10</revenue>
+
+                <growth>9</growth>
+
+                <bonus>7</bonus>
+
+        </division>
+
+
+
+        <division id="South">
+
+                <revenue>4</revenue>
+
+                <growth>3</growth>
+
+                <bonus>4</bonus>
+
+        </division>
+
+
+
+        <division id="West">
+
+                <revenue>6</revenue>
+
+                <growth>-1.5</growth>
+
+                <bonus>2</bonus>
+
+        </division>
+
+
+
+</sales>]]></eg>
+
+
+
+<p>The following stylesheet, which uses the simplified syntax
+
+described in <specref ref="result-element-stylesheet"/>, transforms
+
+the data into HTML:</p>
+
+
+
+<eg>&lt;html xsl:version="1.0"
+
+      xmlns:xsl="&XSLT.ns;"<![CDATA[
+
+      lang="en">
+
+    <head>
+
+	<title>Sales Results By Division</title>
+
+    </head>
+
+    <body>
+
+	<table border="1">
+
+	    <tr>
+
+		<th>Division</th>
+
+		<th>Revenue</th>
+
+		<th>Growth</th>
+
+		<th>Bonus</th>
+
+	    </tr>
+
+	    <xsl:for-each select="sales/division">
+
+		<!-- order the result by revenue -->
+
+		<xsl:sort select="revenue"
+
+			  data-type="number"
+
+			  order="descending"/>
+
+		<tr>
+
+		    <td>
+
+			<em><xsl:value-of select="@id"/></em>
+
+		    </td>
+
+		    <td>
+
+			<xsl:value-of select="revenue"/>
+
+		    </td>
+
+		    <td>
+
+			<!-- highlight negative growth in red -->
+
+			<xsl:if test="growth &lt; 0">
+
+			     <xsl:attribute name="style">
+
+				 <xsl:text>color:red</xsl:text>
+
+			     </xsl:attribute>
+
+			</xsl:if>
+
+			<xsl:value-of select="growth"/>
+
+		    </td>
+
+		    <td>
+
+			<xsl:value-of select="bonus"/>
+
+		    </td>
+
+		</tr>
+
+	    </xsl:for-each>
+
+	</table>
+
+    </body>
+
+</html>]]></eg>
+
+
+
+<p>The HTML output is:</p>
+
+
+
+<eg><![CDATA[<html lang="en">
+
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+<title>Sales Results By Division</title>
+
+</head>
+
+<body>
+
+<table border="1">
+
+<tr>
+
+<th>Division</th><th>Revenue</th><th>Growth</th><th>Bonus</th>
+
+</tr>
+
+<tr>
+
+<td><em>North</em></td><td>10</td><td>9</td><td>7</td>
+
+</tr>
+
+<tr>
+
+<td><em>West</em></td><td>6</td><td style="color:red">-1.5</td><td>2</td>
+
+</tr>
+
+<tr>
+
+<td><em>South</em></td><td>4</td><td>3</td><td>4</td>
+
+</tr>
+
+</table>
+
+</body>
+
+</html>]]></eg>
+
+
+
+<p>The following stylesheet transforms the data into SVG:</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="&XSLT.ns;"<![CDATA[
+
+                xmlns="http://www.w3.org/Graphics/SVG/SVG-19990812.dtd">
+
+
+
+<xsl:output method="xml" indent="yes" media-type="image/svg"/>
+
+
+
+<xsl:template match="/">
+
+
+
+<svg width = "3in" height="3in">
+
+    <g style = "stroke: #000000"> 
+
+        <!-- draw the axes -->
+
+        <line x1="0" x2="150" y1="150" y2="150"/>
+
+        <line x1="0" x2="0" y1="0" y2="150"/>
+
+        <text x="0" y="10">Revenue</text>
+
+        <text x="150" y="165">Division</text>
+
+        <xsl:for-each select="sales/division">
+
+	    <!-- define some useful variables -->
+
+
+
+	    <!-- the bar's x position -->
+
+	    <xsl:variable name="pos"
+
+	                  select="(position()*40)-30"/>
+
+
+
+	    <!-- the bar's height -->
+
+	    <xsl:variable name="height"
+
+	                  select="revenue*10"/>
+
+
+
+	    <!-- the rectangle -->
+
+	    <rect x="{$pos}" y="{150-$height}"
+
+                  width="20" height="{$height}"/>
+
+
+
+	    <!-- the text label -->
+
+	    <text x="{$pos}" y="165">
+
+	        <xsl:value-of select="@id"/>
+
+	    </text> 
+
+
+
+	    <!-- the bar value -->
+
+	    <text x="{$pos}" y="{145-$height}">
+
+	        <xsl:value-of select="revenue"/>
+
+	    </text>
+
+        </xsl:for-each>
+
+    </g>
+
+</svg>
+
+
+
+</xsl:template>
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<p>The SVG output is:</p>
+
+
+
+<eg><![CDATA[<svg width="3in" height="3in"
+
+     xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
+
+    <g style="stroke: #000000">
+
+	<line x1="0" x2="150" y1="150" y2="150"/>
+
+	<line x1="0" x2="0" y1="0" y2="150"/>
+
+	<text x="0" y="10">Revenue</text>
+
+	<text x="150" y="165">Division</text>
+
+	<rect x="10" y="50" width="20" height="100"/>
+
+	<text x="10" y="165">North</text>
+
+	<text x="10" y="45">10</text>
+
+	<rect x="50" y="110" width="20" height="40"/>
+
+	<text x="50" y="165">South</text>
+
+	<text x="50" y="105">4</text>
+
+	<rect x="90" y="90" width="20" height="60"/>
+
+	<text x="90" y="165">West</text>
+
+	<text x="90" y="85">6</text>
+
+    </g>
+
+</svg>]]></eg>
+
+
+
+<p>The following stylesheet transforms the data into VRML:</p>
+
+
+
+<eg>&lt;xsl:stylesheet version="1.0"
+
+                xmlns:xsl="&XSLT.ns;"><![CDATA[
+
+
+
+<!-- generate text output as mime type model/vrml, using default charset -->
+
+<xsl:output method="text" encoding="UTF-8" media-type="model/vrml"/>  
+
+
+
+        <xsl:template match="/">#VRML V2.0 utf8 
+
+ 
+
+# externproto definition of a single bar element 
+
+EXTERNPROTO bar [ 
+
+  field SFInt32 x  
+
+  field SFInt32 y  
+
+  field SFInt32 z  
+
+  field SFString name  
+
+  ] 
+
+  "http://www.vrml.org/WorkingGroups/dbwork/barProto.wrl" 
+
+ 
+
+# inline containing the graph axes 
+
+Inline {  
+
+        url "http://www.vrml.org/WorkingGroups/dbwork/barAxes.wrl" 
+
+        } 
+
+        
+
+                <xsl:for-each select="sales/division">
+
+bar {
+
+        x <xsl:value-of select="revenue"/>
+
+        y <xsl:value-of select="growth"/>
+
+        z <xsl:value-of select="bonus"/>
+
+        name "<xsl:value-of select="@id"/>" 
+
+        }
+
+                </xsl:for-each>
+
+        
+
+        </xsl:template> 
+
+ 
+
+</xsl:stylesheet>]]></eg>
+
+
+
+<p>The VRML output is:</p>
+
+
+
+<eg><![CDATA[#VRML V2.0 utf8 
+
+ 
+
+# externproto definition of a single bar element 
+
+EXTERNPROTO bar [ 
+
+  field SFInt32 x  
+
+  field SFInt32 y  
+
+  field SFInt32 z  
+
+  field SFString name  
+
+  ] 
+
+  "http://www.vrml.org/WorkingGroups/dbwork/barProto.wrl" 
+
+ 
+
+# inline containing the graph axes 
+
+Inline {  
+
+        url "http://www.vrml.org/WorkingGroups/dbwork/barAxes.wrl" 
+
+        } 
+
+        
+
+                
+
+bar {
+
+        x 10
+
+        y 9
+
+        z 7
+
+        name "North" 
+
+        }
+
+                
+
+bar {
+
+        x 4
+
+        y 3
+
+        z 4
+
+        name "South" 
+
+        }
+
+                
+
+bar {
+
+        x 6
+
+        y -1.5
+
+        z 2
+
+        name "West" 
+
+        }]]></eg>
+
+
+
+</div2>
+
+
+
+</inform-div1>
+
+
+
+<inform-div1>
+
+<head>Acknowledgements</head>
+
+<p>The following have contributed to authoring this draft:</p>
+
+<slist>
+
+<sitem>Daniel Lipkin, Saba</sitem>
+
+<sitem>Jonathan Marsh, Microsoft</sitem>
+
+<sitem>Henry Thompson, University of Edinburgh</sitem>
+
+<sitem>Norman Walsh, Arbortext</sitem>
+
+<sitem>Steve Zilles, Adobe</sitem>
+
+</slist>
+
+
+
+<p>This specification was developed and approved for publication by the
+
+W3C XSL Working Group (WG). WG approval of this specification does not
+
+necessarily imply that all WG members voted for its approval. The
+
+current members of the XSL WG are:</p>
+
+
+
+<orglist>
+
+<member>
+
+<name>Sharon Adler</name>
+
+<affiliation>IBM</affiliation>
+
+<role>Co-Chair</role>
+
+</member>
+
+<member>
+
+<name>Anders Berglund</name>
+
+<affiliation>IBM</affiliation>
+
+</member>
+
+<member>
+
+<name>Perin Blanchard</name>
+
+<affiliation>Novell</affiliation>
+
+</member>
+
+<member>
+
+<name>Scott Boag</name>
+
+<affiliation>Lotus</affiliation> 
+
+</member>
+
+<member>
+
+<name>Larry Cable</name>
+
+<affiliation>Sun</affiliation>
+
+</member>
+
+<member>
+
+<name>Jeff Caruso</name>
+
+<affiliation>Bitstream</affiliation>
+
+</member>
+
+<member>
+
+<name>James Clark</name>
+
+</member>
+
+<member>
+
+<name>Peter Danielsen</name>
+
+<affiliation>Bell Labs</affiliation>
+
+</member>
+
+<member>
+
+<name>Don Day</name>
+
+<affiliation>IBM</affiliation>
+
+</member>
+
+<member>
+
+<name>Stephen Deach</name>
+
+<affiliation>Adobe</affiliation>
+
+</member>
+
+<member>
+
+<name>Dwayne Dicks</name>
+
+<affiliation>SoftQuad</affiliation>
+
+</member>
+
+<member>
+
+<name>Andrew Greene</name>
+
+<affiliation>Bitstream</affiliation>
+
+</member>
+
+<member>
+
+<name>Paul Grosso</name>
+
+<affiliation>Arbortext</affiliation>
+
+</member>
+
+<member>
+
+<name>Eduardo Gutentag</name>
+
+<affiliation>Sun</affiliation>
+
+</member>
+
+<member>
+
+<name>Juliane Harbarth</name>
+
+<affiliation>Software AG</affiliation>
+
+</member>
+
+<member>
+
+<name>Mickey Kimchi</name>
+
+<affiliation>Enigma</affiliation>
+
+</member>
+
+<member>
+
+<name>Chris Lilley</name>
+
+<affiliation>W3C</affiliation>
+
+</member>
+
+<member>
+
+<name>Chris Maden</name>
+
+<affiliation>Exemplary Technologies</affiliation>
+
+</member>
+
+<member>
+
+<name>Jonathan Marsh</name>
+
+<affiliation>Microsoft</affiliation>
+
+</member>
+
+<member>
+
+<name>Alex Milowski</name> 
+
+<affiliation>Lexica</affiliation>
+
+</member>
+
+<member>
+
+<name>Steve Muench</name>
+
+<affiliation>Oracle</affiliation>
+
+</member>
+
+<member>
+
+<name>Scott Parnell</name>
+
+<affiliation>Xerox</affiliation>
+
+</member>
+
+<member>
+
+<name>Vincent Quint</name>
+
+<affiliation>W3C</affiliation>
+
+</member>
+
+<member>
+
+<name>Dan Rapp</name>
+
+<affiliation>Novell</affiliation>
+
+</member>
+
+<member>
+
+<name>Gregg Reynolds</name>
+
+<affiliation>Datalogics</affiliation>
+
+</member>
+
+<member>
+
+<name>Jonathan Robie</name>
+
+<affiliation>Software AG</affiliation>
+
+</member>
+
+<member>
+
+<name>Mark Scardina</name>
+
+<affiliation>Oracle</affiliation>
+
+</member>
+
+<member>
+
+<name>Henry Thompson</name>
+
+<affiliation>University of Edinburgh</affiliation>
+
+</member>
+
+<member>
+
+<name>Philip Wadler</name>
+
+<affiliation>Bell Labs</affiliation>
+
+</member>
+
+<member>
+
+<name>Norman Walsh</name>
+
+<affiliation>Arbortext</affiliation>
+
+</member>
+
+<member>
+
+<name>Sanjiva Weerawarana</name>
+
+<affiliation>IBM</affiliation>
+
+</member>
+
+<member>
+
+<name>Steve Zilles</name>
+
+<affiliation>Adobe</affiliation>
+
+<role>Co-Chair</role>
+
+</member>
+
+</orglist>
+
+
+
+</inform-div1>
+
+
+
+<inform-div1>
+
+<head>Changes from Proposed Recommendation</head>
+
+
+
+<p>The following are the changes since the Proposed Recommendation:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>The <code>xsl:version</code> attribute is required on a
+
+literal result element used as a stylesheet (see <specref
+
+ref="result-element-stylesheet"/>).</p></item>
+
+
+
+<item><p>The <code>data-type</code> attribute on <code>xsl:sort</code>
+
+can use a prefixed name to specify a data-type not defined by
+
+XSLT (see <specref ref="sorting"/>).</p></item>
+
+
+
+</ulist>
+
+
+
+</inform-div1>
+
+
+
+<inform-div1>
+
+<head>Features under Consideration for Future Versions of XSLT</head>
+
+
+
+<p>The following features are under consideration for versions of XSLT
+
+after XSLT 1.0:</p>
+
+
+
+<ulist>
+
+
+
+<item><p>a conditional expression;</p></item>
+
+
+
+<item><p>support for XML Schema datatypes and archetypes;</p></item>
+
+
+
+<item><p>support for something like style rules in the original XSL
+
+submission;</p></item>
+
+
+
+<item><p>an attribute to control the default namespace for names
+
+occurring in XSLT attributes;</p></item>
+
+
+
+<item><p>support for entity references;</p></item>
+
+
+
+<item><p>support for DTDs in the data model;</p></item>
+
+
+
+<item><p>support for notations in the data model;</p></item>
+
+
+
+<item><p>a way to get back from an element to the elements that
+
+reference it (e.g. by IDREF attributes);</p></item>
+
+
+
+<item><p>an easier way to get an ID or key in another document;</p></item>
+
+
+
+<item><p>support for regular expressions for matching against any or
+
+all of text nodes, attribute values, attribute names, element type
+
+names;</p></item>
+
+
+
+<item><p>case-insensitive comparisons;</p></item>
+
+
+
+<item><p>normalization of strings before comparison, for example for
+
+compatibility characters;</p></item>
+
+
+
+<item><p>a function <code>string resolve(node-set)</code> function
+
+that treats the value of the argument as a relative URI and turns it
+
+into an absolute URI using the base URI of the node;</p></item>
+
+
+
+<item><p>multiple result documents;</p></item>
+
+
+
+<item><p>defaulting the <code>select</code> attribute on
+
+<code>xsl:value-of</code> to the current node;</p></item>
+
+
+
+<item><p>an attribute on <code>xsl:attribute</code> to control how the
+
+attribute value is normalized;</p></item>
+
+
+
+<item><p>additional attributes on <code>xsl:sort</code> to provide
+
+further control over sorting, such as relative order of
+
+scripts;</p></item>
+
+
+
+<item><p>a way to put the text of a resource identified by a URI into
+
+the result tree;</p></item>
+
+
+
+<item><p>allow unions in steps (e.g. <code>foo/(bar|baz)</code>);</p></item>
+
+
+
+<item><p>allow for result tree fragments all operations that are
+
+allowed for node-sets;</p></item>
+
+
+
+<item><p>a way to group together consecutive nodes having duplicate
+
+subelements or attributes;</p></item>
+
+
+
+<item><p>features to make handling of the HTML <code>style</code>
+
+attribute more convenient.</p></item>
+
+
+
+</ulist>
+
+
+
+</inform-div1>
+
+
+
+</back>
+
+</spec>
+
diff --git a/test/tests/contrib/xsltc/mk/mk056.xsl b/test/tests/contrib/xsltc/mk/mk056.xsl
new file mode 100644
index 0000000..a8d9d56
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk056.xsl
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY nbsp "&#160;">
+]>
+<xsl:stylesheet
+	version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+        xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+        exclude-result-prefixes="e"
+>
+	
+  <!-- Test FileName: mk056.xsl -->
+  <!-- Source Document: XSLT Programmer's Reference by Michael Kay -->
+  <!-- Example: REC-xslt-19991116.xml, spec.dtd, xslt.xsl -->
+  <!-- Chapter/Page: 9-588 -->
+  <!-- Purpose: Formatting the XSLT Specification -->
+  
+<xsl:import href="mk055.xsl"/>
+
+<xsl:strip-space elements="e:*"/>
+
+<xsl:template match="spec" mode="css">
+<xsl:text>p.element-syntax { border: solid thin }</xsl:text>
+<xsl:apply-imports/>
+</xsl:template>
+
+<xsl:template match="e:element-syntax-summary">
+  <xsl:for-each select="//e:element-syntax">
+    <xsl:sort select="@name"/>
+    <p class="element-syntax-summary"><code>
+      <xsl:apply-templates select="e:in-category"/>
+      <xsl:text>&lt;</xsl:text>
+      <a href="#element-{@name}">
+        <xsl:text>xsl:</xsl:text><xsl:value-of select="@name"/>
+      </a>
+      <xsl:apply-templates mode="top"/>
+   </code></p>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="e:element-syntax">
+<p class="element-syntax"><a name="element-{@name}"/><code>
+<xsl:apply-templates select="e:in-category"/>
+<xsl:text>&lt;xsl:</xsl:text><xsl:value-of select="@name"/>
+<xsl:apply-templates mode="top"/>
+</code></p>
+</xsl:template>
+
+<xsl:template match="e:in-category">
+<xsl:text>&lt;!-- Category: </xsl:text>
+<xsl:value-of select="@name"/>
+<xsl:text> --&gt;</xsl:text>
+<br/>
+</xsl:template>
+
+<xsl:template match="e:sequence|e:choice|e:model|e:element|e:text" mode="top">
+<xsl:text>&gt;</xsl:text>
+<br/>
+<xsl:text>&nbsp;&nbsp;&lt;!-- Content: </xsl:text>
+<xsl:apply-templates select="."/>
+<xsl:text> --&gt;</xsl:text>
+<br/>
+<xsl:text>&lt;/xsl:</xsl:text>
+<xsl:value-of select="../@name"/>
+<xsl:text>&gt;</xsl:text>
+</xsl:template>
+
+<xsl:template match="e:sequence|e:choice">
+<xsl:text>(</xsl:text>
+<xsl:apply-templates/>
+<xsl:text>)</xsl:text>
+<xsl:call-template name="repeat"/>
+</xsl:template>
+
+<xsl:template match="e:model">
+<xsl:call-template name="group"/>
+<var><xsl:value-of select="@name"/></var>
+<xsl:call-template name="repeat"/>
+</xsl:template>
+
+<xsl:template match="e:text">#PCDATA</xsl:template>
+
+<xsl:template match="e:element">
+<xsl:call-template name="group"/>
+<a href="#element-{@name}">
+<xsl:text>xsl:</xsl:text>
+<xsl:value-of select="@name"/>
+</a>
+<xsl:call-template name="repeat"/>
+</xsl:template>
+
+<xsl:template name="group">
+<xsl:if test="position()>1">
+<xsl:choose>
+<xsl:when test="parent :: e:sequence">, </xsl:when>
+<xsl:when test="parent :: e:choice"> | </xsl:when>
+</xsl:choose>
+</xsl:if>
+</xsl:template>
+
+<xsl:template name="repeat">
+  <xsl:choose>
+   <xsl:when test="@repeat='one-or-more'">
+    <xsl:text>+</xsl:text>
+   </xsl:when>
+   <xsl:when test="@repeat='zero-or-more'">
+    <xsl:text>*</xsl:text>
+   </xsl:when>
+   <xsl:when test="@repeat='zero-or-one'">
+    <xsl:text>?</xsl:text>
+   </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="e:empty" mode="top">
+<xsl:text>&nbsp;/&gt;</xsl:text>
+</xsl:template>
+
+<xsl:template match="e:attribute" mode="top">
+<br/>
+
+<xsl:text>&nbsp;&nbsp;</xsl:text>
+<xsl:choose>
+<xsl:when test="@required='yes'">
+<b><xsl:value-of select="@name"/></b>
+</xsl:when>
+<xsl:otherwise>
+<xsl:value-of select="@name"/>
+</xsl:otherwise>
+</xsl:choose>
+<xsl:text> = </xsl:text>
+
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="e:data-type">
+<xsl:if test="position()>1"> | </xsl:if>
+<var><xsl:value-of select="@name"/></var>
+</xsl:template>
+
+<xsl:template match="e:constant">
+<xsl:if test="position()>1"> | </xsl:if>
+<xsl:text>"</xsl:text>
+<xsl:value-of select="@value"/>
+<xsl:text>"</xsl:text>
+</xsl:template>
+
+<xsl:template match="e:attribute-value-template">
+<xsl:text>{ </xsl:text>
+<xsl:apply-templates/>
+<xsl:text> }</xsl:text>
+</xsl:template>
+
+<xsl:template match="var">
+<var><xsl:apply-templates/></var>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/mk/mk062.xml b/test/tests/contrib/xsltc/mk/mk062.xml
new file mode 100644
index 0000000..19dbb97
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk062.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!DOCTYPE BOOKLIST SYSTEM "./inc/books.dtd">
+<BOOKLIST>
+<BOOKS>
+	<ITEM CAT="S">
+    	<TITLE>Number, the Language of Science</TITLE>
+    	<AUTHOR>Danzig</AUTHOR>
+    	<PRICE>5.95</PRICE>
+    	<QUANTITY>3</QUANTITY>
+	</ITEM>
+	<ITEM CAT="F">
+		<TITLE>Tales of Grandpa Cat</TITLE>
+		<PUBLISHER>Associated Press</PUBLISHER>
+		<AUTHOR>Wardlaw, Lee</AUTHOR>
+		<PRICE>6.58</PRICE>
+		<QUANTITY>5</QUANTITY>
+	</ITEM>
+	<ITEM CAT="S">
+		<TITLE>Language &amp; the Science of Number</TITLE>
+		<AUTHOR>Danzig</AUTHOR>
+		<PRICE>8.95</PRICE>
+		<QUANTITY>5</QUANTITY>
+	</ITEM>
+	<ITEM CAT="S">
+		<TITLE>Evolution of Complexity in Animal Culture</TITLE>
+		<AUTHOR>Bonner</AUTHOR>
+		<PRICE>5.95</PRICE>
+		<QUANTITY>2</QUANTITY>
+	</ITEM>
+	<ITEM CAT="X">
+		<TITLE>Patterns of Crime in Animal Culture</TITLE>
+		<AUTHOR>Bonner</AUTHOR>
+		<PRICE>15.95</PRICE>
+		<QUANTITY>0</QUANTITY>
+	</ITEM>
+
+	<ITEM CAT="F" TAX="7.5">
+		<TITLE>When We Were Very Young</TITLE>
+		<AUTHOR>Milne, A. A.</AUTHOR>
+		<PRICE>12.50</PRICE>
+		<QUANTITY>1</QUANTITY>
+	</ITEM>
+	<ITEM CAT="C">
+		<TITLE>Learn Java Now</TITLE>
+		<AUTHOR>Stephen R. Davis</AUTHOR>
+		<PUBLISHER>Microsoft Corporation</PUBLISHER>
+		<PRICE>9.95</PRICE>
+		<QUANTITY>12</QUANTITY>
+	</ITEM>
+	<ITEM CAT="U" TAX="12.5">
+		<TITLE>Design Patterns</TITLE>
+		<AUTHOR>Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides</AUTHOR>
+		<PUBLISHER>Addison Wesley</PUBLISHER>
+		<PRICE>49.95</PRICE>
+		<QUANTITY>2</QUANTITY>
+	</ITEM>
+	<?testpi1 here is a message ?>
+	<?testpi2 here is a message ?>
+</BOOKS>
+<CATEGORIES DESC="Miscellaneous categories">
+A list of categories
+	<CATEGORY CODE="S" DESC="Science"/>
+	<CATEGORY CODE="I" DESC="Science" NOTE="Limited Stock"/>
+	<CATEGORY CODE="C" DESC="Computing"/>
+	<CATEGORY CODE="X" DESC="Crime"/>
+	<CATEGORY CODE="F" DESC="Fiction"/>
+</CATEGORIES>
+</BOOKLIST>
diff --git a/test/tests/contrib/xsltc/mk/mk062.xsl b/test/tests/contrib/xsltc/mk/mk062.xsl
new file mode 100644
index 0000000..fc2c679
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/mk062.xsl
@@ -0,0 +1,79 @@
+<xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+
+  <!-- Test FileName: mk062.xsl -->
+
+  <!-- Source Document: XSLT Programmer's Reference by Michael Kay -->
+
+  <!-- Example: othello.xml, play.dtd, play.xsl -->
+
+  <!-- Chapter/Page:  -->
+
+  <!-- Purpose: Format a Shakespearean play  -->
+
+  
+
+<xsl:output method="text"/>
+
+
+
+<!-- This stylesheet outputs the book list as a CSV file -->
+
+
+
+<xsl:template match="BOOKLIST">
+
+        <xsl:apply-templates select="BOOKS"/>
+
+</xsl:template>
+
+
+
+<xsl:template match="BOOKS">
+
+Title,Author,Category<xsl:text/>
+
+<xsl:for-each select="ITEM">
+
+"<xsl:value-of select="TITLE"/>","<xsl:value-of select="AUTHOR"/>","<xsl:value-of select="@CAT"/>(<xsl:text/>
+
+        <xsl:choose>
+
+        <xsl:when test='@CAT="F"'>Fiction</xsl:when>
+
+        <xsl:when test='@CAT="S"'>Science</xsl:when>
+
+        <xsl:when test='@CAT="C"'>Computing</xsl:when>
+
+        <xsl:when test='@CAT="X"'>Crime</xsl:when>
+
+        <xsl:otherwise>Unclassified</xsl:otherwise>
+
+        </xsl:choose>)"<xsl:text/>
+
+</xsl:for-each><xsl:text>
+
+</xsl:text>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>	
diff --git a/test/tests/contrib/xsltc/mk/spec.dtd b/test/tests/contrib/xsltc/mk/spec.dtd
new file mode 100755
index 0000000..9a2215a
--- /dev/null
+++ b/test/tests/contrib/xsltc/mk/spec.dtd
@@ -0,0 +1,970 @@
+<!-- ............................................................... -->
+<!-- XML specification DTD ......................................... -->
+<!-- ............................................................... -->
+
+<!--
+TYPICAL INVOCATION:
+#  <!DOCTYPE spec PUBLIC
+#       "-//W3C//DTD Specification::19980323//EN"
+#       "http://www.w3.org/XML/Group/DTD/xmlspec.dtd">
+
+PURPOSE:
+  This DTD was developed for use with the XML family of W3C
+  specifications.  It is an XML-compliant DTD based in part on
+  the TEI Lite and Sweb DTDs.
+
+DEPENDENCIES:
+  None.
+
+CHANGE HISTORY:
+  The list of changes is at the end of the DTD.
+
+  For all details, see the design report at:
+
+    <http://www.w3.org/XML/Group/DTD/xmlspec-report.htm>
+
+  The "typical invocation" FPI always gets updated to reflect the
+  date of the most recent changes.
+
+  Search this file for "#" in the first column to see change history
+  comments.
+
+MAINTAINER:
+  Eve Maler
+  ArborText Inc.
+  elm@arbortext.com
+  voice: +1 781 270 5750
+  fax:   +1 781 273 3760
+-->
+
+<!-- ............................................................... -->
+<!-- Entities for characters and symbols ........................... -->
+
+<!--
+#1998-03-10: maler: Added &ldquo; and &rdquo;.
+#                   Used 8879:1986-compatible decimal character
+#                   references.
+#                   Merged charent.mod file back into main file.
+-->
+
+<!ENTITY lt     "&#38;#60;">
+<!ENTITY gt     "&#62;">
+<!ENTITY amp    "&#38;#38;">
+<!ENTITY apos   "&#39;">
+<!ENTITY quot   "&#34;">
+<!ENTITY mdash  "--">
+<!ENTITY nbsp   "&#160;">
+<!ENTITY ldquo  "#x201C;">
+<!ENTITY rdquo  "#x201D;">
+
+<!-- ............................................................... -->
+<!-- Entities for classes of standalone elements ................... -->
+
+<!--
+#1997-10-16: maler: Added table to % illus.class;.
+#1997-11-28: maler: Added htable to % illus.class;.
+#1997-12-29: maler: IGNOREd table.
+#1998-03-10: maler: Removed SGML Open-specific % illus.class;.
+#                   Added "local" entities for customization.
+-->
+
+<!ENTITY % local.p.class        "">
+<!ENTITY % p.class              "p
+                                %local.p.class;">
+
+<!ENTITY % local.statusp.class  "">
+<!ENTITY % statusp.class        "statusp
+                                %local.statusp.class;">
+
+<!ENTITY % local.list.class     "">
+<!ENTITY % list.class           "ulist|olist|slist|glist
+                                %local.list.class;">
+
+<!ENTITY % local.speclist.class "">
+<!ENTITY % speclist.class       "orglist|blist
+                                %local.speclist.class;">
+
+<!ENTITY % local.note.class     "">
+<!ENTITY % note.class           "note|wfcnote|vcnote
+                                %local.note.class;">
+
+<!ENTITY % local.illus.class    "">
+<!ENTITY % illus.class          "eg|graphic|scrap|htable
+                                %local.illus.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for classes of phrase-level elements ................. -->
+
+<!--
+#1997-12-29: maler: Added xspecref to % ref.class;.
+#1998-03-10: maler: Added % ednote.class;.
+#                   Added "local" entities for customization.
+-->
+
+<!ENTITY % local.annot.class    "">
+<!ENTITY % annot.class          "footnote
+                                %local.annot.class;">
+
+<!ENTITY % local.termdef.class    "">
+<!ENTITY % termdef.class        "termdef|term
+                                %local.termdef.class;">
+
+<!ENTITY % local.emph.class    "">
+<!ENTITY % emph.class           "emph|quote
+                                %local.emph.class;">
+
+<!ENTITY % local.ref.class    "">
+<!ENTITY % ref.class            "bibref|specref|termref|titleref
+                                |xspecref|xtermref
+                                %local.ref.class;">
+
+<!ENTITY % local.loc.class    "">
+<!ENTITY % loc.class            "loc
+                                %local.loc.class;">
+
+<!ENTITY % local.tech.class    "">
+<!ENTITY % tech.class           "kw|nt|xnt|code
+                                %local.tech.class;">
+
+<!ENTITY % local.ednote.class    "">
+<!ENTITY % ednote.class         "ednote
+                                %local.ednote.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for mixtures of standalone elements .................. -->
+
+<!--
+#1997-09-30: maler: Created % p.mix; to eliminate p from self.
+#1997-09-30: maler: Added % speclist.class; to % obj.mix; and % p.mix;.
+#1997-09-30: maler: Added % note.class; to % obj.mix; and % p.mix;.
+#1997-10-16: maler: Created % entry.mix;.  Note that some elements
+#                   left out here are still allowed in termdef,
+#                   which entry can contain through % p.pcd.mix;.
+#1997-11-28: maler: Added % p.class; to % statusobj.mix;.
+#1998-03-10: maler: Added % ednote.class; to all mixtures, except
+#                   % p.mix; and % statusobj.mix;, because paragraphs
+#                   and status paragraphs will contain ednote
+#                   through % p.pcd.mix;.
+#1998-03-123: maler: Added % termdef.mix; (broken out from
+#                    % termdef.pcd.mix;).
+-->
+
+<!ENTITY % div.mix
+        "%p.class;|%list.class;|%speclist.class;|%note.class;
+        |%illus.class;|%ednote.class;">
+<!ENTITY % obj.mix
+        "%p.class;|%list.class;|%speclist.class;|%note.class;
+        |%illus.class;|%ednote.class;">
+<!ENTITY % p.mix
+        "%list.class;|%speclist.class;|%note.class;|%illus.class;">
+<!ENTITY % entry.mix
+        "%list.class;|note|eg|graphic|%ednote.class;">
+<!ENTITY % statusobj.mix
+        "%p.class;|%statusp.class;|%list.class;">
+<!ENTITY % hdr.mix
+        "%p.class;|%list.class;|%ednote.class;">
+<!ENTITY % termdef.mix
+        "%note.class;|%illus.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for mixtures of #PCDATA and phrase-level elements .... -->
+
+<!--    Note that % termdef.pcd.mix contains % note.class;
+        and % illus.class;, considered standalone elements. -->
+
+<!--
+#1997-09-30: maler: Added scrap and % note.class; to % termdef.pcd.mix;.
+#1997-11-28: maler: Added % loc.class; to % p.pcd.mix;.
+#1998-03-10: maler: Added % ednote.class; to all mixtures.
+#1998-03-23: maler: Moved some % termdef.pcd.mix; stuff out to
+#                   % termdef.mix;.
+-->
+
+<!ENTITY % p.pcd.mix
+        "#PCDATA|%annot.class;|%termdef.class;|%emph.class;
+        |%ref.class;|%tech.class;|%loc.class;|%ednote.class;">
+<!ENTITY % statusp.pcd.mix
+        "#PCDATA|%annot.class;|%termdef.class;|%emph.class;
+        |%ref.class;|%tech.class;|%loc.class;|%ednote.class;">
+<!ENTITY % head.pcd.mix
+        "#PCDATA|%annot.class;|%emph.class;|%tech.class;|%ednote.class;">
+<!ENTITY % label.pcd.mix
+        "#PCDATA|%annot.class;|%termdef.class;|%emph.class;|%tech.class;
+        |%ednote.class;">
+<!ENTITY % eg.pcd.mix
+        "#PCDATA|%annot.class;|%emph.class;|%ednote.class;">
+<!ENTITY % termdef.pcd.mix
+        "#PCDATA|term|%emph.class;|%ref.class;|%tech.class;
+        |%ednote.class;">
+<!ENTITY % bibl.pcd.mix
+        "#PCDATA|%emph.class;|%ref.class;|%loc.class;|%ednote.class;">
+<!ENTITY % tech.pcd.mix
+        "#PCDATA|%ednote.class;">
+<!ENTITY % loc.pcd.mix
+        "#PCDATA|%loc.class;|%ednote.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for customizable content models ...................... -->
+
+<!--
+#1998-03-10: maler: Added customization entities.
+-->
+
+<!ENTITY % spec.mdl
+        "header, front?, body, back?">
+
+<!ENTITY % header.mdl
+        "title, subtitle?, version, w3c-designation, w3c-doctype,
+        pubdate, notice*, publoc, prevlocs?, latestloc?, authlist,
+        status, abstract, pubstmt?, sourcedesc?, langusage,
+        revisiondesc">
+
+<!ENTITY % pubdate.mdl
+        "day?, month, year">
+
+<!-- ............................................................... -->
+<!-- Entities for common attributes ................................ -->
+
+<!--    key attribute:
+        Optionally provides a sorting or indexing key, for cases when
+        the element content is inappropriate for this purpose. -->
+<!ENTITY % key.att
+        'key                    CDATA           #IMPLIED'>
+
+<!--    def attribute:
+        Points to the element where the relevant definition can be
+        found, using the IDREF mechanism.  % def.att; is for optional
+        def attributes, and % def-req.att; is for required def
+        attributes. -->
+<!ENTITY % def.att
+        'def                    IDREF           #IMPLIED'>
+<!ENTITY % def-req.att
+        'def                    IDREF           #REQUIRED'>
+
+<!--    ref attribute:
+        Points to the element where more information can be found,
+        using the IDREF mechanism.  % ref.att; is for optional
+        ref attributes, and % ref-req.att; is for required ref
+        attributes. -->
+<!ENTITY % ref.att
+        'ref                    IDREF           #IMPLIED'>
+<!ENTITY % ref-req.att
+        'ref                    IDREF           #REQUIRED'>
+
+<!--
+#1998-03-23: maler: Added show and actuate attributes to href.
+#                   Added semi-common xml:space attribute.
+-->
+
+<!--    HREF and source attributes:
+        Points to the element where more information or source data
+        can be found, using the URL (XLL simple link) mechanism.
+        For some purposes, is associated with additional XLL
+        attributes. % href.att; is for optional HREF attributes,
+        and % href-req.att; is for required HREF attributes.
+        % source-req.att; is for the source attribute, which
+        is always required. -->
+<!ENTITY % href.att
+        'xml:link               CDATA           #FIXED "simple"
+        href                    CDATA           #IMPLIED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!ENTITY % href-req.att
+        'xml:link               CDATA           #FIXED "simple"
+        href                    CDATA           #REQUIRED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!ENTITY % source-req.att
+        'xml:link               CDATA           #FIXED "simple"
+        xml:attributes          NMTOKENS        #FIXED "href source"
+        source                  CDATA           #REQUIRED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!--    xml:space attribute:
+        Indicates that the element contains white space
+        that the formatter or other application should retain,
+        as appropriate to its function. -->
+<!ENTITY % xmlspace.att
+        'xml:space              (default
+                                |preserve)      #FIXED "preserve"'>
+
+<!--    Common attributes:
+        Every element has an ID attribute (sometimes required,
+        but usually optional) for links, and a Role attribute
+        for extending the useful life of the DTD by allowing
+        authors to make subclasses for any element. % common.att;
+        is for common attributes where the ID is optional, and
+        % common-idreq.att; is for common attributes where the
+        ID is required. -->
+<!ENTITY % common.att
+        'id                     ID              #IMPLIED
+        role                    NMTOKEN         #IMPLIED'>
+<!ENTITY % common-idreq.att
+        'id                     ID              #REQUIRED
+        role                    NMTOKEN         #IMPLIED'>
+
+<!-- ............................................................... -->
+<!-- Common elements ............................................... -->
+
+<!--    head: Title on divisions, productions, and the like -->
+<!ELEMENT head (%head.pcd.mix;)*>
+<!ATTLIST head %common.att;>
+
+<!-- ............................................................... -->
+<!-- Major specification structure ................................. -->
+
+<!--
+#1998-03-10: maler: Made spec content model easily customizable.
+-->
+
+<!ELEMENT spec (%spec.mdl;)>
+<!ATTLIST spec %common.att;>
+
+<!ELEMENT front (div1+)>
+<!ATTLIST front %common.att;>
+
+<!ELEMENT body (div1+)>
+<!ATTLIST body %common.att;>
+
+<!--
+#1997-09-30: maler: Added inform-div1 to back content.
+-->
+
+<!ELEMENT back ((div1+, inform-div1*) | inform-div1+)>
+<!ATTLIST back %common.att;>
+
+<!ELEMENT div1 (head, (%div.mix;)*, div2*)>
+<!ATTLIST div1 %common.att;>
+
+<!--
+#1997-09-30: maler: Added inform-div1 declarations.
+-->
+
+<!--    inform-div1: Non-normative division in back matter -->
+<!ELEMENT inform-div1 (head, (%div.mix;)*, div2*)>
+<!ATTLIST inform-div1 %common.att;>
+
+<!ELEMENT div2 (head, (%div.mix;)*, div3*)>
+<!ATTLIST div2 %common.att;>
+
+<!ELEMENT div3 (head, (%div.mix;)*, div4*)>
+<!ATTLIST div3 %common.att;>
+
+<!ELEMENT div4 (head, (%div.mix;)*)>
+<!ATTLIST div4 %common.att;>
+
+<!-- Specification header .......... -->
+
+<!--
+#1998-03-10: maler: Made header content model easily customizable.
+-->
+
+<!ELEMENT header (%header.mdl;)>
+<!ATTLIST header %common.att;>
+
+<!--    Example of title: "Extensible Cheese Language (XCL)" -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title %common.att;>
+
+<!--    Example of subtitle: "A Cheesy Specification" -->
+<!ELEMENT subtitle (#PCDATA)>
+<!ATTLIST subtitle %common.att;>
+
+<!--    Example of version: "Version 666.0" -->
+<!ELEMENT version (#PCDATA)>
+<!ATTLIST version %common.att;>
+
+<!--    Example of w3c-designation: "WD-xcl-19991231" -->
+<!ELEMENT w3c-designation (#PCDATA)>
+<!ATTLIST w3c-designation %common.att;>
+
+<!--    Example of w3c-doctype: "World Wide Web Consortium Working
+        Draft" -->
+<!ELEMENT w3c-doctype (#PCDATA)>
+<!ATTLIST w3c-doctype %common.att;>
+
+<!--
+#1998-03-10: maler: Made pubdate content model easily customizable.
+-->
+
+<!ELEMENT pubdate (%pubdate.mdl;)>
+<!ATTLIST pubdate %common.att;>
+
+<!ELEMENT day (#PCDATA)>
+<!ATTLIST day %common.att;>
+
+<!ELEMENT month (#PCDATA)>
+<!ATTLIST month %common.att;>
+
+<!ELEMENT year (#PCDATA)>
+<!ATTLIST year %common.att;>
+
+<!--    Example of notice: "This draft is for public comment..." -->
+<!ELEMENT notice (%hdr.mix;)+>
+<!ATTLIST notice %common.att;>
+
+<!ELEMENT publoc (loc+)>
+<!ATTLIST publoc %common.att;>
+
+<!ELEMENT prevlocs (loc+)>
+<!ATTLIST prevlocs %common.att;>
+
+<!ELEMENT latestloc (loc+)>
+<!ATTLIST latestloc %common.att;>
+
+<!--      loc (defined in "Phrase-level elements" below) -->
+
+<!ELEMENT authlist (author+)>
+<!ATTLIST authlist %common.att;>
+
+<!--
+#1997-09-30: maler: Made affiliation optional.
+#1998-03-10: maler: Made email optional.
+-->
+
+<!ELEMENT author (name, affiliation?, email?)>
+<!ATTLIST author %common.att;>
+
+<!ELEMENT name (#PCDATA)>
+<!ATTLIST name
+        %common.att;
+        %key.att;>
+
+<!ELEMENT affiliation (#PCDATA)>
+<!ATTLIST affiliation %common.att;>
+
+<!ELEMENT email (#PCDATA)>
+<!--    HREF attribute:
+        email functions as a hypertext reference through this
+        required attribute.  Typically the reference would use
+        the mailto: scheme. -->
+<!ATTLIST email
+        %common.att;
+        %href-req.att;>
+
+<!--    The status element now contains both statusp and p, and
+        the latter now allows loc.  Use p; statusp will be removed
+        eventually. -->
+<!ELEMENT status (%statusobj.mix;)+>
+<!ATTLIST status %common.att;>
+
+<!ELEMENT abstract (%hdr.mix;)*>
+<!ATTLIST abstract %common.att;>
+
+<!ELEMENT pubstmt (%hdr.mix;)+>
+<!ATTLIST pubstmt %common.att;>
+
+<!ELEMENT sourcedesc (%hdr.mix;)+>
+<!ATTLIST sourcedesc %common.att;>
+
+<!ELEMENT langusage (language+)>
+<!ATTLIST langusage %common.att;>
+
+<!ELEMENT language (#PCDATA)>
+<!ATTLIST language %common.att;>
+
+<!ELEMENT revisiondesc (%hdr.mix;)+>
+<!ATTLIST revisiondesc %common.att;>
+
+<!-- ............................................................... -->
+<!-- Standalone elements ........................................... -->
+
+<!-- Paragraphs .................... -->
+
+<!--
+#1997-09-30: maler: Changed from %obj.mix; to %p.mix;.
+#1997-12-29: maler: Changed order of %p.mix; and %p.pcd.mix; references.
+#1997-12-29: maler: Changed order of %statusobj.mix; and %statusp.pcd.mix;
+#                   references.
+-->
+
+<!ELEMENT p (%p.pcd.mix;|%p.mix;)*>
+<!ATTLIST p %common.att;>
+
+<!--    statusp: Special paragraph that allows loc inside it (note that
+        p now also allows loc) -->
+<!ELEMENT statusp (%statusp.pcd.mix;|%statusobj.mix;)*>
+<!ATTLIST statusp %common.att;>
+
+<!-- Lists ......................... -->
+
+<!ELEMENT ulist (item+)>
+<!--    spacing attribute:
+        Use "normal" to get normal vertical spacing for items;
+        use "compact" to get less spacing.  The default is dependent
+        on the stylesheet. -->
+<!ATTLIST ulist
+        %common.att;
+        spacing         (normal|compact)        #IMPLIED>
+
+<!ELEMENT olist (item+)>
+<!--    spacing attribute:
+        Use "normal" to get normal vertical spacing for items;
+        use "compact" to get less spacing.  The default is dependent
+        on the stylesheet. -->
+<!ATTLIST olist
+        %common.att;
+        spacing         (normal|compact)        #IMPLIED>
+
+<!ELEMENT item (%obj.mix;)+>
+<!ATTLIST item %common.att;>
+
+<!ELEMENT slist (sitem+)>
+<!ATTLIST slist %common.att;>
+
+<!ELEMENT sitem (%p.pcd.mix;)*>
+<!ATTLIST sitem %common.att;>
+
+<!ELEMENT glist (gitem+)>
+<!ATTLIST glist %common.att;>
+
+<!ELEMENT gitem (label, def)>
+<!ATTLIST gitem %common.att;>
+
+<!ELEMENT label (%label.pcd.mix;)*>
+<!ATTLIST label %common.att;>
+
+<!ELEMENT def (%obj.mix;)*>
+<!ATTLIST def %common.att;>
+
+<!-- Special lists ................. -->
+
+<!ELEMENT blist (bibl+)>
+<!ATTLIST blist %common.att;>
+
+<!ELEMENT bibl (%bibl.pcd.mix;)*>
+<!--    HREF attribute:
+        bibl optionally functions as a hypertext reference to the
+        referred-to resource through this attribute. -->
+<!ATTLIST bibl
+        %common.att;
+        %href.att;
+        %key.att;>
+
+<!ELEMENT orglist (member+)>
+<!ATTLIST orglist %common.att;>
+
+<!--
+#1997-09-30: maler: Added optional affiliation.
+-->
+
+<!ELEMENT member (name, affiliation?, role?)>
+<!ATTLIST member %common.att;>
+
+<!--      name (defined in "Specification header" above) -->
+<!--      affiliation (defined in "Specification header" above) -->
+
+<!ELEMENT role (#PCDATA)>
+<!ATTLIST role %common.att;>
+
+<!-- Notes ......................... -->
+
+<!ELEMENT note (%obj.mix;)+>
+<!ATTLIST note %common.att;>
+
+<!ELEMENT wfcnote (head, (%obj.mix;)+)>
+<!--    ID attribute:
+        wfcnote must have an ID so that it can be pointed to
+        from a wfc element in a production. -->
+<!ATTLIST wfcnote
+        %common-idreq.att;>
+
+<!ELEMENT vcnote (head, (%obj.mix;)+)>
+<!--    ID attribute:
+        vcnote must have an ID so that it can be pointed to
+        from a vc element in a production. -->
+<!ATTLIST vcnote
+        %common-idreq.att;>
+
+<!-- Illustrations ................. -->
+
+<!--
+#1998-03-23: maler: Added xml:space attribute.
+-->
+
+<!ELEMENT eg (%eg.pcd.mix;)*>
+<!ATTLIST eg
+        %common.att;
+        %xmlspace.att;>
+
+<!ELEMENT graphic EMPTY>
+<!--    source attribute:
+        The graphic data must reside at the location pointed to.
+        This is a hypertext reference, but for practical purposes,
+        for now it should just be a pathname. -->
+<!ATTLIST graphic
+        %common.att;
+        %source-req.att;
+        alt             CDATA           #IMPLIED>
+
+<!--
+#1997-11-28: maler: Added prodgroup to scrap and defined it.
+-->
+
+<!ELEMENT scrap (head, (prodgroup+ | prod+ | bnf))>
+<!--    lang attribute:
+        The scrap can link to a description of the language used,
+        found in a language element in the header. -->
+<!ATTLIST scrap
+        %common.att;
+        lang            IDREF           #IMPLIED>
+
+<!ELEMENT prodgroup (prod+)>
+<!--    pcw<n> attributes:
+        Presentational attributes to control the width
+        of the "pseudo-table" columns used to output
+        groups of productions. -->
+<!ATTLIST prodgroup
+        %common.att;
+        pcw1            CDATA           #IMPLIED
+        pcw2            CDATA           #IMPLIED
+        pcw3            CDATA           #IMPLIED
+        pcw4            CDATA           #IMPLIED
+        pcw5            CDATA           #IMPLIED
+>
+
+<!ELEMENT prod (lhs, (rhs, (com|wfc|vc)*)+)>
+<!--    ID attribute:
+        The production must have an ID so that cross-references
+        (specref) and mentions of nonterminals (nt) can link to
+        it. -->
+<!ATTLIST prod
+        %common-idreq.att;>
+
+<!ELEMENT lhs (#PCDATA)>
+<!ATTLIST lhs %common.att;>
+
+<!ELEMENT rhs (#PCDATA|nt|xnt|com)*>
+<!ATTLIST rhs %common.att;>
+
+<!--      nt and xnt (defined in "Phrase-level elements" below) -->
+
+<!--
+#1997-11-28: maler: Added loc and bibref to com content.
+-->
+
+<!ELEMENT com (#PCDATA|loc|bibref)*>
+<!ATTLIST com %common.att;>
+
+<!--    wfc: Should generate the head of the wfcnote pointed to -->
+<!ELEMENT wfc EMPTY>
+<!--    def attribute:
+        Each well formedness tagline in a production must link to the
+        wfcnote that defines it. -->
+<!ATTLIST wfc
+        %def-req.att;
+        %common.att;>
+
+<!--    vc: Should generate the head of the vcnote pointed to -->
+<!ELEMENT vc EMPTY>
+<!--    def attribute:
+        Each validity tagline in a production must link to the vcnote
+        that defines it. -->
+<!ATTLIST vc
+        %def-req.att;
+        %common.att;>
+
+<!--
+#1998-03-23: maler: Added xml:space attribute.
+-->
+
+<!--    bnf: Un-marked-up production -->
+<!ELEMENT bnf (%eg.pcd.mix;)*>
+<!ATTLIST bnf
+        %common.att;
+        %xmlspace.att;>
+
+<!--
+#1997-10-16: maler: Added table mechanism.
+#1997-11-28: maler: Added non-null system ID to entity declaration.
+#                   Added HTML table module.
+#1997-12-29: maler: IGNOREd SGML Open table model.
+#1998-03-10: maler: Removed SGML Open table model.
+#                   Merged html-tbl.mod file into main file.
+#                   Added %common.att; to all HTML table elements.
+-->
+
+<!--    TR and TD attributes:
+        Alignment attributes.  No default. -->
+<!ENTITY % trtd.att
+        "align          (left
+                        |center
+                        |right)         #IMPLIED
+        valign          (top
+                        |middle
+                        |bottom)        #IMPLIED">
+
+<!ELEMENT htable (htbody+)>
+<!ATTLIST htable
+          border        CDATA           "0"
+          cellpadding   CDATA           "0"
+          align         (left
+                        |center
+                        |right)         "left">
+
+<!ELEMENT htbody (tr+)>
+<!ATTLIST htbody %common.att;>
+
+<!ELEMENT tr     (td+)>
+<!ATTLIST tr
+        %common.att;
+        %trtd.att;>
+
+<!ELEMENT td     (%p.pcd.mix;)*>
+<!ATTLIST td
+        %common.att;
+        %trtd.att;
+        bgcolor         CDATA           #IMPLIED
+        rowspan         CDATA           "1"
+        colspan         CDATA           "1">
+
+<!-- ............................................................... -->
+<!-- Phrase-level elements ......................................... -->
+
+<!--    bibref: Should generate, in square brackets, "key" on bibl -->
+<!ELEMENT bibref EMPTY>
+<!--    ref attribute:
+        A bibliography reference must link to the bibl element that
+        describes the resource. -->
+<!ATTLIST bibref
+        %common.att;
+        %ref-req.att;>
+
+<!ELEMENT code (%tech.pcd.mix;)*>
+<!ATTLIST code %common.att;>
+
+<!--
+#1998-03-10: maler: Declared ednote and related elements.
+-->
+
+<!ELEMENT ednote (name?, date?, edtext)>
+<!ATTLIST ednote %common.att;>
+
+<!ELEMENT date (#PCDATA)>
+<!ATTLIST date %common.att;>
+
+<!ELEMENT edtext (#PCDATA)>
+<!ATTLIST edtext %common.att;>
+
+<!ELEMENT emph (#PCDATA)>
+<!ATTLIST emph %common.att;>
+
+<!--    footnote: Both footnote content and call to footnote -->
+<!ELEMENT footnote (%obj.mix;)+>
+<!ATTLIST footnote %common.att;>
+
+<!ELEMENT kw (%tech.pcd.mix;)*>
+<!ATTLIST kw %common.att;>
+
+<!ELEMENT loc (#PCDATA)>
+<!--    HREF attribute:
+        The purpose of a loc element is to function as a hypertext
+        link to a resource.  (Ideally, the content of loc will also
+        mention the URI of the resource, so that readers of the
+        printed version will be able to locate the resource.) -->
+<!ATTLIST loc
+        %common.att;
+        %href-req.att;>
+
+<!ELEMENT nt (#PCDATA)>
+<!--    def attribute:
+        The nonterminal must link to the production that defines
+        it. -->
+<!ATTLIST nt
+        %common.att;
+        %def-req.att;>
+
+<!--
+#1998-03-10: maler: Declared quote.
+-->
+
+<!--    quote: Scare quotes and other purely presentational quotes -->
+<!ELEMENT quote (%p.pcd.mix;)*>
+<!ATTLIST quote %common.att;>
+
+<!--    specref: Should generate italic "[n.n], Section Title" for
+        div, "n" for numbered item, or "[n]" for production -->
+<!ELEMENT specref EMPTY>
+<!--    ref attribute:
+        The purpose of a specref element is to link to a div, item
+        in an olist, or production in the current spec. -->
+<!ATTLIST specref
+        %common.att;
+        %ref-req.att;>
+
+<!ELEMENT term (#PCDATA)>
+<!ATTLIST term %common.att;>
+
+<!ELEMENT termdef (%termdef.pcd.mix;|%termdef.mix;)*>
+<!--    ID attribute:
+        A term definition must have an ID so that it can be linked
+        to from termref elements. -->
+<!--    term attribute:
+        The canonical form of the term or phrase being defined must
+        appear in this attribute, even if the term or phrase also
+        appears in the element content in identical form (e.g., in
+        the term element). -->
+<!ATTLIST termdef
+        %common-idreq.att;
+        term            CDATA           #REQUIRED>
+
+<!ELEMENT termref (#PCDATA)>
+<!--    ref attribute:
+        A term reference must link to the termdef element that
+        defines the term. -->
+<!ATTLIST termref
+        %common.att;
+        %def-req.att;>
+
+<!ELEMENT titleref (#PCDATA)>
+<!--    HREF attribute:
+        A title reference can optionally function as a hypertext
+        link to the resource with this title. -->
+<!ATTLIST titleref
+        %common.att;
+        %href.att;>
+
+<!ELEMENT xnt (#PCDATA)>
+<!--    HREF attribute:
+        The nonterminal must hyperlink to a resource that serves
+        to define it (e.g., a production in a related XML
+        specification). -->
+<!ATTLIST xnt
+        %common.att;
+        %href-req.att;>
+
+<!--
+#1997-12-29: maler: Declared xspecref.
+-->
+
+<!ELEMENT xspecref (#PCDATA)>
+<!--    HREF attribute:
+        The spec reference must hyperlink to the resource to
+        cross-refer to (e.g., a section in a related XML
+        specification). -->
+<!ATTLIST xspecref
+        %common.att;
+        %href-req.att;>
+
+<!ELEMENT xtermref (#PCDATA)>
+<!--    HREF attribute:
+        The term reference must hyperlink to the resource that
+        serves to define the term (e.g., a term definition in
+        a related XML specification). -->
+<!ATTLIST xtermref
+        %common.att;
+        %href-req.att;>
+
+<!-- ............................................................... -->
+<!-- Unused elements for ADEPT ..................................... -->
+
+<!--
+#1997-09-30: maler: Added unusued elements.
+#1997-10-14: maler: Fixed div to move nested div to the mixture.
+-->
+
+<!--    The following elements are purposely declared but never
+        referenced.  Declaring them allows them to be pasted from
+        an HTML document into a document using this DTD in ADEPT.
+        The ATD Context Transformation mechanism will try to convert
+        them to the appropriate element for this DTD.  While this
+        conversion will not work for all fragments, it does allow
+        many cases to work reasonably well. -->
+
+<!ELEMENT div
+        (head?, (%div.mix;|ul|ol|h1|h2|h3|h4|h5|h6|div)*)>
+<!ELEMENT h1 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h2 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h3 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h4 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h5 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h6 (%head.pcd.mix;|em|a)*>
+<!ELEMENT pre (%eg.pcd.mix;|em)*>
+<!ELEMENT ul (item|li)*>
+<!ELEMENT ol (item|li)*>
+<!ELEMENT li (#PCDATA|%obj.mix;)*>
+<!ELEMENT em (#PCDATA)>
+<!ELEMENT a (#PCDATA)>
+
+<!-- ............................................................... -->
+<!-- Change history ................................................ -->
+
+<!--
+#1997-08-18: maler
+#- Did a major revision.
+#1997-09-10: maler
+#- Updated FPI.
+#- Removed namekey element and put key attribute on name element.
+#- Made statusp element and supporting entities.
+#- Added slist element with sitem+ content.
+#- Required head on scrap and added new bnf subelement.
+#- Added an xnt element and allowed it and nt in regular text and rhs.
+#- Removed the ntref element.
+#- Added back the com element to the content of rhs.
+#- Added a key attribute to bibl.
+#- Removed the ident element.
+#- Added a term element to be used inside termdef.
+#- Added an xtermref element parallel to termref.
+#- Beefed up DTD comments.
+#1997-09-12: maler
+#- Allowed term element in general text.
+#- Changed bibref to EMPTY.
+#- Added ref.class to termdef.pcd.mix.
+#1997-09-14: maler
+#- Changed main attribute of xtermref from def to href.
+#- Added termdef.class to label contents.
+#1997-09-30: maler
+#- Added character entity module and added new entities.
+#- Removed p from appearing directly in self; created %p.mix;.
+#- Added inform-div (non-normative division) element.
+#- Fixed xtermref comment to mention HREF, not ref.
+#- Extended orglist model to allow optional affiliation.
+#- Modified author to make affiliation optional.
+#- Added %speclist.class; and %note.class; to %obj.mix; and %p.mix;.
+#- Added %note.class; and %illus.class; to %termdef.pcd.mix;.
+#- Added unused HTML elements.
+#- Put empty system ID next to public ID in entity declarations.
+#1997-10-14: maler
+#- Fixed "unused" div content model to move nested div to mixture.
+#1997-10-16: maler
+#- Added SGML Open Exchange tables.
+#1997-11-28: maler
+#- Added support for prodgroup and its attributes.
+#- Added support for HTML tables.
+#- Added loc and bibref to content of com.
+#- Added loc to general p content models.
+#- Allowed p as alternative to statusp in status.
+#- Added non-null system IDs to external parameter entity declarations.
+#- (Modified the SGML Open table module to make it XML-compliant.)
+#- (Modified the character entity module.)
+#1997-12-29: maler
+#- Moved #PCDATA occurrences to come before GIs in content models.
+#- Removed use of the SGML Open table module.
+#- Added xspecref element.
+#- Ensured that all FPIs contain 4-digit year.
+#- (Modified the character entity module.)
+#1997-03-10: maler
+#- Merged the character entity and table modules into the main file.
+#- Added ldquo and rdquo entities.
+#- Added common attributes to prodgroup.
+#- Made the email element in header optional.
+#- Removed reference to the SGML Open table model.
+#- Added ednote element.
+#- Added quote element.
+#- Updated XLink usage to reflect 3 March 1998 WD.
+#- Added "local" entities to the class entities for customization.
+#- Parameterized several content models to allow for customization.
+#1997-03-23: maler
+#- Cleaned up some comments and removed some others.
+#- Added xml:space semi-common attribute to eg and bnf elements.
+#- Added show and embed attributes on all the uses of href.
+#- Added %common.att; to all HTML table elements.
+#- Added a real URI to the "typical invocation" comment.
+-->
+
+<!-- ............................................................... -->
+<!-- End of XML specification DTD .................................. -->
+<!-- ............................................................... -->
diff --git a/test/tests/contrib/xsltc/schemasoft/SQLjoin.xml b/test/tests/contrib/xsltc/schemasoft/SQLjoin.xml
new file mode 100755
index 0000000..51e5283
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/SQLjoin.xml
@@ -0,0 +1,11 @@
+<DB>
+<orders customer_id="c1">
+ <product>my_reference</product>
+</orders>
+<orders customer_id="c3">
+ <product>my_reference 2</product>
+</orders>
+<customer id="c1">
+ <name>Dupont</name>
+</customer>
+</DB>
diff --git a/test/tests/contrib/xsltc/schemasoft/SQLjoin.xsl b/test/tests/contrib/xsltc/schemasoft/SQLjoin.xsl
new file mode 100755
index 0000000..0fe82af
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/SQLjoin.xsl
@@ -0,0 +1,65 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+                 version="1.0" >
+
+<!-- SQL ================
+
+select orders.*, customers.name from orders, customers
+
+where orders.customer_id = customers.id
+
+and orders.product = "my_reference"
+
+ XSLT  ================ 
+
+-->
+
+<xsl:template match='/'>
+
+<root>
+
+ <xsl:apply-templates/>
+
+</root>
+
+</xsl:template>
+
+
+
+<xsl:template match='customer' > </xsl:template>
+
+<xsl:template match='orders' > </xsl:template>
+
+
+
+<xsl:template match='orders[product = "my_reference"]'>
+
+  <xsl:copy>  
+
+   <xsl:apply-templates/>
+
+  </xsl:copy>  
+
+  <xsl:copy-of select="id(@customer_id)"/>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/XMLSchema2cplusplus.xml b/test/tests/contrib/xsltc/schemasoft/XMLSchema2cplusplus.xml
new file mode 100755
index 0000000..495294f
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/XMLSchema2cplusplus.xml
@@ -0,0 +1,62 @@
+<?xml version='1.0'?>
+<!-- Commented out for IE5 which doesn't understand :
+<!DOCTYPE schema SYSTEM "http://www.w3.org/TR/2000/WD-xmlschema-1-20000225/structures.dtd" >
+--> 
+
+<!-- Uncomment to format with CSS: <?xml-stylesheet href="limits-mess.css" type="text/css"?> -->
+
+<messagesList xmlns='urn:bigtrust:bizmess:limits:V0.0'>
+
+<schema targetNS='urn:bigtrust:bizmess:limits:V0.0' version="M.n" 
+  xmlns="http://www.w3.org/1999/XMLSchema" 
+  xmlns:bm="urn:bigtrust:bizmess:limits:V0.0"
+  xmlns:html="html" >
+
+ <documentation xmlns:dc="http://www.w3.org/TR/1999/PR-rdf-schema-19990303#" >
+
+<html:p>Definition of limit messages for bizmess</html:p>
+
+A message of bizmess is simply a list of fields, a field being essentially a pair name-value. For performance across network, the messages are sent in a binary form, in form of a pair index-value. Messages sent are constrained by an initial list of fields and messages coming from the server (or in a config. file). This initial message is itself being defined here. 
+<dc:Author>J.M. Vanel</dc:Author> 
+<dc:date>2000-01-18</dc:date> 
+</documentation>
+
+ <!-- Abstract types -->
+
+ <complexType name='genericMessage'><documentation>Abstract type for all the bizmess messages</documentation></complexType>
+ <complexType name='genericField'>
+  <documentation>Abstract type for all the fields in bizmess messages</documentation>
+ </complexType>
+
+ <!-- fields -->
+
+  <complexType name='InstrumentType' source='genericField' derivedBy='extension' type='string' >
+   <documentation><html:b>Type of Instrument</html:b> (bond, etc) ... [any html content]</documentation>
+   <!-- For implementation of binary messages : -->
+   <id>0</id>
+   <size>32</size>
+  </complexType>
+
+  <complexType name='CounterParty' source='genericField' derivedBy='extension' type='string' >
+   <documentation><html:b>Counter-party name</html:b> ... [any html content]</documentation>
+   <id>1</id>
+   <size>64</size>
+  </complexType>
+
+ <!-- messages -->
+
+ <complexType name='enquiry' source='genericMessage' derivedBy='extension'>
+  <documentation><html:b>enquiry</html:b> about ... [any html content]</documentation>
+  <element name='InstrumentType' type='bm:InstrumentType'></element> 
+  <element name='CounterParty' type='bm:CounterParty' ></element> 
+ </complexType>
+
+ <!-- root element -->
+ <element name="bizmess">
+  <complexType>
+   <element type='bm:enquiry' name='enquiry' /> 
+   <element name='reference' type='string' /> 
+  </complexType>
+ </element> 
+</schema>
+</messagesList>
diff --git a/test/tests/contrib/xsltc/schemasoft/XMLSchema2cplusplus.xsl b/test/tests/contrib/xsltc/schemasoft/XMLSchema2cplusplus.xsl
new file mode 100755
index 0000000..a279356
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/XMLSchema2cplusplus.xsl
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+
+
+
+<!-- xt sampleXMLSchema.xml XMLSchema2c++.xslt -->
+
+
+
+<xsl:stylesheet
+
+ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+
+ xmlns:xsch="http://www.w3.org/1999/XMLSchema" 
+
+                 version="1.0" >
+
+
+
+<xsl:output method="text"/>
+
+
+
+<xsl:template match  = '/' >
+
+typedef int integer;
+
+   <xsl:apply-templates/>
+
+</xsl:template>
+
+<xsl:template match  = 'text()' >
+
+</xsl:template>
+
+
+
+<xsl:template match="@*|*">
+
+    <xsl:apply-templates />
+
+</xsl:template>
+
+
+
+<xsl:template match = 'xsch:complexType' >
+
+class <xsl:value-of select="@name"/> 
+
+  <xsl:if test="@derivedBy='extension'" > : public <xsl:value-of select="@source"/>
+
+  </xsl:if>
+
+{
+
+  <xsl:if test="@type" >
+
+    <xsl:value-of select="@type"/> content;
+
+  </xsl:if>
+
+<xsl:apply-templates/>
+
+};
+
+</xsl:template>
+
+
+
+<xsl:template match = 'xsch:element' >
+
+<xsl:variable name="type">
+
+<xsl:value-of select="@type"/>
+
+</xsl:variable>
+
+<xsl:choose>
+
+ <xsl:when test="$type != ''">
+
+  <xsl:value-of select="$type"/>
+
+ </xsl:when>
+
+ <xsl:otherwise>
+
+  no_type_specified 
+
+ </xsl:otherwise>
+
+</xsl:choose>
+
+<xsl:text> </xsl:text><xsl:value-of select="@name"/> ;
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/attributes2elements.xml b/test/tests/contrib/xsltc/schemasoft/attributes2elements.xml
new file mode 100755
index 0000000..c5101fa
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/attributes2elements.xml
@@ -0,0 +1,15 @@
+<a>
+ <b href="hrefIn_b-1rstLevel">b content,
+  <d>d in b,</d>
+ </b>
+ <c>
+  <d>d in c,</d>
+  <g href="hrefIn_g-2ndLevel">g content,</g>
+ </c>
+ <e> </e>
+ <f>f content,
+   <g>g in f,
+   <d>d in f/g,
+    </d> </g> </f>
+</a>
+
diff --git a/test/tests/contrib/xsltc/schemasoft/attributes2elements.xsl b/test/tests/contrib/xsltc/schemasoft/attributes2elements.xsl
new file mode 100755
index 0000000..345d8ec
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/attributes2elements.xsl
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+
+<!-- Replace attributes with elements.
+
+     Note that the reverse transform is not possible.
+
+
+
+Copyright J.M. Vanel 2000 - under GNU public licence 
+
+xt testHREF.xml attributes2elements.xslt > attributes2elements.xml
+
+
+
+ -->
+
+
+
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+
+                version="1.0" >
+
+
+
+ <xsl:template match ="@*" >
+
+   <xsl:element name='{name()}'>
+
+    <xsl:value-of select='.' />
+
+   </xsl:element>
+
+ </xsl:template>
+
+
+
+ <xsl:template match="*">
+
+  <xsl:copy>
+
+    <xsl:apply-templates select="*|@*" />
+
+  </xsl:copy>
+
+ </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/bottles.xml b/test/tests/contrib/xsltc/schemasoft/bottles.xml
new file mode 100755
index 0000000..fe8c493
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/bottles.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!--
+     File:       bottles.xml
+     Purpose:    XSL Version of 99 Bottles of Beer
+     Author:     Chris Rathman 1/10/2001
+     Desc:       XML file used to define parameter constants
+     Tested:     Xalan Version 1.1 and Saxon 5.4.1
+-->
+<?xml-stylesheet type="text/xsl" href="bottles.xsl"?>
+<bottles>
+<quantity>99</quantity>
+<container-plural>bottles</container-plural>
+<container-singular>bottle</container-singular>
+<item>beer</item>
+<location>on the wall</location>
+<retrieve>You take one down</retrieve>
+<distribute>pass it around</distribute>
+</bottles>
diff --git a/test/tests/contrib/xsltc/schemasoft/bottles.xsl b/test/tests/contrib/xsltc/schemasoft/bottles.xsl
new file mode 100755
index 0000000..6640dcf
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/bottles.xsl
@@ -0,0 +1,215 @@
+<?xml version="1.0"?>
+
+<!--
+
+     File:       bottles.xsl
+
+     Purpose:    XSL Version of 99 Bottles of Beer
+
+     Author:     Chris Rathman 1/10/2001
+
+     Desc:       Transform bottles.xml into output text stream
+
+     Tested:     Xalan Version 1.1 and Saxon 5.4.1
+
+-->
+
+<xsl:stylesheet
+
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+   version="1.0">
+
+
+
+<xsl:output method="text"/>
+
+
+
+<!-- function to return the number of bottles as a string -->
+
+<xsl:template name="item">
+
+<xsl:param name="n"/>
+
+
+
+<!-- n bottles -->
+
+<xsl:if test="$n > 1">
+
+<xsl:value-of select="$n"/>
+
+<xsl:text> </xsl:text>
+
+<xsl:value-of select="*/container-plural"/>
+
+</xsl:if>
+
+
+
+<!-- 1 bottle -->
+
+<xsl:if test="$n = 1">
+
+<xsl:value-of select="$n"/>
+
+<xsl:text> </xsl:text>
+
+<xsl:value-of select="*/container-singular"/>
+
+</xsl:if>
+
+
+
+<!-- No more -->
+
+<xsl:if test="$n = 0">
+
+<xsl:text>No more </xsl:text>
+
+<xsl:value-of select="*/container-plural"/>
+
+</xsl:if>
+
+
+
+<!-- of beer -->
+
+<xsl:text> of </xsl:text>
+
+<xsl:value-of select="*/item"/>
+
+</xsl:template>
+
+
+
+<!-- recursive function to sing the verses of the song -->
+
+<xsl:template name="sing">
+
+<xsl:param name="quantity"/>
+
+
+
+<!-- get the current number of bottles as a string -->
+
+<xsl:variable name="itemname">
+
+<xsl:call-template name="item">
+
+<xsl:with-param name="n" select="$quantity"/>
+
+</xsl:call-template>
+
+</xsl:variable>
+
+
+
+<!-- get the number of bottles after taking one down -->
+
+<xsl:variable name="itemnext">
+
+<xsl:call-template name="item">
+
+<xsl:with-param name="n" select="$quantity - 1"/>
+
+</xsl:call-template>
+
+</xsl:variable>
+
+
+
+<!-- "n bottles of beer on the wall," -->
+
+<xsl:value-of select="$itemname"/>
+
+<xsl:text> </xsl:text>
+
+<xsl:value-of select="*/location"/>
+
+<xsl:text>,&#xA;</xsl:text>
+
+
+
+<!-- "n bottles of beer," -->
+
+<xsl:value-of select="$itemname"/>
+
+<xsl:text>,&#xA;</xsl:text>
+
+
+
+<!-- "You take one down, pass it around," -->
+
+<xsl:value-of select="*/retrieve"/>
+
+<xsl:text>, </xsl:text>
+
+<xsl:value-of select="*/distribute"/>
+
+<xsl:text>,&#xA;</xsl:text>
+
+
+
+<!--" n-1 bottles of beer on the wall." -->
+
+<xsl:value-of select="$itemnext"/>
+
+<xsl:text> </xsl:text>
+
+<xsl:value-of select="*/location"/>
+
+<xsl:text>.&#xA;&#xA;</xsl:text>
+
+
+
+<!-- recurse to the next bottle of beer -->
+
+<xsl:if test="$quantity != 1">
+
+<xsl:call-template name="sing">
+
+<xsl:with-param name="quantity" select="$quantity - 1"/>
+
+</xsl:call-template>
+
+</xsl:if>
+
+</xsl:template>
+
+
+
+<!-- output the song based on the xml input parameters -->
+
+<xsl:template match="/">
+
+<xsl:text>&#xA;&#xA;</xsl:text>
+
+<xsl:call-template name="sing">
+
+<xsl:with-param name="quantity" select="*/quantity"/>
+
+</xsl:call-template>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/calendar.xml b/test/tests/contrib/xsltc/schemasoft/calendar.xml
new file mode 100755
index 0000000..a5a4c50
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/calendar.xml
@@ -0,0 +1,3 @@
+<month start="3" days="31">
+<name>May 2001</name>
+</month>
diff --git a/test/tests/contrib/xsltc/schemasoft/calendar.xsl b/test/tests/contrib/xsltc/schemasoft/calendar.xsl
new file mode 100755
index 0000000..567f77e
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/calendar.xsl
@@ -0,0 +1,219 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+
+<!-- Author:  Muhammad Athar Parvez -->
+
+<!-- Reference: http://www.incrementaldevelopment.com/xsltrick/parvez/#calendar -->
+
+<!-- Description: Print out an html calander of a month -->
+
+
+
+<xsl:output method="xml" encoding="UTF-8"/>
+
+
+
+<xsl:variable name="start" select="/month/@start"/>
+
+<xsl:variable name="count" select="/month/@days"/>
+
+
+
+<xsl:variable name="total" select="$start + $count - 1"/>
+
+<xsl:variable name="overflow" select="$total mod 7"/>
+
+
+
+<xsl:variable name="nelements">
+
+<xsl:choose>
+
+<xsl:when test="$overflow > 0"><xsl:value-of select="$total + 7 - $overflow"/></xsl:when>
+
+<xsl:otherwise><xsl:value-of select="$total"/></xsl:otherwise>
+
+</xsl:choose>
+
+</xsl:variable>
+
+
+
+<xsl:template match="/">
+
+
+
+<html>
+
+<head><title><xsl:value-of select="month/name"/></title></head>
+
+
+
+<body bgcolor="lightyellow">
+
+
+
+<h1 align="center"><xsl:value-of select="month/name"/></h1>
+
+
+
+<table border="1" bgcolor="lightblue" noshade="yes" align="center">
+
+<tr bgcolor="white">
+
+<th>Sun</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th>
+
+</tr>
+
+
+
+<xsl:call-template name="month"/>
+
+</table>
+
+
+
+</body></html>
+
+
+
+</xsl:template>
+
+
+
+<!-- Called only once for root -->
+
+<!-- Uses recursion with index + 7 for each week -->
+
+<xsl:template name="month">
+
+<xsl:param name="index" select="1"/>
+
+
+
+<xsl:if test="$index &lt; $nelements">
+
+<xsl:call-template name="week">
+
+<xsl:with-param name="index" select="$index"/>
+
+</xsl:call-template>
+
+
+
+<xsl:call-template name="month">
+
+<xsl:with-param name="index" select="$index + 7"/>
+
+</xsl:call-template>
+
+</xsl:if>
+
+
+
+</xsl:template>
+
+
+
+<!-- Called repeatedly by month for each week -->
+
+<xsl:template name="week">
+
+<xsl:param name="index" select="1"/>
+
+<tr>
+
+<xsl:call-template name="days">
+
+<xsl:with-param name="index" select="$index"/>
+
+<xsl:with-param name="counter" select="$index + 6"/>
+
+</xsl:call-template>
+
+</tr>
+
+</xsl:template>
+
+
+
+<!-- Called by week -->
+
+<!-- Uses recursion with index + 1 for each day-of-week -->
+
+<xsl:template name="days">
+
+<xsl:param name="index" select="1"/>
+
+<xsl:param name="counter" select="1"/>
+
+
+
+<xsl:choose>
+
+<xsl:when test="$index &lt; $start">
+
+<td>-</td>
+
+</xsl:when>
+
+
+
+<xsl:when test="$index - $start + 1 > $count">
+
+<td>-</td>
+
+</xsl:when>
+
+
+
+<xsl:when test="$index > $start - 1">
+
+<td><xsl:value-of select="$index - $start + 1"/></td>
+
+</xsl:when>
+
+
+
+</xsl:choose>
+
+
+
+<xsl:if test="$counter > $index">
+
+<xsl:call-template name="days">
+
+<xsl:with-param name="index" select="$index + 1"/>
+
+<xsl:with-param name="counter" select="$counter"/>
+
+</xsl:call-template>
+
+</xsl:if>
+
+
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/compare.xml b/test/tests/contrib/xsltc/schemasoft/compare.xml
new file mode 100644
index 0000000..5e072f6
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/compare.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<doc/>
diff --git a/test/tests/contrib/xsltc/schemasoft/compare.xsl b/test/tests/contrib/xsltc/schemasoft/compare.xsl
new file mode 100644
index 0000000..33f4b56
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/compare.xsl
@@ -0,0 +1,81 @@
+<?xml version='1.0' encoding='utf-8' ?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="text" indent="no"/>
+
+
+
+	<!-- FileName: compare.xsl -->
+
+	<!-- Creator: John Li, Schemasoft -->
+
+	<!-- Purpose: Compare values of numerical parameters that are set using "select" and by child -->
+
+	
+
+	<xsl:template match="/">
+
+		<xsl:call-template name="compare">
+
+			<xsl:with-param name="a" select="3"/>
+
+			<xsl:with-param name="b">1</xsl:with-param>
+
+			<xsl:with-param name="x">3</xsl:with-param>
+
+		</xsl:call-template>
+
+	</xsl:template>
+
+	
+
+	<xsl:template name="compare">
+
+		<xsl:param name="a"/>
+
+		<xsl:param name="b"/>
+
+		<xsl:param name="x"/>
+
+a = <xsl:value-of select="$a"/>
+
+b = <xsl:value-of select="$b"/>
+
+x = <xsl:value-of select="$x"/>
+
+a &gt; b<xsl:if test="not($a &gt; $b)"> fail</xsl:if>
+
+b &lt; a<xsl:if test="not($b &lt; $a)"> fail</xsl:if>
+
+a == x<xsl:if test="not($a = $x)"> fail</xsl:if>
+
+a &lt;= x<xsl:if test="not($a &lt;= $x)"> fail</xsl:if>
+
+a &gt;= x<xsl:if test="not($a &gt;= $x)"> fail</xsl:if>
+
+b &lt;= a<xsl:if test="not($b &lt;= $a)"> fail</xsl:if>
+
+a &gt;= b<xsl:if test="not($a &gt;= $b)"> fail</xsl:if>
+
+	</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/differentiate.xml b/test/tests/contrib/xsltc/schemasoft/differentiate.xml
new file mode 100755
index 0000000..f1e1d1d
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/differentiate.xml
@@ -0,0 +1,6 @@
+<function-of-x>
+<term><coeff>1</coeff><x/><power>3</power></term>
+<term><coeff>2</coeff><x/><power>2</power></term>
+<term><coeff>3</coeff><x/><power>1</power></term>
+<term><coeff>4</coeff><x/><power>0</power></term>
+</function-of-x>
diff --git a/test/tests/contrib/xsltc/schemasoft/differentiate.xsl b/test/tests/contrib/xsltc/schemasoft/differentiate.xsl
new file mode 100755
index 0000000..141b84c
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/differentiate.xsl
@@ -0,0 +1,83 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet
+
+      version='1.0'
+
+      xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+
+
+<!-- Description:  Differentiates a simple polynomial function -->
+
+<!-- Author:  Charlie Halpern-Hamu, Ph.D. -->
+
+<!-- Reference:  http://www.incrementaldevelopment.com/papers/xsltrick/#differentiate -->
+
+
+
+<xsl:strip-space elements='*'/>
+
+
+
+<xsl:output
+
+        method='xml'
+
+        indent='yes'/>
+
+
+
+<xsl:template match='/function-of-x'>
+
+<xsl:element name='function-of-x'>
+
+<xsl:apply-templates select='term'/>
+
+</xsl:element>
+
+</xsl:template>
+
+
+
+<xsl:template match='term'>
+
+<term>
+
+<coeff>
+
+<xsl:value-of select='coeff * power'/>
+
+</coeff>
+
+<x/>
+
+<power>
+
+<xsl:value-of select='power - 1'/>
+
+</power>
+
+</term>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/eratosthenes.xml b/test/tests/contrib/xsltc/schemasoft/eratosthenes.xml
new file mode 100755
index 0000000..ef2fa6b
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/eratosthenes.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+
+<!-- 
+   The Sieve of Eratosthenes input
+   GPL (c) Oliver Becker, 2000-06-13
+   obecker@informatik.hu-berlin.de
+-->
+<dummy></dummy>
diff --git a/test/tests/contrib/xsltc/schemasoft/eratosthenes.xsl b/test/tests/contrib/xsltc/schemasoft/eratosthenes.xsl
new file mode 100755
index 0000000..67326d3
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/eratosthenes.xsl
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+
+<!-- 
+   The Sieve of Eratosthenes
+   GPL (c) Oliver Becker, 2000-06-13
+   obecker@informatik.hu-berlin.de
+-->
+
+<xslt:transform xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<xslt:output method="text" />
+
+<xslt:param name="bound" select="1000" />
+
+<xslt:template match="/">
+   <xslt:call-template name="eratosthenes">
+      <xslt:with-param name="pos" select="2" />
+      <xslt:with-param name="array">
+         <xslt:call-template name="init-array">
+            <xslt:with-param name="length" select="$bound" />
+         </xslt:call-template>
+      </xslt:with-param>
+   </xslt:call-template>
+   <xslt:text>&#xA;</xslt:text>
+</xslt:template>
+
+
+<!-- Initialize the array (string) with length $length -->
+<xslt:template name="init-array">
+   <xslt:param name="length" />
+   <xslt:if test="$length &gt; 0">
+      <xslt:text>-</xslt:text>
+      <xslt:call-template name="init-array">
+         <xslt:with-param name="length" select="$length - 1" />
+      </xslt:call-template>
+   </xslt:if>
+</xslt:template>
+
+
+<!-- Sieve of Eratosthenes: If the number at position $pos isn't 
+     marked then it's a prime (and printed). If the position of the
+     prime is lower or equal then the square root of $bound then the 
+     new array will be computed by marking all multiples of $pos. -->
+<xslt:template name="eratosthenes">
+   <xslt:param name="array" />
+   <xslt:param name="pos" />
+   <xslt:if test="$pos &lt; $bound">
+      <xslt:variable name="is-prime" 
+                     select="substring($array,$pos,1) = '-'" />
+      <xslt:if test="$is-prime">
+         <xslt:value-of select="$pos" />, <xslt:text />
+      </xslt:if>
+      <xslt:variable name="new-array">
+         <xslt:choose>
+            <xslt:when test="$is-prime and $pos*$pos &lt;= $bound">
+               <xslt:call-template name="mark">
+                  <xslt:with-param name="array" select="$array" />
+                  <xslt:with-param name="number" select="$pos" />
+               </xslt:call-template>
+            </xslt:when>
+            <xslt:otherwise>
+               <xslt:value-of select="$array" />
+            </xslt:otherwise>
+         </xslt:choose>
+      </xslt:variable>
+      <xslt:call-template name="eratosthenes">
+         <xslt:with-param name="array" select="$new-array" />
+         <xslt:with-param name="pos" select="$pos + 1" />
+      </xslt:call-template>
+   </xslt:if>
+</xslt:template>
+
+
+<!-- Mark all multiples of $number in $array with '*' -->
+<xslt:template name="mark">
+   <xslt:param name="array" />
+   <xslt:param name="number" />
+   <xslt:choose>
+      <xslt:when test="string-length($array) &gt; $number">
+         <xslt:value-of select="substring ($array, 1, $number - 1)" />
+         <xslt:text>*</xslt:text>
+         <xslt:call-template name="mark">
+            <xslt:with-param name="array" 
+                             select="substring ($array, $number + 1)" />
+            <xslt:with-param name="number" select="$number" />
+         </xslt:call-template>
+      </xslt:when>
+      <xslt:otherwise>
+         <xslt:value-of select="$array" />
+      </xslt:otherwise>
+   </xslt:choose>
+</xslt:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xslt:transform>
diff --git a/test/tests/contrib/xsltc/schemasoft/factorial.xml b/test/tests/contrib/xsltc/schemasoft/factorial.xml
new file mode 100755
index 0000000..ec3c3ac
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/factorial.xml
@@ -0,0 +1 @@
+<dummy>foo</dummy>
diff --git a/test/tests/contrib/xsltc/schemasoft/factorial.xsl b/test/tests/contrib/xsltc/schemasoft/factorial.xsl
new file mode 100755
index 0000000..1af6db3
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/factorial.xsl
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+
+
+<!-- Author:  Chris Rathman -->
+
+<!-- Reference:  http://www.angelfire.com/tx4/cus/notes/xslfactorial.html -->
+
+<!-- Description:  Computes factorial as a demonstration of recursion -->
+
+
+
+<xsl:output method="text"/>
+
+
+
+<!-- x := 5 -->
+
+<xsl:variable name="x" select="5"/>
+
+
+
+<!-- y := factorial(x) -->
+
+<xsl:variable name="y">
+
+<xsl:call-template name="factorial">
+
+<xsl:with-param name="n" select="$x"/>
+
+</xsl:call-template>
+
+</xsl:variable>
+
+
+
+<!-- factorial(n) - compute the factorial of a number -->
+
+<xsl:template name="factorial">
+
+<xsl:param name="n" select="1"/>
+
+<xsl:variable name="sum">
+
+<xsl:if test="$n = 1">1</xsl:if>
+
+<xsl:if test="$n != 1">
+
+<xsl:call-template name="factorial">
+
+<xsl:with-param name="n" select="$n - 1"/>
+
+</xsl:call-template>
+
+</xsl:if>
+
+</xsl:variable>
+
+<xsl:value-of select="$sum * $n"/>
+
+</xsl:template>
+
+
+
+<!-- output the results -->
+
+<xsl:template match="/">
+
+<xsl:text>factorial(</xsl:text>
+
+<xsl:value-of select="$x"/>
+
+<xsl:text>) = </xsl:text>
+
+<xsl:value-of select="$y"/>
+
+<xsl:text>&#xA;</xsl:text>
+
+
+
+<!-- calculate another factorial for grins -->
+
+<xsl:text>factorial(4) = </xsl:text>
+
+<xsl:call-template name="factorial">
+
+<xsl:with-param name="n" select="5"/>
+
+</xsl:call-template>
+
+<xsl:text>&#xA;</xsl:text>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/log10.xml b/test/tests/contrib/xsltc/schemasoft/log10.xml
new file mode 100755
index 0000000..b5e9655
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/log10.xml
@@ -0,0 +1,44 @@
+
+<bugTotals>
+
+	<byState>
+		<open>
+			<total date="may 1" value="3"/>
+			<total date="may 2" value="13"/>
+			<total date="may 3" value="12"/>
+			<total date="may 4" value="22"/>
+			<total date="may 5" value="5"/>
+			<total date="may 6" value="8"/>
+			<total date="may 7" value="2"/>
+			<total date="may 8" value="4"/>
+			<total date="may 9" value="1"/>
+		</open>
+
+		<testing>
+			<total date="may 1" value="0"/>
+			<total date="may 2" value="3"/>
+			<total date="may 3" value="10"/>
+			<total date="may 4" value="2"/>
+			<total date="may 5" value="15"/>
+			<total date="may 6" value="4"/>
+			<total date="may 7" value="8"/>
+			<total date="may 8" value="2"/>
+			<total date="may 9" value="0"/>
+		</testing>
+
+		<closed>
+			<total date="may 1" value="0"/>
+			<total date="may 2" value="3"/>
+			<total date="may 3" value="4"/>
+			<total date="may 4" value="7"/>
+			<total date="may 5" value="15"/>
+			<total date="may 6" value="22"/>
+			<total date="may 7" value="22"/>
+			<total date="may 8" value="24"/>
+			<total date="may 9" value="28"/>
+		</closed>
+
+	</byState>
+
+</bugTotals>
+
diff --git a/test/tests/contrib/xsltc/schemasoft/log10.xsl b/test/tests/contrib/xsltc/schemasoft/log10.xsl
new file mode 100755
index 0000000..3f7a611
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/log10.xsl
@@ -0,0 +1,395 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+	<xsl:output method="text" />
+
+
+
+  <!-- FileName: log10.xsl -->
+
+  <!-- Author: Darryl Fuller, SchemaSoft -->
+
+  <!-- Purpose: Torture test, compute log10 recursivly for the a bunch of numbers -->
+
+
+
+
+
+	<xsl:template match="/">
+
+		<xsl:for-each select="./*/*/*/*">
+
+			<xsl:variable name="val" select="position()"/>
+
+			<xsl:variable name="logval">
+
+				<xsl:call-template name="log10">
+
+					<xsl:with-param name="x" select="$val"/>
+
+				</xsl:call-template>
+
+			</xsl:variable>
+
+Value: <xsl:value-of select="$val"/> Log10: <xsl:value-of select="$logval"/>
+
+		</xsl:for-each>
+
+	</xsl:template>
+
+
+
+	<xsl:template name="ln" >
+
+		<xsl:param name="x"/>
+
+		<xsl:variable name="e">2.71828182845904</xsl:variable>
+
+		<xsl:choose>
+
+			<xsl:when test="$x = 0">0</xsl:when>
+
+			<!-- technically, a negative number should be NaN, but we will
+
+		     instead pretend we're just scaling a negative number
+
+		     with the ln function -->
+
+			<xsl:when test="$x &lt; 0">
+
+				<xsl:variable name="scaled_answer">
+
+					<xsl:call-template name="ln">
+
+						<xsl:with-param name="x" select="$x * -1"/>
+
+					</xsl:call-template>
+
+				</xsl:variable>
+
+				<xsl:value-of select="$scaled_answer * -1"/>
+
+			</xsl:when>
+
+			<!-- A table of some common values -->
+
+			<xsl:when test="$x = 10">2.3025850929940</xsl:when>
+
+			<xsl:when test="$x = 20">2.9957322735539</xsl:when>
+
+			<xsl:when test="$x = 30">3.4011973816621</xsl:when>
+
+			<xsl:when test="$x = 40">3.6888794541139</xsl:when>
+
+			<xsl:when test="$x = 50">3.9120230054281</xsl:when>
+
+			<xsl:when test="$x = 60">4.0943445622221</xsl:when>
+
+			<xsl:when test="$x = 70">4.2484952420493</xsl:when>
+
+			<xsl:when test="$x = 80">4.3820266346738</xsl:when>
+
+			<xsl:when test="$x = 90">4.4998096703302</xsl:when>
+
+			<xsl:when test="$x = 100">4.6051701859881</xsl:when>
+
+			<xsl:when test="$x = 200">5.2983173665480</xsl:when>
+
+			<xsl:when test="$x = 300">5.7037824746562</xsl:when>
+
+			<xsl:when test="$x = 400">5.9914645471079</xsl:when>
+
+			<xsl:when test="$x = 500">6.2146080984222</xsl:when>
+
+			<xsl:when test="$x = 600">6.3969296552161</xsl:when>
+
+			<xsl:when test="$x = 700">6.5510803350434</xsl:when>
+
+			<xsl:when test="$x = 800">6.6846117276679</xsl:when>
+
+			<xsl:when test="$x = 900">6.8023947633243</xsl:when>
+
+			<xsl:when test="$x = 1000">6.90775527898213</xsl:when>
+
+			<!-- scale the answer -->
+
+			<xsl:when test="$x &gt; 20">
+
+				<xsl:variable name="scaled_answer">
+
+					<xsl:call-template name="ln">
+
+						<xsl:with-param name="x" select="$x div $e"/>
+
+					</xsl:call-template>
+
+				</xsl:variable>
+
+				<xsl:value-of select="$scaled_answer + 1"/>
+
+			</xsl:when>
+
+			<!-- scale the answer -->
+
+			<xsl:when test="$x &lt; 0.005">
+
+				<xsl:variable name="scaled_answer">
+
+					<xsl:call-template name="ln">
+
+						<xsl:with-param name="x" select="$x * $e"/>
+
+					</xsl:call-template>
+
+				</xsl:variable>
+
+				<xsl:value-of select="$scaled_answer - 1"/>
+
+			</xsl:when>
+
+			<!-- The straight goods -->
+
+			<xsl:otherwise>
+
+				<xsl:variable name="z">
+
+					<xsl:call-template name="z_value">
+
+						<xsl:with-param name="x" select="$x"/>
+
+					</xsl:call-template>
+
+				</xsl:variable>
+
+				<xsl:variable name="interim_answer">
+
+					<xsl:call-template name="ln_recurse">
+
+						<xsl:with-param name="z" select="$z"/>
+
+						<xsl:with-param name="current" select="0"/>
+
+						<xsl:with-param name="term" select="1"/>
+
+					</xsl:call-template>
+
+				</xsl:variable>
+
+				<xsl:value-of select="$interim_answer * 2"/>
+
+			</xsl:otherwise>
+
+		</xsl:choose>
+
+	</xsl:template>
+
+	<xsl:template name="z_value">
+
+		<xsl:param name="x"/>
+
+		<xsl:value-of select="($x - 1) div ($x + 1)"/>
+
+	</xsl:template>
+
+	<xsl:template name="ln_recurse">
+
+		<xsl:param name="z"/>
+
+		<xsl:param name="current"/>
+
+		<xsl:param name="term"/>
+
+		<xsl:variable name="term_value">
+
+			<xsl:call-template name="ln_term">
+
+				<xsl:with-param name="z" select="$z"/>
+
+				<xsl:with-param name="n" select="$term"/>
+
+			</xsl:call-template>
+
+		</xsl:variable>
+
+		<xsl:variable name="val" select="$current + $term_value"/>
+
+		<xsl:choose>
+
+			<xsl:when test="$val = $current">
+
+				<xsl:value-of select="$current"/>
+
+			</xsl:when>
+
+			<!-- Limiting the number of terms we calculate to is a trade
+
+		     off of accuracy v.s. speed.  I'm currently sacrificing
+
+		     accuracy for a bit o' speed to make this less painfully
+
+		     slow -->
+
+			<xsl:when test="$term &gt; 100">
+
+				<xsl:value-of select="$current"/>
+
+			</xsl:when>
+
+			<xsl:otherwise>
+
+				<xsl:call-template name="ln_recurse">
+
+					<xsl:with-param name="z" select="$z"/>
+
+					<xsl:with-param name="current" select="$val"/>
+
+					<xsl:with-param name="term" select="$term + 2"/>
+
+				</xsl:call-template>
+
+			</xsl:otherwise>
+
+		</xsl:choose>
+
+	</xsl:template>
+
+	<xsl:template name="ln_term">
+
+		<xsl:param name="z"/>
+
+		<xsl:param name="n"/>
+
+		<xsl:variable name="numerator">
+
+			<xsl:call-template name="pow_function">
+
+				<xsl:with-param name="number" select="$z"/>
+
+				<xsl:with-param name="power" select="$n"/>
+
+			</xsl:call-template>
+
+		</xsl:variable>
+
+		<xsl:value-of select="$numerator div $n"/>
+
+	</xsl:template>
+
+	<xsl:template name="pow_function" ><!-- Power function.  
+
+	Calculates number ^ power where power is an 
+
+	integer. -->
+
+		<xsl:param name="number"/>
+
+		<xsl:param name="power"/>
+
+
+
+		<xsl:variable name="int_power" select="round( $power )"/>
+
+		<xsl:variable name="rest">
+
+			<xsl:choose>
+
+				<xsl:when test="$int_power &gt; 0">
+
+					<xsl:call-template name="pow_function">
+
+						<xsl:with-param name="number" select="$number"/>
+
+						<xsl:with-param name="power" select="$int_power - 1"/>
+
+					</xsl:call-template>
+
+				</xsl:when>
+
+				<xsl:when test="$int_power &lt; 0">
+
+					<xsl:call-template name="pow_function">
+
+						<xsl:with-param name="number" select="$number"/>
+
+						<xsl:with-param name="power" select="$int_power + 1"/>
+
+					</xsl:call-template>
+
+				</xsl:when>
+
+				<xsl:otherwise>1</xsl:otherwise>
+
+			</xsl:choose>
+
+		</xsl:variable>
+
+		<xsl:variable name="result">
+
+			<xsl:choose>
+
+				<xsl:when test="$int_power &gt; 0">
+
+					<xsl:value-of select="$rest * $number"/>
+
+				</xsl:when>
+
+				<xsl:when test="$int_power &lt; 0">
+
+					<xsl:value-of select="$rest div $number"/>
+
+				</xsl:when>
+
+				<xsl:otherwise>
+
+				1
+
+			</xsl:otherwise>
+
+			</xsl:choose>
+
+		</xsl:variable>
+
+		<xsl:value-of select="$result"/>
+
+	</xsl:template>
+
+	<xsl:template name="log10"><!-- Log (base 10). -->
+
+		<xsl:param name="x"/>
+
+			<xsl:variable name="numerator">
+
+				<xsl:call-template name="ln">
+
+					<xsl:with-param name="x" select="$x"/>
+
+				</xsl:call-template>
+
+			</xsl:variable>
+
+			<!-- ln(10) -->
+
+			<xsl:variable name="denominator" select="2.302585092994045684"/>
+
+			<xsl:value-of select="$numerator div $denominator"/>
+
+	</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+	</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/pi.xml b/test/tests/contrib/xsltc/schemasoft/pi.xml
new file mode 100755
index 0000000..ec3c3ac
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/pi.xml
@@ -0,0 +1 @@
+<dummy>foo</dummy>
diff --git a/test/tests/contrib/xsltc/schemasoft/pi.xsl b/test/tests/contrib/xsltc/schemasoft/pi.xsl
new file mode 100755
index 0000000..51d6603
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/pi.xsl
@@ -0,0 +1,105 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+
+     version="1.0">
+
+<xsl:output method="text"/>
+
+
+
+<!-- Author: Bob DuCharme -->
+
+<!-- Reference:  http://www.xml.com/pub/a/2001/05/07/xsltmath.html -->
+
+<!-- Description: Compute pi. Based on Leibniz's algorithm that 
+
+       pi/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11... which I did as
+
+       pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11...
+
+-->
+
+
+
+<xsl:variable name="iterations" select="4500"/>
+
+
+
+<xsl:template name="pi">
+
+  <!-- named template called by main template below -->
+
+  <xsl:param name="i">1</xsl:param>
+
+  <xsl:param name="piValue">0</xsl:param>
+
+
+
+  <xsl:choose>
+
+  <!-- If there are more iterations to do, add the passed
+
+       value of pi to another round of calculations. -->
+
+  <xsl:when test="$i &lt;= $iterations">
+
+    <xsl:call-template name="pi">
+
+      <xsl:with-param name="i" select="$i + 4"/>
+
+      <xsl:with-param name="piValue" 
+
+           select="$piValue + (4 div $i) - (4 div ($i + 2))"/>
+
+    </xsl:call-template>
+
+  </xsl:when>
+
+
+
+  <!-- If no more iterations to do, add 
+
+       computed value to result tree. -->
+
+  <xsl:otherwise>
+
+   <xsl:value-of select="$piValue"/>
+
+  </xsl:otherwise>
+
+
+
+  </xsl:choose>
+
+
+
+</xsl:template>
+
+
+
+
+
+<xsl:template match="/">
+
+  <xsl:call-template name="pi"/>
+
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/queryOnSubElement.xml b/test/tests/contrib/xsltc/schemasoft/queryOnSubElement.xml
new file mode 100755
index 0000000..69f90be
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/queryOnSubElement.xml
@@ -0,0 +1,18 @@
+<a>
+ <b>b content,
+  <d>d in b,</d>
+ </b>
+ <c>
+  <d>d in c,</d>
+
+<g>g content,</g>
+
+
+ </c>
+ <e> </e>
+ <f>f content,
+   <g>g in f,
+   <d>d in f/g,
+    </d> </g> </f>
+</a>
+
diff --git a/test/tests/contrib/xsltc/schemasoft/queryOnSubElement.xsl b/test/tests/contrib/xsltc/schemasoft/queryOnSubElement.xsl
new file mode 100755
index 0000000..6cae5b8
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/queryOnSubElement.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+
+<!-- queryOnSubElement.xslt
+
+Selects  a given tag according to the content of a subelement. This transform is completely parametrized.
+
+Copyright J.M. Vanel 2000 - under GNU public licence 
+
+-->
+
+
+
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+
+                 version="1.0" >
+
+
+
+<xsl:param name="wantedTag">b</xsl:param>
+
+<xsl:param name="wantedsubElement">d</xsl:param>
+
+<xsl:param name="wantedString">d in b</xsl:param>
+
+
+
+  <xsl:template match="/">
+
+    <Collection>
+
+      <xsl:copy-of select="//* [ name(.) = $wantedTag]
+
+                           [ * [ name(.) = $wantedsubElement] 
+
+                           [contains(., $wantedString) ] ]" />
+
+    </Collection>
+
+  </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/selectHREF.xml b/test/tests/contrib/xsltc/schemasoft/selectHREF.xml
new file mode 100755
index 0000000..c5101fa
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/selectHREF.xml
@@ -0,0 +1,15 @@
+<a>
+ <b href="hrefIn_b-1rstLevel">b content,
+  <d>d in b,</d>
+ </b>
+ <c>
+  <d>d in c,</d>
+  <g href="hrefIn_g-2ndLevel">g content,</g>
+ </c>
+ <e> </e>
+ <f>f content,
+   <g>g in f,
+   <d>d in f/g,
+    </d> </g> </f>
+</a>
+
diff --git a/test/tests/contrib/xsltc/schemasoft/selectHREF.xsl b/test/tests/contrib/xsltc/schemasoft/selectHREF.xsl
new file mode 100755
index 0000000..7986833
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/selectHREF.xsl
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+
+<!-- Extracts href attributes
+
+
+
+Copyright J.M. Vanel 2000 - under GNU public licence 
+
+xt testHREF.xml selectHREF.xslt > selectHREF.txt
+
+ -->
+
+
+
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+
+                version="1.0" >
+
+
+
+<xsl:output method="text"/>
+
+
+
+<xsl:template match ="*" >
+
+  <xsl:apply-templates select="*|@*" />
+
+ </xsl:template>
+
+
+
+ <xsl:template match ="@href|@HREF" >
+
+   href=<xsl:value-of select='.' />
+
+ </xsl:template>
+
+
+
+ <!-- Suppress element text content : -->
+
+ <xsl:template match ="text()" ></xsl:template>
+
+
+
+ <xsl:template match ="/" >
+
+  <xsl:apply-templates/>
+
+ </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/contrib/xsltc/schemasoft/suppressEmptyElements.xml b/test/tests/contrib/xsltc/schemasoft/suppressEmptyElements.xml
new file mode 100755
index 0000000..a280ec5
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/suppressEmptyElements.xml
@@ -0,0 +1,2 @@
+<Collection><a><b><d/></b><c><d/></c>
+<f><g><d>d in f/g </d></g></f></a></Collection>
diff --git a/test/tests/contrib/xsltc/schemasoft/suppressEmptyElements.xsl b/test/tests/contrib/xsltc/schemasoft/suppressEmptyElements.xsl
new file mode 100755
index 0000000..6e58383
--- /dev/null
+++ b/test/tests/contrib/xsltc/schemasoft/suppressEmptyElements.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+
+<!-- Suppress branches without text content
+
+  -->
+
+
+
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+
+>
+
+
+
+ <xsl:template match="* [.//text()] | text() ">
+
+  <xsl:copy>
+
+    <xsl:apply-templates />
+
+  </xsl:copy>
+
+ </xsl:template>
+
+
+
+ <xsl:template match="/">
+
+  <xsl:apply-templates /> 
+
+ </xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt-gold/common/common1.out b/test/tests/exslt-gold/common/common1.out
new file mode 100644
index 0000000..b417f55
--- /dev/null
+++ b/test/tests/exslt-gold/common/common1.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?><out xmlns:common="http://exslt.org/common">11</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/common/common2.out b/test/tests/exslt-gold/common/common2.out
new file mode 100644
index 0000000..d7b169d
--- /dev/null
+++ b/test/tests/exslt-gold/common/common2.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?><out>7</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/common/common3.out b/test/tests/exslt-gold/common/common3.out
new file mode 100644
index 0000000..c7b1052
--- /dev/null
+++ b/test/tests/exslt-gold/common/common3.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?><out xmlns:exslt="http://exslt.org/common">:
+    string;
+    number;
+    boolean;
+    node-set;
+    RTF;
+  </out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/datetime/datetime1.out b/test/tests/exslt-gold/datetime/datetime1.out
new file mode 100644
index 0000000..e538a4a
--- /dev/null
+++ b/test/tests/exslt-gold/datetime/datetime1.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+   The system time is:
+   2005-04-12T18:36:01-04:00</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/dynamic/dynamic1.out b/test/tests/exslt-gold/dynamic/dynamic1.out
new file mode 100644
index 0000000..561ef17
--- /dev/null
+++ b/test/tests/exslt-gold/dynamic/dynamic1.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out xmlns:dyn="http://exslt.org/dynamic"><booktitle>Romeo and Juliet</booktitle><booktitle>Farewell to Arms</booktitle><booktitle>Superfudge</booktitle><booktitle>World Maps</booktitle></out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math1.out b/test/tests/exslt-gold/math/math1.out
new file mode 100644
index 0000000..e15e0d4
--- /dev/null
+++ b/test/tests/exslt-gold/math/math1.out
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+      Absolute value of zero is:
+      0<br/>
+      Absolute value of nzero is:
+      0<br/>
+      Absolute value of num1 is:
+      1.99<br/>
+      Absolute value of num2 is:
+      3.1428475<br/>
+      Absolute value of temp1 is:
+      7<br/>
+      Absolute value of temp2 is:
+      9.99999<br/>
+      Absolute value of input1 number is:
+      5223849703457<br/>
+      Absolute value of input2 number is:
+      0<br/>
+      Absolute value of input3 number is:
+      Infinity</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math10.out b/test/tests/exslt-gold/math/math10.out
new file mode 100644
index 0000000..4cc5be8
--- /dev/null
+++ b/test/tests/exslt-gold/math/math10.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+     This is for testing the Euler constant
+     log of $val =0<br/>log of $val =0.6931471805599453<br/>log of $val =1.0986122886681098<br/>log of $val =1.3862943611198906<br/>log of $val =1.6094379124341003<br/>log of $val =1.791759469228055<br/>log of $val =1.9459101490553132<br/>log of $val =2.0794415416798357<br/>log of $val =2.1972245773362196<br/>log of $val =2.302585092994046<br/>log of $val =2.3978952727983707<br/>log of $val =2.4849066497880004<br/>log of $val =2.5649493574615367<br/>log of $val =2.6390573296152584<br/>log of $val =2.70805020110221<br/>log of $val =2.772588722239781<br/>log of $val =2.833213344056216<br/>log of $val =2.8903717578961645<br/>log of $val =2.9444389791664403<br/>log of $val =2.995732273553991<br/>log of $val =3.044522437723423<br/>log of $val =3.091042453358316<br/>log of $val =3.1354942159291497<br/>log of $val =3.1780538303479458<br/>log of $val =3.2188758248682006<br/>log of $val =3.258096538021482<br/>log of $val =3.295836866004329<br/>log of $val =3.332204510175204<br/>log of $val =3.367295829986474<br/>log of $val =3.4011973816621555<br/>log of $val =3.4339872044851463<br/>log of $val =3.4657359027997265<br/>log of $val =3.4965075614664802<br/>log of $val =3.5263605246161616<br/>log of $val =3.5553480614894135<br/>log of $val =3.58351893845611<br/>log of $val =3.6109179126442243<br/>log of $val =3.6375861597263857<br/>log of $val =3.6635616461296463<br/>log of $val =3.6888794541139363<br/>log of $val =3.713572066704308<br/>log of $val =3.7376696182833684<br/>log of $val =3.7612001156935624<br/>log of $val =3.784189633918261<br/>log of $val =3.8066624897703196<br/>log of $val =3.828641396489095<br/>log of $val =3.8501476017100584<br/>log of $val =3.871201010907891<br/>log of $val =3.8918202981106265<br/>log of $val =3.912023005428146<br/>log of $val =3.9318256327243257<br/>log of $val =3.9512437185814275<br/>log of $val =3.970291913552122<br/>log of $val =3.9889840465642745<br/>log of $val =4.007333185232471<br/>log of $val =4.02535169073515<br/>log of $val =4.04305126783455<br/>log of $val =4.060443010546419<br/>log of $val =4.07753744390572<br/>log of $val =4.0943445622221<br/>log of $val =4.110873864173311<br/>log of $val =4.127134385045092<br/>log of $val =4.143134726391533<br/>log of $val =4.1588830833596715<br/>log of $val =4.174387269895637<br/>log of $val =4.189654742026425<br/>log of $val =4.204692619390966<br/>log of $val =4.219507705176107<br/>log of $val =4.23410650459726<br/>log of $val =4.248495242049359<br/>log of $val =4.2626798770413155<br/>log of $val =4.276666119016055<br/>log of $val =4.290459441148391<br/>log of $val =4.30406509320417<br/>log of $val =4.31748811353631<br/>log of $val =4.330733340286331<br/>log of $val =4.343805421853684<br/>log of $val =4.356708826689592<br/>log of $val =4.3694478524670215<br/>log of $val =4.382026634673881<br/>log of $val =4.394449154672439<br/>log of $val =4.406719247264253<br/>log of $val =4.418840607796598<br/>log of $val =4.430816798843313<br/>log of $val =4.442651256490317<br/>log of $val =4.454347296253507<br/>log of $val =4.465908118654584<br/>log of $val =4.477336814478207<br/>log of $val =4.48863636973214<br/>log of $val =4.499809670330265<br/>log of $val =4.51085950651685<br/>log of $val =4.5217885770490405<br/>log of $val =4.532599493153256<br/>log of $val =4.543294782270004<br/>log of $val =4.553876891600541<br/>log of $val =4.564348191467836<br/>log of $val =4.574710978503383<br/>log of $val =4.584967478670572<br/>log of $val =4.59511985013459<br/>log of $val =4.605170185988092<br/>log of $val =4.61512051684126<br/>log of $val =4.624972813284271<br/>log of $val =4.634728988229636<br/>log of $val =4.6443908991413725<br/>log of $val =4.653960350157523<br/>log of $val =4.663439094112067<br/>log of $val =4.672828834461906<br/>log of $val =4.68213122712422<br/>log of $val =4.6913478822291435<br/>log of $val =4.700480365792417<br/>log of $val =4.709530201312334<br/>log of $val =4.718498871295094<br/>log of $val =4.727387818712341<br/>log of $val =4.736198448394496<br/>log of $val =4.74493212836325<br/>log of $val =4.7535901911063645<br/>log of $val =4.762173934797756<br/>log of $val =4.770684624465665<br/>log of $val =4.77912349311153<br/>log of $val =4.787491742782046<br/>log of $val =4.795790545596741<br/>log of $val =4.804021044733257<br/>log of $val =4.812184355372417<br/>log of $val =4.820281565605037<br/>log of $val =4.8283137373023015<br/>log of $val =4.836281906951478<br/>log of $val =4.844187086458591<br/>log of $val =4.852030263919617<br/>log of $val =4.859812404361672<br/>log of $val =4.867534450455582<br/>log of $val =4.875197323201151<br/>log of $val =4.882801922586371<br/>log of $val =4.890349128221754<br/>log of $val =4.897839799950911<br/>log of $val =4.90527477843843<br/>log of $val =4.912654885736052<br/>log of $val =4.919980925828125<br/>log of $val =4.927253685157205<br/>log of $val =4.9344739331306915<br/>log of $val =4.941642422609304<br/>log of $val =4.948759890378168<br/>log of $val =4.955827057601261<br/>log of $val =4.962844630259907<br/>log of $val =4.969813299576001<br/>log of $val =4.976733742420574<br/>log of $val =4.983606621708336<br/>log of $val =4.990432586778736<br/>log of $val =4.997212273764115<br/>log of $val =5.003946305945459<br/>log of $val =5.0106352940962555<br/>log of $val =5.017279836814924<br/>log of $val =5.0238805208462765<br/>log of $val =5.030437921392435<br/>log of $val =5.0369526024136295<br/>log of $val =5.043425116919247<br/>log of $val =5.049856007249537<br/>log of $val =5.056245805348308<br/>log of $val =5.062595033026967<br/>log of $val =5.0689042022202315<br/>log of $val =5.075173815233827<br/>log of $val =5.081404364984463<br/>log of $val =5.087596335232384<br/>log of $val =5.093750200806762<br/>log of $val =5.099866427824199<br/>log of $val =5.10594547390058<br/>log of $val =5.111987788356544<br/>log of $val =5.117993812416755<br/>log of $val =5.123963979403259<br/>log of $val =5.1298987149230735<br/>log of $val =5.135798437050262<br/>log of $val =5.14166355650266<br/>log of $val =5.147494476813453<br/>log of $val =5.153291594497779<br/>log of $val =5.159055299214529<br/>log of $val =5.1647859739235145<br/>log of $val =5.170483995038151<br/>log of $val =5.176149732573829<br/>log of $val =5.181783550292085<br/>log of $val =5.187385805840755<br/>log of $val =5.19295685089021<br/>log of $val =5.198497031265826<br/>log of $val =5.204006687076795<br/>log of $val =5.209486152841421<br/>log of $val =5.214935757608986<br/>log of $val =5.220355825078324<br/>log of $val =5.225746673713202<br/>log of $val =5.231108616854587<br/>log of $val =5.236441962829949<br/>log of $val =5.241747015059643<br/>log of $val =5.247024072160486<br/>log of $val =5.25227342804663<br/>log of $val =5.2574953720277815<br/>log of $val =5.262690188904886<br/>log of $val =5.267858159063328<br/>log of $val =5.272999558563747<br/>log of $val =5.278114659230517<br/>log of $val =5.2832037287379885<br/>log of $val =5.288267030694535<br/>log of $val =5.293304824724492<br/>log of $val =5.298317366548036<br/>log of $val =5.303304908059076<br/>log of $val =5.308267697401205<br/>log of $val =5.313205979041787<br/>log of $val =5.318119993844216<br/>log of $val =5.3230099791384085<br/>log of $val =5.327876168789581<br/>log of $val =5.332718793265369<br/>log of $val =5.337538079701318<br/>log of $val =5.342334251964811<br/>log of $val =5.3471075307174685<br/>log of $val =5.351858133476067<br/>log of $val =5.356586274672012<br/>log of $val =5.3612921657094255<br/>log of $val =5.365976015021851<br/>log of $val =5.3706380281276624<br/>log of $val =5.375278407684165<br/>log of $val =5.37989735354046<br/>log of $val =5.384495062789089<br/>log of $val =5.389071729816501<br/>log of $val =5.393627546352362<br/>log of $val =5.3981627015177525<br/>log of $val =5.402677381872279<br/>log of $val =5.407171771460119<br/>log of $val =5.4116460518550396<br/>log of $val =5.41610040220442<br/>log of $val =5.420534999272286<br/>log of $val =5.424950017481403<br/>log of $val =5.429345628954441<br/>log of $val =5.43372200355424<br/>log of $val =5.438079308923196<br/>log of $val =5.442417710521793<br/>log of $val =5.44673737166631<br/>log of $val =5.4510384535657<br/>log of $val =5.455321115357702<br/>log of $val =5.459585514144159<br/>log of $val =5.4638318050256105<br/>log of $val =5.4680601411351315<br/>log of $val =5.472270673671475<br/>log of $val =5.476463551931511<br/>log of $val =5.480638923341991<br/>log of $val =5.484796933490655<br/>log of $val =5.488937726156687<br/>log of $val =5.493061443340548<br/>log of $val =5.497168225293202<br/>log of $val =5.501258210544727<br/>log of $val =5.5053315359323625<br/>log of $val =5.5093883366279774<br/>log of $val =5.5134287461649825<br/>log of $val =5.517452896464707<br/>log of $val =5.521460917862246<br/>log of $val =5.5254529391317835<br/>log of $val =5.529429087511423<br/>log of $val =5.53338948872752<br/>log of $val =5.537334267018537<br/>log of $val =5.541263545158426<br/>log of $val =5.545177444479562<br/>log of $val =5.54907608489522<br/>log of $val =5.552959584921617<br/>log of $val =5.556828061699537<br/>log of $val =5.560681631015528<br/>log of $val =5.564520407322694<br/>log of $val =5.568344503761097<br/>log of $val =5.572154032177765<br/>log of $val =5.575949103146316<br/>log of $val =5.579729825986222<br/>log of $val =5.583496308781699<br/>log of $val =5.58724865840025<br/>log of $val =5.5909869805108565<br/>log of $val =5.594711379601839<br/>log of $val =5.598421958998375<br/>log of $val =5.602118820879701<br/>log of $val =5.605802066295998<br/>log of $val =5.60947179518496<br/>log of $val =5.6131281063880705<br/>log of $val =5.616771097666572<br/>log of $val =5.62040086571715<br/>log of $val =5.6240175061873385<br/>log of $val =5.627621113690637<br/>log of $val =5.631211781821365<br/>log of $val =5.634789603169249<br/>log of $val =5.638354669333745<br/>log of $val =5.641907070938114<br/>log of $val =5.645446897643238<br/>log of $val =5.648974238161206<br/>log of $val =5.652489180268651<br/>log of $val =5.655991810819852<br/>log of $val =5.659482215759621<br/>log of $val =5.662960480135946<br/>log of $val =5.666426688112432<br/>log of $val =5.66988092298052<br/>log of $val =5.673323267171493<br/>log of $val =5.676753802268282<br/>log of $val =5.680172609017068<br/>log of $val =5.683579767338681<br/>log of $val =5.68697535633982<br/>log of $val =5.69035945432406<br/>log of $val =5.6937321388027<br/>log of $val =5.697093486505405<br/>log of $val =5.700443573390687<br/>log of $val =5.703782474656201<br/>log of $val =5.707110264748875<br/>log of $val =5.71042701737487<br/>log of $val =5.713732805509369<br/>log of $val =5.717027701406222<br/>log of $val =5.720311776607412<br/>log of $val =5.723585101952381<br/>log of $val =5.726847747587197<br/>log of $val =5.730099782973574<br/>log of $val =5.733341276897746<br/>log of $val =5.736572297479192<br/>log of $val =5.739792912179234<br/>log of $val =5.7430031878094825<br/>log of $val =5.746203190540153<br/>log of $val =5.749392985908253<br/>log of $val =5.752572638825633<br/>log of $val =5.755742213586912<br/>log of $val =5.75890177387728<br/>log of $val =5.762051382780177<br/>log of $val =5.765191102784844<br/>log of $val =5.768320995793772<br/>log of $val =5.771441123130016<br/>log of $val =5.7745515455444085<br/>log of $val =5.777652323222656<br/>log of $val =5.780743515792329<br/>log of $val =5.783825182329737<br/>log of $val =5.786897381366708<br/>log of $val =5.7899601708972535<br/>log of $val =5.793013608384144<br/>log of $val =5.796057750765372<br/>log of $val =5.799092654460526<br/>log of $val =5.802118375377063<br/>log of $val =5.805134968916488<br/>log of $val =5.808142489980444<br/>log of $val =5.811140992976701<br/>log of $val =5.814130531825066<br/>log of $val =5.817111159963204<br/>log of $val =5.820082930352362<br/>log of $val =5.823045895483019<br/>log of $val =5.82600010738045<br/>log of $val =5.8289456176102075<br/>log of $val =5.831882477283517<br/>log of $val =5.834810737062605<br/>log of $val =5.8377304471659395<br/>log of $val =5.840641657373398<br/>log of $val =5.84354441703136<br/>log of $val =5.846438775057725<br/>log of $val =5.849324779946859<br/>log of $val =5.8522024797744745<br/>log of $val =5.855071922202427<br/>log of $val =5.857933154483459<br/>log of $val =5.860786223465865<br/>log of $val =5.863631175598097<br/>log of $val =5.8664680569332965<br/>log of $val =5.869296913133774<br/>log of $val =5.872117789475416<br/>log of $val =5.87493073085203<br/>log of $val =5.877735781779639<br/>log of $val =5.8805329864007<br/>log of $val =5.883322388488279<br/>log of $val =5.886104031450156<br/>log of $val =5.8888779583328805<br/>log of $val =5.8916442118257715<br/>log of $val =5.8944028342648505<br/>log of $val =5.8971538676367405<br/>log of $val =5.8998973535824915<br/>log of $val =5.902633333401366<br/>log of $val =5.905361848054571<br/>log of $val =5.908082938168931<br/>log of $val =5.910796644040527<br/>log of $val =5.91350300563827<br/>log of $val =5.916202062607435<br/>log of $val =5.918893854273146<br/>log of $val =5.921578419643816<br/>log of $val =5.924255797414532<br/>log of $val =5.926926025970411<br/>log of $val =5.929589143389895<br/>log of $val =5.932245187448011<br/>log of $val =5.934894195619588<br/>log of $val =5.937536205082426<br/>log of $val =5.940171252720432<br/>log of $val =5.942799375126701<br/>log of $val =5.945420608606575<br/>log of $val =5.948034989180646<br/>log of $val =5.950642552587727<br/>log of $val =5.953243334287785<br/>log of $val =5.955837369464831<br/>log of $val =5.958424693029782<br/>log of $val =5.961005339623274<br/>log of $val =5.963579343618446<br/>log of $val =5.966146739123692<br/>log of $val =5.968707559985366<br/>log of $val =5.971261839790462<br/>log of $val =5.973809611869261<br/>log of $val =5.976350909297934<br/>log of $val =5.978885764901122<br/>log of $val =5.981414211254481<br/>log of $val =5.983936280687191<br/>log of $val =5.986452005284438<br/>log of $val =5.988961416889864<br/>log of $val =5.991464547107982<br/>log of $val =5.993961427306569<br/>log of $val =5.996452088619021<br/>log of $val =5.998936561946683<br/>log of $val =6.0014148779611505<br/>log of $val =6.003887067106539<br/>log of $val =6.0063531596017325<br/>log of $val =6.008813185442595<br/>log of $val =6.0112671744041615<br/>log of $val =6.013715156042802<br/>log of $val =6.016157159698354<br/>log of $val =6.018593214496234<br/>log of $val =6.021023349349527<br/>log of $val =6.023447592961033<br/>log of $val =6.025865973825314<br/>log of $val =6.028278520230698<br/>log of $val =6.030685260261263<br/>log of $val =6.0330862217988015<br/>log of $val =6.035481432524756<br/>log of $val =6.037870919922137<br/>log of $val =6.040254711277414<br/>log of $val =6.042632833682381<br/>log of $val =6.045005314036012<br/>log of $val =6.0473721790462776<br/>log of $val =6.049733455231958<br/>log of $val =6.052089168924417<br/>log of $val =6.054439346269371<br/>log of $val =6.056784013228625<br/>log of $val =6.059123195581797<br/>log of $val =6.061456918928017<br/>log of $val =6.063785208687608<br/>log of $val =6.066108090103747<br/>log of $val =6.068425588244111<br/>log of $val =6.07073772800249<br/>log of $val =6.073044534100405<br/>log of $val =6.075346031088684<br/>log of $val =6.077642243349034<br/>log of $val =6.07993319509559<br/>log of $val =6.082218910376446<br/>log of $val =6.0844994130751715<br/>log of $val =6.0867747269123065<br/>log of $val =6.089044875446846<br/>log of $val =6.091309882077698<br/>log of $val =6.093569770045136<br/>log of $val =6.095824562432225<br/>log of $val =6.09807428216624<br/>log of $val =6.100318952020064<br/>log of $val =6.102558594613569<br/>log of $val =6.104793232414985<br/>log of $val =6.1070228877422545<br/>log of $val =6.1092475827643655<br/>log of $val =6.111467339502679<br/>log of $val =6.113682179832232<br/>log of $val =6.115892125483034<br/>log of $val =6.118097198041348<br/>log of $val =6.12029741895095<br/>log of $val =6.1224928095143865<br/>log of $val =6.124683390894205<br/>log of $val =6.126869184114185<br/>log of $val =6.129050210060545<br/>log of $val =6.131226489483141<br/>log of $val =6.133398042996649<br/>log of $val =6.135564891081739<br/>log of $val =6.137727054086234<br/>log of $val =6.139884552226255<br/>log of $val =6.142037405587356<br/>log of $val =6.144185634125646<br/>log of $val =6.1463292576688975<br/>log of $val =6.148468295917647<br/>log of $val =6.150602768446279<br/>log of $val =6.152732694704104<br/>log of $val =6.154858094016418<br/>log of $val =6.156978985585555<br/>log of $val =6.159095388491933<br/>log of $val =6.161207321695077<br/>log of $val =6.163314804034641<br/>log of $val =6.16541785423142<br/>log of $val =6.1675164908883415<br/>log of $val =6.169610732491456<br/>log of $val =6.171700597410915<br/>log of $val =6.173786103901937<br/>log of $val =6.175867270105761<br/>log of $val =6.1779441140506<br/>log of $val =6.180016653652572<br/>log of $val =6.182084906716632<br/>log of $val =6.184148890937483<br/>log of $val =6.186208623900494<br/>log of $val =6.18826412308259<br/>log of $val =6.1903154058531475<br/>log of $val =6.192362489474872<br/>log of $val =6.194405391104672<br/>log of $val =6.19644412779452<br/>log of $val =6.198478716492308<br/>log of $val =6.20050917404269<br/>log of $val =6.202535517187923<br/>log of $val =6.20455776256869<br/>log of $val =6.206575926724928<br/>log of $val =6.208590026096629<br/>log of $val =6.210600077024653<br/>log of $val =6.212606095751519<br/>log of $val =6.214608098422191<br/></out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math11.out b/test/tests/exslt-gold/math/math11.out
new file mode 100644
index 0000000..1484803
--- /dev/null
+++ b/test/tests/exslt-gold/math/math11.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+     This is for testing the node-set of b with lowest value in it.  That tree would be:
+     3
+     This is for testing the node-set of c with lowest value in it.  That tree would be:
+     NaN
+     This is for testing the node-set of d with lowest value in it.  That tree would be:
+     NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math12.out b/test/tests/exslt-gold/math/math12.out
new file mode 100644
index 0000000..8fa4038
--- /dev/null
+++ b/test/tests/exslt-gold/math/math12.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><out xmlns:common="http://exslt.org/common">
+     This is for finding the maximum value in the node-set b and printing it:
+     999
+     This is for finding the maximum value in the node-set c and printing it:
+     NaN
+     This is for finding the maximum value in the node-set d and printing it:
+     NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math13.out b/test/tests/exslt-gold/math/math13.out
new file mode 100644
index 0000000..9c7828c
--- /dev/null
+++ b/test/tests/exslt-gold/math/math13.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+     This is for finding the smallest value in the node-set b and printing it:
+     3
+     This is for finding the smallest value in the node-set c and printing it:
+     NaN
+     This is for finding the smallest value in the node-set d and printing it:
+     NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math14.out b/test/tests/exslt-gold/math/math14.out
new file mode 100644
index 0000000..fdfb5ec
--- /dev/null
+++ b/test/tests/exslt-gold/math/math14.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+   Using variable bases with power 0:<br/>10 to the power of 0 is 1<br/>2.5 to the power of 0 is 1<br/>1 to the power of 0 is 1<br/>0 to the power of 0 is 1<br/>-10 to the power of 0 is 1<br/>
+   Using variable base with power -0:
+   10 to the power of 0 is 1<br/>2.5 to the power of 0 is 1<br/>1 to the power of 0 is 1<br/>0 to the power of 0 is 1<br/>-10 to the power of 0 is 1<br/>
+   Using variable base with power 10:
+   10 to the power of 10 is 10000000000<br/>2.5 to the power of 10 is 9536.7431640625<br/>1 to the power of 10 is 1<br/>0 to the power of 10 is 0<br/>-10 to the power of 10 is 10000000000<br/>
+   Using variable base with power 2:
+   10 to the power of 2.5 is 316.2277660168379<br/>2.5 to the power of 2.5 is 9.882117688026185<br/>1 to the power of 2.5 is 1<br/>0 to the power of 2.5 is 0<br/>-10 to the power of 2.5 is NaN<br/>
+   Using variable base with power -5:
+   10 to the power of -5 is 0.00001<br/>2.5 to the power of -5 is 0.01024<br/>1 to the power of -5 is 1<br/>0 to the power of -5 is Infinity<br/>-10 to the power of -5 is -0.00001<br/>
+   Using input as base with power 5223849703457:
+   5223849703457 to the power of 5223849703457 is Infinity<br/>NaN to the power of 5223849703457 is NaN<br/>Infinity to the power of 5223849703457 is Infinity<br/>
+   Using input as base with power NaN:
+   5223849703457 to the power of NaN is NaN<br/>NaN to the power of NaN is NaN<br/>Infinity to the power of NaN is NaN<br/>
+   Using input as base with power Infinity:
+   5223849703457 to the power of Infinity is Infinity<br/>NaN to the power of Infinity is NaN<br/>Infinity to the power of Infinity is Infinity<br/></out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math15.out b/test/tests/exslt-gold/math/math15.out
new file mode 100644
index 0000000..117edb2
--- /dev/null
+++ b/test/tests/exslt-gold/math/math15.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>0.24970244453260904</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math16.out b/test/tests/exslt-gold/math/math16.out
new file mode 100644
index 0000000..9bc6d6d
--- /dev/null
+++ b/test/tests/exslt-gold/math/math16.out
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+      Sin value of zero is:
+      0<br/>
+      Sin value of nzero is:
+      0<br/>
+      Sin value of num1 is:
+      0.9134133613412252<br/>
+      Sin value of num2 is:
+      -0.0012548460808847915<br/>
+      Sin value of temp1 is:
+      -0.6569865987187891<br/>
+      Sin value of temp2 is:
+      0.5440127201468784<br/>
+      Sin value of rad1 is:
+      0.8414709848078965<br/>
+      Sin value of rad2 is:
+      -0.13235175009777303<br/>
+      Sin value of rad3 is:
+      0.25030957884256927<br/>
+      Sin value of rad4 is:
+      -0.7758113701699153<br/>
+      Sin value of input1 is:
+      0.922283531483375<br/>
+      Sin value of input2 is:
+      NaN<br/>
+      Sin value of input3 is:
+      NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math17.out b/test/tests/exslt-gold/math/math17.out
new file mode 100644
index 0000000..cd8a201
--- /dev/null
+++ b/test/tests/exslt-gold/math/math17.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+   Sqrt of 100 is 10<br/> 
+   Sqrt of 20 is 4.47213595499958<br/> 
+   Sqrt of 1 is 1<br/> 
+   Sqrt of 0 is 0<br/> 
+   Sqrt of -10 is NaN<br/> 
+   Sqrt of 5223849703457 is 2285574.2611993598<br/> 
+   Sqrt of NaN is NaN<br/> 
+   Sqrt of -394729834.23472393 is NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math18.out b/test/tests/exslt-gold/math/math18.out
new file mode 100644
index 0000000..e0ef494
--- /dev/null
+++ b/test/tests/exslt-gold/math/math18.out
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+      Tan value of zero is:
+      0<br/>
+      Tan value of nzero is:
+      0<br/>
+      Tan value of num1 is:
+      -2.244075781526737<br/>
+      Tan value of num2 is:
+      0.0012548470688505506<br/>
+      Tan value of temp1 is:
+      -0.8714479827243188<br/>
+      Tan value of temp2 is:
+      -0.6483466238335517<br/>
+      Tan value of rad1 is:
+      1.5574077246549023<br/>
+      Tan value of rad2 is:
+      -0.13352640702153587<br/>
+      Tan value of rad3 is:
+      0.2585399791001433<br/>
+      Tan value of rad4 is:
+      -1.229563415678552<br/>
+      Tan value of input1 is:
+      -2.386158028105279<br/>
+      Tan value of input2 is:
+      NaN<br/>
+      Tan value of input3 is:
+      NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math2.out b/test/tests/exslt-gold/math/math2.out
new file mode 100644
index 0000000..689299d
--- /dev/null
+++ b/test/tests/exslt-gold/math/math2.out
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+      ArcCos value of zero is:
+      1.5707963267948966<br/>
+      ArcCos value of nzero is:
+      1.5707963267948966<br/>
+      ArcCos value of num1 is:
+      NaN<br/>
+      ArcCos value of num2 is:
+      NaN<br/>
+      ArcCos value of temp1 is:
+      NaN<br/>
+      ArcCos value of temp2 is:
+      NaN<br/>
+      ArcCos value of rad1 is:
+      0<br/>
+      ArcCos value of rad2 is:
+      NaN<br/>
+      ArcCos value of rad3 is:
+      1.3150164396623272<br/>
+      ArcCos value of rad4 is:
+      2.663773756337589<br/>
+      ArcCos value of input1 number is:
+      NaN<br/>
+      ArcCos value of input2 number is:
+      NaN<br/>
+      ArcCos value of input3 number is:
+      NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math3.out b/test/tests/exslt-gold/math/math3.out
new file mode 100644
index 0000000..3929364
--- /dev/null
+++ b/test/tests/exslt-gold/math/math3.out
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+      ArcSin value of zero is:
+      0<br/>
+      ArcSin value of nzero is:
+      0<br/>
+      ArcSin value of num1 is:
+      NaN<br/>
+      ArcSin value of num2 is:
+      NaN<br/>
+      ArcSin value of temp1 is:
+      NaN<br/>
+      ArcSin value of temp2 is:
+      NaN<br/>
+      ArcSin value of rad1 is:
+      1.5707963267948966<br/>
+      ArcSin value of rad2 is:
+      NaN<br/>
+      ArcSin value of rad3 is:
+      0.2557798871325695<br/>
+      ArcSin value of rad4 is:
+      -1.0929774295426924<br/>
+      ArcSin value of input1 number is:
+      NaN<br/>
+      ArcSin value of input2 number is:
+      NaN<br/>
+      ArcSin value of input3 number is:
+      NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math4.out b/test/tests/exslt-gold/math/math4.out
new file mode 100644
index 0000000..fe78525
--- /dev/null
+++ b/test/tests/exslt-gold/math/math4.out
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+
+      ArcTan value of zero is:
+      0<br/>
+      ArcTan value of nzero is:
+      0<br/>
+      ArcTan value of num1 is:
+      1.1051406883644943<br/>
+      ArcTan value of num2 is:
+      1.2627426592770932<br/>
+      ArcTan value of temp1 is:
+      -1.4288992721907328<br/>
+      ArcTan value of temp2 is:
+      -1.4711275752937356<br/>
+      ArcTan value of rad1 is:
+      0.7853981633974483<br/>
+      ArcTan value of rad2 is:
+      1.5308176396716067<br/>
+      ArcTan value of rad3 is:
+      0.2478001933774758<br/>
+      ArcTan value of rad4 is:
+      -0.726145569734016<br/>
+      ArcTan value of input1 number is:
+      1.5707963267947052<br/>
+      ArcTan value of input2 number is:
+      NaN<br/>
+      ArcTan value of input3 number is:
+      1.5707963267948966</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math5.out b/test/tests/exslt-gold/math/math5.out
new file mode 100644
index 0000000..d195106
--- /dev/null
+++ b/test/tests/exslt-gold/math/math5.out
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+
+      ArcTan2 value of zero is:
+      0<br/>
+      ArcTan2 value of nzero is:
+      0<br/>
+      ArcTan2 value of num1 is:
+      1.1051406883644943<br/>
+      ArcTan2 value of num2 is:
+      1.2627426592770932<br/>
+      ArcTan2 value of temp1 is:
+      -1.4288992721907328<br/>
+      ArcTan2 value of temp2 is:
+      -1.4711275752937356<br/>
+      ArcTan2 value of rad1 is:
+      0.7853981633974483<br/>
+      ArcTan2 value of rad2 is:
+      1.5308176396716067<br/>
+      ArcTan2 value of rad3 is:
+      0.2478001933774758<br/>
+      ArcTan2 value of rad4 is:
+      -0.726145569734016<br/>
+      ArcTan2 value of input1 number is:
+      1.5707963267947052<br/>
+      ArcTan2 value of input2 number is:
+      NaN<br/>
+      ArcTan2 value of input3 number is:
+      1.5707963267948966</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math6.out b/test/tests/exslt-gold/math/math6.out
new file mode 100644
index 0000000..b8591c6
--- /dev/null
+++ b/test/tests/exslt-gold/math/math6.out
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?><group1>
+      These are for PI:
+      NaN, 
+      3.1, 
+      3.14, 
+      3.141, 
+      3.1415926535, 
+      3.141592653589793, 
+      0, 
+      0, 
+      NaN, 
+      0</group1><group2>
+      These are for E:
+      NaN, 
+      2.7, 
+      2.71, 
+      2.718, 
+      2.7182818284, 
+      2.718281828459045, 
+      2.718281828459045, 
+      0, 
+      NaN, 
+      0, 
+
+   </group2><group3>
+      These are for SQRRT2
+      NaN, 
+      1.4, 
+      1.41, 
+      1.414, 
+      1.4142135623, 
+      1.4142135623730951, 
+      1.4142135623730951, 
+      0, 
+      NaN, 
+      0, 
+
+   </group3><group4>
+      These are for LN2
+      NaN, 
+      0.6, 
+      0.69, 
+      0.693, 
+      0.6931471805, 
+      0.6931471805599453, 
+      0.6931471805599453, 
+      0, 
+      NaN, 
+      0, 
+
+   </group4><group5>
+      These are for LN10
+      NaN, 
+      2.3, 
+      2.3, 
+      2.302, 
+      2.3025850929, 
+      0, 
+      0, 
+      0, 
+      NaN, 
+      0, 
+
+   </group5><group6>
+      These are for LOG2E
+      NaN, 
+      1.4, 
+      1.44, 
+      1.442, 
+      1.4426950408, 
+      0, 
+      0, 
+      0, 
+      NaN, 
+      0, 
+
+   </group6><group7>
+      These are for SQRT1_2
+      NaN, 
+      0.7, 
+      0.7, 
+      0.707, 
+      0.7071067811, 
+      0, 
+      0, 
+      0, 
+      NaN, 
+      0, 
+
+   </group7>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math7.out b/test/tests/exslt-gold/math/math7.out
new file mode 100644
index 0000000..07f7f38
--- /dev/null
+++ b/test/tests/exslt-gold/math/math7.out
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+      Cos value of zero is:
+      1<br/> 
+      Cos value of nzero is:
+      1<br/> 
+      Cos value of num1 is:
+      -0.4070332066592655<br/> 
+      Cos value of num2 is:
+      -0.9999992126803468<br/> 
+      Cos value of temp1 is:
+      0.7539022543433046<br/> 
+      Cos value of temp2 is:
+      -0.8390769692456075<br/> 
+      Cos value of rad1 is: 
+      0.5403023058681398<br/> 
+      Cos value of rad2 is:
+      0.9912028118634736<br/> 
+      Cos value of rad3 is:
+      0.9681658508435709<br/> 
+      Cos value of rad4 is:
+      0.6309649102090216<br/> 
+      Cos value of input1 number is:
+      -0.3865140198680434<br/> 
+      Cos value of input2 number is:
+      NaN<br/> 
+      Cos value of input3 number is:
+      NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math8.out b/test/tests/exslt-gold/math/math8.out
new file mode 100644
index 0000000..d858f8e
--- /dev/null
+++ b/test/tests/exslt-gold/math/math8.out
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+     This is for testing the Euler constant to the power of 5:
+     148.41315910257663
+     This is for testing the Euler constant to the power of 0:
+     1
+     This is for testing the Euler constant to the power of -3:
+     0.04978706836786393
+     This is for testing the Euler constant to the power of NaN:
+     NaN
+     This is testing Euler constant to the power of 5223849703457:
+     Infinity
+     This is testing Euler constant to the power of NaN:
\ No newline at end of file
diff --git a/test/tests/exslt-gold/math/math9.out b/test/tests/exslt-gold/math/math9.out
new file mode 100644
index 0000000..b3c713f
--- /dev/null
+++ b/test/tests/exslt-gold/math/math9.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+     This is for testing the node-set of doc/b with highest value in it.  That tree would be:
+     25
+     This is for testing the node-set of b1/b with highest value in it.  That tree would be:
+     64
+     This is for testing the node-set of b2/b with highest value in it.  That tree would be:
+     1230
+     This is for testing the node-set of b3/b with highest value in it.  That tree would be:
+     NaN
+     This is for testing the node-set of //b with highest value in it.  That tree would be:
+     1230
+     
+     This is for testing the node-set of c with highest value in it.  That tree would be:
+     NaN
+     This is for testing the node-set of d with highest value in it.  That tree would be:
+     NaN</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/sets/sets1.out b/test/tests/exslt-gold/sets/sets1.out
new file mode 100644
index 0000000..4e05ab0
--- /dev/null
+++ b/test/tests/exslt-gold/sets/sets1.out
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?><out xmlns:set="http://exslt.org/sets">
+    Containing i and no e:
+    Paris;
+    Madrid;
+    Calais;
+     
+    Containing e and no i:
+    Barcelona;
+    Hannover;
+    
+    Containing B and no i and no e:
+    Bonn;
+    
+    
+    
+
+    Containing i:
+    Paris;
+    Madrid;
+    Vienna;
+    Calais;
+    Berlin;
+    
+    Containing B:
+    Barcelona;
+    Bonn;
+    Berlin;
+    
+    Empty set:
+    </out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/sets/sets2.out b/test/tests/exslt-gold/sets/sets2.out
new file mode 100644
index 0000000..37e065d
--- /dev/null
+++ b/test/tests/exslt-gold/sets/sets2.out
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?><out xmlns:set="http://exslt.org/sets"><all-countries>:
+    France;
+    Spain;
+    Austria;
+    Spain;
+    Austria;
+    Germany;
+    France;
+    Germany;
+    France;
+    Germany;
+    Italy;
+    China;
+    Norway;
+    </all-countries>:
+  <distinct-countries>:  
+    France;
+    Spain;
+    Austria;
+    Germany;
+    Italy;
+    China;
+    Norway;
+    </distinct-countries></out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/sets/sets3.out b/test/tests/exslt-gold/sets/sets3.out
new file mode 100644
index 0000000..03d7245
--- /dev/null
+++ b/test/tests/exslt-gold/sets/sets3.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?><out xmlns:set="http://exslt.org/sets">
+    Test has-same-node() between two intersecting sets:
+    OK;
+    Test has-same-node() between two non-intersecting sets:
+    OK;
+    Test has-same-node() between two identical sets of namespace nodes:
+    OK;        
+  </out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/sets/sets4.out b/test/tests/exslt-gold/sets/sets4.out
new file mode 100644
index 0000000..b8cc2a4
--- /dev/null
+++ b/test/tests/exslt-gold/sets/sets4.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><out xmlns:set="http://exslt.org/sets">
+    Containing i and e:
+    Vienna;
+    Berlin;
+         
+    
+    
+    Empty set:
+         
+    Empty set:
+    </out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/sets/sets5.out b/test/tests/exslt-gold/sets/sets5.out
new file mode 100644
index 0000000..1c2b3cf
--- /dev/null
+++ b/test/tests/exslt-gold/sets/sets5.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?><out>;
+      6;
+      1;
+      3;
+      0;
+      8;
+      0;
+      0;
+    </out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/sets/sets6.out b/test/tests/exslt-gold/sets/sets6.out
new file mode 100644
index 0000000..1444fdf
--- /dev/null
+++ b/test/tests/exslt-gold/sets/sets6.out
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?><out>;
+      4;
+      6;
+      7;
+      8;
+      0;
+      0;
+    </out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings1.out b/test/tests/exslt-gold/strings/strings1.out
new file mode 100644
index 0000000..c6a503a
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings1.out
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+   Left-justified with padding longer than name:
+   Dmitry Hayes -
+   Dmitry Hayes-X-O-X-O-X-O-X-O-X-O-X-O-X-O-X-O 
+   Right-justified with padding longer than name:
+   Matthew Hoyt -
+   nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnMatthew Hoyt 
+   Centered with padding longer than name:
+   June Ng -
+   DDDDDDDDDDDDDDDDDDJune NgDDDDDDDDDDDDDDDDDDD 
+   Left-justified with padding shorter than name:
+   David Bertoni -
+   David 
+   Right-justified with null padding than name:
+   Joseph Kesselman -
+    
+   Default justification is left-justified:
+   Me Too -
+   Me Tooooooooooooooooooooooooooo</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings10.out b/test/tests/exslt-gold/strings/strings10.out
new file mode 100644
index 0000000..c33024e
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings10.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>http://www.example.com/my%20r%C3%A9sum%C3%A9</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings11.out b/test/tests/exslt-gold/strings/strings11.out
new file mode 100644
index 0000000..9df8374
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings11.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+	<a href="http://www.example.com/lookup?C%3A%5Chome%5Cmhoyt%5Cmy%20r%C3%A9sum%C3%A9.doc">My Résumé</a>
+</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings2.out b/test/tests/exslt-gold/strings/strings2.out
new file mode 100644
index 0000000..ddc50bf
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings2.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+   Concatentating all a/* nodes from the input file gives us:
+   Dmitry HayesMatthew HoytDave Bertoni
+    June Ng
+    Henry Zongaro
+    Joanne Tong
+    Morris Kwan
+  <br/>
+   Concatenating a/c/d nodes from my input file gives us:
+   June NgHenry ZongaroJoanne Tong</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings3.out b/test/tests/exslt-gold/strings/strings3.out
new file mode 100644
index 0000000..4a7d4b4
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings3.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><out>yZaByZaByZaByZaByZaBDmitry HayesyZaByZaByZaByZaByZaBMatthew HoytyZaByZaByZaByZaByZaBDave BertoniyZaByZaByZaByZaByZaB
+    June Ng
+    Henry Zongaro
+    Joanne Tong
+  XnXnXnXnXnXnXnXnXnXnJune NgXnXnXnXnXnXnXnXnXnXnHenry ZongaroXnXnXnXnXnXnXnXnXnXnJoanne Tong</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings5.out b/test/tests/exslt-gold/strings/strings5.out
new file mode 100644
index 0000000..5485c31
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings5.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>a_^_é_中_𐀄</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings6.out b/test/tests/exslt-gold/strings/strings6.out
new file mode 100644
index 0000000..41e2165
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings6.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out><test><desc>No encoding specified</desc><result>http://www.example.com/my résumé.html</result></test><test><desc>UTF-8 specified</desc><result>http://www.example.com/my résumé.html</result></test><test><desc>Utf-8 specified</desc><result>http://www.example.com/my résumé.html</result></test><test><desc>ISO-8859-1 specified</desc><result/></test></out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings7.out b/test/tests/exslt-gold/strings/strings7.out
new file mode 100644
index 0000000..8700b46
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings7.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>C:\home\mhoyt\my résumé.doc</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings8.out b/test/tests/exslt-gold/strings/strings8.out
new file mode 100644
index 0000000..d967a68
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings8.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>a_%5E_%C3%A9_%E4%B8%AD_%F0%90%80%84</out>
\ No newline at end of file
diff --git a/test/tests/exslt-gold/strings/strings9.out b/test/tests/exslt-gold/strings/strings9.out
new file mode 100644
index 0000000..52bff12
--- /dev/null
+++ b/test/tests/exslt-gold/strings/strings9.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out><test><desc>No encoding specified</desc><result>http://www.example.com/my%20%20r%C3%A9sum%C3%A9</result></test><test><desc> UTF-8 specified</desc><result>http://www.example.com/my%20%20r%C3%A9sum%C3%A9</result></test><test><desc>Utf-8 specified</desc><result>http://www.example.com/my%20%20r%C3%A9sum%C3%A9</result></test><test><desc>ISO-8859-1 specified</desc><result/></test></out>
\ No newline at end of file
diff --git a/test/tests/exslt/common/common1.xml b/test/tests/exslt/common/common1.xml
new file mode 100644
index 0000000..07fb989
--- /dev/null
+++ b/test/tests/exslt/common/common1.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+
+<doc>
+  <one/>
+  <two/>
+  <three/>
+  <four/>
+  <five/>
+  <six/>
+  <seven>
+    <eight/>
+    <nine/>
+    <ten/>
+  </seven>
+</doc>
diff --git a/test/tests/exslt/common/common1.xsl b/test/tests/exslt/common/common1.xsl
new file mode 100644
index 0000000..ac82b63
--- /dev/null
+++ b/test/tests/exslt/common/common1.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:common="http://exslt.org/common" >
+
+<!-- Test exslt:node-set applied to a result tree fragment -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="count(common:node-set(//*))" />
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/common/common2.xml b/test/tests/exslt/common/common2.xml
new file mode 100644
index 0000000..1e01607
--- /dev/null
+++ b/test/tests/exslt/common/common2.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+
+<doc>
+  <a>
+    <b>
+      <c>
+        <d/>
+        <e/>
+        <f/>
+      </c>
+    </b>
+  </a>
+</doc>
diff --git a/test/tests/exslt/common/common2.xsl b/test/tests/exslt/common/common2.xsl
new file mode 100644
index 0000000..2da2231
--- /dev/null
+++ b/test/tests/exslt/common/common2.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:common="http://exslt.org/common" 
+exclude-result-prefixes="common">
+
+<!-- Test exslt:node-set applied to a result tree fragment -->
+
+<xsl:template match="doc">
+  <out>
+    <xsl:value-of select="count(common:node-set(//*))"/>    
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/common/common3.xml b/test/tests/exslt/common/common3.xml
new file mode 100644
index 0000000..04e42ea
--- /dev/null
+++ b/test/tests/exslt/common/common3.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?> 
+
+<doc>
+
+</doc>
diff --git a/test/tests/exslt/common/common3.xsl b/test/tests/exslt/common/common3.xsl
new file mode 100644
index 0000000..4989188
--- /dev/null
+++ b/test/tests/exslt/common/common3.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:exslt="http://exslt.org/common" >
+
+<!-- Test exslt:object-type -->
+
+<xsl:variable name="tree">
+<a>
+  <b>
+    <c>
+      <d/>
+      <e/>
+    </c>
+  </b>
+</a>
+</xsl:variable>
+
+<xsl:variable name="string" select="'fred'"/>
+<xsl:variable name="number" select="93.7"/>
+<xsl:variable name="boolean" select="true()"/>
+<xsl:variable name="node-set" select="//*"/>
+
+<xsl:template match="/">
+  <out>:
+    <xsl:value-of select="exslt:object-type($string)"/>;
+    <xsl:value-of select="exslt:object-type($number)"/>;
+    <xsl:value-of select="exslt:object-type($boolean)"/>;
+    <xsl:value-of select="exslt:object-type($node-set)"/>;
+    <xsl:value-of select="exslt:object-type($tree)"/>;
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/datetime/datetime1.xml b/test/tests/exslt/datetime/datetime1.xml
new file mode 100644
index 0000000..3d4c85e
--- /dev/null
+++ b/test/tests/exslt/datetime/datetime1.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+   <today>2005/03/16</today>
+   <bday1>1971/05/29</bday1>
+   <xmas>2000/12/25</xmas>
+   <dday>1988-11-11T11:00:00</dday>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/datetime/datetime1.xsl b/test/tests/exslt/datetime/datetime1.xsl
new file mode 100644
index 0000000..ddc634c
--- /dev/null
+++ b/test/tests/exslt/datetime/datetime1.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:date="http://exslt.org/dates-and-times"
+                extension-element-prefixes="date">
+
+<!-- Test date:date-time -->
+
+<xsl:template match="/">
+<out>
+   The system time is:
+   <xsl:value-of select="date:date-time()"/>
+</out>
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/dynamic/dynamic1.xml b/test/tests/exslt/dynamic/dynamic1.xml
new file mode 100644
index 0000000..5697e36
--- /dev/null
+++ b/test/tests/exslt/dynamic/dynamic1.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"  standalone="yes"?>
+<doc>
+   <item id="book">
+      <book>
+         <title>Romeo and Juliet</title>
+      </book>
+      <author>
+         <firstname>William</firstname>
+         <lastname>Shakespeare</lastname>
+      </author>
+   </item>
+   <item id="magazine">
+      <magazine>
+         <title>People</title>
+      </magazine>
+      <edition subcat1="month" subcat2="year">
+         <month>June</month>
+         <year>2004</year>
+      </edition>
+   </item>
+   <item id="magazine">
+      <magazine>
+         <title>National Geographic</title>
+      </magazine>
+      <edition subcat1="month" subcat2="year">
+         <month>May</month>
+         <year>1999</year>
+      </edition>
+   </item>
+   <item id="DVD">
+      <DVD>
+         <title>Elmo's First Day at School</title>
+      </DVD>
+      <rating cat1="category" lang="language" subt="subtitles">
+         <category>Childrens</category>
+         <language>English</language>
+         <subtitles>yes</subtitles>
+      </rating>
+   </item>
+   <item id="book">
+      <book orig="yes">
+         <title>Farewell to Arms</title>
+      </book>
+      <author>
+         <firstname>Ernest</firstname>
+         <lastname>Hemingway</lastname>
+      </author>
+   </item>
+   <item id="book">
+      <book orig="yes">
+         <title>Superfudge</title>
+      </book>
+      <author>
+         <firstname>Judy</firstname>
+         <lastname>Blume</lastname>
+      </author>
+   </item>
+   <item id="DVD">
+      <DVD>
+         <title>Cinderella</title>
+      </DVD>
+      <rating cat1="category" lang="language" subt="subtitles">
+         <category>Childrens</category>
+         <language>French</language>
+         <subtitles>no</subtitles>
+      </rating>
+   </item>
+   <item id="magazine">
+      <magazine>
+         <title>Canadian House and Home</title>
+      </magazine>
+      <edition subcat1="month" subcat2="year">
+         <month>January</month>
+         <year>2001</year>
+      </edition>
+   </item>
+   <item id="DVD">
+      <DVD>
+         <title>World War I &amp; II</title>
+      </DVD>
+      <rating cat1="category" lang="language" subt="subtitles">
+         <category>History</category>
+         <language>German</language>
+         <subtitles>no</subtitles>
+      </rating>
+   </item>
+   <item id="book">
+      <book orig="no">
+         <title>World Maps</title>
+      </book>
+      <author>
+         <firstname>J.P. </firstname>
+         <lastname>Douglas</lastname>
+      </author>
+   </item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/dynamic/dynamic1.xsl b/test/tests/exslt/dynamic/dynamic1.xsl
new file mode 100644
index 0000000..9393ce9
--- /dev/null
+++ b/test/tests/exslt/dynamic/dynamic1.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+        xmlns:dyn="http://exslt.org/dynamic">
+
+<!-- Test dyn:evaluate applied to a result tree fragment -->
+
+<xsl:template match="doc">
+    <xsl:variable name="category" select="'item'"/>
+    <xsl:variable name="query" select="'book/title'"/>    
+    <out>
+        <xsl:for-each select="dyn:evaluate(concat($category,'/',$query))">
+            <booktitle>
+                <xsl:value-of select="."/>
+            </booktitle>
+        </xsl:for-each>
+    </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math1.xml b/test/tests/exslt/math/math1.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math1.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math1.xsl b/test/tests/exslt/math/math1.xsl
new file mode 100644
index 0000000..b249a03
--- /dev/null
+++ b/test/tests/exslt/math/math1.xsl
@@ -0,0 +1,67 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:abs() -->
+
+<xsl:variable name="zero" select="0"/>
+<xsl:variable name="nzero" select="-0"/>
+<xsl:variable name="num1" select="1.99"/>
+<xsl:variable name="num2" select="3.1428475"/>
+<xsl:variable name="temp1" select="-7"/>
+<xsl:variable name="temp2" select="-9.99999"/>
+<xsl:variable name="rad1" select="1.0"/>
+<xsl:variable name="rad2" select="25"/>
+<xsl:variable name="rad3" select="0.253"/>
+<xsl:variable name="rad4" select="-0.888"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+
+<xsl:template match="/">
+   <out>
+      Absolute value of zero is:
+      <xsl:value-of select="math:abs($zero)"/><br/>
+      Absolute value of nzero is:
+      <xsl:value-of select="math:abs($nzero)"/><br/>
+      Absolute value of num1 is:
+      <xsl:value-of select="math:abs($num1)"/><br/>
+      Absolute value of num2 is:
+      <xsl:value-of select="math:abs($num2)"/><br/>
+      Absolute value of temp1 is:
+      <xsl:value-of select="math:abs($temp1)"/><br/>
+      Absolute value of temp2 is:
+      <xsl:value-of select="math:abs($temp2)"/><br/>
+      Absolute value of input1 number is:
+      <xsl:value-of select="math:abs($input1)"/><br/>
+      Absolute value of input2 number is:
+      <xsl:value-of select="math:abs($input2)"/><br/>
+      Absolute value of input3 number is:
+      <xsl:value-of select="math:abs($input3)"/>
+            
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math10.xml b/test/tests/exslt/math/math10.xml
new file mode 100644
index 0000000..c6332d5
--- /dev/null
+++ b/test/tests/exslt/math/math10.xml
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<aaa att="no" foo="nope" val="yes">1</aaa>
+<bbb>2</bbb>
+<ccc>3</ccc>
+<ddd>4</ddd>
+<eee>5</eee>
+<fff>6</fff>
+<ggg>7</ggg>
+<hhh>8</hhh>
+<iii>9</iii>
+<jjj>10</jjj>
+<kkk>11</kkk>
+<lll>12</lll>
+<mmm>13</mmm>
+<nnn>14</nnn>
+<ooo>15</ooo>
+<ppp>16</ppp>
+<qqq>17</qqq>
+<rrr>18</rrr>
+<sss>19</sss>
+<ttt>20</ttt>
+<uuu>21</uuu>
+<vvv>22</vvv>
+<www>23</www>
+<xxx>24</xxx>
+<yyy>25</yyy>
+<aab>26</aab>
+<bbb>27</bbb>
+<ccb>28</ccb>
+<ddb>29</ddb>
+<eeb>30</eeb>
+<ffb>31</ffb>
+<ggb>32</ggb>
+<hhb>33</hhb>
+<iib>34</iib>
+<jjb>35</jjb>
+<kkb>36</kkb>
+<llb>37</llb>
+<mmb>38</mmb>
+<nnb>39</nnb>
+<oob>40</oob>
+<ppb>41</ppb>
+<qqb>42</qqb>
+<rrb>43</rrb>
+<ssb>44</ssb>
+<ttb>45</ttb>
+<uub>46</uub>
+<vvb>47</vvb>
+<wwb>48</wwb>
+<xxb>49</xxb>
+<yyb>50</yyb>
+<aac>51</aac>
+<bbc>52</bbc>
+<ccc>53</ccc>
+<ddc>54</ddc>
+<eec>55</eec>
+<ffc>56</ffc>
+<ggc>57</ggc>
+<hhc>58</hhc>
+<iic>59</iic>
+<jjc>60</jjc>
+<kkc>61</kkc>
+<llc>62</llc>
+<mmc>63</mmc>
+<nnc>64</nnc>
+<ooc>65</ooc>
+<ppc>66</ppc>
+<qqc>67</qqc>
+<rrc>68</rrc>
+<ssc>69</ssc>
+<ttc>70</ttc>
+<uuc>71</uuc>
+<vvc>72</vvc>
+<wwc>73</wwc>
+<xxc>74</xxc>
+<yyc>75</yyc>
+<aad>76</aad>
+<bbd>77</bbd>
+<ccd>78</ccd>
+<ddd>79</ddd>
+<eed>80</eed>
+<ffd>81</ffd>
+<ggd>82</ggd>
+<hhd>83</hhd>
+<iid>84</iid>
+<jjd>85</jjd>
+<kkd>86</kkd>
+<lld>87</lld>
+<mmd>88</mmd>
+<nnd>89</nnd>
+<ood>90</ood>
+<ppd>91</ppd>
+<qqd>92</qqd>
+<rrd>93</rrd>
+<ssd>94</ssd>
+<ttd>95</ttd>
+<uud>96</uud>
+<vvd>97</vvd>
+<wwd>98</wwd>
+<xxd>99</xxd>
+<yyd century="yes">100</yyd>
+<aae>101</aae>
+<bbe>102</bbe>
+<cce>103</cce>
+<dde>104</dde>
+<eee>105</eee>
+<ffe>106</ffe>
+<gge>107</gge>
+<hhe>108</hhe>
+<iie>109</iie>
+<jje>110</jje>
+<kke>111</kke>
+<lle>112</lle>
+<mme>113</mme>
+<nne>114</nne>
+<ooe>115</ooe>
+<ppe>116</ppe>
+<qqe>117</qqe>
+<rre>118</rre>
+<sse>119</sse>
+<tte>120</tte>
+<uue>121</uue>
+<vve>122</vve>
+<wwe>123</wwe>
+<xxe>124</xxe>
+<yye>125</yye>
+<aaf>126</aaf>
+<bbf>127</bbf>
+<ccf>128</ccf>
+<ddf>129</ddf>
+<eef>130</eef>
+<fff>131</fff>
+<ggf>132</ggf>
+<hhf>133</hhf>
+<iif>134</iif>
+<jjf>135</jjf>
+<kkf>136</kkf>
+<llf>137</llf>
+<mmf>138</mmf>
+<nnf>139</nnf>
+<oof>140</oof>
+<ppf>141</ppf>
+<qqf>142</qqf>
+<rrf>143</rrf>
+<ssf>144</ssf>
+<ttf>145</ttf>
+<uuf>146</uuf>
+<vvf>147</vvf>
+<wwf>148</wwf>
+<xxf>149</xxf>
+<yyf>150</yyf>
+<aag>151</aag>
+<bbg>152</bbg>
+<ccg>153</ccg>
+<ddg>154</ddg>
+<eeg>155</eeg>
+<ffg>156</ffg>
+<ggg>157</ggg>
+<hhg>158</hhg>
+<iig>159</iig>
+<jjg>160</jjg>
+<kkg>161</kkg>
+<llg>162</llg>
+<mmg>163</mmg>
+<nng>164</nng>
+<oog>165</oog>
+<ppg>166</ppg>
+<qqg>167</qqg>
+<rrg>168</rrg>
+<ssg>169</ssg>
+<ttg>170</ttg>
+<uug>171</uug>
+<vvg>172</vvg>
+<wwg>173</wwg>
+<xxg>174</xxg>
+<yyg>175</yyg>
+<aah>176</aah>
+<bbh>177</bbh>
+<cch>178</cch>
+<ddh>179</ddh>
+<eeh>180</eeh>
+<ffh>181</ffh>
+<ggh>182</ggh>
+<hhh>183</hhh>
+<iih>184</iih>
+<jjh>185</jjh>
+<kkh>186</kkh>
+<llh>187</llh>
+<mmh>188</mmh>
+<nnh>189</nnh>
+<ooh>190</ooh>
+<pph>191</pph>
+<qqh>192</qqh>
+<rrh>193</rrh>
+<ssh>194</ssh>
+<tth>195</tth>
+<uuh>196</uuh>
+<vvh>197</vvh>
+<wwh>198</wwh>
+<xxh>199</xxh>
+<yyh century="yes">200</yyh>
+<aai>201</aai>
+<bbi>202</bbi>
+<cci>203</cci>
+<ddi>204</ddi>
+<eei>205</eei>
+<ffi>206</ffi>
+<ggi>207</ggi>
+<hhi>208</hhi>
+<iii>209</iii>
+<jji>210</jji>
+<kki>211</kki>
+<lli>212</lli>
+<mmi>213</mmi>
+<nni>214</nni>
+<ooi>215</ooi>
+<ppi>216</ppi>
+<qqi>217</qqi>
+<rri>218</rri>
+<ssi>219</ssi>
+<tti>220</tti>
+<uui>221</uui>
+<vvi>222</vvi>
+<wwi>223</wwi>
+<xxi>224</xxi>
+<yyi>225</yyi>
+<aaj>226</aaj>
+<bbj>227</bbj>
+<ccj>228</ccj>
+<ddj>229</ddj>
+<eej>230</eej>
+<ffj>231</ffj>
+<ggj>232</ggj>
+<hhj>233</hhj>
+<iij>234</iij>
+<jjj>235</jjj>
+<kkj>236</kkj>
+<llj>237</llj>
+<mmj>238</mmj>
+<nnj>239</nnj>
+<ooj>240</ooj>
+<ppj>241</ppj>
+<qqj>242</qqj>
+<rrj>243</rrj>
+<ssj>244</ssj>
+<ttj>245</ttj>
+<uuj>246</uuj>
+<vvj>247</vvj>
+<wwj>248</wwj>
+<xxj>249</xxj>
+<yyj>250</yyj>
+<aak>251</aak>
+<bbk>252</bbk>
+<cck>253</cck>
+<ddk>254</ddk>
+<eek>255</eek>
+<ffk>256</ffk>
+<ggk>257</ggk>
+<hhk>258</hhk>
+<iik>259</iik>
+<jjk>260</jjk>
+<kkk>261</kkk>
+<llk>262</llk>
+<mmk>263</mmk>
+<nnk>264</nnk>
+<ook>265</ook>
+<ppk>266</ppk>
+<qqk>267</qqk>
+<rrk>268</rrk>
+<ssk>269</ssk>
+<ttk>270</ttk>
+<uuk>271</uuk>
+<vvk>272</vvk>
+<wwk>273</wwk>
+<xxk>274</xxk>
+<yyk>275</yyk>
+<aal>276</aal>
+<bbl>277</bbl>
+<ccl>278</ccl>
+<ddl>279</ddl>
+<eel>280</eel>
+<ffl>281</ffl>
+<ggl>282</ggl>
+<hhl>283</hhl>
+<iil>284</iil>
+<jjl>285</jjl>
+<kkl>286</kkl>
+<lll>287</lll>
+<mml>288</mml>
+<nnl>289</nnl>
+<ool>290</ool>
+<ppl>291</ppl>
+<qql>292</qql>
+<rrl>293</rrl>
+<ssl>294</ssl>
+<ttl>295</ttl>
+<uul>296</uul>
+<vvl>297</vvl>
+<wwl>298</wwl>
+<xxl>299</xxl>
+<yyl century="yes">300</yyl>
+<aam>301</aam>
+<bbm>302</bbm>
+<ccm>303</ccm>
+<ddm>304</ddm>
+<eem>305</eem>
+<ffm>306</ffm>
+<ggm>307</ggm>
+<hhm>308</hhm>
+<iim>309</iim>
+<jjm>310</jjm>
+<kkm>311</kkm>
+<llm>312</llm>
+<mmm>313</mmm>
+<nnm>314</nnm>
+<oom>315</oom>
+<ppm>316</ppm>
+<qqm>317</qqm>
+<rrm>318</rrm>
+<ssm>319</ssm>
+<ttm>320</ttm>
+<uum>321</uum>
+<vvm>322</vvm>
+<wwm>323</wwm>
+<xxm>324</xxm>
+<yym>325</yym>
+<aan>326</aan>
+<bbn>327</bbn>
+<ccn>328</ccn>
+<ddn>329</ddn>
+<een>330</een>
+<ffn>331</ffn>
+<ggn>332</ggn>
+<hhn>333</hhn>
+<iin>334</iin>
+<jjn>335</jjn>
+<kkn>336</kkn>
+<lln>337</lln>
+<mmn>338</mmn>
+<nnn>339</nnn>
+<oon>340</oon>
+<ppn>341</ppn>
+<qqn>342</qqn>
+<rrn>343</rrn>
+<ssn>344</ssn>
+<ttn>345</ttn>
+<uun>346</uun>
+<vvn>347</vvn>
+<wwn>348</wwn>
+<xxn>349</xxn>
+<yyn>350</yyn>
+<aao>351</aao>
+<bbo>352</bbo>
+<cco>353</cco>
+<ddo>354</ddo>
+<eeo>355</eeo>
+<ffo>356</ffo>
+<ggo>357</ggo>
+<hho>358</hho>
+<iio>359</iio>
+<jjo>360</jjo>
+<kko>361</kko>
+<llo>362</llo>
+<mmo>363</mmo>
+<nno>364</nno>
+<ooo>365</ooo>
+<ppo>366</ppo>
+<qqo>367</qqo>
+<rro>368</rro>
+<sso>369</sso>
+<tto>370</tto>
+<uuo>371</uuo>
+<vvo>372</vvo>
+<wwo>373</wwo>
+<xxo>374</xxo>
+<yyo>375</yyo>
+<aap>376</aap>
+<bbp>377</bbp>
+<ccp>378</ccp>
+<ddp>379</ddp>
+<eep>380</eep>
+<ffp>381</ffp>
+<ggp>382</ggp>
+<hhp>383</hhp>
+<iip>384</iip>
+<jjp>385</jjp>
+<kkp>386</kkp>
+<llp>387</llp>
+<mmp>388</mmp>
+<nnp>389</nnp>
+<oop>390</oop>
+<ppp>391</ppp>
+<qqp>392</qqp>
+<rrp>393</rrp>
+<ssp>394</ssp>
+<ttp>395</ttp>
+<uup>396</uup>
+<vvp>397</vvp>
+<wwp>398</wwp>
+<xxp>399</xxp>
+<yyp century="yes">400</yyp>
+<aaq>401</aaq>
+<bbq>402</bbq>
+<ccq>403</ccq>
+<ddq>404</ddq>
+<eeq>405</eeq>
+<ffq>406</ffq>
+<ggq>407</ggq>
+<hhq>408</hhq>
+<iiq>409</iiq>
+<jjq>410</jjq>
+<kkq>411</kkq>
+<llq>412</llq>
+<mmq>413</mmq>
+<nnq>414</nnq>
+<ooq>415</ooq>
+<ppq>416</ppq>
+<qqq>417</qqq>
+<rrq>418</rrq>
+<ssq>419</ssq>
+<ttq>420</ttq>
+<uuq>421</uuq>
+<vvq>422</vvq>
+<wwq>423</wwq>
+<xxq>424</xxq>
+<yyq>425</yyq>
+<aar>426</aar>
+<bbr>427</bbr>
+<ccr>428</ccr>
+<ddr>429</ddr>
+<eer>430</eer>
+<ffr>431</ffr>
+<ggr>432</ggr>
+<hhr>433</hhr>
+<iir>434</iir>
+<jjr>435</jjr>
+<kkr>436</kkr>
+<llr>437</llr>
+<mmr>438</mmr>
+<nnr>439</nnr>
+<oor>440</oor>
+<ppr>441</ppr>
+<qqr>442</qqr>
+<rrr>443</rrr>
+<ssr>444</ssr>
+<ttr>445</ttr>
+<uur>446</uur>
+<vvr>447</vvr>
+<wwr>448</wwr>
+<xxr>449</xxr>
+<yyr>450</yyr>
+<aas>451</aas>
+<bbs>452</bbs>
+<ccs>453</ccs>
+<dds>454</dds>
+<ees>455</ees>
+<ffs>456</ffs>
+<ggs>457</ggs>
+<hhs>458</hhs>
+<iis>459</iis>
+<jjs>460</jjs>
+<kks>461</kks>
+<lls>462</lls>
+<mms>463</mms>
+<nns>464</nns>
+<oos>465</oos>
+<pps>466</pps>
+<qqs>467</qqs>
+<rrs>468</rrs>
+<sss>469</sss>
+<tts>470</tts>
+<uus>471</uus>
+<vvs>472</vvs>
+<wws>473</wws>
+<xxs>474</xxs>
+<yys>475</yys>
+<aat>476</aat>
+<bbt>477</bbt>
+<cct>478</cct>
+<ddt>479</ddt>
+<eet>480</eet>
+<fft>481</fft>
+<ggt>482</ggt>
+<hht>483</hht>
+<iit>484</iit>
+<jjt>485</jjt>
+<kkt>486</kkt>
+<llt>487</llt>
+<mmt>488</mmt>
+<nnt>489</nnt>
+<oot>490</oot>
+<ppt>491</ppt>
+<qqt>492</qqt>
+<rrt>493</rrt>
+<sst>494</sst>
+<ttt>495</ttt>
+<uut>496</uut>
+<vvt>497</vvt>
+<wwt>498</wwt>
+<xxt>499</xxt>
+<yyt century="yes">500</yyt>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math10.xsl b/test/tests/exslt/math/math10.xsl
new file mode 100644
index 0000000..47b19ec
--- /dev/null
+++ b/test/tests/exslt/math/math10.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:log() -->
+
+<xsl:template match="/">
+  <out>
+     This is for testing the Euler constant
+     <xsl:for-each select="doc/child::*">
+       <xsl:param name="val" select="."/>
+       <xsl:text>log of $val =</xsl:text>
+       <xsl:value-of select="math:log($val)"/>
+       <br/>
+     </xsl:for-each>
+  </out>   
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math11.xml b/test/tests/exslt/math/math11.xml
new file mode 100644
index 0000000..5a1fb60
--- /dev/null
+++ b/test/tests/exslt/math/math11.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<doc>
+  <b>25</b>
+  <b>3</b>
+  <b1>
+     <b>64</b>
+     <b>26</b>
+     <b2>
+        <c>abc</c>
+        <c>123</c>
+        <b>123</b>
+        <b3>
+           <d>469-1207</d>
+           <d>true</d>
+           <b>999</b>
+        </b3>
+      </b2>
+  </b1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math11.xsl b/test/tests/exslt/math/math11.xsl
new file mode 100644
index 0000000..9403296
--- /dev/null
+++ b/test/tests/exslt/math/math11.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:lowest() -->
+
+<xsl:template match="/">
+  <out>
+     This is for testing the node-set of b with lowest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:lowest(//b))"/>
+     This is for testing the node-set of c with lowest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:lowest(//c))"/>
+     This is for testing the node-set of d with lowest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:lowest(//d))"/>
+  </out>   
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math12.xml b/test/tests/exslt/math/math12.xml
new file mode 100644
index 0000000..5a1fb60
--- /dev/null
+++ b/test/tests/exslt/math/math12.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<doc>
+  <b>25</b>
+  <b>3</b>
+  <b1>
+     <b>64</b>
+     <b>26</b>
+     <b2>
+        <c>abc</c>
+        <c>123</c>
+        <b>123</b>
+        <b3>
+           <d>469-1207</d>
+           <d>true</d>
+           <b>999</b>
+        </b3>
+      </b2>
+  </b1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math12.xsl b/test/tests/exslt/math/math12.xsl
new file mode 100644
index 0000000..30c750f
--- /dev/null
+++ b/test/tests/exslt/math/math12.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                xmlns:common="http://exslt.org/common"
+                extension-element-prefixes="math">
+
+<!-- Test math:max() -->
+
+<xsl:template match="doc">
+  <out>
+     This is for finding the maximum value in the node-set b and printing it:
+     <xsl:value-of select="math:max(//b)"/>
+     This is for finding the maximum value in the node-set c and printing it:
+     <xsl:value-of select="math:max(//c)"/>
+     This is for finding the maximum value in the node-set d and printing it:
+     <xsl:value-of select="math:max(//d)"/>
+     
+  </out>   
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math13.xml b/test/tests/exslt/math/math13.xml
new file mode 100644
index 0000000..5a1fb60
--- /dev/null
+++ b/test/tests/exslt/math/math13.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<doc>
+  <b>25</b>
+  <b>3</b>
+  <b1>
+     <b>64</b>
+     <b>26</b>
+     <b2>
+        <c>abc</c>
+        <c>123</c>
+        <b>123</b>
+        <b3>
+           <d>469-1207</d>
+           <d>true</d>
+           <b>999</b>
+        </b3>
+      </b2>
+  </b1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math13.xsl b/test/tests/exslt/math/math13.xsl
new file mode 100644
index 0000000..cff0796
--- /dev/null
+++ b/test/tests/exslt/math/math13.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:min() -->
+
+<xsl:template match="doc">
+  <out>
+     This is for finding the smallest value in the node-set b and printing it:
+     <xsl:value-of select="math:min(//b)"/>
+     This is for finding the smallest value in the node-set c and printing it:
+     <xsl:value-of select="math:min(//c)"/>
+     This is for finding the smallest value in the node-set d and printing it:
+     <xsl:value-of select="math:min(//d)"/>
+  </out>   
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math14.xml b/test/tests/exslt/math/math14.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math14.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math14.xsl b/test/tests/exslt/math/math14.xsl
new file mode 100644
index 0000000..ff98104
--- /dev/null
+++ b/test/tests/exslt/math/math14.xsl
@@ -0,0 +1,123 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:power() -->
+<xsl:variable name="base1" select="10"/>
+<xsl:variable name="base2" select="2.5"/>
+<xsl:variable name="base3" select="1"/>
+<xsl:variable name="base4" select="0"/>
+<xsl:variable name="base5" select="-10"/>
+<xsl:variable name="expon1" select="0"/>
+<xsl:variable name="expon2" select="-0"/>
+<xsl:variable name="expon3" select="10"/>
+<xsl:variable name="expon4" select="2.5"/>
+<xsl:variable name="expon5" select="-5"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $base4"/>
+
+<xsl:template match="/">
+   <out>
+   Using variable bases with power 0:<br/>
+   <xsl:value-of select="$base1"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon1"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base1,$expon1)"/><br/>
+   <xsl:value-of select="$base2"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon1"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base2,$expon1)"/><br/>
+   <xsl:value-of select="$base3"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon1"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base3,$expon1)"/><br/>
+   <xsl:value-of select="$base4"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon1"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base4,$expon1)"/><br/>
+   <xsl:value-of select="$base5"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon1"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base5,$expon1)"/><br/>
+   Using variable base with power -0:
+   <xsl:value-of select="$base1"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon2"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base1,$expon2)"/><br/>
+   <xsl:value-of select="$base2"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon2"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base2,$expon2)"/><br/>
+   <xsl:value-of select="$base3"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon2"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base3,$expon2)"/><br/>
+   <xsl:value-of select="$base4"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon2"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base4,$expon2)"/><br/>
+   <xsl:value-of select="$base5"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon2"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base5,$expon2)"/><br/>
+   Using variable base with power 10:
+   <xsl:value-of select="$base1"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon3"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base1,$expon3)"/><br/>
+   <xsl:value-of select="$base2"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon3"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base2,$expon3)"/><br/>
+   <xsl:value-of select="$base3"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon3"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base3,$expon3)"/><br/>
+   <xsl:value-of select="$base4"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon3"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base4,$expon3)"/><br/>
+   <xsl:value-of select="$base5"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon3"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base5,$expon3)"/><br/>
+   Using variable base with power 2:
+   <xsl:value-of select="$base1"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon4"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base1,$expon4)"/><br/>
+   <xsl:value-of select="$base2"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon4"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base2,$expon4)"/><br/>
+   <xsl:value-of select="$base3"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon4"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base3,$expon4)"/><br/>
+   <xsl:value-of select="$base4"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon4"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base4,$expon4)"/><br/>
+   <xsl:value-of select="$base5"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon4"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base5,$expon4)"/><br/>
+   Using variable base with power -5:
+   <xsl:value-of select="$base1"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon5"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base1,$expon5)"/><br/>
+   <xsl:value-of select="$base2"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon5"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base2,$expon5)"/><br/>
+   <xsl:value-of select="$base3"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon5"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base3,$expon5)"/><br/>
+   <xsl:value-of select="$base4"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon5"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base4,$expon5)"/><br/>
+   <xsl:value-of select="$base5"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$expon5"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($base5,$expon5)"/><br/>
+   Using input as base with power <xsl:value-of select="$input1"/>:
+   <xsl:value-of select="$input1"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input1"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input1,$input1)"/><br/>
+   <xsl:value-of select="$input2"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input1"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input2,$input1)"/><br/>
+   <xsl:value-of select="$input3"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input1"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input3,$input1)"/><br/>
+   Using input as base with power <xsl:value-of select="$input2"/>:
+   <xsl:value-of select="$input1"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input2"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input1,$input2)"/><br/>
+   <xsl:value-of select="$input2"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input2"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input2,$input2)"/><br/>
+   <xsl:value-of select="$input3"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input2"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input3,$input2)"/><br/>
+   Using input as base with power <xsl:value-of select="$input3"/>:
+   <xsl:value-of select="$input1"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input3"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input1,$input3)"/><br/>
+   <xsl:value-of select="$input2"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input3"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input2,$input3)"/><br/>
+   <xsl:value-of select="$input3"/><xsl:text> to the power of </xsl:text><xsl:value-of select="$input3"/><xsl:text> is </xsl:text>
+   <xsl:value-of select="math:power($input3,$input3)"/><br/>
+   
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math15.xml b/test/tests/exslt/math/math15.xml
new file mode 100644
index 0000000..f6fba93
--- /dev/null
+++ b/test/tests/exslt/math/math15.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math15.xsl b/test/tests/exslt/math/math15.xsl
new file mode 100644
index 0000000..64bea76
--- /dev/null
+++ b/test/tests/exslt/math/math15.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:random() -->
+
+<xsl:template match="/">
+   <out>
+   <xsl:value-of select="math:random()"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math16.xml b/test/tests/exslt/math/math16.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math16.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math16.xsl b/test/tests/exslt/math/math16.xsl
new file mode 100644
index 0000000..8f43adc
--- /dev/null
+++ b/test/tests/exslt/math/math16.xsl
@@ -0,0 +1,73 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:sin() -->
+
+<xsl:variable name="zero" select="0"/>
+<xsl:variable name="nzero" select="-0"/>
+<xsl:variable name="num1" select="1.99"/>
+<xsl:variable name="num2" select="3.1428475"/>
+<xsl:variable name="temp1" select="-7"/>
+<xsl:variable name="temp2" select="-9.99999"/>
+<xsl:variable name="rad1" select="1.0"/>
+<xsl:variable name="rad2" select="25"/>
+<xsl:variable name="rad3" select="0.253"/>
+<xsl:variable name="rad4" select="-0.888"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+<xsl:template match="/">
+   <out>
+      Sin value of zero is:
+      <xsl:value-of select="math:sin($zero)"/><br/>
+      Sin value of nzero is:
+      <xsl:value-of select="math:sin($nzero)"/><br/>
+      Sin value of num1 is:
+      <xsl:value-of select="math:sin($num1)"/><br/>
+      Sin value of num2 is:
+      <xsl:value-of select="math:sin($num2)"/><br/>
+      Sin value of temp1 is:
+      <xsl:value-of select="math:sin($temp1)"/><br/>
+      Sin value of temp2 is:
+      <xsl:value-of select="math:sin($temp2)"/><br/>
+      Sin value of rad1 is:
+      <xsl:value-of select="math:sin($rad1)"/><br/>
+      Sin value of rad2 is:
+      <xsl:value-of select="math:sin($rad2)"/><br/>
+      Sin value of rad3 is:
+      <xsl:value-of select="math:sin($rad3)"/><br/>
+      Sin value of rad4 is:
+      <xsl:value-of select="math:sin($rad4)"/><br/>
+      Sin value of input1 is:
+      <xsl:value-of select="math:sin($input1)"/><br/>
+      Sin value of input2 is:
+      <xsl:value-of select="math:sin($input2)"/><br/>
+      Sin value of input3 is:
+      <xsl:value-of select="math:sin($input3)"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math17.xml b/test/tests/exslt/math/math17.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math17.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math17.xsl b/test/tests/exslt/math/math17.xsl
new file mode 100644
index 0000000..0ded8c4
--- /dev/null
+++ b/test/tests/exslt/math/math17.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:sqrt() -->
+<xsl:variable name="num1" select="100"/>
+<xsl:variable name="num2" select="20"/>
+<xsl:variable name="num3" select="1"/>
+<xsl:variable name="num4" select="0"/>
+<xsl:variable name="num5" select="-10"/>
+
+<xsl:template match="/">
+   <out>
+   Sqrt of <xsl:value-of select="$num1"/> is <xsl:value-of select="math:sqrt($num1)"/><br/> 
+   Sqrt of <xsl:value-of select="$num2"/> is <xsl:value-of select="math:sqrt($num2)"/><br/> 
+   Sqrt of <xsl:value-of select="$num3"/> is <xsl:value-of select="math:sqrt($num3)"/><br/> 
+   Sqrt of <xsl:value-of select="$num4"/> is <xsl:value-of select="math:sqrt($num4)"/><br/> 
+   Sqrt of <xsl:value-of select="$num5"/> is <xsl:value-of select="math:sqrt($num5)"/><br/> 
+   Sqrt of <xsl:value-of select="number(//number[1])"/> is <xsl:value-of select="math:sqrt(number(//number[1]))"/><br/> 
+   Sqrt of <xsl:value-of select="number(//number[2])"/> is <xsl:value-of select="math:sqrt(number(//number[2]))"/><br/> 
+   Sqrt of <xsl:value-of select="number(//number[3])"/> is <xsl:value-of select="math:sqrt(number(//number[3]) div $num4)"/>
+   
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math18.xml b/test/tests/exslt/math/math18.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math18.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math18.xsl b/test/tests/exslt/math/math18.xsl
new file mode 100644
index 0000000..e71115a
--- /dev/null
+++ b/test/tests/exslt/math/math18.xsl
@@ -0,0 +1,73 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:tan() -->
+
+<xsl:variable name="zero" select="0"/>
+<xsl:variable name="nzero" select="-0"/>
+<xsl:variable name="num1" select="1.99"/>
+<xsl:variable name="num2" select="3.1428475"/>
+<xsl:variable name="temp1" select="-7"/>
+<xsl:variable name="temp2" select="-9.99999"/>
+<xsl:variable name="rad1" select="1.0"/>
+<xsl:variable name="rad2" select="25"/>
+<xsl:variable name="rad3" select="0.253"/>
+<xsl:variable name="rad4" select="-0.888"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+<xsl:template match="/">
+   <out>
+      Tan value of zero is:
+      <xsl:value-of select="math:tan($zero)"/><br/>
+      Tan value of nzero is:
+      <xsl:value-of select="math:tan($nzero)"/><br/>
+      Tan value of num1 is:
+      <xsl:value-of select="math:tan($num1)"/><br/>
+      Tan value of num2 is:
+      <xsl:value-of select="math:tan($num2)"/><br/>
+      Tan value of temp1 is:
+      <xsl:value-of select="math:tan($temp1)"/><br/>
+      Tan value of temp2 is:
+      <xsl:value-of select="math:tan($temp2)"/><br/>
+      Tan value of rad1 is:
+      <xsl:value-of select="math:tan($rad1)"/><br/>
+      Tan value of rad2 is:
+      <xsl:value-of select="math:tan($rad2)"/><br/>
+      Tan value of rad3 is:
+      <xsl:value-of select="math:tan($rad3)"/><br/>
+      Tan value of rad4 is:
+      <xsl:value-of select="math:tan($rad4)"/><br/>
+      Tan value of input1 is:
+      <xsl:value-of select="math:tan($input1)"/><br/>
+      Tan value of input2 is:
+      <xsl:value-of select="math:tan($input2)"/><br/>
+      Tan value of input3 is:
+      <xsl:value-of select="math:tan($input3)"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math19.xml b/test/tests/exslt/math/math19.xml
new file mode 100644
index 0000000..9be976f
--- /dev/null
+++ b/test/tests/exslt/math/math19.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<items>
+  <item>2</item>
+  <item>3</item>
+</items>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math19.xsl b/test/tests/exslt/math/math19.xsl
new file mode 100644
index 0000000..c1bf040
--- /dev/null
+++ b/test/tests/exslt/math/math19.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                exclude-result-prefixes="math"
+                version="1.0">
+<!-- Using math:max() within a xsl:template name -->
+                
+<xsl:output method="html" encoding="ISO-8859-1" indent="no" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"  />
+ 
+<xsl:template match="/">
+   <xsl:call-template name = "calcul" >
+      <xsl:with-param name="list" select="items/item" />
+   </xsl:call-template>
+</xsl:template>		  
+		  
+<xsl:template name="calcul">
+   <xsl:param name="list"/>
+   <xsl:choose>
+      <xsl:when test="$list"><xsl:value-of select="math:max($list)" /></xsl:when>		 
+      <xsl:otherwise>0</xsl:otherwise>
+   </xsl:choose>		 
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math2.xml b/test/tests/exslt/math/math2.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math2.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math2.xsl b/test/tests/exslt/math/math2.xsl
new file mode 100644
index 0000000..fb516b2
--- /dev/null
+++ b/test/tests/exslt/math/math2.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:acos() -->
+
+<xsl:variable name="zero" select="0"/>
+<xsl:variable name="nzero" select="-0"/>
+<xsl:variable name="num1" select="1.99"/>
+<xsl:variable name="num2" select="3.1428475"/>
+<xsl:variable name="temp1" select="-7"/>
+<xsl:variable name="temp2" select="-9.99999"/>
+<xsl:variable name="rad1" select="1.0"/>
+<xsl:variable name="rad2" select="25"/>
+<xsl:variable name="rad3" select="0.253"/>
+<xsl:variable name="rad4" select="-0.888"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+<xsl:template match="/">
+   <out>
+      ArcCos value of zero is:
+      <xsl:value-of select="math:acos($zero)"/><br/>
+      ArcCos value of nzero is:
+      <xsl:value-of select="math:acos($nzero)"/><br/>
+      ArcCos value of num1 is:
+      <xsl:value-of select="math:acos($num1)"/><br/>
+      ArcCos value of num2 is:
+      <xsl:value-of select="math:acos($num2)"/><br/>
+      ArcCos value of temp1 is:
+      <xsl:value-of select="math:acos($temp1)"/><br/>
+      ArcCos value of temp2 is:
+      <xsl:value-of select="math:acos($temp2)"/><br/>
+      ArcCos value of rad1 is:
+      <xsl:value-of select="math:acos($rad1)"/><br/>
+      ArcCos value of rad2 is:
+      <xsl:value-of select="math:acos($rad2)"/><br/>
+      ArcCos value of rad3 is:
+      <xsl:value-of select="math:acos($rad3)"/><br/>
+      ArcCos value of rad4 is:
+      <xsl:value-of select="math:acos($rad4)"/><br/>
+      ArcCos value of input1 number is:
+      <xsl:value-of select="math:acos($input1)"/><br/>
+      ArcCos value of input2 number is:
+      <xsl:value-of select="math:acos($input2)"/><br/>
+      ArcCos value of input3 number is:
+      <xsl:value-of select="math:acos($input3)"/>
+
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math3.xml b/test/tests/exslt/math/math3.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math3.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math3.xsl b/test/tests/exslt/math/math3.xsl
new file mode 100644
index 0000000..94878a4
--- /dev/null
+++ b/test/tests/exslt/math/math3.xsl
@@ -0,0 +1,73 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:asin() -->
+
+<xsl:variable name="zero" select="0"/>
+<xsl:variable name="nzero" select="-0"/>
+<xsl:variable name="num1" select="1.99"/>
+<xsl:variable name="num2" select="3.1428475"/>
+<xsl:variable name="temp1" select="-7"/>
+<xsl:variable name="temp2" select="-9.99999"/>
+<xsl:variable name="rad1" select="1.0"/>
+<xsl:variable name="rad2" select="25"/>
+<xsl:variable name="rad3" select="0.253"/>
+<xsl:variable name="rad4" select="-0.888"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+<xsl:template match="/">
+   <out>
+      ArcSin value of zero is:
+      <xsl:value-of select="math:asin($zero)"/><br/>
+      ArcSin value of nzero is:
+      <xsl:value-of select="math:asin($nzero)"/><br/>
+      ArcSin value of num1 is:
+      <xsl:value-of select="math:asin($num1)"/><br/>
+      ArcSin value of num2 is:
+      <xsl:value-of select="math:asin($num2)"/><br/>
+      ArcSin value of temp1 is:
+      <xsl:value-of select="math:asin($temp1)"/><br/>
+      ArcSin value of temp2 is:
+      <xsl:value-of select="math:asin($temp2)"/><br/>
+      ArcSin value of rad1 is:
+      <xsl:value-of select="math:asin($rad1)"/><br/>
+      ArcSin value of rad2 is:
+      <xsl:value-of select="math:asin($rad2)"/><br/>
+      ArcSin value of rad3 is:
+      <xsl:value-of select="math:asin($rad3)"/><br/>
+      ArcSin value of rad4 is:
+      <xsl:value-of select="math:asin($rad4)"/><br/>
+      ArcSin value of input1 number is:
+      <xsl:value-of select="math:asin($input1)"/><br/>
+      ArcSin value of input2 number is:
+      <xsl:value-of select="math:asin($input2)"/><br/>
+      ArcSin value of input3 number is:
+      <xsl:value-of select="math:asin($input3)"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math4.xml b/test/tests/exslt/math/math4.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math4.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math4.xsl b/test/tests/exslt/math/math4.xsl
new file mode 100644
index 0000000..a675c3e
--- /dev/null
+++ b/test/tests/exslt/math/math4.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:atan() -->
+
+<xsl:variable name="zero" select="0"/>
+<xsl:variable name="nzero" select="-0"/>
+<xsl:variable name="num1" select="1.99"/>
+<xsl:variable name="num2" select="3.1428475"/>
+<xsl:variable name="temp1" select="-7"/>
+<xsl:variable name="temp2" select="-9.99999"/>
+<xsl:variable name="rad1" select="1.0"/>
+<xsl:variable name="rad2" select="25"/>
+<xsl:variable name="rad3" select="0.253"/>
+<xsl:variable name="rad4" select="-0.888"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+<xsl:template match="/">
+   <out>
+
+      ArcTan value of zero is:
+      <xsl:value-of select="math:atan($zero)"/><br/>
+      ArcTan value of nzero is:
+      <xsl:value-of select="math:atan($nzero)"/><br/>
+      ArcTan value of num1 is:
+      <xsl:value-of select="math:atan($num1)"/><br/>
+      ArcTan value of num2 is:
+      <xsl:value-of select="math:atan($num2)"/><br/>
+      ArcTan value of temp1 is:
+      <xsl:value-of select="math:atan($temp1)"/><br/>
+      ArcTan value of temp2 is:
+      <xsl:value-of select="math:atan($temp2)"/><br/>
+      ArcTan value of rad1 is:
+      <xsl:value-of select="math:atan($rad1)"/><br/>
+      ArcTan value of rad2 is:
+      <xsl:value-of select="math:atan($rad2)"/><br/>
+      ArcTan value of rad3 is:
+      <xsl:value-of select="math:atan($rad3)"/><br/>
+      ArcTan value of rad4 is:
+      <xsl:value-of select="math:atan($rad4)"/><br/>
+      ArcTan value of input1 number is:
+      <xsl:value-of select="math:atan($input1)"/><br/>
+      ArcTan value of input2 number is:
+      <xsl:value-of select="math:atan($input2)"/><br/>
+      ArcTan value of input3 number is:
+      <xsl:value-of select="math:atan($input3)"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math5.xml b/test/tests/exslt/math/math5.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math5.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math5.xsl b/test/tests/exslt/math/math5.xsl
new file mode 100644
index 0000000..e41210a
--- /dev/null
+++ b/test/tests/exslt/math/math5.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:atan2() -->
+
+<xsl:variable name="zero" select="0"/>
+<xsl:variable name="nzero" select="-0"/>
+<xsl:variable name="num1" select="1.99"/>
+<xsl:variable name="num2" select="3.1428475"/>
+<xsl:variable name="temp1" select="-7"/>
+<xsl:variable name="temp2" select="-9.99999"/>
+<xsl:variable name="rad1" select="1.0"/>
+<xsl:variable name="rad2" select="25"/>
+<xsl:variable name="rad3" select="0.253"/>
+<xsl:variable name="rad4" select="-0.888"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+<xsl:template match="/">
+   <out>
+
+      ArcTan2 value of zero is:
+      <xsl:value-of select="math:atan2($zero)"/><br/>
+      ArcTan2 value of nzero is:
+      <xsl:value-of select="math:atan2($nzero)"/><br/>
+      ArcTan2 value of num1 is:
+      <xsl:value-of select="math:atan2($num1)"/><br/>
+      ArcTan2 value of num2 is:
+      <xsl:value-of select="math:atan2($num2)"/><br/>
+      ArcTan2 value of temp1 is:
+      <xsl:value-of select="math:atan2($temp1)"/><br/>
+      ArcTan2 value of temp2 is:
+      <xsl:value-of select="math:atan2($temp2)"/><br/>
+      ArcTan2 value of rad1 is:
+      <xsl:value-of select="math:atan2($rad1)"/><br/>
+      ArcTan2 value of rad2 is:
+      <xsl:value-of select="math:atan2($rad2)"/><br/>
+      ArcTan2 value of rad3 is:
+      <xsl:value-of select="math:atan2($rad3)"/><br/>
+      ArcTan2 value of rad4 is:
+      <xsl:value-of select="math:atan2($rad4)"/><br/>
+      ArcTan2 value of input1 number is:
+      <xsl:value-of select="math:atan2($input1)"/><br/>
+      ArcTan2 value of input2 number is:
+      <xsl:value-of select="math:atan2($input2)"/><br/>
+      ArcTan2 value of input3 number is:
+      <xsl:value-of select="math:atan2($input3)"/>
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math6.xml b/test/tests/exslt/math/math6.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math6.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math6.xsl b/test/tests/exslt/math/math6.xsl
new file mode 100644
index 0000000..bdb3bf9
--- /dev/null
+++ b/test/tests/exslt/math/math6.xsl
@@ -0,0 +1,151 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:constant() -->
+
+<xsl:variable name="cstant1" select='"PI"'/>
+<xsl:variable name="cstant2" select='"E"'/>
+<xsl:variable name="cstant3" select='"SQRRT2"'/>
+<xsl:variable name="cstant4" select='"LN2"'/>
+<xsl:variable name="cstant5" select='"LN10"'/>
+<xsl:variable name="cstant6" select='"LOG2E"'/>
+<xsl:variable name="cstant7" select='"SQRT1_2"'/>
+
+<xsl:variable name="precision1" select="0"/>
+<xsl:variable name="precision2" select="1"/>
+<xsl:variable name="precision3" select="2"/>
+<xsl:variable name="precision4" select="3"/>
+<xsl:variable name="precision5" select="10"/>
+<xsl:variable name="precision6" select="25"/>
+<xsl:variable name="precision7" select="50"/>
+
+<xsl:variable name="precision8" select="number(//number[1])"/>
+<xsl:variable name="precision9" select="number(//number[2])"/>
+<xsl:variable name="precision10" select="$precision8 div $precision1"/>
+
+<xsl:template match="/">
+   <group1>
+      These are for PI:
+      <xsl:value-of select="math:constant($cstant1,$precision1)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision2)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision3)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision4)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision5)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision6)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision7)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision8)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision9)"/>, 
+      <xsl:value-of select="math:constant($cstant1,$precision10)"/>
+
+   </group1>
+   <group2>
+      These are for E:
+      <xsl:value-of select="math:constant($cstant2,$precision1)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision2)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision3)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision4)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision5)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision6)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision7)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision8)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision9)"/>, 
+      <xsl:value-of select="math:constant($cstant2,$precision10)"/>, 
+
+   </group2>
+   <group3>
+      These are for SQRRT2
+      <xsl:value-of select="math:constant($cstant3,$precision1)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision2)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision3)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision4)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision5)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision6)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision7)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision8)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision9)"/>, 
+      <xsl:value-of select="math:constant($cstant3,$precision10)"/>, 
+
+   </group3>
+   <group4>
+      These are for LN2
+      <xsl:value-of select="math:constant($cstant4,$precision1)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision2)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision3)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision4)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision5)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision6)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision7)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision8)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision9)"/>, 
+      <xsl:value-of select="math:constant($cstant4,$precision10)"/>, 
+
+   </group4>
+   <group5>
+      These are for LN10
+      <xsl:value-of select="math:constant($cstant5,$precision1)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision2)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision3)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision4)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision5)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision6)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision7)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision8)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision9)"/>, 
+      <xsl:value-of select="math:constant($cstant5,$precision10)"/>, 
+
+   </group5>
+   <group6>
+      These are for LOG2E
+      <xsl:value-of select="math:constant($cstant6,$precision1)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision2)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision3)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision4)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision5)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision6)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision7)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision8)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision9)"/>, 
+      <xsl:value-of select="math:constant($cstant6,$precision10)"/>, 
+
+   </group6>
+
+   <group7>
+      These are for SQRT1_2
+      <xsl:value-of select="math:constant($cstant7,$precision1)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision2)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision3)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision4)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision5)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision6)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision7)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision8)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision9)"/>, 
+      <xsl:value-of select="math:constant($cstant7,$precision10)"/>, 
+
+   </group7>
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math7.xml b/test/tests/exslt/math/math7.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math7.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math7.xsl b/test/tests/exslt/math/math7.xsl
new file mode 100644
index 0000000..b9cce79
--- /dev/null
+++ b/test/tests/exslt/math/math7.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:cos() -->
+
+<xsl:variable name="zero" select="0"/>
+<xsl:variable name="nzero" select="-0"/>
+<xsl:variable name="num1" select="1.99"/>
+<xsl:variable name="num2" select="3.1428475"/>
+<xsl:variable name="temp1" select="-7"/>
+<xsl:variable name="temp2" select="-9.99999"/>
+<xsl:variable name="rad1" select="1.0"/>
+<xsl:variable name="rad2" select="25"/>
+<xsl:variable name="rad3" select="0.253"/>
+<xsl:variable name="rad4" select="-0.888"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+<xsl:template match="/">
+   <out>
+      Cos value of zero is:
+      <xsl:value-of select="math:cos($zero)"/><br/> 
+      Cos value of nzero is:
+      <xsl:value-of select="math:cos($nzero)"/><br/> 
+      Cos value of num1 is:
+      <xsl:value-of select="math:cos($num1)"/><br/> 
+      Cos value of num2 is:
+      <xsl:value-of select="math:cos($num2)"/><br/> 
+      Cos value of temp1 is:
+      <xsl:value-of select="math:cos($temp1)"/><br/> 
+      Cos value of temp2 is:
+      <xsl:value-of select="math:cos($temp2)"/><br/> 
+      Cos value of rad1 is: 
+      <xsl:value-of select="math:cos($rad1)"/><br/> 
+      Cos value of rad2 is:
+      <xsl:value-of select="math:cos($rad2)"/><br/> 
+      Cos value of rad3 is:
+      <xsl:value-of select="math:cos($rad3)"/><br/> 
+      Cos value of rad4 is:
+      <xsl:value-of select="math:cos($rad4)"/><br/> 
+      Cos value of input1 number is:
+      <xsl:value-of select="math:cos($input1)"/><br/> 
+      Cos value of input2 number is:
+      <xsl:value-of select="math:cos($input2)"/><br/> 
+      Cos value of input3 number is:
+      <xsl:value-of select="math:cos($input3)"/>
+      
+   </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math8.xml b/test/tests/exslt/math/math8.xml
new file mode 100644
index 0000000..04123cf
--- /dev/null
+++ b/test/tests/exslt/math/math8.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <number>5223849703457</number>
+   <number>ABC</number>
+   <number>-394729834.2347239480234</number>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math8.xsl b/test/tests/exslt/math/math8.xsl
new file mode 100644
index 0000000..c2d409f
--- /dev/null
+++ b/test/tests/exslt/math/math8.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:exp() -->
+<xsl:variable name="power1" select="5"/>
+<xsl:variable name="power2" select="0.0"/>
+<xsl:variable name="power3" select="-3"/>
+<xsl:variable name="power4" select="math:constant(PI,$power1)"/>
+<xsl:variable name="input1" select="number(//number[1])"/>
+<xsl:variable name="input2" select="number(//number[2])"/>
+<xsl:variable name="input3" select="$input1 div $zero"/>
+
+
+<xsl:template match="/">
+  <out>
+     This is for testing the Euler constant to the power of <xsl:value-of select="$power1"/>:
+     <xsl:value-of select="math:exp($power1)"/>
+     This is for testing the Euler constant to the power of <xsl:value-of select="$power2"/>:
+     <xsl:value-of select="math:exp($power2)"/>
+     This is for testing the Euler constant to the power of <xsl:value-of select="$power3"/>:
+     <xsl:value-of select="math:exp($power3)"/>
+     This is for testing the Euler constant to the power of <xsl:value-of select="$power4"/>:
+     <xsl:value-of select="math:exp($power4)"/>
+     This is testing Euler constant to the power of <xsl:value-of select="$input1"/>:
+     <xsl:value-of select="math:exp($input1)"/>
+     This is testing Euler constant to the power of <xsl:value-of select="$input2"/>:
+     <xsl:value-of select="math:exp($input2)"/>
+     This is testing Euler constant to the power of <xsl:value-of select="$input3"/>:
+     <xsl:value-of select="math:exp($input3)"/>
+
+  </out>   
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/math/math9.xml b/test/tests/exslt/math/math9.xml
new file mode 100644
index 0000000..c2b594b
--- /dev/null
+++ b/test/tests/exslt/math/math9.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<doc>
+  <b>25</b>
+  <b>3</b>
+  <b1>
+     <b>64</b>
+     <b>26</b>
+     <b2>
+        <c>abc</c>
+        <c>123</c>
+        <b>1230</b>
+        <b3>
+           <d>469-1207</d>
+           <d>true</d>
+           <b>999</b>
+        </b3>
+      </b2>
+  </b1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/exslt/math/math9.xsl b/test/tests/exslt/math/math9.xsl
new file mode 100644
index 0000000..b4070a6
--- /dev/null
+++ b/test/tests/exslt/math/math9.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:math="http://exslt.org/math"
+                extension-element-prefixes="math">
+
+<!-- Test math:highest() -->
+
+<xsl:template match="doc">
+  <out>
+     This is for testing the node-set of doc/b with highest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:highest(b))"/>
+     This is for testing the node-set of b1/b with highest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:highest(//b1/b))"/>
+     This is for testing the node-set of b2/b with highest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:highest(//b2/b))"/>
+     This is for testing the node-set of b3/b with highest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:highest(b3/b))"/>
+     This is for testing the node-set of //b with highest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:highest(//b))"/>
+     
+     This is for testing the node-set of c with highest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:highest(//c))"/>
+     This is for testing the node-set of d with highest value in it.  That tree would be:
+     <xsl:value-of select="math:max(math:highest(//d))"/>
+  </out>   
+
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/sets/sets1.xml b/test/tests/exslt/sets/sets1.xml
new file mode 100644
index 0000000..8ff89fc
--- /dev/null
+++ b/test/tests/exslt/sets/sets1.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<doc>
+<city name="Paris" country="France"/>
+<city name="Madrid" country="Spain"/>
+<city name="Vienna" country="Austria"/>
+<city name="Barcelona" country="Spain"/>
+<city name="Salzburg" country="Austria"/>
+<city name="Bonn" country="Germany"/>
+<city name="Lyon" country="France"/>
+<city name="Hannover" country="Germany"/>
+<city name="Calais" country="France"/>
+<city name="Berlin" country="Germany"/>
+</doc>
diff --git a/test/tests/exslt/sets/sets1.xsl b/test/tests/exslt/sets/sets1.xsl
new file mode 100644
index 0000000..123d49c
--- /dev/null
+++ b/test/tests/exslt/sets/sets1.xsl
@@ -0,0 +1,63 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:set="http://exslt.org/sets" >
+
+<!-- Test set:difference -->
+
+<xsl:variable name="i" select="//city[contains(@name,'i')]"/>
+<xsl:variable name="e" select="//city[contains(@name,'e')]"/>
+<xsl:variable name="B" select="//city[contains(@name,'B')]"/>
+
+<xsl:template match="/">
+  <out>
+    Containing i and no e:
+    <xsl:for-each select="set:difference($i, $e)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each> 
+    Containing e and no i:
+    <xsl:for-each select="set:difference($e, $i)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each>
+    Containing B and no i and no e:
+    <xsl:for-each select="set:difference(set:difference($B,$i),$e)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each>
+    
+    <!-- test difference on empty sets -->
+
+    Containing i:
+    <xsl:for-each select="set:difference($i, /..)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each>
+    Containing B:
+    <xsl:for-each select="set:difference($B, /..)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each>
+    Empty set:
+    <xsl:for-each select="set:difference(/.., $i)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each> 
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/sets/sets2.xml b/test/tests/exslt/sets/sets2.xml
new file mode 100644
index 0000000..d250a82
--- /dev/null
+++ b/test/tests/exslt/sets/sets2.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?> 
+
+<doc>
+<city name="Paris" country="France"/>
+<city name="Madrid" country="Spain"/>
+<city name="Vienna" country="Austria"/>
+<city name="Barcelona" country="Spain"/>
+<city name="Salzburg" country="Austria"/>
+<city name="Bonn" country="Germany"/>
+<city name="Lyon" country="France"/>
+<city name="Hannover" country="Germany"/>
+<city name="Calais" country="France"/>
+<city name="Berlin" country="Germany"/>
+<city name="Rome" country="Italy"/>
+<city name="Hong Kong" country="China"/>
+<city name="Lillehammer" country="Norway"/>
+</doc>
diff --git a/test/tests/exslt/sets/sets2.xsl b/test/tests/exslt/sets/sets2.xsl
new file mode 100644
index 0000000..8511a01
--- /dev/null
+++ b/test/tests/exslt/sets/sets2.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:set="http://exslt.org/sets" >
+
+<!-- Test set:distinct -->
+
+<xsl:template match="/">
+  <out>
+  <all-countries>:
+    <xsl:for-each select="//@country">
+          <xsl:value-of select="."/>;
+    </xsl:for-each>
+  </all-countries>:
+  <distinct-countries>:  
+    <xsl:for-each select="set:distinct(//@country)">
+          <xsl:value-of select="."/>;
+    </xsl:for-each>      
+  </distinct-countries> 
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/sets/sets3.xml b/test/tests/exslt/sets/sets3.xml
new file mode 100644
index 0000000..efe2d17
--- /dev/null
+++ b/test/tests/exslt/sets/sets3.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<doc>
+<city name="Paris" country="France" xmlns:x="one"/>
+<city name="Madrid" country="Spain" xmlns:x="one"/>
+<city name="Vienna" country="Austria" xmlns:x="one"/>
+<city name="Barcelona" country="Spain" xmlns:x="one"/>
+<city name="Salzburg" country="Austria" xmlns:x="one"/>
+<city name="Bonn" country="Germany" xmlns:x="one"/>
+<city name="Lyon" country="France" xmlns:x="one"/>
+<city name="Hannover" country="Germany" xmlns:x="one"/>
+<city name="Calais" country="France" xmlns:x="one"/>
+<city name="Berlin" country="Germany" xmlns:x="one"/>
+</doc>
diff --git a/test/tests/exslt/sets/sets3.xsl b/test/tests/exslt/sets/sets3.xsl
new file mode 100644
index 0000000..b557512
--- /dev/null
+++ b/test/tests/exslt/sets/sets3.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:set="http://exslt.org/sets" >
+
+<!-- Test set:has-same-node -->
+
+<xsl:variable name="a1" select="//city[@name='Vienna' or @name='Salzburg']"/>
+<xsl:variable name="a2" select="//city[@country='Austria']"/>
+
+<xsl:template match="/">
+  <out>
+    Test has-same-node() between two intersecting sets:
+    <xsl:if test="set:has-same-node($a1,$a2)">OK</xsl:if>;
+    Test has-same-node() between two non-intersecting sets:
+    <xsl:if test="not(set:has-same-node($a1,//city/@name))">OK</xsl:if>;
+    Test has-same-node() between two identical sets of namespace nodes:
+    <xsl:if test="set:has-same-node((//city[1])/namespace::*,(//city[1])/namespace::*)">OK</xsl:if>;        
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/sets/sets4.xml b/test/tests/exslt/sets/sets4.xml
new file mode 100644
index 0000000..8ff89fc
--- /dev/null
+++ b/test/tests/exslt/sets/sets4.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<doc>
+<city name="Paris" country="France"/>
+<city name="Madrid" country="Spain"/>
+<city name="Vienna" country="Austria"/>
+<city name="Barcelona" country="Spain"/>
+<city name="Salzburg" country="Austria"/>
+<city name="Bonn" country="Germany"/>
+<city name="Lyon" country="France"/>
+<city name="Hannover" country="Germany"/>
+<city name="Calais" country="France"/>
+<city name="Berlin" country="Germany"/>
+</doc>
diff --git a/test/tests/exslt/sets/sets4.xsl b/test/tests/exslt/sets/sets4.xsl
new file mode 100644
index 0000000..1747338
--- /dev/null
+++ b/test/tests/exslt/sets/sets4.xsl
@@ -0,0 +1,50 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:set="http://exslt.org/sets" >
+
+<!-- Test set:intersection -->
+
+<xsl:variable name="i" select="//city[contains(@name,'i')]"/>
+<xsl:variable name="e" select="//city[contains(@name,'e')]"/>
+<xsl:variable name="B" select="//city[contains(@name,'B')]"/>
+
+<xsl:template match="/">
+  <out>
+    Containing i and e:
+    <xsl:for-each select="set:intersection($i, $e)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each>     
+    
+    <!-- test intersection and difference on empty sets -->
+    Empty set:
+    <xsl:for-each select="set:intersection($i, /..)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each>     
+    Empty set:
+    <xsl:for-each select="set:intersection(/.., $i)">
+         <xsl:value-of select="@name"/>;
+    </xsl:for-each> 
+
+  </out>
+</xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/sets/sets5.xml b/test/tests/exslt/sets/sets5.xml
new file mode 100644
index 0000000..175dd0a
--- /dev/null
+++ b/test/tests/exslt/sets/sets5.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+<a/><b/><c/><d/><e/><f/><g/><h/>
+</doc>
+
diff --git a/test/tests/exslt/sets/sets5.xsl b/test/tests/exslt/sets/sets5.xsl
new file mode 100644
index 0000000..e998e04
--- /dev/null
+++ b/test/tests/exslt/sets/sets5.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set">
+
+<!-- TEST use of set:leading  -->
+
+  <xsl:template match="doc">
+    <out>;
+      <xsl:value-of select="count(set:leading(*, g))"/>;
+      <xsl:value-of select="count(set:leading(*, b))"/>;
+      <xsl:value-of select="count(set:leading(*, d|f|h))"/>;
+      <xsl:value-of select="count(set:leading(*, a|f|h))"/>;
+      <xsl:value-of select="count(set:leading(*, x))"/>;
+      <xsl:value-of select="count(set:leading(x, *))"/>;
+      <xsl:value-of select="count(set:leading(a|b|c, h))"/>;
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/sets/sets6.xml b/test/tests/exslt/sets/sets6.xml
new file mode 100644
index 0000000..175dd0a
--- /dev/null
+++ b/test/tests/exslt/sets/sets6.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+<a/><b/><c/><d/><e/><f/><g/><h/>
+</doc>
+
diff --git a/test/tests/exslt/sets/sets6.xsl b/test/tests/exslt/sets/sets6.xsl
new file mode 100644
index 0000000..1d6102e
--- /dev/null
+++ b/test/tests/exslt/sets/sets6.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set">
+
+<!-- TEST use of set:trailing  -->
+
+  <xsl:template match="doc">
+    <out>;
+      <xsl:value-of select="count(set:trailing(*, d))"/>;
+      <xsl:value-of select="count(set:trailing(*, b|d|f))"/>;
+      <xsl:value-of select="count(set:trailing(*, a|f|h))"/>;
+      <xsl:value-of select="count(set:trailing(*, x))"/>;
+      <xsl:value-of select="count(set:trailing(x, *))"/>;
+      <xsl:value-of select="count(set:trailing(d|e|f, a|e))"/>;
+    </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/strings/strings1.xml b/test/tests/exslt/strings/strings1.xml
new file mode 100644
index 0000000..e4d33a3
--- /dev/null
+++ b/test/tests/exslt/strings/strings1.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<a>
+   <name>Dmitry Hayes</name>
+   <name>Matthew Hoyt</name>
+   <name>June Ng</name>
+   <name>David Bertoni</name>
+   <name>Joseph Kesselman</name>
+   <name>Me Too</name>
+</a>
\ No newline at end of file
diff --git a/test/tests/exslt/strings/strings1.xsl b/test/tests/exslt/strings/strings1.xsl
new file mode 100644
index 0000000..7cf905d
--- /dev/null
+++ b/test/tests/exslt/strings/strings1.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:str="http://exslt.org/strings"
+                extension-element-prefixes="str">
+
+<xsl:template match="a/name">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="*">
+<out>
+   Left-justified with padding longer than name:
+   <xsl:value-of select="//name[1]" /> -
+   <xsl:value-of select="str:align(//name[1], '-X-O-X-O-X-O-X-O-X-O-X-O-X-O-X-O-X-O-X-O-X-O', 'left')" /> 
+   Right-justified with padding longer than name:
+   <xsl:value-of select="//name[2]" /> -
+   <xsl:value-of select="str:align(//name[2], 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn', 'right')" /> 
+   Centered with padding longer than name:
+   <xsl:value-of select="//name[3]" /> -
+   <xsl:value-of select="str:align(//name[3], 'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', 'center')" /> 
+   Left-justified with padding shorter than name:
+   <xsl:value-of select="//name[4]" /> -
+   <xsl:value-of select="str:align(//name[4], 'DDDDD', 'left')" /> 
+   Right-justified with null padding than name:
+   <xsl:value-of select="//name[5]" /> -
+   <xsl:value-of select="str:align(//name[5], '', 'right')" /> 
+   Default justification is left-justified:
+   <xsl:value-of select="//name[6]" /> -
+   <xsl:value-of select="str:align(//name[6], 'ooooooooooooooooooooooooooooooo')" /> 
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/strings/strings10.xml b/test/tests/exslt/strings/strings10.xml
new file mode 100644
index 0000000..55f19f0
--- /dev/null
+++ b/test/tests/exslt/strings/strings10.xml
Binary files differ
diff --git a/test/tests/exslt/strings/strings10.xsl b/test/tests/exslt/strings/strings10.xsl
new file mode 100644
index 0000000..55c4031
--- /dev/null
+++ b/test/tests/exslt/strings/strings10.xsl
Binary files differ
diff --git a/test/tests/exslt/strings/strings11.xml b/test/tests/exslt/strings/strings11.xml
new file mode 100644
index 0000000..55f19f0
--- /dev/null
+++ b/test/tests/exslt/strings/strings11.xml
Binary files differ
diff --git a/test/tests/exslt/strings/strings11.xsl b/test/tests/exslt/strings/strings11.xsl
new file mode 100644
index 0000000..5c383a3
--- /dev/null
+++ b/test/tests/exslt/strings/strings11.xsl
Binary files differ
diff --git a/test/tests/exslt/strings/strings2.xml b/test/tests/exslt/strings/strings2.xml
new file mode 100644
index 0000000..4c83d93
--- /dev/null
+++ b/test/tests/exslt/strings/strings2.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<a>
+  <c>Dmitry Hayes</c>
+  <c>Matthew Hoyt</c>
+  <c>Dave Bertoni</c>
+  <c>
+    <d>June Ng</d>
+    <d>Henry Zongaro</d>
+    <d>Joanne Tong</d>
+    Morris Kwan
+  </c>
+</a>
\ No newline at end of file
diff --git a/test/tests/exslt/strings/strings2.xsl b/test/tests/exslt/strings/strings2.xsl
new file mode 100644
index 0000000..4c0f571
--- /dev/null
+++ b/test/tests/exslt/strings/strings2.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:str="http://exslt.org/strings"
+                extension-element-prefixes="str">
+
+<!-- str:concat() -->
+
+<xsl:template match="/">
+<out>
+   Concatentating all a/* nodes from the input file gives us:
+   <xsl:value-of select="str:concat(a/*)" /><br/>
+   Concatenating a/c/d nodes from my input file gives us:
+   <xsl:value-of select="str:concat(a/c/d)"/>
+</out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/strings/strings3.xml b/test/tests/exslt/strings/strings3.xml
new file mode 100644
index 0000000..4a0df9a
--- /dev/null
+++ b/test/tests/exslt/strings/strings3.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<a>
+  <c>Dmitry Hayes</c>
+  <c>Matthew Hoyt</c>
+  <c>Dave Bertoni</c>
+  <c>
+    <d>June Ng</d>
+    <d>Henry Zongaro</d>
+    <d>Joanne Tong</d>
+  </c>
+</a>
\ No newline at end of file
diff --git a/test/tests/exslt/strings/strings3.xsl b/test/tests/exslt/strings/strings3.xsl
new file mode 100644
index 0000000..26c11fa
--- /dev/null
+++ b/test/tests/exslt/strings/strings3.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:str="http://exslt.org/strings"
+                extension-element-prefixes="str">
+
+<xsl:template match="/">
+   <out>
+   <xsl:apply-templates select="a/c"/>
+   <xsl:apply-templates select="a/c/d"/>
+   </out>
+</xsl:template>
+
+<xsl:template match="a/c/d">
+   <xsl:value-of select="str:padding(20, 'Xn')" />
+   <xsl:value-of select="." />
+</xsl:template>
+
+<xsl:template match="a/c">
+   <xsl:value-of select="str:padding(20, 'yZaB')" />
+   <xsl:value-of select="." />
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/strings/strings4.xml b/test/tests/exslt/strings/strings4.xml
new file mode 100644
index 0000000..37108b5
--- /dev/null
+++ b/test/tests/exslt/strings/strings4.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<a>
+  <c>Dmitry Hayes, XSLT4C team lead</c>
+  <c>Matthew Hoyt, XSLT4C developer</c>
+  <c>Dave Bertoni, XSLT4C advisor-guru</c>
+  <c>
+    <d>June Ng, XSLT4C test-build-person</d>
+    <d>Henry Zongaro, XSLT4J team lead</d>
+    <d>Joanne Tong, XSLT4J, W3C rep.,Extreme-Blue</d>
+  </c>
+</a>
\ No newline at end of file
diff --git a/test/tests/exslt/strings/strings4.xsl b/test/tests/exslt/strings/strings4.xsl
new file mode 100644
index 0000000..7fe7115
--- /dev/null
+++ b/test/tests/exslt/strings/strings4.xsl
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:str="http://exslt.org/strings"
+                extension-element-prefixes="str">
+
+<xsl:template match="a">
+   <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="*">
+   <xsl:value-of select="." /> -
+   <xsl:value-of select="str:tokenize(string(.), ' ')" />
+   <xsl:value-of select="str:tokenize(string(.), '')" />
+   <xsl:for-each select="str:tokenize(string(.), '-')" >
+      <xsl:value-of select="." />
+   </xsl:for-each>
+   <xsl:apply-templates select = "*" />
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/exslt/strings/strings5.xml b/test/tests/exslt/strings/strings5.xml
new file mode 100644
index 0000000..55f19f0
--- /dev/null
+++ b/test/tests/exslt/strings/strings5.xml
Binary files differ
diff --git a/test/tests/exslt/strings/strings5.xsl b/test/tests/exslt/strings/strings5.xsl
new file mode 100644
index 0000000..afd33bc
--- /dev/null
+++ b/test/tests/exslt/strings/strings5.xsl
Binary files differ
diff --git a/test/tests/exslt/strings/strings6.xml b/test/tests/exslt/strings/strings6.xml
new file mode 100644
index 0000000..55f19f0
--- /dev/null
+++ b/test/tests/exslt/strings/strings6.xml
Binary files differ
diff --git a/test/tests/exslt/strings/strings6.xsl b/test/tests/exslt/strings/strings6.xsl
new file mode 100644
index 0000000..19edd0c
--- /dev/null
+++ b/test/tests/exslt/strings/strings6.xsl
Binary files differ
diff --git a/test/tests/exslt/strings/strings7.xml b/test/tests/exslt/strings/strings7.xml
new file mode 100644
index 0000000..55f19f0
--- /dev/null
+++ b/test/tests/exslt/strings/strings7.xml
Binary files differ
diff --git a/test/tests/exslt/strings/strings7.xsl b/test/tests/exslt/strings/strings7.xsl
new file mode 100644
index 0000000..c339a16
--- /dev/null
+++ b/test/tests/exslt/strings/strings7.xsl
Binary files differ
diff --git a/test/tests/exslt/strings/strings8.xml b/test/tests/exslt/strings/strings8.xml
new file mode 100644
index 0000000..55f19f0
--- /dev/null
+++ b/test/tests/exslt/strings/strings8.xml
Binary files differ
diff --git a/test/tests/exslt/strings/strings8.xsl b/test/tests/exslt/strings/strings8.xsl
new file mode 100644
index 0000000..c661049
--- /dev/null
+++ b/test/tests/exslt/strings/strings8.xsl
Binary files differ
diff --git a/test/tests/exslt/strings/strings9.xml b/test/tests/exslt/strings/strings9.xml
new file mode 100644
index 0000000..55f19f0
--- /dev/null
+++ b/test/tests/exslt/strings/strings9.xml
Binary files differ
diff --git a/test/tests/exslt/strings/strings9.xsl b/test/tests/exslt/strings/strings9.xsl
new file mode 100644
index 0000000..51e176c
--- /dev/null
+++ b/test/tests/exslt/strings/strings9.xsl
Binary files differ
diff --git a/test/tests/extensions-gold/java/javaBugzilla3722.out b/test/tests/extensions-gold/java/javaBugzilla3722.out
new file mode 100644
index 0000000..7cb0e6f
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaBugzilla3722.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+   <dumpConfig>dumpConfig.count=4</dumpConfig>
+</out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/java/javaElem01.out b/test/tests/extensions-gold/java/javaElem01.out
new file mode 100644
index 0000000..40d7076
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaElem01.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<extension-string>attr-String</extension-string>
+<extension-ctr>1</extension-ctr>
+<extension-boolean>true</extension-boolean>
+<extension-ctr>2</extension-ctr>
+<extension-double>1.1</extension-double>
+<extension-ctr>3</extension-ctr>
+<extension-node>attr-Node</extension-node>
+<extension-ctr>4</extension-ctr>
+</out>
diff --git a/test/tests/extensions-gold/java/javaRedir1.out b/test/tests/extensions-gold/java/javaRedir1.out
new file mode 100644
index 0000000..0e208cc
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaRedir1.out
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<standard-out>
+      Standard output:
+      
+  
+  <main>
+    -- look in javaRedir1a-from-build-extensions.out for the redirected output --
+      
+    Everything else
+  </main>  
+</standard-out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/java/javaRedir1a-from-build-extensions.out b/test/tests/extensions-gold/java/javaRedir1a-from-build-extensions.out
new file mode 100644
index 0000000..dbd9e88
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaRedir1a-from-build-extensions.out
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<foo-out>
+    Testing Redirect extension:
+    <foobar-out>A foo subelement text node</foobar-out>
+  </foo-out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/java/javaRedir2.out b/test/tests/extensions-gold/java/javaRedir2.out
new file mode 100644
index 0000000..1d7ab9e
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaRedir2.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<standard-out><p>Standard output:</p></standard-out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/java/javaRedir2a-write1.out b/test/tests/extensions-gold/java/javaRedir2a-write1.out
new file mode 100644
index 0000000..11a1dc6
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaRedir2a-write1.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><item-out><append>false</append><data>javaRedir2a-write1 append A</data></item-out><?xml version="1.0" encoding="UTF-8"?><item-out><append>true</append><data>javaRedir2a-write1 append B</data></item-out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/java/javaRedir2a-write2.out b/test/tests/extensions-gold/java/javaRedir2a-write2.out
new file mode 100644
index 0000000..c0f3a3d
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaRedir2a-write2.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><item-out><append/><data>javaRedir2a-write2 append 2</data></item-out><?xml version="1.0" encoding="UTF-8"?><item-out><append>yes</append><data>javaRedir2a-write2 append 3</data></item-out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/java/javaSample3.out b/test/tests/extensions-gold/java/javaSample3.out
new file mode 100644
index 0000000..8aa1794
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaSample3.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out xmlns:java="http://xml.apache.org/xslt/java">
+<p>Format:   EEEE, MMM dd, yyyy</p>
+<p>Date-xml: y:2001 m:5 d:27</p>
+<p>Date-ext: Wednesday, Jun 27, 2001</p>
+</out>
diff --git a/test/tests/extensions-gold/java/javaSample4.out b/test/tests/extensions-gold/java/javaSample4.out
new file mode 100644
index 0000000..a91b18f
--- /dev/null
+++ b/test/tests/extensions-gold/java/javaSample4.out
@@ -0,0 +1,19 @@
+<HTML>
+<H1>Java Example</H1>
+<p>Here are the names in alphabetical order by last name:</p>
+<p>[1]. Auriemma, Stephen</p>
+<p>[2]. Belakovskiy, Igor</p>
+<p>[3]. Bertoni, David</p>
+<p>[4]. Boag, Scott</p>
+<p>[5]. Curcuru, Shane</p>
+<p>[6]. Dick, Paul</p>
+<p>[7]. Farmer, Emily</p>
+<p>[8]. Hoffman, Marcia</p>
+<p>[9]. Kesselman, Joseph</p>
+<p>[10]. Leslie, Donald</p>
+<p>[11]. Marston, David</p>
+<p>[12]. Mendelsohn, Noah</p>
+<p>[13]. Midy, Myriam</p>
+<p>[14]. Morrow, Alex</p>
+<p>[15]. Weerawarana, Sanjiva</p>
+</HTML>
diff --git a/test/tests/extensions-gold/javascript/javascriptSample2.out b/test/tests/extensions-gold/javascript/javascriptSample2.out
new file mode 100644
index 0000000..016b274
--- /dev/null
+++ b/test/tests/extensions-gold/javascript/javascriptSample2.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <out xmlns:lxslt="http://xml.apache.org/xslt"><p>We have received your enquiry and will 
+      respond by September 9, 2001 12:00:00 AM EDT</p></out>
diff --git a/test/tests/extensions-gold/javascript/javascriptSample5.out b/test/tests/extensions-gold/javascript/javascriptSample5.out
new file mode 100644
index 0000000..9136c97
--- /dev/null
+++ b/test/tests/extensions-gold/javascript/javascriptSample5.out
@@ -0,0 +1,19 @@
+<HTML xmlns:lxslt="http://xml.apache.org/xslt">
+<H1>JavaScript Example.</H1>
+<p>Here are the names in alphabetical order by last name:</p>
+<p>[1]. Auriemma, Stephen</p>
+<p>[2]. Belakovskiy, Igor</p>
+<p>[3]. Bertoni, David</p>
+<p>[4]. Boag, Scott</p>
+<p>[5]. Curcuru, Shane</p>
+<p>[6]. Dick, Paul</p>
+<p>[7]. Farmer, Emily</p>
+<p>[8]. Hoffman, Marcia</p>
+<p>[9]. Kesselman, Joseph</p>
+<p>[10]. Leslie, Donald</p>
+<p>[11]. Marston, David</p>
+<p>[12]. Mendelsohn, Noah</p>
+<p>[13]. Midy, Myriam</p>
+<p>[14]. Morrow, Alex</p>
+<p>[15]. Weerawarana, Sanjiva</p>
+</HTML>
diff --git a/test/tests/extensions-gold/library/libraryDifference01.out b/test/tests/extensions-gold/library/libraryDifference01.out
new file mode 100644
index 0000000..bee85cd
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryDifference01.out
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="selects abc (abc, xyz)">
+<item>a</item>
+<item>b</item>
+<item>c</item>, a</test>
+<test desc="selects xyz (xyz, abc)">
+<item>x</item>
+<item>y</item>
+<item>z</item>
+</test>
+<test desc="selects nothing (abc, abc)"/>
+<test desc="selects nothing (abc, abc and parent)"/>
+<test desc="selects bc (abc, abc[1])">
+<item>b</item>
+<item>c</item>
+</test>
+<test desc="selects nothing (abc[1], abc)"/>
+<test desc="selects a (abc[1], abc[2])">
+<item>a</item>
+</test>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryDistinct01.out b/test/tests/extensions-gold/library/libraryDistinct01.out
new file mode 100644
index 0000000..53c7c06
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryDistinct01.out
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="selects abc">
+<item>a</item>
+<item>b</item>
+<item>c</item>, a</test>
+<test desc="selects a from aaa">
+<item>a</item>
+</test>
+<test desc="selects xyz">
+<item>x</item>
+<item>y</item>
+<item>z</item>
+</test>
+<test desc="selects ab from aab">
+<item>a</item>
+<item>b</item>
+</test>
+<test desc="selects abc from abc|abc2">
+<item>a</item>
+<item>b</item>
+<item>c</item>
+</test>
+<test desc="selects abcxyz from abc|aab|xyz">
+<item>a</item>
+<item>b</item>
+<item>c</item>
+<item>x</item>
+<item>y</item>
+<item>z</item>
+</test>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryEvaluate01.out b/test/tests/extensions-gold/library/libraryEvaluate01.out
new file mode 100644
index 0000000..02a0af2
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryEvaluate01.out
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><sum-expr>sum(item)</sum-expr><listout sum-function="16" sum-evaluate="16"><listout sum-function="16.61" sum-evaluate="16.61"/></listout></out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/library/libraryHasSameNodes01.out b/test/tests/extensions-gold/library/libraryHasSameNodes01.out
new file mode 100644
index 0000000..4a02f97
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryHasSameNodes01.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="selects true (abc, abc)">true, true</test>
+<test desc="selects true (abc, abc and parent)">true</test>
+<test desc="selects false (abc, xyz)">false</test>
+<test desc="selects false (abc, abc2)">false</test>
+<test desc="selects false (abc, abc[1])">false</test>
+<test desc="selects false (abc[1], abc)">false</test>
+<test desc="selects true (abc[1], abc[1])">true</test>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryIntersection01.out b/test/tests/extensions-gold/library/libraryIntersection01.out
new file mode 100644
index 0000000..b7cf698
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryIntersection01.out
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="selects abc (abc, abc)">
+<item>a</item>
+<item>b</item>
+<item>c</item>, a</test>
+<test desc="selects abc (abc, abc and parent)">
+<list name="abc">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+</test>
+<test desc="selects nothing (abc, xyz)"/>
+<test desc="selects nothing (abc, abc2)"/>
+<test desc="selects a (abc, abc[1])">
+<item>a</item>
+</test>
+<test desc="selects a (abc[1], abc)">
+<item>a</item>
+</test>
+<test desc="selects a (abc[1], abc[1])">
+<item>a</item>
+</test>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryMath01.out b/test/tests/extensions-gold/library/libraryMath01.out
new file mode 100644
index 0000000..792c76c
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryMath01.out
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="selects -3">-3</test>
+<test desc="selects NaN">NaN</test>
+<test desc="selects NaN">NaN</test>
+<test desc="selects 5">5</test>
+<test desc="selects NaN">NaN</test>
+<test desc="selects NaN">NaN</test>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryMath02.out b/test/tests/extensions-gold/library/libraryMath02.out
new file mode 100644
index 0000000..68a48cc
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryMath02.out
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="selects 5, 5">
+<num>5</num>
+<num>5</num>
+</test>
+<test desc="selects nothing"/>
+<test desc="selects nothing"/>
+<test desc="selects -3">
+<num>-3</num>
+</test>
+<test desc="selects nothing"/>
+<test desc="selects nothing"/>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryNodeset01.out b/test/tests/extensions-gold/library/libraryNodeset01.out
new file mode 100644
index 0000000..435600a
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryNodeset01.out
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<Count>4</Count>
+<Sum>12</Sum>
+<Number>2</Number>
+<Name>docelem</Name>
+<Local-name>docelem</Local-name>
+<Namespace-URIs uri1="http://www.hello.com" uri2="http://www.hello.com" uri3="http://www.cnn.com"/>
+<Value-DOCELEM-Elem1>ELEMENT1A,ELEMENT1B</Value-DOCELEM-Elem1>
+<FE-DOCELEM-STAR>elem1 elem2 elem3 elem3 test:elem3 elem3 elem3 elem4 </FE-DOCELEM-STAR>
+<FE-DOCELEM-ELEM2-STAR>elem2a elem2b </FE-DOCELEM-ELEM2-STAR>
+<AT-DOCELEM-ELEM4>Yahoo</AT-DOCELEM-ELEM4>
+<Copy-of-ELEM1B>
+<elem1b xmlns="http://www.hello.com">,ELEMENT1B</elem1b>
+</Copy-of-ELEM1B>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryNodeset02.out b/test/tests/extensions-gold/library/libraryNodeset02.out
new file mode 100644
index 0000000..b1780d2
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryNodeset02.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><junk>$var1 summary: var1-begin
+      var1-first1var1-first2var1-second1
+$var2 summary: var2-begin
+      var2-first1var2-first2var2-second1</junk>
+The preceding::t1 elements in $var2 are var2-first1,</out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/library/libraryNodeset03.out b/test/tests/extensions-gold/library/libraryNodeset03.out
new file mode 100644
index 0000000..08c212d
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryNodeset03.out
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<CountDOCELEM>2</CountDOCELEM>
+<CountELEM2andELEM3>10</CountELEM2andELEM3>
+<SumELEM2>10</SumELEM2>
+<NumberELEM2>1234</NumberELEM2>
+<NameBTM>BTM:BreakingTheMold</NameBTM>
+<LocalNameBTM>BreakingTheMold</LocalNameBTM>
+<Namespace-URIs uri1="http://www.extension03.test" uri2="www.btm.com"/>
+<ValueDOCELEM-STAR>Elem3.1NS-Elem3.2Elem3.3NS-Elem3.4</ValueDOCELEM-STAR>
+<ValueELEM4>NS-Elem4.4</ValueELEM4>
+<ValueTESTELEM4-1>NS-Elem4.2</ValueTESTELEM4-1>
+<SlashSlashELEM4>Elem4.1</SlashSlashELEM4>
+<SlashSlashELEM4-2Attrs-2>P</SlashSlashELEM4-2Attrs-2>
+<Axis_Tests>
+<Ancestor>
+<docelem/>
+<elem1/>
+</Ancestor>
+<Ancestor-or-Self>
+<docelem/>
+<elem1/>
+<BTM:BreakingTheMold xmlns:BTM="www.btm.com"/>
+</Ancestor-or-Self>
+<Attribute attr1="Q" attr2="P" attr3="O"/>
+<Child>
+<elem1/>
+<elem1/>
+<elem1/>
+</Child>
+<Descendant>
+<elem2/>
+<elem2/>
+<elem2/>
+<elem2/>
+<BTM:BreakingTheMold xmlns:BTM="www.btm.com"/>
+</Descendant>
+<Descendant-or-Self>
+<elem1/>
+<elem2/>
+<elem2/>
+<elem2/>
+<elem2/>
+<BTM:BreakingTheMold xmlns:BTM="www.btm.com"/>
+</Descendant-or-Self>
+<Following/>
+<Following-Sibling/>
+<Namespace xmlns:test="http://www.extension03.test" xmlns:BTM="www.btm.com"/>
+<Parent0/>
+<Parent1>elem2</Parent1>
+<Preceding>test:elem3</Preceding>
+<Preceding-Sibling>1</Preceding-Sibling>
+<Self>BTM:BreakingTheMold</Self>
+</Axis_Tests>
+<AT-Elem3-Elem4/>
+<AT-NSElem3-NSElem4/>
+<AT-Elem3-NSElem4/>
+<FE-FE-AT-Mode/>
+<CopyElem1-1/>
+<CopyElem3-2/>
+<Copy-of-RTF>
+<docelem xmlns="http://www.hello.com">
+<elem3>1</elem3>
+<elem3>2</elem3>
+<test:elem3 xmlns:test="http://www.extension03.test">
+<elem3a/>
+</test:elem3>
+<elem3>4</elem3>
+</docelem>
+</Copy-of-RTF>
+<Copy-of-TEST-ELEM3>
+<test:elem3 xmlns:test="http://www.extension03.test" xmlns="http://www.hello.com">
+<elem3a/>
+</test:elem3>
+</Copy-of-TEST-ELEM3>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryNodeset04.out b/test/tests/extensions-gold/library/libraryNodeset04.out
new file mode 100644
index 0000000..1e3422b
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryNodeset04.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><junk>$top1 summary: top1-begin
+    top1-first1top1-first2top1-second1
+$top2 summary: top2-begin
+    top2-first1top2-first2top2-second1</junk>
+The preceding::t1 elements in $top2 are top2-first1,</out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/library/libraryNodeset05.out b/test/tests/extensions-gold/library/libraryNodeset05.out
new file mode 100644
index 0000000..53bc834
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryNodeset05.out
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><junk>$top1 summary: Wrong variable, can you dig it?
+        
+$top2 summary: Dig we must!
+        </junk>
+The center nodes in $top2 are center,
+
+W01: center/child::* nodes in $top2 are t2-near-south,
+W02: center/descendant::* nodes in $top2 are t2-near-south,t2-south,t2-far-south,
+W03: center/parent::* nodes in $top2 are t2-near-north,
+W04: center/ancestor::* nodes in $top2 are t2-far-north,t2-north,t2-near-north,
+W05: center/following-sibling::* nodes in $top2 are t2-near-east,t2-east,t2-far-east,
+W06: center/preceding-sibling::* nodes in $top2 are t2-far-west,t2-west,t2-near-west,
+W07: center/following::* nodes in $top2 are t2-near-east,t2-east,t2-far-east,
+W08: center/preceding::* nodes in $top2 are t2-far-west,t2-west,t2-near-west,
+W09: center/attribute::* nodes in $top2 are center-attr-1,
+W10: center/namespace::* nodes in $top2 are n,
+W11: center/self::* nodes in $top2 are center,
+W12: center/descendant-or-self::* nodes in $top2 are center,t2-near-south,t2-south,t2-far-south,
+W13: center/ancestor-or-self::* nodes in $top2 are t2-far-north,t2-north,t2-near-north,center,
+
+N01: center/child::t2-near-south nodes in $top2 are t2-near-south,
+N02: center/descendant::t2-south nodes in $top2 are t2-south,
+N03: center/parent::t2-near-north nodes in $top2 are t2-near-north,
+N04: center/ancestor::t2-north nodes in $top2 are t2-north,
+N05: center/following-sibling::t2-east nodes in $top2 are t2-east,
+N06: center/preceding-sibling::t2-west nodes in $top2 are t2-west,
+N07: center/following::t2-east nodes in $top2 are t2-east,
+N08: center/preceding::t2-west nodes in $top2 are t2-west,
+N09: center/attribute::center-attr-1 nodes in $top2 are center-attr-1,
+N10: center/self::center nodes in $top2 are center,
+N11: center/descendant-or-self::t2-south nodes in $top2 are t2-south,
+N12: center/ancestor-or-self::t2-north nodes in $top2 are t2-north,
+</out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/library/libraryNodeset06.out b/test/tests/extensions-gold/library/libraryNodeset06.out
new file mode 100644
index 0000000..5e82af9
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryNodeset06.out
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><junk>$var1 summary: Wrong variable, can you dig it?
+            
+$var2 summary: Dig we must!
+            </junk>
+The center nodes in $var2 are center,
+
+W01: center/child::* nodes in $var2 are t2-near-south,
+W02: center/descendant::* nodes in $var2 are t2-near-south,t2-south,t2-far-south,
+W03: center/parent::* nodes in $var2 are t2-near-north,
+W04: center/ancestor::* nodes in $var2 are t2-far-north,t2-north,t2-near-north,
+W05: center/following-sibling::* nodes in $var2 are t2-near-east,t2-east,t2-far-east,
+W06: center/preceding-sibling::* nodes in $var2 are t2-far-west,t2-west,t2-near-west,
+W07: center/following::* nodes in $var2 are t2-near-east,t2-east,t2-far-east,
+W08: center/preceding::* nodes in $var2 are t2-far-west,t2-west,t2-near-west,
+W09: center/attribute::* nodes in $var2 are center-attr-1,
+W10: center/namespace::* nodes in $var2 are n,
+W11: center/self::* nodes in $var2 are center,
+W12: center/descendant-or-self::* nodes in $var2 are center,t2-near-south,t2-south,t2-far-south,
+W13: center/ancestor-or-self::* nodes in $var2 are t2-far-north,t2-north,t2-near-north,center,
+
+N01: center/child::t2-near-south nodes in $var2 are t2-near-south,
+N02: center/descendant::t2-south nodes in $var2 are t2-south,
+N03: center/parent::t2-near-north nodes in $var2 are t2-near-north,
+N04: center/ancestor::t2-north nodes in $var2 are t2-north,
+N05: center/following-sibling::t2-east nodes in $var2 are t2-east,
+N06: center/preceding-sibling::t2-west nodes in $var2 are t2-west,
+N07: center/following::t2-east nodes in $var2 are t2-east,
+N08: center/preceding::t2-west nodes in $var2 are t2-west,
+N09: center/attribute::center-attr-1 nodes in $var2 are center-attr-1,
+N10: center/self::center nodes in $var2 are center,
+N11: center/descendant-or-self::t2-south nodes in $var2 are t2-south,
+N12: center/ancestor-or-self::t2-north nodes in $var2 are t2-north,
+</out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/library/libraryNodeset07.out b/test/tests/extensions-gold/library/libraryNodeset07.out
new file mode 100644
index 0000000..ff3801b
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryNodeset07.out
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><junk>$top1 summary: Wrong variable, can you dig it?
+        
+$top2 summary: Dig we must!
+        </junk>
+  
+DS   1. AC: t2-north
+DS   2. AD: t2-near-north
+DS   3. BC: t2-north
+DS   4. BD: t2-near-north
+NDS  5. CC: t2-north
+NDS  6. CD: t2-near-north
+NDS  7. CE: t2-near-north
+NDS  8. DC: t2-near-north
+NDS  9. DD: t2-far-west
+
+NDS 10. ACC: t2-north
+NDS 11. ACE: t2-near-north
+NDS 12. ADC: t2-near-north
+NDS 13. BCC: t2-north
+NDS 14. BCE: t2-near-north
+NDS 15. BDC: t2-far-west
+NDS 16. BDE: t2-far-west
+NDS 17. CCC: t2-north
+NDS 18. CCE: t2-near-north
+NDS 19. CDC: t2-near-north
+NDS 20. CDE: t2-far-west
+NDS 21. CEC: t2-near-north
+NDS 22. CEE: t2-far-west
+NDS 23. DCC: t2-near-north
+NDS 24. DCE: t2-far-west
+NDS 25. DDC: t2-far-west
+
+DS  26. CC: t2-north
+DS  27. CD: t2-near-north
+DS  28. CE: t2-near-north
+DS  29. DC: t2-near-north
+DS  30. DD: t2-far-west
+
+DS  31. ACC: t2-north
+DS  32. ACE: t2-near-north
+DS  33. ADC: t2-near-north
+DS  34. BCC: t2-north
+DS  35. BCE: t2-near-north
+DS  36. BDC: t2-far-west
+DS  37. BDE: t2-far-west
+DS  38. CCC: t2-north
+DS  39. CCE: t2-near-north
+DS  40. CDC: t2-near-north
+DS  41. CDE: t2-far-west
+DS  42. CEC: t2-near-north
+DS  43. CEE: t2-far-west
+DS  44. DCC: t2-near-north
+DS  45. DCE: t2-far-west
+DS  46. DDC: t2-far-west</out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/library/libraryNodeset08.out b/test/tests/extensions-gold/library/libraryNodeset08.out
new file mode 100644
index 0000000..b97a422
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryNodeset08.out
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><junk>$var1 summary: Wrong variable, can you dig it?
+            
+$var2 summary: Dig we must!
+            </junk>
+  
+DS   1. AC: t2-north
+DS   2. AD: t2-near-north
+DS   3. BC: t2-north
+DS   4. BD: t2-near-north
+NDS  5. CC: t2-north
+NDS  6. CD: t2-near-north
+NDS  7. CE: t2-near-north
+NDS  8. DC: t2-near-north
+NDS  9. DD: t2-far-west
+
+NDS 10. ACC: t2-north
+NDS 11. ACE: t2-near-north
+NDS 12. ADC: t2-near-north
+NDS 13. BCC: t2-north
+NDS 14. BCE: t2-near-north
+NDS 15. BDC: t2-far-west
+NDS 16. BDE: t2-far-west
+NDS 17. CCC: t2-north
+NDS 18. CCE: t2-near-north
+NDS 19. CDC: t2-near-north
+NDS 20. CDE: t2-far-west
+NDS 21. CEC: t2-near-north
+NDS 22. CEE: t2-far-west
+NDS 23. DCC: t2-near-north
+NDS 24. DCE: t2-far-west
+NDS 25. DDC: t2-far-west
+
+DS  26. CC: t2-north
+DS  27. CD: t2-near-north
+DS  28. CE: t2-near-north
+DS  29. DC: t2-near-north
+DS  30. DD: t2-far-west
+
+DS  31. ACC: t2-north
+DS  32. ACE: t2-near-north
+DS  33. ADC: t2-near-north
+DS  34. BCC: t2-north
+DS  35. BCE: t2-near-north
+DS  36. BDC: t2-far-west
+DS  37. BDE: t2-far-west
+DS  38. CCC: t2-north
+DS  39. CCE: t2-near-north
+DS  40. CDC: t2-near-north
+DS  41. CDE: t2-far-west
+DS  42. CEC: t2-near-north
+DS  43. CEE: t2-far-west
+DS  44. DCC: t2-near-north
+DS  45. DCE: t2-far-west
+DS  46. DDC: t2-far-west</out>
\ No newline at end of file
diff --git a/test/tests/extensions-gold/library/librarySet01.out b/test/tests/extensions-gold/library/librarySet01.out
new file mode 100644
index 0000000..82098b7
--- /dev/null
+++ b/test/tests/extensions-gold/library/librarySet01.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="selects 1, 2">
+<num>1</num>
+<num>2</num>
+</test>
+<test desc="selects 1, 2, a, 3, 4">
+<num>1</num>
+<num>2</num>
+<str>a</str>
+<num>3</num>
+<num>4</num>
+</test>
+<test desc="selects nothing"/>
+</out>
diff --git a/test/tests/extensions-gold/library/librarySet02.out b/test/tests/extensions-gold/library/librarySet02.out
new file mode 100644
index 0000000..0351dff
--- /dev/null
+++ b/test/tests/extensions-gold/library/librarySet02.out
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="selects 3, 4">
+<num>3</num>
+<num>4</num>
+</test>
+<test desc="selects 1, 2, a, 3, 4">
+<num>1</num>
+<num>2</num>
+<str>a</str>
+<num>3</num>
+<num>4</num>
+</test>
+<test desc="selects nothing"/>
+</out>
diff --git a/test/tests/extensions-gold/library/libraryTokenize01.out b/test/tests/extensions-gold/library/libraryTokenize01.out
new file mode 100644
index 0000000..59cac11
--- /dev/null
+++ b/test/tests/extensions-gold/library/libraryTokenize01.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<test desc="simple string, default separators">onetwothree, one</test>
+<test desc="simple string, colon separator">one  twothree, one  two</test>
+<test desc="blank string, default separators">, </test>
+<test desc="blank string, blank separators">, </test>
+<test desc="blank string, colon, x are separators">, </test>
+<test desc="all delimiter string, default separators">, </test>
+<test desc="all delimiter string, colon, x are separators">, </test>
+</out>
diff --git a/test/tests/extensions-gold/property/propertyIndent01.out b/test/tests/extensions-gold/property/propertyIndent01.out
new file mode 100644
index 0000000..1ed313b
--- /dev/null
+++ b/test/tests/extensions-gold/property/propertyIndent01.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+ <a>
+  <b>
+   <c>
+    <d>Okay</d>
+   </c>
+  </b>
+ </a>
+</out>
diff --git a/test/tests/extensions-gold/property/propertyIndent02.out b/test/tests/extensions-gold/property/propertyIndent02.out
new file mode 100644
index 0000000..42a14ce
--- /dev/null
+++ b/test/tests/extensions-gold/property/propertyIndent02.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<a>
+<b>
+<c>
+<d>Okay</d>
+</c>
+</b>
+</a>
+</out>
diff --git a/test/tests/extensions-gold/property/propertyIndent03.out b/test/tests/extensions-gold/property/propertyIndent03.out
new file mode 100644
index 0000000..5cfcdfb
--- /dev/null
+++ b/test/tests/extensions-gold/property/propertyIndent03.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+          <a>
+                    <b>
+                              <c>
+                                        <d>Okay</d>
+                              </c>
+                    </b>
+          </a>
+</out>
diff --git a/test/tests/extensions/java/bugzilla5533.bat b/test/tests/extensions/java/bugzilla5533.bat
new file mode 100755
index 0000000..2504528
--- /dev/null
+++ b/test/tests/extensions/java/bugzilla5533.bat
@@ -0,0 +1,8 @@
+@echo Simpistic reproduction of Bugzilla#5533
+@echo See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5533 for description
+mkdir output
+java -classpath %classpath%;..\..\..\..\java\bin\xml-apis.jar;..\..\..\..\java\bin\xerces.jar;..\..\..\..\java\build\xalan.jar org.apache.xalan.xslt.Process -in javaRedir1.xml -xsl javaRedir1.xsl -out output\bugzilla5533.out
+@echo To verify: check that both of the output files from above, 
+@echo   javaRedir1.out and javaRedir1a-from-build-extensions.out, 
+@echo   are in the output subdirectory below here
+
diff --git a/test/tests/extensions/java/javaBugzilla3722.java b/test/tests/extensions/java/javaBugzilla3722.java
new file mode 100644
index 0000000..b9bf95e
--- /dev/null
+++ b/test/tests/extensions/java/javaBugzilla3722.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+// explicitly packageless
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Logger;
+import org.apache.qetest.xsl.StylesheetDatalet;
+import org.apache.qetest.xsl.TestableExtension;
+import org.apache.qetest.xsl.XHTFileCheckService;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import java.io.File;
+import java.util.Hashtable;
+
+/**
+ * Extension for testing xml-xalan/samples/extensions.  
+ */
+public class javaBugzilla3722 extends TestableExtension
+{
+    static Hashtable counters = new Hashtable ();
+    
+    static private Logger extnLogger = null;
+
+    /** Extension method from Bugzilla3722.  */
+    public String dumpConfig(NodeList conf)
+    {
+        counter++;
+        if (conf != null) 
+        {
+            for (int i=0; i<conf.getLength(); i++) 
+            {
+                Node node = conf.item(i);
+                if (node!=null) 
+                {
+                    if (node.hasChildNodes())
+                    {
+                        // getLogger().debug("<" + node.getNodeName() + ">");
+                        try 
+                        {
+                            // Below line throws DTMDOMException on CVS code 21-Sep-01
+                            NodeList subList = node.getChildNodes();
+                            this.dumpConfig(subList);
+                        } 
+                        catch (Exception e) 
+                        {
+                            if (extnLogger == null) 
+                            {
+                                e.printStackTrace();
+                                throw new RuntimeException("FATAL ERROR: javaBugzilla3722 has no logger; " + e.toString());
+                            }
+                            else
+                            {
+                                extnLogger.logThrowable(Logger.ERRORMSG, e, "dumpConfig threw:");
+                                extnLogger.checkFail("dumpConfig threw unexpected exception");
+                            }
+                        }
+                    } else 
+                    {
+                        // Output info about the node for later debugging
+                        counters.put(node.getNodeName(), node.getNodeValue());
+                    }
+                }
+            }
+        }
+        return "dumpConfig.count=" + counter;
+    }
+
+    //// Implementations of TestableExtension
+    /** Plain counter of number of times called.  */    
+    private static int counter = 0;
+    
+
+    /** 
+     * Perform and log any pre-transformation info.  
+     * @return true if OK; false if any fatal error occoured
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static boolean preCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        logger.logMsg(Logger.INFOMSG, "javaBugzilla3722.preCheck; counter=" + counter);
+        extnLogger = logger;
+        return true;        
+    }
+    
+
+    /** 
+     * Perform and log any post-transformation info.  
+     * 
+     * The extension should validate that it's extension was 
+     * properly called; we also validate output file.
+     * 
+     * @param logger Logger to dump any info to
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static void postCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        // Dump out our hashtable for user analysis
+        logger.logHashtable(Logger.STATUSMSG, counters, "javaBugzilla3722.postCheck() counters");
+
+        // Verify that we've been called at least once
+        //@todo update to verify specific number of calls and hash entries
+        if (counter > 0)
+            logger.checkPass("javaBugzilla3722 has been called " + counter + " times");
+        else
+            logger.checkFail("javaBugzilla3722 has not been called");
+
+        // We also validate the output file the normal way
+        CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+        // Supply default value
+        if (null == fileChecker)
+            fileChecker = new XHTFileCheckService();
+        fileChecker.check(logger,
+                          new File(datalet.outputName), 
+                          new File(datalet.goldName), 
+                          "Extension test of " + datalet.getDescription());
+    }
+
+
+    /**
+     * Description of what this extension does.  
+     * @return String description of extension
+     */
+    public static String getDescription()
+    {
+        return "Reproduce Bugzilla # 3722";
+    }
+}
diff --git a/test/tests/extensions/java/javaBugzilla3722.xml b/test/tests/extensions/java/javaBugzilla3722.xml
new file mode 100644
index 0000000..3f08896
--- /dev/null
+++ b/test/tests/extensions/java/javaBugzilla3722.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+   <matcher name="referer-match" src="org.apache.cocoon.matching.WildcardHeaderMatcherFactory">
+      <parameter-name>referer</parameter-name>
+   </matcher>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/java/javaBugzilla3722.xsl b/test/tests/extensions/java/javaBugzilla3722.xsl
new file mode 100644
index 0000000..2efa3de
--- /dev/null
+++ b/test/tests/extensions/java/javaBugzilla3722.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:bug3722="javaBugzilla3722-namespace"
+                extension-element-prefixes="bug3722"
+                exclude-result-prefixes="lxslt"
+                version="1.0">
+
+  <lxslt:component prefix="bug3722"
+                   functions="dumpConfig">
+    <lxslt:script lang="javaclass" src="javaBugzilla3722"/>
+  </lxslt:component>
+
+  <xsl:template match="/doc">
+    <out>
+      <xsl:apply-templates/>
+    </out>
+  </xsl:template>
+
+   <xsl:template match="matcher">
+      <xsl:variable name="config"><xsl:copy-of select="."/></xsl:variable>
+      <dumpConfig><xsl:value-of select="bug3722:dumpConfig($config)"/></dumpConfig>
+   </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/java/javaElem01.java b/test/tests/extensions/java/javaElem01.java
new file mode 100644
index 0000000..458a163
--- /dev/null
+++ b/test/tests/extensions/java/javaElem01.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+// explicitly packageless
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Logger;
+import org.apache.qetest.xsl.StylesheetDatalet;
+import org.apache.qetest.xsl.TestableExtension;
+import org.apache.qetest.xsl.XHTFileCheckService;
+
+import java.io.File;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Hashtable;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.apache.xalan.extensions.XSLProcessorContext;
+import org.apache.xalan.templates.ElemExtensionCall;
+
+/**
+ * Extension for testing xml-xalan/samples/extensions.
+ * Various tests of extension elements.  
+ */
+public class javaElem01 extends TestableExtension
+{
+
+    /** Extension method - element called from stylesheet.  */
+    public static String putString(XSLProcessorContext context,
+                                   ElemExtensionCall extensionElement)
+    {
+        counter++;
+        String attrVal = extensionElement.getAttribute("attr");
+        if (null != attrVal)
+            return attrVal;
+        else
+            return "javaElem01.putString";
+    }
+
+    /** Extension method - element called from stylesheet.  */
+    public static Boolean putBoolean(XSLProcessorContext context,
+                                   ElemExtensionCall extensionElement)
+    {
+        counter++;
+        return new Boolean(true);
+    }
+
+    /** Extension method - element called from stylesheet.  */
+    public static Double putDouble(XSLProcessorContext context,
+                                   ElemExtensionCall extensionElement)
+    {
+        counter++;
+        return new Double(1.1);
+    }
+
+    /** Extension method - element called from stylesheet.  */
+    public static Node putNode(XSLProcessorContext context,
+                                   ElemExtensionCall extensionElement)
+    {
+        counter++;
+        String attrVal = extensionElement.getAttribute("attr");
+        
+        Node n = null;
+        try
+        {
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
+            Document doc = docBuilder.newDocument();
+            if (null != attrVal)
+                n = doc.createTextNode(attrVal);
+            else
+                n = doc.createTextNode("This is a text node");
+        }
+        catch (Exception e)
+        {
+            // No-op: no easy way to report this
+        }
+        return n;
+    }
+
+    //// Implementations of TestableExtension
+    /** Simple counter of number of times called.  */    
+    private static int counter = 0;
+    
+    /**
+     * Description of what this extension does.  
+     * @return String description of extension
+     */
+    public static int getCounter()
+    {
+        return counter;
+    }
+
+    /** 
+     * Perform and log any pre-transformation info.  
+     * @return true if OK; false if any fatal error occoured
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static boolean preCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        logger.logMsg(Logger.INFOMSG, "javaElem01.preCheck; counter=" + counter);
+        return true;        
+    }
+    
+
+    /** 
+     * Perform and log any post-transformation info.  
+     * 
+     * The extension should validate that it's extension was 
+     * properly called; we also validate output file.
+     * 
+     * @param logger Logger to dump any info to
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static void postCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        // Verify that we've been called at least once
+        if (counter > 0)
+            logger.checkPass("javaElem01 has been called " + counter + " times");
+        else
+            logger.checkFail("javaElem01 has not been called");
+
+        // We also validate the output file the normal way
+        CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+        // Supply default value
+        if (null == fileChecker)
+            fileChecker = new XHTFileCheckService();
+        fileChecker.check(logger,
+                          new File(datalet.outputName), 
+                          new File(datalet.goldName), 
+                          "Extension test of " + datalet.getDescription());
+    }
+
+
+    /**
+     * Description of what this extension does.  
+     * @return String description of extension
+     */
+    public static String getDescription()
+    {
+        return "Basic extension element test";
+    }
+}
+
diff --git a/test/tests/extensions/java/javaElem01.xml b/test/tests/extensions/java/javaElem01.xml
new file mode 100644
index 0000000..f88b3b0
--- /dev/null
+++ b/test/tests/extensions/java/javaElem01.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?> 
+<doc>
+  <singleton>There should have been only one</singleton>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/java/javaElem01.xsl b/test/tests/extensions/java/javaElem01.xsl
new file mode 100644
index 0000000..babf023
--- /dev/null
+++ b/test/tests/extensions/java/javaElem01.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+    xmlns:lxslt="http://xml.apache.org/xslt"
+    xmlns:javaElem="javaElem01"
+    extension-element-prefixes="javaElem"
+    exclude-result-prefixes="lxslt">
+
+  <lxslt:component prefix="javaElem" 
+        elements="putString putBoolean putDouble putNode" functions="getCounter">
+    <lxslt:script lang="javaclass" src="javaElem01"/>
+  </lxslt:component>  
+
+<xsl:output method="xml" indent="yes"/>
+                
+  <xsl:template match="doc">
+    <out>
+      <extension-string>
+        <javaElem:putString attr="attr-String"/>
+      </extension-string> 
+      <extension-ctr><xsl:value-of select="javaElem:getCounter()"/></extension-ctr> 
+      <extension-boolean>
+        <javaElem:putBoolean attr="attr-Boolean"/>
+      </extension-boolean> 
+      <extension-ctr><xsl:value-of select="javaElem:getCounter()"/></extension-ctr> 
+      <extension-double>
+        <javaElem:putDouble attr="attr-Double"/>
+      </extension-double> 
+      <extension-ctr><xsl:value-of select="javaElem:getCounter()"/></extension-ctr> 
+      <extension-node>
+        <javaElem:putNode attr="attr-Node"/>
+      </extension-node> 
+      <extension-ctr><xsl:value-of select="javaElem:getCounter()"/></extension-ctr> 
+    </out>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/java/javaRedir1.java b/test/tests/extensions/java/javaRedir1.java
new file mode 100644
index 0000000..06a4283
--- /dev/null
+++ b/test/tests/extensions/java/javaRedir1.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+// explicitly packageless
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Logger;
+import org.apache.qetest.xsl.StylesheetDatalet;
+import org.apache.qetest.xsl.TestableExtension;
+import org.apache.qetest.xsl.XHTFileCheckService;
+
+import java.io.File; 
+import java.util.Hashtable;
+
+/**
+ * Extension for testing xml-xalan/samples/extensions.  
+ */
+public class javaRedir1 extends TestableExtension
+{
+    /** Note: no actual extension methods here; this class just does validation.  */
+
+    //// Implementations of TestableExtension
+    /** Copied from javaRedir1.xml[/doc/foo/@file].  */
+    public static final String REDIR_NAME = "javaRedir1a-from-build-extensions.out";
+
+    /** 
+     * Perform and log any pre-transformation info.  
+     * @return true if OK; false if any fatal error occoured
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static boolean preCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        logger.logMsg(Logger.TRACEMSG, "javaRedir1.preCheck");
+        return true;        
+    }
+    
+
+    /** 
+     * Perform and log any post-transformation info.  
+     * 
+     * The extension should validate that it's extension was 
+     * properly called; we also validate output file(s).
+     * 
+     * @param logger Logger to dump any info to
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static void postCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        logger.logMsg(Logger.TRACEMSG, "javaRedir1.postCheck");
+
+        // First, validate the normal output file the normal way
+        CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+        // Supply default value
+        if (null == fileChecker)
+            fileChecker = new XHTFileCheckService();
+        if (Logger.PASS_RESULT
+            != fileChecker.check(logger,
+                                 new File(datalet.outputName), 
+                                 new File(datalet.goldName), 
+                                 "Extension test of " + datalet.getDescription())
+           )
+        {
+            // Log a custom element with all the file refs first
+            // Closely related to viewResults.xsl select='fileref"
+            //@todo check that these links are valid when base 
+            //  paths are either relative or absolute!
+            Hashtable attrs = new Hashtable();
+            attrs.put("idref", (new File(datalet.inputName)).getName());
+            attrs.put("inputName", datalet.inputName);
+            attrs.put("xmlName", datalet.xmlName);
+            attrs.put("outputName", datalet.outputName);
+            attrs.put("goldName", datalet.goldName);
+            logger.logElement(Logger.STATUSMSG, "fileref", attrs, "Extension test file references");
+        }
+        // Now, also validate the redirected output!
+        // Calculate location of gold redir file
+        String goldRedir = (new File(datalet.goldName)).getParent() 
+                           + File.separator + REDIR_NAME;
+        
+        // Calculate location of actual redir file
+        String outRedir = (new File(datalet.outputName)).getParent() 
+                          + File.separator + REDIR_NAME;
+        
+        // Then check just with actual file name to the constructed 
+        //  gold name; don't bother with extra logging
+        fileChecker.check(logger, 
+                          new File(outRedir), 
+                          new File(goldRedir), 
+                          "Redir-Extension test of " + datalet.getDescription());
+    }
+
+
+    /**
+     * Description of what this extension does.  
+     * @return String description of extension
+     */
+    public static String getDescription()
+    {
+        return "No extension methods - just validation";
+    }
+}
+
diff --git a/test/tests/extensions/java/javaRedir1.xml b/test/tests/extensions/java/javaRedir1.xml
new file mode 100644
index 0000000..c4b9cad
--- /dev/null
+++ b/test/tests/extensions/java/javaRedir1.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?> 
+<doc>
+  <foo file="javaRedir1a-from-build-extensions.out">
+    Testing Redirect extension:
+    <bar>A foo subelement text node</bar>
+  </foo>
+  <main>
+    Everything else
+  </main>  
+</doc>
diff --git a/test/tests/extensions/java/javaRedir1.xsl b/test/tests/extensions/java/javaRedir1.xsl
new file mode 100644
index 0000000..f022c52
--- /dev/null
+++ b/test/tests/extensions/java/javaRedir1.xsl
@@ -0,0 +1,65 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+    xmlns:lxslt="http://xml.apache.org/xslt"
+    xmlns:redirect="org.apache.xalan.lib.Redirect"
+    extension-element-prefixes="redirect"
+    exclude-result-prefixes="lxslt">
+
+<!-- Copied from xml-xalan/java/samples/extensions/1-redir.xsl -->
+
+  <lxslt:component prefix="redirect" elements="write open close" functions="">
+    <lxslt:script lang="javaclass" src="org.apache.xalan.lib.Redirect"/>
+  </lxslt:component>  
+    
+  <xsl:template match="/">
+    <standard-out>
+      Standard output:
+      <xsl:apply-templates/>
+    </standard-out>
+  </xsl:template>
+
+  <!-- not redirected -->
+  <xsl:template match="doc/main">
+    <main>
+    -- look in <xsl:value-of select="/doc/foo/@file"/> for the redirected output --
+      <xsl:apply-templates/>
+    </main>
+  </xsl:template>
+  
+  <!-- redirected -->
+  <xsl:template match="doc/foo">
+    <!-- get redirect file name from XML input -->
+    <redirect:write select="@file">
+      <foo-out>
+        <xsl:apply-templates/>
+      </foo-out>
+    </redirect:write>
+  </xsl:template>
+  
+<!-- redirected (from the xsl:apply-templates above. I.e., bar is in /doc/foo -->  
+  <xsl:template match="bar">
+    <foobar-out>
+      <xsl:apply-templates/>
+    </foobar-out>
+  </xsl:template>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/java/javaRedir2.java b/test/tests/extensions/java/javaRedir2.java
new file mode 100644
index 0000000..8a6edc8
--- /dev/null
+++ b/test/tests/extensions/java/javaRedir2.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+// explicitly packageless
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Logger;
+import org.apache.qetest.xsl.StylesheetDatalet;
+import org.apache.qetest.xsl.TestableExtension;
+import org.apache.qetest.xsl.XHTFileCheckService;
+
+import java.io.File; 
+import java.util.Hashtable;
+
+/**
+ * Extension for testing xml-xalan/samples/extensions.  
+ */
+public class javaRedir2 extends TestableExtension
+{
+    /** Note: no actual extension methods here; this class just does validation.  */
+
+    /** Copied from javaRedir2.xml[/doc/list/item].  */
+    public static final String APPEND_WRITE1_NAME = "javaRedir2a-write1.out";
+
+    /** Copied from javaRedir2.xml[/doc/list/item].  */
+    public static final String APPEND_WRITE2_NAME = "javaRedir2a-write2.out";
+
+    /** 
+     * Perform and log any pre-transformation info.  
+     * @return true if OK; false if any fatal error occoured
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static boolean preCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        logger.logMsg(Logger.TRACEMSG, "javaRedir2.preCheck");
+        return true;        
+    }
+    
+
+    /** 
+     * Perform and log any post-transformation info.  
+     * 
+     * The extension should validate that it's extension was 
+     * properly called; we also validate output file(s).
+     * 
+     * @param logger Logger to dump any info to
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static void postCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        logger.logMsg(Logger.TRACEMSG, "javaRedir2.postCheck");
+
+        // First, validate the normal output file the normal way
+        CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+        // Supply default value
+        if (null == fileChecker)
+            fileChecker = new XHTFileCheckService();
+        fileChecker.check(logger,
+                          new File(datalet.outputName), 
+                          new File(datalet.goldName), 
+                          "Extension test of " + datalet.getDescription());
+
+        // Now, also validate the redirected output from multiple files!
+        // REPEAT for inner redirected file
+        String goldRedir = (new File(datalet.goldName)).getParent() 
+                           + File.separator + APPEND_WRITE1_NAME;
+        String outRedir = (new File(datalet.outputName)).getParent() 
+                          + File.separator + APPEND_WRITE1_NAME;
+        fileChecker.check(logger, 
+                          new File(outRedir), 
+                          new File(goldRedir), 
+                          "Redir-Append-Inner-Extension test of " + datalet.getDescription());
+
+        // REPEAT for outer redirected file
+        goldRedir = (new File(datalet.goldName)).getParent() 
+                           + File.separator + APPEND_WRITE2_NAME;
+        outRedir = (new File(datalet.outputName)).getParent() 
+                          + File.separator + APPEND_WRITE2_NAME;
+        fileChecker.check(logger, 
+                          new File(outRedir), 
+                          new File(goldRedir), 
+                          "Redir-AppendOuter-Extension test of " + datalet.getDescription());
+    }
+
+
+    /**
+     * Description of what this extension does.  
+     * @return String description of extension
+     */
+    public static String getDescription()
+    {
+        return "No extension methods - just validation";
+    }
+}
+
diff --git a/test/tests/extensions/java/javaRedir2.xml b/test/tests/extensions/java/javaRedir2.xml
new file mode 100644
index 0000000..c391dd6
--- /dev/null
+++ b/test/tests/extensions/java/javaRedir2.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+<doc>
+  <list>
+    <item file="javaRedir2a-write1.out" append="false">javaRedir2a-write1 append A</item>
+    <item file="javaRedir2a-write1.out" append="true">javaRedir2a-write1 append B</item>
+  </list>
+  <list>
+    <item file="javaRedir2a-write2.out" append="true">javaRedir2a-write2 append 1</item>
+    <item file="javaRedir2a-write2.out">javaRedir2a-write2 append 2</item>
+    <item file="javaRedir2a-write2.out" append="yes">javaRedir2a-write2 append 3</item>
+  </list>
+</doc>
diff --git a/test/tests/extensions/java/javaRedir2.xsl b/test/tests/extensions/java/javaRedir2.xsl
new file mode 100644
index 0000000..404c2b1
--- /dev/null
+++ b/test/tests/extensions/java/javaRedir2.xsl
@@ -0,0 +1,56 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+    xmlns:lxslt="http://xml.apache.org/xslt"
+    xmlns:redirect="org.apache.xalan.lib.Redirect"
+    extension-element-prefixes="redirect"
+    exclude-result-prefixes="lxslt">
+
+
+<!-- Testing redirect:write append="" attribute -->
+
+  <lxslt:component prefix="redirect" elements="write open close" functions="">
+    <lxslt:script lang="javaclass" src="org.apache.xalan.lib.Redirect"/>
+  </lxslt:component>  
+    
+  <xsl:template match="/doc">
+    <standard-out>
+      <p>Standard output:</p>
+      <xsl:apply-templates select="list"/>
+    </standard-out>
+  </xsl:template>
+
+  <xsl:template match="list">
+      <xsl:apply-templates select="item"/>
+  </xsl:template>
+
+  <!-- redirected, using append -->
+  <xsl:template match="item">
+    <!-- Note append is treated as avt -->
+    <redirect:write select="@file" append="{@append}">
+      <item-out>
+        <append><xsl:value-of select="@append"/></append>
+        <data><xsl:value-of select="."/></data>
+      </item-out>
+    </redirect:write>
+  </xsl:template>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/java/javaSample3.java b/test/tests/extensions/java/javaSample3.java
new file mode 100644
index 0000000..816ebf7
--- /dev/null
+++ b/test/tests/extensions/java/javaSample3.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+// explicitly packageless
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Logger;
+import org.apache.qetest.xsl.StylesheetDatalet;
+import org.apache.qetest.xsl.TestableExtension;
+import org.apache.qetest.xsl.XHTFileCheckService;
+
+import java.io.File;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Hashtable;
+
+/**
+ * Extension for testing xml-xalan/samples/extensions.  
+ */
+public class javaSample3 extends TestableExtension
+{
+
+    /** Extension method called from stylesheet.  */
+    public static Date getDate(String year, String month, String day)
+    {
+        // Bump up counter for later validation in postCheck
+        counter++;
+        Calendar c = Calendar.getInstance();
+        // Convert each argument to int.
+        c.set(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day));
+        return c.getTime();
+    }
+
+
+    //// Implementations of TestableExtension
+    /** Simple counter of number of times called.  */    
+    private static int counter = 0;
+    
+
+    /** 
+     * Perform and log any pre-transformation info.  
+     * @return true if OK; false if any fatal error occoured
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static boolean preCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        logger.logMsg(Logger.INFOMSG, "javaSample3.preCheck; counter=" + counter);
+        return true;        
+    }
+    
+
+    /** 
+     * Perform and log any post-transformation info.  
+     * 
+     * The extension should validate that it's extension was 
+     * properly called; we also validate output file.
+     * 
+     * @param logger Logger to dump any info to
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static void postCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        // Verify that we've been called at least once
+        if (counter > 0)
+            logger.checkPass("javaSample3 has been called " + counter + " times");
+        else
+            logger.checkFail("javaSample3 has not been called");
+
+        // We also validate the output file the normal way
+        CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+        // Supply default value
+        if (null == fileChecker)
+            fileChecker = new XHTFileCheckService();
+        if (Logger.PASS_RESULT
+            != fileChecker.check(logger,
+                                 new File(datalet.outputName), 
+                                 new File(datalet.goldName), 
+                                 "Extension test of " + datalet.getDescription())
+           )
+        {
+            // Log a custom element with all the file refs first
+            // Closely related to viewResults.xsl select='fileref"
+            //@todo check that these links are valid when base 
+            //  paths are either relative or absolute!
+            Hashtable attrs = new Hashtable();
+            attrs.put("idref", (new File(datalet.inputName)).getName());
+            attrs.put("inputName", datalet.inputName);
+            attrs.put("xmlName", datalet.xmlName);
+            attrs.put("outputName", datalet.outputName);
+            attrs.put("goldName", datalet.goldName);
+            logger.logElement(Logger.STATUSMSG, "fileref", attrs, "Extension test file references");
+        }
+    }
+
+
+    /**
+     * Description of what this extension does.  
+     * @return String description of extension
+     */
+    public static String getDescription()
+    {
+        return "getDate() returns date for ints";
+    }
+}
+
diff --git a/test/tests/extensions/java/javaSample3.xml b/test/tests/extensions/java/javaSample3.xml
new file mode 100644
index 0000000..e09455c
--- /dev/null
+++ b/test/tests/extensions/java/javaSample3.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+<!-- Copied from: java/samples/extensions/3-java-namespace.xml -->
+   <date
+    year="2001" month="5" day="27"
+    format="EEEE, MMM dd, yyyy"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/java/javaSample3.xsl b/test/tests/extensions/java/javaSample3.xsl
new file mode 100644
index 0000000..1b122d7
--- /dev/null
+++ b/test/tests/extensions/java/javaSample3.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:java="http://xml.apache.org/xslt/java"
+                version="1.0">
+
+<!-- Copied from: java/samples/extensions/3-java-namespace.xsl -->
+<xsl:output method="xml" indent="yes"/>
+                
+  <xsl:template match="/">
+    <out>
+      <xsl:apply-templates select="/doc/date"/> 
+    </out>
+  </xsl:template>
+ 
+  <xsl:template match="date">
+    <xsl:variable name="year" select="string(@year)"/>
+    <xsl:variable name="month" select="string(@month)"/> 
+    <xsl:variable name="day" select="string(@day)"/>          
+    <xsl:variable name="format" select="string(@format)"/>
+    <xsl:variable name="formatter"       
+         select="java:java.text.SimpleDateFormat.new($format)"/>
+    <xsl:variable name="date" 
+         select="java:javaSample3.getDate($year,$month,$day)"/>
+    <p>Format:   <xsl:value-of select="$format"/></p>
+    <p>Date-xml: y:<xsl:value-of select="$year"/> m:<xsl:value-of select="$month"/> d:<xsl:value-of select="$day"/></p>
+    <p>Date-ext: <xsl:value-of select="java:format($formatter, $date)"/></p>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/java/javaSample4.java b/test/tests/extensions/java/javaSample4.java
new file mode 100644
index 0000000..b315554
--- /dev/null
+++ b/test/tests/extensions/java/javaSample4.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+// explicitly packageless
+
+import org.apache.qetest.CheckService;
+import org.apache.qetest.Logger;
+import org.apache.qetest.xsl.StylesheetDatalet;
+import org.apache.qetest.xsl.TestableExtension;
+import org.apache.qetest.xsl.XHTFileCheckService;
+
+import java.io.File;
+import java.util.Hashtable;
+
+/**
+ * Extension for testing xml-xalan/samples/extensions.  
+ */
+public class javaSample4 extends TestableExtension
+{
+    static Hashtable counters = new Hashtable ();
+
+    /** Simple extension method to setup hashtable.  */
+    public void init(org.apache.xalan.extensions.XSLProcessorContext context, 
+                       org.w3c.dom.Element elem)
+    {
+        counter++; // every method call increments plain counter
+        String name = elem.getAttribute("name");
+        String value = elem.getAttribute("value");
+        int val;
+        try
+        {
+            val = Integer.parseInt (value);
+        } 
+        catch (NumberFormatException e)
+        {
+            e.printStackTrace ();
+            val = 0;
+        }
+        counters.put (name, new Integer (val));
+    }
+
+
+    /** Simple extension method to get a value from the hashtable.  */
+    public int read(String name)
+    { 
+        counter++; // every method call increments plain counter
+        Integer cval = (Integer)counters.get(name);
+        return (cval == null) ? 0 : cval.intValue();
+    }
+
+
+    /** Simple extension method to increment a value in the hashtable.  */
+    public void incr(org.apache.xalan.extensions.XSLProcessorContext context,  
+                     org.w3c.dom.Element elem)
+    {
+        counter++; // every method call increments plain counter
+        String name = elem.getAttribute("name");
+        Integer cval = (Integer) counters.get(name);
+        int nval = (cval == null) ? 0 : (cval.intValue () + 1);
+        counters.put (name, new Integer (nval));
+    }
+
+
+    //// Implementations of TestableExtension
+    /** Plain counter of number of times called.  */    
+    private static int counter = 0;
+    
+
+    /** 
+     * Perform and log any pre-transformation info.  
+     * @return true if OK; false if any fatal error occoured
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static boolean preCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        logger.logMsg(Logger.INFOMSG, "javaSample4.preCheck; counter=" + counter);
+        return true;        
+    }
+    
+
+    /** 
+     * Perform and log any post-transformation info.  
+     * 
+     * The extension should validate that it's extension was 
+     * properly called; we also validate output file.
+     * 
+     * @param logger Logger to dump any info to
+     * @param datalet Datalet of current stylesheet test
+     */
+    public static void postCheck(Logger logger, StylesheetDatalet datalet)
+    {
+        // Dump out our hashtable for user analysis
+        logger.logHashtable(Logger.STATUSMSG, counters, "javaSample4.postCheck() counters");
+
+        // Verify that we've been called at least once
+        //@todo update to verify specific number of calls and hash entries
+        if (counter > 0)
+            logger.checkPass("javaSample4 has been called " + counter + " times");
+        else
+            logger.checkFail("javaSample4 has not been called");
+
+        // We also validate the output file the normal way
+        CheckService fileChecker = (CheckService)datalet.options.get("fileCheckerImpl");
+        // Supply default value
+        if (null == fileChecker)
+            fileChecker = new XHTFileCheckService();
+        if (Logger.PASS_RESULT
+            != fileChecker.check(logger,
+                                 new File(datalet.outputName), 
+                                 new File(datalet.goldName), 
+                                 "Extension test of " + datalet.getDescription())
+           )
+        {
+            // Log a custom element with all the file refs first
+            // Closely related to viewResults.xsl select='fileref"
+            //@todo check that these links are valid when base 
+            //  paths are either relative or absolute!
+            Hashtable attrs = new Hashtable();
+            attrs.put("idref", (new File(datalet.inputName)).getName());
+            attrs.put("inputName", datalet.inputName);
+            attrs.put("xmlName", datalet.xmlName);
+            attrs.put("outputName", datalet.outputName);
+            attrs.put("goldName", datalet.goldName);
+            logger.logElement(Logger.STATUSMSG, "fileref", attrs, "Extension test file references");
+        }
+    }
+
+
+    /**
+     * Description of what this extension does.  
+     * @return String description of extension
+     */
+    public static String getDescription()
+    {
+        return "Simple hashtable lookup and counter";
+    }
+}
diff --git a/test/tests/extensions/java/javaSample4.xml b/test/tests/extensions/java/javaSample4.xml
new file mode 100644
index 0000000..76d41c2
--- /dev/null
+++ b/test/tests/extensions/java/javaSample4.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<doc>
+  <name first="Sanjiva" last="Weerawarana"/>
+  <name first="Joseph" last="Kesselman"/>
+  <name first="Stephen" last="Auriemma"/>
+  <name first="Igor" last="Belakovskiy"/>    
+  <name first="David" last="Marston"/>
+  <name first="David" last="Bertoni"/>
+  <name first="Donald" last="Leslie"/>
+  <name first="Emily" last="Farmer"/>
+  <name first="Myriam" last="Midy"/>
+  <name first="Paul" last="Dick"/>
+  <name first="Scott" last="Boag"/>
+  <name first="Shane" last="Curcuru"/>
+  <name first="Marcia" last="Hoffman"/>
+  <name first="Noah" last="Mendelsohn"/>
+  <name first="Alex" last="Morrow"/>    
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/java/javaSample4.xsl b/test/tests/extensions/java/javaSample4.xsl
new file mode 100644
index 0000000..60dcbd1
--- /dev/null
+++ b/test/tests/extensions/java/javaSample4.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:counter="MyCounter"
+                extension-element-prefixes="counter"
+                exclude-result-prefixes="lxslt"
+                version="1.0">
+
+
+  <lxslt:component prefix="counter"
+                   elements="init incr" functions="read">
+    <lxslt:script lang="javaclass" src="javaSample4"/>
+  </lxslt:component>
+
+  <xsl:template match="/">
+    <HTML>
+      <H1>Java Example</H1>
+      <counter:init name="index" value="1"/>
+      <p>Here are the names in alphabetical order by last name:</p>
+      <xsl:for-each select="doc/name">
+        <xsl:sort select="@last"/>
+        <xsl:sort select="@first"/>
+        <p>
+        <xsl:text>[</xsl:text>
+        <xsl:value-of select="counter:read('index')"/>
+        <xsl:text>]. </xsl:text>
+        <xsl:value-of select="@last"/>
+        <xsl:text>, </xsl:text>
+        <xsl:value-of select="@first"/>
+        </p>
+        <counter:incr name="index"/>
+      </xsl:for-each>
+    </HTML>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/javascript/javascriptSample2.xml b/test/tests/extensions/javascript/javascriptSample2.xml
new file mode 100644
index 0000000..9c66ca1
--- /dev/null
+++ b/test/tests/extensions/javascript/javascriptSample2.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<doc>
+  <deadline numdays="2"/>
+</doc>  
+ 
\ No newline at end of file
diff --git a/test/tests/extensions/javascript/javascriptSample2.xsl b/test/tests/extensions/javascript/javascriptSample2.xsl
new file mode 100644
index 0000000..b8a778b
--- /dev/null
+++ b/test/tests/extensions/javascript/javascriptSample2.xsl
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!--Namespaces are global if you set them in the stylesheet element-->
+<xsl:stylesheet 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+    version="1.0"   
+    xmlns:lxslt="http://xml.apache.org/xslt"
+    xmlns:my-ext="ext2"
+    extension-element-prefixes="my-ext">
+    
+<!-- Copied from: java/samples/extensions/5-numlistJscript.xsl -->
+
+  <!--The component and its script are in the lxslt namespace and define the implementation-->
+  <lxslt:component prefix="my-ext" elements="timelapse" functions="getdate">
+    <lxslt:script lang="javascript">
+      var multiplier=1;
+      // Extension element implementations always take two arguments. The first
+      // argument is the XSL Processor context; the second argument is the element.
+      function timelapse(xslProcessorContext, elem)
+      {
+        multiplier=parseInt(elem.getAttribute("multiplier"));
+        // The element return value is placed in the result tree.
+        // If you do not want a return value, return null.
+        return null;
+      }
+      function getdate(numdays)
+      {
+        // Use a constant date so test output is determinate
+        var d = new Date(2001, 8, 5);
+        d.setDate(d.getDate() + parseInt(numdays*multiplier));
+        return d.toLocaleString();
+      }
+    </lxslt:script>
+  </lxslt:component>
+      
+  <xsl:template match="deadline">
+  <out>
+    <p><my-ext:timelapse multiplier="2"/>We have received your enquiry and will 
+      respond by <xsl:value-of select="my-ext:getdate(string(@numdays))"/></p>
+  </out>
+  </xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/javascript/javascriptSample5.xml b/test/tests/extensions/javascript/javascriptSample5.xml
new file mode 100644
index 0000000..76d41c2
--- /dev/null
+++ b/test/tests/extensions/javascript/javascriptSample5.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<doc>
+  <name first="Sanjiva" last="Weerawarana"/>
+  <name first="Joseph" last="Kesselman"/>
+  <name first="Stephen" last="Auriemma"/>
+  <name first="Igor" last="Belakovskiy"/>    
+  <name first="David" last="Marston"/>
+  <name first="David" last="Bertoni"/>
+  <name first="Donald" last="Leslie"/>
+  <name first="Emily" last="Farmer"/>
+  <name first="Myriam" last="Midy"/>
+  <name first="Paul" last="Dick"/>
+  <name first="Scott" last="Boag"/>
+  <name first="Shane" last="Curcuru"/>
+  <name first="Marcia" last="Hoffman"/>
+  <name first="Noah" last="Mendelsohn"/>
+  <name first="Alex" last="Morrow"/>    
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/javascript/javascriptSample5.xsl b/test/tests/extensions/javascript/javascriptSample5.xsl
new file mode 100644
index 0000000..8c6bcfb
--- /dev/null
+++ b/test/tests/extensions/javascript/javascriptSample5.xsl
@@ -0,0 +1,75 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:lxslt="http://xml.apache.org/xslt"
+                xmlns:counter="MyCounter"
+                extension-element-prefixes="counter"
+                version="1.0">
+
+<!-- Copied from: java/samples/extensions/5-numlistJscript.xsl -->
+
+  <lxslt:component prefix="counter"
+                   elements="init incr" functions="read">
+    <lxslt:script lang="javascript">
+      var counters = new Array();
+
+      function init (xslproc, elem) {
+        name = elem.getAttribute ("name");
+        value = parseInt(elem.getAttribute ("value"));
+        counters[name] = value;
+        return null;
+      }
+
+      function read (name) {
+        return "" + (counters[name]);
+      }
+
+      function incr (xslproc, elem)
+      {
+        name = elem.getAttribute ("name");
+        counters[name]++;
+        return null;
+      }
+    </lxslt:script>
+  </lxslt:component>
+
+  <xsl:template match="/">
+    <HTML>
+      <H1>JavaScript Example.</H1>
+      <counter:init name="index" value="1"/>
+      <p>Here are the names in alphabetical order by last name:</p>
+      <xsl:for-each select="doc/name">
+        <xsl:sort select="@last"/>
+        <xsl:sort select="@first"/>
+        <p>
+        <xsl:text>[</xsl:text>
+        <xsl:value-of select="counter:read('index')"/>
+        <xsl:text>]. </xsl:text>
+        <xsl:value-of select="@last"/>
+        <xsl:text>, </xsl:text>
+        <xsl:value-of select="@first"/>
+        </p>
+        <counter:incr name="index"/>
+      </xsl:for-each>
+    </HTML>
+  </xsl:template>
+ 
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryDifference01.xml b/test/tests/extensions/library/libraryDifference01.xml
new file mode 100644
index 0000000..bdd4267
--- /dev/null
+++ b/test/tests/extensions/library/libraryDifference01.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list name="abc">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+  <list name="abc2">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+  <list name="aaa">
+    <item>a</item>
+    <item>a</item>
+    <item>a</item>
+  </list>
+  <list name="xyz">
+    <item>x</item>
+    <item>y</item>
+    <item>z</item>
+  </list>
+  <list name="aab">
+    <item>a</item>
+    <item>a</item>
+    <item>b</item>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryDifference01.xsl b/test/tests/extensions/library/libraryDifference01.xsl
new file mode 100644
index 0000000..90f41b1
--- /dev/null
+++ b/test/tests/extensions/library/libraryDifference01.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xalan"
+    exclude-result-prefixes="xalan">
+<xsl:output indent="yes"/>
+
+  <!-- FileName: libraryDifference01.xsl -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Basic test of difference(ns, ns) extension function -->
+
+<xsl:template match="doc">
+  <out>
+    <test desc="selects abc (abc, xyz)">
+      <xsl:copy-of select="xalan:difference(list[@name='abc']/item, list[@name='xyz']/item)"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:difference(list[@name='abc']/item, list[@name='xyz']/item)"/>
+    </test>
+    <test desc="selects xyz (xyz, abc)">
+      <xsl:copy-of select="xalan:difference(list[@name='xyz']/item, list[@name='abc']/item)"/>
+    </test>
+    <test desc="selects nothing (abc, abc)">
+      <xsl:copy-of select="xalan:difference(list[@name='abc']/item, list[@name='abc']/item)"/>
+    </test>
+    <test desc="selects nothing (abc, abc and parent)">
+      <xsl:copy-of select="xalan:difference(list[@name='abc'], list[@name='abc'])"/>
+    </test>
+    <test desc="selects bc (abc, abc[1])">
+      <xsl:copy-of select="xalan:difference(list[@name='abc']/item, list[@name='abc']/item[1])"/>
+    </test>
+    <test desc="selects nothing (abc[1], abc)">
+      <xsl:copy-of select="xalan:difference(list[@name='abc']/item[1], list[@name='abc']/item)"/>
+    </test>
+    <test desc="selects a (abc[1], abc[2])">
+      <xsl:copy-of select="xalan:difference(list[@name='abc']/item[1], list[@name='abc']/item[2])"/>
+    </test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryDistinct01.xml b/test/tests/extensions/library/libraryDistinct01.xml
new file mode 100644
index 0000000..bdd4267
--- /dev/null
+++ b/test/tests/extensions/library/libraryDistinct01.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list name="abc">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+  <list name="abc2">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+  <list name="aaa">
+    <item>a</item>
+    <item>a</item>
+    <item>a</item>
+  </list>
+  <list name="xyz">
+    <item>x</item>
+    <item>y</item>
+    <item>z</item>
+  </list>
+  <list name="aab">
+    <item>a</item>
+    <item>a</item>
+    <item>b</item>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryDistinct01.xsl b/test/tests/extensions/library/libraryDistinct01.xsl
new file mode 100644
index 0000000..acaa529
--- /dev/null
+++ b/test/tests/extensions/library/libraryDistinct01.xsl
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xalan"
+    exclude-result-prefixes="xalan">
+<!-- Indent just for readability -->    
+<xsl:output indent="yes"/>
+
+  <!-- FileName: libraryDistinct01.xsl -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Basic test of distinct(ns, ns) extension function -->
+
+<xsl:template match="doc">
+  <out>
+    <test desc="selects abc">
+      <xsl:copy-of select="xalan:distinct(list[@name='abc']/item)"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:distinct(list[@name='abc']/item)"/>
+    </test>
+    <test desc="selects a from aaa">
+      <xsl:copy-of select="xalan:distinct(list[@name='aaa']/item)"/>
+    </test>
+    <test desc="selects xyz">
+      <xsl:copy-of select="xalan:distinct(list[@name='xyz']/item)"/>
+    </test>
+    <test desc="selects ab from aab">
+      <xsl:copy-of select="xalan:distinct(list[@name='aab']/item)"/>
+    </test>
+    <test desc="selects abc from abc|abc2">
+      <xsl:copy-of select="xalan:distinct(list[@name='abc']/item | list[@name='abc2']/item)"/>
+    </test>
+    <test desc="selects abcxyz from abc|aab|xyz">
+      <xsl:copy-of select="xalan:distinct(list[@name='abc']/item | list[@name='aab']/item | list[@name='xyz']/item)"/>
+    </test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryEvaluate01.xml b/test/tests/extensions/library/libraryEvaluate01.xml
new file mode 100644
index 0000000..97c237d
--- /dev/null
+++ b/test/tests/extensions/library/libraryEvaluate01.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list>
+    <item number="1">1</item>
+    <item number="2">2</item>
+    <item number="3">3</item>
+    <list>
+      <item number="1">1.1</item>
+      <item number="2">2.2</item>
+      <item number="3">3.3</item>
+      <item number="10">10.01</item>
+    </list>
+    <item number="10">10</item>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryEvaluate01.xsl b/test/tests/extensions/library/libraryEvaluate01.xsl
new file mode 100644
index 0000000..2a9f084
--- /dev/null
+++ b/test/tests/extensions/library/libraryEvaluate01.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xalan"
+    exclude-result-prefixes="xalan">
+
+  <!-- FileName: libraryEvaluate01.xsl -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Basic test of evaluate() extension function -->
+
+<xsl:param name="param1">sum(item)</xsl:param>
+
+<xsl:template match="doc">
+  <out>
+    <sum-expr>
+      <xsl:value-of select="$param1"/>
+    </sum-expr>
+    <xsl:apply-templates select="list"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="list">
+    <xsl:element name="listout">
+      <xsl:attribute name="sum-function">
+        <xsl:value-of select="sum(item)"/>
+      </xsl:attribute>
+      <xsl:attribute name="sum-evaluate">
+        <!-- Use string() to force the variable to be a string to be evaluated -->
+        <xsl:value-of select="xalan:evaluate( string($param1) )"/>
+      </xsl:attribute>
+    <xsl:apply-templates select="list"/>
+    </xsl:element>
+</xsl:template>
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryHasSameNodes01.xml b/test/tests/extensions/library/libraryHasSameNodes01.xml
new file mode 100644
index 0000000..bdd4267
--- /dev/null
+++ b/test/tests/extensions/library/libraryHasSameNodes01.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list name="abc">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+  <list name="abc2">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+  <list name="aaa">
+    <item>a</item>
+    <item>a</item>
+    <item>a</item>
+  </list>
+  <list name="xyz">
+    <item>x</item>
+    <item>y</item>
+    <item>z</item>
+  </list>
+  <list name="aab">
+    <item>a</item>
+    <item>a</item>
+    <item>b</item>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryHasSameNodes01.xsl b/test/tests/extensions/library/libraryHasSameNodes01.xsl
new file mode 100644
index 0000000..c1c48d7
--- /dev/null
+++ b/test/tests/extensions/library/libraryHasSameNodes01.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xalan"
+    exclude-result-prefixes="xalan">
+<xsl:output indent="yes"/>
+
+  <!-- FileName: libraryHasSameNodes01.xsl -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Basic test of hasSameNodes(ns, ns) extension function -->
+
+<xsl:template match="doc">
+  <out>
+    <test desc="selects true (abc, abc)">
+      <xsl:copy-of select="xalan:hasSameNodes(list[@name='abc']/item, list[@name='abc']/item)"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:hasSameNodes(list[@name='abc']/item, list[@name='abc']/item)"/>
+    </test>
+    <test desc="selects true (abc, abc and parent)">
+      <xsl:copy-of select="xalan:hasSameNodes(list[@name='abc'], list[@name='abc'])"/>
+    </test>
+    <test desc="selects false (abc, xyz)">
+      <xsl:copy-of select="xalan:hasSameNodes(list[@name='abc']/item, list[@name='xyz']/item)"/>
+    </test>
+    <test desc="selects false (abc, abc2)">
+      <xsl:copy-of select="xalan:hasSameNodes(list[@name='abc']/item, list[@name='abc2']/item)"/>
+    </test>
+    <test desc="selects false (abc, abc[1])">
+      <xsl:copy-of select="xalan:hasSameNodes(list[@name='abc']/item, list[@name='abc']/item[1])"/>
+    </test>
+    <test desc="selects false (abc[1], abc)">
+      <xsl:copy-of select="xalan:hasSameNodes(list[@name='abc']/item[1], list[@name='abc']/item)"/>
+    </test>
+    <test desc="selects true (abc[1], abc[1])">
+      <xsl:copy-of select="xalan:hasSameNodes(list[@name='abc']/item[1], list[@name='abc']/item[1])"/>
+    </test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryIntersection01.xml b/test/tests/extensions/library/libraryIntersection01.xml
new file mode 100644
index 0000000..bdd4267
--- /dev/null
+++ b/test/tests/extensions/library/libraryIntersection01.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <list name="abc">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+  <list name="abc2">
+    <item>a</item>
+    <item>b</item>
+    <item>c</item>
+  </list>
+  <list name="aaa">
+    <item>a</item>
+    <item>a</item>
+    <item>a</item>
+  </list>
+  <list name="xyz">
+    <item>x</item>
+    <item>y</item>
+    <item>z</item>
+  </list>
+  <list name="aab">
+    <item>a</item>
+    <item>a</item>
+    <item>b</item>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryIntersection01.xsl b/test/tests/extensions/library/libraryIntersection01.xsl
new file mode 100644
index 0000000..a6f80d9
--- /dev/null
+++ b/test/tests/extensions/library/libraryIntersection01.xsl
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xalan"
+    exclude-result-prefixes="xalan">
+<xsl:output indent="yes"/>
+
+  <!-- FileName: libraryIntersection01.xsl -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Basic test of intersection(ns, ns) extension function -->
+
+<xsl:template match="doc">
+  <out>
+    <test desc="selects abc (abc, abc)">
+      <xsl:copy-of select="xalan:intersection(list[@name='abc']/item, list[@name='abc']/item)"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:intersection(list[@name='abc']/item, list[@name='abc']/item)"/>
+    </test>
+    <test desc="selects abc (abc, abc and parent)">
+      <xsl:copy-of select="xalan:intersection(list[@name='abc'], list[@name='abc'])"/>
+    </test>
+    <test desc="selects nothing (abc, xyz)">
+      <xsl:copy-of select="xalan:intersection(list[@name='abc']/item, list[@name='xyz']/item)"/>
+    </test>
+    <test desc="selects nothing (abc, abc2)">
+      <xsl:copy-of select="xalan:intersection(list[@name='abc']/item, list[@name='abc2']/item)"/>
+    </test>
+    <test desc="selects a (abc, abc[1])">
+      <xsl:copy-of select="xalan:intersection(list[@name='abc']/item, list[@name='abc']/item[1])"/>
+    </test>
+    <test desc="selects a (abc[1], abc)">
+      <xsl:copy-of select="xalan:intersection(list[@name='abc']/item[1], list[@name='abc']/item)"/>
+    </test>
+    <test desc="selects a (abc[1], abc[1])">
+      <xsl:copy-of select="xalan:intersection(list[@name='abc']/item[1], list[@name='abc']/item[1])"/>
+    </test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryMath01.xml b/test/tests/extensions/library/libraryMath01.xml
new file mode 100644
index 0000000..d1276f6
--- /dev/null
+++ b/test/tests/extensions/library/libraryMath01.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <num>5</num>
+  <num>0</num>
+  <num>-3</num>
+  <num>5</num>
+  <str>a</str>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryMath01.xsl b/test/tests/extensions/library/libraryMath01.xsl
new file mode 100644
index 0000000..423084b
--- /dev/null
+++ b/test/tests/extensions/library/libraryMath01.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:math="http://exslt.org/math"
+    exclude-result-prefixes="math">
+<xsl:output method="xml" encoding="UTF-8" indent="yes" />
+
+  <!-- FileName: libraryMath01.xsl -->
+  <!-- Creator: Morris Kwan -->
+  <!-- Purpose: Test of the math:min() and math:max() extension functions -->
+
+<xsl:template match="/">
+  <out>
+    <test desc="selects -3">
+      <xsl:value-of select="math:min(/doc/num)"/>
+    </test>
+    <test desc="selects NaN">
+      <xsl:value-of select="math:min(/doc/abc)"/>
+    </test>
+    <test desc="selects NaN">
+      <xsl:value-of select="math:min(/doc/str)"/>
+    </test>
+    <test desc="selects 5">
+      <xsl:value-of select="math:max(/doc/num)"/>
+    </test>
+    <test desc="selects NaN">
+      <xsl:value-of select="math:max(/doc/abc)"/>
+    </test>
+    <test desc="selects NaN">
+      <xsl:value-of select="math:max(/doc/str)"/>
+    </test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryMath02.xml b/test/tests/extensions/library/libraryMath02.xml
new file mode 100644
index 0000000..d1276f6
--- /dev/null
+++ b/test/tests/extensions/library/libraryMath02.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <num>5</num>
+  <num>0</num>
+  <num>-3</num>
+  <num>5</num>
+  <str>a</str>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryMath02.xsl b/test/tests/extensions/library/libraryMath02.xsl
new file mode 100644
index 0000000..712590e
--- /dev/null
+++ b/test/tests/extensions/library/libraryMath02.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:math="http://exslt.org/math"
+    exclude-result-prefixes="math">
+<xsl:output method="xml" encoding="UTF-8" indent="yes" />
+
+  <!-- FileName: libraryMath02.xsl -->
+  <!-- Creator: Morris Kwan -->
+  <!-- Purpose: Test of the math:highest() and math:lowest() extension functions -->
+
+<xsl:template match="/">
+  <out>
+    <test desc="selects 5, 5">
+      <xsl:copy-of select="math:highest(/doc/num)"/>
+    </test>
+    <test desc="selects nothing">
+      <xsl:copy-of select="math:highest(/doc/abc)"/>
+    </test>
+    <test desc="selects nothing">
+      <xsl:copy-of select="math:highest(/doc/str)"/>
+    </test>
+    <test desc="selects -3">
+      <xsl:copy-of select="math:lowest(/doc/num)"/>
+    </test>
+    <test desc="selects nothing">
+      <xsl:copy-of select="math:lowest(/doc/abc)"/>
+    </test>
+    <test desc="selects nothing">
+      <xsl:copy-of select="math:lowest(/doc/str)"/>
+    </test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryNodeset01.xml b/test/tests/extensions/library/libraryNodeset01.xml
new file mode 100644
index 0000000..699839d
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryNodeset01.xsl b/test/tests/extensions/library/libraryNodeset01.xsl
new file mode 100644
index 0000000..db07c94
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset01.xsl
@@ -0,0 +1,128 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:cextend="http://xml.apache.org/xalan"
+		        xmlns:test="http://www.cnn.com"
+        		xmlns:default="http://www.hello.com"
+                exclude-result-prefixes="test default cextend">
+
+  <!-- FileName: libraryNodeset01 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Testing Lotus-specific extension "Nodeset". -->
+ 
+<xsl:strip-space elements="*"/>
+<xsl:output indent="yes"/>
+             
+<xsl:template match="/">
+   <out>
+	  <xsl:variable name="rtf">
+		<docelem xmlns="http://www.hello.com" xmlns:test="http://www.cnn.com">
+			<elem1>
+				<elem1a>ELEMENT1A</elem1a>
+				<elem1b>,ELEMENT1B</elem1b>
+			</elem1>
+			<elem2>
+				<elem2a>ELEMENT2A</elem2a>
+				<elem2b/>
+			</elem2>
+			<elem3>1</elem3>
+			<elem3>2</elem3>
+			<test:elem3/>
+			<elem3>4</elem3>
+			<elem3>5</elem3>
+			<elem4>Yahoo</elem4>
+		</docelem>
+		<docelem>
+			<elem1>
+				<elem2>
+					<elem3 attr1="A" attr2="B" attr3="C">Whooa</elem3>
+					<elem3 attr1="Z" attr2="Y" attr3="X">Aoohw</elem3>
+				</elem2>
+			</elem1>
+		</docelem>
+	  </xsl:variable>
+
+	  <xsl:element name="Count"> 	  
+	  	<xsl:value-of select="count(cextend:nodeset($rtf)/default:docelem/default:elem3)"/>
+	  </xsl:element>
+
+	  <xsl:element name="Sum"> 	  
+	  	<xsl:value-of select="sum(cextend:nodeset($rtf)/default:docelem/default:elem3)"/>
+	  </xsl:element>
+
+	  <xsl:element name="Number"> 	  
+	  	<xsl:value-of select="number(cextend:nodeset($rtf)/default:docelem/default:elem3[2])"/>
+	  </xsl:element>
+
+	  <xsl:element name="Name">  
+	  	<xsl:value-of select="name(cextend:nodeset($rtf)/*)"/>
+	  </xsl:element>
+
+	  <xsl:element name="Local-name">
+	  	<xsl:value-of select="local-name(cextend:nodeset($rtf)/*)"/>
+	  </xsl:element>
+
+	  <xsl:element name="Namespace-URIs">
+	  	<xsl:attribute name="uri1">
+	  		<xsl:value-of select="namespace-uri(cextend:nodeset($rtf)/default:docelem)"/>
+	  	</xsl:attribute>
+	  	<xsl:attribute name="uri2">
+	  		<xsl:value-of select="namespace-uri(cextend:nodeset($rtf)/default:docelem/default:elem1)"/>
+	  	</xsl:attribute>
+	  	<xsl:attribute name="uri3">
+	  		<xsl:value-of select="namespace-uri(cextend:nodeset($rtf)/default:docelem/test:elem3)"/>
+	  	</xsl:attribute>
+	  </xsl:element>
+
+	  <xsl:element name="Value-DOCELEM-Elem1">
+	  	<xsl:value-of select="cextend:nodeset($rtf)/default:docelem/default:elem1"/>
+	  </xsl:element>
+
+	  <xsl:element name="FE-DOCELEM-STAR">
+	  	<xsl:for-each select="cextend:nodeset($rtf)/default:docelem/*">
+		  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+	  	</xsl:for-each>
+	  </xsl:element>
+	   
+	  <xsl:element name="FE-DOCELEM-ELEM2-STAR">
+	  	<xsl:for-each select="cextend:nodeset($rtf)/default:docelem/default:elem2/*">
+		  <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+	  	</xsl:for-each>
+	  </xsl:element>
+
+	  <xsl:element name="AT-DOCELEM-ELEM4">
+	  	<xsl:apply-templates select="cextend:nodeset($rtf)/default:docelem/default:elem4"/>
+	  </xsl:element>
+
+	  <xsl:element name="Copy-of-ELEM1B">
+	  	<xsl:copy-of select="cextend:nodeset($rtf)/default:docelem/default:elem1/default:elem1b"/>
+	  </xsl:element>
+
+   </out>
+</xsl:template>
+
+<xsl:template match="default:elem4">
+	  <xsl:value-of select="."/>
+</xsl:template>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryNodeset02.xml b/test/tests/extensions/library/libraryNodeset02.xml
new file mode 100644
index 0000000..f49c5b5
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset02.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <t0>begin
+    <t1>content1</t1>
+    <t2>content2</t2>
+    <t1>extra1</t1>
+  </t0>
+</doc>
diff --git a/test/tests/extensions/library/libraryNodeset02.xsl b/test/tests/extensions/library/libraryNodeset02.xsl
new file mode 100644
index 0000000..041b0f8
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset02.xsl
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ex="http://xml.apache.org/xalan"
+                extension-element-prefixes="ex">
+
+  <!-- FileName: libraryNodeset02 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that traversal of nodeset of local RTF gets the right one. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="doc">
+  <!-- Define a couple variables -->
+  <xsl:variable name="var1">
+    <t0>var1-begin
+      <t1>var1-first1</t1>
+      <t2>var1-first2</t2>
+      <t1>var1-second1</t1>
+    </t0>
+  </xsl:variable>
+  <xsl:variable name="var2">
+    <t0>var2-begin
+      <t1>var2-first1</t1>
+      <t2>var2-first2</t2>
+      <t1>var2-second1</t1>
+    </t0>
+  </xsl:variable>
+
+  <out>
+    <!-- Now, force evaluation of each of the above variables -->
+    <junk>
+      <xsl:text>$var1 summary: </xsl:text>
+      <xsl:value-of select="$var1"/>
+      <xsl:text>
+</xsl:text>
+      <xsl:text>$var2 summary: </xsl:text>
+      <xsl:value-of select="$var2"/>
+    </junk>
+    <xsl:text>
+</xsl:text>
+    <xsl:text>The preceding::t1 elements in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//t2/preceding::t1">
+      <xsl:value-of select="."/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryNodeset03.xml b/test/tests/extensions/library/libraryNodeset03.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset03.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryNodeset03.xsl b/test/tests/extensions/library/libraryNodeset03.xsl
new file mode 100644
index 0000000..ba21dc2
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset03.xsl
@@ -0,0 +1,264 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:cextend="http://xml.apache.org/xalan"
+				xmlns:default="http://www.hello.com"
+				xmlns:test="http://www.extension03.test"
+				xmlns:BTM="www.btm.com"
+                exclude-result-prefixes="cextend default test BTM">
+
+  <!-- FileName: libraryNodeset03 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 14 Extensions -->
+  <!-- Purpose: Testing Lotus-specific extension "Nodeset". More extensive RTF testing -->
+ 
+<xsl:strip-space elements="*"/>
+<xsl:output indent="yes"/>
+<xsl:variable name="rtf">
+	<docelem>
+		<elem1>
+			<elem2>
+				<elem3 attr1="A" attr2="B" attr3="C">Elem3.1</elem3>
+				<test:elem3 attr1="Z" attr2="Y" attr3="X">NS-Elem3.2</test:elem3>
+				<elem3 attr1="D" attr2="E" attr3="F">Elem3.3</elem3>
+				<test:elem3 attr1="W" attr2="V" attr3="U">NS-Elem3.4</test:elem3>
+			</elem2>
+		</elem1>
+		<elem1>
+			<elem2>1</elem2>
+			<elem2>2</elem2>
+			<elem2>3</elem2>
+			<elem2>4</elem2>
+			<BTM:BreakingTheMold/>
+		</elem1>
+		<elem1>
+			<elem2>
+				<elem4 attr1="G" attr2="H" attr3="I">Elem4.1</elem4>
+				<test:elem4 attr1="T" attr2="S" attr3="R">NS-Elem4.2</test:elem4>
+				<elem4 attr1="J" attr2="K" attr3="L">Elem4.3</elem4>
+				<test:elem4 attr1="Q" attr2="P" attr3="O">NS-Elem4.4</test:elem4>
+			</elem2>
+		</elem1>
+	</docelem>
+	<docelem/>
+	<docelem xmlns="http://www.hello.com">
+		<elem3>1</elem3>
+		<elem3>2</elem3>
+		<test:elem3><elem3a/></test:elem3>
+		<elem3>4</elem3>
+	</docelem>
+ </xsl:variable>
+
+<xsl:template match="/">
+   <out>
+
+	  <xsl:element name="CountDOCELEM">
+		<xsl:value-of select="count(cextend:nodeset($rtf)/docelem)"/>
+	  </xsl:element>
+
+	  <xsl:element name="CountELEM2andELEM3">
+		<xsl:value-of select="count(cextend:nodeset($rtf)/docelem//elem2 |
+									cextend:nodeset($rtf)/docelem//elem3 |
+									cextend:nodeset($rtf)/docelem//test:elem3)"/>
+	  </xsl:element>
+	  <xsl:element name="SumELEM2">
+		<xsl:value-of select="sum(cextend:nodeset($rtf)/docelem/elem1[2]/elem2)"/>
+	  </xsl:element>
+
+	  <xsl:element name="NumberELEM2">
+		<xsl:value-of select="number(cextend:nodeset($rtf)/docelem/elem1[2])"/>
+	  </xsl:element>
+
+	  <xsl:element name="NameBTM">
+		<xsl:value-of select="name(cextend:nodeset($rtf)/docelem/elem1[2]/*[5])"/>
+	  </xsl:element>
+
+	  <xsl:element name="LocalNameBTM">
+		<xsl:value-of select="local-name(cextend:nodeset($rtf)/docelem/elem1[2]/*[5])"/>
+	  </xsl:element>
+
+	  <xsl:element name="Namespace-URIs">
+	  	<xsl:attribute name="uri1">
+	  		<xsl:value-of select="namespace-uri(cextend:nodeset($rtf)/docelem/elem1/elem2/test:elem3)"/>
+	  	</xsl:attribute>
+	  	<xsl:attribute name="uri2">
+	  		<xsl:value-of select="namespace-uri(cextend:nodeset($rtf)/docelem/elem1[2]/*[5])"/>
+	  	</xsl:attribute>
+	  </xsl:element>
+
+	  <xsl:element name="ValueDOCELEM-STAR">
+		<xsl:value-of select="cextend:nodeset($rtf)/docelem/*"/>
+	  </xsl:element>
+
+	  <xsl:element name="ValueELEM4">
+		<xsl:value-of select="cextend:nodeset($rtf)/docelem/elem1/elem2/test:elem4[@attr3='O']"/>
+	  </xsl:element>
+
+	  <xsl:element name="ValueTESTELEM4-1">
+		<xsl:value-of select="cextend:nodeset($rtf)/docelem/elem1/elem2/test:elem4[1]"/>
+	  </xsl:element>
+
+	  <xsl:element name="SlashSlashELEM4">
+		<xsl:value-of select="cextend:nodeset($rtf)//elem4"/>
+	  </xsl:element>
+
+	  <xsl:element name="SlashSlashELEM4-2Attrs-2">
+		<xsl:value-of select="cextend:nodeset($rtf)//test:elem4[2]/@*[2]"/>
+	  </xsl:element>
+
+	  <Axis_Tests>
+	    <xsl:element name="Ancestor">
+		 <xsl:for-each select="cextend:nodeset($rtf)/docelem/elem1[2]/*[5]/ancestor::*">
+		  <xsl:copy/>
+		 </xsl:for-each>
+	    </xsl:element>
+
+	    <xsl:element name="Ancestor-or-Self">
+		 <xsl:for-each select="cextend:nodeset($rtf)//BTM:BreakingTheMold/ancestor-or-self::*">
+		   <xsl:copy/>
+		 </xsl:for-each>	  
+	    </xsl:element>
+
+	    <xsl:element name="Attribute">
+		  <xsl:for-each select="cextend:nodeset($rtf)//test:elem4/attribute::*">
+			<xsl:copy/>
+		  </xsl:for-each>
+	    </xsl:element>
+
+	    <xsl:element name="Child">
+		  <xsl:for-each select="cextend:nodeset($rtf)/docelem/*">
+		  	<xsl:copy/>
+		  </xsl:for-each>
+	    </xsl:element>
+
+	    <xsl:element name="Descendant">
+		  <xsl:for-each select="cextend:nodeset($rtf)/docelem/elem1[2]/descendant::*">
+		  	<xsl:copy/>
+		  </xsl:for-each>
+	    </xsl:element>
+
+	    <xsl:element name="Descendant-or-Self">
+		  <xsl:for-each select="cextend:nodeset($rtf)/docelem/elem1[2]/descendant-or-self::*">
+		  	<xsl:copy/>
+		  </xsl:for-each>
+	    </xsl:element>
+
+	    <xsl:element name="Following">
+		  <xsl:for-each select="cextend:nodeset($rtf)/docelem[2]/elem1[2]/following::*">
+		  	<xsl:copy/>
+		  </xsl:for-each>
+	    </xsl:element>
+
+	    <xsl:element name="Following-Sibling">
+		  <xsl:for-each select="cextend:nodeset($rtf)/docelem[2]/elem1[1]/following-sibling::*">
+		  	<xsl:copy/>
+		  </xsl:for-each>
+	    </xsl:element>
+
+	    <xsl:element name="Namespace">
+		  <xsl:for-each select="cextend:nodeset($rtf)/docelem/elem1/elem2/*/namespace::* |
+		                        cextend:nodeset($rtf)/docelem/elem1/*/namespace::*">
+			<xsl:copy/>
+		  </xsl:for-each>
+	    </xsl:element>
+
+	    <xsl:element name="Parent0">
+		  <xsl:value-of select="name(cextend:nodeset($rtf)/docelem[2]/parent::*)"/>
+	    </xsl:element>
+
+	    <xsl:element name="Parent1">
+		  <xsl:value-of select="name(cextend:nodeset($rtf)/docelem/elem1[3]/elem2/test:elem4[2]/parent::*)"/>
+	    </xsl:element>
+
+	    <xsl:element name="Preceding">
+		  <xsl:value-of select="name(cextend:nodeset($rtf)//test:elem4[2]/preceding::elem1[2]/*/test:elem3[2])"/>
+	    </xsl:element>
+
+	    <xsl:element name="Preceding-Sibling">
+		  <xsl:value-of select="cextend:nodeset($rtf)//BTM:BreakingTheMold/preceding-sibling::*[4]"/>
+	    </xsl:element>
+
+	    <xsl:element name="Self">
+		  <xsl:value-of select="name(cextend:nodeset($rtf)//BTM:BreakingTheMold/self::*)"/>
+	    </xsl:element>
+
+	  </Axis_Tests>
+
+	  <xsl:element name="AT-Elem3-Elem4">
+	 	<xsl:apply-templates select="cextend:nodeset($rtf)/docelem/elem1/elem2/Elem4 |
+	 								 cextend:nodeset($rtf)/docelem/elem1/elem2/Elem3"/>
+	  </xsl:element>
+
+	  <xsl:element name="AT-NSElem3-NSElem4">
+	 	<xsl:apply-templates select="cextend:nodeset($rtf)/docelem/elem1/elem2/test:Elem4 |
+	 								 cextend:nodeset($rtf)/docelem/elem1/elem2/test:Elem3"/>
+	  </xsl:element> 
+	  
+	  <xsl:element name="AT-Elem3-NSElem4">
+	 	<xsl:apply-templates select="cextend:nodeset($rtf)/docelem/elem1/elem2/Elem3 |
+	 								 cextend:nodeset($rtf)/docelem/elem1/elem2/test:Elem4"/>
+	  </xsl:element>	    
+	  
+	  <xsl:element name="FE-FE-AT-Mode">
+		<xsl:for-each select="cextend:nodeset($rtf)/docelem[2]/elem1">
+			<xsl:for-each select="elem2/*">
+				<xsl:apply-templates select="current()" mode="fe"/><xsl:text> </xsl:text>
+			</xsl:for-each>
+		</xsl:for-each>
+	  </xsl:element>
+
+	  <xsl:element name="CopyElem1-1">
+		<xsl:copy-of select="cextend:nodeset($rtf)/docelem/elem1[elem2[Elem3[@attr3='C']]]"/>
+	  </xsl:element>
+
+	  <xsl:element name="CopyElem3-2">
+		<xsl:copy-of select="cextend:nodeset($rtf)/docelem/elem1/elem2/Elem3[2]"/>
+	  </xsl:element>
+
+	  <xsl:element name="Copy-of-RTF">
+	  	<xsl:copy-of select="cextend:nodeset($rtf)/default:docelem"/>
+	  </xsl:element>
+
+	  <xsl:element name="Copy-of-TEST-ELEM3">
+	  	<xsl:copy-of select="cextend:nodeset($rtf)/default:docelem/test:elem3"/>
+	  </xsl:element>
+
+	</out>
+</xsl:template>
+
+<xsl:template match="test:Elem3 | test:Elem4">
+	  <xsl:value-of select="."/><xsl:text> modeless </xsl:text>
+</xsl:template>
+ 
+<xsl:template match="Elem3 | Elem4">
+	  <xsl:value-of select="."/><xsl:text> modeless </xsl:text>
+</xsl:template>
+ 
+<xsl:template match="test:Elem3 | test:Elem4" mode="fe">
+	  <xsl:value-of select="."/><xsl:text> fe </xsl:text>
+</xsl:template>
+ 
+<xsl:template match="Elem3 | Elem4" mode="fe">
+	  <xsl:value-of select="."/><xsl:text> fe </xsl:text>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>		
diff --git a/test/tests/extensions/library/libraryNodeset04.xml b/test/tests/extensions/library/libraryNodeset04.xml
new file mode 100644
index 0000000..f49c5b5
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset04.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<doc>
+  <t0>begin
+    <t1>content1</t1>
+    <t2>content2</t2>
+    <t1>extra1</t1>
+  </t0>
+</doc>
diff --git a/test/tests/extensions/library/libraryNodeset04.xsl b/test/tests/extensions/library/libraryNodeset04.xsl
new file mode 100644
index 0000000..c620ecd
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset04.xsl
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ex="http://xml.apache.org/xalan"
+                extension-element-prefixes="ex">
+
+  <!-- FileName: libraryNodeset04 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Ensure that traversal of nodeset of global RTF gets the right one. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:variable name="top1">
+  <t0>top1-begin
+    <t1>top1-first1</t1>
+    <t2>top1-first2</t2>
+    <t1>top1-second1</t1>
+  </t0>
+</xsl:variable>
+
+<xsl:variable name="top2">
+  <t0>top2-begin
+    <t1>top2-first1</t1>
+    <t2>top2-first2</t2>
+    <t1>top2-second1</t1>
+  </t0>
+</xsl:variable>
+
+<xsl:template match="doc">
+  <out>
+    <!-- First, force evaluation of each variable -->
+    <junk>
+      <xsl:text>$top1 summary: </xsl:text>
+      <xsl:value-of select="$top1"/>
+      <xsl:text>
+</xsl:text>
+      <xsl:text>$top2 summary: </xsl:text>
+      <xsl:value-of select="$top2"/>
+    </junk>
+    <xsl:text>
+</xsl:text>
+    <xsl:text>The preceding::t1 elements in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//t2/preceding::t1">
+      <xsl:value-of select="."/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryNodeset05.xml b/test/tests/extensions/library/libraryNodeset05.xml
new file mode 100644
index 0000000..7d3a1a8
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset05.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="cee" xmlns:n="http://example.com">Source doc, just a distraction
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/extensions/library/libraryNodeset05.xsl b/test/tests/extensions/library/libraryNodeset05.xsl
new file mode 100644
index 0000000..3227333
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset05.xsl
@@ -0,0 +1,304 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ex="http://xml.apache.org/xalan"
+                extension-element-prefixes="ex">
+
+  <!-- FileName: libraryNodeset05 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Creator: Joe Kesselman -->
+  <!-- Purpose: Ensure that applying axes onto nodeset of global RTF gets the right one. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:variable name="top1">
+<t1-far-north>
+  <t1-north>
+    <t1-near-north>
+      <t1-far-west/>
+      <t1-west/>
+      <t1-near-west/>
+      <center center-attr-1="c1" xmlns:n="http://example.com">Wrong variable, can you dig it?
+        <t1-near-south>
+          <t1-south>
+            <t1-far-south/>
+          </t1-south>
+        </t1-near-south>
+      </center>
+      <t1-near-east/>
+      <t1-east/>
+      <t1-far-east/>
+    </t1-near-north>
+  </t1-north>
+</t1-far-north>
+</xsl:variable>
+
+<xsl:variable name="top2">
+<t2-far-north>
+  <t2-north>
+    <t2-near-north>
+      <t2-far-west/>
+      <t2-west/>
+      <t2-near-west/>
+      <center center-attr-1="c2" xmlns:n="http://example.com">Dig we must!
+        <t2-near-south>
+          <t2-south>
+            <t2-far-south/>
+          </t2-south>
+        </t2-near-south>
+      </center>
+      <t2-near-east/>
+      <t2-east/>
+      <t2-far-east/>
+    </t2-near-north>
+  </t2-north>
+</t2-far-north>
+</xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <!-- First, force evaluation of each variable -->
+    <junk>
+      <xsl:text>$top1 summary: </xsl:text>
+      <xsl:value-of select="$top1"/>
+      <xsl:text>
+</xsl:text>
+      <xsl:text>$top2 summary: </xsl:text>
+      <xsl:value-of select="$top2"/>
+    </junk>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>The center nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+
+</xsl:text>
+
+    <xsl:text>W01: center/child::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/child::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W02: center/descendant::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/descendant::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W03: center/parent::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/parent::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W04: center/ancestor::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/ancestor::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W05: center/following-sibling::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/following-sibling::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W06: center/preceding-sibling::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/preceding-sibling::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W07: center/following::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/following::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W08: center/preceding::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/preceding::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W09: center/attribute::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/attribute::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W10: center/namespace::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/namespace::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W11: center/self::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/self::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W12: center/descendant-or-self::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/descendant-or-self::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W13: center/ancestor-or-self::* nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/ancestor-or-self::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+
+</xsl:text>
+    <!-- Above was wildcard, now use name tests -->
+    <xsl:text>N01: center/child::t2-near-south nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/child::t2-near-south">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N02: center/descendant::t2-south nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/descendant::t2-south">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N03: center/parent::t2-near-north nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/parent::t2-near-north">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N04: center/ancestor::t2-north nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/ancestor::t2-north">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N05: center/following-sibling::t2-east nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/following-sibling::t2-east">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N06: center/preceding-sibling::t2-west nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/preceding-sibling::t2-west">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N07: center/following::t2-east nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/following::t2-east">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N08: center/preceding::t2-west nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/preceding::t2-west">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N09: center/attribute::center-attr-1 nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/attribute::center-attr-1">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N10: center/self::center nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/self::center">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N11: center/descendant-or-self::t2-south nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/descendant-or-self::t2-south">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N12: center/ancestor-or-self::t2-north nodes in $top2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($top2)//center/ancestor-or-self::t2-north">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryNodeset06.xml b/test/tests/extensions/library/libraryNodeset06.xml
new file mode 100644
index 0000000..147bca2
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset06.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="cee" xmlns:n="http://example.com">Source doc, just a distraction
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryNodeset06.xsl b/test/tests/extensions/library/libraryNodeset06.xsl
new file mode 100644
index 0000000..7b2a990
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset06.xsl
@@ -0,0 +1,305 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ex="http://xml.apache.org/xalan"
+                extension-element-prefixes="ex">
+
+  <!-- FileName: libraryNodeset06 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Creator: Joe Kesselman -->
+  <!-- Purpose: Ensure that applying axes onto nodeset of local RTF gets the right one. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:variable name="var1">
+    <t1-far-north>
+      <t1-north>
+        <t1-near-north>
+          <t1-far-west/>
+          <t1-west/>
+          <t1-near-west/>
+          <center center-attr-1="c1" xmlns:n="http://example.com">Wrong variable, can you dig it?
+            <t1-near-south>
+              <t1-south>
+                <t1-far-south/>
+              </t1-south>
+            </t1-near-south>
+          </center>
+          <t1-near-east/>
+          <t1-east/>
+          <t1-far-east/>
+        </t1-near-north>
+      </t1-north>
+    </t1-far-north>
+  </xsl:variable>
+
+  <xsl:variable name="var2">
+    <t2-far-north>
+      <t2-north>
+        <t2-near-north>
+          <t2-far-west/>
+          <t2-west/>
+          <t2-near-west/>
+          <center center-attr-1="c2" xmlns:n="http://example.com">Dig we must!
+            <t2-near-south>
+              <t2-south>
+                <t2-far-south/>
+              </t2-south>
+            </t2-near-south>
+          </center>
+          <t2-near-east/>
+          <t2-east/>
+          <t2-far-east/>
+        </t2-near-north>
+      </t2-north>
+    </t2-far-north>
+  </xsl:variable>
+
+  <out>
+    <!-- Now, force evaluation of each of the above variables -->
+    <junk>
+      <xsl:text>$var1 summary: </xsl:text>
+      <xsl:value-of select="$var1"/>
+      <xsl:text>
+</xsl:text>
+
+      <xsl:text>$var2 summary: </xsl:text>
+      <xsl:value-of select="$var2"/>
+    </junk>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>The center nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+
+</xsl:text>
+
+    <xsl:text>W01: center/child::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/child::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W02: center/descendant::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/descendant::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W03: center/parent::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/parent::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W04: center/ancestor::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/ancestor::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W05: center/following-sibling::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/following-sibling::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W06: center/preceding-sibling::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/preceding-sibling::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W07: center/following::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/following::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W08: center/preceding::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/preceding::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W09: center/attribute::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/attribute::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W10: center/namespace::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/namespace::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W11: center/self::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/self::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W12: center/descendant-or-self::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/descendant-or-self::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>W13: center/ancestor-or-self::* nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/ancestor-or-self::*">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+
+</xsl:text>
+    <!-- Above was wildcard, now use name tests -->
+    <xsl:text>N01: center/child::t2-near-south nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/child::t2-near-south">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N02: center/descendant::t2-south nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/descendant::t2-south">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N03: center/parent::t2-near-north nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/parent::t2-near-north">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N04: center/ancestor::t2-north nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/ancestor::t2-north">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N05: center/following-sibling::t2-east nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/following-sibling::t2-east">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N06: center/preceding-sibling::t2-west nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/preceding-sibling::t2-west">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N07: center/following::t2-east nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/following::t2-east">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N08: center/preceding::t2-west nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/preceding::t2-west">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N09: center/attribute::center-attr-1 nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/attribute::center-attr-1">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N10: center/self::center nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/self::center">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N11: center/descendant-or-self::t2-south nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/descendant-or-self::t2-south">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+
+    <xsl:text>N12: center/ancestor-or-self::t2-north nodes in $var2 are </xsl:text>
+    <xsl:for-each select="ex:nodeset($var2)//center/ancestor-or-self::t2-north">
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>,</xsl:text>
+    </xsl:for-each>
+    <xsl:text>
+</xsl:text>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryNodeset07.xml b/test/tests/extensions/library/libraryNodeset07.xml
new file mode 100644
index 0000000..7d3a1a8
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset07.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="cee" xmlns:n="http://example.com">Source doc, just a distraction
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
diff --git a/test/tests/extensions/library/libraryNodeset07.xsl b/test/tests/extensions/library/libraryNodeset07.xsl
new file mode 100644
index 0000000..610e0e8
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset07.xsl
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ex="http://xml.apache.org/xalan"
+                extension-element-prefixes="ex">
+
+  <!-- FileName: libraryNodeset07 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Creator: Joe Kesselman -->
+  <!-- Purpose: Try paths from nodeset of global RTF; ensure we get the right one. -->
+  <!-- Theoretically, we should repeat the whole Axes suite for variables. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:variable name="top1">
+<t1-far-north>
+  <t1-north>
+    <t1-near-north>
+      <t1-far-west/>
+      <t1-west/>
+      <t1-near-west/>
+      <center center-attr-1="c1" xmlns:n="http://example.com">Wrong variable, can you dig it?
+        <t1-near-south>
+          <t1-south>
+            <t1-far-south/>
+          </t1-south>
+        </t1-near-south>
+      </center>
+      <t1-near-east/>
+      <t1-east/>
+      <t1-far-east/>
+    </t1-near-north>
+  </t1-north>
+</t1-far-north>
+</xsl:variable>
+
+<xsl:variable name="top2">
+<t2-far-north>
+  <t2-north>
+    <t2-near-north>
+      <t2-far-west/>
+      <t2-west/>
+      <t2-near-west/>
+      <center center-attr-1="c2" xmlns:n="http://example.com">Dig we must!
+        <t2-near-south>
+          <t2-south>
+            <t2-far-south/>
+          </t2-south>
+        </t2-near-south>
+      </center>
+      <t2-near-east/>
+      <t2-east/>
+      <t2-far-east/>
+    </t2-near-north>
+  </t2-north>
+</t2-far-north>
+</xsl:variable>
+
+<xsl:template match="/">
+  <out>
+    <!-- First, force evaluation of each variable -->
+    <junk>
+      <xsl:text>$top1 summary: </xsl:text>
+      <xsl:value-of select="$top1"/>
+      <xsl:text>
+</xsl:text>
+      <xsl:text>$top2 summary: </xsl:text>
+      <xsl:value-of select="$top2"/>
+    </junk>
+
+    <!-- Now, traverse some axes -->
+    <xsl:apply-templates select="ex:nodeset($top2)//t2-north"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="t2-north">
+  <!-- DS means the location path is optimizable as a single descendant iterator. -->
+DS   1. AC: <xsl:value-of select="name(/descendant-or-self::t2-north)"/>
+DS   2. AD: <xsl:value-of select="name(/descendant::t2-near-north)"/>
+DS   3. BC: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north)"/>
+DS   4. BD: <xsl:value-of select="name(self::node()/descendant::t2-near-north)"/>
+NDS  5. CC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
+NDS  6. CD: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north)"/>
+NDS  7. CE: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north)"/>
+NDS  8. DC: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS  9. DD: <xsl:value-of select="name(descendant::t2-near-north/descendant::t2-far-west)"/>
+
+NDS 10. ACC: <xsl:value-of select="name(/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
+NDS 11. ACE: <xsl:value-of select="name(/descendant-or-self::t2-north/child::t2-near-north)"/>
+NDS 12. ADC: <xsl:value-of select="name(/descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS 13. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
+NDS 14. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north/child::t2-near-north)"/>
+NDS 15. BDC: <xsl:value-of select="name(self::node()/descendant::t2-near-north/descendant-or-self::t2-far-west)"/>
+NDS 16. BDE: <xsl:value-of select="name(self::node()/descendant::t2-near-north/child::t2-far-west)"/>
+NDS 17. CCC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
+NDS 18. CCE: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north/child::t2-near-north)"/>
+NDS 19. CDC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS 20. CDE: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north/child::t2-far-west)"/>
+NDS 21. CEC: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS 22. CEE: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north/child::t2-far-west)"/>
+NDS 23. DCC: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS 24. DCE: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north/child::t2-far-west)"/>
+NDS 25. DDC: <xsl:value-of select="name(descendant::t2-near-north/descendant::t2-far-west/descendant-or-self::t2-far-west)"/>
+
+DS  26. CC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::t2-north)"/>
+DS  27. CD: <xsl:value-of select="name(descendant-or-self::node()/descendant::t2-near-north)"/>
+DS  28. CE: <xsl:value-of select="name(descendant-or-self::node()/child::t2-near-north)"/>
+DS  29. DC: <xsl:value-of select="name(descendant::node()/descendant-or-self::t2-near-north)"/>
+DS  30. DD: <xsl:value-of select="name(descendant::node()/descendant::t2-far-west)"/>
+
+DS  31. ACC: <xsl:value-of select="name(/descendant-or-self::node()/descendant-or-self::t2-north)"/>
+DS  32. ACE: <xsl:value-of select="name(/descendant-or-self::node()/child::t2-near-north)"/>
+DS  33. ADC: <xsl:value-of select="name(/descendant::node()/descendant-or-self::t2-near-north)"/>
+DS  34. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::node()/descendant-or-self::t2-north)"/>
+DS  35. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::node()/child::t2-near-north)"/>
+DS  36. BDC: <xsl:value-of select="name(self::node()/descendant::node()/descendant-or-self::t2-far-west)"/>
+DS  37. BDE: <xsl:value-of select="name(self::node()/descendant::node()/child::t2-far-west)"/>
+DS  38. CCC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/descendant-or-self::t2-north)"/>
+DS  39. CCE: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/child::t2-near-north)"/>
+DS  40. CDC: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/descendant-or-self::t2-near-north)"/>
+DS  41. CDE: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/child::t2-far-west)"/>
+DS  42. CEC: <xsl:value-of select="name(descendant-or-self::node()/child::node()/descendant-or-self::t2-near-north)"/>
+DS  43. CEE: <xsl:value-of select="name(descendant-or-self::node()/child::node()/child::t2-far-west)"/>
+DS  44. DCC: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/descendant-or-self::t2-near-north)"/>
+DS  45. DCE: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/child::t2-far-west)"/>
+DS  46. DDC: <xsl:value-of select="name(descendant::node()/descendant::node()/descendant-or-self::t2-far-west)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryNodeset08.xml b/test/tests/extensions/library/libraryNodeset08.xml
new file mode 100644
index 0000000..147bca2
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset08.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+<far-north>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="cee" xmlns:n="http://example.com">Source doc, just a distraction
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryNodeset08.xsl b/test/tests/extensions/library/libraryNodeset08.xsl
new file mode 100644
index 0000000..81a42b7
--- /dev/null
+++ b/test/tests/extensions/library/libraryNodeset08.xsl
@@ -0,0 +1,148 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ex="http://xml.apache.org/xalan"
+                extension-element-prefixes="ex">
+
+  <!-- FileName: libraryNodeset08 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 11.4 -->
+  <!-- Creator: Joe Kesselman -->
+  <!-- Purpose: Try paths from nodeset of local RTF; ensure we get the right one. -->
+
+<xsl:output method="xml" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/">
+  <xsl:variable name="var1">
+    <t1-far-north>
+      <t1-north>
+        <t1-near-north>
+          <t1-far-west/>
+          <t1-west/>
+          <t1-near-west/>
+          <center center-attr-1="c1" xmlns:n="http://example.com">Wrong variable, can you dig it?
+            <t1-near-south>
+              <t1-south>
+                <t1-far-south/>
+              </t1-south>
+            </t1-near-south>
+          </center>
+          <t1-near-east/>
+          <t1-east/>
+          <t1-far-east/>
+        </t1-near-north>
+      </t1-north>
+    </t1-far-north>
+  </xsl:variable>
+
+  <xsl:variable name="var2">
+    <t2-far-north>
+      <t2-north>
+        <t2-near-north>
+          <t2-far-west/>
+          <t2-west/>
+          <t2-near-west/>
+          <center center-attr-1="c2" xmlns:n="http://example.com">Dig we must!
+            <t2-near-south>
+              <t2-south>
+                <t2-far-south/>
+              </t2-south>
+            </t2-near-south>
+          </center>
+          <t2-near-east/>
+          <t2-east/>
+          <t2-far-east/>
+        </t2-near-north>
+      </t2-north>
+    </t2-far-north>
+  </xsl:variable>
+
+  <out>
+    <!-- Now, force evaluation of each of the above variables -->
+    <junk>
+      <xsl:text>$var1 summary: </xsl:text>
+      <xsl:value-of select="$var1"/>
+      <xsl:text>
+</xsl:text>
+      <xsl:text>$var2 summary: </xsl:text>
+      <xsl:value-of select="$var2"/>
+    </junk>
+
+    <!-- Now, traverse some axes -->
+    <xsl:apply-templates select="ex:nodeset($var2)//t2-north"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="t2-north">
+  <!-- DS means the location path is optimizable as a single descendant iterator. -->
+DS   1. AC: <xsl:value-of select="name(/descendant-or-self::t2-north)"/>
+DS   2. AD: <xsl:value-of select="name(/descendant::t2-near-north)"/>
+DS   3. BC: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north)"/>
+DS   4. BD: <xsl:value-of select="name(self::node()/descendant::t2-near-north)"/>
+NDS  5. CC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
+NDS  6. CD: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north)"/>
+NDS  7. CE: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north)"/>
+NDS  8. DC: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS  9. DD: <xsl:value-of select="name(descendant::t2-near-north/descendant::t2-far-west)"/>
+
+NDS 10. ACC: <xsl:value-of select="name(/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
+NDS 11. ACE: <xsl:value-of select="name(/descendant-or-self::t2-north/child::t2-near-north)"/>
+NDS 12. ADC: <xsl:value-of select="name(/descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS 13. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
+NDS 14. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north/child::t2-near-north)"/>
+NDS 15. BDC: <xsl:value-of select="name(self::node()/descendant::t2-near-north/descendant-or-self::t2-far-west)"/>
+NDS 16. BDE: <xsl:value-of select="name(self::node()/descendant::t2-near-north/child::t2-far-west)"/>
+NDS 17. CCC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
+NDS 18. CCE: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north/child::t2-near-north)"/>
+NDS 19. CDC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS 20. CDE: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north/child::t2-far-west)"/>
+NDS 21. CEC: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS 22. CEE: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north/child::t2-far-west)"/>
+NDS 23. DCC: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north/descendant-or-self::t2-near-north)"/>
+NDS 24. DCE: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north/child::t2-far-west)"/>
+NDS 25. DDC: <xsl:value-of select="name(descendant::t2-near-north/descendant::t2-far-west/descendant-or-self::t2-far-west)"/>
+
+DS  26. CC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::t2-north)"/>
+DS  27. CD: <xsl:value-of select="name(descendant-or-self::node()/descendant::t2-near-north)"/>
+DS  28. CE: <xsl:value-of select="name(descendant-or-self::node()/child::t2-near-north)"/>
+DS  29. DC: <xsl:value-of select="name(descendant::node()/descendant-or-self::t2-near-north)"/>
+DS  30. DD: <xsl:value-of select="name(descendant::node()/descendant::t2-far-west)"/>
+
+DS  31. ACC: <xsl:value-of select="name(/descendant-or-self::node()/descendant-or-self::t2-north)"/>
+DS  32. ACE: <xsl:value-of select="name(/descendant-or-self::node()/child::t2-near-north)"/>
+DS  33. ADC: <xsl:value-of select="name(/descendant::node()/descendant-or-self::t2-near-north)"/>
+DS  34. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::node()/descendant-or-self::t2-north)"/>
+DS  35. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::node()/child::t2-near-north)"/>
+DS  36. BDC: <xsl:value-of select="name(self::node()/descendant::node()/descendant-or-self::t2-far-west)"/>
+DS  37. BDE: <xsl:value-of select="name(self::node()/descendant::node()/child::t2-far-west)"/>
+DS  38. CCC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/descendant-or-self::t2-north)"/>
+DS  39. CCE: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/child::t2-near-north)"/>
+DS  40. CDC: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/descendant-or-self::t2-near-north)"/>
+DS  41. CDE: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/child::t2-far-west)"/>
+DS  42. CEC: <xsl:value-of select="name(descendant-or-self::node()/child::node()/descendant-or-self::t2-near-north)"/>
+DS  43. CEE: <xsl:value-of select="name(descendant-or-self::node()/child::node()/child::t2-far-west)"/>
+DS  44. DCC: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/descendant-or-self::t2-near-north)"/>
+DS  45. DCE: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/child::t2-far-west)"/>
+DS  46. DDC: <xsl:value-of select="name(descendant::node()/descendant::node()/descendant-or-self::t2-far-west)"/>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/librarySet01.xml b/test/tests/extensions/library/librarySet01.xml
new file mode 100644
index 0000000..699dab2
--- /dev/null
+++ b/test/tests/extensions/library/librarySet01.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <num>1</num>
+  <num>2</num>
+  <str>a</str>
+  <num>3</num>
+  <num>4</num>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/librarySet01.xsl b/test/tests/extensions/library/librarySet01.xsl
new file mode 100644
index 0000000..5860910
--- /dev/null
+++ b/test/tests/extensions/library/librarySet01.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:set="http://exslt.org/sets"
+    exclude-result-prefixes="set">
+<xsl:output method="xml" encoding="UTF-8" indent="yes" />
+
+  <!-- FileName: librarySet01.xsl -->
+  <!-- Creator: Morris Kwan -->
+  <!-- Purpose: Test of the set:leading() extension function -->
+
+<xsl:template match="/">
+  <out>
+    <test desc="selects 1, 2">
+      <xsl:copy-of select="set:leading(/doc/*, /doc/str)"/>
+    </test>
+    <test desc="selects 1, 2, a, 3, 4">
+      <xsl:copy-of select="set:leading(/doc/*, /doc/abc)"/>
+    </test>
+    <test desc="selects nothing">
+      <xsl:copy-of select="set:leading(/doc/num, /doc/str)"/>
+    </test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/librarySet02.xml b/test/tests/extensions/library/librarySet02.xml
new file mode 100644
index 0000000..699dab2
--- /dev/null
+++ b/test/tests/extensions/library/librarySet02.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <num>1</num>
+  <num>2</num>
+  <str>a</str>
+  <num>3</num>
+  <num>4</num>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/librarySet02.xsl b/test/tests/extensions/library/librarySet02.xsl
new file mode 100644
index 0000000..b4c46c7
--- /dev/null
+++ b/test/tests/extensions/library/librarySet02.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:set="http://exslt.org/sets"
+    exclude-result-prefixes="set">
+<xsl:output method="xml" encoding="UTF-8" indent="yes" />
+
+  <!-- FileName: librarySet02.xsl -->
+  <!-- Creator: Morris Kwan -->
+  <!-- Purpose: Test of the set:trailing() extension function -->
+
+<xsl:template match="/">
+  <out>
+    <test desc="selects 3, 4">
+      <xsl:copy-of select="set:trailing(/doc/*, /doc/str)"/>
+    </test>
+    <test desc="selects 1, 2, a, 3, 4">
+      <xsl:copy-of select="set:trailing(/doc/*, /doc/abc)"/>
+    </test>
+    <test desc="selects nothing">
+      <xsl:copy-of select="set:trailing(/doc/num, /doc/str)"/>
+    </test>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/library/libraryTokenize01.xml b/test/tests/extensions/library/libraryTokenize01.xml
new file mode 100644
index 0000000..699839d
--- /dev/null
+++ b/test/tests/extensions/library/libraryTokenize01.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/extensions/library/libraryTokenize01.xsl b/test/tests/extensions/library/libraryTokenize01.xsl
new file mode 100644
index 0000000..1ce2e41
--- /dev/null
+++ b/test/tests/extensions/library/libraryTokenize01.xsl
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xalan"
+    exclude-result-prefixes="xalan">
+<!-- Indent just for readability -->    
+<xsl:output indent="yes"/>
+
+  <!-- FileName: libraryTokenize01.xsl -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Creator: Shane Curcuru -->
+  <!-- Purpose: Basic test of tokenize() extension function -->
+
+<xsl:template match="/">
+  <out>
+    <!-- Using copy-of then value-of on the same select= shows that 
+         it's properly returning a node-set each time.
+           copy-of will print out all the nodes' text values in the set
+           value-of will only print the first nodes' text value
+    -->
+    <test desc="simple string, default separators">
+      <xsl:copy-of select="xalan:tokenize('one  two&#x09;three')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:tokenize('one  two&#x09;three')"/>
+    </test>
+    <test desc="simple string, colon separator">
+      <xsl:copy-of select="xalan:tokenize('one  two:three', ':')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:tokenize('one  two:three', ':')"/>
+    </test>
+    <test desc="blank string, default separators">
+      <xsl:copy-of select="xalan:tokenize('')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:tokenize('')"/>
+    </test>
+    <test desc="blank string, blank separators">
+      <xsl:copy-of select="xalan:tokenize('', '')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:tokenize('', '')"/>
+    </test>
+    <test desc="blank string, colon, x are separators">
+      <xsl:copy-of select="xalan:tokenize('', ':x')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:tokenize('', ':x')"/>
+    </test>
+    <test desc="all delimiter string, default separators">
+      <xsl:copy-of select="xalan:tokenize(' &#x09; 
+')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:tokenize(' &#x09; 
+')"/>
+    </test>
+    <test desc="all delimiter string, colon, x are separators">
+      <xsl:copy-of select="xalan:tokenize(':x::xx:', ':x')"/>
+      <xsl:text>, </xsl:text>
+      <xsl:value-of select="xalan:tokenize(':x::xx:', ':x')"/>
+    </test>
+    <!-- Note: null string xalan:tokenize() is not a legal extension call -->
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/property/propertyIndent01.xml b/test/tests/extensions/property/propertyIndent01.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/extensions/property/propertyIndent01.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/extensions/property/propertyIndent01.xsl b/test/tests/extensions/property/propertyIndent01.xsl
new file mode 100644
index 0000000..2a832c9
--- /dev/null
+++ b/test/tests/extensions/property/propertyIndent01.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xslt"
+    exclude-result-prefixes="xalan">
+
+  <!-- FileName: propertyIndent01 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xalan:indent-amount set to 1 -->
+
+<xsl:output method="xml" indent="yes" encoding="UTF-8" xalan:indent-amount="1"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="a">
+      <xsl:element name="b">
+        <xsl:element name="c">
+          <xsl:element name="d">Okay</xsl:element>
+        </xsl:element>
+      </xsl:element>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/property/propertyIndent02.xml b/test/tests/extensions/property/propertyIndent02.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/extensions/property/propertyIndent02.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/extensions/property/propertyIndent02.xsl b/test/tests/extensions/property/propertyIndent02.xsl
new file mode 100644
index 0000000..3cf7809
--- /dev/null
+++ b/test/tests/extensions/property/propertyIndent02.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xslt"
+    exclude-result-prefixes="xalan">
+
+  <!-- FileName: propertyIndent02 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xalan:indent-amount set to 0 -->
+
+<xsl:output method="xml" indent="yes" encoding="UTF-8" xalan:indent-amount="0"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="a">
+      <xsl:element name="b">
+        <xsl:element name="c">
+          <xsl:element name="d">Okay</xsl:element>
+        </xsl:element>
+      </xsl:element>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/extensions/property/propertyIndent03.xml b/test/tests/extensions/property/propertyIndent03.xml
new file mode 100644
index 0000000..7b4f743
--- /dev/null
+++ b/test/tests/extensions/property/propertyIndent03.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc/>
\ No newline at end of file
diff --git a/test/tests/extensions/property/propertyIndent03.xsl b/test/tests/extensions/property/propertyIndent03.xsl
new file mode 100644
index 0000000..7a183f6
--- /dev/null
+++ b/test/tests/extensions/property/propertyIndent03.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xslt"
+    exclude-result-prefixes="xalan">
+
+  <!-- FileName: propertyIndent03 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: Test xalan:indent-amount set to 10 -->
+
+<xsl:output method="xml" indent="yes" encoding="UTF-8" xalan:indent-amount="10"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:element name="a">
+      <xsl:element name="b">
+        <xsl:element name="c">
+          <xsl:element name="d">Okay</xsl:element>
+        </xsl:element>
+      </xsl:element>
+    </xsl:element>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/perf-gold/basic/basic-all_well.out b/test/tests/perf-gold/basic/basic-all_well.out
new file mode 100644
index 0000000..4a31c8a
--- /dev/null
+++ b/test/tests/perf-gold/basic/basic-all_well.out
@@ -0,0 +1,23833 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>All's Well That Ends Well</title>
+</head>
+<body style="
+					background-color: #000000;
+				">
+<div style="
+	 			position: absolute;
+				width: 100%;
+	 			font-family: Arial;
+	 			font-size: 10pt;
+	 			color: #cc6600;
+	 		">
+
+<div style="
+				padding: 2px;
+				padding-left: 1em;
+				font-size: 12pt;
+				background-color: #ff9900;
+				color: #000000;
+			">All's Well That Ends Well</div>
+
+
+ASCII text placed in the public domain by Moby Lexical Tools, 1992.
+SGML markup by Jon Bosak, 1992-1994.
+XML version by Jon Bosak, 1996-1999.
+The XML markup in this version is Copyright &copy; 1999 Jon Bosak.
+This work may freely be distributed on condition that it not be
+modified or altered in any way.
+
+
+
+Dramatis Personae
+
+KING OF FRANCE
+DUKE OF FLORENCE
+BERTRAM, Count of Rousillon.
+LAFEU, an old lord.
+PAROLLES, a follower of Bertram.
+
+
+Steward
+Clown
+servants to the Countess of Rousillon.
+
+
+A Page. 
+COUNTESS OF ROUSILLON, mother to Bertram. 
+HELENA, a gentlewoman protected by the Countess.
+An old Widow of Florence. 
+DIANA, daughter to the Widow.
+
+
+VIOLENTA
+MARIANA
+neighbours and friends to the Widow.
+
+
+Lords, Officers, Soldiers, &amp;c., French and Florentine.
+
+
+<div style="
+				margin-bottom: 1em;
+				padding: 1px;
+				padding-left: 3em;
+				background-color: #cc6600;
+				color: #333333;
+			">SCENE  Rousillon; Paris; Florence; Marseilles.</div>
+
+ALL'S WELL THAT ENDS WELL
+
+<div style="
+				text-align: right;
+			">
+<span style="
+					width: 25%;
+					padding: 1px;
+					padding-right: 1em;
+					color: #000000;
+					background-color: #ff9900;
+				">ACT I</span>
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE I.  Rousillon. The COUNT's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter BERTRAM, the COUNTESS of Rousillon, HELENA,
+and LAFEU, all in black</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In delivering my son from me, I bury a second husband.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And I in going, madam, weep o'er my father's death</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">anew: but I must attend his majesty's command, to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">whom I am now in ward, evermore in subjection.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You shall find of the king a husband, madam; you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sir, a father: he that so generally is at all times</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">good must of necessity hold his virtue to you; whose</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">worthiness would stir it up where it wanted rather</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">than lack it where there is such abundance.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What hope is there of his majesty's amendment?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He hath abandoned his physicians, madam; under whose</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">practises he hath persecuted time with hope, and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">finds no other advantage in the process but only the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">losing of hope by time.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This young gentlewoman had a father,--O, that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'had'! how sad a passage 'tis!--whose skill was</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">almost as great as his honesty; had it stretched so</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">far, would have made nature immortal, and death</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">should have play for lack of work. Would, for the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">king's sake, he were living! I think it would be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the death of the king's disease.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How called you the man you speak of, madam?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He was famous, sir, in his profession, and it was</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his great right to be so: Gerard de Narbon.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He was excellent indeed, madam: the king very</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">lately spoke of him admiringly and mourningly: he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">was skilful enough to have lived still, if knowledge</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">could be set up against mortality.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What is it, my good lord, the king languishes of?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A fistula, my lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I heard not of it before.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would it were not notorious. Was this gentlewoman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the daughter of Gerard de Narbon?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His sole child, my lord, and bequeathed to my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">overlooking. I have those hopes of her good that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">her education promises; her dispositions she</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">inherits, which makes fair gifts fairer; for where</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">an unclean mind carries virtuous qualities, there</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">commendations go with pity; they are virtues and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">traitors too; in her they are the better for their</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">simpleness; she derives her honesty and achieves her goodness.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your commendations, madam, get from her tears.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis the best brine a maiden can season her praise</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in. The remembrance of her father never approaches</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">her heart but the tyranny of her sorrows takes all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">livelihood from her cheek. No more of this, Helena;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">go to, no more; lest it be rather thought you affect</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">a sorrow than have it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I do affect a sorrow indeed, but I have it too.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Moderate lamentation is the right of the dead,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">excessive grief the enemy to the living.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If the living be enemy to the grief, the excess</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">makes it soon mortal.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madam, I desire your holy wishes.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How understand we that?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Be thou blest, Bertram, and succeed thy father</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In manners, as in shape! thy blood and virtue</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Contend for empire in thee, and thy goodness</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Share with thy birthright! Love all, trust a few,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do wrong to none: be able for thine enemy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Rather in power than use, and keep thy friend</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Under thy own life's key: be cheque'd for silence,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But never tax'd for speech. What heaven more will,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That thee may furnish and my prayers pluck down,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Fall on thy head! Farewell, my lord;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis an unseason'd courtier; good my lord,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Advise him.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He cannot want the best</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That shall attend his love.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Heaven bless him! Farewell, Bertram.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To HELENA  The best wishes that can be forged in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">your thoughts be servants to you! Be comfortable</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to my mother, your mistress, and make much of her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Farewell, pretty lady: you must hold the credit of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">your father.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt BERTRAM and LAFEU</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, were that all! I think not on my father;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And these great tears grace his remembrance more</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Than those I shed for him. What was he like?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have forgot him: my imagination</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Carries no favour in't but Bertram's.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am undone: there is no living, none,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If Bertram be away. 'Twere all one</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That I should love a bright particular star</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And think to wed it, he is so above me:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In his bright radiance and collateral light</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Must I be comforted, not in his sphere.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The ambition in my love thus plagues itself:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The hind that would be mated by the lion</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Must die for love. 'Twas pretty, though plague,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To see him every hour; to sit and draw</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His arched brows, his hawking eye, his curls,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In our heart's table; heart too capable</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of every line and trick of his sweet favour:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But now he's gone, and my idolatrous fancy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Must sanctify his reliques. Who comes here?</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter PAROLLES</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Aside</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">One that goes with him: I love him for his sake;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And yet I know him a notorious liar,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Think him a great way fool, solely a coward;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yet these fixed evils sit so fit in him,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That they take place, when virtue's steely bones</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Look bleak i' the cold wind: withal, full oft we see</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Cold wisdom waiting on superfluous folly.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Save you, fair queen!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And you, monarch!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And no.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Are you meditating on virginity?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay. You have some stain of soldier in you: let me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ask you a question. Man is enemy to virginity; how</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">may we barricado it against him?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Keep him out.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But he assails; and our virginity, though valiant,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in the defence yet is weak: unfold to us some</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">warlike resistance.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There is none: man, sitting down before you, will</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">undermine you and blow you up.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bless our poor virginity from underminers and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">blowers up! Is there no military policy, how</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">virgins might blow up men?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Virginity being blown down, man will quicklier be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">blown up: marry, in blowing him down again, with</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the breach yourselves made, you lose your city. It</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">is not politic in the commonwealth of nature to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">preserve virginity. Loss of virginity is rational</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">increase and there was never virgin got till</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">virginity was first lost. That you were made of is</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">metal to make virgins. Virginity by being once lost</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">may be ten times found; by being ever kept, it is</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ever lost: 'tis too cold a companion; away with 't!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will stand for 't a little, though therefore I die a virgin.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's little can be said in 't; 'tis against the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">rule of nature. To speak on the part of virginity,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">is to accuse your mothers; which is most infallible</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">disobedience. He that hangs himself is a virgin:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">virginity murders itself and should be buried in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">highways out of all sanctified limit, as a desperate</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">offendress against nature. Virginity breeds mites,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">much like a cheese; consumes itself to the very</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">paring, and so dies with feeding his own stomach.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Besides, virginity is peevish, proud, idle, made of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">self-love, which is the most inhibited sin in the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">canon. Keep it not; you cannot choose but loose</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">by't: out with 't! within ten year it will make</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">itself ten, which is a goodly increase; and the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">principal itself not much the worse: away with 't!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How might one do, sir, to lose it to her own liking?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let me see: marry, ill, to like him that ne'er it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">likes. 'Tis a commodity will lose the gloss with</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">lying; the longer kept, the less worth: off with 't</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">while 'tis vendible; answer the time of request.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Virginity, like an old courtier, wears her cap out</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of fashion: richly suited, but unsuitable: just</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">like the brooch and the tooth-pick, which wear not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">now. Your date is better in your pie and your</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">porridge than in your cheek; and your virginity,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">your old virginity, is like one of our French</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">withered pears, it looks ill, it eats drily; marry,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'tis a withered pear; it was formerly better;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">marry, yet 'tis a withered pear: will you anything with it?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not my virginity yet</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There shall your master have a thousand loves,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A mother and a mistress and a friend,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A phoenix, captain and an enemy,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A guide, a goddess, and a sovereign,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A counsellor, a traitress, and a dear;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His humble ambition, proud humility,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His jarring concord, and his discord dulcet,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His faith, his sweet disaster; with a world</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of pretty, fond, adoptious christendoms,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That blinking Cupid gossips. Now shall he--</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know not what he shall. God send him well!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The court's a learning place, and he is one--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What one, i' faith?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That I wish well. 'Tis pity--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What's pity?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That wishing well had not a body in't,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which might be felt; that we, the poorer born,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whose baser stars do shut us up in wishes,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Might with effects of them follow our friends,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And show what we alone must think, which never</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Return us thanks.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter Page</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Page</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Monsieur Parolles, my lord calls for you.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Little Helen, farewell; if I can remember thee, I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">will think of thee at court.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Monsieur Parolles, you were born under a charitable star.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Under Mars, I.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I especially think, under Mars.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why under Mars?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The wars have so kept you under that you must needs</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be born under Mars.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When he was predominant.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When he was retrograde, I think, rather.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why think you so?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You go so much backward when you fight.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That's for advantage.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So is running away, when fear proposes the safety;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">but the composition that your valour and fear makes</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in you is a virtue of a good wing, and I like the wear well.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am so full of businesses, I cannot answer thee</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">acutely. I will return perfect courtier; in the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">which, my instruction shall serve to naturalize</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thee, so thou wilt be capable of a courtier's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">counsel and understand what advice shall thrust upon</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thee; else thou diest in thine unthankfulness, and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thine ignorance makes thee away: farewell. When</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thou hast leisure, say thy prayers; when thou hast</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">none, remember thy friends; get thee a good husband,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and use him as he uses thee; so, farewell.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our remedies oft in ourselves do lie,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which we ascribe to heaven: the fated sky</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Gives us free scope, only doth backward pull</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our slow designs when we ourselves are dull.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What power is it which mounts my love so high,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That makes me see, and cannot feed mine eye?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The mightiest space in fortune nature brings</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To join like likes and kiss like native things.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Impossible be strange attempts to those</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That weigh their pains in sense and do suppose</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What hath been cannot be: who ever strove</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So show her merit, that did miss her love?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The king's disease--my project may deceive me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But my intents are fix'd and will not leave me.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE II.  Paris. The KING's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Flourish of cornets. Enter the KING of France,
+with letters, and divers Attendants</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The Florentines and Senoys are by the ears;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Have fought with equal fortune and continue</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A braving war.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So 'tis reported, sir.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, 'tis most credible; we here received it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A certainty, vouch'd from our cousin Austria,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With caution that the Florentine will move us</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For speedy aid; wherein our dearest friend</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Prejudicates the business and would seem</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To have us make denial.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His love and wisdom,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Approved so to your majesty, may plead</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For amplest credence.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He hath arm'd our answer,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And Florence is denied before he comes:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yet, for our gentlemen that mean to see</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The Tuscan service, freely have they leave</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To stand on either part.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It well may serve</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A nursery to our gentry, who are sick</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For breathing and exploit.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What's he comes here?</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter BERTRAM, LAFEU, and PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is the Count Rousillon, my good lord,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Young Bertram.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Youth, thou bear'st thy father's face;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Frank nature, rather curious than in haste,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hath well composed thee. Thy father's moral parts</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Mayst thou inherit too! Welcome to Paris.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My thanks and duty are your majesty's.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would I had that corporal soundness now,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As when thy father and myself in friendship</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">First tried our soldiership! He did look far</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Into the service of the time and was</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Discipled of the bravest: he lasted long;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But on us both did haggish age steal on</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And wore us out of act. It much repairs me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To talk of your good father. In his youth</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He had the wit which I can well observe</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To-day in our young lords; but they may jest</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Till their own scorn return to them unnoted</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ere they can hide their levity in honour;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So like a courtier, contempt nor bitterness</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Were in his pride or sharpness; if they were,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His equal had awaked them, and his honour,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Clock to itself, knew the true minute when</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Exception bid him speak, and at this time</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His tongue obey'd his hand: who were below him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He used as creatures of another place</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And bow'd his eminent top to their low ranks,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Making them proud of his humility,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In their poor praise he humbled. Such a man</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Might be a copy to these younger times;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which, follow'd well, would demonstrate them now</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But goers backward.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His good remembrance, sir,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Lies richer in your thoughts than on his tomb;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So in approof lives not his epitaph</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As in your royal speech.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Would I were with him! He would always say--</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Methinks I hear him now; his plausive words</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He scatter'd not in ears, but grafted them,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To grow there and to bear,--'Let me not live,'--</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This his good melancholy oft began,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">On the catastrophe and heel of pastime,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When it was out,--'Let me not live,' quoth he,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'After my flame lacks oil, to be the snuff</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of younger spirits, whose apprehensive senses</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All but new things disdain; whose judgments are</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Mere fathers of their garments; whose constancies</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Expire before their fashions.' This he wish'd;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I after him do after him wish too,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Since I nor wax nor honey can bring home,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I quickly were dissolved from my hive,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To give some labourers room.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You are loved, sir:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They that least lend it you shall lack you first.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I fill a place, I know't. How long is't, count,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Since the physician at your father's died?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He was much famed.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Some six months since, my lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If he were living, I would try him yet.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Lend me an arm; the rest have worn me out</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With several applications; nature and sickness</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Debate it at their leisure. Welcome, count;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My son's no dearer.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thank your majesty.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt. Flourish</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE III.  Rousillon. The COUNT's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter COUNTESS, Steward, and Clown</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will now hear; what say you of this gentlewoman?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Steward</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madam, the care I have had to even your content, I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">wish might be found in the calendar of my past</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">endeavours; for then we wound our modesty and make</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">foul the clearness of our deservings, when of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ourselves we publish them.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What does this knave here? Get you gone, sirrah:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the complaints I have heard of you I do not all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">believe: 'tis my slowness that I do not; for I know</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">you lack not folly to commit them, and have ability</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">enough to make such knaveries yours.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis not unknown to you, madam, I am a poor fellow.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, sir.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No, madam, 'tis not so well that I am poor, though</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">many of the rich are damned: but, if I may have</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">your ladyship's good will to go to the world, Isbel</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the woman and I will do as we may.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wilt thou needs be a beggar?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I do beg your good will in this case.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In what case?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In Isbel's case and mine own. Service is no</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">heritage: and I think I shall never have the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">blessing of God till I have issue o' my body; for</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">they say barnes are blessings.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Tell me thy reason why thou wilt marry.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My poor body, madam, requires it: I am driven on</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">by the flesh; and he must needs go that the devil drives.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is this all your worship's reason?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Faith, madam, I have other holy reasons such as they</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">are.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May the world know them?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have been, madam, a wicked creature, as you and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">all flesh and blood are; and, indeed, I do marry</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that I may repent.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thy marriage, sooner than thy wickedness.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am out o' friends, madam; and I hope to have</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">friends for my wife's sake.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Such friends are thine enemies, knave.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You're shallow, madam, in great friends; for the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">knaves come to do that for me which I am aweary of.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He that ears my land spares my team and gives me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">leave to in the crop; if I be his cuckold, he's my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">drudge: he that comforts my wife is the cherisher</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of my flesh and blood; he that cherishes my flesh</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and blood loves my flesh and blood; he that loves my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">flesh and blood is my friend: ergo, he that kisses</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">my wife is my friend. If men could be contented to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be what they are, there were no fear in marriage;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">for young Charbon the Puritan and old Poysam the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Papist, howsome'er their hearts are severed in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">religion, their heads are both one; they may jowl</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">horns together, like any deer i' the herd.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wilt thou ever be a foul-mouthed and calumnious knave?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A prophet I, madam; and I speak the truth the next</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">way:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For I the ballad will repeat,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which men full true shall find;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your marriage comes by destiny,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your cuckoo sings by kind.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Get you gone, sir; I'll talk with you more anon.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Steward</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May it please you, madam, that he bid Helen come to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">you: of her I am to speak.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sirrah, tell my gentlewoman I would speak with her;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Helen, I mean.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Was this fair face the cause, quoth she,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why the Grecians sacked Troy?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Fond done, done fond,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Was this King Priam's joy?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With that she sighed as she stood,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With that she sighed as she stood,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And gave this sentence then;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Among nine bad if one be good,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Among nine bad if one be good,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's yet one good in ten.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What, one good in ten? you corrupt the song, sirrah.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">One good woman in ten, madam; which is a purifying</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">o' the song: would God would serve the world so all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the year! we'ld find no fault with the tithe-woman,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">if I were the parson. One in ten, quoth a'! An we</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">might have a good woman born but one every blazing</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">star, or at an earthquake, 'twould mend the lottery</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">well: a man may draw his heart out, ere a' pluck</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">one.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You'll be gone, sir knave, and do as I command you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That man should be at woman's command, and yet no</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hurt done! Though honesty be no puritan, yet it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">will do no hurt; it will wear the surplice of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">humility over the black gown of a big heart. I am</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">going, forsooth: the business is for Helen to come hither.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, now.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Steward</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know, madam, you love your gentlewoman entirely.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Faith, I do: her father bequeathed her to me; and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">she herself, without other advantage, may lawfully</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">make title to as much love as she finds: there is</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">more owing her than is paid; and more shall be paid</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">her than she'll demand.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Steward</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madam, I was very late more near her than I think</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">she wished me: alone she was, and did communicate</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to herself her own words to her own ears; she</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thought, I dare vow for her, they touched not any</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">stranger sense. Her matter was, she loved your son:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Fortune, she said, was no goddess, that had put</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">such difference betwixt their two estates; Love no</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">god, that would not extend his might, only where</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">qualities were level; Dian no queen of virgins, that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">would suffer her poor knight surprised, without</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">rescue in the first assault or ransom afterward.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This she delivered in the most bitter touch of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sorrow that e'er I heard virgin exclaim in: which I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">held my duty speedily to acquaint you withal;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sithence, in the loss that may happen, it concerns</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">you something to know it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You have discharged this honestly; keep it to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">yourself: many likelihoods informed me of this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">before, which hung so tottering in the balance that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I could neither believe nor misdoubt. Pray you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">leave me: stall this in your bosom; and I thank you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">for your honest care: I will speak with you further anon.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit Steward</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Even so it was with me when I was young:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If ever we are nature's, these are ours; this thorn</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Doth to our rose of youth rightly belong;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our blood to us, this to our blood is born;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is the show and seal of nature's truth,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where love's strong passion is impress'd in youth:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By our remembrances of days foregone,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Such were our faults, or then we thought them none.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Her eye is sick on't: I observe her now.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What is your pleasure, madam?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You know, Helen,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am a mother to you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Mine honourable mistress.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, a mother:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why not a mother? When I said 'a mother,'</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Methought you saw a serpent: what's in 'mother,'</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That you start at it? I say, I am your mother;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And put you in the catalogue of those</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That were enwombed mine: 'tis often seen</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Adoption strives with nature and choice breeds</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A native slip to us from foreign seeds:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You ne'er oppress'd me with a mother's groan,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yet I express to you a mother's care:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">God's mercy, maiden! does it curd thy blood</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To say I am thy mother? What's the matter,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That this distemper'd messenger of wet,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The many-colour'd Iris, rounds thine eye?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why? that you are my daughter?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That I am not.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I say, I am your mother.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Pardon, madam;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The Count Rousillon cannot be my brother:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am from humble, he from honour'd name;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No note upon my parents, his all noble:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My master, my dear lord he is; and I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His servant live, and will his vassal die:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He must not be my brother.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nor I your mother?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You are my mother, madam; would you were,--</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So that my lord your son were not my brother,--</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Indeed my mother! or were you both our mothers,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I care no more for than I do for heaven,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So I were not his sister. Can't no other,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But, I your daughter, he must be my brother?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yes, Helen, you might be my daughter-in-law:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">God shield you mean it not! daughter and mother</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So strive upon your pulse. What, pale again?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My fear hath catch'd your fondness: now I see</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The mystery of your loneliness, and find</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your salt tears' head: now to all sense 'tis gross</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You love my son; invention is ashamed,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Against the proclamation of thy passion,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To say thou dost not: therefore tell me true;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But tell me then, 'tis so; for, look thy cheeks</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Confess it, th' one to th' other; and thine eyes</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">See it so grossly shown in thy behaviors</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That in their kind they speak it: only sin</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And hellish obstinacy tie thy tongue,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That truth should be suspected. Speak, is't so?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If it be so, you have wound a goodly clew;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If it be not, forswear't: howe'er, I charge thee,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As heaven shall work in me for thine avail,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Tell me truly.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good madam, pardon me!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do you love my son?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your pardon, noble mistress!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Love you my son?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do not you love him, madam?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go not about; my love hath in't a bond,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whereof the world takes note: come, come, disclose</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The state of your affection; for your passions</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Have to the full appeach'd.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Then, I confess,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here on my knee, before high heaven and you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That before you, and next unto high heaven,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I love your son.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My friends were poor, but honest; so's my love:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Be not offended; for it hurts not him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That he is loved of me: I follow him not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By any token of presumptuous suit;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nor would I have him till I do deserve him;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yet never know how that desert should be.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know I love in vain, strive against hope;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yet in this captious and intenible sieve</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I still pour in the waters of my love</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And lack not to lose still: thus, Indian-like,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Religious in mine error, I adore</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The sun, that looks upon his worshipper,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But knows of him no more. My dearest madam,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let not your hate encounter with my love</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For loving where you do: but if yourself,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whose aged honour cites a virtuous youth,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Did ever in so true a flame of liking</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wish chastely and love dearly, that your Dian</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Was both herself and love: O, then, give pity</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To her, whose state is such that cannot choose</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But lend and give where she is sure to lose;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That seeks not to find that her search implies,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But riddle-like lives sweetly where she dies!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Had you not lately an intent,--speak truly,--</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To go to Paris?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madam, I had.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wherefore? tell true.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will tell truth; by grace itself I swear.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You know my father left me some prescriptions</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of rare and proved effects, such as his reading</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And manifest experience had collected</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For general sovereignty; and that he will'd me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In heedfull'st reservation to bestow them,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As notes whose faculties inclusive were</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">More than they were in note: amongst the rest,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There is a remedy, approved, set down,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To cure the desperate languishings whereof</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The king is render'd lost.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This was your motive</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For Paris, was it? speak.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My lord your son made me to think of this;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Else Paris and the medicine and the king</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Had from the conversation of my thoughts</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Haply been absent then.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But think you, Helen,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If you should tender your supposed aid,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He would receive it? he and his physicians</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Are of a mind; he, that they cannot help him,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They, that they cannot help: how shall they credit</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A poor unlearned virgin, when the schools,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Embowell'd of their doctrine, have left off</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The danger to itself?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's something in't,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">More than my father's skill, which was the greatest</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of his profession, that his good receipt</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall for my legacy be sanctified</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By the luckiest stars in heaven: and, would your honour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But give me leave to try success, I'ld venture</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The well-lost life of mine on his grace's cure</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By such a day and hour.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Dost thou believe't?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, madam, knowingly.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, Helen, thou shalt have my leave and love,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Means and attendants and my loving greetings</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To those of mine in court: I'll stay at home</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And pray God's blessing into thy attempt:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Be gone to-morrow; and be sure of this,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What I can help thee to thou shalt not miss.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+
+
+<div style="
+				text-align: right;
+			">
+<span style="
+					width: 25%;
+					padding: 1px;
+					padding-right: 1em;
+					color: #000000;
+					background-color: #ff9900;
+				">ACT II</span>
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE I.  Paris. The KING's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Flourish of cornets. Enter the KING, attended
+with divers young Lords taking leave for the
+Florentine war; BERTRAM, and PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Farewell, young lords; these warlike principles</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do not throw from you: and you, my lords, farewell:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Share the advice betwixt you; if both gain, all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The gift doth stretch itself as 'tis received,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And is enough for both.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis our hope, sir,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">After well enter'd soldiers, to return</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And find your grace in health.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No, no, it cannot be; and yet my heart</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will not confess he owes the malady</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That doth my life besiege. Farewell, young lords;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whether I live or die, be you the sons</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of worthy Frenchmen: let higher Italy,--</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Those bated that inherit but the fall</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of the last monarchy,--see that you come</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not to woo honour, but to wed it; when</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The bravest questant shrinks, find what you seek,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That fame may cry you loud: I say, farewell.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Health, at your bidding, serve your majesty!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Those girls of Italy, take heed of them:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They say, our French lack language to deny,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If they demand: beware of being captives,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Before you serve.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Both</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our hearts receive your warnings.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Farewell. Come hither to me.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit, attended</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, my sweet lord, that you will stay behind us!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis not his fault, the spark.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, 'tis brave wars!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Most admirable: I have seen those wars.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am commanded here, and kept a coil with</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Too young' and 'the next year' and ''tis too early.'</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">An thy mind stand to't, boy, steal away bravely.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I shall stay here the forehorse to a smock,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Creaking my shoes on the plain masonry,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Till honour be bought up and no sword worn</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But one to dance with! By heaven, I'll steal away.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's honour in the theft.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Commit it, count.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am your accessary; and so, farewell.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I grow to you, and our parting is a tortured body.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Farewell, captain.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sweet Monsieur Parolles!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Noble heroes, my sword and yours are kin. Good</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sparks and lustrous, a word, good metals: you shall</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">find in the regiment of the Spinii one Captain</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Spurio, with his cicatrice, an emblem of war, here</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">on his sinister cheek; it was this very sword</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">entrenched it: say to him, I live; and observe his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">reports for me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We shall, noble captain.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt Lords</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Mars dote on you for his novices! what will ye do?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Stay: the king.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Re-enter KING. BERTRAM and PAROLLES retire</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To BERTRAM  Use a more spacious ceremony to the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">noble lords; you have restrained yourself within the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">list of too cold an adieu: be more expressive to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">them: for they wear themselves in the cap of the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">time, there do muster true gait, eat, speak, and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">move under the influence of the most received star;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and though the devil lead the measure, such are to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be followed: after them, and take a more dilated farewell.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And I will do so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Worthy fellows; and like to prove most sinewy sword-men.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt BERTRAM and PAROLLES</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter LAFEU</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Kneeling  Pardon, my lord, for me and for my tidings.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll fee thee to stand up.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Then here's a man stands, that has brought his pardon.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would you had kneel'd, my lord, to ask me mercy,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And that at my bidding you could so stand up.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would I had; so I had broke thy pate,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And ask'd thee mercy for't.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good faith, across: but, my good lord 'tis thus;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will you be cured of your infirmity?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, will you eat no grapes, my royal fox?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yes, but you will my noble grapes, an if</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My royal fox could reach them: I have seen a medicine</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That's able to breathe life into a stone,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Quicken a rock, and make you dance canary</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With spritely fire and motion; whose simple touch,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is powerful to araise King Pepin, nay,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To give great Charlemain a pen in's hand,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And write to her a love-line.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What 'her' is this?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, Doctor She: my lord, there's one arrived,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If you will see her: now, by my faith and honour,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If seriously I may convey my thoughts</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In this my light deliverance, I have spoke</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With one that, in her sex, her years, profession,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wisdom and constancy, hath amazed me more</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Than I dare blame my weakness: will you see her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For that is her demand, and know her business?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That done, laugh well at me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now, good Lafeu,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bring in the admiration; that we with thee</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May spend our wonder too, or take off thine</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By wondering how thou took'st it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, I'll fit you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And not be all day neither.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thus he his special nothing ever prologues.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Re-enter LAFEU, with HELENA</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, come your ways.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This haste hath wings indeed.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, come your ways:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This is his majesty; say your mind to him:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A traitor you do look like; but such traitors</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His majesty seldom fears: I am Cressid's uncle,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That dare leave two together; fare you well.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now, fair one, does your business follow us?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, my good lord.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Gerard de Narbon was my father;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In what he did profess, well found.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I knew him.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The rather will I spare my praises towards him:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Knowing him is enough. On's bed of death</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Many receipts he gave me: chiefly one.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which, as the dearest issue of his practise,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And of his old experience the oily darling,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He bade me store up, as a triple eye,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Safer than mine own two, more dear; I have so;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And hearing your high majesty is touch'd</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With that malignant cause wherein the honour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of my dear father's gift stands chief in power,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I come to tender it and my appliance</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With all bound humbleness.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We thank you, maiden;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But may not be so credulous of cure,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When our most learned doctors leave us and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The congregated college have concluded</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That labouring art can never ransom nature</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From her inaidible estate; I say we must not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So stain our judgment, or corrupt our hope,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To prostitute our past-cure malady</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To empirics, or to dissever so</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our great self and our credit, to esteem</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A senseless help when help past sense we deem.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My duty then shall pay me for my pains:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will no more enforce mine office on you.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Humbly entreating from your royal thoughts</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A modest one, to bear me back a again.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I cannot give thee less, to be call'd grateful:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou thought'st to help me; and such thanks I give</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As one near death to those that wish him live:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But what at full I know, thou know'st no part,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I knowing all my peril, thou no art.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What I can do can do no hurt to try,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Since you set up your rest 'gainst remedy.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He that of greatest works is finisher</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Oft does them by the weakest minister:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So holy writ in babes hath judgment shown,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When judges have been babes; great floods have flown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From simple sources, and great seas have dried</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When miracles have by the greatest been denied.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Oft expectation fails and most oft there</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where most it promises, and oft it hits</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where hope is coldest and despair most fits.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I must not hear thee; fare thee well, kind maid;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thy pains not used must by thyself be paid:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Proffers not took reap thanks for their reward.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Inspired merit so by breath is barr'd:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is not so with Him that all things knows</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As 'tis with us that square our guess by shows;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But most it is presumption in us when</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The help of heaven we count the act of men.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Dear sir, to my endeavours give consent;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of heaven, not me, make an experiment.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am not an impostor that proclaim</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Myself against the level of mine aim;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But know I think and think I know most sure</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My art is not past power nor you past cure.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Are thou so confident? within what space</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hopest thou my cure?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The great'st grace lending grace</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ere twice the horses of the sun shall bring</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Their fiery torcher his diurnal ring,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ere twice in murk and occidental damp</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Moist Hesperus hath quench'd his sleepy lamp,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Or four and twenty times the pilot's glass</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hath told the thievish minutes how they pass,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What is infirm from your sound parts shall fly,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Health shall live free and sickness freely die.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Upon thy certainty and confidence</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What darest thou venture?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Tax of impudence,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A strumpet's boldness, a divulged shame</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Traduced by odious ballads: my maiden's name</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sear'd otherwise; nay, worse--if worse--extended</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With vilest torture let my life be ended.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Methinks in thee some blessed spirit doth speak</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His powerful sound within an organ weak:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And what impossibility would slay</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In common sense, sense saves another way.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thy life is dear; for all that life can rate</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Worth name of life in thee hath estimate,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Youth, beauty, wisdom, courage, all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That happiness and prime can happy call:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou this to hazard needs must intimate</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Skill infinite or monstrous desperate.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sweet practiser, thy physic I will try,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That ministers thine own death if I die.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If I break time, or flinch in property</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of what I spoke, unpitied let me die,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And well deserved: not helping, death's my fee;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But, if I help, what do you promise me?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Make thy demand.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But will you make it even?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, by my sceptre and my hopes of heaven.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Then shalt thou give me with thy kingly hand</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What husband in thy power I will command:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Exempted be from me the arrogance</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To choose from forth the royal blood of France,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My low and humble name to propagate</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With any branch or image of thy state;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But such a one, thy vassal, whom I know</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is free for me to ask, thee to bestow.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here is my hand; the premises observed,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thy will by my performance shall be served:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So make the choice of thy own time, for I,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thy resolved patient, on thee still rely.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">More should I question thee, and more I must,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Though more to know could not be more to trust,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From whence thou camest, how tended on: but rest</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Unquestion'd welcome and undoubted blest.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Give me some help here, ho! If thou proceed</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As high as word, my deed shall match thy meed.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Flourish. Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE II.  Rousillon. The COUNT's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter COUNTESS and Clown</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come on, sir; I shall now put you to the height of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">your breeding.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will show myself highly fed and lowly taught: I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">know my business is but to the court.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To the court! why, what place make you special,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">when you put off that with such contempt? But to the court!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Truly, madam, if God have lent a man any manners, he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">may easily put it off at court: he that cannot make</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">a leg, put off's cap, kiss his hand and say nothing,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">has neither leg, hands, lip, nor cap; and indeed</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">such a fellow, to say precisely, were not for the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">court; but for me, I have an answer will serve all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">men.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Marry, that's a bountiful answer that fits all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">questions.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is like a barber's chair that fits all buttocks,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the pin-buttock, the quatch-buttock, the brawn</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">buttock, or any buttock.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will your answer serve fit to all questions?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As fit as ten groats is for the hand of an attorney,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">as your French crown for your taffeta punk, as Tib's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">rush for Tom's forefinger, as a pancake for Shrove</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Tuesday, a morris for May-day, as the nail to his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hole, the cuckold to his horn, as a scolding queen</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to a wrangling knave, as the nun's lip to the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">friar's mouth, nay, as the pudding to his skin.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Have you, I say, an answer of such fitness for all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">questions?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From below your duke to beneath your constable, it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">will fit any question.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It must be an answer of most monstrous size that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">must fit all demands.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But a trifle neither, in good faith, if the learned</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">should speak truth of it: here it is, and all that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">belongs to't. Ask me if I am a courtier: it shall</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">do you no harm to learn.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To be young again, if we could: I will be a fool in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">question, hoping to be the wiser by your answer. I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">pray you, sir, are you a courtier?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O Lord, sir! There's a simple putting off. More,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">more, a hundred of them.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir, I am a poor friend of yours, that loves you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O Lord, sir! Thick, thick, spare not me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I think, sir, you can eat none of this homely meat.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O Lord, sir! Nay, put me to't, I warrant you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You were lately whipped, sir, as I think.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O Lord, sir! spare not me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do you cry, 'O Lord, sir!' at your whipping, and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'spare not me?' Indeed your 'O Lord, sir!' is very</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sequent to your whipping: you would answer very well</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to a whipping, if you were but bound to't.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I ne'er had worse luck in my life in my 'O Lord,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sir!' I see things may serve long, but not serve ever.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I play the noble housewife with the time</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To entertain't so merrily with a fool.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O Lord, sir! why, there't serves well again.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">An end, sir; to your business. Give Helen this,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And urge her to a present answer back:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Commend me to my kinsmen and my son:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This is not much.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not much commendation to them.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not much employment for you: you understand me?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Most fruitfully: I am there before my legs.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Haste you again.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt severally</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE III.  Paris. The KING's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter BERTRAM, LAFEU, and PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They say miracles are past; and we have our</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">philosophical persons, to make modern and familiar,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">things supernatural and causeless. Hence is it that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">we make trifles of terrors, ensconcing ourselves</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">into seeming knowledge, when we should submit</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ourselves to an unknown fear.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, 'tis the rarest argument of wonder that hath</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">shot out in our latter times.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And so 'tis.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To be relinquish'd of the artists,--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So I say.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Both of Galen and Paracelsus.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So I say.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of all the learned and authentic fellows,--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Right; so I say.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That gave him out incurable,--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, there 'tis; so say I too.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not to be helped,--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Right; as 'twere, a man assured of a--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Uncertain life, and sure death.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Just, you say well; so would I have said.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I may truly say, it is a novelty to the world.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is, indeed: if you will have it in showing, you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">shall read it in--what do you call there?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A showing of a heavenly effect in an earthly actor.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That's it; I would have said the very same.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, your dolphin is not lustier: 'fore me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I speak in respect--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, 'tis strange, 'tis very strange, that is the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">brief and the tedious of it; and he's of a most</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">facinerious spirit that will not acknowledge it to be the--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Very hand of heaven.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, so I say.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In a most weak--</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">pausing</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and debile minister, great power, great</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">transcendence: which should, indeed, give us a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">further use to be made than alone the recovery of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the king, as to be--</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">pausing</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">generally thankful.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would have said it; you say well. Here comes the king.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter KING, HELENA, and Attendants. LAFEU and
+PAROLLES retire</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Lustig, as the Dutchman says: I'll like a maid the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">better, whilst I have a tooth in my head: why, he's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">able to lead her a coranto.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Mort du vinaigre! is not this Helen?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Fore God, I think so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go, call before me all the lords in court.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sit, my preserver, by thy patient's side;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And with this healthful hand, whose banish'd sense</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou hast repeal'd, a second time receive</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The confirmation of my promised gift,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which but attends thy naming.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter three or four Lords</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Fair maid, send forth thine eye: this youthful parcel</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of noble bachelors stand at my bestowing,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O'er whom both sovereign power and father's voice</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have to use: thy frank election make;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou hast power to choose, and they none to forsake.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To each of you one fair and virtuous mistress</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Fall, when Love please! marry, to each, but one!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'ld give bay Curtal and his furniture,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My mouth no more were broken than these boys',</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And writ as little beard.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Peruse them well:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not one of those but had a noble father.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Gentlemen,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Heaven hath through me restored the king to health.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">All</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We understand it, and thank heaven for you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am a simple maid, and therein wealthiest,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That I protest I simply am a maid.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Please it your majesty, I have done already:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The blushes in my cheeks thus whisper me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'We blush that thou shouldst choose; but, be refused,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let the white death sit on thy cheek for ever;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We'll ne'er come there again.'</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Make choice; and, see,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who shuns thy love shuns all his love in me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now, Dian, from thy altar do I fly,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And to imperial Love, that god most high,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do my sighs stream. Sir, will you hear my suit?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And grant it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thanks, sir; all the rest is mute.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I had rather be in this choice than throw ames-ace</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">for my life.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The honour, sir, that flames in your fair eyes,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Before I speak, too threateningly replies:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Love make your fortunes twenty times above</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Her that so wishes and her humble love!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No better, if you please.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My wish receive,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which great Love grant! and so, I take my leave.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do all they deny her? An they were sons of mine,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'd have them whipped; or I would send them to the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Turk, to make eunuchs of.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Be not afraid that I your hand should take;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll never do you wrong for your own sake:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Blessing upon your vows! and in your bed</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Find fairer fortune, if you ever wed!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">These boys are boys of ice, they'll none have her:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sure, they are bastards to the English; the French</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ne'er got 'em.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You are too young, too happy, and too good,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To make yourself a son out of my blood.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Fourth Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Fair one, I think not so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's one grape yet; I am sure thy father drunk</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">wine: but if thou be'st not an ass, I am a youth</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of fourteen; I have known thee already.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To BERTRAM  I dare not say I take you; but I give</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Me and my service, ever whilst I live,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Into your guiding power. This is the man.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, then, young Bertram, take her; she's thy wife.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My wife, my liege! I shall beseech your highness,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In such a business give me leave to use</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The help of mine own eyes.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Know'st thou not, Bertram,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What she has done for me?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yes, my good lord;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But never hope to know why I should marry her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou know'st she has raised me from my sickly bed.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But follows it, my lord, to bring me down</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Must answer for your raising? I know her well:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She had her breeding at my father's charge.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A poor physician's daughter my wife! Disdain</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Rather corrupt me ever!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis only title thou disdain'st in her, the which</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I can build up. Strange is it that our bloods,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of colour, weight, and heat, pour'd all together,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Would quite confound distinction, yet stand off</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In differences so mighty. If she be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All that is virtuous, save what thou dislikest,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A poor physician's daughter, thou dislikest</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of virtue for the name: but do not so:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From lowest place when virtuous things proceed,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The place is dignified by the doer's deed:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where great additions swell's, and virtue none,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is a dropsied honour. Good alone</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is good without a name. Vileness is so:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The property by what it is should go,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not by the title. She is young, wise, fair;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In these to nature she's immediate heir,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And these breed honour: that is honour's scorn,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which challenges itself as honour's born</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And is not like the sire: honours thrive,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When rather from our acts we them derive</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Than our foregoers: the mere word's a slave</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Debosh'd on every tomb, on every grave</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A lying trophy, and as oft is dumb</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where dust and damn'd oblivion is the tomb</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of honour'd bones indeed. What should be said?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If thou canst like this creature as a maid,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I can create the rest: virtue and she</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is her own dower; honour and wealth from me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I cannot love her, nor will strive to do't.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou wrong'st thyself, if thou shouldst strive to choose.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That you are well restored, my lord, I'm glad:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let the rest go.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My honour's at the stake; which to defeat,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I must produce my power. Here, take her hand,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Proud scornful boy, unworthy this good gift;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That dost in vile misprision shackle up</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My love and her desert; that canst not dream,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We, poising us in her defective scale,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall weigh thee to the beam; that wilt not know,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is in us to plant thine honour where</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We please to have it grow. Cheque thy contempt:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Obey our will, which travails in thy good:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Believe not thy disdain, but presently</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do thine own fortunes that obedient right</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which both thy duty owes and our power claims;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Or I will throw thee from my care for ever</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Into the staggers and the careless lapse</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of youth and ignorance; both my revenge and hate</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Loosing upon thee, in the name of justice,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Without all terms of pity. Speak; thine answer.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Pardon, my gracious lord; for I submit</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My fancy to your eyes: when I consider</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What great creation and what dole of honour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Flies where you bid it, I find that she, which late</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Was in my nobler thoughts most base, is now</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The praised of the king; who, so ennobled,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is as 'twere born so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Take her by the hand,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And tell her she is thine: to whom I promise</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A counterpoise, if not to thy estate</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A balance more replete.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I take her hand.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good fortune and the favour of the king</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Smile upon this contract; whose ceremony</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall seem expedient on the now-born brief,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And be perform'd to-night: the solemn feast</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall more attend upon the coming space,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Expecting absent friends. As thou lovest her,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thy love's to me religious; else, does err.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt all but LAFEU and PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Advancing  Do you hear, monsieur? a word with you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your pleasure, sir?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your lord and master did well to make his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">recantation.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Recantation! My lord! my master!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay; is it not a language I speak?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A most harsh one, and not to be understood without</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">bloody succeeding. My master!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Are you companion to the Count Rousillon?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To any count, to all counts, to what is man.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To what is count's man: count's master is of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">another style.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You are too old, sir; let it satisfy you, you are too old.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I must tell thee, sirrah, I write man; to which</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">title age cannot bring thee.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What I dare too well do, I dare not do.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I did think thee, for two ordinaries, to be a pretty</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">wise fellow; thou didst make tolerable vent of thy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">travel; it might pass: yet the scarfs and the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">bannerets about thee did manifoldly dissuade me from</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">believing thee a vessel of too great a burthen. I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">have now found thee; when I lose thee again, I care</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">not: yet art thou good for nothing but taking up; and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that thou't scarce worth.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hadst thou not the privilege of antiquity upon thee,--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do not plunge thyself too far in anger, lest thou</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hasten thy trial; which if--Lord have mercy on thee</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">for a hen! So, my good window of lattice, fare thee</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">well: thy casement I need not open, for I look</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">through thee. Give me thy hand.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My lord, you give me most egregious indignity.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, with all my heart; and thou art worthy of it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have not, my lord, deserved it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yes, good faith, every dram of it; and I will not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">bate thee a scruple.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, I shall be wiser.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Even as soon as thou canst, for thou hast to pull at</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">a smack o' the contrary. If ever thou be'st bound</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in thy scarf and beaten, thou shalt find what it is</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to be proud of thy bondage. I have a desire to hold</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">my acquaintance with thee, or rather my knowledge,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that I may say in the default, he is a man I know.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My lord, you do me most insupportable vexation.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would it were hell-pains for thy sake, and my poor</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">doing eternal: for doing I am past: as I will by</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thee, in what motion age will give me leave.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, thou hast a son shall take this disgrace off</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">me; scurvy, old, filthy, scurvy lord! Well, I must</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be patient; there is no fettering of authority.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll beat him, by my life, if I can meet him with</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">any convenience, an he were double and double a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">lord. I'll have no more pity of his age than I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">would of--I'll beat him, an if I could but meet him again.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Re-enter LAFEU</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sirrah, your lord and master's married; there's news</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">for you: you have a new mistress.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I most unfeignedly beseech your lordship to make</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">some reservation of your wrongs: he is my good</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">lord: whom I serve above is my master.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who? God?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, sir.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The devil it is that's thy master. Why dost thou</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">garter up thy arms o' this fashion? dost make hose of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sleeves? do other servants so? Thou wert best set</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thy lower part where thy nose stands. By mine</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">honour, if I were but two hours younger, I'ld beat</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thee: methinks, thou art a general offence, and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">every man should beat thee: I think thou wast</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">created for men to breathe themselves upon thee.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This is hard and undeserved measure, my lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go to, sir; you were beaten in Italy for picking a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">kernel out of a pomegranate; you are a vagabond and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">no true traveller: you are more saucy with lords</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and honourable personages than the commission of your</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">birth and virtue gives you heraldry. You are not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">worth another word, else I'ld call you knave. I leave you.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good, very good; it is so then: good, very good;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">let it be concealed awhile.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Re-enter BERTRAM</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Undone, and forfeited to cares for ever!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What's the matter, sweet-heart?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Although before the solemn priest I have sworn,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will not bed her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What, what, sweet-heart?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O my Parolles, they have married me!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll to the Tuscan wars, and never bed her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">France is a dog-hole, and it no more merits</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The tread of a man's foot: to the wars!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's letters from my mother: what the import is,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know not yet.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, that would be known. To the wars, my boy, to the wars!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He wears his honour in a box unseen,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That hugs his kicky-wicky here at home,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Spending his manly marrow in her arms,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which should sustain the bound and high curvet</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of Mars's fiery steed. To other regions</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">France is a stable; we that dwell in't jades;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Therefore, to the war!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It shall be so: I'll send her to my house,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Acquaint my mother with my hate to her,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And wherefore I am fled; write to the king</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That which I durst not speak; his present gift</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall furnish me to those Italian fields,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where noble fellows strike: war is no strife</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To the dark house and the detested wife.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will this capriccio hold in thee? art sure?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go with me to my chamber, and advise me.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll send her straight away: to-morrow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll to the wars, she to her single sorrow.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, these balls bound; there's noise in it. 'Tis hard:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A young man married is a man that's marr'd:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Therefore away, and leave her bravely; go:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The king has done you wrong: but, hush, 'tis so.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE IV.  Paris. The KING's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter HELENA and Clown</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My mother greets me kindly; is she well?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She is not well; but yet she has her health: she's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">very merry; but yet she is not well: but thanks be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">given, she's very well and wants nothing i', the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">world; but yet she is not well.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If she be very well, what does she ail, that she's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">not very well?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Truly, she's very well indeed, but for two things.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What two things?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">One, that she's not in heaven, whither God send her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">quickly! the other that she's in earth, from whence</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">God send her quickly!</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bless you, my fortunate lady!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I hope, sir, I have your good will to have mine own</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">good fortunes.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You had my prayers to lead them on; and to keep them</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">on, have them still. O, my knave, how does my old lady?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So that you had her wrinkles and I her money,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would she did as you say.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, I say nothing.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Marry, you are the wiser man; for many a man's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">tongue shakes out his master's undoing: to say</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">nothing, to do nothing, to know nothing, and to have</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">nothing, is to be a great part of your title; which</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">is within a very little of nothing.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Away! thou'rt a knave.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You should have said, sir, before a knave thou'rt a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">knave; that's, before me thou'rt a knave: this had</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">been truth, sir.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go to, thou art a witty fool; I have found thee.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Did you find me in yourself, sir? or were you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">taught to find me? The search, sir, was profitable;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and much fool may you find in you, even to the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">world's pleasure and the increase of laughter.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A good knave, i' faith, and well fed.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madam, my lord will go away to-night;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A very serious business calls on him.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The great prerogative and rite of love,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which, as your due, time claims, he does acknowledge;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But puts it off to a compell'd restraint;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whose want, and whose delay, is strew'd with sweets,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which they distil now in the curbed time,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To make the coming hour o'erflow with joy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And pleasure drown the brim.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What's his will else?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That you will take your instant leave o' the king</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And make this haste as your own good proceeding,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Strengthen'd with what apology you think</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May make it probable need.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What more commands he?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That, having this obtain'd, you presently</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Attend his further pleasure.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In every thing I wait upon his will.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I shall report it so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I pray you.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come, sirrah.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE V.  Paris. The KING's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter LAFEU and BERTRAM</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But I hope your lordship thinks not him a soldier.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yes, my lord, and of very valiant approof.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You have it from his own deliverance.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And by other warranted testimony.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Then my dial goes not true: I took this lark for a bunting.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I do assure you, my lord, he is very great in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">knowledge and accordingly valiant.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have then sinned against his experience and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">transgressed against his valour; and my state that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">way is dangerous, since I cannot yet find in my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">heart to repent. Here he comes: I pray you, make</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">us friends; I will pursue the amity.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To BERTRAM  These things shall be done, sir.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Pray you, sir, who's his tailor?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, I know him well, I, sir; he, sir, 's a good</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">workman, a very good tailor.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Aside to PAROLLES  Is she gone to the king?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She is.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will she away to-night?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As you'll have her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have writ my letters, casketed my treasure,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Given order for our horses; and to-night,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When I should take possession of the bride,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">End ere I do begin.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A good traveller is something at the latter end of a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">dinner; but one that lies three thirds and uses a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">known truth to pass a thousand nothings with, should</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be once heard and thrice beaten. God save you, captain.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is there any unkindness between my lord and you, monsieur?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know not how I have deserved to run into my lord's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">displeasure.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You have made shift to run into 't, boots and spurs</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and all, like him that leaped into the custard; and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">out of it you'll run again, rather than suffer</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">question for your residence.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It may be you have mistaken him, my lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And shall do so ever, though I took him at 's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">prayers. Fare you well, my lord; and believe this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of me, there can be no kernel in this light nut; the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">soul of this man is his clothes. Trust him not in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">matter of heavy consequence; I have kept of them</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">tame, and know their natures. Farewell, monsieur:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have spoken better of you than you have or will to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">deserve at my hand; but we must do good against evil.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">An idle lord. I swear.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I think so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, do you not know him?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yes, I do know him well, and common speech</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Gives him a worthy pass. Here comes my clog.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter HELENA</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have, sir, as I was commanded from you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Spoke with the king and have procured his leave</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For present parting; only he desires</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Some private speech with you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I shall obey his will.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You must not marvel, Helen, at my course,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which holds not colour with the time, nor does</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The ministration and required office</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">On my particular. Prepared I was not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For such a business; therefore am I found</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So much unsettled: this drives me to entreat you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That presently you take our way for home;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And rather muse than ask why I entreat you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For my respects are better than they seem</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And my appointments have in them a need</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Greater than shows itself at the first view</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To you that know them not. This to my mother:</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Giving a letter</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Twill be two days ere I shall see you, so</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I leave you to your wisdom.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir, I can nothing say,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But that I am your most obedient servant.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come, come, no more of that.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And ever shall</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With true observance seek to eke out that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wherein toward me my homely stars have fail'd</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To equal my great fortune.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let that go:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My haste is very great: farewell; hie home.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Pray, sir, your pardon.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, what would you say?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am not worthy of the wealth I owe,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nor dare I say 'tis mine, and yet it is;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But, like a timorous thief, most fain would steal</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What law does vouch mine own.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What would you have?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Something; and scarce so much: nothing, indeed.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would not tell you what I would, my lord:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Faith yes;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Strangers and foes do sunder, and not kiss.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I pray you, stay not, but in haste to horse.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I shall not break your bidding, good my lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where are my other men, monsieur? Farewell.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go thou toward home; where I will never come</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whilst I can shake my sword or hear the drum.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Away, and for our flight.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bravely, coragio!</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+
+
+<div style="
+				text-align: right;
+			">
+<span style="
+					width: 25%;
+					padding: 1px;
+					padding-right: 1em;
+					color: #000000;
+					background-color: #ff9900;
+				">ACT III</span>
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE I.  Florence. The DUKE's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Flourish. Enter the DUKE of Florence attended;
+the two Frenchmen, with a troop of soldiers.</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">DUKE</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So that from point to point now have you heard</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The fundamental reasons of this war,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whose great decision hath much blood let forth</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And more thirsts after.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Holy seems the quarrel</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Upon your grace's part; black and fearful</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">On the opposer.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DUKE</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Therefore we marvel much our cousin France</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Would in so just a business shut his bosom</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Against our borrowing prayers.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good my lord,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The reasons of our state I cannot yield,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But like a common and an outward man,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That the great figure of a council frames</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By self-unable motion: therefore dare not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Say what I think of it, since I have found</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Myself in my incertain grounds to fail</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As often as I guess'd.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DUKE</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Be it his pleasure.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But I am sure the younger of our nature,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That surfeit on their ease, will day by day</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come here for physic.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DUKE</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Welcome shall they be;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And all the honours that can fly from us</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall on them settle. You know your places well;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When better fall, for your avails they fell:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To-morrow to the field.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Flourish. Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE II.  Rousillon. The COUNT's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter COUNTESS and Clown</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It hath happened all as I would have had it, save</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that he comes not along with her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By my troth, I take my young lord to be a very</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">melancholy man.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By what observance, I pray you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, he will look upon his boot and sing; mend the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ruff and sing; ask questions and sing; pick his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">teeth and sing. I know a man that had this trick of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">melancholy sold a goodly manor for a song.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let me see what he writes, and when he means to come.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Opening a letter</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have no mind to Isbel since I was at court: our</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">old ling and our Isbels o' the country are nothing</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">like your old ling and your Isbels o' the court:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the brains of my Cupid's knocked out, and I begin to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">love, as an old man loves money, with no stomach.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What have we here?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">E'en that you have there.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reads  I have sent you a daughter-in-law: she hath</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">recovered the king, and undone me. I have wedded</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">her, not bedded her; and sworn to make the 'not'</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">eternal. You shall hear I am run away: know it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">before the report come. If there be breadth enough</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in the world, I will hold a long distance. My duty</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to you. Your unfortunate son,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">BERTRAM.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This is not well, rash and unbridled boy.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To fly the favours of so good a king;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To pluck his indignation on thy head</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By the misprising of a maid too virtuous</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For the contempt of empire.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Re-enter Clown</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O madam, yonder is heavy news within between two</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">soldiers and my young lady!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What is the matter?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, there is some comfort in the news, some</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">comfort; your son will not be killed so soon as I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thought he would.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why should he be killed?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So say I, madam, if he run away, as I hear he does:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the danger is in standing to't; that's the loss of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">men, though it be the getting of children. Here</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">they come will tell you more: for my part, I only</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hear your son was run away.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter HELENA, and two Gentlemen</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">First Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Save you, good madam.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madam, my lord is gone, for ever gone.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do not say so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Think upon patience. Pray you, gentlemen,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have felt so many quirks of joy and grief,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That the first face of neither, on the start,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Can woman me unto't: where is my son, I pray you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madam, he's gone to serve the duke of Florence:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We met him thitherward; for thence we came,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And, after some dispatch in hand at court,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thither we bend again.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Look on his letter, madam; here's my passport.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Reads</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When thou canst get the ring upon my finger which</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">never shall come off, and show me a child begotten</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of thy body that I am father to, then call me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">husband: but in such a 'then' I write a 'never.'</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This is a dreadful sentence.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Brought you this letter, gentlemen?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, madam;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And for the contents' sake are sorry for our pain.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I prithee, lady, have a better cheer;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If thou engrossest all the griefs are thine,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou robb'st me of a moiety: he was my son;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But I do wash his name out of my blood,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And thou art all my child. Towards Florence is he?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, madam.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And to be a soldier?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Such is his noble purpose; and believe 't,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The duke will lay upon him all the honour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That good convenience claims.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Return you thither?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, madam, with the swiftest wing of speed.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reads  Till I have no wife I have nothing in France.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis bitter.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Find you that there?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, madam.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis but the boldness of his hand, haply, which his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">heart was not consenting to.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nothing in France, until he have no wife!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's nothing here that is too good for him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But only she; and she deserves a lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That twenty such rude boys might tend upon</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And call her hourly mistress. Who was with him?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A servant only, and a gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which I have sometime known.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Parolles, was it not?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, my good lady, he.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A very tainted fellow, and full of wickedness.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My son corrupts a well-derived nature</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With his inducement.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Indeed, good lady,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The fellow has a deal of that too much,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which holds him much to have.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You're welcome, gentlemen.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will entreat you, when you see my son,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To tell him that his sword can never win</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The honour that he loses: more I'll entreat you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Written to bear along.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We serve you, madam,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In that and all your worthiest affairs.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not so, but as we change our courtesies.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will you draw near!</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt COUNTESS and Gentlemen</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Till I have no wife, I have nothing in France.'</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nothing in France, until he has no wife!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou shalt have none, Rousillon, none in France;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Then hast thou all again. Poor lord! is't I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That chase thee from thy country and expose</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Those tender limbs of thine to the event</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of the none-sparing war? and is it I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That drive thee from the sportive court, where thou</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wast shot at with fair eyes, to be the mark</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of smoky muskets? O you leaden messengers,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That ride upon the violent speed of fire,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Fly with false aim; move the still-peering air,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That sings with piercing; do not touch my lord.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whoever shoots at him, I set him there;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whoever charges on his forward breast,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am the caitiff that do hold him to't;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And, though I kill him not, I am the cause</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His death was so effected: better 'twere</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I met the ravin lion when he roar'd</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With sharp constraint of hunger; better 'twere</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That all the miseries which nature owes</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Were mine at once. No, come thou home, Rousillon,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whence honour but of danger wins a scar,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As oft it loses all: I will be gone;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My being here it is that holds thee hence:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall I stay here to do't?  no, no, although</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The air of paradise did fan the house</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And angels officed all: I will be gone,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That pitiful rumour may report my flight,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To consolate thine ear. Come, night; end, day!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For with the dark, poor thief, I'll steal away.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE III.  Florence. Before the DUKE's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Flourish. Enter the DUKE of Florence, BERTRAM,
+PAROLLES, Soldiers, Drum, and Trumpets</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">DUKE</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The general of our horse thou art; and we,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Great in our hope, lay our best love and credence</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Upon thy promising fortune.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir, it is</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A charge too heavy for my strength, but yet</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We'll strive to bear it for your worthy sake</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To the extreme edge of hazard.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DUKE</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Then go thou forth;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And fortune play upon thy prosperous helm,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As thy auspicious mistress!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This very day,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Great Mars, I put myself into thy file:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Make me but like my thoughts, and I shall prove</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A lover of thy drum, hater of love.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE IV.  Rousillon. The COUNT's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter COUNTESS and Steward</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Alas! and would you take the letter of her?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Might you not know she would do as she has done,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By sending me a letter? Read it again.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Steward</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reads</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am Saint Jaques' pilgrim, thither gone:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ambitious love hath so in me offended,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That barefoot plod I the cold ground upon,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With sainted vow my faults to have amended.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Write, write, that from the bloody course of war</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My dearest master, your dear son, may hie:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bless him at home in peace, whilst I from far</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His name with zealous fervor sanctify:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His taken labours bid him me forgive;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I, his despiteful Juno, sent him forth</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From courtly friends, with camping foes to live,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where death and danger dogs the heels of worth:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He is too good and fair for death and me:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whom I myself embrace, to set him free.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ah, what sharp stings are in her mildest words!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Rinaldo, you did never lack advice so much,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As letting her pass so: had I spoke with her,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I could have well diverted her intents,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which thus she hath prevented.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Steward</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Pardon me, madam:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If I had given you this at over-night,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She might have been o'erta'en; and yet she writes,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Pursuit would be but vain.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What angel shall</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bless this unworthy husband? he cannot thrive,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Unless her prayers, whom heaven delights to hear</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And loves to grant, reprieve him from the wrath</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of greatest justice. Write, write, Rinaldo,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To this unworthy husband of his wife;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let every word weigh heavy of her worth</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That he does weigh too light: my greatest grief.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Though little he do feel it, set down sharply.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Dispatch the most convenient messenger:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When haply he shall hear that she is gone,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He will return; and hope I may that she,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hearing so much, will speed her foot again,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Led hither by pure love: which of them both</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is dearest to me. I have no skill in sense</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To make distinction: provide this messenger:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My heart is heavy and mine age is weak;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Grief would have tears, and sorrow bids me speak.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE V.  Florence. Without the walls. A tucket afar off.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter an old Widow of Florence, DIANA, VIOLENTA,
+and MARIANA, with other Citizens</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, come; for if they do approach the city, we</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">shall lose all the sight.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They say the French count has done most honourable service.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is reported that he has taken their greatest</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">commander; and that with his own hand he slew the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">duke's brother.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Tucket</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We have lost our labour; they are gone a contrary</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">way: hark! you may know by their trumpets.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">MARIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come, let's return again, and suffice ourselves with</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the report of it. Well, Diana, take heed of this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">French earl: the honour of a maid is her name; and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">no legacy is so rich as honesty.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have told my neighbour how you have been solicited</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">by a gentleman his companion.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">MARIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know that knave; hang him! one Parolles: a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">filthy officer he is in those suggestions for the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">young earl. Beware of them, Diana; their promises,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">enticements, oaths, tokens, and all these engines of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">lust, are not the things they go under: many a maid</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hath been seduced by them; and the misery is,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">example, that so terrible shows in the wreck of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">maidenhood, cannot for all that dissuade succession,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">but that they are limed with the twigs that threaten</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">them. I hope I need not to advise you further; but</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I hope your own grace will keep you where you are,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">though there were no further danger known but the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">modesty which is so lost.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You shall not need to fear me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I hope so.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter HELENA, disguised like a Pilgrim</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Look, here comes a pilgrim: I know she will lie at</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">my house; thither they send one another: I'll</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">question her. God save you, pilgrim! whither are you bound?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To Saint Jaques le Grand.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where do the palmers lodge, I do beseech you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">At the Saint Francis here beside the port.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is this the way?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, marry, is't.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">A march afar</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hark you! they come this way.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If you will tarry, holy pilgrim,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But till the troops come by,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will conduct you where you shall be lodged;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The rather, for I think I know your hostess</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As ample as myself.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is it yourself?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If you shall please so, pilgrim.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I thank you, and will stay upon your leisure.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You came, I think, from France?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I did so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here you shall see a countryman of yours</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That has done worthy service.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His name, I pray you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The Count Rousillon: know you such a one?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But by the ear, that hears most nobly of him:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His face I know not.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whatsome'er he is,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He's bravely taken here. He stole from France,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As 'tis reported, for the king had married him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Against his liking: think you it is so?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, surely, mere the truth: I know his lady.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There is a gentleman that serves the count</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reports but coarsely of her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What's his name?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Monsieur Parolles.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, I believe with him,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In argument of praise, or to the worth</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of the great count himself, she is too mean</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To have her name repeated: all her deserving</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is a reserved honesty, and that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have not heard examined.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Alas, poor lady!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis a hard bondage to become the wife</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of a detesting lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I warrant, good creature, wheresoe'er she is,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Her heart weighs sadly: this young maid might do her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A shrewd turn, if she pleased.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How do you mean?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May be the amorous count solicits her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In the unlawful purpose.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He does indeed;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And brokes with all that can in such a suit</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Corrupt the tender honour of a maid:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But she is arm'd for him and keeps her guard</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In honestest defence.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">MARIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The gods forbid else!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So, now they come:</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Drum and Colours</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter BERTRAM, PAROLLES, and the whole army</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That is Antonio, the duke's eldest son;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That, Escalus.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which is the Frenchman?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That with the plume: 'tis a most gallant fellow.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would he loved his wife: if he were honester</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He were much goodlier: is't not a handsome gentleman?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I like him well.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis pity he is not honest: yond's that same knave</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That leads him to these places: were I his lady,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would Poison that vile rascal.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which is he?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That jack-an-apes with scarfs: why is he melancholy?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Perchance he's hurt i' the battle.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Lose our drum! well.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">MARIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He's shrewdly vexed at something: look, he has spied us.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Marry, hang you!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">MARIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And your courtesy, for a ring-carrier!</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt BERTRAM, PAROLLES, and army</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The troop is past. Come, pilgrim, I will bring you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where you shall host: of enjoin'd penitents</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's four or five, to great Saint Jaques bound,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Already at my house.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I humbly thank you:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Please it this matron and this gentle maid</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To eat with us to-night, the charge and thanking</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall be for me; and, to requite you further,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will bestow some precepts of this virgin</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Worthy the note.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BOTH</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We'll take your offer kindly.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE VI.  Camp before Florence.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter BERTRAM and the two French Lords</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, good my lord, put him to't; let him have his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">way.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If your lordship find him not a hilding, hold me no</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">more in your respect.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">On my life, my lord, a bubble.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do you think I am so far deceived in him?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Believe it, my lord, in mine own direct knowledge,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">without any malice, but to speak of him as my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">kinsman, he's a most notable coward, an infinite and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">endless liar, an hourly promise-breaker, the owner</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of no one good quality worthy your lordship's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">entertainment.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It were fit you knew him; lest, reposing too far in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his virtue, which he hath not, he might at some</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">great and trusty business in a main danger fail you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would I knew in what particular action to try him.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">None better than to let him fetch off his drum,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">which you hear him so confidently undertake to do.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I, with a troop of Florentines, will suddenly</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">surprise him; such I will have, whom I am sure he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">knows not from the enemy: we will bind and hoodwink</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">him so, that he shall suppose no other but that he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">is carried into the leaguer of the adversaries, when</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">we bring him to our own tents. Be but your lordship</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">present at his examination: if he do not, for the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">promise of his life and in the highest compulsion of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">base fear, offer to betray you and deliver all the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">intelligence in his power against you, and that with</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the divine forfeit of his soul upon oath, never</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">trust my judgment in any thing.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, for the love of laughter, let him fetch his drum;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">he says he has a stratagem for't: when your</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">lordship sees the bottom of his success in't, and to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">what metal this counterfeit lump of ore will be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">melted, if you give him not John Drum's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">entertainment, your inclining cannot be removed.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here he comes.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Aside to BERTRAM  O, for the love of laughter,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hinder not the honour of his design: let him fetch</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">off his drum in any hand.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How now, monsieur! this drum sticks sorely in your</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">disposition.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A pox on't, let it go; 'tis but a drum.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'But a drum'! is't 'but a drum'? A drum so lost!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There was excellent command,--to charge in with our</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">horse upon our own wings, and to rend our own soldiers!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That was not to be blamed in the command of the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">service: it was a disaster of war that Caesar</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">himself could not have prevented, if he had been</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">there to command.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, we cannot greatly condemn our success: some</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">dishonour we had in the loss of that drum; but it is</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">not to be recovered.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It might have been recovered.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It might; but it is not now.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is to be recovered: but that the merit of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">service is seldom attributed to the true and exact</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">performer, I would have that drum or another, or</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'hic jacet.'</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, if you have a stomach, to't, monsieur: if you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">think your mystery in stratagem can bring this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">instrument of honour again into his native quarter,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be magnanimous in the enterprise and go on; I will</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">grace the attempt for a worthy exploit: if you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">speed well in it, the duke shall both speak of it.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and extend to you what further becomes his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">greatness, even to the utmost syllable of your</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">worthiness.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By the hand of a soldier, I will undertake it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But you must not now slumber in it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll about it this evening: and I will presently</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">pen down my dilemmas, encourage myself in my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">certainty, put myself into my mortal preparation;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and by midnight look to hear further from me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May I be bold to acquaint his grace you are gone about it?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know not what the success will be, my lord; but</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the attempt I vow.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know thou'rt valiant; and, to the possibility of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thy soldiership, will subscribe for thee. Farewell.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I love not many words.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No more than a fish loves water. Is not this a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">strange fellow, my lord, that so confidently seems</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to undertake this business, which he knows is not to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be done; damns himself to do and dares better be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">damned than to do't?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You do not know him, my lord, as we do: certain it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">is that he will steal himself into a man's favour and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">for a week escape a great deal of discoveries; but</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">when you find him out, you have him ever after.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, do you think he will make no deed at all of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">this that so seriously he does address himself unto?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">None in the world; but return with an invention and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">clap upon you two or three probable lies: but we</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">have almost embossed him; you shall see his fall</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to-night; for indeed he is not for your lordship's respect.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We'll make you some sport with the fox ere we case</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">him. He was first smoked by the old lord Lafeu:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">when his disguise and he is parted, tell me what a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sprat you shall find him; which you shall see this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">very night.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I must go look my twigs: he shall be caught.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your brother he shall go along with me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As't please your lordship: I'll leave you.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now will I lead you to the house, and show you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The lass I spoke of.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But you say she's honest.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That's all the fault: I spoke with her but once</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And found her wondrous cold; but I sent to her,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By this same coxcomb that we have i' the wind,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Tokens and letters which she did re-send;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And this is all I have done. She's a fair creature:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will you go see her?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With all my heart, my lord.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE VII.  Florence. The Widow's house.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter HELENA and Widow</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If you misdoubt me that I am not she,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know not how I shall assure you further,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But I shall lose the grounds I work upon.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Though my estate be fallen, I was well born,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nothing acquainted with these businesses;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And would not put my reputation now</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In any staining act.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nor would I wish you.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">First, give me trust, the count he is my husband,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And what to your sworn counsel I have spoken</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is so from word to word; and then you cannot,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By the good aid that I of you shall borrow,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Err in bestowing it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I should believe you:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For you have show'd me that which well approves</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You're great in fortune.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Take this purse of gold,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And let me buy your friendly help thus far,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which I will over-pay and pay again</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When I have found it. The count he wooes your daughter,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Lays down his wanton siege before her beauty,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Resolved to carry her: let her in fine consent,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As we'll direct her how 'tis best to bear it.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now his important blood will nought deny</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That she'll demand: a ring the county wears,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That downward hath succeeded in his house</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From son to son, some four or five descents</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Since the first father wore it: this ring he holds</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In most rich choice; yet in his idle fire,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To buy his will, it would not seem too dear,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Howe'er repented after.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now I see</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The bottom of your purpose.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You see it lawful, then: it is no more,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But that your daughter, ere she seems as won,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Desires this ring; appoints him an encounter;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In fine, delivers me to fill the time,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Herself most chastely absent: after this,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To marry her, I'll add three thousand crowns</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To what is passed already.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have yielded:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Instruct my daughter how she shall persever,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That time and place with this deceit so lawful</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May prove coherent. Every night he comes</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With musics of all sorts and songs composed</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To her unworthiness: it nothing steads us</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To chide him from our eaves; for he persists</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As if his life lay on't.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why then to-night</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let us assay our plot; which, if it speed,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is wicked meaning in a lawful deed</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And lawful meaning in a lawful act,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where both not sin, and yet a sinful fact:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But let's about it.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+
+
+<div style="
+				text-align: right;
+			">
+<span style="
+					width: 25%;
+					padding: 1px;
+					padding-right: 1em;
+					color: #000000;
+					background-color: #ff9900;
+				">ACT IV</span>
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE I.  Without the Florentine camp.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter Second French Lord, with five or six other
+Soldiers in ambush</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He can come no other way but by this hedge-corner.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When you sally upon him, speak what terrible</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">language you will: though you understand it not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">yourselves, no matter; for we must not seem to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">understand him, unless some one among us whom we</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">must produce for an interpreter.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good captain, let me be the interpreter.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Art not acquainted with him? knows he not thy voice?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No, sir, I warrant you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But what linsey-woolsey hast thou to speak to us again?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">E'en such as you speak to me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He must think us some band of strangers i' the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">adversary's entertainment. Now he hath a smack of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">all neighbouring languages; therefore we must every</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">one be a man of his own fancy, not to know what we</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">speak one to another; so we seem to know, is to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">know straight our purpose: choughs' language,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">gabble enough, and good enough. As for you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">interpreter, you must seem very politic. But couch,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ho! here he comes, to beguile two hours in a sleep,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and then to return and swear the lies he forges.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ten o'clock: within these three hours 'twill be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">time enough to go home. What shall I say I have</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">done? It must be a very plausive invention that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">carries it: they begin to smoke me; and disgraces</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">have of late knocked too often at my door. I find</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">my tongue is too foolhardy; but my heart hath the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">fear of Mars before it and of his creatures, not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">daring the reports of my tongue.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This is the first truth that e'er thine own tongue</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">was guilty of.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What the devil should move me to undertake the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">recovery of this drum, being not ignorant of the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">impossibility, and knowing I had no such purpose? I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">must give myself some hurts, and say I got them in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">exploit: yet slight ones will not carry it; they</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">will say, 'Came you off with so little?' and great</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ones I dare not give. Wherefore, what's the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">instance? Tongue, I must put you into a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">butter-woman's mouth and buy myself another of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bajazet's mule, if you prattle me into these perils.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is it possible he should know what he is, and be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that he is?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would the cutting of my garments would serve the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">turn, or the breaking of my Spanish sword.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We cannot afford you so.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Or the baring of my beard; and to say it was in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">stratagem.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Twould not do.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Or to drown my clothes, and say I was stripped.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hardly serve.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Though I swore I leaped from the window of the citadel.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How deep?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thirty fathom.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Three great oaths would scarce make that be believed.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would I had any drum of the enemy's: I would swear</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I recovered it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You shall hear one anon.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A drum now of the enemy's,--</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Alarum within</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Throca movousus, cargo, cargo, cargo.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">All</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Cargo, cargo, cargo, villiando par corbo, cargo.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, ransom, ransom! do not hide mine eyes.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">They seize and blindfold him</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Boskos thromuldo boskos.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know you are the Muskos' regiment:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And I shall lose my life for want of language;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If there be here German, or Dane, low Dutch,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Italian, or French, let him speak to me; I'll</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Discover that which shall undo the Florentine.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Boskos vauvado: I understand thee, and can speak</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thy tongue. Kerely bonto, sir, betake thee to thy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">faith, for seventeen poniards are at thy bosom.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, pray, pray, pray! Manka revania dulche.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Oscorbidulchos volivorco.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The general is content to spare thee yet;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And, hoodwink'd as thou art, will lead thee on</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To gather from thee: haply thou mayst inform</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Something to save thy life.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O, let me live!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And all the secrets of our camp I'll show,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Their force, their purposes; nay, I'll speak that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which you will wonder at.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But wilt thou faithfully?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If I do not, damn me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Acordo linta.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come on; thou art granted space.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit, with PAROLLES guarded. A short alarum within</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go, tell the Count Rousillon, and my brother,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We have caught the woodcock, and will keep him muffled</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Till we do hear from them.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Captain, I will.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A' will betray us all unto ourselves:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Inform on that.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So I will, sir.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Till then I'll keep him dark and safely lock'd.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE II.  Florence. The Widow's house.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter BERTRAM and DIANA</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They told me that your name was Fontibell.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No, my good lord, Diana.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Titled goddess;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And worth it, with addition! But, fair soul,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In your fine frame hath love no quality?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If quick fire of youth light not your mind,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You are no maiden, but a monument:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When you are dead, you should be such a one</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As you are now, for you are cold and stem;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And now you should be as your mother was</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When your sweet self was got.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She then was honest.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So should you be.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My mother did but duty; such, my lord,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As you owe to your wife.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No more o' that;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I prithee, do not strive against my vows:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I was compell'd to her; but I love thee</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By love's own sweet constraint, and will for ever</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do thee all rights of service.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, so you serve us</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Till we serve you; but when you have our roses,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You barely leave our thorns to prick ourselves</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And mock us with our bareness.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How have I sworn!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis not the many oaths that makes the truth,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But the plain single vow that is vow'd true.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What is not holy, that we swear not by,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But take the High'st to witness: then, pray you, tell me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If I should swear by God's great attributes,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I loved you dearly, would you believe my oaths,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When I did love you ill? This has no holding,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To swear by him whom I protest to love,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That I will work against him: therefore your oaths</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Are words and poor conditions, but unseal'd,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">At least in my opinion.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Change it, change it;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Be not so holy-cruel: love is holy;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And my integrity ne'er knew the crafts</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That you do charge men with. Stand no more off,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But give thyself unto my sick desires,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who then recover: say thou art mine, and ever</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My love as it begins shall so persever.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I see that men make ropes in such a scarre</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That we'll forsake ourselves. Give me that ring.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll lend it thee, my dear; but have no power</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To give it from me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will you not, my lord?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It is an honour 'longing to our house,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bequeathed down from many ancestors;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which were the greatest obloquy i' the world</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In me to lose.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Mine honour's such a ring:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My chastity's the jewel of our house,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bequeathed down from many ancestors;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which were the greatest obloquy i' the world</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In me to lose: thus your own proper wisdom</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Brings in the champion Honour on my part,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Against your vain assault.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here, take my ring:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My house, mine honour, yea, my life, be thine,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And I'll be bid by thee.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When midnight comes, knock at my chamber-window:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll order take my mother shall not hear.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now will I charge you in the band of truth,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When you have conquer'd my yet maiden bed,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Remain there but an hour, nor speak to me:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My reasons are most strong; and you shall know them</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When back again this ring shall be deliver'd:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And on your finger in the night I'll put</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Another ring, that what in time proceeds</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May token to the future our past deeds.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Adieu, till then; then, fail not. You have won</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A wife of me, though there my hope be done.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A heaven on earth I have won by wooing thee.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For which live long to thank both heaven and me!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You may so in the end.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My mother told me just how he would woo,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As if she sat in 's heart; she says all men</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Have the like oaths: he had sworn to marry me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When his wife's dead; therefore I'll lie with him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When I am buried. Since Frenchmen are so braid,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Marry that will, I live and die a maid:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Only in this disguise I think't no sin</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To cozen him that would unjustly win.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE III.  The Florentine camp.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter the two French Lords and some two or three Soldiers</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You have not given him his mother's letter?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have delivered it an hour since: there is</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">something in't that stings his nature; for on the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">reading it he changed almost into another man.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He has much worthy blame laid upon him for shaking</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">off so good a wife and so sweet a lady.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Especially he hath incurred the everlasting</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">displeasure of the king, who had even tuned his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">bounty to sing happiness to him. I will tell you a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thing, but you shall let it dwell darkly with you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When you have spoken it, 'tis dead, and I am the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">grave of it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He hath perverted a young gentlewoman here in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Florence, of a most chaste renown; and this night he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">fleshes his will in the spoil of her honour: he hath</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">given her his monumental ring, and thinks himself</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">made in the unchaste composition.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now, God delay our rebellion! as we are ourselves,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">what things are we!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Merely our own traitors. And as in the common course</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of all treasons, we still see them reveal</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">themselves, till they attain to their abhorred ends,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">so he that in this action contrives against his own</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">nobility, in his proper stream o'erflows himself.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is it not meant damnable in us, to be trumpeters of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">our unlawful intents? We shall not then have his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">company to-night?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not till after midnight; for he is dieted to his hour.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That approaches apace; I would gladly have him see</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his company anatomized, that he might take a measure</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of his own judgments, wherein so curiously he had</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">set this counterfeit.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We will not meddle with him till he come; for his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">presence must be the whip of the other.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In the mean time, what hear you of these wars?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I hear there is an overture of peace.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, I assure you, a peace concluded.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What will Count Rousillon do then? will he travel</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">higher, or return again into France?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I perceive, by this demand, you are not altogether</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of his council.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let it be forbid, sir; so should I be a great deal</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of his act.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir, his wife some two months since fled from his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">house: her pretence is a pilgrimage to Saint Jaques</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">le Grand; which holy undertaking with most austere</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sanctimony she accomplished; and, there residing the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">tenderness of her nature became as a prey to her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">grief; in fine, made a groan of her last breath, and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">now she sings in heaven.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How is this justified?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The stronger part of it by her own letters, which</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">makes her story true, even to the point of her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">death: her death itself, which could not be her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">office to say is come, was faithfully confirmed by</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the rector of the place.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hath the count all this intelligence?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, and the particular confirmations, point from</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">point, so to the full arming of the verity.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am heartily sorry that he'll be glad of this.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How mightily sometimes we make us comforts of our losses!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And how mightily some other times we drown our gain</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in tears! The great dignity that his valour hath</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">here acquired for him shall at home be encountered</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">with a shame as ample.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The web of our life is of a mingled yarn, good and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ill together: our virtues would be proud, if our</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">faults whipped them not; and our crimes would</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">despair, if they were not cherished by our virtues.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter a Messenger</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How now! where's your master?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Servant</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He met the duke in the street, sir, of whom he hath</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">taken a solemn leave: his lordship will next</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">morning for France. The duke hath offered him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">letters of commendations to the king.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They shall be no more than needful there, if they</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">were more than they can commend.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They cannot be too sweet for the king's tartness.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here's his lordship now.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How now, my lord! is't not after midnight?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have to-night dispatched sixteen businesses, a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">month's length a-piece, by an abstract of success:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have congied with the duke, done my adieu with his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">nearest; buried a wife, mourned for her; writ to my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">lady mother I am returning; entertained my convoy;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and between these main parcels of dispatch effected</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">many nicer needs; the last was the greatest, but</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that I have not ended yet.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If the business be of any difficulty, and this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">morning your departure hence, it requires haste of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">your lordship.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I mean, the business is not ended, as fearing to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hear of it hereafter. But shall we have this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">dialogue between the fool and the soldier? Come,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">bring forth this counterfeit module, he has deceived</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">me, like a double-meaning prophesier.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bring him forth: has sat i' the stocks all night,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">poor gallant knave.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No matter: his heels have deserved it, in usurping</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his spurs so long. How does he carry himself?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have told your lordship already, the stocks carry</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">him. But to answer you as you would be understood;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">he weeps like a wench that had shed her milk: he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hath confessed himself to Morgan, whom he supposes</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to be a friar, from the time of his remembrance to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">this very instant disaster of his setting i' the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">stocks: and what think you he hath confessed?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nothing of me, has a'?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His confession is taken, and it shall be read to his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">face: if your lordship be in't, as I believe you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">are, you must have the patience to hear it.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter PAROLLES guarded, and First Soldier</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A plague upon him! muffled! he can say nothing of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">me: hush, hush!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hoodman comes! Portotartarosa</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He calls for the tortures: what will you say</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">without 'em?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will confess what I know without constraint: if</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ye pinch me like a pasty, I can say no more.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Bosko chimurcho.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Boblibindo chicurmurco.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You are a merciful general. Our general bids you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">answer to what I shall ask you out of a note.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And truly, as I hope to live.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reads  'First demand of him how many horse the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">duke is strong.' What say you to that?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Five or six thousand; but very weak and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">unserviceable: the troops are all scattered, and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the commanders very poor rogues, upon my reputation</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and credit and as I hope to live.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall I set down your answer so?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do: I'll take the sacrament on't, how and which way you will.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All's one to him. What a past-saving slave is this!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You're deceived, my lord: this is Monsieur</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Parolles, the gallant militarist,--that was his own</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">phrase,--that had the whole theoric of war in the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">knot of his scarf, and the practise in the chape of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his dagger.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will never trust a man again for keeping his sword</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">clean. nor believe he can have every thing in him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">by wearing his apparel neatly.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, that's set down.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Five or six thousand horse, I said,-- I will say</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">true,--or thereabouts, set down, for I'll speak truth.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He's very near the truth in this.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But I con him no thanks for't, in the nature he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">delivers it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Poor rogues, I pray you, say.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, that's set down.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I humbly thank you, sir: a truth's a truth, the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">rogues are marvellous poor.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reads  'Demand of him, of what strength they are</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">a-foot.' What say you to that?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By my troth, sir, if I were to live this present</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hour, I will tell true. Let me see: Spurio, a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hundred and fifty; Sebastian, so many; Corambus, so</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">many; Jaques, so many; Guiltian, Cosmo, Lodowick,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and Gratii, two hundred and fifty each; mine own</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">company, Chitopher, Vaumond, Bentii, two hundred and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">fifty each: so that the muster-file, rotten and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sound, upon my life, amounts not to fifteen thousand</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">poll; half of the which dare not shake snow from off</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">their cassocks, lest they shake themselves to pieces.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What shall be done to him?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nothing, but let him have thanks. Demand of him my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">condition, and what credit I have with the duke.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, that's set down.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Reads</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'You shall demand of him, whether one Captain Dumain</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be i' the camp, a Frenchman; what his reputation is</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">with the duke; what his valour, honesty, and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">expertness in wars; or whether he thinks it were not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">possible, with well-weighing sums of gold, to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">corrupt him to revolt.' What say you to this? what</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">do you know of it?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I beseech you, let me answer to the particular of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the inter'gatories: demand them singly.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do you know this Captain Dumain?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I know him: a' was a botcher's 'prentice in Paris,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">from whence he was whipped for getting the shrieve's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">fool with child,--a dumb innocent, that could not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">say him nay.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, by your leave, hold your hands; though I know</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his brains are forfeit to the next tile that falls.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well, is this captain in the duke of Florence's camp?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Upon my knowledge, he is, and lousy.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay look not so upon me; we shall hear of your</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">lordship anon.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What is his reputation with the duke?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The duke knows him for no other but a poor officer</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of mine; and writ to me this other day to turn him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">out o' the band: I think I have his letter in my pocket.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Marry, we'll search.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In good sadness, I do not know; either it is there,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">or it is upon a file with the duke's other letters</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in my tent.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here 'tis; here's a paper: shall I read it to you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I do not know if it be it or no.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our interpreter does it well.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Excellently.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reads  'Dian, the count's a fool, and full of gold,'--</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That is not the duke's letter, sir; that is an</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">advertisement to a proper maid in Florence, one</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Diana, to take heed of the allurement of one Count</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Rousillon, a foolish idle boy, but for all that very</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ruttish: I pray you, sir, put it up again.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, I'll read it first, by your favour.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My meaning in't, I protest, was very honest in the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">behalf of the maid; for I knew the young count to be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">a dangerous and lascivious boy, who is a whale to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">virginity and devours up all the fry it finds.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Damnable both-sides rogue!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reads  'When he swears oaths, bid him drop gold, and take it;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">After he scores, he never pays the score:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Half won is match well made; match, and well make it;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He ne'er pays after-debts, take it before;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And say a soldier, Dian, told thee this,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Men are to mell with, boys are not to kiss:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For count of this, the count's a fool, I know it,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who pays before, but not when he does owe it.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thine, as he vowed to thee in thine ear,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">PAROLLES.'</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He shall be whipped through the army with this rhyme</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in's forehead.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This is your devoted friend, sir, the manifold</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">linguist and the armipotent soldier.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I could endure any thing before but a cat, and now</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">he's a cat to me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I perceive, sir, by the general's looks, we shall be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">fain to hang you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My life, sir, in any case: not that I am afraid to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">die; but that, my offences being many, I would</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">repent out the remainder of nature: let me live,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sir, in a dungeon, i' the stocks, or any where, so I may live.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We'll see what may be done, so you confess freely;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">therefore, once more to this Captain Dumain: you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">have answered to his reputation with the duke and to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his valour: what is his honesty?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He will steal, sir, an egg out of a cloister: for</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">rapes and ravishments he parallels Nessus: he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">professes not keeping of oaths; in breaking 'em he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">is stronger than Hercules: he will lie, sir, with</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">such volubility, that you would think truth were a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">fool: drunkenness is his best virtue, for he will</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">be swine-drunk; and in his sleep he does little</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">harm, save to his bed-clothes about him; but they</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">know his conditions and lay him in straw. I have but</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">little more to say, sir, of his honesty: he has</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">every thing that an honest man should not have; what</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">an honest man should have, he has nothing.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I begin to love him for this.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For this description of thine honesty? A pox upon</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">him for me, he's more and more a cat.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What say you to his expertness in war?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Faith, sir, he has led the drum before the English</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">tragedians; to belie him, I will not, and more of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his soldiership I know not; except, in that country</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">he had the honour to be the officer at a place there</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">called Mile-end, to instruct for the doubling of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">files: I would do the man what honour I can, but of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">this I am not certain.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He hath out-villained villany so far, that the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">rarity redeems him.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A pox on him, he's a cat still.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His qualities being at this poor price, I need not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to ask you if gold will corrupt him to revolt.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir, for a quart d'ecu he will sell the fee-simple</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of his salvation, the inheritance of it; and cut the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">entail from all remainders, and a perpetual</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">succession for it perpetually.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What's his brother, the other Captain Dumain?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why does be ask him of me?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What's he?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">E'en a crow o' the same nest; not altogether so</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">great as the first in goodness, but greater a great</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">deal in evil: he excels his brother for a coward,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">yet his brother is reputed one of the best that is:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">in a retreat he outruns any lackey; marry, in coming</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">on he has the cramp.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If your life be saved, will you undertake to betray</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the Florentine?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, and the captain of his horse, Count Rousillon.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll whisper with the general, and know his pleasure.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Aside  I'll no more drumming; a plague of all</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">drums! Only to seem to deserve well, and to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">beguile the supposition of that lascivious young boy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the count, have I run into this danger. Yet who</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">would have suspected an ambush where I was taken?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There is no remedy, sir, but you must die: the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">general says, you that have so traitorously</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">discovered the secrets of your army and made such</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">pestiferous reports of men very nobly held, can</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">serve the world for no honest use; therefore you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">must die. Come, headsman, off with his head.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O Lord, sir, let me live, or let me see my death!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That shall you, and take your leave of all your friends.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Unblinding him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So, look about you: know you any here?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good morrow, noble captain.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">God bless you, Captain Parolles.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">God save you, noble captain.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Second Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Captain, what greeting will you to my Lord Lafeu?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am for France.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good captain, will you give me a copy of the sonnet</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">you writ to Diana in behalf of the Count Rousillon?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">an I were not a very coward, I'ld compel it of you:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">but fare you well.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt BERTRAM and Lords</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You are undone, captain, all but your scarf; that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">has a knot on't yet</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who cannot be crushed with a plot?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">First Soldier</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If you could find out a country where but women were</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that had received so much shame, you might begin an</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">impudent nation. Fare ye well, sir; I am for France</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">too: we shall speak of you there.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit with Soldiers</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yet am I thankful: if my heart were great,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Twould burst at this. Captain I'll be no more;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But I will eat and drink, and sleep as soft</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As captain shall: simply the thing I am</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall make me live. Who knows himself a braggart,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let him fear this, for it will come to pass</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that every braggart shall be found an ass.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Rust, sword? cool, blushes! and, Parolles, live</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Safest in shame! being fool'd, by foolery thrive!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">There's place and means for every man alive.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll after them.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE IV.  Florence. The Widow's house.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter HELENA, Widow, and DIANA</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That you may well perceive I have not wrong'd you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">One of the greatest in the Christian world</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall be my surety; 'fore whose throne 'tis needful,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ere I can perfect mine intents, to kneel:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Time was, I did him a desired office,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Dear almost as his life; which gratitude</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Through flinty Tartar's bosom would peep forth,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And answer, thanks: I duly am inform'd</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His grace is at Marseilles; to which place</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We have convenient convoy. You must know</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am supposed dead: the army breaking,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My husband hies him home; where, heaven aiding,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And by the leave of my good lord the king,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We'll be before our welcome.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Gentle madam,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You never had a servant to whose trust</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your business was more welcome.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nor you, mistress,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ever a friend whose thoughts more truly labour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To recompense your love: doubt not but heaven</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hath brought me up to be your daughter's dower,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As it hath fated her to be my motive</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And helper to a husband. But, O strange men!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That can such sweet use make of what they hate,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When saucy trusting of the cozen'd thoughts</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Defiles the pitchy night: so lust doth play</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With what it loathes for that which is away.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But more of this hereafter. You, Diana,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Under my poor instructions yet must suffer</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Something in my behalf.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let death and honesty</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go with your impositions, I am yours</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Upon your will to suffer.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yet, I pray you:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But with the word the time will bring on summer,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When briers shall have leaves as well as thorns,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And be as sweet as sharp. We must away;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our wagon is prepared, and time revives us:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All's well that ends well; still the fine's the crown;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whate'er the course, the end is the renown.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE V.  Rousillon. The COUNT's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter COUNTESS, LAFEU, and Clown</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No, no, no, your son was misled with a snipt-taffeta</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">fellow there, whose villanous saffron would have</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">made all the unbaked and doughy youth of a nation in</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his colour: your daughter-in-law had been alive at</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">this hour, and your son here at home, more advanced</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">by the king than by that red-tailed humble-bee I speak of.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would I had not known him; it was the death of the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">most virtuous gentlewoman that ever nature had</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">praise for creating. If she had partaken of my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">flesh, and cost me the dearest groans of a mother, I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">could not have owed her a more rooted love.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Twas a good lady, 'twas a good lady: we may pick a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thousand salads ere we light on such another herb.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Indeed, sir, she was the sweet marjoram of the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">salad, or rather, the herb of grace.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">They are not herbs, you knave; they are nose-herbs.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am no great Nebuchadnezzar, sir; I have not much</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">skill in grass.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whether dost thou profess thyself, a knave or a fool?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A fool, sir, at a woman's service, and a knave at a man's.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your distinction?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would cozen the man of his wife and do his service.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So you were a knave at his service, indeed.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And I would give his wife my bauble, sir, to do her service.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will subscribe for thee, thou art both knave and fool.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">At your service.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No, no, no.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why, sir, if I cannot serve you, I can serve as</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">great a prince as you are.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who's that? a Frenchman?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Faith, sir, a' has an English name; but his fisnomy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">is more hotter in France than there.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What prince is that?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The black prince, sir; alias, the prince of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">darkness; alias, the devil.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hold thee, there's my purse: I give thee not this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to suggest thee from thy master thou talkest of;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">serve him still.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am a woodland fellow, sir, that always loved a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">great fire; and the master I speak of ever keeps a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">good fire. But, sure, he is the prince of the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">world; let his nobility remain in's court. I am for</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">the house with the narrow gate, which I take to be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">too little for pomp to enter: some that humble</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">themselves may; but the many will be too chill and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">tender, and they'll be for the flowery way that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">leads to the broad gate and the great fire.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go thy ways, I begin to be aweary of thee; and I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">tell thee so before, because I would not fall out</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">with thee. Go thy ways: let my horses be well</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">looked to, without any tricks.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If I put any tricks upon 'em, sir, they shall be</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">jades' tricks; which are their own right by the law of nature.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A shrewd knave and an unhappy.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So he is. My lord that's gone made himself much</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">sport out of him: by his authority he remains here,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">which he thinks is a patent for his sauciness; and,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">indeed, he has no pace, but runs where he will.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I like him well; 'tis not amiss. And I was about to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">tell you, since I heard of the good lady's death and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">that my lord your son was upon his return home, I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">moved the king my master to speak in the behalf of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">my daughter; which, in the minority of them both,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">his majesty, out of a self-gracious remembrance, did</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">first propose: his highness hath promised me to do</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">it: and, to stop up the displeasure he hath</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">conceived against your son, there is no fitter</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">matter. How does your ladyship like it?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With very much content, my lord; and I wish it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">happily effected.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">His highness comes post from Marseilles, of as able</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">body as when he numbered thirty: he will be here</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to-morrow, or I am deceived by him that in such</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">intelligence hath seldom failed.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It rejoices me, that I hope I shall see him ere I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">die. I have letters that my son will be here</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">to-night: I shall beseech your lordship to remain</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">with me till they meet together.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madam, I was thinking with what manners I might</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">safely be admitted.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You need but plead your honourable privilege.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Lady, of that I have made a bold charter; but I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thank my God it holds yet.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Re-enter Clown</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O madam, yonder's my lord your son with a patch of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">velvet on's face: whether there be a scar under't</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">or no, the velvet knows; but 'tis a goodly patch of</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">velvet: his left cheek is a cheek of two pile and a</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">half, but his right cheek is worn bare.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A scar nobly got, or a noble scar, is a good livery</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of honour; so belike is that.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But it is your carbonadoed face.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let us go see your son, I pray you: I long to talk</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">with the young noble soldier.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Faith there's a dozen of 'em, with delicate fine</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">hats and most courteous feathers, which bow the head</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and nod at every man.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+
+
+<div style="
+				text-align: right;
+			">
+<span style="
+					width: 25%;
+					padding: 1px;
+					padding-right: 1em;
+					color: #000000;
+					background-color: #ff9900;
+				">ACT V</span>
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE I.  Marseilles. A street.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter HELENA, Widow, and DIANA, with two
+Attendants</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But this exceeding posting day and night</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Must wear your spirits low; we cannot help it:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But since you have made the days and nights as one,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To wear your gentle limbs in my affairs,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Be bold you do so grow in my requital</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As nothing can unroot you. In happy time;</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter a Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This man may help me to his majesty's ear,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If he would spend his power. God save you, sir.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir, I have seen you in the court of France.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have been sometimes there.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I do presume, sir, that you are not fallen</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From the report that goes upon your goodness;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">An therefore, goaded with most sharp occasions,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which lay nice manners by, I put you to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The use of your own virtues, for the which</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I shall continue thankful.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What's your will?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That it will please you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To give this poor petition to the king,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And aid me with that store of power you have</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To come into his presence.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The king's not here.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not here, sir!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not, indeed:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He hence removed last night and with more haste</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Than is his use.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Lord, how we lose our pains!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All's well that ends well yet,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Though time seem so adverse and means unfit.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I do beseech you, whither is he gone?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Marry, as I take it, to Rousillon;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whither I am going.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I do beseech you, sir,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Since you are like to see the king before me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Commend the paper to his gracious hand,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which I presume shall render you no blame</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But rather make you thank your pains for it.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will come after you with what good speed</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our means will make us means.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This I'll do for you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And you shall find yourself to be well thank'd,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whate'er falls more. We must to horse again.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go, go, provide.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE II.  Rousillon. Before the COUNT's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter Clown, and PAROLLES, following</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good Monsieur Lavache, give my Lord Lafeu this</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">letter: I have ere now, sir, been better known to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">you, when I have held familiarity with fresher</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">clothes; but I am now, sir, muddied in fortune's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">mood, and smell somewhat strong of her strong</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">displeasure.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Truly, fortune's displeasure is but sluttish, if it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">smell so strongly as thou speakest of: I will</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">henceforth eat no fish of fortune's buttering.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Prithee, allow the wind.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Nay, you need not to stop your nose, sir; I spake</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">but by a metaphor.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Indeed, sir, if your metaphor stink, I will stop my</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">nose; or against any man's metaphor. Prithee, get</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thee further.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Pray you, sir, deliver me this paper.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Clown</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Foh! prithee, stand away: a paper from fortune's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">close-stool to give to a nobleman! Look, here he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">comes himself.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here is a purr of fortune's, sir, or of fortune's</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">cat,--but not a musk-cat,--that has fallen into the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">unclean fishpond of her displeasure, and, as he</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">says, is muddied withal: pray you, sir, use the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">carp as you may; for he looks like a poor, decayed,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">ingenious, foolish, rascally knave. I do pity his</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">distress in my similes of comfort and leave him to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">your lordship.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My lord, I am a man whom fortune hath cruelly</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">scratched.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And what would you have me to do? 'Tis too late to</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">pare her nails now. Wherein have you played the</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">knave with fortune, that she should scratch you, who</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of herself is a good lady and would not have knaves</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thrive long under her? There's a quart d'ecu for</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">you: let the justices make you and fortune friends:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am for other business.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I beseech your honour to hear me one single word.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You beg a single penny more: come, you shall ha't;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">save your word.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My name, my good lord, is Parolles.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You beg more than 'word,' then. Cox my passion!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">give me your hand. How does your drum?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O my good lord, you were the first that found me!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Was I, in sooth? and I was the first that lost thee.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It lies in you, my lord, to bring me in some grace,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">for you did bring me out.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Out upon thee, knave! dost thou put upon me at once</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">both the office of God and the devil? One brings</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">thee in grace and the other brings thee out.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Trumpets sound</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The king's coming; I know by his trumpets. Sirrah,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">inquire further after me; I had talk of you last</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">night: though you are a fool and a knave, you shall</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">eat; go to, follow.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I praise God for you.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+</div>
+
+
+<div>
+<div style="
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			">SCENE III.  Rousillon. The COUNT's palace.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Flourish. Enter KING, COUNTESS, LAFEU, the two
+French Lords, with Attendants</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We lost a jewel of her; and our esteem</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Was made much poorer by it: but your son,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As mad in folly, lack'd the sense to know</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Her estimation home.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis past, my liege;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And I beseech your majesty to make it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Natural rebellion, done i' the blaze of youth;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">When oil and fire, too strong for reason's force,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O'erbears it and burns on.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My honour'd lady,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have forgiven and forgotten all;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Though my revenges were high bent upon him,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And watch'd the time to shoot.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This I must say,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But first I beg my pardon, the young lord</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Did to his majesty, his mother and his lady</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Offence of mighty note; but to himself</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The greatest wrong of all. He lost a wife</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whose beauty did astonish the survey</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of richest eyes, whose words all ears took captive,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whose dear perfection hearts that scorn'd to serve</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Humbly call'd mistress.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Praising what is lost</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Makes the remembrance dear. Well, call him hither;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We are reconciled, and the first view shall kill</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All repetition: let him not ask our pardon;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The nature of his great offence is dead,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And deeper than oblivion we do bury</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The incensing relics of it: let him approach,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">A stranger, no offender; and inform him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So 'tis our will he should.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I shall, my liege.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What says he to your daughter? have you spoke?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All that he is hath reference to your highness.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Then shall we have a match. I have letters sent me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That set him high in fame.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter BERTRAM</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He looks well on't.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am not a day of season,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For thou mayst see a sunshine and a hail</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In me at once: but to the brightest beams</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Distracted clouds give way; so stand thou forth;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The time is fair again.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My high-repented blames,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Dear sovereign, pardon to me.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All is whole;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not one word more of the consumed time.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let's take the instant by the forward top;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For we are old, and on our quick'st decrees</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The inaudible and noiseless foot of Time</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Steals ere we can effect them. You remember</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The daughter of this lord?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Admiringly, my liege, at first</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I stuck my choice upon her, ere my heart</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Durst make too bold a herald of my tongue</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where the impression of mine eye infixing,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Contempt his scornful perspective did lend me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which warp'd the line of every other favour;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Scorn'd a fair colour, or express'd it stolen;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Extended or contracted all proportions</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To a most hideous object: thence it came</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That she whom all men praised and whom myself,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Since I have lost, have loved, was in mine eye</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The dust that did offend it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Well excused:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That thou didst love her, strikes some scores away</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">From the great compt: but love that comes too late,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Like a remorseful pardon slowly carried,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To the great sender turns a sour offence,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Crying, 'That's good that's gone.' Our rash faults</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Make trivial price of serious things we have,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not knowing them until we know their grave:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Oft our displeasures, to ourselves unjust,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Destroy our friends and after weep their dust</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Our own love waking cries to see what's done,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">While shame full late sleeps out the afternoon.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Be this sweet Helen's knell, and now forget her.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Send forth your amorous token for fair Maudlin:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The main consents are had; and here we'll stay</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To see our widower's second marriage-day.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which better than the first, O dear heaven, bless!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Or, ere they meet, in me, O nature, cesse!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come on, my son, in whom my house's name</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Must be digested, give a favour from you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To sparkle in the spirits of my daughter,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That she may quickly come.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">BERTRAM gives a ring</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By my old beard,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And every hair that's on't, Helen, that's dead,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Was a sweet creature: such a ring as this,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The last that e'er I took her at court,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I saw upon her finger.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hers it was not.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now, pray you, let me see it; for mine eye,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">While I was speaking, oft was fasten'd to't.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This ring was mine; and, when I gave it Helen,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I bade her, if her fortunes ever stood</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Necessitied to help, that by this token</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I would relieve her. Had you that craft, to reave</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of what should stead her most?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My gracious sovereign,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Howe'er it pleases you to take it so,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The ring was never hers.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Son, on my life,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have seen her wear it; and she reckon'd it</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">At her life's rate.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am sure I saw her wear it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You are deceived, my lord; she never saw it:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In Florence was it from a casement thrown me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wrapp'd in a paper, which contain'd the name</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of her that threw it: noble she was, and thought</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I stood engaged: but when I had subscribed</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To mine own fortune and inform'd her fully</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I could not answer in that course of honour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As she had made the overture, she ceased</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In heavy satisfaction and would never</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Receive the ring again.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Plutus himself,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That knows the tinct and multiplying medicine,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hath not in nature's mystery more science</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Than I have in this ring: 'twas mine, 'twas Helen's,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whoever gave it you. Then, if you know</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That you are well acquainted with yourself,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Confess 'twas hers, and by what rough enforcement</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You got it from her: she call'd the saints to surety</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That she would never put it from her finger,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Unless she gave it to yourself in bed,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where you have never come, or sent it us</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Upon her great disaster.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She never saw it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou speak'st it falsely, as I love mine honour;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And makest conjectural fears to come into me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which I would fain shut out. If it should prove</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That thou art so inhuman,--'twill not prove so;--</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And yet I know not: thou didst hate her deadly,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And she is dead; which nothing, but to close</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Her eyes myself, could win me to believe,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">More than to see this ring. Take him away.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Guards seize BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My fore-past proofs, howe'er the matter fall,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Shall tax my fears of little vanity,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Having vainly fear'd too little. Away with him!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">We'll sift this matter further.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If you shall prove</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This ring was ever hers, you shall as easy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Prove that I husbanded her bed in Florence,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where yet she never was.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit, guarded</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am wrapp'd in dismal thinkings.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter a Gentleman</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">Gentleman</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Gracious sovereign,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whether I have been to blame or no, I know not:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Here's a petition from a Florentine,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who hath for four or five removes come short</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To tender it herself. I undertook it,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Vanquish'd thereto by the fair grace and speech</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of the poor suppliant, who by this I know</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is here attending: her business looks in her</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With an importing visage; and she told me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">In a sweet verbal brief, it did concern</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your highness with herself.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Reads  Upon his many protestations to marry me</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">when his wife was dead, I blush to say it, he won</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">me. Now is the Count Rousillon a widower: his vows</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">are forfeited to me, and my honour's paid to him. He</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">stole from Florence, taking no leave, and I follow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">him to his country for justice: grant it me, O</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">king! in you it best lies; otherwise a seducer</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">flourishes, and a poor maid is undone.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">DIANA CAPILET.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I will buy me a son-in-law in a fair, and toll for</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">this: I'll none of him.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The heavens have thought well on thee Lafeu,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To bring forth this discovery. Seek these suitors:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Go speedily and bring again the count.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am afeard the life of Helen, lady,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Was foully snatch'd.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Now, justice on the doers!</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Re-enter BERTRAM, guarded</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I wonder, sir, sith wives are monsters to you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And that you fly them as you swear them lordship,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yet you desire to marry.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter Widow and DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What woman's that?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am, my lord, a wretched Florentine,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Derived from the ancient Capilet:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My suit, as I do understand, you know,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And therefore know how far I may be pitied.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am her mother, sir, whose age and honour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Both suffer under this complaint we bring,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And both shall cease, without your remedy.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come hither, count; do you know these women?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My lord, I neither can nor will deny</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But that I know them: do they charge me further?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Why do you look so strange upon your wife?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She's none of mine, my lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If you shall marry,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You give away this hand, and that is mine;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You give away heaven's vows, and those are mine;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You give away myself, which is known mine;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For I by vow am so embodied yours,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That she which marries you must marry me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Either both or none.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your reputation comes too short for my daughter; you</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">are no husband for her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My lord, this is a fond and desperate creature,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whom sometime I have laugh'd with: let your highness</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Lay a more noble thought upon mine honour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Than for to think that I would sink it here.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir, for my thoughts, you have them ill to friend</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Till your deeds gain them: fairer prove your honour</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Than in my thought it lies.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good my lord,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ask him upon his oath, if he does think</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He had not my virginity.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What say'st thou to her?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She's impudent, my lord,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And was a common gamester to the camp.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He does me wrong, my lord; if I were so,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He might have bought me at a common price:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do not believe him. O, behold this ring,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whose high respect and rich validity</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Did lack a parallel; yet for all that</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He gave it to a commoner o' the camp,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If I be one.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">COUNTESS</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He blushes, and 'tis it:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of six preceding ancestors, that gem,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Conferr'd by testament to the sequent issue,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Hath it been owed and worn. This is his wife;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That ring's a thousand proofs.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Methought you said</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You saw one here in court could witness it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I did, my lord, but loath am to produce</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So bad an instrument: his name's Parolles.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I saw the man to-day, if man he be.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Find him, and bring him hither.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit an Attendant</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What of him?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He's quoted for a most perfidious slave,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With all the spots o' the world tax'd and debosh'd;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Whose nature sickens but to speak a truth.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Am I or that or this for what he'll utter,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That will speak any thing?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She hath that ring of yours.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I think she has: certain it is I liked her,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And boarded her i' the wanton way of youth:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She knew her distance and did angle for me,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Madding my eagerness with her restraint,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As all impediments in fancy's course</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Are motives of more fancy; and, in fine,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Her infinite cunning, with her modern grace,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Subdued me to her rate: she got the ring;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And I had that which any inferior might</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">At market-price have bought.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I must be patient:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You, that have turn'd off a first so noble wife,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">May justly diet me. I pray you yet;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Since you lack virtue, I will lose a husband;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Send for your ring, I will return it home,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And give me mine again.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have it not.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">What ring was yours, I pray you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Sir, much like</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The same upon your finger.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Know you this ring? this ring was his of late.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And this was it I gave him, being abed.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The story then goes false, you threw it him</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Out of a casement.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I have spoke the truth.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Enter PAROLLES</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">My lord, I do confess the ring was hers.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">You boggle shrewdly, every feather stars you.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is this the man you speak of?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, my lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Tell me, sirrah, but tell me true, I charge you,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Not fearing the displeasure of your master,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Which on your just proceeding I'll keep off,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By him and by this woman here what know you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So please your majesty, my master hath been an</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">honourable gentleman: tricks he hath had in him,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">which gentlemen have.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Come, come, to the purpose: did he love this woman?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Faith, sir, he did love her; but how?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How, I pray you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He did love her, sir, as a gentleman loves a woman.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How is that?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He loved her, sir, and loved her not.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">As thou art a knave, and no knave. What an</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">equivocal companion is this!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am a poor man, and at your majesty's command.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He's a good drum, my lord, but a naughty orator.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Do you know he promised me marriage?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Faith, I know more than I'll speak.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">But wilt thou not speak all thou knowest?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Yes, so please your majesty. I did go between them,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">as I said; but more than that, he loved her: for</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">indeed he was mad for her, and talked of Satan and</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">of Limbo and of Furies and I know not what: yet I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">was in that credit with them at that time that I</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">knew of their going to bed, and of other motions,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">as promising her marriage, and things which would</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">derive me ill will to speak of; therefore I will not</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">speak what I know.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou hast spoken all already, unless thou canst say</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">they are married: but thou art too fine in thy</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">evidence; therefore stand aside.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This ring, you say, was yours?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ay, my good lord.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where did you buy it? or who gave it you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It was not given me, nor I did not buy it.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who lent it you?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It was not lent me neither.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Where did you find it, then?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I found it not.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If it were yours by none of all these ways,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">How could you give it him?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I never gave it him.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This woman's an easy glove, my lord; she goes off</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">and on at pleasure.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">This ring was mine; I gave it his first wife.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">It might be yours or hers, for aught I know.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Take her away; I do not like her now;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To prison with her: and away with him.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Unless thou tell'st me where thou hadst this ring,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou diest within this hour.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll never tell you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Take her away.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll put in bail, my liege.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I think thee now some common customer.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">By Jove, if ever I knew man, 'twas you.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Wherefore hast thou accused him all this while?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Because he's guilty, and he is not guilty:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He knows I am no maid, and he'll swear to't;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll swear I am a maid, and he knows not.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Great king, I am no strumpet, by my life;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I am either maid, or else this old man's wife.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">She does abuse our ears: to prison with her.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good mother, fetch my bail. Stay, royal sir:</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exit Widow</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The jeweller that owes the ring is sent for,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And he shall surety me. But for this lord,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Who hath abused me, as he knows himself,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Though yet he never harm'd me, here I quit him:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">He knows himself my bed he hath defiled;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And at that time he got his wife with child:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Dead though she be, she feels her young one kick:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">So there's my riddle: one that's dead is quick:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And now behold the meaning.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Re-enter Widow, with HELENA</div>
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is there no exorcist</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Beguiles the truer office of mine eyes?</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Is't real that I see?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">No, my good lord;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'Tis but the shadow of a wife you see,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The name and not the thing.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Both, both. O, pardon!</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O my good lord, when I was like this maid,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I found you wondrous kind. There is your ring;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And, look you, here's your letter; this it says:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">'When from my finger you can get this ring</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">And are by me with child,' &amp;c. This is done:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Will you be mine, now you are doubly won?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">BERTRAM</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If she, my liege, can make me know this clearly,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I'll love her dearly, ever, ever dearly.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">HELENA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If it appear not plain and prove untrue,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Deadly divorce step between me and you!</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">O my dear mother, do I see you living?</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">LAFEU</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Mine eyes smell onions; I shall weep anon:</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">To PAROLLES</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Good Tom Drum, lend me a handkercher: so,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">I thank thee: wait on me home, I'll make sport with thee:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let thy courtesies alone, they are scurvy ones.</div>
+
+
+
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Let us from point to point this story know,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">To make the even truth in pleasure flow.</div>
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">To DIANA</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">If thou be'st yet a fresh uncropped flower,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Choose thou thy husband, and I'll pay thy dower;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">For I can guess that by thy honest aid</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Thou keep'st a wife herself, thyself a maid.</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Of that and all the progress, more or less,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Resolvedly more leisure shall express:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All yet seems well; and if it end so meet,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The bitter past, more welcome is the sweet.</div>
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Flourish</div>
+
+</div>
+
+EPILOGUE
+
+<div style="
+				color: #ff9900;
+			">KING</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">The king's a beggar, now the play is done:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">All is well ended, if this suit be won,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">That you express content; which we will pay,</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">With strife to please you, day exceeding day:</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Ours be your patience then, and yours our parts;</div>
+
+<div style="
+				margin-left: 3em;
+				color: #ccccff;
+			">Your gentle hands lend us, and take our hearts.</div>
+
+
+
+<div style="
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			">Exeunt</div>
+
+
+
+</div>
+</body>
+</html>
diff --git a/test/tests/perf-gold/basic/basic-datetranscode.out b/test/tests/perf-gold/basic/basic-datetranscode.out
new file mode 100644
index 0000000..71a145d
--- /dev/null
+++ b/test/tests/perf-gold/basic/basic-datetranscode.out
@@ -0,0 +1,5002 @@
+<doc>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="13 January 1974">
+<day>13</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1974">
+<day>14</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="1 February 1974">
+<day>1</day>
+<month>2</month>
+<year>1974</year>
+</date>
+<date orginal="2 March 1974">
+<day>2</day>
+<month>3</month>
+<year>1974</year>
+</date>
+<date orginal="3 April 1974">
+<day>3</day>
+<month>4</month>
+<year>1974</year>
+</date>
+<date orginal="4 May 1974">
+<day>4</day>
+<month>5</month>
+<year>1974</year>
+</date>
+<date orginal="5 June 1974">
+<day>5</day>
+<month>6</month>
+<year>1974</year>
+</date>
+<date orginal="6 July 1974">
+<day>6</day>
+<month>7</month>
+<year>1974</year>
+</date>
+<date orginal="7 August 1974">
+<day>7</day>
+<month>8</month>
+<year>1974</year>
+</date>
+<date orginal="8 September 1974">
+<day>8</day>
+<month>9</month>
+<year>1974</year>
+</date>
+<date orginal="9 October 1974">
+<day>9</day>
+<month>10</month>
+<year>1974</year>
+</date>
+<date orginal="10 November 1974">
+<day>10</day>
+<month>11</month>
+<year>1974</year>
+</date>
+<date orginal="11 December 1974">
+<day>11</day>
+<month>12</month>
+<year>1974</year>
+</date>
+<date orginal="14 January 1975">
+<day>14</day>
+<month>1</month>
+<year>1975</year>
+</date>
+<date orginal="1 February 1976">
+<day>1</day>
+<month>2</month>
+<year>1976</year>
+</date>
+<date orginal="2 March 1977">
+<day>2</day>
+<month>3</month>
+<year>1977</year>
+</date>
+<date orginal="3 April 1978">
+<day>3</day>
+<month>4</month>
+<year>1978</year>
+</date>
+<date orginal="4 May 1979">
+<day>4</day>
+<month>5</month>
+<year>1979</year>
+</date>
+<date orginal="5 June 1980">
+<day>5</day>
+<month>6</month>
+<year>1980</year>
+</date>
+<date orginal="6 July 1981">
+<day>6</day>
+<month>7</month>
+<year>1981</year>
+</date>
+<date orginal="7 August 1982">
+<day>7</day>
+<month>8</month>
+<year>1982</year>
+</date>
+<date orginal="8 September 1983">
+<day>8</day>
+<month>9</month>
+<year>1983</year>
+</date>
+<date orginal="9 October 1984">
+<day>9</day>
+<month>10</month>
+<year>1984</year>
+</date>
+<date orginal="10 November 1985">
+<day>10</day>
+<month>11</month>
+<year>1985</year>
+</date>
+<date orginal="11 December 1986">
+<day>11</day>
+<month>12</month>
+<year>1986</year>
+</date>
+<date orginal="23 April 1999">
+<day>23</day>
+<month>4</month>
+<year>1999</year>
+</date>
+<date orginal="1 January 2000">
+<day>1</day>
+<month>1</month>
+<year>2000</year>
+</date>
+<date orginal="15 December 1944">
+<day>15</day>
+<month>12</month>
+<year>1944</year>
+</date>
+<date orginal="1 January 1974">
+<day>1</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="2 January 1974">
+<day>2</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="3 January 1974">
+<day>3</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="4 January 1974">
+<day>4</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="5 January 1974">
+<day>5</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="6 January 1974">
+<day>6</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="7 January 1974">
+<day>7</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="8 January 1974">
+<day>8</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="9 January 1974">
+<day>9</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="10 January 1974">
+<day>10</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="11 January 1974">
+<day>11</day>
+<month>1</month>
+<year>1974</year>
+</date>
+<date orginal="12 January 1974">
+<day>12</day>
+<month>1</month>
+<year>1974</year>
+</date>
+</doc>
diff --git a/test/tests/perf-gold/output/outputHhref.out b/test/tests/perf-gold/output/outputHhref.out
new file mode 100644
index 0000000..a27cbc4
--- /dev/null
+++ b/test/tests/perf-gold/output/outputHhref.out
@@ -0,0 +1,145 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>This is the title</title>
+</head>
+<body background="file'%.gif">
+<h1>List</h1>
+<br>
+  spacer
+  
+    <p>1. "&amp;"  <A HREF="&ItemSpace 1">ItemSpace 1</A>
+</p>
+<p>2. "&lt;"   <img src="<"></p>
+<p>3. "&gt;"   <IMG src=">"></p>
+<p>4. """ <img SRC="%22ItemSpace 1"></p>
+<p>5. "'" <font color="'">ItemSpace 1</font>
+</p>
+<p>6. "&copy;" <a HREF="%C2%A9">ItemSpace 1</a>
+</p>
+<p>7. "#" <A href="&{text()}between#after">Note the amp-double-braces should be escaped differently</A>
+</p>
+<p>8. "&yen;" <A href="%C2%A5after">ItemSpace 1</A>
+</p>
+<p>9. " " <a href="before ">ItemSpace 1</a>
+</p>
+<p>10."%" <IMG SRC="ItemSpace 1%">ItemSpace 1</IMG></p>
+<p>11."	" <A href="beforeand%09after">No value</A>
+</p>
+<p>12."&#127;" <A HREF="ItemSpace 1%7Fafter">ItemSpace 1</A>
+</p>
+<p>13."&Ntilde;" <A href="%C3%91">plain text</A>
+</p>
+<P>14."Œ" <A href="%C5%92">more plain text</A>
+</P>
+<br>
+  spacer
+  
+    <p>1. "&amp;"  <A HREF="&Item2">Item2</A>
+</p>
+<p>2. "&lt;"   <img src="<"></p>
+<p>3. "&gt;"   <IMG src=">"></p>
+<p>4. """ <img SRC="%22Item2"></p>
+<p>5. "'" <font color="'">Item2</font>
+</p>
+<p>6. "&copy;" <a HREF="%C2%A9">Item2</a>
+</p>
+<p>7. "#" <A href="&{text()}between#after">Note the amp-double-braces should be escaped differently</A>
+</p>
+<p>8. "&yen;" <A href="%C2%A5after">Item2</A>
+</p>
+<p>9. " " <a href="before ">Item2</a>
+</p>
+<p>10."%" <IMG SRC="Item2%">Item2</IMG></p>
+<p>11."	" <A href="beforeand%09after">No value</A>
+</p>
+<p>12."&#127;" <A HREF="Item2%7Fafter">Item2</A>
+</p>
+<p>13."&Ntilde;" <A href="%C3%91">plain text</A>
+</p>
+<P>14."Œ" <A href="%C5%92">more plain text</A>
+</P>
+<br>
+  spacer
+  
+    <p>1. "&amp;"  <A HREF="&ItemTab%093">ItemTab	3</A>
+</p>
+<p>2. "&lt;"   <img src="<"></p>
+<p>3. "&gt;"   <IMG src=">"></p>
+<p>4. """ <img SRC="%22ItemTab%093"></p>
+<p>5. "'" <font color="'">ItemTab	3</font>
+</p>
+<p>6. "&copy;" <a HREF="%C2%A9">ItemTab	3</a>
+</p>
+<p>7. "#" <A href="&{text()}between#after">Note the amp-double-braces should be escaped differently</A>
+</p>
+<p>8. "&yen;" <A href="%C2%A5after">ItemTab	3</A>
+</p>
+<p>9. " " <a href="before ">ItemTab	3</a>
+</p>
+<p>10."%" <IMG SRC="ItemTab%093%">ItemTab	3</IMG></p>
+<p>11."	" <A href="beforeand%09after">No value</A>
+</p>
+<p>12."&#127;" <A HREF="ItemTab%093%7Fafter">ItemTab	3</A>
+</p>
+<p>13."&Ntilde;" <A href="%C3%91">plain text</A>
+</p>
+<P>14."Œ" <A href="%C5%92">more plain text</A>
+</P>
+<h1>List</h1>
+<br>
+  spacer
+  
+    <p>1. "&amp;"  <A HREF="&Item A">Item A</A>
+</p>
+<p>2. "&lt;"   <img src="<"></p>
+<p>3. "&gt;"   <IMG src=">"></p>
+<p>4. """ <img SRC="%22Item A"></p>
+<p>5. "'" <font color="'">Item A</font>
+</p>
+<p>6. "&copy;" <a HREF="%C2%A9">Item A</a>
+</p>
+<p>7. "#" <A href="&{text()}between#after">Note the amp-double-braces should be escaped differently</A>
+</p>
+<p>8. "&yen;" <A href="%C2%A5after">Item A</A>
+</p>
+<p>9. " " <a href="before ">Item A</a>
+</p>
+<p>10."%" <IMG SRC="Item A%">Item A</IMG></p>
+<p>11."	" <A href="beforeand%09after">No value</A>
+</p>
+<p>12."&#127;" <A HREF="Item A%7Fafter">Item A</A>
+</p>
+<p>13."&Ntilde;" <A href="%C3%91">plain text</A>
+</p>
+<P>14."Œ" <A href="%C5%92">more plain text</A>
+</P>
+<br>
+  spacer
+  
+    <p>1. "&amp;"  <A HREF="&Item B">Item B</A>
+</p>
+<p>2. "&lt;"   <img src="<"></p>
+<p>3. "&gt;"   <IMG src=">"></p>
+<p>4. """ <img SRC="%22Item B"></p>
+<p>5. "'" <font color="'">Item B</font>
+</p>
+<p>6. "&copy;" <a HREF="%C2%A9">Item B</a>
+</p>
+<p>7. "#" <A href="&{text()}between#after">Note the amp-double-braces should be escaped differently</A>
+</p>
+<p>8. "&yen;" <A href="%C2%A5after">Item B</A>
+</p>
+<p>9. " " <a href="before ">Item B</a>
+</p>
+<p>10."%" <IMG SRC="Item B%">Item B</IMG></p>
+<p>11."	" <A href="beforeand%09after">No value</A>
+</p>
+<p>12."&#127;" <A HREF="Item B%7Fafter">Item B</A>
+</p>
+<p>13."&Ntilde;" <A href="%C3%91">plain text</A>
+</p>
+<P>14."Œ" <A href="%C5%92">more plain text</A>
+</P>
+</body>
+</html>
diff --git a/test/tests/perf-gold/sort/sort-big.out b/test/tests/perf-gold/sort/sort-big.out
new file mode 100644
index 0000000..ec9df83
--- /dev/null
+++ b/test/tests/perf-gold/sort/sort-big.out
@@ -0,0 +1,10003 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>assessing</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>LawsL</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>ofL</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>onstrokes</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>residetial</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>to</item>
+<item>to-help</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>trac</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT-defined</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>yourbody</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/perf-gold/sort/sort-numbers1.out b/test/tests/perf-gold/sort/sort-numbers1.out
new file mode 100644
index 0000000..8b6f4f1
--- /dev/null
+++ b/test/tests/perf-gold/sort/sort-numbers1.out
@@ -0,0 +1,1002 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><e861>0</e861>
+<e431>10</e431>
+<e409>24</e409>
+<e420>35</e420>
+<e12>49</e12>
+<e872>69</e872>
+<e839>74</e839>
+<e850>85</e850>
+<e442>99</e442>
+<e475>106</e475>
+<e45>116</e45>
+<e453>122</e453>
+<e34>133</e34>
+<e905>136</e905>
+<e56>147</e56>
+<e927>148</e927>
+<e23>152</e23>
+<e894>153</e894>
+<e916>167</e916>
+<e883>172</e883>
+<e464>183</e464>
+<e486>197</e486>
+<e233>202</e233>
+<e674>213</e674>
+<e652>229</e652>
+<e663>232</e663>
+<e255>246</e255>
+<e222>259</e222>
+<e244>263</e244>
+<e211>270</e211>
+<e685>296</e685>
+<e376>307</e376>
+<e817>318</e817>
+<e795>326</e795>
+<e806>337</e806>
+<e398>341</e398>
+<e365>356</e365>
+<e387>368</e387>
+<e354>373</e354>
+<e828>391</e828>
+<e618>401</e618>
+<e188>411</e188>
+<e596>427</e596>
+<e177>438</e177>
+<e166>457</e166>
+<e629>464</e629>
+<e607>488</e607>
+<e199>494</e199>
+<e718>501</e718>
+<e288>511</e288>
+<e696>527</e696>
+<e277>538</e277>
+<e266>557</e266>
+<e729>564</e729>
+<e707>588</e707>
+<e299>594</e299>
+<e89>604</e89>
+<e1>605</e1>
+<e960>615</e960>
+<e938>621</e938>
+<e67>628</e67>
+<e519>634</e519>
+<e541>640</e541>
+<e508>651</e508>
+<e530>665</e530>
+<e497>678</e497>
+<e78>681</e78>
+<e949>684</e949>
+<e971>690</e971>
+<e100>695</e100>
+<e189>704</e189>
+<e167>728</e167>
+<e619>734</e619>
+<e641>740</e641>
+<e608>751</e608>
+<e630>765</e630>
+<e597>778</e597>
+<e178>781</e178>
+<e200>795</e200>
+<e332>809</e332>
+<e310>825</e310>
+<e762>839</e762>
+<e784>843</e784>
+<e751>850</e751>
+<e773>862</e773>
+<e740>875</e740>
+<e321>880</e321>
+<e343>892</e343>
+<e133>902</e133>
+<e574>913</e574>
+<e552>929</e552>
+<e563>932</e563>
+<e155>946</e155>
+<e122>959</e122>
+<e144>963</e144>
+<e111>970</e111>
+<e982>979</e982>
+<e993>982</e993>
+<e585>996</e585>
+<e33>1002</e33>
+<e904>1003</e904>
+<e474>1013</e474>
+<e452>1029</e452>
+<e463>1032</e463>
+<e55>1046</e55>
+<e22>1059</e22>
+<e44>1063</e44>
+<e915>1066</e915>
+<e11>1070</e11>
+<e882>1079</e882>
+<e893>1082</e893>
+<e485>1096</e485>
+<e518>1101</e518>
+<e88>1111</e88>
+<e959>1114</e959>
+<e496>1127</e496>
+<e948>1131</e948>
+<e77>1138</e77>
+<e970>1145</e970>
+<e66>1157</e66>
+<e937>1158</e937>
+<e529>1164</e529>
+<e926>1177</e926>
+<e507>1188</e507>
+<e99>1194</e99>
+<e2>1195</e2>
+<e276>1207</e276>
+<e717>1218</e717>
+<e695>1226</e695>
+<e706>1237</e706>
+<e298>1241</e298>
+<e265>1256</e265>
+<e287>1268</e287>
+<e254>1273</e254>
+<e728>1291</e728>
+<e860>1315</e860>
+<e838>1321</e838>
+<e419>1334</e419>
+<e441>1340</e441>
+<e408>1351</e408>
+<e430>1365</e430>
+<e397>1378</e397>
+<e849>1384</e849>
+<e871>1390</e871>
+<e661>1400</e661>
+<e231>1410</e231>
+<e209>1424</e209>
+<e220>1435</e220>
+<e672>1469</e672>
+<e639>1474</e639>
+<e650>1485</e650>
+<e242>1499</e242>
+<e761>1500</e761>
+<e331>1510</e331>
+<e309>1524</e309>
+<e320>1535</e320>
+<e772>1569</e772>
+<e739>1574</e739>
+<e750>1585</e750>
+<e342>1599</e342>
+<e132>1609</e132>
+<e981>1620</e981>
+<e110>1625</e110>
+<e562>1639</e562>
+<e584>1643</e584>
+<e551>1650</e551>
+<e573>1662</e573>
+<e540>1675</e540>
+<e121>1680</e121>
+<e992>1689</e992>
+<e143>1692</e143>
+<e232>1709</e232>
+<e210>1725</e210>
+<e662>1739</e662>
+<e684>1743</e684>
+<e651>1750</e651>
+<e673>1762</e673>
+<e640>1775</e640>
+<e221>1780</e221>
+<e243>1792</e243>
+<e375>1806</e375>
+<e353>1822</e353>
+<e805>1836</e805>
+<e827>1848</e827>
+<e794>1853</e794>
+<e816>1867</e816>
+<e783>1872</e783>
+<e364>1883</e364>
+<e386>1897</e386>
+<e176>1907</e176>
+<e617>1918</e617>
+<e595>1926</e595>
+<e606>1937</e606>
+<e198>1941</e198>
+<e165>1956</e165>
+<e187>1968</e187>
+<e154>1973</e154>
+<e628>1991</e628>
+<e689>2004</e689>
+<e259>2014</e259>
+<e667>2028</e667>
+<e248>2031</e248>
+<e270>2045</e270>
+<e237>2058</e237>
+<e226>2077</e226>
+<e678>2081</e678>
+<e700>2095</e700>
+<e733>2102</e733>
+<e303>2112</e303>
+<e281>2120</e281>
+<e755>2146</e755>
+<e722>2159</e722>
+<e744>2163</e744>
+<e711>2170</e711>
+<e292>2189</e292>
+<e314>2193</e314>
+<e61>2200</e61>
+<e932>2209</e932>
+<e502>2219</e502>
+<e910>2225</e910>
+<e491>2230</e491>
+<e513>2242</e513>
+<e480>2255</e480>
+<e72>2269</e72>
+<e39>2274</e39>
+<e921>2280</e921>
+<e50>2285</e50>
+<e943>2292</e943>
+<e204>2303</e204>
+<e645>2316</e645>
+<e634>2333</e634>
+<e656>2347</e656>
+<e623>2352</e623>
+<e215>2366</e215>
+<e182>2379</e182>
+<e193>2382</e193>
+<e876>2407</e876>
+<e446>2417</e446>
+<e424>2423</e424>
+<e898>2441</e898>
+<e27>2448</e27>
+<e865>2456</e865>
+<e16>2467</e16>
+<e887>2468</e887>
+<e854>2473</e854>
+<e435>2486</e435>
+<e457>2498</e457>
+<e976>2507</e976>
+<e546>2517</e546>
+<e524>2523</e524>
+<e105>2536</e105>
+<e998>2541</e998>
+<e127>2548</e127>
+<e94>2553</e94>
+<e965>2556</e965>
+<e116>2567</e116>
+<e987>2568</e987>
+<e83>2572</e83>
+<e954>2573</e954>
+<e535>2586</e535>
+<e557>2598</e557>
+<e347>2608</e347>
+<e788>2611</e788>
+<e777>2638</e777>
+<e369>2644</e369>
+<e766>2657</e766>
+<e358>2661</e358>
+<e325>2676</e325>
+<e336>2687</e336>
+<e799>2694</e799>
+<e447>2708</e447>
+<e888>2711</e888>
+<e17>2718</e17>
+<e877>2738</e877>
+<e469>2744</e469>
+<e866>2757</e866>
+<e458>2761</e458>
+<e425>2776</e425>
+<e436>2787</e436>
+<e28>2791</e28>
+<e899>2794</e899>
+<e590>2805</e590>
+<e160>2815</e160>
+<e138>2821</e138>
+<e612>2849</e612>
+<e579>2854</e579>
+<e601>2860</e601>
+<e568>2871</e568>
+<e149>2884</e149>
+<e7>2885</e7>
+<e171>2890</e171>
+<e832>2909</e832>
+<e402>2919</e402>
+<e810>2925</e810>
+<e391>2930</e391>
+<e413>2942</e413>
+<e380>2955</e380>
+<e821>2980</e821>
+<e843>2992</e843>
+<e818>3001</e818>
+<e388>3011</e388>
+<e796>3027</e796>
+<e377>3038</e377>
+<e366>3057</e366>
+<e829>3064</e829>
+<e807>3088</e807>
+<e399>3094</e399>
+<e432>3109</e432>
+<e410>3125</e410>
+<e862>3139</e862>
+<e13>3142</e13>
+<e884>3143</e884>
+<e851>3150</e851>
+<e873>3162</e873>
+<e840>3175</e840>
+<e421>3180</e421>
+<e443>3192</e443>
+<e190>3205</e190>
+<e631>3210</e631>
+<e609>3224</e609>
+<e620>3235</e620>
+<e212>3249</e212>
+<e179>3254</e179>
+<e201>3260</e201>
+<e168>3271</e168>
+<e642>3299</e642>
+<e333>3302</e333>
+<e774>3313</e774>
+<e752>3329</e752>
+<e763>3332</e763>
+<e355>3346</e355>
+<e322>3359</e322>
+<e344>3363</e344>
+<e311>3370</e311>
+<e785>3396</e785>
+<e575>3406</e575>
+<e145>3416</e145>
+<e553>3422</e553>
+<e134>3433</e134>
+<e156>3447</e156>
+<e123>3452</e123>
+<e994>3453</e994>
+<e983>3472</e983>
+<e564>3483</e564>
+<e586>3497</e586>
+<e675>3506</e675>
+<e245>3516</e245>
+<e653>3522</e653>
+<e234>3533</e234>
+<e256>3547</e256>
+<e223>3552</e223>
+<e664>3583</e664>
+<e686>3597</e686>
+<e476>3607</e476>
+<e46>3617</e46>
+<e917>3618</e917>
+<e24>3623</e24>
+<e895>3626</e895>
+<e906>3637</e906>
+<e498>3641</e498>
+<e465>3656</e465>
+<e487>3668</e487>
+<e454>3673</e454>
+<e35>3686</e35>
+<e928>3691</e928>
+<e57>3698</e57>
+<e576>3707</e576>
+<e146>3717</e146>
+<e124>3723</e124>
+<e995>3726</e995>
+<e598>3741</e598>
+<e565>3756</e565>
+<e587>3768</e587>
+<e554>3773</e554>
+<e135>3786</e135>
+<e157>3798</e157>
+<e289>3804</e289>
+<e267>3828</e267>
+<e719>3834</e719>
+<e741>3840</e741>
+<e708>3851</e708>
+<e730>3865</e730>
+<e697>3878</e697>
+<e278>3881</e278>
+<e300>3895</e300>
+<e961>3900</e961>
+<e90>3905</e90>
+<e531>3910</e531>
+<e509>3924</e509>
+<e520>3935</e520>
+<e112>3949</e112>
+<e79>3954</e79>
+<e101>3960</e101>
+<e972>3969</e972>
+<e68>3971</e68>
+<e939>3974</e939>
+<e950>3985</e950>
+<e542>3999</e542>
+<e603>4012</e603>
+<e581>4020</e581>
+<e162>4039</e162>
+<e184>4043</e184>
+<e151>4050</e151>
+<e173>4062</e173>
+<e140>4075</e140>
+<e592>4089</e592>
+<e614>4093</e614>
+<e647>4108</e647>
+<e217>4118</e217>
+<e195>4126</e195>
+<e206>4137</e206>
+<e669>4144</e669>
+<e658>4161</e658>
+<e625>4176</e625>
+<e636>4187</e636>
+<e228>4191</e228>
+<e846>4217</e846>
+<e824>4223</e824>
+<e405>4236</e405>
+<e427>4248</e427>
+<e394>4253</e394>
+<e416>4267</e416>
+<e383>4272</e383>
+<e835>4286</e835>
+<e857>4298</e857>
+<e118>4301</e118>
+<e989>4304</e989>
+<e559>4314</e559>
+<e96>4327</e96>
+<e967>4328</e967>
+<e548>4331</e548>
+<e570>4345</e570>
+<e537>4358</e537>
+<e129>4364</e129>
+<e5>4365</e5>
+<e526>4377</e526>
+<e978>4381</e978>
+<e107>4388</e107>
+<e790>4405</e790>
+<e360>4415</e360>
+<e338>4421</e338>
+<e1000>4439</e1000>
+<e812>4449</e812>
+<e779>4454</e779>
+<e801>4460</e801>
+<e768>4471</e768>
+<e349>4484</e349>
+<e371>4490</e371>
+<e890>4505</e890>
+<e460>4515</e460>
+<e438>4521</e438>
+<e19>4534</e19>
+<e41>4540</e41>
+<e912>4549</e912>
+<e8>4551</e8>
+<e879>4554</e879>
+<e901>4560</e901>
+<e30>4565</e30>
+<e868>4571</e868>
+<e449>4584</e449>
+<e471>4590</e471>
+<e261>4600</e261>
+<e702>4619</e702>
+<e691>4630</e691>
+<e713>4642</e713>
+<e680>4655</e680>
+<e272>4669</e272>
+<e239>4674</e239>
+<e250>4685</e250>
+<e361>4700</e361>
+<e802>4719</e802>
+<e791>4730</e791>
+<e813>4742</e813>
+<e780>4755</e780>
+<e372>4769</e372>
+<e339>4774</e339>
+<e350>4785</e350>
+<e504>4803</e504>
+<e74>4813</e74>
+<e945>4816</e945>
+<e52>4829</e52>
+<e63>4832</e63>
+<e934>4833</e934>
+<e956>4847</e956>
+<e923>4852</e923>
+<e515>4866</e515>
+<e482>4879</e482>
+<e493>4882</e493>
+<e85>4896</e85>
+<e746>4917</e746>
+<e724>4923</e724>
+<e305>4936</e305>
+<e327>4948</e327>
+<e294>4953</e294>
+<e316>4967</e316>
+<e283>4972</e283>
+<e735>4986</e735>
+<e757>4998</e757>
+<e732>5009</e732>
+<e302>5019</e302>
+<e710>5025</e710>
+<e291>5030</e291>
+<e313>5042</e313>
+<e280>5055</e280>
+<e721>5080</e721>
+<e743>5092</e743>
+<e776>5107</e776>
+<e346>5117</e346>
+<e324>5123</e324>
+<e798>5141</e798>
+<e765>5156</e765>
+<e787>5168</e787>
+<e754>5173</e754>
+<e335>5186</e335>
+<e357>5198</e357>
+<e104>5203</e104>
+<e975>5206</e975>
+<e545>5216</e545>
+<e953>5222</e953>
+<e534>5233</e534>
+<e556>5247</e556>
+<e523>5252</e523>
+<e115>5266</e115>
+<e82>5279</e82>
+<e93>5282</e93>
+<e964>5283</e964>
+<e986>5297</e986>
+<e247>5308</e247>
+<e688>5311</e688>
+<e677>5338</e677>
+<e269>5344</e269>
+<e666>5357</e666>
+<e258>5361</e258>
+<e225>5376</e225>
+<e236>5387</e236>
+<e699>5394</e699>
+<e489>5404</e489>
+<e59>5414</e59>
+<e467>5428</e467>
+<e48>5431</e48>
+<e919>5434</e919>
+<e941>5440</e941>
+<e70>5445</e70>
+<e908>5451</e908>
+<e37>5458</e37>
+<e930>5465</e930>
+<e26>5477</e26>
+<e897>5478</e897>
+<e478>5481</e478>
+<e500>5495</e500>
+<e589>5504</e589>
+<e159>5514</e159>
+<e567>5528</e567>
+<e148>5531</e148>
+<e170>5545</e170>
+<e137>5558</e137>
+<e126>5577</e126>
+<e997>5578</e997>
+<e578>5581</e578>
+<e600>5595</e600>
+<e390>5605</e390>
+<e831>5610</e831>
+<e809>5624</e809>
+<e820>5635</e820>
+<e412>5649</e412>
+<e379>5654</e379>
+<e401>5660</e401>
+<e368>5671</e368>
+<e842>5699</e842>
+<e490>5705</e490>
+<e931>5710</e931>
+<e60>5715</e60>
+<e38>5721</e38>
+<e909>5724</e909>
+<e920>5735</e920>
+<e512>5749</e512>
+<e479>5754</e479>
+<e501>5760</e501>
+<e468>5771</e468>
+<e49>5784</e49>
+<e71>5790</e71>
+<e942>5799</e942>
+<e633>5802</e633>
+<e203>5812</e203>
+<e181>5820</e181>
+<e655>5846</e655>
+<e622>5859</e622>
+<e644>5863</e644>
+<e611>5870</e611>
+<e192>5889</e192>
+<e214>5893</e214>
+<e875>5906</e875>
+<e445>5916</e445>
+<e853>5922</e853>
+<e434>5933</e434>
+<e456>5947</e456>
+<e423>5952</e423>
+<e15>5966</e15>
+<e864>5983</e864>
+<e886>5997</e886>
+<e76>6007</e76>
+<e947>6008</e947>
+<e517>6018</e517>
+<e495>6026</e495>
+<e506>6037</e506>
+<e98>6041</e98>
+<e969>6044</e969>
+<e65>6056</e65>
+<e958>6061</e958>
+<e87>6068</e87>
+<e54>6073</e54>
+<e925>6076</e925>
+<e936>6087</e936>
+<e528>6091</e528>
+<e561>6100</e561>
+<e131>6110</e131>
+<e109>6124</e109>
+<e3>6125</e3>
+<e991>6130</e991>
+<e120>6135</e120>
+<e980>6155</e980>
+<e572>6169</e572>
+<e539>6174</e539>
+<e550>6185</e550>
+<e142>6199</e142>
+<e760>6215</e760>
+<e738>6221</e738>
+<e319>6234</e319>
+<e341>6240</e341>
+<e308>6251</e308>
+<e330>6265</e330>
+<e297>6278</e297>
+<e749>6284</e749>
+<e771>6290</e771>
+<e32>6309</e32>
+<e903>6312</e903>
+<e881>6320</e881>
+<e10>6325</e10>
+<e462>6339</e462>
+<e484>6343</e484>
+<e451>6350</e451>
+<e473>6362</e473>
+<e440>6375</e440>
+<e21>6380</e21>
+<e892>6389</e892>
+<e43>6392</e43>
+<e914>6393</e914>
+<e704>6403</e704>
+<e274>6413</e274>
+<e252>6429</e252>
+<e263>6432</e263>
+<e715>6466</e715>
+<e682>6479</e682>
+<e693>6482</e693>
+<e285>6496</e285>
+<e804>6503</e804>
+<e374>6513</e374>
+<e352>6529</e352>
+<e363>6532</e363>
+<e815>6566</e815>
+<e782>6579</e782>
+<e793>6582</e793>
+<e385>6596</e385>
+<e175>6606</e175>
+<e153>6622</e153>
+<e605>6636</e605>
+<e627>6648</e627>
+<e594>6653</e594>
+<e616>6667</e616>
+<e583>6672</e583>
+<e164>6683</e164>
+<e186>6697</e186>
+<e275>6706</e275>
+<e253>6722</e253>
+<e705>6736</e705>
+<e727>6748</e727>
+<e694>6753</e694>
+<e716>6767</e716>
+<e683>6772</e683>
+<e264>6783</e264>
+<e286>6797</e286>
+<e418>6801</e418>
+<e859>6814</e859>
+<e396>6827</e396>
+<e848>6831</e848>
+<e870>6845</e870>
+<e837>6858</e837>
+<e429>6864</e429>
+<e826>6877</e826>
+<e407>6888</e407>
+<e660>6915</e660>
+<e638>6921</e638>
+<e219>6934</e219>
+<e241>6940</e241>
+<e208>6951</e208>
+<e230>6965</e230>
+<e197>6978</e197>
+<e649>6984</e649>
+<e671>6990</e671>
+<e646>7017</e646>
+<e624>7023</e624>
+<e205>7036</e205>
+<e227>7048</e227>
+<e194>7053</e194>
+<e216>7067</e216>
+<e183>7072</e183>
+<e635>7086</e635>
+<e657>7098</e657>
+<e690>7105</e690>
+<e260>7115</e260>
+<e238>7121</e238>
+<e712>7149</e712>
+<e679>7154</e679>
+<e701>7160</e701>
+<e668>7171</e668>
+<e249>7184</e249>
+<e271>7190</e271>
+<e18>7201</e18>
+<e889>7204</e889>
+<e459>7214</e459>
+<e867>7228</e867>
+<e448>7231</e448>
+<e470>7245</e470>
+<e437>7258</e437>
+<e29>7264</e29>
+<e426>7277</e426>
+<e878>7281</e878>
+<e900>7295</e900>
+<e161>7300</e161>
+<e602>7319</e602>
+<e591>7330</e591>
+<e613>7342</e613>
+<e580>7355</e580>
+<e172>7369</e172>
+<e139>7374</e139>
+<e6>7375</e6>
+<e150>7385</e150>
+<e833>7402</e833>
+<e403>7412</e403>
+<e381>7420</e381>
+<e855>7446</e855>
+<e822>7459</e822>
+<e844>7463</e844>
+<e811>7470</e811>
+<e392>7489</e392>
+<e414>7493</e414>
+<e933>7502</e933>
+<e503>7512</e503>
+<e481>7520</e481>
+<e62>7539</e62>
+<e84>7543</e84>
+<e955>7546</e955>
+<e51>7550</e51>
+<e922>7559</e922>
+<e73>7562</e73>
+<e944>7563</e944>
+<e911>7570</e911>
+<e40>7575</e40>
+<e492>7589</e492>
+<e514>7593</e514>
+<e304>7603</e304>
+<e745>7616</e745>
+<e734>7633</e734>
+<e756>7647</e756>
+<e723>7652</e723>
+<e315>7666</e315>
+<e282>7679</e282>
+<e293>7682</e293>
+<e404>7703</e404>
+<e845>7716</e845>
+<e834>7733</e834>
+<e856>7747</e856>
+<e823>7752</e823>
+<e415>7766</e415>
+<e382>7779</e382>
+<e393>7782</e393>
+<e547>7808</e547>
+<e988>7811</e988>
+<e117>7818</e117>
+<e95>7826</e95>
+<e106>7837</e106>
+<e977>7838</e977>
+<e569>7844</e569>
+<e966>7857</e966>
+<e558>7861</e558>
+<e525>7876</e525>
+<e536>7887</e536>
+<e128>7891</e128>
+<e999>7894</e999>
+<e789>7904</e789>
+<e359>7914</e359>
+<e767>7928</e767>
+<e348>7931</e348>
+<e370>7945</e370>
+<e337>7958</e337>
+<e326>7977</e326>
+<e778>7981</e778>
+<e800>7995</e800>
+<e775>8006</e775>
+<e345>8016</e345>
+<e753>8022</e753>
+<e334>8033</e334>
+<e356>8047</e356>
+<e323>8052</e323>
+<e764>8083</e764>
+<e786>8097</e786>
+<e389>8104</e389>
+<e367>8128</e367>
+<e819>8134</e819>
+<e841>8140</e841>
+<e808>8151</e808>
+<e830>8165</e830>
+<e797>8178</e797>
+<e378>8181</e378>
+<e400>8195</e400>
+<e147>8208</e147>
+<e588>8211</e588>
+<e996>8227</e996>
+<e577>8238</e577>
+<e169>8244</e169>
+<e566>8257</e566>
+<e158>8261</e158>
+<e125>8276</e125>
+<e136>8287</e136>
+<e599>8294</e599>
+<e290>8305</e290>
+<e731>8310</e731>
+<e709>8324</e709>
+<e720>8335</e720>
+<e312>8349</e312>
+<e279>8354</e279>
+<e301>8360</e301>
+<e268>8371</e268>
+<e742>8399</e742>
+<e532>8409</e532>
+<e102>8419</e102>
+<e510>8425</e510>
+<e91>8430</e91>
+<e962>8439</e962>
+<e113>8442</e113>
+<e984>8443</e984>
+<e951>8450</e951>
+<e80>8455</e80>
+<e973>8462</e973>
+<e940>8475</e940>
+<e521>8480</e521>
+<e543>8492</e543>
+<e632>8509</e632>
+<e202>8519</e202>
+<e610>8525</e610>
+<e191>8530</e191>
+<e213>8542</e213>
+<e180>8555</e180>
+<e621>8580</e621>
+<e643>8592</e643>
+<e433>8602</e433>
+<e874>8613</e874>
+<e852>8629</e852>
+<e863>8632</e863>
+<e455>8646</e455>
+<e422>8659</e422>
+<e444>8663</e444>
+<e411>8670</e411>
+<e14>8693</e14>
+<e885>8696</e885>
+<e533>8702</e533>
+<e103>8712</e103>
+<e974>8713</e974>
+<e81>8720</e81>
+<e952>8729</e952>
+<e963>8732</e963>
+<e555>8746</e555>
+<e522>8759</e522>
+<e544>8763</e544>
+<e511>8770</e511>
+<e92>8789</e92>
+<e114>8793</e114>
+<e985>8796</e985>
+<e676>8807</e676>
+<e246>8817</e246>
+<e224>8823</e224>
+<e698>8841</e698>
+<e665>8856</e665>
+<e687>8868</e687>
+<e654>8873</e654>
+<e235>8886</e235>
+<e257>8898</e257>
+<e918>8901</e918>
+<e47>8908</e47>
+<e488>8911</e488>
+<e896>8927</e896>
+<e477>8938</e477>
+<e69>8944</e69>
+<e466>8957</e466>
+<e58>8961</e58>
+<e929>8964</e929>
+<e25>8976</e25>
+<e36>8987</e36>
+<e907>8988</e907>
+<e499>8994</e499>
+<e990>9005</e990>
+<e560>9015</e560>
+<e538>9021</e538>
+<e119>9034</e119>
+<e4>9035</e4>
+<e141>9040</e141>
+<e108>9051</e108>
+<e979>9054</e979>
+<e130>9065</e130>
+<e968>9071</e968>
+<e97>9078</e97>
+<e549>9084</e549>
+<e571>9090</e571>
+<e604>9103</e604>
+<e174>9113</e174>
+<e152>9129</e152>
+<e163>9132</e163>
+<e615>9166</e615>
+<e582>9179</e582>
+<e593>9182</e593>
+<e185>9196</e185>
+<e803>9212</e803>
+<e781>9220</e781>
+<e362>9239</e362>
+<e384>9243</e384>
+<e351>9250</e351>
+<e373>9262</e373>
+<e340>9275</e340>
+<e792>9289</e792>
+<e814>9293</e814>
+<e75>9306</e75>
+<e946>9317</e946>
+<e53>9322</e53>
+<e924>9323</e924>
+<e505>9336</e505>
+<e527>9348</e527>
+<e494>9353</e494>
+<e516>9367</e516>
+<e483>9372</e483>
+<e64>9383</e64>
+<e935>9386</e935>
+<e86>9397</e86>
+<e957>9398</e957>
+<e747>9408</e747>
+<e317>9418</e317>
+<e295>9426</e295>
+<e306>9437</e306>
+<e769>9444</e769>
+<e758>9461</e758>
+<e725>9476</e725>
+<e736>9487</e736>
+<e328>9491</e328>
+<e847>9508</e847>
+<e417>9518</e417>
+<e395>9526</e395>
+<e406>9537</e406>
+<e869>9544</e869>
+<e858>9561</e858>
+<e825>9576</e825>
+<e836>9587</e836>
+<e428>9591</e428>
+<e218>9601</e218>
+<e659>9614</e659>
+<e196>9627</e196>
+<e648>9631</e648>
+<e670>9645</e670>
+<e637>9658</e637>
+<e229>9664</e229>
+<e626>9677</e626>
+<e207>9688</e207>
+<e318>9701</e318>
+<e759>9714</e759>
+<e296>9727</e296>
+<e748>9731</e748>
+<e770>9745</e770>
+<e737>9758</e737>
+<e329>9764</e329>
+<e726>9777</e726>
+<e307>9788</e307>
+<e461>9800</e461>
+<e31>9810</e31>
+<e902>9819</e902>
+<e9>9824</e9>
+<e891>9830</e891>
+<e20>9835</e20>
+<e913>9842</e913>
+<e880>9855</e880>
+<e472>9869</e472>
+<e439>9874</e439>
+<e450>9885</e450>
+<e42>9899</e42>
+<e703>9912</e703>
+<e681>9920</e681>
+<e262>9939</e262>
+<e284>9943</e284>
+<e251>9950</e251>
+<e273>9962</e273>
+<e240>9975</e240>
+<e692>9989</e692>
+<e714>9993</e714>
+</out>
\ No newline at end of file
diff --git a/test/tests/perf-gold/sort/sort-words1.out b/test/tests/perf-gold/sort/sort-words1.out
new file mode 100644
index 0000000..80700e7
--- /dev/null
+++ b/test/tests/perf-gold/sort/sort-words1.out
@@ -0,0 +1,9938 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out><item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>above</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>acceptable</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>address</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>adjacent</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>After</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>allows</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>and</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>Assessing</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>attach</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>based</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>basics</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Because</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>Become</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>below</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>body</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>Boston</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>BOSTON</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>Bostonian</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>box</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>build</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>Cash</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>chapteR</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>children</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>cities</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>CITY</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>claim</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>class</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>code</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>collector</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>communities</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>confident</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>convenience</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>day</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>defined</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>department</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>deputy</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>designed</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>developing</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>development</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>document</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>drop-in</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>effective</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>elements</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>enough</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>exemption</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>families</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>fees</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>find</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>fitness</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>floor</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>Form</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>fully</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>General</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>get</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>goals</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>greater</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>Hall</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>health</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>Helping</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>heritage</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>highest</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>ideals</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>immigrants</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>important</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>improve</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>instruction</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>interpreter</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>into</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>it</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>late</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>LAWS</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learn</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>learning</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>life</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>loCated</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>mail</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>masters</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mayor</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>members</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mezzanine</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>mind</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>months</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>move</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>must</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>name</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>Namespaces</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>never</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>nonmembers</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>of</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>Office</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>organized</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>owner's</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>parcel</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>participate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>paRTIcipate</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>personal</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>pool</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>prefix</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>preFIX</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>prior</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>processors</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>proof</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>property</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>quality</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognize</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>recognized</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refugees</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>refund</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>required</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>residential</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>room</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>safe</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>security</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>shape</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>social</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>specified</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>spirit</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>start</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>street</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strikes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>strokes</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swim</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>swimming</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>TAxes</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>taxpayer</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>telephone</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>third</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>TIme</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>to</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>To</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>too</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>town</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>track</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>tuesday</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>unpaid</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>upon</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>URI</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>use</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>ward</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>water</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>way</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>wednesday</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>which</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>work</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>workout</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XML</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>XSLT</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+<item>zip</item>
+</out>
\ No newline at end of file
diff --git a/test/tests/perf/basic/basic-all_well.xml b/test/tests/perf/basic/basic-all_well.xml
new file mode 100644
index 0000000..adeee93
--- /dev/null
+++ b/test/tests/perf/basic/basic-all_well.xml
@@ -0,0 +1,7020 @@
+<PLAY>
+<TITLE>All's Well That Ends Well</TITLE>
+
+<FM>
+<P>ASCII text placed in the public domain by Moby Lexical Tools, 1992.</P>
+<P>SGML markup by Jon Bosak, 1992-1994.</P>
+<P>XML version by Jon Bosak, 1996-1999.</P>
+<P>The XML markup in this version is Copyright &#169; 1999 Jon Bosak.
+This work may freely be distributed on condition that it not be
+modified or altered in any way.</P>
+</FM>
+
+<PERSONAE>
+<TITLE>Dramatis Personae</TITLE>
+
+<PERSONA>KING OF FRANCE</PERSONA>
+<PERSONA>DUKE OF FLORENCE</PERSONA>
+<PERSONA>BERTRAM, Count of Rousillon.</PERSONA>
+<PERSONA>LAFEU, an old lord.</PERSONA>
+<PERSONA>PAROLLES, a follower of Bertram.</PERSONA>
+
+<PGROUP>
+<PERSONA>Steward</PERSONA>
+<PERSONA>Clown</PERSONA>
+<GRPDESCR>servants to the Countess of Rousillon.</GRPDESCR>
+</PGROUP>
+
+<PERSONA>A Page. </PERSONA>
+<PERSONA>COUNTESS OF ROUSILLON, mother to Bertram. </PERSONA>
+<PERSONA>HELENA, a gentlewoman protected by the Countess.</PERSONA>
+<PERSONA>An old Widow of Florence. </PERSONA>
+<PERSONA>DIANA, daughter to the Widow.</PERSONA>
+
+<PGROUP>
+<PERSONA>VIOLENTA</PERSONA>
+<PERSONA>MARIANA</PERSONA>
+<GRPDESCR>neighbours and friends to the Widow.</GRPDESCR>
+</PGROUP>
+
+<PERSONA>Lords, Officers, Soldiers, &amp;c., French and Florentine.</PERSONA>
+</PERSONAE>
+
+<SCNDESCR>SCENE  Rousillon; Paris; Florence; Marseilles.</SCNDESCR>
+
+<PLAYSUBT>ALL'S WELL THAT ENDS WELL</PLAYSUBT>
+
+<ACT><TITLE>ACT I</TITLE>
+
+<SCENE><TITLE>SCENE I.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter BERTRAM, the COUNTESS of Rousillon, HELENA,
+and LAFEU, all in black</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>In delivering my son from me, I bury a second husband.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>And I in going, madam, weep o'er my father's death</LINE>
+<LINE>anew: but I must attend his majesty's command, to</LINE>
+<LINE>whom I am now in ward, evermore in subjection.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You shall find of the king a husband, madam; you,</LINE>
+<LINE>sir, a father: he that so generally is at all times</LINE>
+<LINE>good must of necessity hold his virtue to you; whose</LINE>
+<LINE>worthiness would stir it up where it wanted rather</LINE>
+<LINE>than lack it where there is such abundance.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What hope is there of his majesty's amendment?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He hath abandoned his physicians, madam; under whose</LINE>
+<LINE>practises he hath persecuted time with hope, and</LINE>
+<LINE>finds no other advantage in the process but only the</LINE>
+<LINE>losing of hope by time.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>This young gentlewoman had a father,--O, that</LINE>
+<LINE>'had'! how sad a passage 'tis!--whose skill was</LINE>
+<LINE>almost as great as his honesty; had it stretched so</LINE>
+<LINE>far, would have made nature immortal, and death</LINE>
+<LINE>should have play for lack of work. Would, for the</LINE>
+<LINE>king's sake, he were living! I think it would be</LINE>
+<LINE>the death of the king's disease.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>How called you the man you speak of, madam?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>He was famous, sir, in his profession, and it was</LINE>
+<LINE>his great right to be so: Gerard de Narbon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He was excellent indeed, madam: the king very</LINE>
+<LINE>lately spoke of him admiringly and mourningly: he</LINE>
+<LINE>was skilful enough to have lived still, if knowledge</LINE>
+<LINE>could be set up against mortality.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>What is it, my good lord, the king languishes of?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A fistula, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I heard not of it before.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I would it were not notorious. Was this gentlewoman</LINE>
+<LINE>the daughter of Gerard de Narbon?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>His sole child, my lord, and bequeathed to my</LINE>
+<LINE>overlooking. I have those hopes of her good that</LINE>
+<LINE>her education promises; her dispositions she</LINE>
+<LINE>inherits, which makes fair gifts fairer; for where</LINE>
+<LINE>an unclean mind carries virtuous qualities, there</LINE>
+<LINE>commendations go with pity; they are virtues and</LINE>
+<LINE>traitors too; in her they are the better for their</LINE>
+<LINE>simpleness; she derives her honesty and achieves her goodness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Your commendations, madam, get from her tears.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>'Tis the best brine a maiden can season her praise</LINE>
+<LINE>in. The remembrance of her father never approaches</LINE>
+<LINE>her heart but the tyranny of her sorrows takes all</LINE>
+<LINE>livelihood from her cheek. No more of this, Helena;</LINE>
+<LINE>go to, no more; lest it be rather thought you affect</LINE>
+<LINE>a sorrow than have it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I do affect a sorrow indeed, but I have it too.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Moderate lamentation is the right of the dead,</LINE>
+<LINE>excessive grief the enemy to the living.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>If the living be enemy to the grief, the excess</LINE>
+<LINE>makes it soon mortal.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Madam, I desire your holy wishes.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>How understand we that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Be thou blest, Bertram, and succeed thy father</LINE>
+<LINE>In manners, as in shape! thy blood and virtue</LINE>
+<LINE>Contend for empire in thee, and thy goodness</LINE>
+<LINE>Share with thy birthright! Love all, trust a few,</LINE>
+<LINE>Do wrong to none: be able for thine enemy</LINE>
+<LINE>Rather in power than use, and keep thy friend</LINE>
+<LINE>Under thy own life's key: be cheque'd for silence,</LINE>
+<LINE>But never tax'd for speech. What heaven more will,</LINE>
+<LINE>That thee may furnish and my prayers pluck down,</LINE>
+<LINE>Fall on thy head! Farewell, my lord;</LINE>
+<LINE>'Tis an unseason'd courtier; good my lord,</LINE>
+<LINE>Advise him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He cannot want the best</LINE>
+<LINE>That shall attend his love.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Heaven bless him! Farewell, Bertram.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE><STAGEDIR>To HELENA</STAGEDIR>  The best wishes that can be forged in</LINE>
+<LINE>your thoughts be servants to you! Be comfortable</LINE>
+<LINE>to my mother, your mistress, and make much of her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Farewell, pretty lady: you must hold the credit of</LINE>
+<LINE>your father.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt BERTRAM and LAFEU</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>O, were that all! I think not on my father;</LINE>
+<LINE>And these great tears grace his remembrance more</LINE>
+<LINE>Than those I shed for him. What was he like?</LINE>
+<LINE>I have forgot him: my imagination</LINE>
+<LINE>Carries no favour in't but Bertram's.</LINE>
+<LINE>I am undone: there is no living, none,</LINE>
+<LINE>If Bertram be away. 'Twere all one</LINE>
+<LINE>That I should love a bright particular star</LINE>
+<LINE>And think to wed it, he is so above me:</LINE>
+<LINE>In his bright radiance and collateral light</LINE>
+<LINE>Must I be comforted, not in his sphere.</LINE>
+<LINE>The ambition in my love thus plagues itself:</LINE>
+<LINE>The hind that would be mated by the lion</LINE>
+<LINE>Must die for love. 'Twas pretty, though plague,</LINE>
+<LINE>To see him every hour; to sit and draw</LINE>
+<LINE>His arched brows, his hawking eye, his curls,</LINE>
+<LINE>In our heart's table; heart too capable</LINE>
+<LINE>Of every line and trick of his sweet favour:</LINE>
+<LINE>But now he's gone, and my idolatrous fancy</LINE>
+<LINE>Must sanctify his reliques. Who comes here?</LINE>
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+<STAGEDIR>Aside</STAGEDIR>
+<LINE>One that goes with him: I love him for his sake;</LINE>
+<LINE>And yet I know him a notorious liar,</LINE>
+<LINE>Think him a great way fool, solely a coward;</LINE>
+<LINE>Yet these fixed evils sit so fit in him,</LINE>
+<LINE>That they take place, when virtue's steely bones</LINE>
+<LINE>Look bleak i' the cold wind: withal, full oft we see</LINE>
+<LINE>Cold wisdom waiting on superfluous folly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Save you, fair queen!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>And you, monarch!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>No.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>And no.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Are you meditating on virginity?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay. You have some stain of soldier in you: let me</LINE>
+<LINE>ask you a question. Man is enemy to virginity; how</LINE>
+<LINE>may we barricado it against him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Keep him out.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>But he assails; and our virginity, though valiant,</LINE>
+<LINE>in the defence yet is weak: unfold to us some</LINE>
+<LINE>warlike resistance.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>There is none: man, sitting down before you, will</LINE>
+<LINE>undermine you and blow you up.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Bless our poor virginity from underminers and</LINE>
+<LINE>blowers up! Is there no military policy, how</LINE>
+<LINE>virgins might blow up men?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Virginity being blown down, man will quicklier be</LINE>
+<LINE>blown up: marry, in blowing him down again, with</LINE>
+<LINE>the breach yourselves made, you lose your city. It</LINE>
+<LINE>is not politic in the commonwealth of nature to</LINE>
+<LINE>preserve virginity. Loss of virginity is rational</LINE>
+<LINE>increase and there was never virgin got till</LINE>
+<LINE>virginity was first lost. That you were made of is</LINE>
+<LINE>metal to make virgins. Virginity by being once lost</LINE>
+<LINE>may be ten times found; by being ever kept, it is</LINE>
+<LINE>ever lost: 'tis too cold a companion; away with 't!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I will stand for 't a little, though therefore I die a virgin.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>There's little can be said in 't; 'tis against the</LINE>
+<LINE>rule of nature. To speak on the part of virginity,</LINE>
+<LINE>is to accuse your mothers; which is most infallible</LINE>
+<LINE>disobedience. He that hangs himself is a virgin:</LINE>
+<LINE>virginity murders itself and should be buried in</LINE>
+<LINE>highways out of all sanctified limit, as a desperate</LINE>
+<LINE>offendress against nature. Virginity breeds mites,</LINE>
+<LINE>much like a cheese; consumes itself to the very</LINE>
+<LINE>paring, and so dies with feeding his own stomach.</LINE>
+<LINE>Besides, virginity is peevish, proud, idle, made of</LINE>
+<LINE>self-love, which is the most inhibited sin in the</LINE>
+<LINE>canon. Keep it not; you cannot choose but loose</LINE>
+<LINE>by't: out with 't! within ten year it will make</LINE>
+<LINE>itself ten, which is a goodly increase; and the</LINE>
+<LINE>principal itself not much the worse: away with 't!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>How might one do, sir, to lose it to her own liking?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Let me see: marry, ill, to like him that ne'er it</LINE>
+<LINE>likes. 'Tis a commodity will lose the gloss with</LINE>
+<LINE>lying; the longer kept, the less worth: off with 't</LINE>
+<LINE>while 'tis vendible; answer the time of request.</LINE>
+<LINE>Virginity, like an old courtier, wears her cap out</LINE>
+<LINE>of fashion: richly suited, but unsuitable: just</LINE>
+<LINE>like the brooch and the tooth-pick, which wear not</LINE>
+<LINE>now. Your date is better in your pie and your</LINE>
+<LINE>porridge than in your cheek; and your virginity,</LINE>
+<LINE>your old virginity, is like one of our French</LINE>
+<LINE>withered pears, it looks ill, it eats drily; marry,</LINE>
+<LINE>'tis a withered pear; it was formerly better;</LINE>
+<LINE>marry, yet 'tis a withered pear: will you anything with it?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Not my virginity yet</LINE>
+<LINE>There shall your master have a thousand loves,</LINE>
+<LINE>A mother and a mistress and a friend,</LINE>
+<LINE>A phoenix, captain and an enemy,</LINE>
+<LINE>A guide, a goddess, and a sovereign,</LINE>
+<LINE>A counsellor, a traitress, and a dear;</LINE>
+<LINE>His humble ambition, proud humility,</LINE>
+<LINE>His jarring concord, and his discord dulcet,</LINE>
+<LINE>His faith, his sweet disaster; with a world</LINE>
+<LINE>Of pretty, fond, adoptious christendoms,</LINE>
+<LINE>That blinking Cupid gossips. Now shall he--</LINE>
+<LINE>I know not what he shall. God send him well!</LINE>
+<LINE>The court's a learning place, and he is one--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What one, i' faith?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That I wish well. 'Tis pity--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What's pity?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That wishing well had not a body in't,</LINE>
+<LINE>Which might be felt; that we, the poorer born,</LINE>
+<LINE>Whose baser stars do shut us up in wishes,</LINE>
+<LINE>Might with effects of them follow our friends,</LINE>
+<LINE>And show what we alone must think, which never</LINE>
+<LINE>Return us thanks.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter Page</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Page</SPEAKER>
+<LINE>Monsieur Parolles, my lord calls for you.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Little Helen, farewell; if I can remember thee, I</LINE>
+<LINE>will think of thee at court.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Monsieur Parolles, you were born under a charitable star.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Under Mars, I.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I especially think, under Mars.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why under Mars?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>The wars have so kept you under that you must needs</LINE>
+<LINE>be born under Mars.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>When he was predominant.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>When he was retrograde, I think, rather.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why think you so?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>You go so much backward when you fight.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That's for advantage.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>So is running away, when fear proposes the safety;</LINE>
+<LINE>but the composition that your valour and fear makes</LINE>
+<LINE>in you is a virtue of a good wing, and I like the wear well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I am so full of businesses, I cannot answer thee</LINE>
+<LINE>acutely. I will return perfect courtier; in the</LINE>
+<LINE>which, my instruction shall serve to naturalize</LINE>
+<LINE>thee, so thou wilt be capable of a courtier's</LINE>
+<LINE>counsel and understand what advice shall thrust upon</LINE>
+<LINE>thee; else thou diest in thine unthankfulness, and</LINE>
+<LINE>thine ignorance makes thee away: farewell. When</LINE>
+<LINE>thou hast leisure, say thy prayers; when thou hast</LINE>
+<LINE>none, remember thy friends; get thee a good husband,</LINE>
+<LINE>and use him as he uses thee; so, farewell.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Our remedies oft in ourselves do lie,</LINE>
+<LINE>Which we ascribe to heaven: the fated sky</LINE>
+<LINE>Gives us free scope, only doth backward pull</LINE>
+<LINE>Our slow designs when we ourselves are dull.</LINE>
+<LINE>What power is it which mounts my love so high,</LINE>
+<LINE>That makes me see, and cannot feed mine eye?</LINE>
+<LINE>The mightiest space in fortune nature brings</LINE>
+<LINE>To join like likes and kiss like native things.</LINE>
+<LINE>Impossible be strange attempts to those</LINE>
+<LINE>That weigh their pains in sense and do suppose</LINE>
+<LINE>What hath been cannot be: who ever strove</LINE>
+<LINE>So show her merit, that did miss her love?</LINE>
+<LINE>The king's disease--my project may deceive me,</LINE>
+<LINE>But my intents are fix'd and will not leave me.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Flourish of cornets. Enter the KING of France,
+with letters, and divers Attendants</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>The Florentines and Senoys are by the ears;</LINE>
+<LINE>Have fought with equal fortune and continue</LINE>
+<LINE>A braving war.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>So 'tis reported, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Nay, 'tis most credible; we here received it</LINE>
+<LINE>A certainty, vouch'd from our cousin Austria,</LINE>
+<LINE>With caution that the Florentine will move us</LINE>
+<LINE>For speedy aid; wherein our dearest friend</LINE>
+<LINE>Prejudicates the business and would seem</LINE>
+<LINE>To have us make denial.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>His love and wisdom,</LINE>
+<LINE>Approved so to your majesty, may plead</LINE>
+<LINE>For amplest credence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>He hath arm'd our answer,</LINE>
+<LINE>And Florence is denied before he comes:</LINE>
+<LINE>Yet, for our gentlemen that mean to see</LINE>
+<LINE>The Tuscan service, freely have they leave</LINE>
+<LINE>To stand on either part.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>It well may serve</LINE>
+<LINE>A nursery to our gentry, who are sick</LINE>
+<LINE>For breathing and exploit.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What's he comes here?</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter BERTRAM, LAFEU, and PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>It is the Count Rousillon, my good lord,</LINE>
+<LINE>Young Bertram.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Youth, thou bear'st thy father's face;</LINE>
+<LINE>Frank nature, rather curious than in haste,</LINE>
+<LINE>Hath well composed thee. Thy father's moral parts</LINE>
+<LINE>Mayst thou inherit too! Welcome to Paris.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My thanks and duty are your majesty's.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I would I had that corporal soundness now,</LINE>
+<LINE>As when thy father and myself in friendship</LINE>
+<LINE>First tried our soldiership! He did look far</LINE>
+<LINE>Into the service of the time and was</LINE>
+<LINE>Discipled of the bravest: he lasted long;</LINE>
+<LINE>But on us both did haggish age steal on</LINE>
+<LINE>And wore us out of act. It much repairs me</LINE>
+<LINE>To talk of your good father. In his youth</LINE>
+<LINE>He had the wit which I can well observe</LINE>
+<LINE>To-day in our young lords; but they may jest</LINE>
+<LINE>Till their own scorn return to them unnoted</LINE>
+<LINE>Ere they can hide their levity in honour;</LINE>
+<LINE>So like a courtier, contempt nor bitterness</LINE>
+<LINE>Were in his pride or sharpness; if they were,</LINE>
+<LINE>His equal had awaked them, and his honour,</LINE>
+<LINE>Clock to itself, knew the true minute when</LINE>
+<LINE>Exception bid him speak, and at this time</LINE>
+<LINE>His tongue obey'd his hand: who were below him</LINE>
+<LINE>He used as creatures of another place</LINE>
+<LINE>And bow'd his eminent top to their low ranks,</LINE>
+<LINE>Making them proud of his humility,</LINE>
+<LINE>In their poor praise he humbled. Such a man</LINE>
+<LINE>Might be a copy to these younger times;</LINE>
+<LINE>Which, follow'd well, would demonstrate them now</LINE>
+<LINE>But goers backward.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>His good remembrance, sir,</LINE>
+<LINE>Lies richer in your thoughts than on his tomb;</LINE>
+<LINE>So in approof lives not his epitaph</LINE>
+<LINE>As in your royal speech.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Would I were with him! He would always say--</LINE>
+<LINE>Methinks I hear him now; his plausive words</LINE>
+<LINE>He scatter'd not in ears, but grafted them,</LINE>
+<LINE>To grow there and to bear,--'Let me not live,'--</LINE>
+<LINE>This his good melancholy oft began,</LINE>
+<LINE>On the catastrophe and heel of pastime,</LINE>
+<LINE>When it was out,--'Let me not live,' quoth he,</LINE>
+<LINE>'After my flame lacks oil, to be the snuff</LINE>
+<LINE>Of younger spirits, whose apprehensive senses</LINE>
+<LINE>All but new things disdain; whose judgments are</LINE>
+<LINE>Mere fathers of their garments; whose constancies</LINE>
+<LINE>Expire before their fashions.' This he wish'd;</LINE>
+<LINE>I after him do after him wish too,</LINE>
+<LINE>Since I nor wax nor honey can bring home,</LINE>
+<LINE>I quickly were dissolved from my hive,</LINE>
+<LINE>To give some labourers room.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>You are loved, sir:</LINE>
+<LINE>They that least lend it you shall lack you first.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I fill a place, I know't. How long is't, count,</LINE>
+<LINE>Since the physician at your father's died?</LINE>
+<LINE>He was much famed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Some six months since, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>If he were living, I would try him yet.</LINE>
+<LINE>Lend me an arm; the rest have worn me out</LINE>
+<LINE>With several applications; nature and sickness</LINE>
+<LINE>Debate it at their leisure. Welcome, count;</LINE>
+<LINE>My son's no dearer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Thank your majesty.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt. Flourish</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS, Steward, and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I will now hear; what say you of this gentlewoman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>Madam, the care I have had to even your content, I</LINE>
+<LINE>wish might be found in the calendar of my past</LINE>
+<LINE>endeavours; for then we wound our modesty and make</LINE>
+<LINE>foul the clearness of our deservings, when of</LINE>
+<LINE>ourselves we publish them.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What does this knave here? Get you gone, sirrah:</LINE>
+<LINE>the complaints I have heard of you I do not all</LINE>
+<LINE>believe: 'tis my slowness that I do not; for I know</LINE>
+<LINE>you lack not folly to commit them, and have ability</LINE>
+<LINE>enough to make such knaveries yours.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>'Tis not unknown to you, madam, I am a poor fellow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Well, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>No, madam, 'tis not so well that I am poor, though</LINE>
+<LINE>many of the rich are damned: but, if I may have</LINE>
+<LINE>your ladyship's good will to go to the world, Isbel</LINE>
+<LINE>the woman and I will do as we may.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Wilt thou needs be a beggar?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I do beg your good will in this case.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>In what case?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>In Isbel's case and mine own. Service is no</LINE>
+<LINE>heritage: and I think I shall never have the</LINE>
+<LINE>blessing of God till I have issue o' my body; for</LINE>
+<LINE>they say barnes are blessings.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Tell me thy reason why thou wilt marry.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>My poor body, madam, requires it: I am driven on</LINE>
+<LINE>by the flesh; and he must needs go that the devil drives.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Is this all your worship's reason?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Faith, madam, I have other holy reasons such as they</LINE>
+<LINE>are.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>May the world know them?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I have been, madam, a wicked creature, as you and</LINE>
+<LINE>all flesh and blood are; and, indeed, I do marry</LINE>
+<LINE>that I may repent.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Thy marriage, sooner than thy wickedness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I am out o' friends, madam; and I hope to have</LINE>
+<LINE>friends for my wife's sake.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Such friends are thine enemies, knave.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>You're shallow, madam, in great friends; for the</LINE>
+<LINE>knaves come to do that for me which I am aweary of.</LINE>
+<LINE>He that ears my land spares my team and gives me</LINE>
+<LINE>leave to in the crop; if I be his cuckold, he's my</LINE>
+<LINE>drudge: he that comforts my wife is the cherisher</LINE>
+<LINE>of my flesh and blood; he that cherishes my flesh</LINE>
+<LINE>and blood loves my flesh and blood; he that loves my</LINE>
+<LINE>flesh and blood is my friend: ergo, he that kisses</LINE>
+<LINE>my wife is my friend. If men could be contented to</LINE>
+<LINE>be what they are, there were no fear in marriage;</LINE>
+<LINE>for young Charbon the Puritan and old Poysam the</LINE>
+<LINE>Papist, howsome'er their hearts are severed in</LINE>
+<LINE>religion, their heads are both one; they may jowl</LINE>
+<LINE>horns together, like any deer i' the herd.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Wilt thou ever be a foul-mouthed and calumnious knave?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>A prophet I, madam; and I speak the truth the next</LINE>
+<LINE>way:</LINE>
+<LINE>For I the ballad will repeat,</LINE>
+<LINE>Which men full true shall find;</LINE>
+<LINE>Your marriage comes by destiny,</LINE>
+<LINE>Your cuckoo sings by kind.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Get you gone, sir; I'll talk with you more anon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>May it please you, madam, that he bid Helen come to</LINE>
+<LINE>you: of her I am to speak.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Sirrah, tell my gentlewoman I would speak with her;</LINE>
+<LINE>Helen, I mean.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Was this fair face the cause, quoth she,</LINE>
+<LINE>Why the Grecians sacked Troy?</LINE>
+<LINE>Fond done, done fond,</LINE>
+<LINE>Was this King Priam's joy?</LINE>
+<LINE>With that she sighed as she stood,</LINE>
+<LINE>With that she sighed as she stood,</LINE>
+<LINE>And gave this sentence then;</LINE>
+<LINE>Among nine bad if one be good,</LINE>
+<LINE>Among nine bad if one be good,</LINE>
+<LINE>There's yet one good in ten.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What, one good in ten? you corrupt the song, sirrah.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>One good woman in ten, madam; which is a purifying</LINE>
+<LINE>o' the song: would God would serve the world so all</LINE>
+<LINE>the year! we'ld find no fault with the tithe-woman,</LINE>
+<LINE>if I were the parson. One in ten, quoth a'! An we</LINE>
+<LINE>might have a good woman born but one every blazing</LINE>
+<LINE>star, or at an earthquake, 'twould mend the lottery</LINE>
+<LINE>well: a man may draw his heart out, ere a' pluck</LINE>
+<LINE>one.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You'll be gone, sir knave, and do as I command you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>That man should be at woman's command, and yet no</LINE>
+<LINE>hurt done! Though honesty be no puritan, yet it</LINE>
+<LINE>will do no hurt; it will wear the surplice of</LINE>
+<LINE>humility over the black gown of a big heart. I am</LINE>
+<LINE>going, forsooth: the business is for Helen to come hither.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Well, now.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>I know, madam, you love your gentlewoman entirely.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Faith, I do: her father bequeathed her to me; and</LINE>
+<LINE>she herself, without other advantage, may lawfully</LINE>
+<LINE>make title to as much love as she finds: there is</LINE>
+<LINE>more owing her than is paid; and more shall be paid</LINE>
+<LINE>her than she'll demand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>Madam, I was very late more near her than I think</LINE>
+<LINE>she wished me: alone she was, and did communicate</LINE>
+<LINE>to herself her own words to her own ears; she</LINE>
+<LINE>thought, I dare vow for her, they touched not any</LINE>
+<LINE>stranger sense. Her matter was, she loved your son:</LINE>
+<LINE>Fortune, she said, was no goddess, that had put</LINE>
+<LINE>such difference betwixt their two estates; Love no</LINE>
+<LINE>god, that would not extend his might, only where</LINE>
+<LINE>qualities were level; Dian no queen of virgins, that</LINE>
+<LINE>would suffer her poor knight surprised, without</LINE>
+<LINE>rescue in the first assault or ransom afterward.</LINE>
+<LINE>This she delivered in the most bitter touch of</LINE>
+<LINE>sorrow that e'er I heard virgin exclaim in: which I</LINE>
+<LINE>held my duty speedily to acquaint you withal;</LINE>
+<LINE>sithence, in the loss that may happen, it concerns</LINE>
+<LINE>you something to know it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You have discharged this honestly; keep it to</LINE>
+<LINE>yourself: many likelihoods informed me of this</LINE>
+<LINE>before, which hung so tottering in the balance that</LINE>
+<LINE>I could neither believe nor misdoubt. Pray you,</LINE>
+<LINE>leave me: stall this in your bosom; and I thank you</LINE>
+<LINE>for your honest care: I will speak with you further anon.</LINE>
+<STAGEDIR>Exit Steward</STAGEDIR>
+<STAGEDIR>Enter HELENA</STAGEDIR>
+<LINE>Even so it was with me when I was young:</LINE>
+<LINE>If ever we are nature's, these are ours; this thorn</LINE>
+<LINE>Doth to our rose of youth rightly belong;</LINE>
+<LINE>Our blood to us, this to our blood is born;</LINE>
+<LINE>It is the show and seal of nature's truth,</LINE>
+<LINE>Where love's strong passion is impress'd in youth:</LINE>
+<LINE>By our remembrances of days foregone,</LINE>
+<LINE>Such were our faults, or then we thought them none.</LINE>
+<LINE>Her eye is sick on't: I observe her now.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What is your pleasure, madam?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You know, Helen,</LINE>
+<LINE>I am a mother to you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Mine honourable mistress.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Nay, a mother:</LINE>
+<LINE>Why not a mother? When I said 'a mother,'</LINE>
+<LINE>Methought you saw a serpent: what's in 'mother,'</LINE>
+<LINE>That you start at it? I say, I am your mother;</LINE>
+<LINE>And put you in the catalogue of those</LINE>
+<LINE>That were enwombed mine: 'tis often seen</LINE>
+<LINE>Adoption strives with nature and choice breeds</LINE>
+<LINE>A native slip to us from foreign seeds:</LINE>
+<LINE>You ne'er oppress'd me with a mother's groan,</LINE>
+<LINE>Yet I express to you a mother's care:</LINE>
+<LINE>God's mercy, maiden! does it curd thy blood</LINE>
+<LINE>To say I am thy mother? What's the matter,</LINE>
+<LINE>That this distemper'd messenger of wet,</LINE>
+<LINE>The many-colour'd Iris, rounds thine eye?</LINE>
+<LINE>Why? that you are my daughter?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That I am not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I say, I am your mother.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Pardon, madam;</LINE>
+<LINE>The Count Rousillon cannot be my brother:</LINE>
+<LINE>I am from humble, he from honour'd name;</LINE>
+<LINE>No note upon my parents, his all noble:</LINE>
+<LINE>My master, my dear lord he is; and I</LINE>
+<LINE>His servant live, and will his vassal die:</LINE>
+<LINE>He must not be my brother.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Nor I your mother?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>You are my mother, madam; would you were,--</LINE>
+<LINE>So that my lord your son were not my brother,--</LINE>
+<LINE>Indeed my mother! or were you both our mothers,</LINE>
+<LINE>I care no more for than I do for heaven,</LINE>
+<LINE>So I were not his sister. Can't no other,</LINE>
+<LINE>But, I your daughter, he must be my brother?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Yes, Helen, you might be my daughter-in-law:</LINE>
+<LINE>God shield you mean it not! daughter and mother</LINE>
+<LINE>So strive upon your pulse. What, pale again?</LINE>
+<LINE>My fear hath catch'd your fondness: now I see</LINE>
+<LINE>The mystery of your loneliness, and find</LINE>
+<LINE>Your salt tears' head: now to all sense 'tis gross</LINE>
+<LINE>You love my son; invention is ashamed,</LINE>
+<LINE>Against the proclamation of thy passion,</LINE>
+<LINE>To say thou dost not: therefore tell me true;</LINE>
+<LINE>But tell me then, 'tis so; for, look thy cheeks</LINE>
+<LINE>Confess it, th' one to th' other; and thine eyes</LINE>
+<LINE>See it so grossly shown in thy behaviors</LINE>
+<LINE>That in their kind they speak it: only sin</LINE>
+<LINE>And hellish obstinacy tie thy tongue,</LINE>
+<LINE>That truth should be suspected. Speak, is't so?</LINE>
+<LINE>If it be so, you have wound a goodly clew;</LINE>
+<LINE>If it be not, forswear't: howe'er, I charge thee,</LINE>
+<LINE>As heaven shall work in me for thine avail,</LINE>
+<LINE>Tell me truly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Good madam, pardon me!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Do you love my son?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Your pardon, noble mistress!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Love you my son?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Do not you love him, madam?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Go not about; my love hath in't a bond,</LINE>
+<LINE>Whereof the world takes note: come, come, disclose</LINE>
+<LINE>The state of your affection; for your passions</LINE>
+<LINE>Have to the full appeach'd.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Then, I confess,</LINE>
+<LINE>Here on my knee, before high heaven and you,</LINE>
+<LINE>That before you, and next unto high heaven,</LINE>
+<LINE>I love your son.</LINE>
+<LINE>My friends were poor, but honest; so's my love:</LINE>
+<LINE>Be not offended; for it hurts not him</LINE>
+<LINE>That he is loved of me: I follow him not</LINE>
+<LINE>By any token of presumptuous suit;</LINE>
+<LINE>Nor would I have him till I do deserve him;</LINE>
+<LINE>Yet never know how that desert should be.</LINE>
+<LINE>I know I love in vain, strive against hope;</LINE>
+<LINE>Yet in this captious and intenible sieve</LINE>
+<LINE>I still pour in the waters of my love</LINE>
+<LINE>And lack not to lose still: thus, Indian-like,</LINE>
+<LINE>Religious in mine error, I adore</LINE>
+<LINE>The sun, that looks upon his worshipper,</LINE>
+<LINE>But knows of him no more. My dearest madam,</LINE>
+<LINE>Let not your hate encounter with my love</LINE>
+<LINE>For loving where you do: but if yourself,</LINE>
+<LINE>Whose aged honour cites a virtuous youth,</LINE>
+<LINE>Did ever in so true a flame of liking</LINE>
+<LINE>Wish chastely and love dearly, that your Dian</LINE>
+<LINE>Was both herself and love: O, then, give pity</LINE>
+<LINE>To her, whose state is such that cannot choose</LINE>
+<LINE>But lend and give where she is sure to lose;</LINE>
+<LINE>That seeks not to find that her search implies,</LINE>
+<LINE>But riddle-like lives sweetly where she dies!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Had you not lately an intent,--speak truly,--</LINE>
+<LINE>To go to Paris?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Madam, I had.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Wherefore? tell true.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I will tell truth; by grace itself I swear.</LINE>
+<LINE>You know my father left me some prescriptions</LINE>
+<LINE>Of rare and proved effects, such as his reading</LINE>
+<LINE>And manifest experience had collected</LINE>
+<LINE>For general sovereignty; and that he will'd me</LINE>
+<LINE>In heedfull'st reservation to bestow them,</LINE>
+<LINE>As notes whose faculties inclusive were</LINE>
+<LINE>More than they were in note: amongst the rest,</LINE>
+<LINE>There is a remedy, approved, set down,</LINE>
+<LINE>To cure the desperate languishings whereof</LINE>
+<LINE>The king is render'd lost.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>This was your motive</LINE>
+<LINE>For Paris, was it? speak.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>My lord your son made me to think of this;</LINE>
+<LINE>Else Paris and the medicine and the king</LINE>
+<LINE>Had from the conversation of my thoughts</LINE>
+<LINE>Haply been absent then.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>But think you, Helen,</LINE>
+<LINE>If you should tender your supposed aid,</LINE>
+<LINE>He would receive it? he and his physicians</LINE>
+<LINE>Are of a mind; he, that they cannot help him,</LINE>
+<LINE>They, that they cannot help: how shall they credit</LINE>
+<LINE>A poor unlearned virgin, when the schools,</LINE>
+<LINE>Embowell'd of their doctrine, have left off</LINE>
+<LINE>The danger to itself?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>There's something in't,</LINE>
+<LINE>More than my father's skill, which was the greatest</LINE>
+<LINE>Of his profession, that his good receipt</LINE>
+<LINE>Shall for my legacy be sanctified</LINE>
+<LINE>By the luckiest stars in heaven: and, would your honour</LINE>
+<LINE>But give me leave to try success, I'ld venture</LINE>
+<LINE>The well-lost life of mine on his grace's cure</LINE>
+<LINE>By such a day and hour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Dost thou believe't?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay, madam, knowingly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Why, Helen, thou shalt have my leave and love,</LINE>
+<LINE>Means and attendants and my loving greetings</LINE>
+<LINE>To those of mine in court: I'll stay at home</LINE>
+<LINE>And pray God's blessing into thy attempt:</LINE>
+<LINE>Be gone to-morrow; and be sure of this,</LINE>
+<LINE>What I can help thee to thou shalt not miss.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+</ACT>
+
+<ACT><TITLE>ACT II</TITLE>
+
+<SCENE><TITLE>SCENE I.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Flourish of cornets. Enter the KING, attended
+with divers young Lords taking leave for the
+Florentine war; BERTRAM, and PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Farewell, young lords; these warlike principles</LINE>
+<LINE>Do not throw from you: and you, my lords, farewell:</LINE>
+<LINE>Share the advice betwixt you; if both gain, all</LINE>
+<LINE>The gift doth stretch itself as 'tis received,</LINE>
+<LINE>And is enough for both.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>'Tis our hope, sir,</LINE>
+<LINE>After well enter'd soldiers, to return</LINE>
+<LINE>And find your grace in health.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>No, no, it cannot be; and yet my heart</LINE>
+<LINE>Will not confess he owes the malady</LINE>
+<LINE>That doth my life besiege. Farewell, young lords;</LINE>
+<LINE>Whether I live or die, be you the sons</LINE>
+<LINE>Of worthy Frenchmen: let higher Italy,--</LINE>
+<LINE>Those bated that inherit but the fall</LINE>
+<LINE>Of the last monarchy,--see that you come</LINE>
+<LINE>Not to woo honour, but to wed it; when</LINE>
+<LINE>The bravest questant shrinks, find what you seek,</LINE>
+<LINE>That fame may cry you loud: I say, farewell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Health, at your bidding, serve your majesty!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Those girls of Italy, take heed of them:</LINE>
+<LINE>They say, our French lack language to deny,</LINE>
+<LINE>If they demand: beware of being captives,</LINE>
+<LINE>Before you serve.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Both</SPEAKER>
+<LINE>Our hearts receive your warnings.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Farewell. Come hither to me.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit, attended</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>O, my sweet lord, that you will stay behind us!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>'Tis not his fault, the spark.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>O, 'tis brave wars!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Most admirable: I have seen those wars.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I am commanded here, and kept a coil with</LINE>
+<LINE>'Too young' and 'the next year' and ''tis too early.'</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>An thy mind stand to't, boy, steal away bravely.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I shall stay here the forehorse to a smock,</LINE>
+<LINE>Creaking my shoes on the plain masonry,</LINE>
+<LINE>Till honour be bought up and no sword worn</LINE>
+<LINE>But one to dance with! By heaven, I'll steal away.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>There's honour in the theft.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Commit it, count.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I am your accessary; and so, farewell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I grow to you, and our parting is a tortured body.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Farewell, captain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Sweet Monsieur Parolles!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Noble heroes, my sword and yours are kin. Good</LINE>
+<LINE>sparks and lustrous, a word, good metals: you shall</LINE>
+<LINE>find in the regiment of the Spinii one Captain</LINE>
+<LINE>Spurio, with his cicatrice, an emblem of war, here</LINE>
+<LINE>on his sinister cheek; it was this very sword</LINE>
+<LINE>entrenched it: say to him, I live; and observe his</LINE>
+<LINE>reports for me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>We shall, noble captain.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt Lords</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Mars dote on you for his novices! what will ye do?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Stay: the king.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter KING. BERTRAM and PAROLLES retire</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE><STAGEDIR>To BERTRAM</STAGEDIR>  Use a more spacious ceremony to the</LINE>
+<LINE>noble lords; you have restrained yourself within the</LINE>
+<LINE>list of too cold an adieu: be more expressive to</LINE>
+<LINE>them: for they wear themselves in the cap of the</LINE>
+<LINE>time, there do muster true gait, eat, speak, and</LINE>
+<LINE>move under the influence of the most received star;</LINE>
+<LINE>and though the devil lead the measure, such are to</LINE>
+<LINE>be followed: after them, and take a more dilated farewell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>And I will do so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Worthy fellows; and like to prove most sinewy sword-men.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt BERTRAM and PAROLLES</STAGEDIR>
+<STAGEDIR>Enter LAFEU</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE><STAGEDIR>Kneeling</STAGEDIR>  Pardon, my lord, for me and for my tidings.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I'll fee thee to stand up.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Then here's a man stands, that has brought his pardon.</LINE>
+<LINE>I would you had kneel'd, my lord, to ask me mercy,</LINE>
+<LINE>And that at my bidding you could so stand up.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I would I had; so I had broke thy pate,</LINE>
+<LINE>And ask'd thee mercy for't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Good faith, across: but, my good lord 'tis thus;</LINE>
+<LINE>Will you be cured of your infirmity?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>No.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>O, will you eat no grapes, my royal fox?</LINE>
+<LINE>Yes, but you will my noble grapes, an if</LINE>
+<LINE>My royal fox could reach them: I have seen a medicine</LINE>
+<LINE>That's able to breathe life into a stone,</LINE>
+<LINE>Quicken a rock, and make you dance canary</LINE>
+<LINE>With spritely fire and motion; whose simple touch,</LINE>
+<LINE>Is powerful to araise King Pepin, nay,</LINE>
+<LINE>To give great Charlemain a pen in's hand,</LINE>
+<LINE>And write to her a love-line.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What 'her' is this?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Why, Doctor She: my lord, there's one arrived,</LINE>
+<LINE>If you will see her: now, by my faith and honour,</LINE>
+<LINE>If seriously I may convey my thoughts</LINE>
+<LINE>In this my light deliverance, I have spoke</LINE>
+<LINE>With one that, in her sex, her years, profession,</LINE>
+<LINE>Wisdom and constancy, hath amazed me more</LINE>
+<LINE>Than I dare blame my weakness: will you see her</LINE>
+<LINE>For that is her demand, and know her business?</LINE>
+<LINE>That done, laugh well at me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Now, good Lafeu,</LINE>
+<LINE>Bring in the admiration; that we with thee</LINE>
+<LINE>May spend our wonder too, or take off thine</LINE>
+<LINE>By wondering how thou took'st it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Nay, I'll fit you,</LINE>
+<LINE>And not be all day neither.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thus he his special nothing ever prologues.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter LAFEU, with HELENA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Nay, come your ways.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>This haste hath wings indeed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Nay, come your ways:</LINE>
+<LINE>This is his majesty; say your mind to him:</LINE>
+<LINE>A traitor you do look like; but such traitors</LINE>
+<LINE>His majesty seldom fears: I am Cressid's uncle,</LINE>
+<LINE>That dare leave two together; fare you well.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Now, fair one, does your business follow us?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay, my good lord.</LINE>
+<LINE>Gerard de Narbon was my father;</LINE>
+<LINE>In what he did profess, well found.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I knew him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>The rather will I spare my praises towards him:</LINE>
+<LINE>Knowing him is enough. On's bed of death</LINE>
+<LINE>Many receipts he gave me: chiefly one.</LINE>
+<LINE>Which, as the dearest issue of his practise,</LINE>
+<LINE>And of his old experience the oily darling,</LINE>
+<LINE>He bade me store up, as a triple eye,</LINE>
+<LINE>Safer than mine own two, more dear; I have so;</LINE>
+<LINE>And hearing your high majesty is touch'd</LINE>
+<LINE>With that malignant cause wherein the honour</LINE>
+<LINE>Of my dear father's gift stands chief in power,</LINE>
+<LINE>I come to tender it and my appliance</LINE>
+<LINE>With all bound humbleness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>We thank you, maiden;</LINE>
+<LINE>But may not be so credulous of cure,</LINE>
+<LINE>When our most learned doctors leave us and</LINE>
+<LINE>The congregated college have concluded</LINE>
+<LINE>That labouring art can never ransom nature</LINE>
+<LINE>From her inaidible estate; I say we must not</LINE>
+<LINE>So stain our judgment, or corrupt our hope,</LINE>
+<LINE>To prostitute our past-cure malady</LINE>
+<LINE>To empirics, or to dissever so</LINE>
+<LINE>Our great self and our credit, to esteem</LINE>
+<LINE>A senseless help when help past sense we deem.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>My duty then shall pay me for my pains:</LINE>
+<LINE>I will no more enforce mine office on you.</LINE>
+<LINE>Humbly entreating from your royal thoughts</LINE>
+<LINE>A modest one, to bear me back a again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I cannot give thee less, to be call'd grateful:</LINE>
+<LINE>Thou thought'st to help me; and such thanks I give</LINE>
+<LINE>As one near death to those that wish him live:</LINE>
+<LINE>But what at full I know, thou know'st no part,</LINE>
+<LINE>I knowing all my peril, thou no art.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What I can do can do no hurt to try,</LINE>
+<LINE>Since you set up your rest 'gainst remedy.</LINE>
+<LINE>He that of greatest works is finisher</LINE>
+<LINE>Oft does them by the weakest minister:</LINE>
+<LINE>So holy writ in babes hath judgment shown,</LINE>
+<LINE>When judges have been babes; great floods have flown</LINE>
+<LINE>From simple sources, and great seas have dried</LINE>
+<LINE>When miracles have by the greatest been denied.</LINE>
+<LINE>Oft expectation fails and most oft there</LINE>
+<LINE>Where most it promises, and oft it hits</LINE>
+<LINE>Where hope is coldest and despair most fits.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I must not hear thee; fare thee well, kind maid;</LINE>
+<LINE>Thy pains not used must by thyself be paid:</LINE>
+<LINE>Proffers not took reap thanks for their reward.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Inspired merit so by breath is barr'd:</LINE>
+<LINE>It is not so with Him that all things knows</LINE>
+<LINE>As 'tis with us that square our guess by shows;</LINE>
+<LINE>But most it is presumption in us when</LINE>
+<LINE>The help of heaven we count the act of men.</LINE>
+<LINE>Dear sir, to my endeavours give consent;</LINE>
+<LINE>Of heaven, not me, make an experiment.</LINE>
+<LINE>I am not an impostor that proclaim</LINE>
+<LINE>Myself against the level of mine aim;</LINE>
+<LINE>But know I think and think I know most sure</LINE>
+<LINE>My art is not past power nor you past cure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Are thou so confident? within what space</LINE>
+<LINE>Hopest thou my cure?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>The great'st grace lending grace</LINE>
+<LINE>Ere twice the horses of the sun shall bring</LINE>
+<LINE>Their fiery torcher his diurnal ring,</LINE>
+<LINE>Ere twice in murk and occidental damp</LINE>
+<LINE>Moist Hesperus hath quench'd his sleepy lamp,</LINE>
+<LINE>Or four and twenty times the pilot's glass</LINE>
+<LINE>Hath told the thievish minutes how they pass,</LINE>
+<LINE>What is infirm from your sound parts shall fly,</LINE>
+<LINE>Health shall live free and sickness freely die.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Upon thy certainty and confidence</LINE>
+<LINE>What darest thou venture?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Tax of impudence,</LINE>
+<LINE>A strumpet's boldness, a divulged shame</LINE>
+<LINE>Traduced by odious ballads: my maiden's name</LINE>
+<LINE>Sear'd otherwise; nay, worse--if worse--extended</LINE>
+<LINE>With vilest torture let my life be ended.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Methinks in thee some blessed spirit doth speak</LINE>
+<LINE>His powerful sound within an organ weak:</LINE>
+<LINE>And what impossibility would slay</LINE>
+<LINE>In common sense, sense saves another way.</LINE>
+<LINE>Thy life is dear; for all that life can rate</LINE>
+<LINE>Worth name of life in thee hath estimate,</LINE>
+<LINE>Youth, beauty, wisdom, courage, all</LINE>
+<LINE>That happiness and prime can happy call:</LINE>
+<LINE>Thou this to hazard needs must intimate</LINE>
+<LINE>Skill infinite or monstrous desperate.</LINE>
+<LINE>Sweet practiser, thy physic I will try,</LINE>
+<LINE>That ministers thine own death if I die.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>If I break time, or flinch in property</LINE>
+<LINE>Of what I spoke, unpitied let me die,</LINE>
+<LINE>And well deserved: not helping, death's my fee;</LINE>
+<LINE>But, if I help, what do you promise me?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Make thy demand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>But will you make it even?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Ay, by my sceptre and my hopes of heaven.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Then shalt thou give me with thy kingly hand</LINE>
+<LINE>What husband in thy power I will command:</LINE>
+<LINE>Exempted be from me the arrogance</LINE>
+<LINE>To choose from forth the royal blood of France,</LINE>
+<LINE>My low and humble name to propagate</LINE>
+<LINE>With any branch or image of thy state;</LINE>
+<LINE>But such a one, thy vassal, whom I know</LINE>
+<LINE>Is free for me to ask, thee to bestow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Here is my hand; the premises observed,</LINE>
+<LINE>Thy will by my performance shall be served:</LINE>
+<LINE>So make the choice of thy own time, for I,</LINE>
+<LINE>Thy resolved patient, on thee still rely.</LINE>
+<LINE>More should I question thee, and more I must,</LINE>
+<LINE>Though more to know could not be more to trust,</LINE>
+<LINE>From whence thou camest, how tended on: but rest</LINE>
+<LINE>Unquestion'd welcome and undoubted blest.</LINE>
+<LINE>Give me some help here, ho! If thou proceed</LINE>
+<LINE>As high as word, my deed shall match thy meed.</LINE>
+</SPEECH>
+
+<STAGEDIR>Flourish. Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Come on, sir; I shall now put you to the height of</LINE>
+<LINE>your breeding.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I will show myself highly fed and lowly taught: I</LINE>
+<LINE>know my business is but to the court.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>To the court! why, what place make you special,</LINE>
+<LINE>when you put off that with such contempt? But to the court!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Truly, madam, if God have lent a man any manners, he</LINE>
+<LINE>may easily put it off at court: he that cannot make</LINE>
+<LINE>a leg, put off's cap, kiss his hand and say nothing,</LINE>
+<LINE>has neither leg, hands, lip, nor cap; and indeed</LINE>
+<LINE>such a fellow, to say precisely, were not for the</LINE>
+<LINE>court; but for me, I have an answer will serve all</LINE>
+<LINE>men.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Marry, that's a bountiful answer that fits all</LINE>
+<LINE>questions.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>It is like a barber's chair that fits all buttocks,</LINE>
+<LINE>the pin-buttock, the quatch-buttock, the brawn</LINE>
+<LINE>buttock, or any buttock.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Will your answer serve fit to all questions?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>As fit as ten groats is for the hand of an attorney,</LINE>
+<LINE>as your French crown for your taffeta punk, as Tib's</LINE>
+<LINE>rush for Tom's forefinger, as a pancake for Shrove</LINE>
+<LINE>Tuesday, a morris for May-day, as the nail to his</LINE>
+<LINE>hole, the cuckold to his horn, as a scolding queen</LINE>
+<LINE>to a wrangling knave, as the nun's lip to the</LINE>
+<LINE>friar's mouth, nay, as the pudding to his skin.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Have you, I say, an answer of such fitness for all</LINE>
+<LINE>questions?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>From below your duke to beneath your constable, it</LINE>
+<LINE>will fit any question.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>It must be an answer of most monstrous size that</LINE>
+<LINE>must fit all demands.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>But a trifle neither, in good faith, if the learned</LINE>
+<LINE>should speak truth of it: here it is, and all that</LINE>
+<LINE>belongs to't. Ask me if I am a courtier: it shall</LINE>
+<LINE>do you no harm to learn.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>To be young again, if we could: I will be a fool in</LINE>
+<LINE>question, hoping to be the wiser by your answer. I</LINE>
+<LINE>pray you, sir, are you a courtier?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! There's a simple putting off. More,</LINE>
+<LINE>more, a hundred of them.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Sir, I am a poor friend of yours, that loves you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! Thick, thick, spare not me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I think, sir, you can eat none of this homely meat.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! Nay, put me to't, I warrant you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You were lately whipped, sir, as I think.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! spare not me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Do you cry, 'O Lord, sir!' at your whipping, and</LINE>
+<LINE>'spare not me?' Indeed your 'O Lord, sir!' is very</LINE>
+<LINE>sequent to your whipping: you would answer very well</LINE>
+<LINE>to a whipping, if you were but bound to't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I ne'er had worse luck in my life in my 'O Lord,</LINE>
+<LINE>sir!' I see things may serve long, but not serve ever.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I play the noble housewife with the time</LINE>
+<LINE>To entertain't so merrily with a fool.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! why, there't serves well again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>An end, sir; to your business. Give Helen this,</LINE>
+<LINE>And urge her to a present answer back:</LINE>
+<LINE>Commend me to my kinsmen and my son:</LINE>
+<LINE>This is not much.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Not much commendation to them.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Not much employment for you: you understand me?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Most fruitfully: I am there before my legs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Haste you again.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt severally</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Enter BERTRAM, LAFEU, and PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>They say miracles are past; and we have our</LINE>
+<LINE>philosophical persons, to make modern and familiar,</LINE>
+<LINE>things supernatural and causeless. Hence is it that</LINE>
+<LINE>we make trifles of terrors, ensconcing ourselves</LINE>
+<LINE>into seeming knowledge, when we should submit</LINE>
+<LINE>ourselves to an unknown fear.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, 'tis the rarest argument of wonder that hath</LINE>
+<LINE>shot out in our latter times.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>And so 'tis.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>To be relinquish'd of the artists,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>So I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Both of Galen and Paracelsus.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>So I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Of all the learned and authentic fellows,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Right; so I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>That gave him out incurable,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, there 'tis; so say I too.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Not to be helped,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Right; as 'twere, a man assured of a--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Uncertain life, and sure death.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Just, you say well; so would I have said.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I may truly say, it is a novelty to the world.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>It is, indeed: if you will have it in showing, you</LINE>
+<LINE>shall read it in--what do you call there?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A showing of a heavenly effect in an earthly actor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That's it; I would have said the very same.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Why, your dolphin is not lustier: 'fore me,</LINE>
+<LINE>I speak in respect--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Nay, 'tis strange, 'tis very strange, that is the</LINE>
+<LINE>brief and the tedious of it; and he's of a most</LINE>
+<LINE>facinerious spirit that will not acknowledge it to be the--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Very hand of heaven.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ay, so I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>In a most weak--</LINE>
+<STAGEDIR>pausing</STAGEDIR>
+<LINE>and debile minister, great power, great</LINE>
+<LINE>transcendence: which should, indeed, give us a</LINE>
+<LINE>further use to be made than alone the recovery of</LINE>
+<LINE>the king, as to be--</LINE>
+<STAGEDIR>pausing</STAGEDIR>
+<LINE>generally thankful.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I would have said it; you say well. Here comes the king.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter KING, HELENA, and Attendants. LAFEU and
+PAROLLES retire</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Lustig, as the Dutchman says: I'll like a maid the</LINE>
+<LINE>better, whilst I have a tooth in my head: why, he's</LINE>
+<LINE>able to lead her a coranto.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Mort du vinaigre! is not this Helen?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>'Fore God, I think so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Go, call before me all the lords in court.</LINE>
+<LINE>Sit, my preserver, by thy patient's side;</LINE>
+<LINE>And with this healthful hand, whose banish'd sense</LINE>
+<LINE>Thou hast repeal'd, a second time receive</LINE>
+<LINE>The confirmation of my promised gift,</LINE>
+<LINE>Which but attends thy naming.</LINE>
+<STAGEDIR>Enter three or four Lords</STAGEDIR>
+<LINE>Fair maid, send forth thine eye: this youthful parcel</LINE>
+<LINE>Of noble bachelors stand at my bestowing,</LINE>
+<LINE>O'er whom both sovereign power and father's voice</LINE>
+<LINE>I have to use: thy frank election make;</LINE>
+<LINE>Thou hast power to choose, and they none to forsake.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>To each of you one fair and virtuous mistress</LINE>
+<LINE>Fall, when Love please! marry, to each, but one!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I'ld give bay Curtal and his furniture,</LINE>
+<LINE>My mouth no more were broken than these boys',</LINE>
+<LINE>And writ as little beard.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Peruse them well:</LINE>
+<LINE>Not one of those but had a noble father.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Gentlemen,</LINE>
+<LINE>Heaven hath through me restored the king to health.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>All</SPEAKER>
+<LINE>We understand it, and thank heaven for you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I am a simple maid, and therein wealthiest,</LINE>
+<LINE>That I protest I simply am a maid.</LINE>
+<LINE>Please it your majesty, I have done already:</LINE>
+<LINE>The blushes in my cheeks thus whisper me,</LINE>
+<LINE>'We blush that thou shouldst choose; but, be refused,</LINE>
+<LINE>Let the white death sit on thy cheek for ever;</LINE>
+<LINE>We'll ne'er come there again.'</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Make choice; and, see,</LINE>
+<LINE>Who shuns thy love shuns all his love in me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Now, Dian, from thy altar do I fly,</LINE>
+<LINE>And to imperial Love, that god most high,</LINE>
+<LINE>Do my sighs stream. Sir, will you hear my suit?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>And grant it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Thanks, sir; all the rest is mute.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I had rather be in this choice than throw ames-ace</LINE>
+<LINE>for my life.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>The honour, sir, that flames in your fair eyes,</LINE>
+<LINE>Before I speak, too threateningly replies:</LINE>
+<LINE>Love make your fortunes twenty times above</LINE>
+<LINE>Her that so wishes and her humble love!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>No better, if you please.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>My wish receive,</LINE>
+<LINE>Which great Love grant! and so, I take my leave.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Do all they deny her? An they were sons of mine,</LINE>
+<LINE>I'd have them whipped; or I would send them to the</LINE>
+<LINE>Turk, to make eunuchs of.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Be not afraid that I your hand should take;</LINE>
+<LINE>I'll never do you wrong for your own sake:</LINE>
+<LINE>Blessing upon your vows! and in your bed</LINE>
+<LINE>Find fairer fortune, if you ever wed!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>These boys are boys of ice, they'll none have her:</LINE>
+<LINE>sure, they are bastards to the English; the French</LINE>
+<LINE>ne'er got 'em.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>You are too young, too happy, and too good,</LINE>
+<LINE>To make yourself a son out of my blood.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Fourth Lord</SPEAKER>
+<LINE>Fair one, I think not so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>There's one grape yet; I am sure thy father drunk</LINE>
+<LINE>wine: but if thou be'st not an ass, I am a youth</LINE>
+<LINE>of fourteen; I have known thee already.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE><STAGEDIR>To BERTRAM</STAGEDIR>  I dare not say I take you; but I give</LINE>
+<LINE>Me and my service, ever whilst I live,</LINE>
+<LINE>Into your guiding power. This is the man.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Why, then, young Bertram, take her; she's thy wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My wife, my liege! I shall beseech your highness,</LINE>
+<LINE>In such a business give me leave to use</LINE>
+<LINE>The help of mine own eyes.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Know'st thou not, Bertram,</LINE>
+<LINE>What she has done for me?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Yes, my good lord;</LINE>
+<LINE>But never hope to know why I should marry her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thou know'st she has raised me from my sickly bed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>But follows it, my lord, to bring me down</LINE>
+<LINE>Must answer for your raising? I know her well:</LINE>
+<LINE>She had her breeding at my father's charge.</LINE>
+<LINE>A poor physician's daughter my wife! Disdain</LINE>
+<LINE>Rather corrupt me ever!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>'Tis only title thou disdain'st in her, the which</LINE>
+<LINE>I can build up. Strange is it that our bloods,</LINE>
+<LINE>Of colour, weight, and heat, pour'd all together,</LINE>
+<LINE>Would quite confound distinction, yet stand off</LINE>
+<LINE>In differences so mighty. If she be</LINE>
+<LINE>All that is virtuous, save what thou dislikest,</LINE>
+<LINE>A poor physician's daughter, thou dislikest</LINE>
+<LINE>Of virtue for the name: but do not so:</LINE>
+<LINE>From lowest place when virtuous things proceed,</LINE>
+<LINE>The place is dignified by the doer's deed:</LINE>
+<LINE>Where great additions swell's, and virtue none,</LINE>
+<LINE>It is a dropsied honour. Good alone</LINE>
+<LINE>Is good without a name. Vileness is so:</LINE>
+<LINE>The property by what it is should go,</LINE>
+<LINE>Not by the title. She is young, wise, fair;</LINE>
+<LINE>In these to nature she's immediate heir,</LINE>
+<LINE>And these breed honour: that is honour's scorn,</LINE>
+<LINE>Which challenges itself as honour's born</LINE>
+<LINE>And is not like the sire: honours thrive,</LINE>
+<LINE>When rather from our acts we them derive</LINE>
+<LINE>Than our foregoers: the mere word's a slave</LINE>
+<LINE>Debosh'd on every tomb, on every grave</LINE>
+<LINE>A lying trophy, and as oft is dumb</LINE>
+<LINE>Where dust and damn'd oblivion is the tomb</LINE>
+<LINE>Of honour'd bones indeed. What should be said?</LINE>
+<LINE>If thou canst like this creature as a maid,</LINE>
+<LINE>I can create the rest: virtue and she</LINE>
+<LINE>Is her own dower; honour and wealth from me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I cannot love her, nor will strive to do't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thou wrong'st thyself, if thou shouldst strive to choose.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That you are well restored, my lord, I'm glad:</LINE>
+<LINE>Let the rest go.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>My honour's at the stake; which to defeat,</LINE>
+<LINE>I must produce my power. Here, take her hand,</LINE>
+<LINE>Proud scornful boy, unworthy this good gift;</LINE>
+<LINE>That dost in vile misprision shackle up</LINE>
+<LINE>My love and her desert; that canst not dream,</LINE>
+<LINE>We, poising us in her defective scale,</LINE>
+<LINE>Shall weigh thee to the beam; that wilt not know,</LINE>
+<LINE>It is in us to plant thine honour where</LINE>
+<LINE>We please to have it grow. Cheque thy contempt:</LINE>
+<LINE>Obey our will, which travails in thy good:</LINE>
+<LINE>Believe not thy disdain, but presently</LINE>
+<LINE>Do thine own fortunes that obedient right</LINE>
+<LINE>Which both thy duty owes and our power claims;</LINE>
+<LINE>Or I will throw thee from my care for ever</LINE>
+<LINE>Into the staggers and the careless lapse</LINE>
+<LINE>Of youth and ignorance; both my revenge and hate</LINE>
+<LINE>Loosing upon thee, in the name of justice,</LINE>
+<LINE>Without all terms of pity. Speak; thine answer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Pardon, my gracious lord; for I submit</LINE>
+<LINE>My fancy to your eyes: when I consider</LINE>
+<LINE>What great creation and what dole of honour</LINE>
+<LINE>Flies where you bid it, I find that she, which late</LINE>
+<LINE>Was in my nobler thoughts most base, is now</LINE>
+<LINE>The praised of the king; who, so ennobled,</LINE>
+<LINE>Is as 'twere born so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Take her by the hand,</LINE>
+<LINE>And tell her she is thine: to whom I promise</LINE>
+<LINE>A counterpoise, if not to thy estate</LINE>
+<LINE>A balance more replete.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I take her hand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Good fortune and the favour of the king</LINE>
+<LINE>Smile upon this contract; whose ceremony</LINE>
+<LINE>Shall seem expedient on the now-born brief,</LINE>
+<LINE>And be perform'd to-night: the solemn feast</LINE>
+<LINE>Shall more attend upon the coming space,</LINE>
+<LINE>Expecting absent friends. As thou lovest her,</LINE>
+<LINE>Thy love's to me religious; else, does err.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt all but LAFEU and PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE><STAGEDIR>Advancing</STAGEDIR>  Do you hear, monsieur? a word with you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Your pleasure, sir?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Your lord and master did well to make his</LINE>
+<LINE>recantation.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Recantation! My lord! my master!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Ay; is it not a language I speak?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>A most harsh one, and not to be understood without</LINE>
+<LINE>bloody succeeding. My master!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Are you companion to the Count Rousillon?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>To any count, to all counts, to what is man.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>To what is count's man: count's master is of</LINE>
+<LINE>another style.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>You are too old, sir; let it satisfy you, you are too old.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I must tell thee, sirrah, I write man; to which</LINE>
+<LINE>title age cannot bring thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What I dare too well do, I dare not do.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I did think thee, for two ordinaries, to be a pretty</LINE>
+<LINE>wise fellow; thou didst make tolerable vent of thy</LINE>
+<LINE>travel; it might pass: yet the scarfs and the</LINE>
+<LINE>bannerets about thee did manifoldly dissuade me from</LINE>
+<LINE>believing thee a vessel of too great a burthen. I</LINE>
+<LINE>have now found thee; when I lose thee again, I care</LINE>
+<LINE>not: yet art thou good for nothing but taking up; and</LINE>
+<LINE>that thou't scarce worth.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Hadst thou not the privilege of antiquity upon thee,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Do not plunge thyself too far in anger, lest thou</LINE>
+<LINE>hasten thy trial; which if--Lord have mercy on thee</LINE>
+<LINE>for a hen! So, my good window of lattice, fare thee</LINE>
+<LINE>well: thy casement I need not open, for I look</LINE>
+<LINE>through thee. Give me thy hand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My lord, you give me most egregious indignity.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Ay, with all my heart; and thou art worthy of it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I have not, my lord, deserved it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Yes, good faith, every dram of it; and I will not</LINE>
+<LINE>bate thee a scruple.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Well, I shall be wiser.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Even as soon as thou canst, for thou hast to pull at</LINE>
+<LINE>a smack o' the contrary. If ever thou be'st bound</LINE>
+<LINE>in thy scarf and beaten, thou shalt find what it is</LINE>
+<LINE>to be proud of thy bondage. I have a desire to hold</LINE>
+<LINE>my acquaintance with thee, or rather my knowledge,</LINE>
+<LINE>that I may say in the default, he is a man I know.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My lord, you do me most insupportable vexation.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I would it were hell-pains for thy sake, and my poor</LINE>
+<LINE>doing eternal: for doing I am past: as I will by</LINE>
+<LINE>thee, in what motion age will give me leave.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Well, thou hast a son shall take this disgrace off</LINE>
+<LINE>me; scurvy, old, filthy, scurvy lord! Well, I must</LINE>
+<LINE>be patient; there is no fettering of authority.</LINE>
+<LINE>I'll beat him, by my life, if I can meet him with</LINE>
+<LINE>any convenience, an he were double and double a</LINE>
+<LINE>lord. I'll have no more pity of his age than I</LINE>
+<LINE>would of--I'll beat him, an if I could but meet him again.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter LAFEU</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Sirrah, your lord and master's married; there's news</LINE>
+<LINE>for you: you have a new mistress.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I most unfeignedly beseech your lordship to make</LINE>
+<LINE>some reservation of your wrongs: he is my good</LINE>
+<LINE>lord: whom I serve above is my master.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Who? God?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ay, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>The devil it is that's thy master. Why dost thou</LINE>
+<LINE>garter up thy arms o' this fashion? dost make hose of</LINE>
+<LINE>sleeves? do other servants so? Thou wert best set</LINE>
+<LINE>thy lower part where thy nose stands. By mine</LINE>
+<LINE>honour, if I were but two hours younger, I'ld beat</LINE>
+<LINE>thee: methinks, thou art a general offence, and</LINE>
+<LINE>every man should beat thee: I think thou wast</LINE>
+<LINE>created for men to breathe themselves upon thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>This is hard and undeserved measure, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Go to, sir; you were beaten in Italy for picking a</LINE>
+<LINE>kernel out of a pomegranate; you are a vagabond and</LINE>
+<LINE>no true traveller: you are more saucy with lords</LINE>
+<LINE>and honourable personages than the commission of your</LINE>
+<LINE>birth and virtue gives you heraldry. You are not</LINE>
+<LINE>worth another word, else I'ld call you knave. I leave you.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Good, very good; it is so then: good, very good;</LINE>
+<LINE>let it be concealed awhile.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter BERTRAM</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Undone, and forfeited to cares for ever!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What's the matter, sweet-heart?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Although before the solemn priest I have sworn,</LINE>
+<LINE>I will not bed her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What, what, sweet-heart?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>O my Parolles, they have married me!</LINE>
+<LINE>I'll to the Tuscan wars, and never bed her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>France is a dog-hole, and it no more merits</LINE>
+<LINE>The tread of a man's foot: to the wars!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>There's letters from my mother: what the import is,</LINE>
+<LINE>I know not yet.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ay, that would be known. To the wars, my boy, to the wars!</LINE>
+<LINE>He wears his honour in a box unseen,</LINE>
+<LINE>That hugs his kicky-wicky here at home,</LINE>
+<LINE>Spending his manly marrow in her arms,</LINE>
+<LINE>Which should sustain the bound and high curvet</LINE>
+<LINE>Of Mars's fiery steed. To other regions</LINE>
+<LINE>France is a stable; we that dwell in't jades;</LINE>
+<LINE>Therefore, to the war!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>It shall be so: I'll send her to my house,</LINE>
+<LINE>Acquaint my mother with my hate to her,</LINE>
+<LINE>And wherefore I am fled; write to the king</LINE>
+<LINE>That which I durst not speak; his present gift</LINE>
+<LINE>Shall furnish me to those Italian fields,</LINE>
+<LINE>Where noble fellows strike: war is no strife</LINE>
+<LINE>To the dark house and the detested wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Will this capriccio hold in thee? art sure?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Go with me to my chamber, and advise me.</LINE>
+<LINE>I'll send her straight away: to-morrow</LINE>
+<LINE>I'll to the wars, she to her single sorrow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, these balls bound; there's noise in it. 'Tis hard:</LINE>
+<LINE>A young man married is a man that's marr'd:</LINE>
+<LINE>Therefore away, and leave her bravely; go:</LINE>
+<LINE>The king has done you wrong: but, hush, 'tis so.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE IV.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Enter HELENA and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>My mother greets me kindly; is she well?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>She is not well; but yet she has her health: she's</LINE>
+<LINE>very merry; but yet she is not well: but thanks be</LINE>
+<LINE>given, she's very well and wants nothing i', the</LINE>
+<LINE>world; but yet she is not well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>If she be very well, what does she ail, that she's</LINE>
+<LINE>not very well?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Truly, she's very well indeed, but for two things.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What two things?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>One, that she's not in heaven, whither God send her</LINE>
+<LINE>quickly! the other that she's in earth, from whence</LINE>
+<LINE>God send her quickly!</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Bless you, my fortunate lady!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I hope, sir, I have your good will to have mine own</LINE>
+<LINE>good fortunes.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>You had my prayers to lead them on; and to keep them</LINE>
+<LINE>on, have them still. O, my knave, how does my old lady?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>So that you had her wrinkles and I her money,</LINE>
+<LINE>I would she did as you say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, I say nothing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Marry, you are the wiser man; for many a man's</LINE>
+<LINE>tongue shakes out his master's undoing: to say</LINE>
+<LINE>nothing, to do nothing, to know nothing, and to have</LINE>
+<LINE>nothing, is to be a great part of your title; which</LINE>
+<LINE>is within a very little of nothing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Away! thou'rt a knave.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>You should have said, sir, before a knave thou'rt a</LINE>
+<LINE>knave; that's, before me thou'rt a knave: this had</LINE>
+<LINE>been truth, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Go to, thou art a witty fool; I have found thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Did you find me in yourself, sir? or were you</LINE>
+<LINE>taught to find me? The search, sir, was profitable;</LINE>
+<LINE>and much fool may you find in you, even to the</LINE>
+<LINE>world's pleasure and the increase of laughter.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>A good knave, i' faith, and well fed.</LINE>
+<LINE>Madam, my lord will go away to-night;</LINE>
+<LINE>A very serious business calls on him.</LINE>
+<LINE>The great prerogative and rite of love,</LINE>
+<LINE>Which, as your due, time claims, he does acknowledge;</LINE>
+<LINE>But puts it off to a compell'd restraint;</LINE>
+<LINE>Whose want, and whose delay, is strew'd with sweets,</LINE>
+<LINE>Which they distil now in the curbed time,</LINE>
+<LINE>To make the coming hour o'erflow with joy</LINE>
+<LINE>And pleasure drown the brim.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What's his will else?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That you will take your instant leave o' the king</LINE>
+<LINE>And make this haste as your own good proceeding,</LINE>
+<LINE>Strengthen'd with what apology you think</LINE>
+<LINE>May make it probable need.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What more commands he?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That, having this obtain'd, you presently</LINE>
+<LINE>Attend his further pleasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>In every thing I wait upon his will.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I shall report it so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I pray you.</LINE>
+<STAGEDIR>Exit PAROLLES</STAGEDIR>
+<LINE>Come, sirrah.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE V.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Enter LAFEU and BERTRAM</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>But I hope your lordship thinks not him a soldier.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Yes, my lord, and of very valiant approof.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You have it from his own deliverance.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>And by other warranted testimony.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Then my dial goes not true: I took this lark for a bunting.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I do assure you, my lord, he is very great in</LINE>
+<LINE>knowledge and accordingly valiant.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I have then sinned against his experience and</LINE>
+<LINE>transgressed against his valour; and my state that</LINE>
+<LINE>way is dangerous, since I cannot yet find in my</LINE>
+<LINE>heart to repent. Here he comes: I pray you, make</LINE>
+<LINE>us friends; I will pursue the amity.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE><STAGEDIR>To BERTRAM</STAGEDIR>  These things shall be done, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Pray you, sir, who's his tailor?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Sir?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>O, I know him well, I, sir; he, sir, 's a good</LINE>
+<LINE>workman, a very good tailor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE><STAGEDIR>Aside to PAROLLES</STAGEDIR>  Is she gone to the king?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>She is.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Will she away to-night?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>As you'll have her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I have writ my letters, casketed my treasure,</LINE>
+<LINE>Given order for our horses; and to-night,</LINE>
+<LINE>When I should take possession of the bride,</LINE>
+<LINE>End ere I do begin.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A good traveller is something at the latter end of a</LINE>
+<LINE>dinner; but one that lies three thirds and uses a</LINE>
+<LINE>known truth to pass a thousand nothings with, should</LINE>
+<LINE>be once heard and thrice beaten. God save you, captain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Is there any unkindness between my lord and you, monsieur?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I know not how I have deserved to run into my lord's</LINE>
+<LINE>displeasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You have made shift to run into 't, boots and spurs</LINE>
+<LINE>and all, like him that leaped into the custard; and</LINE>
+<LINE>out of it you'll run again, rather than suffer</LINE>
+<LINE>question for your residence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>It may be you have mistaken him, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>And shall do so ever, though I took him at 's</LINE>
+<LINE>prayers. Fare you well, my lord; and believe this</LINE>
+<LINE>of me, there can be no kernel in this light nut; the</LINE>
+<LINE>soul of this man is his clothes. Trust him not in</LINE>
+<LINE>matter of heavy consequence; I have kept of them</LINE>
+<LINE>tame, and know their natures. Farewell, monsieur:</LINE>
+<LINE>I have spoken better of you than you have or will to</LINE>
+<LINE>deserve at my hand; but we must do good against evil.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>An idle lord. I swear.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I think so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, do you not know him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Yes, I do know him well, and common speech</LINE>
+<LINE>Gives him a worthy pass. Here comes my clog.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter HELENA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I have, sir, as I was commanded from you,</LINE>
+<LINE>Spoke with the king and have procured his leave</LINE>
+<LINE>For present parting; only he desires</LINE>
+<LINE>Some private speech with you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I shall obey his will.</LINE>
+<LINE>You must not marvel, Helen, at my course,</LINE>
+<LINE>Which holds not colour with the time, nor does</LINE>
+<LINE>The ministration and required office</LINE>
+<LINE>On my particular. Prepared I was not</LINE>
+<LINE>For such a business; therefore am I found</LINE>
+<LINE>So much unsettled: this drives me to entreat you</LINE>
+<LINE>That presently you take our way for home;</LINE>
+<LINE>And rather muse than ask why I entreat you,</LINE>
+<LINE>For my respects are better than they seem</LINE>
+<LINE>And my appointments have in them a need</LINE>
+<LINE>Greater than shows itself at the first view</LINE>
+<LINE>To you that know them not. This to my mother:</LINE>
+<STAGEDIR>Giving a letter</STAGEDIR>
+<LINE>'Twill be two days ere I shall see you, so</LINE>
+<LINE>I leave you to your wisdom.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Sir, I can nothing say,</LINE>
+<LINE>But that I am your most obedient servant.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Come, come, no more of that.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>And ever shall</LINE>
+<LINE>With true observance seek to eke out that</LINE>
+<LINE>Wherein toward me my homely stars have fail'd</LINE>
+<LINE>To equal my great fortune.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Let that go:</LINE>
+<LINE>My haste is very great: farewell; hie home.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Pray, sir, your pardon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Well, what would you say?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I am not worthy of the wealth I owe,</LINE>
+<LINE>Nor dare I say 'tis mine, and yet it is;</LINE>
+<LINE>But, like a timorous thief, most fain would steal</LINE>
+<LINE>What law does vouch mine own.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>What would you have?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Something; and scarce so much: nothing, indeed.</LINE>
+<LINE>I would not tell you what I would, my lord:</LINE>
+<LINE>Faith yes;</LINE>
+<LINE>Strangers and foes do sunder, and not kiss.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I pray you, stay not, but in haste to horse.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I shall not break your bidding, good my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Where are my other men, monsieur? Farewell.</LINE>
+<STAGEDIR>Exit HELENA</STAGEDIR>
+<LINE>Go thou toward home; where I will never come</LINE>
+<LINE>Whilst I can shake my sword or hear the drum.</LINE>
+<LINE>Away, and for our flight.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Bravely, coragio!</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+</ACT>
+
+<ACT><TITLE>ACT III</TITLE>
+
+<SCENE><TITLE>SCENE I.  Florence. The DUKE's palace.</TITLE>
+<STAGEDIR>Flourish. Enter the DUKE of Florence attended;
+the two Frenchmen, with a troop of soldiers.</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>So that from point to point now have you heard</LINE>
+<LINE>The fundamental reasons of this war,</LINE>
+<LINE>Whose great decision hath much blood let forth</LINE>
+<LINE>And more thirsts after.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Holy seems the quarrel</LINE>
+<LINE>Upon your grace's part; black and fearful</LINE>
+<LINE>On the opposer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>Therefore we marvel much our cousin France</LINE>
+<LINE>Would in so just a business shut his bosom</LINE>
+<LINE>Against our borrowing prayers.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Good my lord,</LINE>
+<LINE>The reasons of our state I cannot yield,</LINE>
+<LINE>But like a common and an outward man,</LINE>
+<LINE>That the great figure of a council frames</LINE>
+<LINE>By self-unable motion: therefore dare not</LINE>
+<LINE>Say what I think of it, since I have found</LINE>
+<LINE>Myself in my incertain grounds to fail</LINE>
+<LINE>As often as I guess'd.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>Be it his pleasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>But I am sure the younger of our nature,</LINE>
+<LINE>That surfeit on their ease, will day by day</LINE>
+<LINE>Come here for physic.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>Welcome shall they be;</LINE>
+<LINE>And all the honours that can fly from us</LINE>
+<LINE>Shall on them settle. You know your places well;</LINE>
+<LINE>When better fall, for your avails they fell:</LINE>
+<LINE>To-morrow to the field.</LINE>
+</SPEECH>
+
+<STAGEDIR>Flourish. Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>It hath happened all as I would have had it, save</LINE>
+<LINE>that he comes not along with her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>By my troth, I take my young lord to be a very</LINE>
+<LINE>melancholy man.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>By what observance, I pray you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Why, he will look upon his boot and sing; mend the</LINE>
+<LINE>ruff and sing; ask questions and sing; pick his</LINE>
+<LINE>teeth and sing. I know a man that had this trick of</LINE>
+<LINE>melancholy sold a goodly manor for a song.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Let me see what he writes, and when he means to come.</LINE>
+</SPEECH>
+
+<STAGEDIR>Opening a letter</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I have no mind to Isbel since I was at court: our</LINE>
+<LINE>old ling and our Isbels o' the country are nothing</LINE>
+<LINE>like your old ling and your Isbels o' the court:</LINE>
+<LINE>the brains of my Cupid's knocked out, and I begin to</LINE>
+<LINE>love, as an old man loves money, with no stomach.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What have we here?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>E'en that you have there.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  I have sent you a daughter-in-law: she hath</LINE>
+<LINE>recovered the king, and undone me. I have wedded</LINE>
+<LINE>her, not bedded her; and sworn to make the 'not'</LINE>
+<LINE>eternal. You shall hear I am run away: know it</LINE>
+<LINE>before the report come. If there be breadth enough</LINE>
+<LINE>in the world, I will hold a long distance. My duty</LINE>
+<LINE>to you. Your unfortunate son,</LINE>
+<LINE>BERTRAM.</LINE>
+<LINE>This is not well, rash and unbridled boy.</LINE>
+<LINE>To fly the favours of so good a king;</LINE>
+<LINE>To pluck his indignation on thy head</LINE>
+<LINE>By the misprising of a maid too virtuous</LINE>
+<LINE>For the contempt of empire.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O madam, yonder is heavy news within between two</LINE>
+<LINE>soldiers and my young lady!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What is the matter?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Nay, there is some comfort in the news, some</LINE>
+<LINE>comfort; your son will not be killed so soon as I</LINE>
+<LINE>thought he would.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Why should he be killed?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>So say I, madam, if he run away, as I hear he does:</LINE>
+<LINE>the danger is in standing to't; that's the loss of</LINE>
+<LINE>men, though it be the getting of children. Here</LINE>
+<LINE>they come will tell you more: for my part, I only</LINE>
+<LINE>hear your son was run away.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+<STAGEDIR>Enter HELENA, and two Gentlemen</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Save you, good madam.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Madam, my lord is gone, for ever gone.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>Do not say so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Think upon patience. Pray you, gentlemen,</LINE>
+<LINE>I have felt so many quirks of joy and grief,</LINE>
+<LINE>That the first face of neither, on the start,</LINE>
+<LINE>Can woman me unto't: where is my son, I pray you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>Madam, he's gone to serve the duke of Florence:</LINE>
+<LINE>We met him thitherward; for thence we came,</LINE>
+<LINE>And, after some dispatch in hand at court,</LINE>
+<LINE>Thither we bend again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Look on his letter, madam; here's my passport.</LINE>
+<STAGEDIR>Reads</STAGEDIR>
+<LINE>When thou canst get the ring upon my finger which</LINE>
+<LINE>never shall come off, and show me a child begotten</LINE>
+<LINE>of thy body that I am father to, then call me</LINE>
+<LINE>husband: but in such a 'then' I write a 'never.'</LINE>
+<LINE>This is a dreadful sentence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Brought you this letter, gentlemen?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Ay, madam;</LINE>
+<LINE>And for the contents' sake are sorry for our pain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I prithee, lady, have a better cheer;</LINE>
+<LINE>If thou engrossest all the griefs are thine,</LINE>
+<LINE>Thou robb'st me of a moiety: he was my son;</LINE>
+<LINE>But I do wash his name out of my blood,</LINE>
+<LINE>And thou art all my child. Towards Florence is he?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>Ay, madam.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>And to be a soldier?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>Such is his noble purpose; and believe 't,</LINE>
+<LINE>The duke will lay upon him all the honour</LINE>
+<LINE>That good convenience claims.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Return you thither?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Ay, madam, with the swiftest wing of speed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  Till I have no wife I have nothing in France.</LINE>
+<LINE>'Tis bitter.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Find you that there?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay, madam.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>'Tis but the boldness of his hand, haply, which his</LINE>
+<LINE>heart was not consenting to.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Nothing in France, until he have no wife!</LINE>
+<LINE>There's nothing here that is too good for him</LINE>
+<LINE>But only she; and she deserves a lord</LINE>
+<LINE>That twenty such rude boys might tend upon</LINE>
+<LINE>And call her hourly mistress. Who was with him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>A servant only, and a gentleman</LINE>
+<LINE>Which I have sometime known.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Parolles, was it not?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Ay, my good lady, he.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>A very tainted fellow, and full of wickedness.</LINE>
+<LINE>My son corrupts a well-derived nature</LINE>
+<LINE>With his inducement.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Indeed, good lady,</LINE>
+<LINE>The fellow has a deal of that too much,</LINE>
+<LINE>Which holds him much to have.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You're welcome, gentlemen.</LINE>
+<LINE>I will entreat you, when you see my son,</LINE>
+<LINE>To tell him that his sword can never win</LINE>
+<LINE>The honour that he loses: more I'll entreat you</LINE>
+<LINE>Written to bear along.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>We serve you, madam,</LINE>
+<LINE>In that and all your worthiest affairs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Not so, but as we change our courtesies.</LINE>
+<LINE>Will you draw near!</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt COUNTESS and Gentlemen</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>'Till I have no wife, I have nothing in France.'</LINE>
+<LINE>Nothing in France, until he has no wife!</LINE>
+<LINE>Thou shalt have none, Rousillon, none in France;</LINE>
+<LINE>Then hast thou all again. Poor lord! is't I</LINE>
+<LINE>That chase thee from thy country and expose</LINE>
+<LINE>Those tender limbs of thine to the event</LINE>
+<LINE>Of the none-sparing war? and is it I</LINE>
+<LINE>That drive thee from the sportive court, where thou</LINE>
+<LINE>Wast shot at with fair eyes, to be the mark</LINE>
+<LINE>Of smoky muskets? O you leaden messengers,</LINE>
+<LINE>That ride upon the violent speed of fire,</LINE>
+<LINE>Fly with false aim; move the still-peering air,</LINE>
+<LINE>That sings with piercing; do not touch my lord.</LINE>
+<LINE>Whoever shoots at him, I set him there;</LINE>
+<LINE>Whoever charges on his forward breast,</LINE>
+<LINE>I am the caitiff that do hold him to't;</LINE>
+<LINE>And, though I kill him not, I am the cause</LINE>
+<LINE>His death was so effected: better 'twere</LINE>
+<LINE>I met the ravin lion when he roar'd</LINE>
+<LINE>With sharp constraint of hunger; better 'twere</LINE>
+<LINE>That all the miseries which nature owes</LINE>
+<LINE>Were mine at once. No, come thou home, Rousillon,</LINE>
+<LINE>Whence honour but of danger wins a scar,</LINE>
+<LINE>As oft it loses all: I will be gone;</LINE>
+<LINE>My being here it is that holds thee hence:</LINE>
+<LINE>Shall I stay here to do't?  no, no, although</LINE>
+<LINE>The air of paradise did fan the house</LINE>
+<LINE>And angels officed all: I will be gone,</LINE>
+<LINE>That pitiful rumour may report my flight,</LINE>
+<LINE>To consolate thine ear. Come, night; end, day!</LINE>
+<LINE>For with the dark, poor thief, I'll steal away.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  Florence. Before the DUKE's palace.</TITLE>
+<STAGEDIR>Flourish. Enter the DUKE of Florence, BERTRAM,
+PAROLLES, Soldiers, Drum, and Trumpets</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>The general of our horse thou art; and we,</LINE>
+<LINE>Great in our hope, lay our best love and credence</LINE>
+<LINE>Upon thy promising fortune.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Sir, it is</LINE>
+<LINE>A charge too heavy for my strength, but yet</LINE>
+<LINE>We'll strive to bear it for your worthy sake</LINE>
+<LINE>To the extreme edge of hazard.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>Then go thou forth;</LINE>
+<LINE>And fortune play upon thy prosperous helm,</LINE>
+<LINE>As thy auspicious mistress!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>This very day,</LINE>
+<LINE>Great Mars, I put myself into thy file:</LINE>
+<LINE>Make me but like my thoughts, and I shall prove</LINE>
+<LINE>A lover of thy drum, hater of love.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE IV.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS and Steward</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Alas! and would you take the letter of her?</LINE>
+<LINE>Might you not know she would do as she has done,</LINE>
+<LINE>By sending me a letter? Read it again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR></LINE>
+<LINE>I am Saint Jaques' pilgrim, thither gone:</LINE>
+<LINE>Ambitious love hath so in me offended,</LINE>
+<LINE>That barefoot plod I the cold ground upon,</LINE>
+<LINE>With sainted vow my faults to have amended.</LINE>
+<LINE>Write, write, that from the bloody course of war</LINE>
+<LINE>My dearest master, your dear son, may hie:</LINE>
+<LINE>Bless him at home in peace, whilst I from far</LINE>
+<LINE>His name with zealous fervor sanctify:</LINE>
+<LINE>His taken labours bid him me forgive;</LINE>
+<LINE>I, his despiteful Juno, sent him forth</LINE>
+<LINE>From courtly friends, with camping foes to live,</LINE>
+<LINE>Where death and danger dogs the heels of worth:</LINE>
+<LINE>He is too good and fair for death and me:</LINE>
+<LINE>Whom I myself embrace, to set him free.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Ah, what sharp stings are in her mildest words!</LINE>
+<LINE>Rinaldo, you did never lack advice so much,</LINE>
+<LINE>As letting her pass so: had I spoke with her,</LINE>
+<LINE>I could have well diverted her intents,</LINE>
+<LINE>Which thus she hath prevented.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>Pardon me, madam:</LINE>
+<LINE>If I had given you this at over-night,</LINE>
+<LINE>She might have been o'erta'en; and yet she writes,</LINE>
+<LINE>Pursuit would be but vain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What angel shall</LINE>
+<LINE>Bless this unworthy husband? he cannot thrive,</LINE>
+<LINE>Unless her prayers, whom heaven delights to hear</LINE>
+<LINE>And loves to grant, reprieve him from the wrath</LINE>
+<LINE>Of greatest justice. Write, write, Rinaldo,</LINE>
+<LINE>To this unworthy husband of his wife;</LINE>
+<LINE>Let every word weigh heavy of her worth</LINE>
+<LINE>That he does weigh too light: my greatest grief.</LINE>
+<LINE>Though little he do feel it, set down sharply.</LINE>
+<LINE>Dispatch the most convenient messenger:</LINE>
+<LINE>When haply he shall hear that she is gone,</LINE>
+<LINE>He will return; and hope I may that she,</LINE>
+<LINE>Hearing so much, will speed her foot again,</LINE>
+<LINE>Led hither by pure love: which of them both</LINE>
+<LINE>Is dearest to me. I have no skill in sense</LINE>
+<LINE>To make distinction: provide this messenger:</LINE>
+<LINE>My heart is heavy and mine age is weak;</LINE>
+<LINE>Grief would have tears, and sorrow bids me speak.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE V.  Florence. Without the walls. A tucket afar off.</TITLE>
+<STAGEDIR>Enter an old Widow of Florence, DIANA, VIOLENTA,
+and MARIANA, with other Citizens</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Nay, come; for if they do approach the city, we</LINE>
+<LINE>shall lose all the sight.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>They say the French count has done most honourable service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>It is reported that he has taken their greatest</LINE>
+<LINE>commander; and that with his own hand he slew the</LINE>
+<LINE>duke's brother.</LINE>
+<STAGEDIR>Tucket</STAGEDIR>
+<LINE>We have lost our labour; they are gone a contrary</LINE>
+<LINE>way: hark! you may know by their trumpets.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>Come, let's return again, and suffice ourselves with</LINE>
+<LINE>the report of it. Well, Diana, take heed of this</LINE>
+<LINE>French earl: the honour of a maid is her name; and</LINE>
+<LINE>no legacy is so rich as honesty.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I have told my neighbour how you have been solicited</LINE>
+<LINE>by a gentleman his companion.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>I know that knave; hang him! one Parolles: a</LINE>
+<LINE>filthy officer he is in those suggestions for the</LINE>
+<LINE>young earl. Beware of them, Diana; their promises,</LINE>
+<LINE>enticements, oaths, tokens, and all these engines of</LINE>
+<LINE>lust, are not the things they go under: many a maid</LINE>
+<LINE>hath been seduced by them; and the misery is,</LINE>
+<LINE>example, that so terrible shows in the wreck of</LINE>
+<LINE>maidenhood, cannot for all that dissuade succession,</LINE>
+<LINE>but that they are limed with the twigs that threaten</LINE>
+<LINE>them. I hope I need not to advise you further; but</LINE>
+<LINE>I hope your own grace will keep you where you are,</LINE>
+<LINE>though there were no further danger known but the</LINE>
+<LINE>modesty which is so lost.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>You shall not need to fear me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I hope so.</LINE>
+<STAGEDIR>Enter HELENA, disguised like a Pilgrim</STAGEDIR>
+<LINE>Look, here comes a pilgrim: I know she will lie at</LINE>
+<LINE>my house; thither they send one another: I'll</LINE>
+<LINE>question her. God save you, pilgrim! whither are you bound?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>To Saint Jaques le Grand.</LINE>
+<LINE>Where do the palmers lodge, I do beseech you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>At the Saint Francis here beside the port.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Is this the way?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Ay, marry, is't.</LINE>
+<STAGEDIR>A march afar</STAGEDIR>
+<LINE>Hark you! they come this way.</LINE>
+<LINE>If you will tarry, holy pilgrim,</LINE>
+<LINE>But till the troops come by,</LINE>
+<LINE>I will conduct you where you shall be lodged;</LINE>
+<LINE>The rather, for I think I know your hostess</LINE>
+<LINE>As ample as myself.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Is it yourself?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>If you shall please so, pilgrim.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I thank you, and will stay upon your leisure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>You came, I think, from France?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I did so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Here you shall see a countryman of yours</LINE>
+<LINE>That has done worthy service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>His name, I pray you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>The Count Rousillon: know you such a one?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>But by the ear, that hears most nobly of him:</LINE>
+<LINE>His face I know not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Whatsome'er he is,</LINE>
+<LINE>He's bravely taken here. He stole from France,</LINE>
+<LINE>As 'tis reported, for the king had married him</LINE>
+<LINE>Against his liking: think you it is so?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay, surely, mere the truth: I know his lady.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>There is a gentleman that serves the count</LINE>
+<LINE>Reports but coarsely of her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What's his name?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Monsieur Parolles.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>O, I believe with him,</LINE>
+<LINE>In argument of praise, or to the worth</LINE>
+<LINE>Of the great count himself, she is too mean</LINE>
+<LINE>To have her name repeated: all her deserving</LINE>
+<LINE>Is a reserved honesty, and that</LINE>
+<LINE>I have not heard examined.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Alas, poor lady!</LINE>
+<LINE>'Tis a hard bondage to become the wife</LINE>
+<LINE>Of a detesting lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I warrant, good creature, wheresoe'er she is,</LINE>
+<LINE>Her heart weighs sadly: this young maid might do her</LINE>
+<LINE>A shrewd turn, if she pleased.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>How do you mean?</LINE>
+<LINE>May be the amorous count solicits her</LINE>
+<LINE>In the unlawful purpose.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>He does indeed;</LINE>
+<LINE>And brokes with all that can in such a suit</LINE>
+<LINE>Corrupt the tender honour of a maid:</LINE>
+<LINE>But she is arm'd for him and keeps her guard</LINE>
+<LINE>In honestest defence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>The gods forbid else!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>So, now they come:</LINE>
+<STAGEDIR>Drum and Colours</STAGEDIR>
+<STAGEDIR>Enter BERTRAM, PAROLLES, and the whole army</STAGEDIR>
+<LINE>That is Antonio, the duke's eldest son;</LINE>
+<LINE>That, Escalus.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Which is the Frenchman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>He;</LINE>
+<LINE>That with the plume: 'tis a most gallant fellow.</LINE>
+<LINE>I would he loved his wife: if he were honester</LINE>
+<LINE>He were much goodlier: is't not a handsome gentleman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I like him well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>'Tis pity he is not honest: yond's that same knave</LINE>
+<LINE>That leads him to these places: were I his lady,</LINE>
+<LINE>I would Poison that vile rascal.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Which is he?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>That jack-an-apes with scarfs: why is he melancholy?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Perchance he's hurt i' the battle.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Lose our drum! well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>He's shrewdly vexed at something: look, he has spied us.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Marry, hang you!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>And your courtesy, for a ring-carrier!</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt BERTRAM, PAROLLES, and army</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>The troop is past. Come, pilgrim, I will bring you</LINE>
+<LINE>Where you shall host: of enjoin'd penitents</LINE>
+<LINE>There's four or five, to great Saint Jaques bound,</LINE>
+<LINE>Already at my house.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I humbly thank you:</LINE>
+<LINE>Please it this matron and this gentle maid</LINE>
+<LINE>To eat with us to-night, the charge and thanking</LINE>
+<LINE>Shall be for me; and, to requite you further,</LINE>
+<LINE>I will bestow some precepts of this virgin</LINE>
+<LINE>Worthy the note.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BOTH</SPEAKER>
+<LINE>We'll take your offer kindly.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE VI.  Camp before Florence.</TITLE>
+<STAGEDIR>Enter BERTRAM and the two French Lords</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Nay, good my lord, put him to't; let him have his</LINE>
+<LINE>way.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>If your lordship find him not a hilding, hold me no</LINE>
+<LINE>more in your respect.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>On my life, my lord, a bubble.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Do you think I am so far deceived in him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Believe it, my lord, in mine own direct knowledge,</LINE>
+<LINE>without any malice, but to speak of him as my</LINE>
+<LINE>kinsman, he's a most notable coward, an infinite and</LINE>
+<LINE>endless liar, an hourly promise-breaker, the owner</LINE>
+<LINE>of no one good quality worthy your lordship's</LINE>
+<LINE>entertainment.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>It were fit you knew him; lest, reposing too far in</LINE>
+<LINE>his virtue, which he hath not, he might at some</LINE>
+<LINE>great and trusty business in a main danger fail you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I would I knew in what particular action to try him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>None better than to let him fetch off his drum,</LINE>
+<LINE>which you hear him so confidently undertake to do.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I, with a troop of Florentines, will suddenly</LINE>
+<LINE>surprise him; such I will have, whom I am sure he</LINE>
+<LINE>knows not from the enemy: we will bind and hoodwink</LINE>
+<LINE>him so, that he shall suppose no other but that he</LINE>
+<LINE>is carried into the leaguer of the adversaries, when</LINE>
+<LINE>we bring him to our own tents. Be but your lordship</LINE>
+<LINE>present at his examination: if he do not, for the</LINE>
+<LINE>promise of his life and in the highest compulsion of</LINE>
+<LINE>base fear, offer to betray you and deliver all the</LINE>
+<LINE>intelligence in his power against you, and that with</LINE>
+<LINE>the divine forfeit of his soul upon oath, never</LINE>
+<LINE>trust my judgment in any thing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>O, for the love of laughter, let him fetch his drum;</LINE>
+<LINE>he says he has a stratagem for't: when your</LINE>
+<LINE>lordship sees the bottom of his success in't, and to</LINE>
+<LINE>what metal this counterfeit lump of ore will be</LINE>
+<LINE>melted, if you give him not John Drum's</LINE>
+<LINE>entertainment, your inclining cannot be removed.</LINE>
+<LINE>Here he comes.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE><STAGEDIR>Aside to BERTRAM</STAGEDIR>  O, for the love of laughter,</LINE>
+<LINE>hinder not the honour of his design: let him fetch</LINE>
+<LINE>off his drum in any hand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>How now, monsieur! this drum sticks sorely in your</LINE>
+<LINE>disposition.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>A pox on't, let it go; 'tis but a drum.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>'But a drum'! is't 'but a drum'? A drum so lost!</LINE>
+<LINE>There was excellent command,--to charge in with our</LINE>
+<LINE>horse upon our own wings, and to rend our own soldiers!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>That was not to be blamed in the command of the</LINE>
+<LINE>service: it was a disaster of war that Caesar</LINE>
+<LINE>himself could not have prevented, if he had been</LINE>
+<LINE>there to command.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Well, we cannot greatly condemn our success: some</LINE>
+<LINE>dishonour we had in the loss of that drum; but it is</LINE>
+<LINE>not to be recovered.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>It might have been recovered.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>It might; but it is not now.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>It is to be recovered: but that the merit of</LINE>
+<LINE>service is seldom attributed to the true and exact</LINE>
+<LINE>performer, I would have that drum or another, or</LINE>
+<LINE>'hic jacet.'</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Why, if you have a stomach, to't, monsieur: if you</LINE>
+<LINE>think your mystery in stratagem can bring this</LINE>
+<LINE>instrument of honour again into his native quarter,</LINE>
+<LINE>be magnanimous in the enterprise and go on; I will</LINE>
+<LINE>grace the attempt for a worthy exploit: if you</LINE>
+<LINE>speed well in it, the duke shall both speak of it.</LINE>
+<LINE>and extend to you what further becomes his</LINE>
+<LINE>greatness, even to the utmost syllable of your</LINE>
+<LINE>worthiness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>By the hand of a soldier, I will undertake it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>But you must not now slumber in it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I'll about it this evening: and I will presently</LINE>
+<LINE>pen down my dilemmas, encourage myself in my</LINE>
+<LINE>certainty, put myself into my mortal preparation;</LINE>
+<LINE>and by midnight look to hear further from me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>May I be bold to acquaint his grace you are gone about it?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I know not what the success will be, my lord; but</LINE>
+<LINE>the attempt I vow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I know thou'rt valiant; and, to the possibility of</LINE>
+<LINE>thy soldiership, will subscribe for thee. Farewell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I love not many words.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>No more than a fish loves water. Is not this a</LINE>
+<LINE>strange fellow, my lord, that so confidently seems</LINE>
+<LINE>to undertake this business, which he knows is not to</LINE>
+<LINE>be done; damns himself to do and dares better be</LINE>
+<LINE>damned than to do't?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>You do not know him, my lord, as we do: certain it</LINE>
+<LINE>is that he will steal himself into a man's favour and</LINE>
+<LINE>for a week escape a great deal of discoveries; but</LINE>
+<LINE>when you find him out, you have him ever after.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Why, do you think he will make no deed at all of</LINE>
+<LINE>this that so seriously he does address himself unto?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>None in the world; but return with an invention and</LINE>
+<LINE>clap upon you two or three probable lies: but we</LINE>
+<LINE>have almost embossed him; you shall see his fall</LINE>
+<LINE>to-night; for indeed he is not for your lordship's respect.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>We'll make you some sport with the fox ere we case</LINE>
+<LINE>him. He was first smoked by the old lord Lafeu:</LINE>
+<LINE>when his disguise and he is parted, tell me what a</LINE>
+<LINE>sprat you shall find him; which you shall see this</LINE>
+<LINE>very night.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I must go look my twigs: he shall be caught.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Your brother he shall go along with me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>As't please your lordship: I'll leave you.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Now will I lead you to the house, and show you</LINE>
+<LINE>The lass I spoke of.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>But you say she's honest.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>That's all the fault: I spoke with her but once</LINE>
+<LINE>And found her wondrous cold; but I sent to her,</LINE>
+<LINE>By this same coxcomb that we have i' the wind,</LINE>
+<LINE>Tokens and letters which she did re-send;</LINE>
+<LINE>And this is all I have done. She's a fair creature:</LINE>
+<LINE>Will you go see her?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>With all my heart, my lord.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE VII.  Florence. The Widow's house.</TITLE>
+<STAGEDIR>Enter HELENA and Widow</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>If you misdoubt me that I am not she,</LINE>
+<LINE>I know not how I shall assure you further,</LINE>
+<LINE>But I shall lose the grounds I work upon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Though my estate be fallen, I was well born,</LINE>
+<LINE>Nothing acquainted with these businesses;</LINE>
+<LINE>And would not put my reputation now</LINE>
+<LINE>In any staining act.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Nor would I wish you.</LINE>
+<LINE>First, give me trust, the count he is my husband,</LINE>
+<LINE>And what to your sworn counsel I have spoken</LINE>
+<LINE>Is so from word to word; and then you cannot,</LINE>
+<LINE>By the good aid that I of you shall borrow,</LINE>
+<LINE>Err in bestowing it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I should believe you:</LINE>
+<LINE>For you have show'd me that which well approves</LINE>
+<LINE>You're great in fortune.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Take this purse of gold,</LINE>
+<LINE>And let me buy your friendly help thus far,</LINE>
+<LINE>Which I will over-pay and pay again</LINE>
+<LINE>When I have found it. The count he wooes your daughter,</LINE>
+<LINE>Lays down his wanton siege before her beauty,</LINE>
+<LINE>Resolved to carry her: let her in fine consent,</LINE>
+<LINE>As we'll direct her how 'tis best to bear it.</LINE>
+<LINE>Now his important blood will nought deny</LINE>
+<LINE>That she'll demand: a ring the county wears,</LINE>
+<LINE>That downward hath succeeded in his house</LINE>
+<LINE>From son to son, some four or five descents</LINE>
+<LINE>Since the first father wore it: this ring he holds</LINE>
+<LINE>In most rich choice; yet in his idle fire,</LINE>
+<LINE>To buy his will, it would not seem too dear,</LINE>
+<LINE>Howe'er repented after.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Now I see</LINE>
+<LINE>The bottom of your purpose.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>You see it lawful, then: it is no more,</LINE>
+<LINE>But that your daughter, ere she seems as won,</LINE>
+<LINE>Desires this ring; appoints him an encounter;</LINE>
+<LINE>In fine, delivers me to fill the time,</LINE>
+<LINE>Herself most chastely absent: after this,</LINE>
+<LINE>To marry her, I'll add three thousand crowns</LINE>
+<LINE>To what is passed already.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I have yielded:</LINE>
+<LINE>Instruct my daughter how she shall persever,</LINE>
+<LINE>That time and place with this deceit so lawful</LINE>
+<LINE>May prove coherent. Every night he comes</LINE>
+<LINE>With musics of all sorts and songs composed</LINE>
+<LINE>To her unworthiness: it nothing steads us</LINE>
+<LINE>To chide him from our eaves; for he persists</LINE>
+<LINE>As if his life lay on't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Why then to-night</LINE>
+<LINE>Let us assay our plot; which, if it speed,</LINE>
+<LINE>Is wicked meaning in a lawful deed</LINE>
+<LINE>And lawful meaning in a lawful act,</LINE>
+<LINE>Where both not sin, and yet a sinful fact:</LINE>
+<LINE>But let's about it.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+</ACT>
+
+<ACT><TITLE>ACT IV</TITLE>
+
+<SCENE><TITLE>SCENE I.  Without the Florentine camp.</TITLE>
+<STAGEDIR>Enter Second French Lord, with five or six other
+Soldiers in ambush</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>He can come no other way but by this hedge-corner.</LINE>
+<LINE>When you sally upon him, speak what terrible</LINE>
+<LINE>language you will: though you understand it not</LINE>
+<LINE>yourselves, no matter; for we must not seem to</LINE>
+<LINE>understand him, unless some one among us whom we</LINE>
+<LINE>must produce for an interpreter.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Good captain, let me be the interpreter.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Art not acquainted with him? knows he not thy voice?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>No, sir, I warrant you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>But what linsey-woolsey hast thou to speak to us again?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>E'en such as you speak to me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>He must think us some band of strangers i' the</LINE>
+<LINE>adversary's entertainment. Now he hath a smack of</LINE>
+<LINE>all neighbouring languages; therefore we must every</LINE>
+<LINE>one be a man of his own fancy, not to know what we</LINE>
+<LINE>speak one to another; so we seem to know, is to</LINE>
+<LINE>know straight our purpose: choughs' language,</LINE>
+<LINE>gabble enough, and good enough. As for you,</LINE>
+<LINE>interpreter, you must seem very politic. But couch,</LINE>
+<LINE>ho! here he comes, to beguile two hours in a sleep,</LINE>
+<LINE>and then to return and swear the lies he forges.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ten o'clock: within these three hours 'twill be</LINE>
+<LINE>time enough to go home. What shall I say I have</LINE>
+<LINE>done? It must be a very plausive invention that</LINE>
+<LINE>carries it: they begin to smoke me; and disgraces</LINE>
+<LINE>have of late knocked too often at my door. I find</LINE>
+<LINE>my tongue is too foolhardy; but my heart hath the</LINE>
+<LINE>fear of Mars before it and of his creatures, not</LINE>
+<LINE>daring the reports of my tongue.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>This is the first truth that e'er thine own tongue</LINE>
+<LINE>was guilty of.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What the devil should move me to undertake the</LINE>
+<LINE>recovery of this drum, being not ignorant of the</LINE>
+<LINE>impossibility, and knowing I had no such purpose? I</LINE>
+<LINE>must give myself some hurts, and say I got them in</LINE>
+<LINE>exploit: yet slight ones will not carry it; they</LINE>
+<LINE>will say, 'Came you off with so little?' and great</LINE>
+<LINE>ones I dare not give. Wherefore, what's the</LINE>
+<LINE>instance? Tongue, I must put you into a</LINE>
+<LINE>butter-woman's mouth and buy myself another of</LINE>
+<LINE>Bajazet's mule, if you prattle me into these perils.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Is it possible he should know what he is, and be</LINE>
+<LINE>that he is?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I would the cutting of my garments would serve the</LINE>
+<LINE>turn, or the breaking of my Spanish sword.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>We cannot afford you so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Or the baring of my beard; and to say it was in</LINE>
+<LINE>stratagem.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>'Twould not do.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Or to drown my clothes, and say I was stripped.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Hardly serve.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Though I swore I leaped from the window of the citadel.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>How deep?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Thirty fathom.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Three great oaths would scarce make that be believed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I would I had any drum of the enemy's: I would swear</LINE>
+<LINE>I recovered it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>You shall hear one anon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>A drum now of the enemy's,--</LINE>
+</SPEECH>
+
+<STAGEDIR>Alarum within</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Throca movousus, cargo, cargo, cargo.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>All</SPEAKER>
+<LINE>Cargo, cargo, cargo, villiando par corbo, cargo.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O, ransom, ransom! do not hide mine eyes.</LINE>
+</SPEECH>
+
+<STAGEDIR>They seize and blindfold him</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Boskos thromuldo boskos.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I know you are the Muskos' regiment:</LINE>
+<LINE>And I shall lose my life for want of language;</LINE>
+<LINE>If there be here German, or Dane, low Dutch,</LINE>
+<LINE>Italian, or French, let him speak to me; I'll</LINE>
+<LINE>Discover that which shall undo the Florentine.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Boskos vauvado: I understand thee, and can speak</LINE>
+<LINE>thy tongue. Kerely bonto, sir, betake thee to thy</LINE>
+<LINE>faith, for seventeen poniards are at thy bosom.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>O, pray, pray, pray! Manka revania dulche.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Oscorbidulchos volivorco.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>The general is content to spare thee yet;</LINE>
+<LINE>And, hoodwink'd as thou art, will lead thee on</LINE>
+<LINE>To gather from thee: haply thou mayst inform</LINE>
+<LINE>Something to save thy life.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O, let me live!</LINE>
+<LINE>And all the secrets of our camp I'll show,</LINE>
+<LINE>Their force, their purposes; nay, I'll speak that</LINE>
+<LINE>Which you will wonder at.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>But wilt thou faithfully?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>If I do not, damn me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Acordo linta.</LINE>
+<LINE>Come on; thou art granted space.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit, with PAROLLES guarded. A short alarum within</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Go, tell the Count Rousillon, and my brother,</LINE>
+<LINE>We have caught the woodcock, and will keep him muffled</LINE>
+<LINE>Till we do hear from them.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Soldier</SPEAKER>
+<LINE>Captain, I will.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>A' will betray us all unto ourselves:</LINE>
+<LINE>Inform on that.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Soldier</SPEAKER>
+<LINE>So I will, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Till then I'll keep him dark and safely lock'd.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Florence. The Widow's house.</TITLE>
+<STAGEDIR>Enter BERTRAM and DIANA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>They told me that your name was Fontibell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>No, my good lord, Diana.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Titled goddess;</LINE>
+<LINE>And worth it, with addition! But, fair soul,</LINE>
+<LINE>In your fine frame hath love no quality?</LINE>
+<LINE>If quick fire of youth light not your mind,</LINE>
+<LINE>You are no maiden, but a monument:</LINE>
+<LINE>When you are dead, you should be such a one</LINE>
+<LINE>As you are now, for you are cold and stem;</LINE>
+<LINE>And now you should be as your mother was</LINE>
+<LINE>When your sweet self was got.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>She then was honest.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>So should you be.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>No:</LINE>
+<LINE>My mother did but duty; such, my lord,</LINE>
+<LINE>As you owe to your wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>No more o' that;</LINE>
+<LINE>I prithee, do not strive against my vows:</LINE>
+<LINE>I was compell'd to her; but I love thee</LINE>
+<LINE>By love's own sweet constraint, and will for ever</LINE>
+<LINE>Do thee all rights of service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Ay, so you serve us</LINE>
+<LINE>Till we serve you; but when you have our roses,</LINE>
+<LINE>You barely leave our thorns to prick ourselves</LINE>
+<LINE>And mock us with our bareness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>How have I sworn!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>'Tis not the many oaths that makes the truth,</LINE>
+<LINE>But the plain single vow that is vow'd true.</LINE>
+<LINE>What is not holy, that we swear not by,</LINE>
+<LINE>But take the High'st to witness: then, pray you, tell me,</LINE>
+<LINE>If I should swear by God's great attributes,</LINE>
+<LINE>I loved you dearly, would you believe my oaths,</LINE>
+<LINE>When I did love you ill? This has no holding,</LINE>
+<LINE>To swear by him whom I protest to love,</LINE>
+<LINE>That I will work against him: therefore your oaths</LINE>
+<LINE>Are words and poor conditions, but unseal'd,</LINE>
+<LINE>At least in my opinion.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Change it, change it;</LINE>
+<LINE>Be not so holy-cruel: love is holy;</LINE>
+<LINE>And my integrity ne'er knew the crafts</LINE>
+<LINE>That you do charge men with. Stand no more off,</LINE>
+<LINE>But give thyself unto my sick desires,</LINE>
+<LINE>Who then recover: say thou art mine, and ever</LINE>
+<LINE>My love as it begins shall so persever.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I see that men make ropes in such a scarre</LINE>
+<LINE>That we'll forsake ourselves. Give me that ring.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I'll lend it thee, my dear; but have no power</LINE>
+<LINE>To give it from me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Will you not, my lord?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>It is an honour 'longing to our house,</LINE>
+<LINE>Bequeathed down from many ancestors;</LINE>
+<LINE>Which were the greatest obloquy i' the world</LINE>
+<LINE>In me to lose.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Mine honour's such a ring:</LINE>
+<LINE>My chastity's the jewel of our house,</LINE>
+<LINE>Bequeathed down from many ancestors;</LINE>
+<LINE>Which were the greatest obloquy i' the world</LINE>
+<LINE>In me to lose: thus your own proper wisdom</LINE>
+<LINE>Brings in the champion Honour on my part,</LINE>
+<LINE>Against your vain assault.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Here, take my ring:</LINE>
+<LINE>My house, mine honour, yea, my life, be thine,</LINE>
+<LINE>And I'll be bid by thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>When midnight comes, knock at my chamber-window:</LINE>
+<LINE>I'll order take my mother shall not hear.</LINE>
+<LINE>Now will I charge you in the band of truth,</LINE>
+<LINE>When you have conquer'd my yet maiden bed,</LINE>
+<LINE>Remain there but an hour, nor speak to me:</LINE>
+<LINE>My reasons are most strong; and you shall know them</LINE>
+<LINE>When back again this ring shall be deliver'd:</LINE>
+<LINE>And on your finger in the night I'll put</LINE>
+<LINE>Another ring, that what in time proceeds</LINE>
+<LINE>May token to the future our past deeds.</LINE>
+<LINE>Adieu, till then; then, fail not. You have won</LINE>
+<LINE>A wife of me, though there my hope be done.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>A heaven on earth I have won by wooing thee.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>For which live long to thank both heaven and me!</LINE>
+<LINE>You may so in the end.</LINE>
+<LINE>My mother told me just how he would woo,</LINE>
+<LINE>As if she sat in 's heart; she says all men</LINE>
+<LINE>Have the like oaths: he had sworn to marry me</LINE>
+<LINE>When his wife's dead; therefore I'll lie with him</LINE>
+<LINE>When I am buried. Since Frenchmen are so braid,</LINE>
+<LINE>Marry that will, I live and die a maid:</LINE>
+<LINE>Only in this disguise I think't no sin</LINE>
+<LINE>To cozen him that would unjustly win.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  The Florentine camp.</TITLE>
+<STAGEDIR>Enter the two French Lords and some two or three Soldiers</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>You have not given him his mother's letter?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I have delivered it an hour since: there is</LINE>
+<LINE>something in't that stings his nature; for on the</LINE>
+<LINE>reading it he changed almost into another man.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>He has much worthy blame laid upon him for shaking</LINE>
+<LINE>off so good a wife and so sweet a lady.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Especially he hath incurred the everlasting</LINE>
+<LINE>displeasure of the king, who had even tuned his</LINE>
+<LINE>bounty to sing happiness to him. I will tell you a</LINE>
+<LINE>thing, but you shall let it dwell darkly with you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>When you have spoken it, 'tis dead, and I am the</LINE>
+<LINE>grave of it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>He hath perverted a young gentlewoman here in</LINE>
+<LINE>Florence, of a most chaste renown; and this night he</LINE>
+<LINE>fleshes his will in the spoil of her honour: he hath</LINE>
+<LINE>given her his monumental ring, and thinks himself</LINE>
+<LINE>made in the unchaste composition.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Now, God delay our rebellion! as we are ourselves,</LINE>
+<LINE>what things are we!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Merely our own traitors. And as in the common course</LINE>
+<LINE>of all treasons, we still see them reveal</LINE>
+<LINE>themselves, till they attain to their abhorred ends,</LINE>
+<LINE>so he that in this action contrives against his own</LINE>
+<LINE>nobility, in his proper stream o'erflows himself.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Is it not meant damnable in us, to be trumpeters of</LINE>
+<LINE>our unlawful intents? We shall not then have his</LINE>
+<LINE>company to-night?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Not till after midnight; for he is dieted to his hour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>That approaches apace; I would gladly have him see</LINE>
+<LINE>his company anatomized, that he might take a measure</LINE>
+<LINE>of his own judgments, wherein so curiously he had</LINE>
+<LINE>set this counterfeit.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>We will not meddle with him till he come; for his</LINE>
+<LINE>presence must be the whip of the other.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>In the mean time, what hear you of these wars?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I hear there is an overture of peace.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Nay, I assure you, a peace concluded.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>What will Count Rousillon do then? will he travel</LINE>
+<LINE>higher, or return again into France?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>I perceive, by this demand, you are not altogether</LINE>
+<LINE>of his council.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Let it be forbid, sir; so should I be a great deal</LINE>
+<LINE>of his act.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Sir, his wife some two months since fled from his</LINE>
+<LINE>house: her pretence is a pilgrimage to Saint Jaques</LINE>
+<LINE>le Grand; which holy undertaking with most austere</LINE>
+<LINE>sanctimony she accomplished; and, there residing the</LINE>
+<LINE>tenderness of her nature became as a prey to her</LINE>
+<LINE>grief; in fine, made a groan of her last breath, and</LINE>
+<LINE>now she sings in heaven.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>How is this justified?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>The stronger part of it by her own letters, which</LINE>
+<LINE>makes her story true, even to the point of her</LINE>
+<LINE>death: her death itself, which could not be her</LINE>
+<LINE>office to say is come, was faithfully confirmed by</LINE>
+<LINE>the rector of the place.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Hath the count all this intelligence?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Ay, and the particular confirmations, point from</LINE>
+<LINE>point, so to the full arming of the verity.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I am heartily sorry that he'll be glad of this.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>How mightily sometimes we make us comforts of our losses!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>And how mightily some other times we drown our gain</LINE>
+<LINE>in tears! The great dignity that his valour hath</LINE>
+<LINE>here acquired for him shall at home be encountered</LINE>
+<LINE>with a shame as ample.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>The web of our life is of a mingled yarn, good and</LINE>
+<LINE>ill together: our virtues would be proud, if our</LINE>
+<LINE>faults whipped them not; and our crimes would</LINE>
+<LINE>despair, if they were not cherished by our virtues.</LINE>
+<STAGEDIR>Enter a Messenger</STAGEDIR>
+<LINE>How now! where's your master?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Servant</SPEAKER>
+<LINE>He met the duke in the street, sir, of whom he hath</LINE>
+<LINE>taken a solemn leave: his lordship will next</LINE>
+<LINE>morning for France. The duke hath offered him</LINE>
+<LINE>letters of commendations to the king.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>They shall be no more than needful there, if they</LINE>
+<LINE>were more than they can commend.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>They cannot be too sweet for the king's tartness.</LINE>
+<LINE>Here's his lordship now.</LINE>
+<STAGEDIR>Enter BERTRAM</STAGEDIR>
+<LINE>How now, my lord! is't not after midnight?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I have to-night dispatched sixteen businesses, a</LINE>
+<LINE>month's length a-piece, by an abstract of success:</LINE>
+<LINE>I have congied with the duke, done my adieu with his</LINE>
+<LINE>nearest; buried a wife, mourned for her; writ to my</LINE>
+<LINE>lady mother I am returning; entertained my convoy;</LINE>
+<LINE>and between these main parcels of dispatch effected</LINE>
+<LINE>many nicer needs; the last was the greatest, but</LINE>
+<LINE>that I have not ended yet.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>If the business be of any difficulty, and this</LINE>
+<LINE>morning your departure hence, it requires haste of</LINE>
+<LINE>your lordship.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I mean, the business is not ended, as fearing to</LINE>
+<LINE>hear of it hereafter. But shall we have this</LINE>
+<LINE>dialogue between the fool and the soldier? Come,</LINE>
+<LINE>bring forth this counterfeit module, he has deceived</LINE>
+<LINE>me, like a double-meaning prophesier.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Bring him forth: has sat i' the stocks all night,</LINE>
+<LINE>poor gallant knave.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>No matter: his heels have deserved it, in usurping</LINE>
+<LINE>his spurs so long. How does he carry himself?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I have told your lordship already, the stocks carry</LINE>
+<LINE>him. But to answer you as you would be understood;</LINE>
+<LINE>he weeps like a wench that had shed her milk: he</LINE>
+<LINE>hath confessed himself to Morgan, whom he supposes</LINE>
+<LINE>to be a friar, from the time of his remembrance to</LINE>
+<LINE>this very instant disaster of his setting i' the</LINE>
+<LINE>stocks: and what think you he hath confessed?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Nothing of me, has a'?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>His confession is taken, and it shall be read to his</LINE>
+<LINE>face: if your lordship be in't, as I believe you</LINE>
+<LINE>are, you must have the patience to hear it.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES guarded, and First Soldier</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>A plague upon him! muffled! he can say nothing of</LINE>
+<LINE>me: hush, hush!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Hoodman comes! Portotartarosa</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>He calls for the tortures: what will you say</LINE>
+<LINE>without 'em?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I will confess what I know without constraint: if</LINE>
+<LINE>ye pinch me like a pasty, I can say no more.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Bosko chimurcho.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Boblibindo chicurmurco.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>You are a merciful general. Our general bids you</LINE>
+<LINE>answer to what I shall ask you out of a note.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>And truly, as I hope to live.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  'First demand of him how many horse the</LINE>
+<LINE>duke is strong.' What say you to that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Five or six thousand; but very weak and</LINE>
+<LINE>unserviceable: the troops are all scattered, and</LINE>
+<LINE>the commanders very poor rogues, upon my reputation</LINE>
+<LINE>and credit and as I hope to live.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Shall I set down your answer so?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Do: I'll take the sacrament on't, how and which way you will.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>All's one to him. What a past-saving slave is this!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>You're deceived, my lord: this is Monsieur</LINE>
+<LINE>Parolles, the gallant militarist,--that was his own</LINE>
+<LINE>phrase,--that had the whole theoric of war in the</LINE>
+<LINE>knot of his scarf, and the practise in the chape of</LINE>
+<LINE>his dagger.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I will never trust a man again for keeping his sword</LINE>
+<LINE>clean. nor believe he can have every thing in him</LINE>
+<LINE>by wearing his apparel neatly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Well, that's set down.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Five or six thousand horse, I said,-- I will say</LINE>
+<LINE>true,--or thereabouts, set down, for I'll speak truth.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>He's very near the truth in this.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>But I con him no thanks for't, in the nature he</LINE>
+<LINE>delivers it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Poor rogues, I pray you, say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Well, that's set down.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I humbly thank you, sir: a truth's a truth, the</LINE>
+<LINE>rogues are marvellous poor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  'Demand of him, of what strength they are</LINE>
+<LINE>a-foot.' What say you to that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>By my troth, sir, if I were to live this present</LINE>
+<LINE>hour, I will tell true. Let me see: Spurio, a</LINE>
+<LINE>hundred and fifty; Sebastian, so many; Corambus, so</LINE>
+<LINE>many; Jaques, so many; Guiltian, Cosmo, Lodowick,</LINE>
+<LINE>and Gratii, two hundred and fifty each; mine own</LINE>
+<LINE>company, Chitopher, Vaumond, Bentii, two hundred and</LINE>
+<LINE>fifty each: so that the muster-file, rotten and</LINE>
+<LINE>sound, upon my life, amounts not to fifteen thousand</LINE>
+<LINE>poll; half of the which dare not shake snow from off</LINE>
+<LINE>their cassocks, lest they shake themselves to pieces.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>What shall be done to him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Nothing, but let him have thanks. Demand of him my</LINE>
+<LINE>condition, and what credit I have with the duke.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Well, that's set down.</LINE>
+<STAGEDIR>Reads</STAGEDIR>
+<LINE>'You shall demand of him, whether one Captain Dumain</LINE>
+<LINE>be i' the camp, a Frenchman; what his reputation is</LINE>
+<LINE>with the duke; what his valour, honesty, and</LINE>
+<LINE>expertness in wars; or whether he thinks it were not</LINE>
+<LINE>possible, with well-weighing sums of gold, to</LINE>
+<LINE>corrupt him to revolt.' What say you to this? what</LINE>
+<LINE>do you know of it?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I beseech you, let me answer to the particular of</LINE>
+<LINE>the inter'gatories: demand them singly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Do you know this Captain Dumain?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I know him: a' was a botcher's 'prentice in Paris,</LINE>
+<LINE>from whence he was whipped for getting the shrieve's</LINE>
+<LINE>fool with child,--a dumb innocent, that could not</LINE>
+<LINE>say him nay.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Nay, by your leave, hold your hands; though I know</LINE>
+<LINE>his brains are forfeit to the next tile that falls.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Well, is this captain in the duke of Florence's camp?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Upon my knowledge, he is, and lousy.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Nay look not so upon me; we shall hear of your</LINE>
+<LINE>lordship anon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>What is his reputation with the duke?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>The duke knows him for no other but a poor officer</LINE>
+<LINE>of mine; and writ to me this other day to turn him</LINE>
+<LINE>out o' the band: I think I have his letter in my pocket.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Marry, we'll search.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>In good sadness, I do not know; either it is there,</LINE>
+<LINE>or it is upon a file with the duke's other letters</LINE>
+<LINE>in my tent.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Here 'tis; here's a paper: shall I read it to you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I do not know if it be it or no.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Our interpreter does it well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Excellently.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  'Dian, the count's a fool, and full of gold,'--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That is not the duke's letter, sir; that is an</LINE>
+<LINE>advertisement to a proper maid in Florence, one</LINE>
+<LINE>Diana, to take heed of the allurement of one Count</LINE>
+<LINE>Rousillon, a foolish idle boy, but for all that very</LINE>
+<LINE>ruttish: I pray you, sir, put it up again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Nay, I'll read it first, by your favour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My meaning in't, I protest, was very honest in the</LINE>
+<LINE>behalf of the maid; for I knew the young count to be</LINE>
+<LINE>a dangerous and lascivious boy, who is a whale to</LINE>
+<LINE>virginity and devours up all the fry it finds.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Damnable both-sides rogue!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  'When he swears oaths, bid him drop gold, and take it;</LINE>
+<LINE>After he scores, he never pays the score:</LINE>
+<LINE>Half won is match well made; match, and well make it;</LINE>
+<LINE>He ne'er pays after-debts, take it before;</LINE>
+<LINE>And say a soldier, Dian, told thee this,</LINE>
+<LINE>Men are to mell with, boys are not to kiss:</LINE>
+<LINE>For count of this, the count's a fool, I know it,</LINE>
+<LINE>Who pays before, but not when he does owe it.</LINE>
+<LINE>Thine, as he vowed to thee in thine ear,</LINE>
+<LINE>PAROLLES.'</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>He shall be whipped through the army with this rhyme</LINE>
+<LINE>in's forehead.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>This is your devoted friend, sir, the manifold</LINE>
+<LINE>linguist and the armipotent soldier.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I could endure any thing before but a cat, and now</LINE>
+<LINE>he's a cat to me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>I perceive, sir, by the general's looks, we shall be</LINE>
+<LINE>fain to hang you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My life, sir, in any case: not that I am afraid to</LINE>
+<LINE>die; but that, my offences being many, I would</LINE>
+<LINE>repent out the remainder of nature: let me live,</LINE>
+<LINE>sir, in a dungeon, i' the stocks, or any where, so I may live.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>We'll see what may be done, so you confess freely;</LINE>
+<LINE>therefore, once more to this Captain Dumain: you</LINE>
+<LINE>have answered to his reputation with the duke and to</LINE>
+<LINE>his valour: what is his honesty?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>He will steal, sir, an egg out of a cloister: for</LINE>
+<LINE>rapes and ravishments he parallels Nessus: he</LINE>
+<LINE>professes not keeping of oaths; in breaking 'em he</LINE>
+<LINE>is stronger than Hercules: he will lie, sir, with</LINE>
+<LINE>such volubility, that you would think truth were a</LINE>
+<LINE>fool: drunkenness is his best virtue, for he will</LINE>
+<LINE>be swine-drunk; and in his sleep he does little</LINE>
+<LINE>harm, save to his bed-clothes about him; but they</LINE>
+<LINE>know his conditions and lay him in straw. I have but</LINE>
+<LINE>little more to say, sir, of his honesty: he has</LINE>
+<LINE>every thing that an honest man should not have; what</LINE>
+<LINE>an honest man should have, he has nothing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>I begin to love him for this.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>For this description of thine honesty? A pox upon</LINE>
+<LINE>him for me, he's more and more a cat.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>What say you to his expertness in war?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Faith, sir, he has led the drum before the English</LINE>
+<LINE>tragedians; to belie him, I will not, and more of</LINE>
+<LINE>his soldiership I know not; except, in that country</LINE>
+<LINE>he had the honour to be the officer at a place there</LINE>
+<LINE>called Mile-end, to instruct for the doubling of</LINE>
+<LINE>files: I would do the man what honour I can, but of</LINE>
+<LINE>this I am not certain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>He hath out-villained villany so far, that the</LINE>
+<LINE>rarity redeems him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>A pox on him, he's a cat still.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>His qualities being at this poor price, I need not</LINE>
+<LINE>to ask you if gold will corrupt him to revolt.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Sir, for a quart d'ecu he will sell the fee-simple</LINE>
+<LINE>of his salvation, the inheritance of it; and cut the</LINE>
+<LINE>entail from all remainders, and a perpetual</LINE>
+<LINE>succession for it perpetually.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>What's his brother, the other Captain Dumain?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Why does be ask him of me?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>What's he?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>E'en a crow o' the same nest; not altogether so</LINE>
+<LINE>great as the first in goodness, but greater a great</LINE>
+<LINE>deal in evil: he excels his brother for a coward,</LINE>
+<LINE>yet his brother is reputed one of the best that is:</LINE>
+<LINE>in a retreat he outruns any lackey; marry, in coming</LINE>
+<LINE>on he has the cramp.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>If your life be saved, will you undertake to betray</LINE>
+<LINE>the Florentine?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ay, and the captain of his horse, Count Rousillon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>I'll whisper with the general, and know his pleasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE><STAGEDIR>Aside</STAGEDIR>  I'll no more drumming; a plague of all</LINE>
+<LINE>drums! Only to seem to deserve well, and to</LINE>
+<LINE>beguile the supposition of that lascivious young boy</LINE>
+<LINE>the count, have I run into this danger. Yet who</LINE>
+<LINE>would have suspected an ambush where I was taken?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>There is no remedy, sir, but you must die: the</LINE>
+<LINE>general says, you that have so traitorously</LINE>
+<LINE>discovered the secrets of your army and made such</LINE>
+<LINE>pestiferous reports of men very nobly held, can</LINE>
+<LINE>serve the world for no honest use; therefore you</LINE>
+<LINE>must die. Come, headsman, off with his head.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O Lord, sir, let me live, or let me see my death!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>That shall you, and take your leave of all your friends.</LINE>
+<STAGEDIR>Unblinding him</STAGEDIR>
+<LINE>So, look about you: know you any here?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Good morrow, noble captain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>God bless you, Captain Parolles.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>God save you, noble captain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Captain, what greeting will you to my Lord Lafeu?</LINE>
+<LINE>I am for France.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Good captain, will you give me a copy of the sonnet</LINE>
+<LINE>you writ to Diana in behalf of the Count Rousillon?</LINE>
+<LINE>an I were not a very coward, I'ld compel it of you:</LINE>
+<LINE>but fare you well.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt BERTRAM and Lords</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>You are undone, captain, all but your scarf; that</LINE>
+<LINE>has a knot on't yet</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Who cannot be crushed with a plot?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>If you could find out a country where but women were</LINE>
+<LINE>that had received so much shame, you might begin an</LINE>
+<LINE>impudent nation. Fare ye well, sir; I am for France</LINE>
+<LINE>too: we shall speak of you there.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit with Soldiers</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Yet am I thankful: if my heart were great,</LINE>
+<LINE>'Twould burst at this. Captain I'll be no more;</LINE>
+<LINE>But I will eat and drink, and sleep as soft</LINE>
+<LINE>As captain shall: simply the thing I am</LINE>
+<LINE>Shall make me live. Who knows himself a braggart,</LINE>
+<LINE>Let him fear this, for it will come to pass</LINE>
+<LINE>that every braggart shall be found an ass.</LINE>
+<LINE>Rust, sword? cool, blushes! and, Parolles, live</LINE>
+<LINE>Safest in shame! being fool'd, by foolery thrive!</LINE>
+<LINE>There's place and means for every man alive.</LINE>
+<LINE>I'll after them.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE IV.  Florence. The Widow's house.</TITLE>
+<STAGEDIR>Enter HELENA, Widow, and DIANA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That you may well perceive I have not wrong'd you,</LINE>
+<LINE>One of the greatest in the Christian world</LINE>
+<LINE>Shall be my surety; 'fore whose throne 'tis needful,</LINE>
+<LINE>Ere I can perfect mine intents, to kneel:</LINE>
+<LINE>Time was, I did him a desired office,</LINE>
+<LINE>Dear almost as his life; which gratitude</LINE>
+<LINE>Through flinty Tartar's bosom would peep forth,</LINE>
+<LINE>And answer, thanks: I duly am inform'd</LINE>
+<LINE>His grace is at Marseilles; to which place</LINE>
+<LINE>We have convenient convoy. You must know</LINE>
+<LINE>I am supposed dead: the army breaking,</LINE>
+<LINE>My husband hies him home; where, heaven aiding,</LINE>
+<LINE>And by the leave of my good lord the king,</LINE>
+<LINE>We'll be before our welcome.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Gentle madam,</LINE>
+<LINE>You never had a servant to whose trust</LINE>
+<LINE>Your business was more welcome.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Nor you, mistress,</LINE>
+<LINE>Ever a friend whose thoughts more truly labour</LINE>
+<LINE>To recompense your love: doubt not but heaven</LINE>
+<LINE>Hath brought me up to be your daughter's dower,</LINE>
+<LINE>As it hath fated her to be my motive</LINE>
+<LINE>And helper to a husband. But, O strange men!</LINE>
+<LINE>That can such sweet use make of what they hate,</LINE>
+<LINE>When saucy trusting of the cozen'd thoughts</LINE>
+<LINE>Defiles the pitchy night: so lust doth play</LINE>
+<LINE>With what it loathes for that which is away.</LINE>
+<LINE>But more of this hereafter. You, Diana,</LINE>
+<LINE>Under my poor instructions yet must suffer</LINE>
+<LINE>Something in my behalf.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Let death and honesty</LINE>
+<LINE>Go with your impositions, I am yours</LINE>
+<LINE>Upon your will to suffer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Yet, I pray you:</LINE>
+<LINE>But with the word the time will bring on summer,</LINE>
+<LINE>When briers shall have leaves as well as thorns,</LINE>
+<LINE>And be as sweet as sharp. We must away;</LINE>
+<LINE>Our wagon is prepared, and time revives us:</LINE>
+<LINE>All's well that ends well; still the fine's the crown;</LINE>
+<LINE>Whate'er the course, the end is the renown.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE V.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS, LAFEU, and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>No, no, no, your son was misled with a snipt-taffeta</LINE>
+<LINE>fellow there, whose villanous saffron would have</LINE>
+<LINE>made all the unbaked and doughy youth of a nation in</LINE>
+<LINE>his colour: your daughter-in-law had been alive at</LINE>
+<LINE>this hour, and your son here at home, more advanced</LINE>
+<LINE>by the king than by that red-tailed humble-bee I speak of.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I would I had not known him; it was the death of the</LINE>
+<LINE>most virtuous gentlewoman that ever nature had</LINE>
+<LINE>praise for creating. If she had partaken of my</LINE>
+<LINE>flesh, and cost me the dearest groans of a mother, I</LINE>
+<LINE>could not have owed her a more rooted love.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>'Twas a good lady, 'twas a good lady: we may pick a</LINE>
+<LINE>thousand salads ere we light on such another herb.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Indeed, sir, she was the sweet marjoram of the</LINE>
+<LINE>salad, or rather, the herb of grace.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>They are not herbs, you knave; they are nose-herbs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I am no great Nebuchadnezzar, sir; I have not much</LINE>
+<LINE>skill in grass.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Whether dost thou profess thyself, a knave or a fool?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>A fool, sir, at a woman's service, and a knave at a man's.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Your distinction?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I would cozen the man of his wife and do his service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>So you were a knave at his service, indeed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>And I would give his wife my bauble, sir, to do her service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I will subscribe for thee, thou art both knave and fool.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>At your service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>No, no, no.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Why, sir, if I cannot serve you, I can serve as</LINE>
+<LINE>great a prince as you are.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Who's that? a Frenchman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Faith, sir, a' has an English name; but his fisnomy</LINE>
+<LINE>is more hotter in France than there.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>What prince is that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>The black prince, sir; alias, the prince of</LINE>
+<LINE>darkness; alias, the devil.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Hold thee, there's my purse: I give thee not this</LINE>
+<LINE>to suggest thee from thy master thou talkest of;</LINE>
+<LINE>serve him still.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I am a woodland fellow, sir, that always loved a</LINE>
+<LINE>great fire; and the master I speak of ever keeps a</LINE>
+<LINE>good fire. But, sure, he is the prince of the</LINE>
+<LINE>world; let his nobility remain in's court. I am for</LINE>
+<LINE>the house with the narrow gate, which I take to be</LINE>
+<LINE>too little for pomp to enter: some that humble</LINE>
+<LINE>themselves may; but the many will be too chill and</LINE>
+<LINE>tender, and they'll be for the flowery way that</LINE>
+<LINE>leads to the broad gate and the great fire.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Go thy ways, I begin to be aweary of thee; and I</LINE>
+<LINE>tell thee so before, because I would not fall out</LINE>
+<LINE>with thee. Go thy ways: let my horses be well</LINE>
+<LINE>looked to, without any tricks.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>If I put any tricks upon 'em, sir, they shall be</LINE>
+<LINE>jades' tricks; which are their own right by the law of nature.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A shrewd knave and an unhappy.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>So he is. My lord that's gone made himself much</LINE>
+<LINE>sport out of him: by his authority he remains here,</LINE>
+<LINE>which he thinks is a patent for his sauciness; and,</LINE>
+<LINE>indeed, he has no pace, but runs where he will.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I like him well; 'tis not amiss. And I was about to</LINE>
+<LINE>tell you, since I heard of the good lady's death and</LINE>
+<LINE>that my lord your son was upon his return home, I</LINE>
+<LINE>moved the king my master to speak in the behalf of</LINE>
+<LINE>my daughter; which, in the minority of them both,</LINE>
+<LINE>his majesty, out of a self-gracious remembrance, did</LINE>
+<LINE>first propose: his highness hath promised me to do</LINE>
+<LINE>it: and, to stop up the displeasure he hath</LINE>
+<LINE>conceived against your son, there is no fitter</LINE>
+<LINE>matter. How does your ladyship like it?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>With very much content, my lord; and I wish it</LINE>
+<LINE>happily effected.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>His highness comes post from Marseilles, of as able</LINE>
+<LINE>body as when he numbered thirty: he will be here</LINE>
+<LINE>to-morrow, or I am deceived by him that in such</LINE>
+<LINE>intelligence hath seldom failed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>It rejoices me, that I hope I shall see him ere I</LINE>
+<LINE>die. I have letters that my son will be here</LINE>
+<LINE>to-night: I shall beseech your lordship to remain</LINE>
+<LINE>with me till they meet together.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Madam, I was thinking with what manners I might</LINE>
+<LINE>safely be admitted.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You need but plead your honourable privilege.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Lady, of that I have made a bold charter; but I</LINE>
+<LINE>thank my God it holds yet.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O madam, yonder's my lord your son with a patch of</LINE>
+<LINE>velvet on's face: whether there be a scar under't</LINE>
+<LINE>or no, the velvet knows; but 'tis a goodly patch of</LINE>
+<LINE>velvet: his left cheek is a cheek of two pile and a</LINE>
+<LINE>half, but his right cheek is worn bare.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A scar nobly got, or a noble scar, is a good livery</LINE>
+<LINE>of honour; so belike is that.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>But it is your carbonadoed face.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Let us go see your son, I pray you: I long to talk</LINE>
+<LINE>with the young noble soldier.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Faith there's a dozen of 'em, with delicate fine</LINE>
+<LINE>hats and most courteous feathers, which bow the head</LINE>
+<LINE>and nod at every man.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+</ACT>
+
+<ACT><TITLE>ACT V</TITLE>
+
+<SCENE><TITLE>SCENE I.  Marseilles. A street.</TITLE>
+<STAGEDIR>Enter HELENA, Widow, and DIANA, with two
+Attendants</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>But this exceeding posting day and night</LINE>
+<LINE>Must wear your spirits low; we cannot help it:</LINE>
+<LINE>But since you have made the days and nights as one,</LINE>
+<LINE>To wear your gentle limbs in my affairs,</LINE>
+<LINE>Be bold you do so grow in my requital</LINE>
+<LINE>As nothing can unroot you. In happy time;</LINE>
+<STAGEDIR>Enter a Gentleman</STAGEDIR>
+<LINE>This man may help me to his majesty's ear,</LINE>
+<LINE>If he would spend his power. God save you, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>And you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Sir, I have seen you in the court of France.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>I have been sometimes there.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I do presume, sir, that you are not fallen</LINE>
+<LINE>From the report that goes upon your goodness;</LINE>
+<LINE>An therefore, goaded with most sharp occasions,</LINE>
+<LINE>Which lay nice manners by, I put you to</LINE>
+<LINE>The use of your own virtues, for the which</LINE>
+<LINE>I shall continue thankful.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>What's your will?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That it will please you</LINE>
+<LINE>To give this poor petition to the king,</LINE>
+<LINE>And aid me with that store of power you have</LINE>
+<LINE>To come into his presence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>The king's not here.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Not here, sir!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>Not, indeed:</LINE>
+<LINE>He hence removed last night and with more haste</LINE>
+<LINE>Than is his use.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Lord, how we lose our pains!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>All's well that ends well yet,</LINE>
+<LINE>Though time seem so adverse and means unfit.</LINE>
+<LINE>I do beseech you, whither is he gone?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>Marry, as I take it, to Rousillon;</LINE>
+<LINE>Whither I am going.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I do beseech you, sir,</LINE>
+<LINE>Since you are like to see the king before me,</LINE>
+<LINE>Commend the paper to his gracious hand,</LINE>
+<LINE>Which I presume shall render you no blame</LINE>
+<LINE>But rather make you thank your pains for it.</LINE>
+<LINE>I will come after you with what good speed</LINE>
+<LINE>Our means will make us means.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>This I'll do for you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>And you shall find yourself to be well thank'd,</LINE>
+<LINE>Whate'er falls more. We must to horse again.</LINE>
+<LINE>Go, go, provide.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Rousillon. Before the COUNT's palace.</TITLE>
+<STAGEDIR>Enter Clown, and PAROLLES, following</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Good Monsieur Lavache, give my Lord Lafeu this</LINE>
+<LINE>letter: I have ere now, sir, been better known to</LINE>
+<LINE>you, when I have held familiarity with fresher</LINE>
+<LINE>clothes; but I am now, sir, muddied in fortune's</LINE>
+<LINE>mood, and smell somewhat strong of her strong</LINE>
+<LINE>displeasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Truly, fortune's displeasure is but sluttish, if it</LINE>
+<LINE>smell so strongly as thou speakest of: I will</LINE>
+<LINE>henceforth eat no fish of fortune's buttering.</LINE>
+<LINE>Prithee, allow the wind.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Nay, you need not to stop your nose, sir; I spake</LINE>
+<LINE>but by a metaphor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Indeed, sir, if your metaphor stink, I will stop my</LINE>
+<LINE>nose; or against any man's metaphor. Prithee, get</LINE>
+<LINE>thee further.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Pray you, sir, deliver me this paper.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Foh! prithee, stand away: a paper from fortune's</LINE>
+<LINE>close-stool to give to a nobleman! Look, here he</LINE>
+<LINE>comes himself.</LINE>
+<STAGEDIR>Enter LAFEU</STAGEDIR>
+<LINE>Here is a purr of fortune's, sir, or of fortune's</LINE>
+<LINE>cat,--but not a musk-cat,--that has fallen into the</LINE>
+<LINE>unclean fishpond of her displeasure, and, as he</LINE>
+<LINE>says, is muddied withal: pray you, sir, use the</LINE>
+<LINE>carp as you may; for he looks like a poor, decayed,</LINE>
+<LINE>ingenious, foolish, rascally knave. I do pity his</LINE>
+<LINE>distress in my similes of comfort and leave him to</LINE>
+<LINE>your lordship.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My lord, I am a man whom fortune hath cruelly</LINE>
+<LINE>scratched.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>And what would you have me to do? 'Tis too late to</LINE>
+<LINE>pare her nails now. Wherein have you played the</LINE>
+<LINE>knave with fortune, that she should scratch you, who</LINE>
+<LINE>of herself is a good lady and would not have knaves</LINE>
+<LINE>thrive long under her? There's a quart d'ecu for</LINE>
+<LINE>you: let the justices make you and fortune friends:</LINE>
+<LINE>I am for other business.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I beseech your honour to hear me one single word.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You beg a single penny more: come, you shall ha't;</LINE>
+<LINE>save your word.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My name, my good lord, is Parolles.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You beg more than 'word,' then. Cox my passion!</LINE>
+<LINE>give me your hand. How does your drum?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O my good lord, you were the first that found me!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Was I, in sooth? and I was the first that lost thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>It lies in you, my lord, to bring me in some grace,</LINE>
+<LINE>for you did bring me out.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Out upon thee, knave! dost thou put upon me at once</LINE>
+<LINE>both the office of God and the devil? One brings</LINE>
+<LINE>thee in grace and the other brings thee out.</LINE>
+<STAGEDIR>Trumpets sound</STAGEDIR>
+<LINE>The king's coming; I know by his trumpets. Sirrah,</LINE>
+<LINE>inquire further after me; I had talk of you last</LINE>
+<LINE>night: though you are a fool and a knave, you shall</LINE>
+<LINE>eat; go to, follow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I praise God for you.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Flourish. Enter KING, COUNTESS, LAFEU, the two
+French Lords, with Attendants</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>We lost a jewel of her; and our esteem</LINE>
+<LINE>Was made much poorer by it: but your son,</LINE>
+<LINE>As mad in folly, lack'd the sense to know</LINE>
+<LINE>Her estimation home.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>'Tis past, my liege;</LINE>
+<LINE>And I beseech your majesty to make it</LINE>
+<LINE>Natural rebellion, done i' the blaze of youth;</LINE>
+<LINE>When oil and fire, too strong for reason's force,</LINE>
+<LINE>O'erbears it and burns on.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>My honour'd lady,</LINE>
+<LINE>I have forgiven and forgotten all;</LINE>
+<LINE>Though my revenges were high bent upon him,</LINE>
+<LINE>And watch'd the time to shoot.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>This I must say,</LINE>
+<LINE>But first I beg my pardon, the young lord</LINE>
+<LINE>Did to his majesty, his mother and his lady</LINE>
+<LINE>Offence of mighty note; but to himself</LINE>
+<LINE>The greatest wrong of all. He lost a wife</LINE>
+<LINE>Whose beauty did astonish the survey</LINE>
+<LINE>Of richest eyes, whose words all ears took captive,</LINE>
+<LINE>Whose dear perfection hearts that scorn'd to serve</LINE>
+<LINE>Humbly call'd mistress.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Praising what is lost</LINE>
+<LINE>Makes the remembrance dear. Well, call him hither;</LINE>
+<LINE>We are reconciled, and the first view shall kill</LINE>
+<LINE>All repetition: let him not ask our pardon;</LINE>
+<LINE>The nature of his great offence is dead,</LINE>
+<LINE>And deeper than oblivion we do bury</LINE>
+<LINE>The incensing relics of it: let him approach,</LINE>
+<LINE>A stranger, no offender; and inform him</LINE>
+<LINE>So 'tis our will he should.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>I shall, my liege.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What says he to your daughter? have you spoke?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>All that he is hath reference to your highness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Then shall we have a match. I have letters sent me</LINE>
+<LINE>That set him high in fame.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter BERTRAM</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He looks well on't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I am not a day of season,</LINE>
+<LINE>For thou mayst see a sunshine and a hail</LINE>
+<LINE>In me at once: but to the brightest beams</LINE>
+<LINE>Distracted clouds give way; so stand thou forth;</LINE>
+<LINE>The time is fair again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My high-repented blames,</LINE>
+<LINE>Dear sovereign, pardon to me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>All is whole;</LINE>
+<LINE>Not one word more of the consumed time.</LINE>
+<LINE>Let's take the instant by the forward top;</LINE>
+<LINE>For we are old, and on our quick'st decrees</LINE>
+<LINE>The inaudible and noiseless foot of Time</LINE>
+<LINE>Steals ere we can effect them. You remember</LINE>
+<LINE>The daughter of this lord?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Admiringly, my liege, at first</LINE>
+<LINE>I stuck my choice upon her, ere my heart</LINE>
+<LINE>Durst make too bold a herald of my tongue</LINE>
+<LINE>Where the impression of mine eye infixing,</LINE>
+<LINE>Contempt his scornful perspective did lend me,</LINE>
+<LINE>Which warp'd the line of every other favour;</LINE>
+<LINE>Scorn'd a fair colour, or express'd it stolen;</LINE>
+<LINE>Extended or contracted all proportions</LINE>
+<LINE>To a most hideous object: thence it came</LINE>
+<LINE>That she whom all men praised and whom myself,</LINE>
+<LINE>Since I have lost, have loved, was in mine eye</LINE>
+<LINE>The dust that did offend it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Well excused:</LINE>
+<LINE>That thou didst love her, strikes some scores away</LINE>
+<LINE>From the great compt: but love that comes too late,</LINE>
+<LINE>Like a remorseful pardon slowly carried,</LINE>
+<LINE>To the great sender turns a sour offence,</LINE>
+<LINE>Crying, 'That's good that's gone.' Our rash faults</LINE>
+<LINE>Make trivial price of serious things we have,</LINE>
+<LINE>Not knowing them until we know their grave:</LINE>
+<LINE>Oft our displeasures, to ourselves unjust,</LINE>
+<LINE>Destroy our friends and after weep their dust</LINE>
+<LINE>Our own love waking cries to see what's done,</LINE>
+<LINE>While shame full late sleeps out the afternoon.</LINE>
+<LINE>Be this sweet Helen's knell, and now forget her.</LINE>
+<LINE>Send forth your amorous token for fair Maudlin:</LINE>
+<LINE>The main consents are had; and here we'll stay</LINE>
+<LINE>To see our widower's second marriage-day.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Which better than the first, O dear heaven, bless!</LINE>
+<LINE>Or, ere they meet, in me, O nature, cesse!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Come on, my son, in whom my house's name</LINE>
+<LINE>Must be digested, give a favour from you</LINE>
+<LINE>To sparkle in the spirits of my daughter,</LINE>
+<LINE>That she may quickly come.</LINE>
+<STAGEDIR>BERTRAM gives a ring</STAGEDIR>
+<LINE>By my old beard,</LINE>
+<LINE>And every hair that's on't, Helen, that's dead,</LINE>
+<LINE>Was a sweet creature: such a ring as this,</LINE>
+<LINE>The last that e'er I took her at court,</LINE>
+<LINE>I saw upon her finger.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Hers it was not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Now, pray you, let me see it; for mine eye,</LINE>
+<LINE>While I was speaking, oft was fasten'd to't.</LINE>
+<LINE>This ring was mine; and, when I gave it Helen,</LINE>
+<LINE>I bade her, if her fortunes ever stood</LINE>
+<LINE>Necessitied to help, that by this token</LINE>
+<LINE>I would relieve her. Had you that craft, to reave</LINE>
+<LINE>her</LINE>
+<LINE>Of what should stead her most?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My gracious sovereign,</LINE>
+<LINE>Howe'er it pleases you to take it so,</LINE>
+<LINE>The ring was never hers.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Son, on my life,</LINE>
+<LINE>I have seen her wear it; and she reckon'd it</LINE>
+<LINE>At her life's rate.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I am sure I saw her wear it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>You are deceived, my lord; she never saw it:</LINE>
+<LINE>In Florence was it from a casement thrown me,</LINE>
+<LINE>Wrapp'd in a paper, which contain'd the name</LINE>
+<LINE>Of her that threw it: noble she was, and thought</LINE>
+<LINE>I stood engaged: but when I had subscribed</LINE>
+<LINE>To mine own fortune and inform'd her fully</LINE>
+<LINE>I could not answer in that course of honour</LINE>
+<LINE>As she had made the overture, she ceased</LINE>
+<LINE>In heavy satisfaction and would never</LINE>
+<LINE>Receive the ring again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Plutus himself,</LINE>
+<LINE>That knows the tinct and multiplying medicine,</LINE>
+<LINE>Hath not in nature's mystery more science</LINE>
+<LINE>Than I have in this ring: 'twas mine, 'twas Helen's,</LINE>
+<LINE>Whoever gave it you. Then, if you know</LINE>
+<LINE>That you are well acquainted with yourself,</LINE>
+<LINE>Confess 'twas hers, and by what rough enforcement</LINE>
+<LINE>You got it from her: she call'd the saints to surety</LINE>
+<LINE>That she would never put it from her finger,</LINE>
+<LINE>Unless she gave it to yourself in bed,</LINE>
+<LINE>Where you have never come, or sent it us</LINE>
+<LINE>Upon her great disaster.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>She never saw it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thou speak'st it falsely, as I love mine honour;</LINE>
+<LINE>And makest conjectural fears to come into me</LINE>
+<LINE>Which I would fain shut out. If it should prove</LINE>
+<LINE>That thou art so inhuman,--'twill not prove so;--</LINE>
+<LINE>And yet I know not: thou didst hate her deadly,</LINE>
+<LINE>And she is dead; which nothing, but to close</LINE>
+<LINE>Her eyes myself, could win me to believe,</LINE>
+<LINE>More than to see this ring. Take him away.</LINE>
+<STAGEDIR>Guards seize BERTRAM</STAGEDIR>
+<LINE>My fore-past proofs, howe'er the matter fall,</LINE>
+<LINE>Shall tax my fears of little vanity,</LINE>
+<LINE>Having vainly fear'd too little. Away with him!</LINE>
+<LINE>We'll sift this matter further.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>If you shall prove</LINE>
+<LINE>This ring was ever hers, you shall as easy</LINE>
+<LINE>Prove that I husbanded her bed in Florence,</LINE>
+<LINE>Where yet she never was.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit, guarded</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I am wrapp'd in dismal thinkings.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter a Gentleman</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>Gracious sovereign,</LINE>
+<LINE>Whether I have been to blame or no, I know not:</LINE>
+<LINE>Here's a petition from a Florentine,</LINE>
+<LINE>Who hath for four or five removes come short</LINE>
+<LINE>To tender it herself. I undertook it,</LINE>
+<LINE>Vanquish'd thereto by the fair grace and speech</LINE>
+<LINE>Of the poor suppliant, who by this I know</LINE>
+<LINE>Is here attending: her business looks in her</LINE>
+<LINE>With an importing visage; and she told me,</LINE>
+<LINE>In a sweet verbal brief, it did concern</LINE>
+<LINE>Your highness with herself.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  Upon his many protestations to marry me</LINE>
+<LINE>when his wife was dead, I blush to say it, he won</LINE>
+<LINE>me. Now is the Count Rousillon a widower: his vows</LINE>
+<LINE>are forfeited to me, and my honour's paid to him. He</LINE>
+<LINE>stole from Florence, taking no leave, and I follow</LINE>
+<LINE>him to his country for justice: grant it me, O</LINE>
+<LINE>king! in you it best lies; otherwise a seducer</LINE>
+<LINE>flourishes, and a poor maid is undone.</LINE>
+<LINE>DIANA CAPILET.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I will buy me a son-in-law in a fair, and toll for</LINE>
+<LINE>this: I'll none of him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>The heavens have thought well on thee Lafeu,</LINE>
+<LINE>To bring forth this discovery. Seek these suitors:</LINE>
+<LINE>Go speedily and bring again the count.</LINE>
+<LINE>I am afeard the life of Helen, lady,</LINE>
+<LINE>Was foully snatch'd.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Now, justice on the doers!</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter BERTRAM, guarded</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I wonder, sir, sith wives are monsters to you,</LINE>
+<LINE>And that you fly them as you swear them lordship,</LINE>
+<LINE>Yet you desire to marry.</LINE>
+<STAGEDIR>Enter Widow and DIANA</STAGEDIR>
+<LINE>What woman's that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I am, my lord, a wretched Florentine,</LINE>
+<LINE>Derived from the ancient Capilet:</LINE>
+<LINE>My suit, as I do understand, you know,</LINE>
+<LINE>And therefore know how far I may be pitied.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I am her mother, sir, whose age and honour</LINE>
+<LINE>Both suffer under this complaint we bring,</LINE>
+<LINE>And both shall cease, without your remedy.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Come hither, count; do you know these women?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My lord, I neither can nor will deny</LINE>
+<LINE>But that I know them: do they charge me further?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Why do you look so strange upon your wife?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>She's none of mine, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>If you shall marry,</LINE>
+<LINE>You give away this hand, and that is mine;</LINE>
+<LINE>You give away heaven's vows, and those are mine;</LINE>
+<LINE>You give away myself, which is known mine;</LINE>
+<LINE>For I by vow am so embodied yours,</LINE>
+<LINE>That she which marries you must marry me,</LINE>
+<LINE>Either both or none.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Your reputation comes too short for my daughter; you</LINE>
+<LINE>are no husband for her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My lord, this is a fond and desperate creature,</LINE>
+<LINE>Whom sometime I have laugh'd with: let your highness</LINE>
+<LINE>Lay a more noble thought upon mine honour</LINE>
+<LINE>Than for to think that I would sink it here.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Sir, for my thoughts, you have them ill to friend</LINE>
+<LINE>Till your deeds gain them: fairer prove your honour</LINE>
+<LINE>Than in my thought it lies.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Good my lord,</LINE>
+<LINE>Ask him upon his oath, if he does think</LINE>
+<LINE>He had not my virginity.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What say'st thou to her?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>She's impudent, my lord,</LINE>
+<LINE>And was a common gamester to the camp.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>He does me wrong, my lord; if I were so,</LINE>
+<LINE>He might have bought me at a common price:</LINE>
+<LINE>Do not believe him. O, behold this ring,</LINE>
+<LINE>Whose high respect and rich validity</LINE>
+<LINE>Did lack a parallel; yet for all that</LINE>
+<LINE>He gave it to a commoner o' the camp,</LINE>
+<LINE>If I be one.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>He blushes, and 'tis it:</LINE>
+<LINE>Of six preceding ancestors, that gem,</LINE>
+<LINE>Conferr'd by testament to the sequent issue,</LINE>
+<LINE>Hath it been owed and worn. This is his wife;</LINE>
+<LINE>That ring's a thousand proofs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Methought you said</LINE>
+<LINE>You saw one here in court could witness it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I did, my lord, but loath am to produce</LINE>
+<LINE>So bad an instrument: his name's Parolles.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I saw the man to-day, if man he be.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Find him, and bring him hither.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit an Attendant</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>What of him?</LINE>
+<LINE>He's quoted for a most perfidious slave,</LINE>
+<LINE>With all the spots o' the world tax'd and debosh'd;</LINE>
+<LINE>Whose nature sickens but to speak a truth.</LINE>
+<LINE>Am I or that or this for what he'll utter,</LINE>
+<LINE>That will speak any thing?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>She hath that ring of yours.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I think she has: certain it is I liked her,</LINE>
+<LINE>And boarded her i' the wanton way of youth:</LINE>
+<LINE>She knew her distance and did angle for me,</LINE>
+<LINE>Madding my eagerness with her restraint,</LINE>
+<LINE>As all impediments in fancy's course</LINE>
+<LINE>Are motives of more fancy; and, in fine,</LINE>
+<LINE>Her infinite cunning, with her modern grace,</LINE>
+<LINE>Subdued me to her rate: she got the ring;</LINE>
+<LINE>And I had that which any inferior might</LINE>
+<LINE>At market-price have bought.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I must be patient:</LINE>
+<LINE>You, that have turn'd off a first so noble wife,</LINE>
+<LINE>May justly diet me. I pray you yet;</LINE>
+<LINE>Since you lack virtue, I will lose a husband;</LINE>
+<LINE>Send for your ring, I will return it home,</LINE>
+<LINE>And give me mine again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I have it not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What ring was yours, I pray you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Sir, much like</LINE>
+<LINE>The same upon your finger.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Know you this ring? this ring was his of late.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>And this was it I gave him, being abed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>The story then goes false, you threw it him</LINE>
+<LINE>Out of a casement.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I have spoke the truth.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My lord, I do confess the ring was hers.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>You boggle shrewdly, every feather stars you.</LINE>
+<LINE>Is this the man you speak of?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Ay, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Tell me, sirrah, but tell me true, I charge you,</LINE>
+<LINE>Not fearing the displeasure of your master,</LINE>
+<LINE>Which on your just proceeding I'll keep off,</LINE>
+<LINE>By him and by this woman here what know you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>So please your majesty, my master hath been an</LINE>
+<LINE>honourable gentleman: tricks he hath had in him,</LINE>
+<LINE>which gentlemen have.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Come, come, to the purpose: did he love this woman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Faith, sir, he did love her; but how?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>How, I pray you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>He did love her, sir, as a gentleman loves a woman.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>How is that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>He loved her, sir, and loved her not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>As thou art a knave, and no knave. What an</LINE>
+<LINE>equivocal companion is this!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I am a poor man, and at your majesty's command.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He's a good drum, my lord, but a naughty orator.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Do you know he promised me marriage?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Faith, I know more than I'll speak.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>But wilt thou not speak all thou knowest?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Yes, so please your majesty. I did go between them,</LINE>
+<LINE>as I said; but more than that, he loved her: for</LINE>
+<LINE>indeed he was mad for her, and talked of Satan and</LINE>
+<LINE>of Limbo and of Furies and I know not what: yet I</LINE>
+<LINE>was in that credit with them at that time that I</LINE>
+<LINE>knew of their going to bed, and of other motions,</LINE>
+<LINE>as promising her marriage, and things which would</LINE>
+<LINE>derive me ill will to speak of; therefore I will not</LINE>
+<LINE>speak what I know.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thou hast spoken all already, unless thou canst say</LINE>
+<LINE>they are married: but thou art too fine in thy</LINE>
+<LINE>evidence; therefore stand aside.</LINE>
+<LINE>This ring, you say, was yours?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Ay, my good lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Where did you buy it? or who gave it you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>It was not given me, nor I did not buy it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Who lent it you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>It was not lent me neither.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Where did you find it, then?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I found it not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>If it were yours by none of all these ways,</LINE>
+<LINE>How could you give it him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I never gave it him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>This woman's an easy glove, my lord; she goes off</LINE>
+<LINE>and on at pleasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>This ring was mine; I gave it his first wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>It might be yours or hers, for aught I know.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Take her away; I do not like her now;</LINE>
+<LINE>To prison with her: and away with him.</LINE>
+<LINE>Unless thou tell'st me where thou hadst this ring,</LINE>
+<LINE>Thou diest within this hour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I'll never tell you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Take her away.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I'll put in bail, my liege.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I think thee now some common customer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>By Jove, if ever I knew man, 'twas you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Wherefore hast thou accused him all this while?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Because he's guilty, and he is not guilty:</LINE>
+<LINE>He knows I am no maid, and he'll swear to't;</LINE>
+<LINE>I'll swear I am a maid, and he knows not.</LINE>
+<LINE>Great king, I am no strumpet, by my life;</LINE>
+<LINE>I am either maid, or else this old man's wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>She does abuse our ears: to prison with her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Good mother, fetch my bail. Stay, royal sir:</LINE>
+<STAGEDIR>Exit Widow</STAGEDIR>
+<LINE>The jeweller that owes the ring is sent for,</LINE>
+<LINE>And he shall surety me. But for this lord,</LINE>
+<LINE>Who hath abused me, as he knows himself,</LINE>
+<LINE>Though yet he never harm'd me, here I quit him:</LINE>
+<LINE>He knows himself my bed he hath defiled;</LINE>
+<LINE>And at that time he got his wife with child:</LINE>
+<LINE>Dead though she be, she feels her young one kick:</LINE>
+<LINE>So there's my riddle: one that's dead is quick:</LINE>
+<LINE>And now behold the meaning.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter Widow, with HELENA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Is there no exorcist</LINE>
+<LINE>Beguiles the truer office of mine eyes?</LINE>
+<LINE>Is't real that I see?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>No, my good lord;</LINE>
+<LINE>'Tis but the shadow of a wife you see,</LINE>
+<LINE>The name and not the thing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Both, both. O, pardon!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>O my good lord, when I was like this maid,</LINE>
+<LINE>I found you wondrous kind. There is your ring;</LINE>
+<LINE>And, look you, here's your letter; this it says:</LINE>
+<LINE>'When from my finger you can get this ring</LINE>
+<LINE>And are by me with child,' &amp;c. This is done:</LINE>
+<LINE>Will you be mine, now you are doubly won?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>If she, my liege, can make me know this clearly,</LINE>
+<LINE>I'll love her dearly, ever, ever dearly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>If it appear not plain and prove untrue,</LINE>
+<LINE>Deadly divorce step between me and you!</LINE>
+<LINE>O my dear mother, do I see you living?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Mine eyes smell onions; I shall weep anon:</LINE>
+<STAGEDIR>To PAROLLES</STAGEDIR>
+<LINE>Good Tom Drum, lend me a handkercher: so,</LINE>
+<LINE>I thank thee: wait on me home, I'll make sport with thee:</LINE>
+<LINE>Let thy courtesies alone, they are scurvy ones.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Let us from point to point this story know,</LINE>
+<LINE>To make the even truth in pleasure flow.</LINE>
+<STAGEDIR>To DIANA</STAGEDIR>
+<LINE>If thou be'st yet a fresh uncropped flower,</LINE>
+<LINE>Choose thou thy husband, and I'll pay thy dower;</LINE>
+<LINE>For I can guess that by thy honest aid</LINE>
+<LINE>Thou keep'st a wife herself, thyself a maid.</LINE>
+<LINE>Of that and all the progress, more or less,</LINE>
+<LINE>Resolvedly more leisure shall express:</LINE>
+<LINE>All yet seems well; and if it end so meet,</LINE>
+<LINE>The bitter past, more welcome is the sweet.</LINE>
+</SPEECH>
+<STAGEDIR>Flourish</STAGEDIR>
+</SCENE>
+
+<EPILOGUE><TITLE>EPILOGUE</TITLE>
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>The king's a beggar, now the play is done:</LINE>
+<LINE>All is well ended, if this suit be won,</LINE>
+<LINE>That you express content; which we will pay,</LINE>
+<LINE>With strife to please you, day exceeding day:</LINE>
+<LINE>Ours be your patience then, and yours our parts;</LINE>
+<LINE>Your gentle hands lend us, and take our hearts.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</EPILOGUE>
+</ACT>
+</PLAY>
diff --git a/test/tests/perf/basic/basic-all_well.xsl b/test/tests/perf/basic/basic-all_well.xsl
new file mode 100644
index 0000000..f5a8015
--- /dev/null
+++ b/test/tests/perf/basic/basic-all_well.xsl
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>
+
+<!--<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+	<xsl:template match="/">
+		<html>
+			<head>
+				<title><xsl:value-of select="PLAY/TITLE" /></title>
+			</head>
+			<body>
+				<xsl:attribute name="style">
+					background-color: #000000;
+				</xsl:attribute>
+				<xsl:apply-templates />
+			</body>
+		</html>
+	</xsl:template>
+
+	<xsl:template match="PLAY">
+		<div>
+	 		<xsl:attribute name="style">
+	 			position: absolute;
+				width: 100%;
+	 			font-family: Arial;
+	 			font-size: 10pt;
+	 			color: #cc6600;
+	 		</xsl:attribute>
+	 		<xsl:apply-templates />
+		</div>
+	</xsl:template>
+
+	<xsl:template match="SCNDESCR">
+		<div>
+			<xsl:attribute name="style">
+				margin-bottom: 1em;
+				padding: 1px;
+				padding-left: 3em;
+				background-color: #cc6600;
+				color: #333333;
+			</xsl:attribute>
+			<xsl:value-of select="."/>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="PLAY/TITLE">
+		<div>
+			<xsl:attribute name="style">
+				padding: 2px;
+				padding-left: 1em;
+				font-size: 12pt;
+				background-color: #ff9900;
+				color: #000000;
+			</xsl:attribute>
+			<xsl:value-of select="."/>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="ACT/TITLE">
+		<div>
+			<xsl:attribute name="style">
+				text-align: right;
+			</xsl:attribute>
+			<span>
+				<xsl:attribute name="style">
+					width: 25%;
+					padding: 1px;
+					padding-right: 1em;
+					color: #000000;
+					background-color: #ff9900;
+				</xsl:attribute>
+				<xsl:value-of select="."/>
+			</span>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="SCENE | PROLOGUE">
+		<div>
+			<!--
+			<xsl:attribute name="id">act<xsl:eval>ancestorChildNumber('ACT',this)</xsl:eval>scene<xsl:eval>absoluteChildNumber(this)</xsl:eval></xsl:attribute>
+			-->
+			<xsl:apply-templates />
+		</div>
+	</xsl:template>
+
+	<xsl:template match="SCENE/TITLE">
+		<div>
+			<xsl:attribute name="style">
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			</xsl:attribute>
+			<xsl:value-of select="."/>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="PROLOGUE/TITLE">
+		<div>
+			<xsl:attribute name="style">
+				margin-bottom: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				background-color: #cc6600;
+				color: #000000;
+			</xsl:attribute>
+			<xsl:value-of select="."/>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="SPEAKER">
+		<div>
+			<xsl:attribute name="style">
+				color: #ff9900;
+			</xsl:attribute>
+			<xsl:value-of select="."/>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="LINE">
+		<div>
+			<xsl:attribute name="style">
+				margin-left: 3em;
+				color: #ccccff;
+			</xsl:attribute>
+			<xsl:value-of select="."/>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="STAGEDIR">
+		<div>
+			<xsl:attribute name="style">
+				position: relative;
+				width: 40%;
+				left: 50%;
+				text-align: right;
+				margin: 0.5em;
+				padding-right: 1em;
+				padding-left: 1em;
+				border-color: #ff9900;
+				border-width: 1px;
+				border-bottom-style: solid;
+				border-top-style: solid;
+				font-size: 9pt;
+				color: #9999cc;
+			</xsl:attribute>
+			<xsl:value-of select="."/>
+		</div>
+	</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/perf/basic/basic-datetranscode.xml b/test/tests/perf/basic/basic-datetranscode.xml
new file mode 100644
index 0000000..1a001e7
--- /dev/null
+++ b/test/tests/perf/basic/basic-datetranscode.xml
@@ -0,0 +1,1004 @@
+<doc>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+<date>13 January 1974</date>
+<date>14 January 1974</date>
+<date>1 February 1974</date>
+<date>2 March 1974</date>
+<date>3 April 1974</date>
+<date>4 May 1974</date>
+<date>5 June 1974</date>
+<date>6 July 1974</date>
+<date>7 August 1974</date>
+<date>8 September 1974</date>
+<date>9 October 1974</date>
+<date>10 November 1974</date>
+<date>11 December 1974</date>
+<date>14 January 1975</date>
+<date>1 February 1976</date>
+<date>2 March 1977</date>
+<date>3 April 1978</date>
+<date>4 May 1979</date>
+<date>5 June 1980</date>
+<date>6 July 1981</date>
+<date>7 August 1982</date>
+<date>8 September 1983</date>
+<date>9 October 1984</date>
+<date>10 November 1985</date>
+<date>11 December 1986</date>
+<date>23 April 1999</date>
+<date>1 January 2000</date>
+<date>15 December 1944</date>
+<date>1 January 1974</date>
+<date>2 January 1974</date>
+<date>3 January 1974</date>
+<date>4 January 1974</date>
+<date>5 January 1974</date>
+<date>6 January 1974</date>
+<date>7 January 1974</date>
+<date>8 January 1974</date>
+<date>9 January 1974</date>
+<date>10 January 1974</date>
+<date>11 January 1974</date>
+<date>12 January 1974</date>
+</doc>
+
+
diff --git a/test/tests/perf/basic/basic-datetranscode.xsl b/test/tests/perf/basic/basic-datetranscode.xsl
new file mode 100644
index 0000000..ab1af48
--- /dev/null
+++ b/test/tests/perf/basic/basic-datetranscode.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="html"/>
+<xsl:template match="doc">
+  <doc>
+    <xsl:for-each select="date">
+	    <xsl:variable name="Day" select="substring-before(.,' ')"/>
+    	<xsl:variable name="Month" select="substring-before(normalize-space(substring-after(., $Day)),' ')"/>
+	    <xsl:variable name="Year" select="normalize-space(substring-after(., $Month))"/>
+		<date orginal="{.}">
+		<day><xsl:value-of select="$Day"/></day>
+		<xsl:choose>
+		<xsl:when test="$Month='January'"><month>1</month></xsl:when>
+		<xsl:when test="$Month='February'"><month>2</month></xsl:when>
+		<xsl:when test="$Month='March'"><month>3</month></xsl:when>
+		<xsl:when test="$Month='April'"><month>4</month></xsl:when>
+		<xsl:when test="$Month='May'"><month>5</month></xsl:when>
+		<xsl:when test="$Month='June'"><month>6</month></xsl:when>
+		<xsl:when test="$Month='July'"><month>7</month></xsl:when>
+		<xsl:when test="$Month='August'"><month>8</month></xsl:when>
+		<xsl:when test="$Month='September'"><month>9</month></xsl:when>
+		<xsl:when test="$Month='October'"><month>10</month></xsl:when>
+		<xsl:when test="$Month='November'"><month>11</month></xsl:when>
+		<xsl:when test="$Month='December'"><month>12</month></xsl:when>
+		</xsl:choose>
+		<year><xsl:value-of select="$Year"/></year>
+		</date>
+    </xsl:for-each>
+  </doc>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/perf/output/outputHhref.xml b/test/tests/perf/output/outputHhref.xml
new file mode 100644
index 0000000..fb0d685
--- /dev/null
+++ b/test/tests/perf/output/outputHhref.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc>
+  <header>This is the title</header>
+  <list>
+    <item>ItemSpace 1</item>
+    <item>Item2</item>
+    <item>ItemTab	3</item>
+      <list>
+        <item>Item A</item>
+        <item>Item B</item>
+      </list>
+  </list>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/output/outputHhref.xsl b/test/tests/perf/output/outputHhref.xsl
new file mode 100644
index 0000000..7799656
--- /dev/null
+++ b/test/tests/perf/output/outputHhref.xsl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="ISO-8859-1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html"/>
+
+  <!-- Purpose: ESC of non-ASCII chars in URI attribute	values using method 
+       cited in Section B.2.1 of HTML 4.0 Spec. -->
+
+<xsl:template match="doc">
+  <html>
+  <head>
+    <title>
+      <xsl:value-of select="header"/>
+    </title>
+  </head>
+  <!-- Note the body/@background should be escaped as well, I think -->
+  <body background="file&apos;&#037;.gif">
+    <xsl:apply-templates select="list"/>
+  </body>
+  </html>
+</xsl:template>
+
+<xsl:template match="list">
+  <h1>List</h1>
+  <xsl:apply-templates select="list | item"/>
+</xsl:template>
+
+<!-- A simplistic template for testing performance of HTML escaping; 
+     vaguely like what you might see in real life.  Includes various 
+     avt's interspersed with escaped characters and one non-escaped 
+     attribute font/@color.
+-->
+<xsl:template match="item">
+  <br/>
+  spacer
+  
+    <p>1. "&amp;"  <A HREF="&amp;{.}"><xsl:copy-of select="text()"/></A></p>
+    <p>2. "&lt;"   <img src="&lt;"></img></p>
+    <p>3. "&gt;"   <IMG src="&gt;"></IMG></p>
+    <p>4. "&quot;" <img SRC="&quot;{text()}"/></p>
+    <p>5. "&apos;" <font color="&apos;"><xsl:copy-of select="text()"/></font></p>
+    <p>6. "&#169;" <a HREF="&#169;"><xsl:value-of select="text()"/></a></p>
+    <p>7. "&#035;" <A href='&amp;{{text()}}between&#035;after'>Note the amp-double-braces should be escaped differently</A></p>
+    <p>8. "&#165;" <A href="&#165;after"><xsl:value-of select="text()"/></A></p>
+    <p>9. "&#032;" <a href="before&#032;"><xsl:copy-of select="text()"/></a></p>
+    <p>10."&#037;" <IMG SRC="{.}&#037;"><xsl:value-of select="."/></IMG></p>
+    <p>11."&#009;" <A href="beforeand&#009;after">No value</A></p>
+    <p>12."&#127;" <A HREF="{.}&#127;after"><xsl:value-of select="."/></A></p>
+    <p>13."&#209;" <A href="&#209;">plain text</A></p>
+    <P>14."&#338;" <A href="&#338;">more plain text</A></P>
+</xsl:template>
+  
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/perf/sort/sort-big.xml b/test/tests/perf/sort/sort-big.xml
new file mode 100644
index 0000000..af4795f
--- /dev/null
+++ b/test/tests/perf/sort/sort-big.xml
@@ -0,0 +1,10005 @@
+<?xml version="1.0"?>
+<doc>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>XSLT-defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>ofL</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>to-help</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>onstrokes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>yourbody</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residetial</item>
+<item>exemption</item>
+<item>assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LawsL</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>trac</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>XML</item>
+</doc>
+
diff --git a/test/tests/perf/sort/sort-big.xsl b/test/tests/perf/sort/sort-big.xsl
new file mode 100644
index 0000000..37aaf4c
--- /dev/null
+++ b/test/tests/perf/sort/sort-big.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort lang="en-US"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/perf/sort/sort-numbers1.xsl b/test/tests/perf/sort/sort-numbers1.xsl
new file mode 100644
index 0000000..33db7cc
--- /dev/null
+++ b/test/tests/perf/sort/sort-numbers1.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort-numbers1 -->
+  <!-- Creator: David Marston -->
+  <!-- Purpose: performance test - sort the list of random numbers in a for-each -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="*">
+      <xsl:sort data-type="number" select="."/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/perf/sort/sort-words1.xsl b/test/tests/perf/sort/sort-words1.xsl
new file mode 100644
index 0000000..69176f0
--- /dev/null
+++ b/test/tests/perf/sort/sort-words1.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: sort-words1 -->
+  <!-- Creator: ? -->
+  <!-- Purpose: performance test - sort the big list of words (has repeating values) in a for-each -->
+
+<xsl:output method="xml" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="doc">
+  <out>
+    <xsl:for-each select="item">
+      <xsl:sort lang="en-US"/>
+      <xsl:copy-of select="."/><xsl:text>
+</xsl:text>
+    </xsl:for-each>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/perf/xtestdata/attr-lang.xml b/test/tests/perf/xtestdata/attr-lang.xml
new file mode 100644
index 0000000..02f722b
--- /dev/null
+++ b/test/tests/perf/xtestdata/attr-lang.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+<doc>
+  <p/>
+  <p xml:lang="en"/>
+  <p xml:lang="EN"/>
+  <p xml:lang="en-ca"/>
+  <p xml:lang="EN-CA"/>
+  <p xml:lang="en-gb"/>
+  <p xml:lang="EN-GB"/>
+  <p xml:lang="en-US"/>
+  <p xml:lang="EN-us"/>
+  <p xml:lang="TH"/>
+  <p xml:lang="pk"/>
+  <p xml:lang="JP"/>
+  <p xml:lang="fr"/>
+  <p xml:lang="FR"/>
+  <p xml:lang="fr-fr"/>
+  <p xml:lang="FR-FR"/>
+  <p xml:lang="fr-ca"/>
+  <p xml:lang="FR-CA"/>
+  <p xml:lang="fr-CF"/>
+  <p xml:lang="FR-cf"/>
+  <p xml:lang="UA"/>
+  <p xml:lang="it-it"/>
+  <span xml:lang="en">
+    <para>en</para>
+  </span>
+  <span xml:lang="en">
+    <div xml:lang="en-US">
+      <para>en-US</para>
+    </div>
+  </span>
+  <span xml:lang="en-US">
+    <para>en-US</para>
+  </span>
+  <span xml:lang="en-US">
+    <div xml:lang="en-CA">
+      <para>en-CA</para>
+    </div>
+  </span>
+  <span xml:lang="fr-CA">
+    <div xml:lang="en-CA">
+      <para>en-CA</para>
+    </div>
+  </span>
+  <span xml:lang="en-US">
+    <div xml:lang="en">
+      <para>en</para>
+    </div>
+  </span>
+  <span xml:lang="fr">
+    <div>
+      <div xml:lang="en-CA">
+        <para>en-CA</para>
+      </div>
+    </div>
+  </span>
+  <span xml:lang="fr-FR">
+    <div>
+      <div>
+        <para>fr-FR</para>
+      </div>
+    </div>
+  </span>
+  <span xml:lang="fr-CA">
+    <div xml:lang="en-CA">
+      <div>
+        <div>
+          <div>
+            <para>en-CA</para>
+          </div>
+        </div>
+      </div>
+    </div>
+  </span>
+  <span xml:lang="fr">
+    <div xml:lang="en-CA">
+      <div xml:lang="FR-FR">
+        <div xml:lang="it-IT">
+          <div xml:lang="en-US">
+            <para>en-US</para>
+          </div>
+        </div>
+      </div>
+    </div>
+  </span>
+  <span xml:lang="JP">
+    <div>
+      <div>
+        <div xml:lang="fr-CA">
+          <div>
+            <para>fr-CA</para>
+          </div>
+        </div>
+      </div>
+    </div>
+  </span>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/attr1k.xml b/test/tests/perf/xtestdata/attr1k.xml
new file mode 100644
index 0000000..a072302
--- /dev/null
+++ b/test/tests/perf/xtestdata/attr1k.xml
@@ -0,0 +1,1003 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<e1 a="1"/>
+<e2 a="2"/>
+<e3 a="3"/>
+<e4 a="4"/>
+<e5 a="5"/>
+<e6 a="6"/>
+<e7 a="7"/>
+<e8 a="8"/>
+<e9 a="9"/>
+<e10 a="10"/>
+<e11 a="11"/>
+<e12 a="12"/>
+<e13 a="13"/>
+<e14 a="14"/>
+<e15 a="15"/>
+<e16 a="16"/>
+<e17 a="17"/>
+<e18 a="18"/>
+<e19 a="19"/>
+<e20 a="20"/>
+<e21 a="21"/>
+<e22 a="22"/>
+<e23 a="23"/>
+<e24 a="24"/>
+<e25 a="25"/>
+<e26 a="26"/>
+<e27 a="27"/>
+<e28 a="28"/>
+<e29 a="29"/>
+<e30 a="30"/>
+<e31 a="31"/>
+<e32 a="32"/>
+<e33 a="33"/>
+<e34 a="34"/>
+<e35 a="35"/>
+<e36 a="36"/>
+<e37 a="37"/>
+<e38 a="38"/>
+<e39 a="39"/>
+<e40 a="40"/>
+<e41 a="41"/>
+<e42 a="42"/>
+<e43 a="43"/>
+<e44 a="44"/>
+<e45 a="45"/>
+<e46 a="46"/>
+<e47 a="47"/>
+<e48 a="48"/>
+<e49 a="49"/>
+<e50 a="50"/>
+<e51 a="51"/>
+<e52 a="52"/>
+<e53 a="53"/>
+<e54 a="54"/>
+<e55 a="55"/>
+<e56 a="56"/>
+<e57 a="57"/>
+<e58 a="58"/>
+<e59 a="59"/>
+<e60 a="60"/>
+<e61 a="61"/>
+<e62 a="62"/>
+<e63 a="63"/>
+<e64 a="64"/>
+<e65 a="65"/>
+<e66 a="66"/>
+<e67 a="67"/>
+<e68 a="68"/>
+<e69 a="69"/>
+<e70 a="70"/>
+<e71 a="71"/>
+<e72 a="72"/>
+<e73 a="73"/>
+<e74 a="74"/>
+<e75 a="75"/>
+<e76 a="76"/>
+<e77 a="77"/>
+<e78 a="78"/>
+<e79 a="79"/>
+<e80 a="80"/>
+<e81 a="81"/>
+<e82 a="82"/>
+<e83 a="83"/>
+<e84 a="84"/>
+<e85 a="85"/>
+<e86 a="86"/>
+<e87 a="87"/>
+<e88 a="88"/>
+<e89 a="89"/>
+<e90 a="90"/>
+<e91 a="91"/>
+<e92 a="92"/>
+<e93 a="93"/>
+<e94 a="94"/>
+<e95 a="95"/>
+<e96 a="96"/>
+<e97 a="97"/>
+<e98 a="98"/>
+<e99 a="99"/>
+<e100 a="100"/>
+<e101 a="101"/>
+<e102 a="102"/>
+<e103 a="103"/>
+<e104 a="104"/>
+<e105 a="105"/>
+<e106 a="106"/>
+<e107 a="107"/>
+<e108 a="108"/>
+<e109 a="109"/>
+<e110 a="110"/>
+<e111 a="111"/>
+<e112 a="112"/>
+<e113 a="113"/>
+<e114 a="114"/>
+<e115 a="115"/>
+<e116 a="116"/>
+<e117 a="117"/>
+<e118 a="118"/>
+<e119 a="119"/>
+<e120 a="120"/>
+<e121 a="121"/>
+<e122 a="122"/>
+<e123 a="123"/>
+<e124 a="124"/>
+<e125 a="125"/>
+<e126 a="126"/>
+<e127 a="127"/>
+<e128 a="128"/>
+<e129 a="129"/>
+<e130 a="130"/>
+<e131 a="131"/>
+<e132 a="132"/>
+<e133 a="133"/>
+<e134 a="134"/>
+<e135 a="135"/>
+<e136 a="136"/>
+<e137 a="137"/>
+<e138 a="138"/>
+<e139 a="139"/>
+<e140 a="140"/>
+<e141 a="141"/>
+<e142 a="142"/>
+<e143 a="143"/>
+<e144 a="144"/>
+<e145 a="145"/>
+<e146 a="146"/>
+<e147 a="147"/>
+<e148 a="148"/>
+<e149 a="149"/>
+<e150 a="150"/>
+<e151 a="151"/>
+<e152 a="152"/>
+<e153 a="153"/>
+<e154 a="154"/>
+<e155 a="155"/>
+<e156 a="156"/>
+<e157 a="157"/>
+<e158 a="158"/>
+<e159 a="159"/>
+<e160 a="160"/>
+<e161 a="161"/>
+<e162 a="162"/>
+<e163 a="163"/>
+<e164 a="164"/>
+<e165 a="165"/>
+<e166 a="166"/>
+<e167 a="167"/>
+<e168 a="168"/>
+<e169 a="169"/>
+<e170 a="170"/>
+<e171 a="171"/>
+<e172 a="172"/>
+<e173 a="173"/>
+<e174 a="174"/>
+<e175 a="175"/>
+<e176 a="176"/>
+<e177 a="177"/>
+<e178 a="178"/>
+<e179 a="179"/>
+<e180 a="180"/>
+<e181 a="181"/>
+<e182 a="182"/>
+<e183 a="183"/>
+<e184 a="184"/>
+<e185 a="185"/>
+<e186 a="186"/>
+<e187 a="187"/>
+<e188 a="188"/>
+<e189 a="189"/>
+<e190 a="190"/>
+<e191 a="191"/>
+<e192 a="192"/>
+<e193 a="193"/>
+<e194 a="194"/>
+<e195 a="195"/>
+<e196 a="196"/>
+<e197 a="197"/>
+<e198 a="198"/>
+<e199 a="199"/>
+<e200 a="200"/>
+<e201 a="201"/>
+<e202 a="202"/>
+<e203 a="203"/>
+<e204 a="204"/>
+<e205 a="205"/>
+<e206 a="206"/>
+<e207 a="207"/>
+<e208 a="208"/>
+<e209 a="209"/>
+<e210 a="210"/>
+<e211 a="211"/>
+<e212 a="212"/>
+<e213 a="213"/>
+<e214 a="214"/>
+<e215 a="215"/>
+<e216 a="216"/>
+<e217 a="217"/>
+<e218 a="218"/>
+<e219 a="219"/>
+<e220 a="220"/>
+<e221 a="221"/>
+<e222 a="222"/>
+<e223 a="223"/>
+<e224 a="224"/>
+<e225 a="225"/>
+<e226 a="226"/>
+<e227 a="227"/>
+<e228 a="228"/>
+<e229 a="229"/>
+<e230 a="230"/>
+<e231 a="231"/>
+<e232 a="232"/>
+<e233 a="233"/>
+<e234 a="234"/>
+<e235 a="235"/>
+<e236 a="236"/>
+<e237 a="237"/>
+<e238 a="238"/>
+<e239 a="239"/>
+<e240 a="240"/>
+<e241 a="241"/>
+<e242 a="242"/>
+<e243 a="243"/>
+<e244 a="244"/>
+<e245 a="245"/>
+<e246 a="246"/>
+<e247 a="247"/>
+<e248 a="248"/>
+<e249 a="249"/>
+<e250 a="250"/>
+<e251 a="251"/>
+<e252 a="252"/>
+<e253 a="253"/>
+<e254 a="254"/>
+<e255 a="255"/>
+<e256 a="256"/>
+<e257 a="257"/>
+<e258 a="258"/>
+<e259 a="259"/>
+<e260 a="260"/>
+<e261 a="261"/>
+<e262 a="262"/>
+<e263 a="263"/>
+<e264 a="264"/>
+<e265 a="265"/>
+<e266 a="266"/>
+<e267 a="267"/>
+<e268 a="268"/>
+<e269 a="269"/>
+<e270 a="270"/>
+<e271 a="271"/>
+<e272 a="272"/>
+<e273 a="273"/>
+<e274 a="274"/>
+<e275 a="275"/>
+<e276 a="276"/>
+<e277 a="277"/>
+<e278 a="278"/>
+<e279 a="279"/>
+<e280 a="280"/>
+<e281 a="281"/>
+<e282 a="282"/>
+<e283 a="283"/>
+<e284 a="284"/>
+<e285 a="285"/>
+<e286 a="286"/>
+<e287 a="287"/>
+<e288 a="288"/>
+<e289 a="289"/>
+<e290 a="290"/>
+<e291 a="291"/>
+<e292 a="292"/>
+<e293 a="293"/>
+<e294 a="294"/>
+<e295 a="295"/>
+<e296 a="296"/>
+<e297 a="297"/>
+<e298 a="298"/>
+<e299 a="299"/>
+<e300 a="300"/>
+<e301 a="301"/>
+<e302 a="302"/>
+<e303 a="303"/>
+<e304 a="304"/>
+<e305 a="305"/>
+<e306 a="306"/>
+<e307 a="307"/>
+<e308 a="308"/>
+<e309 a="309"/>
+<e310 a="310"/>
+<e311 a="311"/>
+<e312 a="312"/>
+<e313 a="313"/>
+<e314 a="314"/>
+<e315 a="315"/>
+<e316 a="316"/>
+<e317 a="317"/>
+<e318 a="318"/>
+<e319 a="319"/>
+<e320 a="320"/>
+<e321 a="321"/>
+<e322 a="322"/>
+<e323 a="323"/>
+<e324 a="324"/>
+<e325 a="325"/>
+<e326 a="326"/>
+<e327 a="327"/>
+<e328 a="328"/>
+<e329 a="329"/>
+<e330 a="330"/>
+<e331 a="331"/>
+<e332 a="332"/>
+<e333 a="333"/>
+<e334 a="334"/>
+<e335 a="335"/>
+<e336 a="336"/>
+<e337 a="337"/>
+<e338 a="338"/>
+<e339 a="339"/>
+<e340 a="340"/>
+<e341 a="341"/>
+<e342 a="342"/>
+<e343 a="343"/>
+<e344 a="344"/>
+<e345 a="345"/>
+<e346 a="346"/>
+<e347 a="347"/>
+<e348 a="348"/>
+<e349 a="349"/>
+<e350 a="350"/>
+<e351 a="351"/>
+<e352 a="352"/>
+<e353 a="353"/>
+<e354 a="354"/>
+<e355 a="355"/>
+<e356 a="356"/>
+<e357 a="357"/>
+<e358 a="358"/>
+<e359 a="359"/>
+<e360 a="360"/>
+<e361 a="361"/>
+<e362 a="362"/>
+<e363 a="363"/>
+<e364 a="364"/>
+<e365 a="365"/>
+<e366 a="366"/>
+<e367 a="367"/>
+<e368 a="368"/>
+<e369 a="369"/>
+<e370 a="370"/>
+<e371 a="371"/>
+<e372 a="372"/>
+<e373 a="373"/>
+<e374 a="374"/>
+<e375 a="375"/>
+<e376 a="376"/>
+<e377 a="377"/>
+<e378 a="378"/>
+<e379 a="379"/>
+<e380 a="380"/>
+<e381 a="381"/>
+<e382 a="382"/>
+<e383 a="383"/>
+<e384 a="384"/>
+<e385 a="385"/>
+<e386 a="386"/>
+<e387 a="387"/>
+<e388 a="388"/>
+<e389 a="389"/>
+<e390 a="390"/>
+<e391 a="391"/>
+<e392 a="392"/>
+<e393 a="393"/>
+<e394 a="394"/>
+<e395 a="395"/>
+<e396 a="396"/>
+<e397 a="397"/>
+<e398 a="398"/>
+<e399 a="399"/>
+<e400 a="400"/>
+<e401 a="401"/>
+<e402 a="402"/>
+<e403 a="403"/>
+<e404 a="404"/>
+<e405 a="405"/>
+<e406 a="406"/>
+<e407 a="407"/>
+<e408 a="408"/>
+<e409 a="409"/>
+<e410 a="410"/>
+<e411 a="411"/>
+<e412 a="412"/>
+<e413 a="413"/>
+<e414 a="414"/>
+<e415 a="415"/>
+<e416 a="416"/>
+<e417 a="417"/>
+<e418 a="418"/>
+<e419 a="419"/>
+<e420 a="420"/>
+<e421 a="421"/>
+<e422 a="422"/>
+<e423 a="423"/>
+<e424 a="424"/>
+<e425 a="425"/>
+<e426 a="426"/>
+<e427 a="427"/>
+<e428 a="428"/>
+<e429 a="429"/>
+<e430 a="430"/>
+<e431 a="431"/>
+<e432 a="432"/>
+<e433 a="433"/>
+<e434 a="434"/>
+<e435 a="435"/>
+<e436 a="436"/>
+<e437 a="437"/>
+<e438 a="438"/>
+<e439 a="439"/>
+<e440 a="440"/>
+<e441 a="441"/>
+<e442 a="442"/>
+<e443 a="443"/>
+<e444 a="444"/>
+<e445 a="445"/>
+<e446 a="446"/>
+<e447 a="447"/>
+<e448 a="448"/>
+<e449 a="449"/>
+<e450 a="450"/>
+<e451 a="451"/>
+<e452 a="452"/>
+<e453 a="453"/>
+<e454 a="454"/>
+<e455 a="455"/>
+<e456 a="456"/>
+<e457 a="457"/>
+<e458 a="458"/>
+<e459 a="459"/>
+<e460 a="460"/>
+<e461 a="461"/>
+<e462 a="462"/>
+<e463 a="463"/>
+<e464 a="464"/>
+<e465 a="465"/>
+<e466 a="466"/>
+<e467 a="467"/>
+<e468 a="468"/>
+<e469 a="469"/>
+<e470 a="470"/>
+<e471 a="471"/>
+<e472 a="472"/>
+<e473 a="473"/>
+<e474 a="474"/>
+<e475 a="475"/>
+<e476 a="476"/>
+<e477 a="477"/>
+<e478 a="478"/>
+<e479 a="479"/>
+<e480 a="480"/>
+<e481 a="481"/>
+<e482 a="482"/>
+<e483 a="483"/>
+<e484 a="484"/>
+<e485 a="485"/>
+<e486 a="486"/>
+<e487 a="487"/>
+<e488 a="488"/>
+<e489 a="489"/>
+<e490 a="490"/>
+<e491 a="491"/>
+<e492 a="492"/>
+<e493 a="493"/>
+<e494 a="494"/>
+<e495 a="495"/>
+<e496 a="496"/>
+<e497 a="497"/>
+<e498 a="498"/>
+<e499 a="499"/>
+<e500 a="500"/>
+<e501 a="501"/>
+<e502 a="502"/>
+<e503 a="503"/>
+<e504 a="504"/>
+<e505 a="505"/>
+<e506 a="506"/>
+<e507 a="507"/>
+<e508 a="508"/>
+<e509 a="509"/>
+<e510 a="510"/>
+<e511 a="511"/>
+<e512 a="512"/>
+<e513 a="513"/>
+<e514 a="514"/>
+<e515 a="515"/>
+<e516 a="516"/>
+<e517 a="517"/>
+<e518 a="518"/>
+<e519 a="519"/>
+<e520 a="520"/>
+<e521 a="521"/>
+<e522 a="522"/>
+<e523 a="523"/>
+<e524 a="524"/>
+<e525 a="525"/>
+<e526 a="526"/>
+<e527 a="527"/>
+<e528 a="528"/>
+<e529 a="529"/>
+<e530 a="530"/>
+<e531 a="531"/>
+<e532 a="532"/>
+<e533 a="533"/>
+<e534 a="534"/>
+<e535 a="535"/>
+<e536 a="536"/>
+<e537 a="537"/>
+<e538 a="538"/>
+<e539 a="539"/>
+<e540 a="540"/>
+<e541 a="541"/>
+<e542 a="542"/>
+<e543 a="543"/>
+<e544 a="544"/>
+<e545 a="545"/>
+<e546 a="546"/>
+<e547 a="547"/>
+<e548 a="548"/>
+<e549 a="549"/>
+<e550 a="550"/>
+<e551 a="551"/>
+<e552 a="552"/>
+<e553 a="553"/>
+<e554 a="554"/>
+<e555 a="555"/>
+<e556 a="556"/>
+<e557 a="557"/>
+<e558 a="558"/>
+<e559 a="559"/>
+<e560 a="560"/>
+<e561 a="561"/>
+<e562 a="562"/>
+<e563 a="563"/>
+<e564 a="564"/>
+<e565 a="565"/>
+<e566 a="566"/>
+<e567 a="567"/>
+<e568 a="568"/>
+<e569 a="569"/>
+<e570 a="570"/>
+<e571 a="571"/>
+<e572 a="572"/>
+<e573 a="573"/>
+<e574 a="574"/>
+<e575 a="575"/>
+<e576 a="576"/>
+<e577 a="577"/>
+<e578 a="578"/>
+<e579 a="579"/>
+<e580 a="580"/>
+<e581 a="581"/>
+<e582 a="582"/>
+<e583 a="583"/>
+<e584 a="584"/>
+<e585 a="585"/>
+<e586 a="586"/>
+<e587 a="587"/>
+<e588 a="588"/>
+<e589 a="589"/>
+<e590 a="590"/>
+<e591 a="591"/>
+<e592 a="592"/>
+<e593 a="593"/>
+<e594 a="594"/>
+<e595 a="595"/>
+<e596 a="596"/>
+<e597 a="597"/>
+<e598 a="598"/>
+<e599 a="599"/>
+<e600 a="600"/>
+<e601 a="601"/>
+<e602 a="602"/>
+<e603 a="603"/>
+<e604 a="604"/>
+<e605 a="605"/>
+<e606 a="606"/>
+<e607 a="607"/>
+<e608 a="608"/>
+<e609 a="609"/>
+<e610 a="610"/>
+<e611 a="611"/>
+<e612 a="612"/>
+<e613 a="613"/>
+<e614 a="614"/>
+<e615 a="615"/>
+<e616 a="616"/>
+<e617 a="617"/>
+<e618 a="618"/>
+<e619 a="619"/>
+<e620 a="620"/>
+<e621 a="621"/>
+<e622 a="622"/>
+<e623 a="623"/>
+<e624 a="624"/>
+<e625 a="625"/>
+<e626 a="626"/>
+<e627 a="627"/>
+<e628 a="628"/>
+<e629 a="629"/>
+<e630 a="630"/>
+<e631 a="631"/>
+<e632 a="632"/>
+<e633 a="633"/>
+<e634 a="634"/>
+<e635 a="635"/>
+<e636 a="636"/>
+<e637 a="637"/>
+<e638 a="638"/>
+<e639 a="639"/>
+<e640 a="640"/>
+<e641 a="641"/>
+<e642 a="642"/>
+<e643 a="643"/>
+<e644 a="644"/>
+<e645 a="645"/>
+<e646 a="646"/>
+<e647 a="647"/>
+<e648 a="648"/>
+<e649 a="649"/>
+<e650 a="650"/>
+<e651 a="651"/>
+<e652 a="652"/>
+<e653 a="653"/>
+<e654 a="654"/>
+<e655 a="655"/>
+<e656 a="656"/>
+<e657 a="657"/>
+<e658 a="658"/>
+<e659 a="659"/>
+<e660 a="660"/>
+<e661 a="661"/>
+<e662 a="662"/>
+<e663 a="663"/>
+<e664 a="664"/>
+<e665 a="665"/>
+<e666 a="666"/>
+<e667 a="667"/>
+<e668 a="668"/>
+<e669 a="669"/>
+<e670 a="670"/>
+<e671 a="671"/>
+<e672 a="672"/>
+<e673 a="673"/>
+<e674 a="674"/>
+<e675 a="675"/>
+<e676 a="676"/>
+<e677 a="677"/>
+<e678 a="678"/>
+<e679 a="679"/>
+<e680 a="680"/>
+<e681 a="681"/>
+<e682 a="682"/>
+<e683 a="683"/>
+<e684 a="684"/>
+<e685 a="685"/>
+<e686 a="686"/>
+<e687 a="687"/>
+<e688 a="688"/>
+<e689 a="689"/>
+<e690 a="690"/>
+<e691 a="691"/>
+<e692 a="692"/>
+<e693 a="693"/>
+<e694 a="694"/>
+<e695 a="695"/>
+<e696 a="696"/>
+<e697 a="697"/>
+<e698 a="698"/>
+<e699 a="699"/>
+<e700 a="700"/>
+<e701 a="701"/>
+<e702 a="702"/>
+<e703 a="703"/>
+<e704 a="704"/>
+<e705 a="705"/>
+<e706 a="706"/>
+<e707 a="707"/>
+<e708 a="708"/>
+<e709 a="709"/>
+<e710 a="710"/>
+<e711 a="711"/>
+<e712 a="712"/>
+<e713 a="713"/>
+<e714 a="714"/>
+<e715 a="715"/>
+<e716 a="716"/>
+<e717 a="717"/>
+<e718 a="718"/>
+<e719 a="719"/>
+<e720 a="720"/>
+<e721 a="721"/>
+<e722 a="722"/>
+<e723 a="723"/>
+<e724 a="724"/>
+<e725 a="725"/>
+<e726 a="726"/>
+<e727 a="727"/>
+<e728 a="728"/>
+<e729 a="729"/>
+<e730 a="730"/>
+<e731 a="731"/>
+<e732 a="732"/>
+<e733 a="733"/>
+<e734 a="734"/>
+<e735 a="735"/>
+<e736 a="736"/>
+<e737 a="737"/>
+<e738 a="738"/>
+<e739 a="739"/>
+<e740 a="740"/>
+<e741 a="741"/>
+<e742 a="742"/>
+<e743 a="743"/>
+<e744 a="744"/>
+<e745 a="745"/>
+<e746 a="746"/>
+<e747 a="747"/>
+<e748 a="748"/>
+<e749 a="749"/>
+<e750 a="750"/>
+<e751 a="751"/>
+<e752 a="752"/>
+<e753 a="753"/>
+<e754 a="754"/>
+<e755 a="755"/>
+<e756 a="756"/>
+<e757 a="757"/>
+<e758 a="758"/>
+<e759 a="759"/>
+<e760 a="760"/>
+<e761 a="761"/>
+<e762 a="762"/>
+<e763 a="763"/>
+<e764 a="764"/>
+<e765 a="765"/>
+<e766 a="766"/>
+<e767 a="767"/>
+<e768 a="768"/>
+<e769 a="769"/>
+<e770 a="770"/>
+<e771 a="771"/>
+<e772 a="772"/>
+<e773 a="773"/>
+<e774 a="774"/>
+<e775 a="775"/>
+<e776 a="776"/>
+<e777 a="777"/>
+<e778 a="778"/>
+<e779 a="779"/>
+<e780 a="780"/>
+<e781 a="781"/>
+<e782 a="782"/>
+<e783 a="783"/>
+<e784 a="784"/>
+<e785 a="785"/>
+<e786 a="786"/>
+<e787 a="787"/>
+<e788 a="788"/>
+<e789 a="789"/>
+<e790 a="790"/>
+<e791 a="791"/>
+<e792 a="792"/>
+<e793 a="793"/>
+<e794 a="794"/>
+<e795 a="795"/>
+<e796 a="796"/>
+<e797 a="797"/>
+<e798 a="798"/>
+<e799 a="799"/>
+<e800 a="800"/>
+<e801 a="801"/>
+<e802 a="802"/>
+<e803 a="803"/>
+<e804 a="804"/>
+<e805 a="805"/>
+<e806 a="806"/>
+<e807 a="807"/>
+<e808 a="808"/>
+<e809 a="809"/>
+<e810 a="810"/>
+<e811 a="811"/>
+<e812 a="812"/>
+<e813 a="813"/>
+<e814 a="814"/>
+<e815 a="815"/>
+<e816 a="816"/>
+<e817 a="817"/>
+<e818 a="818"/>
+<e819 a="819"/>
+<e820 a="820"/>
+<e821 a="821"/>
+<e822 a="822"/>
+<e823 a="823"/>
+<e824 a="824"/>
+<e825 a="825"/>
+<e826 a="826"/>
+<e827 a="827"/>
+<e828 a="828"/>
+<e829 a="829"/>
+<e830 a="830"/>
+<e831 a="831"/>
+<e832 a="832"/>
+<e833 a="833"/>
+<e834 a="834"/>
+<e835 a="835"/>
+<e836 a="836"/>
+<e837 a="837"/>
+<e838 a="838"/>
+<e839 a="839"/>
+<e840 a="840"/>
+<e841 a="841"/>
+<e842 a="842"/>
+<e843 a="843"/>
+<e844 a="844"/>
+<e845 a="845"/>
+<e846 a="846"/>
+<e847 a="847"/>
+<e848 a="848"/>
+<e849 a="849"/>
+<e850 a="850"/>
+<e851 a="851"/>
+<e852 a="852"/>
+<e853 a="853"/>
+<e854 a="854"/>
+<e855 a="855"/>
+<e856 a="856"/>
+<e857 a="857"/>
+<e858 a="858"/>
+<e859 a="859"/>
+<e860 a="860"/>
+<e861 a="861"/>
+<e862 a="862"/>
+<e863 a="863"/>
+<e864 a="864"/>
+<e865 a="865"/>
+<e866 a="866"/>
+<e867 a="867"/>
+<e868 a="868"/>
+<e869 a="869"/>
+<e870 a="870"/>
+<e871 a="871"/>
+<e872 a="872"/>
+<e873 a="873"/>
+<e874 a="874"/>
+<e875 a="875"/>
+<e876 a="876"/>
+<e877 a="877"/>
+<e878 a="878"/>
+<e879 a="879"/>
+<e880 a="880"/>
+<e881 a="881"/>
+<e882 a="882"/>
+<e883 a="883"/>
+<e884 a="884"/>
+<e885 a="885"/>
+<e886 a="886"/>
+<e887 a="887"/>
+<e888 a="888"/>
+<e889 a="889"/>
+<e890 a="890"/>
+<e891 a="891"/>
+<e892 a="892"/>
+<e893 a="893"/>
+<e894 a="894"/>
+<e895 a="895"/>
+<e896 a="896"/>
+<e897 a="897"/>
+<e898 a="898"/>
+<e899 a="899"/>
+<e900 a="900"/>
+<e901 a="901"/>
+<e902 a="902"/>
+<e903 a="903"/>
+<e904 a="904"/>
+<e905 a="905"/>
+<e906 a="906"/>
+<e907 a="907"/>
+<e908 a="908"/>
+<e909 a="909"/>
+<e910 a="910"/>
+<e911 a="911"/>
+<e912 a="912"/>
+<e913 a="913"/>
+<e914 a="914"/>
+<e915 a="915"/>
+<e916 a="916"/>
+<e917 a="917"/>
+<e918 a="918"/>
+<e919 a="919"/>
+<e920 a="920"/>
+<e921 a="921"/>
+<e922 a="922"/>
+<e923 a="923"/>
+<e924 a="924"/>
+<e925 a="925"/>
+<e926 a="926"/>
+<e927 a="927"/>
+<e928 a="928"/>
+<e929 a="929"/>
+<e930 a="930"/>
+<e931 a="931"/>
+<e932 a="932"/>
+<e933 a="933"/>
+<e934 a="934"/>
+<e935 a="935"/>
+<e936 a="936"/>
+<e937 a="937"/>
+<e938 a="938"/>
+<e939 a="939"/>
+<e940 a="940"/>
+<e941 a="941"/>
+<e942 a="942"/>
+<e943 a="943"/>
+<e944 a="944"/>
+<e945 a="945"/>
+<e946 a="946"/>
+<e947 a="947"/>
+<e948 a="948"/>
+<e949 a="949"/>
+<e950 a="950"/>
+<e951 a="951"/>
+<e952 a="952"/>
+<e953 a="953"/>
+<e954 a="954"/>
+<e955 a="955"/>
+<e956 a="956"/>
+<e957 a="957"/>
+<e958 a="958"/>
+<e959 a="959"/>
+<e960 a="960"/>
+<e961 a="961"/>
+<e962 a="962"/>
+<e963 a="963"/>
+<e964 a="964"/>
+<e965 a="965"/>
+<e966 a="966"/>
+<e967 a="967"/>
+<e968 a="968"/>
+<e969 a="969"/>
+<e970 a="970"/>
+<e971 a="971"/>
+<e972 a="972"/>
+<e973 a="973"/>
+<e974 a="974"/>
+<e975 a="975"/>
+<e976 a="976"/>
+<e977 a="977"/>
+<e978 a="978"/>
+<e979 a="979"/>
+<e980 a="980"/>
+<e981 a="981"/>
+<e982 a="982"/>
+<e983 a="983"/>
+<e984 a="984"/>
+<e985 a="985"/>
+<e986 a="986"/>
+<e987 a="987"/>
+<e988 a="988"/>
+<e989 a="989"/>
+<e990 a="990"/>
+<e991 a="991"/>
+<e992 a="992"/>
+<e993 a="993"/>
+<e994 a="994"/>
+<e995 a="995"/>
+<e996 a="996"/>
+<e997 a="997"/>
+<e998 a="998"/>
+<e999 a="999"/>
+<e1000 a="1000"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/comment1k.xml b/test/tests/perf/xtestdata/comment1k.xml
new file mode 100644
index 0000000..40ed556
--- /dev/null
+++ b/test/tests/perf/xtestdata/comment1k.xml
@@ -0,0 +1,1003 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<!--comment number 1 -->
+<!--comment number 2 -->
+<!--comment number 3 -->
+<!--comment number 4 -->
+<!--comment number 5 -->
+<!--comment number 6 -->
+<!--comment number 7 -->
+<!--comment number 8 -->
+<!--comment number 9 -->
+<!--comment number 10 -->
+<!--comment number 11 -->
+<!--comment number 12 -->
+<!--comment number 13 -->
+<!--comment number 14 -->
+<!--comment number 15 -->
+<!--comment number 16 -->
+<!--comment number 17 -->
+<!--comment number 18 -->
+<!--comment number 19 -->
+<!--comment number 20 -->
+<!--comment number 21 -->
+<!--comment number 22 -->
+<!--comment number 23 -->
+<!--comment number 24 -->
+<!--comment number 25 -->
+<!--comment number 26 -->
+<!--comment number 27 -->
+<!--comment number 28 -->
+<!--comment number 29 -->
+<!--comment number 30 -->
+<!--comment number 31 -->
+<!--comment number 32 -->
+<!--comment number 33 -->
+<!--comment number 34 -->
+<!--comment number 35 -->
+<!--comment number 36 -->
+<!--comment number 37 -->
+<!--comment number 38 -->
+<!--comment number 39 -->
+<!--comment number 40 -->
+<!--comment number 41 -->
+<!--comment number 42 -->
+<!--comment number 43 -->
+<!--comment number 44 -->
+<!--comment number 45 -->
+<!--comment number 46 -->
+<!--comment number 47 -->
+<!--comment number 48 -->
+<!--comment number 49 -->
+<!--comment number 50 -->
+<!--comment number 51 -->
+<!--comment number 52 -->
+<!--comment number 53 -->
+<!--comment number 54 -->
+<!--comment number 55 -->
+<!--comment number 56 -->
+<!--comment number 57 -->
+<!--comment number 58 -->
+<!--comment number 59 -->
+<!--comment number 60 -->
+<!--comment number 61 -->
+<!--comment number 62 -->
+<!--comment number 63 -->
+<!--comment number 64 -->
+<!--comment number 65 -->
+<!--comment number 66 -->
+<!--comment number 67 -->
+<!--comment number 68 -->
+<!--comment number 69 -->
+<!--comment number 70 -->
+<!--comment number 71 -->
+<!--comment number 72 -->
+<!--comment number 73 -->
+<!--comment number 74 -->
+<!--comment number 75 -->
+<!--comment number 76 -->
+<!--comment number 77 -->
+<!--comment number 78 -->
+<!--comment number 79 -->
+<!--comment number 80 -->
+<!--comment number 81 -->
+<!--comment number 82 -->
+<!--comment number 83 -->
+<!--comment number 84 -->
+<!--comment number 85 -->
+<!--comment number 86 -->
+<!--comment number 87 -->
+<!--comment number 88 -->
+<!--comment number 89 -->
+<!--comment number 90 -->
+<!--comment number 91 -->
+<!--comment number 92 -->
+<!--comment number 93 -->
+<!--comment number 94 -->
+<!--comment number 95 -->
+<!--comment number 96 -->
+<!--comment number 97 -->
+<!--comment number 98 -->
+<!--comment number 99 -->
+<!--comment number 100 -->
+<!--comment number 101 -->
+<!--comment number 102 -->
+<!--comment number 103 -->
+<!--comment number 104 -->
+<!--comment number 105 -->
+<!--comment number 106 -->
+<!--comment number 107 -->
+<!--comment number 108 -->
+<!--comment number 109 -->
+<!--comment number 110 -->
+<!--comment number 111 -->
+<!--comment number 112 -->
+<!--comment number 113 -->
+<!--comment number 114 -->
+<!--comment number 115 -->
+<!--comment number 116 -->
+<!--comment number 117 -->
+<!--comment number 118 -->
+<!--comment number 119 -->
+<!--comment number 120 -->
+<!--comment number 121 -->
+<!--comment number 122 -->
+<!--comment number 123 -->
+<!--comment number 124 -->
+<!--comment number 125 -->
+<!--comment number 126 -->
+<!--comment number 127 -->
+<!--comment number 128 -->
+<!--comment number 129 -->
+<!--comment number 130 -->
+<!--comment number 131 -->
+<!--comment number 132 -->
+<!--comment number 133 -->
+<!--comment number 134 -->
+<!--comment number 135 -->
+<!--comment number 136 -->
+<!--comment number 137 -->
+<!--comment number 138 -->
+<!--comment number 139 -->
+<!--comment number 140 -->
+<!--comment number 141 -->
+<!--comment number 142 -->
+<!--comment number 143 -->
+<!--comment number 144 -->
+<!--comment number 145 -->
+<!--comment number 146 -->
+<!--comment number 147 -->
+<!--comment number 148 -->
+<!--comment number 149 -->
+<!--comment number 150 -->
+<!--comment number 151 -->
+<!--comment number 152 -->
+<!--comment number 153 -->
+<!--comment number 154 -->
+<!--comment number 155 -->
+<!--comment number 156 -->
+<!--comment number 157 -->
+<!--comment number 158 -->
+<!--comment number 159 -->
+<!--comment number 160 -->
+<!--comment number 161 -->
+<!--comment number 162 -->
+<!--comment number 163 -->
+<!--comment number 164 -->
+<!--comment number 165 -->
+<!--comment number 166 -->
+<!--comment number 167 -->
+<!--comment number 168 -->
+<!--comment number 169 -->
+<!--comment number 170 -->
+<!--comment number 171 -->
+<!--comment number 172 -->
+<!--comment number 173 -->
+<!--comment number 174 -->
+<!--comment number 175 -->
+<!--comment number 176 -->
+<!--comment number 177 -->
+<!--comment number 178 -->
+<!--comment number 179 -->
+<!--comment number 180 -->
+<!--comment number 181 -->
+<!--comment number 182 -->
+<!--comment number 183 -->
+<!--comment number 184 -->
+<!--comment number 185 -->
+<!--comment number 186 -->
+<!--comment number 187 -->
+<!--comment number 188 -->
+<!--comment number 189 -->
+<!--comment number 190 -->
+<!--comment number 191 -->
+<!--comment number 192 -->
+<!--comment number 193 -->
+<!--comment number 194 -->
+<!--comment number 195 -->
+<!--comment number 196 -->
+<!--comment number 197 -->
+<!--comment number 198 -->
+<!--comment number 199 -->
+<!--comment number 200 -->
+<!--comment number 201 -->
+<!--comment number 202 -->
+<!--comment number 203 -->
+<!--comment number 204 -->
+<!--comment number 205 -->
+<!--comment number 206 -->
+<!--comment number 207 -->
+<!--comment number 208 -->
+<!--comment number 209 -->
+<!--comment number 210 -->
+<!--comment number 211 -->
+<!--comment number 212 -->
+<!--comment number 213 -->
+<!--comment number 214 -->
+<!--comment number 215 -->
+<!--comment number 216 -->
+<!--comment number 217 -->
+<!--comment number 218 -->
+<!--comment number 219 -->
+<!--comment number 220 -->
+<!--comment number 221 -->
+<!--comment number 222 -->
+<!--comment number 223 -->
+<!--comment number 224 -->
+<!--comment number 225 -->
+<!--comment number 226 -->
+<!--comment number 227 -->
+<!--comment number 228 -->
+<!--comment number 229 -->
+<!--comment number 230 -->
+<!--comment number 231 -->
+<!--comment number 232 -->
+<!--comment number 233 -->
+<!--comment number 234 -->
+<!--comment number 235 -->
+<!--comment number 236 -->
+<!--comment number 237 -->
+<!--comment number 238 -->
+<!--comment number 239 -->
+<!--comment number 240 -->
+<!--comment number 241 -->
+<!--comment number 242 -->
+<!--comment number 243 -->
+<!--comment number 244 -->
+<!--comment number 245 -->
+<!--comment number 246 -->
+<!--comment number 247 -->
+<!--comment number 248 -->
+<!--comment number 249 -->
+<!--comment number 250 -->
+<!--comment number 251 -->
+<!--comment number 252 -->
+<!--comment number 253 -->
+<!--comment number 254 -->
+<!--comment number 255 -->
+<!--comment number 256 -->
+<!--comment number 257 -->
+<!--comment number 258 -->
+<!--comment number 259 -->
+<!--comment number 260 -->
+<!--comment number 261 -->
+<!--comment number 262 -->
+<!--comment number 263 -->
+<!--comment number 264 -->
+<!--comment number 265 -->
+<!--comment number 266 -->
+<!--comment number 267 -->
+<!--comment number 268 -->
+<!--comment number 269 -->
+<!--comment number 270 -->
+<!--comment number 271 -->
+<!--comment number 272 -->
+<!--comment number 273 -->
+<!--comment number 274 -->
+<!--comment number 275 -->
+<!--comment number 276 -->
+<!--comment number 277 -->
+<!--comment number 278 -->
+<!--comment number 279 -->
+<!--comment number 280 -->
+<!--comment number 281 -->
+<!--comment number 282 -->
+<!--comment number 283 -->
+<!--comment number 284 -->
+<!--comment number 285 -->
+<!--comment number 286 -->
+<!--comment number 287 -->
+<!--comment number 288 -->
+<!--comment number 289 -->
+<!--comment number 290 -->
+<!--comment number 291 -->
+<!--comment number 292 -->
+<!--comment number 293 -->
+<!--comment number 294 -->
+<!--comment number 295 -->
+<!--comment number 296 -->
+<!--comment number 297 -->
+<!--comment number 298 -->
+<!--comment number 299 -->
+<!--comment number 300 -->
+<!--comment number 301 -->
+<!--comment number 302 -->
+<!--comment number 303 -->
+<!--comment number 304 -->
+<!--comment number 305 -->
+<!--comment number 306 -->
+<!--comment number 307 -->
+<!--comment number 308 -->
+<!--comment number 309 -->
+<!--comment number 310 -->
+<!--comment number 311 -->
+<!--comment number 312 -->
+<!--comment number 313 -->
+<!--comment number 314 -->
+<!--comment number 315 -->
+<!--comment number 316 -->
+<!--comment number 317 -->
+<!--comment number 318 -->
+<!--comment number 319 -->
+<!--comment number 320 -->
+<!--comment number 321 -->
+<!--comment number 322 -->
+<!--comment number 323 -->
+<!--comment number 324 -->
+<!--comment number 325 -->
+<!--comment number 326 -->
+<!--comment number 327 -->
+<!--comment number 328 -->
+<!--comment number 329 -->
+<!--comment number 330 -->
+<!--comment number 331 -->
+<!--comment number 332 -->
+<!--comment number 333 -->
+<!--comment number 334 -->
+<!--comment number 335 -->
+<!--comment number 336 -->
+<!--comment number 337 -->
+<!--comment number 338 -->
+<!--comment number 339 -->
+<!--comment number 340 -->
+<!--comment number 341 -->
+<!--comment number 342 -->
+<!--comment number 343 -->
+<!--comment number 344 -->
+<!--comment number 345 -->
+<!--comment number 346 -->
+<!--comment number 347 -->
+<!--comment number 348 -->
+<!--comment number 349 -->
+<!--comment number 350 -->
+<!--comment number 351 -->
+<!--comment number 352 -->
+<!--comment number 353 -->
+<!--comment number 354 -->
+<!--comment number 355 -->
+<!--comment number 356 -->
+<!--comment number 357 -->
+<!--comment number 358 -->
+<!--comment number 359 -->
+<!--comment number 360 -->
+<!--comment number 361 -->
+<!--comment number 362 -->
+<!--comment number 363 -->
+<!--comment number 364 -->
+<!--comment number 365 -->
+<!--comment number 366 -->
+<!--comment number 367 -->
+<!--comment number 368 -->
+<!--comment number 369 -->
+<!--comment number 370 -->
+<!--comment number 371 -->
+<!--comment number 372 -->
+<!--comment number 373 -->
+<!--comment number 374 -->
+<!--comment number 375 -->
+<!--comment number 376 -->
+<!--comment number 377 -->
+<!--comment number 378 -->
+<!--comment number 379 -->
+<!--comment number 380 -->
+<!--comment number 381 -->
+<!--comment number 382 -->
+<!--comment number 383 -->
+<!--comment number 384 -->
+<!--comment number 385 -->
+<!--comment number 386 -->
+<!--comment number 387 -->
+<!--comment number 388 -->
+<!--comment number 389 -->
+<!--comment number 390 -->
+<!--comment number 391 -->
+<!--comment number 392 -->
+<!--comment number 393 -->
+<!--comment number 394 -->
+<!--comment number 395 -->
+<!--comment number 396 -->
+<!--comment number 397 -->
+<!--comment number 398 -->
+<!--comment number 399 -->
+<!--comment number 400 -->
+<!--comment number 401 -->
+<!--comment number 402 -->
+<!--comment number 403 -->
+<!--comment number 404 -->
+<!--comment number 405 -->
+<!--comment number 406 -->
+<!--comment number 407 -->
+<!--comment number 408 -->
+<!--comment number 409 -->
+<!--comment number 410 -->
+<!--comment number 411 -->
+<!--comment number 412 -->
+<!--comment number 413 -->
+<!--comment number 414 -->
+<!--comment number 415 -->
+<!--comment number 416 -->
+<!--comment number 417 -->
+<!--comment number 418 -->
+<!--comment number 419 -->
+<!--comment number 420 -->
+<!--comment number 421 -->
+<!--comment number 422 -->
+<!--comment number 423 -->
+<!--comment number 424 -->
+<!--comment number 425 -->
+<!--comment number 426 -->
+<!--comment number 427 -->
+<!--comment number 428 -->
+<!--comment number 429 -->
+<!--comment number 430 -->
+<!--comment number 431 -->
+<!--comment number 432 -->
+<!--comment number 433 -->
+<!--comment number 434 -->
+<!--comment number 435 -->
+<!--comment number 436 -->
+<!--comment number 437 -->
+<!--comment number 438 -->
+<!--comment number 439 -->
+<!--comment number 440 -->
+<!--comment number 441 -->
+<!--comment number 442 -->
+<!--comment number 443 -->
+<!--comment number 444 -->
+<!--comment number 445 -->
+<!--comment number 446 -->
+<!--comment number 447 -->
+<!--comment number 448 -->
+<!--comment number 449 -->
+<!--comment number 450 -->
+<!--comment number 451 -->
+<!--comment number 452 -->
+<!--comment number 453 -->
+<!--comment number 454 -->
+<!--comment number 455 -->
+<!--comment number 456 -->
+<!--comment number 457 -->
+<!--comment number 458 -->
+<!--comment number 459 -->
+<!--comment number 460 -->
+<!--comment number 461 -->
+<!--comment number 462 -->
+<!--comment number 463 -->
+<!--comment number 464 -->
+<!--comment number 465 -->
+<!--comment number 466 -->
+<!--comment number 467 -->
+<!--comment number 468 -->
+<!--comment number 469 -->
+<!--comment number 470 -->
+<!--comment number 471 -->
+<!--comment number 472 -->
+<!--comment number 473 -->
+<!--comment number 474 -->
+<!--comment number 475 -->
+<!--comment number 476 -->
+<!--comment number 477 -->
+<!--comment number 478 -->
+<!--comment number 479 -->
+<!--comment number 480 -->
+<!--comment number 481 -->
+<!--comment number 482 -->
+<!--comment number 483 -->
+<!--comment number 484 -->
+<!--comment number 485 -->
+<!--comment number 486 -->
+<!--comment number 487 -->
+<!--comment number 488 -->
+<!--comment number 489 -->
+<!--comment number 490 -->
+<!--comment number 491 -->
+<!--comment number 492 -->
+<!--comment number 493 -->
+<!--comment number 494 -->
+<!--comment number 495 -->
+<!--comment number 496 -->
+<!--comment number 497 -->
+<!--comment number 498 -->
+<!--comment number 499 -->
+<!--comment number 500 -->
+<!--comment number 501 -->
+<!--comment number 502 -->
+<!--comment number 503 -->
+<!--comment number 504 -->
+<!--comment number 505 -->
+<!--comment number 506 -->
+<!--comment number 507 -->
+<!--comment number 508 -->
+<!--comment number 509 -->
+<!--comment number 510 -->
+<!--comment number 511 -->
+<!--comment number 512 -->
+<!--comment number 513 -->
+<!--comment number 514 -->
+<!--comment number 515 -->
+<!--comment number 516 -->
+<!--comment number 517 -->
+<!--comment number 518 -->
+<!--comment number 519 -->
+<!--comment number 520 -->
+<!--comment number 521 -->
+<!--comment number 522 -->
+<!--comment number 523 -->
+<!--comment number 524 -->
+<!--comment number 525 -->
+<!--comment number 526 -->
+<!--comment number 527 -->
+<!--comment number 528 -->
+<!--comment number 529 -->
+<!--comment number 530 -->
+<!--comment number 531 -->
+<!--comment number 532 -->
+<!--comment number 533 -->
+<!--comment number 534 -->
+<!--comment number 535 -->
+<!--comment number 536 -->
+<!--comment number 537 -->
+<!--comment number 538 -->
+<!--comment number 539 -->
+<!--comment number 540 -->
+<!--comment number 541 -->
+<!--comment number 542 -->
+<!--comment number 543 -->
+<!--comment number 544 -->
+<!--comment number 545 -->
+<!--comment number 546 -->
+<!--comment number 547 -->
+<!--comment number 548 -->
+<!--comment number 549 -->
+<!--comment number 550 -->
+<!--comment number 551 -->
+<!--comment number 552 -->
+<!--comment number 553 -->
+<!--comment number 554 -->
+<!--comment number 555 -->
+<!--comment number 556 -->
+<!--comment number 557 -->
+<!--comment number 558 -->
+<!--comment number 559 -->
+<!--comment number 560 -->
+<!--comment number 561 -->
+<!--comment number 562 -->
+<!--comment number 563 -->
+<!--comment number 564 -->
+<!--comment number 565 -->
+<!--comment number 566 -->
+<!--comment number 567 -->
+<!--comment number 568 -->
+<!--comment number 569 -->
+<!--comment number 570 -->
+<!--comment number 571 -->
+<!--comment number 572 -->
+<!--comment number 573 -->
+<!--comment number 574 -->
+<!--comment number 575 -->
+<!--comment number 576 -->
+<!--comment number 577 -->
+<!--comment number 578 -->
+<!--comment number 579 -->
+<!--comment number 580 -->
+<!--comment number 581 -->
+<!--comment number 582 -->
+<!--comment number 583 -->
+<!--comment number 584 -->
+<!--comment number 585 -->
+<!--comment number 586 -->
+<!--comment number 587 -->
+<!--comment number 588 -->
+<!--comment number 589 -->
+<!--comment number 590 -->
+<!--comment number 591 -->
+<!--comment number 592 -->
+<!--comment number 593 -->
+<!--comment number 594 -->
+<!--comment number 595 -->
+<!--comment number 596 -->
+<!--comment number 597 -->
+<!--comment number 598 -->
+<!--comment number 599 -->
+<!--comment number 600 -->
+<!--comment number 601 -->
+<!--comment number 602 -->
+<!--comment number 603 -->
+<!--comment number 604 -->
+<!--comment number 605 -->
+<!--comment number 606 -->
+<!--comment number 607 -->
+<!--comment number 608 -->
+<!--comment number 609 -->
+<!--comment number 610 -->
+<!--comment number 611 -->
+<!--comment number 612 -->
+<!--comment number 613 -->
+<!--comment number 614 -->
+<!--comment number 615 -->
+<!--comment number 616 -->
+<!--comment number 617 -->
+<!--comment number 618 -->
+<!--comment number 619 -->
+<!--comment number 620 -->
+<!--comment number 621 -->
+<!--comment number 622 -->
+<!--comment number 623 -->
+<!--comment number 624 -->
+<!--comment number 625 -->
+<!--comment number 626 -->
+<!--comment number 627 -->
+<!--comment number 628 -->
+<!--comment number 629 -->
+<!--comment number 630 -->
+<!--comment number 631 -->
+<!--comment number 632 -->
+<!--comment number 633 -->
+<!--comment number 634 -->
+<!--comment number 635 -->
+<!--comment number 636 -->
+<!--comment number 637 -->
+<!--comment number 638 -->
+<!--comment number 639 -->
+<!--comment number 640 -->
+<!--comment number 641 -->
+<!--comment number 642 -->
+<!--comment number 643 -->
+<!--comment number 644 -->
+<!--comment number 645 -->
+<!--comment number 646 -->
+<!--comment number 647 -->
+<!--comment number 648 -->
+<!--comment number 649 -->
+<!--comment number 650 -->
+<!--comment number 651 -->
+<!--comment number 652 -->
+<!--comment number 653 -->
+<!--comment number 654 -->
+<!--comment number 655 -->
+<!--comment number 656 -->
+<!--comment number 657 -->
+<!--comment number 658 -->
+<!--comment number 659 -->
+<!--comment number 660 -->
+<!--comment number 661 -->
+<!--comment number 662 -->
+<!--comment number 663 -->
+<!--comment number 664 -->
+<!--comment number 665 -->
+<!--comment number 666 -->
+<!--comment number 667 -->
+<!--comment number 668 -->
+<!--comment number 669 -->
+<!--comment number 670 -->
+<!--comment number 671 -->
+<!--comment number 672 -->
+<!--comment number 673 -->
+<!--comment number 674 -->
+<!--comment number 675 -->
+<!--comment number 676 -->
+<!--comment number 677 -->
+<!--comment number 678 -->
+<!--comment number 679 -->
+<!--comment number 680 -->
+<!--comment number 681 -->
+<!--comment number 682 -->
+<!--comment number 683 -->
+<!--comment number 684 -->
+<!--comment number 685 -->
+<!--comment number 686 -->
+<!--comment number 687 -->
+<!--comment number 688 -->
+<!--comment number 689 -->
+<!--comment number 690 -->
+<!--comment number 691 -->
+<!--comment number 692 -->
+<!--comment number 693 -->
+<!--comment number 694 -->
+<!--comment number 695 -->
+<!--comment number 696 -->
+<!--comment number 697 -->
+<!--comment number 698 -->
+<!--comment number 699 -->
+<!--comment number 700 -->
+<!--comment number 701 -->
+<!--comment number 702 -->
+<!--comment number 703 -->
+<!--comment number 704 -->
+<!--comment number 705 -->
+<!--comment number 706 -->
+<!--comment number 707 -->
+<!--comment number 708 -->
+<!--comment number 709 -->
+<!--comment number 710 -->
+<!--comment number 711 -->
+<!--comment number 712 -->
+<!--comment number 713 -->
+<!--comment number 714 -->
+<!--comment number 715 -->
+<!--comment number 716 -->
+<!--comment number 717 -->
+<!--comment number 718 -->
+<!--comment number 719 -->
+<!--comment number 720 -->
+<!--comment number 721 -->
+<!--comment number 722 -->
+<!--comment number 723 -->
+<!--comment number 724 -->
+<!--comment number 725 -->
+<!--comment number 726 -->
+<!--comment number 727 -->
+<!--comment number 728 -->
+<!--comment number 729 -->
+<!--comment number 730 -->
+<!--comment number 731 -->
+<!--comment number 732 -->
+<!--comment number 733 -->
+<!--comment number 734 -->
+<!--comment number 735 -->
+<!--comment number 736 -->
+<!--comment number 737 -->
+<!--comment number 738 -->
+<!--comment number 739 -->
+<!--comment number 740 -->
+<!--comment number 741 -->
+<!--comment number 742 -->
+<!--comment number 743 -->
+<!--comment number 744 -->
+<!--comment number 745 -->
+<!--comment number 746 -->
+<!--comment number 747 -->
+<!--comment number 748 -->
+<!--comment number 749 -->
+<!--comment number 750 -->
+<!--comment number 751 -->
+<!--comment number 752 -->
+<!--comment number 753 -->
+<!--comment number 754 -->
+<!--comment number 755 -->
+<!--comment number 756 -->
+<!--comment number 757 -->
+<!--comment number 758 -->
+<!--comment number 759 -->
+<!--comment number 760 -->
+<!--comment number 761 -->
+<!--comment number 762 -->
+<!--comment number 763 -->
+<!--comment number 764 -->
+<!--comment number 765 -->
+<!--comment number 766 -->
+<!--comment number 767 -->
+<!--comment number 768 -->
+<!--comment number 769 -->
+<!--comment number 770 -->
+<!--comment number 771 -->
+<!--comment number 772 -->
+<!--comment number 773 -->
+<!--comment number 774 -->
+<!--comment number 775 -->
+<!--comment number 776 -->
+<!--comment number 777 -->
+<!--comment number 778 -->
+<!--comment number 779 -->
+<!--comment number 780 -->
+<!--comment number 781 -->
+<!--comment number 782 -->
+<!--comment number 783 -->
+<!--comment number 784 -->
+<!--comment number 785 -->
+<!--comment number 786 -->
+<!--comment number 787 -->
+<!--comment number 788 -->
+<!--comment number 789 -->
+<!--comment number 790 -->
+<!--comment number 791 -->
+<!--comment number 792 -->
+<!--comment number 793 -->
+<!--comment number 794 -->
+<!--comment number 795 -->
+<!--comment number 796 -->
+<!--comment number 797 -->
+<!--comment number 798 -->
+<!--comment number 799 -->
+<!--comment number 800 -->
+<!--comment number 801 -->
+<!--comment number 802 -->
+<!--comment number 803 -->
+<!--comment number 804 -->
+<!--comment number 805 -->
+<!--comment number 806 -->
+<!--comment number 807 -->
+<!--comment number 808 -->
+<!--comment number 809 -->
+<!--comment number 810 -->
+<!--comment number 811 -->
+<!--comment number 812 -->
+<!--comment number 813 -->
+<!--comment number 814 -->
+<!--comment number 815 -->
+<!--comment number 816 -->
+<!--comment number 817 -->
+<!--comment number 818 -->
+<!--comment number 819 -->
+<!--comment number 820 -->
+<!--comment number 821 -->
+<!--comment number 822 -->
+<!--comment number 823 -->
+<!--comment number 824 -->
+<!--comment number 825 -->
+<!--comment number 826 -->
+<!--comment number 827 -->
+<!--comment number 828 -->
+<!--comment number 829 -->
+<!--comment number 830 -->
+<!--comment number 831 -->
+<!--comment number 832 -->
+<!--comment number 833 -->
+<!--comment number 834 -->
+<!--comment number 835 -->
+<!--comment number 836 -->
+<!--comment number 837 -->
+<!--comment number 838 -->
+<!--comment number 839 -->
+<!--comment number 840 -->
+<!--comment number 841 -->
+<!--comment number 842 -->
+<!--comment number 843 -->
+<!--comment number 844 -->
+<!--comment number 845 -->
+<!--comment number 846 -->
+<!--comment number 847 -->
+<!--comment number 848 -->
+<!--comment number 849 -->
+<!--comment number 850 -->
+<!--comment number 851 -->
+<!--comment number 852 -->
+<!--comment number 853 -->
+<!--comment number 854 -->
+<!--comment number 855 -->
+<!--comment number 856 -->
+<!--comment number 857 -->
+<!--comment number 858 -->
+<!--comment number 859 -->
+<!--comment number 860 -->
+<!--comment number 861 -->
+<!--comment number 862 -->
+<!--comment number 863 -->
+<!--comment number 864 -->
+<!--comment number 865 -->
+<!--comment number 866 -->
+<!--comment number 867 -->
+<!--comment number 868 -->
+<!--comment number 869 -->
+<!--comment number 870 -->
+<!--comment number 871 -->
+<!--comment number 872 -->
+<!--comment number 873 -->
+<!--comment number 874 -->
+<!--comment number 875 -->
+<!--comment number 876 -->
+<!--comment number 877 -->
+<!--comment number 878 -->
+<!--comment number 879 -->
+<!--comment number 880 -->
+<!--comment number 881 -->
+<!--comment number 882 -->
+<!--comment number 883 -->
+<!--comment number 884 -->
+<!--comment number 885 -->
+<!--comment number 886 -->
+<!--comment number 887 -->
+<!--comment number 888 -->
+<!--comment number 889 -->
+<!--comment number 890 -->
+<!--comment number 891 -->
+<!--comment number 892 -->
+<!--comment number 893 -->
+<!--comment number 894 -->
+<!--comment number 895 -->
+<!--comment number 896 -->
+<!--comment number 897 -->
+<!--comment number 898 -->
+<!--comment number 899 -->
+<!--comment number 900 -->
+<!--comment number 901 -->
+<!--comment number 902 -->
+<!--comment number 903 -->
+<!--comment number 904 -->
+<!--comment number 905 -->
+<!--comment number 906 -->
+<!--comment number 907 -->
+<!--comment number 908 -->
+<!--comment number 909 -->
+<!--comment number 910 -->
+<!--comment number 911 -->
+<!--comment number 912 -->
+<!--comment number 913 -->
+<!--comment number 914 -->
+<!--comment number 915 -->
+<!--comment number 916 -->
+<!--comment number 917 -->
+<!--comment number 918 -->
+<!--comment number 919 -->
+<!--comment number 920 -->
+<!--comment number 921 -->
+<!--comment number 922 -->
+<!--comment number 923 -->
+<!--comment number 924 -->
+<!--comment number 925 -->
+<!--comment number 926 -->
+<!--comment number 927 -->
+<!--comment number 928 -->
+<!--comment number 929 -->
+<!--comment number 930 -->
+<!--comment number 931 -->
+<!--comment number 932 -->
+<!--comment number 933 -->
+<!--comment number 934 -->
+<!--comment number 935 -->
+<!--comment number 936 -->
+<!--comment number 937 -->
+<!--comment number 938 -->
+<!--comment number 939 -->
+<!--comment number 940 -->
+<!--comment number 941 -->
+<!--comment number 942 -->
+<!--comment number 943 -->
+<!--comment number 944 -->
+<!--comment number 945 -->
+<!--comment number 946 -->
+<!--comment number 947 -->
+<!--comment number 948 -->
+<!--comment number 949 -->
+<!--comment number 950 -->
+<!--comment number 951 -->
+<!--comment number 952 -->
+<!--comment number 953 -->
+<!--comment number 954 -->
+<!--comment number 955 -->
+<!--comment number 956 -->
+<!--comment number 957 -->
+<!--comment number 958 -->
+<!--comment number 959 -->
+<!--comment number 960 -->
+<!--comment number 961 -->
+<!--comment number 962 -->
+<!--comment number 963 -->
+<!--comment number 964 -->
+<!--comment number 965 -->
+<!--comment number 966 -->
+<!--comment number 967 -->
+<!--comment number 968 -->
+<!--comment number 969 -->
+<!--comment number 970 -->
+<!--comment number 971 -->
+<!--comment number 972 -->
+<!--comment number 973 -->
+<!--comment number 974 -->
+<!--comment number 975 -->
+<!--comment number 976 -->
+<!--comment number 977 -->
+<!--comment number 978 -->
+<!--comment number 979 -->
+<!--comment number 980 -->
+<!--comment number 981 -->
+<!--comment number 982 -->
+<!--comment number 983 -->
+<!--comment number 984 -->
+<!--comment number 985 -->
+<!--comment number 986 -->
+<!--comment number 987 -->
+<!--comment number 988 -->
+<!--comment number 989 -->
+<!--comment number 990 -->
+<!--comment number 991 -->
+<!--comment number 992 -->
+<!--comment number 993 -->
+<!--comment number 994 -->
+<!--comment number 995 -->
+<!--comment number 996 -->
+<!--comment number 997 -->
+<!--comment number 998 -->
+<!--comment number 999 -->
+<!--comment number 1000 -->
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/doc-trigger.xml b/test/tests/perf/xtestdata/doc-trigger.xml
new file mode 100644
index 0000000..5004baf
--- /dev/null
+++ b/test/tests/perf/xtestdata/doc-trigger.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<doc></doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/elem10kdeep.xml b/test/tests/perf/xtestdata/elem10kdeep.xml
new file mode 100644
index 0000000..79a916d
--- /dev/null
+++ b/test/tests/perf/xtestdata/elem10kdeep.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc><e1><e2><e3><e4><e5><e6><e7><e8><e9><e10><e11><e12><e13><e14><e15><e16><e17><e18><e19><e20><e21><e22><e23><e24><e25><e26><e27><e28><e29><e30><e31><e32><e33><e34><e35><e36><e37><e38><e39><e40><e41><e42><e43><e44><e45><e46><e47><e48><e49><e50><e51><e52><e53><e54><e55><e56><e57><e58><e59><e60><e61><e62><e63><e64><e65><e66><e67><e68><e69><e70><e71><e72><e73><e74><e75><e76><e77><e78><e79><e80><e81><e82><e83><e84><e85><e86><e87><e88><e89><e90><e91><e92><e93><e94><e95><e96><e97><e98><e99><e100><e101><e102><e103><e104><e105><e106><e107><e108><e109><e110><e111><e112><e113><e114><e115><e116><e117><e118><e119><e120><e121><e122><e123><e124><e125><e126><e127><e128><e129><e130><e131><e132><e133><e134><e135><e136><e137><e138><e139><e140><e141><e142><e143><e144><e145><e146><e147><e148><e149><e150><e151><e152><e153><e154><e155><e156><e157><e158><e159><e160><e161><e162><e163><e164><e165><e166><e167><e168><e169><e170><e171><e172><e173><e174><e175><e176><e177><e178><e179><e180><e181><e182><e183><e184><e185><e186><e187><e188><e189><e190><e191><e192><e193><e194><e195><e196><e197><e198><e199><e200><e201><e202><e203><e204><e205><e206><e207><e208><e209><e210><e211><e212><e213><e214><e215><e216><e217><e218><e219><e220><e221><e222><e223><e224><e225><e226><e227><e228><e229><e230><e231><e232><e233><e234><e235><e236><e237><e238><e239><e240><e241><e242><e243><e244><e245><e246><e247><e248><e249><e250><e251><e252><e253><e254><e255><e256><e257><e258><e259><e260><e261><e262><e263><e264><e265><e266><e267><e268><e269><e270><e271><e272><e273><e274><e275><e276><e277><e278><e279><e280><e281><e282><e283><e284><e285><e286><e287><e288><e289><e290><e291><e292><e293><e294><e295><e296><e297><e298><e299><e300><e301><e302><e303><e304><e305><e306><e307><e308><e309><e310><e311><e312><e313><e314><e315><e316><e317><e318><e319><e320><e321><e322><e323><e324><e325><e326><e327><e328><e329><e330><e331><e332><e333><e334><e335><e336><e337><e338><e339><e340><e341><e342><e343><e344><e345><e346><e347><e348><e349><e350><e351><e352><e353><e354><e355><e356><e357><e358><e359><e360><e361><e362><e363><e364><e365><e366><e367><e368><e369><e370><e371><e372><e373><e374><e375><e376><e377><e378><e379><e380><e381><e382><e383><e384><e385><e386><e387><e388><e389><e390><e391><e392><e393><e394><e395><e396><e397><e398><e399><e400><e401><e402><e403><e404><e405><e406><e407><e408><e409><e410><e411><e412><e413><e414><e415><e416><e417><e418><e419><e420><e421><e422><e423><e424><e425><e426><e427><e428><e429><e430><e431><e432><e433><e434><e435><e436><e437><e438><e439><e440><e441><e442><e443><e444><e445><e446><e447><e448><e449><e450><e451><e452><e453><e454><e455><e456><e457><e458><e459><e460><e461><e462><e463><e464><e465><e466><e467><e468><e469><e470><e471><e472><e473><e474><e475><e476><e477><e478><e479><e480><e481><e482><e483><e484><e485><e486><e487><e488><e489><e490><e491><e492><e493><e494><e495><e496><e497><e498><e499><e500><e501><e502><e503><e504><e505><e506><e507><e508><e509><e510><e511><e512><e513><e514><e515><e516><e517><e518><e519><e520><e521><e522><e523><e524><e525><e526><e527><e528><e529><e530><e531><e532><e533><e534><e535><e536><e537><e538><e539><e540><e541><e542><e543><e544><e545><e546><e547><e548><e549><e550><e551><e552><e553><e554><e555><e556><e557><e558><e559><e560><e561><e562><e563><e564><e565><e566><e567><e568><e569><e570><e571><e572><e573><e574><e575><e576><e577><e578><e579><e580><e581><e582><e583><e584><e585><e586><e587><e588><e589><e590><e591><e592><e593><e594><e595><e596><e597><e598><e599><e600><e601><e602><e603><e604><e605><e606><e607><e608><e609><e610><e611><e612><e613><e614><e615><e616><e617><e618><e619><e620><e621><e622><e623><e624><e625><e626><e627><e628><e629><e630><e631><e632><e633><e634><e635><e636><e637><e638><e639><e640><e641><e642><e643><e644><e645><e646><e647><e648><e649><e650><e651><e652><e653><e654><e655><e656><e657><e658><e659><e660><e661><e662><e663><e664><e665><e666><e667><e668><e669><e670><e671><e672><e673><e674><e675><e676><e677><e678><e679><e680><e681><e682><e683><e684><e685><e686><e687><e688><e689><e690><e691><e692><e693><e694><e695><e696><e697><e698><e699><e700><e701><e702><e703><e704><e705><e706><e707><e708><e709><e710><e711><e712><e713><e714><e715><e716><e717><e718><e719><e720><e721><e722><e723><e724><e725><e726><e727><e728><e729><e730><e731><e732><e733><e734><e735><e736><e737><e738><e739><e740><e741><e742><e743><e744><e745><e746><e747><e748><e749><e750><e751><e752><e753><e754><e755><e756><e757><e758><e759><e760><e761><e762><e763><e764><e765><e766><e767><e768><e769><e770><e771><e772><e773><e774><e775><e776><e777><e778><e779><e780><e781><e782><e783><e784><e785><e786><e787><e788><e789><e790><e791><e792><e793><e794><e795><e796><e797><e798><e799><e800><e801><e802><e803><e804><e805><e806><e807><e808><e809><e810><e811><e812><e813><e814><e815><e816><e817><e818><e819><e820><e821><e822><e823><e824><e825><e826><e827><e828><e829><e830><e831><e832><e833><e834><e835><e836><e837><e838><e839><e840><e841><e842><e843><e844><e845><e846><e847><e848><e849><e850><e851><e852><e853><e854><e855><e856><e857><e858><e859><e860><e861><e862><e863><e864><e865><e866><e867><e868><e869><e870><e871><e872><e873><e874><e875><e876><e877><e878><e879><e880><e881><e882><e883><e884><e885><e886><e887><e888><e889><e890><e891><e892><e893><e894><e895><e896><e897><e898><e899><e900><e901><e902><e903><e904><e905><e906><e907><e908><e909><e910><e911><e912><e913><e914><e915><e916><e917><e918><e919><e920><e921><e922><e923><e924><e925><e926><e927><e928><e929><e930><e931><e932><e933><e934><e935><e936><e937><e938><e939><e940><e941><e942><e943><e944><e945><e946><e947><e948><e949><e950><e951><e952><e953><e954><e955><e956><e957><e958><e959><e960><e961><e962><e963><e964><e965><e966><e967><e968><e969><e970><e971><e972><e973><e974><e975><e976><e977><e978><e979><e980><e981><e982><e983><e984><e985><e986><e987><e988><e989><e990><e991><e992><e993><e994><e995><e996><e997><e998><e999><e1000><e1001><e1002><e1003><e1004><e1005><e1006><e1007><e1008><e1009><e1010><e1011><e1012><e1013><e1014><e1015><e1016><e1017><e1018><e1019><e1020><e1021><e1022><e1023><e1024><e1025><e1026><e1027><e1028><e1029><e1030><e1031><e1032><e1033><e1034><e1035><e1036><e1037><e1038><e1039><e1040><e1041><e1042><e1043><e1044><e1045><e1046><e1047><e1048><e1049><e1050><e1051><e1052><e1053><e1054><e1055><e1056><e1057><e1058><e1059><e1060><e1061><e1062><e1063><e1064><e1065><e1066><e1067><e1068><e1069><e1070><e1071><e1072><e1073><e1074><e1075><e1076><e1077><e1078><e1079><e1080><e1081><e1082><e1083><e1084><e1085><e1086><e1087><e1088><e1089><e1090><e1091><e1092><e1093><e1094><e1095><e1096><e1097><e1098><e1099><e1100><e1101><e1102><e1103><e1104><e1105><e1106><e1107><e1108><e1109><e1110><e1111><e1112><e1113><e1114><e1115><e1116><e1117><e1118><e1119><e1120><e1121><e1122><e1123><e1124><e1125><e1126><e1127><e1128><e1129><e1130><e1131><e1132><e1133><e1134><e1135><e1136><e1137><e1138><e1139><e1140><e1141><e1142><e1143><e1144><e1145><e1146><e1147><e1148><e1149><e1150><e1151><e1152><e1153><e1154><e1155><e1156><e1157><e1158><e1159><e1160><e1161><e1162><e1163><e1164><e1165><e1166><e1167><e1168><e1169><e1170><e1171><e1172><e1173><e1174><e1175><e1176><e1177><e1178><e1179><e1180><e1181><e1182><e1183><e1184><e1185><e1186><e1187><e1188><e1189><e1190><e1191><e1192><e1193><e1194><e1195><e1196><e1197><e1198><e1199><e1200><e1201><e1202><e1203><e1204><e1205><e1206><e1207><e1208><e1209><e1210><e1211><e1212><e1213><e1214><e1215><e1216><e1217><e1218><e1219><e1220><e1221><e1222><e1223><e1224><e1225><e1226><e1227><e1228><e1229><e1230><e1231><e1232><e1233><e1234><e1235><e1236><e1237><e1238><e1239><e1240><e1241><e1242><e1243><e1244><e1245><e1246><e1247><e1248><e1249><e1250><e1251><e1252><e1253><e1254><e1255><e1256><e1257><e1258><e1259><e1260><e1261><e1262><e1263><e1264><e1265><e1266><e1267><e1268><e1269><e1270><e1271><e1272><e1273><e1274><e1275><e1276><e1277><e1278><e1279><e1280><e1281><e1282><e1283><e1284><e1285><e1286><e1287><e1288><e1289><e1290><e1291><e1292><e1293><e1294><e1295><e1296><e1297><e1298><e1299><e1300><e1301><e1302><e1303><e1304><e1305><e1306><e1307><e1308><e1309><e1310><e1311><e1312><e1313><e1314><e1315><e1316><e1317><e1318><e1319><e1320><e1321><e1322><e1323><e1324><e1325><e1326><e1327><e1328><e1329><e1330><e1331><e1332><e1333><e1334><e1335><e1336><e1337><e1338><e1339><e1340><e1341><e1342><e1343><e1344><e1345><e1346><e1347><e1348><e1349><e1350><e1351><e1352><e1353><e1354><e1355><e1356><e1357><e1358><e1359><e1360><e1361><e1362><e1363><e1364><e1365><e1366><e1367><e1368><e1369><e1370><e1371><e1372><e1373><e1374><e1375><e1376><e1377><e1378><e1379><e1380><e1381><e1382><e1383><e1384><e1385><e1386><e1387><e1388><e1389><e1390><e1391><e1392><e1393><e1394><e1395><e1396><e1397><e1398><e1399><e1400><e1401><e1402><e1403><e1404><e1405><e1406><e1407><e1408><e1409><e1410><e1411><e1412><e1413><e1414><e1415><e1416><e1417><e1418><e1419><e1420><e1421><e1422><e1423><e1424><e1425><e1426><e1427><e1428><e1429><e1430><e1431><e1432><e1433><e1434><e1435><e1436><e1437><e1438><e1439><e1440><e1441><e1442><e1443><e1444><e1445><e1446><e1447><e1448><e1449><e1450><e1451><e1452><e1453><e1454><e1455><e1456><e1457><e1458><e1459><e1460><e1461><e1462><e1463><e1464><e1465><e1466><e1467><e1468><e1469><e1470><e1471><e1472><e1473><e1474><e1475><e1476><e1477><e1478><e1479><e1480><e1481><e1482><e1483><e1484><e1485><e1486><e1487><e1488><e1489><e1490><e1491><e1492><e1493><e1494><e1495><e1496><e1497><e1498><e1499><e1500><e1501><e1502><e1503><e1504><e1505><e1506><e1507><e1508><e1509><e1510><e1511><e1512><e1513><e1514><e1515><e1516><e1517><e1518><e1519><e1520><e1521><e1522><e1523><e1524><e1525><e1526><e1527><e1528><e1529><e1530><e1531><e1532><e1533><e1534><e1535><e1536><e1537><e1538><e1539><e1540><e1541><e1542><e1543><e1544><e1545><e1546><e1547><e1548><e1549><e1550><e1551><e1552><e1553><e1554><e1555><e1556><e1557><e1558><e1559><e1560><e1561><e1562><e1563><e1564><e1565><e1566><e1567><e1568><e1569><e1570><e1571><e1572><e1573><e1574><e1575><e1576><e1577><e1578><e1579><e1580><e1581><e1582><e1583><e1584><e1585><e1586><e1587><e1588><e1589><e1590><e1591><e1592><e1593><e1594><e1595><e1596><e1597><e1598><e1599><e1600><e1601><e1602><e1603><e1604><e1605><e1606><e1607><e1608><e1609><e1610><e1611><e1612><e1613><e1614><e1615><e1616><e1617><e1618><e1619><e1620><e1621><e1622><e1623><e1624><e1625><e1626><e1627><e1628><e1629><e1630><e1631><e1632><e1633><e1634><e1635><e1636><e1637><e1638><e1639><e1640><e1641><e1642><e1643><e1644><e1645><e1646><e1647><e1648><e1649><e1650><e1651><e1652><e1653><e1654><e1655><e1656><e1657><e1658><e1659><e1660><e1661><e1662><e1663><e1664><e1665><e1666><e1667><e1668><e1669><e1670><e1671><e1672><e1673><e1674><e1675><e1676><e1677><e1678><e1679><e1680><e1681><e1682><e1683><e1684><e1685><e1686><e1687><e1688><e1689><e1690><e1691><e1692><e1693><e1694><e1695><e1696><e1697><e1698><e1699><e1700><e1701><e1702><e1703><e1704><e1705><e1706><e1707><e1708><e1709><e1710><e1711><e1712><e1713><e1714><e1715><e1716><e1717><e1718><e1719><e1720><e1721><e1722><e1723><e1724><e1725><e1726><e1727><e1728><e1729><e1730><e1731><e1732><e1733><e1734><e1735><e1736><e1737><e1738><e1739><e1740><e1741><e1742><e1743><e1744><e1745><e1746><e1747><e1748><e1749><e1750><e1751><e1752><e1753><e1754><e1755><e1756><e1757><e1758><e1759><e1760><e1761><e1762><e1763><e1764><e1765><e1766><e1767><e1768><e1769><e1770><e1771><e1772><e1773><e1774><e1775><e1776><e1777><e1778><e1779><e1780><e1781><e1782><e1783><e1784><e1785><e1786><e1787><e1788><e1789><e1790><e1791><e1792><e1793><e1794><e1795><e1796><e1797><e1798><e1799><e1800><e1801><e1802><e1803><e1804><e1805><e1806><e1807><e1808><e1809><e1810><e1811><e1812><e1813><e1814><e1815><e1816><e1817><e1818><e1819><e1820><e1821><e1822><e1823><e1824><e1825><e1826><e1827><e1828><e1829><e1830><e1831><e1832><e1833><e1834><e1835><e1836><e1837><e1838><e1839><e1840><e1841><e1842><e1843><e1844><e1845><e1846><e1847><e1848><e1849><e1850><e1851><e1852><e1853><e1854><e1855><e1856><e1857><e1858><e1859><e1860><e1861><e1862><e1863><e1864><e1865><e1866><e1867><e1868><e1869><e1870><e1871><e1872><e1873><e1874><e1875><e1876><e1877><e1878><e1879><e1880><e1881><e1882><e1883><e1884><e1885><e1886><e1887><e1888><e1889><e1890><e1891><e1892><e1893><e1894><e1895><e1896><e1897><e1898><e1899><e1900><e1901><e1902><e1903><e1904><e1905><e1906><e1907><e1908><e1909><e1910><e1911><e1912><e1913><e1914><e1915><e1916><e1917><e1918><e1919><e1920><e1921><e1922><e1923><e1924><e1925><e1926><e1927><e1928><e1929><e1930><e1931><e1932><e1933><e1934><e1935><e1936><e1937><e1938><e1939><e1940><e1941><e1942><e1943><e1944><e1945><e1946><e1947><e1948><e1949><e1950><e1951><e1952><e1953><e1954><e1955><e1956><e1957><e1958><e1959><e1960><e1961><e1962><e1963><e1964><e1965><e1966><e1967><e1968><e1969><e1970><e1971><e1972><e1973><e1974><e1975><e1976><e1977><e1978><e1979><e1980><e1981><e1982><e1983><e1984><e1985><e1986><e1987><e1988><e1989><e1990><e1991><e1992><e1993><e1994><e1995><e1996><e1997><e1998><e1999><e2000><e2001><e2002><e2003><e2004><e2005><e2006><e2007><e2008><e2009><e2010><e2011><e2012><e2013><e2014><e2015><e2016><e2017><e2018><e2019><e2020><e2021><e2022><e2023><e2024><e2025><e2026><e2027><e2028><e2029><e2030><e2031><e2032><e2033><e2034><e2035><e2036><e2037><e2038><e2039><e2040><e2041><e2042><e2043><e2044><e2045><e2046><e2047><e2048><e2049><e2050><e2051><e2052><e2053><e2054><e2055><e2056><e2057><e2058><e2059><e2060><e2061><e2062><e2063><e2064><e2065><e2066><e2067><e2068><e2069><e2070><e2071><e2072><e2073><e2074><e2075><e2076><e2077><e2078><e2079><e2080><e2081><e2082><e2083><e2084><e2085><e2086><e2087><e2088><e2089><e2090><e2091><e2092><e2093><e2094><e2095><e2096><e2097><e2098><e2099><e2100><e2101><e2102><e2103><e2104><e2105><e2106><e2107><e2108><e2109><e2110><e2111><e2112><e2113><e2114><e2115><e2116><e2117><e2118><e2119><e2120><e2121><e2122><e2123><e2124><e2125><e2126><e2127><e2128><e2129><e2130><e2131><e2132><e2133><e2134><e2135><e2136><e2137><e2138><e2139><e2140><e2141><e2142><e2143><e2144><e2145><e2146><e2147><e2148><e2149><e2150><e2151><e2152><e2153><e2154><e2155><e2156><e2157><e2158><e2159><e2160><e2161><e2162><e2163><e2164><e2165><e2166><e2167><e2168><e2169><e2170><e2171><e2172><e2173><e2174><e2175><e2176><e2177><e2178><e2179><e2180><e2181><e2182><e2183><e2184><e2185><e2186><e2187><e2188><e2189><e2190><e2191><e2192><e2193><e2194><e2195><e2196><e2197><e2198><e2199><e2200><e2201><e2202><e2203><e2204><e2205><e2206><e2207><e2208><e2209><e2210><e2211><e2212><e2213><e2214><e2215><e2216><e2217><e2218><e2219><e2220><e2221><e2222><e2223><e2224><e2225><e2226><e2227><e2228><e2229><e2230><e2231><e2232><e2233><e2234><e2235><e2236><e2237><e2238><e2239><e2240><e2241><e2242><e2243><e2244><e2245><e2246><e2247><e2248><e2249><e2250><e2251><e2252><e2253><e2254><e2255><e2256><e2257><e2258><e2259><e2260><e2261><e2262><e2263><e2264><e2265><e2266><e2267><e2268><e2269><e2270><e2271><e2272><e2273><e2274><e2275><e2276><e2277><e2278><e2279><e2280><e2281><e2282><e2283><e2284><e2285><e2286><e2287><e2288><e2289><e2290><e2291><e2292><e2293><e2294><e2295><e2296><e2297><e2298><e2299><e2300><e2301><e2302><e2303><e2304><e2305><e2306><e2307><e2308><e2309><e2310><e2311><e2312><e2313><e2314><e2315><e2316><e2317><e2318><e2319><e2320><e2321><e2322><e2323><e2324><e2325><e2326><e2327><e2328><e2329><e2330><e2331><e2332><e2333><e2334><e2335><e2336><e2337><e2338><e2339><e2340><e2341><e2342><e2343><e2344><e2345><e2346><e2347><e2348><e2349><e2350><e2351><e2352><e2353><e2354><e2355><e2356><e2357><e2358><e2359><e2360><e2361><e2362><e2363><e2364><e2365><e2366><e2367><e2368><e2369><e2370><e2371><e2372><e2373><e2374><e2375><e2376><e2377><e2378><e2379><e2380><e2381><e2382><e2383><e2384><e2385><e2386><e2387><e2388><e2389><e2390><e2391><e2392><e2393><e2394><e2395><e2396><e2397><e2398><e2399><e2400><e2401><e2402><e2403><e2404><e2405><e2406><e2407><e2408><e2409><e2410><e2411><e2412><e2413><e2414><e2415><e2416><e2417><e2418><e2419><e2420><e2421><e2422><e2423><e2424><e2425><e2426><e2427><e2428><e2429><e2430><e2431><e2432><e2433><e2434><e2435><e2436><e2437><e2438><e2439><e2440><e2441><e2442><e2443><e2444><e2445><e2446><e2447><e2448><e2449><e2450><e2451><e2452><e2453><e2454><e2455><e2456><e2457><e2458><e2459><e2460><e2461><e2462><e2463><e2464><e2465><e2466><e2467><e2468><e2469><e2470><e2471><e2472><e2473><e2474><e2475><e2476><e2477><e2478><e2479><e2480><e2481><e2482><e2483><e2484><e2485><e2486><e2487><e2488><e2489><e2490><e2491><e2492><e2493><e2494><e2495><e2496><e2497><e2498><e2499><e2500><e2501><e2502><e2503><e2504><e2505><e2506><e2507><e2508><e2509><e2510><e2511><e2512><e2513><e2514><e2515><e2516><e2517><e2518><e2519><e2520><e2521><e2522><e2523><e2524><e2525><e2526><e2527><e2528><e2529><e2530><e2531><e2532><e2533><e2534><e2535><e2536><e2537><e2538><e2539><e2540><e2541><e2542><e2543><e2544><e2545><e2546><e2547><e2548><e2549><e2550><e2551><e2552><e2553><e2554><e2555><e2556><e2557><e2558><e2559><e2560><e2561><e2562><e2563><e2564><e2565><e2566><e2567><e2568><e2569><e2570><e2571><e2572><e2573><e2574><e2575><e2576><e2577><e2578><e2579><e2580><e2581><e2582><e2583><e2584><e2585><e2586><e2587><e2588><e2589><e2590><e2591><e2592><e2593><e2594><e2595><e2596><e2597><e2598><e2599><e2600><e2601><e2602><e2603><e2604><e2605><e2606><e2607><e2608><e2609><e2610><e2611><e2612><e2613><e2614><e2615><e2616><e2617><e2618><e2619><e2620><e2621><e2622><e2623><e2624><e2625><e2626><e2627><e2628><e2629><e2630><e2631><e2632><e2633><e2634><e2635><e2636><e2637><e2638><e2639><e2640><e2641><e2642><e2643><e2644><e2645><e2646><e2647><e2648><e2649><e2650><e2651><e2652><e2653><e2654><e2655><e2656><e2657><e2658><e2659><e2660><e2661><e2662><e2663><e2664><e2665><e2666><e2667><e2668><e2669><e2670><e2671><e2672><e2673><e2674><e2675><e2676><e2677><e2678><e2679><e2680><e2681><e2682><e2683><e2684><e2685><e2686><e2687><e2688><e2689><e2690><e2691><e2692><e2693><e2694><e2695><e2696><e2697><e2698><e2699><e2700><e2701><e2702><e2703><e2704><e2705><e2706><e2707><e2708><e2709><e2710><e2711><e2712><e2713><e2714><e2715><e2716><e2717><e2718><e2719><e2720><e2721><e2722><e2723><e2724><e2725><e2726><e2727><e2728><e2729><e2730><e2731><e2732><e2733><e2734><e2735><e2736><e2737><e2738><e2739><e2740><e2741><e2742><e2743><e2744><e2745><e2746><e2747><e2748><e2749><e2750><e2751><e2752><e2753><e2754><e2755><e2756><e2757><e2758><e2759><e2760><e2761><e2762><e2763><e2764><e2765><e2766><e2767><e2768><e2769><e2770><e2771><e2772><e2773><e2774><e2775><e2776><e2777><e2778><e2779><e2780><e2781><e2782><e2783><e2784><e2785><e2786><e2787><e2788><e2789><e2790><e2791><e2792><e2793><e2794><e2795><e2796><e2797><e2798><e2799><e2800><e2801><e2802><e2803><e2804><e2805><e2806><e2807><e2808><e2809><e2810><e2811><e2812><e2813><e2814><e2815><e2816><e2817><e2818><e2819><e2820><e2821><e2822><e2823><e2824><e2825><e2826><e2827><e2828><e2829><e2830><e2831><e2832><e2833><e2834><e2835><e2836><e2837><e2838><e2839><e2840><e2841><e2842><e2843><e2844><e2845><e2846><e2847><e2848><e2849><e2850><e2851><e2852><e2853><e2854><e2855><e2856><e2857><e2858><e2859><e2860><e2861><e2862><e2863><e2864><e2865><e2866><e2867><e2868><e2869><e2870><e2871><e2872><e2873><e2874><e2875><e2876><e2877><e2878><e2879><e2880><e2881><e2882><e2883><e2884><e2885><e2886><e2887><e2888><e2889><e2890><e2891><e2892><e2893><e2894><e2895><e2896><e2897><e2898><e2899><e2900><e2901><e2902><e2903><e2904><e2905><e2906><e2907><e2908><e2909><e2910><e2911><e2912><e2913><e2914><e2915><e2916><e2917><e2918><e2919><e2920><e2921><e2922><e2923><e2924><e2925><e2926><e2927><e2928><e2929><e2930><e2931><e2932><e2933><e2934><e2935><e2936><e2937><e2938><e2939><e2940><e2941><e2942><e2943><e2944><e2945><e2946><e2947><e2948><e2949><e2950><e2951><e2952><e2953><e2954><e2955><e2956><e2957><e2958><e2959><e2960><e2961><e2962><e2963><e2964><e2965><e2966><e2967><e2968><e2969><e2970><e2971><e2972><e2973><e2974><e2975><e2976><e2977><e2978><e2979><e2980><e2981><e2982><e2983><e2984><e2985><e2986><e2987><e2988><e2989><e2990><e2991><e2992><e2993><e2994><e2995><e2996><e2997><e2998><e2999><e3000><e3001><e3002><e3003><e3004><e3005><e3006><e3007><e3008><e3009><e3010><e3011><e3012><e3013><e3014><e3015><e3016><e3017><e3018><e3019><e3020><e3021><e3022><e3023><e3024><e3025><e3026><e3027><e3028><e3029><e3030><e3031><e3032><e3033><e3034><e3035><e3036><e3037><e3038><e3039><e3040><e3041><e3042><e3043><e3044><e3045><e3046><e3047><e3048><e3049><e3050><e3051><e3052><e3053><e3054><e3055><e3056><e3057><e3058><e3059><e3060><e3061><e3062><e3063><e3064><e3065><e3066><e3067><e3068><e3069><e3070><e3071><e3072><e3073><e3074><e3075><e3076><e3077><e3078><e3079><e3080><e3081><e3082><e3083><e3084><e3085><e3086><e3087><e3088><e3089><e3090><e3091><e3092><e3093><e3094><e3095><e3096><e3097><e3098><e3099><e3100><e3101><e3102><e3103><e3104><e3105><e3106><e3107><e3108><e3109><e3110><e3111><e3112><e3113><e3114><e3115><e3116><e3117><e3118><e3119><e3120><e3121><e3122><e3123><e3124><e3125><e3126><e3127><e3128><e3129><e3130><e3131><e3132><e3133><e3134><e3135><e3136><e3137><e3138><e3139><e3140><e3141><e3142><e3143><e3144><e3145><e3146><e3147><e3148><e3149><e3150><e3151><e3152><e3153><e3154><e3155><e3156><e3157><e3158><e3159><e3160><e3161><e3162><e3163><e3164><e3165><e3166><e3167><e3168><e3169><e3170><e3171><e3172><e3173><e3174><e3175><e3176><e3177><e3178><e3179><e3180><e3181><e3182><e3183><e3184><e3185><e3186><e3187><e3188><e3189><e3190><e3191><e3192><e3193><e3194><e3195><e3196><e3197><e3198><e3199><e3200><e3201><e3202><e3203><e3204><e3205><e3206><e3207><e3208><e3209><e3210><e3211><e3212><e3213><e3214><e3215><e3216><e3217><e3218><e3219><e3220><e3221><e3222><e3223><e3224><e3225><e3226><e3227><e3228><e3229><e3230><e3231><e3232><e3233><e3234><e3235><e3236><e3237><e3238><e3239><e3240><e3241><e3242><e3243><e3244><e3245><e3246><e3247><e3248><e3249><e3250><e3251><e3252><e3253><e3254><e3255><e3256><e3257><e3258><e3259><e3260><e3261><e3262><e3263><e3264><e3265><e3266><e3267><e3268><e3269><e3270><e3271><e3272><e3273><e3274><e3275><e3276><e3277><e3278><e3279><e3280><e3281><e3282><e3283><e3284><e3285><e3286><e3287><e3288><e3289><e3290><e3291><e3292><e3293><e3294><e3295><e3296><e3297><e3298><e3299><e3300><e3301><e3302><e3303><e3304><e3305><e3306><e3307><e3308><e3309><e3310><e3311><e3312><e3313><e3314><e3315><e3316><e3317><e3318><e3319><e3320><e3321><e3322><e3323><e3324><e3325><e3326><e3327><e3328><e3329><e3330><e3331><e3332><e3333><e3334><e3335><e3336><e3337><e3338><e3339><e3340><e3341><e3342><e3343><e3344><e3345><e3346><e3347><e3348><e3349><e3350><e3351><e3352><e3353><e3354><e3355><e3356><e3357><e3358><e3359><e3360><e3361><e3362><e3363><e3364><e3365><e3366><e3367><e3368><e3369><e3370><e3371><e3372><e3373><e3374><e3375><e3376><e3377><e3378><e3379><e3380><e3381><e3382><e3383><e3384><e3385><e3386><e3387><e3388><e3389><e3390><e3391><e3392><e3393><e3394><e3395><e3396><e3397><e3398><e3399><e3400><e3401><e3402><e3403><e3404><e3405><e3406><e3407><e3408><e3409><e3410><e3411><e3412><e3413><e3414><e3415><e3416><e3417><e3418><e3419><e3420><e3421><e3422><e3423><e3424><e3425><e3426><e3427><e3428><e3429><e3430><e3431><e3432><e3433><e3434><e3435><e3436><e3437><e3438><e3439><e3440><e3441><e3442><e3443><e3444><e3445><e3446><e3447><e3448><e3449><e3450><e3451><e3452><e3453><e3454><e3455><e3456><e3457><e3458><e3459><e3460><e3461><e3462><e3463><e3464><e3465><e3466><e3467><e3468><e3469><e3470><e3471><e3472><e3473><e3474><e3475><e3476><e3477><e3478><e3479><e3480><e3481><e3482><e3483><e3484><e3485><e3486><e3487><e3488><e3489><e3490><e3491><e3492><e3493><e3494><e3495><e3496><e3497><e3498><e3499><e3500><e3501><e3502><e3503><e3504><e3505><e3506><e3507><e3508><e3509><e3510><e3511><e3512><e3513><e3514><e3515><e3516><e3517><e3518><e3519><e3520><e3521><e3522><e3523><e3524><e3525><e3526><e3527><e3528><e3529><e3530><e3531><e3532><e3533><e3534><e3535><e3536><e3537><e3538><e3539><e3540><e3541><e3542><e3543><e3544><e3545><e3546><e3547><e3548><e3549><e3550><e3551><e3552><e3553><e3554><e3555><e3556><e3557><e3558><e3559><e3560><e3561><e3562><e3563><e3564><e3565><e3566><e3567><e3568><e3569><e3570><e3571><e3572><e3573><e3574><e3575><e3576><e3577><e3578><e3579><e3580><e3581><e3582><e3583><e3584><e3585><e3586><e3587><e3588><e3589><e3590><e3591><e3592><e3593><e3594><e3595><e3596><e3597><e3598><e3599><e3600><e3601><e3602><e3603><e3604><e3605><e3606><e3607><e3608><e3609><e3610><e3611><e3612><e3613><e3614><e3615><e3616><e3617><e3618><e3619><e3620><e3621><e3622><e3623><e3624><e3625><e3626><e3627><e3628><e3629><e3630><e3631><e3632><e3633><e3634><e3635><e3636><e3637><e3638><e3639><e3640><e3641><e3642><e3643><e3644><e3645><e3646><e3647><e3648><e3649><e3650><e3651><e3652><e3653><e3654><e3655><e3656><e3657><e3658><e3659><e3660><e3661><e3662><e3663><e3664><e3665><e3666><e3667><e3668><e3669><e3670><e3671><e3672><e3673><e3674><e3675><e3676><e3677><e3678><e3679><e3680><e3681><e3682><e3683><e3684><e3685><e3686><e3687><e3688><e3689><e3690><e3691><e3692><e3693><e3694><e3695><e3696><e3697><e3698><e3699><e3700><e3701><e3702><e3703><e3704><e3705><e3706><e3707><e3708><e3709><e3710><e3711><e3712><e3713><e3714><e3715><e3716><e3717><e3718><e3719><e3720><e3721><e3722><e3723><e3724><e3725><e3726><e3727><e3728><e3729><e3730><e3731><e3732><e3733><e3734><e3735><e3736><e3737><e3738><e3739><e3740><e3741><e3742><e3743><e3744><e3745><e3746><e3747><e3748><e3749><e3750><e3751><e3752><e3753><e3754><e3755><e3756><e3757><e3758><e3759><e3760><e3761><e3762><e3763><e3764><e3765><e3766><e3767><e3768><e3769><e3770><e3771><e3772><e3773><e3774><e3775><e3776><e3777><e3778><e3779><e3780><e3781><e3782><e3783><e3784><e3785><e3786><e3787><e3788><e3789><e3790><e3791><e3792><e3793><e3794><e3795><e3796><e3797><e3798><e3799><e3800><e3801><e3802><e3803><e3804><e3805><e3806><e3807><e3808><e3809><e3810><e3811><e3812><e3813><e3814><e3815><e3816><e3817><e3818><e3819><e3820><e3821><e3822><e3823><e3824><e3825><e3826><e3827><e3828><e3829><e3830><e3831><e3832><e3833><e3834><e3835><e3836><e3837><e3838><e3839><e3840><e3841><e3842><e3843><e3844><e3845><e3846><e3847><e3848><e3849><e3850><e3851><e3852><e3853><e3854><e3855><e3856><e3857><e3858><e3859><e3860><e3861><e3862><e3863><e3864><e3865><e3866><e3867><e3868><e3869><e3870><e3871><e3872><e3873><e3874><e3875><e3876><e3877><e3878><e3879><e3880><e3881><e3882><e3883><e3884><e3885><e3886><e3887><e3888><e3889><e3890><e3891><e3892><e3893><e3894><e3895><e3896><e3897><e3898><e3899><e3900><e3901><e3902><e3903><e3904><e3905><e3906><e3907><e3908><e3909><e3910><e3911><e3912><e3913><e3914><e3915><e3916><e3917><e3918><e3919><e3920><e3921><e3922><e3923><e3924><e3925><e3926><e3927><e3928><e3929><e3930><e3931><e3932><e3933><e3934><e3935><e3936><e3937><e3938><e3939><e3940><e3941><e3942><e3943><e3944><e3945><e3946><e3947><e3948><e3949><e3950><e3951><e3952><e3953><e3954><e3955><e3956><e3957><e3958><e3959><e3960><e3961><e3962><e3963><e3964><e3965><e3966><e3967><e3968><e3969><e3970><e3971><e3972><e3973><e3974><e3975><e3976><e3977><e3978><e3979><e3980><e3981><e3982><e3983><e3984><e3985><e3986><e3987><e3988><e3989><e3990><e3991><e3992><e3993><e3994><e3995><e3996><e3997><e3998><e3999><e4000><e4001><e4002><e4003><e4004><e4005><e4006><e4007><e4008><e4009><e4010><e4011><e4012><e4013><e4014><e4015><e4016><e4017><e4018><e4019><e4020><e4021><e4022><e4023><e4024><e4025><e4026><e4027><e4028><e4029><e4030><e4031><e4032><e4033><e4034><e4035><e4036><e4037><e4038><e4039><e4040><e4041><e4042><e4043><e4044><e4045><e4046><e4047><e4048><e4049><e4050><e4051><e4052><e4053><e4054><e4055><e4056><e4057><e4058><e4059><e4060><e4061><e4062><e4063><e4064><e4065><e4066><e4067><e4068><e4069><e4070><e4071><e4072><e4073><e4074><e4075><e4076><e4077><e4078><e4079><e4080><e4081><e4082><e4083><e4084><e4085><e4086><e4087><e4088><e4089><e4090><e4091><e4092><e4093><e4094><e4095><e4096><e4097><e4098><e4099><e4100><e4101><e4102><e4103><e4104><e4105><e4106><e4107><e4108><e4109><e4110><e4111><e4112><e4113><e4114><e4115><e4116><e4117><e4118><e4119><e4120><e4121><e4122><e4123><e4124><e4125><e4126><e4127><e4128><e4129><e4130><e4131><e4132><e4133><e4134><e4135><e4136><e4137><e4138><e4139><e4140><e4141><e4142><e4143><e4144><e4145><e4146><e4147><e4148><e4149><e4150><e4151><e4152><e4153><e4154><e4155><e4156><e4157><e4158><e4159><e4160><e4161><e4162><e4163><e4164><e4165><e4166><e4167><e4168><e4169><e4170><e4171><e4172><e4173><e4174><e4175><e4176><e4177><e4178><e4179><e4180><e4181><e4182><e4183><e4184><e4185><e4186><e4187><e4188><e4189><e4190><e4191><e4192><e4193><e4194><e4195><e4196><e4197><e4198><e4199><e4200><e4201><e4202><e4203><e4204><e4205><e4206><e4207><e4208><e4209><e4210><e4211><e4212><e4213><e4214><e4215><e4216><e4217><e4218><e4219><e4220><e4221><e4222><e4223><e4224><e4225><e4226><e4227><e4228><e4229><e4230><e4231><e4232><e4233><e4234><e4235><e4236><e4237><e4238><e4239><e4240><e4241><e4242><e4243><e4244><e4245><e4246><e4247><e4248><e4249><e4250><e4251><e4252><e4253><e4254><e4255><e4256><e4257><e4258><e4259><e4260><e4261><e4262><e4263><e4264><e4265><e4266><e4267><e4268><e4269><e4270><e4271><e4272><e4273><e4274><e4275><e4276><e4277><e4278><e4279><e4280><e4281><e4282><e4283><e4284><e4285><e4286><e4287><e4288><e4289><e4290><e4291><e4292><e4293><e4294><e4295><e4296><e4297><e4298><e4299><e4300><e4301><e4302><e4303><e4304><e4305><e4306><e4307><e4308><e4309><e4310><e4311><e4312><e4313><e4314><e4315><e4316><e4317><e4318><e4319><e4320><e4321><e4322><e4323><e4324><e4325><e4326><e4327><e4328><e4329><e4330><e4331><e4332><e4333><e4334><e4335><e4336><e4337><e4338><e4339><e4340><e4341><e4342><e4343><e4344><e4345><e4346><e4347><e4348><e4349><e4350><e4351><e4352><e4353><e4354><e4355><e4356><e4357><e4358><e4359><e4360><e4361><e4362><e4363><e4364><e4365><e4366><e4367><e4368><e4369><e4370><e4371><e4372><e4373><e4374><e4375><e4376><e4377><e4378><e4379><e4380><e4381><e4382><e4383><e4384><e4385><e4386><e4387><e4388><e4389><e4390><e4391><e4392><e4393><e4394><e4395><e4396><e4397><e4398><e4399><e4400><e4401><e4402><e4403><e4404><e4405><e4406><e4407><e4408><e4409><e4410><e4411><e4412><e4413><e4414><e4415><e4416><e4417><e4418><e4419><e4420><e4421><e4422><e4423><e4424><e4425><e4426><e4427><e4428><e4429><e4430><e4431><e4432><e4433><e4434><e4435><e4436><e4437><e4438><e4439><e4440><e4441><e4442><e4443><e4444><e4445><e4446><e4447><e4448><e4449><e4450><e4451><e4452><e4453><e4454><e4455><e4456><e4457><e4458><e4459><e4460><e4461><e4462><e4463><e4464><e4465><e4466><e4467><e4468><e4469><e4470><e4471><e4472><e4473><e4474><e4475><e4476><e4477><e4478><e4479><e4480><e4481><e4482><e4483><e4484><e4485><e4486><e4487><e4488><e4489><e4490><e4491><e4492><e4493><e4494><e4495><e4496><e4497><e4498><e4499><e4500><e4501><e4502><e4503><e4504><e4505><e4506><e4507><e4508><e4509><e4510><e4511><e4512><e4513><e4514><e4515><e4516><e4517><e4518><e4519><e4520><e4521><e4522><e4523><e4524><e4525><e4526><e4527><e4528><e4529><e4530><e4531><e4532><e4533><e4534><e4535><e4536><e4537><e4538><e4539><e4540><e4541><e4542><e4543><e4544><e4545><e4546><e4547><e4548><e4549><e4550><e4551><e4552><e4553><e4554><e4555><e4556><e4557><e4558><e4559><e4560><e4561><e4562><e4563><e4564><e4565><e4566><e4567><e4568><e4569><e4570><e4571><e4572><e4573><e4574><e4575><e4576><e4577><e4578><e4579><e4580><e4581><e4582><e4583><e4584><e4585><e4586><e4587><e4588><e4589><e4590><e4591><e4592><e4593><e4594><e4595><e4596><e4597><e4598><e4599><e4600><e4601><e4602><e4603><e4604><e4605><e4606><e4607><e4608><e4609><e4610><e4611><e4612><e4613><e4614><e4615><e4616><e4617><e4618><e4619><e4620><e4621><e4622><e4623><e4624><e4625><e4626><e4627><e4628><e4629><e4630><e4631><e4632><e4633><e4634><e4635><e4636><e4637><e4638><e4639><e4640><e4641><e4642><e4643><e4644><e4645><e4646><e4647><e4648><e4649><e4650><e4651><e4652><e4653><e4654><e4655><e4656><e4657><e4658><e4659><e4660><e4661><e4662><e4663><e4664><e4665><e4666><e4667><e4668><e4669><e4670><e4671><e4672><e4673><e4674><e4675><e4676><e4677><e4678><e4679><e4680><e4681><e4682><e4683><e4684><e4685><e4686><e4687><e4688><e4689><e4690><e4691><e4692><e4693><e4694><e4695><e4696><e4697><e4698><e4699><e4700><e4701><e4702><e4703><e4704><e4705><e4706><e4707><e4708><e4709><e4710><e4711><e4712><e4713><e4714><e4715><e4716><e4717><e4718><e4719><e4720><e4721><e4722><e4723><e4724><e4725><e4726><e4727><e4728><e4729><e4730><e4731><e4732><e4733><e4734><e4735><e4736><e4737><e4738><e4739><e4740><e4741><e4742><e4743><e4744><e4745><e4746><e4747><e4748><e4749><e4750><e4751><e4752><e4753><e4754><e4755><e4756><e4757><e4758><e4759><e4760><e4761><e4762><e4763><e4764><e4765><e4766><e4767><e4768><e4769><e4770><e4771><e4772><e4773><e4774><e4775><e4776><e4777><e4778><e4779><e4780><e4781><e4782><e4783><e4784><e4785><e4786><e4787><e4788><e4789><e4790><e4791><e4792><e4793><e4794><e4795><e4796><e4797><e4798><e4799><e4800><e4801><e4802><e4803><e4804><e4805><e4806><e4807><e4808><e4809><e4810><e4811><e4812><e4813><e4814><e4815><e4816><e4817><e4818><e4819><e4820><e4821><e4822><e4823><e4824><e4825><e4826><e4827><e4828><e4829><e4830><e4831><e4832><e4833><e4834><e4835><e4836><e4837><e4838><e4839><e4840><e4841><e4842><e4843><e4844><e4845><e4846><e4847><e4848><e4849><e4850><e4851><e4852><e4853><e4854><e4855><e4856><e4857><e4858><e4859><e4860><e4861><e4862><e4863><e4864><e4865><e4866><e4867><e4868><e4869><e4870><e4871><e4872><e4873><e4874><e4875><e4876><e4877><e4878><e4879><e4880><e4881><e4882><e4883><e4884><e4885><e4886><e4887><e4888><e4889><e4890><e4891><e4892><e4893><e4894><e4895><e4896><e4897><e4898><e4899><e4900><e4901><e4902><e4903><e4904><e4905><e4906><e4907><e4908><e4909><e4910><e4911><e4912><e4913><e4914><e4915><e4916><e4917><e4918><e4919><e4920><e4921><e4922><e4923><e4924><e4925><e4926><e4927><e4928><e4929><e4930><e4931><e4932><e4933><e4934><e4935><e4936><e4937><e4938><e4939><e4940><e4941><e4942><e4943><e4944><e4945><e4946><e4947><e4948><e4949><e4950><e4951><e4952><e4953><e4954><e4955><e4956><e4957><e4958><e4959><e4960><e4961><e4962><e4963><e4964><e4965><e4966><e4967><e4968><e4969><e4970><e4971><e4972><e4973><e4974><e4975><e4976><e4977><e4978><e4979><e4980><e4981><e4982><e4983><e4984><e4985><e4986><e4987><e4988><e4989><e4990><e4991><e4992><e4993><e4994><e4995><e4996><e4997><e4998><e4999><e5000><e5001><e5002><e5003><e5004><e5005><e5006><e5007><e5008><e5009><e5010><e5011><e5012><e5013><e5014><e5015><e5016><e5017><e5018><e5019><e5020><e5021><e5022><e5023><e5024><e5025><e5026><e5027><e5028><e5029><e5030><e5031><e5032><e5033><e5034><e5035><e5036><e5037><e5038><e5039><e5040><e5041><e5042><e5043><e5044><e5045><e5046><e5047><e5048><e5049><e5050><e5051><e5052><e5053><e5054><e5055><e5056><e5057><e5058><e5059><e5060><e5061><e5062><e5063><e5064><e5065><e5066><e5067><e5068><e5069><e5070><e5071><e5072><e5073><e5074><e5075><e5076><e5077><e5078><e5079><e5080><e5081><e5082><e5083><e5084><e5085><e5086><e5087><e5088><e5089><e5090><e5091><e5092><e5093><e5094><e5095><e5096><e5097><e5098><e5099><e5100><e5101><e5102><e5103><e5104><e5105><e5106><e5107><e5108><e5109><e5110><e5111><e5112><e5113><e5114><e5115><e5116><e5117><e5118><e5119><e5120><e5121><e5122><e5123><e5124><e5125><e5126><e5127><e5128><e5129><e5130><e5131><e5132><e5133><e5134><e5135><e5136><e5137><e5138><e5139><e5140><e5141><e5142><e5143><e5144><e5145><e5146><e5147><e5148><e5149><e5150><e5151><e5152><e5153><e5154><e5155><e5156><e5157><e5158><e5159><e5160><e5161><e5162><e5163><e5164><e5165><e5166><e5167><e5168><e5169><e5170><e5171><e5172><e5173><e5174><e5175><e5176><e5177><e5178><e5179><e5180><e5181><e5182><e5183><e5184><e5185><e5186><e5187><e5188><e5189><e5190><e5191><e5192><e5193><e5194><e5195><e5196><e5197><e5198><e5199><e5200><e5201><e5202><e5203><e5204><e5205><e5206><e5207><e5208><e5209><e5210><e5211><e5212><e5213><e5214><e5215><e5216><e5217><e5218><e5219><e5220><e5221><e5222><e5223><e5224><e5225><e5226><e5227><e5228><e5229><e5230><e5231><e5232><e5233><e5234><e5235><e5236><e5237><e5238><e5239><e5240><e5241><e5242><e5243><e5244><e5245><e5246><e5247><e5248><e5249><e5250><e5251><e5252><e5253><e5254><e5255><e5256><e5257><e5258><e5259><e5260><e5261><e5262><e5263><e5264><e5265><e5266><e5267><e5268><e5269><e5270><e5271><e5272><e5273><e5274><e5275><e5276><e5277><e5278><e5279><e5280><e5281><e5282><e5283><e5284><e5285><e5286><e5287><e5288><e5289><e5290><e5291><e5292><e5293><e5294><e5295><e5296><e5297><e5298><e5299><e5300><e5301><e5302><e5303><e5304><e5305><e5306><e5307><e5308><e5309><e5310><e5311><e5312><e5313><e5314><e5315><e5316><e5317><e5318><e5319><e5320><e5321><e5322><e5323><e5324><e5325><e5326><e5327><e5328><e5329><e5330><e5331><e5332><e5333><e5334><e5335><e5336><e5337><e5338><e5339><e5340><e5341><e5342><e5343><e5344><e5345><e5346><e5347><e5348><e5349><e5350><e5351><e5352><e5353><e5354><e5355><e5356><e5357><e5358><e5359><e5360><e5361><e5362><e5363><e5364><e5365><e5366><e5367><e5368><e5369><e5370><e5371><e5372><e5373><e5374><e5375><e5376><e5377><e5378><e5379><e5380><e5381><e5382><e5383><e5384><e5385><e5386><e5387><e5388><e5389><e5390><e5391><e5392><e5393><e5394><e5395><e5396><e5397><e5398><e5399><e5400><e5401><e5402><e5403><e5404><e5405><e5406><e5407><e5408><e5409><e5410><e5411><e5412><e5413><e5414><e5415><e5416><e5417><e5418><e5419><e5420><e5421><e5422><e5423><e5424><e5425><e5426><e5427><e5428><e5429><e5430><e5431><e5432><e5433><e5434><e5435><e5436><e5437><e5438><e5439><e5440><e5441><e5442><e5443><e5444><e5445><e5446><e5447><e5448><e5449><e5450><e5451><e5452><e5453><e5454><e5455><e5456><e5457><e5458><e5459><e5460><e5461><e5462><e5463><e5464><e5465><e5466><e5467><e5468><e5469><e5470><e5471><e5472><e5473><e5474><e5475><e5476><e5477><e5478><e5479><e5480><e5481><e5482><e5483><e5484><e5485><e5486><e5487><e5488><e5489><e5490><e5491><e5492><e5493><e5494><e5495><e5496><e5497><e5498><e5499><e5500><e5501><e5502><e5503><e5504><e5505><e5506><e5507><e5508><e5509><e5510><e5511><e5512><e5513><e5514><e5515><e5516><e5517><e5518><e5519><e5520><e5521><e5522><e5523><e5524><e5525><e5526><e5527><e5528><e5529><e5530><e5531><e5532><e5533><e5534><e5535><e5536><e5537><e5538><e5539><e5540><e5541><e5542><e5543><e5544><e5545><e5546><e5547><e5548><e5549><e5550><e5551><e5552><e5553><e5554><e5555><e5556><e5557><e5558><e5559><e5560><e5561><e5562><e5563><e5564><e5565><e5566><e5567><e5568><e5569><e5570><e5571><e5572><e5573><e5574><e5575><e5576><e5577><e5578><e5579><e5580><e5581><e5582><e5583><e5584><e5585><e5586><e5587><e5588><e5589><e5590><e5591><e5592><e5593><e5594><e5595><e5596><e5597><e5598><e5599><e5600><e5601><e5602><e5603><e5604><e5605><e5606><e5607><e5608><e5609><e5610><e5611><e5612><e5613><e5614><e5615><e5616><e5617><e5618><e5619><e5620><e5621><e5622><e5623><e5624><e5625><e5626><e5627><e5628><e5629><e5630><e5631><e5632><e5633><e5634><e5635><e5636><e5637><e5638><e5639><e5640><e5641><e5642><e5643><e5644><e5645><e5646><e5647><e5648><e5649><e5650><e5651><e5652><e5653><e5654><e5655><e5656><e5657><e5658><e5659><e5660><e5661><e5662><e5663><e5664><e5665><e5666><e5667><e5668><e5669><e5670><e5671><e5672><e5673><e5674><e5675><e5676><e5677><e5678><e5679><e5680><e5681><e5682><e5683><e5684><e5685><e5686><e5687><e5688><e5689><e5690><e5691><e5692><e5693><e5694><e5695><e5696><e5697><e5698><e5699><e5700><e5701><e5702><e5703><e5704><e5705><e5706><e5707><e5708><e5709><e5710><e5711><e5712><e5713><e5714><e5715><e5716><e5717><e5718><e5719><e5720><e5721><e5722><e5723><e5724><e5725><e5726><e5727><e5728><e5729><e5730><e5731><e5732><e5733><e5734><e5735><e5736><e5737><e5738><e5739><e5740><e5741><e5742><e5743><e5744><e5745><e5746><e5747><e5748><e5749><e5750><e5751><e5752><e5753><e5754><e5755><e5756><e5757><e5758><e5759><e5760><e5761><e5762><e5763><e5764><e5765><e5766><e5767><e5768><e5769><e5770><e5771><e5772><e5773><e5774><e5775><e5776><e5777><e5778><e5779><e5780><e5781><e5782><e5783><e5784><e5785><e5786><e5787><e5788><e5789><e5790><e5791><e5792><e5793><e5794><e5795><e5796><e5797><e5798><e5799><e5800><e5801><e5802><e5803><e5804><e5805><e5806><e5807><e5808><e5809><e5810><e5811><e5812><e5813><e5814><e5815><e5816><e5817><e5818><e5819><e5820><e5821><e5822><e5823><e5824><e5825><e5826><e5827><e5828><e5829><e5830><e5831><e5832><e5833><e5834><e5835><e5836><e5837><e5838><e5839><e5840><e5841><e5842><e5843><e5844><e5845><e5846><e5847><e5848><e5849><e5850><e5851><e5852><e5853><e5854><e5855><e5856><e5857><e5858><e5859><e5860><e5861><e5862><e5863><e5864><e5865><e5866><e5867><e5868><e5869><e5870><e5871><e5872><e5873><e5874><e5875><e5876><e5877><e5878><e5879><e5880><e5881><e5882><e5883><e5884><e5885><e5886><e5887><e5888><e5889><e5890><e5891><e5892><e5893><e5894><e5895><e5896><e5897><e5898><e5899><e5900><e5901><e5902><e5903><e5904><e5905><e5906><e5907><e5908><e5909><e5910><e5911><e5912><e5913><e5914><e5915><e5916><e5917><e5918><e5919><e5920><e5921><e5922><e5923><e5924><e5925><e5926><e5927><e5928><e5929><e5930><e5931><e5932><e5933><e5934><e5935><e5936><e5937><e5938><e5939><e5940><e5941><e5942><e5943><e5944><e5945><e5946><e5947><e5948><e5949><e5950><e5951><e5952><e5953><e5954><e5955><e5956><e5957><e5958><e5959><e5960><e5961><e5962><e5963><e5964><e5965><e5966><e5967><e5968><e5969><e5970><e5971><e5972><e5973><e5974><e5975><e5976><e5977><e5978><e5979><e5980><e5981><e5982><e5983><e5984><e5985><e5986><e5987><e5988><e5989><e5990><e5991><e5992><e5993><e5994><e5995><e5996><e5997><e5998><e5999><e6000><e6001><e6002><e6003><e6004><e6005><e6006><e6007><e6008><e6009><e6010><e6011><e6012><e6013><e6014><e6015><e6016><e6017><e6018><e6019><e6020><e6021><e6022><e6023><e6024><e6025><e6026><e6027><e6028><e6029><e6030><e6031><e6032><e6033><e6034><e6035><e6036><e6037><e6038><e6039><e6040><e6041><e6042><e6043><e6044><e6045><e6046><e6047><e6048><e6049><e6050><e6051><e6052><e6053><e6054><e6055><e6056><e6057><e6058><e6059><e6060><e6061><e6062><e6063><e6064><e6065><e6066><e6067><e6068><e6069><e6070><e6071><e6072><e6073><e6074><e6075><e6076><e6077><e6078><e6079><e6080><e6081><e6082><e6083><e6084><e6085><e6086><e6087><e6088><e6089><e6090><e6091><e6092><e6093><e6094><e6095><e6096><e6097><e6098><e6099><e6100><e6101><e6102><e6103><e6104><e6105><e6106><e6107><e6108><e6109><e6110><e6111><e6112><e6113><e6114><e6115><e6116><e6117><e6118><e6119><e6120><e6121><e6122><e6123><e6124><e6125><e6126><e6127><e6128><e6129><e6130><e6131><e6132><e6133><e6134><e6135><e6136><e6137><e6138><e6139><e6140><e6141><e6142><e6143><e6144><e6145><e6146><e6147><e6148><e6149><e6150><e6151><e6152><e6153><e6154><e6155><e6156><e6157><e6158><e6159><e6160><e6161><e6162><e6163><e6164><e6165><e6166><e6167><e6168><e6169><e6170><e6171><e6172><e6173><e6174><e6175><e6176><e6177><e6178><e6179><e6180><e6181><e6182><e6183><e6184><e6185><e6186><e6187><e6188><e6189><e6190><e6191><e6192><e6193><e6194><e6195><e6196><e6197><e6198><e6199><e6200><e6201><e6202><e6203><e6204><e6205><e6206><e6207><e6208><e6209><e6210><e6211><e6212><e6213><e6214><e6215><e6216><e6217><e6218><e6219><e6220><e6221><e6222><e6223><e6224><e6225><e6226><e6227><e6228><e6229><e6230><e6231><e6232><e6233><e6234><e6235><e6236><e6237><e6238><e6239><e6240><e6241><e6242><e6243><e6244><e6245><e6246><e6247><e6248><e6249><e6250><e6251><e6252><e6253><e6254><e6255><e6256><e6257><e6258><e6259><e6260><e6261><e6262><e6263><e6264><e6265><e6266><e6267><e6268><e6269><e6270><e6271><e6272><e6273><e6274><e6275><e6276><e6277><e6278><e6279><e6280><e6281><e6282><e6283><e6284><e6285><e6286><e6287><e6288><e6289><e6290><e6291><e6292><e6293><e6294><e6295><e6296><e6297><e6298><e6299><e6300><e6301><e6302><e6303><e6304><e6305><e6306><e6307><e6308><e6309><e6310><e6311><e6312><e6313><e6314><e6315><e6316><e6317><e6318><e6319><e6320><e6321><e6322><e6323><e6324><e6325><e6326><e6327><e6328><e6329><e6330><e6331><e6332><e6333><e6334><e6335><e6336><e6337><e6338><e6339><e6340><e6341><e6342><e6343><e6344><e6345><e6346><e6347><e6348><e6349><e6350><e6351><e6352><e6353><e6354><e6355><e6356><e6357><e6358><e6359><e6360><e6361><e6362><e6363><e6364><e6365><e6366><e6367><e6368><e6369><e6370><e6371><e6372><e6373><e6374><e6375><e6376><e6377><e6378><e6379><e6380><e6381><e6382><e6383><e6384><e6385><e6386><e6387><e6388><e6389><e6390><e6391><e6392><e6393><e6394><e6395><e6396><e6397><e6398><e6399><e6400><e6401><e6402><e6403><e6404><e6405><e6406><e6407><e6408><e6409><e6410><e6411><e6412><e6413><e6414><e6415><e6416><e6417><e6418><e6419><e6420><e6421><e6422><e6423><e6424><e6425><e6426><e6427><e6428><e6429><e6430><e6431><e6432><e6433><e6434><e6435><e6436><e6437><e6438><e6439><e6440><e6441><e6442><e6443><e6444><e6445><e6446><e6447><e6448><e6449><e6450><e6451><e6452><e6453><e6454><e6455><e6456><e6457><e6458><e6459><e6460><e6461><e6462><e6463><e6464><e6465><e6466><e6467><e6468><e6469><e6470><e6471><e6472><e6473><e6474><e6475><e6476><e6477><e6478><e6479><e6480><e6481><e6482><e6483><e6484><e6485><e6486><e6487><e6488><e6489><e6490><e6491><e6492><e6493><e6494><e6495><e6496><e6497><e6498><e6499><e6500><e6501><e6502><e6503><e6504><e6505><e6506><e6507><e6508><e6509><e6510><e6511><e6512><e6513><e6514><e6515><e6516><e6517><e6518><e6519><e6520><e6521><e6522><e6523><e6524><e6525><e6526><e6527><e6528><e6529><e6530><e6531><e6532><e6533><e6534><e6535><e6536><e6537><e6538><e6539><e6540><e6541><e6542><e6543><e6544><e6545><e6546><e6547><e6548><e6549><e6550><e6551><e6552><e6553><e6554><e6555><e6556><e6557><e6558><e6559><e6560><e6561><e6562><e6563><e6564><e6565><e6566><e6567><e6568><e6569><e6570><e6571><e6572><e6573><e6574><e6575><e6576><e6577><e6578><e6579><e6580><e6581><e6582><e6583><e6584><e6585><e6586><e6587><e6588><e6589><e6590><e6591><e6592><e6593><e6594><e6595><e6596><e6597><e6598><e6599><e6600><e6601><e6602><e6603><e6604><e6605><e6606><e6607><e6608><e6609><e6610><e6611><e6612><e6613><e6614><e6615><e6616><e6617><e6618><e6619><e6620><e6621><e6622><e6623><e6624><e6625><e6626><e6627><e6628><e6629><e6630><e6631><e6632><e6633><e6634><e6635><e6636><e6637><e6638><e6639><e6640><e6641><e6642><e6643><e6644><e6645><e6646><e6647><e6648><e6649><e6650><e6651><e6652><e6653><e6654><e6655><e6656><e6657><e6658><e6659><e6660><e6661><e6662><e6663><e6664><e6665><e6666><e6667><e6668><e6669><e6670><e6671><e6672><e6673><e6674><e6675><e6676><e6677><e6678><e6679><e6680><e6681><e6682><e6683><e6684><e6685><e6686><e6687><e6688><e6689><e6690><e6691><e6692><e6693><e6694><e6695><e6696><e6697><e6698><e6699><e6700><e6701><e6702><e6703><e6704><e6705><e6706><e6707><e6708><e6709><e6710><e6711><e6712><e6713><e6714><e6715><e6716><e6717><e6718><e6719><e6720><e6721><e6722><e6723><e6724><e6725><e6726><e6727><e6728><e6729><e6730><e6731><e6732><e6733><e6734><e6735><e6736><e6737><e6738><e6739><e6740><e6741><e6742><e6743><e6744><e6745><e6746><e6747><e6748><e6749><e6750><e6751><e6752><e6753><e6754><e6755><e6756><e6757><e6758><e6759><e6760><e6761><e6762><e6763><e6764><e6765><e6766><e6767><e6768><e6769><e6770><e6771><e6772><e6773><e6774><e6775><e6776><e6777><e6778><e6779><e6780><e6781><e6782><e6783><e6784><e6785><e6786><e6787><e6788><e6789><e6790><e6791><e6792><e6793><e6794><e6795><e6796><e6797><e6798><e6799><e6800><e6801><e6802><e6803><e6804><e6805><e6806><e6807><e6808><e6809><e6810><e6811><e6812><e6813><e6814><e6815><e6816><e6817><e6818><e6819><e6820><e6821><e6822><e6823><e6824><e6825><e6826><e6827><e6828><e6829><e6830><e6831><e6832><e6833><e6834><e6835><e6836><e6837><e6838><e6839><e6840><e6841><e6842><e6843><e6844><e6845><e6846><e6847><e6848><e6849><e6850><e6851><e6852><e6853><e6854><e6855><e6856><e6857><e6858><e6859><e6860><e6861><e6862><e6863><e6864><e6865><e6866><e6867><e6868><e6869><e6870><e6871><e6872><e6873><e6874><e6875><e6876><e6877><e6878><e6879><e6880><e6881><e6882><e6883><e6884><e6885><e6886><e6887><e6888><e6889><e6890><e6891><e6892><e6893><e6894><e6895><e6896><e6897><e6898><e6899><e6900><e6901><e6902><e6903><e6904><e6905><e6906><e6907><e6908><e6909><e6910><e6911><e6912><e6913><e6914><e6915><e6916><e6917><e6918><e6919><e6920><e6921><e6922><e6923><e6924><e6925><e6926><e6927><e6928><e6929><e6930><e6931><e6932><e6933><e6934><e6935><e6936><e6937><e6938><e6939><e6940><e6941><e6942><e6943><e6944><e6945><e6946><e6947><e6948><e6949><e6950><e6951><e6952><e6953><e6954><e6955><e6956><e6957><e6958><e6959><e6960><e6961><e6962><e6963><e6964><e6965><e6966><e6967><e6968><e6969><e6970><e6971><e6972><e6973><e6974><e6975><e6976><e6977><e6978><e6979><e6980><e6981><e6982><e6983><e6984><e6985><e6986><e6987><e6988><e6989><e6990><e6991><e6992><e6993><e6994><e6995><e6996><e6997><e6998><e6999><e7000><e7001><e7002><e7003><e7004><e7005><e7006><e7007><e7008><e7009><e7010><e7011><e7012><e7013><e7014><e7015><e7016><e7017><e7018><e7019><e7020><e7021><e7022><e7023><e7024><e7025><e7026><e7027><e7028><e7029><e7030><e7031><e7032><e7033><e7034><e7035><e7036><e7037><e7038><e7039><e7040><e7041><e7042><e7043><e7044><e7045><e7046><e7047><e7048><e7049><e7050><e7051><e7052><e7053><e7054><e7055><e7056><e7057><e7058><e7059><e7060><e7061><e7062><e7063><e7064><e7065><e7066><e7067><e7068><e7069><e7070><e7071><e7072><e7073><e7074><e7075><e7076><e7077><e7078><e7079><e7080><e7081><e7082><e7083><e7084><e7085><e7086><e7087><e7088><e7089><e7090><e7091><e7092><e7093><e7094><e7095><e7096><e7097><e7098><e7099><e7100><e7101><e7102><e7103><e7104><e7105><e7106><e7107><e7108><e7109><e7110><e7111><e7112><e7113><e7114><e7115><e7116><e7117><e7118><e7119><e7120><e7121><e7122><e7123><e7124><e7125><e7126><e7127><e7128><e7129><e7130><e7131><e7132><e7133><e7134><e7135><e7136><e7137><e7138><e7139><e7140><e7141><e7142><e7143><e7144><e7145><e7146><e7147><e7148><e7149><e7150><e7151><e7152><e7153><e7154><e7155><e7156><e7157><e7158><e7159><e7160><e7161><e7162><e7163><e7164><e7165><e7166><e7167><e7168><e7169><e7170><e7171><e7172><e7173><e7174><e7175><e7176><e7177><e7178><e7179><e7180><e7181><e7182><e7183><e7184><e7185><e7186><e7187><e7188><e7189><e7190><e7191><e7192><e7193><e7194><e7195><e7196><e7197><e7198><e7199><e7200><e7201><e7202><e7203><e7204><e7205><e7206><e7207><e7208><e7209><e7210><e7211><e7212><e7213><e7214><e7215><e7216><e7217><e7218><e7219><e7220><e7221><e7222><e7223><e7224><e7225><e7226><e7227><e7228><e7229><e7230><e7231><e7232><e7233><e7234><e7235><e7236><e7237><e7238><e7239><e7240><e7241><e7242><e7243><e7244><e7245><e7246><e7247><e7248><e7249><e7250><e7251><e7252><e7253><e7254><e7255><e7256><e7257><e7258><e7259><e7260><e7261><e7262><e7263><e7264><e7265><e7266><e7267><e7268><e7269><e7270><e7271><e7272><e7273><e7274><e7275><e7276><e7277><e7278><e7279><e7280><e7281><e7282><e7283><e7284><e7285><e7286><e7287><e7288><e7289><e7290><e7291><e7292><e7293><e7294><e7295><e7296><e7297><e7298><e7299><e7300><e7301><e7302><e7303><e7304><e7305><e7306><e7307><e7308><e7309><e7310><e7311><e7312><e7313><e7314><e7315><e7316><e7317><e7318><e7319><e7320><e7321><e7322><e7323><e7324><e7325><e7326><e7327><e7328><e7329><e7330><e7331><e7332><e7333><e7334><e7335><e7336><e7337><e7338><e7339><e7340><e7341><e7342><e7343><e7344><e7345><e7346><e7347><e7348><e7349><e7350><e7351><e7352><e7353><e7354><e7355><e7356><e7357><e7358><e7359><e7360><e7361><e7362><e7363><e7364><e7365><e7366><e7367><e7368><e7369><e7370><e7371><e7372><e7373><e7374><e7375><e7376><e7377><e7378><e7379><e7380><e7381><e7382><e7383><e7384><e7385><e7386><e7387><e7388><e7389><e7390><e7391><e7392><e7393><e7394><e7395><e7396><e7397><e7398><e7399><e7400><e7401><e7402><e7403><e7404><e7405><e7406><e7407><e7408><e7409><e7410><e7411><e7412><e7413><e7414><e7415><e7416><e7417><e7418><e7419><e7420><e7421><e7422><e7423><e7424><e7425><e7426><e7427><e7428><e7429><e7430><e7431><e7432><e7433><e7434><e7435><e7436><e7437><e7438><e7439><e7440><e7441><e7442><e7443><e7444><e7445><e7446><e7447><e7448><e7449><e7450><e7451><e7452><e7453><e7454><e7455><e7456><e7457><e7458><e7459><e7460><e7461><e7462><e7463><e7464><e7465><e7466><e7467><e7468><e7469><e7470><e7471><e7472><e7473><e7474><e7475><e7476><e7477><e7478><e7479><e7480><e7481><e7482><e7483><e7484><e7485><e7486><e7487><e7488><e7489><e7490><e7491><e7492><e7493><e7494><e7495><e7496><e7497><e7498><e7499><e7500><e7501><e7502><e7503><e7504><e7505><e7506><e7507><e7508><e7509><e7510><e7511><e7512><e7513><e7514><e7515><e7516><e7517><e7518><e7519><e7520><e7521><e7522><e7523><e7524><e7525><e7526><e7527><e7528><e7529><e7530><e7531><e7532><e7533><e7534><e7535><e7536><e7537><e7538><e7539><e7540><e7541><e7542><e7543><e7544><e7545><e7546><e7547><e7548><e7549><e7550><e7551><e7552><e7553><e7554><e7555><e7556><e7557><e7558><e7559><e7560><e7561><e7562><e7563><e7564><e7565><e7566><e7567><e7568><e7569><e7570><e7571><e7572><e7573><e7574><e7575><e7576><e7577><e7578><e7579><e7580><e7581><e7582><e7583><e7584><e7585><e7586><e7587><e7588><e7589><e7590><e7591><e7592><e7593><e7594><e7595><e7596><e7597><e7598><e7599><e7600><e7601><e7602><e7603><e7604><e7605><e7606><e7607><e7608><e7609><e7610><e7611><e7612><e7613><e7614><e7615><e7616><e7617><e7618><e7619><e7620><e7621><e7622><e7623><e7624><e7625><e7626><e7627><e7628><e7629><e7630><e7631><e7632><e7633><e7634><e7635><e7636><e7637><e7638><e7639><e7640><e7641><e7642><e7643><e7644><e7645><e7646><e7647><e7648><e7649><e7650><e7651><e7652><e7653><e7654><e7655><e7656><e7657><e7658><e7659><e7660><e7661><e7662><e7663><e7664><e7665><e7666><e7667><e7668><e7669><e7670><e7671><e7672><e7673><e7674><e7675><e7676><e7677><e7678><e7679><e7680><e7681><e7682><e7683><e7684><e7685><e7686><e7687><e7688><e7689><e7690><e7691><e7692><e7693><e7694><e7695><e7696><e7697><e7698><e7699><e7700><e7701><e7702><e7703><e7704><e7705><e7706><e7707><e7708><e7709><e7710><e7711><e7712><e7713><e7714><e7715><e7716><e7717><e7718><e7719><e7720><e7721><e7722><e7723><e7724><e7725><e7726><e7727><e7728><e7729><e7730><e7731><e7732><e7733><e7734><e7735><e7736><e7737><e7738><e7739><e7740><e7741><e7742><e7743><e7744><e7745><e7746><e7747><e7748><e7749><e7750><e7751><e7752><e7753><e7754><e7755><e7756><e7757><e7758><e7759><e7760><e7761><e7762><e7763><e7764><e7765><e7766><e7767><e7768><e7769><e7770><e7771><e7772><e7773><e7774><e7775><e7776><e7777><e7778><e7779><e7780><e7781><e7782><e7783><e7784><e7785><e7786><e7787><e7788><e7789><e7790><e7791><e7792><e7793><e7794><e7795><e7796><e7797><e7798><e7799><e7800><e7801><e7802><e7803><e7804><e7805><e7806><e7807><e7808><e7809><e7810><e7811><e7812><e7813><e7814><e7815><e7816><e7817><e7818><e7819><e7820><e7821><e7822><e7823><e7824><e7825><e7826><e7827><e7828><e7829><e7830><e7831><e7832><e7833><e7834><e7835><e7836><e7837><e7838><e7839><e7840><e7841><e7842><e7843><e7844><e7845><e7846><e7847><e7848><e7849><e7850><e7851><e7852><e7853><e7854><e7855><e7856><e7857><e7858><e7859><e7860><e7861><e7862><e7863><e7864><e7865><e7866><e7867><e7868><e7869><e7870><e7871><e7872><e7873><e7874><e7875><e7876><e7877><e7878><e7879><e7880><e7881><e7882><e7883><e7884><e7885><e7886><e7887><e7888><e7889><e7890><e7891><e7892><e7893><e7894><e7895><e7896><e7897><e7898><e7899><e7900><e7901><e7902><e7903><e7904><e7905><e7906><e7907><e7908><e7909><e7910><e7911><e7912><e7913><e7914><e7915><e7916><e7917><e7918><e7919><e7920><e7921><e7922><e7923><e7924><e7925><e7926><e7927><e7928><e7929><e7930><e7931><e7932><e7933><e7934><e7935><e7936><e7937><e7938><e7939><e7940><e7941><e7942><e7943><e7944><e7945><e7946><e7947><e7948><e7949><e7950><e7951><e7952><e7953><e7954><e7955><e7956><e7957><e7958><e7959><e7960><e7961><e7962><e7963><e7964><e7965><e7966><e7967><e7968><e7969><e7970><e7971><e7972><e7973><e7974><e7975><e7976><e7977><e7978><e7979><e7980><e7981><e7982><e7983><e7984><e7985><e7986><e7987><e7988><e7989><e7990><e7991><e7992><e7993><e7994><e7995><e7996><e7997><e7998><e7999><e8000><e8001><e8002><e8003><e8004><e8005><e8006><e8007><e8008><e8009><e8010><e8011><e8012><e8013><e8014><e8015><e8016><e8017><e8018><e8019><e8020><e8021><e8022><e8023><e8024><e8025><e8026><e8027><e8028><e8029><e8030><e8031><e8032><e8033><e8034><e8035><e8036><e8037><e8038><e8039><e8040><e8041><e8042><e8043><e8044><e8045><e8046><e8047><e8048><e8049><e8050><e8051><e8052><e8053><e8054><e8055><e8056><e8057><e8058><e8059><e8060><e8061><e8062><e8063><e8064><e8065><e8066><e8067><e8068><e8069><e8070><e8071><e8072><e8073><e8074><e8075><e8076><e8077><e8078><e8079><e8080><e8081><e8082><e8083><e8084><e8085><e8086><e8087><e8088><e8089><e8090><e8091><e8092><e8093><e8094><e8095><e8096><e8097><e8098><e8099><e8100><e8101><e8102><e8103><e8104><e8105><e8106><e8107><e8108><e8109><e8110><e8111><e8112><e8113><e8114><e8115><e8116><e8117><e8118><e8119><e8120><e8121><e8122><e8123><e8124><e8125><e8126><e8127><e8128><e8129><e8130><e8131><e8132><e8133><e8134><e8135><e8136><e8137><e8138><e8139><e8140><e8141><e8142><e8143><e8144><e8145><e8146><e8147><e8148><e8149><e8150><e8151><e8152><e8153><e8154><e8155><e8156><e8157><e8158><e8159><e8160><e8161><e8162><e8163><e8164><e8165><e8166><e8167><e8168><e8169><e8170><e8171><e8172><e8173><e8174><e8175><e8176><e8177><e8178><e8179><e8180><e8181><e8182><e8183><e8184><e8185><e8186><e8187><e8188><e8189><e8190><e8191><e8192><e8193><e8194><e8195><e8196><e8197><e8198><e8199><e8200><e8201><e8202><e8203><e8204><e8205><e8206><e8207><e8208><e8209><e8210><e8211><e8212><e8213><e8214><e8215><e8216><e8217><e8218><e8219><e8220><e8221><e8222><e8223><e8224><e8225><e8226><e8227><e8228><e8229><e8230><e8231><e8232><e8233><e8234><e8235><e8236><e8237><e8238><e8239><e8240><e8241><e8242><e8243><e8244><e8245><e8246><e8247><e8248><e8249><e8250><e8251><e8252><e8253><e8254><e8255><e8256><e8257><e8258><e8259><e8260><e8261><e8262><e8263><e8264><e8265><e8266><e8267><e8268><e8269><e8270><e8271><e8272><e8273><e8274><e8275><e8276><e8277><e8278><e8279><e8280><e8281><e8282><e8283><e8284><e8285><e8286><e8287><e8288><e8289><e8290><e8291><e8292><e8293><e8294><e8295><e8296><e8297><e8298><e8299><e8300><e8301><e8302><e8303><e8304><e8305><e8306><e8307><e8308><e8309><e8310><e8311><e8312><e8313><e8314><e8315><e8316><e8317><e8318><e8319><e8320><e8321><e8322><e8323><e8324><e8325><e8326><e8327><e8328><e8329><e8330><e8331><e8332><e8333><e8334><e8335><e8336><e8337><e8338><e8339><e8340><e8341><e8342><e8343><e8344><e8345><e8346><e8347><e8348><e8349><e8350><e8351><e8352><e8353><e8354><e8355><e8356><e8357><e8358><e8359><e8360><e8361><e8362><e8363><e8364><e8365><e8366><e8367><e8368><e8369><e8370><e8371><e8372><e8373><e8374><e8375><e8376><e8377><e8378><e8379><e8380><e8381><e8382><e8383><e8384><e8385><e8386><e8387><e8388><e8389><e8390><e8391><e8392><e8393><e8394><e8395><e8396><e8397><e8398><e8399><e8400><e8401><e8402><e8403><e8404><e8405><e8406><e8407><e8408><e8409><e8410><e8411><e8412><e8413><e8414><e8415><e8416><e8417><e8418><e8419><e8420><e8421><e8422><e8423><e8424><e8425><e8426><e8427><e8428><e8429><e8430><e8431><e8432><e8433><e8434><e8435><e8436><e8437><e8438><e8439><e8440><e8441><e8442><e8443><e8444><e8445><e8446><e8447><e8448><e8449><e8450><e8451><e8452><e8453><e8454><e8455><e8456><e8457><e8458><e8459><e8460><e8461><e8462><e8463><e8464><e8465><e8466><e8467><e8468><e8469><e8470><e8471><e8472><e8473><e8474><e8475><e8476><e8477><e8478><e8479><e8480><e8481><e8482><e8483><e8484><e8485><e8486><e8487><e8488><e8489><e8490><e8491><e8492><e8493><e8494><e8495><e8496><e8497><e8498><e8499><e8500><e8501><e8502><e8503><e8504><e8505><e8506><e8507><e8508><e8509><e8510><e8511><e8512><e8513><e8514><e8515><e8516><e8517><e8518><e8519><e8520><e8521><e8522><e8523><e8524><e8525><e8526><e8527><e8528><e8529><e8530><e8531><e8532><e8533><e8534><e8535><e8536><e8537><e8538><e8539><e8540><e8541><e8542><e8543><e8544><e8545><e8546><e8547><e8548><e8549><e8550><e8551><e8552><e8553><e8554><e8555><e8556><e8557><e8558><e8559><e8560><e8561><e8562><e8563><e8564><e8565><e8566><e8567><e8568><e8569><e8570><e8571><e8572><e8573><e8574><e8575><e8576><e8577><e8578><e8579><e8580><e8581><e8582><e8583><e8584><e8585><e8586><e8587><e8588><e8589><e8590><e8591><e8592><e8593><e8594><e8595><e8596><e8597><e8598><e8599><e8600><e8601><e8602><e8603><e8604><e8605><e8606><e8607><e8608><e8609><e8610><e8611><e8612><e8613><e8614><e8615><e8616><e8617><e8618><e8619><e8620><e8621><e8622><e8623><e8624><e8625><e8626><e8627><e8628><e8629><e8630><e8631><e8632><e8633><e8634><e8635><e8636><e8637><e8638><e8639><e8640><e8641><e8642><e8643><e8644><e8645><e8646><e8647><e8648><e8649><e8650><e8651><e8652><e8653><e8654><e8655><e8656><e8657><e8658><e8659><e8660><e8661><e8662><e8663><e8664><e8665><e8666><e8667><e8668><e8669><e8670><e8671><e8672><e8673><e8674><e8675><e8676><e8677><e8678><e8679><e8680><e8681><e8682><e8683><e8684><e8685><e8686><e8687><e8688><e8689><e8690><e8691><e8692><e8693><e8694><e8695><e8696><e8697><e8698><e8699><e8700><e8701><e8702><e8703><e8704><e8705><e8706><e8707><e8708><e8709><e8710><e8711><e8712><e8713><e8714><e8715><e8716><e8717><e8718><e8719><e8720><e8721><e8722><e8723><e8724><e8725><e8726><e8727><e8728><e8729><e8730><e8731><e8732><e8733><e8734><e8735><e8736><e8737><e8738><e8739><e8740><e8741><e8742><e8743><e8744><e8745><e8746><e8747><e8748><e8749><e8750><e8751><e8752><e8753><e8754><e8755><e8756><e8757><e8758><e8759><e8760><e8761><e8762><e8763><e8764><e8765><e8766><e8767><e8768><e8769><e8770><e8771><e8772><e8773><e8774><e8775><e8776><e8777><e8778><e8779><e8780><e8781><e8782><e8783><e8784><e8785><e8786><e8787><e8788><e8789><e8790><e8791><e8792><e8793><e8794><e8795><e8796><e8797><e8798><e8799><e8800><e8801><e8802><e8803><e8804><e8805><e8806><e8807><e8808><e8809><e8810><e8811><e8812><e8813><e8814><e8815><e8816><e8817><e8818><e8819><e8820><e8821><e8822><e8823><e8824><e8825><e8826><e8827><e8828><e8829><e8830><e8831><e8832><e8833><e8834><e8835><e8836><e8837><e8838><e8839><e8840><e8841><e8842><e8843><e8844><e8845><e8846><e8847><e8848><e8849><e8850><e8851><e8852><e8853><e8854><e8855><e8856><e8857><e8858><e8859><e8860><e8861><e8862><e8863><e8864><e8865><e8866><e8867><e8868><e8869><e8870><e8871><e8872><e8873><e8874><e8875><e8876><e8877><e8878><e8879><e8880><e8881><e8882><e8883><e8884><e8885><e8886><e8887><e8888><e8889><e8890><e8891><e8892><e8893><e8894><e8895><e8896><e8897><e8898><e8899><e8900><e8901><e8902><e8903><e8904><e8905><e8906><e8907><e8908><e8909><e8910><e8911><e8912><e8913><e8914><e8915><e8916><e8917><e8918><e8919><e8920><e8921><e8922><e8923><e8924><e8925><e8926><e8927><e8928><e8929><e8930><e8931><e8932><e8933><e8934><e8935><e8936><e8937><e8938><e8939><e8940><e8941><e8942><e8943><e8944><e8945><e8946><e8947><e8948><e8949><e8950><e8951><e8952><e8953><e8954><e8955><e8956><e8957><e8958><e8959><e8960><e8961><e8962><e8963><e8964><e8965><e8966><e8967><e8968><e8969><e8970><e8971><e8972><e8973><e8974><e8975><e8976><e8977><e8978><e8979><e8980><e8981><e8982><e8983><e8984><e8985><e8986><e8987><e8988><e8989><e8990><e8991><e8992><e8993><e8994><e8995><e8996><e8997><e8998><e8999><e9000><e9001><e9002><e9003><e9004><e9005><e9006><e9007><e9008><e9009><e9010><e9011><e9012><e9013><e9014><e9015><e9016><e9017><e9018><e9019><e9020><e9021><e9022><e9023><e9024><e9025><e9026><e9027><e9028><e9029><e9030><e9031><e9032><e9033><e9034><e9035><e9036><e9037><e9038><e9039><e9040><e9041><e9042><e9043><e9044><e9045><e9046><e9047><e9048><e9049><e9050><e9051><e9052><e9053><e9054><e9055><e9056><e9057><e9058><e9059><e9060><e9061><e9062><e9063><e9064><e9065><e9066><e9067><e9068><e9069><e9070><e9071><e9072><e9073><e9074><e9075><e9076><e9077><e9078><e9079><e9080><e9081><e9082><e9083><e9084><e9085><e9086><e9087><e9088><e9089><e9090><e9091><e9092><e9093><e9094><e9095><e9096><e9097><e9098><e9099><e9100><e9101><e9102><e9103><e9104><e9105><e9106><e9107><e9108><e9109><e9110><e9111><e9112><e9113><e9114><e9115><e9116><e9117><e9118><e9119><e9120><e9121><e9122><e9123><e9124><e9125><e9126><e9127><e9128><e9129><e9130><e9131><e9132><e9133><e9134><e9135><e9136><e9137><e9138><e9139><e9140><e9141><e9142><e9143><e9144><e9145><e9146><e9147><e9148><e9149><e9150><e9151><e9152><e9153><e9154><e9155><e9156><e9157><e9158><e9159><e9160><e9161><e9162><e9163><e9164><e9165><e9166><e9167><e9168><e9169><e9170><e9171><e9172><e9173><e9174><e9175><e9176><e9177><e9178><e9179><e9180><e9181><e9182><e9183><e9184><e9185><e9186><e9187><e9188><e9189><e9190><e9191><e9192><e9193><e9194><e9195><e9196><e9197><e9198><e9199><e9200><e9201><e9202><e9203><e9204><e9205><e9206><e9207><e9208><e9209><e9210><e9211><e9212><e9213><e9214><e9215><e9216><e9217><e9218><e9219><e9220><e9221><e9222><e9223><e9224><e9225><e9226><e9227><e9228><e9229><e9230><e9231><e9232><e9233><e9234><e9235><e9236><e9237><e9238><e9239><e9240><e9241><e9242><e9243><e9244><e9245><e9246><e9247><e9248><e9249><e9250><e9251><e9252><e9253><e9254><e9255><e9256><e9257><e9258><e9259><e9260><e9261><e9262><e9263><e9264><e9265><e9266><e9267><e9268><e9269><e9270><e9271><e9272><e9273><e9274><e9275><e9276><e9277><e9278><e9279><e9280><e9281><e9282><e9283><e9284><e9285><e9286><e9287><e9288><e9289><e9290><e9291><e9292><e9293><e9294><e9295><e9296><e9297><e9298><e9299><e9300><e9301><e9302><e9303><e9304><e9305><e9306><e9307><e9308><e9309><e9310><e9311><e9312><e9313><e9314><e9315><e9316><e9317><e9318><e9319><e9320><e9321><e9322><e9323><e9324><e9325><e9326><e9327><e9328><e9329><e9330><e9331><e9332><e9333><e9334><e9335><e9336><e9337><e9338><e9339><e9340><e9341><e9342><e9343><e9344><e9345><e9346><e9347><e9348><e9349><e9350><e9351><e9352><e9353><e9354><e9355><e9356><e9357><e9358><e9359><e9360><e9361><e9362><e9363><e9364><e9365><e9366><e9367><e9368><e9369><e9370><e9371><e9372><e9373><e9374><e9375><e9376><e9377><e9378><e9379><e9380><e9381><e9382><e9383><e9384><e9385><e9386><e9387><e9388><e9389><e9390><e9391><e9392><e9393><e9394><e9395><e9396><e9397><e9398><e9399><e9400><e9401><e9402><e9403><e9404><e9405><e9406><e9407><e9408><e9409><e9410><e9411><e9412><e9413><e9414><e9415><e9416><e9417><e9418><e9419><e9420><e9421><e9422><e9423><e9424><e9425><e9426><e9427><e9428><e9429><e9430><e9431><e9432><e9433><e9434><e9435><e9436><e9437><e9438><e9439><e9440><e9441><e9442><e9443><e9444><e9445><e9446><e9447><e9448><e9449><e9450><e9451><e9452><e9453><e9454><e9455><e9456><e9457><e9458><e9459><e9460><e9461><e9462><e9463><e9464><e9465><e9466><e9467><e9468><e9469><e9470><e9471><e9472><e9473><e9474><e9475><e9476><e9477><e9478><e9479><e9480><e9481><e9482><e9483><e9484><e9485><e9486><e9487><e9488><e9489><e9490><e9491><e9492><e9493><e9494><e9495><e9496><e9497><e9498><e9499><e9500><e9501><e9502><e9503><e9504><e9505><e9506><e9507><e9508><e9509><e9510><e9511><e9512><e9513><e9514><e9515><e9516><e9517><e9518><e9519><e9520><e9521><e9522><e9523><e9524><e9525><e9526><e9527><e9528><e9529><e9530><e9531><e9532><e9533><e9534><e9535><e9536><e9537><e9538><e9539><e9540><e9541><e9542><e9543><e9544><e9545><e9546><e9547><e9548><e9549><e9550><e9551><e9552><e9553><e9554><e9555><e9556><e9557><e9558><e9559><e9560><e9561><e9562><e9563><e9564><e9565><e9566><e9567><e9568><e9569><e9570><e9571><e9572><e9573><e9574><e9575><e9576><e9577><e9578><e9579><e9580><e9581><e9582><e9583><e9584><e9585><e9586><e9587><e9588><e9589><e9590><e9591><e9592><e9593><e9594><e9595><e9596><e9597><e9598><e9599><e9600><e9601><e9602><e9603><e9604><e9605><e9606><e9607><e9608><e9609><e9610><e9611><e9612><e9613><e9614><e9615><e9616><e9617><e9618><e9619><e9620><e9621><e9622><e9623><e9624><e9625><e9626><e9627><e9628><e9629><e9630><e9631><e9632><e9633><e9634><e9635><e9636><e9637><e9638><e9639><e9640><e9641><e9642><e9643><e9644><e9645><e9646><e9647><e9648><e9649><e9650><e9651><e9652><e9653><e9654><e9655><e9656><e9657><e9658><e9659><e9660><e9661><e9662><e9663><e9664><e9665><e9666><e9667><e9668><e9669><e9670><e9671><e9672><e9673><e9674><e9675><e9676><e9677><e9678><e9679><e9680><e9681><e9682><e9683><e9684><e9685><e9686><e9687><e9688><e9689><e9690><e9691><e9692><e9693><e9694><e9695><e9696><e9697><e9698><e9699><e9700><e9701><e9702><e9703><e9704><e9705><e9706><e9707><e9708><e9709><e9710><e9711><e9712><e9713><e9714><e9715><e9716><e9717><e9718><e9719><e9720><e9721><e9722><e9723><e9724><e9725><e9726><e9727><e9728><e9729><e9730><e9731><e9732><e9733><e9734><e9735><e9736><e9737><e9738><e9739><e9740><e9741><e9742><e9743><e9744><e9745><e9746><e9747><e9748><e9749><e9750><e9751><e9752><e9753><e9754><e9755><e9756><e9757><e9758><e9759><e9760><e9761><e9762><e9763><e9764><e9765><e9766><e9767><e9768><e9769><e9770><e9771><e9772><e9773><e9774><e9775><e9776><e9777><e9778><e9779><e9780><e9781><e9782><e9783><e9784><e9785><e9786><e9787><e9788><e9789><e9790><e9791><e9792><e9793><e9794><e9795><e9796><e9797><e9798><e9799><e9800><e9801><e9802><e9803><e9804><e9805><e9806><e9807><e9808><e9809><e9810><e9811><e9812><e9813><e9814><e9815><e9816><e9817><e9818><e9819><e9820><e9821><e9822><e9823><e9824><e9825><e9826><e9827><e9828><e9829><e9830><e9831><e9832><e9833><e9834><e9835><e9836><e9837><e9838><e9839><e9840><e9841><e9842><e9843><e9844><e9845><e9846><e9847><e9848><e9849><e9850><e9851><e9852><e9853><e9854><e9855><e9856><e9857><e9858><e9859><e9860><e9861><e9862><e9863><e9864><e9865><e9866><e9867><e9868><e9869><e9870><e9871><e9872><e9873><e9874><e9875><e9876><e9877><e9878><e9879><e9880><e9881><e9882><e9883><e9884><e9885><e9886><e9887><e9888><e9889><e9890><e9891><e9892><e9893><e9894><e9895><e9896><e9897><e9898><e9899><e9900><e9901><e9902><e9903><e9904><e9905><e9906><e9907><e9908><e9909><e9910><e9911><e9912><e9913><e9914><e9915><e9916><e9917><e9918><e9919><e9920><e9921><e9922><e9923><e9924><e9925><e9926><e9927><e9928><e9929><e9930><e9931><e9932><e9933><e9934><e9935><e9936><e9937><e9938><e9939><e9940><e9941><e9942><e9943><e9944><e9945><e9946><e9947><e9948><e9949><e9950><e9951><e9952><e9953><e9954><e9955><e9956><e9957><e9958><e9959><e9960><e9961><e9962><e9963><e9964><e9965><e9966><e9967><e9968><e9969><e9970><e9971><e9972><e9973><e9974><e9975><e9976><e9977><e9978><e9979><e9980><e9981><e9982><e9983><e9984><e9985><e9986><e9987><e9988><e9989><e9990><e9991><e9992><e9993><e9994><e9995><e9996><e9997><e9998><e9999><e10000/></e9999></e9998></e9997></e9996></e9995></e9994></e9993></e9992></e9991></e9990></e9989></e9988></e9987></e9986></e9985></e9984></e9983></e9982></e9981></e9980></e9979></e9978></e9977></e9976></e9975></e9974></e9973></e9972></e9971></e9970></e9969></e9968></e9967></e9966></e9965></e9964></e9963></e9962></e9961></e9960></e9959></e9958></e9957></e9956></e9955></e9954></e9953></e9952></e9951></e9950></e9949></e9948></e9947></e9946></e9945></e9944></e9943></e9942></e9941></e9940></e9939></e9938></e9937></e9936></e9935></e9934></e9933></e9932></e9931></e9930></e9929></e9928></e9927></e9926></e9925></e9924></e9923></e9922></e9921></e9920></e9919></e9918></e9917></e9916></e9915></e9914></e9913></e9912></e9911></e9910></e9909></e9908></e9907></e9906></e9905></e9904></e9903></e9902></e9901></e9900></e9899></e9898></e9897></e9896></e9895></e9894></e9893></e9892></e9891></e9890></e9889></e9888></e9887></e9886></e9885></e9884></e9883></e9882></e9881></e9880></e9879></e9878></e9877></e9876></e9875></e9874></e9873></e9872></e9871></e9870></e9869></e9868></e9867></e9866></e9865></e9864></e9863></e9862></e9861></e9860></e9859></e9858></e9857></e9856></e9855></e9854></e9853></e9852></e9851></e9850></e9849></e9848></e9847></e9846></e9845></e9844></e9843></e9842></e9841></e9840></e9839></e9838></e9837></e9836></e9835></e9834></e9833></e9832></e9831></e9830></e9829></e9828></e9827></e9826></e9825></e9824></e9823></e9822></e9821></e9820></e9819></e9818></e9817></e9816></e9815></e9814></e9813></e9812></e9811></e9810></e9809></e9808></e9807></e9806></e9805></e9804></e9803></e9802></e9801></e9800></e9799></e9798></e9797></e9796></e9795></e9794></e9793></e9792></e9791></e9790></e9789></e9788></e9787></e9786></e9785></e9784></e9783></e9782></e9781></e9780></e9779></e9778></e9777></e9776></e9775></e9774></e9773></e9772></e9771></e9770></e9769></e9768></e9767></e9766></e9765></e9764></e9763></e9762></e9761></e9760></e9759></e9758></e9757></e9756></e9755></e9754></e9753></e9752></e9751></e9750></e9749></e9748></e9747></e9746></e9745></e9744></e9743></e9742></e9741></e9740></e9739></e9738></e9737></e9736></e9735></e9734></e9733></e9732></e9731></e9730></e9729></e9728></e9727></e9726></e9725></e9724></e9723></e9722></e9721></e9720></e9719></e9718></e9717></e9716></e9715></e9714></e9713></e9712></e9711></e9710></e9709></e9708></e9707></e9706></e9705></e9704></e9703></e9702></e9701></e9700></e9699></e9698></e9697></e9696></e9695></e9694></e9693></e9692></e9691></e9690></e9689></e9688></e9687></e9686></e9685></e9684></e9683></e9682></e9681></e9680></e9679></e9678></e9677></e9676></e9675></e9674></e9673></e9672></e9671></e9670></e9669></e9668></e9667></e9666></e9665></e9664></e9663></e9662></e9661></e9660></e9659></e9658></e9657></e9656></e9655></e9654></e9653></e9652></e9651></e9650></e9649></e9648></e9647></e9646></e9645></e9644></e9643></e9642></e9641></e9640></e9639></e9638></e9637></e9636></e9635></e9634></e9633></e9632></e9631></e9630></e9629></e9628></e9627></e9626></e9625></e9624></e9623></e9622></e9621></e9620></e9619></e9618></e9617></e9616></e9615></e9614></e9613></e9612></e9611></e9610></e9609></e9608></e9607></e9606></e9605></e9604></e9603></e9602></e9601></e9600></e9599></e9598></e9597></e9596></e9595></e9594></e9593></e9592></e9591></e9590></e9589></e9588></e9587></e9586></e9585></e9584></e9583></e9582></e9581></e9580></e9579></e9578></e9577></e9576></e9575></e9574></e9573></e9572></e9571></e9570></e9569></e9568></e9567></e9566></e9565></e9564></e9563></e9562></e9561></e9560></e9559></e9558></e9557></e9556></e9555></e9554></e9553></e9552></e9551></e9550></e9549></e9548></e9547></e9546></e9545></e9544></e9543></e9542></e9541></e9540></e9539></e9538></e9537></e9536></e9535></e9534></e9533></e9532></e9531></e9530></e9529></e9528></e9527></e9526></e9525></e9524></e9523></e9522></e9521></e9520></e9519></e9518></e9517></e9516></e9515></e9514></e9513></e9512></e9511></e9510></e9509></e9508></e9507></e9506></e9505></e9504></e9503></e9502></e9501></e9500></e9499></e9498></e9497></e9496></e9495></e9494></e9493></e9492></e9491></e9490></e9489></e9488></e9487></e9486></e9485></e9484></e9483></e9482></e9481></e9480></e9479></e9478></e9477></e9476></e9475></e9474></e9473></e9472></e9471></e9470></e9469></e9468></e9467></e9466></e9465></e9464></e9463></e9462></e9461></e9460></e9459></e9458></e9457></e9456></e9455></e9454></e9453></e9452></e9451></e9450></e9449></e9448></e9447></e9446></e9445></e9444></e9443></e9442></e9441></e9440></e9439></e9438></e9437></e9436></e9435></e9434></e9433></e9432></e9431></e9430></e9429></e9428></e9427></e9426></e9425></e9424></e9423></e9422></e9421></e9420></e9419></e9418></e9417></e9416></e9415></e9414></e9413></e9412></e9411></e9410></e9409></e9408></e9407></e9406></e9405></e9404></e9403></e9402></e9401></e9400></e9399></e9398></e9397></e9396></e9395></e9394></e9393></e9392></e9391></e9390></e9389></e9388></e9387></e9386></e9385></e9384></e9383></e9382></e9381></e9380></e9379></e9378></e9377></e9376></e9375></e9374></e9373></e9372></e9371></e9370></e9369></e9368></e9367></e9366></e9365></e9364></e9363></e9362></e9361></e9360></e9359></e9358></e9357></e9356></e9355></e9354></e9353></e9352></e9351></e9350></e9349></e9348></e9347></e9346></e9345></e9344></e9343></e9342></e9341></e9340></e9339></e9338></e9337></e9336></e9335></e9334></e9333></e9332></e9331></e9330></e9329></e9328></e9327></e9326></e9325></e9324></e9323></e9322></e9321></e9320></e9319></e9318></e9317></e9316></e9315></e9314></e9313></e9312></e9311></e9310></e9309></e9308></e9307></e9306></e9305></e9304></e9303></e9302></e9301></e9300></e9299></e9298></e9297></e9296></e9295></e9294></e9293></e9292></e9291></e9290></e9289></e9288></e9287></e9286></e9285></e9284></e9283></e9282></e9281></e9280></e9279></e9278></e9277></e9276></e9275></e9274></e9273></e9272></e9271></e9270></e9269></e9268></e9267></e9266></e9265></e9264></e9263></e9262></e9261></e9260></e9259></e9258></e9257></e9256></e9255></e9254></e9253></e9252></e9251></e9250></e9249></e9248></e9247></e9246></e9245></e9244></e9243></e9242></e9241></e9240></e9239></e9238></e9237></e9236></e9235></e9234></e9233></e9232></e9231></e9230></e9229></e9228></e9227></e9226></e9225></e9224></e9223></e9222></e9221></e9220></e9219></e9218></e9217></e9216></e9215></e9214></e9213></e9212></e9211></e9210></e9209></e9208></e9207></e9206></e9205></e9204></e9203></e9202></e9201></e9200></e9199></e9198></e9197></e9196></e9195></e9194></e9193></e9192></e9191></e9190></e9189></e9188></e9187></e9186></e9185></e9184></e9183></e9182></e9181></e9180></e9179></e9178></e9177></e9176></e9175></e9174></e9173></e9172></e9171></e9170></e9169></e9168></e9167></e9166></e9165></e9164></e9163></e9162></e9161></e9160></e9159></e9158></e9157></e9156></e9155></e9154></e9153></e9152></e9151></e9150></e9149></e9148></e9147></e9146></e9145></e9144></e9143></e9142></e9141></e9140></e9139></e9138></e9137></e9136></e9135></e9134></e9133></e9132></e9131></e9130></e9129></e9128></e9127></e9126></e9125></e9124></e9123></e9122></e9121></e9120></e9119></e9118></e9117></e9116></e9115></e9114></e9113></e9112></e9111></e9110></e9109></e9108></e9107></e9106></e9105></e9104></e9103></e9102></e9101></e9100></e9099></e9098></e9097></e9096></e9095></e9094></e9093></e9092></e9091></e9090></e9089></e9088></e9087></e9086></e9085></e9084></e9083></e9082></e9081></e9080></e9079></e9078></e9077></e9076></e9075></e9074></e9073></e9072></e9071></e9070></e9069></e9068></e9067></e9066></e9065></e9064></e9063></e9062></e9061></e9060></e9059></e9058></e9057></e9056></e9055></e9054></e9053></e9052></e9051></e9050></e9049></e9048></e9047></e9046></e9045></e9044></e9043></e9042></e9041></e9040></e9039></e9038></e9037></e9036></e9035></e9034></e9033></e9032></e9031></e9030></e9029></e9028></e9027></e9026></e9025></e9024></e9023></e9022></e9021></e9020></e9019></e9018></e9017></e9016></e9015></e9014></e9013></e9012></e9011></e9010></e9009></e9008></e9007></e9006></e9005></e9004></e9003></e9002></e9001></e9000></e8999></e8998></e8997></e8996></e8995></e8994></e8993></e8992></e8991></e8990></e8989></e8988></e8987></e8986></e8985></e8984></e8983></e8982></e8981></e8980></e8979></e8978></e8977></e8976></e8975></e8974></e8973></e8972></e8971></e8970></e8969></e8968></e8967></e8966></e8965></e8964></e8963></e8962></e8961></e8960></e8959></e8958></e8957></e8956></e8955></e8954></e8953></e8952></e8951></e8950></e8949></e8948></e8947></e8946></e8945></e8944></e8943></e8942></e8941></e8940></e8939></e8938></e8937></e8936></e8935></e8934></e8933></e8932></e8931></e8930></e8929></e8928></e8927></e8926></e8925></e8924></e8923></e8922></e8921></e8920></e8919></e8918></e8917></e8916></e8915></e8914></e8913></e8912></e8911></e8910></e8909></e8908></e8907></e8906></e8905></e8904></e8903></e8902></e8901></e8900></e8899></e8898></e8897></e8896></e8895></e8894></e8893></e8892></e8891></e8890></e8889></e8888></e8887></e8886></e8885></e8884></e8883></e8882></e8881></e8880></e8879></e8878></e8877></e8876></e8875></e8874></e8873></e8872></e8871></e8870></e8869></e8868></e8867></e8866></e8865></e8864></e8863></e8862></e8861></e8860></e8859></e8858></e8857></e8856></e8855></e8854></e8853></e8852></e8851></e8850></e8849></e8848></e8847></e8846></e8845></e8844></e8843></e8842></e8841></e8840></e8839></e8838></e8837></e8836></e8835></e8834></e8833></e8832></e8831></e8830></e8829></e8828></e8827></e8826></e8825></e8824></e8823></e8822></e8821></e8820></e8819></e8818></e8817></e8816></e8815></e8814></e8813></e8812></e8811></e8810></e8809></e8808></e8807></e8806></e8805></e8804></e8803></e8802></e8801></e8800></e8799></e8798></e8797></e8796></e8795></e8794></e8793></e8792></e8791></e8790></e8789></e8788></e8787></e8786></e8785></e8784></e8783></e8782></e8781></e8780></e8779></e8778></e8777></e8776></e8775></e8774></e8773></e8772></e8771></e8770></e8769></e8768></e8767></e8766></e8765></e8764></e8763></e8762></e8761></e8760></e8759></e8758></e8757></e8756></e8755></e8754></e8753></e8752></e8751></e8750></e8749></e8748></e8747></e8746></e8745></e8744></e8743></e8742></e8741></e8740></e8739></e8738></e8737></e8736></e8735></e8734></e8733></e8732></e8731></e8730></e8729></e8728></e8727></e8726></e8725></e8724></e8723></e8722></e8721></e8720></e8719></e8718></e8717></e8716></e8715></e8714></e8713></e8712></e8711></e8710></e8709></e8708></e8707></e8706></e8705></e8704></e8703></e8702></e8701></e8700></e8699></e8698></e8697></e8696></e8695></e8694></e8693></e8692></e8691></e8690></e8689></e8688></e8687></e8686></e8685></e8684></e8683></e8682></e8681></e8680></e8679></e8678></e8677></e8676></e8675></e8674></e8673></e8672></e8671></e8670></e8669></e8668></e8667></e8666></e8665></e8664></e8663></e8662></e8661></e8660></e8659></e8658></e8657></e8656></e8655></e8654></e8653></e8652></e8651></e8650></e8649></e8648></e8647></e8646></e8645></e8644></e8643></e8642></e8641></e8640></e8639></e8638></e8637></e8636></e8635></e8634></e8633></e8632></e8631></e8630></e8629></e8628></e8627></e8626></e8625></e8624></e8623></e8622></e8621></e8620></e8619></e8618></e8617></e8616></e8615></e8614></e8613></e8612></e8611></e8610></e8609></e8608></e8607></e8606></e8605></e8604></e8603></e8602></e8601></e8600></e8599></e8598></e8597></e8596></e8595></e8594></e8593></e8592></e8591></e8590></e8589></e8588></e8587></e8586></e8585></e8584></e8583></e8582></e8581></e8580></e8579></e8578></e8577></e8576></e8575></e8574></e8573></e8572></e8571></e8570></e8569></e8568></e8567></e8566></e8565></e8564></e8563></e8562></e8561></e8560></e8559></e8558></e8557></e8556></e8555></e8554></e8553></e8552></e8551></e8550></e8549></e8548></e8547></e8546></e8545></e8544></e8543></e8542></e8541></e8540></e8539></e8538></e8537></e8536></e8535></e8534></e8533></e8532></e8531></e8530></e8529></e8528></e8527></e8526></e8525></e8524></e8523></e8522></e8521></e8520></e8519></e8518></e8517></e8516></e8515></e8514></e8513></e8512></e8511></e8510></e8509></e8508></e8507></e8506></e8505></e8504></e8503></e8502></e8501></e8500></e8499></e8498></e8497></e8496></e8495></e8494></e8493></e8492></e8491></e8490></e8489></e8488></e8487></e8486></e8485></e8484></e8483></e8482></e8481></e8480></e8479></e8478></e8477></e8476></e8475></e8474></e8473></e8472></e8471></e8470></e8469></e8468></e8467></e8466></e8465></e8464></e8463></e8462></e8461></e8460></e8459></e8458></e8457></e8456></e8455></e8454></e8453></e8452></e8451></e8450></e8449></e8448></e8447></e8446></e8445></e8444></e8443></e8442></e8441></e8440></e8439></e8438></e8437></e8436></e8435></e8434></e8433></e8432></e8431></e8430></e8429></e8428></e8427></e8426></e8425></e8424></e8423></e8422></e8421></e8420></e8419></e8418></e8417></e8416></e8415></e8414></e8413></e8412></e8411></e8410></e8409></e8408></e8407></e8406></e8405></e8404></e8403></e8402></e8401></e8400></e8399></e8398></e8397></e8396></e8395></e8394></e8393></e8392></e8391></e8390></e8389></e8388></e8387></e8386></e8385></e8384></e8383></e8382></e8381></e8380></e8379></e8378></e8377></e8376></e8375></e8374></e8373></e8372></e8371></e8370></e8369></e8368></e8367></e8366></e8365></e8364></e8363></e8362></e8361></e8360></e8359></e8358></e8357></e8356></e8355></e8354></e8353></e8352></e8351></e8350></e8349></e8348></e8347></e8346></e8345></e8344></e8343></e8342></e8341></e8340></e8339></e8338></e8337></e8336></e8335></e8334></e8333></e8332></e8331></e8330></e8329></e8328></e8327></e8326></e8325></e8324></e8323></e8322></e8321></e8320></e8319></e8318></e8317></e8316></e8315></e8314></e8313></e8312></e8311></e8310></e8309></e8308></e8307></e8306></e8305></e8304></e8303></e8302></e8301></e8300></e8299></e8298></e8297></e8296></e8295></e8294></e8293></e8292></e8291></e8290></e8289></e8288></e8287></e8286></e8285></e8284></e8283></e8282></e8281></e8280></e8279></e8278></e8277></e8276></e8275></e8274></e8273></e8272></e8271></e8270></e8269></e8268></e8267></e8266></e8265></e8264></e8263></e8262></e8261></e8260></e8259></e8258></e8257></e8256></e8255></e8254></e8253></e8252></e8251></e8250></e8249></e8248></e8247></e8246></e8245></e8244></e8243></e8242></e8241></e8240></e8239></e8238></e8237></e8236></e8235></e8234></e8233></e8232></e8231></e8230></e8229></e8228></e8227></e8226></e8225></e8224></e8223></e8222></e8221></e8220></e8219></e8218></e8217></e8216></e8215></e8214></e8213></e8212></e8211></e8210></e8209></e8208></e8207></e8206></e8205></e8204></e8203></e8202></e8201></e8200></e8199></e8198></e8197></e8196></e8195></e8194></e8193></e8192></e8191></e8190></e8189></e8188></e8187></e8186></e8185></e8184></e8183></e8182></e8181></e8180></e8179></e8178></e8177></e8176></e8175></e8174></e8173></e8172></e8171></e8170></e8169></e8168></e8167></e8166></e8165></e8164></e8163></e8162></e8161></e8160></e8159></e8158></e8157></e8156></e8155></e8154></e8153></e8152></e8151></e8150></e8149></e8148></e8147></e8146></e8145></e8144></e8143></e8142></e8141></e8140></e8139></e8138></e8137></e8136></e8135></e8134></e8133></e8132></e8131></e8130></e8129></e8128></e8127></e8126></e8125></e8124></e8123></e8122></e8121></e8120></e8119></e8118></e8117></e8116></e8115></e8114></e8113></e8112></e8111></e8110></e8109></e8108></e8107></e8106></e8105></e8104></e8103></e8102></e8101></e8100></e8099></e8098></e8097></e8096></e8095></e8094></e8093></e8092></e8091></e8090></e8089></e8088></e8087></e8086></e8085></e8084></e8083></e8082></e8081></e8080></e8079></e8078></e8077></e8076></e8075></e8074></e8073></e8072></e8071></e8070></e8069></e8068></e8067></e8066></e8065></e8064></e8063></e8062></e8061></e8060></e8059></e8058></e8057></e8056></e8055></e8054></e8053></e8052></e8051></e8050></e8049></e8048></e8047></e8046></e8045></e8044></e8043></e8042></e8041></e8040></e8039></e8038></e8037></e8036></e8035></e8034></e8033></e8032></e8031></e8030></e8029></e8028></e8027></e8026></e8025></e8024></e8023></e8022></e8021></e8020></e8019></e8018></e8017></e8016></e8015></e8014></e8013></e8012></e8011></e8010></e8009></e8008></e8007></e8006></e8005></e8004></e8003></e8002></e8001></e8000></e7999></e7998></e7997></e7996></e7995></e7994></e7993></e7992></e7991></e7990></e7989></e7988></e7987></e7986></e7985></e7984></e7983></e7982></e7981></e7980></e7979></e7978></e7977></e7976></e7975></e7974></e7973></e7972></e7971></e7970></e7969></e7968></e7967></e7966></e7965></e7964></e7963></e7962></e7961></e7960></e7959></e7958></e7957></e7956></e7955></e7954></e7953></e7952></e7951></e7950></e7949></e7948></e7947></e7946></e7945></e7944></e7943></e7942></e7941></e7940></e7939></e7938></e7937></e7936></e7935></e7934></e7933></e7932></e7931></e7930></e7929></e7928></e7927></e7926></e7925></e7924></e7923></e7922></e7921></e7920></e7919></e7918></e7917></e7916></e7915></e7914></e7913></e7912></e7911></e7910></e7909></e7908></e7907></e7906></e7905></e7904></e7903></e7902></e7901></e7900></e7899></e7898></e7897></e7896></e7895></e7894></e7893></e7892></e7891></e7890></e7889></e7888></e7887></e7886></e7885></e7884></e7883></e7882></e7881></e7880></e7879></e7878></e7877></e7876></e7875></e7874></e7873></e7872></e7871></e7870></e7869></e7868></e7867></e7866></e7865></e7864></e7863></e7862></e7861></e7860></e7859></e7858></e7857></e7856></e7855></e7854></e7853></e7852></e7851></e7850></e7849></e7848></e7847></e7846></e7845></e7844></e7843></e7842></e7841></e7840></e7839></e7838></e7837></e7836></e7835></e7834></e7833></e7832></e7831></e7830></e7829></e7828></e7827></e7826></e7825></e7824></e7823></e7822></e7821></e7820></e7819></e7818></e7817></e7816></e7815></e7814></e7813></e7812></e7811></e7810></e7809></e7808></e7807></e7806></e7805></e7804></e7803></e7802></e7801></e7800></e7799></e7798></e7797></e7796></e7795></e7794></e7793></e7792></e7791></e7790></e7789></e7788></e7787></e7786></e7785></e7784></e7783></e7782></e7781></e7780></e7779></e7778></e7777></e7776></e7775></e7774></e7773></e7772></e7771></e7770></e7769></e7768></e7767></e7766></e7765></e7764></e7763></e7762></e7761></e7760></e7759></e7758></e7757></e7756></e7755></e7754></e7753></e7752></e7751></e7750></e7749></e7748></e7747></e7746></e7745></e7744></e7743></e7742></e7741></e7740></e7739></e7738></e7737></e7736></e7735></e7734></e7733></e7732></e7731></e7730></e7729></e7728></e7727></e7726></e7725></e7724></e7723></e7722></e7721></e7720></e7719></e7718></e7717></e7716></e7715></e7714></e7713></e7712></e7711></e7710></e7709></e7708></e7707></e7706></e7705></e7704></e7703></e7702></e7701></e7700></e7699></e7698></e7697></e7696></e7695></e7694></e7693></e7692></e7691></e7690></e7689></e7688></e7687></e7686></e7685></e7684></e7683></e7682></e7681></e7680></e7679></e7678></e7677></e7676></e7675></e7674></e7673></e7672></e7671></e7670></e7669></e7668></e7667></e7666></e7665></e7664></e7663></e7662></e7661></e7660></e7659></e7658></e7657></e7656></e7655></e7654></e7653></e7652></e7651></e7650></e7649></e7648></e7647></e7646></e7645></e7644></e7643></e7642></e7641></e7640></e7639></e7638></e7637></e7636></e7635></e7634></e7633></e7632></e7631></e7630></e7629></e7628></e7627></e7626></e7625></e7624></e7623></e7622></e7621></e7620></e7619></e7618></e7617></e7616></e7615></e7614></e7613></e7612></e7611></e7610></e7609></e7608></e7607></e7606></e7605></e7604></e7603></e7602></e7601></e7600></e7599></e7598></e7597></e7596></e7595></e7594></e7593></e7592></e7591></e7590></e7589></e7588></e7587></e7586></e7585></e7584></e7583></e7582></e7581></e7580></e7579></e7578></e7577></e7576></e7575></e7574></e7573></e7572></e7571></e7570></e7569></e7568></e7567></e7566></e7565></e7564></e7563></e7562></e7561></e7560></e7559></e7558></e7557></e7556></e7555></e7554></e7553></e7552></e7551></e7550></e7549></e7548></e7547></e7546></e7545></e7544></e7543></e7542></e7541></e7540></e7539></e7538></e7537></e7536></e7535></e7534></e7533></e7532></e7531></e7530></e7529></e7528></e7527></e7526></e7525></e7524></e7523></e7522></e7521></e7520></e7519></e7518></e7517></e7516></e7515></e7514></e7513></e7512></e7511></e7510></e7509></e7508></e7507></e7506></e7505></e7504></e7503></e7502></e7501></e7500></e7499></e7498></e7497></e7496></e7495></e7494></e7493></e7492></e7491></e7490></e7489></e7488></e7487></e7486></e7485></e7484></e7483></e7482></e7481></e7480></e7479></e7478></e7477></e7476></e7475></e7474></e7473></e7472></e7471></e7470></e7469></e7468></e7467></e7466></e7465></e7464></e7463></e7462></e7461></e7460></e7459></e7458></e7457></e7456></e7455></e7454></e7453></e7452></e7451></e7450></e7449></e7448></e7447></e7446></e7445></e7444></e7443></e7442></e7441></e7440></e7439></e7438></e7437></e7436></e7435></e7434></e7433></e7432></e7431></e7430></e7429></e7428></e7427></e7426></e7425></e7424></e7423></e7422></e7421></e7420></e7419></e7418></e7417></e7416></e7415></e7414></e7413></e7412></e7411></e7410></e7409></e7408></e7407></e7406></e7405></e7404></e7403></e7402></e7401></e7400></e7399></e7398></e7397></e7396></e7395></e7394></e7393></e7392></e7391></e7390></e7389></e7388></e7387></e7386></e7385></e7384></e7383></e7382></e7381></e7380></e7379></e7378></e7377></e7376></e7375></e7374></e7373></e7372></e7371></e7370></e7369></e7368></e7367></e7366></e7365></e7364></e7363></e7362></e7361></e7360></e7359></e7358></e7357></e7356></e7355></e7354></e7353></e7352></e7351></e7350></e7349></e7348></e7347></e7346></e7345></e7344></e7343></e7342></e7341></e7340></e7339></e7338></e7337></e7336></e7335></e7334></e7333></e7332></e7331></e7330></e7329></e7328></e7327></e7326></e7325></e7324></e7323></e7322></e7321></e7320></e7319></e7318></e7317></e7316></e7315></e7314></e7313></e7312></e7311></e7310></e7309></e7308></e7307></e7306></e7305></e7304></e7303></e7302></e7301></e7300></e7299></e7298></e7297></e7296></e7295></e7294></e7293></e7292></e7291></e7290></e7289></e7288></e7287></e7286></e7285></e7284></e7283></e7282></e7281></e7280></e7279></e7278></e7277></e7276></e7275></e7274></e7273></e7272></e7271></e7270></e7269></e7268></e7267></e7266></e7265></e7264></e7263></e7262></e7261></e7260></e7259></e7258></e7257></e7256></e7255></e7254></e7253></e7252></e7251></e7250></e7249></e7248></e7247></e7246></e7245></e7244></e7243></e7242></e7241></e7240></e7239></e7238></e7237></e7236></e7235></e7234></e7233></e7232></e7231></e7230></e7229></e7228></e7227></e7226></e7225></e7224></e7223></e7222></e7221></e7220></e7219></e7218></e7217></e7216></e7215></e7214></e7213></e7212></e7211></e7210></e7209></e7208></e7207></e7206></e7205></e7204></e7203></e7202></e7201></e7200></e7199></e7198></e7197></e7196></e7195></e7194></e7193></e7192></e7191></e7190></e7189></e7188></e7187></e7186></e7185></e7184></e7183></e7182></e7181></e7180></e7179></e7178></e7177></e7176></e7175></e7174></e7173></e7172></e7171></e7170></e7169></e7168></e7167></e7166></e7165></e7164></e7163></e7162></e7161></e7160></e7159></e7158></e7157></e7156></e7155></e7154></e7153></e7152></e7151></e7150></e7149></e7148></e7147></e7146></e7145></e7144></e7143></e7142></e7141></e7140></e7139></e7138></e7137></e7136></e7135></e7134></e7133></e7132></e7131></e7130></e7129></e7128></e7127></e7126></e7125></e7124></e7123></e7122></e7121></e7120></e7119></e7118></e7117></e7116></e7115></e7114></e7113></e7112></e7111></e7110></e7109></e7108></e7107></e7106></e7105></e7104></e7103></e7102></e7101></e7100></e7099></e7098></e7097></e7096></e7095></e7094></e7093></e7092></e7091></e7090></e7089></e7088></e7087></e7086></e7085></e7084></e7083></e7082></e7081></e7080></e7079></e7078></e7077></e7076></e7075></e7074></e7073></e7072></e7071></e7070></e7069></e7068></e7067></e7066></e7065></e7064></e7063></e7062></e7061></e7060></e7059></e7058></e7057></e7056></e7055></e7054></e7053></e7052></e7051></e7050></e7049></e7048></e7047></e7046></e7045></e7044></e7043></e7042></e7041></e7040></e7039></e7038></e7037></e7036></e7035></e7034></e7033></e7032></e7031></e7030></e7029></e7028></e7027></e7026></e7025></e7024></e7023></e7022></e7021></e7020></e7019></e7018></e7017></e7016></e7015></e7014></e7013></e7012></e7011></e7010></e7009></e7008></e7007></e7006></e7005></e7004></e7003></e7002></e7001></e7000></e6999></e6998></e6997></e6996></e6995></e6994></e6993></e6992></e6991></e6990></e6989></e6988></e6987></e6986></e6985></e6984></e6983></e6982></e6981></e6980></e6979></e6978></e6977></e6976></e6975></e6974></e6973></e6972></e6971></e6970></e6969></e6968></e6967></e6966></e6965></e6964></e6963></e6962></e6961></e6960></e6959></e6958></e6957></e6956></e6955></e6954></e6953></e6952></e6951></e6950></e6949></e6948></e6947></e6946></e6945></e6944></e6943></e6942></e6941></e6940></e6939></e6938></e6937></e6936></e6935></e6934></e6933></e6932></e6931></e6930></e6929></e6928></e6927></e6926></e6925></e6924></e6923></e6922></e6921></e6920></e6919></e6918></e6917></e6916></e6915></e6914></e6913></e6912></e6911></e6910></e6909></e6908></e6907></e6906></e6905></e6904></e6903></e6902></e6901></e6900></e6899></e6898></e6897></e6896></e6895></e6894></e6893></e6892></e6891></e6890></e6889></e6888></e6887></e6886></e6885></e6884></e6883></e6882></e6881></e6880></e6879></e6878></e6877></e6876></e6875></e6874></e6873></e6872></e6871></e6870></e6869></e6868></e6867></e6866></e6865></e6864></e6863></e6862></e6861></e6860></e6859></e6858></e6857></e6856></e6855></e6854></e6853></e6852></e6851></e6850></e6849></e6848></e6847></e6846></e6845></e6844></e6843></e6842></e6841></e6840></e6839></e6838></e6837></e6836></e6835></e6834></e6833></e6832></e6831></e6830></e6829></e6828></e6827></e6826></e6825></e6824></e6823></e6822></e6821></e6820></e6819></e6818></e6817></e6816></e6815></e6814></e6813></e6812></e6811></e6810></e6809></e6808></e6807></e6806></e6805></e6804></e6803></e6802></e6801></e6800></e6799></e6798></e6797></e6796></e6795></e6794></e6793></e6792></e6791></e6790></e6789></e6788></e6787></e6786></e6785></e6784></e6783></e6782></e6781></e6780></e6779></e6778></e6777></e6776></e6775></e6774></e6773></e6772></e6771></e6770></e6769></e6768></e6767></e6766></e6765></e6764></e6763></e6762></e6761></e6760></e6759></e6758></e6757></e6756></e6755></e6754></e6753></e6752></e6751></e6750></e6749></e6748></e6747></e6746></e6745></e6744></e6743></e6742></e6741></e6740></e6739></e6738></e6737></e6736></e6735></e6734></e6733></e6732></e6731></e6730></e6729></e6728></e6727></e6726></e6725></e6724></e6723></e6722></e6721></e6720></e6719></e6718></e6717></e6716></e6715></e6714></e6713></e6712></e6711></e6710></e6709></e6708></e6707></e6706></e6705></e6704></e6703></e6702></e6701></e6700></e6699></e6698></e6697></e6696></e6695></e6694></e6693></e6692></e6691></e6690></e6689></e6688></e6687></e6686></e6685></e6684></e6683></e6682></e6681></e6680></e6679></e6678></e6677></e6676></e6675></e6674></e6673></e6672></e6671></e6670></e6669></e6668></e6667></e6666></e6665></e6664></e6663></e6662></e6661></e6660></e6659></e6658></e6657></e6656></e6655></e6654></e6653></e6652></e6651></e6650></e6649></e6648></e6647></e6646></e6645></e6644></e6643></e6642></e6641></e6640></e6639></e6638></e6637></e6636></e6635></e6634></e6633></e6632></e6631></e6630></e6629></e6628></e6627></e6626></e6625></e6624></e6623></e6622></e6621></e6620></e6619></e6618></e6617></e6616></e6615></e6614></e6613></e6612></e6611></e6610></e6609></e6608></e6607></e6606></e6605></e6604></e6603></e6602></e6601></e6600></e6599></e6598></e6597></e6596></e6595></e6594></e6593></e6592></e6591></e6590></e6589></e6588></e6587></e6586></e6585></e6584></e6583></e6582></e6581></e6580></e6579></e6578></e6577></e6576></e6575></e6574></e6573></e6572></e6571></e6570></e6569></e6568></e6567></e6566></e6565></e6564></e6563></e6562></e6561></e6560></e6559></e6558></e6557></e6556></e6555></e6554></e6553></e6552></e6551></e6550></e6549></e6548></e6547></e6546></e6545></e6544></e6543></e6542></e6541></e6540></e6539></e6538></e6537></e6536></e6535></e6534></e6533></e6532></e6531></e6530></e6529></e6528></e6527></e6526></e6525></e6524></e6523></e6522></e6521></e6520></e6519></e6518></e6517></e6516></e6515></e6514></e6513></e6512></e6511></e6510></e6509></e6508></e6507></e6506></e6505></e6504></e6503></e6502></e6501></e6500></e6499></e6498></e6497></e6496></e6495></e6494></e6493></e6492></e6491></e6490></e6489></e6488></e6487></e6486></e6485></e6484></e6483></e6482></e6481></e6480></e6479></e6478></e6477></e6476></e6475></e6474></e6473></e6472></e6471></e6470></e6469></e6468></e6467></e6466></e6465></e6464></e6463></e6462></e6461></e6460></e6459></e6458></e6457></e6456></e6455></e6454></e6453></e6452></e6451></e6450></e6449></e6448></e6447></e6446></e6445></e6444></e6443></e6442></e6441></e6440></e6439></e6438></e6437></e6436></e6435></e6434></e6433></e6432></e6431></e6430></e6429></e6428></e6427></e6426></e6425></e6424></e6423></e6422></e6421></e6420></e6419></e6418></e6417></e6416></e6415></e6414></e6413></e6412></e6411></e6410></e6409></e6408></e6407></e6406></e6405></e6404></e6403></e6402></e6401></e6400></e6399></e6398></e6397></e6396></e6395></e6394></e6393></e6392></e6391></e6390></e6389></e6388></e6387></e6386></e6385></e6384></e6383></e6382></e6381></e6380></e6379></e6378></e6377></e6376></e6375></e6374></e6373></e6372></e6371></e6370></e6369></e6368></e6367></e6366></e6365></e6364></e6363></e6362></e6361></e6360></e6359></e6358></e6357></e6356></e6355></e6354></e6353></e6352></e6351></e6350></e6349></e6348></e6347></e6346></e6345></e6344></e6343></e6342></e6341></e6340></e6339></e6338></e6337></e6336></e6335></e6334></e6333></e6332></e6331></e6330></e6329></e6328></e6327></e6326></e6325></e6324></e6323></e6322></e6321></e6320></e6319></e6318></e6317></e6316></e6315></e6314></e6313></e6312></e6311></e6310></e6309></e6308></e6307></e6306></e6305></e6304></e6303></e6302></e6301></e6300></e6299></e6298></e6297></e6296></e6295></e6294></e6293></e6292></e6291></e6290></e6289></e6288></e6287></e6286></e6285></e6284></e6283></e6282></e6281></e6280></e6279></e6278></e6277></e6276></e6275></e6274></e6273></e6272></e6271></e6270></e6269></e6268></e6267></e6266></e6265></e6264></e6263></e6262></e6261></e6260></e6259></e6258></e6257></e6256></e6255></e6254></e6253></e6252></e6251></e6250></e6249></e6248></e6247></e6246></e6245></e6244></e6243></e6242></e6241></e6240></e6239></e6238></e6237></e6236></e6235></e6234></e6233></e6232></e6231></e6230></e6229></e6228></e6227></e6226></e6225></e6224></e6223></e6222></e6221></e6220></e6219></e6218></e6217></e6216></e6215></e6214></e6213></e6212></e6211></e6210></e6209></e6208></e6207></e6206></e6205></e6204></e6203></e6202></e6201></e6200></e6199></e6198></e6197></e6196></e6195></e6194></e6193></e6192></e6191></e6190></e6189></e6188></e6187></e6186></e6185></e6184></e6183></e6182></e6181></e6180></e6179></e6178></e6177></e6176></e6175></e6174></e6173></e6172></e6171></e6170></e6169></e6168></e6167></e6166></e6165></e6164></e6163></e6162></e6161></e6160></e6159></e6158></e6157></e6156></e6155></e6154></e6153></e6152></e6151></e6150></e6149></e6148></e6147></e6146></e6145></e6144></e6143></e6142></e6141></e6140></e6139></e6138></e6137></e6136></e6135></e6134></e6133></e6132></e6131></e6130></e6129></e6128></e6127></e6126></e6125></e6124></e6123></e6122></e6121></e6120></e6119></e6118></e6117></e6116></e6115></e6114></e6113></e6112></e6111></e6110></e6109></e6108></e6107></e6106></e6105></e6104></e6103></e6102></e6101></e6100></e6099></e6098></e6097></e6096></e6095></e6094></e6093></e6092></e6091></e6090></e6089></e6088></e6087></e6086></e6085></e6084></e6083></e6082></e6081></e6080></e6079></e6078></e6077></e6076></e6075></e6074></e6073></e6072></e6071></e6070></e6069></e6068></e6067></e6066></e6065></e6064></e6063></e6062></e6061></e6060></e6059></e6058></e6057></e6056></e6055></e6054></e6053></e6052></e6051></e6050></e6049></e6048></e6047></e6046></e6045></e6044></e6043></e6042></e6041></e6040></e6039></e6038></e6037></e6036></e6035></e6034></e6033></e6032></e6031></e6030></e6029></e6028></e6027></e6026></e6025></e6024></e6023></e6022></e6021></e6020></e6019></e6018></e6017></e6016></e6015></e6014></e6013></e6012></e6011></e6010></e6009></e6008></e6007></e6006></e6005></e6004></e6003></e6002></e6001></e6000></e5999></e5998></e5997></e5996></e5995></e5994></e5993></e5992></e5991></e5990></e5989></e5988></e5987></e5986></e5985></e5984></e5983></e5982></e5981></e5980></e5979></e5978></e5977></e5976></e5975></e5974></e5973></e5972></e5971></e5970></e5969></e5968></e5967></e5966></e5965></e5964></e5963></e5962></e5961></e5960></e5959></e5958></e5957></e5956></e5955></e5954></e5953></e5952></e5951></e5950></e5949></e5948></e5947></e5946></e5945></e5944></e5943></e5942></e5941></e5940></e5939></e5938></e5937></e5936></e5935></e5934></e5933></e5932></e5931></e5930></e5929></e5928></e5927></e5926></e5925></e5924></e5923></e5922></e5921></e5920></e5919></e5918></e5917></e5916></e5915></e5914></e5913></e5912></e5911></e5910></e5909></e5908></e5907></e5906></e5905></e5904></e5903></e5902></e5901></e5900></e5899></e5898></e5897></e5896></e5895></e5894></e5893></e5892></e5891></e5890></e5889></e5888></e5887></e5886></e5885></e5884></e5883></e5882></e5881></e5880></e5879></e5878></e5877></e5876></e5875></e5874></e5873></e5872></e5871></e5870></e5869></e5868></e5867></e5866></e5865></e5864></e5863></e5862></e5861></e5860></e5859></e5858></e5857></e5856></e5855></e5854></e5853></e5852></e5851></e5850></e5849></e5848></e5847></e5846></e5845></e5844></e5843></e5842></e5841></e5840></e5839></e5838></e5837></e5836></e5835></e5834></e5833></e5832></e5831></e5830></e5829></e5828></e5827></e5826></e5825></e5824></e5823></e5822></e5821></e5820></e5819></e5818></e5817></e5816></e5815></e5814></e5813></e5812></e5811></e5810></e5809></e5808></e5807></e5806></e5805></e5804></e5803></e5802></e5801></e5800></e5799></e5798></e5797></e5796></e5795></e5794></e5793></e5792></e5791></e5790></e5789></e5788></e5787></e5786></e5785></e5784></e5783></e5782></e5781></e5780></e5779></e5778></e5777></e5776></e5775></e5774></e5773></e5772></e5771></e5770></e5769></e5768></e5767></e5766></e5765></e5764></e5763></e5762></e5761></e5760></e5759></e5758></e5757></e5756></e5755></e5754></e5753></e5752></e5751></e5750></e5749></e5748></e5747></e5746></e5745></e5744></e5743></e5742></e5741></e5740></e5739></e5738></e5737></e5736></e5735></e5734></e5733></e5732></e5731></e5730></e5729></e5728></e5727></e5726></e5725></e5724></e5723></e5722></e5721></e5720></e5719></e5718></e5717></e5716></e5715></e5714></e5713></e5712></e5711></e5710></e5709></e5708></e5707></e5706></e5705></e5704></e5703></e5702></e5701></e5700></e5699></e5698></e5697></e5696></e5695></e5694></e5693></e5692></e5691></e5690></e5689></e5688></e5687></e5686></e5685></e5684></e5683></e5682></e5681></e5680></e5679></e5678></e5677></e5676></e5675></e5674></e5673></e5672></e5671></e5670></e5669></e5668></e5667></e5666></e5665></e5664></e5663></e5662></e5661></e5660></e5659></e5658></e5657></e5656></e5655></e5654></e5653></e5652></e5651></e5650></e5649></e5648></e5647></e5646></e5645></e5644></e5643></e5642></e5641></e5640></e5639></e5638></e5637></e5636></e5635></e5634></e5633></e5632></e5631></e5630></e5629></e5628></e5627></e5626></e5625></e5624></e5623></e5622></e5621></e5620></e5619></e5618></e5617></e5616></e5615></e5614></e5613></e5612></e5611></e5610></e5609></e5608></e5607></e5606></e5605></e5604></e5603></e5602></e5601></e5600></e5599></e5598></e5597></e5596></e5595></e5594></e5593></e5592></e5591></e5590></e5589></e5588></e5587></e5586></e5585></e5584></e5583></e5582></e5581></e5580></e5579></e5578></e5577></e5576></e5575></e5574></e5573></e5572></e5571></e5570></e5569></e5568></e5567></e5566></e5565></e5564></e5563></e5562></e5561></e5560></e5559></e5558></e5557></e5556></e5555></e5554></e5553></e5552></e5551></e5550></e5549></e5548></e5547></e5546></e5545></e5544></e5543></e5542></e5541></e5540></e5539></e5538></e5537></e5536></e5535></e5534></e5533></e5532></e5531></e5530></e5529></e5528></e5527></e5526></e5525></e5524></e5523></e5522></e5521></e5520></e5519></e5518></e5517></e5516></e5515></e5514></e5513></e5512></e5511></e5510></e5509></e5508></e5507></e5506></e5505></e5504></e5503></e5502></e5501></e5500></e5499></e5498></e5497></e5496></e5495></e5494></e5493></e5492></e5491></e5490></e5489></e5488></e5487></e5486></e5485></e5484></e5483></e5482></e5481></e5480></e5479></e5478></e5477></e5476></e5475></e5474></e5473></e5472></e5471></e5470></e5469></e5468></e5467></e5466></e5465></e5464></e5463></e5462></e5461></e5460></e5459></e5458></e5457></e5456></e5455></e5454></e5453></e5452></e5451></e5450></e5449></e5448></e5447></e5446></e5445></e5444></e5443></e5442></e5441></e5440></e5439></e5438></e5437></e5436></e5435></e5434></e5433></e5432></e5431></e5430></e5429></e5428></e5427></e5426></e5425></e5424></e5423></e5422></e5421></e5420></e5419></e5418></e5417></e5416></e5415></e5414></e5413></e5412></e5411></e5410></e5409></e5408></e5407></e5406></e5405></e5404></e5403></e5402></e5401></e5400></e5399></e5398></e5397></e5396></e5395></e5394></e5393></e5392></e5391></e5390></e5389></e5388></e5387></e5386></e5385></e5384></e5383></e5382></e5381></e5380></e5379></e5378></e5377></e5376></e5375></e5374></e5373></e5372></e5371></e5370></e5369></e5368></e5367></e5366></e5365></e5364></e5363></e5362></e5361></e5360></e5359></e5358></e5357></e5356></e5355></e5354></e5353></e5352></e5351></e5350></e5349></e5348></e5347></e5346></e5345></e5344></e5343></e5342></e5341></e5340></e5339></e5338></e5337></e5336></e5335></e5334></e5333></e5332></e5331></e5330></e5329></e5328></e5327></e5326></e5325></e5324></e5323></e5322></e5321></e5320></e5319></e5318></e5317></e5316></e5315></e5314></e5313></e5312></e5311></e5310></e5309></e5308></e5307></e5306></e5305></e5304></e5303></e5302></e5301></e5300></e5299></e5298></e5297></e5296></e5295></e5294></e5293></e5292></e5291></e5290></e5289></e5288></e5287></e5286></e5285></e5284></e5283></e5282></e5281></e5280></e5279></e5278></e5277></e5276></e5275></e5274></e5273></e5272></e5271></e5270></e5269></e5268></e5267></e5266></e5265></e5264></e5263></e5262></e5261></e5260></e5259></e5258></e5257></e5256></e5255></e5254></e5253></e5252></e5251></e5250></e5249></e5248></e5247></e5246></e5245></e5244></e5243></e5242></e5241></e5240></e5239></e5238></e5237></e5236></e5235></e5234></e5233></e5232></e5231></e5230></e5229></e5228></e5227></e5226></e5225></e5224></e5223></e5222></e5221></e5220></e5219></e5218></e5217></e5216></e5215></e5214></e5213></e5212></e5211></e5210></e5209></e5208></e5207></e5206></e5205></e5204></e5203></e5202></e5201></e5200></e5199></e5198></e5197></e5196></e5195></e5194></e5193></e5192></e5191></e5190></e5189></e5188></e5187></e5186></e5185></e5184></e5183></e5182></e5181></e5180></e5179></e5178></e5177></e5176></e5175></e5174></e5173></e5172></e5171></e5170></e5169></e5168></e5167></e5166></e5165></e5164></e5163></e5162></e5161></e5160></e5159></e5158></e5157></e5156></e5155></e5154></e5153></e5152></e5151></e5150></e5149></e5148></e5147></e5146></e5145></e5144></e5143></e5142></e5141></e5140></e5139></e5138></e5137></e5136></e5135></e5134></e5133></e5132></e5131></e5130></e5129></e5128></e5127></e5126></e5125></e5124></e5123></e5122></e5121></e5120></e5119></e5118></e5117></e5116></e5115></e5114></e5113></e5112></e5111></e5110></e5109></e5108></e5107></e5106></e5105></e5104></e5103></e5102></e5101></e5100></e5099></e5098></e5097></e5096></e5095></e5094></e5093></e5092></e5091></e5090></e5089></e5088></e5087></e5086></e5085></e5084></e5083></e5082></e5081></e5080></e5079></e5078></e5077></e5076></e5075></e5074></e5073></e5072></e5071></e5070></e5069></e5068></e5067></e5066></e5065></e5064></e5063></e5062></e5061></e5060></e5059></e5058></e5057></e5056></e5055></e5054></e5053></e5052></e5051></e5050></e5049></e5048></e5047></e5046></e5045></e5044></e5043></e5042></e5041></e5040></e5039></e5038></e5037></e5036></e5035></e5034></e5033></e5032></e5031></e5030></e5029></e5028></e5027></e5026></e5025></e5024></e5023></e5022></e5021></e5020></e5019></e5018></e5017></e5016></e5015></e5014></e5013></e5012></e5011></e5010></e5009></e5008></e5007></e5006></e5005></e5004></e5003></e5002></e5001></e5000></e4999></e4998></e4997></e4996></e4995></e4994></e4993></e4992></e4991></e4990></e4989></e4988></e4987></e4986></e4985></e4984></e4983></e4982></e4981></e4980></e4979></e4978></e4977></e4976></e4975></e4974></e4973></e4972></e4971></e4970></e4969></e4968></e4967></e4966></e4965></e4964></e4963></e4962></e4961></e4960></e4959></e4958></e4957></e4956></e4955></e4954></e4953></e4952></e4951></e4950></e4949></e4948></e4947></e4946></e4945></e4944></e4943></e4942></e4941></e4940></e4939></e4938></e4937></e4936></e4935></e4934></e4933></e4932></e4931></e4930></e4929></e4928></e4927></e4926></e4925></e4924></e4923></e4922></e4921></e4920></e4919></e4918></e4917></e4916></e4915></e4914></e4913></e4912></e4911></e4910></e4909></e4908></e4907></e4906></e4905></e4904></e4903></e4902></e4901></e4900></e4899></e4898></e4897></e4896></e4895></e4894></e4893></e4892></e4891></e4890></e4889></e4888></e4887></e4886></e4885></e4884></e4883></e4882></e4881></e4880></e4879></e4878></e4877></e4876></e4875></e4874></e4873></e4872></e4871></e4870></e4869></e4868></e4867></e4866></e4865></e4864></e4863></e4862></e4861></e4860></e4859></e4858></e4857></e4856></e4855></e4854></e4853></e4852></e4851></e4850></e4849></e4848></e4847></e4846></e4845></e4844></e4843></e4842></e4841></e4840></e4839></e4838></e4837></e4836></e4835></e4834></e4833></e4832></e4831></e4830></e4829></e4828></e4827></e4826></e4825></e4824></e4823></e4822></e4821></e4820></e4819></e4818></e4817></e4816></e4815></e4814></e4813></e4812></e4811></e4810></e4809></e4808></e4807></e4806></e4805></e4804></e4803></e4802></e4801></e4800></e4799></e4798></e4797></e4796></e4795></e4794></e4793></e4792></e4791></e4790></e4789></e4788></e4787></e4786></e4785></e4784></e4783></e4782></e4781></e4780></e4779></e4778></e4777></e4776></e4775></e4774></e4773></e4772></e4771></e4770></e4769></e4768></e4767></e4766></e4765></e4764></e4763></e4762></e4761></e4760></e4759></e4758></e4757></e4756></e4755></e4754></e4753></e4752></e4751></e4750></e4749></e4748></e4747></e4746></e4745></e4744></e4743></e4742></e4741></e4740></e4739></e4738></e4737></e4736></e4735></e4734></e4733></e4732></e4731></e4730></e4729></e4728></e4727></e4726></e4725></e4724></e4723></e4722></e4721></e4720></e4719></e4718></e4717></e4716></e4715></e4714></e4713></e4712></e4711></e4710></e4709></e4708></e4707></e4706></e4705></e4704></e4703></e4702></e4701></e4700></e4699></e4698></e4697></e4696></e4695></e4694></e4693></e4692></e4691></e4690></e4689></e4688></e4687></e4686></e4685></e4684></e4683></e4682></e4681></e4680></e4679></e4678></e4677></e4676></e4675></e4674></e4673></e4672></e4671></e4670></e4669></e4668></e4667></e4666></e4665></e4664></e4663></e4662></e4661></e4660></e4659></e4658></e4657></e4656></e4655></e4654></e4653></e4652></e4651></e4650></e4649></e4648></e4647></e4646></e4645></e4644></e4643></e4642></e4641></e4640></e4639></e4638></e4637></e4636></e4635></e4634></e4633></e4632></e4631></e4630></e4629></e4628></e4627></e4626></e4625></e4624></e4623></e4622></e4621></e4620></e4619></e4618></e4617></e4616></e4615></e4614></e4613></e4612></e4611></e4610></e4609></e4608></e4607></e4606></e4605></e4604></e4603></e4602></e4601></e4600></e4599></e4598></e4597></e4596></e4595></e4594></e4593></e4592></e4591></e4590></e4589></e4588></e4587></e4586></e4585></e4584></e4583></e4582></e4581></e4580></e4579></e4578></e4577></e4576></e4575></e4574></e4573></e4572></e4571></e4570></e4569></e4568></e4567></e4566></e4565></e4564></e4563></e4562></e4561></e4560></e4559></e4558></e4557></e4556></e4555></e4554></e4553></e4552></e4551></e4550></e4549></e4548></e4547></e4546></e4545></e4544></e4543></e4542></e4541></e4540></e4539></e4538></e4537></e4536></e4535></e4534></e4533></e4532></e4531></e4530></e4529></e4528></e4527></e4526></e4525></e4524></e4523></e4522></e4521></e4520></e4519></e4518></e4517></e4516></e4515></e4514></e4513></e4512></e4511></e4510></e4509></e4508></e4507></e4506></e4505></e4504></e4503></e4502></e4501></e4500></e4499></e4498></e4497></e4496></e4495></e4494></e4493></e4492></e4491></e4490></e4489></e4488></e4487></e4486></e4485></e4484></e4483></e4482></e4481></e4480></e4479></e4478></e4477></e4476></e4475></e4474></e4473></e4472></e4471></e4470></e4469></e4468></e4467></e4466></e4465></e4464></e4463></e4462></e4461></e4460></e4459></e4458></e4457></e4456></e4455></e4454></e4453></e4452></e4451></e4450></e4449></e4448></e4447></e4446></e4445></e4444></e4443></e4442></e4441></e4440></e4439></e4438></e4437></e4436></e4435></e4434></e4433></e4432></e4431></e4430></e4429></e4428></e4427></e4426></e4425></e4424></e4423></e4422></e4421></e4420></e4419></e4418></e4417></e4416></e4415></e4414></e4413></e4412></e4411></e4410></e4409></e4408></e4407></e4406></e4405></e4404></e4403></e4402></e4401></e4400></e4399></e4398></e4397></e4396></e4395></e4394></e4393></e4392></e4391></e4390></e4389></e4388></e4387></e4386></e4385></e4384></e4383></e4382></e4381></e4380></e4379></e4378></e4377></e4376></e4375></e4374></e4373></e4372></e4371></e4370></e4369></e4368></e4367></e4366></e4365></e4364></e4363></e4362></e4361></e4360></e4359></e4358></e4357></e4356></e4355></e4354></e4353></e4352></e4351></e4350></e4349></e4348></e4347></e4346></e4345></e4344></e4343></e4342></e4341></e4340></e4339></e4338></e4337></e4336></e4335></e4334></e4333></e4332></e4331></e4330></e4329></e4328></e4327></e4326></e4325></e4324></e4323></e4322></e4321></e4320></e4319></e4318></e4317></e4316></e4315></e4314></e4313></e4312></e4311></e4310></e4309></e4308></e4307></e4306></e4305></e4304></e4303></e4302></e4301></e4300></e4299></e4298></e4297></e4296></e4295></e4294></e4293></e4292></e4291></e4290></e4289></e4288></e4287></e4286></e4285></e4284></e4283></e4282></e4281></e4280></e4279></e4278></e4277></e4276></e4275></e4274></e4273></e4272></e4271></e4270></e4269></e4268></e4267></e4266></e4265></e4264></e4263></e4262></e4261></e4260></e4259></e4258></e4257></e4256></e4255></e4254></e4253></e4252></e4251></e4250></e4249></e4248></e4247></e4246></e4245></e4244></e4243></e4242></e4241></e4240></e4239></e4238></e4237></e4236></e4235></e4234></e4233></e4232></e4231></e4230></e4229></e4228></e4227></e4226></e4225></e4224></e4223></e4222></e4221></e4220></e4219></e4218></e4217></e4216></e4215></e4214></e4213></e4212></e4211></e4210></e4209></e4208></e4207></e4206></e4205></e4204></e4203></e4202></e4201></e4200></e4199></e4198></e4197></e4196></e4195></e4194></e4193></e4192></e4191></e4190></e4189></e4188></e4187></e4186></e4185></e4184></e4183></e4182></e4181></e4180></e4179></e4178></e4177></e4176></e4175></e4174></e4173></e4172></e4171></e4170></e4169></e4168></e4167></e4166></e4165></e4164></e4163></e4162></e4161></e4160></e4159></e4158></e4157></e4156></e4155></e4154></e4153></e4152></e4151></e4150></e4149></e4148></e4147></e4146></e4145></e4144></e4143></e4142></e4141></e4140></e4139></e4138></e4137></e4136></e4135></e4134></e4133></e4132></e4131></e4130></e4129></e4128></e4127></e4126></e4125></e4124></e4123></e4122></e4121></e4120></e4119></e4118></e4117></e4116></e4115></e4114></e4113></e4112></e4111></e4110></e4109></e4108></e4107></e4106></e4105></e4104></e4103></e4102></e4101></e4100></e4099></e4098></e4097></e4096></e4095></e4094></e4093></e4092></e4091></e4090></e4089></e4088></e4087></e4086></e4085></e4084></e4083></e4082></e4081></e4080></e4079></e4078></e4077></e4076></e4075></e4074></e4073></e4072></e4071></e4070></e4069></e4068></e4067></e4066></e4065></e4064></e4063></e4062></e4061></e4060></e4059></e4058></e4057></e4056></e4055></e4054></e4053></e4052></e4051></e4050></e4049></e4048></e4047></e4046></e4045></e4044></e4043></e4042></e4041></e4040></e4039></e4038></e4037></e4036></e4035></e4034></e4033></e4032></e4031></e4030></e4029></e4028></e4027></e4026></e4025></e4024></e4023></e4022></e4021></e4020></e4019></e4018></e4017></e4016></e4015></e4014></e4013></e4012></e4011></e4010></e4009></e4008></e4007></e4006></e4005></e4004></e4003></e4002></e4001></e4000></e3999></e3998></e3997></e3996></e3995></e3994></e3993></e3992></e3991></e3990></e3989></e3988></e3987></e3986></e3985></e3984></e3983></e3982></e3981></e3980></e3979></e3978></e3977></e3976></e3975></e3974></e3973></e3972></e3971></e3970></e3969></e3968></e3967></e3966></e3965></e3964></e3963></e3962></e3961></e3960></e3959></e3958></e3957></e3956></e3955></e3954></e3953></e3952></e3951></e3950></e3949></e3948></e3947></e3946></e3945></e3944></e3943></e3942></e3941></e3940></e3939></e3938></e3937></e3936></e3935></e3934></e3933></e3932></e3931></e3930></e3929></e3928></e3927></e3926></e3925></e3924></e3923></e3922></e3921></e3920></e3919></e3918></e3917></e3916></e3915></e3914></e3913></e3912></e3911></e3910></e3909></e3908></e3907></e3906></e3905></e3904></e3903></e3902></e3901></e3900></e3899></e3898></e3897></e3896></e3895></e3894></e3893></e3892></e3891></e3890></e3889></e3888></e3887></e3886></e3885></e3884></e3883></e3882></e3881></e3880></e3879></e3878></e3877></e3876></e3875></e3874></e3873></e3872></e3871></e3870></e3869></e3868></e3867></e3866></e3865></e3864></e3863></e3862></e3861></e3860></e3859></e3858></e3857></e3856></e3855></e3854></e3853></e3852></e3851></e3850></e3849></e3848></e3847></e3846></e3845></e3844></e3843></e3842></e3841></e3840></e3839></e3838></e3837></e3836></e3835></e3834></e3833></e3832></e3831></e3830></e3829></e3828></e3827></e3826></e3825></e3824></e3823></e3822></e3821></e3820></e3819></e3818></e3817></e3816></e3815></e3814></e3813></e3812></e3811></e3810></e3809></e3808></e3807></e3806></e3805></e3804></e3803></e3802></e3801></e3800></e3799></e3798></e3797></e3796></e3795></e3794></e3793></e3792></e3791></e3790></e3789></e3788></e3787></e3786></e3785></e3784></e3783></e3782></e3781></e3780></e3779></e3778></e3777></e3776></e3775></e3774></e3773></e3772></e3771></e3770></e3769></e3768></e3767></e3766></e3765></e3764></e3763></e3762></e3761></e3760></e3759></e3758></e3757></e3756></e3755></e3754></e3753></e3752></e3751></e3750></e3749></e3748></e3747></e3746></e3745></e3744></e3743></e3742></e3741></e3740></e3739></e3738></e3737></e3736></e3735></e3734></e3733></e3732></e3731></e3730></e3729></e3728></e3727></e3726></e3725></e3724></e3723></e3722></e3721></e3720></e3719></e3718></e3717></e3716></e3715></e3714></e3713></e3712></e3711></e3710></e3709></e3708></e3707></e3706></e3705></e3704></e3703></e3702></e3701></e3700></e3699></e3698></e3697></e3696></e3695></e3694></e3693></e3692></e3691></e3690></e3689></e3688></e3687></e3686></e3685></e3684></e3683></e3682></e3681></e3680></e3679></e3678></e3677></e3676></e3675></e3674></e3673></e3672></e3671></e3670></e3669></e3668></e3667></e3666></e3665></e3664></e3663></e3662></e3661></e3660></e3659></e3658></e3657></e3656></e3655></e3654></e3653></e3652></e3651></e3650></e3649></e3648></e3647></e3646></e3645></e3644></e3643></e3642></e3641></e3640></e3639></e3638></e3637></e3636></e3635></e3634></e3633></e3632></e3631></e3630></e3629></e3628></e3627></e3626></e3625></e3624></e3623></e3622></e3621></e3620></e3619></e3618></e3617></e3616></e3615></e3614></e3613></e3612></e3611></e3610></e3609></e3608></e3607></e3606></e3605></e3604></e3603></e3602></e3601></e3600></e3599></e3598></e3597></e3596></e3595></e3594></e3593></e3592></e3591></e3590></e3589></e3588></e3587></e3586></e3585></e3584></e3583></e3582></e3581></e3580></e3579></e3578></e3577></e3576></e3575></e3574></e3573></e3572></e3571></e3570></e3569></e3568></e3567></e3566></e3565></e3564></e3563></e3562></e3561></e3560></e3559></e3558></e3557></e3556></e3555></e3554></e3553></e3552></e3551></e3550></e3549></e3548></e3547></e3546></e3545></e3544></e3543></e3542></e3541></e3540></e3539></e3538></e3537></e3536></e3535></e3534></e3533></e3532></e3531></e3530></e3529></e3528></e3527></e3526></e3525></e3524></e3523></e3522></e3521></e3520></e3519></e3518></e3517></e3516></e3515></e3514></e3513></e3512></e3511></e3510></e3509></e3508></e3507></e3506></e3505></e3504></e3503></e3502></e3501></e3500></e3499></e3498></e3497></e3496></e3495></e3494></e3493></e3492></e3491></e3490></e3489></e3488></e3487></e3486></e3485></e3484></e3483></e3482></e3481></e3480></e3479></e3478></e3477></e3476></e3475></e3474></e3473></e3472></e3471></e3470></e3469></e3468></e3467></e3466></e3465></e3464></e3463></e3462></e3461></e3460></e3459></e3458></e3457></e3456></e3455></e3454></e3453></e3452></e3451></e3450></e3449></e3448></e3447></e3446></e3445></e3444></e3443></e3442></e3441></e3440></e3439></e3438></e3437></e3436></e3435></e3434></e3433></e3432></e3431></e3430></e3429></e3428></e3427></e3426></e3425></e3424></e3423></e3422></e3421></e3420></e3419></e3418></e3417></e3416></e3415></e3414></e3413></e3412></e3411></e3410></e3409></e3408></e3407></e3406></e3405></e3404></e3403></e3402></e3401></e3400></e3399></e3398></e3397></e3396></e3395></e3394></e3393></e3392></e3391></e3390></e3389></e3388></e3387></e3386></e3385></e3384></e3383></e3382></e3381></e3380></e3379></e3378></e3377></e3376></e3375></e3374></e3373></e3372></e3371></e3370></e3369></e3368></e3367></e3366></e3365></e3364></e3363></e3362></e3361></e3360></e3359></e3358></e3357></e3356></e3355></e3354></e3353></e3352></e3351></e3350></e3349></e3348></e3347></e3346></e3345></e3344></e3343></e3342></e3341></e3340></e3339></e3338></e3337></e3336></e3335></e3334></e3333></e3332></e3331></e3330></e3329></e3328></e3327></e3326></e3325></e3324></e3323></e3322></e3321></e3320></e3319></e3318></e3317></e3316></e3315></e3314></e3313></e3312></e3311></e3310></e3309></e3308></e3307></e3306></e3305></e3304></e3303></e3302></e3301></e3300></e3299></e3298></e3297></e3296></e3295></e3294></e3293></e3292></e3291></e3290></e3289></e3288></e3287></e3286></e3285></e3284></e3283></e3282></e3281></e3280></e3279></e3278></e3277></e3276></e3275></e3274></e3273></e3272></e3271></e3270></e3269></e3268></e3267></e3266></e3265></e3264></e3263></e3262></e3261></e3260></e3259></e3258></e3257></e3256></e3255></e3254></e3253></e3252></e3251></e3250></e3249></e3248></e3247></e3246></e3245></e3244></e3243></e3242></e3241></e3240></e3239></e3238></e3237></e3236></e3235></e3234></e3233></e3232></e3231></e3230></e3229></e3228></e3227></e3226></e3225></e3224></e3223></e3222></e3221></e3220></e3219></e3218></e3217></e3216></e3215></e3214></e3213></e3212></e3211></e3210></e3209></e3208></e3207></e3206></e3205></e3204></e3203></e3202></e3201></e3200></e3199></e3198></e3197></e3196></e3195></e3194></e3193></e3192></e3191></e3190></e3189></e3188></e3187></e3186></e3185></e3184></e3183></e3182></e3181></e3180></e3179></e3178></e3177></e3176></e3175></e3174></e3173></e3172></e3171></e3170></e3169></e3168></e3167></e3166></e3165></e3164></e3163></e3162></e3161></e3160></e3159></e3158></e3157></e3156></e3155></e3154></e3153></e3152></e3151></e3150></e3149></e3148></e3147></e3146></e3145></e3144></e3143></e3142></e3141></e3140></e3139></e3138></e3137></e3136></e3135></e3134></e3133></e3132></e3131></e3130></e3129></e3128></e3127></e3126></e3125></e3124></e3123></e3122></e3121></e3120></e3119></e3118></e3117></e3116></e3115></e3114></e3113></e3112></e3111></e3110></e3109></e3108></e3107></e3106></e3105></e3104></e3103></e3102></e3101></e3100></e3099></e3098></e3097></e3096></e3095></e3094></e3093></e3092></e3091></e3090></e3089></e3088></e3087></e3086></e3085></e3084></e3083></e3082></e3081></e3080></e3079></e3078></e3077></e3076></e3075></e3074></e3073></e3072></e3071></e3070></e3069></e3068></e3067></e3066></e3065></e3064></e3063></e3062></e3061></e3060></e3059></e3058></e3057></e3056></e3055></e3054></e3053></e3052></e3051></e3050></e3049></e3048></e3047></e3046></e3045></e3044></e3043></e3042></e3041></e3040></e3039></e3038></e3037></e3036></e3035></e3034></e3033></e3032></e3031></e3030></e3029></e3028></e3027></e3026></e3025></e3024></e3023></e3022></e3021></e3020></e3019></e3018></e3017></e3016></e3015></e3014></e3013></e3012></e3011></e3010></e3009></e3008></e3007></e3006></e3005></e3004></e3003></e3002></e3001></e3000></e2999></e2998></e2997></e2996></e2995></e2994></e2993></e2992></e2991></e2990></e2989></e2988></e2987></e2986></e2985></e2984></e2983></e2982></e2981></e2980></e2979></e2978></e2977></e2976></e2975></e2974></e2973></e2972></e2971></e2970></e2969></e2968></e2967></e2966></e2965></e2964></e2963></e2962></e2961></e2960></e2959></e2958></e2957></e2956></e2955></e2954></e2953></e2952></e2951></e2950></e2949></e2948></e2947></e2946></e2945></e2944></e2943></e2942></e2941></e2940></e2939></e2938></e2937></e2936></e2935></e2934></e2933></e2932></e2931></e2930></e2929></e2928></e2927></e2926></e2925></e2924></e2923></e2922></e2921></e2920></e2919></e2918></e2917></e2916></e2915></e2914></e2913></e2912></e2911></e2910></e2909></e2908></e2907></e2906></e2905></e2904></e2903></e2902></e2901></e2900></e2899></e2898></e2897></e2896></e2895></e2894></e2893></e2892></e2891></e2890></e2889></e2888></e2887></e2886></e2885></e2884></e2883></e2882></e2881></e2880></e2879></e2878></e2877></e2876></e2875></e2874></e2873></e2872></e2871></e2870></e2869></e2868></e2867></e2866></e2865></e2864></e2863></e2862></e2861></e2860></e2859></e2858></e2857></e2856></e2855></e2854></e2853></e2852></e2851></e2850></e2849></e2848></e2847></e2846></e2845></e2844></e2843></e2842></e2841></e2840></e2839></e2838></e2837></e2836></e2835></e2834></e2833></e2832></e2831></e2830></e2829></e2828></e2827></e2826></e2825></e2824></e2823></e2822></e2821></e2820></e2819></e2818></e2817></e2816></e2815></e2814></e2813></e2812></e2811></e2810></e2809></e2808></e2807></e2806></e2805></e2804></e2803></e2802></e2801></e2800></e2799></e2798></e2797></e2796></e2795></e2794></e2793></e2792></e2791></e2790></e2789></e2788></e2787></e2786></e2785></e2784></e2783></e2782></e2781></e2780></e2779></e2778></e2777></e2776></e2775></e2774></e2773></e2772></e2771></e2770></e2769></e2768></e2767></e2766></e2765></e2764></e2763></e2762></e2761></e2760></e2759></e2758></e2757></e2756></e2755></e2754></e2753></e2752></e2751></e2750></e2749></e2748></e2747></e2746></e2745></e2744></e2743></e2742></e2741></e2740></e2739></e2738></e2737></e2736></e2735></e2734></e2733></e2732></e2731></e2730></e2729></e2728></e2727></e2726></e2725></e2724></e2723></e2722></e2721></e2720></e2719></e2718></e2717></e2716></e2715></e2714></e2713></e2712></e2711></e2710></e2709></e2708></e2707></e2706></e2705></e2704></e2703></e2702></e2701></e2700></e2699></e2698></e2697></e2696></e2695></e2694></e2693></e2692></e2691></e2690></e2689></e2688></e2687></e2686></e2685></e2684></e2683></e2682></e2681></e2680></e2679></e2678></e2677></e2676></e2675></e2674></e2673></e2672></e2671></e2670></e2669></e2668></e2667></e2666></e2665></e2664></e2663></e2662></e2661></e2660></e2659></e2658></e2657></e2656></e2655></e2654></e2653></e2652></e2651></e2650></e2649></e2648></e2647></e2646></e2645></e2644></e2643></e2642></e2641></e2640></e2639></e2638></e2637></e2636></e2635></e2634></e2633></e2632></e2631></e2630></e2629></e2628></e2627></e2626></e2625></e2624></e2623></e2622></e2621></e2620></e2619></e2618></e2617></e2616></e2615></e2614></e2613></e2612></e2611></e2610></e2609></e2608></e2607></e2606></e2605></e2604></e2603></e2602></e2601></e2600></e2599></e2598></e2597></e2596></e2595></e2594></e2593></e2592></e2591></e2590></e2589></e2588></e2587></e2586></e2585></e2584></e2583></e2582></e2581></e2580></e2579></e2578></e2577></e2576></e2575></e2574></e2573></e2572></e2571></e2570></e2569></e2568></e2567></e2566></e2565></e2564></e2563></e2562></e2561></e2560></e2559></e2558></e2557></e2556></e2555></e2554></e2553></e2552></e2551></e2550></e2549></e2548></e2547></e2546></e2545></e2544></e2543></e2542></e2541></e2540></e2539></e2538></e2537></e2536></e2535></e2534></e2533></e2532></e2531></e2530></e2529></e2528></e2527></e2526></e2525></e2524></e2523></e2522></e2521></e2520></e2519></e2518></e2517></e2516></e2515></e2514></e2513></e2512></e2511></e2510></e2509></e2508></e2507></e2506></e2505></e2504></e2503></e2502></e2501></e2500></e2499></e2498></e2497></e2496></e2495></e2494></e2493></e2492></e2491></e2490></e2489></e2488></e2487></e2486></e2485></e2484></e2483></e2482></e2481></e2480></e2479></e2478></e2477></e2476></e2475></e2474></e2473></e2472></e2471></e2470></e2469></e2468></e2467></e2466></e2465></e2464></e2463></e2462></e2461></e2460></e2459></e2458></e2457></e2456></e2455></e2454></e2453></e2452></e2451></e2450></e2449></e2448></e2447></e2446></e2445></e2444></e2443></e2442></e2441></e2440></e2439></e2438></e2437></e2436></e2435></e2434></e2433></e2432></e2431></e2430></e2429></e2428></e2427></e2426></e2425></e2424></e2423></e2422></e2421></e2420></e2419></e2418></e2417></e2416></e2415></e2414></e2413></e2412></e2411></e2410></e2409></e2408></e2407></e2406></e2405></e2404></e2403></e2402></e2401></e2400></e2399></e2398></e2397></e2396></e2395></e2394></e2393></e2392></e2391></e2390></e2389></e2388></e2387></e2386></e2385></e2384></e2383></e2382></e2381></e2380></e2379></e2378></e2377></e2376></e2375></e2374></e2373></e2372></e2371></e2370></e2369></e2368></e2367></e2366></e2365></e2364></e2363></e2362></e2361></e2360></e2359></e2358></e2357></e2356></e2355></e2354></e2353></e2352></e2351></e2350></e2349></e2348></e2347></e2346></e2345></e2344></e2343></e2342></e2341></e2340></e2339></e2338></e2337></e2336></e2335></e2334></e2333></e2332></e2331></e2330></e2329></e2328></e2327></e2326></e2325></e2324></e2323></e2322></e2321></e2320></e2319></e2318></e2317></e2316></e2315></e2314></e2313></e2312></e2311></e2310></e2309></e2308></e2307></e2306></e2305></e2304></e2303></e2302></e2301></e2300></e2299></e2298></e2297></e2296></e2295></e2294></e2293></e2292></e2291></e2290></e2289></e2288></e2287></e2286></e2285></e2284></e2283></e2282></e2281></e2280></e2279></e2278></e2277></e2276></e2275></e2274></e2273></e2272></e2271></e2270></e2269></e2268></e2267></e2266></e2265></e2264></e2263></e2262></e2261></e2260></e2259></e2258></e2257></e2256></e2255></e2254></e2253></e2252></e2251></e2250></e2249></e2248></e2247></e2246></e2245></e2244></e2243></e2242></e2241></e2240></e2239></e2238></e2237></e2236></e2235></e2234></e2233></e2232></e2231></e2230></e2229></e2228></e2227></e2226></e2225></e2224></e2223></e2222></e2221></e2220></e2219></e2218></e2217></e2216></e2215></e2214></e2213></e2212></e2211></e2210></e2209></e2208></e2207></e2206></e2205></e2204></e2203></e2202></e2201></e2200></e2199></e2198></e2197></e2196></e2195></e2194></e2193></e2192></e2191></e2190></e2189></e2188></e2187></e2186></e2185></e2184></e2183></e2182></e2181></e2180></e2179></e2178></e2177></e2176></e2175></e2174></e2173></e2172></e2171></e2170></e2169></e2168></e2167></e2166></e2165></e2164></e2163></e2162></e2161></e2160></e2159></e2158></e2157></e2156></e2155></e2154></e2153></e2152></e2151></e2150></e2149></e2148></e2147></e2146></e2145></e2144></e2143></e2142></e2141></e2140></e2139></e2138></e2137></e2136></e2135></e2134></e2133></e2132></e2131></e2130></e2129></e2128></e2127></e2126></e2125></e2124></e2123></e2122></e2121></e2120></e2119></e2118></e2117></e2116></e2115></e2114></e2113></e2112></e2111></e2110></e2109></e2108></e2107></e2106></e2105></e2104></e2103></e2102></e2101></e2100></e2099></e2098></e2097></e2096></e2095></e2094></e2093></e2092></e2091></e2090></e2089></e2088></e2087></e2086></e2085></e2084></e2083></e2082></e2081></e2080></e2079></e2078></e2077></e2076></e2075></e2074></e2073></e2072></e2071></e2070></e2069></e2068></e2067></e2066></e2065></e2064></e2063></e2062></e2061></e2060></e2059></e2058></e2057></e2056></e2055></e2054></e2053></e2052></e2051></e2050></e2049></e2048></e2047></e2046></e2045></e2044></e2043></e2042></e2041></e2040></e2039></e2038></e2037></e2036></e2035></e2034></e2033></e2032></e2031></e2030></e2029></e2028></e2027></e2026></e2025></e2024></e2023></e2022></e2021></e2020></e2019></e2018></e2017></e2016></e2015></e2014></e2013></e2012></e2011></e2010></e2009></e2008></e2007></e2006></e2005></e2004></e2003></e2002></e2001></e2000></e1999></e1998></e1997></e1996></e1995></e1994></e1993></e1992></e1991></e1990></e1989></e1988></e1987></e1986></e1985></e1984></e1983></e1982></e1981></e1980></e1979></e1978></e1977></e1976></e1975></e1974></e1973></e1972></e1971></e1970></e1969></e1968></e1967></e1966></e1965></e1964></e1963></e1962></e1961></e1960></e1959></e1958></e1957></e1956></e1955></e1954></e1953></e1952></e1951></e1950></e1949></e1948></e1947></e1946></e1945></e1944></e1943></e1942></e1941></e1940></e1939></e1938></e1937></e1936></e1935></e1934></e1933></e1932></e1931></e1930></e1929></e1928></e1927></e1926></e1925></e1924></e1923></e1922></e1921></e1920></e1919></e1918></e1917></e1916></e1915></e1914></e1913></e1912></e1911></e1910></e1909></e1908></e1907></e1906></e1905></e1904></e1903></e1902></e1901></e1900></e1899></e1898></e1897></e1896></e1895></e1894></e1893></e1892></e1891></e1890></e1889></e1888></e1887></e1886></e1885></e1884></e1883></e1882></e1881></e1880></e1879></e1878></e1877></e1876></e1875></e1874></e1873></e1872></e1871></e1870></e1869></e1868></e1867></e1866></e1865></e1864></e1863></e1862></e1861></e1860></e1859></e1858></e1857></e1856></e1855></e1854></e1853></e1852></e1851></e1850></e1849></e1848></e1847></e1846></e1845></e1844></e1843></e1842></e1841></e1840></e1839></e1838></e1837></e1836></e1835></e1834></e1833></e1832></e1831></e1830></e1829></e1828></e1827></e1826></e1825></e1824></e1823></e1822></e1821></e1820></e1819></e1818></e1817></e1816></e1815></e1814></e1813></e1812></e1811></e1810></e1809></e1808></e1807></e1806></e1805></e1804></e1803></e1802></e1801></e1800></e1799></e1798></e1797></e1796></e1795></e1794></e1793></e1792></e1791></e1790></e1789></e1788></e1787></e1786></e1785></e1784></e1783></e1782></e1781></e1780></e1779></e1778></e1777></e1776></e1775></e1774></e1773></e1772></e1771></e1770></e1769></e1768></e1767></e1766></e1765></e1764></e1763></e1762></e1761></e1760></e1759></e1758></e1757></e1756></e1755></e1754></e1753></e1752></e1751></e1750></e1749></e1748></e1747></e1746></e1745></e1744></e1743></e1742></e1741></e1740></e1739></e1738></e1737></e1736></e1735></e1734></e1733></e1732></e1731></e1730></e1729></e1728></e1727></e1726></e1725></e1724></e1723></e1722></e1721></e1720></e1719></e1718></e1717></e1716></e1715></e1714></e1713></e1712></e1711></e1710></e1709></e1708></e1707></e1706></e1705></e1704></e1703></e1702></e1701></e1700></e1699></e1698></e1697></e1696></e1695></e1694></e1693></e1692></e1691></e1690></e1689></e1688></e1687></e1686></e1685></e1684></e1683></e1682></e1681></e1680></e1679></e1678></e1677></e1676></e1675></e1674></e1673></e1672></e1671></e1670></e1669></e1668></e1667></e1666></e1665></e1664></e1663></e1662></e1661></e1660></e1659></e1658></e1657></e1656></e1655></e1654></e1653></e1652></e1651></e1650></e1649></e1648></e1647></e1646></e1645></e1644></e1643></e1642></e1641></e1640></e1639></e1638></e1637></e1636></e1635></e1634></e1633></e1632></e1631></e1630></e1629></e1628></e1627></e1626></e1625></e1624></e1623></e1622></e1621></e1620></e1619></e1618></e1617></e1616></e1615></e1614></e1613></e1612></e1611></e1610></e1609></e1608></e1607></e1606></e1605></e1604></e1603></e1602></e1601></e1600></e1599></e1598></e1597></e1596></e1595></e1594></e1593></e1592></e1591></e1590></e1589></e1588></e1587></e1586></e1585></e1584></e1583></e1582></e1581></e1580></e1579></e1578></e1577></e1576></e1575></e1574></e1573></e1572></e1571></e1570></e1569></e1568></e1567></e1566></e1565></e1564></e1563></e1562></e1561></e1560></e1559></e1558></e1557></e1556></e1555></e1554></e1553></e1552></e1551></e1550></e1549></e1548></e1547></e1546></e1545></e1544></e1543></e1542></e1541></e1540></e1539></e1538></e1537></e1536></e1535></e1534></e1533></e1532></e1531></e1530></e1529></e1528></e1527></e1526></e1525></e1524></e1523></e1522></e1521></e1520></e1519></e1518></e1517></e1516></e1515></e1514></e1513></e1512></e1511></e1510></e1509></e1508></e1507></e1506></e1505></e1504></e1503></e1502></e1501></e1500></e1499></e1498></e1497></e1496></e1495></e1494></e1493></e1492></e1491></e1490></e1489></e1488></e1487></e1486></e1485></e1484></e1483></e1482></e1481></e1480></e1479></e1478></e1477></e1476></e1475></e1474></e1473></e1472></e1471></e1470></e1469></e1468></e1467></e1466></e1465></e1464></e1463></e1462></e1461></e1460></e1459></e1458></e1457></e1456></e1455></e1454></e1453></e1452></e1451></e1450></e1449></e1448></e1447></e1446></e1445></e1444></e1443></e1442></e1441></e1440></e1439></e1438></e1437></e1436></e1435></e1434></e1433></e1432></e1431></e1430></e1429></e1428></e1427></e1426></e1425></e1424></e1423></e1422></e1421></e1420></e1419></e1418></e1417></e1416></e1415></e1414></e1413></e1412></e1411></e1410></e1409></e1408></e1407></e1406></e1405></e1404></e1403></e1402></e1401></e1400></e1399></e1398></e1397></e1396></e1395></e1394></e1393></e1392></e1391></e1390></e1389></e1388></e1387></e1386></e1385></e1384></e1383></e1382></e1381></e1380></e1379></e1378></e1377></e1376></e1375></e1374></e1373></e1372></e1371></e1370></e1369></e1368></e1367></e1366></e1365></e1364></e1363></e1362></e1361></e1360></e1359></e1358></e1357></e1356></e1355></e1354></e1353></e1352></e1351></e1350></e1349></e1348></e1347></e1346></e1345></e1344></e1343></e1342></e1341></e1340></e1339></e1338></e1337></e1336></e1335></e1334></e1333></e1332></e1331></e1330></e1329></e1328></e1327></e1326></e1325></e1324></e1323></e1322></e1321></e1320></e1319></e1318></e1317></e1316></e1315></e1314></e1313></e1312></e1311></e1310></e1309></e1308></e1307></e1306></e1305></e1304></e1303></e1302></e1301></e1300></e1299></e1298></e1297></e1296></e1295></e1294></e1293></e1292></e1291></e1290></e1289></e1288></e1287></e1286></e1285></e1284></e1283></e1282></e1281></e1280></e1279></e1278></e1277></e1276></e1275></e1274></e1273></e1272></e1271></e1270></e1269></e1268></e1267></e1266></e1265></e1264></e1263></e1262></e1261></e1260></e1259></e1258></e1257></e1256></e1255></e1254></e1253></e1252></e1251></e1250></e1249></e1248></e1247></e1246></e1245></e1244></e1243></e1242></e1241></e1240></e1239></e1238></e1237></e1236></e1235></e1234></e1233></e1232></e1231></e1230></e1229></e1228></e1227></e1226></e1225></e1224></e1223></e1222></e1221></e1220></e1219></e1218></e1217></e1216></e1215></e1214></e1213></e1212></e1211></e1210></e1209></e1208></e1207></e1206></e1205></e1204></e1203></e1202></e1201></e1200></e1199></e1198></e1197></e1196></e1195></e1194></e1193></e1192></e1191></e1190></e1189></e1188></e1187></e1186></e1185></e1184></e1183></e1182></e1181></e1180></e1179></e1178></e1177></e1176></e1175></e1174></e1173></e1172></e1171></e1170></e1169></e1168></e1167></e1166></e1165></e1164></e1163></e1162></e1161></e1160></e1159></e1158></e1157></e1156></e1155></e1154></e1153></e1152></e1151></e1150></e1149></e1148></e1147></e1146></e1145></e1144></e1143></e1142></e1141></e1140></e1139></e1138></e1137></e1136></e1135></e1134></e1133></e1132></e1131></e1130></e1129></e1128></e1127></e1126></e1125></e1124></e1123></e1122></e1121></e1120></e1119></e1118></e1117></e1116></e1115></e1114></e1113></e1112></e1111></e1110></e1109></e1108></e1107></e1106></e1105></e1104></e1103></e1102></e1101></e1100></e1099></e1098></e1097></e1096></e1095></e1094></e1093></e1092></e1091></e1090></e1089></e1088></e1087></e1086></e1085></e1084></e1083></e1082></e1081></e1080></e1079></e1078></e1077></e1076></e1075></e1074></e1073></e1072></e1071></e1070></e1069></e1068></e1067></e1066></e1065></e1064></e1063></e1062></e1061></e1060></e1059></e1058></e1057></e1056></e1055></e1054></e1053></e1052></e1051></e1050></e1049></e1048></e1047></e1046></e1045></e1044></e1043></e1042></e1041></e1040></e1039></e1038></e1037></e1036></e1035></e1034></e1033></e1032></e1031></e1030></e1029></e1028></e1027></e1026></e1025></e1024></e1023></e1022></e1021></e1020></e1019></e1018></e1017></e1016></e1015></e1014></e1013></e1012></e1011></e1010></e1009></e1008></e1007></e1006></e1005></e1004></e1003></e1002></e1001></e1000></e999></e998></e997></e996></e995></e994></e993></e992></e991></e990></e989></e988></e987></e986></e985></e984></e983></e982></e981></e980></e979></e978></e977></e976></e975></e974></e973></e972></e971></e970></e969></e968></e967></e966></e965></e964></e963></e962></e961></e960></e959></e958></e957></e956></e955></e954></e953></e952></e951></e950></e949></e948></e947></e946></e945></e944></e943></e942></e941></e940></e939></e938></e937></e936></e935></e934></e933></e932></e931></e930></e929></e928></e927></e926></e925></e924></e923></e922></e921></e920></e919></e918></e917></e916></e915></e914></e913></e912></e911></e910></e909></e908></e907></e906></e905></e904></e903></e902></e901></e900></e899></e898></e897></e896></e895></e894></e893></e892></e891></e890></e889></e888></e887></e886></e885></e884></e883></e882></e881></e880></e879></e878></e877></e876></e875></e874></e873></e872></e871></e870></e869></e868></e867></e866></e865></e864></e863></e862></e861></e860></e859></e858></e857></e856></e855></e854></e853></e852></e851></e850></e849></e848></e847></e846></e845></e844></e843></e842></e841></e840></e839></e838></e837></e836></e835></e834></e833></e832></e831></e830></e829></e828></e827></e826></e825></e824></e823></e822></e821></e820></e819></e818></e817></e816></e815></e814></e813></e812></e811></e810></e809></e808></e807></e806></e805></e804></e803></e802></e801></e800></e799></e798></e797></e796></e795></e794></e793></e792></e791></e790></e789></e788></e787></e786></e785></e784></e783></e782></e781></e780></e779></e778></e777></e776></e775></e774></e773></e772></e771></e770></e769></e768></e767></e766></e765></e764></e763></e762></e761></e760></e759></e758></e757></e756></e755></e754></e753></e752></e751></e750></e749></e748></e747></e746></e745></e744></e743></e742></e741></e740></e739></e738></e737></e736></e735></e734></e733></e732></e731></e730></e729></e728></e727></e726></e725></e724></e723></e722></e721></e720></e719></e718></e717></e716></e715></e714></e713></e712></e711></e710></e709></e708></e707></e706></e705></e704></e703></e702></e701></e700></e699></e698></e697></e696></e695></e694></e693></e692></e691></e690></e689></e688></e687></e686></e685></e684></e683></e682></e681></e680></e679></e678></e677></e676></e675></e674></e673></e672></e671></e670></e669></e668></e667></e666></e665></e664></e663></e662></e661></e660></e659></e658></e657></e656></e655></e654></e653></e652></e651></e650></e649></e648></e647></e646></e645></e644></e643></e642></e641></e640></e639></e638></e637></e636></e635></e634></e633></e632></e631></e630></e629></e628></e627></e626></e625></e624></e623></e622></e621></e620></e619></e618></e617></e616></e615></e614></e613></e612></e611></e610></e609></e608></e607></e606></e605></e604></e603></e602></e601></e600></e599></e598></e597></e596></e595></e594></e593></e592></e591></e590></e589></e588></e587></e586></e585></e584></e583></e582></e581></e580></e579></e578></e577></e576></e575></e574></e573></e572></e571></e570></e569></e568></e567></e566></e565></e564></e563></e562></e561></e560></e559></e558></e557></e556></e555></e554></e553></e552></e551></e550></e549></e548></e547></e546></e545></e544></e543></e542></e541></e540></e539></e538></e537></e536></e535></e534></e533></e532></e531></e530></e529></e528></e527></e526></e525></e524></e523></e522></e521></e520></e519></e518></e517></e516></e515></e514></e513></e512></e511></e510></e509></e508></e507></e506></e505></e504></e503></e502></e501></e500></e499></e498></e497></e496></e495></e494></e493></e492></e491></e490></e489></e488></e487></e486></e485></e484></e483></e482></e481></e480></e479></e478></e477></e476></e475></e474></e473></e472></e471></e470></e469></e468></e467></e466></e465></e464></e463></e462></e461></e460></e459></e458></e457></e456></e455></e454></e453></e452></e451></e450></e449></e448></e447></e446></e445></e444></e443></e442></e441></e440></e439></e438></e437></e436></e435></e434></e433></e432></e431></e430></e429></e428></e427></e426></e425></e424></e423></e422></e421></e420></e419></e418></e417></e416></e415></e414></e413></e412></e411></e410></e409></e408></e407></e406></e405></e404></e403></e402></e401></e400></e399></e398></e397></e396></e395></e394></e393></e392></e391></e390></e389></e388></e387></e386></e385></e384></e383></e382></e381></e380></e379></e378></e377></e376></e375></e374></e373></e372></e371></e370></e369></e368></e367></e366></e365></e364></e363></e362></e361></e360></e359></e358></e357></e356></e355></e354></e353></e352></e351></e350></e349></e348></e347></e346></e345></e344></e343></e342></e341></e340></e339></e338></e337></e336></e335></e334></e333></e332></e331></e330></e329></e328></e327></e326></e325></e324></e323></e322></e321></e320></e319></e318></e317></e316></e315></e314></e313></e312></e311></e310></e309></e308></e307></e306></e305></e304></e303></e302></e301></e300></e299></e298></e297></e296></e295></e294></e293></e292></e291></e290></e289></e288></e287></e286></e285></e284></e283></e282></e281></e280></e279></e278></e277></e276></e275></e274></e273></e272></e271></e270></e269></e268></e267></e266></e265></e264></e263></e262></e261></e260></e259></e258></e257></e256></e255></e254></e253></e252></e251></e250></e249></e248></e247></e246></e245></e244></e243></e242></e241></e240></e239></e238></e237></e236></e235></e234></e233></e232></e231></e230></e229></e228></e227></e226></e225></e224></e223></e222></e221></e220></e219></e218></e217></e216></e215></e214></e213></e212></e211></e210></e209></e208></e207></e206></e205></e204></e203></e202></e201></e200></e199></e198></e197></e196></e195></e194></e193></e192></e191></e190></e189></e188></e187></e186></e185></e184></e183></e182></e181></e180></e179></e178></e177></e176></e175></e174></e173></e172></e171></e170></e169></e168></e167></e166></e165></e164></e163></e162></e161></e160></e159></e158></e157></e156></e155></e154></e153></e152></e151></e150></e149></e148></e147></e146></e145></e144></e143></e142></e141></e140></e139></e138></e137></e136></e135></e134></e133></e132></e131></e130></e129></e128></e127></e126></e125></e124></e123></e122></e121></e120></e119></e118></e117></e116></e115></e114></e113></e112></e111></e110></e109></e108></e107></e106></e105></e104></e103></e102></e101></e100></e99></e98></e97></e96></e95></e94></e93></e92></e91></e90></e89></e88></e87></e86></e85></e84></e83></e82></e81></e80></e79></e78></e77></e76></e75></e74></e73></e72></e71></e70></e69></e68></e67></e66></e65></e64></e63></e62></e61></e60></e59></e58></e57></e56></e55></e54></e53></e52></e51></e50></e49></e48></e47></e46></e45></e44></e43></e42></e41></e40></e39></e38></e37></e36></e35></e34></e33></e32></e31></e30></e29></e28></e27></e26></e25></e24></e23></e22></e21></e20></e19></e18></e17></e16></e15></e14></e13></e12></e11></e10></e9></e8></e7></e6></e5></e4></e3></e2></e1></doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/elem128ktext.xml b/test/tests/perf/xtestdata/elem128ktext.xml
new file mode 100644
index 0000000..0810ef3
--- /dev/null
+++ b/test/tests/perf/xtestdata/elem128ktext.xml
@@ -0,0 +1,974 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+All's Well That Ends Well
+ASCII text placed in the public domain by Moby Lexical Tools, 1992.SGML markup by Jon Bosak, 1992-1994.XML version by Jon Bosak, 1996-1999.The XML markup in this version is Copyright © 1999 Jon Bosak. This work may freely be distributed on condition that it not be modified or altered in any way.
+Dramatis Personae
+KING OF FRANCE.DUKE OF FLORENCE.BERTRAM, Count of Rousillon.LAFEU, an old lord.PAROLLES, a follower of Bertram.Steward.Clown.servants to the Countess of Rousillon.A Page.COUNTESS OF ROUSILLON, mother to Bertram.HELENA, a gentlewoman protected by the Countess.An old Widow of Florence.DIANA, daughter to the Widow.VIOLENTA.MARIANA.neighbours and friends to the Widow.Lords, Officers, Soldiers, &amp;c., French and Florentine.
+SCENE Rousillon; Paris; Florence; Marseilles.
+ALL'S WELL THAT ENDS WELL
+ACT I
+SCENE I. Rousillon. The COUNT's palace.Enter BERTRAM, the COUNTESS of Rousillon, HELENA, and LAFEU, all in black
+COUNTESS: In delivering my son from me, I bury a second husband.
+BERTRAM: And I in going, madam, weep o'er my father's deathanew: but I must attend his majesty's command, towhom I am now in ward, evermore in subjection.
+LAFEU: You shall find of the king a husband, madam; you,sir, a father: he that so generally is at all timesgood must of necessity hold his virtue to you; whoseworthiness would stir it up where it wanted ratherthan lack it where there is such abundance.
+COUNTESS: What hope is there of his majesty's amendment?
+LAFEU: He hath abandoned his physicians, madam; under whosepractises he hath persecuted time with hope, andfinds no other advantage in the process but only thelosing of hope by time.
+COUNTESS: This young gentlewoman had a father,--O, that'had'! how sad a passage 'tis!--whose skill wasalmost as great as his honesty; had it stretched sofar, would have made nature immortal, and deathshould have play for lack of work. Would, for theking's sake, he were living! I think it would bethe death of the king's disease.
+LAFEU: How called you the man you speak of, madam?
+COUNTESS: He was famous, sir, in his profession, and it washis great right to be so: Gerard de Narbon.
+LAFEU: He was excellent indeed, madam: the king verylately spoke of him admiringly and mourningly: hewas skilful enough to have lived still, if knowledgecould be set up against mortality.
+BERTRAM: What is it, my good lord, the king languishes of?
+LAFEU: A fistula, my lord.
+BERTRAM: I heard not of it before.
+LAFEU: I would it were not notorious. Was this gentlewomanthe daughter of Gerard de Narbon?
+COUNTESS: His sole child, my lord, and bequeathed to myoverlooking. I have those hopes of her good thather education promises; her dispositions sheinherits, which makes fair gifts fairer; for wherean unclean mind carries virtuous qualities, therecommendations go with pity; they are virtues andtraitors too; in her they are the better for theirsimpleness; she derives her honesty and achieves her goodness.
+LAFEU: Your commendations, madam, get from her tears.
+COUNTESS: 'Tis the best brine a maiden can season her praisein. The remembrance of her father never approachesher heart but the tyranny of her sorrows takes alllivelihood from her cheek. No more of this, Helena;go to, no more; lest it be rather thought you affecta sorrow than have it.
+HELENA: I do affect a sorrow indeed, but I have it too.
+LAFEU: Moderate lamentation is the right of the dead,excessive grief the enemy to the living.
+COUNTESS: If the living be enemy to the grief, the excessmakes it soon mortal.
+BERTRAM: Madam, I desire your holy wishes.
+LAFEU: How understand we that?
+COUNTESS: Be thou blest, Bertram, and succeed thy fatherIn manners, as in shape! thy blood and virtueContend for empire in thee, and thy goodnessShare with thy birthright! Love all, trust a few,Do wrong to none: be able for thine enemyRather in power than use, and keep thy friendUnder thy own life's key: be cheque'd for silence,But never tax'd for speech. What heaven more will,That thee may furnish and my prayers pluck down,Fall on thy head! Farewell, my lord;'Tis an unseason'd courtier; good my lord,Advise him.
+LAFEU: He cannot want the bestThat shall attend his love.
+COUNTESS: Heaven bless him! Farewell, Bertram.Exit
+BERTRAM: To HELENAThe best wishes that can be forged inyour thoughts be servants to you! Be comfortableto my mother, your mistress, and make much of her.
+LAFEU: Farewell, pretty lady: you must hold the credit ofyour father.Exeunt BERTRAM and LAFEU
+HELENA: O, were that all! I think not on my father;And these great tears grace his remembrance moreThan those I shed for him. What was he like?I have forgot him: my imaginationCarries no favour in't but Bertram's.I am undone: there is no living, none,If Bertram be away. 'Twere all oneThat I should love a bright particular starAnd think to wed it, he is so above me:In his bright radiance and collateral lightMust I be comforted, not in his sphere.The ambition in my love thus plagues itself:The hind that would be mated by the lionMust die for love. 'Twas pretty, though plague,To see him every hour; to sit and drawHis arched brows, his hawking eye, his curls,In our heart's table; heart too capableOf every line and trick of his sweet favour:But now he's gone, and my idolatrous fancyMust sanctify his reliques. Who comes here?Enter PAROLLESAsideOne that goes with him: I love him for his sake;And yet I know him a notorious liar,Think him a great way fool, solely a coward;Yet these fixed evils sit so fit in him,That they take place, when virtue's steely bonesLook bleak i' the cold wind: withal, full oft we seeCold wisdom waiting on superfluous folly.
+PAROLLES: Save you, fair queen!
+HELENA: And you, monarch!
+PAROLLES: No.
+HELENA: And no.
+PAROLLES: Are you meditating on virginity?
+HELENA: Ay. You have some stain of soldier in you: let meask you a question. Man is enemy to virginity; howmay we barricado it against him?
+PAROLLES: Keep him out.
+HELENA: But he assails; and our virginity, though valiant,in the defence yet is weak: unfold to us somewarlike resistance.
+PAROLLES: There is none: man, sitting down before you, willundermine you and blow you up.
+HELENA: Bless our poor virginity from underminers andblowers up! Is there no military policy, howvirgins might blow up men?
+PAROLLES: Virginity being blown down, man will quicklier beblown up: marry, in blowing him down again, withthe breach yourselves made, you lose your city. Itis not politic in the commonwealth of nature topreserve virginity. Loss of virginity is rationalincrease and there was never virgin got tillvirginity was first lost. That you were made of ismetal to make virgins. Virginity by being once lostmay be ten times found; by being ever kept, it isever lost: 'tis too cold a companion; away with 't!
+HELENA: I will stand for 't a little, though therefore I die a virgin.
+PAROLLES: There's little can be said in 't; 'tis against therule of nature. To speak on the part of virginity,is to accuse your mothers; which is most infallibledisobedience. He that hangs himself is a virgin:virginity murders itself and should be buried inhighways out of all sanctified limit, as a desperateoffendress against nature. Virginity breeds mites,much like a cheese; consumes itself to the veryparing, and so dies with feeding his own stomach.Besides, virginity is peevish, proud, idle, made ofself-love, which is the most inhibited sin in thecanon. Keep it not; you cannot choose but looseby't: out with 't! within ten year it will makeitself ten, which is a goodly increase; and theprincipal itself not much the worse: away with 't!
+HELENA: How might one do, sir, to lose it to her own liking?
+PAROLLES: Let me see: marry, ill, to like him that ne'er itlikes. 'Tis a commodity will lose the gloss withlying; the longer kept, the less worth: off with 'twhile 'tis vendible; answer the time of request.Virginity, like an old courtier, wears her cap outof fashion: richly suited, but unsuitable: justlike the brooch and the tooth-pick, which wear notnow. Your date is better in your pie and yourporridge than in your cheek; and your virginity,your old virginity, is like one of our Frenchwithered pears, it looks ill, it eats drily; marry,'tis a withered pear; it was formerly better;marry, yet 'tis a withered pear: will you anything with it?
+HELENA: Not my virginity yetThere shall your master have a thousand loves,A mother and a mistress and a friend,A phoenix, captain and an enemy,A guide, a goddess, and a sovereign,A counsellor, a traitress, and a dear;His humble ambition, proud humility,His jarring concord, and his discord dulcet,His faith, his sweet disaster; with a worldOf pretty, fond, adoptious christendoms,That blinking Cupid gossips. Now shall he--I know not what he shall. God send him well!The court's a learning place, and he is one--
+PAROLLES: What one, i' faith?
+HELENA: That I wish well. 'Tis pity--
+PAROLLES: What's pity?
+HELENA: That wishing well had not a body in't,Which might be felt; that we, the poorer born,Whose baser stars do shut us up in wishes,Might with effects of them follow our friends,And show what we alone must think, which neverReturn us thanks.Enter Page
+Page: Monsieur Parolles, my lord calls for you.Exit
+PAROLLES: Little Helen, farewell; if I can remember thee, Iwill think of thee at court.
+HELENA: Monsieur Parolles, you were born under a charitable star.
+PAROLLES: Under Mars, I.
+HELENA: I especially think, under Mars.
+PAROLLES: Why under Mars?
+HELENA: The wars have so kept you under that you must needsbe born under Mars.
+PAROLLES: When he was predominant.
+HELENA: When he was retrograde, I think, rather.
+PAROLLES: Why think you so?
+HELENA: You go so much backward when you fight.
+PAROLLES: That's for advantage.
+HELENA: So is running away, when fear proposes the safety;but the composition that your valour and fear makesin you is a virtue of a good wing, and I like the wear well.
+PAROLLES: I am so full of businesses, I cannot answer theeacutely. I will return perfect courtier; in thewhich, my instruction shall serve to naturalizethee, so thou wilt be capable of a courtier'scounsel and understand what advice shall thrust uponthee; else thou diest in thine unthankfulness, andthine ignorance makes thee away: farewell. Whenthou hast leisure, say thy prayers; when thou hastnone, remember thy friends; get thee a good husband,and use him as he uses thee; so, farewell.Exit
+HELENA: Our remedies oft in ourselves do lie,Which we ascribe to heaven: the fated skyGives us free scope, only doth backward pullOur slow designs when we ourselves are dull.What power is it which mounts my love so high,That makes me see, and cannot feed mine eye?The mightiest space in fortune nature bringsTo join like likes and kiss like native things.Impossible be strange attempts to thoseThat weigh their pains in sense and do supposeWhat hath been cannot be: who ever stroveSo show her merit, that did miss her love?The king's disease--my project may deceive me,But my intents are fix'd and will not leave me.Exit
+SCENE II. Paris. The KING's palace.Flourish of cornets. Enter the KING of France, with letters, and divers Attendants
+KING: The Florentines and Senoys are by the ears;Have fought with equal fortune and continueA braving war.
+First Lord: So 'tis reported, sir.
+KING: Nay, 'tis most credible; we here received itA certainty, vouch'd from our cousin Austria,With caution that the Florentine will move usFor speedy aid; wherein our dearest friendPrejudicates the business and would seemTo have us make denial.
+First Lord: His love and wisdom,Approved so to your majesty, may pleadFor amplest credence.
+KING: He hath arm'd our answer,And Florence is denied before he comes:Yet, for our gentlemen that mean to seeThe Tuscan service, freely have they leaveTo stand on either part.
+Second Lord: It well may serveA nursery to our gentry, who are sickFor breathing and exploit.
+KING: What's he comes here?Enter BERTRAM, LAFEU, and PAROLLES
+First Lord: It is the Count Rousillon, my good lord,Young Bertram.
+KING: Youth, thou bear'st thy father's face;Frank nature, rather curious than in haste,Hath well composed thee. Thy father's moral partsMayst thou inherit too! Welcome to Paris.
+BERTRAM: My thanks and duty are your majesty's.
+KING: I would I had that corporal soundness now,As when thy father and myself in friendshipFirst tried our soldiership! He did look farInto the service of the time and wasDiscipled of the bravest: he lasted long;But on us both did haggish age steal onAnd wore us out of act. It much repairs meTo talk of your good father. In his youthHe had the wit which I can well observeTo-day in our young lords; but they may jestTill their own scorn return to them unnotedEre they can hide their levity in honour;So like a courtier, contempt nor bitternessWere in his pride or sharpness; if they were,His equal had awaked them, and his honour,Clock to itself, knew the true minute whenException bid him speak, and at this timeHis tongue obey'd his hand: who were below himHe used as creatures of another placeAnd bow'd his eminent top to their low ranks,Making them proud of his humility,In their poor praise he humbled. Such a manMight be a copy to these younger times;Which, follow'd well, would demonstrate them nowBut goers backward.
+BERTRAM: His good remembrance, sir,Lies richer in your thoughts than on his tomb;So in approof lives not his epitaphAs in your royal speech.
+KING: Would I were with him! He would always say--Methinks I hear him now; his plausive wordsHe scatter'd not in ears, but grafted them,To grow there and to bear,--'Let me not live,'--This his good melancholy oft began,On the catastrophe and heel of pastime,When it was out,--'Let me not live,' quoth he,'After my flame lacks oil, to be the snuffOf younger spirits, whose apprehensive sensesAll but new things disdain; whose judgments areMere fathers of their garments; whose constanciesExpire before their fashions.' This he wish'd;I after him do after him wish too,Since I nor wax nor honey can bring home,I quickly were dissolved from my hive,To give some labourers room.
+Second Lord: You are loved, sir:They that least lend it you shall lack you first.
+KING: I fill a place, I know't. How long is't, count,Since the physician at your father's died?He was much famed.
+BERTRAM: Some six months since, my lord.
+KING: If he were living, I would try him yet.Lend me an arm; the rest have worn me outWith several applications; nature and sicknessDebate it at their leisure. Welcome, count;My son's no dearer.
+BERTRAM: Thank your majesty.Exeunt. Flourish
+SCENE III. Rousillon. The COUNT's palace.Enter COUNTESS, Steward, and Clown
+COUNTESS: I will now hear; what say you of this gentlewoman?
+Steward: Madam, the care I have had to even your content, Iwish might be found in the calendar of my pastendeavours; for then we wound our modesty and makefoul the clearness of our deservings, when ofourselves we publish them.
+COUNTESS: What does this knave here? Get you gone, sirrah:the complaints I have heard of you I do not allbelieve: 'tis my slowness that I do not; for I knowyou lack not folly to commit them, and have abilityenough to make such knaveries yours.
+Clown: 'Tis not unknown to you, madam, I am a poor fellow.
+COUNTESS: Well, sir.
+Clown: No, madam, 'tis not so well that I am poor, thoughmany of the rich are damned: but, if I may haveyour ladyship's good will to go to the world, Isbelthe woman and I will do as we may.
+COUNTESS: Wilt thou needs be a beggar?
+Clown: I do beg your good will in this case.
+COUNTESS: In what case?
+Clown: In Isbel's case and mine own. Service is noheritage: and I think I shall never have theblessing of God till I have issue o' my body; forthey say barnes are blessings.
+COUNTESS: Tell me thy reason why thou wilt marry.
+Clown: My poor body, madam, requires it: I am driven onby the flesh; and he must needs go that the devil drives.
+COUNTESS: Is this all your worship's reason?
+Clown: Faith, madam, I have other holy reasons such as theyare.
+COUNTESS: May the world know them?
+Clown: I have been, madam, a wicked creature, as you andall flesh and blood are; and, indeed, I do marrythat I may repent.
+COUNTESS: Thy marriage, sooner than thy wickedness.
+Clown: I am out o' friends, madam; and I hope to havefriends for my wife's sake.
+COUNTESS: Such friends are thine enemies, knave.
+Clown: You're shallow, madam, in great friends; for theknaves come to do that for me which I am aweary of.He that ears my land spares my team and gives meleave to in the crop; if I be his cuckold, he's mydrudge: he that comforts my wife is the cherisherof my flesh and blood; he that cherishes my fleshand blood loves my flesh and blood; he that loves myflesh and blood is my friend: ergo, he that kissesmy wife is my friend. If men could be contented tobe what they are, there were no fear in marriage;for young Charbon the Puritan and old Poysam thePapist, howsome'er their hearts are severed inreligion, their heads are both one; they may jowlhorns together, like any deer i' the herd.
+COUNTESS: Wilt thou ever be a foul-mouthed and calumnious knave?
+Clown: A prophet I, madam; and I speak the truth the nextway:For I the ballad will repeat,Which men full true shall find;Your marriage comes by destiny,Your cuckoo sings by kind.
+COUNTESS: Get you gone, sir; I'll talk with you more anon.
+Steward: May it please you, madam, that he bid Helen come toyou: of her I am to speak.
+COUNTESS: Sirrah, tell my gentlewoman I would speak with her;Helen, I mean.
+Clown: Was this fair face the cause, quoth she,Why the Grecians sacked Troy?Fond done, done fond,Was this King Priam's joy?With that she sighed as she stood,With that she sighed as she stood,And gave this sentence then;Among nine bad if one be good,Among nine bad if one be good,There's yet one good in ten.
+COUNTESS: What, one good in ten? you corrupt the song, sirrah.
+Clown: One good woman in ten, madam; which is a purifyingo' the song: would God would serve the world so allthe year! we'ld find no fault with the tithe-woman,if I were the parson. One in ten, quoth a'! An wemight have a good woman born but one every blazingstar, or at an earthquake, 'twould mend the lotterywell: a man may draw his heart out, ere a' pluckone.
+COUNTESS: You'll be gone, sir knave, and do as I command you.
+Clown: That man should be at woman's command, and yet nohurt done! Though honesty be no puritan, yet itwill do no hurt; it will wear the surplice ofhumility over the black gown of a big heart. I amgoing, forsooth: the business is for Helen to come hither.Exit
+COUNTESS: Well, now.
+Steward: I know, madam, you love your gentlewoman entirely.
+COUNTESS: Faith, I do: her father bequeathed her to me; andshe herself, without other advantage, may lawfullymake title to as much love as she finds: there ismore owing her than is paid; and more shall be paidher than she'll demand.
+Steward: Madam, I was very late more near her than I thinkshe wished me: alone she was, and did communicateto herself her own words to her own ears; shethought, I dare vow for her, they touched not anystranger sense. Her matter was, she loved your son:Fortune, she said, was no goddess, that had putsuch difference betwixt their two estates; Love nogod, that would not extend his might, only wherequalities were level; Dian no queen of virgins, thatwould suffer her poor knight surprised, withoutrescue in the first assault or ransom afterward.This she delivered in the most bitter touch ofsorrow that e'er I heard virgin exclaim in: which Iheld my duty speedily to acquaint you withal;sithence, in the loss that may happen, it concernsyou something to know it.
+COUNTESS: You have discharged this honestly; keep it toyourself: many likelihoods informed me of thisbefore, which hung so tottering in the balance thatI could neither believe nor misdoubt. Pray you,leave me: stall this in your bosom; and I thank youfor your honest care: I will speak with you further anon.Exit StewardEnter HELENAEven so it was with me when I was young:If ever we are nature's, these are ours; this thornDoth to our rose of youth rightly belong;Our blood to us, this to our blood is born;It is the show and seal of nature's truth,Where love's strong passion is impress'd in youth:By our remembrances of days foregone,Such were our faults, or then we thought them none.Her eye is sick on't: I observe her now.
+HELENA: What is your pleasure, madam?
+COUNTESS: You know, Helen,I am a mother to you.
+HELENA: Mine honourable mistress.
+COUNTESS: Nay, a mother:Why not a mother? When I said 'a mother,'Methought you saw a serpent: what's in 'mother,'That you start at it? I say, I am your mother;And put you in the catalogue of thoseThat were enwombed mine: 'tis often seenAdoption strives with nature and choice breedsA native slip to us from foreign seeds:You ne'er oppress'd me with a mother's groan,Yet I express to you a mother's care:God's mercy, maiden! does it curd thy bloodTo say I am thy mother? What's the matter,That this distemper'd messenger of wet,The many-colour'd Iris, rounds thine eye?Why? that you are my daughter?
+HELENA: That I am not.
+COUNTESS: I say, I am your mother.
+HELENA: Pardon, madam;The Count Rousillon cannot be my brother:I am from humble, he from honour'd name;No note upon my parents, his all noble:My master, my dear lord he is; and IHis servant live, and will his vassal die:He must not be my brother.
+COUNTESS: Nor I your mother?
+HELENA: You are my mother, madam; would you were,--So that my lord your son were not my brother,--Indeed my mother! or were you both our mothers,I care no more for than I do for heaven,So I were not his sister. Can't no other,But, I your daughter, he must be my brother?
+COUNTESS: Yes, Helen, you might be my daughter-in-law:God shield you mean it not! daughter and motherSo strive upon your pulse. What, pale again?My fear hath catch'd your fondness: now I seeThe mystery of your loneliness, and findYour salt tears' head: now to all sense 'tis grossYou love my son; invention is ashamed,Against the proclamation of thy passion,To say thou dost not: therefore tell me true;But tell me then, 'tis so; for, look thy cheeksConfess it, th' one to th' other; and thine eyesSee it so grossly shown in thy behaviorsThat in their kind they speak it: only sinAnd hellish obstinacy tie thy tongue,That truth should be suspected. Speak, is't so?If it be so, you have wound a goodly clew;If it be not, forswear't: howe'er, I charge thee,As heaven shall work in me for thine avail,Tell me truly.
+HELENA: Good madam, pardon me!
+COUNTESS: Do you love my son?
+HELENA: Your pardon, noble mistress!
+COUNTESS: Love you my son?
+HELENA: Do not you love him, madam?
+COUNTESS: Go not about; my love hath in't a bond,Whereof the world takes note: come, come, discloseThe state of your affection; for your passionsHave to the full appeach'd.
+HELENA: Then, I confess,Here on my knee, before high heaven and you,That before you, and next unto high heaven,I love your son.My friends were poor, but honest; so's my love:Be not offended; for it hurts not himThat he is loved of me: I follow him notBy any token of presumptuous suit;Nor would I have him till I do deserve him;Yet never know how that desert should be.I know I love in vain, strive against hope;Yet in this captious and intenible sieveI still pour in the waters of my loveAnd lack not to lose still: thus, Indian-like,Religious in mine error, I adoreThe sun, that looks upon his worshipper,But knows of him no more. My dearest madam,Let not your hate encounter with my loveFor loving where you do: but if yourself,Whose aged honour cites a virtuous youth,Did ever in so true a flame of likingWish chastely and love dearly, that your DianWas both herself and love: O, then, give pityTo her, whose state is such that cannot chooseBut lend and give where she is sure to lose;That seeks not to find that her search implies,But riddle-like lives sweetly where she dies!
+COUNTESS: Had you not lately an intent,--speak truly,--To go to Paris?
+HELENA: Madam, I had.
+COUNTESS: Wherefore? tell true.
+HELENA: I will tell truth; by grace itself I swear.You know my father left me some prescriptionsOf rare and proved effects, such as his readingAnd manifest experience had collectedFor general sovereignty; and that he will'd meIn heedfull'st reservation to bestow them,As notes whose faculties inclusive wereMore than they were in note: amongst the rest,There is a remedy, approved, set down,To cure the desperate languishings whereofThe king is render'd lost.
+COUNTESS: This was your motiveFor Paris, was it? speak.
+HELENA: My lord your son made me to think of this;Else Paris and the medicine and the kingHad from the conversation of my thoughtsHaply been absent then.
+COUNTESS: But think you, Helen,If you should tender your supposed aid,He would receive it? he and his physiciansAre of a mind; he, that they cannot help him,They, that they cannot help: how shall they creditA poor unlearned virgin, when the schools,Embowell'd of their doctrine, have left offThe danger to itself?
+HELENA: There's something in't,More than my father's skill, which was the greatestOf his profession, that his good receiptShall for my legacy be sanctifiedBy the luckiest stars in heaven: and, would your honourBut give me leave to try success, I'ld ventureThe well-lost life of mine on his grace's cureBy such a day and hour.
+COUNTESS: Dost thou believe't?
+HELENA: Ay, madam, knowingly.
+COUNTESS: Why, Helen, thou shalt have my leave and love,Means and attendants and my loving greetingsTo those of mine in court: I'll stay at homeAnd pray God's blessing into thy attempt:Be gone to-morrow; and be sure of this,What I can help thee to thou shalt not miss.Exeunt
+ACT II
+SCENE I. Paris. The KING's palace.Flourish of cornets. Enter the KING, attended with divers young Lords taking leave for the Florentine war; BERTRAM, and PAROLLES
+KING: Farewell, young lords; these warlike principlesDo not throw from you: and you, my lords, farewell:Share the advice betwixt you; if both gain, allThe gift doth stretch itself as 'tis received,And is enough for both.
+First Lord: 'Tis our hope, sir,After well enter'd soldiers, to returnAnd find your grace in health.
+KING: No, no, it cannot be; and yet my heartWill not confess he owes the maladyThat doth my life besiege. Farewell, young lords;Whether I live or die, be you the sonsOf worthy Frenchmen: let higher Italy,--Those bated that inherit but the fallOf the last monarchy,--see that you comeNot to woo honour, but to wed it; whenThe bravest questant shrinks, find what you seek,That fame may cry you loud: I say, farewell.
+Second Lord: Health, at your bidding, serve your majesty!
+KING: Those girls of Italy, take heed of them:They say, our French lack language to deny,If they demand: beware of being captives,Before you serve.
+Both: Our hearts receive your warnings.
+KING: Farewell. Come hither to me.Exit, attended
+First Lord: O, my sweet lord, that you will stay behind us!
+PAROLLES: 'Tis not his fault, the spark.
+Second Lord: O, 'tis brave wars!
+PAROLLES: Most admirable: I have seen those wars.
+BERTRAM: I am commanded here, and kept a coil with'Too young' and 'the next year' and ''tis too early.'
+PAROLLES: An thy mind stand to't, boy, steal away bravely.
+BERTRAM: I shall stay here the forehorse to a smock,Creaking my shoes on the plain masonry,Till honour be bought up and no sword wornBut one to dance with! By heaven, I'll steal away.
+First Lord: There's honour in the theft.
+PAROLLES: Commit it, count.
+Second Lord: I am your accessary; and so, farewell.
+BERTRAM: I grow to you, and our parting is a tortured body.
+First Lord: Farewell, captain.
+Second Lord: Sweet Monsieur Parolles!
+PAROLLES: Noble heroes, my sword and yours are kin. Goodsparks and lustrous, a word, good metals: you shallfind in the regiment of the Spinii one CaptainSpurio, with his cicatrice, an emblem of war, hereon his sinister cheek; it was this very swordentrenched it: say to him, I live; and observe hisreports for me.
+First Lord: We shall, noble captain.Exeunt Lords
+PAROLLES: Mars dote on you for his novices! what will ye do?
+BERTRAM: Stay: the king.Re-enter KING. BERTRAM and PAROLLES retire
+PAROLLES: To BERTRAMUse a more spacious ceremony to thenoble lords; you have restrained yourself within thelist of too cold an adieu: be more expressive tothem: for they wear themselves in the cap of thetime, there do muster true gait, eat, speak, andmove under the influence of the most received star;and though the devil lead the measure, such are tobe followed: after them, and take a more dilated farewell.
+BERTRAM: And I will do so.
+PAROLLES: Worthy fellows; and like to prove most sinewy sword-men.Exeunt BERTRAM and PAROLLESEnter LAFEU
+LAFEU: KneelingPardon, my lord, for me and for my tidings.
+KING: I'll fee thee to stand up.
+LAFEU: Then here's a man stands, that has brought his pardon.I would you had kneel'd, my lord, to ask me mercy,And that at my bidding you could so stand up.
+KING: I would I had; so I had broke thy pate,And ask'd thee mercy for't.
+LAFEU: Good faith, across: but, my good lord 'tis thus;Will you be cured of your infirmity?
+KING: No.
+LAFEU: O, will you eat no grapes, my royal fox?Yes, but you will my noble grapes, an ifMy royal fox could reach them: I have seen a medicineThat's able to breathe life into a stone,Quicken a rock, and make you dance canaryWith spritely fire and motion; whose simple touch,Is powerful to araise King Pepin, nay,To give great Charlemain a pen in's hand,And write to her a love-line.
+KING: What 'her' is this?
+LAFEU: Why, Doctor She: my lord, there's one arrived,If you will see her: now, by my faith and honour,If seriously I may convey my thoughtsIn this my light deliverance, I have spokeWith one that, in her sex, her years, profession,Wisdom and constancy, hath amazed me moreThan I dare blame my weakness: will you see herFor that is her demand, and know her business?That done, laugh well at me.
+KING: Now, good Lafeu,Bring in the admiration; that we with theeMay spend our wonder too, or take off thineBy wondering how thou took'st it.
+LAFEU: Nay, I'll fit you,And not be all day neither.Exit
+KING: Thus he his special nothing ever prologues.Re-enter LAFEU, with HELENA
+LAFEU: Nay, come your ways.
+KING: This haste hath wings indeed.
+LAFEU: Nay, come your ways:This is his majesty; say your mind to him:A traitor you do look like; but such traitorsHis majesty seldom fears: I am Cressid's uncle,That dare leave two together; fare you well.Exit
+KING: Now, fair one, does your business follow us?
+HELENA: Ay, my good lord.Gerard de Narbon was my father;In what he did profess, well found.
+KING: I knew him.
+HELENA: The rather will I spare my praises towards him:Knowing him is enough. On's bed of deathMany receipts he gave me: chiefly one.Which, as the dearest issue of his practise,And of his old experience the oily darling,He bade me store up, as a triple eye,Safer than mine own two, more dear; I have so;And hearing your high majesty is touch'dWith that malignant cause wherein the honourOf my dear father's gift stands chief in power,I come to tender it and my applianceWith all bound humbleness.
+KING: We thank you, maiden;But may not be so credulous of cure,When our most learned doctors leave us andThe congregated college have concludedThat labouring art can never ransom natureFrom her inaidible estate; I say we must notSo stain our judgment, or corrupt our hope,To prostitute our past-cure maladyTo empirics, or to dissever soOur great self and our credit, to esteemA senseless help when help past sense we deem.
+HELENA: My duty then shall pay me for my pains:I will no more enforce mine office on you.Humbly entreating from your royal thoughtsA modest one, to bear me back a again.
+KING: I cannot give thee less, to be call'd grateful:Thou thought'st to help me; and such thanks I giveAs one near death to those that wish him live:But what at full I know, thou know'st no part,I knowing all my peril, thou no art.
+HELENA: What I can do can do no hurt to try,Since you set up your rest 'gainst remedy.He that of greatest works is finisherOft does them by the weakest minister:So holy writ in babes hath judgment shown,When judges have been babes; great floods have flownFrom simple sources, and great seas have driedWhen miracles have by the greatest been denied.Oft expectation fails and most oft thereWhere most it promises, and oft it hitsWhere hope is coldest and despair most fits.
+KING: I must not hear thee; fare thee well, kind maid;Thy pains not used must by thyself be paid:Proffers not took reap thanks for their reward.
+HELENA: Inspired merit so by breath is barr'd:It is not so with Him that all things knowsAs 'tis with us that square our guess by shows;But most it is presumption in us whenThe help of heaven we count the act of men.Dear sir, to my endeavours give consent;Of heaven, not me, make an experiment.I am not an impostor that proclaimMyself against the level of mine aim;But know I think and think I know most sureMy art is not past power nor you past cure.
+KING: Are thou so confident? within what spaceHopest thou my cure?
+HELENA: The great'st grace lending graceEre twice the horses of the sun shall bringTheir fiery torcher his diurnal ring,Ere twice in murk and occidental dampMoist Hesperus hath quench'd his sleepy lamp,Or four and twenty times the pilot's glassHath told the thievish minutes how they pass,What is infirm from your sound parts shall fly,Health shall live free and sickness freely die.
+KING: Upon thy certainty and confidenceWhat darest thou venture?
+HELENA: Tax of impudence,A strumpet's boldness, a divulged shameTraduced by odious ballads: my maiden's nameSear'd otherwise; nay, worse--if worse--extendedWith vilest torture let my life be ended.
+KING: Methinks in thee some blessed spirit doth speakHis powerful sound within an organ weak:And what impossibility would slayIn common sense, sense saves another way.Thy life is dear; for all that life can rateWorth name of life in thee hath estimate,Youth, beauty, wisdom, courage, allThat happiness and prime can happy call:Thou this to hazard needs must intimateSkill infinite or monstrous desperate.Sweet practiser, thy physic I will try,That ministers thine own death if I die.
+HELENA: If I break time, or flinch in propertyOf what I spoke, unpitied let me die,And well deserved: not helping, death's my fee;But, if I help, what do you promise me?
+KING: Make thy demand.
+HELENA: But will you make it even?
+KING: Ay, by my sceptre and my hopes of heaven.
+HELENA: Then shalt thou give me with thy kingly handWhat husband in thy power I will command:Exempted be from me the arroganceTo choose from forth the royal blood of France,My low and humble name to propagateWith any branch or image of thy state;But such a one, thy vassal, whom I knowIs free for me to ask, thee to bestow.
+KING: Here is my hand; the premises observed,Thy will by my performance shall be served:So make the choice of thy own time, for I,Thy resolved patient, on thee still rely.More should I question thee, and more I must,Though more to know could not be more to trust,From whence thou camest, how tended on: but restUnquestion'd welcome and undoubted blest.Give me some help here, ho! If thou proceedAs high as word, my deed shall match thy meed.Flourish. Exeunt
+SCENE II. Rousillon. The COUNT's palace.Enter COUNTESS and Clown
+COUNTESS: Come on, sir; I shall now put you to the height ofyour breeding.
+Clown: I will show myself highly fed and lowly taught: Iknow my business is but to the court.
+COUNTESS: To the court! why, what place make you special,when you put off that with such contempt? But to the court!
+Clown: Truly, madam, if God have lent a man any manners, hemay easily put it off at court: he that cannot makea leg, put off's cap, kiss his hand and say nothing,has neither leg, hands, lip, nor cap; and indeedsuch a fellow, to say precisely, were not for thecourt; but for me, I have an answer will serve allmen.
+COUNTESS: Marry, that's a bountiful answer that fits allquestions.
+Clown: It is like a barber's chair that fits all buttocks,the pin-buttock, the quatch-buttock, the brawnbuttock, or any buttock.
+COUNTESS: Will your answer serve fit to all questions?
+Clown: As fit as ten groats is for the hand of an attorney,as your French crown for your taffeta punk, as Tib'srush for Tom's forefinger, as a pancake for ShroveTuesday, a morris for May-day, as the nail to hishole, the cuckold to his horn, as a scolding queento a wrangling knave, as the nun's lip to thefriar's mouth, nay, as the pudding to his skin.
+COUNTESS: Have you, I say, an answer of such fitness for allquestions?
+Clown: From below your duke to beneath your constable, itwill fit any question.
+COUNTESS: It must be an answer of most monstrous size thatmust fit all demands.
+Clown: But a trifle neither, in good faith, if the learnedshould speak truth of it: here it is, and all thatbelongs to't. Ask me if I am a courtier: it shalldo you no harm to learn.
+COUNTESS: To be young again, if we could: I will be a fool inquestion, hoping to be the wiser by your answer. Ipray you, sir, are you a courtier?
+Clown: O Lord, sir! There's a simple putting off. More,more, a hundred of them.
+COUNTESS: Sir, I am a poor friend of yours, that loves you.
+Clown: O Lord, sir! Thick, thick, spare not me.
+COUNTESS: I think, sir, you can eat none of this homely meat.
+Clown: O Lord, sir! Nay, put me to't, I warrant you.
+COUNTESS: You were lately whipped, sir, as I think.
+Clown: O Lord, sir! spare not me.
+COUNTESS: Do you cry, 'O Lord, sir!' at your whipping, and'spare not me?' Indeed your 'O Lord, sir!' is verysequent to your whipping: you would answer very wellto a whipping, if you were but bound to't.
+Clown: I ne'er had worse luck in my life in my 'O Lord,sir!' I see things may serve long, but not serve ever.
+COUNTESS: I play the noble housewife with the timeTo entertain't so merrily with a fool.
+Clown: O Lord, sir! why, there't serves well again.
+COUNTESS: An end, sir; to your business. Give Helen this,And urge her to a present answer back:Commend me to my kinsmen and my son:This is not much.
+Clown: Not much commendation to them.
+COUNTESS: Not much employment for you: you understand me?
+Clown: Most fruitfully: I am there before my legs.
+COUNTESS: Haste you again.Exeunt severally
+SCENE III. Paris. The KING's palace.Enter BERTRAM, LAFEU, and PAROLLES
+LAFEU: They say miracles are past; and we have ourphilosophical persons, to make modern and familiar,things supernatural and causeless. Hence is it thatwe make trifles of terrors, ensconcing ourselvesinto seeming knowledge, when we should submitourselves to an unknown fear.
+PAROLLES: Why, 'tis the rarest argument of wonder that hathshot out in our latter times.
+BERTRAM: And so 'tis.
+LAFEU: To be relinquish'd of the artists,--
+PAROLLES: So I say.
+LAFEU: Both of Galen and Paracelsus.
+PAROLLES: So I say.
+LAFEU: Of all the learned and authentic fellows,--
+PAROLLES: Right; so I say.
+LAFEU: That gave him out incurable,--
+PAROLLES: Why, there 'tis; so say I too.
+LAFEU: Not to be helped,--
+PAROLLES: Right; as 'twere, a man assured of a--
+LAFEU: Uncertain life, and sure death.
+PAROLLES: Just, you say well; so would I have said.
+LAFEU: I may truly say, it is a novelty to the world.
+PAROLLES: It is, indeed: if you will have it in showing, youshall read it in--what do you call there?
+LAFEU: A showing of a heavenly effect in an earthly actor.
+PAROLLES: That's it; I would have said the very same.
+LAFEU: Why, your dolphin is not lustier: 'fore me,I speak in respect--
+PAROLLES: Nay, 'tis strange, 'tis very strange, that is thebrief and the tedious of it; and he's of a mostfacinerious spirit that will not acknowledge it to be the--
+LAFEU: Very hand of heaven.
+PAROLLES: Ay, so I say.
+LAFEU: In a most weak--pausingand debile minister, great power, greattranscendence: which should, indeed, give us afurther use to be made than alone the recovery ofthe king, as to be--pausinggenerally thankful.
+PAROLLES: I would have said it; you say well. Here comes the king.Enter KING, HELENA, and Attendants. LAFEU and PAROLLES retire
+LAFEU: Lustig, as the Dutchman says: I'll like a maid thebetter, whilst I have a tooth in my head: why, he'sable to lead her a coranto.
+PAROLLES: Mort du vinaigre! is not this Helen?
+LAFEU: 'Fore God, I think so.
+KING: Go, call before me all the lords in court.Sit, my preserver, by thy patient's side;And with this healthful hand, whose banish'd senseThou hast repeal'd, a second time receiveThe confirmation of my promised gift,Which but attends thy naming.Enter three or four LordsFair maid, send forth thine eye: this youthful parcelOf noble bachelors stand at my bestowing,O'er whom both sovereign power and father's voiceI have to use: thy frank election make;Thou hast power to choose, and they none to forsake.
+HELENA: To each of you one fair and virtuous mistressFall, when Love please! marry, to each, but one!
+LAFEU: I'ld give bay Curtal and his furniture,My mouth no more were broken than these boys',And writ as little beard.
+KING: Peruse them well:Not one of those but had a noble father.
+HELENA: Gentlemen,Heaven hath through me restored the king to health.
+All: We understand it, and thank heaven for you.
+HELENA: I am a simple maid, and therein wealthiest,That I protest I simply am a maid.Please it your majesty, I have done already:The blushes in my cheeks thus whisper me,'We blush that thou shouldst choose; but, be refused,Let the white death sit on thy cheek for ever;We'll ne'er come there again.'
+KING: Make choice; and, see,Who shuns thy love shuns all his love in me.
+HELENA: Now, Dian, from thy altar do I fly,And to imperial Love, that god most high,Do my sighs stream. Sir, will you hear my suit?
+First Lord: And grant it.
+HELENA: Thanks, sir; all the rest is mute.
+LAFEU: I had rather be in this choice than throw ames-acefor my life.
+HELENA: The honour, sir, that flames in your fair eyes,Before I speak, too threateningly replies:Love make your fortunes twenty times aboveHer that so wishes and her humble love!
+Second Lord: No better, if you please.
+HELENA: My wish receive,Which great Love grant! and so, I take my leave.
+LAFEU: Do all they deny her? An they were sons of mine,I'd have them whipped; or I would send them to theTurk, to make eunuchs of.
+HELENA: Be not afraid that I your hand should take;I'll never do you wrong for your own sake:Blessing upon your vows! and in your bedFind fairer fortune, if you ever wed!
+LAFEU: These boys are boys of ice, they'll none have her:sure, they are bastards to the English; the Frenchne'er got 'em.
+HELENA: You are too young, too happy, and too good,To make yourself a son out of my blood.
+Fourth Lord: Fair one, I think not so.
+LAFEU: There's one grape yet; I am sure thy father drunkwine: but if thou be'st not an ass, I am a youthof fourteen; I have known thee already.
+HELENA: To BERTRAMI dare not say I take you; but I giveMe and my service, ever whilst I live,Into your guiding power. This is the man.
+KING: Why, then, young Bertram, take her; she's thy wife.
+BERTRAM: My wife, my liege! I shall beseech your highness,In such a business give me leave to useThe help of mine own eyes.
+KING: Know'st thou not, Bertram,What she has done for me?
+BERTRAM: Yes, my good lord;But never hope to know why I should marry her.
+KING: Thou know'st she has raised me from my sickly bed.
+BERTRAM: But follows it, my lord, to bring me downMust answer for your raising? I know her well:She had her breeding at my father's charge.A poor physician's daughter my wife! DisdainRather corrupt me ever!
+KING: 'Tis only title thou disdain'st in her, the whichI can build up. Strange is it that our bloods,Of colour, weight, and heat, pour'd all together,Would quite confound distinction, yet stand offIn differences so mighty. If she beAll that is virtuous, save what thou dislikest,A poor physician's daughter, thou dislikestOf virtue for the name: but do not so:From lowest place when virtuous things proceed,The place is dignified by the doer's deed:Where great additions swell's, and virtue none,It is a dropsied honour. Good aloneIs good without a name. Vileness is so:The property by what it is should go,Not by the title. She is young, wise, fair;In these to nature she's immediate heir,And these breed honour: that is honour's scorn,Which challenges itself as honour's bornAnd is not like the sire: honours thrive,When rather from our acts we them deriveThan our foregoers: the mere word's a slaveDebosh'd on every tomb, on every graveA lying trophy, and as oft is dumbWhere dust and damn'd oblivion is the tombOf honour'd bones indeed. What should be said?If thou canst like this creature as a maid,I can create the rest: virtue and sheIs her own dower; honour and wealth from me.
+BERTRAM: I cannot love her, nor will strive to do't.
+KING: Thou wrong'st thyself, if thou shouldst strive to choose.
+HELENA: That you are well restored, my lord, I'm glad:Let the rest go.
+KING: My honour's at the stake; which to defeat,I must produce my power. Here, take her hand,Proud scornful boy, unworthy this good gift;That dost in vile misprision shackle upMy love and her desert; that canst not dream,We, poising us in her defective scale,Shall weigh thee to the beam; that wilt not know,It is in us to plant thine honour whereWe please to have it grow. Cheque thy contempt:Obey our will, which travails in thy good:Believe not thy disdain, but presentlyDo thine own fortunes that obedient rightWhich both thy duty owes and our power claims;Or I will throw thee from my care for everInto the staggers and the careless lapseOf youth and ignorance; both my revenge and hateLoosing upon thee, in the name of justice,Without all terms of pity. Speak; thine answer.
+BERTRAM: Pardon, my gracious lord; for I submitMy fancy to your eyes: when I considerWhat great creation and what dole of honourFlies where you bid it, I find that she, which lateWas in my nobler thoughts most base, is nowThe praised of the king; who, so ennobled,Is as 'twere born so.
+KING: Take her by the hand,And tell her she is thine: to whom I promiseA counterpoise, if not to thy estateA balance more replete.
+BERTRAM: I take her hand.
+KING: Good fortune and the favour of the kingSmile upon this contract; whose ceremonyShall seem expedient on the now-born brief,And be perform'd to-night: the solemn feastShall more attend upon the coming space,Expecting absent friends. As thou lovest her,Thy love's to me religious; else, does err.Exeunt all but LAFEU and PAROLLES
+LAFEU: AdvancingDo you hear, monsieur? a word with you.
+PAROLLES: Your pleasure, sir?
+LAFEU: Your lord and master did well to make hisrecantation.
+PAROLLES: Recantation! My lord! my master!
+LAFEU: Ay; is it not a language I speak?
+PAROLLES: A most harsh one, and not to be understood withoutbloody succeeding. My master!
+LAFEU: Are you companion to the Count Rousillon?
+PAROLLES: To any count, to all counts, to what is man.
+LAFEU: To what is count's man: count's master is ofanother style.
+PAROLLES: You are too old, sir; let it satisfy you, you are too old.
+LAFEU: I must tell thee, sirrah, I write man; to whichtitle age cannot bring thee.
+PAROLLES: What I dare too well do, I dare not do.
+LAFEU: I did think thee, for two ordinaries, to be a prettywise fellow; thou didst make tolerable vent of thytravel; it might pass: yet the scarfs and thebannerets about thee did manifoldly dissuade me frombelieving thee a vessel of too great a burthen. Ihave now found thee; when I lose thee again, I carenot: yet art thou good for nothing but taking up; andthat thou't scarce worth.
+PAROLLES: Hadst thou not the privilege of antiquity upon thee,--
+LAFEU: Do not plunge thyself too far in anger, lest thouhasten thy trial; which if--Lord have mercy on theefor a hen! So, my good window of lattice, fare theewell: thy casement I need not open, for I lookthrough thee. Give me thy hand.
+PAROLLES: My lord, you give me most egregious indignity.
+LAFEU: Ay, with all my heart; and thou art worthy of it.
+PAROLLES: I have not, my lord, deserved it.
+LAFEU: Yes, good faith, every dram of it; and I will notbate thee a scruple.
+PAROLLES: Well, I shall be wiser.
+LAFEU: Even as soon as thou canst, for thou hast to pull ata smack o' the contrary. If ever thou be'st boundin thy scarf and beaten, thou shalt find what it isto be proud of thy bondage. I have a desire to holdmy acquaintance with thee, or rather my knowledge,that I may say in the default, he is a man I know.
+PAROLLES: My lord, you do me most insupportable vexation.
+LAFEU: I would it were hell-pains for thy sake, and my poordoing eternal: for doing I am past: as I will bythee, in what motion age will give me leave.Exit
+PAROLLES: Well, thou hast a son shall take this disgrace offme; scurvy, old, filthy, scurvy lord! Well, I mustbe patient; there is no fettering of authority.I'll beat him, by my life, if I can meet him withany convenience, an he were double and double alord. I'll have no more pity of his age than Iwould of--I'll beat him, an if I could but meet him again.Re-enter LAFEU
+LAFEU: Sirrah, your lord and master's married; there's newsfor you: you have a new mistress.
+PAROLLES: I most unfeignedly beseech your lordship to makesome reservation of your wrongs: he is my goodlord: whom I serve above is my master.
+LAFEU: Who? God?
+PAROLLES: Ay, sir.
+LAFEU: The devil it is that's thy master. Why dost thougarter up thy arms o' this fashion? dost make hose ofsleeves? do other servants so? Thou wert best setthy lower part where thy nose stands. By minehonour, if I were but two hours younger, I'ld beatthee: methinks, thou art a general offence, andevery man should beat thee: I think thou wastcreated for men to breathe themselves upon thee.
+PAROLLES: This is hard and undeserved measure, my lord.
+LAFEU: Go to, sir; you were beaten in Italy for picking akernel out of a pomegranate; you are a vagabond andno true traveller: you are more saucy with lordsand honourable personages than the commission of yourbirth and virtue gives you heraldry. You are notworth another word, else I'ld call you knave. I leave you.Exit
+PAROLLES: Good, very good; it is so then: good, very good;let it be concealed awhile.Re-enter BERTRAM
+BERTRAM: Undone, and forfeited to cares for ever!
+PAROLLES: What's the matter, sweet-heart?
+BERTRAM: Although before the solemn priest I have sworn,I will not bed her.
+PAROLLES: What, what, sweet-heart?
+BERTRAM: O my Parolles, they have married me!I'll to the Tuscan wars, and never bed her.
+PAROLLES: France is a dog-hole, and it no more meritsThe tread of a man's foot: to the wars!
+BERTRAM: There's letters from my mother: what the import is,I know not yet.
+PAROLLES: Ay, that would be known. To the wars, my boy, to the wars!He wears his honour in a box unseen,That hugs his kicky-wicky here at home,Spending his manly marrow in her arms,Which should sustain the bound and high curvetOf Mars's fiery steed. To other regionsFrance is a stable; we that dwell in't jades;Therefore, to the war!
+BERTRAM: It shall be so: I'll send her to my house,Acquaint my mother with my hate to her,And wherefore I am fled; write to the kingThat which I durst not speak; his present giftShall furnish me to those Italian fields,Where noble fellows strike: war is no strifeTo the dark house and the detested wife.
+PAROLLES: Will this capriccio hold in thee? art sure?
+BERTRAM: Go with me to my chamber, and advise me.I'll send her straight away: to-morrowI'll to the wars, she to her single sorrow.
+PAROLLES: Why, these balls bound; there's noise in it. 'Tis hard:A young man married is a man that's marr'd:Therefore away, and leave her bravely; go:The king has done you wrong: but, hush, 'tis so.Exeunt
+SCENE IV. Paris. The KING's palace.Enter HELENA and Clown
+HELENA: My mother greets me kindly; is she well?
+Clown: She is not well; but yet she has her health: she'svery merry; but yet she is not well: but thanks begiven, she's very well and wants nothing i', theworld; but yet she is not well.
+HELENA: If she be very well, what does she ail, that she'snot very well?
+Clown: Truly, she's very well indeed, but for two things.
+HELENA: What two things?
+Clown: One, that she's not in heaven, whither God send herquickly! the other that she's in earth, from whenceGod send her quickly!Enter PAROLLES
+PAROLLES: Bless you, my fortunate lady!
+HELENA: I hope, sir, I have your good will to have mine owngood fortunes.
+PAROLLES: You had my prayers to lead them on; and to keep themon, have them still. O, my knave, how does my old lady?
+Clown: So that you had her wrinkles and I her money,I would she did as you say.
+PAROLLES: Why, I say nothing.
+Clown: Marry, you are the wiser man; for many a man'stongue shakes out his master's undoing: to saynothing, to do nothing, to know nothing, and to havenothing, is to be a great part of your title; whichis within a very little of nothing.
+PAROLLES: Away! thou'rt a knave.
+Clown: You should have said, sir, before a knave thou'rt aknave; that's, before me thou'rt a knave: this hadbeen truth, sir.
+PAROLLES: Go to, thou art a witty fool; I have found thee.
+Clown: Did you find me in yourself, sir? or were youtaught to find me? The search, sir, was profitable;and much fool may you find in you, even to theworld's pleasure and the increase of laughter.
+PAROLLES: A good knave, i' faith, and well fed.Madam, my lord will go away to-night;A very serious business calls on him.The great prerogative and rite of love,Which, as your due, time claims, he does acknowledge;But puts it off to a compell'd restraint;Whose want, and whose delay, is strew'd with sweets,Which they distil now in the curbed time,To make the coming hour o'erflow with joyAnd pleasure drown the brim.
+HELENA: What's his will else?
+PAROLLES: That you will take your instant leave o' the kingAnd make this haste as your own good proceeding,Strengthen'd with what apology you thinkMay make it probable need.
+HELENA: What more commands he?
+PAROLLES: That, having this obtain'd, you presentlyAttend his further pleasure.
+HELENA: In every thing I wait upon his will.
+PAROLLES: I shall report it so.
+HELENA: I pray you.Exit PAROLLESCome, sirrah.Exeunt
+SCENE V. Paris. The KING's palace.Enter LAFEU and BERTRAM
+LAFEU: But I hope your lordship thinks not him a soldier.
+BERTRAM: Yes, my lord, and of very valiant approof.
+LAFEU: You have it from his own deliverance.
+BERTRAM: And by other warranted testimony.
+LAFEU: Then my dial goes not true: I took this lark for a bunting.
+BERTRAM: I do assure you, my lord, he is very great inknowledge and accordingly valiant.
+LAFEU: I have then sinned against his experience andtransgressed against his valour; and my state thatway is dangerous, since I cannot yet find in myheart to repent. Here he comes: I pray you, makeus friends; I will pursue the amity.Enter PAROLLES
+PAROLLES: To BERTRAMThese things shall be done, sir.
+LAFEU: Pray you, sir, who's his tailor?
+PAROLLES: Sir?
+LAFEU: O, I know him well, I, sir; he, sir, 's a goodworkman, a very good tailor.
+BERTRAM: Aside to PAROLLESIs she gone to the king?
+PAROLLES: She is.
+BERTRAM: Will she away to-night?
+PAROLLES: As you'll have her.
+BERTRAM: I have writ my letters, casketed my treasure,Given order for our horses; and to-night,When I should take possession of the bride,End ere I do begin.
+LAFEU: A good traveller is something at the latter end of adinner; but one that lies three thirds and uses aknown truth to pass a thousand nothings with, shouldbe once heard and thrice beaten. God save you, captain.
+BERTRAM: Is there any unkindness between my lord and you, monsieur?
+PAROLLES: I know not how I have deserved to run into my lord'sdispleasure.
+LAFEU: You have made shift to run into 't, boots and spursand all, like him that leaped into the custard; andout of it you'll run again, rather than sufferquestion for your residence.
+BERTRAM: It may be you have mistaken him, my lord.
+LAFEU: And shall do so ever, though I took him at 'sprayers. Fare you well, my lord; and believe thisof me, there can be no kernel in this light nut; thesoul of this man is his clothes. Trust him not inmatter of heavy consequence; I have kept of themtame, and know their natures. Farewell, monsieur:I have spoken better of you than you have or will todeserve at my hand; but we must do good against evil.Exit
+PAROLLES: An idle lord. I swear.
+BERTRAM: I think so.
+PAROLLES: Why, do you not know him?
+BERTRAM: Yes, I do know him well, and common speechGives him a worthy pass. Here comes my clog.Enter HELENA
+HELENA: I have, sir, as I was commanded from you,Spoke with the king and have procured his leaveFor present parting; only he desiresSome private speech with you.
+BERTRAM: I shall obey his will.You must not marvel, Helen, at my course,Which holds not colour with the time, nor doesThe ministration and required officeOn my particular. Prepared I was notFor such a business; therefore am I foundSo much unsettled: this drives me to entreat youThat presently you take our way for home;And rather muse than ask why I entreat you,For my respects are better than they seemAnd my appointments have in them a needGreater than shows itself at the first viewTo you that know them not. This to my mother:Giving a letter'Twill be two days ere I shall see you, soI leave you to your wisdom.
+HELENA: Sir, I can nothing say,But that I am your most obedient servant.
+BERTRAM: Come, come, no more of that.
+HELENA: And ever shallWith true observance seek to eke out thatWherein toward me my homely stars have fail'dTo equal my great fortune.
+BERTRAM: Let that go:My haste is very great: farewell; hie home.
+HELENA: Pray, sir, your pardon.
+BERTRAM: Well, what would you say?
+HELENA: I am not worthy of the wealth I owe,Nor dare I say 'tis mine, and yet it is;But, like a timorous thief, most fain would stealWhat law does vouch mine own.
+BERTRAM: What would you have?
+HELENA: Something; and scarce so much: nothing, indeed.I would not tell you what I would, my lord:Faith yes;Strangers and foes do sunder, and not kiss.
+BERTRAM: I pray you, stay not, but in haste to horse.
+HELENA: I shall not break your bidding, good my lord.
+BERTRAM: Where are my other men, monsieur? Farewell.Exit HELENAGo thou toward home; where I will never comeWhilst I can shake my sword or hear the drum.Away, and for our flight.
+PAROLLES: Bravely, coragio!Exeunt
+ACT III
+SCENE I. Florence. The DUKE's palace.Flourish. Enter the DUKE of Florence attended; the two Frenchmen, with a troop of soldiers.
+DUKE: So that from point to point now have you heardThe fundamental reasons of this war,Whose great decision hath much blood let forthAnd more thirsts after.
+First Lord: Holy seems the quarrelUpon your grace's part; black and fearfulOn the opposer.
+DUKE: Therefore we marvel much our cousin FranceWould in so just a business shut his bosomAgainst our borrowing prayers.
+Second Lord: Good my lord,The reasons of our state I cannot yield,But like a common and an outward man,That the great figure of a council framesBy self-unable motion: therefore dare notSay what I think of it, since I have foundMyself in my incertain grounds to failAs often as I guess'd.
+DUKE: Be it his pleasure.
+First Lord: But I am sure the younger of our nature,That surfeit on their ease, will day by dayCome here for physic.
+DUKE: Welcome shall they be;And all the honours that can fly from usShall on them settle. You know your places well;When better fall, for your avails they fell:To-morrow to the field.Flourish. Exeunt
+SCENE II. Rousillon. The COUNT's palace.Enter COUNTESS and Clown
+COUNTESS: It hath happened all as I would have had it, savethat he comes not along with her.
+Clown: By my troth, I take my young lord to be a verymelancholy man.
+COUNTESS: By what observance, I pray you?
+Clown: Why, he will look upon his boot and sing; mend theruff and sing; ask questions and sing; pick histeeth and sing. I know a man that had this trick ofmelancholy sold a goodly manor for a song.
+COUNTESS: Let me see what he writes, and when he means to come.Opening a letter
+Clown: I have no mind to Isbel since I was at court: ourold ling and our Isbels o' the country are nothinglike your old ling and your Isbels o' the court:the brains of my Cupid's knocked out, and I begin tolove, as an old man loves money, with no stomach.
+COUNTESS: What have we here?
+Clown: E'en that you have there.Exit
+COUNTESS: ReadsI have sent you a daughter-in-law: she hathrecovered the king, and undone me. I have weddedher, not bedded her; and sworn to make the 'not'eternal. You shall hear I am run away: know itbefore the report come. If there be breadth enoughin the world, I will hold a long distance. My dutyto you. Your unfortunate son,BERTRAM.This is not well, rash and unbridled boy.To fly the favours of so good a king;To pluck his indignation on thy headBy the misprising of a maid too virtuousFor the contempt of empire.Re-enter Clown
+Clown: O madam, yonder is heavy news within between twosoldiers and my young lady!
+COUNTESS: What is the matter?
+Clown: Nay, there is some comfort in the news, somecomfort; your son will not be killed so soon as Ithought he would.
+COUNTESS: Why should he be killed?
+Clown: So say I, madam, if he run away, as I hear he does:the danger is in standing to't; that's the loss ofmen, though it be the getting of children. Herethey come will tell you more: for my part, I onlyhear your son was run away.ExitEnter HELENA, and two Gentlemen
+First Gentleman: Save you, good madam.
+HELENA: Madam, my lord is gone, for ever gone.
+Second Gentleman: Do not say so.
+COUNTESS: Think upon patience. Pray you, gentlemen,I have felt so many quirks of joy and grief,That the first face of neither, on the start,Can woman me unto't: where is my son, I pray you?
+Second Gentleman: Madam, he's gone to serve the duke of Florence:We met him thitherward; for thence we came,And, after some dispatch in hand at court,Thither we bend again.
+HELENA: Look on his letter, madam; here's my passport.ReadsWhen thou canst get the ring upon my finger whichnever shall come off, and show me a child begottenof thy body that I am father to, then call mehusband: but in such a 'then' I write a 'never.'This is a dreadful sentence.
+COUNTESS: Brought you this letter, gentlemen?
+First Gentleman: Ay, madam;And for the contents' sake are sorry for our pain.
+COUNTESS: I prithee, lady, have a better cheer;If thou engrossest all the griefs are thine,Thou robb'st me of a moiety: he was my son;But I do wash his name out of my blood,And thou art all my child. Towards Florence is he?
+Second Gentleman: Ay, madam.
+COUNTESS: And to be a soldier?
+Second Gentleman: Such is his noble purpose; and believe 't,The duke will lay upon him all the honourThat good convenience claims.
+COUNTESS: Return you thither?
+First Gentleman: Ay, madam, with the swiftest wing of speed.
+HELENA: ReadsTill I have no wife I have nothing in France.'Tis bitter.
+COUNTESS: Find you that there?
+HELENA: Ay, madam.
+First Gentleman: 'Tis but the boldness of his hand, haply, which hisheart was not consenting to.
+COUNTESS: Nothing in France, until he have no wife!There's nothing here that is too good for himBut only she; and she deserves a lordThat twenty such rude boys might tend uponAnd call her hourly mistress. Who was with him?
+First Gentleman: A servant only, and a gentlemanWhich I have sometime known.
+COUNTESS: Parolles, was it not?
+First Gentleman: Ay, my good lady, he.
+COUNTESS: A very tainted fellow, and full of wickedness.My son corrupts a well-derived natureWith his inducement.
+First Gentleman: Indeed, good lady,The fellow has a deal of that too much,Which holds him much to have.
+COUNTESS: You're welcome, gentlemen.I will entreat you, when you see my son,To tell him that his sword can never winThe honour that he loses: more I'll entreat youWritten to bear along.
+Second Gentleman: We serve you, madam,In that and all your worthiest affairs.
+COUNTESS: Not so, but as we change our courtesies.Will you draw near!Exeunt COUNTESS and Gentlemen
+HELENA: 'Till I have no wife, I have nothing in France.'Nothing in France, until he has no wife!Thou shalt have none, Rousillon, none in France;Then hast thou all again. Poor lord! is't IThat chase thee from thy country and exposeThose tender limbs of thine to the eventOf the none-sparing war? and is it IThat drive thee from the sportive court, where thouWast shot at with fair eyes, to be the markOf smoky muskets? O you leaden messengers,That ride upon the violent speed of fire,Fly with false aim; move the still-peering air,That sings with piercing; do not touch my lord.Whoever shoots at him, I set him there;Whoever charges on his forward breast,I am the caitiff that do hold him to't;And, though I kill him not, I am the causeHis death was so effected: better 'twereI met the ravin lion when he roar'dWith sharp constraint of hunger; better 'twereThat all the miseries which nature owesWere mine at once. No, come thou home, Rousillon,Whence honour but of danger wins a scar,As oft it loses all: I will be gone;My being here it is that holds thee hence:Shall I stay here to do't? no, no, althoughThe air of paradise did fan the houseAnd angels officed all: I will be gone,That pitiful rumour may report my flight,To consolate thine ear. Come, night; end, day!For with the dark, poor thief, I'll steal away.Exit
+SCENE III. Florence. Before the DUKE's palace.Flourish. Enter the DUKE of Florence, BERTRAM, PAROLLES, Soldiers, Drum, and Trumpets
+DUKE: The general of our horse thou art; and we,Great in our hope, lay our best love and credenceUpon thy promising fortune.
+BERTRAM: Sir, it isA charge too heavy for my strength, but yetWe'll strive to bear it for your worthy sakeTo the extreme edge of hazard.
+DUKE: Then go thou forth;And fortune play upon thy prosperous helm,As thy auspicious mistress!
+BERTRAM: This very day,Great Mars, I put myself into thy file:Make me but like my thoughts, and I shall proveA lover of thy drum, hater of love.Exeunt
+SCENE IV. Rousillon. The COUNT's palace.Enter COUNTESS and Steward
+COUNTESS: Alas! and would you take the letter of her?Might you not know she would do as she has done,By sending me a letter? Read it again.
+Steward: ReadsI am Saint Jaques' pilgrim, thither gone:Ambitious love hath so in me offended,That barefoot plod I the cold ground upon,With sainted vow my faults to have amended.Write, write, that from the bloody course of warMy dearest master, your dear son, may hie:Bless him at home in peace, whilst I from farHis name with zealous fervor sanctify:His taken labours bid him me forgive;I, his despiteful Juno, sent him forthFrom courtly friends, with camping foes to live,Where death and danger dogs the heels of worth:He is too good and fair for death and me:Whom I myself embrace, to set him free.
+COUNTESS: Ah, what sharp stings are in her mildest words!Rinaldo, you did never lack advice so much,As letting her pass so: had I spoke with her,I could have well diverted her intents,Which thus she hath prevented.
+Steward: Pardon me, madam:If I had given you this at over-night,She might have been o'erta'en; and yet she writes,Pursuit would be but vain.
+COUNTESS: What angel shallBless this unworthy husband? he cannot thrive,Unless her prayers, whom heaven delights to hearAnd loves to grant, reprieve him from the wrathOf greatest justice. Write, write, Rinaldo,To this unworthy husband of his wife;Let every word weigh heavy of her worthThat he does weigh too light: my greatest grief.Though little he do feel it, set down sharply.Dispatch the most convenient messenger:When haply he shall hear that she is gone,He will return; and hope I may that she,Hearing so much, will speed her foot again,Led hither by pure love: which of them bothIs dearest to me. I have no skill in senseTo make distinction: provide this messenger:My heart is heavy and mine age is weak;Grief would have tears, and sorrow bids me speak.Exeunt
+SCENE V. Florence. Without the walls. A tucket afar off.Enter an old Widow of Florence, DIANA, VIOLENTA, and MARIANA, with other Citizens
+Widow: Nay, come; for if they do approach the city, weshall lose all the sight.
+DIANA: They say the French count has done most honourable service.
+Widow: It is reported that he has taken their greatestcommander; and that with his own hand he slew theduke's brother.TucketWe have lost our labour; they are gone a contraryway: hark! you may know by their trumpets.
+MARIANA: Come, let's return again, and suffice ourselves withthe report of it. Well, Diana, take heed of thisFrench earl: the honour of a maid is her name; andno legacy is so rich as honesty.
+Widow: I have told my neighbour how you have been solicitedby a gentleman his companion.
+MARIANA: I know that knave; hang him! one Parolles: afilthy officer he is in those suggestions for theyoung earl. Beware of them, Diana; their promises,enticements, oaths, tokens, and all these engines oflust, are not the things they go under: many a maidhath been seduced by them; and the misery is,example, that so terrible shows in the wreck ofmaidenhood, cannot for all that dissuade succession,but that they are limed with the twigs that threatenthem. I hope I need not to advise you further; butI hope your own grace will keep you where you are,though there were no further danger known but themodesty which is so lost.
+DIANA: You shall not need to fear me.
+Widow: I hope so.Enter HELENA, disguised like a PilgrimLook, here comes a pilgrim: I know she will lie atmy house; thither they send one another: I'llquestion her. God save you, pilgrim! whither are you bound?
+HELENA: To Saint Jaques le Grand.Where do the palmers lodge, I do beseech you?
+Widow: At the Saint Francis here beside the port.
+HELENA: Is this the way?
+Widow: Ay, marry, is't.A march afarHark you! they come this way.If you will tarry, holy pilgrim,But till the troops come by,I will conduct you where you shall be lodged;The rather, for I think I know your hostessAs ample as myself.
+HELENA: Is it yourself?
+Widow: If you shall please so, pilgrim.
+HELENA: I thank you, and will stay upon your leisure.
+Widow: You came, I think, from France?
+HELENA: I did so.
+Widow: Here you shall see a countryman of yoursThat has done worthy service.
+HELENA: His name, I pray you.
+DIANA: The Count Rousillon: know you such a one?
+HELENA: But by the ear, that hears most nobly of him:His face I know not.
+DIANA: Whatsome'er he is,He's bravely taken here. He stole from France,As 'tis reported, for the king had married himAgainst his liking: think you it is so?
+HELENA: Ay, surely, mere the truth: I know his lady.
+DIANA: There is a gentleman that serves the countReports but coarsely of her.
+HELENA: What's his name?
+DIANA: Monsieur Parolles.
+HELENA: O, I believe with him,In argument of praise, or to the worthOf the great count himself, she is too meanTo have her name repeated: all her deservingIs a reserved honesty, and thatI have not heard examined.
+DIANA: Alas, poor lady!'Tis a hard bondage to become the wifeOf a detesting lord.
+Widow: I warrant, good creature, wheresoe'er she is,Her heart weighs sadly: this young maid might do herA shrewd turn, if she pleased.
+HELENA: How do you mean?May be the amorous count solicits herIn the unlawful purpose.
+Widow: He does indeed;And brokes with all that can in such a suitCorrupt the tender honour of a maid:But she is arm'd for him and keeps her guardIn honestest defence.
+MARIANA: The gods forbid else!
+Widow: So, now they come:Drum and ColoursEnter BERTRAM, PAROLLES, and the whole armyThat is Antonio, the duke's eldest son;That, Escalus.
+HELENA: Which is the Frenchman?
+DIANA: He;That with the plume: 'tis a most gallant fellow.I would he loved his wife: if he were honesterHe were much goodlier: is't not a handsome gentleman?
+HELENA: I like him well.
+DIANA: 'Tis pity he is not honest: yond's that same knaveThat leads him to these places: were I his lady,I would Poison that vile rascal.
+HELENA: Which is he?
+DIANA: That jack-an-apes with scarfs: why is he melancholy?
+HELENA: Perchance he's hurt i' the battle.
+PAROLLES: Lose our drum! well.
+MARIANA: He's shrewdly vexed at something: look, he has spied us.
+Widow: Marry, hang you!
+MARIANA: And your courtesy, for a ring-carrier!Exeunt BERTRAM, PAROLLES, and army
+Widow: The troop is past. Come, pilgrim, I will bring youWhere you shall host: of enjoin'd penitentsThere's four or five, to great Saint Jaques bound,Already at my house.
+HELENA: I humbly thank you:Please it this matron and this gentle maidTo eat with us to-night, the charge and thankingShall be for me; and, to requite you further,I will bestow some precepts of this virginWorthy the note.
+BOTH: We'll take your offer kindly.Exeunt
+SCENE VI. Camp before Florence.Enter BERTRAM and the two French Lords
+Second Lord: Nay, good my lord, put him to't; let him have hisway.
+First Lord: If your lordship find him not a hilding, hold me nomore in your respect.
+Second Lord: On my life, my lord, a bubble.
+BERTRAM: Do you think I am so far deceived in him?
+Second Lord: Believe it, my lord, in mine own direct knowledge,without any malice, but to speak of him as mykinsman, he's a most notable coward, an infinite andendless liar, an hourly promise-breaker, the ownerof no one good quality worthy your lordship'sentertainment.
+First Lord: It were fit you knew him; lest, reposing too far inhis virtue, which he hath not, he might at somegreat and trusty business in a main danger fail you.
+BERTRAM: I would I knew in what particular action to try him.
+First Lord: None better than to let him fetch off his drum,which you hear him so confidently undertake to do.
+Second Lord: I, with a troop of Florentines, will suddenlysurprise him; such I will have, whom I am sure heknows not from the enemy: we will bind and hoodwinkhim so, that he shall suppose no other but that heis carried into the leaguer of the adversaries, whenwe bring him to our own tents. Be but your lordshippresent at his examination: if he do not, for thepromise of his life and in the highest compulsion ofbase fear, offer to betray you and deliver all theintelligence in his power against you, and that withthe divine forfeit of his soul upon oath, nevertrust my judgment in any thing.
+First Lord: O, for the love of laughter, let him fetch his drum;he says he has a stratagem for't: when yourlordship sees the bottom of his success in't, and towhat metal this counterfeit lump of ore will bemelted, if you give him not John Drum'sentertainment, your inclining cannot be removed.Here he comes.Enter PAROLLES
+Second Lord: Aside to BERTRAMO, for the love of laughter,hinder not the honour of his design: let him fetchoff his drum in any hand.
+BERTRAM: How now, monsieur! this drum sticks sorely in yourdisposition.
+First Lord: A pox on't, let it go; 'tis but a drum.
+PAROLLES: 'But a drum'! is't 'but a drum'? A drum so lost!There was excellent command,--to charge in with ourhorse upon our own wings, and to rend our own soldiers!
+First Lord: That was not to be blamed in the command of theservice: it was a disaster of war that Caesarhimself could not have prevented, if he had beenthere to command.
+BERTRAM: Well, we cannot greatly condemn our success: somedishonour we had in the loss of that drum; but it isnot to be recovered.
+PAROLLES: It might have been recovered.
+BERTRAM: It might; but it is not now.
+PAROLLES: It is to be recovered: but that the merit ofservice is seldom attributed to the true and exactperformer, I would have that drum or another, or'hic jacet.'
+BERTRAM: Why, if you have a stomach, to't, monsieur: if youthink your mystery in stratagem can bring thisinstrument of honour again into his native quarter,be magnanimous in the enterprise and go on; I willgrace the attempt for a worthy exploit: if youspeed well in it, the duke shall both speak of it.and extend to you what further becomes hisgreatness, even to the utmost syllable of yourworthiness.
+PAROLLES: By the hand of a soldier, I will undertake it.
+BERTRAM: But you must not now slumber in it.
+PAROLLES: I'll about it this evening: and I will presentlypen down my dilemmas, encourage myself in mycertainty, put myself into my mortal preparation;and by midnight look to hear further from me.
+BERTRAM: May I be bold to acquaint his grace you are gone about it?
+PAROLLES: I know not what the success will be, my lord; butthe attempt I vow.
+BERTRAM: I know thou'rt valiant; and, to the possibility ofthy soldiership, will subscribe for thee. Farewell.
+PAROLLES: I love not many words.Exit
+Second Lord: No more than a fish loves water. Is not this astrange fellow, my lord, that so confidently seemsto undertake this business, which he knows is not tobe done; damns himself to do and dares better bedamned than to do't?
+First Lord: You do not know him, my lord, as we do: certain itis that he will steal himself into a man's favour andfor a week escape a great deal of discoveries; butwhen you find him out, you have him ever after.
+BERTRAM: Why, do you think he will make no deed at all ofthis that so seriously he does address himself unto?
+Second Lord: None in the world; but return with an invention andclap upon you two or three probable lies: but wehave almost embossed him; you shall see his fallto-night; for indeed he is not for your lordship's respect.
+First Lord: We'll make you some sport with the fox ere we casehim. He was first smoked by the old lord Lafeu:when his disguise and he is parted, tell me what asprat you shall find him; which you shall see thisvery night.
+Second Lord: I must go look my twigs: he shall be caught.
+BERTRAM: Your brother he shall go along with me.
+Second Lord: As't please your lordship: I'll leave you.Exit
+BERTRAM: Now will I lead you to the house, and show youThe lass I spoke of.
+First Lord: But you say she's honest.
+BERTRAM: That's all the fault: I spoke with her but onceAnd found her wondrous cold; but I sent to her,By this same coxcomb that we have i' the wind,Tokens and letters which she did re-send;And this is all I have done. She's a fair creature:Will you go see her?
+First Lord: With all my heart, my lord.Exeunt
+SCENE VII. Florence. The Widow's house.Enter HELENA and Widow
+HELENA: If you misdoubt me that I am not she,I know not how I shall assure you further,But I shall lose the grounds I work upon.
+Widow: Though my estate be fallen, I was well born,Nothing acquainted with these businesses;And would not put my reputation nowIn any staining act.
+HELENA: Nor would I wish you.First, give me trust, the count he is my husband,And what to your sworn counsel I have spokenIs so from word to word; and then you cannot,By the good aid that I of you shall borrow,Err in bestowing it.
+Widow: I should believe you:For you have show'd me that which well approvesYou're great in fortune.
+HELENA: Take this purse of gold,And let me buy your friendly help thus far,Which I will over-pay and pay againWhen I have found it. The count he wooes your daughter,Lays down his wanton siege before her beauty,Resolved to carry her: let her in fine consent,As we'll direct her how 'tis best to bear it.Now his important blood will nought denyThat she'll demand: a ring the county wears,That downward hath succeeded in his houseFrom son to son, some four or five descentsSince the first father wore it: this ring he holdsIn most rich choice; yet in his idle fire,To buy his will, it would not seem too dear,Howe'er repented after.
+Widow: Now I seeThe bottom of your purpose.
+HELENA: You see it lawful, then: it is no more,But that your daughter, ere she seems as won,Desires this ring; appoints him an encounter;In fine, delivers me to fill the time,Herself most chastely absent: after this,To marry her, I'll add three thousand crownsTo what is passed already.
+Widow: I have yielded:Instruct my daughter how she shall persever,That time and place with this deceit so lawfulMay prove coherent. Every night he comesWith musics of all sorts and songs composedTo her unworthiness: it nothing steads usTo chide him from our eaves; for he persistsAs if his life lay on't.
+HELENA: Why then to-nightLet us assay our plot; which, if it speed,Is wicked meaning in a lawful deedAnd lawful meaning in a lawful act,Where both not sin, and yet a sinful fact:But let's about it.Exeunt
+ACT IV
+SCENE I. Without the Florentine camp.Enter Second French Lord, with five or six other Soldiers in ambush
+Second Lord: He can come no other way but by this hedge-corner.When you sally upon him, speak what terriblelanguage you will: though you understand it notyourselves, no matter; for we must not seem tounderstand him, unless some one among us whom wemust produce for an interpreter.
+First Soldier: Good captain, let me be the interpreter.
+Second Lord: Art not acquainted with him? knows he not thy voice?
+First Soldier: No, sir, I warrant you.
+Second Lord: But what linsey-woolsey hast thou to speak to us again?
+First Soldier: E'en such as you speak to me.
+Second Lord: He must think us some band of strangers i' theadversary's entertainment. Now he hath a smack ofall neighbouring languages; therefore we must everyone be a man of his own fancy, not to know what wespeak one to another; so we seem to know, is toknow straight our purpose: choughs' language,gabble enough, and good enough. As for you,interpreter, you must seem very politic. But couch,ho! here he comes, to beguile two hours in a sleep,and then to return and swear the lies he forges.Enter PAROLLES
+PAROLLES: Ten o'clock: within these three hours 'twill betime enough to go home. What shall I say I havedone? It must be a very plausive invention thatcarries it: they begin to smoke me; and disgraceshave of late knocked too often at my door. I findmy tongue is too foolhardy; but my heart hath thefear of Mars before it and of his creatures, notdaring the reports of my tongue.
+Second Lord: This is the first truth that e'er thine own tonguewas guilty of.
+PAROLLES: What the devil should move me to undertake therecovery of this drum, being not ignorant of theimpossibility, and knowing I had no such purpose? Imust give myself some hurts, and say I got them inexploit: yet slight ones will not carry it; theywill say, 'Came you off with so little?' and greatones I dare not give. Wherefore, what's theinstance? Tongue, I must put you into abutter-woman's mouth and buy myself another ofBajazet's mule, if you prattle me into these perils.
+Second Lord: Is it possible he should know what he is, and bethat he is?
+PAROLLES: I would the cutting of my garments would serve theturn, or the breaking of my Spanish sword.
+Second Lord: We cannot afford you so.
+PAROLLES: Or the baring of my beard; and to say it was instratagem.
+Second Lord: 'Twould not do.
+PAROLLES: Or to drown my clothes, and say I was stripped.
+Second Lord: Hardly serve.
+PAROLLES: Though I swore I leaped from the window of the citadel.
+Second Lord: How deep?
+PAROLLES: Thirty fathom.
+Second Lord: Three great oaths would scarce make that be believed.
+PAROLLES: I would I had any drum of the enemy's: I would swearI recovered it.
+Second Lord: You shall hear one anon.
+PAROLLES: A drum now of the enemy's,--Alarum within
+Second Lord: Throca movousus, cargo, cargo, cargo.
+All: Cargo, cargo, cargo, villiando par corbo, cargo.
+PAROLLES: O, ransom, ransom! do not hide mine eyes.They seize and blindfold him
+First Soldier: Boskos thromuldo boskos.
+PAROLLES: I know you are the Muskos' regiment:And I shall lose my life for want of language;If there be here German, or Dane, low Dutch,Italian, or French, let him speak to me; I'llDiscover that which shall undo the Florentine.
+First Soldier: Boskos vauvado: I understand thee, and can speakthy tongue. Kerely bonto, sir, betake thee to thyfaith, for seventeen poniards are at thy bosom.
+PAROLLES: O!
+First Soldier: O, pray, pray, pray! Manka revania dulche.
+Second Lord: Oscorbidulchos volivorco.
+First Soldier: The general is content to spare thee yet;And, hoodwink'd as thou art, will lead thee onTo gather from thee: haply thou mayst informSomething to save thy life.
+PAROLLES: O, let me live!And all the secrets of our camp I'll show,Their force, their purposes; nay, I'll speak thatWhich you will wonder at.
+First Soldier: But wilt thou faithfully?
+PAROLLES: If I do not, damn me.
+First Soldier: Acordo linta.Come on; thou art granted space.Exit, with PAROLLES guarded. A short alarum within
+Second Lord: Go, tell the Count Rousillon, and my brother,We have caught the woodcock, and will keep him muffledTill we do hear from them.
+Second Soldier: Captain, I will.
+Second Lord: A' will betray us all unto ourselves:Inform on that.
+Second Soldier: So I will, sir.
+Second Lord: Till then I'll keep him dark and safely lock'd.Exeunt
+SCENE II. Florence. The Widow's house.Enter BERTRAM and DIANA
+BERTRAM: They told me that your name was Fontibell.
+DIANA: No, my good lord, Diana.
+BERTRAM: Titled goddess;And worth it, with addition! But, fair soul,In your fine frame hath love no quality?If quick fire of youth light not your mind,You are no maiden, but a monument:When you are dead, you should be such a oneAs you are now, for you are cold and stem;And now you should be as your mother wasWhen your sweet self was got.
+DIANA: She then was honest.
+BERTRAM: So should you be.
+DIANA: No:My mother did but duty; such, my lord,As you owe to your wife.
+BERTRAM: No more o' that;I prithee, do not strive against my vows:I was compell'd to her; but I love theeBy love's own sweet constraint, and will for everDo thee all rights of service.
+DIANA: Ay, so you serve usTill we serve you; but when you have our roses,You barely leave our thorns to prick ourselvesAnd mock us with our bareness.
+BERTRAM: How have I sworn!
+DIANA: 'Tis not the many oaths that makes the truth,But the plain single vow that is vow'd true.What is not holy, that we swear not by,But take the High'st to witness: then, pray you, tell me,If I should swear by God's great attributes,I loved you dearly, would you believe my oaths,When I did love you ill? This has no holding,To swear by him whom I protest to love,That I will work against him: therefore your oathsAre words and poor conditions, but unseal'd,At least in my opinion.
+BERTRAM: Change it, change it;Be not so holy-cruel: love is holy;And my integrity ne'er knew the craftsThat you do charge men with. Stand no more off,But give thyself unto my sick desires,Who then recover: say thou art mine, and everMy love as it begins shall so persever.
+DIANA: I see that men make ropes in such a scarreThat we'll forsake ourselves. Give me that ring.
+BERTRAM: I'll lend it thee, my dear; but have no powerTo give it from me.
+DIANA: Will you not, my lord?
+BERTRAM: It is an honour 'longing to our house,Bequeathed down from many ancestors;Which were the greatest obloquy i' the worldIn me to lose.
+DIANA: Mine honour's such a ring:My chastity's the jewel of our house,Bequeathed down from many ancestors;Which were the greatest obloquy i' the worldIn me to lose: thus your own proper wisdomBrings in the champion Honour on my part,Against your vain assault.
+BERTRAM: Here, take my ring:My house, mine honour, yea, my life, be thine,And I'll be bid by thee.
+DIANA: When midnight comes, knock at my chamber-window:I'll order take my mother shall not hear.Now will I charge you in the band of truth,When you have conquer'd my yet maiden bed,Remain there but an hour, nor speak to me:My reasons are most strong; and you shall know themWhen back again this ring shall be deliver'd:And on your finger in the night I'll putAnother ring, that what in time proceedsMay token to the future our past deeds.Adieu, till then; then, fail not. You have wonA wife of me, though there my hope be done.
+BERTRAM: A heaven on earth I have won by wooing thee.Exit
+DIANA: For which live long to thank both heaven and me!You may so in the end.My mother told me just how he would woo,As if she sat in 's heart; she says all menHave the like oaths: he had sworn to marry meWhen his wife's dead; therefore I'll lie with himWhen I am buried. Since Frenchmen are so braid,Marry that will, I live and die a maid:Only in this disguise I think't no sinTo cozen him that would unjustly win.Exit
+SCENE III. The Florentine camp.Enter the two French Lords and some two or three Soldiers
+First Lord: You have not given him his mother's letter?
+Second Lord: I have delivered it an hour since: there issomething in't that stings his nature; for on thereading it he changed almost into another man.
+First Lord: He has much worthy blame laid upon him for shakingoff so good a wife and so sweet a lady.
+Second Lord: Especially he hath incurred the everlastingdispleasure of the king, who had even tuned hisbounty to sing happiness to him. I will tell you athing, but you shall let it dwell darkly with you.
+First Lord: When you have spoken it, 'tis dead, and I am thegrave of it.
+Second Lord: He hath perverted a young gentlewoman here inFlorence, of a most chaste renown; and this night hefleshes his will in the spoil of her honour: he hathgiven her his monumental ring, and thinks himselfmade in the unchaste composition.
+First Lord: Now, God delay our rebellion! as we are ourselves,what things are we!
+Second Lord: Merely our own traitors. And as in the common courseof all treasons, we still see them revealthemselves, till they attain to their abhorred ends,so he that in this action contrives against his ownnobility, in his proper stream o'erflows himself.
+First Lord: Is it not meant damnable in us, to be trumpeters ofour unlawful intents? We shall not then have hiscompany to-night?
+Second Lord: Not till after midnight; for he is dieted to his hour.
+First Lord: That approaches apace; I would gladly have him seehis company anatomized, that he might take a measureof his own judgments, wherein so curiously he hadset this counterfeit.
+Second Lord: We will not meddle with him till he come; for hispresence must be the whip of the other.
+First Lord: In the mean time, what hear you of these wars?
+Second Lord: I hear there is an overture of peace.
+First Lord: Nay, I assure you, a peace concluded.
+Second Lord: What will Count Rousillon do then? will he travelhigher, or return again into France?
+First Lord: I perceive, by this demand, you are not altogetherof his council.
+Second Lord: Let it be forbid, sir; so should I be a great dealof his act.
+First Lord: Sir, his wife some two months since fled from hishouse: her pretence is a pilgrimage to Saint Jaquesle Grand; which holy undertaking with most austeresanctimony she accomplished; and, there residing thetenderness of her nature became as a prey to hergrief; in fine, made a groan of her last breath, andnow she sings in heaven.
+Second Lord: How is this justified?
+First Lord: The stronger part of it by her own letters, whichmakes her story true, even to the point of herdeath: her death itself, which could not be heroffice to say is come, was faithfully confirmed bythe rector of the place.
+Second Lord: Hath the count all this intelligence?
+First Lord: Ay, and the particular confirmations, point frompoint, so to the full arming of the verity.
+Second Lord: I am heartily sorry that he'll be glad of this.
+First Lord: How mightily sometimes we make us comforts of our losses!
+Second Lord: And how mightily some other times we drown our gainin tears! The great dignity that his valour hathhere acquired for him shall at home be encounteredwith a shame as ample.
+First Lord: The web of our life is of a mingled yarn, good andill together: our virtues would be proud, if ourfaults whipped them not; and our crimes woulddespair, if they were not cherished by our virtues.Enter a MessengerHow now! where's your master?
+Servant: He met the duke in the street, sir, of whom he hathtaken a solemn leave: his lordship will nextmorning for France. The duke hath offered himletters of commendations to the king.
+Second Lord: They shall be no more than needful there, if theywere more than they can commend.
+First Lord: They cannot be too sweet for the king's tartness.Here's his lordship now.Enter BERTRAMHow now, my lord! is't not after midnight?
+BERTRAM: I have to-night dispatched sixteen businesses, amonth's length a-piece, by an abstract of success:I have congied with the duke, done my adieu with hisnearest; buried a wife, mourned for her; writ to mylady mother I am returning; entertained my convoy;and between these main parcels of dispatch effectedmany nicer needs; the last was the greatest, butthat I have not ended yet.
+Second Lord: If the business be of any difficulty, and thismorning your departure hence, it requires haste ofyour lordship.
+BERTRAM: I mean, the business is not ended, as fearing tohear of it hereafter. But shall we have thisdialogue between the fool and the soldier? Come,bring forth this counterfeit module, he has deceivedme, like a double-meaning prophesier.
+Second Lord: Bring him forth: has sat i' the stocks all night,poor gallant knave.
+BERTRAM: No matter: his heels have deserved it, in usurpinghis spurs so long. How does he carry himself?
+Second Lord: I have told your lordship already, the stocks carryhim. But to answer you as you would be understood;he weeps like a wench that had shed her milk: hehath confessed himself to Morgan, whom he supposesto be a friar, from the time of his remembrance tothis very instant disaster of his setting i' thestocks: and what think you he hath confessed?
+BERTRAM: Nothing of me, has a'?
+Second Lord: His confession is taken, and it shall be read to hisface: if your lordship be in't, as I believe youare, you must have the patience to hear it.Enter PAROLLES guarded, and First Soldier
+BERTRAM: A plague upon him! muffled! he can say nothing ofme: hush, hush!
+First Lord: Hoodman comes! Portotartarosa
+First Soldier: He calls for the tortures: what will you saywithout 'em?
+PAROLLES: I will confess what I know without constraint: ifye pinch me like a pasty, I can say no more.
+First Soldier: Bosko chimurcho.
+First Lord: Boblibindo chicurmurco.
+First Soldier: You are a merciful general. Our general bids youanswer to what I shall ask you out of a note.
+PAROLLES: And truly, as I hope to live.
+First Soldier: Reads'First demand of him how many horse theduke is strong.' What say you to that?
+PAROLLES: Five or six thousand; but very weak andunserviceable: the troops are all scattered, andthe commanders very poor rogues, upon my reputationand credit and as I hope to live.
+First Soldier: Shall I set down your answer so?
+PAROLLES: Do: I'll take the sacrament on't, how and which way you will.
+BERTRAM: All's one to him. What a past-saving slave is this!
+First Lord: You're deceived, my lord: this is MonsieurParolles, the gallant militarist,--that was his ownphrase,--that had the whole theoric of war in theknot of his scarf, and the practise in the chape ofhis dagger.
+Second Lord: I will never trust a man again for keeping his swordclean. nor believe he can have every thing in himby wearing his apparel neatly.
+First Soldier: Well, that's set down.
+PAROLLES: Five or six thousand horse, I said,-- I will saytrue,--or thereabouts, set down, for I'll speak truth.
+First Lord: He's very near the truth in this.
+BERTRAM: But I con him no thanks for't, in the nature hedelivers it.
+PAROLLES: Poor rogues, I pray you, say.
+First Soldier: Well, that's set down.
+PAROLLES: I humbly thank you, sir: a truth's a truth, therogues are marvellous poor.
+First Soldier: Reads'Demand of him, of what strength they area-foot.' What say you to that?
+PAROLLES: By my troth, sir, if I were to live this presenthour, I will tell true. Let me see: Spurio, ahundred and fifty; Sebastian, so many; Corambus, somany; Jaques, so many; Guiltian, Cosmo, Lodowick,and Gratii, two hundred and fifty each; mine owncompany, Chitopher, Vaumond, Bentii, two hundred andfifty each: so that the muster-file, rotten andsound, upon my life, amounts not to fifteen thousandpoll; half of the which dare not shake snow from offtheir cassocks, lest they shake themselves to pieces.
+BERTRAM: What shall be done to him?
+First Lord: Nothing, but let him have thanks. Demand of him mycondition, and what credit I have with the duke.
+First Soldier: Well, that's set down.Reads'You shall demand of him, whether one Captain Dumainbe i' the camp, a Frenchman; what his reputation iswith the duke; what his valour, honesty, andexpertness in wars; or whether he thinks it were notpossible, with well-weighing sums of gold, tocorrupt him to revolt.' What say you to this? whatdo you know of it?
+PAROLLES: I beseech you, let me answer to the particular ofthe inter'gatories: demand them singly.
+First Soldier: Do you know this Captain Dumain?
+PAROLLES: I know him: a' was a botcher's 'prentice in Paris,from whence he was whipped for getting the shrieve'sfool with child,--a dumb innocent, that could notsay him nay.
+BERTRAM: Nay, by your leave, hold your hands; though I knowhis brains are forfeit to the next tile that falls.
+First Soldier: Well, is this captain in the duke of Florence's camp?
+PAROLLES: Upon my knowledge, he is, and lousy.
+First Lord: Nay look not so upon me; we shall hear of yourlordship anon.
+First Soldier: What is his reputation with the duke?
+PAROLLES: The duke knows him for no other but a poor officerof mine; and writ to me this other day to turn himout o' the band: I think I have his letter in my pocket.
+First Soldier: Marry, we'll search.
+PAROLLES: In good sadness, I do not know; either it is there,or it is upon a file with the duke's other lettersin my tent.
+First Soldier: Here 'tis; here's a paper: shall I read it to you?
+PAROLLES: I do not know if it be it or no.
+BERTRAM: Our interpreter does it well.
+First Lord: Excellently.
+First Soldier: Reads'Dian, the count's a fool, and full of gold,'--
+PAROLLES: That is not the duke's letter, sir; that is anadvertisement to a proper maid in Florence, oneDiana, to take heed of the allurement of one CountRousillon, a foolish idle boy, but for all that veryruttish: I pray you, sir, put it up again.
+First Soldier: Nay, I'll read it first, by your favour.
+PAROLLES: My meaning in't, I protest, was very honest in thebehalf of the maid; for I knew the young count to bea dangerous and lascivious boy, who is a whale tovirginity and devours up all the fry it finds.
+BERTRAM: Damnable both-sides rogue!
+First Soldier: Reads'When he swears oaths, bid him drop gold, and take it;After he scores, he never pays the score:Half won is match well made; match, and well make it;He ne'er pays after-debts, take it before;And say a soldier, Dian, told thee this,Men are to mell with, boys are not to kiss:For count of this, the count's a fool, I know it,Who pays before, but not when he does owe it.Thine, as he vowed to thee in thine ear,PAROLLES.'
+BERTRAM: He shall be whipped through the army with this rhymein's forehead.
+Second Lord: This is your devoted friend, sir, the manifoldlinguist and the armipotent soldier.
+BERTRAM: I could endure any thing before but a cat, and nowhe's a cat to me.
+First Soldier: I perceive, sir, by the general's looks, we shall befain to hang you.
+PAROLLES: My life, sir, in any case: not that I am afraid todie; but that, my offences being many, I wouldrepent out the remainder of nature: let me live,sir, in a dungeon, i' the stocks, or any where, so I may live.
+First Soldier: We'll see what may be done, so you confess freely;therefore, once more to this Captain Dumain: youhave answered to his reputation with the duke and tohis valour: what is his honesty?
+PAROLLES: He will steal, sir, an egg out of a cloister: forrapes and ravishments he parallels Nessus: heprofesses not keeping of oaths; in breaking 'em heis stronger than Hercules: he will lie, sir, withsuch volubility, that you would think truth were afool: drunkenness is his best virtue, for he willbe swine-drunk; and in his sleep he does littleharm, save to his bed-clothes about him; but theyknow his conditions and lay him in straw. I have butlittle more to say, sir, of his honesty: he hasevery thing that an honest man should not have; whatan honest man should have, he has nothing.
+First Lord: I begin to love him for this.
+BERTRAM: For this description of thine honesty? A pox uponhim for me, he's more and more a cat.
+First Soldier: What say you to his expertness in war?
+PAROLLES: Faith, sir, he has led the drum before the Englishtragedians; to belie him, I will not, and more ofhis soldiership I know not; except, in that countryhe had the honour to be the officer at a place therecalled Mile-end, to instruct for the doubling offiles: I would do the man what honour I can, but ofthis I am not certain.
+First Lord: He hath out-villained villany so far, that therarity redeems him.
+BERTRAM: A pox on him, he's a cat still.
+First Soldier: His qualities being at this poor price, I need notto ask you if gold will corrupt him to revolt.
+PAROLLES: Sir, for a quart d'ecu he will sell the fee-simpleof his salvation, the inheritance of it; and cut theentail from all remainders, and a perpetualsuccession for it perpetually.
+First Soldier: What's his brother, the other Captain Dumain?
+Second Lord: Why does be ask him of me?
+First Soldier: What's he?
+PAROLLES: E'en a crow o' the same nest; not altogether sogreat as the first in goodness, but greater a greatdeal in evil: he excels his brother for a coward,yet his brother is reputed one of the best that is:in a retreat he outruns any lackey; marry, in comingon he has the cramp.
+First Soldier: If your life be saved, will you undertake to betraythe Florentine?
+PAROLLES: Ay, and the captain of his horse, Count Rousillon.
+First Soldier: I'll whisper with the general, and know his pleasure.
+PAROLLES: AsideI'll no more drumming; a plague of alldrums! Only to seem to deserve well, and tobeguile the supposition of that lascivious young boythe count, have I run into this danger. Yet whowould have suspected an ambush where I was taken?
+First Soldier: There is no remedy, sir, but you must die: thegeneral says, you that have so traitorouslydiscovered the secrets of your army and made suchpestiferous reports of men very nobly held, canserve the world for no honest use; therefore youmust die. Come, headsman, off with his head.
+PAROLLES: O Lord, sir, let me live, or let me see my death!
+First Lord: That shall you, and take your leave of all your friends.Unblinding himSo, look about you: know you any here?
+BERTRAM: Good morrow, noble captain.
+Second Lord: God bless you, Captain Parolles.
+First Lord: God save you, noble captain.
+Second Lord: Captain, what greeting will you to my Lord Lafeu?I am for France.
+First Lord: Good captain, will you give me a copy of the sonnetyou writ to Diana in behalf of the Count Rousillon?an I were not a very coward, I'ld compel it of you:but fare you well.Exeunt BERTRAM and Lords
+First Soldier: You are undone, captain, all but your scarf; thathas a knot on't yet
+PAROLLES: Who cannot be crushed with a plot?
+First Soldier: If you could find out a country where but women werethat had received so much shame, you might begin animpudent nation. Fare ye well, sir; I am for Francetoo: we shall speak of you there.Exit with Soldiers
+PAROLLES: Yet am I thankful: if my heart were great,'Twould burst at this. Captain I'll be no more;But I will eat and drink, and sleep as softAs captain shall: simply the thing I amShall make me live. Who knows himself a braggart,Let him fear this, for it will come to passthat every braggart shall be found an ass.Rust, sword? cool, blushes! and, Parolles, liveSafest in shame! being fool'd, by foolery thrive!There's place and means for every man alive.I'll after them.Exit
+SCENE IV. Florence. The Widow's house.Enter HELENA, Widow, and DIANA
+HELENA: That you may well perceive I have not wrong'd you,One of the greatest in the Christian worldShall be my surety; 'fore whose throne 'tis needful,Ere I can perfect mine intents, to kneel:Time was, I did him a desired office,Dear almost as his life; which gratitudeThrough flinty Tartar's bosom would peep forth,And answer, thanks: I duly am inform'dHis grace is at Marseilles; to which placeWe have convenient convoy. You must knowI am supposed dead: the army breaking,My husband hies him home; where, heaven aiding,And by the leave of my good lord the king,We'll be before our welcome.
+Widow: Gentle madam,You never had a servant to whose trustYour business was more welcome.
+HELENA: Nor you, mistress,Ever a friend whose thoughts more truly labourTo recompense your love: doubt not but heavenHath brought me up to be your daughter's dower,As it hath fated her to be my motiveAnd helper to a husband. But, O strange men!That can such sweet use make of what they hate,When saucy trusting of the cozen'd thoughtsDefiles the pitchy night: so lust doth playWith what it loathes for that which is away.But more of this hereafter. You, Diana,Under my poor instructions yet must sufferSomething in my behalf.
+DIANA: Let death and honestyGo with your impositions, I am yoursUpon your will to suffer.
+HELENA: Yet, I pray you:But with the word the time will bring on summer,When briers shall have leaves as well as thorns,And be as sweet as sharp. We must away;Our wagon is prepared, and time revives us:All's well that ends well; still the fine's the crown;Whate'er the course, the end is the renown.Exeunt
+SCENE V. Rousillon. The COUNT's palace.Enter COUNTESS, LAFEU, and Clown
+LAFEU: No, no, no, your son was misled with a snipt-taffetafellow there, whose villanous saffron would havemade all the unbaked and doughy youth of a nation inhis colour: your daughter-in-law had been alive atthis hour, and your son here at home, more advancedby the king than by that red-tailed humble-bee I speak of.
+COUNTESS: I would I had not known him; it was the death of themost virtuous gentlewoman that ever nature hadpraise for creating. If she had partaken of myflesh, and cost me the dearest groans of a mother, Icould not have owed her a more rooted love.
+LAFEU: 'Twas a good lady, 'twas a good lady: we may pick athousand salads ere we light on such another herb.
+Clown: Indeed, sir, she was the sweet marjoram of thesalad, or rather, the herb of grace.
+LAFEU: They are not herbs, you knave; they are nose-herbs.
+Clown: I am no great Nebuchadnezzar, sir; I have not muchskill in grass.
+LAFEU: Whether dost thou profess thyself, a knave or a fool?
+Clown: A fool, sir, at a woman's service, and a knave at a man's.
+LAFEU: Your distinction?
+Clown: I would cozen the man of his wife and do his service.
+LAFEU: So you were a knave at his service, indeed.
+Clown: And I would give his wife my bauble, sir, to do her service.
+LAFEU: I will subscribe for thee, thou art both knave and fool.
+Clown: At your service.
+LAFEU: No, no, no.
+Clown: Why, sir, if I cannot serve you, I can serve asgreat a prince as you are.
+LAFEU: Who's that? a Frenchman?
+Clown: Faith, sir, a' has an English name; but his fisnomyis more hotter in France than there.
+LAFEU: What prince is that?
+Clown: The black prince, sir; alias, the prince ofdarkness; alias, the devil.
+LAFEU: Hold thee, there's my purse: I give thee not thisto suggest thee from thy master thou talkest of;serve him still.
+Clown: I am a woodland fellow, sir, that always loved agreat fire; and the master I speak of ever keeps agood fire. But, sure, he is the prince of theworld; let his nobility remain in's court. I am forthe house with the narrow gate, which I take to betoo little for pomp to enter: some that humblethemselves may; but the many will be too chill andtender, and they'll be for the flowery way thatleads to the broad gate and the great fire.
+LAFEU: Go thy ways, I begin to be aweary of thee; and Itell thee so before, because I would not fall outwith thee. Go thy ways: let my horses be welllooked to, without any tricks.
+Clown: If I put any tricks upon 'em, sir, they shall bejades' tricks; which are their own right by the law of nature.Exit
+LAFEU: A shrewd knave and an unhappy.
+COUNTESS: So he is. My lord that's gone made himself muchsport out of him: by his authority he remains here,which he thinks is a patent for his sauciness; and,indeed, he has no pace, but runs where he will.
+LAFEU: I like him well; 'tis not amiss. And I was about totell you, since I heard of the good lady's death andthat my lord your son was upon his return home, Imoved the king my master to speak in the behalf ofmy daughter; which, in the minority of them both,his majesty, out of a self-gracious remembrance, didfirst propose: his highness hath promised me to doit: and, to stop up the displeasure he hathconceived against your son, there is no fittermatter. How does your ladyship like it?
+COUNTESS: With very much content, my lord; and I wish ithappily effected.
+LAFEU: His highness comes post from Marseilles, of as ablebody as when he numbered thirty: he will be hereto-morrow, or I am deceived by him that in suchintelligence hath seldom failed.
+COUNTESS: It rejoices me, that I hope I shall see him ere Idie. I have letters that my son will be hereto-night: I shall beseech your lordship to remainwith me till they meet together.
+LAFEU: Madam, I was thinking with what manners I mightsafely be admitted.
+COUNTESS: You need but plead your honourable privilege.
+LAFEU: Lady, of that I have made a bold charter; but Ithank my God it holds yet.Re-enter Clown
+Clown: O madam, yonder's my lord your son with a patch ofvelvet on's face: whether there be a scar under'tor no, the velvet knows; but 'tis a goodly patch ofvelvet: his left cheek is a cheek of two pile and ahalf, but his right cheek is worn bare.
+LAFEU: A scar nobly got, or a noble scar, is a good liveryof honour; so belike is that.
+Clown: But it is your carbonadoed face.
+LAFEU: Let us go see your son, I pray you: I long to talkwith the young noble soldier.
+Clown: Faith there's a dozen of 'em, with delicate finehats and most courteous feathers, which bow the headand nod at every man.Exeunt
+ACT V
+SCENE I. Marseilles. A street.Enter HELENA, Widow, and DIANA, with two Attendants
+HELENA: But this exceeding posting day and nightMust wear your spirits low; we cannot help it:But since you have made the days and nights as one,To wear your gentle limbs in my affairs,Be bold you do so grow in my requitalAs nothing can unroot you. In happy time;Enter a GentlemanThis man may help me to his majesty's ear,If he would spend his power. God save you, sir.
+Gentleman: And you.
+HELENA: Sir, I have seen you in the court of France.
+Gentleman: I have been sometimes there.
+HELENA: I do presume, sir, that you are not fallenFrom the report that goes upon your goodness;An therefore, goaded with most sharp occasions,Which lay nice manners by, I put you toThe use of your own virtues, for the whichI shall continue thankful.
+Gentleman: What's your will?
+HELENA: That it will please youTo give this poor petition to the king,And aid me with that store of power you haveTo come into his presence.
+Gentleman: The king's not here.
+HELENA: Not here, sir!
+Gentleman: Not, indeed:He hence removed last night and with more hasteThan is his use.
+Widow: Lord, how we lose our pains!
+HELENA: All's well that ends well yet,Though time seem so adverse and means unfit.I do beseech you, whither is he gone?
+Gentleman: Marry, as I take it, to Rousillon;Whither I am going.
+HELENA: I do beseech you, sir,Since you are like to see the king before me,Commend the paper to his gracious hand,Which I presume shall render you no blameBut rather make you thank your pains for it.I will come after you with what good speedOur means will make us means.
+Gentleman: This I'll do for you.
+HELENA: And you shall find yourself to be well thank'd,Whate'er falls more. We must to horse again.Go, go, provide.Exeunt
+SCENE II. Rousillon. Before the COUNT's palace.Enter Clown, and PAROLLES, following
+PAROLLES: Good Monsieur Lavache, give my Lord Lafeu thisletter: I have ere now, sir, been better known toyou, when I have held familiarity with fresherclothes; but I am now, sir, muddied in fortune'smood, and smell somewhat strong of her strongdispleasure.
+Clown: Truly, fortune's displeasure is but sluttish, if itsmell so strongly as thou speakest of: I willhenceforth eat no fish of fortune's buttering.Prithee, allow the wind.
+PAROLLES: Nay, you need not to stop your nose, sir; I spakebut by a metaphor.
+Clown: Indeed, sir, if your metaphor stink, I will stop mynose; or against any man's metaphor. Prithee, getthee further.
+PAROLLES: Pray you, sir, deliver me this paper.
+Clown: Foh! prithee, stand away: a paper from fortune'sclose-stool to give to a nobleman! Look, here hecomes himself.Enter LAFEUHere is a purr of fortune's, sir, or of fortune'scat,--but not a musk-cat,--that has fallen into theunclean fishpond of her displeasure, and, as hesays, is muddied withal: pray you, sir, use thecarp as you may; for he looks like a poor, decayed,ingenious, foolish, rascally knave. I do pity hisdistress in my similes of comfort and leave him toyour lordship.Exit
+PAROLLES: My lord, I am a man whom fortune hath cruellyscratched.
+LAFEU: And what would you have me to do? 'Tis too late topare her nails now. Wherein have you played theknave with fortune, that she should scratch you, whoof herself is a good lady and would not have knavesthrive long under her? There's a quart d'ecu foryou: let the justices make you and fortune friends:I am for other business.
+PAROLLES: I beseech your honour to hear me one single word.
+LAFEU: You beg a single penny more: come, you shall ha't;save your word.
+PAROLLES: My name, my good lord, is Parolles.
+LAFEU: You beg more than 'word,' then. Cox my passion!give me your hand. How does your drum?
+PAROLLES: O my good lord, you were the first that found me!
+LAFEU: Was I, in sooth? and I was the first that lost thee.
+PAROLLES: It lies in you, my lord, to bring me in some grace,for you did bring me out.
+LAFEU: Out upon thee, knave! dost thou put upon me at onceboth the office of God and the devil? One bringsthee in grace and the other brings thee out.Trumpets soundThe king's coming; I know by his trumpets. Sirrah,inquire further after me; I had talk of you lastnight: though you are a fool and a knave, you shalleat; go to, follow.
+PAROLLES: I praise God for you.Exeunt
+SCENE III. Rousillon. The COUNT's palace.Flourish. Enter KING, COUNTESS, LAFEU, the two French Lords, with Attendants
+KING: We lost a jewel of her; and our esteemWas made much poorer by it: but your son,As mad in folly, lack'd the sense to knowHer estimation home.
+COUNTESS: 'Tis past, my liege;And I beseech your majesty to make itNatural rebellion, done i' the blaze of youth;When oil and fire, too strong for reason's force,O'erbears it and burns on.
+KING: My honour'd lady,I have forgiven and forgotten all;Though my revenges were high bent upon him,And watch'd the time to shoot.
+LAFEU: This I must say,But first I beg my pardon, the young lordDid to his majesty, his mother and his ladyOffence of mighty note; but to himselfThe greatest wrong of all. He lost a wifeWhose beauty did astonish the surveyOf richest eyes, whose words all ears took captive,Whose dear perfection hearts that scorn'd to serveHumbly call'd mistress.
+KING: Praising what is lostMakes the remembrance dear. Well, call him hither;We are reconciled, and the first view shall killAll repetition: let him not ask our pardon;The nature of his great offence is dead,And deeper than oblivion we do buryThe incensing relics of it: let him approach,A stranger, no offender; and inform himSo 'tis our will he should.
+Gentleman: I shall, my liege.Exit
+KING: What says he to your daughter? have you spoke?
+LAFEU: All that he is hath reference to your highness.
+KING: Then shall we have a match. I have letters sent meThat set him high in fame.Enter BERTRAM
+LAFEU: He looks well on't.
+KING: I am not a day of season,For thou mayst see a sunshine and a hailIn me at once: but to the brightest beamsDistracted clouds give way; so stand thou forth;The time is fair again.
+BERTRAM: My high-repented blames,Dear sovereign, pardon to me.
+KING: All is whole;Not one word more of the consumed time.Let's take the instant by the forward top;For we are old, and on our quick'st decreesThe inaudible and noiseless foot of TimeSteals ere we can effect them. You rememberThe daughter of this lord?
+BERTRAM: Admiringly, my liege, at firstI stuck my choice upon her, ere my heartDurst make too bold a herald of my tongueWhere the impression of mine eye infixing,Contempt his scornful perspective did lend me,Which warp'd the line of every other favour;Scorn'd a fair colour, or express'd it stolen;Extended or contracted all proportionsTo a most hideous object: thence it cameThat she whom all men praised and whom myself,Since I have lost, have loved, was in mine eyeThe dust that did offend it.
+KING: Well excused:That thou didst love her, strikes some scores awayFrom the great compt: but love that comes too late,Like a remorseful pardon slowly carried,To the great sender turns a sour offence,Crying, 'That's good that's gone.' Our rash faultsMake trivial price of serious things we have,Not knowing them until we know their grave:Oft our displeasures, to ourselves unjust,Destroy our friends and after weep their dustOur own love waking cries to see what's done,While shame full late sleeps out the afternoon.Be this sweet Helen's knell, and now forget her.Send forth your amorous token for fair Maudlin:The main consents are had; and here we'll stayTo see our widower's second marriage-day.
+COUNTESS: Which better than the first, O dear heaven, bless!Or, ere they meet, in me, O nature, cesse!
+LAFEU: Come on, my son, in whom my house's nameMust be digested, give a favour from youTo sparkle in the spirits of my daughter,That she may quickly come.BERTRAM gives a ringBy my old beard,And every hair that's on't, Helen, that's dead,Was a sweet creature: such a ring as this,The last that e'er I took her at court,I saw upon her finger.
+BERTRAM: Hers it was not.
+KING: Now, pray you, let me see it; for mine eye,While I was speaking, oft was fasten'd to't.This ring was mine; and, when I gave it Helen,I bade her, if her fortunes ever stoodNecessitied to help, that by this tokenI would relieve her. Had you that craft, to reaveherOf what should stead her most?
+BERTRAM: My gracious sovereign,Howe'er it pleases you to take it so,The ring was never hers.
+COUNTESS: Son, on my life,I have seen her wear it; and she reckon'd itAt her life's rate.
+LAFEU: I am sure I saw her wear it.
+BERTRAM: You are deceived, my lord; she never saw it:In Florence was it from a casement thrown me,Wrapp'd in a paper, which contain'd the nameOf her that threw it: noble she was, and thoughtI stood engaged: but when I had subscribedTo mine own fortune and inform'd her fullyI could not answer in that course of honourAs she had made the overture, she ceasedIn heavy satisfaction and would neverReceive the ring again.
+KING: Plutus himself,That knows the tinct and multiplying medicine,Hath not in nature's mystery more scienceThan I have in this ring: 'twas mine, 'twas Helen's,Whoever gave it you. Then, if you knowThat you are well acquainted with yourself,Confess 'twas hers, and by what rough enforcementYou got it from her: she call'd the saints to suretyThat she would never put it from her finger,Unless she gave it to yourself in bed,Where you have never come, or sent it usUpon her great disaster.
+BERTRAM: She never saw it.
+KING: Thou speak'st it falsely, as I love mine honour;And makest conjectural fears to come into meWhich I would fain shut out. If it should proveThat thou art so inhuman,--'twill not prove so;--And yet I know not: thou didst hate her deadly,And she is dead; which nothing, but to closeHer eyes myself, could win me to believe,More than to see this ring. Take him away.Guards seize BERTRAMMy fore-past proofs, howe'er the matter fall,Shall tax my fears of little vanity,Having vainly fear'd too little. Away with him!We'll sift this matter further.
+BERTRAM: If you shall proveThis ring was ever hers, you shall as easyProve that I husbanded her bed in Florence,Where yet she never was.Exit, guarded
+KING: I am wrapp'd in dismal thinkings.Enter a Gentleman
+Gentleman: Gracious sovereign,Whether I have been to blame or no, I know not:Here's a petition from a Florentine,Who hath for four or five removes come shortTo tender it herself. I undertook it,Vanquish'd thereto by the fair grace and speechOf the poor suppliant, who by this I knowIs here attending: her business looks in herWith an importing visage; and she told me,In a sweet verbal brief, it did concernYour highness with herself.
+KING: ReadsUpon his many protestations to marry mewhen his wife was dead, I blush to say it, he wonme. Now is the Count Rousillon a widower: his vowsare forfeited to me, and my honour's paid to him. Hestole from Florence, taking no leave, and I followhim to his country for justice: grant it me, Oking! in you it best lies; otherwise a seducerflourishes, and a poor maid is undone.DIANA CAPILET.
+LAFEU: I will buy me a son-in-law in a fair, and toll forthis: I'll none of him.
+KING: The heavens have thought well on thee Lafeu,To bring forth this discovery. Seek these suitors:Go speedily and bring again the count.I am afeard the life of Helen, lady,Was foully snatch'd.
+COUNTESS: Now, justice on the doers!Re-enter BERTRAM, guarded
+KING: I wonder, sir, sith wives are monsters to you,And that you fly them as you swear them lordship,Yet you desire to marry.Enter Widow and DIANAWhat woman's that?
+DIANA: I am, my lord, a wretched Florentine,Derived from the ancient Capilet:My suit, as I do understand, you know,And therefore know how far I may be pitied.
+Widow: I am her mother, sir, whose age and honourBoth suffer under this complaint we bring,And both shall cease, without your remedy.
+KING: Come hither, count; do you know these women?
+BERTRAM: My lord, I neither can nor will denyBut that I know them: do they charge me further?
+DIANA: Why do you look so strange upon your wife?
+BERTRAM: She's none of mine, my lord.
+DIANA: If you shall marry,You give away this hand, and that is mine;You give away heaven's vows, and those are mine;You give away myself, which is known mine;For I by vow am so embodied yours,That she which marries you must marry me,Either both or none.
+LAFEU: Your reputation comes too short for my daughter; youare no husband for her.
+BERTRAM: My lord, this is a fond and desperate creature,Whom sometime I have laugh'd with: let your highnessLay a more noble thought upon mine honourThan for to think that I would sink it here.
+KING: Sir, for my thoughts, you have them ill to friendTill your deeds gain them: fairer prove your honourThan in my thought it lies.
+DIANA: Good my lord,Ask him upon his oath, if he does thinkHe had not my virginity.
+KING: What say'st thou to her?
+BERTRAM: She's impudent, my lord,And was a common gamester to the camp.
+DIANA: He does me wrong, my lord; if I were so,He might have bought me at a common price:Do not believe him. O, behold this ring,Whose high respect and rich validityDid lack a parallel; yet for all thatHe gave it to a commoner o' the camp,If I be one.
+COUNTESS: He blushes, and 'tis it:Of six preceding ancestors, that gem,Conferr'd by testament to the sequent issue,Hath it been owed and worn. This is his wife;That ring's a thousand proofs.
+KING: Methought you saidYou saw one here in court could witness it.
+DIANA: I did, my lord, but loath am to produceSo bad an instrument: his name's Parolles.
+LAFEU: I saw the man to-day, if man he be.
+KING: Find him, and bring him hither.Exit an Attendant
+BERTRAM: What of him?He's quoted for a most perfidious slave,With all the spots o' the world tax'd and debosh'd;Whose nature sickens but to speak a truth.Am I or that or this for what he'll utter,That will speak any thing?
+KING: She hath that ring of yours.
+BERTRAM: I think she has: certain it is I liked her,And boarded her i' the wanton way of youth:She knew her distance and did angle for me,Madding my eagerness with her restraint,As all impediments in fancy's courseAre motives of more fancy; and, in fine,Her infinite cunning, with her modern grace,Subdued me to her rate: she got the ring;And I had that which any inferior mightAt market-price have bought.
+DIANA: I must be patient:You, that have turn'd off a first so noble wife,May justly diet me. I pray you yet;Since you lack virtue, I will lose a husband;Send for your ring, I will return it home,And give me mine again.
+BERTRAM: I have it not.
+KING: What ring was yours, I pray you?
+DIANA: Sir, much likeThe same upon your finger.
+KING: Know you this ring? this ring was his of late.
+DIANA: And this was it I gave him, being abed.
+KING: The story then goes false, you threw it himOut of a casement.
+DIANA: I have spoke the truth.Enter PAROLLES
+BERTRAM: My lord, I do confess the ring was hers.
+KING: You boggle shrewdly, every feather stars you.Is this the man you speak of?
+DIANA: Ay, my lord.
+KING: Tell me, sirrah, but tell me true, I charge you,Not fearing the displeasure of your master,Which on your just proceeding I'll keep off,By him and by this woman here what know you?
+PAROLLES: So please your majesty, my master hath been anhonourable gentleman: tricks he hath had in him,which gentlemen have.
+KING: Come, come, to the purpose: did he love this woman?
+PAROLLES: Faith, sir, he did love her; but how?
+KING: How, I pray you?
+PAROLLES: He did love her, sir, as a gentleman loves a woman.
+KING: How is that?
+PAROLLES: He loved her, sir, and loved her not.
+KING: As thou art a knave, and no knave. What anequivocal companion is this!
+PAROLLES: I am a poor man, and at your majesty's command.
+LAFEU: He's a good drum, my lord, but a naughty orator.
+DIANA: Do you know he promised me marriage?
+PAROLLES: Faith, I know more than I'll speak.
+KING: But wilt thou not speak all thou knowest?
+PAROLLES: Yes, so please your majesty. I did go between them,as I said; but more than that, he loved her: forindeed he was mad for her, and talked of Satan andof Limbo and of Furies and I know not what: yet Iwas in that credit with them at that time that Iknew of their going to bed, and of other motions,as promising her marriage, and things which wouldderive me ill will to speak of; therefore I will notspeak what I know.
+KING: Thou hast spoken all already, unless thou canst saythey are married: but thou art too fine in thyevidence; therefore stand aside.This ring, you say, was yours?
+DIANA: Ay, my good lord.
+KING: Where did you buy it? or who gave it you?
+DIANA: It was not given me, nor I did not buy it.
+KING: Who lent it you?
+DIANA: It was not lent me neither.
+KING: Where did you find it, then?
+DIANA: I found it not.
+KING: If it were yours by none of all these ways,How could you give it him?
+DIANA: I never gave it him.
+LAFEU: This woman's an easy glove, my lord; she goes offand on at pleasure.
+KING: This ring was mine; I gave it his first wife.
+DIANA: It might be yours or hers, for aught I know.
+KING: Take her away; I do not like her now;To prison with her: and away with him.Unless thou tell'st me where thou hadst this ring,Thou diest within this hour.
+DIANA: I'll never tell you.
+KING: Take her away.
+DIANA: I'll put in bail, my liege.
+KING: I think thee now some common customer.
+DIANA: By Jove, if ever I knew man, 'twas you.
+KING: Wherefore hast thou accused him all this while?
+DIANA: Because he's guilty, and he is not guilty:He knows I am no maid, and he'll swear to't;I'll swear I am a maid, and he knows not.Great king, I am no strumpet, by my life;I am either maid, or else this old man's wife.
+KING: She does abuse our ears: to prison with her.
+DIANA: Good mother, fetch my bail. Stay, royal sir:Exit WidowThe jeweller that owes the ring is sent for,And he shall surety me. But for this lord,Who hath abused me, as he knows himself,Though yet he never harm'd me, here I quit him:He knows himself my bed he hath defiled;And at that time he got his wife with child:Dead though she be, she feels her young one kick:So there's my riddle: one that's dead is quick:And now behold the meaning.Re-enter Widow, with HELENA
+KING: Is there no exorcistBeguiles the truer office of mine eyes?Is't real that I see?
+HELENA: No, my good lord;'Tis but the shadow of a wife you see,The name and not the thing.
+BERTRAM: Both, both. O, pardon!
+HELENA: O my good lord, when I was like this maid,I found you wondrous kind. There is your ring;And, look you, here's your letter; this it says:'When from my finger you can get this ringAnd are by me with child,' &amp;c. This is done:Will you be mine, now you are doubly won?
+BERTRAM: If she, my liege, can make me know this clearly,I'll love her dearly, ever, ever dearly.
+HELENA: If it appear not plain and prove untrue,Deadly divorce step between me and you!O my dear mother, do I see you living?
+LAFEU: Mine eyes smell onions; I shall weep anon:To PAROLLESGood Tom Drum, lend me a handkercher: so,I thank thee: wait on me home, I'll make sport with thee:Let thy courtesies alone, they are scurvy ones.
+KING: Let us from point to point this story know,To make the even truth in pleasure flow.To DIANAIf thou be'st yet a fresh uncropped flower,Choose thou thy husband, and I'll pay thy dower;For I can guess that by thy honest aidThou keep'st a wife herself, thyself a maid.Of that and all the progress, more or less,Resolvedly more leisure shall express:All yet seems well; and if it end so meet,The bitter past, more welcome is the sweet.Flourish
+EPILOGUE
+KING: The king's a beggar, now the play is done:All is well ended, if this suit be won,That you express content; which we will pay,With strife to please you, day exceeding day:Ours be your patience then, and yours our parts;Your gentle hands lend us, and take our hearts.
+Exeunt</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/elem1kattr.xml b/test/tests/perf/xtestdata/elem1kattr.xml
new file mode 100644
index 0000000..b8ae964
--- /dev/null
+++ b/test/tests/perf/xtestdata/elem1kattr.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<bigelem
+ a1="1" a2="2" a3="3" a4="4" a5="5" a6="6" a7="7" a8="8" a9="9" a10="10"
+ a11="11" a12="12" a13="13" a14="14" a15="15" a16="16" a17="17" a18="18" a19="19" a20="20"
+ a21="21" a22="22" a23="23" a24="24" a25="25" a26="26" a27="27" a28="28" a29="29" a30="30"
+ a31="31" a32="32" a33="33" a34="34" a35="35" a36="36" a37="37" a38="38" a39="39" a40="40"
+ a41="41" a42="42" a43="43" a44="44" a45="45" a46="46" a47="47" a48="48" a49="49" a50="50"
+ a51="51" a52="52" a53="53" a54="54" a55="55" a56="56" a57="57" a58="58" a59="59" a60="60"
+ a61="61" a62="62" a63="63" a64="64" a65="65" a66="66" a67="67" a68="68" a69="69" a70="70"
+ a71="71" a72="72" a73="73" a74="74" a75="75" a76="76" a77="77" a78="78" a79="79" a80="80"
+ a81="81" a82="82" a83="83" a84="84" a85="85" a86="86" a87="87" a88="88" a89="89" a90="90"
+ a91="91" a92="92" a93="93" a94="94" a95="95" a96="96" a97="97" a98="98" a99="99" a100="100"
+ a101="101" a102="102" a103="103" a104="104" a105="105" a106="106" a107="107" a108="108" a109="109" a110="110"
+ a111="111" a112="112" a113="113" a114="114" a115="115" a116="116" a117="117" a118="118" a119="119" a120="120"
+ a121="121" a122="122" a123="123" a124="124" a125="125" a126="126" a127="127" a128="128" a129="129" a130="130"
+ a131="131" a132="132" a133="133" a134="134" a135="135" a136="136" a137="137" a138="138" a139="139" a140="140"
+ a141="141" a142="142" a143="143" a144="144" a145="145" a146="146" a147="147" a148="148" a149="149" a150="150"
+ a151="151" a152="152" a153="153" a154="154" a155="155" a156="156" a157="157" a158="158" a159="159" a160="160"
+ a161="161" a162="162" a163="163" a164="164" a165="165" a166="166" a167="167" a168="168" a169="169" a170="170"
+ a171="171" a172="172" a173="173" a174="174" a175="175" a176="176" a177="177" a178="178" a179="179" a180="180"
+ a181="181" a182="182" a183="183" a184="184" a185="185" a186="186" a187="187" a188="188" a189="189" a190="190"
+ a191="191" a192="192" a193="193" a194="194" a195="195" a196="196" a197="197" a198="198" a199="199" a200="200"
+ a201="201" a202="202" a203="203" a204="204" a205="205" a206="206" a207="207" a208="208" a209="209" a210="210"
+ a211="211" a212="212" a213="213" a214="214" a215="215" a216="216" a217="217" a218="218" a219="219" a220="220"
+ a221="221" a222="222" a223="223" a224="224" a225="225" a226="226" a227="227" a228="228" a229="229" a230="230"
+ a231="231" a232="232" a233="233" a234="234" a235="235" a236="236" a237="237" a238="238" a239="239" a240="240"
+ a241="241" a242="242" a243="243" a244="244" a245="245" a246="246" a247="247" a248="248" a249="249" a250="250"
+ a251="251" a252="252" a253="253" a254="254" a255="255" a256="256" a257="257" a258="258" a259="259" a260="260"
+ a261="261" a262="262" a263="263" a264="264" a265="265" a266="266" a267="267" a268="268" a269="269" a270="270"
+ a271="271" a272="272" a273="273" a274="274" a275="275" a276="276" a277="277" a278="278" a279="279" a280="280"
+ a281="281" a282="282" a283="283" a284="284" a285="285" a286="286" a287="287" a288="288" a289="289" a290="290"
+ a291="291" a292="292" a293="293" a294="294" a295="295" a296="296" a297="297" a298="298" a299="299" a300="300"
+ a301="301" a302="302" a303="303" a304="304" a305="305" a306="306" a307="307" a308="308" a309="309" a310="310"
+ a311="311" a312="312" a313="313" a314="314" a315="315" a316="316" a317="317" a318="318" a319="319" a320="320"
+ a321="321" a322="322" a323="323" a324="324" a325="325" a326="326" a327="327" a328="328" a329="329" a330="330"
+ a331="331" a332="332" a333="333" a334="334" a335="335" a336="336" a337="337" a338="338" a339="339" a340="340"
+ a341="341" a342="342" a343="343" a344="344" a345="345" a346="346" a347="347" a348="348" a349="349" a350="350"
+ a351="351" a352="352" a353="353" a354="354" a355="355" a356="356" a357="357" a358="358" a359="359" a360="360"
+ a361="361" a362="362" a363="363" a364="364" a365="365" a366="366" a367="367" a368="368" a369="369" a370="370"
+ a371="371" a372="372" a373="373" a374="374" a375="375" a376="376" a377="377" a378="378" a379="379" a380="380"
+ a381="381" a382="382" a383="383" a384="384" a385="385" a386="386" a387="387" a388="388" a389="389" a390="390"
+ a391="391" a392="392" a393="393" a394="394" a395="395" a396="396" a397="397" a398="398" a399="399" a400="400"
+ a401="401" a402="402" a403="403" a404="404" a405="405" a406="406" a407="407" a408="408" a409="409" a410="410"
+ a411="411" a412="412" a413="413" a414="414" a415="415" a416="416" a417="417" a418="418" a419="419" a420="420"
+ a421="421" a422="422" a423="423" a424="424" a425="425" a426="426" a427="427" a428="428" a429="429" a430="430"
+ a431="431" a432="432" a433="433" a434="434" a435="435" a436="436" a437="437" a438="438" a439="439" a440="440"
+ a441="441" a442="442" a443="443" a444="444" a445="445" a446="446" a447="447" a448="448" a449="449" a450="450"
+ a451="451" a452="452" a453="453" a454="454" a455="455" a456="456" a457="457" a458="458" a459="459" a460="460"
+ a461="461" a462="462" a463="463" a464="464" a465="465" a466="466" a467="467" a468="468" a469="469" a470="470"
+ a471="471" a472="472" a473="473" a474="474" a475="475" a476="476" a477="477" a478="478" a479="479" a480="480"
+ a481="481" a482="482" a483="483" a484="484" a485="485" a486="486" a487="487" a488="488" a489="489" a490="490"
+ a491="491" a492="492" a493="493" a494="494" a495="495" a496="496" a497="497" a498="498" a499="499" a500="500"
+ a501="501" a502="502" a503="503" a504="504" a505="505" a506="506" a507="507" a508="508" a509="509" a510="510"
+ a511="511" a512="512" a513="513" a514="514" a515="515" a516="516" a517="517" a518="518" a519="519" a520="520"
+ a521="521" a522="522" a523="523" a524="524" a525="525" a526="526" a527="527" a528="528" a529="529" a530="530"
+ a531="531" a532="532" a533="533" a534="534" a535="535" a536="536" a537="537" a538="538" a539="539" a540="540"
+ a541="541" a542="542" a543="543" a544="544" a545="545" a546="546" a547="547" a548="548" a549="549" a550="550"
+ a551="551" a552="552" a553="553" a554="554" a555="555" a556="556" a557="557" a558="558" a559="559" a560="560"
+ a561="561" a562="562" a563="563" a564="564" a565="565" a566="566" a567="567" a568="568" a569="569" a570="570"
+ a571="571" a572="572" a573="573" a574="574" a575="575" a576="576" a577="577" a578="578" a579="579" a580="580"
+ a581="581" a582="582" a583="583" a584="584" a585="585" a586="586" a587="587" a588="588" a589="589" a590="590"
+ a591="591" a592="592" a593="593" a594="594" a595="595" a596="596" a597="597" a598="598" a599="599" a600="600"
+ a601="601" a602="602" a603="603" a604="604" a605="605" a606="606" a607="607" a608="608" a609="609" a610="610"
+ a611="611" a612="612" a613="613" a614="614" a615="615" a616="616" a617="617" a618="618" a619="619" a620="620"
+ a621="621" a622="622" a623="623" a624="624" a625="625" a626="626" a627="627" a628="628" a629="629" a630="630"
+ a631="631" a632="632" a633="633" a634="634" a635="635" a636="636" a637="637" a638="638" a639="639" a640="640"
+ a641="641" a642="642" a643="643" a644="644" a645="645" a646="646" a647="647" a648="648" a649="649" a650="650"
+ a651="651" a652="652" a653="653" a654="654" a655="655" a656="656" a657="657" a658="658" a659="659" a660="660"
+ a661="661" a662="662" a663="663" a664="664" a665="665" a666="666" a667="667" a668="668" a669="669" a670="670"
+ a671="671" a672="672" a673="673" a674="674" a675="675" a676="676" a677="677" a678="678" a679="679" a680="680"
+ a681="681" a682="682" a683="683" a684="684" a685="685" a686="686" a687="687" a688="688" a689="689" a690="690"
+ a691="691" a692="692" a693="693" a694="694" a695="695" a696="696" a697="697" a698="698" a699="699" a700="700"
+ a701="701" a702="702" a703="703" a704="704" a705="705" a706="706" a707="707" a708="708" a709="709" a710="710"
+ a711="711" a712="712" a713="713" a714="714" a715="715" a716="716" a717="717" a718="718" a719="719" a720="720"
+ a721="721" a722="722" a723="723" a724="724" a725="725" a726="726" a727="727" a728="728" a729="729" a730="730"
+ a731="731" a732="732" a733="733" a734="734" a735="735" a736="736" a737="737" a738="738" a739="739" a740="740"
+ a741="741" a742="742" a743="743" a744="744" a745="745" a746="746" a747="747" a748="748" a749="749" a750="750"
+ a751="751" a752="752" a753="753" a754="754" a755="755" a756="756" a757="757" a758="758" a759="759" a760="760"
+ a761="761" a762="762" a763="763" a764="764" a765="765" a766="766" a767="767" a768="768" a769="769" a770="770"
+ a771="771" a772="772" a773="773" a774="774" a775="775" a776="776" a777="777" a778="778" a779="779" a780="780"
+ a781="781" a782="782" a783="783" a784="784" a785="785" a786="786" a787="787" a788="788" a789="789" a790="790"
+ a791="791" a792="792" a793="793" a794="794" a795="795" a796="796" a797="797" a798="798" a799="799" a800="800"
+ a801="801" a802="802" a803="803" a804="804" a805="805" a806="806" a807="807" a808="808" a809="809" a810="810"
+ a811="811" a812="812" a813="813" a814="814" a815="815" a816="816" a817="817" a818="818" a819="819" a820="820"
+ a821="821" a822="822" a823="823" a824="824" a825="825" a826="826" a827="827" a828="828" a829="829" a830="830"
+ a831="831" a832="832" a833="833" a834="834" a835="835" a836="836" a837="837" a838="838" a839="839" a840="840"
+ a841="841" a842="842" a843="843" a844="844" a845="845" a846="846" a847="847" a848="848" a849="849" a850="850"
+ a851="851" a852="852" a853="853" a854="854" a855="855" a856="856" a857="857" a858="858" a859="859" a860="860"
+ a861="861" a862="862" a863="863" a864="864" a865="865" a866="866" a867="867" a868="868" a869="869" a870="870"
+ a871="871" a872="872" a873="873" a874="874" a875="875" a876="876" a877="877" a878="878" a879="879" a880="880"
+ a881="881" a882="882" a883="883" a884="884" a885="885" a886="886" a887="887" a888="888" a889="889" a890="890"
+ a891="891" a892="892" a893="893" a894="894" a895="895" a896="896" a897="897" a898="898" a899="899" a900="900"
+ a901="901" a902="902" a903="903" a904="904" a905="905" a906="906" a907="907" a908="908" a909="909" a910="910"
+ a911="911" a912="912" a913="913" a914="914" a915="915" a916="916" a917="917" a918="918" a919="919" a920="920"
+ a921="921" a922="922" a923="923" a924="924" a925="925" a926="926" a927="927" a928="928" a929="929" a930="930"
+ a931="931" a932="932" a933="933" a934="934" a935="935" a936="936" a937="937" a938="938" a939="939" a940="940"
+ a941="941" a942="942" a943="943" a944="944" a945="945" a946="946" a947="947" a948="948" a949="949" a950="950"
+ a951="951" a952="952" a953="953" a954="954" a955="955" a956="956" a957="957" a958="958" a959="959" a960="960"
+ a961="961" a962="962" a963="963" a964="964" a965="965" a966="966" a967="967" a968="968" a969="969" a970="970"
+ a971="971" a972="972" a973="973" a974="974" a975="975" a976="976" a977="977" a978="978" a979="979" a980="980"
+ a981="981" a982="982" a983="983" a984="984" a985="985" a986="986" a987="987" a988="988" a989="989" a990="990"
+ a991="991" a992="992" a993="993" a994="994" a995="995" a996="996" a997="997" a998="998" a999="999" a1000="1000"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/elem1kdeep.xml b/test/tests/perf/xtestdata/elem1kdeep.xml
new file mode 100644
index 0000000..f4beac6
--- /dev/null
+++ b/test/tests/perf/xtestdata/elem1kdeep.xml
@@ -0,0 +1,2002 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<e1>1
+<e2>2
+<e3>3
+<e4>4
+<e5>5
+<e6>6
+<e7>7
+<e8>8
+<e9>9
+<e10>10
+<e11>11
+<e12>12
+<e13>13
+<e14>14
+<e15>15
+<e16>16
+<e17>17
+<e18>18
+<e19>19
+<e20>20
+<e21>21
+<e22>22
+<e23>23
+<e24>24
+<e25>25
+<e26>26
+<e27>27
+<e28>28
+<e29>29
+<e30>30
+<e31>31
+<e32>32
+<e33>33
+<e34>34
+<e35>35
+<e36>36
+<e37>37
+<e38>38
+<e39>39
+<e40>40
+<e41>41
+<e42>42
+<e43>43
+<e44>44
+<e45>45
+<e46>46
+<e47>47
+<e48>48
+<e49>49
+<e50>50
+<e51>51
+<e52>52
+<e53>53
+<e54>54
+<e55>55
+<e56>56
+<e57>57
+<e58>58
+<e59>59
+<e60>60
+<e61>61
+<e62>62
+<e63>63
+<e64>64
+<e65>65
+<e66>66
+<e67>67
+<e68>68
+<e69>69
+<e70>70
+<e71>71
+<e72>72
+<e73>73
+<e74>74
+<e75>75
+<e76>76
+<e77>77
+<e78>78
+<e79>79
+<e80>80
+<e81>81
+<e82>82
+<e83>83
+<e84>84
+<e85>85
+<e86>86
+<e87>87
+<e88>88
+<e89>89
+<e90>90
+<e91>91
+<e92>92
+<e93>93
+<e94>94
+<e95>95
+<e96>96
+<e97>97
+<e98>98
+<e99>99
+<e100>100
+<e101>101
+<e102>102
+<e103>103
+<e104>104
+<e105>105
+<e106>106
+<e107>107
+<e108>108
+<e109>109
+<e110>110
+<e111>111
+<e112>112
+<e113>113
+<e114>114
+<e115>115
+<e116>116
+<e117>117
+<e118>118
+<e119>119
+<e120>120
+<e121>121
+<e122>122
+<e123>123
+<e124>124
+<e125>125
+<e126>126
+<e127>127
+<e128>128
+<e129>129
+<e130>130
+<e131>131
+<e132>132
+<e133>133
+<e134>134
+<e135>135
+<e136>136
+<e137>137
+<e138>138
+<e139>139
+<e140>140
+<e141>141
+<e142>142
+<e143>143
+<e144>144
+<e145>145
+<e146>146
+<e147>147
+<e148>148
+<e149>149
+<e150>150
+<e151>151
+<e152>152
+<e153>153
+<e154>154
+<e155>155
+<e156>156
+<e157>157
+<e158>158
+<e159>159
+<e160>160
+<e161>161
+<e162>162
+<e163>163
+<e164>164
+<e165>165
+<e166>166
+<e167>167
+<e168>168
+<e169>169
+<e170>170
+<e171>171
+<e172>172
+<e173>173
+<e174>174
+<e175>175
+<e176>176
+<e177>177
+<e178>178
+<e179>179
+<e180>180
+<e181>181
+<e182>182
+<e183>183
+<e184>184
+<e185>185
+<e186>186
+<e187>187
+<e188>188
+<e189>189
+<e190>190
+<e191>191
+<e192>192
+<e193>193
+<e194>194
+<e195>195
+<e196>196
+<e197>197
+<e198>198
+<e199>199
+<e200>200
+<e201>201
+<e202>202
+<e203>203
+<e204>204
+<e205>205
+<e206>206
+<e207>207
+<e208>208
+<e209>209
+<e210>210
+<e211>211
+<e212>212
+<e213>213
+<e214>214
+<e215>215
+<e216>216
+<e217>217
+<e218>218
+<e219>219
+<e220>220
+<e221>221
+<e222>222
+<e223>223
+<e224>224
+<e225>225
+<e226>226
+<e227>227
+<e228>228
+<e229>229
+<e230>230
+<e231>231
+<e232>232
+<e233>233
+<e234>234
+<e235>235
+<e236>236
+<e237>237
+<e238>238
+<e239>239
+<e240>240
+<e241>241
+<e242>242
+<e243>243
+<e244>244
+<e245>245
+<e246>246
+<e247>247
+<e248>248
+<e249>249
+<e250>250
+<e251>251
+<e252>252
+<e253>253
+<e254>254
+<e255>255
+<e256>256
+<e257>257
+<e258>258
+<e259>259
+<e260>260
+<e261>261
+<e262>262
+<e263>263
+<e264>264
+<e265>265
+<e266>266
+<e267>267
+<e268>268
+<e269>269
+<e270>270
+<e271>271
+<e272>272
+<e273>273
+<e274>274
+<e275>275
+<e276>276
+<e277>277
+<e278>278
+<e279>279
+<e280>280
+<e281>281
+<e282>282
+<e283>283
+<e284>284
+<e285>285
+<e286>286
+<e287>287
+<e288>288
+<e289>289
+<e290>290
+<e291>291
+<e292>292
+<e293>293
+<e294>294
+<e295>295
+<e296>296
+<e297>297
+<e298>298
+<e299>299
+<e300>300
+<e301>301
+<e302>302
+<e303>303
+<e304>304
+<e305>305
+<e306>306
+<e307>307
+<e308>308
+<e309>309
+<e310>310
+<e311>311
+<e312>312
+<e313>313
+<e314>314
+<e315>315
+<e316>316
+<e317>317
+<e318>318
+<e319>319
+<e320>320
+<e321>321
+<e322>322
+<e323>323
+<e324>324
+<e325>325
+<e326>326
+<e327>327
+<e328>328
+<e329>329
+<e330>330
+<e331>331
+<e332>332
+<e333>333
+<e334>334
+<e335>335
+<e336>336
+<e337>337
+<e338>338
+<e339>339
+<e340>340
+<e341>341
+<e342>342
+<e343>343
+<e344>344
+<e345>345
+<e346>346
+<e347>347
+<e348>348
+<e349>349
+<e350>350
+<e351>351
+<e352>352
+<e353>353
+<e354>354
+<e355>355
+<e356>356
+<e357>357
+<e358>358
+<e359>359
+<e360>360
+<e361>361
+<e362>362
+<e363>363
+<e364>364
+<e365>365
+<e366>366
+<e367>367
+<e368>368
+<e369>369
+<e370>370
+<e371>371
+<e372>372
+<e373>373
+<e374>374
+<e375>375
+<e376>376
+<e377>377
+<e378>378
+<e379>379
+<e380>380
+<e381>381
+<e382>382
+<e383>383
+<e384>384
+<e385>385
+<e386>386
+<e387>387
+<e388>388
+<e389>389
+<e390>390
+<e391>391
+<e392>392
+<e393>393
+<e394>394
+<e395>395
+<e396>396
+<e397>397
+<e398>398
+<e399>399
+<e400>400
+<e401>401
+<e402>402
+<e403>403
+<e404>404
+<e405>405
+<e406>406
+<e407>407
+<e408>408
+<e409>409
+<e410>410
+<e411>411
+<e412>412
+<e413>413
+<e414>414
+<e415>415
+<e416>416
+<e417>417
+<e418>418
+<e419>419
+<e420>420
+<e421>421
+<e422>422
+<e423>423
+<e424>424
+<e425>425
+<e426>426
+<e427>427
+<e428>428
+<e429>429
+<e430>430
+<e431>431
+<e432>432
+<e433>433
+<e434>434
+<e435>435
+<e436>436
+<e437>437
+<e438>438
+<e439>439
+<e440>440
+<e441>441
+<e442>442
+<e443>443
+<e444>444
+<e445>445
+<e446>446
+<e447>447
+<e448>448
+<e449>449
+<e450>450
+<e451>451
+<e452>452
+<e453>453
+<e454>454
+<e455>455
+<e456>456
+<e457>457
+<e458>458
+<e459>459
+<e460>460
+<e461>461
+<e462>462
+<e463>463
+<e464>464
+<e465>465
+<e466>466
+<e467>467
+<e468>468
+<e469>469
+<e470>470
+<e471>471
+<e472>472
+<e473>473
+<e474>474
+<e475>475
+<e476>476
+<e477>477
+<e478>478
+<e479>479
+<e480>480
+<e481>481
+<e482>482
+<e483>483
+<e484>484
+<e485>485
+<e486>486
+<e487>487
+<e488>488
+<e489>489
+<e490>490
+<e491>491
+<e492>492
+<e493>493
+<e494>494
+<e495>495
+<e496>496
+<e497>497
+<e498>498
+<e499>499
+<e500>500
+<e501>501
+<e502>502
+<e503>503
+<e504>504
+<e505>505
+<e506>506
+<e507>507
+<e508>508
+<e509>509
+<e510>510
+<e511>511
+<e512>512
+<e513>513
+<e514>514
+<e515>515
+<e516>516
+<e517>517
+<e518>518
+<e519>519
+<e520>520
+<e521>521
+<e522>522
+<e523>523
+<e524>524
+<e525>525
+<e526>526
+<e527>527
+<e528>528
+<e529>529
+<e530>530
+<e531>531
+<e532>532
+<e533>533
+<e534>534
+<e535>535
+<e536>536
+<e537>537
+<e538>538
+<e539>539
+<e540>540
+<e541>541
+<e542>542
+<e543>543
+<e544>544
+<e545>545
+<e546>546
+<e547>547
+<e548>548
+<e549>549
+<e550>550
+<e551>551
+<e552>552
+<e553>553
+<e554>554
+<e555>555
+<e556>556
+<e557>557
+<e558>558
+<e559>559
+<e560>560
+<e561>561
+<e562>562
+<e563>563
+<e564>564
+<e565>565
+<e566>566
+<e567>567
+<e568>568
+<e569>569
+<e570>570
+<e571>571
+<e572>572
+<e573>573
+<e574>574
+<e575>575
+<e576>576
+<e577>577
+<e578>578
+<e579>579
+<e580>580
+<e581>581
+<e582>582
+<e583>583
+<e584>584
+<e585>585
+<e586>586
+<e587>587
+<e588>588
+<e589>589
+<e590>590
+<e591>591
+<e592>592
+<e593>593
+<e594>594
+<e595>595
+<e596>596
+<e597>597
+<e598>598
+<e599>599
+<e600>600
+<e601>601
+<e602>602
+<e603>603
+<e604>604
+<e605>605
+<e606>606
+<e607>607
+<e608>608
+<e609>609
+<e610>610
+<e611>611
+<e612>612
+<e613>613
+<e614>614
+<e615>615
+<e616>616
+<e617>617
+<e618>618
+<e619>619
+<e620>620
+<e621>621
+<e622>622
+<e623>623
+<e624>624
+<e625>625
+<e626>626
+<e627>627
+<e628>628
+<e629>629
+<e630>630
+<e631>631
+<e632>632
+<e633>633
+<e634>634
+<e635>635
+<e636>636
+<e637>637
+<e638>638
+<e639>639
+<e640>640
+<e641>641
+<e642>642
+<e643>643
+<e644>644
+<e645>645
+<e646>646
+<e647>647
+<e648>648
+<e649>649
+<e650>650
+<e651>651
+<e652>652
+<e653>653
+<e654>654
+<e655>655
+<e656>656
+<e657>657
+<e658>658
+<e659>659
+<e660>660
+<e661>661
+<e662>662
+<e663>663
+<e664>664
+<e665>665
+<e666>666
+<e667>667
+<e668>668
+<e669>669
+<e670>670
+<e671>671
+<e672>672
+<e673>673
+<e674>674
+<e675>675
+<e676>676
+<e677>677
+<e678>678
+<e679>679
+<e680>680
+<e681>681
+<e682>682
+<e683>683
+<e684>684
+<e685>685
+<e686>686
+<e687>687
+<e688>688
+<e689>689
+<e690>690
+<e691>691
+<e692>692
+<e693>693
+<e694>694
+<e695>695
+<e696>696
+<e697>697
+<e698>698
+<e699>699
+<e700>700
+<e701>701
+<e702>702
+<e703>703
+<e704>704
+<e705>705
+<e706>706
+<e707>707
+<e708>708
+<e709>709
+<e710>710
+<e711>711
+<e712>712
+<e713>713
+<e714>714
+<e715>715
+<e716>716
+<e717>717
+<e718>718
+<e719>719
+<e720>720
+<e721>721
+<e722>722
+<e723>723
+<e724>724
+<e725>725
+<e726>726
+<e727>727
+<e728>728
+<e729>729
+<e730>730
+<e731>731
+<e732>732
+<e733>733
+<e734>734
+<e735>735
+<e736>736
+<e737>737
+<e738>738
+<e739>739
+<e740>740
+<e741>741
+<e742>742
+<e743>743
+<e744>744
+<e745>745
+<e746>746
+<e747>747
+<e748>748
+<e749>749
+<e750>750
+<e751>751
+<e752>752
+<e753>753
+<e754>754
+<e755>755
+<e756>756
+<e757>757
+<e758>758
+<e759>759
+<e760>760
+<e761>761
+<e762>762
+<e763>763
+<e764>764
+<e765>765
+<e766>766
+<e767>767
+<e768>768
+<e769>769
+<e770>770
+<e771>771
+<e772>772
+<e773>773
+<e774>774
+<e775>775
+<e776>776
+<e777>777
+<e778>778
+<e779>779
+<e780>780
+<e781>781
+<e782>782
+<e783>783
+<e784>784
+<e785>785
+<e786>786
+<e787>787
+<e788>788
+<e789>789
+<e790>790
+<e791>791
+<e792>792
+<e793>793
+<e794>794
+<e795>795
+<e796>796
+<e797>797
+<e798>798
+<e799>799
+<e800>800
+<e801>801
+<e802>802
+<e803>803
+<e804>804
+<e805>805
+<e806>806
+<e807>807
+<e808>808
+<e809>809
+<e810>810
+<e811>811
+<e812>812
+<e813>813
+<e814>814
+<e815>815
+<e816>816
+<e817>817
+<e818>818
+<e819>819
+<e820>820
+<e821>821
+<e822>822
+<e823>823
+<e824>824
+<e825>825
+<e826>826
+<e827>827
+<e828>828
+<e829>829
+<e830>830
+<e831>831
+<e832>832
+<e833>833
+<e834>834
+<e835>835
+<e836>836
+<e837>837
+<e838>838
+<e839>839
+<e840>840
+<e841>841
+<e842>842
+<e843>843
+<e844>844
+<e845>845
+<e846>846
+<e847>847
+<e848>848
+<e849>849
+<e850>850
+<e851>851
+<e852>852
+<e853>853
+<e854>854
+<e855>855
+<e856>856
+<e857>857
+<e858>858
+<e859>859
+<e860>860
+<e861>861
+<e862>862
+<e863>863
+<e864>864
+<e865>865
+<e866>866
+<e867>867
+<e868>868
+<e869>869
+<e870>870
+<e871>871
+<e872>872
+<e873>873
+<e874>874
+<e875>875
+<e876>876
+<e877>877
+<e878>878
+<e879>879
+<e880>880
+<e881>881
+<e882>882
+<e883>883
+<e884>884
+<e885>885
+<e886>886
+<e887>887
+<e888>888
+<e889>889
+<e890>890
+<e891>891
+<e892>892
+<e893>893
+<e894>894
+<e895>895
+<e896>896
+<e897>897
+<e898>898
+<e899>899
+<e900>900
+<e901>901
+<e902>902
+<e903>903
+<e904>904
+<e905>905
+<e906>906
+<e907>907
+<e908>908
+<e909>909
+<e910>910
+<e911>911
+<e912>912
+<e913>913
+<e914>914
+<e915>915
+<e916>916
+<e917>917
+<e918>918
+<e919>919
+<e920>920
+<e921>921
+<e922>922
+<e923>923
+<e924>924
+<e925>925
+<e926>926
+<e927>927
+<e928>928
+<e929>929
+<e930>930
+<e931>931
+<e932>932
+<e933>933
+<e934>934
+<e935>935
+<e936>936
+<e937>937
+<e938>938
+<e939>939
+<e940>940
+<e941>941
+<e942>942
+<e943>943
+<e944>944
+<e945>945
+<e946>946
+<e947>947
+<e948>948
+<e949>949
+<e950>950
+<e951>951
+<e952>952
+<e953>953
+<e954>954
+<e955>955
+<e956>956
+<e957>957
+<e958>958
+<e959>959
+<e960>960
+<e961>961
+<e962>962
+<e963>963
+<e964>964
+<e965>965
+<e966>966
+<e967>967
+<e968>968
+<e969>969
+<e970>970
+<e971>971
+<e972>972
+<e973>973
+<e974>974
+<e975>975
+<e976>976
+<e977>977
+<e978>978
+<e979>979
+<e980>980
+<e981>981
+<e982>982
+<e983>983
+<e984>984
+<e985>985
+<e986>986
+<e987>987
+<e988>988
+<e989>989
+<e990>990
+<e991>991
+<e992>992
+<e993>993
+<e994>994
+<e995>995
+<e996>996
+<e997>997
+<e998>998
+<e999>999
+<e1000>1000</e1000>
+</e999>
+</e998>
+</e997>
+</e996>
+</e995>
+</e994>
+</e993>
+</e992>
+</e991>
+</e990>
+</e989>
+</e988>
+</e987>
+</e986>
+</e985>
+</e984>
+</e983>
+</e982>
+</e981>
+</e980>
+</e979>
+</e978>
+</e977>
+</e976>
+</e975>
+</e974>
+</e973>
+</e972>
+</e971>
+</e970>
+</e969>
+</e968>
+</e967>
+</e966>
+</e965>
+</e964>
+</e963>
+</e962>
+</e961>
+</e960>
+</e959>
+</e958>
+</e957>
+</e956>
+</e955>
+</e954>
+</e953>
+</e952>
+</e951>
+</e950>
+</e949>
+</e948>
+</e947>
+</e946>
+</e945>
+</e944>
+</e943>
+</e942>
+</e941>
+</e940>
+</e939>
+</e938>
+</e937>
+</e936>
+</e935>
+</e934>
+</e933>
+</e932>
+</e931>
+</e930>
+</e929>
+</e928>
+</e927>
+</e926>
+</e925>
+</e924>
+</e923>
+</e922>
+</e921>
+</e920>
+</e919>
+</e918>
+</e917>
+</e916>
+</e915>
+</e914>
+</e913>
+</e912>
+</e911>
+</e910>
+</e909>
+</e908>
+</e907>
+</e906>
+</e905>
+</e904>
+</e903>
+</e902>
+</e901>
+</e900>
+</e899>
+</e898>
+</e897>
+</e896>
+</e895>
+</e894>
+</e893>
+</e892>
+</e891>
+</e890>
+</e889>
+</e888>
+</e887>
+</e886>
+</e885>
+</e884>
+</e883>
+</e882>
+</e881>
+</e880>
+</e879>
+</e878>
+</e877>
+</e876>
+</e875>
+</e874>
+</e873>
+</e872>
+</e871>
+</e870>
+</e869>
+</e868>
+</e867>
+</e866>
+</e865>
+</e864>
+</e863>
+</e862>
+</e861>
+</e860>
+</e859>
+</e858>
+</e857>
+</e856>
+</e855>
+</e854>
+</e853>
+</e852>
+</e851>
+</e850>
+</e849>
+</e848>
+</e847>
+</e846>
+</e845>
+</e844>
+</e843>
+</e842>
+</e841>
+</e840>
+</e839>
+</e838>
+</e837>
+</e836>
+</e835>
+</e834>
+</e833>
+</e832>
+</e831>
+</e830>
+</e829>
+</e828>
+</e827>
+</e826>
+</e825>
+</e824>
+</e823>
+</e822>
+</e821>
+</e820>
+</e819>
+</e818>
+</e817>
+</e816>
+</e815>
+</e814>
+</e813>
+</e812>
+</e811>
+</e810>
+</e809>
+</e808>
+</e807>
+</e806>
+</e805>
+</e804>
+</e803>
+</e802>
+</e801>
+</e800>
+</e799>
+</e798>
+</e797>
+</e796>
+</e795>
+</e794>
+</e793>
+</e792>
+</e791>
+</e790>
+</e789>
+</e788>
+</e787>
+</e786>
+</e785>
+</e784>
+</e783>
+</e782>
+</e781>
+</e780>
+</e779>
+</e778>
+</e777>
+</e776>
+</e775>
+</e774>
+</e773>
+</e772>
+</e771>
+</e770>
+</e769>
+</e768>
+</e767>
+</e766>
+</e765>
+</e764>
+</e763>
+</e762>
+</e761>
+</e760>
+</e759>
+</e758>
+</e757>
+</e756>
+</e755>
+</e754>
+</e753>
+</e752>
+</e751>
+</e750>
+</e749>
+</e748>
+</e747>
+</e746>
+</e745>
+</e744>
+</e743>
+</e742>
+</e741>
+</e740>
+</e739>
+</e738>
+</e737>
+</e736>
+</e735>
+</e734>
+</e733>
+</e732>
+</e731>
+</e730>
+</e729>
+</e728>
+</e727>
+</e726>
+</e725>
+</e724>
+</e723>
+</e722>
+</e721>
+</e720>
+</e719>
+</e718>
+</e717>
+</e716>
+</e715>
+</e714>
+</e713>
+</e712>
+</e711>
+</e710>
+</e709>
+</e708>
+</e707>
+</e706>
+</e705>
+</e704>
+</e703>
+</e702>
+</e701>
+</e700>
+</e699>
+</e698>
+</e697>
+</e696>
+</e695>
+</e694>
+</e693>
+</e692>
+</e691>
+</e690>
+</e689>
+</e688>
+</e687>
+</e686>
+</e685>
+</e684>
+</e683>
+</e682>
+</e681>
+</e680>
+</e679>
+</e678>
+</e677>
+</e676>
+</e675>
+</e674>
+</e673>
+</e672>
+</e671>
+</e670>
+</e669>
+</e668>
+</e667>
+</e666>
+</e665>
+</e664>
+</e663>
+</e662>
+</e661>
+</e660>
+</e659>
+</e658>
+</e657>
+</e656>
+</e655>
+</e654>
+</e653>
+</e652>
+</e651>
+</e650>
+</e649>
+</e648>
+</e647>
+</e646>
+</e645>
+</e644>
+</e643>
+</e642>
+</e641>
+</e640>
+</e639>
+</e638>
+</e637>
+</e636>
+</e635>
+</e634>
+</e633>
+</e632>
+</e631>
+</e630>
+</e629>
+</e628>
+</e627>
+</e626>
+</e625>
+</e624>
+</e623>
+</e622>
+</e621>
+</e620>
+</e619>
+</e618>
+</e617>
+</e616>
+</e615>
+</e614>
+</e613>
+</e612>
+</e611>
+</e610>
+</e609>
+</e608>
+</e607>
+</e606>
+</e605>
+</e604>
+</e603>
+</e602>
+</e601>
+</e600>
+</e599>
+</e598>
+</e597>
+</e596>
+</e595>
+</e594>
+</e593>
+</e592>
+</e591>
+</e590>
+</e589>
+</e588>
+</e587>
+</e586>
+</e585>
+</e584>
+</e583>
+</e582>
+</e581>
+</e580>
+</e579>
+</e578>
+</e577>
+</e576>
+</e575>
+</e574>
+</e573>
+</e572>
+</e571>
+</e570>
+</e569>
+</e568>
+</e567>
+</e566>
+</e565>
+</e564>
+</e563>
+</e562>
+</e561>
+</e560>
+</e559>
+</e558>
+</e557>
+</e556>
+</e555>
+</e554>
+</e553>
+</e552>
+</e551>
+</e550>
+</e549>
+</e548>
+</e547>
+</e546>
+</e545>
+</e544>
+</e543>
+</e542>
+</e541>
+</e540>
+</e539>
+</e538>
+</e537>
+</e536>
+</e535>
+</e534>
+</e533>
+</e532>
+</e531>
+</e530>
+</e529>
+</e528>
+</e527>
+</e526>
+</e525>
+</e524>
+</e523>
+</e522>
+</e521>
+</e520>
+</e519>
+</e518>
+</e517>
+</e516>
+</e515>
+</e514>
+</e513>
+</e512>
+</e511>
+</e510>
+</e509>
+</e508>
+</e507>
+</e506>
+</e505>
+</e504>
+</e503>
+</e502>
+</e501>
+</e500>
+</e499>
+</e498>
+</e497>
+</e496>
+</e495>
+</e494>
+</e493>
+</e492>
+</e491>
+</e490>
+</e489>
+</e488>
+</e487>
+</e486>
+</e485>
+</e484>
+</e483>
+</e482>
+</e481>
+</e480>
+</e479>
+</e478>
+</e477>
+</e476>
+</e475>
+</e474>
+</e473>
+</e472>
+</e471>
+</e470>
+</e469>
+</e468>
+</e467>
+</e466>
+</e465>
+</e464>
+</e463>
+</e462>
+</e461>
+</e460>
+</e459>
+</e458>
+</e457>
+</e456>
+</e455>
+</e454>
+</e453>
+</e452>
+</e451>
+</e450>
+</e449>
+</e448>
+</e447>
+</e446>
+</e445>
+</e444>
+</e443>
+</e442>
+</e441>
+</e440>
+</e439>
+</e438>
+</e437>
+</e436>
+</e435>
+</e434>
+</e433>
+</e432>
+</e431>
+</e430>
+</e429>
+</e428>
+</e427>
+</e426>
+</e425>
+</e424>
+</e423>
+</e422>
+</e421>
+</e420>
+</e419>
+</e418>
+</e417>
+</e416>
+</e415>
+</e414>
+</e413>
+</e412>
+</e411>
+</e410>
+</e409>
+</e408>
+</e407>
+</e406>
+</e405>
+</e404>
+</e403>
+</e402>
+</e401>
+</e400>
+</e399>
+</e398>
+</e397>
+</e396>
+</e395>
+</e394>
+</e393>
+</e392>
+</e391>
+</e390>
+</e389>
+</e388>
+</e387>
+</e386>
+</e385>
+</e384>
+</e383>
+</e382>
+</e381>
+</e380>
+</e379>
+</e378>
+</e377>
+</e376>
+</e375>
+</e374>
+</e373>
+</e372>
+</e371>
+</e370>
+</e369>
+</e368>
+</e367>
+</e366>
+</e365>
+</e364>
+</e363>
+</e362>
+</e361>
+</e360>
+</e359>
+</e358>
+</e357>
+</e356>
+</e355>
+</e354>
+</e353>
+</e352>
+</e351>
+</e350>
+</e349>
+</e348>
+</e347>
+</e346>
+</e345>
+</e344>
+</e343>
+</e342>
+</e341>
+</e340>
+</e339>
+</e338>
+</e337>
+</e336>
+</e335>
+</e334>
+</e333>
+</e332>
+</e331>
+</e330>
+</e329>
+</e328>
+</e327>
+</e326>
+</e325>
+</e324>
+</e323>
+</e322>
+</e321>
+</e320>
+</e319>
+</e318>
+</e317>
+</e316>
+</e315>
+</e314>
+</e313>
+</e312>
+</e311>
+</e310>
+</e309>
+</e308>
+</e307>
+</e306>
+</e305>
+</e304>
+</e303>
+</e302>
+</e301>
+</e300>
+</e299>
+</e298>
+</e297>
+</e296>
+</e295>
+</e294>
+</e293>
+</e292>
+</e291>
+</e290>
+</e289>
+</e288>
+</e287>
+</e286>
+</e285>
+</e284>
+</e283>
+</e282>
+</e281>
+</e280>
+</e279>
+</e278>
+</e277>
+</e276>
+</e275>
+</e274>
+</e273>
+</e272>
+</e271>
+</e270>
+</e269>
+</e268>
+</e267>
+</e266>
+</e265>
+</e264>
+</e263>
+</e262>
+</e261>
+</e260>
+</e259>
+</e258>
+</e257>
+</e256>
+</e255>
+</e254>
+</e253>
+</e252>
+</e251>
+</e250>
+</e249>
+</e248>
+</e247>
+</e246>
+</e245>
+</e244>
+</e243>
+</e242>
+</e241>
+</e240>
+</e239>
+</e238>
+</e237>
+</e236>
+</e235>
+</e234>
+</e233>
+</e232>
+</e231>
+</e230>
+</e229>
+</e228>
+</e227>
+</e226>
+</e225>
+</e224>
+</e223>
+</e222>
+</e221>
+</e220>
+</e219>
+</e218>
+</e217>
+</e216>
+</e215>
+</e214>
+</e213>
+</e212>
+</e211>
+</e210>
+</e209>
+</e208>
+</e207>
+</e206>
+</e205>
+</e204>
+</e203>
+</e202>
+</e201>
+</e200>
+</e199>
+</e198>
+</e197>
+</e196>
+</e195>
+</e194>
+</e193>
+</e192>
+</e191>
+</e190>
+</e189>
+</e188>
+</e187>
+</e186>
+</e185>
+</e184>
+</e183>
+</e182>
+</e181>
+</e180>
+</e179>
+</e178>
+</e177>
+</e176>
+</e175>
+</e174>
+</e173>
+</e172>
+</e171>
+</e170>
+</e169>
+</e168>
+</e167>
+</e166>
+</e165>
+</e164>
+</e163>
+</e162>
+</e161>
+</e160>
+</e159>
+</e158>
+</e157>
+</e156>
+</e155>
+</e154>
+</e153>
+</e152>
+</e151>
+</e150>
+</e149>
+</e148>
+</e147>
+</e146>
+</e145>
+</e144>
+</e143>
+</e142>
+</e141>
+</e140>
+</e139>
+</e138>
+</e137>
+</e136>
+</e135>
+</e134>
+</e133>
+</e132>
+</e131>
+</e130>
+</e129>
+</e128>
+</e127>
+</e126>
+</e125>
+</e124>
+</e123>
+</e122>
+</e121>
+</e120>
+</e119>
+</e118>
+</e117>
+</e116>
+</e115>
+</e114>
+</e113>
+</e112>
+</e111>
+</e110>
+</e109>
+</e108>
+</e107>
+</e106>
+</e105>
+</e104>
+</e103>
+</e102>
+</e101>
+</e100>
+</e99>
+</e98>
+</e97>
+</e96>
+</e95>
+</e94>
+</e93>
+</e92>
+</e91>
+</e90>
+</e89>
+</e88>
+</e87>
+</e86>
+</e85>
+</e84>
+</e83>
+</e82>
+</e81>
+</e80>
+</e79>
+</e78>
+</e77>
+</e76>
+</e75>
+</e74>
+</e73>
+</e72>
+</e71>
+</e70>
+</e69>
+</e68>
+</e67>
+</e66>
+</e65>
+</e64>
+</e63>
+</e62>
+</e61>
+</e60>
+</e59>
+</e58>
+</e57>
+</e56>
+</e55>
+</e54>
+</e53>
+</e52>
+</e51>
+</e50>
+</e49>
+</e48>
+</e47>
+</e46>
+</e45>
+</e44>
+</e43>
+</e42>
+</e41>
+</e40>
+</e39>
+</e38>
+</e37>
+</e36>
+</e35>
+</e34>
+</e33>
+</e32>
+</e31>
+</e30>
+</e29>
+</e28>
+</e27>
+</e26>
+</e25>
+</e24>
+</e23>
+</e22>
+</e21>
+</e20>
+</e19>
+</e18>
+</e17>
+</e16>
+</e15>
+</e14>
+</e13>
+</e12>
+</e11>
+</e10>
+</e9>
+</e8>
+</e7>
+</e6>
+</e5>
+</e4>
+</e3>
+</e2>
+</e1>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/elem25ktext.xml b/test/tests/perf/xtestdata/elem25ktext.xml
new file mode 100644
index 0000000..9f5dc05
--- /dev/null
+++ b/test/tests/perf/xtestdata/elem25ktext.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>1: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+2: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+3: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+4: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+5: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+6: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+7: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+8: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+9: 012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+10:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+11:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+12:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+13:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+14:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+15:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+16:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+17:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+18:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+19:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+20:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+21:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+22:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+23:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+24:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+25:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+26:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+27:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+28:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+29:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+30:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+31:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+32:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+33:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+34:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+35:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+36:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+37:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+38:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+39:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+40:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+41:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+42:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+43:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+44:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+45:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+46:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+47:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+48:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+49:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+50:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+51:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+52:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+53:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+54:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+55:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+56:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+57:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+58:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+59:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+60:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+61:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+62:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+63:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+64:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+65:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+66:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+67:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+68:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+69:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+70:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+71:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+72:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+73:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+74:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+75:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+76:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+77:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+78:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+79:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+80:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+81:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+82:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+83:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+84:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+85:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+86:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+87:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+88:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+89:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+90:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+91:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+92:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+93:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+94:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+95:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+96:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+97:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+98:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+99:012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+100012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+101012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+102012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+103012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+104012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+105012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+106012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+107012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+108012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+109012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+110012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+111012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+112012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+113012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+114012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+115012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+116012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+117012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+118012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+119012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+120012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+121012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+122012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+123012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+124012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+125012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+126012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+127012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+128012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+129012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+130012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+131012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+132012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+133012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+134012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+135012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+136012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+137012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+138012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+139012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+140012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+141012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+142012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+143012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+144012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+145012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+146012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+147012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+148012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+149012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+150012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+151012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+152012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+153012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+154012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+155012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+156012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+157012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+158012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+159012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+160012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+161012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+162012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+163012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+164012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+165012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+166012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+167012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+168012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+169012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+170012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+171012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+172012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+173012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+174012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+175012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+176012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+177012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+178012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+179012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+180012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+181012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+182012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+183012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+184012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+185012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+186012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+187012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+188012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+189012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+190012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+191012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+192012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+193012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+194012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+195012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+196012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+197012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+198012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+199012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+200012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+201012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+202012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+203012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+204012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+205012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+206012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+207012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+208012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+209012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+210012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+211012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+212012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+213012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+214012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+215012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+216012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+217012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+218012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+219012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+220012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+221012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+222012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+223012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+224012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+225012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+226012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+227012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+228012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+229012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+230012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+231012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+232012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+233012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+234012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+235012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+236012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+237012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+238012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+239012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+240012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+241012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+242012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+243012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+244012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+245012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+246012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+247012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+248012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+249012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+250012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/entree.xml b/test/tests/perf/xtestdata/entree.xml
new file mode 100644
index 0000000..801b3cc
--- /dev/null
+++ b/test/tests/perf/xtestdata/entree.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" standalone="yes"?>
+<ingredient-list>
+  <compound-ingredient name="seasoned cooked beef sirloin tips and modified food starch product">
+    <constituent>beef sirloin</constituent>
+    <constituent>water</constituent>
+    <constituent>dextrose</constituent>
+    <constituent>modified food starch</constituent>
+    <constituent>soy protein concentrate</constituent>
+    <compound-constituent name="beef flavor">
+      <constituent>beef</constituent>
+      <compound-constituent name="soy sauce">
+        <constituent>water</constituent>
+        <constituent>wheat</constituent>
+        <constituent>soybeans</constituent>
+        <constituent>salt</constituent>
+      </compound-constituent>
+      <constituent>flavoring</constituent>
+      <constituent>beef fat</constituent>
+      <constituent>salt</constituent>
+      <constituent>beef extract</constituent>
+      <constituent>disodium phosphate</constituent>
+      <constituent>onion powder</constituent>
+      <constituent>autolyzed yeast extract</constituent>
+      <constituent>disodium guanylate</constituent>
+      <constituent>disodium inosinate</constituent>
+      <constituent>propylene glycol</constituent>
+    </compound-constituent>
+    <constituent>salt</constituent>
+    <constituent>potassium chloride</constituent>
+    <constituent>potassium phosphates</constituent>
+    <constituent>caramel color</constituent>
+    <constituent>spice extractives</constituent>
+  </compound-ingredient>
+  <ingredient>water</ingredient>
+  <ingredient>rice</ingredient>
+  <compound-ingredient name="tomatoes in juice">
+    <contains reason="preservative">calcium chloride</contains>
+    <contains reason="preservative">citric acid</contains>
+  </compound-ingredient>
+  <ingredient>tomato paste</ingredient>
+  <ingredient>corn</ingredient>
+  <ingredient>light brown sugar</ingredient>
+  <ingredient>black beans</ingredient>
+  <ingredient>red beans</ingredient>
+  <MARKER note="2% or less of each following"/>
+  <ingredient>green peppers</ingredient>
+  <ingredient>onions</ingredient>
+  <compound-ingredient name="chicken base">
+    <constituent reason="flavor">chicken flavor</constituent>
+    <constituent>salt</constituent>
+    <constituent>dried whey</constituent>
+    <constituent>chicken fat</constituent>
+    <constituent>monosodium glutamate</constituent>
+    <constituent>sugar</constituent>
+    <constituent>flavorings</constituent>
+  </compound-ingredient>
+  <ingredient>scallions</ingredient>
+  <ingredient>garlic</ingredient>
+  <ingredient>red peppers</ingredient>
+  <ingredient>sugar</ingredient>
+  <ingredient>mesquite smoke flavor</ingredient>
+  <ingredient>molasses</ingredient>
+  <ingredient>spices</ingredient>
+  <compound-ingredient name="chipotle pepper flavor">
+    <constituent>maltodextrin</constituent>
+    <constituent>water</constituent>
+    <constituent>chipotle pepper</constituent>
+    <constituent>corn oil</constituent>
+    <constituent>garlic powder</constituent>
+    <constituent>onion powder</constituent>
+    <constituent>salt</constituent>
+    <constituent>spice</constituent>
+    <constituent>herb</constituent>
+    <constituent>tomato paste</constituent>
+    <constituent>vinegar</constituent>
+    <constituent>flavoring</constituent>
+  </compound-ingredient>
+  <ingredient>caramel color</ingredient>
+  <compound-ingredient name="chili powder">
+    <constituent>chili pepper</constituent>
+    <constituent>spices</constituent>
+    <constituent>salt</constituent>
+    <constituent>garlic powder</constituent>
+    <constituent>silicon dioxide</constituent>
+    <constituent>ethoxyquin</constituent>
+  </compound-ingredient>
+  <ingredient>modified food starch</ingredient>
+  <ingredient>salt</ingredient>
+  <ingredient>cider vinegar</ingredient>
+  <ingredient>flavoring</ingredient>
+  <compound-ingredient name="carmine color">
+    <constituent>sugar</constituent>
+    <constituent>carmine</constituent>
+    <constituent>gelatin</constituent>
+  </compound-ingredient>
+</ingredient-list>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/num1kordered.xml b/test/tests/perf/xtestdata/num1kordered.xml
new file mode 100644
index 0000000..5e7c851
--- /dev/null
+++ b/test/tests/perf/xtestdata/num1kordered.xml
@@ -0,0 +1,1003 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<e1>1</e1>
+<e2>2</e2>
+<e3>3</e3>
+<e4>4</e4>
+<e5>5</e5>
+<e6>6</e6>
+<e7>7</e7>
+<e8>8</e8>
+<e9>9</e9>
+<e10>10</e10>
+<e11>11</e11>
+<e12>12</e12>
+<e13>13</e13>
+<e14>14</e14>
+<e15>15</e15>
+<e16>16</e16>
+<e17>17</e17>
+<e18>18</e18>
+<e19>19</e19>
+<e20>20</e20>
+<e21>21</e21>
+<e22>22</e22>
+<e23>23</e23>
+<e24>24</e24>
+<e25>25</e25>
+<e26>26</e26>
+<e27>27</e27>
+<e28>28</e28>
+<e29>29</e29>
+<e30>30</e30>
+<e31>31</e31>
+<e32>32</e32>
+<e33>33</e33>
+<e34>34</e34>
+<e35>35</e35>
+<e36>36</e36>
+<e37>37</e37>
+<e38>38</e38>
+<e39>39</e39>
+<e40>40</e40>
+<e41>41</e41>
+<e42>42</e42>
+<e43>43</e43>
+<e44>44</e44>
+<e45>45</e45>
+<e46>46</e46>
+<e47>47</e47>
+<e48>48</e48>
+<e49>49</e49>
+<e50>50</e50>
+<e51>51</e51>
+<e52>52</e52>
+<e53>53</e53>
+<e54>54</e54>
+<e55>55</e55>
+<e56>56</e56>
+<e57>57</e57>
+<e58>58</e58>
+<e59>59</e59>
+<e60>60</e60>
+<e61>61</e61>
+<e62>62</e62>
+<e63>63</e63>
+<e64>64</e64>
+<e65>65</e65>
+<e66>66</e66>
+<e67>67</e67>
+<e68>68</e68>
+<e69>69</e69>
+<e70>70</e70>
+<e71>71</e71>
+<e72>72</e72>
+<e73>73</e73>
+<e74>74</e74>
+<e75>75</e75>
+<e76>76</e76>
+<e77>77</e77>
+<e78>78</e78>
+<e79>79</e79>
+<e80>80</e80>
+<e81>81</e81>
+<e82>82</e82>
+<e83>83</e83>
+<e84>84</e84>
+<e85>85</e85>
+<e86>86</e86>
+<e87>87</e87>
+<e88>88</e88>
+<e89>89</e89>
+<e90>90</e90>
+<e91>91</e91>
+<e92>92</e92>
+<e93>93</e93>
+<e94>94</e94>
+<e95>95</e95>
+<e96>96</e96>
+<e97>97</e97>
+<e98>98</e98>
+<e99>99</e99>
+<e100>100</e100>
+<e101>101</e101>
+<e102>102</e102>
+<e103>103</e103>
+<e104>104</e104>
+<e105>105</e105>
+<e106>106</e106>
+<e107>107</e107>
+<e108>108</e108>
+<e109>109</e109>
+<e110>110</e110>
+<e111>111</e111>
+<e112>112</e112>
+<e113>113</e113>
+<e114>114</e114>
+<e115>115</e115>
+<e116>116</e116>
+<e117>117</e117>
+<e118>118</e118>
+<e119>119</e119>
+<e120>120</e120>
+<e121>121</e121>
+<e122>122</e122>
+<e123>123</e123>
+<e124>124</e124>
+<e125>125</e125>
+<e126>126</e126>
+<e127>127</e127>
+<e128>128</e128>
+<e129>129</e129>
+<e130>130</e130>
+<e131>131</e131>
+<e132>132</e132>
+<e133>133</e133>
+<e134>134</e134>
+<e135>135</e135>
+<e136>136</e136>
+<e137>137</e137>
+<e138>138</e138>
+<e139>139</e139>
+<e140>140</e140>
+<e141>141</e141>
+<e142>142</e142>
+<e143>143</e143>
+<e144>144</e144>
+<e145>145</e145>
+<e146>146</e146>
+<e147>147</e147>
+<e148>148</e148>
+<e149>149</e149>
+<e150>150</e150>
+<e151>151</e151>
+<e152>152</e152>
+<e153>153</e153>
+<e154>154</e154>
+<e155>155</e155>
+<e156>156</e156>
+<e157>157</e157>
+<e158>158</e158>
+<e159>159</e159>
+<e160>160</e160>
+<e161>161</e161>
+<e162>162</e162>
+<e163>163</e163>
+<e164>164</e164>
+<e165>165</e165>
+<e166>166</e166>
+<e167>167</e167>
+<e168>168</e168>
+<e169>169</e169>
+<e170>170</e170>
+<e171>171</e171>
+<e172>172</e172>
+<e173>173</e173>
+<e174>174</e174>
+<e175>175</e175>
+<e176>176</e176>
+<e177>177</e177>
+<e178>178</e178>
+<e179>179</e179>
+<e180>180</e180>
+<e181>181</e181>
+<e182>182</e182>
+<e183>183</e183>
+<e184>184</e184>
+<e185>185</e185>
+<e186>186</e186>
+<e187>187</e187>
+<e188>188</e188>
+<e189>189</e189>
+<e190>190</e190>
+<e191>191</e191>
+<e192>192</e192>
+<e193>193</e193>
+<e194>194</e194>
+<e195>195</e195>
+<e196>196</e196>
+<e197>197</e197>
+<e198>198</e198>
+<e199>199</e199>
+<e200>200</e200>
+<e201>201</e201>
+<e202>202</e202>
+<e203>203</e203>
+<e204>204</e204>
+<e205>205</e205>
+<e206>206</e206>
+<e207>207</e207>
+<e208>208</e208>
+<e209>209</e209>
+<e210>210</e210>
+<e211>211</e211>
+<e212>212</e212>
+<e213>213</e213>
+<e214>214</e214>
+<e215>215</e215>
+<e216>216</e216>
+<e217>217</e217>
+<e218>218</e218>
+<e219>219</e219>
+<e220>220</e220>
+<e221>221</e221>
+<e222>222</e222>
+<e223>223</e223>
+<e224>224</e224>
+<e225>225</e225>
+<e226>226</e226>
+<e227>227</e227>
+<e228>228</e228>
+<e229>229</e229>
+<e230>230</e230>
+<e231>231</e231>
+<e232>232</e232>
+<e233>233</e233>
+<e234>234</e234>
+<e235>235</e235>
+<e236>236</e236>
+<e237>237</e237>
+<e238>238</e238>
+<e239>239</e239>
+<e240>240</e240>
+<e241>241</e241>
+<e242>242</e242>
+<e243>243</e243>
+<e244>244</e244>
+<e245>245</e245>
+<e246>246</e246>
+<e247>247</e247>
+<e248>248</e248>
+<e249>249</e249>
+<e250>250</e250>
+<e251>251</e251>
+<e252>252</e252>
+<e253>253</e253>
+<e254>254</e254>
+<e255>255</e255>
+<e256>256</e256>
+<e257>257</e257>
+<e258>258</e258>
+<e259>259</e259>
+<e260>260</e260>
+<e261>261</e261>
+<e262>262</e262>
+<e263>263</e263>
+<e264>264</e264>
+<e265>265</e265>
+<e266>266</e266>
+<e267>267</e267>
+<e268>268</e268>
+<e269>269</e269>
+<e270>270</e270>
+<e271>271</e271>
+<e272>272</e272>
+<e273>273</e273>
+<e274>274</e274>
+<e275>275</e275>
+<e276>276</e276>
+<e277>277</e277>
+<e278>278</e278>
+<e279>279</e279>
+<e280>280</e280>
+<e281>281</e281>
+<e282>282</e282>
+<e283>283</e283>
+<e284>284</e284>
+<e285>285</e285>
+<e286>286</e286>
+<e287>287</e287>
+<e288>288</e288>
+<e289>289</e289>
+<e290>290</e290>
+<e291>291</e291>
+<e292>292</e292>
+<e293>293</e293>
+<e294>294</e294>
+<e295>295</e295>
+<e296>296</e296>
+<e297>297</e297>
+<e298>298</e298>
+<e299>299</e299>
+<e300>300</e300>
+<e301>301</e301>
+<e302>302</e302>
+<e303>303</e303>
+<e304>304</e304>
+<e305>305</e305>
+<e306>306</e306>
+<e307>307</e307>
+<e308>308</e308>
+<e309>309</e309>
+<e310>310</e310>
+<e311>311</e311>
+<e312>312</e312>
+<e313>313</e313>
+<e314>314</e314>
+<e315>315</e315>
+<e316>316</e316>
+<e317>317</e317>
+<e318>318</e318>
+<e319>319</e319>
+<e320>320</e320>
+<e321>321</e321>
+<e322>322</e322>
+<e323>323</e323>
+<e324>324</e324>
+<e325>325</e325>
+<e326>326</e326>
+<e327>327</e327>
+<e328>328</e328>
+<e329>329</e329>
+<e330>330</e330>
+<e331>331</e331>
+<e332>332</e332>
+<e333>333</e333>
+<e334>334</e334>
+<e335>335</e335>
+<e336>336</e336>
+<e337>337</e337>
+<e338>338</e338>
+<e339>339</e339>
+<e340>340</e340>
+<e341>341</e341>
+<e342>342</e342>
+<e343>343</e343>
+<e344>344</e344>
+<e345>345</e345>
+<e346>346</e346>
+<e347>347</e347>
+<e348>348</e348>
+<e349>349</e349>
+<e350>350</e350>
+<e351>351</e351>
+<e352>352</e352>
+<e353>353</e353>
+<e354>354</e354>
+<e355>355</e355>
+<e356>356</e356>
+<e357>357</e357>
+<e358>358</e358>
+<e359>359</e359>
+<e360>360</e360>
+<e361>361</e361>
+<e362>362</e362>
+<e363>363</e363>
+<e364>364</e364>
+<e365>365</e365>
+<e366>366</e366>
+<e367>367</e367>
+<e368>368</e368>
+<e369>369</e369>
+<e370>370</e370>
+<e371>371</e371>
+<e372>372</e372>
+<e373>373</e373>
+<e374>374</e374>
+<e375>375</e375>
+<e376>376</e376>
+<e377>377</e377>
+<e378>378</e378>
+<e379>379</e379>
+<e380>380</e380>
+<e381>381</e381>
+<e382>382</e382>
+<e383>383</e383>
+<e384>384</e384>
+<e385>385</e385>
+<e386>386</e386>
+<e387>387</e387>
+<e388>388</e388>
+<e389>389</e389>
+<e390>390</e390>
+<e391>391</e391>
+<e392>392</e392>
+<e393>393</e393>
+<e394>394</e394>
+<e395>395</e395>
+<e396>396</e396>
+<e397>397</e397>
+<e398>398</e398>
+<e399>399</e399>
+<e400>400</e400>
+<e401>401</e401>
+<e402>402</e402>
+<e403>403</e403>
+<e404>404</e404>
+<e405>405</e405>
+<e406>406</e406>
+<e407>407</e407>
+<e408>408</e408>
+<e409>409</e409>
+<e410>410</e410>
+<e411>411</e411>
+<e412>412</e412>
+<e413>413</e413>
+<e414>414</e414>
+<e415>415</e415>
+<e416>416</e416>
+<e417>417</e417>
+<e418>418</e418>
+<e419>419</e419>
+<e420>420</e420>
+<e421>421</e421>
+<e422>422</e422>
+<e423>423</e423>
+<e424>424</e424>
+<e425>425</e425>
+<e426>426</e426>
+<e427>427</e427>
+<e428>428</e428>
+<e429>429</e429>
+<e430>430</e430>
+<e431>431</e431>
+<e432>432</e432>
+<e433>433</e433>
+<e434>434</e434>
+<e435>435</e435>
+<e436>436</e436>
+<e437>437</e437>
+<e438>438</e438>
+<e439>439</e439>
+<e440>440</e440>
+<e441>441</e441>
+<e442>442</e442>
+<e443>443</e443>
+<e444>444</e444>
+<e445>445</e445>
+<e446>446</e446>
+<e447>447</e447>
+<e448>448</e448>
+<e449>449</e449>
+<e450>450</e450>
+<e451>451</e451>
+<e452>452</e452>
+<e453>453</e453>
+<e454>454</e454>
+<e455>455</e455>
+<e456>456</e456>
+<e457>457</e457>
+<e458>458</e458>
+<e459>459</e459>
+<e460>460</e460>
+<e461>461</e461>
+<e462>462</e462>
+<e463>463</e463>
+<e464>464</e464>
+<e465>465</e465>
+<e466>466</e466>
+<e467>467</e467>
+<e468>468</e468>
+<e469>469</e469>
+<e470>470</e470>
+<e471>471</e471>
+<e472>472</e472>
+<e473>473</e473>
+<e474>474</e474>
+<e475>475</e475>
+<e476>476</e476>
+<e477>477</e477>
+<e478>478</e478>
+<e479>479</e479>
+<e480>480</e480>
+<e481>481</e481>
+<e482>482</e482>
+<e483>483</e483>
+<e484>484</e484>
+<e485>485</e485>
+<e486>486</e486>
+<e487>487</e487>
+<e488>488</e488>
+<e489>489</e489>
+<e490>490</e490>
+<e491>491</e491>
+<e492>492</e492>
+<e493>493</e493>
+<e494>494</e494>
+<e495>495</e495>
+<e496>496</e496>
+<e497>497</e497>
+<e498>498</e498>
+<e499>499</e499>
+<e500>500</e500>
+<e501>501</e501>
+<e502>502</e502>
+<e503>503</e503>
+<e504>504</e504>
+<e505>505</e505>
+<e506>506</e506>
+<e507>507</e507>
+<e508>508</e508>
+<e509>509</e509>
+<e510>510</e510>
+<e511>511</e511>
+<e512>512</e512>
+<e513>513</e513>
+<e514>514</e514>
+<e515>515</e515>
+<e516>516</e516>
+<e517>517</e517>
+<e518>518</e518>
+<e519>519</e519>
+<e520>520</e520>
+<e521>521</e521>
+<e522>522</e522>
+<e523>523</e523>
+<e524>524</e524>
+<e525>525</e525>
+<e526>526</e526>
+<e527>527</e527>
+<e528>528</e528>
+<e529>529</e529>
+<e530>530</e530>
+<e531>531</e531>
+<e532>532</e532>
+<e533>533</e533>
+<e534>534</e534>
+<e535>535</e535>
+<e536>536</e536>
+<e537>537</e537>
+<e538>538</e538>
+<e539>539</e539>
+<e540>540</e540>
+<e541>541</e541>
+<e542>542</e542>
+<e543>543</e543>
+<e544>544</e544>
+<e545>545</e545>
+<e546>546</e546>
+<e547>547</e547>
+<e548>548</e548>
+<e549>549</e549>
+<e550>550</e550>
+<e551>551</e551>
+<e552>552</e552>
+<e553>553</e553>
+<e554>554</e554>
+<e555>555</e555>
+<e556>556</e556>
+<e557>557</e557>
+<e558>558</e558>
+<e559>559</e559>
+<e560>560</e560>
+<e561>561</e561>
+<e562>562</e562>
+<e563>563</e563>
+<e564>564</e564>
+<e565>565</e565>
+<e566>566</e566>
+<e567>567</e567>
+<e568>568</e568>
+<e569>569</e569>
+<e570>570</e570>
+<e571>571</e571>
+<e572>572</e572>
+<e573>573</e573>
+<e574>574</e574>
+<e575>575</e575>
+<e576>576</e576>
+<e577>577</e577>
+<e578>578</e578>
+<e579>579</e579>
+<e580>580</e580>
+<e581>581</e581>
+<e582>582</e582>
+<e583>583</e583>
+<e584>584</e584>
+<e585>585</e585>
+<e586>586</e586>
+<e587>587</e587>
+<e588>588</e588>
+<e589>589</e589>
+<e590>590</e590>
+<e591>591</e591>
+<e592>592</e592>
+<e593>593</e593>
+<e594>594</e594>
+<e595>595</e595>
+<e596>596</e596>
+<e597>597</e597>
+<e598>598</e598>
+<e599>599</e599>
+<e600>600</e600>
+<e601>601</e601>
+<e602>602</e602>
+<e603>603</e603>
+<e604>604</e604>
+<e605>605</e605>
+<e606>606</e606>
+<e607>607</e607>
+<e608>608</e608>
+<e609>609</e609>
+<e610>610</e610>
+<e611>611</e611>
+<e612>612</e612>
+<e613>613</e613>
+<e614>614</e614>
+<e615>615</e615>
+<e616>616</e616>
+<e617>617</e617>
+<e618>618</e618>
+<e619>619</e619>
+<e620>620</e620>
+<e621>621</e621>
+<e622>622</e622>
+<e623>623</e623>
+<e624>624</e624>
+<e625>625</e625>
+<e626>626</e626>
+<e627>627</e627>
+<e628>628</e628>
+<e629>629</e629>
+<e630>630</e630>
+<e631>631</e631>
+<e632>632</e632>
+<e633>633</e633>
+<e634>634</e634>
+<e635>635</e635>
+<e636>636</e636>
+<e637>637</e637>
+<e638>638</e638>
+<e639>639</e639>
+<e640>640</e640>
+<e641>641</e641>
+<e642>642</e642>
+<e643>643</e643>
+<e644>644</e644>
+<e645>645</e645>
+<e646>646</e646>
+<e647>647</e647>
+<e648>648</e648>
+<e649>649</e649>
+<e650>650</e650>
+<e651>651</e651>
+<e652>652</e652>
+<e653>653</e653>
+<e654>654</e654>
+<e655>655</e655>
+<e656>656</e656>
+<e657>657</e657>
+<e658>658</e658>
+<e659>659</e659>
+<e660>660</e660>
+<e661>661</e661>
+<e662>662</e662>
+<e663>663</e663>
+<e664>664</e664>
+<e665>665</e665>
+<e666>666</e666>
+<e667>667</e667>
+<e668>668</e668>
+<e669>669</e669>
+<e670>670</e670>
+<e671>671</e671>
+<e672>672</e672>
+<e673>673</e673>
+<e674>674</e674>
+<e675>675</e675>
+<e676>676</e676>
+<e677>677</e677>
+<e678>678</e678>
+<e679>679</e679>
+<e680>680</e680>
+<e681>681</e681>
+<e682>682</e682>
+<e683>683</e683>
+<e684>684</e684>
+<e685>685</e685>
+<e686>686</e686>
+<e687>687</e687>
+<e688>688</e688>
+<e689>689</e689>
+<e690>690</e690>
+<e691>691</e691>
+<e692>692</e692>
+<e693>693</e693>
+<e694>694</e694>
+<e695>695</e695>
+<e696>696</e696>
+<e697>697</e697>
+<e698>698</e698>
+<e699>699</e699>
+<e700>700</e700>
+<e701>701</e701>
+<e702>702</e702>
+<e703>703</e703>
+<e704>704</e704>
+<e705>705</e705>
+<e706>706</e706>
+<e707>707</e707>
+<e708>708</e708>
+<e709>709</e709>
+<e710>710</e710>
+<e711>711</e711>
+<e712>712</e712>
+<e713>713</e713>
+<e714>714</e714>
+<e715>715</e715>
+<e716>716</e716>
+<e717>717</e717>
+<e718>718</e718>
+<e719>719</e719>
+<e720>720</e720>
+<e721>721</e721>
+<e722>722</e722>
+<e723>723</e723>
+<e724>724</e724>
+<e725>725</e725>
+<e726>726</e726>
+<e727>727</e727>
+<e728>728</e728>
+<e729>729</e729>
+<e730>730</e730>
+<e731>731</e731>
+<e732>732</e732>
+<e733>733</e733>
+<e734>734</e734>
+<e735>735</e735>
+<e736>736</e736>
+<e737>737</e737>
+<e738>738</e738>
+<e739>739</e739>
+<e740>740</e740>
+<e741>741</e741>
+<e742>742</e742>
+<e743>743</e743>
+<e744>744</e744>
+<e745>745</e745>
+<e746>746</e746>
+<e747>747</e747>
+<e748>748</e748>
+<e749>749</e749>
+<e750>750</e750>
+<e751>751</e751>
+<e752>752</e752>
+<e753>753</e753>
+<e754>754</e754>
+<e755>755</e755>
+<e756>756</e756>
+<e757>757</e757>
+<e758>758</e758>
+<e759>759</e759>
+<e760>760</e760>
+<e761>761</e761>
+<e762>762</e762>
+<e763>763</e763>
+<e764>764</e764>
+<e765>765</e765>
+<e766>766</e766>
+<e767>767</e767>
+<e768>768</e768>
+<e769>769</e769>
+<e770>770</e770>
+<e771>771</e771>
+<e772>772</e772>
+<e773>773</e773>
+<e774>774</e774>
+<e775>775</e775>
+<e776>776</e776>
+<e777>777</e777>
+<e778>778</e778>
+<e779>779</e779>
+<e780>780</e780>
+<e781>781</e781>
+<e782>782</e782>
+<e783>783</e783>
+<e784>784</e784>
+<e785>785</e785>
+<e786>786</e786>
+<e787>787</e787>
+<e788>788</e788>
+<e789>789</e789>
+<e790>790</e790>
+<e791>791</e791>
+<e792>792</e792>
+<e793>793</e793>
+<e794>794</e794>
+<e795>795</e795>
+<e796>796</e796>
+<e797>797</e797>
+<e798>798</e798>
+<e799>799</e799>
+<e800>800</e800>
+<e801>801</e801>
+<e802>802</e802>
+<e803>803</e803>
+<e804>804</e804>
+<e805>805</e805>
+<e806>806</e806>
+<e807>807</e807>
+<e808>808</e808>
+<e809>809</e809>
+<e810>810</e810>
+<e811>811</e811>
+<e812>812</e812>
+<e813>813</e813>
+<e814>814</e814>
+<e815>815</e815>
+<e816>816</e816>
+<e817>817</e817>
+<e818>818</e818>
+<e819>819</e819>
+<e820>820</e820>
+<e821>821</e821>
+<e822>822</e822>
+<e823>823</e823>
+<e824>824</e824>
+<e825>825</e825>
+<e826>826</e826>
+<e827>827</e827>
+<e828>828</e828>
+<e829>829</e829>
+<e830>830</e830>
+<e831>831</e831>
+<e832>832</e832>
+<e833>833</e833>
+<e834>834</e834>
+<e835>835</e835>
+<e836>836</e836>
+<e837>837</e837>
+<e838>838</e838>
+<e839>839</e839>
+<e840>840</e840>
+<e841>841</e841>
+<e842>842</e842>
+<e843>843</e843>
+<e844>844</e844>
+<e845>845</e845>
+<e846>846</e846>
+<e847>847</e847>
+<e848>848</e848>
+<e849>849</e849>
+<e850>850</e850>
+<e851>851</e851>
+<e852>852</e852>
+<e853>853</e853>
+<e854>854</e854>
+<e855>855</e855>
+<e856>856</e856>
+<e857>857</e857>
+<e858>858</e858>
+<e859>859</e859>
+<e860>860</e860>
+<e861>861</e861>
+<e862>862</e862>
+<e863>863</e863>
+<e864>864</e864>
+<e865>865</e865>
+<e866>866</e866>
+<e867>867</e867>
+<e868>868</e868>
+<e869>869</e869>
+<e870>870</e870>
+<e871>871</e871>
+<e872>872</e872>
+<e873>873</e873>
+<e874>874</e874>
+<e875>875</e875>
+<e876>876</e876>
+<e877>877</e877>
+<e878>878</e878>
+<e879>879</e879>
+<e880>880</e880>
+<e881>881</e881>
+<e882>882</e882>
+<e883>883</e883>
+<e884>884</e884>
+<e885>885</e885>
+<e886>886</e886>
+<e887>887</e887>
+<e888>888</e888>
+<e889>889</e889>
+<e890>890</e890>
+<e891>891</e891>
+<e892>892</e892>
+<e893>893</e893>
+<e894>894</e894>
+<e895>895</e895>
+<e896>896</e896>
+<e897>897</e897>
+<e898>898</e898>
+<e899>899</e899>
+<e900>900</e900>
+<e901>901</e901>
+<e902>902</e902>
+<e903>903</e903>
+<e904>904</e904>
+<e905>905</e905>
+<e906>906</e906>
+<e907>907</e907>
+<e908>908</e908>
+<e909>909</e909>
+<e910>910</e910>
+<e911>911</e911>
+<e912>912</e912>
+<e913>913</e913>
+<e914>914</e914>
+<e915>915</e915>
+<e916>916</e916>
+<e917>917</e917>
+<e918>918</e918>
+<e919>919</e919>
+<e920>920</e920>
+<e921>921</e921>
+<e922>922</e922>
+<e923>923</e923>
+<e924>924</e924>
+<e925>925</e925>
+<e926>926</e926>
+<e927>927</e927>
+<e928>928</e928>
+<e929>929</e929>
+<e930>930</e930>
+<e931>931</e931>
+<e932>932</e932>
+<e933>933</e933>
+<e934>934</e934>
+<e935>935</e935>
+<e936>936</e936>
+<e937>937</e937>
+<e938>938</e938>
+<e939>939</e939>
+<e940>940</e940>
+<e941>941</e941>
+<e942>942</e942>
+<e943>943</e943>
+<e944>944</e944>
+<e945>945</e945>
+<e946>946</e946>
+<e947>947</e947>
+<e948>948</e948>
+<e949>949</e949>
+<e950>950</e950>
+<e951>951</e951>
+<e952>952</e952>
+<e953>953</e953>
+<e954>954</e954>
+<e955>955</e955>
+<e956>956</e956>
+<e957>957</e957>
+<e958>958</e958>
+<e959>959</e959>
+<e960>960</e960>
+<e961>961</e961>
+<e962>962</e962>
+<e963>963</e963>
+<e964>964</e964>
+<e965>965</e965>
+<e966>966</e966>
+<e967>967</e967>
+<e968>968</e968>
+<e969>969</e969>
+<e970>970</e970>
+<e971>971</e971>
+<e972>972</e972>
+<e973>973</e973>
+<e974>974</e974>
+<e975>975</e975>
+<e976>976</e976>
+<e977>977</e977>
+<e978>978</e978>
+<e979>979</e979>
+<e980>980</e980>
+<e981>981</e981>
+<e982>982</e982>
+<e983>983</e983>
+<e984>984</e984>
+<e985>985</e985>
+<e986>986</e986>
+<e987>987</e987>
+<e988>988</e988>
+<e989>989</e989>
+<e990>990</e990>
+<e991>991</e991>
+<e992>992</e992>
+<e993>993</e993>
+<e994>994</e994>
+<e995>995</e995>
+<e996>996</e996>
+<e997>997</e997>
+<e998>998</e998>
+<e999>999</e999>
+<e1000>1000</e1000>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/num1krandom.xml b/test/tests/perf/xtestdata/num1krandom.xml
new file mode 100644
index 0000000..4e11e76
--- /dev/null
+++ b/test/tests/perf/xtestdata/num1krandom.xml
@@ -0,0 +1,1002 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc><e1>605</e1>
+<e2>1195</e2>
+<e3>6125</e3>
+<e4>9035</e4>
+<e5>4365</e5>
+<e6>7375</e6>
+<e7>2885</e7>
+<e8>4551</e8>
+<e9>9824</e9>
+<e10>6325</e10>
+<e11>1070</e11>
+<e12>49</e12>
+<e13>3142</e13>
+<e14>8693</e14>
+<e15>5966</e15>
+<e16>2467</e16>
+<e17>2718</e17>
+<e18>7201</e18>
+<e19>4534</e19>
+<e20>9835</e20>
+<e21>6380</e21>
+<e22>1059</e22>
+<e23>152</e23>
+<e24>3623</e24>
+<e25>8976</e25>
+<e26>5477</e26>
+<e27>2448</e27>
+<e28>2791</e28>
+<e29>7264</e29>
+<e30>4565</e30>
+<e31>9810</e31>
+<e32>6309</e32>
+<e33>1002</e33>
+<e34>133</e34>
+<e35>3686</e35>
+<e36>8987</e36>
+<e37>5458</e37>
+<e38>5721</e38>
+<e39>2274</e39>
+<e40>7575</e40>
+<e41>4540</e41>
+<e42>9899</e42>
+<e43>6392</e43>
+<e44>1063</e44>
+<e45>116</e45>
+<e46>3617</e46>
+<e47>8908</e47>
+<e48>5431</e48>
+<e49>5784</e49>
+<e50>2285</e50>
+<e51>7550</e51>
+<e52>4829</e52>
+<e53>9322</e53>
+<e54>6073</e54>
+<e55>1046</e55>
+<e56>147</e56>
+<e57>3698</e57>
+<e58>8961</e58>
+<e59>5414</e59>
+<e60>5715</e60>
+<e61>2200</e61>
+<e62>7539</e62>
+<e63>4832</e63>
+<e64>9383</e64>
+<e65>6056</e65>
+<e66>1157</e66>
+<e67>628</e67>
+<e68>3971</e68>
+<e69>8944</e69>
+<e70>5445</e70>
+<e71>5790</e71>
+<e72>2269</e72>
+<e73>7562</e73>
+<e74>4813</e74>
+<e75>9306</e75>
+<e76>6007</e76>
+<e77>1138</e77>
+<e78>681</e78>
+<e79>3954</e79>
+<e80>8455</e80>
+<e81>8720</e81>
+<e82>5279</e82>
+<e83>2572</e83>
+<e84>7543</e84>
+<e85>4896</e85>
+<e86>9397</e86>
+<e87>6068</e87>
+<e88>1111</e88>
+<e89>604</e89>
+<e90>3905</e90>
+<e91>8430</e91>
+<e92>8789</e92>
+<e93>5282</e93>
+<e94>2553</e94>
+<e95>7826</e95>
+<e96>4327</e96>
+<e97>9078</e97>
+<e98>6041</e98>
+<e99>1194</e99>
+<e100>695</e100>
+<e101>3960</e101>
+<e102>8419</e102>
+<e103>8712</e103>
+<e104>5203</e104>
+<e105>2536</e105>
+<e106>7837</e106>
+<e107>4388</e107>
+<e108>9051</e108>
+<e109>6124</e109>
+<e110>1625</e110>
+<e111>970</e111>
+<e112>3949</e112>
+<e113>8442</e113>
+<e114>8793</e114>
+<e115>5266</e115>
+<e116>2567</e116>
+<e117>7818</e117>
+<e118>4301</e118>
+<e119>9034</e119>
+<e120>6135</e120>
+<e121>1680</e121>
+<e122>959</e122>
+<e123>3452</e123>
+<e124>3723</e124>
+<e125>8276</e125>
+<e126>5577</e126>
+<e127>2548</e127>
+<e128>7891</e128>
+<e129>4364</e129>
+<e130>9065</e130>
+<e131>6110</e131>
+<e132>1609</e132>
+<e133>902</e133>
+<e134>3433</e134>
+<e135>3786</e135>
+<e136>8287</e136>
+<e137>5558</e137>
+<e138>2821</e138>
+<e139>7374</e139>
+<e140>4075</e140>
+<e141>9040</e141>
+<e142>6199</e142>
+<e143>1692</e143>
+<e144>963</e144>
+<e145>3416</e145>
+<e146>3717</e146>
+<e147>8208</e147>
+<e148>5531</e148>
+<e149>2884</e149>
+<e150>7385</e150>
+<e151>4050</e151>
+<e152>9129</e152>
+<e153>6622</e153>
+<e154>1973</e154>
+<e155>946</e155>
+<e156>3447</e156>
+<e157>3798</e157>
+<e158>8261</e158>
+<e159>5514</e159>
+<e160>2815</e160>
+<e161>7300</e161>
+<e162>4039</e162>
+<e163>9132</e163>
+<e164>6683</e164>
+<e165>1956</e165>
+<e166>457</e166>
+<e167>728</e167>
+<e168>3271</e168>
+<e169>8244</e169>
+<e170>5545</e170>
+<e171>2890</e171>
+<e172>7369</e172>
+<e173>4062</e173>
+<e174>9113</e174>
+<e175>6606</e175>
+<e176>1907</e176>
+<e177>438</e177>
+<e178>781</e178>
+<e179>3254</e179>
+<e180>8555</e180>
+<e181>5820</e181>
+<e182>2379</e182>
+<e183>7072</e183>
+<e184>4043</e184>
+<e185>9196</e185>
+<e186>6697</e186>
+<e187>1968</e187>
+<e188>411</e188>
+<e189>704</e189>
+<e190>3205</e190>
+<e191>8530</e191>
+<e192>5889</e192>
+<e193>2382</e193>
+<e194>7053</e194>
+<e195>4126</e195>
+<e196>9627</e196>
+<e197>6978</e197>
+<e198>1941</e198>
+<e199>494</e199>
+<e200>795</e200>
+<e201>3260</e201>
+<e202>8519</e202>
+<e203>5812</e203>
+<e204>2303</e204>
+<e205>7036</e205>
+<e206>4137</e206>
+<e207>9688</e207>
+<e208>6951</e208>
+<e209>1424</e209>
+<e210>1725</e210>
+<e211>270</e211>
+<e212>3249</e212>
+<e213>8542</e213>
+<e214>5893</e214>
+<e215>2366</e215>
+<e216>7067</e216>
+<e217>4118</e217>
+<e218>9601</e218>
+<e219>6934</e219>
+<e220>1435</e220>
+<e221>1780</e221>
+<e222>259</e222>
+<e223>3552</e223>
+<e224>8823</e224>
+<e225>5376</e225>
+<e226>2077</e226>
+<e227>7048</e227>
+<e228>4191</e228>
+<e229>9664</e229>
+<e230>6965</e230>
+<e231>1410</e231>
+<e232>1709</e232>
+<e233>202</e233>
+<e234>3533</e234>
+<e235>8886</e235>
+<e236>5387</e236>
+<e237>2058</e237>
+<e238>7121</e238>
+<e239>4674</e239>
+<e240>9975</e240>
+<e241>6940</e241>
+<e242>1499</e242>
+<e243>1792</e243>
+<e244>263</e244>
+<e245>3516</e245>
+<e246>8817</e246>
+<e247>5308</e247>
+<e248>2031</e248>
+<e249>7184</e249>
+<e250>4685</e250>
+<e251>9950</e251>
+<e252>6429</e252>
+<e253>6722</e253>
+<e254>1273</e254>
+<e255>246</e255>
+<e256>3547</e256>
+<e257>8898</e257>
+<e258>5361</e258>
+<e259>2014</e259>
+<e260>7115</e260>
+<e261>4600</e261>
+<e262>9939</e262>
+<e263>6432</e263>
+<e264>6783</e264>
+<e265>1256</e265>
+<e266>557</e266>
+<e267>3828</e267>
+<e268>8371</e268>
+<e269>5344</e269>
+<e270>2045</e270>
+<e271>7190</e271>
+<e272>4669</e272>
+<e273>9962</e273>
+<e274>6413</e274>
+<e275>6706</e275>
+<e276>1207</e276>
+<e277>538</e277>
+<e278>3881</e278>
+<e279>8354</e279>
+<e280>5055</e280>
+<e281>2120</e281>
+<e282>7679</e282>
+<e283>4972</e283>
+<e284>9943</e284>
+<e285>6496</e285>
+<e286>6797</e286>
+<e287>1268</e287>
+<e288>511</e288>
+<e289>3804</e289>
+<e290>8305</e290>
+<e291>5030</e291>
+<e292>2189</e292>
+<e293>7682</e293>
+<e294>4953</e294>
+<e295>9426</e295>
+<e296>9727</e296>
+<e297>6278</e297>
+<e298>1241</e298>
+<e299>594</e299>
+<e300>3895</e300>
+<e301>8360</e301>
+<e302>5019</e302>
+<e303>2112</e303>
+<e304>7603</e304>
+<e305>4936</e305>
+<e306>9437</e306>
+<e307>9788</e307>
+<e308>6251</e308>
+<e309>1524</e309>
+<e310>825</e310>
+<e311>3370</e311>
+<e312>8349</e312>
+<e313>5042</e313>
+<e314>2193</e314>
+<e315>7666</e315>
+<e316>4967</e316>
+<e317>9418</e317>
+<e318>9701</e318>
+<e319>6234</e319>
+<e320>1535</e320>
+<e321>880</e321>
+<e322>3359</e322>
+<e323>8052</e323>
+<e324>5123</e324>
+<e325>2676</e325>
+<e326>7977</e326>
+<e327>4948</e327>
+<e328>9491</e328>
+<e329>9764</e329>
+<e330>6265</e330>
+<e331>1510</e331>
+<e332>809</e332>
+<e333>3302</e333>
+<e334>8033</e334>
+<e335>5186</e335>
+<e336>2687</e336>
+<e337>7958</e337>
+<e338>4421</e338>
+<e339>4774</e339>
+<e340>9275</e340>
+<e341>6240</e341>
+<e342>1599</e342>
+<e343>892</e343>
+<e344>3363</e344>
+<e345>8016</e345>
+<e346>5117</e346>
+<e347>2608</e347>
+<e348>7931</e348>
+<e349>4484</e349>
+<e350>4785</e350>
+<e351>9250</e351>
+<e352>6529</e352>
+<e353>1822</e353>
+<e354>373</e354>
+<e355>3346</e355>
+<e356>8047</e356>
+<e357>5198</e357>
+<e358>2661</e358>
+<e359>7914</e359>
+<e360>4415</e360>
+<e361>4700</e361>
+<e362>9239</e362>
+<e363>6532</e363>
+<e364>1883</e364>
+<e365>356</e365>
+<e366>3057</e366>
+<e367>8128</e367>
+<e368>5671</e368>
+<e369>2644</e369>
+<e370>7945</e370>
+<e371>4490</e371>
+<e372>4769</e372>
+<e373>9262</e373>
+<e374>6513</e374>
+<e375>1806</e375>
+<e376>307</e376>
+<e377>3038</e377>
+<e378>8181</e378>
+<e379>5654</e379>
+<e380>2955</e380>
+<e381>7420</e381>
+<e382>7779</e382>
+<e383>4272</e383>
+<e384>9243</e384>
+<e385>6596</e385>
+<e386>1897</e386>
+<e387>368</e387>
+<e388>3011</e388>
+<e389>8104</e389>
+<e390>5605</e390>
+<e391>2930</e391>
+<e392>7489</e392>
+<e393>7782</e393>
+<e394>4253</e394>
+<e395>9526</e395>
+<e396>6827</e396>
+<e397>1378</e397>
+<e398>341</e398>
+<e399>3094</e399>
+<e400>8195</e400>
+<e401>5660</e401>
+<e402>2919</e402>
+<e403>7412</e403>
+<e404>7703</e404>
+<e405>4236</e405>
+<e406>9537</e406>
+<e407>6888</e407>
+<e408>1351</e408>
+<e409>24</e409>
+<e410>3125</e410>
+<e411>8670</e411>
+<e412>5649</e412>
+<e413>2942</e413>
+<e414>7493</e414>
+<e415>7766</e415>
+<e416>4267</e416>
+<e417>9518</e417>
+<e418>6801</e418>
+<e419>1334</e419>
+<e420>35</e420>
+<e421>3180</e421>
+<e422>8659</e422>
+<e423>5952</e423>
+<e424>2423</e424>
+<e425>2776</e425>
+<e426>7277</e426>
+<e427>4248</e427>
+<e428>9591</e428>
+<e429>6864</e429>
+<e430>1365</e430>
+<e431>10</e431>
+<e432>3109</e432>
+<e433>8602</e433>
+<e434>5933</e434>
+<e435>2486</e435>
+<e436>2787</e436>
+<e437>7258</e437>
+<e438>4521</e438>
+<e439>9874</e439>
+<e440>6375</e440>
+<e441>1340</e441>
+<e442>99</e442>
+<e443>3192</e443>
+<e444>8663</e444>
+<e445>5916</e445>
+<e446>2417</e446>
+<e447>2708</e447>
+<e448>7231</e448>
+<e449>4584</e449>
+<e450>9885</e450>
+<e451>6350</e451>
+<e452>1029</e452>
+<e453>122</e453>
+<e454>3673</e454>
+<e455>8646</e455>
+<e456>5947</e456>
+<e457>2498</e457>
+<e458>2761</e458>
+<e459>7214</e459>
+<e460>4515</e460>
+<e461>9800</e461>
+<e462>6339</e462>
+<e463>1032</e463>
+<e464>183</e464>
+<e465>3656</e465>
+<e466>8957</e466>
+<e467>5428</e467>
+<e468>5771</e468>
+<e469>2744</e469>
+<e470>7245</e470>
+<e471>4590</e471>
+<e472>9869</e472>
+<e473>6362</e473>
+<e474>1013</e474>
+<e475>106</e475>
+<e476>3607</e476>
+<e477>8938</e477>
+<e478>5481</e478>
+<e479>5754</e479>
+<e480>2255</e480>
+<e481>7520</e481>
+<e482>4879</e482>
+<e483>9372</e483>
+<e484>6343</e484>
+<e485>1096</e485>
+<e486>197</e486>
+<e487>3668</e487>
+<e488>8911</e488>
+<e489>5404</e489>
+<e490>5705</e490>
+<e491>2230</e491>
+<e492>7589</e492>
+<e493>4882</e493>
+<e494>9353</e494>
+<e495>6026</e495>
+<e496>1127</e496>
+<e497>678</e497>
+<e498>3641</e498>
+<e499>8994</e499>
+<e500>5495</e500>
+<e501>5760</e501>
+<e502>2219</e502>
+<e503>7512</e503>
+<e504>4803</e504>
+<e505>9336</e505>
+<e506>6037</e506>
+<e507>1188</e507>
+<e508>651</e508>
+<e509>3924</e509>
+<e510>8425</e510>
+<e511>8770</e511>
+<e512>5749</e512>
+<e513>2242</e513>
+<e514>7593</e514>
+<e515>4866</e515>
+<e516>9367</e516>
+<e517>6018</e517>
+<e518>1101</e518>
+<e519>634</e519>
+<e520>3935</e520>
+<e521>8480</e521>
+<e522>8759</e522>
+<e523>5252</e523>
+<e524>2523</e524>
+<e525>7876</e525>
+<e526>4377</e526>
+<e527>9348</e527>
+<e528>6091</e528>
+<e529>1164</e529>
+<e530>665</e530>
+<e531>3910</e531>
+<e532>8409</e532>
+<e533>8702</e533>
+<e534>5233</e534>
+<e535>2586</e535>
+<e536>7887</e536>
+<e537>4358</e537>
+<e538>9021</e538>
+<e539>6174</e539>
+<e540>1675</e540>
+<e541>640</e541>
+<e542>3999</e542>
+<e543>8492</e543>
+<e544>8763</e544>
+<e545>5216</e545>
+<e546>2517</e546>
+<e547>7808</e547>
+<e548>4331</e548>
+<e549>9084</e549>
+<e550>6185</e550>
+<e551>1650</e551>
+<e552>929</e552>
+<e553>3422</e553>
+<e554>3773</e554>
+<e555>8746</e555>
+<e556>5247</e556>
+<e557>2598</e557>
+<e558>7861</e558>
+<e559>4314</e559>
+<e560>9015</e560>
+<e561>6100</e561>
+<e562>1639</e562>
+<e563>932</e563>
+<e564>3483</e564>
+<e565>3756</e565>
+<e566>8257</e566>
+<e567>5528</e567>
+<e568>2871</e568>
+<e569>7844</e569>
+<e570>4345</e570>
+<e571>9090</e571>
+<e572>6169</e572>
+<e573>1662</e573>
+<e574>913</e574>
+<e575>3406</e575>
+<e576>3707</e576>
+<e577>8238</e577>
+<e578>5581</e578>
+<e579>2854</e579>
+<e580>7355</e580>
+<e581>4020</e581>
+<e582>9179</e582>
+<e583>6672</e583>
+<e584>1643</e584>
+<e585>996</e585>
+<e586>3497</e586>
+<e587>3768</e587>
+<e588>8211</e588>
+<e589>5504</e589>
+<e590>2805</e590>
+<e591>7330</e591>
+<e592>4089</e592>
+<e593>9182</e593>
+<e594>6653</e594>
+<e595>1926</e595>
+<e596>427</e596>
+<e597>778</e597>
+<e598>3741</e598>
+<e599>8294</e599>
+<e600>5595</e600>
+<e601>2860</e601>
+<e602>7319</e602>
+<e603>4012</e603>
+<e604>9103</e604>
+<e605>6636</e605>
+<e606>1937</e606>
+<e607>488</e607>
+<e608>751</e608>
+<e609>3224</e609>
+<e610>8525</e610>
+<e611>5870</e611>
+<e612>2849</e612>
+<e613>7342</e613>
+<e614>4093</e614>
+<e615>9166</e615>
+<e616>6667</e616>
+<e617>1918</e617>
+<e618>401</e618>
+<e619>734</e619>
+<e620>3235</e620>
+<e621>8580</e621>
+<e622>5859</e622>
+<e623>2352</e623>
+<e624>7023</e624>
+<e625>4176</e625>
+<e626>9677</e626>
+<e627>6648</e627>
+<e628>1991</e628>
+<e629>464</e629>
+<e630>765</e630>
+<e631>3210</e631>
+<e632>8509</e632>
+<e633>5802</e633>
+<e634>2333</e634>
+<e635>7086</e635>
+<e636>4187</e636>
+<e637>9658</e637>
+<e638>6921</e638>
+<e639>1474</e639>
+<e640>1775</e640>
+<e641>740</e641>
+<e642>3299</e642>
+<e643>8592</e643>
+<e644>5863</e644>
+<e645>2316</e645>
+<e646>7017</e646>
+<e647>4108</e647>
+<e648>9631</e648>
+<e649>6984</e649>
+<e650>1485</e650>
+<e651>1750</e651>
+<e652>229</e652>
+<e653>3522</e653>
+<e654>8873</e654>
+<e655>5846</e655>
+<e656>2347</e656>
+<e657>7098</e657>
+<e658>4161</e658>
+<e659>9614</e659>
+<e660>6915</e660>
+<e661>1400</e661>
+<e662>1739</e662>
+<e663>232</e663>
+<e664>3583</e664>
+<e665>8856</e665>
+<e666>5357</e666>
+<e667>2028</e667>
+<e668>7171</e668>
+<e669>4144</e669>
+<e670>9645</e670>
+<e671>6990</e671>
+<e672>1469</e672>
+<e673>1762</e673>
+<e674>213</e674>
+<e675>3506</e675>
+<e676>8807</e676>
+<e677>5338</e677>
+<e678>2081</e678>
+<e679>7154</e679>
+<e680>4655</e680>
+<e681>9920</e681>
+<e682>6479</e682>
+<e683>6772</e683>
+<e684>1743</e684>
+<e685>296</e685>
+<e686>3597</e686>
+<e687>8868</e687>
+<e688>5311</e688>
+<e689>2004</e689>
+<e690>7105</e690>
+<e691>4630</e691>
+<e692>9989</e692>
+<e693>6482</e693>
+<e694>6753</e694>
+<e695>1226</e695>
+<e696>527</e696>
+<e697>3878</e697>
+<e698>8841</e698>
+<e699>5394</e699>
+<e700>2095</e700>
+<e701>7160</e701>
+<e702>4619</e702>
+<e703>9912</e703>
+<e704>6403</e704>
+<e705>6736</e705>
+<e706>1237</e706>
+<e707>588</e707>
+<e708>3851</e708>
+<e709>8324</e709>
+<e710>5025</e710>
+<e711>2170</e711>
+<e712>7149</e712>
+<e713>4642</e713>
+<e714>9993</e714>
+<e715>6466</e715>
+<e716>6767</e716>
+<e717>1218</e717>
+<e718>501</e718>
+<e719>3834</e719>
+<e720>8335</e720>
+<e721>5080</e721>
+<e722>2159</e722>
+<e723>7652</e723>
+<e724>4923</e724>
+<e725>9476</e725>
+<e726>9777</e726>
+<e727>6748</e727>
+<e728>1291</e728>
+<e729>564</e729>
+<e730>3865</e730>
+<e731>8310</e731>
+<e732>5009</e732>
+<e733>2102</e733>
+<e734>7633</e734>
+<e735>4986</e735>
+<e736>9487</e736>
+<e737>9758</e737>
+<e738>6221</e738>
+<e739>1574</e739>
+<e740>875</e740>
+<e741>3840</e741>
+<e742>8399</e742>
+<e743>5092</e743>
+<e744>2163</e744>
+<e745>7616</e745>
+<e746>4917</e746>
+<e747>9408</e747>
+<e748>9731</e748>
+<e749>6284</e749>
+<e750>1585</e750>
+<e751>850</e751>
+<e752>3329</e752>
+<e753>8022</e753>
+<e754>5173</e754>
+<e755>2146</e755>
+<e756>7647</e756>
+<e757>4998</e757>
+<e758>9461</e758>
+<e759>9714</e759>
+<e760>6215</e760>
+<e761>1500</e761>
+<e762>839</e762>
+<e763>3332</e763>
+<e764>8083</e764>
+<e765>5156</e765>
+<e766>2657</e766>
+<e767>7928</e767>
+<e768>4471</e768>
+<e769>9444</e769>
+<e770>9745</e770>
+<e771>6290</e771>
+<e772>1569</e772>
+<e773>862</e773>
+<e774>3313</e774>
+<e775>8006</e775>
+<e776>5107</e776>
+<e777>2638</e777>
+<e778>7981</e778>
+<e779>4454</e779>
+<e780>4755</e780>
+<e781>9220</e781>
+<e782>6579</e782>
+<e783>1872</e783>
+<e784>843</e784>
+<e785>3396</e785>
+<e786>8097</e786>
+<e787>5168</e787>
+<e788>2611</e788>
+<e789>7904</e789>
+<e790>4405</e790>
+<e791>4730</e791>
+<e792>9289</e792>
+<e793>6582</e793>
+<e794>1853</e794>
+<e795>326</e795>
+<e796>3027</e796>
+<e797>8178</e797>
+<e798>5141</e798>
+<e799>2694</e799>
+<e800>7995</e800>
+<e801>4460</e801>
+<e802>4719</e802>
+<e803>9212</e803>
+<e804>6503</e804>
+<e805>1836</e805>
+<e806>337</e806>
+<e807>3088</e807>
+<e808>8151</e808>
+<e809>5624</e809>
+<e810>2925</e810>
+<e811>7470</e811>
+<e812>4449</e812>
+<e813>4742</e813>
+<e814>9293</e814>
+<e815>6566</e815>
+<e816>1867</e816>
+<e817>318</e817>
+<e818>3001</e818>
+<e819>8134</e819>
+<e820>5635</e820>
+<e821>2980</e821>
+<e822>7459</e822>
+<e823>7752</e823>
+<e824>4223</e824>
+<e825>9576</e825>
+<e826>6877</e826>
+<e827>1848</e827>
+<e828>391</e828>
+<e829>3064</e829>
+<e830>8165</e830>
+<e831>5610</e831>
+<e832>2909</e832>
+<e833>7402</e833>
+<e834>7733</e834>
+<e835>4286</e835>
+<e836>9587</e836>
+<e837>6858</e837>
+<e838>1321</e838>
+<e839>74</e839>
+<e840>3175</e840>
+<e841>8140</e841>
+<e842>5699</e842>
+<e843>2992</e843>
+<e844>7463</e844>
+<e845>7716</e845>
+<e846>4217</e846>
+<e847>9508</e847>
+<e848>6831</e848>
+<e849>1384</e849>
+<e850>85</e850>
+<e851>3150</e851>
+<e852>8629</e852>
+<e853>5922</e853>
+<e854>2473</e854>
+<e855>7446</e855>
+<e856>7747</e856>
+<e857>4298</e857>
+<e858>9561</e858>
+<e859>6814</e859>
+<e860>1315</e860>
+<e861>0</e861>
+<e862>3139</e862>
+<e863>8632</e863>
+<e864>5983</e864>
+<e865>2456</e865>
+<e866>2757</e866>
+<e867>7228</e867>
+<e868>4571</e868>
+<e869>9544</e869>
+<e870>6845</e870>
+<e871>1390</e871>
+<e872>69</e872>
+<e873>3162</e873>
+<e874>8613</e874>
+<e875>5906</e875>
+<e876>2407</e876>
+<e877>2738</e877>
+<e878>7281</e878>
+<e879>4554</e879>
+<e880>9855</e880>
+<e881>6320</e881>
+<e882>1079</e882>
+<e883>172</e883>
+<e884>3143</e884>
+<e885>8696</e885>
+<e886>5997</e886>
+<e887>2468</e887>
+<e888>2711</e888>
+<e889>7204</e889>
+<e890>4505</e890>
+<e891>9830</e891>
+<e892>6389</e892>
+<e893>1082</e893>
+<e894>153</e894>
+<e895>3626</e895>
+<e896>8927</e896>
+<e897>5478</e897>
+<e898>2441</e898>
+<e899>2794</e899>
+<e900>7295</e900>
+<e901>4560</e901>
+<e902>9819</e902>
+<e903>6312</e903>
+<e904>1003</e904>
+<e905>136</e905>
+<e906>3637</e906>
+<e907>8988</e907>
+<e908>5451</e908>
+<e909>5724</e909>
+<e910>2225</e910>
+<e911>7570</e911>
+<e912>4549</e912>
+<e913>9842</e913>
+<e914>6393</e914>
+<e915>1066</e915>
+<e916>167</e916>
+<e917>3618</e917>
+<e918>8901</e918>
+<e919>5434</e919>
+<e920>5735</e920>
+<e921>2280</e921>
+<e922>7559</e922>
+<e923>4852</e923>
+<e924>9323</e924>
+<e925>6076</e925>
+<e926>1177</e926>
+<e927>148</e927>
+<e928>3691</e928>
+<e929>8964</e929>
+<e930>5465</e930>
+<e931>5710</e931>
+<e932>2209</e932>
+<e933>7502</e933>
+<e934>4833</e934>
+<e935>9386</e935>
+<e936>6087</e936>
+<e937>1158</e937>
+<e938>621</e938>
+<e939>3974</e939>
+<e940>8475</e940>
+<e941>5440</e941>
+<e942>5799</e942>
+<e943>2292</e943>
+<e944>7563</e944>
+<e945>4816</e945>
+<e946>9317</e946>
+<e947>6008</e947>
+<e948>1131</e948>
+<e949>684</e949>
+<e950>3985</e950>
+<e951>8450</e951>
+<e952>8729</e952>
+<e953>5222</e953>
+<e954>2573</e954>
+<e955>7546</e955>
+<e956>4847</e956>
+<e957>9398</e957>
+<e958>6061</e958>
+<e959>1114</e959>
+<e960>615</e960>
+<e961>3900</e961>
+<e962>8439</e962>
+<e963>8732</e963>
+<e964>5283</e964>
+<e965>2556</e965>
+<e966>7857</e966>
+<e967>4328</e967>
+<e968>9071</e968>
+<e969>6044</e969>
+<e970>1145</e970>
+<e971>690</e971>
+<e972>3969</e972>
+<e973>8462</e973>
+<e974>8713</e974>
+<e975>5206</e975>
+<e976>2507</e976>
+<e977>7838</e977>
+<e978>4381</e978>
+<e979>9054</e979>
+<e980>6155</e980>
+<e981>1620</e981>
+<e982>979</e982>
+<e983>3472</e983>
+<e984>8443</e984>
+<e985>8796</e985>
+<e986>5297</e986>
+<e987>2568</e987>
+<e988>7811</e988>
+<e989>4304</e989>
+<e990>9005</e990>
+<e991>6130</e991>
+<e992>1689</e992>
+<e993>982</e993>
+<e994>3453</e994>
+<e995>3726</e995>
+<e996>8227</e996>
+<e997>5578</e997>
+<e998>2541</e998>
+<e999>7894</e999>
+<e1000>4439</e1000>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/pi1k.xml b/test/tests/perf/xtestdata/pi1k.xml
new file mode 100644
index 0000000..192b382
--- /dev/null
+++ b/test/tests/perf/xtestdata/pi1k.xml
@@ -0,0 +1,1003 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<?p1 PI number 1?>
+<?p2 PI number 2?>
+<?p3 PI number 3?>
+<?p4 PI number 4?>
+<?p5 PI number 5?>
+<?p6 PI number 6?>
+<?p7 PI number 7?>
+<?p8 PI number 8?>
+<?p9 PI number 9?>
+<?p10 PI number 10?>
+<?p11 PI number 11?>
+<?p12 PI number 12?>
+<?p13 PI number 13?>
+<?p14 PI number 14?>
+<?p15 PI number 15?>
+<?p16 PI number 16?>
+<?p17 PI number 17?>
+<?p18 PI number 18?>
+<?p19 PI number 19?>
+<?p20 PI number 20?>
+<?p21 PI number 21?>
+<?p22 PI number 22?>
+<?p23 PI number 23?>
+<?p24 PI number 24?>
+<?p25 PI number 25?>
+<?p26 PI number 26?>
+<?p27 PI number 27?>
+<?p28 PI number 28?>
+<?p29 PI number 29?>
+<?p30 PI number 30?>
+<?p31 PI number 31?>
+<?p32 PI number 32?>
+<?p33 PI number 33?>
+<?p34 PI number 34?>
+<?p35 PI number 35?>
+<?p36 PI number 36?>
+<?p37 PI number 37?>
+<?p38 PI number 38?>
+<?p39 PI number 39?>
+<?p40 PI number 40?>
+<?p41 PI number 41?>
+<?p42 PI number 42?>
+<?p43 PI number 43?>
+<?p44 PI number 44?>
+<?p45 PI number 45?>
+<?p46 PI number 46?>
+<?p47 PI number 47?>
+<?p48 PI number 48?>
+<?p49 PI number 49?>
+<?p50 PI number 50?>
+<?p51 PI number 51?>
+<?p52 PI number 52?>
+<?p53 PI number 53?>
+<?p54 PI number 54?>
+<?p55 PI number 55?>
+<?p56 PI number 56?>
+<?p57 PI number 57?>
+<?p58 PI number 58?>
+<?p59 PI number 59?>
+<?p60 PI number 60?>
+<?p61 PI number 61?>
+<?p62 PI number 62?>
+<?p63 PI number 63?>
+<?p64 PI number 64?>
+<?p65 PI number 65?>
+<?p66 PI number 66?>
+<?p67 PI number 67?>
+<?p68 PI number 68?>
+<?p69 PI number 69?>
+<?p70 PI number 70?>
+<?p71 PI number 71?>
+<?p72 PI number 72?>
+<?p73 PI number 73?>
+<?p74 PI number 74?>
+<?p75 PI number 75?>
+<?p76 PI number 76?>
+<?p77 PI number 77?>
+<?p78 PI number 78?>
+<?p79 PI number 79?>
+<?p80 PI number 80?>
+<?p81 PI number 81?>
+<?p82 PI number 82?>
+<?p83 PI number 83?>
+<?p84 PI number 84?>
+<?p85 PI number 85?>
+<?p86 PI number 86?>
+<?p87 PI number 87?>
+<?p88 PI number 88?>
+<?p89 PI number 89?>
+<?p90 PI number 90?>
+<?p91 PI number 91?>
+<?p92 PI number 92?>
+<?p93 PI number 93?>
+<?p94 PI number 94?>
+<?p95 PI number 95?>
+<?p96 PI number 96?>
+<?p97 PI number 97?>
+<?p98 PI number 98?>
+<?p99 PI number 99?>
+<?p100 PI number 100?>
+<?p101 PI number 101?>
+<?p102 PI number 102?>
+<?p103 PI number 103?>
+<?p104 PI number 104?>
+<?p105 PI number 105?>
+<?p106 PI number 106?>
+<?p107 PI number 107?>
+<?p108 PI number 108?>
+<?p109 PI number 109?>
+<?p110 PI number 110?>
+<?p111 PI number 111?>
+<?p112 PI number 112?>
+<?p113 PI number 113?>
+<?p114 PI number 114?>
+<?p115 PI number 115?>
+<?p116 PI number 116?>
+<?p117 PI number 117?>
+<?p118 PI number 118?>
+<?p119 PI number 119?>
+<?p120 PI number 120?>
+<?p121 PI number 121?>
+<?p122 PI number 122?>
+<?p123 PI number 123?>
+<?p124 PI number 124?>
+<?p125 PI number 125?>
+<?p126 PI number 126?>
+<?p127 PI number 127?>
+<?p128 PI number 128?>
+<?p129 PI number 129?>
+<?p130 PI number 130?>
+<?p131 PI number 131?>
+<?p132 PI number 132?>
+<?p133 PI number 133?>
+<?p134 PI number 134?>
+<?p135 PI number 135?>
+<?p136 PI number 136?>
+<?p137 PI number 137?>
+<?p138 PI number 138?>
+<?p139 PI number 139?>
+<?p140 PI number 140?>
+<?p141 PI number 141?>
+<?p142 PI number 142?>
+<?p143 PI number 143?>
+<?p144 PI number 144?>
+<?p145 PI number 145?>
+<?p146 PI number 146?>
+<?p147 PI number 147?>
+<?p148 PI number 148?>
+<?p149 PI number 149?>
+<?p150 PI number 150?>
+<?p151 PI number 151?>
+<?p152 PI number 152?>
+<?p153 PI number 153?>
+<?p154 PI number 154?>
+<?p155 PI number 155?>
+<?p156 PI number 156?>
+<?p157 PI number 157?>
+<?p158 PI number 158?>
+<?p159 PI number 159?>
+<?p160 PI number 160?>
+<?p161 PI number 161?>
+<?p162 PI number 162?>
+<?p163 PI number 163?>
+<?p164 PI number 164?>
+<?p165 PI number 165?>
+<?p166 PI number 166?>
+<?p167 PI number 167?>
+<?p168 PI number 168?>
+<?p169 PI number 169?>
+<?p170 PI number 170?>
+<?p171 PI number 171?>
+<?p172 PI number 172?>
+<?p173 PI number 173?>
+<?p174 PI number 174?>
+<?p175 PI number 175?>
+<?p176 PI number 176?>
+<?p177 PI number 177?>
+<?p178 PI number 178?>
+<?p179 PI number 179?>
+<?p180 PI number 180?>
+<?p181 PI number 181?>
+<?p182 PI number 182?>
+<?p183 PI number 183?>
+<?p184 PI number 184?>
+<?p185 PI number 185?>
+<?p186 PI number 186?>
+<?p187 PI number 187?>
+<?p188 PI number 188?>
+<?p189 PI number 189?>
+<?p190 PI number 190?>
+<?p191 PI number 191?>
+<?p192 PI number 192?>
+<?p193 PI number 193?>
+<?p194 PI number 194?>
+<?p195 PI number 195?>
+<?p196 PI number 196?>
+<?p197 PI number 197?>
+<?p198 PI number 198?>
+<?p199 PI number 199?>
+<?p200 PI number 200?>
+<?p201 PI number 201?>
+<?p202 PI number 202?>
+<?p203 PI number 203?>
+<?p204 PI number 204?>
+<?p205 PI number 205?>
+<?p206 PI number 206?>
+<?p207 PI number 207?>
+<?p208 PI number 208?>
+<?p209 PI number 209?>
+<?p210 PI number 210?>
+<?p211 PI number 211?>
+<?p212 PI number 212?>
+<?p213 PI number 213?>
+<?p214 PI number 214?>
+<?p215 PI number 215?>
+<?p216 PI number 216?>
+<?p217 PI number 217?>
+<?p218 PI number 218?>
+<?p219 PI number 219?>
+<?p220 PI number 220?>
+<?p221 PI number 221?>
+<?p222 PI number 222?>
+<?p223 PI number 223?>
+<?p224 PI number 224?>
+<?p225 PI number 225?>
+<?p226 PI number 226?>
+<?p227 PI number 227?>
+<?p228 PI number 228?>
+<?p229 PI number 229?>
+<?p230 PI number 230?>
+<?p231 PI number 231?>
+<?p232 PI number 232?>
+<?p233 PI number 233?>
+<?p234 PI number 234?>
+<?p235 PI number 235?>
+<?p236 PI number 236?>
+<?p237 PI number 237?>
+<?p238 PI number 238?>
+<?p239 PI number 239?>
+<?p240 PI number 240?>
+<?p241 PI number 241?>
+<?p242 PI number 242?>
+<?p243 PI number 243?>
+<?p244 PI number 244?>
+<?p245 PI number 245?>
+<?p246 PI number 246?>
+<?p247 PI number 247?>
+<?p248 PI number 248?>
+<?p249 PI number 249?>
+<?p250 PI number 250?>
+<?p251 PI number 251?>
+<?p252 PI number 252?>
+<?p253 PI number 253?>
+<?p254 PI number 254?>
+<?p255 PI number 255?>
+<?p256 PI number 256?>
+<?p257 PI number 257?>
+<?p258 PI number 258?>
+<?p259 PI number 259?>
+<?p260 PI number 260?>
+<?p261 PI number 261?>
+<?p262 PI number 262?>
+<?p263 PI number 263?>
+<?p264 PI number 264?>
+<?p265 PI number 265?>
+<?p266 PI number 266?>
+<?p267 PI number 267?>
+<?p268 PI number 268?>
+<?p269 PI number 269?>
+<?p270 PI number 270?>
+<?p271 PI number 271?>
+<?p272 PI number 272?>
+<?p273 PI number 273?>
+<?p274 PI number 274?>
+<?p275 PI number 275?>
+<?p276 PI number 276?>
+<?p277 PI number 277?>
+<?p278 PI number 278?>
+<?p279 PI number 279?>
+<?p280 PI number 280?>
+<?p281 PI number 281?>
+<?p282 PI number 282?>
+<?p283 PI number 283?>
+<?p284 PI number 284?>
+<?p285 PI number 285?>
+<?p286 PI number 286?>
+<?p287 PI number 287?>
+<?p288 PI number 288?>
+<?p289 PI number 289?>
+<?p290 PI number 290?>
+<?p291 PI number 291?>
+<?p292 PI number 292?>
+<?p293 PI number 293?>
+<?p294 PI number 294?>
+<?p295 PI number 295?>
+<?p296 PI number 296?>
+<?p297 PI number 297?>
+<?p298 PI number 298?>
+<?p299 PI number 299?>
+<?p300 PI number 300?>
+<?p301 PI number 301?>
+<?p302 PI number 302?>
+<?p303 PI number 303?>
+<?p304 PI number 304?>
+<?p305 PI number 305?>
+<?p306 PI number 306?>
+<?p307 PI number 307?>
+<?p308 PI number 308?>
+<?p309 PI number 309?>
+<?p310 PI number 310?>
+<?p311 PI number 311?>
+<?p312 PI number 312?>
+<?p313 PI number 313?>
+<?p314 PI number 314?>
+<?p315 PI number 315?>
+<?p316 PI number 316?>
+<?p317 PI number 317?>
+<?p318 PI number 318?>
+<?p319 PI number 319?>
+<?p320 PI number 320?>
+<?p321 PI number 321?>
+<?p322 PI number 322?>
+<?p323 PI number 323?>
+<?p324 PI number 324?>
+<?p325 PI number 325?>
+<?p326 PI number 326?>
+<?p327 PI number 327?>
+<?p328 PI number 328?>
+<?p329 PI number 329?>
+<?p330 PI number 330?>
+<?p331 PI number 331?>
+<?p332 PI number 332?>
+<?p333 PI number 333?>
+<?p334 PI number 334?>
+<?p335 PI number 335?>
+<?p336 PI number 336?>
+<?p337 PI number 337?>
+<?p338 PI number 338?>
+<?p339 PI number 339?>
+<?p340 PI number 340?>
+<?p341 PI number 341?>
+<?p342 PI number 342?>
+<?p343 PI number 343?>
+<?p344 PI number 344?>
+<?p345 PI number 345?>
+<?p346 PI number 346?>
+<?p347 PI number 347?>
+<?p348 PI number 348?>
+<?p349 PI number 349?>
+<?p350 PI number 350?>
+<?p351 PI number 351?>
+<?p352 PI number 352?>
+<?p353 PI number 353?>
+<?p354 PI number 354?>
+<?p355 PI number 355?>
+<?p356 PI number 356?>
+<?p357 PI number 357?>
+<?p358 PI number 358?>
+<?p359 PI number 359?>
+<?p360 PI number 360?>
+<?p361 PI number 361?>
+<?p362 PI number 362?>
+<?p363 PI number 363?>
+<?p364 PI number 364?>
+<?p365 PI number 365?>
+<?p366 PI number 366?>
+<?p367 PI number 367?>
+<?p368 PI number 368?>
+<?p369 PI number 369?>
+<?p370 PI number 370?>
+<?p371 PI number 371?>
+<?p372 PI number 372?>
+<?p373 PI number 373?>
+<?p374 PI number 374?>
+<?p375 PI number 375?>
+<?p376 PI number 376?>
+<?p377 PI number 377?>
+<?p378 PI number 378?>
+<?p379 PI number 379?>
+<?p380 PI number 380?>
+<?p381 PI number 381?>
+<?p382 PI number 382?>
+<?p383 PI number 383?>
+<?p384 PI number 384?>
+<?p385 PI number 385?>
+<?p386 PI number 386?>
+<?p387 PI number 387?>
+<?p388 PI number 388?>
+<?p389 PI number 389?>
+<?p390 PI number 390?>
+<?p391 PI number 391?>
+<?p392 PI number 392?>
+<?p393 PI number 393?>
+<?p394 PI number 394?>
+<?p395 PI number 395?>
+<?p396 PI number 396?>
+<?p397 PI number 397?>
+<?p398 PI number 398?>
+<?p399 PI number 399?>
+<?p400 PI number 400?>
+<?p401 PI number 401?>
+<?p402 PI number 402?>
+<?p403 PI number 403?>
+<?p404 PI number 404?>
+<?p405 PI number 405?>
+<?p406 PI number 406?>
+<?p407 PI number 407?>
+<?p408 PI number 408?>
+<?p409 PI number 409?>
+<?p410 PI number 410?>
+<?p411 PI number 411?>
+<?p412 PI number 412?>
+<?p413 PI number 413?>
+<?p414 PI number 414?>
+<?p415 PI number 415?>
+<?p416 PI number 416?>
+<?p417 PI number 417?>
+<?p418 PI number 418?>
+<?p419 PI number 419?>
+<?p420 PI number 420?>
+<?p421 PI number 421?>
+<?p422 PI number 422?>
+<?p423 PI number 423?>
+<?p424 PI number 424?>
+<?p425 PI number 425?>
+<?p426 PI number 426?>
+<?p427 PI number 427?>
+<?p428 PI number 428?>
+<?p429 PI number 429?>
+<?p430 PI number 430?>
+<?p431 PI number 431?>
+<?p432 PI number 432?>
+<?p433 PI number 433?>
+<?p434 PI number 434?>
+<?p435 PI number 435?>
+<?p436 PI number 436?>
+<?p437 PI number 437?>
+<?p438 PI number 438?>
+<?p439 PI number 439?>
+<?p440 PI number 440?>
+<?p441 PI number 441?>
+<?p442 PI number 442?>
+<?p443 PI number 443?>
+<?p444 PI number 444?>
+<?p445 PI number 445?>
+<?p446 PI number 446?>
+<?p447 PI number 447?>
+<?p448 PI number 448?>
+<?p449 PI number 449?>
+<?p450 PI number 450?>
+<?p451 PI number 451?>
+<?p452 PI number 452?>
+<?p453 PI number 453?>
+<?p454 PI number 454?>
+<?p455 PI number 455?>
+<?p456 PI number 456?>
+<?p457 PI number 457?>
+<?p458 PI number 458?>
+<?p459 PI number 459?>
+<?p460 PI number 460?>
+<?p461 PI number 461?>
+<?p462 PI number 462?>
+<?p463 PI number 463?>
+<?p464 PI number 464?>
+<?p465 PI number 465?>
+<?p466 PI number 466?>
+<?p467 PI number 467?>
+<?p468 PI number 468?>
+<?p469 PI number 469?>
+<?p470 PI number 470?>
+<?p471 PI number 471?>
+<?p472 PI number 472?>
+<?p473 PI number 473?>
+<?p474 PI number 474?>
+<?p475 PI number 475?>
+<?p476 PI number 476?>
+<?p477 PI number 477?>
+<?p478 PI number 478?>
+<?p479 PI number 479?>
+<?p480 PI number 480?>
+<?p481 PI number 481?>
+<?p482 PI number 482?>
+<?p483 PI number 483?>
+<?p484 PI number 484?>
+<?p485 PI number 485?>
+<?p486 PI number 486?>
+<?p487 PI number 487?>
+<?p488 PI number 488?>
+<?p489 PI number 489?>
+<?p490 PI number 490?>
+<?p491 PI number 491?>
+<?p492 PI number 492?>
+<?p493 PI number 493?>
+<?p494 PI number 494?>
+<?p495 PI number 495?>
+<?p496 PI number 496?>
+<?p497 PI number 497?>
+<?p498 PI number 498?>
+<?p499 PI number 499?>
+<?p500 PI number 500?>
+<?p501 PI number 501?>
+<?p502 PI number 502?>
+<?p503 PI number 503?>
+<?p504 PI number 504?>
+<?p505 PI number 505?>
+<?p506 PI number 506?>
+<?p507 PI number 507?>
+<?p508 PI number 508?>
+<?p509 PI number 509?>
+<?p510 PI number 510?>
+<?p511 PI number 511?>
+<?p512 PI number 512?>
+<?p513 PI number 513?>
+<?p514 PI number 514?>
+<?p515 PI number 515?>
+<?p516 PI number 516?>
+<?p517 PI number 517?>
+<?p518 PI number 518?>
+<?p519 PI number 519?>
+<?p520 PI number 520?>
+<?p521 PI number 521?>
+<?p522 PI number 522?>
+<?p523 PI number 523?>
+<?p524 PI number 524?>
+<?p525 PI number 525?>
+<?p526 PI number 526?>
+<?p527 PI number 527?>
+<?p528 PI number 528?>
+<?p529 PI number 529?>
+<?p530 PI number 530?>
+<?p531 PI number 531?>
+<?p532 PI number 532?>
+<?p533 PI number 533?>
+<?p534 PI number 534?>
+<?p535 PI number 535?>
+<?p536 PI number 536?>
+<?p537 PI number 537?>
+<?p538 PI number 538?>
+<?p539 PI number 539?>
+<?p540 PI number 540?>
+<?p541 PI number 541?>
+<?p542 PI number 542?>
+<?p543 PI number 543?>
+<?p544 PI number 544?>
+<?p545 PI number 545?>
+<?p546 PI number 546?>
+<?p547 PI number 547?>
+<?p548 PI number 548?>
+<?p549 PI number 549?>
+<?p550 PI number 550?>
+<?p551 PI number 551?>
+<?p552 PI number 552?>
+<?p553 PI number 553?>
+<?p554 PI number 554?>
+<?p555 PI number 555?>
+<?p556 PI number 556?>
+<?p557 PI number 557?>
+<?p558 PI number 558?>
+<?p559 PI number 559?>
+<?p560 PI number 560?>
+<?p561 PI number 561?>
+<?p562 PI number 562?>
+<?p563 PI number 563?>
+<?p564 PI number 564?>
+<?p565 PI number 565?>
+<?p566 PI number 566?>
+<?p567 PI number 567?>
+<?p568 PI number 568?>
+<?p569 PI number 569?>
+<?p570 PI number 570?>
+<?p571 PI number 571?>
+<?p572 PI number 572?>
+<?p573 PI number 573?>
+<?p574 PI number 574?>
+<?p575 PI number 575?>
+<?p576 PI number 576?>
+<?p577 PI number 577?>
+<?p578 PI number 578?>
+<?p579 PI number 579?>
+<?p580 PI number 580?>
+<?p581 PI number 581?>
+<?p582 PI number 582?>
+<?p583 PI number 583?>
+<?p584 PI number 584?>
+<?p585 PI number 585?>
+<?p586 PI number 586?>
+<?p587 PI number 587?>
+<?p588 PI number 588?>
+<?p589 PI number 589?>
+<?p590 PI number 590?>
+<?p591 PI number 591?>
+<?p592 PI number 592?>
+<?p593 PI number 593?>
+<?p594 PI number 594?>
+<?p595 PI number 595?>
+<?p596 PI number 596?>
+<?p597 PI number 597?>
+<?p598 PI number 598?>
+<?p599 PI number 599?>
+<?p600 PI number 600?>
+<?p601 PI number 601?>
+<?p602 PI number 602?>
+<?p603 PI number 603?>
+<?p604 PI number 604?>
+<?p605 PI number 605?>
+<?p606 PI number 606?>
+<?p607 PI number 607?>
+<?p608 PI number 608?>
+<?p609 PI number 609?>
+<?p610 PI number 610?>
+<?p611 PI number 611?>
+<?p612 PI number 612?>
+<?p613 PI number 613?>
+<?p614 PI number 614?>
+<?p615 PI number 615?>
+<?p616 PI number 616?>
+<?p617 PI number 617?>
+<?p618 PI number 618?>
+<?p619 PI number 619?>
+<?p620 PI number 620?>
+<?p621 PI number 621?>
+<?p622 PI number 622?>
+<?p623 PI number 623?>
+<?p624 PI number 624?>
+<?p625 PI number 625?>
+<?p626 PI number 626?>
+<?p627 PI number 627?>
+<?p628 PI number 628?>
+<?p629 PI number 629?>
+<?p630 PI number 630?>
+<?p631 PI number 631?>
+<?p632 PI number 632?>
+<?p633 PI number 633?>
+<?p634 PI number 634?>
+<?p635 PI number 635?>
+<?p636 PI number 636?>
+<?p637 PI number 637?>
+<?p638 PI number 638?>
+<?p639 PI number 639?>
+<?p640 PI number 640?>
+<?p641 PI number 641?>
+<?p642 PI number 642?>
+<?p643 PI number 643?>
+<?p644 PI number 644?>
+<?p645 PI number 645?>
+<?p646 PI number 646?>
+<?p647 PI number 647?>
+<?p648 PI number 648?>
+<?p649 PI number 649?>
+<?p650 PI number 650?>
+<?p651 PI number 651?>
+<?p652 PI number 652?>
+<?p653 PI number 653?>
+<?p654 PI number 654?>
+<?p655 PI number 655?>
+<?p656 PI number 656?>
+<?p657 PI number 657?>
+<?p658 PI number 658?>
+<?p659 PI number 659?>
+<?p660 PI number 660?>
+<?p661 PI number 661?>
+<?p662 PI number 662?>
+<?p663 PI number 663?>
+<?p664 PI number 664?>
+<?p665 PI number 665?>
+<?p666 PI number 666?>
+<?p667 PI number 667?>
+<?p668 PI number 668?>
+<?p669 PI number 669?>
+<?p670 PI number 670?>
+<?p671 PI number 671?>
+<?p672 PI number 672?>
+<?p673 PI number 673?>
+<?p674 PI number 674?>
+<?p675 PI number 675?>
+<?p676 PI number 676?>
+<?p677 PI number 677?>
+<?p678 PI number 678?>
+<?p679 PI number 679?>
+<?p680 PI number 680?>
+<?p681 PI number 681?>
+<?p682 PI number 682?>
+<?p683 PI number 683?>
+<?p684 PI number 684?>
+<?p685 PI number 685?>
+<?p686 PI number 686?>
+<?p687 PI number 687?>
+<?p688 PI number 688?>
+<?p689 PI number 689?>
+<?p690 PI number 690?>
+<?p691 PI number 691?>
+<?p692 PI number 692?>
+<?p693 PI number 693?>
+<?p694 PI number 694?>
+<?p695 PI number 695?>
+<?p696 PI number 696?>
+<?p697 PI number 697?>
+<?p698 PI number 698?>
+<?p699 PI number 699?>
+<?p700 PI number 700?>
+<?p701 PI number 701?>
+<?p702 PI number 702?>
+<?p703 PI number 703?>
+<?p704 PI number 704?>
+<?p705 PI number 705?>
+<?p706 PI number 706?>
+<?p707 PI number 707?>
+<?p708 PI number 708?>
+<?p709 PI number 709?>
+<?p710 PI number 710?>
+<?p711 PI number 711?>
+<?p712 PI number 712?>
+<?p713 PI number 713?>
+<?p714 PI number 714?>
+<?p715 PI number 715?>
+<?p716 PI number 716?>
+<?p717 PI number 717?>
+<?p718 PI number 718?>
+<?p719 PI number 719?>
+<?p720 PI number 720?>
+<?p721 PI number 721?>
+<?p722 PI number 722?>
+<?p723 PI number 723?>
+<?p724 PI number 724?>
+<?p725 PI number 725?>
+<?p726 PI number 726?>
+<?p727 PI number 727?>
+<?p728 PI number 728?>
+<?p729 PI number 729?>
+<?p730 PI number 730?>
+<?p731 PI number 731?>
+<?p732 PI number 732?>
+<?p733 PI number 733?>
+<?p734 PI number 734?>
+<?p735 PI number 735?>
+<?p736 PI number 736?>
+<?p737 PI number 737?>
+<?p738 PI number 738?>
+<?p739 PI number 739?>
+<?p740 PI number 740?>
+<?p741 PI number 741?>
+<?p742 PI number 742?>
+<?p743 PI number 743?>
+<?p744 PI number 744?>
+<?p745 PI number 745?>
+<?p746 PI number 746?>
+<?p747 PI number 747?>
+<?p748 PI number 748?>
+<?p749 PI number 749?>
+<?p750 PI number 750?>
+<?p751 PI number 751?>
+<?p752 PI number 752?>
+<?p753 PI number 753?>
+<?p754 PI number 754?>
+<?p755 PI number 755?>
+<?p756 PI number 756?>
+<?p757 PI number 757?>
+<?p758 PI number 758?>
+<?p759 PI number 759?>
+<?p760 PI number 760?>
+<?p761 PI number 761?>
+<?p762 PI number 762?>
+<?p763 PI number 763?>
+<?p764 PI number 764?>
+<?p765 PI number 765?>
+<?p766 PI number 766?>
+<?p767 PI number 767?>
+<?p768 PI number 768?>
+<?p769 PI number 769?>
+<?p770 PI number 770?>
+<?p771 PI number 771?>
+<?p772 PI number 772?>
+<?p773 PI number 773?>
+<?p774 PI number 774?>
+<?p775 PI number 775?>
+<?p776 PI number 776?>
+<?p777 PI number 777?>
+<?p778 PI number 778?>
+<?p779 PI number 779?>
+<?p780 PI number 780?>
+<?p781 PI number 781?>
+<?p782 PI number 782?>
+<?p783 PI number 783?>
+<?p784 PI number 784?>
+<?p785 PI number 785?>
+<?p786 PI number 786?>
+<?p787 PI number 787?>
+<?p788 PI number 788?>
+<?p789 PI number 789?>
+<?p790 PI number 790?>
+<?p791 PI number 791?>
+<?p792 PI number 792?>
+<?p793 PI number 793?>
+<?p794 PI number 794?>
+<?p795 PI number 795?>
+<?p796 PI number 796?>
+<?p797 PI number 797?>
+<?p798 PI number 798?>
+<?p799 PI number 799?>
+<?p800 PI number 800?>
+<?p801 PI number 801?>
+<?p802 PI number 802?>
+<?p803 PI number 803?>
+<?p804 PI number 804?>
+<?p805 PI number 805?>
+<?p806 PI number 806?>
+<?p807 PI number 807?>
+<?p808 PI number 808?>
+<?p809 PI number 809?>
+<?p810 PI number 810?>
+<?p811 PI number 811?>
+<?p812 PI number 812?>
+<?p813 PI number 813?>
+<?p814 PI number 814?>
+<?p815 PI number 815?>
+<?p816 PI number 816?>
+<?p817 PI number 817?>
+<?p818 PI number 818?>
+<?p819 PI number 819?>
+<?p820 PI number 820?>
+<?p821 PI number 821?>
+<?p822 PI number 822?>
+<?p823 PI number 823?>
+<?p824 PI number 824?>
+<?p825 PI number 825?>
+<?p826 PI number 826?>
+<?p827 PI number 827?>
+<?p828 PI number 828?>
+<?p829 PI number 829?>
+<?p830 PI number 830?>
+<?p831 PI number 831?>
+<?p832 PI number 832?>
+<?p833 PI number 833?>
+<?p834 PI number 834?>
+<?p835 PI number 835?>
+<?p836 PI number 836?>
+<?p837 PI number 837?>
+<?p838 PI number 838?>
+<?p839 PI number 839?>
+<?p840 PI number 840?>
+<?p841 PI number 841?>
+<?p842 PI number 842?>
+<?p843 PI number 843?>
+<?p844 PI number 844?>
+<?p845 PI number 845?>
+<?p846 PI number 846?>
+<?p847 PI number 847?>
+<?p848 PI number 848?>
+<?p849 PI number 849?>
+<?p850 PI number 850?>
+<?p851 PI number 851?>
+<?p852 PI number 852?>
+<?p853 PI number 853?>
+<?p854 PI number 854?>
+<?p855 PI number 855?>
+<?p856 PI number 856?>
+<?p857 PI number 857?>
+<?p858 PI number 858?>
+<?p859 PI number 859?>
+<?p860 PI number 860?>
+<?p861 PI number 861?>
+<?p862 PI number 862?>
+<?p863 PI number 863?>
+<?p864 PI number 864?>
+<?p865 PI number 865?>
+<?p866 PI number 866?>
+<?p867 PI number 867?>
+<?p868 PI number 868?>
+<?p869 PI number 869?>
+<?p870 PI number 870?>
+<?p871 PI number 871?>
+<?p872 PI number 872?>
+<?p873 PI number 873?>
+<?p874 PI number 874?>
+<?p875 PI number 875?>
+<?p876 PI number 876?>
+<?p877 PI number 877?>
+<?p878 PI number 878?>
+<?p879 PI number 879?>
+<?p880 PI number 880?>
+<?p881 PI number 881?>
+<?p882 PI number 882?>
+<?p883 PI number 883?>
+<?p884 PI number 884?>
+<?p885 PI number 885?>
+<?p886 PI number 886?>
+<?p887 PI number 887?>
+<?p888 PI number 888?>
+<?p889 PI number 889?>
+<?p890 PI number 890?>
+<?p891 PI number 891?>
+<?p892 PI number 892?>
+<?p893 PI number 893?>
+<?p894 PI number 894?>
+<?p895 PI number 895?>
+<?p896 PI number 896?>
+<?p897 PI number 897?>
+<?p898 PI number 898?>
+<?p899 PI number 899?>
+<?p900 PI number 900?>
+<?p901 PI number 901?>
+<?p902 PI number 902?>
+<?p903 PI number 903?>
+<?p904 PI number 904?>
+<?p905 PI number 905?>
+<?p906 PI number 906?>
+<?p907 PI number 907?>
+<?p908 PI number 908?>
+<?p909 PI number 909?>
+<?p910 PI number 910?>
+<?p911 PI number 911?>
+<?p912 PI number 912?>
+<?p913 PI number 913?>
+<?p914 PI number 914?>
+<?p915 PI number 915?>
+<?p916 PI number 916?>
+<?p917 PI number 917?>
+<?p918 PI number 918?>
+<?p919 PI number 919?>
+<?p920 PI number 920?>
+<?p921 PI number 921?>
+<?p922 PI number 922?>
+<?p923 PI number 923?>
+<?p924 PI number 924?>
+<?p925 PI number 925?>
+<?p926 PI number 926?>
+<?p927 PI number 927?>
+<?p928 PI number 928?>
+<?p929 PI number 929?>
+<?p930 PI number 930?>
+<?p931 PI number 931?>
+<?p932 PI number 932?>
+<?p933 PI number 933?>
+<?p934 PI number 934?>
+<?p935 PI number 935?>
+<?p936 PI number 936?>
+<?p937 PI number 937?>
+<?p938 PI number 938?>
+<?p939 PI number 939?>
+<?p940 PI number 940?>
+<?p941 PI number 941?>
+<?p942 PI number 942?>
+<?p943 PI number 943?>
+<?p944 PI number 944?>
+<?p945 PI number 945?>
+<?p946 PI number 946?>
+<?p947 PI number 947?>
+<?p948 PI number 948?>
+<?p949 PI number 949?>
+<?p950 PI number 950?>
+<?p951 PI number 951?>
+<?p952 PI number 952?>
+<?p953 PI number 953?>
+<?p954 PI number 954?>
+<?p955 PI number 955?>
+<?p956 PI number 956?>
+<?p957 PI number 957?>
+<?p958 PI number 958?>
+<?p959 PI number 959?>
+<?p960 PI number 960?>
+<?p961 PI number 961?>
+<?p962 PI number 962?>
+<?p963 PI number 963?>
+<?p964 PI number 964?>
+<?p965 PI number 965?>
+<?p966 PI number 966?>
+<?p967 PI number 967?>
+<?p968 PI number 968?>
+<?p969 PI number 969?>
+<?p970 PI number 970?>
+<?p971 PI number 971?>
+<?p972 PI number 972?>
+<?p973 PI number 973?>
+<?p974 PI number 974?>
+<?p975 PI number 975?>
+<?p976 PI number 976?>
+<?p977 PI number 977?>
+<?p978 PI number 978?>
+<?p979 PI number 979?>
+<?p980 PI number 980?>
+<?p981 PI number 981?>
+<?p982 PI number 982?>
+<?p983 PI number 983?>
+<?p984 PI number 984?>
+<?p985 PI number 985?>
+<?p986 PI number 986?>
+<?p987 PI number 987?>
+<?p988 PI number 988?>
+<?p989 PI number 989?>
+<?p990 PI number 990?>
+<?p991 PI number 991?>
+<?p992 PI number 992?>
+<?p993 PI number 993?>
+<?p994 PI number 994?>
+<?p995 PI number 995?>
+<?p996 PI number 996?>
+<?p997 PI number 997?>
+<?p998 PI number 998?>
+<?p999 PI number 999?>
+<?p1000 PI number 1000?>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/play-alls_well.xml b/test/tests/perf/xtestdata/play-alls_well.xml
new file mode 100644
index 0000000..cfdf02c
--- /dev/null
+++ b/test/tests/perf/xtestdata/play-alls_well.xml
@@ -0,0 +1,7021 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PLAY>
+<TITLE>All's Well That Ends Well</TITLE>
+
+<FM>
+<P>ASCII text placed in the public domain by Moby Lexical Tools, 1992.</P>
+<P>SGML markup by Jon Bosak, 1992-1994.</P>
+<P>XML version by Jon Bosak, 1996-1999.</P>
+<P>The XML markup in this version is Copyright &#169; 1999 Jon Bosak.
+This work may freely be distributed on condition that it not be
+modified or altered in any way.</P>
+</FM>
+
+<PERSONAE>
+<TITLE>Dramatis Personae</TITLE>
+
+<PERSONA>KING OF FRANCE</PERSONA>
+<PERSONA>DUKE OF FLORENCE</PERSONA>
+<PERSONA>BERTRAM, Count of Rousillon.</PERSONA>
+<PERSONA>LAFEU, an old lord.</PERSONA>
+<PERSONA>PAROLLES, a follower of Bertram.</PERSONA>
+
+<PGROUP>
+<PERSONA>Steward</PERSONA>
+<PERSONA>Clown</PERSONA>
+<GRPDESCR>servants to the Countess of Rousillon.</GRPDESCR>
+</PGROUP>
+
+<PERSONA>A Page. </PERSONA>
+<PERSONA>COUNTESS OF ROUSILLON, mother to Bertram. </PERSONA>
+<PERSONA>HELENA, a gentlewoman protected by the Countess.</PERSONA>
+<PERSONA>An old Widow of Florence. </PERSONA>
+<PERSONA>DIANA, daughter to the Widow.</PERSONA>
+
+<PGROUP>
+<PERSONA>VIOLENTA</PERSONA>
+<PERSONA>MARIANA</PERSONA>
+<GRPDESCR>neighbours and friends to the Widow.</GRPDESCR>
+</PGROUP>
+
+<PERSONA>Lords, Officers, Soldiers, &amp;c., French and Florentine.</PERSONA>
+</PERSONAE>
+
+<SCNDESCR>SCENE  Rousillon; Paris; Florence; Marseilles.</SCNDESCR>
+
+<PLAYSUBT>ALL'S WELL THAT ENDS WELL</PLAYSUBT>
+
+<ACT><TITLE>ACT I</TITLE>
+
+<SCENE><TITLE>SCENE I.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter BERTRAM, the COUNTESS of Rousillon, HELENA,
+and LAFEU, all in black</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>In delivering my son from me, I bury a second husband.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>And I in going, madam, weep o'er my father's death</LINE>
+<LINE>anew: but I must attend his majesty's command, to</LINE>
+<LINE>whom I am now in ward, evermore in subjection.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You shall find of the king a husband, madam; you,</LINE>
+<LINE>sir, a father: he that so generally is at all times</LINE>
+<LINE>good must of necessity hold his virtue to you; whose</LINE>
+<LINE>worthiness would stir it up where it wanted rather</LINE>
+<LINE>than lack it where there is such abundance.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What hope is there of his majesty's amendment?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He hath abandoned his physicians, madam; under whose</LINE>
+<LINE>practises he hath persecuted time with hope, and</LINE>
+<LINE>finds no other advantage in the process but only the</LINE>
+<LINE>losing of hope by time.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>This young gentlewoman had a father,--O, that</LINE>
+<LINE>'had'! how sad a passage 'tis!--whose skill was</LINE>
+<LINE>almost as great as his honesty; had it stretched so</LINE>
+<LINE>far, would have made nature immortal, and death</LINE>
+<LINE>should have play for lack of work. Would, for the</LINE>
+<LINE>king's sake, he were living! I think it would be</LINE>
+<LINE>the death of the king's disease.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>How called you the man you speak of, madam?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>He was famous, sir, in his profession, and it was</LINE>
+<LINE>his great right to be so: Gerard de Narbon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He was excellent indeed, madam: the king very</LINE>
+<LINE>lately spoke of him admiringly and mourningly: he</LINE>
+<LINE>was skilful enough to have lived still, if knowledge</LINE>
+<LINE>could be set up against mortality.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>What is it, my good lord, the king languishes of?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A fistula, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I heard not of it before.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I would it were not notorious. Was this gentlewoman</LINE>
+<LINE>the daughter of Gerard de Narbon?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>His sole child, my lord, and bequeathed to my</LINE>
+<LINE>overlooking. I have those hopes of her good that</LINE>
+<LINE>her education promises; her dispositions she</LINE>
+<LINE>inherits, which makes fair gifts fairer; for where</LINE>
+<LINE>an unclean mind carries virtuous qualities, there</LINE>
+<LINE>commendations go with pity; they are virtues and</LINE>
+<LINE>traitors too; in her they are the better for their</LINE>
+<LINE>simpleness; she derives her honesty and achieves her goodness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Your commendations, madam, get from her tears.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>'Tis the best brine a maiden can season her praise</LINE>
+<LINE>in. The remembrance of her father never approaches</LINE>
+<LINE>her heart but the tyranny of her sorrows takes all</LINE>
+<LINE>livelihood from her cheek. No more of this, Helena;</LINE>
+<LINE>go to, no more; lest it be rather thought you affect</LINE>
+<LINE>a sorrow than have it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I do affect a sorrow indeed, but I have it too.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Moderate lamentation is the right of the dead,</LINE>
+<LINE>excessive grief the enemy to the living.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>If the living be enemy to the grief, the excess</LINE>
+<LINE>makes it soon mortal.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Madam, I desire your holy wishes.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>How understand we that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Be thou blest, Bertram, and succeed thy father</LINE>
+<LINE>In manners, as in shape! thy blood and virtue</LINE>
+<LINE>Contend for empire in thee, and thy goodness</LINE>
+<LINE>Share with thy birthright! Love all, trust a few,</LINE>
+<LINE>Do wrong to none: be able for thine enemy</LINE>
+<LINE>Rather in power than use, and keep thy friend</LINE>
+<LINE>Under thy own life's key: be cheque'd for silence,</LINE>
+<LINE>But never tax'd for speech. What heaven more will,</LINE>
+<LINE>That thee may furnish and my prayers pluck down,</LINE>
+<LINE>Fall on thy head! Farewell, my lord;</LINE>
+<LINE>'Tis an unseason'd courtier; good my lord,</LINE>
+<LINE>Advise him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He cannot want the best</LINE>
+<LINE>That shall attend his love.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Heaven bless him! Farewell, Bertram.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE><STAGEDIR>To HELENA</STAGEDIR>  The best wishes that can be forged in</LINE>
+<LINE>your thoughts be servants to you! Be comfortable</LINE>
+<LINE>to my mother, your mistress, and make much of her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Farewell, pretty lady: you must hold the credit of</LINE>
+<LINE>your father.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt BERTRAM and LAFEU</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>O, were that all! I think not on my father;</LINE>
+<LINE>And these great tears grace his remembrance more</LINE>
+<LINE>Than those I shed for him. What was he like?</LINE>
+<LINE>I have forgot him: my imagination</LINE>
+<LINE>Carries no favour in't but Bertram's.</LINE>
+<LINE>I am undone: there is no living, none,</LINE>
+<LINE>If Bertram be away. 'Twere all one</LINE>
+<LINE>That I should love a bright particular star</LINE>
+<LINE>And think to wed it, he is so above me:</LINE>
+<LINE>In his bright radiance and collateral light</LINE>
+<LINE>Must I be comforted, not in his sphere.</LINE>
+<LINE>The ambition in my love thus plagues itself:</LINE>
+<LINE>The hind that would be mated by the lion</LINE>
+<LINE>Must die for love. 'Twas pretty, though plague,</LINE>
+<LINE>To see him every hour; to sit and draw</LINE>
+<LINE>His arched brows, his hawking eye, his curls,</LINE>
+<LINE>In our heart's table; heart too capable</LINE>
+<LINE>Of every line and trick of his sweet favour:</LINE>
+<LINE>But now he's gone, and my idolatrous fancy</LINE>
+<LINE>Must sanctify his reliques. Who comes here?</LINE>
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+<STAGEDIR>Aside</STAGEDIR>
+<LINE>One that goes with him: I love him for his sake;</LINE>
+<LINE>And yet I know him a notorious liar,</LINE>
+<LINE>Think him a great way fool, solely a coward;</LINE>
+<LINE>Yet these fixed evils sit so fit in him,</LINE>
+<LINE>That they take place, when virtue's steely bones</LINE>
+<LINE>Look bleak i' the cold wind: withal, full oft we see</LINE>
+<LINE>Cold wisdom waiting on superfluous folly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Save you, fair queen!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>And you, monarch!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>No.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>And no.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Are you meditating on virginity?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay. You have some stain of soldier in you: let me</LINE>
+<LINE>ask you a question. Man is enemy to virginity; how</LINE>
+<LINE>may we barricado it against him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Keep him out.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>But he assails; and our virginity, though valiant,</LINE>
+<LINE>in the defence yet is weak: unfold to us some</LINE>
+<LINE>warlike resistance.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>There is none: man, sitting down before you, will</LINE>
+<LINE>undermine you and blow you up.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Bless our poor virginity from underminers and</LINE>
+<LINE>blowers up! Is there no military policy, how</LINE>
+<LINE>virgins might blow up men?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Virginity being blown down, man will quicklier be</LINE>
+<LINE>blown up: marry, in blowing him down again, with</LINE>
+<LINE>the breach yourselves made, you lose your city. It</LINE>
+<LINE>is not politic in the commonwealth of nature to</LINE>
+<LINE>preserve virginity. Loss of virginity is rational</LINE>
+<LINE>increase and there was never virgin got till</LINE>
+<LINE>virginity was first lost. That you were made of is</LINE>
+<LINE>metal to make virgins. Virginity by being once lost</LINE>
+<LINE>may be ten times found; by being ever kept, it is</LINE>
+<LINE>ever lost: 'tis too cold a companion; away with 't!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I will stand for 't a little, though therefore I die a virgin.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>There's little can be said in 't; 'tis against the</LINE>
+<LINE>rule of nature. To speak on the part of virginity,</LINE>
+<LINE>is to accuse your mothers; which is most infallible</LINE>
+<LINE>disobedience. He that hangs himself is a virgin:</LINE>
+<LINE>virginity murders itself and should be buried in</LINE>
+<LINE>highways out of all sanctified limit, as a desperate</LINE>
+<LINE>offendress against nature. Virginity breeds mites,</LINE>
+<LINE>much like a cheese; consumes itself to the very</LINE>
+<LINE>paring, and so dies with feeding his own stomach.</LINE>
+<LINE>Besides, virginity is peevish, proud, idle, made of</LINE>
+<LINE>self-love, which is the most inhibited sin in the</LINE>
+<LINE>canon. Keep it not; you cannot choose but loose</LINE>
+<LINE>by't: out with 't! within ten year it will make</LINE>
+<LINE>itself ten, which is a goodly increase; and the</LINE>
+<LINE>principal itself not much the worse: away with 't!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>How might one do, sir, to lose it to her own liking?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Let me see: marry, ill, to like him that ne'er it</LINE>
+<LINE>likes. 'Tis a commodity will lose the gloss with</LINE>
+<LINE>lying; the longer kept, the less worth: off with 't</LINE>
+<LINE>while 'tis vendible; answer the time of request.</LINE>
+<LINE>Virginity, like an old courtier, wears her cap out</LINE>
+<LINE>of fashion: richly suited, but unsuitable: just</LINE>
+<LINE>like the brooch and the tooth-pick, which wear not</LINE>
+<LINE>now. Your date is better in your pie and your</LINE>
+<LINE>porridge than in your cheek; and your virginity,</LINE>
+<LINE>your old virginity, is like one of our French</LINE>
+<LINE>withered pears, it looks ill, it eats drily; marry,</LINE>
+<LINE>'tis a withered pear; it was formerly better;</LINE>
+<LINE>marry, yet 'tis a withered pear: will you anything with it?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Not my virginity yet</LINE>
+<LINE>There shall your master have a thousand loves,</LINE>
+<LINE>A mother and a mistress and a friend,</LINE>
+<LINE>A phoenix, captain and an enemy,</LINE>
+<LINE>A guide, a goddess, and a sovereign,</LINE>
+<LINE>A counsellor, a traitress, and a dear;</LINE>
+<LINE>His humble ambition, proud humility,</LINE>
+<LINE>His jarring concord, and his discord dulcet,</LINE>
+<LINE>His faith, his sweet disaster; with a world</LINE>
+<LINE>Of pretty, fond, adoptious christendoms,</LINE>
+<LINE>That blinking Cupid gossips. Now shall he--</LINE>
+<LINE>I know not what he shall. God send him well!</LINE>
+<LINE>The court's a learning place, and he is one--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What one, i' faith?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That I wish well. 'Tis pity--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What's pity?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That wishing well had not a body in't,</LINE>
+<LINE>Which might be felt; that we, the poorer born,</LINE>
+<LINE>Whose baser stars do shut us up in wishes,</LINE>
+<LINE>Might with effects of them follow our friends,</LINE>
+<LINE>And show what we alone must think, which never</LINE>
+<LINE>Return us thanks.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter Page</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Page</SPEAKER>
+<LINE>Monsieur Parolles, my lord calls for you.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Little Helen, farewell; if I can remember thee, I</LINE>
+<LINE>will think of thee at court.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Monsieur Parolles, you were born under a charitable star.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Under Mars, I.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I especially think, under Mars.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why under Mars?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>The wars have so kept you under that you must needs</LINE>
+<LINE>be born under Mars.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>When he was predominant.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>When he was retrograde, I think, rather.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why think you so?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>You go so much backward when you fight.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That's for advantage.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>So is running away, when fear proposes the safety;</LINE>
+<LINE>but the composition that your valour and fear makes</LINE>
+<LINE>in you is a virtue of a good wing, and I like the wear well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I am so full of businesses, I cannot answer thee</LINE>
+<LINE>acutely. I will return perfect courtier; in the</LINE>
+<LINE>which, my instruction shall serve to naturalize</LINE>
+<LINE>thee, so thou wilt be capable of a courtier's</LINE>
+<LINE>counsel and understand what advice shall thrust upon</LINE>
+<LINE>thee; else thou diest in thine unthankfulness, and</LINE>
+<LINE>thine ignorance makes thee away: farewell. When</LINE>
+<LINE>thou hast leisure, say thy prayers; when thou hast</LINE>
+<LINE>none, remember thy friends; get thee a good husband,</LINE>
+<LINE>and use him as he uses thee; so, farewell.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Our remedies oft in ourselves do lie,</LINE>
+<LINE>Which we ascribe to heaven: the fated sky</LINE>
+<LINE>Gives us free scope, only doth backward pull</LINE>
+<LINE>Our slow designs when we ourselves are dull.</LINE>
+<LINE>What power is it which mounts my love so high,</LINE>
+<LINE>That makes me see, and cannot feed mine eye?</LINE>
+<LINE>The mightiest space in fortune nature brings</LINE>
+<LINE>To join like likes and kiss like native things.</LINE>
+<LINE>Impossible be strange attempts to those</LINE>
+<LINE>That weigh their pains in sense and do suppose</LINE>
+<LINE>What hath been cannot be: who ever strove</LINE>
+<LINE>So show her merit, that did miss her love?</LINE>
+<LINE>The king's disease--my project may deceive me,</LINE>
+<LINE>But my intents are fix'd and will not leave me.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Flourish of cornets. Enter the KING of France,
+with letters, and divers Attendants</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>The Florentines and Senoys are by the ears;</LINE>
+<LINE>Have fought with equal fortune and continue</LINE>
+<LINE>A braving war.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>So 'tis reported, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Nay, 'tis most credible; we here received it</LINE>
+<LINE>A certainty, vouch'd from our cousin Austria,</LINE>
+<LINE>With caution that the Florentine will move us</LINE>
+<LINE>For speedy aid; wherein our dearest friend</LINE>
+<LINE>Prejudicates the business and would seem</LINE>
+<LINE>To have us make denial.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>His love and wisdom,</LINE>
+<LINE>Approved so to your majesty, may plead</LINE>
+<LINE>For amplest credence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>He hath arm'd our answer,</LINE>
+<LINE>And Florence is denied before he comes:</LINE>
+<LINE>Yet, for our gentlemen that mean to see</LINE>
+<LINE>The Tuscan service, freely have they leave</LINE>
+<LINE>To stand on either part.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>It well may serve</LINE>
+<LINE>A nursery to our gentry, who are sick</LINE>
+<LINE>For breathing and exploit.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What's he comes here?</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter BERTRAM, LAFEU, and PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>It is the Count Rousillon, my good lord,</LINE>
+<LINE>Young Bertram.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Youth, thou bear'st thy father's face;</LINE>
+<LINE>Frank nature, rather curious than in haste,</LINE>
+<LINE>Hath well composed thee. Thy father's moral parts</LINE>
+<LINE>Mayst thou inherit too! Welcome to Paris.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My thanks and duty are your majesty's.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I would I had that corporal soundness now,</LINE>
+<LINE>As when thy father and myself in friendship</LINE>
+<LINE>First tried our soldiership! He did look far</LINE>
+<LINE>Into the service of the time and was</LINE>
+<LINE>Discipled of the bravest: he lasted long;</LINE>
+<LINE>But on us both did haggish age steal on</LINE>
+<LINE>And wore us out of act. It much repairs me</LINE>
+<LINE>To talk of your good father. In his youth</LINE>
+<LINE>He had the wit which I can well observe</LINE>
+<LINE>To-day in our young lords; but they may jest</LINE>
+<LINE>Till their own scorn return to them unnoted</LINE>
+<LINE>Ere they can hide their levity in honour;</LINE>
+<LINE>So like a courtier, contempt nor bitterness</LINE>
+<LINE>Were in his pride or sharpness; if they were,</LINE>
+<LINE>His equal had awaked them, and his honour,</LINE>
+<LINE>Clock to itself, knew the true minute when</LINE>
+<LINE>Exception bid him speak, and at this time</LINE>
+<LINE>His tongue obey'd his hand: who were below him</LINE>
+<LINE>He used as creatures of another place</LINE>
+<LINE>And bow'd his eminent top to their low ranks,</LINE>
+<LINE>Making them proud of his humility,</LINE>
+<LINE>In their poor praise he humbled. Such a man</LINE>
+<LINE>Might be a copy to these younger times;</LINE>
+<LINE>Which, follow'd well, would demonstrate them now</LINE>
+<LINE>But goers backward.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>His good remembrance, sir,</LINE>
+<LINE>Lies richer in your thoughts than on his tomb;</LINE>
+<LINE>So in approof lives not his epitaph</LINE>
+<LINE>As in your royal speech.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Would I were with him! He would always say--</LINE>
+<LINE>Methinks I hear him now; his plausive words</LINE>
+<LINE>He scatter'd not in ears, but grafted them,</LINE>
+<LINE>To grow there and to bear,--'Let me not live,'--</LINE>
+<LINE>This his good melancholy oft began,</LINE>
+<LINE>On the catastrophe and heel of pastime,</LINE>
+<LINE>When it was out,--'Let me not live,' quoth he,</LINE>
+<LINE>'After my flame lacks oil, to be the snuff</LINE>
+<LINE>Of younger spirits, whose apprehensive senses</LINE>
+<LINE>All but new things disdain; whose judgments are</LINE>
+<LINE>Mere fathers of their garments; whose constancies</LINE>
+<LINE>Expire before their fashions.' This he wish'd;</LINE>
+<LINE>I after him do after him wish too,</LINE>
+<LINE>Since I nor wax nor honey can bring home,</LINE>
+<LINE>I quickly were dissolved from my hive,</LINE>
+<LINE>To give some labourers room.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>You are loved, sir:</LINE>
+<LINE>They that least lend it you shall lack you first.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I fill a place, I know't. How long is't, count,</LINE>
+<LINE>Since the physician at your father's died?</LINE>
+<LINE>He was much famed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Some six months since, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>If he were living, I would try him yet.</LINE>
+<LINE>Lend me an arm; the rest have worn me out</LINE>
+<LINE>With several applications; nature and sickness</LINE>
+<LINE>Debate it at their leisure. Welcome, count;</LINE>
+<LINE>My son's no dearer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Thank your majesty.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt. Flourish</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS, Steward, and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I will now hear; what say you of this gentlewoman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>Madam, the care I have had to even your content, I</LINE>
+<LINE>wish might be found in the calendar of my past</LINE>
+<LINE>endeavours; for then we wound our modesty and make</LINE>
+<LINE>foul the clearness of our deservings, when of</LINE>
+<LINE>ourselves we publish them.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What does this knave here? Get you gone, sirrah:</LINE>
+<LINE>the complaints I have heard of you I do not all</LINE>
+<LINE>believe: 'tis my slowness that I do not; for I know</LINE>
+<LINE>you lack not folly to commit them, and have ability</LINE>
+<LINE>enough to make such knaveries yours.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>'Tis not unknown to you, madam, I am a poor fellow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Well, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>No, madam, 'tis not so well that I am poor, though</LINE>
+<LINE>many of the rich are damned: but, if I may have</LINE>
+<LINE>your ladyship's good will to go to the world, Isbel</LINE>
+<LINE>the woman and I will do as we may.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Wilt thou needs be a beggar?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I do beg your good will in this case.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>In what case?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>In Isbel's case and mine own. Service is no</LINE>
+<LINE>heritage: and I think I shall never have the</LINE>
+<LINE>blessing of God till I have issue o' my body; for</LINE>
+<LINE>they say barnes are blessings.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Tell me thy reason why thou wilt marry.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>My poor body, madam, requires it: I am driven on</LINE>
+<LINE>by the flesh; and he must needs go that the devil drives.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Is this all your worship's reason?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Faith, madam, I have other holy reasons such as they</LINE>
+<LINE>are.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>May the world know them?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I have been, madam, a wicked creature, as you and</LINE>
+<LINE>all flesh and blood are; and, indeed, I do marry</LINE>
+<LINE>that I may repent.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Thy marriage, sooner than thy wickedness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I am out o' friends, madam; and I hope to have</LINE>
+<LINE>friends for my wife's sake.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Such friends are thine enemies, knave.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>You're shallow, madam, in great friends; for the</LINE>
+<LINE>knaves come to do that for me which I am aweary of.</LINE>
+<LINE>He that ears my land spares my team and gives me</LINE>
+<LINE>leave to in the crop; if I be his cuckold, he's my</LINE>
+<LINE>drudge: he that comforts my wife is the cherisher</LINE>
+<LINE>of my flesh and blood; he that cherishes my flesh</LINE>
+<LINE>and blood loves my flesh and blood; he that loves my</LINE>
+<LINE>flesh and blood is my friend: ergo, he that kisses</LINE>
+<LINE>my wife is my friend. If men could be contented to</LINE>
+<LINE>be what they are, there were no fear in marriage;</LINE>
+<LINE>for young Charbon the Puritan and old Poysam the</LINE>
+<LINE>Papist, howsome'er their hearts are severed in</LINE>
+<LINE>religion, their heads are both one; they may jowl</LINE>
+<LINE>horns together, like any deer i' the herd.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Wilt thou ever be a foul-mouthed and calumnious knave?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>A prophet I, madam; and I speak the truth the next</LINE>
+<LINE>way:</LINE>
+<LINE>For I the ballad will repeat,</LINE>
+<LINE>Which men full true shall find;</LINE>
+<LINE>Your marriage comes by destiny,</LINE>
+<LINE>Your cuckoo sings by kind.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Get you gone, sir; I'll talk with you more anon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>May it please you, madam, that he bid Helen come to</LINE>
+<LINE>you: of her I am to speak.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Sirrah, tell my gentlewoman I would speak with her;</LINE>
+<LINE>Helen, I mean.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Was this fair face the cause, quoth she,</LINE>
+<LINE>Why the Grecians sacked Troy?</LINE>
+<LINE>Fond done, done fond,</LINE>
+<LINE>Was this King Priam's joy?</LINE>
+<LINE>With that she sighed as she stood,</LINE>
+<LINE>With that she sighed as she stood,</LINE>
+<LINE>And gave this sentence then;</LINE>
+<LINE>Among nine bad if one be good,</LINE>
+<LINE>Among nine bad if one be good,</LINE>
+<LINE>There's yet one good in ten.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What, one good in ten? you corrupt the song, sirrah.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>One good woman in ten, madam; which is a purifying</LINE>
+<LINE>o' the song: would God would serve the world so all</LINE>
+<LINE>the year! we'ld find no fault with the tithe-woman,</LINE>
+<LINE>if I were the parson. One in ten, quoth a'! An we</LINE>
+<LINE>might have a good woman born but one every blazing</LINE>
+<LINE>star, or at an earthquake, 'twould mend the lottery</LINE>
+<LINE>well: a man may draw his heart out, ere a' pluck</LINE>
+<LINE>one.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You'll be gone, sir knave, and do as I command you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>That man should be at woman's command, and yet no</LINE>
+<LINE>hurt done! Though honesty be no puritan, yet it</LINE>
+<LINE>will do no hurt; it will wear the surplice of</LINE>
+<LINE>humility over the black gown of a big heart. I am</LINE>
+<LINE>going, forsooth: the business is for Helen to come hither.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Well, now.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>I know, madam, you love your gentlewoman entirely.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Faith, I do: her father bequeathed her to me; and</LINE>
+<LINE>she herself, without other advantage, may lawfully</LINE>
+<LINE>make title to as much love as she finds: there is</LINE>
+<LINE>more owing her than is paid; and more shall be paid</LINE>
+<LINE>her than she'll demand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>Madam, I was very late more near her than I think</LINE>
+<LINE>she wished me: alone she was, and did communicate</LINE>
+<LINE>to herself her own words to her own ears; she</LINE>
+<LINE>thought, I dare vow for her, they touched not any</LINE>
+<LINE>stranger sense. Her matter was, she loved your son:</LINE>
+<LINE>Fortune, she said, was no goddess, that had put</LINE>
+<LINE>such difference betwixt their two estates; Love no</LINE>
+<LINE>god, that would not extend his might, only where</LINE>
+<LINE>qualities were level; Dian no queen of virgins, that</LINE>
+<LINE>would suffer her poor knight surprised, without</LINE>
+<LINE>rescue in the first assault or ransom afterward.</LINE>
+<LINE>This she delivered in the most bitter touch of</LINE>
+<LINE>sorrow that e'er I heard virgin exclaim in: which I</LINE>
+<LINE>held my duty speedily to acquaint you withal;</LINE>
+<LINE>sithence, in the loss that may happen, it concerns</LINE>
+<LINE>you something to know it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You have discharged this honestly; keep it to</LINE>
+<LINE>yourself: many likelihoods informed me of this</LINE>
+<LINE>before, which hung so tottering in the balance that</LINE>
+<LINE>I could neither believe nor misdoubt. Pray you,</LINE>
+<LINE>leave me: stall this in your bosom; and I thank you</LINE>
+<LINE>for your honest care: I will speak with you further anon.</LINE>
+<STAGEDIR>Exit Steward</STAGEDIR>
+<STAGEDIR>Enter HELENA</STAGEDIR>
+<LINE>Even so it was with me when I was young:</LINE>
+<LINE>If ever we are nature's, these are ours; this thorn</LINE>
+<LINE>Doth to our rose of youth rightly belong;</LINE>
+<LINE>Our blood to us, this to our blood is born;</LINE>
+<LINE>It is the show and seal of nature's truth,</LINE>
+<LINE>Where love's strong passion is impress'd in youth:</LINE>
+<LINE>By our remembrances of days foregone,</LINE>
+<LINE>Such were our faults, or then we thought them none.</LINE>
+<LINE>Her eye is sick on't: I observe her now.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What is your pleasure, madam?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You know, Helen,</LINE>
+<LINE>I am a mother to you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Mine honourable mistress.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Nay, a mother:</LINE>
+<LINE>Why not a mother? When I said 'a mother,'</LINE>
+<LINE>Methought you saw a serpent: what's in 'mother,'</LINE>
+<LINE>That you start at it? I say, I am your mother;</LINE>
+<LINE>And put you in the catalogue of those</LINE>
+<LINE>That were enwombed mine: 'tis often seen</LINE>
+<LINE>Adoption strives with nature and choice breeds</LINE>
+<LINE>A native slip to us from foreign seeds:</LINE>
+<LINE>You ne'er oppress'd me with a mother's groan,</LINE>
+<LINE>Yet I express to you a mother's care:</LINE>
+<LINE>God's mercy, maiden! does it curd thy blood</LINE>
+<LINE>To say I am thy mother? What's the matter,</LINE>
+<LINE>That this distemper'd messenger of wet,</LINE>
+<LINE>The many-colour'd Iris, rounds thine eye?</LINE>
+<LINE>Why? that you are my daughter?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That I am not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I say, I am your mother.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Pardon, madam;</LINE>
+<LINE>The Count Rousillon cannot be my brother:</LINE>
+<LINE>I am from humble, he from honour'd name;</LINE>
+<LINE>No note upon my parents, his all noble:</LINE>
+<LINE>My master, my dear lord he is; and I</LINE>
+<LINE>His servant live, and will his vassal die:</LINE>
+<LINE>He must not be my brother.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Nor I your mother?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>You are my mother, madam; would you were,--</LINE>
+<LINE>So that my lord your son were not my brother,--</LINE>
+<LINE>Indeed my mother! or were you both our mothers,</LINE>
+<LINE>I care no more for than I do for heaven,</LINE>
+<LINE>So I were not his sister. Can't no other,</LINE>
+<LINE>But, I your daughter, he must be my brother?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Yes, Helen, you might be my daughter-in-law:</LINE>
+<LINE>God shield you mean it not! daughter and mother</LINE>
+<LINE>So strive upon your pulse. What, pale again?</LINE>
+<LINE>My fear hath catch'd your fondness: now I see</LINE>
+<LINE>The mystery of your loneliness, and find</LINE>
+<LINE>Your salt tears' head: now to all sense 'tis gross</LINE>
+<LINE>You love my son; invention is ashamed,</LINE>
+<LINE>Against the proclamation of thy passion,</LINE>
+<LINE>To say thou dost not: therefore tell me true;</LINE>
+<LINE>But tell me then, 'tis so; for, look thy cheeks</LINE>
+<LINE>Confess it, th' one to th' other; and thine eyes</LINE>
+<LINE>See it so grossly shown in thy behaviors</LINE>
+<LINE>That in their kind they speak it: only sin</LINE>
+<LINE>And hellish obstinacy tie thy tongue,</LINE>
+<LINE>That truth should be suspected. Speak, is't so?</LINE>
+<LINE>If it be so, you have wound a goodly clew;</LINE>
+<LINE>If it be not, forswear't: howe'er, I charge thee,</LINE>
+<LINE>As heaven shall work in me for thine avail,</LINE>
+<LINE>Tell me truly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Good madam, pardon me!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Do you love my son?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Your pardon, noble mistress!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Love you my son?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Do not you love him, madam?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Go not about; my love hath in't a bond,</LINE>
+<LINE>Whereof the world takes note: come, come, disclose</LINE>
+<LINE>The state of your affection; for your passions</LINE>
+<LINE>Have to the full appeach'd.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Then, I confess,</LINE>
+<LINE>Here on my knee, before high heaven and you,</LINE>
+<LINE>That before you, and next unto high heaven,</LINE>
+<LINE>I love your son.</LINE>
+<LINE>My friends were poor, but honest; so's my love:</LINE>
+<LINE>Be not offended; for it hurts not him</LINE>
+<LINE>That he is loved of me: I follow him not</LINE>
+<LINE>By any token of presumptuous suit;</LINE>
+<LINE>Nor would I have him till I do deserve him;</LINE>
+<LINE>Yet never know how that desert should be.</LINE>
+<LINE>I know I love in vain, strive against hope;</LINE>
+<LINE>Yet in this captious and intenible sieve</LINE>
+<LINE>I still pour in the waters of my love</LINE>
+<LINE>And lack not to lose still: thus, Indian-like,</LINE>
+<LINE>Religious in mine error, I adore</LINE>
+<LINE>The sun, that looks upon his worshipper,</LINE>
+<LINE>But knows of him no more. My dearest madam,</LINE>
+<LINE>Let not your hate encounter with my love</LINE>
+<LINE>For loving where you do: but if yourself,</LINE>
+<LINE>Whose aged honour cites a virtuous youth,</LINE>
+<LINE>Did ever in so true a flame of liking</LINE>
+<LINE>Wish chastely and love dearly, that your Dian</LINE>
+<LINE>Was both herself and love: O, then, give pity</LINE>
+<LINE>To her, whose state is such that cannot choose</LINE>
+<LINE>But lend and give where she is sure to lose;</LINE>
+<LINE>That seeks not to find that her search implies,</LINE>
+<LINE>But riddle-like lives sweetly where she dies!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Had you not lately an intent,--speak truly,--</LINE>
+<LINE>To go to Paris?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Madam, I had.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Wherefore? tell true.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I will tell truth; by grace itself I swear.</LINE>
+<LINE>You know my father left me some prescriptions</LINE>
+<LINE>Of rare and proved effects, such as his reading</LINE>
+<LINE>And manifest experience had collected</LINE>
+<LINE>For general sovereignty; and that he will'd me</LINE>
+<LINE>In heedfull'st reservation to bestow them,</LINE>
+<LINE>As notes whose faculties inclusive were</LINE>
+<LINE>More than they were in note: amongst the rest,</LINE>
+<LINE>There is a remedy, approved, set down,</LINE>
+<LINE>To cure the desperate languishings whereof</LINE>
+<LINE>The king is render'd lost.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>This was your motive</LINE>
+<LINE>For Paris, was it? speak.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>My lord your son made me to think of this;</LINE>
+<LINE>Else Paris and the medicine and the king</LINE>
+<LINE>Had from the conversation of my thoughts</LINE>
+<LINE>Haply been absent then.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>But think you, Helen,</LINE>
+<LINE>If you should tender your supposed aid,</LINE>
+<LINE>He would receive it? he and his physicians</LINE>
+<LINE>Are of a mind; he, that they cannot help him,</LINE>
+<LINE>They, that they cannot help: how shall they credit</LINE>
+<LINE>A poor unlearned virgin, when the schools,</LINE>
+<LINE>Embowell'd of their doctrine, have left off</LINE>
+<LINE>The danger to itself?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>There's something in't,</LINE>
+<LINE>More than my father's skill, which was the greatest</LINE>
+<LINE>Of his profession, that his good receipt</LINE>
+<LINE>Shall for my legacy be sanctified</LINE>
+<LINE>By the luckiest stars in heaven: and, would your honour</LINE>
+<LINE>But give me leave to try success, I'ld venture</LINE>
+<LINE>The well-lost life of mine on his grace's cure</LINE>
+<LINE>By such a day and hour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Dost thou believe't?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay, madam, knowingly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Why, Helen, thou shalt have my leave and love,</LINE>
+<LINE>Means and attendants and my loving greetings</LINE>
+<LINE>To those of mine in court: I'll stay at home</LINE>
+<LINE>And pray God's blessing into thy attempt:</LINE>
+<LINE>Be gone to-morrow; and be sure of this,</LINE>
+<LINE>What I can help thee to thou shalt not miss.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+</ACT>
+
+<ACT><TITLE>ACT II</TITLE>
+
+<SCENE><TITLE>SCENE I.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Flourish of cornets. Enter the KING, attended
+with divers young Lords taking leave for the
+Florentine war; BERTRAM, and PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Farewell, young lords; these warlike principles</LINE>
+<LINE>Do not throw from you: and you, my lords, farewell:</LINE>
+<LINE>Share the advice betwixt you; if both gain, all</LINE>
+<LINE>The gift doth stretch itself as 'tis received,</LINE>
+<LINE>And is enough for both.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>'Tis our hope, sir,</LINE>
+<LINE>After well enter'd soldiers, to return</LINE>
+<LINE>And find your grace in health.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>No, no, it cannot be; and yet my heart</LINE>
+<LINE>Will not confess he owes the malady</LINE>
+<LINE>That doth my life besiege. Farewell, young lords;</LINE>
+<LINE>Whether I live or die, be you the sons</LINE>
+<LINE>Of worthy Frenchmen: let higher Italy,--</LINE>
+<LINE>Those bated that inherit but the fall</LINE>
+<LINE>Of the last monarchy,--see that you come</LINE>
+<LINE>Not to woo honour, but to wed it; when</LINE>
+<LINE>The bravest questant shrinks, find what you seek,</LINE>
+<LINE>That fame may cry you loud: I say, farewell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Health, at your bidding, serve your majesty!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Those girls of Italy, take heed of them:</LINE>
+<LINE>They say, our French lack language to deny,</LINE>
+<LINE>If they demand: beware of being captives,</LINE>
+<LINE>Before you serve.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Both</SPEAKER>
+<LINE>Our hearts receive your warnings.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Farewell. Come hither to me.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit, attended</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>O, my sweet lord, that you will stay behind us!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>'Tis not his fault, the spark.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>O, 'tis brave wars!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Most admirable: I have seen those wars.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I am commanded here, and kept a coil with</LINE>
+<LINE>'Too young' and 'the next year' and ''tis too early.'</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>An thy mind stand to't, boy, steal away bravely.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I shall stay here the forehorse to a smock,</LINE>
+<LINE>Creaking my shoes on the plain masonry,</LINE>
+<LINE>Till honour be bought up and no sword worn</LINE>
+<LINE>But one to dance with! By heaven, I'll steal away.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>There's honour in the theft.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Commit it, count.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I am your accessary; and so, farewell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I grow to you, and our parting is a tortured body.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Farewell, captain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Sweet Monsieur Parolles!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Noble heroes, my sword and yours are kin. Good</LINE>
+<LINE>sparks and lustrous, a word, good metals: you shall</LINE>
+<LINE>find in the regiment of the Spinii one Captain</LINE>
+<LINE>Spurio, with his cicatrice, an emblem of war, here</LINE>
+<LINE>on his sinister cheek; it was this very sword</LINE>
+<LINE>entrenched it: say to him, I live; and observe his</LINE>
+<LINE>reports for me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>We shall, noble captain.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt Lords</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Mars dote on you for his novices! what will ye do?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Stay: the king.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter KING. BERTRAM and PAROLLES retire</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE><STAGEDIR>To BERTRAM</STAGEDIR>  Use a more spacious ceremony to the</LINE>
+<LINE>noble lords; you have restrained yourself within the</LINE>
+<LINE>list of too cold an adieu: be more expressive to</LINE>
+<LINE>them: for they wear themselves in the cap of the</LINE>
+<LINE>time, there do muster true gait, eat, speak, and</LINE>
+<LINE>move under the influence of the most received star;</LINE>
+<LINE>and though the devil lead the measure, such are to</LINE>
+<LINE>be followed: after them, and take a more dilated farewell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>And I will do so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Worthy fellows; and like to prove most sinewy sword-men.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt BERTRAM and PAROLLES</STAGEDIR>
+<STAGEDIR>Enter LAFEU</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE><STAGEDIR>Kneeling</STAGEDIR>  Pardon, my lord, for me and for my tidings.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I'll fee thee to stand up.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Then here's a man stands, that has brought his pardon.</LINE>
+<LINE>I would you had kneel'd, my lord, to ask me mercy,</LINE>
+<LINE>And that at my bidding you could so stand up.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I would I had; so I had broke thy pate,</LINE>
+<LINE>And ask'd thee mercy for't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Good faith, across: but, my good lord 'tis thus;</LINE>
+<LINE>Will you be cured of your infirmity?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>No.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>O, will you eat no grapes, my royal fox?</LINE>
+<LINE>Yes, but you will my noble grapes, an if</LINE>
+<LINE>My royal fox could reach them: I have seen a medicine</LINE>
+<LINE>That's able to breathe life into a stone,</LINE>
+<LINE>Quicken a rock, and make you dance canary</LINE>
+<LINE>With spritely fire and motion; whose simple touch,</LINE>
+<LINE>Is powerful to araise King Pepin, nay,</LINE>
+<LINE>To give great Charlemain a pen in's hand,</LINE>
+<LINE>And write to her a love-line.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What 'her' is this?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Why, Doctor She: my lord, there's one arrived,</LINE>
+<LINE>If you will see her: now, by my faith and honour,</LINE>
+<LINE>If seriously I may convey my thoughts</LINE>
+<LINE>In this my light deliverance, I have spoke</LINE>
+<LINE>With one that, in her sex, her years, profession,</LINE>
+<LINE>Wisdom and constancy, hath amazed me more</LINE>
+<LINE>Than I dare blame my weakness: will you see her</LINE>
+<LINE>For that is her demand, and know her business?</LINE>
+<LINE>That done, laugh well at me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Now, good Lafeu,</LINE>
+<LINE>Bring in the admiration; that we with thee</LINE>
+<LINE>May spend our wonder too, or take off thine</LINE>
+<LINE>By wondering how thou took'st it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Nay, I'll fit you,</LINE>
+<LINE>And not be all day neither.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thus he his special nothing ever prologues.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter LAFEU, with HELENA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Nay, come your ways.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>This haste hath wings indeed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Nay, come your ways:</LINE>
+<LINE>This is his majesty; say your mind to him:</LINE>
+<LINE>A traitor you do look like; but such traitors</LINE>
+<LINE>His majesty seldom fears: I am Cressid's uncle,</LINE>
+<LINE>That dare leave two together; fare you well.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Now, fair one, does your business follow us?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay, my good lord.</LINE>
+<LINE>Gerard de Narbon was my father;</LINE>
+<LINE>In what he did profess, well found.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I knew him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>The rather will I spare my praises towards him:</LINE>
+<LINE>Knowing him is enough. On's bed of death</LINE>
+<LINE>Many receipts he gave me: chiefly one.</LINE>
+<LINE>Which, as the dearest issue of his practise,</LINE>
+<LINE>And of his old experience the oily darling,</LINE>
+<LINE>He bade me store up, as a triple eye,</LINE>
+<LINE>Safer than mine own two, more dear; I have so;</LINE>
+<LINE>And hearing your high majesty is touch'd</LINE>
+<LINE>With that malignant cause wherein the honour</LINE>
+<LINE>Of my dear father's gift stands chief in power,</LINE>
+<LINE>I come to tender it and my appliance</LINE>
+<LINE>With all bound humbleness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>We thank you, maiden;</LINE>
+<LINE>But may not be so credulous of cure,</LINE>
+<LINE>When our most learned doctors leave us and</LINE>
+<LINE>The congregated college have concluded</LINE>
+<LINE>That labouring art can never ransom nature</LINE>
+<LINE>From her inaidible estate; I say we must not</LINE>
+<LINE>So stain our judgment, or corrupt our hope,</LINE>
+<LINE>To prostitute our past-cure malady</LINE>
+<LINE>To empirics, or to dissever so</LINE>
+<LINE>Our great self and our credit, to esteem</LINE>
+<LINE>A senseless help when help past sense we deem.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>My duty then shall pay me for my pains:</LINE>
+<LINE>I will no more enforce mine office on you.</LINE>
+<LINE>Humbly entreating from your royal thoughts</LINE>
+<LINE>A modest one, to bear me back a again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I cannot give thee less, to be call'd grateful:</LINE>
+<LINE>Thou thought'st to help me; and such thanks I give</LINE>
+<LINE>As one near death to those that wish him live:</LINE>
+<LINE>But what at full I know, thou know'st no part,</LINE>
+<LINE>I knowing all my peril, thou no art.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What I can do can do no hurt to try,</LINE>
+<LINE>Since you set up your rest 'gainst remedy.</LINE>
+<LINE>He that of greatest works is finisher</LINE>
+<LINE>Oft does them by the weakest minister:</LINE>
+<LINE>So holy writ in babes hath judgment shown,</LINE>
+<LINE>When judges have been babes; great floods have flown</LINE>
+<LINE>From simple sources, and great seas have dried</LINE>
+<LINE>When miracles have by the greatest been denied.</LINE>
+<LINE>Oft expectation fails and most oft there</LINE>
+<LINE>Where most it promises, and oft it hits</LINE>
+<LINE>Where hope is coldest and despair most fits.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I must not hear thee; fare thee well, kind maid;</LINE>
+<LINE>Thy pains not used must by thyself be paid:</LINE>
+<LINE>Proffers not took reap thanks for their reward.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Inspired merit so by breath is barr'd:</LINE>
+<LINE>It is not so with Him that all things knows</LINE>
+<LINE>As 'tis with us that square our guess by shows;</LINE>
+<LINE>But most it is presumption in us when</LINE>
+<LINE>The help of heaven we count the act of men.</LINE>
+<LINE>Dear sir, to my endeavours give consent;</LINE>
+<LINE>Of heaven, not me, make an experiment.</LINE>
+<LINE>I am not an impostor that proclaim</LINE>
+<LINE>Myself against the level of mine aim;</LINE>
+<LINE>But know I think and think I know most sure</LINE>
+<LINE>My art is not past power nor you past cure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Are thou so confident? within what space</LINE>
+<LINE>Hopest thou my cure?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>The great'st grace lending grace</LINE>
+<LINE>Ere twice the horses of the sun shall bring</LINE>
+<LINE>Their fiery torcher his diurnal ring,</LINE>
+<LINE>Ere twice in murk and occidental damp</LINE>
+<LINE>Moist Hesperus hath quench'd his sleepy lamp,</LINE>
+<LINE>Or four and twenty times the pilot's glass</LINE>
+<LINE>Hath told the thievish minutes how they pass,</LINE>
+<LINE>What is infirm from your sound parts shall fly,</LINE>
+<LINE>Health shall live free and sickness freely die.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Upon thy certainty and confidence</LINE>
+<LINE>What darest thou venture?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Tax of impudence,</LINE>
+<LINE>A strumpet's boldness, a divulged shame</LINE>
+<LINE>Traduced by odious ballads: my maiden's name</LINE>
+<LINE>Sear'd otherwise; nay, worse--if worse--extended</LINE>
+<LINE>With vilest torture let my life be ended.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Methinks in thee some blessed spirit doth speak</LINE>
+<LINE>His powerful sound within an organ weak:</LINE>
+<LINE>And what impossibility would slay</LINE>
+<LINE>In common sense, sense saves another way.</LINE>
+<LINE>Thy life is dear; for all that life can rate</LINE>
+<LINE>Worth name of life in thee hath estimate,</LINE>
+<LINE>Youth, beauty, wisdom, courage, all</LINE>
+<LINE>That happiness and prime can happy call:</LINE>
+<LINE>Thou this to hazard needs must intimate</LINE>
+<LINE>Skill infinite or monstrous desperate.</LINE>
+<LINE>Sweet practiser, thy physic I will try,</LINE>
+<LINE>That ministers thine own death if I die.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>If I break time, or flinch in property</LINE>
+<LINE>Of what I spoke, unpitied let me die,</LINE>
+<LINE>And well deserved: not helping, death's my fee;</LINE>
+<LINE>But, if I help, what do you promise me?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Make thy demand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>But will you make it even?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Ay, by my sceptre and my hopes of heaven.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Then shalt thou give me with thy kingly hand</LINE>
+<LINE>What husband in thy power I will command:</LINE>
+<LINE>Exempted be from me the arrogance</LINE>
+<LINE>To choose from forth the royal blood of France,</LINE>
+<LINE>My low and humble name to propagate</LINE>
+<LINE>With any branch or image of thy state;</LINE>
+<LINE>But such a one, thy vassal, whom I know</LINE>
+<LINE>Is free for me to ask, thee to bestow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Here is my hand; the premises observed,</LINE>
+<LINE>Thy will by my performance shall be served:</LINE>
+<LINE>So make the choice of thy own time, for I,</LINE>
+<LINE>Thy resolved patient, on thee still rely.</LINE>
+<LINE>More should I question thee, and more I must,</LINE>
+<LINE>Though more to know could not be more to trust,</LINE>
+<LINE>From whence thou camest, how tended on: but rest</LINE>
+<LINE>Unquestion'd welcome and undoubted blest.</LINE>
+<LINE>Give me some help here, ho! If thou proceed</LINE>
+<LINE>As high as word, my deed shall match thy meed.</LINE>
+</SPEECH>
+
+<STAGEDIR>Flourish. Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Come on, sir; I shall now put you to the height of</LINE>
+<LINE>your breeding.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I will show myself highly fed and lowly taught: I</LINE>
+<LINE>know my business is but to the court.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>To the court! why, what place make you special,</LINE>
+<LINE>when you put off that with such contempt? But to the court!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Truly, madam, if God have lent a man any manners, he</LINE>
+<LINE>may easily put it off at court: he that cannot make</LINE>
+<LINE>a leg, put off's cap, kiss his hand and say nothing,</LINE>
+<LINE>has neither leg, hands, lip, nor cap; and indeed</LINE>
+<LINE>such a fellow, to say precisely, were not for the</LINE>
+<LINE>court; but for me, I have an answer will serve all</LINE>
+<LINE>men.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Marry, that's a bountiful answer that fits all</LINE>
+<LINE>questions.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>It is like a barber's chair that fits all buttocks,</LINE>
+<LINE>the pin-buttock, the quatch-buttock, the brawn</LINE>
+<LINE>buttock, or any buttock.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Will your answer serve fit to all questions?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>As fit as ten groats is for the hand of an attorney,</LINE>
+<LINE>as your French crown for your taffeta punk, as Tib's</LINE>
+<LINE>rush for Tom's forefinger, as a pancake for Shrove</LINE>
+<LINE>Tuesday, a morris for May-day, as the nail to his</LINE>
+<LINE>hole, the cuckold to his horn, as a scolding queen</LINE>
+<LINE>to a wrangling knave, as the nun's lip to the</LINE>
+<LINE>friar's mouth, nay, as the pudding to his skin.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Have you, I say, an answer of such fitness for all</LINE>
+<LINE>questions?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>From below your duke to beneath your constable, it</LINE>
+<LINE>will fit any question.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>It must be an answer of most monstrous size that</LINE>
+<LINE>must fit all demands.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>But a trifle neither, in good faith, if the learned</LINE>
+<LINE>should speak truth of it: here it is, and all that</LINE>
+<LINE>belongs to't. Ask me if I am a courtier: it shall</LINE>
+<LINE>do you no harm to learn.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>To be young again, if we could: I will be a fool in</LINE>
+<LINE>question, hoping to be the wiser by your answer. I</LINE>
+<LINE>pray you, sir, are you a courtier?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! There's a simple putting off. More,</LINE>
+<LINE>more, a hundred of them.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Sir, I am a poor friend of yours, that loves you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! Thick, thick, spare not me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I think, sir, you can eat none of this homely meat.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! Nay, put me to't, I warrant you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You were lately whipped, sir, as I think.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! spare not me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Do you cry, 'O Lord, sir!' at your whipping, and</LINE>
+<LINE>'spare not me?' Indeed your 'O Lord, sir!' is very</LINE>
+<LINE>sequent to your whipping: you would answer very well</LINE>
+<LINE>to a whipping, if you were but bound to't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I ne'er had worse luck in my life in my 'O Lord,</LINE>
+<LINE>sir!' I see things may serve long, but not serve ever.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I play the noble housewife with the time</LINE>
+<LINE>To entertain't so merrily with a fool.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O Lord, sir! why, there't serves well again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>An end, sir; to your business. Give Helen this,</LINE>
+<LINE>And urge her to a present answer back:</LINE>
+<LINE>Commend me to my kinsmen and my son:</LINE>
+<LINE>This is not much.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Not much commendation to them.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Not much employment for you: you understand me?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Most fruitfully: I am there before my legs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Haste you again.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt severally</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Enter BERTRAM, LAFEU, and PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>They say miracles are past; and we have our</LINE>
+<LINE>philosophical persons, to make modern and familiar,</LINE>
+<LINE>things supernatural and causeless. Hence is it that</LINE>
+<LINE>we make trifles of terrors, ensconcing ourselves</LINE>
+<LINE>into seeming knowledge, when we should submit</LINE>
+<LINE>ourselves to an unknown fear.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, 'tis the rarest argument of wonder that hath</LINE>
+<LINE>shot out in our latter times.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>And so 'tis.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>To be relinquish'd of the artists,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>So I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Both of Galen and Paracelsus.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>So I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Of all the learned and authentic fellows,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Right; so I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>That gave him out incurable,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, there 'tis; so say I too.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Not to be helped,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Right; as 'twere, a man assured of a--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Uncertain life, and sure death.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Just, you say well; so would I have said.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I may truly say, it is a novelty to the world.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>It is, indeed: if you will have it in showing, you</LINE>
+<LINE>shall read it in--what do you call there?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A showing of a heavenly effect in an earthly actor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That's it; I would have said the very same.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Why, your dolphin is not lustier: 'fore me,</LINE>
+<LINE>I speak in respect--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Nay, 'tis strange, 'tis very strange, that is the</LINE>
+<LINE>brief and the tedious of it; and he's of a most</LINE>
+<LINE>facinerious spirit that will not acknowledge it to be the--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Very hand of heaven.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ay, so I say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>In a most weak--</LINE>
+<STAGEDIR>pausing</STAGEDIR>
+<LINE>and debile minister, great power, great</LINE>
+<LINE>transcendence: which should, indeed, give us a</LINE>
+<LINE>further use to be made than alone the recovery of</LINE>
+<LINE>the king, as to be--</LINE>
+<STAGEDIR>pausing</STAGEDIR>
+<LINE>generally thankful.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I would have said it; you say well. Here comes the king.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter KING, HELENA, and Attendants. LAFEU and
+PAROLLES retire</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Lustig, as the Dutchman says: I'll like a maid the</LINE>
+<LINE>better, whilst I have a tooth in my head: why, he's</LINE>
+<LINE>able to lead her a coranto.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Mort du vinaigre! is not this Helen?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>'Fore God, I think so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Go, call before me all the lords in court.</LINE>
+<LINE>Sit, my preserver, by thy patient's side;</LINE>
+<LINE>And with this healthful hand, whose banish'd sense</LINE>
+<LINE>Thou hast repeal'd, a second time receive</LINE>
+<LINE>The confirmation of my promised gift,</LINE>
+<LINE>Which but attends thy naming.</LINE>
+<STAGEDIR>Enter three or four Lords</STAGEDIR>
+<LINE>Fair maid, send forth thine eye: this youthful parcel</LINE>
+<LINE>Of noble bachelors stand at my bestowing,</LINE>
+<LINE>O'er whom both sovereign power and father's voice</LINE>
+<LINE>I have to use: thy frank election make;</LINE>
+<LINE>Thou hast power to choose, and they none to forsake.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>To each of you one fair and virtuous mistress</LINE>
+<LINE>Fall, when Love please! marry, to each, but one!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I'ld give bay Curtal and his furniture,</LINE>
+<LINE>My mouth no more were broken than these boys',</LINE>
+<LINE>And writ as little beard.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Peruse them well:</LINE>
+<LINE>Not one of those but had a noble father.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Gentlemen,</LINE>
+<LINE>Heaven hath through me restored the king to health.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>All</SPEAKER>
+<LINE>We understand it, and thank heaven for you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I am a simple maid, and therein wealthiest,</LINE>
+<LINE>That I protest I simply am a maid.</LINE>
+<LINE>Please it your majesty, I have done already:</LINE>
+<LINE>The blushes in my cheeks thus whisper me,</LINE>
+<LINE>'We blush that thou shouldst choose; but, be refused,</LINE>
+<LINE>Let the white death sit on thy cheek for ever;</LINE>
+<LINE>We'll ne'er come there again.'</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Make choice; and, see,</LINE>
+<LINE>Who shuns thy love shuns all his love in me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Now, Dian, from thy altar do I fly,</LINE>
+<LINE>And to imperial Love, that god most high,</LINE>
+<LINE>Do my sighs stream. Sir, will you hear my suit?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>And grant it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Thanks, sir; all the rest is mute.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I had rather be in this choice than throw ames-ace</LINE>
+<LINE>for my life.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>The honour, sir, that flames in your fair eyes,</LINE>
+<LINE>Before I speak, too threateningly replies:</LINE>
+<LINE>Love make your fortunes twenty times above</LINE>
+<LINE>Her that so wishes and her humble love!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>No better, if you please.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>My wish receive,</LINE>
+<LINE>Which great Love grant! and so, I take my leave.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Do all they deny her? An they were sons of mine,</LINE>
+<LINE>I'd have them whipped; or I would send them to the</LINE>
+<LINE>Turk, to make eunuchs of.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Be not afraid that I your hand should take;</LINE>
+<LINE>I'll never do you wrong for your own sake:</LINE>
+<LINE>Blessing upon your vows! and in your bed</LINE>
+<LINE>Find fairer fortune, if you ever wed!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>These boys are boys of ice, they'll none have her:</LINE>
+<LINE>sure, they are bastards to the English; the French</LINE>
+<LINE>ne'er got 'em.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>You are too young, too happy, and too good,</LINE>
+<LINE>To make yourself a son out of my blood.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Fourth Lord</SPEAKER>
+<LINE>Fair one, I think not so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>There's one grape yet; I am sure thy father drunk</LINE>
+<LINE>wine: but if thou be'st not an ass, I am a youth</LINE>
+<LINE>of fourteen; I have known thee already.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE><STAGEDIR>To BERTRAM</STAGEDIR>  I dare not say I take you; but I give</LINE>
+<LINE>Me and my service, ever whilst I live,</LINE>
+<LINE>Into your guiding power. This is the man.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Why, then, young Bertram, take her; she's thy wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My wife, my liege! I shall beseech your highness,</LINE>
+<LINE>In such a business give me leave to use</LINE>
+<LINE>The help of mine own eyes.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Know'st thou not, Bertram,</LINE>
+<LINE>What she has done for me?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Yes, my good lord;</LINE>
+<LINE>But never hope to know why I should marry her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thou know'st she has raised me from my sickly bed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>But follows it, my lord, to bring me down</LINE>
+<LINE>Must answer for your raising? I know her well:</LINE>
+<LINE>She had her breeding at my father's charge.</LINE>
+<LINE>A poor physician's daughter my wife! Disdain</LINE>
+<LINE>Rather corrupt me ever!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>'Tis only title thou disdain'st in her, the which</LINE>
+<LINE>I can build up. Strange is it that our bloods,</LINE>
+<LINE>Of colour, weight, and heat, pour'd all together,</LINE>
+<LINE>Would quite confound distinction, yet stand off</LINE>
+<LINE>In differences so mighty. If she be</LINE>
+<LINE>All that is virtuous, save what thou dislikest,</LINE>
+<LINE>A poor physician's daughter, thou dislikest</LINE>
+<LINE>Of virtue for the name: but do not so:</LINE>
+<LINE>From lowest place when virtuous things proceed,</LINE>
+<LINE>The place is dignified by the doer's deed:</LINE>
+<LINE>Where great additions swell's, and virtue none,</LINE>
+<LINE>It is a dropsied honour. Good alone</LINE>
+<LINE>Is good without a name. Vileness is so:</LINE>
+<LINE>The property by what it is should go,</LINE>
+<LINE>Not by the title. She is young, wise, fair;</LINE>
+<LINE>In these to nature she's immediate heir,</LINE>
+<LINE>And these breed honour: that is honour's scorn,</LINE>
+<LINE>Which challenges itself as honour's born</LINE>
+<LINE>And is not like the sire: honours thrive,</LINE>
+<LINE>When rather from our acts we them derive</LINE>
+<LINE>Than our foregoers: the mere word's a slave</LINE>
+<LINE>Debosh'd on every tomb, on every grave</LINE>
+<LINE>A lying trophy, and as oft is dumb</LINE>
+<LINE>Where dust and damn'd oblivion is the tomb</LINE>
+<LINE>Of honour'd bones indeed. What should be said?</LINE>
+<LINE>If thou canst like this creature as a maid,</LINE>
+<LINE>I can create the rest: virtue and she</LINE>
+<LINE>Is her own dower; honour and wealth from me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I cannot love her, nor will strive to do't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thou wrong'st thyself, if thou shouldst strive to choose.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That you are well restored, my lord, I'm glad:</LINE>
+<LINE>Let the rest go.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>My honour's at the stake; which to defeat,</LINE>
+<LINE>I must produce my power. Here, take her hand,</LINE>
+<LINE>Proud scornful boy, unworthy this good gift;</LINE>
+<LINE>That dost in vile misprision shackle up</LINE>
+<LINE>My love and her desert; that canst not dream,</LINE>
+<LINE>We, poising us in her defective scale,</LINE>
+<LINE>Shall weigh thee to the beam; that wilt not know,</LINE>
+<LINE>It is in us to plant thine honour where</LINE>
+<LINE>We please to have it grow. Cheque thy contempt:</LINE>
+<LINE>Obey our will, which travails in thy good:</LINE>
+<LINE>Believe not thy disdain, but presently</LINE>
+<LINE>Do thine own fortunes that obedient right</LINE>
+<LINE>Which both thy duty owes and our power claims;</LINE>
+<LINE>Or I will throw thee from my care for ever</LINE>
+<LINE>Into the staggers and the careless lapse</LINE>
+<LINE>Of youth and ignorance; both my revenge and hate</LINE>
+<LINE>Loosing upon thee, in the name of justice,</LINE>
+<LINE>Without all terms of pity. Speak; thine answer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Pardon, my gracious lord; for I submit</LINE>
+<LINE>My fancy to your eyes: when I consider</LINE>
+<LINE>What great creation and what dole of honour</LINE>
+<LINE>Flies where you bid it, I find that she, which late</LINE>
+<LINE>Was in my nobler thoughts most base, is now</LINE>
+<LINE>The praised of the king; who, so ennobled,</LINE>
+<LINE>Is as 'twere born so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Take her by the hand,</LINE>
+<LINE>And tell her she is thine: to whom I promise</LINE>
+<LINE>A counterpoise, if not to thy estate</LINE>
+<LINE>A balance more replete.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I take her hand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Good fortune and the favour of the king</LINE>
+<LINE>Smile upon this contract; whose ceremony</LINE>
+<LINE>Shall seem expedient on the now-born brief,</LINE>
+<LINE>And be perform'd to-night: the solemn feast</LINE>
+<LINE>Shall more attend upon the coming space,</LINE>
+<LINE>Expecting absent friends. As thou lovest her,</LINE>
+<LINE>Thy love's to me religious; else, does err.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt all but LAFEU and PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE><STAGEDIR>Advancing</STAGEDIR>  Do you hear, monsieur? a word with you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Your pleasure, sir?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Your lord and master did well to make his</LINE>
+<LINE>recantation.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Recantation! My lord! my master!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Ay; is it not a language I speak?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>A most harsh one, and not to be understood without</LINE>
+<LINE>bloody succeeding. My master!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Are you companion to the Count Rousillon?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>To any count, to all counts, to what is man.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>To what is count's man: count's master is of</LINE>
+<LINE>another style.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>You are too old, sir; let it satisfy you, you are too old.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I must tell thee, sirrah, I write man; to which</LINE>
+<LINE>title age cannot bring thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What I dare too well do, I dare not do.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I did think thee, for two ordinaries, to be a pretty</LINE>
+<LINE>wise fellow; thou didst make tolerable vent of thy</LINE>
+<LINE>travel; it might pass: yet the scarfs and the</LINE>
+<LINE>bannerets about thee did manifoldly dissuade me from</LINE>
+<LINE>believing thee a vessel of too great a burthen. I</LINE>
+<LINE>have now found thee; when I lose thee again, I care</LINE>
+<LINE>not: yet art thou good for nothing but taking up; and</LINE>
+<LINE>that thou't scarce worth.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Hadst thou not the privilege of antiquity upon thee,--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Do not plunge thyself too far in anger, lest thou</LINE>
+<LINE>hasten thy trial; which if--Lord have mercy on thee</LINE>
+<LINE>for a hen! So, my good window of lattice, fare thee</LINE>
+<LINE>well: thy casement I need not open, for I look</LINE>
+<LINE>through thee. Give me thy hand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My lord, you give me most egregious indignity.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Ay, with all my heart; and thou art worthy of it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I have not, my lord, deserved it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Yes, good faith, every dram of it; and I will not</LINE>
+<LINE>bate thee a scruple.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Well, I shall be wiser.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Even as soon as thou canst, for thou hast to pull at</LINE>
+<LINE>a smack o' the contrary. If ever thou be'st bound</LINE>
+<LINE>in thy scarf and beaten, thou shalt find what it is</LINE>
+<LINE>to be proud of thy bondage. I have a desire to hold</LINE>
+<LINE>my acquaintance with thee, or rather my knowledge,</LINE>
+<LINE>that I may say in the default, he is a man I know.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My lord, you do me most insupportable vexation.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I would it were hell-pains for thy sake, and my poor</LINE>
+<LINE>doing eternal: for doing I am past: as I will by</LINE>
+<LINE>thee, in what motion age will give me leave.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Well, thou hast a son shall take this disgrace off</LINE>
+<LINE>me; scurvy, old, filthy, scurvy lord! Well, I must</LINE>
+<LINE>be patient; there is no fettering of authority.</LINE>
+<LINE>I'll beat him, by my life, if I can meet him with</LINE>
+<LINE>any convenience, an he were double and double a</LINE>
+<LINE>lord. I'll have no more pity of his age than I</LINE>
+<LINE>would of--I'll beat him, an if I could but meet him again.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter LAFEU</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Sirrah, your lord and master's married; there's news</LINE>
+<LINE>for you: you have a new mistress.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I most unfeignedly beseech your lordship to make</LINE>
+<LINE>some reservation of your wrongs: he is my good</LINE>
+<LINE>lord: whom I serve above is my master.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Who? God?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ay, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>The devil it is that's thy master. Why dost thou</LINE>
+<LINE>garter up thy arms o' this fashion? dost make hose of</LINE>
+<LINE>sleeves? do other servants so? Thou wert best set</LINE>
+<LINE>thy lower part where thy nose stands. By mine</LINE>
+<LINE>honour, if I were but two hours younger, I'ld beat</LINE>
+<LINE>thee: methinks, thou art a general offence, and</LINE>
+<LINE>every man should beat thee: I think thou wast</LINE>
+<LINE>created for men to breathe themselves upon thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>This is hard and undeserved measure, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Go to, sir; you were beaten in Italy for picking a</LINE>
+<LINE>kernel out of a pomegranate; you are a vagabond and</LINE>
+<LINE>no true traveller: you are more saucy with lords</LINE>
+<LINE>and honourable personages than the commission of your</LINE>
+<LINE>birth and virtue gives you heraldry. You are not</LINE>
+<LINE>worth another word, else I'ld call you knave. I leave you.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Good, very good; it is so then: good, very good;</LINE>
+<LINE>let it be concealed awhile.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter BERTRAM</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Undone, and forfeited to cares for ever!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What's the matter, sweet-heart?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Although before the solemn priest I have sworn,</LINE>
+<LINE>I will not bed her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What, what, sweet-heart?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>O my Parolles, they have married me!</LINE>
+<LINE>I'll to the Tuscan wars, and never bed her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>France is a dog-hole, and it no more merits</LINE>
+<LINE>The tread of a man's foot: to the wars!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>There's letters from my mother: what the import is,</LINE>
+<LINE>I know not yet.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ay, that would be known. To the wars, my boy, to the wars!</LINE>
+<LINE>He wears his honour in a box unseen,</LINE>
+<LINE>That hugs his kicky-wicky here at home,</LINE>
+<LINE>Spending his manly marrow in her arms,</LINE>
+<LINE>Which should sustain the bound and high curvet</LINE>
+<LINE>Of Mars's fiery steed. To other regions</LINE>
+<LINE>France is a stable; we that dwell in't jades;</LINE>
+<LINE>Therefore, to the war!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>It shall be so: I'll send her to my house,</LINE>
+<LINE>Acquaint my mother with my hate to her,</LINE>
+<LINE>And wherefore I am fled; write to the king</LINE>
+<LINE>That which I durst not speak; his present gift</LINE>
+<LINE>Shall furnish me to those Italian fields,</LINE>
+<LINE>Where noble fellows strike: war is no strife</LINE>
+<LINE>To the dark house and the detested wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Will this capriccio hold in thee? art sure?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Go with me to my chamber, and advise me.</LINE>
+<LINE>I'll send her straight away: to-morrow</LINE>
+<LINE>I'll to the wars, she to her single sorrow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, these balls bound; there's noise in it. 'Tis hard:</LINE>
+<LINE>A young man married is a man that's marr'd:</LINE>
+<LINE>Therefore away, and leave her bravely; go:</LINE>
+<LINE>The king has done you wrong: but, hush, 'tis so.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE IV.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Enter HELENA and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>My mother greets me kindly; is she well?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>She is not well; but yet she has her health: she's</LINE>
+<LINE>very merry; but yet she is not well: but thanks be</LINE>
+<LINE>given, she's very well and wants nothing i', the</LINE>
+<LINE>world; but yet she is not well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>If she be very well, what does she ail, that she's</LINE>
+<LINE>not very well?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Truly, she's very well indeed, but for two things.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What two things?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>One, that she's not in heaven, whither God send her</LINE>
+<LINE>quickly! the other that she's in earth, from whence</LINE>
+<LINE>God send her quickly!</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Bless you, my fortunate lady!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I hope, sir, I have your good will to have mine own</LINE>
+<LINE>good fortunes.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>You had my prayers to lead them on; and to keep them</LINE>
+<LINE>on, have them still. O, my knave, how does my old lady?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>So that you had her wrinkles and I her money,</LINE>
+<LINE>I would she did as you say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, I say nothing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Marry, you are the wiser man; for many a man's</LINE>
+<LINE>tongue shakes out his master's undoing: to say</LINE>
+<LINE>nothing, to do nothing, to know nothing, and to have</LINE>
+<LINE>nothing, is to be a great part of your title; which</LINE>
+<LINE>is within a very little of nothing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Away! thou'rt a knave.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>You should have said, sir, before a knave thou'rt a</LINE>
+<LINE>knave; that's, before me thou'rt a knave: this had</LINE>
+<LINE>been truth, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Go to, thou art a witty fool; I have found thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Did you find me in yourself, sir? or were you</LINE>
+<LINE>taught to find me? The search, sir, was profitable;</LINE>
+<LINE>and much fool may you find in you, even to the</LINE>
+<LINE>world's pleasure and the increase of laughter.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>A good knave, i' faith, and well fed.</LINE>
+<LINE>Madam, my lord will go away to-night;</LINE>
+<LINE>A very serious business calls on him.</LINE>
+<LINE>The great prerogative and rite of love,</LINE>
+<LINE>Which, as your due, time claims, he does acknowledge;</LINE>
+<LINE>But puts it off to a compell'd restraint;</LINE>
+<LINE>Whose want, and whose delay, is strew'd with sweets,</LINE>
+<LINE>Which they distil now in the curbed time,</LINE>
+<LINE>To make the coming hour o'erflow with joy</LINE>
+<LINE>And pleasure drown the brim.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What's his will else?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That you will take your instant leave o' the king</LINE>
+<LINE>And make this haste as your own good proceeding,</LINE>
+<LINE>Strengthen'd with what apology you think</LINE>
+<LINE>May make it probable need.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What more commands he?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That, having this obtain'd, you presently</LINE>
+<LINE>Attend his further pleasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>In every thing I wait upon his will.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I shall report it so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I pray you.</LINE>
+<STAGEDIR>Exit PAROLLES</STAGEDIR>
+<LINE>Come, sirrah.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE V.  Paris. The KING's palace.</TITLE>
+<STAGEDIR>Enter LAFEU and BERTRAM</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>But I hope your lordship thinks not him a soldier.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Yes, my lord, and of very valiant approof.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You have it from his own deliverance.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>And by other warranted testimony.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Then my dial goes not true: I took this lark for a bunting.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I do assure you, my lord, he is very great in</LINE>
+<LINE>knowledge and accordingly valiant.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I have then sinned against his experience and</LINE>
+<LINE>transgressed against his valour; and my state that</LINE>
+<LINE>way is dangerous, since I cannot yet find in my</LINE>
+<LINE>heart to repent. Here he comes: I pray you, make</LINE>
+<LINE>us friends; I will pursue the amity.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE><STAGEDIR>To BERTRAM</STAGEDIR>  These things shall be done, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Pray you, sir, who's his tailor?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Sir?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>O, I know him well, I, sir; he, sir, 's a good</LINE>
+<LINE>workman, a very good tailor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE><STAGEDIR>Aside to PAROLLES</STAGEDIR>  Is she gone to the king?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>She is.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Will she away to-night?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>As you'll have her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I have writ my letters, casketed my treasure,</LINE>
+<LINE>Given order for our horses; and to-night,</LINE>
+<LINE>When I should take possession of the bride,</LINE>
+<LINE>End ere I do begin.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A good traveller is something at the latter end of a</LINE>
+<LINE>dinner; but one that lies three thirds and uses a</LINE>
+<LINE>known truth to pass a thousand nothings with, should</LINE>
+<LINE>be once heard and thrice beaten. God save you, captain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Is there any unkindness between my lord and you, monsieur?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I know not how I have deserved to run into my lord's</LINE>
+<LINE>displeasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You have made shift to run into 't, boots and spurs</LINE>
+<LINE>and all, like him that leaped into the custard; and</LINE>
+<LINE>out of it you'll run again, rather than suffer</LINE>
+<LINE>question for your residence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>It may be you have mistaken him, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>And shall do so ever, though I took him at 's</LINE>
+<LINE>prayers. Fare you well, my lord; and believe this</LINE>
+<LINE>of me, there can be no kernel in this light nut; the</LINE>
+<LINE>soul of this man is his clothes. Trust him not in</LINE>
+<LINE>matter of heavy consequence; I have kept of them</LINE>
+<LINE>tame, and know their natures. Farewell, monsieur:</LINE>
+<LINE>I have spoken better of you than you have or will to</LINE>
+<LINE>deserve at my hand; but we must do good against evil.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>An idle lord. I swear.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I think so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Why, do you not know him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Yes, I do know him well, and common speech</LINE>
+<LINE>Gives him a worthy pass. Here comes my clog.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter HELENA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I have, sir, as I was commanded from you,</LINE>
+<LINE>Spoke with the king and have procured his leave</LINE>
+<LINE>For present parting; only he desires</LINE>
+<LINE>Some private speech with you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I shall obey his will.</LINE>
+<LINE>You must not marvel, Helen, at my course,</LINE>
+<LINE>Which holds not colour with the time, nor does</LINE>
+<LINE>The ministration and required office</LINE>
+<LINE>On my particular. Prepared I was not</LINE>
+<LINE>For such a business; therefore am I found</LINE>
+<LINE>So much unsettled: this drives me to entreat you</LINE>
+<LINE>That presently you take our way for home;</LINE>
+<LINE>And rather muse than ask why I entreat you,</LINE>
+<LINE>For my respects are better than they seem</LINE>
+<LINE>And my appointments have in them a need</LINE>
+<LINE>Greater than shows itself at the first view</LINE>
+<LINE>To you that know them not. This to my mother:</LINE>
+<STAGEDIR>Giving a letter</STAGEDIR>
+<LINE>'Twill be two days ere I shall see you, so</LINE>
+<LINE>I leave you to your wisdom.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Sir, I can nothing say,</LINE>
+<LINE>But that I am your most obedient servant.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Come, come, no more of that.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>And ever shall</LINE>
+<LINE>With true observance seek to eke out that</LINE>
+<LINE>Wherein toward me my homely stars have fail'd</LINE>
+<LINE>To equal my great fortune.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Let that go:</LINE>
+<LINE>My haste is very great: farewell; hie home.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Pray, sir, your pardon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Well, what would you say?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I am not worthy of the wealth I owe,</LINE>
+<LINE>Nor dare I say 'tis mine, and yet it is;</LINE>
+<LINE>But, like a timorous thief, most fain would steal</LINE>
+<LINE>What law does vouch mine own.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>What would you have?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Something; and scarce so much: nothing, indeed.</LINE>
+<LINE>I would not tell you what I would, my lord:</LINE>
+<LINE>Faith yes;</LINE>
+<LINE>Strangers and foes do sunder, and not kiss.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I pray you, stay not, but in haste to horse.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I shall not break your bidding, good my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Where are my other men, monsieur? Farewell.</LINE>
+<STAGEDIR>Exit HELENA</STAGEDIR>
+<LINE>Go thou toward home; where I will never come</LINE>
+<LINE>Whilst I can shake my sword or hear the drum.</LINE>
+<LINE>Away, and for our flight.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Bravely, coragio!</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+</ACT>
+
+<ACT><TITLE>ACT III</TITLE>
+
+<SCENE><TITLE>SCENE I.  Florence. The DUKE's palace.</TITLE>
+<STAGEDIR>Flourish. Enter the DUKE of Florence attended;
+the two Frenchmen, with a troop of soldiers.</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>So that from point to point now have you heard</LINE>
+<LINE>The fundamental reasons of this war,</LINE>
+<LINE>Whose great decision hath much blood let forth</LINE>
+<LINE>And more thirsts after.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Holy seems the quarrel</LINE>
+<LINE>Upon your grace's part; black and fearful</LINE>
+<LINE>On the opposer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>Therefore we marvel much our cousin France</LINE>
+<LINE>Would in so just a business shut his bosom</LINE>
+<LINE>Against our borrowing prayers.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Good my lord,</LINE>
+<LINE>The reasons of our state I cannot yield,</LINE>
+<LINE>But like a common and an outward man,</LINE>
+<LINE>That the great figure of a council frames</LINE>
+<LINE>By self-unable motion: therefore dare not</LINE>
+<LINE>Say what I think of it, since I have found</LINE>
+<LINE>Myself in my incertain grounds to fail</LINE>
+<LINE>As often as I guess'd.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>Be it his pleasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>But I am sure the younger of our nature,</LINE>
+<LINE>That surfeit on their ease, will day by day</LINE>
+<LINE>Come here for physic.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>Welcome shall they be;</LINE>
+<LINE>And all the honours that can fly from us</LINE>
+<LINE>Shall on them settle. You know your places well;</LINE>
+<LINE>When better fall, for your avails they fell:</LINE>
+<LINE>To-morrow to the field.</LINE>
+</SPEECH>
+
+<STAGEDIR>Flourish. Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>It hath happened all as I would have had it, save</LINE>
+<LINE>that he comes not along with her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>By my troth, I take my young lord to be a very</LINE>
+<LINE>melancholy man.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>By what observance, I pray you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Why, he will look upon his boot and sing; mend the</LINE>
+<LINE>ruff and sing; ask questions and sing; pick his</LINE>
+<LINE>teeth and sing. I know a man that had this trick of</LINE>
+<LINE>melancholy sold a goodly manor for a song.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Let me see what he writes, and when he means to come.</LINE>
+</SPEECH>
+
+<STAGEDIR>Opening a letter</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I have no mind to Isbel since I was at court: our</LINE>
+<LINE>old ling and our Isbels o' the country are nothing</LINE>
+<LINE>like your old ling and your Isbels o' the court:</LINE>
+<LINE>the brains of my Cupid's knocked out, and I begin to</LINE>
+<LINE>love, as an old man loves money, with no stomach.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What have we here?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>E'en that you have there.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  I have sent you a daughter-in-law: she hath</LINE>
+<LINE>recovered the king, and undone me. I have wedded</LINE>
+<LINE>her, not bedded her; and sworn to make the 'not'</LINE>
+<LINE>eternal. You shall hear I am run away: know it</LINE>
+<LINE>before the report come. If there be breadth enough</LINE>
+<LINE>in the world, I will hold a long distance. My duty</LINE>
+<LINE>to you. Your unfortunate son,</LINE>
+<LINE>BERTRAM.</LINE>
+<LINE>This is not well, rash and unbridled boy.</LINE>
+<LINE>To fly the favours of so good a king;</LINE>
+<LINE>To pluck his indignation on thy head</LINE>
+<LINE>By the misprising of a maid too virtuous</LINE>
+<LINE>For the contempt of empire.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O madam, yonder is heavy news within between two</LINE>
+<LINE>soldiers and my young lady!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What is the matter?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Nay, there is some comfort in the news, some</LINE>
+<LINE>comfort; your son will not be killed so soon as I</LINE>
+<LINE>thought he would.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Why should he be killed?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>So say I, madam, if he run away, as I hear he does:</LINE>
+<LINE>the danger is in standing to't; that's the loss of</LINE>
+<LINE>men, though it be the getting of children. Here</LINE>
+<LINE>they come will tell you more: for my part, I only</LINE>
+<LINE>hear your son was run away.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+<STAGEDIR>Enter HELENA, and two Gentlemen</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Save you, good madam.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Madam, my lord is gone, for ever gone.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>Do not say so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Think upon patience. Pray you, gentlemen,</LINE>
+<LINE>I have felt so many quirks of joy and grief,</LINE>
+<LINE>That the first face of neither, on the start,</LINE>
+<LINE>Can woman me unto't: where is my son, I pray you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>Madam, he's gone to serve the duke of Florence:</LINE>
+<LINE>We met him thitherward; for thence we came,</LINE>
+<LINE>And, after some dispatch in hand at court,</LINE>
+<LINE>Thither we bend again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Look on his letter, madam; here's my passport.</LINE>
+<STAGEDIR>Reads</STAGEDIR>
+<LINE>When thou canst get the ring upon my finger which</LINE>
+<LINE>never shall come off, and show me a child begotten</LINE>
+<LINE>of thy body that I am father to, then call me</LINE>
+<LINE>husband: but in such a 'then' I write a 'never.'</LINE>
+<LINE>This is a dreadful sentence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Brought you this letter, gentlemen?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Ay, madam;</LINE>
+<LINE>And for the contents' sake are sorry for our pain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I prithee, lady, have a better cheer;</LINE>
+<LINE>If thou engrossest all the griefs are thine,</LINE>
+<LINE>Thou robb'st me of a moiety: he was my son;</LINE>
+<LINE>But I do wash his name out of my blood,</LINE>
+<LINE>And thou art all my child. Towards Florence is he?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>Ay, madam.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>And to be a soldier?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>Such is his noble purpose; and believe 't,</LINE>
+<LINE>The duke will lay upon him all the honour</LINE>
+<LINE>That good convenience claims.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Return you thither?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Ay, madam, with the swiftest wing of speed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  Till I have no wife I have nothing in France.</LINE>
+<LINE>'Tis bitter.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Find you that there?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay, madam.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>'Tis but the boldness of his hand, haply, which his</LINE>
+<LINE>heart was not consenting to.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Nothing in France, until he have no wife!</LINE>
+<LINE>There's nothing here that is too good for him</LINE>
+<LINE>But only she; and she deserves a lord</LINE>
+<LINE>That twenty such rude boys might tend upon</LINE>
+<LINE>And call her hourly mistress. Who was with him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>A servant only, and a gentleman</LINE>
+<LINE>Which I have sometime known.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Parolles, was it not?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Ay, my good lady, he.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>A very tainted fellow, and full of wickedness.</LINE>
+<LINE>My son corrupts a well-derived nature</LINE>
+<LINE>With his inducement.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Gentleman</SPEAKER>
+<LINE>Indeed, good lady,</LINE>
+<LINE>The fellow has a deal of that too much,</LINE>
+<LINE>Which holds him much to have.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You're welcome, gentlemen.</LINE>
+<LINE>I will entreat you, when you see my son,</LINE>
+<LINE>To tell him that his sword can never win</LINE>
+<LINE>The honour that he loses: more I'll entreat you</LINE>
+<LINE>Written to bear along.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Gentleman</SPEAKER>
+<LINE>We serve you, madam,</LINE>
+<LINE>In that and all your worthiest affairs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Not so, but as we change our courtesies.</LINE>
+<LINE>Will you draw near!</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt COUNTESS and Gentlemen</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>'Till I have no wife, I have nothing in France.'</LINE>
+<LINE>Nothing in France, until he has no wife!</LINE>
+<LINE>Thou shalt have none, Rousillon, none in France;</LINE>
+<LINE>Then hast thou all again. Poor lord! is't I</LINE>
+<LINE>That chase thee from thy country and expose</LINE>
+<LINE>Those tender limbs of thine to the event</LINE>
+<LINE>Of the none-sparing war? and is it I</LINE>
+<LINE>That drive thee from the sportive court, where thou</LINE>
+<LINE>Wast shot at with fair eyes, to be the mark</LINE>
+<LINE>Of smoky muskets? O you leaden messengers,</LINE>
+<LINE>That ride upon the violent speed of fire,</LINE>
+<LINE>Fly with false aim; move the still-peering air,</LINE>
+<LINE>That sings with piercing; do not touch my lord.</LINE>
+<LINE>Whoever shoots at him, I set him there;</LINE>
+<LINE>Whoever charges on his forward breast,</LINE>
+<LINE>I am the caitiff that do hold him to't;</LINE>
+<LINE>And, though I kill him not, I am the cause</LINE>
+<LINE>His death was so effected: better 'twere</LINE>
+<LINE>I met the ravin lion when he roar'd</LINE>
+<LINE>With sharp constraint of hunger; better 'twere</LINE>
+<LINE>That all the miseries which nature owes</LINE>
+<LINE>Were mine at once. No, come thou home, Rousillon,</LINE>
+<LINE>Whence honour but of danger wins a scar,</LINE>
+<LINE>As oft it loses all: I will be gone;</LINE>
+<LINE>My being here it is that holds thee hence:</LINE>
+<LINE>Shall I stay here to do't?  no, no, although</LINE>
+<LINE>The air of paradise did fan the house</LINE>
+<LINE>And angels officed all: I will be gone,</LINE>
+<LINE>That pitiful rumour may report my flight,</LINE>
+<LINE>To consolate thine ear. Come, night; end, day!</LINE>
+<LINE>For with the dark, poor thief, I'll steal away.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  Florence. Before the DUKE's palace.</TITLE>
+<STAGEDIR>Flourish. Enter the DUKE of Florence, BERTRAM,
+PAROLLES, Soldiers, Drum, and Trumpets</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>The general of our horse thou art; and we,</LINE>
+<LINE>Great in our hope, lay our best love and credence</LINE>
+<LINE>Upon thy promising fortune.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Sir, it is</LINE>
+<LINE>A charge too heavy for my strength, but yet</LINE>
+<LINE>We'll strive to bear it for your worthy sake</LINE>
+<LINE>To the extreme edge of hazard.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DUKE</SPEAKER>
+<LINE>Then go thou forth;</LINE>
+<LINE>And fortune play upon thy prosperous helm,</LINE>
+<LINE>As thy auspicious mistress!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>This very day,</LINE>
+<LINE>Great Mars, I put myself into thy file:</LINE>
+<LINE>Make me but like my thoughts, and I shall prove</LINE>
+<LINE>A lover of thy drum, hater of love.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE IV.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS and Steward</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Alas! and would you take the letter of her?</LINE>
+<LINE>Might you not know she would do as she has done,</LINE>
+<LINE>By sending me a letter? Read it again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR></LINE>
+<LINE>I am Saint Jaques' pilgrim, thither gone:</LINE>
+<LINE>Ambitious love hath so in me offended,</LINE>
+<LINE>That barefoot plod I the cold ground upon,</LINE>
+<LINE>With sainted vow my faults to have amended.</LINE>
+<LINE>Write, write, that from the bloody course of war</LINE>
+<LINE>My dearest master, your dear son, may hie:</LINE>
+<LINE>Bless him at home in peace, whilst I from far</LINE>
+<LINE>His name with zealous fervor sanctify:</LINE>
+<LINE>His taken labours bid him me forgive;</LINE>
+<LINE>I, his despiteful Juno, sent him forth</LINE>
+<LINE>From courtly friends, with camping foes to live,</LINE>
+<LINE>Where death and danger dogs the heels of worth:</LINE>
+<LINE>He is too good and fair for death and me:</LINE>
+<LINE>Whom I myself embrace, to set him free.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Ah, what sharp stings are in her mildest words!</LINE>
+<LINE>Rinaldo, you did never lack advice so much,</LINE>
+<LINE>As letting her pass so: had I spoke with her,</LINE>
+<LINE>I could have well diverted her intents,</LINE>
+<LINE>Which thus she hath prevented.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Steward</SPEAKER>
+<LINE>Pardon me, madam:</LINE>
+<LINE>If I had given you this at over-night,</LINE>
+<LINE>She might have been o'erta'en; and yet she writes,</LINE>
+<LINE>Pursuit would be but vain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>What angel shall</LINE>
+<LINE>Bless this unworthy husband? he cannot thrive,</LINE>
+<LINE>Unless her prayers, whom heaven delights to hear</LINE>
+<LINE>And loves to grant, reprieve him from the wrath</LINE>
+<LINE>Of greatest justice. Write, write, Rinaldo,</LINE>
+<LINE>To this unworthy husband of his wife;</LINE>
+<LINE>Let every word weigh heavy of her worth</LINE>
+<LINE>That he does weigh too light: my greatest grief.</LINE>
+<LINE>Though little he do feel it, set down sharply.</LINE>
+<LINE>Dispatch the most convenient messenger:</LINE>
+<LINE>When haply he shall hear that she is gone,</LINE>
+<LINE>He will return; and hope I may that she,</LINE>
+<LINE>Hearing so much, will speed her foot again,</LINE>
+<LINE>Led hither by pure love: which of them both</LINE>
+<LINE>Is dearest to me. I have no skill in sense</LINE>
+<LINE>To make distinction: provide this messenger:</LINE>
+<LINE>My heart is heavy and mine age is weak;</LINE>
+<LINE>Grief would have tears, and sorrow bids me speak.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE V.  Florence. Without the walls. A tucket afar off.</TITLE>
+<STAGEDIR>Enter an old Widow of Florence, DIANA, VIOLENTA,
+and MARIANA, with other Citizens</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Nay, come; for if they do approach the city, we</LINE>
+<LINE>shall lose all the sight.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>They say the French count has done most honourable service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>It is reported that he has taken their greatest</LINE>
+<LINE>commander; and that with his own hand he slew the</LINE>
+<LINE>duke's brother.</LINE>
+<STAGEDIR>Tucket</STAGEDIR>
+<LINE>We have lost our labour; they are gone a contrary</LINE>
+<LINE>way: hark! you may know by their trumpets.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>Come, let's return again, and suffice ourselves with</LINE>
+<LINE>the report of it. Well, Diana, take heed of this</LINE>
+<LINE>French earl: the honour of a maid is her name; and</LINE>
+<LINE>no legacy is so rich as honesty.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I have told my neighbour how you have been solicited</LINE>
+<LINE>by a gentleman his companion.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>I know that knave; hang him! one Parolles: a</LINE>
+<LINE>filthy officer he is in those suggestions for the</LINE>
+<LINE>young earl. Beware of them, Diana; their promises,</LINE>
+<LINE>enticements, oaths, tokens, and all these engines of</LINE>
+<LINE>lust, are not the things they go under: many a maid</LINE>
+<LINE>hath been seduced by them; and the misery is,</LINE>
+<LINE>example, that so terrible shows in the wreck of</LINE>
+<LINE>maidenhood, cannot for all that dissuade succession,</LINE>
+<LINE>but that they are limed with the twigs that threaten</LINE>
+<LINE>them. I hope I need not to advise you further; but</LINE>
+<LINE>I hope your own grace will keep you where you are,</LINE>
+<LINE>though there were no further danger known but the</LINE>
+<LINE>modesty which is so lost.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>You shall not need to fear me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I hope so.</LINE>
+<STAGEDIR>Enter HELENA, disguised like a Pilgrim</STAGEDIR>
+<LINE>Look, here comes a pilgrim: I know she will lie at</LINE>
+<LINE>my house; thither they send one another: I'll</LINE>
+<LINE>question her. God save you, pilgrim! whither are you bound?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>To Saint Jaques le Grand.</LINE>
+<LINE>Where do the palmers lodge, I do beseech you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>At the Saint Francis here beside the port.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Is this the way?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Ay, marry, is't.</LINE>
+<STAGEDIR>A march afar</STAGEDIR>
+<LINE>Hark you! they come this way.</LINE>
+<LINE>If you will tarry, holy pilgrim,</LINE>
+<LINE>But till the troops come by,</LINE>
+<LINE>I will conduct you where you shall be lodged;</LINE>
+<LINE>The rather, for I think I know your hostess</LINE>
+<LINE>As ample as myself.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Is it yourself?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>If you shall please so, pilgrim.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I thank you, and will stay upon your leisure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>You came, I think, from France?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I did so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Here you shall see a countryman of yours</LINE>
+<LINE>That has done worthy service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>His name, I pray you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>The Count Rousillon: know you such a one?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>But by the ear, that hears most nobly of him:</LINE>
+<LINE>His face I know not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Whatsome'er he is,</LINE>
+<LINE>He's bravely taken here. He stole from France,</LINE>
+<LINE>As 'tis reported, for the king had married him</LINE>
+<LINE>Against his liking: think you it is so?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Ay, surely, mere the truth: I know his lady.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>There is a gentleman that serves the count</LINE>
+<LINE>Reports but coarsely of her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>What's his name?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Monsieur Parolles.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>O, I believe with him,</LINE>
+<LINE>In argument of praise, or to the worth</LINE>
+<LINE>Of the great count himself, she is too mean</LINE>
+<LINE>To have her name repeated: all her deserving</LINE>
+<LINE>Is a reserved honesty, and that</LINE>
+<LINE>I have not heard examined.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Alas, poor lady!</LINE>
+<LINE>'Tis a hard bondage to become the wife</LINE>
+<LINE>Of a detesting lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I warrant, good creature, wheresoe'er she is,</LINE>
+<LINE>Her heart weighs sadly: this young maid might do her</LINE>
+<LINE>A shrewd turn, if she pleased.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>How do you mean?</LINE>
+<LINE>May be the amorous count solicits her</LINE>
+<LINE>In the unlawful purpose.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>He does indeed;</LINE>
+<LINE>And brokes with all that can in such a suit</LINE>
+<LINE>Corrupt the tender honour of a maid:</LINE>
+<LINE>But she is arm'd for him and keeps her guard</LINE>
+<LINE>In honestest defence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>The gods forbid else!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>So, now they come:</LINE>
+<STAGEDIR>Drum and Colours</STAGEDIR>
+<STAGEDIR>Enter BERTRAM, PAROLLES, and the whole army</STAGEDIR>
+<LINE>That is Antonio, the duke's eldest son;</LINE>
+<LINE>That, Escalus.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Which is the Frenchman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>He;</LINE>
+<LINE>That with the plume: 'tis a most gallant fellow.</LINE>
+<LINE>I would he loved his wife: if he were honester</LINE>
+<LINE>He were much goodlier: is't not a handsome gentleman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I like him well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>'Tis pity he is not honest: yond's that same knave</LINE>
+<LINE>That leads him to these places: were I his lady,</LINE>
+<LINE>I would Poison that vile rascal.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Which is he?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>That jack-an-apes with scarfs: why is he melancholy?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Perchance he's hurt i' the battle.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Lose our drum! well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>He's shrewdly vexed at something: look, he has spied us.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Marry, hang you!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>MARIANA</SPEAKER>
+<LINE>And your courtesy, for a ring-carrier!</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt BERTRAM, PAROLLES, and army</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>The troop is past. Come, pilgrim, I will bring you</LINE>
+<LINE>Where you shall host: of enjoin'd penitents</LINE>
+<LINE>There's four or five, to great Saint Jaques bound,</LINE>
+<LINE>Already at my house.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I humbly thank you:</LINE>
+<LINE>Please it this matron and this gentle maid</LINE>
+<LINE>To eat with us to-night, the charge and thanking</LINE>
+<LINE>Shall be for me; and, to requite you further,</LINE>
+<LINE>I will bestow some precepts of this virgin</LINE>
+<LINE>Worthy the note.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BOTH</SPEAKER>
+<LINE>We'll take your offer kindly.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE VI.  Camp before Florence.</TITLE>
+<STAGEDIR>Enter BERTRAM and the two French Lords</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Nay, good my lord, put him to't; let him have his</LINE>
+<LINE>way.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>If your lordship find him not a hilding, hold me no</LINE>
+<LINE>more in your respect.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>On my life, my lord, a bubble.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Do you think I am so far deceived in him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Believe it, my lord, in mine own direct knowledge,</LINE>
+<LINE>without any malice, but to speak of him as my</LINE>
+<LINE>kinsman, he's a most notable coward, an infinite and</LINE>
+<LINE>endless liar, an hourly promise-breaker, the owner</LINE>
+<LINE>of no one good quality worthy your lordship's</LINE>
+<LINE>entertainment.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>It were fit you knew him; lest, reposing too far in</LINE>
+<LINE>his virtue, which he hath not, he might at some</LINE>
+<LINE>great and trusty business in a main danger fail you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I would I knew in what particular action to try him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>None better than to let him fetch off his drum,</LINE>
+<LINE>which you hear him so confidently undertake to do.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I, with a troop of Florentines, will suddenly</LINE>
+<LINE>surprise him; such I will have, whom I am sure he</LINE>
+<LINE>knows not from the enemy: we will bind and hoodwink</LINE>
+<LINE>him so, that he shall suppose no other but that he</LINE>
+<LINE>is carried into the leaguer of the adversaries, when</LINE>
+<LINE>we bring him to our own tents. Be but your lordship</LINE>
+<LINE>present at his examination: if he do not, for the</LINE>
+<LINE>promise of his life and in the highest compulsion of</LINE>
+<LINE>base fear, offer to betray you and deliver all the</LINE>
+<LINE>intelligence in his power against you, and that with</LINE>
+<LINE>the divine forfeit of his soul upon oath, never</LINE>
+<LINE>trust my judgment in any thing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>O, for the love of laughter, let him fetch his drum;</LINE>
+<LINE>he says he has a stratagem for't: when your</LINE>
+<LINE>lordship sees the bottom of his success in't, and to</LINE>
+<LINE>what metal this counterfeit lump of ore will be</LINE>
+<LINE>melted, if you give him not John Drum's</LINE>
+<LINE>entertainment, your inclining cannot be removed.</LINE>
+<LINE>Here he comes.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE><STAGEDIR>Aside to BERTRAM</STAGEDIR>  O, for the love of laughter,</LINE>
+<LINE>hinder not the honour of his design: let him fetch</LINE>
+<LINE>off his drum in any hand.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>How now, monsieur! this drum sticks sorely in your</LINE>
+<LINE>disposition.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>A pox on't, let it go; 'tis but a drum.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>'But a drum'! is't 'but a drum'? A drum so lost!</LINE>
+<LINE>There was excellent command,--to charge in with our</LINE>
+<LINE>horse upon our own wings, and to rend our own soldiers!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>That was not to be blamed in the command of the</LINE>
+<LINE>service: it was a disaster of war that Caesar</LINE>
+<LINE>himself could not have prevented, if he had been</LINE>
+<LINE>there to command.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Well, we cannot greatly condemn our success: some</LINE>
+<LINE>dishonour we had in the loss of that drum; but it is</LINE>
+<LINE>not to be recovered.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>It might have been recovered.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>It might; but it is not now.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>It is to be recovered: but that the merit of</LINE>
+<LINE>service is seldom attributed to the true and exact</LINE>
+<LINE>performer, I would have that drum or another, or</LINE>
+<LINE>'hic jacet.'</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Why, if you have a stomach, to't, monsieur: if you</LINE>
+<LINE>think your mystery in stratagem can bring this</LINE>
+<LINE>instrument of honour again into his native quarter,</LINE>
+<LINE>be magnanimous in the enterprise and go on; I will</LINE>
+<LINE>grace the attempt for a worthy exploit: if you</LINE>
+<LINE>speed well in it, the duke shall both speak of it.</LINE>
+<LINE>and extend to you what further becomes his</LINE>
+<LINE>greatness, even to the utmost syllable of your</LINE>
+<LINE>worthiness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>By the hand of a soldier, I will undertake it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>But you must not now slumber in it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I'll about it this evening: and I will presently</LINE>
+<LINE>pen down my dilemmas, encourage myself in my</LINE>
+<LINE>certainty, put myself into my mortal preparation;</LINE>
+<LINE>and by midnight look to hear further from me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>May I be bold to acquaint his grace you are gone about it?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I know not what the success will be, my lord; but</LINE>
+<LINE>the attempt I vow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I know thou'rt valiant; and, to the possibility of</LINE>
+<LINE>thy soldiership, will subscribe for thee. Farewell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I love not many words.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>No more than a fish loves water. Is not this a</LINE>
+<LINE>strange fellow, my lord, that so confidently seems</LINE>
+<LINE>to undertake this business, which he knows is not to</LINE>
+<LINE>be done; damns himself to do and dares better be</LINE>
+<LINE>damned than to do't?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>You do not know him, my lord, as we do: certain it</LINE>
+<LINE>is that he will steal himself into a man's favour and</LINE>
+<LINE>for a week escape a great deal of discoveries; but</LINE>
+<LINE>when you find him out, you have him ever after.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Why, do you think he will make no deed at all of</LINE>
+<LINE>this that so seriously he does address himself unto?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>None in the world; but return with an invention and</LINE>
+<LINE>clap upon you two or three probable lies: but we</LINE>
+<LINE>have almost embossed him; you shall see his fall</LINE>
+<LINE>to-night; for indeed he is not for your lordship's respect.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>We'll make you some sport with the fox ere we case</LINE>
+<LINE>him. He was first smoked by the old lord Lafeu:</LINE>
+<LINE>when his disguise and he is parted, tell me what a</LINE>
+<LINE>sprat you shall find him; which you shall see this</LINE>
+<LINE>very night.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I must go look my twigs: he shall be caught.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Your brother he shall go along with me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>As't please your lordship: I'll leave you.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Now will I lead you to the house, and show you</LINE>
+<LINE>The lass I spoke of.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>But you say she's honest.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>That's all the fault: I spoke with her but once</LINE>
+<LINE>And found her wondrous cold; but I sent to her,</LINE>
+<LINE>By this same coxcomb that we have i' the wind,</LINE>
+<LINE>Tokens and letters which she did re-send;</LINE>
+<LINE>And this is all I have done. She's a fair creature:</LINE>
+<LINE>Will you go see her?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>With all my heart, my lord.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE VII.  Florence. The Widow's house.</TITLE>
+<STAGEDIR>Enter HELENA and Widow</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>If you misdoubt me that I am not she,</LINE>
+<LINE>I know not how I shall assure you further,</LINE>
+<LINE>But I shall lose the grounds I work upon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Though my estate be fallen, I was well born,</LINE>
+<LINE>Nothing acquainted with these businesses;</LINE>
+<LINE>And would not put my reputation now</LINE>
+<LINE>In any staining act.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Nor would I wish you.</LINE>
+<LINE>First, give me trust, the count he is my husband,</LINE>
+<LINE>And what to your sworn counsel I have spoken</LINE>
+<LINE>Is so from word to word; and then you cannot,</LINE>
+<LINE>By the good aid that I of you shall borrow,</LINE>
+<LINE>Err in bestowing it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I should believe you:</LINE>
+<LINE>For you have show'd me that which well approves</LINE>
+<LINE>You're great in fortune.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Take this purse of gold,</LINE>
+<LINE>And let me buy your friendly help thus far,</LINE>
+<LINE>Which I will over-pay and pay again</LINE>
+<LINE>When I have found it. The count he wooes your daughter,</LINE>
+<LINE>Lays down his wanton siege before her beauty,</LINE>
+<LINE>Resolved to carry her: let her in fine consent,</LINE>
+<LINE>As we'll direct her how 'tis best to bear it.</LINE>
+<LINE>Now his important blood will nought deny</LINE>
+<LINE>That she'll demand: a ring the county wears,</LINE>
+<LINE>That downward hath succeeded in his house</LINE>
+<LINE>From son to son, some four or five descents</LINE>
+<LINE>Since the first father wore it: this ring he holds</LINE>
+<LINE>In most rich choice; yet in his idle fire,</LINE>
+<LINE>To buy his will, it would not seem too dear,</LINE>
+<LINE>Howe'er repented after.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Now I see</LINE>
+<LINE>The bottom of your purpose.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>You see it lawful, then: it is no more,</LINE>
+<LINE>But that your daughter, ere she seems as won,</LINE>
+<LINE>Desires this ring; appoints him an encounter;</LINE>
+<LINE>In fine, delivers me to fill the time,</LINE>
+<LINE>Herself most chastely absent: after this,</LINE>
+<LINE>To marry her, I'll add three thousand crowns</LINE>
+<LINE>To what is passed already.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I have yielded:</LINE>
+<LINE>Instruct my daughter how she shall persever,</LINE>
+<LINE>That time and place with this deceit so lawful</LINE>
+<LINE>May prove coherent. Every night he comes</LINE>
+<LINE>With musics of all sorts and songs composed</LINE>
+<LINE>To her unworthiness: it nothing steads us</LINE>
+<LINE>To chide him from our eaves; for he persists</LINE>
+<LINE>As if his life lay on't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Why then to-night</LINE>
+<LINE>Let us assay our plot; which, if it speed,</LINE>
+<LINE>Is wicked meaning in a lawful deed</LINE>
+<LINE>And lawful meaning in a lawful act,</LINE>
+<LINE>Where both not sin, and yet a sinful fact:</LINE>
+<LINE>But let's about it.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+</ACT>
+
+<ACT><TITLE>ACT IV</TITLE>
+
+<SCENE><TITLE>SCENE I.  Without the Florentine camp.</TITLE>
+<STAGEDIR>Enter Second French Lord, with five or six other
+Soldiers in ambush</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>He can come no other way but by this hedge-corner.</LINE>
+<LINE>When you sally upon him, speak what terrible</LINE>
+<LINE>language you will: though you understand it not</LINE>
+<LINE>yourselves, no matter; for we must not seem to</LINE>
+<LINE>understand him, unless some one among us whom we</LINE>
+<LINE>must produce for an interpreter.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Good captain, let me be the interpreter.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Art not acquainted with him? knows he not thy voice?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>No, sir, I warrant you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>But what linsey-woolsey hast thou to speak to us again?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>E'en such as you speak to me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>He must think us some band of strangers i' the</LINE>
+<LINE>adversary's entertainment. Now he hath a smack of</LINE>
+<LINE>all neighbouring languages; therefore we must every</LINE>
+<LINE>one be a man of his own fancy, not to know what we</LINE>
+<LINE>speak one to another; so we seem to know, is to</LINE>
+<LINE>know straight our purpose: choughs' language,</LINE>
+<LINE>gabble enough, and good enough. As for you,</LINE>
+<LINE>interpreter, you must seem very politic. But couch,</LINE>
+<LINE>ho! here he comes, to beguile two hours in a sleep,</LINE>
+<LINE>and then to return and swear the lies he forges.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ten o'clock: within these three hours 'twill be</LINE>
+<LINE>time enough to go home. What shall I say I have</LINE>
+<LINE>done? It must be a very plausive invention that</LINE>
+<LINE>carries it: they begin to smoke me; and disgraces</LINE>
+<LINE>have of late knocked too often at my door. I find</LINE>
+<LINE>my tongue is too foolhardy; but my heart hath the</LINE>
+<LINE>fear of Mars before it and of his creatures, not</LINE>
+<LINE>daring the reports of my tongue.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>This is the first truth that e'er thine own tongue</LINE>
+<LINE>was guilty of.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>What the devil should move me to undertake the</LINE>
+<LINE>recovery of this drum, being not ignorant of the</LINE>
+<LINE>impossibility, and knowing I had no such purpose? I</LINE>
+<LINE>must give myself some hurts, and say I got them in</LINE>
+<LINE>exploit: yet slight ones will not carry it; they</LINE>
+<LINE>will say, 'Came you off with so little?' and great</LINE>
+<LINE>ones I dare not give. Wherefore, what's the</LINE>
+<LINE>instance? Tongue, I must put you into a</LINE>
+<LINE>butter-woman's mouth and buy myself another of</LINE>
+<LINE>Bajazet's mule, if you prattle me into these perils.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Is it possible he should know what he is, and be</LINE>
+<LINE>that he is?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I would the cutting of my garments would serve the</LINE>
+<LINE>turn, or the breaking of my Spanish sword.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>We cannot afford you so.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Or the baring of my beard; and to say it was in</LINE>
+<LINE>stratagem.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>'Twould not do.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Or to drown my clothes, and say I was stripped.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Hardly serve.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Though I swore I leaped from the window of the citadel.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>How deep?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Thirty fathom.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Three great oaths would scarce make that be believed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I would I had any drum of the enemy's: I would swear</LINE>
+<LINE>I recovered it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>You shall hear one anon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>A drum now of the enemy's,--</LINE>
+</SPEECH>
+
+<STAGEDIR>Alarum within</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Throca movousus, cargo, cargo, cargo.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>All</SPEAKER>
+<LINE>Cargo, cargo, cargo, villiando par corbo, cargo.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O, ransom, ransom! do not hide mine eyes.</LINE>
+</SPEECH>
+
+<STAGEDIR>They seize and blindfold him</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Boskos thromuldo boskos.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I know you are the Muskos' regiment:</LINE>
+<LINE>And I shall lose my life for want of language;</LINE>
+<LINE>If there be here German, or Dane, low Dutch,</LINE>
+<LINE>Italian, or French, let him speak to me; I'll</LINE>
+<LINE>Discover that which shall undo the Florentine.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Boskos vauvado: I understand thee, and can speak</LINE>
+<LINE>thy tongue. Kerely bonto, sir, betake thee to thy</LINE>
+<LINE>faith, for seventeen poniards are at thy bosom.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>O, pray, pray, pray! Manka revania dulche.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Oscorbidulchos volivorco.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>The general is content to spare thee yet;</LINE>
+<LINE>And, hoodwink'd as thou art, will lead thee on</LINE>
+<LINE>To gather from thee: haply thou mayst inform</LINE>
+<LINE>Something to save thy life.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O, let me live!</LINE>
+<LINE>And all the secrets of our camp I'll show,</LINE>
+<LINE>Their force, their purposes; nay, I'll speak that</LINE>
+<LINE>Which you will wonder at.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>But wilt thou faithfully?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>If I do not, damn me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Acordo linta.</LINE>
+<LINE>Come on; thou art granted space.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit, with PAROLLES guarded. A short alarum within</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Go, tell the Count Rousillon, and my brother,</LINE>
+<LINE>We have caught the woodcock, and will keep him muffled</LINE>
+<LINE>Till we do hear from them.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Soldier</SPEAKER>
+<LINE>Captain, I will.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>A' will betray us all unto ourselves:</LINE>
+<LINE>Inform on that.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Soldier</SPEAKER>
+<LINE>So I will, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Till then I'll keep him dark and safely lock'd.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Florence. The Widow's house.</TITLE>
+<STAGEDIR>Enter BERTRAM and DIANA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>They told me that your name was Fontibell.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>No, my good lord, Diana.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Titled goddess;</LINE>
+<LINE>And worth it, with addition! But, fair soul,</LINE>
+<LINE>In your fine frame hath love no quality?</LINE>
+<LINE>If quick fire of youth light not your mind,</LINE>
+<LINE>You are no maiden, but a monument:</LINE>
+<LINE>When you are dead, you should be such a one</LINE>
+<LINE>As you are now, for you are cold and stem;</LINE>
+<LINE>And now you should be as your mother was</LINE>
+<LINE>When your sweet self was got.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>She then was honest.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>So should you be.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>No:</LINE>
+<LINE>My mother did but duty; such, my lord,</LINE>
+<LINE>As you owe to your wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>No more o' that;</LINE>
+<LINE>I prithee, do not strive against my vows:</LINE>
+<LINE>I was compell'd to her; but I love thee</LINE>
+<LINE>By love's own sweet constraint, and will for ever</LINE>
+<LINE>Do thee all rights of service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Ay, so you serve us</LINE>
+<LINE>Till we serve you; but when you have our roses,</LINE>
+<LINE>You barely leave our thorns to prick ourselves</LINE>
+<LINE>And mock us with our bareness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>How have I sworn!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>'Tis not the many oaths that makes the truth,</LINE>
+<LINE>But the plain single vow that is vow'd true.</LINE>
+<LINE>What is not holy, that we swear not by,</LINE>
+<LINE>But take the High'st to witness: then, pray you, tell me,</LINE>
+<LINE>If I should swear by God's great attributes,</LINE>
+<LINE>I loved you dearly, would you believe my oaths,</LINE>
+<LINE>When I did love you ill? This has no holding,</LINE>
+<LINE>To swear by him whom I protest to love,</LINE>
+<LINE>That I will work against him: therefore your oaths</LINE>
+<LINE>Are words and poor conditions, but unseal'd,</LINE>
+<LINE>At least in my opinion.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Change it, change it;</LINE>
+<LINE>Be not so holy-cruel: love is holy;</LINE>
+<LINE>And my integrity ne'er knew the crafts</LINE>
+<LINE>That you do charge men with. Stand no more off,</LINE>
+<LINE>But give thyself unto my sick desires,</LINE>
+<LINE>Who then recover: say thou art mine, and ever</LINE>
+<LINE>My love as it begins shall so persever.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I see that men make ropes in such a scarre</LINE>
+<LINE>That we'll forsake ourselves. Give me that ring.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I'll lend it thee, my dear; but have no power</LINE>
+<LINE>To give it from me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Will you not, my lord?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>It is an honour 'longing to our house,</LINE>
+<LINE>Bequeathed down from many ancestors;</LINE>
+<LINE>Which were the greatest obloquy i' the world</LINE>
+<LINE>In me to lose.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Mine honour's such a ring:</LINE>
+<LINE>My chastity's the jewel of our house,</LINE>
+<LINE>Bequeathed down from many ancestors;</LINE>
+<LINE>Which were the greatest obloquy i' the world</LINE>
+<LINE>In me to lose: thus your own proper wisdom</LINE>
+<LINE>Brings in the champion Honour on my part,</LINE>
+<LINE>Against your vain assault.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Here, take my ring:</LINE>
+<LINE>My house, mine honour, yea, my life, be thine,</LINE>
+<LINE>And I'll be bid by thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>When midnight comes, knock at my chamber-window:</LINE>
+<LINE>I'll order take my mother shall not hear.</LINE>
+<LINE>Now will I charge you in the band of truth,</LINE>
+<LINE>When you have conquer'd my yet maiden bed,</LINE>
+<LINE>Remain there but an hour, nor speak to me:</LINE>
+<LINE>My reasons are most strong; and you shall know them</LINE>
+<LINE>When back again this ring shall be deliver'd:</LINE>
+<LINE>And on your finger in the night I'll put</LINE>
+<LINE>Another ring, that what in time proceeds</LINE>
+<LINE>May token to the future our past deeds.</LINE>
+<LINE>Adieu, till then; then, fail not. You have won</LINE>
+<LINE>A wife of me, though there my hope be done.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>A heaven on earth I have won by wooing thee.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>For which live long to thank both heaven and me!</LINE>
+<LINE>You may so in the end.</LINE>
+<LINE>My mother told me just how he would woo,</LINE>
+<LINE>As if she sat in 's heart; she says all men</LINE>
+<LINE>Have the like oaths: he had sworn to marry me</LINE>
+<LINE>When his wife's dead; therefore I'll lie with him</LINE>
+<LINE>When I am buried. Since Frenchmen are so braid,</LINE>
+<LINE>Marry that will, I live and die a maid:</LINE>
+<LINE>Only in this disguise I think't no sin</LINE>
+<LINE>To cozen him that would unjustly win.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  The Florentine camp.</TITLE>
+<STAGEDIR>Enter the two French Lords and some two or three Soldiers</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>You have not given him his mother's letter?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I have delivered it an hour since: there is</LINE>
+<LINE>something in't that stings his nature; for on the</LINE>
+<LINE>reading it he changed almost into another man.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>He has much worthy blame laid upon him for shaking</LINE>
+<LINE>off so good a wife and so sweet a lady.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Especially he hath incurred the everlasting</LINE>
+<LINE>displeasure of the king, who had even tuned his</LINE>
+<LINE>bounty to sing happiness to him. I will tell you a</LINE>
+<LINE>thing, but you shall let it dwell darkly with you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>When you have spoken it, 'tis dead, and I am the</LINE>
+<LINE>grave of it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>He hath perverted a young gentlewoman here in</LINE>
+<LINE>Florence, of a most chaste renown; and this night he</LINE>
+<LINE>fleshes his will in the spoil of her honour: he hath</LINE>
+<LINE>given her his monumental ring, and thinks himself</LINE>
+<LINE>made in the unchaste composition.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Now, God delay our rebellion! as we are ourselves,</LINE>
+<LINE>what things are we!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Merely our own traitors. And as in the common course</LINE>
+<LINE>of all treasons, we still see them reveal</LINE>
+<LINE>themselves, till they attain to their abhorred ends,</LINE>
+<LINE>so he that in this action contrives against his own</LINE>
+<LINE>nobility, in his proper stream o'erflows himself.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Is it not meant damnable in us, to be trumpeters of</LINE>
+<LINE>our unlawful intents? We shall not then have his</LINE>
+<LINE>company to-night?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Not till after midnight; for he is dieted to his hour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>That approaches apace; I would gladly have him see</LINE>
+<LINE>his company anatomized, that he might take a measure</LINE>
+<LINE>of his own judgments, wherein so curiously he had</LINE>
+<LINE>set this counterfeit.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>We will not meddle with him till he come; for his</LINE>
+<LINE>presence must be the whip of the other.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>In the mean time, what hear you of these wars?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I hear there is an overture of peace.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Nay, I assure you, a peace concluded.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>What will Count Rousillon do then? will he travel</LINE>
+<LINE>higher, or return again into France?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>I perceive, by this demand, you are not altogether</LINE>
+<LINE>of his council.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Let it be forbid, sir; so should I be a great deal</LINE>
+<LINE>of his act.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Sir, his wife some two months since fled from his</LINE>
+<LINE>house: her pretence is a pilgrimage to Saint Jaques</LINE>
+<LINE>le Grand; which holy undertaking with most austere</LINE>
+<LINE>sanctimony she accomplished; and, there residing the</LINE>
+<LINE>tenderness of her nature became as a prey to her</LINE>
+<LINE>grief; in fine, made a groan of her last breath, and</LINE>
+<LINE>now she sings in heaven.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>How is this justified?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>The stronger part of it by her own letters, which</LINE>
+<LINE>makes her story true, even to the point of her</LINE>
+<LINE>death: her death itself, which could not be her</LINE>
+<LINE>office to say is come, was faithfully confirmed by</LINE>
+<LINE>the rector of the place.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Hath the count all this intelligence?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Ay, and the particular confirmations, point from</LINE>
+<LINE>point, so to the full arming of the verity.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I am heartily sorry that he'll be glad of this.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>How mightily sometimes we make us comforts of our losses!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>And how mightily some other times we drown our gain</LINE>
+<LINE>in tears! The great dignity that his valour hath</LINE>
+<LINE>here acquired for him shall at home be encountered</LINE>
+<LINE>with a shame as ample.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>The web of our life is of a mingled yarn, good and</LINE>
+<LINE>ill together: our virtues would be proud, if our</LINE>
+<LINE>faults whipped them not; and our crimes would</LINE>
+<LINE>despair, if they were not cherished by our virtues.</LINE>
+<STAGEDIR>Enter a Messenger</STAGEDIR>
+<LINE>How now! where's your master?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Servant</SPEAKER>
+<LINE>He met the duke in the street, sir, of whom he hath</LINE>
+<LINE>taken a solemn leave: his lordship will next</LINE>
+<LINE>morning for France. The duke hath offered him</LINE>
+<LINE>letters of commendations to the king.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>They shall be no more than needful there, if they</LINE>
+<LINE>were more than they can commend.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>They cannot be too sweet for the king's tartness.</LINE>
+<LINE>Here's his lordship now.</LINE>
+<STAGEDIR>Enter BERTRAM</STAGEDIR>
+<LINE>How now, my lord! is't not after midnight?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I have to-night dispatched sixteen businesses, a</LINE>
+<LINE>month's length a-piece, by an abstract of success:</LINE>
+<LINE>I have congied with the duke, done my adieu with his</LINE>
+<LINE>nearest; buried a wife, mourned for her; writ to my</LINE>
+<LINE>lady mother I am returning; entertained my convoy;</LINE>
+<LINE>and between these main parcels of dispatch effected</LINE>
+<LINE>many nicer needs; the last was the greatest, but</LINE>
+<LINE>that I have not ended yet.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>If the business be of any difficulty, and this</LINE>
+<LINE>morning your departure hence, it requires haste of</LINE>
+<LINE>your lordship.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I mean, the business is not ended, as fearing to</LINE>
+<LINE>hear of it hereafter. But shall we have this</LINE>
+<LINE>dialogue between the fool and the soldier? Come,</LINE>
+<LINE>bring forth this counterfeit module, he has deceived</LINE>
+<LINE>me, like a double-meaning prophesier.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Bring him forth: has sat i' the stocks all night,</LINE>
+<LINE>poor gallant knave.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>No matter: his heels have deserved it, in usurping</LINE>
+<LINE>his spurs so long. How does he carry himself?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I have told your lordship already, the stocks carry</LINE>
+<LINE>him. But to answer you as you would be understood;</LINE>
+<LINE>he weeps like a wench that had shed her milk: he</LINE>
+<LINE>hath confessed himself to Morgan, whom he supposes</LINE>
+<LINE>to be a friar, from the time of his remembrance to</LINE>
+<LINE>this very instant disaster of his setting i' the</LINE>
+<LINE>stocks: and what think you he hath confessed?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Nothing of me, has a'?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>His confession is taken, and it shall be read to his</LINE>
+<LINE>face: if your lordship be in't, as I believe you</LINE>
+<LINE>are, you must have the patience to hear it.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES guarded, and First Soldier</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>A plague upon him! muffled! he can say nothing of</LINE>
+<LINE>me: hush, hush!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Hoodman comes! Portotartarosa</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>He calls for the tortures: what will you say</LINE>
+<LINE>without 'em?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I will confess what I know without constraint: if</LINE>
+<LINE>ye pinch me like a pasty, I can say no more.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Bosko chimurcho.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Boblibindo chicurmurco.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>You are a merciful general. Our general bids you</LINE>
+<LINE>answer to what I shall ask you out of a note.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>And truly, as I hope to live.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  'First demand of him how many horse the</LINE>
+<LINE>duke is strong.' What say you to that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Five or six thousand; but very weak and</LINE>
+<LINE>unserviceable: the troops are all scattered, and</LINE>
+<LINE>the commanders very poor rogues, upon my reputation</LINE>
+<LINE>and credit and as I hope to live.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Shall I set down your answer so?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Do: I'll take the sacrament on't, how and which way you will.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>All's one to him. What a past-saving slave is this!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>You're deceived, my lord: this is Monsieur</LINE>
+<LINE>Parolles, the gallant militarist,--that was his own</LINE>
+<LINE>phrase,--that had the whole theoric of war in the</LINE>
+<LINE>knot of his scarf, and the practise in the chape of</LINE>
+<LINE>his dagger.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>I will never trust a man again for keeping his sword</LINE>
+<LINE>clean. nor believe he can have every thing in him</LINE>
+<LINE>by wearing his apparel neatly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Well, that's set down.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Five or six thousand horse, I said,-- I will say</LINE>
+<LINE>true,--or thereabouts, set down, for I'll speak truth.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>He's very near the truth in this.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>But I con him no thanks for't, in the nature he</LINE>
+<LINE>delivers it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Poor rogues, I pray you, say.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Well, that's set down.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I humbly thank you, sir: a truth's a truth, the</LINE>
+<LINE>rogues are marvellous poor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  'Demand of him, of what strength they are</LINE>
+<LINE>a-foot.' What say you to that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>By my troth, sir, if I were to live this present</LINE>
+<LINE>hour, I will tell true. Let me see: Spurio, a</LINE>
+<LINE>hundred and fifty; Sebastian, so many; Corambus, so</LINE>
+<LINE>many; Jaques, so many; Guiltian, Cosmo, Lodowick,</LINE>
+<LINE>and Gratii, two hundred and fifty each; mine own</LINE>
+<LINE>company, Chitopher, Vaumond, Bentii, two hundred and</LINE>
+<LINE>fifty each: so that the muster-file, rotten and</LINE>
+<LINE>sound, upon my life, amounts not to fifteen thousand</LINE>
+<LINE>poll; half of the which dare not shake snow from off</LINE>
+<LINE>their cassocks, lest they shake themselves to pieces.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>What shall be done to him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Nothing, but let him have thanks. Demand of him my</LINE>
+<LINE>condition, and what credit I have with the duke.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Well, that's set down.</LINE>
+<STAGEDIR>Reads</STAGEDIR>
+<LINE>'You shall demand of him, whether one Captain Dumain</LINE>
+<LINE>be i' the camp, a Frenchman; what his reputation is</LINE>
+<LINE>with the duke; what his valour, honesty, and</LINE>
+<LINE>expertness in wars; or whether he thinks it were not</LINE>
+<LINE>possible, with well-weighing sums of gold, to</LINE>
+<LINE>corrupt him to revolt.' What say you to this? what</LINE>
+<LINE>do you know of it?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I beseech you, let me answer to the particular of</LINE>
+<LINE>the inter'gatories: demand them singly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Do you know this Captain Dumain?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I know him: a' was a botcher's 'prentice in Paris,</LINE>
+<LINE>from whence he was whipped for getting the shrieve's</LINE>
+<LINE>fool with child,--a dumb innocent, that could not</LINE>
+<LINE>say him nay.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Nay, by your leave, hold your hands; though I know</LINE>
+<LINE>his brains are forfeit to the next tile that falls.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Well, is this captain in the duke of Florence's camp?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Upon my knowledge, he is, and lousy.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Nay look not so upon me; we shall hear of your</LINE>
+<LINE>lordship anon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>What is his reputation with the duke?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>The duke knows him for no other but a poor officer</LINE>
+<LINE>of mine; and writ to me this other day to turn him</LINE>
+<LINE>out o' the band: I think I have his letter in my pocket.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Marry, we'll search.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>In good sadness, I do not know; either it is there,</LINE>
+<LINE>or it is upon a file with the duke's other letters</LINE>
+<LINE>in my tent.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Here 'tis; here's a paper: shall I read it to you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I do not know if it be it or no.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Our interpreter does it well.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Excellently.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  'Dian, the count's a fool, and full of gold,'--</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>That is not the duke's letter, sir; that is an</LINE>
+<LINE>advertisement to a proper maid in Florence, one</LINE>
+<LINE>Diana, to take heed of the allurement of one Count</LINE>
+<LINE>Rousillon, a foolish idle boy, but for all that very</LINE>
+<LINE>ruttish: I pray you, sir, put it up again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>Nay, I'll read it first, by your favour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My meaning in't, I protest, was very honest in the</LINE>
+<LINE>behalf of the maid; for I knew the young count to be</LINE>
+<LINE>a dangerous and lascivious boy, who is a whale to</LINE>
+<LINE>virginity and devours up all the fry it finds.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Damnable both-sides rogue!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  'When he swears oaths, bid him drop gold, and take it;</LINE>
+<LINE>After he scores, he never pays the score:</LINE>
+<LINE>Half won is match well made; match, and well make it;</LINE>
+<LINE>He ne'er pays after-debts, take it before;</LINE>
+<LINE>And say a soldier, Dian, told thee this,</LINE>
+<LINE>Men are to mell with, boys are not to kiss:</LINE>
+<LINE>For count of this, the count's a fool, I know it,</LINE>
+<LINE>Who pays before, but not when he does owe it.</LINE>
+<LINE>Thine, as he vowed to thee in thine ear,</LINE>
+<LINE>PAROLLES.'</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>He shall be whipped through the army with this rhyme</LINE>
+<LINE>in's forehead.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>This is your devoted friend, sir, the manifold</LINE>
+<LINE>linguist and the armipotent soldier.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I could endure any thing before but a cat, and now</LINE>
+<LINE>he's a cat to me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>I perceive, sir, by the general's looks, we shall be</LINE>
+<LINE>fain to hang you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My life, sir, in any case: not that I am afraid to</LINE>
+<LINE>die; but that, my offences being many, I would</LINE>
+<LINE>repent out the remainder of nature: let me live,</LINE>
+<LINE>sir, in a dungeon, i' the stocks, or any where, so I may live.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>We'll see what may be done, so you confess freely;</LINE>
+<LINE>therefore, once more to this Captain Dumain: you</LINE>
+<LINE>have answered to his reputation with the duke and to</LINE>
+<LINE>his valour: what is his honesty?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>He will steal, sir, an egg out of a cloister: for</LINE>
+<LINE>rapes and ravishments he parallels Nessus: he</LINE>
+<LINE>professes not keeping of oaths; in breaking 'em he</LINE>
+<LINE>is stronger than Hercules: he will lie, sir, with</LINE>
+<LINE>such volubility, that you would think truth were a</LINE>
+<LINE>fool: drunkenness is his best virtue, for he will</LINE>
+<LINE>be swine-drunk; and in his sleep he does little</LINE>
+<LINE>harm, save to his bed-clothes about him; but they</LINE>
+<LINE>know his conditions and lay him in straw. I have but</LINE>
+<LINE>little more to say, sir, of his honesty: he has</LINE>
+<LINE>every thing that an honest man should not have; what</LINE>
+<LINE>an honest man should have, he has nothing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>I begin to love him for this.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>For this description of thine honesty? A pox upon</LINE>
+<LINE>him for me, he's more and more a cat.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>What say you to his expertness in war?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Faith, sir, he has led the drum before the English</LINE>
+<LINE>tragedians; to belie him, I will not, and more of</LINE>
+<LINE>his soldiership I know not; except, in that country</LINE>
+<LINE>he had the honour to be the officer at a place there</LINE>
+<LINE>called Mile-end, to instruct for the doubling of</LINE>
+<LINE>files: I would do the man what honour I can, but of</LINE>
+<LINE>this I am not certain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>He hath out-villained villany so far, that the</LINE>
+<LINE>rarity redeems him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>A pox on him, he's a cat still.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>His qualities being at this poor price, I need not</LINE>
+<LINE>to ask you if gold will corrupt him to revolt.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Sir, for a quart d'ecu he will sell the fee-simple</LINE>
+<LINE>of his salvation, the inheritance of it; and cut the</LINE>
+<LINE>entail from all remainders, and a perpetual</LINE>
+<LINE>succession for it perpetually.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>What's his brother, the other Captain Dumain?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Why does be ask him of me?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>What's he?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>E'en a crow o' the same nest; not altogether so</LINE>
+<LINE>great as the first in goodness, but greater a great</LINE>
+<LINE>deal in evil: he excels his brother for a coward,</LINE>
+<LINE>yet his brother is reputed one of the best that is:</LINE>
+<LINE>in a retreat he outruns any lackey; marry, in coming</LINE>
+<LINE>on he has the cramp.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>If your life be saved, will you undertake to betray</LINE>
+<LINE>the Florentine?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Ay, and the captain of his horse, Count Rousillon.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>I'll whisper with the general, and know his pleasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE><STAGEDIR>Aside</STAGEDIR>  I'll no more drumming; a plague of all</LINE>
+<LINE>drums! Only to seem to deserve well, and to</LINE>
+<LINE>beguile the supposition of that lascivious young boy</LINE>
+<LINE>the count, have I run into this danger. Yet who</LINE>
+<LINE>would have suspected an ambush where I was taken?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>There is no remedy, sir, but you must die: the</LINE>
+<LINE>general says, you that have so traitorously</LINE>
+<LINE>discovered the secrets of your army and made such</LINE>
+<LINE>pestiferous reports of men very nobly held, can</LINE>
+<LINE>serve the world for no honest use; therefore you</LINE>
+<LINE>must die. Come, headsman, off with his head.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O Lord, sir, let me live, or let me see my death!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>That shall you, and take your leave of all your friends.</LINE>
+<STAGEDIR>Unblinding him</STAGEDIR>
+<LINE>So, look about you: know you any here?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Good morrow, noble captain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>God bless you, Captain Parolles.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>God save you, noble captain.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Second Lord</SPEAKER>
+<LINE>Captain, what greeting will you to my Lord Lafeu?</LINE>
+<LINE>I am for France.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Lord</SPEAKER>
+<LINE>Good captain, will you give me a copy of the sonnet</LINE>
+<LINE>you writ to Diana in behalf of the Count Rousillon?</LINE>
+<LINE>an I were not a very coward, I'ld compel it of you:</LINE>
+<LINE>but fare you well.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt BERTRAM and Lords</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>You are undone, captain, all but your scarf; that</LINE>
+<LINE>has a knot on't yet</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Who cannot be crushed with a plot?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>First Soldier</SPEAKER>
+<LINE>If you could find out a country where but women were</LINE>
+<LINE>that had received so much shame, you might begin an</LINE>
+<LINE>impudent nation. Fare ye well, sir; I am for France</LINE>
+<LINE>too: we shall speak of you there.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit with Soldiers</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Yet am I thankful: if my heart were great,</LINE>
+<LINE>'Twould burst at this. Captain I'll be no more;</LINE>
+<LINE>But I will eat and drink, and sleep as soft</LINE>
+<LINE>As captain shall: simply the thing I am</LINE>
+<LINE>Shall make me live. Who knows himself a braggart,</LINE>
+<LINE>Let him fear this, for it will come to pass</LINE>
+<LINE>that every braggart shall be found an ass.</LINE>
+<LINE>Rust, sword? cool, blushes! and, Parolles, live</LINE>
+<LINE>Safest in shame! being fool'd, by foolery thrive!</LINE>
+<LINE>There's place and means for every man alive.</LINE>
+<LINE>I'll after them.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE IV.  Florence. The Widow's house.</TITLE>
+<STAGEDIR>Enter HELENA, Widow, and DIANA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That you may well perceive I have not wrong'd you,</LINE>
+<LINE>One of the greatest in the Christian world</LINE>
+<LINE>Shall be my surety; 'fore whose throne 'tis needful,</LINE>
+<LINE>Ere I can perfect mine intents, to kneel:</LINE>
+<LINE>Time was, I did him a desired office,</LINE>
+<LINE>Dear almost as his life; which gratitude</LINE>
+<LINE>Through flinty Tartar's bosom would peep forth,</LINE>
+<LINE>And answer, thanks: I duly am inform'd</LINE>
+<LINE>His grace is at Marseilles; to which place</LINE>
+<LINE>We have convenient convoy. You must know</LINE>
+<LINE>I am supposed dead: the army breaking,</LINE>
+<LINE>My husband hies him home; where, heaven aiding,</LINE>
+<LINE>And by the leave of my good lord the king,</LINE>
+<LINE>We'll be before our welcome.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Gentle madam,</LINE>
+<LINE>You never had a servant to whose trust</LINE>
+<LINE>Your business was more welcome.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Nor you, mistress,</LINE>
+<LINE>Ever a friend whose thoughts more truly labour</LINE>
+<LINE>To recompense your love: doubt not but heaven</LINE>
+<LINE>Hath brought me up to be your daughter's dower,</LINE>
+<LINE>As it hath fated her to be my motive</LINE>
+<LINE>And helper to a husband. But, O strange men!</LINE>
+<LINE>That can such sweet use make of what they hate,</LINE>
+<LINE>When saucy trusting of the cozen'd thoughts</LINE>
+<LINE>Defiles the pitchy night: so lust doth play</LINE>
+<LINE>With what it loathes for that which is away.</LINE>
+<LINE>But more of this hereafter. You, Diana,</LINE>
+<LINE>Under my poor instructions yet must suffer</LINE>
+<LINE>Something in my behalf.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Let death and honesty</LINE>
+<LINE>Go with your impositions, I am yours</LINE>
+<LINE>Upon your will to suffer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Yet, I pray you:</LINE>
+<LINE>But with the word the time will bring on summer,</LINE>
+<LINE>When briers shall have leaves as well as thorns,</LINE>
+<LINE>And be as sweet as sharp. We must away;</LINE>
+<LINE>Our wagon is prepared, and time revives us:</LINE>
+<LINE>All's well that ends well; still the fine's the crown;</LINE>
+<LINE>Whate'er the course, the end is the renown.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE V.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Enter COUNTESS, LAFEU, and Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>No, no, no, your son was misled with a snipt-taffeta</LINE>
+<LINE>fellow there, whose villanous saffron would have</LINE>
+<LINE>made all the unbaked and doughy youth of a nation in</LINE>
+<LINE>his colour: your daughter-in-law had been alive at</LINE>
+<LINE>this hour, and your son here at home, more advanced</LINE>
+<LINE>by the king than by that red-tailed humble-bee I speak of.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>I would I had not known him; it was the death of the</LINE>
+<LINE>most virtuous gentlewoman that ever nature had</LINE>
+<LINE>praise for creating. If she had partaken of my</LINE>
+<LINE>flesh, and cost me the dearest groans of a mother, I</LINE>
+<LINE>could not have owed her a more rooted love.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>'Twas a good lady, 'twas a good lady: we may pick a</LINE>
+<LINE>thousand salads ere we light on such another herb.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Indeed, sir, she was the sweet marjoram of the</LINE>
+<LINE>salad, or rather, the herb of grace.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>They are not herbs, you knave; they are nose-herbs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I am no great Nebuchadnezzar, sir; I have not much</LINE>
+<LINE>skill in grass.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Whether dost thou profess thyself, a knave or a fool?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>A fool, sir, at a woman's service, and a knave at a man's.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Your distinction?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I would cozen the man of his wife and do his service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>So you were a knave at his service, indeed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>And I would give his wife my bauble, sir, to do her service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I will subscribe for thee, thou art both knave and fool.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>At your service.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>No, no, no.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Why, sir, if I cannot serve you, I can serve as</LINE>
+<LINE>great a prince as you are.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Who's that? a Frenchman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Faith, sir, a' has an English name; but his fisnomy</LINE>
+<LINE>is more hotter in France than there.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>What prince is that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>The black prince, sir; alias, the prince of</LINE>
+<LINE>darkness; alias, the devil.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Hold thee, there's my purse: I give thee not this</LINE>
+<LINE>to suggest thee from thy master thou talkest of;</LINE>
+<LINE>serve him still.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>I am a woodland fellow, sir, that always loved a</LINE>
+<LINE>great fire; and the master I speak of ever keeps a</LINE>
+<LINE>good fire. But, sure, he is the prince of the</LINE>
+<LINE>world; let his nobility remain in's court. I am for</LINE>
+<LINE>the house with the narrow gate, which I take to be</LINE>
+<LINE>too little for pomp to enter: some that humble</LINE>
+<LINE>themselves may; but the many will be too chill and</LINE>
+<LINE>tender, and they'll be for the flowery way that</LINE>
+<LINE>leads to the broad gate and the great fire.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Go thy ways, I begin to be aweary of thee; and I</LINE>
+<LINE>tell thee so before, because I would not fall out</LINE>
+<LINE>with thee. Go thy ways: let my horses be well</LINE>
+<LINE>looked to, without any tricks.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>If I put any tricks upon 'em, sir, they shall be</LINE>
+<LINE>jades' tricks; which are their own right by the law of nature.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A shrewd knave and an unhappy.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>So he is. My lord that's gone made himself much</LINE>
+<LINE>sport out of him: by his authority he remains here,</LINE>
+<LINE>which he thinks is a patent for his sauciness; and,</LINE>
+<LINE>indeed, he has no pace, but runs where he will.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I like him well; 'tis not amiss. And I was about to</LINE>
+<LINE>tell you, since I heard of the good lady's death and</LINE>
+<LINE>that my lord your son was upon his return home, I</LINE>
+<LINE>moved the king my master to speak in the behalf of</LINE>
+<LINE>my daughter; which, in the minority of them both,</LINE>
+<LINE>his majesty, out of a self-gracious remembrance, did</LINE>
+<LINE>first propose: his highness hath promised me to do</LINE>
+<LINE>it: and, to stop up the displeasure he hath</LINE>
+<LINE>conceived against your son, there is no fitter</LINE>
+<LINE>matter. How does your ladyship like it?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>With very much content, my lord; and I wish it</LINE>
+<LINE>happily effected.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>His highness comes post from Marseilles, of as able</LINE>
+<LINE>body as when he numbered thirty: he will be here</LINE>
+<LINE>to-morrow, or I am deceived by him that in such</LINE>
+<LINE>intelligence hath seldom failed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>It rejoices me, that I hope I shall see him ere I</LINE>
+<LINE>die. I have letters that my son will be here</LINE>
+<LINE>to-night: I shall beseech your lordship to remain</LINE>
+<LINE>with me till they meet together.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Madam, I was thinking with what manners I might</LINE>
+<LINE>safely be admitted.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>You need but plead your honourable privilege.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Lady, of that I have made a bold charter; but I</LINE>
+<LINE>thank my God it holds yet.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter Clown</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>O madam, yonder's my lord your son with a patch of</LINE>
+<LINE>velvet on's face: whether there be a scar under't</LINE>
+<LINE>or no, the velvet knows; but 'tis a goodly patch of</LINE>
+<LINE>velvet: his left cheek is a cheek of two pile and a</LINE>
+<LINE>half, but his right cheek is worn bare.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>A scar nobly got, or a noble scar, is a good livery</LINE>
+<LINE>of honour; so belike is that.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>But it is your carbonadoed face.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Let us go see your son, I pray you: I long to talk</LINE>
+<LINE>with the young noble soldier.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Faith there's a dozen of 'em, with delicate fine</LINE>
+<LINE>hats and most courteous feathers, which bow the head</LINE>
+<LINE>and nod at every man.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+</ACT>
+
+<ACT><TITLE>ACT V</TITLE>
+
+<SCENE><TITLE>SCENE I.  Marseilles. A street.</TITLE>
+<STAGEDIR>Enter HELENA, Widow, and DIANA, with two
+Attendants</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>But this exceeding posting day and night</LINE>
+<LINE>Must wear your spirits low; we cannot help it:</LINE>
+<LINE>But since you have made the days and nights as one,</LINE>
+<LINE>To wear your gentle limbs in my affairs,</LINE>
+<LINE>Be bold you do so grow in my requital</LINE>
+<LINE>As nothing can unroot you. In happy time;</LINE>
+<STAGEDIR>Enter a Gentleman</STAGEDIR>
+<LINE>This man may help me to his majesty's ear,</LINE>
+<LINE>If he would spend his power. God save you, sir.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>And you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Sir, I have seen you in the court of France.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>I have been sometimes there.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I do presume, sir, that you are not fallen</LINE>
+<LINE>From the report that goes upon your goodness;</LINE>
+<LINE>An therefore, goaded with most sharp occasions,</LINE>
+<LINE>Which lay nice manners by, I put you to</LINE>
+<LINE>The use of your own virtues, for the which</LINE>
+<LINE>I shall continue thankful.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>What's your will?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>That it will please you</LINE>
+<LINE>To give this poor petition to the king,</LINE>
+<LINE>And aid me with that store of power you have</LINE>
+<LINE>To come into his presence.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>The king's not here.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>Not here, sir!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>Not, indeed:</LINE>
+<LINE>He hence removed last night and with more haste</LINE>
+<LINE>Than is his use.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>Lord, how we lose our pains!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>All's well that ends well yet,</LINE>
+<LINE>Though time seem so adverse and means unfit.</LINE>
+<LINE>I do beseech you, whither is he gone?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>Marry, as I take it, to Rousillon;</LINE>
+<LINE>Whither I am going.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>I do beseech you, sir,</LINE>
+<LINE>Since you are like to see the king before me,</LINE>
+<LINE>Commend the paper to his gracious hand,</LINE>
+<LINE>Which I presume shall render you no blame</LINE>
+<LINE>But rather make you thank your pains for it.</LINE>
+<LINE>I will come after you with what good speed</LINE>
+<LINE>Our means will make us means.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>This I'll do for you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>And you shall find yourself to be well thank'd,</LINE>
+<LINE>Whate'er falls more. We must to horse again.</LINE>
+<LINE>Go, go, provide.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE II.  Rousillon. Before the COUNT's palace.</TITLE>
+<STAGEDIR>Enter Clown, and PAROLLES, following</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Good Monsieur Lavache, give my Lord Lafeu this</LINE>
+<LINE>letter: I have ere now, sir, been better known to</LINE>
+<LINE>you, when I have held familiarity with fresher</LINE>
+<LINE>clothes; but I am now, sir, muddied in fortune's</LINE>
+<LINE>mood, and smell somewhat strong of her strong</LINE>
+<LINE>displeasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Truly, fortune's displeasure is but sluttish, if it</LINE>
+<LINE>smell so strongly as thou speakest of: I will</LINE>
+<LINE>henceforth eat no fish of fortune's buttering.</LINE>
+<LINE>Prithee, allow the wind.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Nay, you need not to stop your nose, sir; I spake</LINE>
+<LINE>but by a metaphor.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Indeed, sir, if your metaphor stink, I will stop my</LINE>
+<LINE>nose; or against any man's metaphor. Prithee, get</LINE>
+<LINE>thee further.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Pray you, sir, deliver me this paper.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Clown</SPEAKER>
+<LINE>Foh! prithee, stand away: a paper from fortune's</LINE>
+<LINE>close-stool to give to a nobleman! Look, here he</LINE>
+<LINE>comes himself.</LINE>
+<STAGEDIR>Enter LAFEU</STAGEDIR>
+<LINE>Here is a purr of fortune's, sir, or of fortune's</LINE>
+<LINE>cat,--but not a musk-cat,--that has fallen into the</LINE>
+<LINE>unclean fishpond of her displeasure, and, as he</LINE>
+<LINE>says, is muddied withal: pray you, sir, use the</LINE>
+<LINE>carp as you may; for he looks like a poor, decayed,</LINE>
+<LINE>ingenious, foolish, rascally knave. I do pity his</LINE>
+<LINE>distress in my similes of comfort and leave him to</LINE>
+<LINE>your lordship.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My lord, I am a man whom fortune hath cruelly</LINE>
+<LINE>scratched.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>And what would you have me to do? 'Tis too late to</LINE>
+<LINE>pare her nails now. Wherein have you played the</LINE>
+<LINE>knave with fortune, that she should scratch you, who</LINE>
+<LINE>of herself is a good lady and would not have knaves</LINE>
+<LINE>thrive long under her? There's a quart d'ecu for</LINE>
+<LINE>you: let the justices make you and fortune friends:</LINE>
+<LINE>I am for other business.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I beseech your honour to hear me one single word.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You beg a single penny more: come, you shall ha't;</LINE>
+<LINE>save your word.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>My name, my good lord, is Parolles.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>You beg more than 'word,' then. Cox my passion!</LINE>
+<LINE>give me your hand. How does your drum?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>O my good lord, you were the first that found me!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Was I, in sooth? and I was the first that lost thee.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>It lies in you, my lord, to bring me in some grace,</LINE>
+<LINE>for you did bring me out.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Out upon thee, knave! dost thou put upon me at once</LINE>
+<LINE>both the office of God and the devil? One brings</LINE>
+<LINE>thee in grace and the other brings thee out.</LINE>
+<STAGEDIR>Trumpets sound</STAGEDIR>
+<LINE>The king's coming; I know by his trumpets. Sirrah,</LINE>
+<LINE>inquire further after me; I had talk of you last</LINE>
+<LINE>night: though you are a fool and a knave, you shall</LINE>
+<LINE>eat; go to, follow.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I praise God for you.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</SCENE>
+
+<SCENE><TITLE>SCENE III.  Rousillon. The COUNT's palace.</TITLE>
+<STAGEDIR>Flourish. Enter KING, COUNTESS, LAFEU, the two
+French Lords, with Attendants</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>We lost a jewel of her; and our esteem</LINE>
+<LINE>Was made much poorer by it: but your son,</LINE>
+<LINE>As mad in folly, lack'd the sense to know</LINE>
+<LINE>Her estimation home.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>'Tis past, my liege;</LINE>
+<LINE>And I beseech your majesty to make it</LINE>
+<LINE>Natural rebellion, done i' the blaze of youth;</LINE>
+<LINE>When oil and fire, too strong for reason's force,</LINE>
+<LINE>O'erbears it and burns on.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>My honour'd lady,</LINE>
+<LINE>I have forgiven and forgotten all;</LINE>
+<LINE>Though my revenges were high bent upon him,</LINE>
+<LINE>And watch'd the time to shoot.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>This I must say,</LINE>
+<LINE>But first I beg my pardon, the young lord</LINE>
+<LINE>Did to his majesty, his mother and his lady</LINE>
+<LINE>Offence of mighty note; but to himself</LINE>
+<LINE>The greatest wrong of all. He lost a wife</LINE>
+<LINE>Whose beauty did astonish the survey</LINE>
+<LINE>Of richest eyes, whose words all ears took captive,</LINE>
+<LINE>Whose dear perfection hearts that scorn'd to serve</LINE>
+<LINE>Humbly call'd mistress.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Praising what is lost</LINE>
+<LINE>Makes the remembrance dear. Well, call him hither;</LINE>
+<LINE>We are reconciled, and the first view shall kill</LINE>
+<LINE>All repetition: let him not ask our pardon;</LINE>
+<LINE>The nature of his great offence is dead,</LINE>
+<LINE>And deeper than oblivion we do bury</LINE>
+<LINE>The incensing relics of it: let him approach,</LINE>
+<LINE>A stranger, no offender; and inform him</LINE>
+<LINE>So 'tis our will he should.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>I shall, my liege.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What says he to your daughter? have you spoke?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>All that he is hath reference to your highness.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Then shall we have a match. I have letters sent me</LINE>
+<LINE>That set him high in fame.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter BERTRAM</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He looks well on't.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I am not a day of season,</LINE>
+<LINE>For thou mayst see a sunshine and a hail</LINE>
+<LINE>In me at once: but to the brightest beams</LINE>
+<LINE>Distracted clouds give way; so stand thou forth;</LINE>
+<LINE>The time is fair again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My high-repented blames,</LINE>
+<LINE>Dear sovereign, pardon to me.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>All is whole;</LINE>
+<LINE>Not one word more of the consumed time.</LINE>
+<LINE>Let's take the instant by the forward top;</LINE>
+<LINE>For we are old, and on our quick'st decrees</LINE>
+<LINE>The inaudible and noiseless foot of Time</LINE>
+<LINE>Steals ere we can effect them. You remember</LINE>
+<LINE>The daughter of this lord?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Admiringly, my liege, at first</LINE>
+<LINE>I stuck my choice upon her, ere my heart</LINE>
+<LINE>Durst make too bold a herald of my tongue</LINE>
+<LINE>Where the impression of mine eye infixing,</LINE>
+<LINE>Contempt his scornful perspective did lend me,</LINE>
+<LINE>Which warp'd the line of every other favour;</LINE>
+<LINE>Scorn'd a fair colour, or express'd it stolen;</LINE>
+<LINE>Extended or contracted all proportions</LINE>
+<LINE>To a most hideous object: thence it came</LINE>
+<LINE>That she whom all men praised and whom myself,</LINE>
+<LINE>Since I have lost, have loved, was in mine eye</LINE>
+<LINE>The dust that did offend it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Well excused:</LINE>
+<LINE>That thou didst love her, strikes some scores away</LINE>
+<LINE>From the great compt: but love that comes too late,</LINE>
+<LINE>Like a remorseful pardon slowly carried,</LINE>
+<LINE>To the great sender turns a sour offence,</LINE>
+<LINE>Crying, 'That's good that's gone.' Our rash faults</LINE>
+<LINE>Make trivial price of serious things we have,</LINE>
+<LINE>Not knowing them until we know their grave:</LINE>
+<LINE>Oft our displeasures, to ourselves unjust,</LINE>
+<LINE>Destroy our friends and after weep their dust</LINE>
+<LINE>Our own love waking cries to see what's done,</LINE>
+<LINE>While shame full late sleeps out the afternoon.</LINE>
+<LINE>Be this sweet Helen's knell, and now forget her.</LINE>
+<LINE>Send forth your amorous token for fair Maudlin:</LINE>
+<LINE>The main consents are had; and here we'll stay</LINE>
+<LINE>To see our widower's second marriage-day.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Which better than the first, O dear heaven, bless!</LINE>
+<LINE>Or, ere they meet, in me, O nature, cesse!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Come on, my son, in whom my house's name</LINE>
+<LINE>Must be digested, give a favour from you</LINE>
+<LINE>To sparkle in the spirits of my daughter,</LINE>
+<LINE>That she may quickly come.</LINE>
+<STAGEDIR>BERTRAM gives a ring</STAGEDIR>
+<LINE>By my old beard,</LINE>
+<LINE>And every hair that's on't, Helen, that's dead,</LINE>
+<LINE>Was a sweet creature: such a ring as this,</LINE>
+<LINE>The last that e'er I took her at court,</LINE>
+<LINE>I saw upon her finger.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Hers it was not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Now, pray you, let me see it; for mine eye,</LINE>
+<LINE>While I was speaking, oft was fasten'd to't.</LINE>
+<LINE>This ring was mine; and, when I gave it Helen,</LINE>
+<LINE>I bade her, if her fortunes ever stood</LINE>
+<LINE>Necessitied to help, that by this token</LINE>
+<LINE>I would relieve her. Had you that craft, to reave</LINE>
+<LINE>her</LINE>
+<LINE>Of what should stead her most?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My gracious sovereign,</LINE>
+<LINE>Howe'er it pleases you to take it so,</LINE>
+<LINE>The ring was never hers.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Son, on my life,</LINE>
+<LINE>I have seen her wear it; and she reckon'd it</LINE>
+<LINE>At her life's rate.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I am sure I saw her wear it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>You are deceived, my lord; she never saw it:</LINE>
+<LINE>In Florence was it from a casement thrown me,</LINE>
+<LINE>Wrapp'd in a paper, which contain'd the name</LINE>
+<LINE>Of her that threw it: noble she was, and thought</LINE>
+<LINE>I stood engaged: but when I had subscribed</LINE>
+<LINE>To mine own fortune and inform'd her fully</LINE>
+<LINE>I could not answer in that course of honour</LINE>
+<LINE>As she had made the overture, she ceased</LINE>
+<LINE>In heavy satisfaction and would never</LINE>
+<LINE>Receive the ring again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Plutus himself,</LINE>
+<LINE>That knows the tinct and multiplying medicine,</LINE>
+<LINE>Hath not in nature's mystery more science</LINE>
+<LINE>Than I have in this ring: 'twas mine, 'twas Helen's,</LINE>
+<LINE>Whoever gave it you. Then, if you know</LINE>
+<LINE>That you are well acquainted with yourself,</LINE>
+<LINE>Confess 'twas hers, and by what rough enforcement</LINE>
+<LINE>You got it from her: she call'd the saints to surety</LINE>
+<LINE>That she would never put it from her finger,</LINE>
+<LINE>Unless she gave it to yourself in bed,</LINE>
+<LINE>Where you have never come, or sent it us</LINE>
+<LINE>Upon her great disaster.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>She never saw it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thou speak'st it falsely, as I love mine honour;</LINE>
+<LINE>And makest conjectural fears to come into me</LINE>
+<LINE>Which I would fain shut out. If it should prove</LINE>
+<LINE>That thou art so inhuman,--'twill not prove so;--</LINE>
+<LINE>And yet I know not: thou didst hate her deadly,</LINE>
+<LINE>And she is dead; which nothing, but to close</LINE>
+<LINE>Her eyes myself, could win me to believe,</LINE>
+<LINE>More than to see this ring. Take him away.</LINE>
+<STAGEDIR>Guards seize BERTRAM</STAGEDIR>
+<LINE>My fore-past proofs, howe'er the matter fall,</LINE>
+<LINE>Shall tax my fears of little vanity,</LINE>
+<LINE>Having vainly fear'd too little. Away with him!</LINE>
+<LINE>We'll sift this matter further.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>If you shall prove</LINE>
+<LINE>This ring was ever hers, you shall as easy</LINE>
+<LINE>Prove that I husbanded her bed in Florence,</LINE>
+<LINE>Where yet she never was.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit, guarded</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I am wrapp'd in dismal thinkings.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter a Gentleman</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>Gentleman</SPEAKER>
+<LINE>Gracious sovereign,</LINE>
+<LINE>Whether I have been to blame or no, I know not:</LINE>
+<LINE>Here's a petition from a Florentine,</LINE>
+<LINE>Who hath for four or five removes come short</LINE>
+<LINE>To tender it herself. I undertook it,</LINE>
+<LINE>Vanquish'd thereto by the fair grace and speech</LINE>
+<LINE>Of the poor suppliant, who by this I know</LINE>
+<LINE>Is here attending: her business looks in her</LINE>
+<LINE>With an importing visage; and she told me,</LINE>
+<LINE>In a sweet verbal brief, it did concern</LINE>
+<LINE>Your highness with herself.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE><STAGEDIR>Reads</STAGEDIR>  Upon his many protestations to marry me</LINE>
+<LINE>when his wife was dead, I blush to say it, he won</LINE>
+<LINE>me. Now is the Count Rousillon a widower: his vows</LINE>
+<LINE>are forfeited to me, and my honour's paid to him. He</LINE>
+<LINE>stole from Florence, taking no leave, and I follow</LINE>
+<LINE>him to his country for justice: grant it me, O</LINE>
+<LINE>king! in you it best lies; otherwise a seducer</LINE>
+<LINE>flourishes, and a poor maid is undone.</LINE>
+<LINE>DIANA CAPILET.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I will buy me a son-in-law in a fair, and toll for</LINE>
+<LINE>this: I'll none of him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>The heavens have thought well on thee Lafeu,</LINE>
+<LINE>To bring forth this discovery. Seek these suitors:</LINE>
+<LINE>Go speedily and bring again the count.</LINE>
+<LINE>I am afeard the life of Helen, lady,</LINE>
+<LINE>Was foully snatch'd.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>Now, justice on the doers!</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter BERTRAM, guarded</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I wonder, sir, sith wives are monsters to you,</LINE>
+<LINE>And that you fly them as you swear them lordship,</LINE>
+<LINE>Yet you desire to marry.</LINE>
+<STAGEDIR>Enter Widow and DIANA</STAGEDIR>
+<LINE>What woman's that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I am, my lord, a wretched Florentine,</LINE>
+<LINE>Derived from the ancient Capilet:</LINE>
+<LINE>My suit, as I do understand, you know,</LINE>
+<LINE>And therefore know how far I may be pitied.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>Widow</SPEAKER>
+<LINE>I am her mother, sir, whose age and honour</LINE>
+<LINE>Both suffer under this complaint we bring,</LINE>
+<LINE>And both shall cease, without your remedy.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Come hither, count; do you know these women?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My lord, I neither can nor will deny</LINE>
+<LINE>But that I know them: do they charge me further?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Why do you look so strange upon your wife?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>She's none of mine, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>If you shall marry,</LINE>
+<LINE>You give away this hand, and that is mine;</LINE>
+<LINE>You give away heaven's vows, and those are mine;</LINE>
+<LINE>You give away myself, which is known mine;</LINE>
+<LINE>For I by vow am so embodied yours,</LINE>
+<LINE>That she which marries you must marry me,</LINE>
+<LINE>Either both or none.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Your reputation comes too short for my daughter; you</LINE>
+<LINE>are no husband for her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My lord, this is a fond and desperate creature,</LINE>
+<LINE>Whom sometime I have laugh'd with: let your highness</LINE>
+<LINE>Lay a more noble thought upon mine honour</LINE>
+<LINE>Than for to think that I would sink it here.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Sir, for my thoughts, you have them ill to friend</LINE>
+<LINE>Till your deeds gain them: fairer prove your honour</LINE>
+<LINE>Than in my thought it lies.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Good my lord,</LINE>
+<LINE>Ask him upon his oath, if he does think</LINE>
+<LINE>He had not my virginity.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What say'st thou to her?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>She's impudent, my lord,</LINE>
+<LINE>And was a common gamester to the camp.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>He does me wrong, my lord; if I were so,</LINE>
+<LINE>He might have bought me at a common price:</LINE>
+<LINE>Do not believe him. O, behold this ring,</LINE>
+<LINE>Whose high respect and rich validity</LINE>
+<LINE>Did lack a parallel; yet for all that</LINE>
+<LINE>He gave it to a commoner o' the camp,</LINE>
+<LINE>If I be one.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>COUNTESS</SPEAKER>
+<LINE>He blushes, and 'tis it:</LINE>
+<LINE>Of six preceding ancestors, that gem,</LINE>
+<LINE>Conferr'd by testament to the sequent issue,</LINE>
+<LINE>Hath it been owed and worn. This is his wife;</LINE>
+<LINE>That ring's a thousand proofs.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Methought you said</LINE>
+<LINE>You saw one here in court could witness it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I did, my lord, but loath am to produce</LINE>
+<LINE>So bad an instrument: his name's Parolles.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>I saw the man to-day, if man he be.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Find him, and bring him hither.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exit an Attendant</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>What of him?</LINE>
+<LINE>He's quoted for a most perfidious slave,</LINE>
+<LINE>With all the spots o' the world tax'd and debosh'd;</LINE>
+<LINE>Whose nature sickens but to speak a truth.</LINE>
+<LINE>Am I or that or this for what he'll utter,</LINE>
+<LINE>That will speak any thing?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>She hath that ring of yours.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I think she has: certain it is I liked her,</LINE>
+<LINE>And boarded her i' the wanton way of youth:</LINE>
+<LINE>She knew her distance and did angle for me,</LINE>
+<LINE>Madding my eagerness with her restraint,</LINE>
+<LINE>As all impediments in fancy's course</LINE>
+<LINE>Are motives of more fancy; and, in fine,</LINE>
+<LINE>Her infinite cunning, with her modern grace,</LINE>
+<LINE>Subdued me to her rate: she got the ring;</LINE>
+<LINE>And I had that which any inferior might</LINE>
+<LINE>At market-price have bought.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I must be patient:</LINE>
+<LINE>You, that have turn'd off a first so noble wife,</LINE>
+<LINE>May justly diet me. I pray you yet;</LINE>
+<LINE>Since you lack virtue, I will lose a husband;</LINE>
+<LINE>Send for your ring, I will return it home,</LINE>
+<LINE>And give me mine again.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>I have it not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>What ring was yours, I pray you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Sir, much like</LINE>
+<LINE>The same upon your finger.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Know you this ring? this ring was his of late.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>And this was it I gave him, being abed.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>The story then goes false, you threw it him</LINE>
+<LINE>Out of a casement.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I have spoke the truth.</LINE>
+</SPEECH>
+
+<STAGEDIR>Enter PAROLLES</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>My lord, I do confess the ring was hers.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>You boggle shrewdly, every feather stars you.</LINE>
+<LINE>Is this the man you speak of?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Ay, my lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Tell me, sirrah, but tell me true, I charge you,</LINE>
+<LINE>Not fearing the displeasure of your master,</LINE>
+<LINE>Which on your just proceeding I'll keep off,</LINE>
+<LINE>By him and by this woman here what know you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>So please your majesty, my master hath been an</LINE>
+<LINE>honourable gentleman: tricks he hath had in him,</LINE>
+<LINE>which gentlemen have.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Come, come, to the purpose: did he love this woman?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Faith, sir, he did love her; but how?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>How, I pray you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>He did love her, sir, as a gentleman loves a woman.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>How is that?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>He loved her, sir, and loved her not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>As thou art a knave, and no knave. What an</LINE>
+<LINE>equivocal companion is this!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>I am a poor man, and at your majesty's command.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>He's a good drum, my lord, but a naughty orator.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Do you know he promised me marriage?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Faith, I know more than I'll speak.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>But wilt thou not speak all thou knowest?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>PAROLLES</SPEAKER>
+<LINE>Yes, so please your majesty. I did go between them,</LINE>
+<LINE>as I said; but more than that, he loved her: for</LINE>
+<LINE>indeed he was mad for her, and talked of Satan and</LINE>
+<LINE>of Limbo and of Furies and I know not what: yet I</LINE>
+<LINE>was in that credit with them at that time that I</LINE>
+<LINE>knew of their going to bed, and of other motions,</LINE>
+<LINE>as promising her marriage, and things which would</LINE>
+<LINE>derive me ill will to speak of; therefore I will not</LINE>
+<LINE>speak what I know.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Thou hast spoken all already, unless thou canst say</LINE>
+<LINE>they are married: but thou art too fine in thy</LINE>
+<LINE>evidence; therefore stand aside.</LINE>
+<LINE>This ring, you say, was yours?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Ay, my good lord.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Where did you buy it? or who gave it you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>It was not given me, nor I did not buy it.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Who lent it you?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>It was not lent me neither.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Where did you find it, then?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I found it not.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>If it were yours by none of all these ways,</LINE>
+<LINE>How could you give it him?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I never gave it him.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>This woman's an easy glove, my lord; she goes off</LINE>
+<LINE>and on at pleasure.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>This ring was mine; I gave it his first wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>It might be yours or hers, for aught I know.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Take her away; I do not like her now;</LINE>
+<LINE>To prison with her: and away with him.</LINE>
+<LINE>Unless thou tell'st me where thou hadst this ring,</LINE>
+<LINE>Thou diest within this hour.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I'll never tell you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Take her away.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>I'll put in bail, my liege.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>I think thee now some common customer.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>By Jove, if ever I knew man, 'twas you.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Wherefore hast thou accused him all this while?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Because he's guilty, and he is not guilty:</LINE>
+<LINE>He knows I am no maid, and he'll swear to't;</LINE>
+<LINE>I'll swear I am a maid, and he knows not.</LINE>
+<LINE>Great king, I am no strumpet, by my life;</LINE>
+<LINE>I am either maid, or else this old man's wife.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>She does abuse our ears: to prison with her.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>DIANA</SPEAKER>
+<LINE>Good mother, fetch my bail. Stay, royal sir:</LINE>
+<STAGEDIR>Exit Widow</STAGEDIR>
+<LINE>The jeweller that owes the ring is sent for,</LINE>
+<LINE>And he shall surety me. But for this lord,</LINE>
+<LINE>Who hath abused me, as he knows himself,</LINE>
+<LINE>Though yet he never harm'd me, here I quit him:</LINE>
+<LINE>He knows himself my bed he hath defiled;</LINE>
+<LINE>And at that time he got his wife with child:</LINE>
+<LINE>Dead though she be, she feels her young one kick:</LINE>
+<LINE>So there's my riddle: one that's dead is quick:</LINE>
+<LINE>And now behold the meaning.</LINE>
+</SPEECH>
+
+<STAGEDIR>Re-enter Widow, with HELENA</STAGEDIR>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Is there no exorcist</LINE>
+<LINE>Beguiles the truer office of mine eyes?</LINE>
+<LINE>Is't real that I see?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>No, my good lord;</LINE>
+<LINE>'Tis but the shadow of a wife you see,</LINE>
+<LINE>The name and not the thing.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>Both, both. O, pardon!</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>O my good lord, when I was like this maid,</LINE>
+<LINE>I found you wondrous kind. There is your ring;</LINE>
+<LINE>And, look you, here's your letter; this it says:</LINE>
+<LINE>'When from my finger you can get this ring</LINE>
+<LINE>And are by me with child,' &amp;c. This is done:</LINE>
+<LINE>Will you be mine, now you are doubly won?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>BERTRAM</SPEAKER>
+<LINE>If she, my liege, can make me know this clearly,</LINE>
+<LINE>I'll love her dearly, ever, ever dearly.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>HELENA</SPEAKER>
+<LINE>If it appear not plain and prove untrue,</LINE>
+<LINE>Deadly divorce step between me and you!</LINE>
+<LINE>O my dear mother, do I see you living?</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>LAFEU</SPEAKER>
+<LINE>Mine eyes smell onions; I shall weep anon:</LINE>
+<STAGEDIR>To PAROLLES</STAGEDIR>
+<LINE>Good Tom Drum, lend me a handkercher: so,</LINE>
+<LINE>I thank thee: wait on me home, I'll make sport with thee:</LINE>
+<LINE>Let thy courtesies alone, they are scurvy ones.</LINE>
+</SPEECH>
+
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>Let us from point to point this story know,</LINE>
+<LINE>To make the even truth in pleasure flow.</LINE>
+<STAGEDIR>To DIANA</STAGEDIR>
+<LINE>If thou be'st yet a fresh uncropped flower,</LINE>
+<LINE>Choose thou thy husband, and I'll pay thy dower;</LINE>
+<LINE>For I can guess that by thy honest aid</LINE>
+<LINE>Thou keep'st a wife herself, thyself a maid.</LINE>
+<LINE>Of that and all the progress, more or less,</LINE>
+<LINE>Resolvedly more leisure shall express:</LINE>
+<LINE>All yet seems well; and if it end so meet,</LINE>
+<LINE>The bitter past, more welcome is the sweet.</LINE>
+</SPEECH>
+<STAGEDIR>Flourish</STAGEDIR>
+</SCENE>
+
+<EPILOGUE><TITLE>EPILOGUE</TITLE>
+<SPEECH>
+<SPEAKER>KING</SPEAKER>
+<LINE>The king's a beggar, now the play is done:</LINE>
+<LINE>All is well ended, if this suit be won,</LINE>
+<LINE>That you express content; which we will pay,</LINE>
+<LINE>With strife to please you, day exceeding day:</LINE>
+<LINE>Ours be your patience then, and yours our parts;</LINE>
+<LINE>Your gentle hands lend us, and take our hearts.</LINE>
+</SPEECH>
+
+<STAGEDIR>Exeunt</STAGEDIR>
+</EPILOGUE>
+</ACT>
+</PLAY>
diff --git a/test/tests/perf/xtestdata/qname1k.xml b/test/tests/perf/xtestdata/qname1k.xml
new file mode 100644
index 0000000..a14c8be
--- /dev/null
+++ b/test/tests/perf/xtestdata/qname1k.xml
@@ -0,0 +1,1007 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc xmlns:p9="space9.com" xmlns:p8="space8.com"
+  xmlns:p7="space7.com" xmlns:p6="space6.com"
+  xmlns:p5="space5.com" xmlns:p4="space4.com"
+  xmlns:p3="space3.com" xmlns:p2="space2.com"
+  xmlns:p1="space1.com" xmlns:p0="space0.com">
+<p1:e1 a="1"/>
+<p2:e2 a="2"/>
+<p3:e3 a="3"/>
+<p4:e4 a="4"/>
+<p5:e5 a="5"/>
+<p6:e6 a="6"/>
+<p7:e7 a="7"/>
+<p8:e8 a="8"/>
+<p9:e9 a="9"/>
+<p0:e10 a="10"/>
+<p1:e11 a="11"/>
+<p2:e12 a="12"/>
+<p3:e13 a="13"/>
+<p4:e14 a="14"/>
+<p5:e15 a="15"/>
+<p6:e16 a="16"/>
+<p7:e17 a="17"/>
+<p8:e18 a="18"/>
+<p9:e19 a="19"/>
+<p0:e20 a="20"/>
+<p1:e21 a="21"/>
+<p2:e22 a="22"/>
+<p3:e23 a="23"/>
+<p4:e24 a="24"/>
+<p5:e25 a="25"/>
+<p6:e26 a="26"/>
+<p7:e27 a="27"/>
+<p8:e28 a="28"/>
+<p9:e29 a="29"/>
+<p0:e30 a="30"/>
+<p1:e31 a="31"/>
+<p2:e32 a="32"/>
+<p3:e33 a="33"/>
+<p4:e34 a="34"/>
+<p5:e35 a="35"/>
+<p6:e36 a="36"/>
+<p7:e37 a="37"/>
+<p8:e38 a="38"/>
+<p9:e39 a="39"/>
+<p0:e40 a="40"/>
+<p1:e41 a="41"/>
+<p2:e42 a="42"/>
+<p3:e43 a="43"/>
+<p4:e44 a="44"/>
+<p5:e45 a="45"/>
+<p6:e46 a="46"/>
+<p7:e47 a="47"/>
+<p8:e48 a="48"/>
+<p9:e49 a="49"/>
+<p0:e50 a="50"/>
+<p1:e51 a="51"/>
+<p2:e52 a="52"/>
+<p3:e53 a="53"/>
+<p4:e54 a="54"/>
+<p5:e55 a="55"/>
+<p6:e56 a="56"/>
+<p7:e57 a="57"/>
+<p8:e58 a="58"/>
+<p9:e59 a="59"/>
+<p0:e60 a="60"/>
+<p1:e61 a="61"/>
+<p2:e62 a="62"/>
+<p3:e63 a="63"/>
+<p4:e64 a="64"/>
+<p5:e65 a="65"/>
+<p6:e66 a="66"/>
+<p7:e67 a="67"/>
+<p8:e68 a="68"/>
+<p9:e69 a="69"/>
+<p0:e70 a="70"/>
+<p1:e71 a="71"/>
+<p2:e72 a="72"/>
+<p3:e73 a="73"/>
+<p4:e74 a="74"/>
+<p5:e75 a="75"/>
+<p6:e76 a="76"/>
+<p7:e77 a="77"/>
+<p8:e78 a="78"/>
+<p9:e79 a="79"/>
+<p0:e80 a="80"/>
+<p1:e81 a="81"/>
+<p2:e82 a="82"/>
+<p3:e83 a="83"/>
+<p4:e84 a="84"/>
+<p5:e85 a="85"/>
+<p6:e86 a="86"/>
+<p7:e87 a="87"/>
+<p8:e88 a="88"/>
+<p9:e89 a="89"/>
+<p0:e90 a="90"/>
+<p1:e91 a="91"/>
+<p2:e92 a="92"/>
+<p3:e93 a="93"/>
+<p4:e94 a="94"/>
+<p5:e95 a="95"/>
+<p6:e96 a="96"/>
+<p7:e97 a="97"/>
+<p8:e98 a="98"/>
+<p9:e99 a="99"/>
+<p0:e100 a="100"/>
+<p1:e101 a="101"/>
+<p2:e102 a="102"/>
+<p3:e103 a="103"/>
+<p4:e104 a="104"/>
+<p5:e105 a="105"/>
+<p6:e106 a="106"/>
+<p7:e107 a="107"/>
+<p8:e108 a="108"/>
+<p9:e109 a="109"/>
+<p0:e110 a="110"/>
+<p1:e111 a="111"/>
+<p2:e112 a="112"/>
+<p3:e113 a="113"/>
+<p4:e114 a="114"/>
+<p5:e115 a="115"/>
+<p6:e116 a="116"/>
+<p7:e117 a="117"/>
+<p8:e118 a="118"/>
+<p9:e119 a="119"/>
+<p0:e120 a="120"/>
+<p1:e121 a="121"/>
+<p2:e122 a="122"/>
+<p3:e123 a="123"/>
+<p4:e124 a="124"/>
+<p5:e125 a="125"/>
+<p6:e126 a="126"/>
+<p7:e127 a="127"/>
+<p8:e128 a="128"/>
+<p9:e129 a="129"/>
+<p0:e130 a="130"/>
+<p1:e131 a="131"/>
+<p2:e132 a="132"/>
+<p3:e133 a="133"/>
+<p4:e134 a="134"/>
+<p5:e135 a="135"/>
+<p6:e136 a="136"/>
+<p7:e137 a="137"/>
+<p8:e138 a="138"/>
+<p9:e139 a="139"/>
+<p0:e140 a="140"/>
+<p1:e141 a="141"/>
+<p2:e142 a="142"/>
+<p3:e143 a="143"/>
+<p4:e144 a="144"/>
+<p5:e145 a="145"/>
+<p6:e146 a="146"/>
+<p7:e147 a="147"/>
+<p8:e148 a="148"/>
+<p9:e149 a="149"/>
+<p0:e150 a="150"/>
+<p1:e151 a="151"/>
+<p2:e152 a="152"/>
+<p3:e153 a="153"/>
+<p4:e154 a="154"/>
+<p5:e155 a="155"/>
+<p6:e156 a="156"/>
+<p7:e157 a="157"/>
+<p8:e158 a="158"/>
+<p9:e159 a="159"/>
+<p0:e160 a="160"/>
+<p1:e161 a="161"/>
+<p2:e162 a="162"/>
+<p3:e163 a="163"/>
+<p4:e164 a="164"/>
+<p5:e165 a="165"/>
+<p6:e166 a="166"/>
+<p7:e167 a="167"/>
+<p8:e168 a="168"/>
+<p9:e169 a="169"/>
+<p0:e170 a="170"/>
+<p1:e171 a="171"/>
+<p2:e172 a="172"/>
+<p3:e173 a="173"/>
+<p4:e174 a="174"/>
+<p5:e175 a="175"/>
+<p6:e176 a="176"/>
+<p7:e177 a="177"/>
+<p8:e178 a="178"/>
+<p9:e179 a="179"/>
+<p0:e180 a="180"/>
+<p1:e181 a="181"/>
+<p2:e182 a="182"/>
+<p3:e183 a="183"/>
+<p4:e184 a="184"/>
+<p5:e185 a="185"/>
+<p6:e186 a="186"/>
+<p7:e187 a="187"/>
+<p8:e188 a="188"/>
+<p9:e189 a="189"/>
+<p0:e190 a="190"/>
+<p1:e191 a="191"/>
+<p2:e192 a="192"/>
+<p3:e193 a="193"/>
+<p4:e194 a="194"/>
+<p5:e195 a="195"/>
+<p6:e196 a="196"/>
+<p7:e197 a="197"/>
+<p8:e198 a="198"/>
+<p9:e199 a="199"/>
+<p0:e200 a="200"/>
+<p1:e201 a="201"/>
+<p2:e202 a="202"/>
+<p3:e203 a="203"/>
+<p4:e204 a="204"/>
+<p5:e205 a="205"/>
+<p6:e206 a="206"/>
+<p7:e207 a="207"/>
+<p8:e208 a="208"/>
+<p9:e209 a="209"/>
+<p0:e210 a="210"/>
+<p1:e211 a="211"/>
+<p2:e212 a="212"/>
+<p3:e213 a="213"/>
+<p4:e214 a="214"/>
+<p5:e215 a="215"/>
+<p6:e216 a="216"/>
+<p7:e217 a="217"/>
+<p8:e218 a="218"/>
+<p9:e219 a="219"/>
+<p0:e220 a="220"/>
+<p1:e221 a="221"/>
+<p2:e222 a="222"/>
+<p3:e223 a="223"/>
+<p4:e224 a="224"/>
+<p5:e225 a="225"/>
+<p6:e226 a="226"/>
+<p7:e227 a="227"/>
+<p8:e228 a="228"/>
+<p9:e229 a="229"/>
+<p0:e230 a="230"/>
+<p1:e231 a="231"/>
+<p2:e232 a="232"/>
+<p3:e233 a="233"/>
+<p4:e234 a="234"/>
+<p5:e235 a="235"/>
+<p6:e236 a="236"/>
+<p7:e237 a="237"/>
+<p8:e238 a="238"/>
+<p9:e239 a="239"/>
+<p0:e240 a="240"/>
+<p1:e241 a="241"/>
+<p2:e242 a="242"/>
+<p3:e243 a="243"/>
+<p4:e244 a="244"/>
+<p5:e245 a="245"/>
+<p6:e246 a="246"/>
+<p7:e247 a="247"/>
+<p8:e248 a="248"/>
+<p9:e249 a="249"/>
+<p0:e250 a="250"/>
+<p1:e251 a="251"/>
+<p2:e252 a="252"/>
+<p3:e253 a="253"/>
+<p4:e254 a="254"/>
+<p5:e255 a="255"/>
+<p6:e256 a="256"/>
+<p7:e257 a="257"/>
+<p8:e258 a="258"/>
+<p9:e259 a="259"/>
+<p0:e260 a="260"/>
+<p1:e261 a="261"/>
+<p2:e262 a="262"/>
+<p3:e263 a="263"/>
+<p4:e264 a="264"/>
+<p5:e265 a="265"/>
+<p6:e266 a="266"/>
+<p7:e267 a="267"/>
+<p8:e268 a="268"/>
+<p9:e269 a="269"/>
+<p0:e270 a="270"/>
+<p1:e271 a="271"/>
+<p2:e272 a="272"/>
+<p3:e273 a="273"/>
+<p4:e274 a="274"/>
+<p5:e275 a="275"/>
+<p6:e276 a="276"/>
+<p7:e277 a="277"/>
+<p8:e278 a="278"/>
+<p9:e279 a="279"/>
+<p0:e280 a="280"/>
+<p1:e281 a="281"/>
+<p2:e282 a="282"/>
+<p3:e283 a="283"/>
+<p4:e284 a="284"/>
+<p5:e285 a="285"/>
+<p6:e286 a="286"/>
+<p7:e287 a="287"/>
+<p8:e288 a="288"/>
+<p9:e289 a="289"/>
+<p0:e290 a="290"/>
+<p1:e291 a="291"/>
+<p2:e292 a="292"/>
+<p3:e293 a="293"/>
+<p4:e294 a="294"/>
+<p5:e295 a="295"/>
+<p6:e296 a="296"/>
+<p7:e297 a="297"/>
+<p8:e298 a="298"/>
+<p9:e299 a="299"/>
+<p0:e300 a="300"/>
+<p1:e301 a="301"/>
+<p2:e302 a="302"/>
+<p3:e303 a="303"/>
+<p4:e304 a="304"/>
+<p5:e305 a="305"/>
+<p6:e306 a="306"/>
+<p7:e307 a="307"/>
+<p8:e308 a="308"/>
+<p9:e309 a="309"/>
+<p0:e310 a="310"/>
+<p1:e311 a="311"/>
+<p2:e312 a="312"/>
+<p3:e313 a="313"/>
+<p4:e314 a="314"/>
+<p5:e315 a="315"/>
+<p6:e316 a="316"/>
+<p7:e317 a="317"/>
+<p8:e318 a="318"/>
+<p9:e319 a="319"/>
+<p0:e320 a="320"/>
+<p1:e321 a="321"/>
+<p2:e322 a="322"/>
+<p3:e323 a="323"/>
+<p4:e324 a="324"/>
+<p5:e325 a="325"/>
+<p6:e326 a="326"/>
+<p7:e327 a="327"/>
+<p8:e328 a="328"/>
+<p9:e329 a="329"/>
+<p0:e330 a="330"/>
+<p1:e331 a="331"/>
+<p2:e332 a="332"/>
+<p3:e333 a="333"/>
+<p4:e334 a="334"/>
+<p5:e335 a="335"/>
+<p6:e336 a="336"/>
+<p7:e337 a="337"/>
+<p8:e338 a="338"/>
+<p9:e339 a="339"/>
+<p0:e340 a="340"/>
+<p1:e341 a="341"/>
+<p2:e342 a="342"/>
+<p3:e343 a="343"/>
+<p4:e344 a="344"/>
+<p5:e345 a="345"/>
+<p6:e346 a="346"/>
+<p7:e347 a="347"/>
+<p8:e348 a="348"/>
+<p9:e349 a="349"/>
+<p0:e350 a="350"/>
+<p1:e351 a="351"/>
+<p2:e352 a="352"/>
+<p3:e353 a="353"/>
+<p4:e354 a="354"/>
+<p5:e355 a="355"/>
+<p6:e356 a="356"/>
+<p7:e357 a="357"/>
+<p8:e358 a="358"/>
+<p9:e359 a="359"/>
+<p0:e360 a="360"/>
+<p1:e361 a="361"/>
+<p2:e362 a="362"/>
+<p3:e363 a="363"/>
+<p4:e364 a="364"/>
+<p5:e365 a="365"/>
+<p6:e366 a="366"/>
+<p7:e367 a="367"/>
+<p8:e368 a="368"/>
+<p9:e369 a="369"/>
+<p0:e370 a="370"/>
+<p1:e371 a="371"/>
+<p2:e372 a="372"/>
+<p3:e373 a="373"/>
+<p4:e374 a="374"/>
+<p5:e375 a="375"/>
+<p6:e376 a="376"/>
+<p7:e377 a="377"/>
+<p8:e378 a="378"/>
+<p9:e379 a="379"/>
+<p0:e380 a="380"/>
+<p1:e381 a="381"/>
+<p2:e382 a="382"/>
+<p3:e383 a="383"/>
+<p4:e384 a="384"/>
+<p5:e385 a="385"/>
+<p6:e386 a="386"/>
+<p7:e387 a="387"/>
+<p8:e388 a="388"/>
+<p9:e389 a="389"/>
+<p0:e390 a="390"/>
+<p1:e391 a="391"/>
+<p2:e392 a="392"/>
+<p3:e393 a="393"/>
+<p4:e394 a="394"/>
+<p5:e395 a="395"/>
+<p6:e396 a="396"/>
+<p7:e397 a="397"/>
+<p8:e398 a="398"/>
+<p9:e399 a="399"/>
+<p0:e400 a="400"/>
+<p1:e401 a="401"/>
+<p2:e402 a="402"/>
+<p3:e403 a="403"/>
+<p4:e404 a="404"/>
+<p5:e405 a="405"/>
+<p6:e406 a="406"/>
+<p7:e407 a="407"/>
+<p8:e408 a="408"/>
+<p9:e409 a="409"/>
+<p0:e410 a="410"/>
+<p1:e411 a="411"/>
+<p2:e412 a="412"/>
+<p3:e413 a="413"/>
+<p4:e414 a="414"/>
+<p5:e415 a="415"/>
+<p6:e416 a="416"/>
+<p7:e417 a="417"/>
+<p8:e418 a="418"/>
+<p9:e419 a="419"/>
+<p0:e420 a="420"/>
+<p1:e421 a="421"/>
+<p2:e422 a="422"/>
+<p3:e423 a="423"/>
+<p4:e424 a="424"/>
+<p5:e425 a="425"/>
+<p6:e426 a="426"/>
+<p7:e427 a="427"/>
+<p8:e428 a="428"/>
+<p9:e429 a="429"/>
+<p0:e430 a="430"/>
+<p1:e431 a="431"/>
+<p2:e432 a="432"/>
+<p3:e433 a="433"/>
+<p4:e434 a="434"/>
+<p5:e435 a="435"/>
+<p6:e436 a="436"/>
+<p7:e437 a="437"/>
+<p8:e438 a="438"/>
+<p9:e439 a="439"/>
+<p0:e440 a="440"/>
+<p1:e441 a="441"/>
+<p2:e442 a="442"/>
+<p3:e443 a="443"/>
+<p4:e444 a="444"/>
+<p5:e445 a="445"/>
+<p6:e446 a="446"/>
+<p7:e447 a="447"/>
+<p8:e448 a="448"/>
+<p9:e449 a="449"/>
+<p0:e450 a="450"/>
+<p1:e451 a="451"/>
+<p2:e452 a="452"/>
+<p3:e453 a="453"/>
+<p4:e454 a="454"/>
+<p5:e455 a="455"/>
+<p6:e456 a="456"/>
+<p7:e457 a="457"/>
+<p8:e458 a="458"/>
+<p9:e459 a="459"/>
+<p0:e460 a="460"/>
+<p1:e461 a="461"/>
+<p2:e462 a="462"/>
+<p3:e463 a="463"/>
+<p4:e464 a="464"/>
+<p5:e465 a="465"/>
+<p6:e466 a="466"/>
+<p7:e467 a="467"/>
+<p8:e468 a="468"/>
+<p9:e469 a="469"/>
+<p0:e470 a="470"/>
+<p1:e471 a="471"/>
+<p2:e472 a="472"/>
+<p3:e473 a="473"/>
+<p4:e474 a="474"/>
+<p5:e475 a="475"/>
+<p6:e476 a="476"/>
+<p7:e477 a="477"/>
+<p8:e478 a="478"/>
+<p9:e479 a="479"/>
+<p0:e480 a="480"/>
+<p1:e481 a="481"/>
+<p2:e482 a="482"/>
+<p3:e483 a="483"/>
+<p4:e484 a="484"/>
+<p5:e485 a="485"/>
+<p6:e486 a="486"/>
+<p7:e487 a="487"/>
+<p8:e488 a="488"/>
+<p9:e489 a="489"/>
+<p0:e490 a="490"/>
+<p1:e491 a="491"/>
+<p2:e492 a="492"/>
+<p3:e493 a="493"/>
+<p4:e494 a="494"/>
+<p5:e495 a="495"/>
+<p6:e496 a="496"/>
+<p7:e497 a="497"/>
+<p8:e498 a="498"/>
+<p9:e499 a="499"/>
+<p0:e500 a="500"/>
+<p1:e501 a="501"/>
+<p2:e502 a="502"/>
+<p3:e503 a="503"/>
+<p4:e504 a="504"/>
+<p5:e505 a="505"/>
+<p6:e506 a="506"/>
+<p7:e507 a="507"/>
+<p8:e508 a="508"/>
+<p9:e509 a="509"/>
+<p0:e510 a="510"/>
+<p1:e511 a="511"/>
+<p2:e512 a="512"/>
+<p3:e513 a="513"/>
+<p4:e514 a="514"/>
+<p5:e515 a="515"/>
+<p6:e516 a="516"/>
+<p7:e517 a="517"/>
+<p8:e518 a="518"/>
+<p9:e519 a="519"/>
+<p0:e520 a="520"/>
+<p1:e521 a="521"/>
+<p2:e522 a="522"/>
+<p3:e523 a="523"/>
+<p4:e524 a="524"/>
+<p5:e525 a="525"/>
+<p6:e526 a="526"/>
+<p7:e527 a="527"/>
+<p8:e528 a="528"/>
+<p9:e529 a="529"/>
+<p0:e530 a="530"/>
+<p1:e531 a="531"/>
+<p2:e532 a="532"/>
+<p3:e533 a="533"/>
+<p4:e534 a="534"/>
+<p5:e535 a="535"/>
+<p6:e536 a="536"/>
+<p7:e537 a="537"/>
+<p8:e538 a="538"/>
+<p9:e539 a="539"/>
+<p0:e540 a="540"/>
+<p1:e541 a="541"/>
+<p2:e542 a="542"/>
+<p3:e543 a="543"/>
+<p4:e544 a="544"/>
+<p5:e545 a="545"/>
+<p6:e546 a="546"/>
+<p7:e547 a="547"/>
+<p8:e548 a="548"/>
+<p9:e549 a="549"/>
+<p0:e550 a="550"/>
+<p1:e551 a="551"/>
+<p2:e552 a="552"/>
+<p3:e553 a="553"/>
+<p4:e554 a="554"/>
+<p5:e555 a="555"/>
+<p6:e556 a="556"/>
+<p7:e557 a="557"/>
+<p8:e558 a="558"/>
+<p9:e559 a="559"/>
+<p0:e560 a="560"/>
+<p1:e561 a="561"/>
+<p2:e562 a="562"/>
+<p3:e563 a="563"/>
+<p4:e564 a="564"/>
+<p5:e565 a="565"/>
+<p6:e566 a="566"/>
+<p7:e567 a="567"/>
+<p8:e568 a="568"/>
+<p9:e569 a="569"/>
+<p0:e570 a="570"/>
+<p1:e571 a="571"/>
+<p2:e572 a="572"/>
+<p3:e573 a="573"/>
+<p4:e574 a="574"/>
+<p5:e575 a="575"/>
+<p6:e576 a="576"/>
+<p7:e577 a="577"/>
+<p8:e578 a="578"/>
+<p9:e579 a="579"/>
+<p0:e580 a="580"/>
+<p1:e581 a="581"/>
+<p2:e582 a="582"/>
+<p3:e583 a="583"/>
+<p4:e584 a="584"/>
+<p5:e585 a="585"/>
+<p6:e586 a="586"/>
+<p7:e587 a="587"/>
+<p8:e588 a="588"/>
+<p9:e589 a="589"/>
+<p0:e590 a="590"/>
+<p1:e591 a="591"/>
+<p2:e592 a="592"/>
+<p3:e593 a="593"/>
+<p4:e594 a="594"/>
+<p5:e595 a="595"/>
+<p6:e596 a="596"/>
+<p7:e597 a="597"/>
+<p8:e598 a="598"/>
+<p9:e599 a="599"/>
+<p0:e600 a="600"/>
+<p1:e601 a="601"/>
+<p2:e602 a="602"/>
+<p3:e603 a="603"/>
+<p4:e604 a="604"/>
+<p5:e605 a="605"/>
+<p6:e606 a="606"/>
+<p7:e607 a="607"/>
+<p8:e608 a="608"/>
+<p9:e609 a="609"/>
+<p0:e610 a="610"/>
+<p1:e611 a="611"/>
+<p2:e612 a="612"/>
+<p3:e613 a="613"/>
+<p4:e614 a="614"/>
+<p5:e615 a="615"/>
+<p6:e616 a="616"/>
+<p7:e617 a="617"/>
+<p8:e618 a="618"/>
+<p9:e619 a="619"/>
+<p0:e620 a="620"/>
+<p1:e621 a="621"/>
+<p2:e622 a="622"/>
+<p3:e623 a="623"/>
+<p4:e624 a="624"/>
+<p5:e625 a="625"/>
+<p6:e626 a="626"/>
+<p7:e627 a="627"/>
+<p8:e628 a="628"/>
+<p9:e629 a="629"/>
+<p0:e630 a="630"/>
+<p1:e631 a="631"/>
+<p2:e632 a="632"/>
+<p3:e633 a="633"/>
+<p4:e634 a="634"/>
+<p5:e635 a="635"/>
+<p6:e636 a="636"/>
+<p7:e637 a="637"/>
+<p8:e638 a="638"/>
+<p9:e639 a="639"/>
+<p0:e640 a="640"/>
+<p1:e641 a="641"/>
+<p2:e642 a="642"/>
+<p3:e643 a="643"/>
+<p4:e644 a="644"/>
+<p5:e645 a="645"/>
+<p6:e646 a="646"/>
+<p7:e647 a="647"/>
+<p8:e648 a="648"/>
+<p9:e649 a="649"/>
+<p0:e650 a="650"/>
+<p1:e651 a="651"/>
+<p2:e652 a="652"/>
+<p3:e653 a="653"/>
+<p4:e654 a="654"/>
+<p5:e655 a="655"/>
+<p6:e656 a="656"/>
+<p7:e657 a="657"/>
+<p8:e658 a="658"/>
+<p9:e659 a="659"/>
+<p0:e660 a="660"/>
+<p1:e661 a="661"/>
+<p2:e662 a="662"/>
+<p3:e663 a="663"/>
+<p4:e664 a="664"/>
+<p5:e665 a="665"/>
+<p6:e666 a="666"/>
+<p7:e667 a="667"/>
+<p8:e668 a="668"/>
+<p9:e669 a="669"/>
+<p0:e670 a="670"/>
+<p1:e671 a="671"/>
+<p2:e672 a="672"/>
+<p3:e673 a="673"/>
+<p4:e674 a="674"/>
+<p5:e675 a="675"/>
+<p6:e676 a="676"/>
+<p7:e677 a="677"/>
+<p8:e678 a="678"/>
+<p9:e679 a="679"/>
+<p0:e680 a="680"/>
+<p1:e681 a="681"/>
+<p2:e682 a="682"/>
+<p3:e683 a="683"/>
+<p4:e684 a="684"/>
+<p5:e685 a="685"/>
+<p6:e686 a="686"/>
+<p7:e687 a="687"/>
+<p8:e688 a="688"/>
+<p9:e689 a="689"/>
+<p0:e690 a="690"/>
+<p1:e691 a="691"/>
+<p2:e692 a="692"/>
+<p3:e693 a="693"/>
+<p4:e694 a="694"/>
+<p5:e695 a="695"/>
+<p6:e696 a="696"/>
+<p7:e697 a="697"/>
+<p8:e698 a="698"/>
+<p9:e699 a="699"/>
+<p0:e700 a="700"/>
+<p1:e701 a="701"/>
+<p2:e702 a="702"/>
+<p3:e703 a="703"/>
+<p4:e704 a="704"/>
+<p5:e705 a="705"/>
+<p6:e706 a="706"/>
+<p7:e707 a="707"/>
+<p8:e708 a="708"/>
+<p9:e709 a="709"/>
+<p0:e710 a="710"/>
+<p1:e711 a="711"/>
+<p2:e712 a="712"/>
+<p3:e713 a="713"/>
+<p4:e714 a="714"/>
+<p5:e715 a="715"/>
+<p6:e716 a="716"/>
+<p7:e717 a="717"/>
+<p8:e718 a="718"/>
+<p9:e719 a="719"/>
+<p0:e720 a="720"/>
+<p1:e721 a="721"/>
+<p2:e722 a="722"/>
+<p3:e723 a="723"/>
+<p4:e724 a="724"/>
+<p5:e725 a="725"/>
+<p6:e726 a="726"/>
+<p7:e727 a="727"/>
+<p8:e728 a="728"/>
+<p9:e729 a="729"/>
+<p0:e730 a="730"/>
+<p1:e731 a="731"/>
+<p2:e732 a="732"/>
+<p3:e733 a="733"/>
+<p4:e734 a="734"/>
+<p5:e735 a="735"/>
+<p6:e736 a="736"/>
+<p7:e737 a="737"/>
+<p8:e738 a="738"/>
+<p9:e739 a="739"/>
+<p0:e740 a="740"/>
+<p1:e741 a="741"/>
+<p2:e742 a="742"/>
+<p3:e743 a="743"/>
+<p4:e744 a="744"/>
+<p5:e745 a="745"/>
+<p6:e746 a="746"/>
+<p7:e747 a="747"/>
+<p8:e748 a="748"/>
+<p9:e749 a="749"/>
+<p0:e750 a="750"/>
+<p1:e751 a="751"/>
+<p2:e752 a="752"/>
+<p3:e753 a="753"/>
+<p4:e754 a="754"/>
+<p5:e755 a="755"/>
+<p6:e756 a="756"/>
+<p7:e757 a="757"/>
+<p8:e758 a="758"/>
+<p9:e759 a="759"/>
+<p0:e760 a="760"/>
+<p1:e761 a="761"/>
+<p2:e762 a="762"/>
+<p3:e763 a="763"/>
+<p4:e764 a="764"/>
+<p5:e765 a="765"/>
+<p6:e766 a="766"/>
+<p7:e767 a="767"/>
+<p8:e768 a="768"/>
+<p9:e769 a="769"/>
+<p0:e770 a="770"/>
+<p1:e771 a="771"/>
+<p2:e772 a="772"/>
+<p3:e773 a="773"/>
+<p4:e774 a="774"/>
+<p5:e775 a="775"/>
+<p6:e776 a="776"/>
+<p7:e777 a="777"/>
+<p8:e778 a="778"/>
+<p9:e779 a="779"/>
+<p0:e780 a="780"/>
+<p1:e781 a="781"/>
+<p2:e782 a="782"/>
+<p3:e783 a="783"/>
+<p4:e784 a="784"/>
+<p5:e785 a="785"/>
+<p6:e786 a="786"/>
+<p7:e787 a="787"/>
+<p8:e788 a="788"/>
+<p9:e789 a="789"/>
+<p0:e790 a="790"/>
+<p1:e791 a="791"/>
+<p2:e792 a="792"/>
+<p3:e793 a="793"/>
+<p4:e794 a="794"/>
+<p5:e795 a="795"/>
+<p6:e796 a="796"/>
+<p7:e797 a="797"/>
+<p8:e798 a="798"/>
+<p9:e799 a="799"/>
+<p0:e800 a="800"/>
+<p1:e801 a="801"/>
+<p2:e802 a="802"/>
+<p3:e803 a="803"/>
+<p4:e804 a="804"/>
+<p5:e805 a="805"/>
+<p6:e806 a="806"/>
+<p7:e807 a="807"/>
+<p8:e808 a="808"/>
+<p9:e809 a="809"/>
+<p0:e810 a="810"/>
+<p1:e811 a="811"/>
+<p2:e812 a="812"/>
+<p3:e813 a="813"/>
+<p4:e814 a="814"/>
+<p5:e815 a="815"/>
+<p6:e816 a="816"/>
+<p7:e817 a="817"/>
+<p8:e818 a="818"/>
+<p9:e819 a="819"/>
+<p0:e820 a="820"/>
+<p1:e821 a="821"/>
+<p2:e822 a="822"/>
+<p3:e823 a="823"/>
+<p4:e824 a="824"/>
+<p5:e825 a="825"/>
+<p6:e826 a="826"/>
+<p7:e827 a="827"/>
+<p8:e828 a="828"/>
+<p9:e829 a="829"/>
+<p0:e830 a="830"/>
+<p1:e831 a="831"/>
+<p2:e832 a="832"/>
+<p3:e833 a="833"/>
+<p4:e834 a="834"/>
+<p5:e835 a="835"/>
+<p6:e836 a="836"/>
+<p7:e837 a="837"/>
+<p8:e838 a="838"/>
+<p9:e839 a="839"/>
+<p0:e840 a="840"/>
+<p1:e841 a="841"/>
+<p2:e842 a="842"/>
+<p3:e843 a="843"/>
+<p4:e844 a="844"/>
+<p5:e845 a="845"/>
+<p6:e846 a="846"/>
+<p7:e847 a="847"/>
+<p8:e848 a="848"/>
+<p9:e849 a="849"/>
+<p0:e850 a="850"/>
+<p1:e851 a="851"/>
+<p2:e852 a="852"/>
+<p3:e853 a="853"/>
+<p4:e854 a="854"/>
+<p5:e855 a="855"/>
+<p6:e856 a="856"/>
+<p7:e857 a="857"/>
+<p8:e858 a="858"/>
+<p9:e859 a="859"/>
+<p0:e860 a="860"/>
+<p1:e861 a="861"/>
+<p2:e862 a="862"/>
+<p3:e863 a="863"/>
+<p4:e864 a="864"/>
+<p5:e865 a="865"/>
+<p6:e866 a="866"/>
+<p7:e867 a="867"/>
+<p8:e868 a="868"/>
+<p9:e869 a="869"/>
+<p0:e870 a="870"/>
+<p1:e871 a="871"/>
+<p2:e872 a="872"/>
+<p3:e873 a="873"/>
+<p4:e874 a="874"/>
+<p5:e875 a="875"/>
+<p6:e876 a="876"/>
+<p7:e877 a="877"/>
+<p8:e878 a="878"/>
+<p9:e879 a="879"/>
+<p0:e880 a="880"/>
+<p1:e881 a="881"/>
+<p2:e882 a="882"/>
+<p3:e883 a="883"/>
+<p4:e884 a="884"/>
+<p5:e885 a="885"/>
+<p6:e886 a="886"/>
+<p7:e887 a="887"/>
+<p8:e888 a="888"/>
+<p9:e889 a="889"/>
+<p0:e890 a="890"/>
+<p1:e891 a="891"/>
+<p2:e892 a="892"/>
+<p3:e893 a="893"/>
+<p4:e894 a="894"/>
+<p5:e895 a="895"/>
+<p6:e896 a="896"/>
+<p7:e897 a="897"/>
+<p8:e898 a="898"/>
+<p9:e899 a="899"/>
+<p0:e900 a="900"/>
+<p1:e901 a="901"/>
+<p2:e902 a="902"/>
+<p3:e903 a="903"/>
+<p4:e904 a="904"/>
+<p5:e905 a="905"/>
+<p6:e906 a="906"/>
+<p7:e907 a="907"/>
+<p8:e908 a="908"/>
+<p9:e909 a="909"/>
+<p0:e910 a="910"/>
+<p1:e911 a="911"/>
+<p2:e912 a="912"/>
+<p3:e913 a="913"/>
+<p4:e914 a="914"/>
+<p5:e915 a="915"/>
+<p6:e916 a="916"/>
+<p7:e917 a="917"/>
+<p8:e918 a="918"/>
+<p9:e919 a="919"/>
+<p0:e920 a="920"/>
+<p1:e921 a="921"/>
+<p2:e922 a="922"/>
+<p3:e923 a="923"/>
+<p4:e924 a="924"/>
+<p5:e925 a="925"/>
+<p6:e926 a="926"/>
+<p7:e927 a="927"/>
+<p8:e928 a="928"/>
+<p9:e929 a="929"/>
+<p0:e930 a="930"/>
+<p1:e931 a="931"/>
+<p2:e932 a="932"/>
+<p3:e933 a="933"/>
+<p4:e934 a="934"/>
+<p5:e935 a="935"/>
+<p6:e936 a="936"/>
+<p7:e937 a="937"/>
+<p8:e938 a="938"/>
+<p9:e939 a="939"/>
+<p0:e940 a="940"/>
+<p1:e941 a="941"/>
+<p2:e942 a="942"/>
+<p3:e943 a="943"/>
+<p4:e944 a="944"/>
+<p5:e945 a="945"/>
+<p6:e946 a="946"/>
+<p7:e947 a="947"/>
+<p8:e948 a="948"/>
+<p9:e949 a="949"/>
+<p0:e950 a="950"/>
+<p1:e951 a="951"/>
+<p2:e952 a="952"/>
+<p3:e953 a="953"/>
+<p4:e954 a="954"/>
+<p5:e955 a="955"/>
+<p6:e956 a="956"/>
+<p7:e957 a="957"/>
+<p8:e958 a="958"/>
+<p9:e959 a="959"/>
+<p0:e960 a="960"/>
+<p1:e961 a="961"/>
+<p2:e962 a="962"/>
+<p3:e963 a="963"/>
+<p4:e964 a="964"/>
+<p5:e965 a="965"/>
+<p6:e966 a="966"/>
+<p7:e967 a="967"/>
+<p8:e968 a="968"/>
+<p9:e969 a="969"/>
+<p0:e970 a="970"/>
+<p1:e971 a="971"/>
+<p2:e972 a="972"/>
+<p3:e973 a="973"/>
+<p4:e974 a="974"/>
+<p5:e975 a="975"/>
+<p6:e976 a="976"/>
+<p7:e977 a="977"/>
+<p8:e978 a="978"/>
+<p9:e979 a="979"/>
+<p0:e980 a="980"/>
+<p1:e981 a="981"/>
+<p2:e982 a="982"/>
+<p3:e983 a="983"/>
+<p4:e984 a="984"/>
+<p5:e985 a="985"/>
+<p6:e986 a="986"/>
+<p7:e987 a="987"/>
+<p8:e988 a="988"/>
+<p9:e989 a="989"/>
+<p0:e990 a="990"/>
+<p1:e991 a="991"/>
+<p2:e992 a="992"/>
+<p3:e993 a="993"/>
+<p4:e994 a="994"/>
+<p5:e995 a="995"/>
+<p6:e996 a="996"/>
+<p7:e997 a="997"/>
+<p8:e998 a="998"/>
+<p9:e999 a="999"/>
+<p0:e1000 a="1000"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/tree-compass.xml b/test/tests/perf/xtestdata/tree-compass.xml
new file mode 100644
index 0000000..92fb1a8
--- /dev/null
+++ b/test/tests/perf/xtestdata/tree-compass.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<far-north>
+  <north-north-west1/>
+  <north-north-west2/>
+  <north>
+    <near-north>
+      <far-west/>
+      <west/>
+      <near-west/>
+      <center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+        <near-south-west/>
+        <near-south>
+          <south>
+            <far-south/>
+          </south>
+        </near-south>
+        <near-south-east/>
+      </center>
+      <near-east/>
+      <east/>
+      <far-east/>
+    </near-north>
+  </north>
+  <north-north-east1/>
+  <north-north-east2/>
+</far-north>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/tree-document.xml b/test/tests/perf/xtestdata/tree-document.xml
new file mode 100644
index 0000000..bcd915e
--- /dev/null
+++ b/test/tests/perf/xtestdata/tree-document.xml
@@ -0,0 +1,1799 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Test for source tree numbering -->
+<doc>
+  <title>Test for source tree numbering</title>
+  <chapter>
+    <title>First Chapter</title>
+    <section>
+      <title>First Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In first Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+         <title>Twelveth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In first Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Second Chapter</title>
+    <section>
+      <title>First Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In second Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fouth Section In second Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In second Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Third Chapter</title>
+    <section>
+      <title>First Section In third Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In third Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourth Chapter</title>
+    <section>
+      <title>First Section In fourth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fifth Chapter</title>
+    <section>
+      <title>First Section In fifth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Sixth Chapter</title>
+    <section>
+      <title>First Section In sixth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In sixth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Seventh Chapter</title>
+    <section>
+      <title>First Section In seventh Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In seventh Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Eighth Chapter</title>
+    <section>
+      <title>First Section In eighth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In eighth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Ninth Chapter</title>
+    <section>
+      <title>First Section In ninth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In ninth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Tenth Chapter</title>
+    <section>
+      <title>First Section In tenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In tenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Eleventh Chapter</title>
+    <section>
+      <title>First Section In eleventh Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In eleventh Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Twelvth Chapter</title>
+    <section>
+      <title>First Section In twelvth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In twelvth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Thirteenth Chapter</title>
+    <section>
+      <title>First Section In thirteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In thirteenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <chapter>
+    <title>Fourteenth Chapter</title>
+    <section>
+      <title>First Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In fourteenth Chapter</title>
+      <subsection>
+        <title>First Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In fourteenth Chapter</title>
+      </subsection>
+    </section>
+  </chapter>
+  <appendix>
+    <title>First Appendix</title>
+    <section>
+      <title>First Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In first Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In first Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In first Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Second Appendix</title>
+    <section>
+      <title>First Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fiftieth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-first Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-second Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-third Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-fourth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-fifth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-sixth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-seventh Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-eighth Subsection in third Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifty-ninth Subsection in third Section In second Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In second Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In second Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Third Appendix</title>
+    <section>
+      <title>First Section In third Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In third Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourth Appendix</title>
+    <section>
+      <title>First Section In fourth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fourth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fifth Appendix</title>
+    <section>
+      <title>First Section In fifth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fifth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Sixth Appendix</title>
+    <section>
+      <title>First Section In sixth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In sixth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Seventh Appendix</title>
+    <section>
+      <title>First Section In seventh Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In seventh Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Eighth Appendix</title>
+    <section>
+      <title>First Section In eighth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In eighth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Ninth Appendix</title>
+    <section>
+      <title>First Section In ninth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In ninth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Tenth Appendix</title>
+    <section>
+      <title>First Section In tenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In tenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Eleventh Appendix</title>
+    <section>
+      <title>First Section In eleventh Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In eleventh Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Twelvth Appendix</title>
+    <section>
+      <title>First Section In twelvth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In twelvth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Thirteenth Appendix</title>
+    <section>
+      <title>First Section In thirteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In thirteenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+  <appendix>
+    <title>Fourteenth Appendix</title>
+    <section>
+      <title>First Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in first Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Second Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in second Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Third Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifthteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventeenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Nineteenth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twentieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twenty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirtieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fortieth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-first Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-second Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-third Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fourth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-fifth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-sixth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-seventh Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-eighth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Forty-ninth Subsection in third Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+    <section>
+      <title>Fourth Section In fourteenth Appendix</title>
+      <subsection>
+        <title>First Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Second Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Third Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fifth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Sixth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Seventh Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eighth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Ninth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Tenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Eleventh Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Twelveth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Thirteenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+      <subsection>
+        <title>Fourteenth Subsection in fourth Section In fourteenth Appendix</title>
+      </subsection>
+    </section>
+  </appendix>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/tree-id.xml b/test/tests/perf/xtestdata/tree-id.xml
new file mode 100644
index 0000000..6b156bd
--- /dev/null
+++ b/test/tests/perf/xtestdata/tree-id.xml
@@ -0,0 +1,1019 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Test data for ID selection and pattern matching (could be enlarged) -->
+<!-- a elements id1, id3, id5, id7, id9 are filled out with b elements.
+     a elements id2, id4, id6, are filled out with b and c elements.
+     Within a element id8,
+       id81, id82, id83, id85, id86, id87, id89 are filled out with b, c elements;
+       id80, id84, id88 are filled out with b, c, d elements;
+       id888 is further filled with b, c, d, e elements. -->
+<!DOCTYPE doc [
+  <!ELEMENT doc (#PCDATA|a)*>
+  <!ATTLIST doc id ID #REQUIRED>
+  <!ELEMENT a (#PCDATA|b)*>
+  <!ATTLIST a id ID #REQUIRED>
+  <!ELEMENT b (#PCDATA|c)*>
+  <!ATTLIST b id ID #REQUIRED>
+  <!ELEMENT c (#PCDATA|d)*>
+  <!ATTLIST c id ID #REQUIRED >
+  <!ELEMENT d (#PCDATA|e)*>
+  <!ATTLIST d id ID #REQUIRED >
+]>
+<doc id="id0">
+  <a id="id1">
+    *id1*
+    <b id="id10">*id10*</b>
+    <b id="id11">*id11*</b>
+    <b id="id12">*id12*</b>
+    <b id="id13">*id13*</b>
+    <b id="id14">*id14*</b>
+    <b id="id15">*id15*</b>
+    <b id="id16">*id16*</b>
+    <b id="id17">*id17*</b>
+    <b id="id18">*id18*</b>
+    <b id="id19">*id19*</b>
+  </a>
+  <a id="id2">
+    *id2*
+    <b id="id20">*id20*
+      <c id="id200">*id200*</c>
+      <c id="id201">*id201*</c>
+      <c id="id202">*id202*</c>
+      <c id="id203">*id203*</c>
+      <c id="id204">*id204*</c>
+      <c id="id205">*id205*</c>
+      <c id="id206">*id206*</c>
+      <c id="id207">*id207*</c>
+      <c id="id208">*id208*</c>
+      <c id="id209">*id209*</c>
+    </b>
+    <b id="id21">*id21*
+      <c id="id210">*id210*</c>
+      <c id="id211">*id211*</c>
+      <c id="id212">*id212*</c>
+      <c id="id213">*id213*</c>
+      <c id="id214">*id214*</c>
+      <c id="id215">*id215*</c>
+      <c id="id216">*id216*</c>
+      <c id="id217">*id217*</c>
+      <c id="id218">*id218*</c>
+      <c id="id219">*id219*</c>
+    </b>
+    <b id="id22">*id22*
+      <c id="id220">*id220*</c>
+      <c id="id221">*id221*</c>
+      <c id="id222">*id222*</c>
+      <c id="id223">*id223*</c>
+      <c id="id224">*id224*</c>
+      <c id="id225">*id225*</c>
+      <c id="id226">*id226*</c>
+      <c id="id227">*id227*</c>
+      <c id="id228">*id228*</c>
+      <c id="id229">*id229*</c>
+    </b>
+    <b id="id23">*id23*
+      <c id="id230">*id230*</c>
+      <c id="id231">*id231*</c>
+      <c id="id232">*id232*</c>
+      <c id="id233">*id233*</c>
+      <c id="id234">*id234*</c>
+      <c id="id235">*id235*</c>
+      <c id="id236">*id236*</c>
+      <c id="id237">*id237*</c>
+      <c id="id238">*id238*</c>
+      <c id="id239">*id239*</c>
+    </b>
+    <b id="id24">*id24*
+      <c id="id240">*id240*</c>
+      <c id="id241">*id241*</c>
+      <c id="id242">*id242*</c>
+      <c id="id243">*id243*</c>
+      <c id="id244">*id244*</c>
+      <c id="id245">*id245*</c>
+      <c id="id246">*id246*</c>
+      <c id="id247">*id247*</c>
+      <c id="id248">*id248*</c>
+      <c id="id249">*id249*</c>
+    </b>
+    <b id="id25">*id25*
+      <c id="id250">*id250*</c>
+      <c id="id251">*id251*</c>
+      <c id="id252">*id252*</c>
+      <c id="id253">*id253*</c>
+      <c id="id254">*id254*</c>
+      <c id="id255">*id255*</c>
+      <c id="id256">*id256*</c>
+      <c id="id257">*id257*</c>
+      <c id="id258">*id258*</c>
+      <c id="id259">*id259*</c>
+    </b>
+    <b id="id26">*id26*
+      <c id="id260">*id260*</c>
+      <c id="id261">*id261*</c>
+      <c id="id262">*id262*</c>
+      <c id="id263">*id263*</c>
+      <c id="id264">*id264*</c>
+      <c id="id265">*id265*</c>
+      <c id="id266">*id266*</c>
+      <c id="id267">*id267*</c>
+      <c id="id268">*id268*</c>
+      <c id="id269">*id269*</c>
+    </b>
+    <b id="id27">*id27*
+      <c id="id270">*id270*</c>
+      <c id="id271">*id271*</c>
+      <c id="id272">*id272*</c>
+      <c id="id273">*id273*</c>
+      <c id="id274">*id274*</c>
+      <c id="id275">*id275*</c>
+      <c id="id276">*id276*</c>
+      <c id="id277">*id277*</c>
+      <c id="id278">*id278*</c>
+      <c id="id279">*id279*</c>
+    </b>
+    <b id="id28">*id28*
+      <c id="id280">*id280*</c>
+      <c id="id281">*id281*</c>
+      <c id="id282">*id282*</c>
+      <c id="id283">*id283*</c>
+      <c id="id284">*id284*</c>
+      <c id="id285">*id285*</c>
+      <c id="id286">*id286*</c>
+      <c id="id287">*id287*</c>
+      <c id="id288">*id288*</c>
+      <c id="id289">*id289*</c>
+    </b>
+    <b id="id29">*id29*
+      <c id="id290">*id290*</c>
+      <c id="id291">*id291*</c>
+      <c id="id292">*id292*</c>
+      <c id="id293">*id293*</c>
+      <c id="id294">*id294*</c>
+      <c id="id295">*id295*</c>
+      <c id="id296">*id296*</c>
+      <c id="id297">*id297*</c>
+      <c id="id298">*id298*</c>
+      <c id="id299">*id299*</c>
+    </b>
+  </a>
+  <a id="id3">
+    *id3*
+    <b id="id30">*id30*</b>
+    <b id="id31">*id31*</b>
+    <b id="id32">*id32*</b>
+    <b id="id33">*id33*</b>
+    <b id="id34">*id34*</b>
+    <b id="id35">*id35*</b>
+    <b id="id36">*id36*</b>
+    <b id="id37">*id37*</b>
+    <b id="id38">*id38*</b>
+    <b id="id39">*id39*</b>
+  </a>
+  <a id="id4">
+    *id4*
+    <b id="id40">*id40*
+      <c id="id400">*id400*</c>
+      <c id="id401">*id401*</c>
+      <c id="id402">*id402*</c>
+      <c id="id403">*id403*</c>
+      <c id="id404">*id404*</c>
+      <c id="id405">*id405*</c>
+      <c id="id406">*id406*</c>
+      <c id="id407">*id407*</c>
+      <c id="id408">*id408*</c>
+      <c id="id409">*id409*</c>
+    </b>
+    <b id="id41">*id41*
+      <c id="id410">*id410*</c>
+      <c id="id411">*id411*</c>
+      <c id="id412">*id412*</c>
+      <c id="id413">*id413*</c>
+      <c id="id414">*id414*</c>
+      <c id="id415">*id415*</c>
+      <c id="id416">*id416*</c>
+      <c id="id417">*id417*</c>
+      <c id="id418">*id418*</c>
+      <c id="id419">*id419*</c>
+    </b>
+    <b id="id42">*id42*
+      <c id="id420">*id420*</c>
+      <c id="id421">*id421*</c>
+      <c id="id422">*id422*</c>
+      <c id="id423">*id423*</c>
+      <c id="id424">*id424*</c>
+      <c id="id425">*id425*</c>
+      <c id="id426">*id426*</c>
+      <c id="id427">*id427*</c>
+      <c id="id428">*id428*</c>
+      <c id="id429">*id429*</c>
+    </b>
+    <b id="id43">*id43*
+      <c id="id430">*id430*</c>
+      <c id="id431">*id431*</c>
+      <c id="id432">*id432*</c>
+      <c id="id433">*id433*</c>
+      <c id="id434">*id434*</c>
+      <c id="id435">*id435*</c>
+      <c id="id436">*id436*</c>
+      <c id="id437">*id437*</c>
+      <c id="id438">*id438*</c>
+      <c id="id439">*id439*</c>
+    </b>
+    <b id="id44">*id44*
+      <c id="id440">*id440*</c>
+      <c id="id441">*id441*</c>
+      <c id="id442">*id442*</c>
+      <c id="id443">*id443*</c>
+      <c id="id444">*id444*</c>
+      <c id="id445">*id445*</c>
+      <c id="id446">*id446*</c>
+      <c id="id447">*id447*</c>
+      <c id="id448">*id448*</c>
+      <c id="id449">*id449*</c>
+    </b>
+    <b id="id45">*id45*
+      <c id="id450">*id450*</c>
+      <c id="id451">*id451*</c>
+      <c id="id452">*id452*</c>
+      <c id="id453">*id453*</c>
+      <c id="id454">*id454*</c>
+      <c id="id455">*id455*</c>
+      <c id="id456">*id456*</c>
+      <c id="id457">*id457*</c>
+      <c id="id458">*id458*</c>
+      <c id="id459">*id459*</c>
+    </b>
+    <b id="id46">*id46*
+      <c id="id460">*id460*</c>
+      <c id="id461">*id461*</c>
+      <c id="id462">*id462*</c>
+      <c id="id463">*id463*</c>
+      <c id="id464">*id464*</c>
+      <c id="id465">*id465*</c>
+      <c id="id466">*id466*</c>
+      <c id="id467">*id467*</c>
+      <c id="id468">*id468*</c>
+      <c id="id469">*id469*</c>
+    </b>
+    <b id="id47">*id47*
+      <c id="id470">*id470*</c>
+      <c id="id471">*id471*</c>
+      <c id="id472">*id472*</c>
+      <c id="id473">*id473*</c>
+      <c id="id474">*id474*</c>
+      <c id="id475">*id475*</c>
+      <c id="id476">*id476*</c>
+      <c id="id477">*id477*</c>
+      <c id="id478">*id478*</c>
+      <c id="id479">*id479*</c>
+    </b>
+    <b id="id48">*id48*
+      <c id="id480">*id480*</c>
+      <c id="id481">*id481*</c>
+      <c id="id482">*id482*</c>
+      <c id="id483">*id483*</c>
+      <c id="id484">*id484*</c>
+      <c id="id485">*id485*</c>
+      <c id="id486">*id486*</c>
+      <c id="id487">*id487*</c>
+      <c id="id488">*id488*</c>
+      <c id="id489">*id489*</c>
+    </b>
+    <b id="id49">*id49*
+      <c id="id490">*id490*</c>
+      <c id="id491">*id491*</c>
+      <c id="id492">*id492*</c>
+      <c id="id493">*id493*</c>
+      <c id="id494">*id494*</c>
+      <c id="id495">*id495*</c>
+      <c id="id496">*id496*</c>
+      <c id="id497">*id497*</c>
+      <c id="id498">*id498*</c>
+      <c id="id499">*id499*</c>
+    </b>
+  </a>
+  <a id="id5">
+    *id5*
+    <b id="id50">*id50*</b>
+    <b id="id51">*id51*</b>
+    <b id="id52">*id52*</b>
+    <b id="id53">*id53*</b>
+    <b id="id54">*id54*</b>
+    <b id="id55">*id55*</b>
+    <b id="id56">*id56*</b>
+    <b id="id57">*id57*</b>
+    <b id="id58">*id58*</b>
+    <b id="id59">*id59*</b>
+  </a>
+  <a id="id6">
+    *id6*
+    <b id="id60">*id60*
+      <c id="id600">*id600*</c>
+      <c id="id601">*id601*</c>
+      <c id="id602">*id602*</c>
+      <c id="id603">*id603*</c>
+      <c id="id604">*id604*</c>
+      <c id="id605">*id605*</c>
+      <c id="id606">*id606*</c>
+      <c id="id607">*id607*</c>
+      <c id="id608">*id608*</c>
+      <c id="id609">*id609*</c>
+    </b>
+    <b id="id61">*id61*
+      <c id="id610">*id610*</c>
+      <c id="id611">*id611*</c>
+      <c id="id612">*id612*</c>
+      <c id="id613">*id613*</c>
+      <c id="id614">*id614*</c>
+      <c id="id615">*id615*</c>
+      <c id="id616">*id616*</c>
+      <c id="id617">*id617*</c>
+      <c id="id618">*id618*</c>
+      <c id="id619">*id619*</c>
+    </b>
+    <b id="id62">*id62*
+      <c id="id620">*id620*</c>
+      <c id="id621">*id621*</c>
+      <c id="id622">*id622*</c>
+      <c id="id623">*id623*</c>
+      <c id="id624">*id624*</c>
+      <c id="id625">*id625*</c>
+      <c id="id626">*id626*</c>
+      <c id="id627">*id627*</c>
+      <c id="id628">*id628*</c>
+      <c id="id629">*id629*</c>
+    </b>
+    <b id="id63">*id63*
+      <c id="id630">*id630*</c>
+      <c id="id631">*id631*</c>
+      <c id="id632">*id632*</c>
+      <c id="id633">*id633*</c>
+      <c id="id634">*id634*</c>
+      <c id="id635">*id635*</c>
+      <c id="id636">*id636*</c>
+      <c id="id637">*id637*</c>
+      <c id="id638">*id638*</c>
+      <c id="id639">*id639*</c>
+    </b>
+    <b id="id64">*id64*
+      <c id="id640">*id640*</c>
+      <c id="id641">*id641*</c>
+      <c id="id642">*id642*</c>
+      <c id="id643">*id643*</c>
+      <c id="id644">*id644*</c>
+      <c id="id645">*id645*</c>
+      <c id="id646">*id646*</c>
+      <c id="id647">*id647*</c>
+      <c id="id648">*id648*</c>
+      <c id="id649">*id649*</c>
+    </b>
+    <b id="id65">*id65*
+      <c id="id650">*id650*</c>
+      <c id="id651">*id651*</c>
+      <c id="id652">*id652*</c>
+      <c id="id653">*id653*</c>
+      <c id="id654">*id654*</c>
+      <c id="id655">*id655*</c>
+      <c id="id656">*id656*</c>
+      <c id="id657">*id657*</c>
+      <c id="id658">*id658*</c>
+      <c id="id659">*id659*</c>
+    </b>
+    <b id="id66">*id66*
+      <c id="id660">*id660*</c>
+      <c id="id661">*id661*</c>
+      <c id="id662">*id662*</c>
+      <c id="id663">*id663*</c>
+      <c id="id664">*id664*</c>
+      <c id="id665">*id665*</c>
+      <c id="id666">*id666*</c>
+      <c id="id667">*id667*</c>
+      <c id="id668">*id668*</c>
+      <c id="id669">*id669*</c>
+    </b>
+    <b id="id67">*id67*
+      <c id="id670">*id670*</c>
+      <c id="id671">*id671*</c>
+      <c id="id672">*id672*</c>
+      <c id="id673">*id673*</c>
+      <c id="id674">*id674*</c>
+      <c id="id675">*id675*</c>
+      <c id="id676">*id676*</c>
+      <c id="id677">*id677*</c>
+      <c id="id678">*id678*</c>
+      <c id="id679">*id679*</c>
+    </b>
+    <b id="id68">*id68*
+      <c id="id680">*id680*</c>
+      <c id="id681">*id681*</c>
+      <c id="id682">*id682*</c>
+      <c id="id683">*id683*</c>
+      <c id="id684">*id684*</c>
+      <c id="id685">*id685*</c>
+      <c id="id686">*id686*</c>
+      <c id="id687">*id687*</c>
+      <c id="id688">*id688*</c>
+      <c id="id689">*id689*</c>
+    </b>
+    <b id="id69">*id69*
+      <c id="id690">*id690*</c>
+      <c id="id691">*id691*</c>
+      <c id="id692">*id692*</c>
+      <c id="id693">*id693*</c>
+      <c id="id694">*id694*</c>
+      <c id="id695">*id695*</c>
+      <c id="id696">*id696*</c>
+      <c id="id697">*id697*</c>
+      <c id="id698">*id698*</c>
+      <c id="id699">*id699*</c>
+    </b>
+  </a>
+  <a id="id7">
+    *id7*
+    <b id="id70">*id70*</b>
+    <b id="id71">*id71*</b>
+    <b id="id72">*id72*</b>
+    <b id="id73">*id73*</b>
+    <b id="id74">*id74*</b>
+    <b id="id75">*id75*</b>
+    <b id="id76">*id76*</b>
+    <b id="id77">*id77*</b>
+    <b id="id78">*id78*</b>
+    <b id="id79">*id79*</b>
+  </a>
+  <a id="id8">
+    *id8*
+    <b id="id80">*id80*
+      <c id="id800">*id800*
+        <d id="id8000">*id8000*</d>
+        <d id="id8001">*id8001*</d>
+        <d id="id8002">*id8002*</d>
+        <d id="id8003">*id8003*</d>
+        <d id="id8004">*id8004*</d>
+        <d id="id8005">*id8005*</d>
+        <d id="id8006">*id8006*</d>
+        <d id="id8007">*id8007*</d>
+        <d id="id8008">*id8008*</d>
+        <d id="id8009">*id8009*</d>
+      </c>
+      <c id="id801">*id801*
+        <d id="id8010">*id8010*</d>
+        <d id="id8011">*id8011*</d>
+        <d id="id8012">*id8012*</d>
+        <d id="id8013">*id8013*</d>
+        <d id="id8014">*id8014*</d>
+        <d id="id8015">*id8015*</d>
+        <d id="id8016">*id8016*</d>
+        <d id="id8017">*id8017*</d>
+        <d id="id8018">*id8018*</d>
+        <d id="id8019">*id8019*</d>
+      </c>
+      <c id="id802">*id802*
+        <d id="id8020">*id8020*</d>
+        <d id="id8021">*id8021*</d>
+        <d id="id8022">*id8022*</d>
+        <d id="id8023">*id8023*</d>
+        <d id="id8024">*id8024*</d>
+        <d id="id8025">*id8025*</d>
+        <d id="id8026">*id8026*</d>
+        <d id="id8027">*id8027*</d>
+        <d id="id8028">*id8028*</d>
+        <d id="id8029">*id8029*</d>
+      </c>
+      <c id="id803">*id803*
+        <d id="id8030">*id8030*</d>
+        <d id="id8031">*id8031*</d>
+        <d id="id8032">*id8032*</d>
+        <d id="id8033">*id8033*</d>
+        <d id="id8034">*id8034*</d>
+        <d id="id8035">*id8035*</d>
+        <d id="id8036">*id8036*</d>
+        <d id="id8037">*id8037*</d>
+        <d id="id8038">*id8038*</d>
+        <d id="id8039">*id8039*</d>
+      </c>
+      <c id="id804">*id804*
+        <d id="id8040">*id8040*</d>
+        <d id="id8041">*id8041*</d>
+        <d id="id8042">*id8042*</d>
+        <d id="id8043">*id8043*</d>
+        <d id="id8044">*id8044*</d>
+        <d id="id8045">*id8045*</d>
+        <d id="id8046">*id8046*</d>
+        <d id="id8047">*id8047*</d>
+        <d id="id8048">*id8048*</d>
+        <d id="id8049">*id8049*</d>
+      </c>
+      <c id="id805">*id805*
+        <d id="id8050">*id8050*</d>
+        <d id="id8051">*id8051*</d>
+        <d id="id8052">*id8052*</d>
+        <d id="id8053">*id8053*</d>
+        <d id="id8054">*id8054*</d>
+        <d id="id8055">*id8055*</d>
+        <d id="id8056">*id8056*</d>
+        <d id="id8057">*id8057*</d>
+        <d id="id8058">*id8058*</d>
+        <d id="id8059">*id8059*</d>
+      </c>
+      <c id="id806">*id806*
+        <d id="id8060">*id8060*</d>
+        <d id="id8061">*id8061*</d>
+        <d id="id8062">*id8062*</d>
+        <d id="id8063">*id8063*</d>
+        <d id="id8064">*id8064*</d>
+        <d id="id8065">*id8065*</d>
+        <d id="id8066">*id8066*</d>
+        <d id="id8067">*id8067*</d>
+        <d id="id8068">*id8068*</d>
+        <d id="id8069">*id8069*</d>
+      </c>
+      <c id="id807">*id807*
+        <d id="id8070">*id8070*</d>
+        <d id="id8071">*id8071*</d>
+        <d id="id8072">*id8072*</d>
+        <d id="id8073">*id8073*</d>
+        <d id="id8074">*id8074*</d>
+        <d id="id8075">*id8075*</d>
+        <d id="id8076">*id8076*</d>
+        <d id="id8077">*id8077*</d>
+        <d id="id8078">*id8078*</d>
+        <d id="id8079">*id8079*</d>
+      </c>
+      <c id="id808">*id808*
+        <d id="id8080">*id8080*</d>
+        <d id="id8081">*id8081*</d>
+        <d id="id8082">*id8082*</d>
+        <d id="id8083">*id8083*</d>
+        <d id="id8084">*id8084*</d>
+        <d id="id8085">*id8085*</d>
+        <d id="id8086">*id8086*</d>
+        <d id="id8087">*id8087*</d>
+        <d id="id8088">*id8088*</d>
+        <d id="id8089">*id8089*</d>
+      </c>
+      <c id="id809">*id809*
+        <d id="id8090">*id8090*</d>
+        <d id="id8091">*id8091*</d>
+        <d id="id8092">*id8092*</d>
+        <d id="id8093">*id8093*</d>
+        <d id="id8094">*id8094*</d>
+        <d id="id8095">*id8095*</d>
+        <d id="id8096">*id8096*</d>
+        <d id="id8097">*id8097*</d>
+        <d id="id8098">*id8098*</d>
+        <d id="id8099">*id8099*</d>
+      </c>
+    </b>
+    <b id="id81">*id81*
+      <c id="id810">*id810*</c>
+      <c id="id811">*id811*</c>
+      <c id="id812">*id812*</c>
+      <c id="id813">*id813*</c>
+      <c id="id814">*id814*</c>
+      <c id="id815">*id815*</c>
+      <c id="id816">*id816*</c>
+      <c id="id817">*id817*</c>
+      <c id="id818">*id818*</c>
+      <c id="id819">*id819*</c>
+    </b>
+    <b id="id82">*id82*
+      <c id="id820">*id820*</c>
+      <c id="id821">*id821*</c>
+      <c id="id822">*id822*</c>
+      <c id="id823">*id823*</c>
+      <c id="id824">*id824*</c>
+      <c id="id825">*id825*</c>
+      <c id="id826">*id826*</c>
+      <c id="id827">*id827*</c>
+      <c id="id828">*id828*</c>
+      <c id="id829">*id829*</c>
+    </b>
+    <b id="id83">*id83*
+      <c id="id830">*id830*</c>
+      <c id="id831">*id831*</c>
+      <c id="id832">*id832*</c>
+      <c id="id833">*id833*</c>
+      <c id="id834">*id834*</c>
+      <c id="id835">*id835*</c>
+      <c id="id836">*id836*</c>
+      <c id="id837">*id837*</c>
+      <c id="id838">*id838*</c>
+      <c id="id839">*id839*</c>
+    </b>
+    <b id="id84">*id84*
+      <c id="id840">*id840*
+        <d id="id8400">*id8400*</d>
+        <d id="id8401">*id8401*</d>
+        <d id="id8402">*id8402*</d>
+        <d id="id8403">*id8403*</d>
+        <d id="id8404">*id8404*</d>
+        <d id="id8405">*id8405*</d>
+        <d id="id8406">*id8406*</d>
+        <d id="id8407">*id8407*</d>
+        <d id="id8408">*id8408*</d>
+        <d id="id8409">*id8409*</d>
+      </c>
+      <c id="id841">*id841*
+        <d id="id8410">*id8410*</d>
+        <d id="id8411">*id8411*</d>
+        <d id="id8412">*id8412*</d>
+        <d id="id8413">*id8413*</d>
+        <d id="id8414">*id8414*</d>
+        <d id="id8415">*id8415*</d>
+        <d id="id8416">*id8416*</d>
+        <d id="id8417">*id8417*</d>
+        <d id="id8418">*id8418*</d>
+        <d id="id8419">*id8419*</d>
+      </c>
+      <c id="id842">*id842*
+        <d id="id8420">*id8420*</d>
+        <d id="id8421">*id8421*</d>
+        <d id="id8422">*id8422*</d>
+        <d id="id8423">*id8423*</d>
+        <d id="id8424">*id8424*</d>
+        <d id="id8425">*id8425*</d>
+        <d id="id8426">*id8426*</d>
+        <d id="id8427">*id8427*</d>
+        <d id="id8428">*id8428*</d>
+        <d id="id8429">*id8429*</d>
+      </c>
+      <c id="id843">*id843*
+        <d id="id8430">*id8430*</d>
+        <d id="id8431">*id8431*</d>
+        <d id="id8432">*id8432*</d>
+        <d id="id8433">*id8433*</d>
+        <d id="id8434">*id8434*</d>
+        <d id="id8435">*id8435*</d>
+        <d id="id8436">*id8436*</d>
+        <d id="id8437">*id8437*</d>
+        <d id="id8438">*id8438*</d>
+        <d id="id8439">*id8439*</d>
+      </c>
+      <c id="id844">*id844*
+        <d id="id8440">*id8440*</d>
+        <d id="id8441">*id8441*</d>
+        <d id="id8442">*id8442*</d>
+        <d id="id8443">*id8443*</d>
+        <d id="id8444">*id8444*</d>
+        <d id="id8445">*id8445*</d>
+        <d id="id8446">*id8446*</d>
+        <d id="id8447">*id8447*</d>
+        <d id="id8448">*id8448*</d>
+        <d id="id8449">*id8449*</d>
+      </c>
+      <c id="id845">*id845*
+        <d id="id8450">*id8450*</d>
+        <d id="id8451">*id8451*</d>
+        <d id="id8452">*id8452*</d>
+        <d id="id8453">*id8453*</d>
+        <d id="id8454">*id8454*</d>
+        <d id="id8455">*id8455*</d>
+        <d id="id8456">*id8456*</d>
+        <d id="id8457">*id8457*</d>
+        <d id="id8458">*id8458*</d>
+        <d id="id8459">*id8459*</d>
+      </c>
+      <c id="id846">*id846*
+        <d id="id8460">*id8460*</d>
+        <d id="id8461">*id8461*</d>
+        <d id="id8462">*id8462*</d>
+        <d id="id8463">*id8463*</d>
+        <d id="id8464">*id8464*</d>
+        <d id="id8465">*id8465*</d>
+        <d id="id8466">*id8466*</d>
+        <d id="id8467">*id8467*</d>
+        <d id="id8468">*id8468*</d>
+        <d id="id8469">*id8469*</d>
+      </c>
+      <c id="id847">*id847*
+        <d id="id8470">*id8470*</d>
+        <d id="id8471">*id8471*</d>
+        <d id="id8472">*id8472*</d>
+        <d id="id8473">*id8473*</d>
+        <d id="id8474">*id8474*</d>
+        <d id="id8475">*id8475*</d>
+        <d id="id8476">*id8476*</d>
+        <d id="id8477">*id8477*</d>
+        <d id="id8478">*id8478*</d>
+        <d id="id8479">*id8479*</d>
+      </c>
+      <c id="id848">*id848*
+        <d id="id8480">*id8480*</d>
+        <d id="id8481">*id8481*</d>
+        <d id="id8482">*id8482*</d>
+        <d id="id8483">*id8483*</d>
+        <d id="id8484">*id8484*</d>
+        <d id="id8485">*id8485*</d>
+        <d id="id8486">*id8486*</d>
+        <d id="id8487">*id8487*</d>
+        <d id="id8488">*id8488*</d>
+        <d id="id8489">*id8489*</d>
+      </c>
+      <c id="id849">*id849*
+        <d id="id8490">*id8490*</d>
+        <d id="id8491">*id8491*</d>
+        <d id="id8492">*id8492*</d>
+        <d id="id8493">*id8493*</d>
+        <d id="id8494">*id8494*</d>
+        <d id="id8495">*id8495*</d>
+        <d id="id8496">*id8496*</d>
+        <d id="id8497">*id8497*</d>
+        <d id="id8498">*id8498*</d>
+        <d id="id8499">*id8499*</d>
+      </c>
+    </b>
+    <b id="id85">*id85*
+      <c id="id850">*id850*</c>
+      <c id="id851">*id851*</c>
+      <c id="id852">*id852*</c>
+      <c id="id853">*id853*</c>
+      <c id="id854">*id854*</c>
+      <c id="id855">*id855*</c>
+      <c id="id856">*id856*</c>
+      <c id="id857">*id857*</c>
+      <c id="id858">*id858*</c>
+      <c id="id859">*id859*</c>
+    </b>
+    <b id="id86">*id86*
+      <c id="id860">*id860*</c>
+      <c id="id861">*id861*</c>
+      <c id="id862">*id862*</c>
+      <c id="id863">*id863*</c>
+      <c id="id864">*id864*</c>
+      <c id="id865">*id865*</c>
+      <c id="id866">*id866*</c>
+      <c id="id867">*id867*</c>
+      <c id="id868">*id868*</c>
+      <c id="id869">*id869*</c>
+    </b>
+    <b id="id87">*id87*
+      <c id="id870">*id870*</c>
+      <c id="id871">*id871*</c>
+      <c id="id872">*id872*</c>
+      <c id="id873">*id873*</c>
+      <c id="id874">*id874*</c>
+      <c id="id875">*id875*</c>
+      <c id="id876">*id876*</c>
+      <c id="id877">*id877*</c>
+      <c id="id878">*id878*</c>
+      <c id="id879">*id879*</c>
+    </b>
+    <b id="id88">*id88*
+      <c id="id880">*id880*
+        <d id="id8800">*id8800*</d>
+        <d id="id8801">*id8801*</d>
+        <d id="id8802">*id8802*</d>
+        <d id="id8803">*id8803*</d>
+        <d id="id8804">*id8804*</d>
+        <d id="id8805">*id8805*</d>
+        <d id="id8806">*id8806*</d>
+        <d id="id8807">*id8807*</d>
+        <d id="id8808">*id8808*</d>
+        <d id="id8809">*id8809*</d>
+      </c>
+      <c id="id881">*id881*
+        <d id="id8810">*id8810*</d>
+        <d id="id8811">*id8811*</d>
+        <d id="id8812">*id8812*</d>
+        <d id="id8813">*id8813*</d>
+        <d id="id8814">*id8814*</d>
+        <d id="id8815">*id8815*</d>
+        <d id="id8816">*id8816*</d>
+        <d id="id8817">*id8817*</d>
+        <d id="id8818">*id8818*</d>
+        <d id="id8819">*id8819*</d>
+      </c>
+      <c id="id882">*id882*
+        <d id="id8820">*id8820*</d>
+        <d id="id8821">*id8821*</d>
+        <d id="id8822">*id8822*</d>
+        <d id="id8823">*id8823*</d>
+        <d id="id8824">*id8824*</d>
+        <d id="id8825">*id8825*</d>
+        <d id="id8826">*id8826*</d>
+        <d id="id8827">*id8827*</d>
+        <d id="id8828">*id8828*</d>
+        <d id="id8829">*id8829*</d>
+      </c>
+      <c id="id883">*id883*
+        <d id="id8830">*id8830*</d>
+        <d id="id8831">*id8831*</d>
+        <d id="id8832">*id8832*</d>
+        <d id="id8833">*id8833*</d>
+        <d id="id8834">*id8834*</d>
+        <d id="id8835">*id8835*</d>
+        <d id="id8836">*id8836*</d>
+        <d id="id8837">*id8837*</d>
+        <d id="id8838">*id8838*</d>
+        <d id="id8839">*id8839*</d>
+      </c>
+      <c id="id884">*id884*
+        <d id="id8840">*id8840*</d>
+        <d id="id8841">*id8841*</d>
+        <d id="id8842">*id8842*</d>
+        <d id="id8843">*id8843*</d>
+        <d id="id8844">*id8844*</d>
+        <d id="id8845">*id8845*</d>
+        <d id="id8846">*id8846*</d>
+        <d id="id8847">*id8847*</d>
+        <d id="id8848">*id8848*</d>
+        <d id="id8849">*id8849*</d>
+      </c>
+      <c id="id885">*id885*
+        <d id="id8850">*id8850*</d>
+        <d id="id8851">*id8851*</d>
+        <d id="id8852">*id8852*</d>
+        <d id="id8853">*id8853*</d>
+        <d id="id8854">*id8854*</d>
+        <d id="id8855">*id8855*</d>
+        <d id="id8856">*id8856*</d>
+        <d id="id8857">*id8857*</d>
+        <d id="id8858">*id8858*</d>
+        <d id="id8859">*id8859*</d>
+      </c>
+      <c id="id886">*id886*
+        <d id="id8860">*id8860*</d>
+        <d id="id8861">*id8861*</d>
+        <d id="id8862">*id8862*</d>
+        <d id="id8863">*id8863*</d>
+        <d id="id8864">*id8864*</d>
+        <d id="id8865">*id8865*</d>
+        <d id="id8866">*id8866*</d>
+        <d id="id8867">*id8867*</d>
+        <d id="id8868">*id8868*</d>
+        <d id="id8869">*id8869*</d>
+      </c>
+      <c id="id887">*id887*
+        <d id="id8870">*id8870*</d>
+        <d id="id8871">*id8871*</d>
+        <d id="id8872">*id8872*</d>
+        <d id="id8873">*id8873*</d>
+        <d id="id8874">*id8874*</d>
+        <d id="id8875">*id8875*</d>
+        <d id="id8876">*id8876*</d>
+        <d id="id8877">*id8877*</d>
+        <d id="id8878">*id8878*</d>
+        <d id="id8879">*id8879*</d>
+      </c>
+      <c id="id888">*id888*
+         <d id="id8880">*id8880*
+          <e id="id88800">*id88800*</e>
+          <e id="id88801">*id88801*</e>
+          <e id="id88802">*id88802*</e>
+          <e id="id88803">*id88803*</e>
+          <e id="id88804">*id88804*</e>
+          <e id="id88805">*id88805*</e>
+          <e id="id88806">*id88806*</e>
+          <e id="id88807">*id88807*</e>
+          <e id="id88808">*id88808*</e>
+          <e id="id88809">*id88809*</e>
+        </d>
+        <d id="id8881">*id8881*
+          <e id="id88810">*id88810*</e>
+          <e id="id88811">*id88811*</e>
+          <e id="id88812">*id88812*</e>
+          <e id="id88813">*id88813*</e>
+          <e id="id88814">*id88814*</e>
+          <e id="id88815">*id88815*</e>
+          <e id="id88816">*id88816*</e>
+          <e id="id88817">*id88817*</e>
+          <e id="id88818">*id88818*</e>
+          <e id="id88819">*id88819*</e>
+        </d>
+        <d id="id8882">*id8882*
+          <e id="id88820">*id88820*</e>
+          <e id="id88821">*id88821*</e>
+          <e id="id88822">*id88822*</e>
+          <e id="id88823">*id88823*</e>
+          <e id="id88824">*id88824*</e>
+          <e id="id88825">*id88825*</e>
+          <e id="id88826">*id88826*</e>
+          <e id="id88827">*id88827*</e>
+          <e id="id88828">*id88828*</e>
+          <e id="id88829">*id88829*</e>
+        </d>
+        <d id="id8883">*id8883*
+          <e id="id88830">*id88830*</e>
+          <e id="id88831">*id88831*</e>
+          <e id="id88832">*id88832*</e>
+          <e id="id88833">*id88833*</e>
+          <e id="id88834">*id88834*</e>
+          <e id="id88835">*id88835*</e>
+          <e id="id88836">*id88836*</e>
+          <e id="id88837">*id88837*</e>
+          <e id="id88838">*id88838*</e>
+          <e id="id88839">*id88839*</e>
+        </d>
+        <d id="id8884">*id8884*
+          <e id="id88840">*id88840*</e>
+          <e id="id88841">*id88841*</e>
+          <e id="id88842">*id88842*</e>
+          <e id="id88843">*id88843*</e>
+          <e id="id88844">*id88844*</e>
+          <e id="id88845">*id88845*</e>
+          <e id="id88846">*id88846*</e>
+          <e id="id88847">*id88847*</e>
+          <e id="id88848">*id88848*</e>
+          <e id="id88849">*id88849*</e>
+        </d>
+        <d id="id8885">*id8885*
+          <e id="id88850">*id88850*</e>
+          <e id="id88851">*id88851*</e>
+          <e id="id88852">*id88852*</e>
+          <e id="id88853">*id88853*</e>
+          <e id="id88854">*id88854*</e>
+          <e id="id88855">*id88855*</e>
+          <e id="id88856">*id88856*</e>
+          <e id="id88857">*id88857*</e>
+          <e id="id88858">*id88858*</e>
+          <e id="id88859">*id88859*</e>
+        </d>
+        <d id="id8886">*id8886*
+          <e id="id88860">*id88860*</e>
+          <e id="id88861">*id88861*</e>
+          <e id="id88862">*id88862*</e>
+          <e id="id88863">*id88863*</e>
+          <e id="id88864">*id88864*</e>
+          <e id="id88865">*id88865*</e>
+          <e id="id88866">*id88866*</e>
+          <e id="id88867">*id88867*</e>
+          <e id="id88868">*id88868*</e>
+          <e id="id88869">*id88869*</e>
+        </d>
+        <d id="id8887">*id8887*
+          <e id="id88870">*id88870*</e>
+          <e id="id88871">*id88871*</e>
+          <e id="id88872">*id88872*</e>
+          <e id="id88873">*id88873*</e>
+          <e id="id88874">*id88874*</e>
+          <e id="id88875">*id88875*</e>
+          <e id="id88876">*id88876*</e>
+          <e id="id88877">*id88877*</e>
+          <e id="id88878">*id88878*</e>
+          <e id="id88879">*id88879*</e>
+        </d>
+        <d id="id8888">*id8888*
+          <e id="id88880">*id88880*</e>
+          <e id="id88881">*id88881*</e>
+          <e id="id88882">*id88882*</e>
+          <e id="id88883">*id88883*</e>
+          <e id="id88884">*id88884*</e>
+          <e id="id88885">*id88885*</e>
+          <e id="id88886">*id88886*</e>
+          <e id="id88887">*id88887*</e>
+          <e id="id88888">*id88888*</e>
+          <e id="id88889">*id88889*</e>
+        </d>
+        <d id="id8889">*id8889*
+          <e id="id88890">*id88890*</e>
+          <e id="id88891">*id88891*</e>
+          <e id="id88892">*id88892*</e>
+          <e id="id88893">*id88893*</e>
+          <e id="id88894">*id88894*</e>
+          <e id="id88895">*id88895*</e>
+          <e id="id88896">*id88896*</e>
+          <e id="id88897">*id88897*</e>
+          <e id="id88898">*id88898*</e>
+          <e id="id88899">*id88899*</e>
+        </d>
+      </c>
+      <c id="id889">*id889*
+        <d id="id8890">*id8890*</d>
+        <d id="id8891">*id8891*</d>
+        <d id="id8892">*id8892*</d>
+        <d id="id8893">*id8893*</d>
+        <d id="id8894">*id8894*</d>
+        <d id="id8895">*id8895*</d>
+        <d id="id8896">*id8896*</d>
+        <d id="id8897">*id8897*</d>
+        <d id="id8898">*id8898*</d>
+        <d id="id8899">*id8899*</d>
+      </c>
+    </b>
+    <b id="id89">*id89*
+      <c id="id890">*id890*</c>
+      <c id="id891">*id891*</c>
+      <c id="id892">*id892*</c>
+      <c id="id893">*id893*</c>
+      <c id="id894">*id894*</c>
+      <c id="id895">*id895*</c>
+      <c id="id896">*id896*</c>
+      <c id="id897">*id897*</c>
+      <c id="id898">*id898*</c>
+      <c id="id899">*id899*</c>
+    </b>
+  </a>
+  <a id="id9">
+    *id9*
+    <b id="id90">*id90*</b>
+    <b id="id91">*id91*</b>
+    <b id="id92">*id92*</b>
+    <b id="id93">*id93*</b>
+    <b id="id94">*id94*</b>
+    <b id="id95">*id95*</b>
+    <b id="id96">*id96*</b>
+    <b id="id97">*id97*</b>
+    <b id="id98">*id98*</b>
+    <b id="id99">*id99*</b>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/tree-tens.xml b/test/tests/perf/xtestdata/tree-tens.xml
new file mode 100644
index 0000000..8c54dc5
--- /dev/null
+++ b/test/tests/perf/xtestdata/tree-tens.xml
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- elements at a, c, e levels are all named the same;
+     elements at b and d levels are uniquely named. -->
+<doc>
+  <a place="id1">
+    <b10/>
+    <b11/>
+    <b12/>
+    <b13/>
+    <b14/>
+    <b15/>
+    <b16/>
+    <b17/>
+    <b18/>
+    <b19/>
+  </a>
+  <a place="id2">
+    <b20>
+      <c place="id200"/>      <c place="id201"/>      <c place="id202"/>      <c place="id203"/>      <c place="id204"/>      <c place="id205"/>      <c place="id206"/>      <c place="id207"/>      <c place="id208"/>      <c place="id209"/>
+    </b20>
+    <b21>
+      <c place="id210"/>      <c place="id211"/>      <c place="id212"/>      <c place="id213"/>      <c place="id214"/>      <c place="id215"/>      <c place="id216"/>      <c place="id217"/>      <c place="id218"/>      <c place="id219"/>
+    </b21>
+    <b22>
+      <c place="id220"/>      <c place="id221"/>      <c place="id222"/>      <c place="id223"/>      <c place="id224"/>      <c place="id225"/>      <c place="id226"/>      <c place="id227"/>      <c place="id228"/>      <c place="id229"/>
+    </b22>
+    <b23>
+      <c place="id230"/>      <c place="id231"/>      <c place="id232"/>      <c place="id233"/>      <c place="id234"/>      <c place="id235"/>      <c place="id236"/>      <c place="id237"/>      <c place="id238"/>      <c place="id239"/>
+    </b23>
+    <b24>
+      <c place="id240"/>      <c place="id241"/>      <c place="id242"/>      <c place="id243"/>      <c place="id244"/>      <c place="id245"/>      <c place="id246"/>      <c place="id247"/>      <c place="id248"/>      <c place="id249"/>
+    </b24>
+    <b25>
+      <c place="id250"/>      <c place="id251"/>      <c place="id252"/>      <c place="id253"/>      <c place="id254"/>      <c place="id255"/>      <c place="id256"/>      <c place="id257"/>      <c place="id258"/>      <c place="id259"/>
+    </b25>
+    <b26>
+      <c place="id260"/>      <c place="id261"/>      <c place="id262"/>      <c place="id263"/>      <c place="id264"/>      <c place="id265"/>      <c place="id266"/>      <c place="id267"/>      <c place="id268"/>      <c place="id269"/>
+    </b26>
+    <b27>
+      <c place="id270"/>      <c place="id271"/>      <c place="id272"/>      <c place="id273"/>      <c place="id274"/>      <c place="id275"/>      <c place="id276"/>      <c place="id277"/>      <c place="id278"/>      <c place="id279"/>
+    </b27>
+    <b28>
+      <c place="id280"/>      <c place="id281"/>      <c place="id282"/>      <c place="id283"/>      <c place="id284"/>      <c place="id285"/>      <c place="id286"/>      <c place="id287"/>      <c place="id288"/>      <c place="id289"/>
+    </b28>
+    <b29>
+      <c place="id290"/>      <c place="id291"/>      <c place="id292"/>      <c place="id293"/>      <c place="id294"/>      <c place="id295"/>      <c place="id296"/>      <c place="id297"/>      <c place="id298"/>      <c place="id299"/>
+    </b29>
+  </a>
+  <a place="id3">
+    <b30/>
+    <b31/>
+    <b32/>
+    <b33/>
+    <b34/>
+    <b35/>
+    <b36/>
+    <b37/>
+    <b38/>
+    <b39/>
+  </a>
+  <a place="id4">
+    <b40>
+      <c place="id400"/>      <c place="id401"/>      <c place="id402"/>      <c place="id403"/>      <c place="id404"/>      <c place="id405"/>      <c place="id406"/>      <c place="id407"/>      <c place="id408"/>      <c place="id409"/>
+    </b40>
+    <b41>
+      <c place="id410"/>      <c place="id411"/>      <c place="id412"/>      <c place="id413"/>      <c place="id414"/>      <c place="id415"/>      <c place="id416"/>      <c place="id417"/>      <c place="id418"/>      <c place="id419"/>
+    </b41>
+    <b42>
+      <c place="id420"/>      <c place="id421"/>      <c place="id422"/>      <c place="id423"/>      <c place="id424"/>      <c place="id425"/>      <c place="id426"/>      <c place="id427"/>      <c place="id428"/>      <c place="id429"/>
+    </b42>
+    <b43>
+      <c place="id430"/>      <c place="id431"/>      <c place="id432"/>      <c place="id433"/>      <c place="id434"/>      <c place="id435"/>      <c place="id436"/>      <c place="id437"/>      <c place="id438"/>      <c place="id439"/>
+    </b43>
+    <b44>
+      <c place="id440"/>      <c place="id441"/>      <c place="id442"/>      <c place="id443"/>      <c place="id444"/>      <c place="id445"/>      <c place="id446"/>      <c place="id447"/>      <c place="id448"/>      <c place="id449"/>
+    </b44>
+    <b45>
+      <c place="id450"/>      <c place="id451"/>      <c place="id452"/>      <c place="id453"/>      <c place="id454"/>      <c place="id455"/>      <c place="id456"/>      <c place="id457"/>      <c place="id458"/>      <c place="id459"/>
+    </b45>
+    <b46>
+      <c place="id460"/>      <c place="id461"/>      <c place="id462"/>      <c place="id463"/>      <c place="id464"/>      <c place="id465"/>      <c place="id466"/>      <c place="id467"/>      <c place="id468"/>      <c place="id469"/>
+    </b46>
+    <b47>
+      <c place="id470"/>      <c place="id471"/>      <c place="id472"/>      <c place="id473"/>      <c place="id474"/>      <c place="id475"/>      <c place="id476"/>      <c place="id477"/>      <c place="id478"/>      <c place="id479"/>
+    </b47>
+    <b48>
+      <c place="id480"/>      <c place="id481"/>      <c place="id482"/>      <c place="id483"/>      <c place="id484"/>      <c place="id485"/>      <c place="id486"/>      <c place="id487"/>      <c place="id488"/>      <c place="id489"/>
+    </b48>
+    <b49>
+      <c place="id490"/>      <c place="id491"/>      <c place="id492"/>      <c place="id493"/>      <c place="id494"/>      <c place="id495"/>      <c place="id496"/>      <c place="id497"/>      <c place="id498"/>      <c place="id499"/>
+    </b49>
+  </a>
+  <a place="id5">
+    <b50/>
+    <b51/>
+    <b52/>
+    <b53/>
+    <b54/>
+    <b55/>
+    <b56/>
+    <b57/>
+    <b58/>
+    <b59/>
+  </a>
+  <a place="id6">
+    <b60>
+      <c place="id600"/>      <c place="id601"/>      <c place="id602"/>      <c place="id603"/>      <c place="id604"/>      <c place="id605"/>      <c place="id606"/>      <c place="id607"/>      <c place="id608"/>      <c place="id609"/>
+    </b60>
+    <b61>
+      <c place="id610"/>      <c place="id611"/>      <c place="id612"/>      <c place="id613"/>      <c place="id614"/>      <c place="id615"/>      <c place="id616"/>      <c place="id617"/>      <c place="id618"/>      <c place="id619"/>
+    </b61>
+    <b62>
+      <c place="id620"/>      <c place="id621"/>      <c place="id622"/>      <c place="id623"/>      <c place="id624"/>      <c place="id625"/>      <c place="id626"/>      <c place="id627"/>      <c place="id628"/>      <c place="id629"/>
+    </b62>
+    <b63>
+      <c place="id630"/>      <c place="id631"/>      <c place="id632"/>      <c place="id633"/>      <c place="id634"/>      <c place="id635"/>      <c place="id636"/>      <c place="id637"/>      <c place="id638"/>      <c place="id639"/>
+    </b63>
+    <b64>
+      <c place="id640"/>      <c place="id641"/>      <c place="id642"/>      <c place="id643"/>      <c place="id644"/>      <c place="id645"/>      <c place="id646"/>      <c place="id647"/>      <c place="id648"/>      <c place="id649"/>
+    </b64>
+    <b65>
+      <c place="id650"/>      <c place="id651"/>      <c place="id652"/>      <c place="id653"/>      <c place="id654"/>      <c place="id655"/>      <c place="id656"/>      <c place="id657"/>      <c place="id658"/>      <c place="id659"/>
+    </b65>
+    <b66>
+      <c place="id660"/>      <c place="id661"/>      <c place="id662"/>      <c place="id663"/>      <c place="id664"/>      <c place="id665"/>      <c place="id666"/>      <c place="id667"/>      <c place="id668"/>      <c place="id669"/>
+    </b66>
+    <b67>
+      <c place="id670"/>      <c place="id671"/>      <c place="id672"/>      <c place="id673"/>      <c place="id674"/>      <c place="id675"/>      <c place="id676"/>      <c place="id677"/>      <c place="id678"/>      <c place="id679"/>
+    </b67>
+    <b68>
+      <c place="id680"/>      <c place="id681"/>      <c place="id682"/>      <c place="id683"/>      <c place="id684"/>      <c place="id685"/>      <c place="id686"/>      <c place="id687"/>      <c place="id688"/>      <c place="id689"/>
+    </b68>
+    <b69>
+      <c place="id690"/>      <c place="id691"/>      <c place="id692"/>      <c place="id693"/>      <c place="id694"/>      <c place="id695"/>      <c place="id696"/>      <c place="id697"/>      <c place="id698"/>      <c place="id699"/>
+    </b69>
+  </a>
+  <a place="id7">
+    <b70/>
+    <b71/>
+    <b72/>
+    <b73/>
+    <b74/>
+    <b75/>
+    <b76/>
+    <b77/>
+    <b78/>
+    <b79/>
+  </a>
+  <a place="id8">
+    <b80>
+      <c place="id800">
+        <d8000/>        <d8001/>        <d8002/>        <d8003/>        <d8004/>        <d8005/>        <d8006/>        <d8007/>        <d8008/>        <d8009/>
+      </c>
+      <c place="id801">
+        <d8010/>        <d8011/>        <d8012/>        <d8013/>        <d8014/>        <d8015/>        <d8016/>        <d8017/>        <d8018/>        <d8019/>
+      </c>
+      <c place="id802">
+        <d8020/>        <d8021/>        <d8022/>        <d8023/>        <d8024/>        <d8025/>        <d8026/>        <d8027/>        <d8028/>        <d8029/>
+      </c>
+      <c place="id803">
+        <d8030/>        <d8031/>        <d8032/>        <d8033/>        <d8034/>        <d8035/>        <d8036/>        <d8037/>        <d8038/>        <d8039/>
+      </c>
+      <c place="id804">
+        <d8040/>        <d8041/>        <d8042/>        <d8043/>        <d8044/>        <d8045/>        <d8046/>        <d8047/>        <d8048/>        <d8049/>
+      </c>
+      <c place="id805">
+        <d8050/>        <d8051/>        <d8052/>        <d8053/>        <d8054/>        <d8055/>        <d8056/>        <d8057/>        <d8058/>        <d8059/>
+      </c>
+      <c place="id806">
+        <d8060/>        <d8061/>        <d8062/>        <d8063/>        <d8064/>        <d8065/>        <d8066/>        <d8067/>        <d8068/>        <d8069/>
+      </c>
+      <c place="id807">
+        <d8070/>        <d8071/>        <d8072/>        <d8073/>        <d8074/>        <d8075/>        <d8076/>        <d8077/>        <d8078/>        <d8079/>
+      </c>
+      <c place="id808">
+        <d8080/>        <d8081/>        <d8082/>        <d8083/>        <d8084/>        <d8085/>        <d8086/>        <d8087/>        <d8088/>        <d8089/>
+      </c>
+      <c place="id809">
+        <d8090/>        <d8091/>        <d8092/>        <d8093/>        <d8094/>        <d8095/>        <d8096/>        <d8097/>        <d8098/>        <d8099/>
+      </c>
+    </b80>
+    <b81>
+      <c place="id810"/>      <c place="id811"/>      <c place="id812"/>      <c place="id813"/>      <c place="id814"/>      <c place="id815"/>      <c place="id816"/>      <c place="id817"/>      <c place="id818"/>      <c place="id819"/>
+    </b81>
+    <b82>
+      <c place="id820"/>      <c place="id821"/>      <c place="id822"/>      <c place="id823"/>      <c place="id824"/>      <c place="id825"/>      <c place="id826"/>      <c place="id827"/>      <c place="id828"/>      <c place="id829"/>
+    </b82>
+    <b83>
+      <c place="id830"/>      <c place="id831"/>      <c place="id832"/>      <c place="id833"/>      <c place="id834"/>      <c place="id835"/>      <c place="id836"/>      <c place="id837"/>      <c place="id838"/>      <c place="id839"/>
+    </b83>
+    <b84>
+      <c place="id840">
+        <d8400/>        <d8401/>        <d8402/>        <d8403/>        <d8404/>        <d8405/>        <d8406/>        <d8407/>        <d8408/>        <d8409/>
+      </c>
+      <c place="id841">
+        <d8410/>        <d8411/>        <d8412/>        <d8413/>        <d8414/>        <d8415/>        <d8416/>        <d8417/>        <d8418/>        <d8419/>
+      </c>
+      <c place="id842">
+        <d8420/>        <d8421/>        <d8422/>        <d8423/>        <d8424/>        <d8425/>        <d8426/>        <d8427/>        <d8428/>        <d8429/>
+      </c>
+      <c place="id843">
+        <d8430/>        <d8431/>        <d8432/>        <d8433/>        <d8434/>        <d8435/>        <d8436/>        <d8437/>        <d8438/>        <d8439/>
+      </c>
+      <c place="id844">
+        <d8440/>        <d8441/>        <d8442/>        <d8443/>        <d8444/>        <d8445/>        <d8446/>        <d8447/>        <d8448/>        <d8449/>
+      </c>
+      <c place="id845">
+        <d8450/>        <d8451/>        <d8452/>        <d8453/>        <d8454/>        <d8455/>        <d8456/>        <d8457/>        <d8458/>        <d8459/>
+      </c>
+      <c place="id846">
+        <d8460/>        <d8461/>        <d8462/>        <d8463/>        <d8464/>        <d8465/>        <d8466/>        <d8467/>        <d8468/>        <d8469/>
+      </c>
+      <c place="id847">
+        <d8470/>        <d8471/>        <d8472/>        <d8473/>        <d8474/>        <d8475/>        <d8476/>        <d8477/>        <d8478/>        <d8479/>
+      </c>
+      <c place="id848">
+        <d8480/>        <d8481/>        <d8482/>        <d8483/>        <d8484/>        <d8485/>        <d8486/>        <d8487/>        <d8488/>        <d8489/>
+      </c>
+      <c place="id849">
+        <d8490/>        <d8491/>        <d8492/>        <d8493/>        <d8494/>        <d8495/>        <d8496/>        <d8497/>        <d8498/>        <d8499/>
+      </c>
+    </b84>
+    <b85>
+      <c place="id850"/>      <c place="id851"/>      <c place="id852"/>      <c place="id853"/>      <c place="id854"/>      <c place="id855"/>      <c place="id856"/>      <c place="id857"/>      <c place="id858"/>      <c place="id859"/>
+    </b85>
+    <b86>
+      <c place="id860"/>      <c place="id861"/>      <c place="id862"/>      <c place="id863"/>      <c place="id864"/>      <c place="id865"/>      <c place="id866"/>      <c place="id867"/>      <c place="id868"/>      <c place="id869"/>
+    </b86>
+    <b87>
+      <c place="id870"/>      <c place="id871"/>      <c place="id872"/>      <c place="id873"/>      <c place="id874"/>      <c place="id875"/>      <c place="id876"/>      <c place="id877"/>      <c place="id878"/>      <c place="id879"/>
+    </b87>
+    <b88>
+      <c place="id880">
+        <d8800/>        <d8801/>        <d8802/>        <d8803/>        <d8804/>        <d8805/>        <d8806/>        <d8807/>        <d8808/>        <d8809/>
+      </c>
+      <c place="id881">
+        <d8810/>        <d8811/>        <d8812/>        <d8813/>        <d8814/>        <d8815/>        <d8816/>        <d8817/>        <d8818/>        <d8819/>
+      </c>
+      <c place="id882">
+        <d8820/>        <d8821/>        <d8822/>        <d8823/>        <d8824/>        <d8825/>        <d8826/>        <d8827/>        <d8828/>        <d8829/>
+      </c>
+      <c place="id883">
+        <d8830/>        <d8831/>        <d8832/>        <d8833/>        <d8834/>        <d8835/>        <d8836/>        <d8837/>        <d8838/>        <d8839/>
+      </c>
+      <c place="id884">
+        <d8840/>        <d8841/>        <d8842/>        <d8843/>        <d8844/>        <d8845/>        <d8846/>        <d8847/>        <d8848/>        <d8849/>
+      </c>
+      <c place="id885">
+        <d8850/>        <d8851/>        <d8852/>        <d8853/>        <d8854/>        <d8855/>        <d8856/>        <d8857/>        <d8858/>        <d8859/>
+      </c>
+      <c place="id886">
+        <d8860/>        <d8861/>        <d8862/>        <d8863/>        <d8864/>        <d8865/>        <d8866/>        <d8867/>        <d8868/>        <d8869/>
+      </c>
+      <c place="id887">
+        <d8870/>        <d8871/>        <d8872/>        <d8873/>        <d8874/>        <d8875/>        <d8876/>        <d8877/>        <d8878/>        <d8879/>
+      </c>
+      <c place="id888">
+        <d8880>
+          <e place="id88800"/>          <e place="id88801"/>          <e place="id88802"/>          <e place="id88803"/>          <e place="id88804"/>          <e place="id88805"/>          <e place="id88806"/>          <e place="id88807"/>          <e place="id88808"/>          <e place="id88809"/>
+        </d8880>
+        <d8881>
+          <e place="id88810"/>          <e place="id88811"/>          <e place="id88812"/>          <e place="id88813"/>          <e place="id88814"/>          <e place="id88815"/>          <e place="id88816"/>          <e place="id88817"/>          <e place="id88818"/>          <e place="id88819"/>
+        </d8881>
+        <d8882>
+          <e place="id88820"/>          <e place="id88821"/>          <e place="id88822"/>          <e place="id88823"/>          <e place="id88824"/>          <e place="id88825"/>          <e place="id88826"/>          <e place="id88827"/>          <e place="id88828"/>          <e place="id88829"/>
+        </d8882>
+        <d8883>
+          <e place="id88830"/>          <e place="id88831"/>          <e place="id88832"/>          <e place="id88833"/>          <e place="id88834"/>          <e place="id88835"/>          <e place="id88836"/>          <e place="id88837"/>          <e place="id88838"/>          <e place="id88839"/>
+        </d8883>
+        <d8884>
+          <e place="id88840"/>          <e place="id88841"/>          <e place="id88842"/>          <e place="id88843"/>          <e place="id88844"/>          <e place="id88845"/>          <e place="id88846"/>          <e place="id88847"/>          <e place="id88848"/>          <e place="id88849"/>
+        </d8884>
+        <d8885>
+          <e place="id88850"/>          <e place="id88851"/>          <e place="id88852"/>          <e place="id88853"/>          <e place="id88854"/>          <e place="id88855"/>          <e place="id88856"/>          <e place="id88857"/>          <e place="id88858"/>          <e place="id88859"/>
+        </d8885>
+        <d8886>
+          <e place="id88860"/>          <e place="id88861"/>          <e place="id88862"/>          <e place="id88863"/>          <e place="id88864"/>          <e place="id88865"/>          <e place="id88866"/>          <e place="id88867"/>          <e place="id88868"/>          <e place="id88869"/>
+        </d8886>
+        <d8887>
+          <e place="id88870"/>          <e place="id88871"/>          <e place="id88872"/>          <e place="id88873"/>          <e place="id88874"/>          <e place="id88875"/>          <e place="id88876"/>          <e place="id88877"/>          <e place="id88878"/>          <e place="id88879"/>
+        </d8887>
+        <d8888>
+          <e place="id88880"/>          <e place="id88881"/>          <e place="id88882"/>          <e place="id88883"/>          <e place="id88884"/>          <e place="id88885"/>          <e place="id88886"/>          <e place="id88887"/>          <e place="id88888"/>          <e place="id88889"/>
+        </d8888>
+        <d8889>
+          <e place="id88890"/>          <e place="id88891"/>          <e place="id88892"/>          <e place="id88893"/>          <e place="id88894"/>          <e place="id88895"/>          <e place="id88896"/>          <e place="id88897"/>          <e place="id88898"/>          <e place="id88899"/>
+        </d8889>
+      </c>
+      <c place="id889">
+        <d8890/>        <d8891/>        <d8892/>        <d8893/>        <d8894/>        <d8895/>        <d8896/>        <d8897/>        <d8898/>        <d8899/>
+      </c>
+    </b88>
+    <b89>
+      <c place="id890"/>      <c place="id891"/>      <c place="id892"/>      <c place="id893"/>      <c place="id894"/>      <c place="id895"/>      <c place="id896"/>      <c place="id897"/>      <c place="id898"/>      <c place="id899"/>
+    </b89>
+  </a>
+  <a place="id9">
+    <b90/>
+    <b91/>
+    <b92/>
+    <b93/>
+    <b94/>
+    <b95/>
+    <b96/>
+    <b97/>
+    <b98/>
+    <b99/>
+  </a>
+</doc>
\ No newline at end of file
diff --git a/test/tests/perf/xtestdata/words-repeat.xml b/test/tests/perf/xtestdata/words-repeat.xml
new file mode 100644
index 0000000..ad17159
--- /dev/null
+++ b/test/tests/perf/xtestdata/words-repeat.xml
@@ -0,0 +1,9939 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>to</item>
+<item>recognize</item>
+<item>defined</item>
+<item>elements</item>
+<item>specified</item>
+<item>document</item>
+<item>prefix</item>
+<item>recognized</item>
+<item>URI</item>
+<item>preFIX</item>
+<item>it</item>
+<item>To</item>
+<item>build</item>
+<item>health</item>
+<item>of</item>
+<item>spirit</item>
+<item>mind</item>
+<item>and</item>
+<item>body</item>
+<item>based</item>
+<item>highest</item>
+<item>ideals</item>
+<item>heritage</item>
+<item>improve</item>
+<item>quality</item>
+<item>life</item>
+<item>children</item>
+<item>families</item>
+<item>communities</item>
+<item>cities</item>
+<item>town</item>
+<item>greater</item>
+<item>Boston</item>
+<item>never</item>
+<item>too</item>
+<item>late</item>
+<item>learn</item>
+<item>Become</item>
+<item>confident</item>
+<item>water</item>
+<item>start</item>
+<item>learning</item>
+<item>basics</item>
+<item>swimming</item>
+<item>developing</item>
+<item>strokes</item>
+<item>instruction</item>
+<item>development</item>
+<item>participate</item>
+<item>organized</item>
+<item>workout</item>
+<item>designed</item>
+<item>improve</item>
+<item>fitness</item>
+<item>personal</item>
+<item>goals</item>
+<item>work</item>
+<item>strikes</item>
+<item>tuesday</item>
+<item>wednesday</item>
+<item>masters</item>
+<item>swim</item>
+<item>safe</item>
+<item>effective</item>
+<item>way</item>
+<item>move</item>
+<item>body</item>
+<item>get</item>
+<item>into</item>
+<item>shape</item>
+<item>fees</item>
+<item>members</item>
+<item>nonmembers</item>
+<item>drop-in</item>
+<item>residential</item>
+<item>exemption</item>
+<item>Assessing</item>
+<item>department</item>
+<item>ward</item>
+<item>parcel</item>
+<item>name</item>
+<item>street</item>
+<item>address</item>
+<item>property</item>
+<item>upon</item>
+<item>which</item>
+<item>claim</item>
+<item>zip</item>
+<item>code</item>
+<item>class</item>
+<item>telephone</item>
+<item>day</item>
+<item>social</item>
+<item>security</item>
+<item>required</item>
+<item>refund</item>
+<item>chapteR</item>
+<item>General</item>
+<item>LAWS</item>
+<item>allows</item>
+<item>attach</item>
+<item>proof</item>
+<item>months</item>
+<item>mezzanine</item>
+<item>important</item>
+<item>taxpayer</item>
+<item>below</item>
+<item>above</item>
+<item>acceptable</item>
+<item>room</item>
+<item>track</item>
+<item>mayor</item>
+<item>immigrants</item>
+<item>refugees</item>
+<item>pool</item>
+<item>fully</item>
+<item>paRTIcipate</item>
+<item>CITY</item>
+<item>BOSTON</item>
+<item>find</item>
+<item>interpreter</item>
+<item>Bostonian</item>
+<item>loCated</item>
+<item>Hall</item>
+<item>Office</item>
+<item>Because</item>
+<item>Form</item>
+<item>owner's</item>
+<item>Helping</item>
+<item>buyER</item>
+<item>Cash</item>
+<item>After</item>
+<item>third</item>
+<item>floor</item>
+<item>box</item>
+<item>adjacent</item>
+<item>mail</item>
+<item>unpaid</item>
+<item>TAxes</item>
+<item>prior</item>
+<item>collector</item>
+<item>convenience</item>
+<item>enough</item>
+<item>TIme</item>
+<item>deputy</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>XSLT</item>
+<item>processors</item>
+<item>must</item>
+<item>use</item>
+<item>XML</item>
+<item>Namespaces</item>
+<item>mechanism</item>
+<item>mechanism</item>
+<item>XML</item>
+</doc>
\ No newline at end of file
diff --git a/test/tests/xsltc/attribset/attribset15.xml b/test/tests/xsltc/attribset/attribset15.xml
new file mode 100644
index 0000000..4e670aa
--- /dev/null
+++ b/test/tests/xsltc/attribset/attribset15.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+<First at="Att1"/>
+<Second at="ped:Att2"/>
+<Third at="xyz:Att3"/>
+<Fourth at="xmlns"/>
+</doc>
\ No newline at end of file
diff --git a/test/tests/xsltc/attribset/attribset15.xsl b/test/tests/xsltc/attribset/attribset15.xsl
new file mode 100644
index 0000000..eb95454
--- /dev/null
+++ b/test/tests/xsltc/attribset/attribset15.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:ped="http://ped.test.com">
+
+  <!-- FileName: attribset15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Discretionary: name="attribute-name-not-QName" choice="ignore" -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: The name attribute is interpreted as an attribute value template.
+       It is an error if the value of the AVT is not a QNAME or the string "xmlns".
+       (Last two xsl:attributes test this)  -->
+
+<xsl:template match="/">
+  <out xmlns:this="http://www.this.com">
+  	<xsl:attribute name="{doc/First/@at}">First</xsl:attribute>
+  	<xsl:attribute name="{doc/Second/@at}">Second</xsl:attribute>
+  	<xsl:attribute name="{doc/Third/@at}">Third</xsl:attribute>
+  	<xsl:attribute name="xmlns">xmlns</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/xsltc/attribset/attribset1_ok.xsl b/test/tests/xsltc/attribset/attribset1_ok.xsl
new file mode 100644
index 0000000..5bfabdd
--- /dev/null
+++ b/test/tests/xsltc/attribset/attribset1_ok.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="http://ped.test.com">
+
+<xsl:template match="/">
+  <out xmlns:this="http://www.this.com">
+     <xsl:attribute name="{doc/First/@at}">First</xsl:attribute>
+     <xsl:attribute name="{doc/Second/@at}">Second</xsl:attribute>
+     <xsl:attribute name="{doc/Third/@at}">Third</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/xsltc/attribset/attribset23.xml b/test/tests/xsltc/attribset/attribset23.xml
new file mode 100644
index 0000000..bb54b12
--- /dev/null
+++ b/test/tests/xsltc/attribset/attribset23.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/test/tests/xsltc/attribset/attribset23.xsl b/test/tests/xsltc/attribset/attribset23.xsl
new file mode 100644
index 0000000..277e05d
--- /dev/null
+++ b/test/tests/xsltc/attribset/attribset23.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: XSLT processors may make use of the prefix of the QNAME specified
+       in the name attribute ... however they are not required to do so and, if 
+       the prefix is xmlns, they must not do so ... this will not result in a 
+       namespace declaration being output. -->
+
+<xsl:template match="/">
+ <root>
+  <Out>
+	<xsl:attribute name="xmlns:xsl" namespace="whatever">http://www.w3.org/1999/XSL/Transform</xsl:attribute>
+  </Out>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * Licensed to the Apache Software Foundation (ASF) under one
+   * or more contributor license agreements. See the NOTICE file
+   * distributed with this work for additional information
+   * regarding copyright ownership. The ASF licenses this file
+   * to you 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/test/tests/xsltc/attribset/expected_test_results.xml b/test/tests/xsltc/attribset/expected_test_results.xml
new file mode 100644
index 0000000..a5b8fd9
--- /dev/null
+++ b/test/tests/xsltc/attribset/expected_test_results.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<expectedResults>
+   <file name="attribset1_ok.xsl">
+     <compileError>false</compileError>
+     <expected>pass</expected>
+   </file>
+   <file name="attribset15.xsl">
+     <compileError>true</compileError>
+     <expected>pass</expected>
+   </file>
+   <file name="attribset23.xsl">
+     <compileError>true</compileError>
+     <expected>pass</expected>
+   </file>   
+</expectedResults>
\ No newline at end of file
diff --git a/test/tools/jtidy-1.0.3.jar b/test/tools/jtidy-1.0.3.jar
new file mode 100644
index 0000000..d5f9fdd
--- /dev/null
+++ b/test/tools/jtidy-1.0.3.jar
Binary files differ
diff --git a/test/tools/jtidy.LICENSE.txt b/test/tools/jtidy.LICENSE.txt
new file mode 100644
index 0000000..84e366b
--- /dev/null
+++ b/test/tools/jtidy.LICENSE.txt
@@ -0,0 +1,49 @@
+  Java HTML Tidy - JTidy
+  HTML parser and pretty printer
+
+  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+  Institute of Technology, Institut National de Recherche en
+  Informatique et en Automatique, Keio University). All Rights
+  Reserved.
+
+  Contributing Author(s):
+
+     Dave Raggett <dsr@w3.org>
+     Andy Quick <ac.quick@sympatico.ca> (translation to Java)
+     Gary L Peskin <garyp@firstech.com> (Java development)
+     Sami Lempinen <sami@lempinen.net>  (release management)
+
+  The contributing author(s) would like to thank all those who
+  helped with testing, bug fixes, and patience.  This wouldn't
+  have been possible without all of you.
+
+  COPYRIGHT NOTICE:
+ 
+  This software and documentation is provided "as is," and
+  the copyright holders and contributing author(s) make no
+  representations or warranties, express or implied, including
+  but not limited to, warranties of merchantability or fitness
+  for any particular purpose or that the use of the software or
+  documentation will not infringe any third party patents,
+  copyrights, trademarks or other rights. 
+
+  The copyright holders and contributing author(s) will not be
+  liable for any direct, indirect, special or consequential damages
+  arising out of any use of the software or documentation, even if
+  advised of the possibility of such damage.
+
+  Permission is hereby granted to use, copy, modify, and distribute
+  this source code, or portions hereof, documentation and executables,
+  for any purpose, without fee, subject to the following restrictions:
+
+  1. The origin of this source code must not be misrepresented.
+  2. Altered versions must be plainly marked as such and must
+     not be misrepresented as being the original source.
+  3. This Copyright notice may not be removed or altered from any
+     source or altered source distribution.
+ 
+  The copyright holders and contributing author(s) specifically
+  permit, without fee, and encourage the use of this source code
+  as a component for supporting the Hypertext Markup Language in
+  commercial products. If you use this source code in a product,
+  acknowledgment is not required but would be appreciated.
diff --git a/test/tools/jtidy.README.txt b/test/tools/jtidy.README.txt
new file mode 100644
index 0000000..a80ac3e
--- /dev/null
+++ b/test/tools/jtidy.README.txt
@@ -0,0 +1,6 @@
+Tidy Jar -  Java version of a HTML syntax checker and pretty printer
+
+Sourced From   :   https://github.com/jtidy/jtidy	
+Used By        :   XalanJ tests 
+
+See jtidy.LICENSE.txt and web site for further information
diff --git a/test/trace-src/org/apache/xalan/trace/EndSelectionEvent.java b/test/trace-src/org/apache/xalan/trace/EndSelectionEvent.java
new file mode 100644
index 0000000..a4cf96a
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/EndSelectionEvent.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.transformer.TransformerImpl;
+import org.apache.xpath.XPath;
+import org.apache.xpath.objects.XObject;
+
+import org.w3c.dom.Node;
+
+/**
+ * Event triggered by completion of a xsl:for-each selection or a 
+ * xsl:apply-templates selection.
+ * @xsl.usage advanced
+ */
+public class EndSelectionEvent extends SelectionEvent
+{
+
+  /**
+   * Create an EndSelectionEvent.
+   * 
+   * @param processor The XSLT TransformerFactory.
+   * @param sourceNode The current context node.
+   * @param styleNode node in the style tree reference for the event.
+   * Should not be null.  That is not enforced.
+   * @param attributeName The attribute name from which the selection is made.
+   * @param xpath The XPath that executed the selection.
+   * @param selection The result of the selection.
+   */
+  public EndSelectionEvent(TransformerImpl processor, Node sourceNode,
+                        ElemTemplateElement styleNode, String attributeName,
+                        XPath xpath, XObject selection)
+  {
+
+    super(processor, sourceNode, styleNode, attributeName, xpath, selection);
+  }
+}
diff --git a/test/trace-src/org/apache/xalan/trace/ExtensionEvent.java b/test/trace-src/org/apache/xalan/trace/ExtensionEvent.java
new file mode 100755
index 0000000..b1b6241
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/ExtensionEvent.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+ 
+package org.apache.xalan.trace;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import org.apache.xalan.transformer.TransformerImpl;
+
+/**
+ * An event representing an extension call.
+ */
+public class ExtensionEvent {
+
+	public static final int DEFAULT_CONSTRUCTOR = 0;
+	public static final int METHOD = 1;
+	public static final int CONSTRUCTOR = 2;
+	
+	public final int m_callType; 
+	public final TransformerImpl m_transformer;
+	public final Object m_method;
+	public final Object m_instance;
+	public final Object[] m_arguments;
+	
+	
+	public ExtensionEvent(TransformerImpl transformer, Method method, Object instance, Object[] arguments) {
+		m_transformer = transformer;
+		m_method = method;
+		m_instance = instance;
+		m_arguments = arguments;
+		m_callType = METHOD;
+	}		
+
+	public ExtensionEvent(TransformerImpl transformer, Constructor constructor, Object[] arguments) {
+		m_transformer = transformer;
+		m_instance = null;		
+		m_arguments = arguments;
+		m_method = constructor;
+		m_callType = CONSTRUCTOR;		
+	}
+
+	public ExtensionEvent(TransformerImpl transformer, Class clazz) {
+		m_transformer = transformer;
+		m_instance = null;
+		m_arguments = null;
+		m_method = clazz;
+		m_callType = DEFAULT_CONSTRUCTOR;
+	}
+
+}
+
diff --git a/test/trace-src/org/apache/xalan/trace/GenerateEvent.java b/test/trace-src/org/apache/xalan/trace/GenerateEvent.java
new file mode 100644
index 0000000..3f1b87f
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/GenerateEvent.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+import org.apache.xalan.transformer.TransformerImpl;
+import org.xml.sax.Attributes;
+
+/**
+ * Event generated by the XSL processor after it generates a new node in the result tree.
+ * This event responds to and is modeled on the SAX events that are sent to the
+ * formatter listener FormatterToXXX)classes.
+ *
+ * @see org.apache.xml.utils.DOMBuilder
+ * @see org.apache.xml.serializer.ToHTMLStream
+ * @see org.apache.xml.serializer.ToTextStream
+ * @see org.apache.xml.serializer.ToXMLStream
+ *
+ * @xsl.usage advanced
+ */
+public class GenerateEvent implements java.util.EventListener
+{
+
+  /**
+   * The XSLT Transformer, which either directly or indirectly contains most needed information.
+   *
+   * @see org.apache.xalan.transformer.TransformerImpl
+   */
+  public TransformerImpl m_processor;
+
+  /**
+   * The type of SAX event that was generated, as enumerated in the EVENTTYPE_XXX constants below.
+   */
+  public int m_eventtype;
+
+
+  /**
+   * Character data from a character or cdata event.
+   */
+  public char m_characters[];
+
+  /**
+   * The start position of the current data in m_characters.
+   */
+  public int m_start;
+
+  /**
+   * The length of the current data in m_characters.
+   */
+  public int m_length;
+
+  /**
+   * The name of the element or PI.
+   */
+  public String m_name;
+
+  /**
+   * The string data in the element (comments and PIs).
+   */
+  public String m_data;
+
+  /**
+   * The current attribute list.
+   */
+  public Attributes m_atts;
+
+  /**
+   * Constructor for startDocument, endDocument events.
+   *
+   * @param processor The XSLT TransformerFactory instance.
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   */
+  public GenerateEvent(TransformerImpl processor, int eventType)
+  {
+    m_processor = processor;
+    m_eventtype = eventType;
+  }
+
+  /**
+   * Constructor for startElement, endElement events.
+   *
+   * @param processor The XSLT TransformerFactory Instance.
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   * @param name The name of the element.
+   * @param atts The SAX attribute list.
+   */
+  public GenerateEvent(TransformerImpl processor, int eventType, String name,
+                       Attributes atts)
+  {
+
+    m_name = name;
+    m_atts = atts;
+    m_processor = processor;
+    m_eventtype = eventType;
+  }
+
+  /**
+   * Constructor for characters, cdate events.
+   *
+   * @param processor The XSLT TransformerFactory instance.
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   * @param ch The char array from the SAX event.
+   * @param start The start offset to be used in the char array.
+   * @param length The end offset to be used in the chara array.
+   */
+  public GenerateEvent(TransformerImpl processor, int eventType, char ch[],
+                       int start, int length)
+  {
+
+    m_characters = ch;
+    m_start = start;
+    m_length = length;
+    m_processor = processor;
+    m_eventtype = eventType;
+  }
+
+  /**
+   * Constructor for processingInstruction events.
+   *
+   * @param processor The instance of the XSLT processor.
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   * @param name The name of the processing instruction.
+   * @param data The processing instruction data.
+   */
+  public GenerateEvent(TransformerImpl processor, int eventType, String name,
+                       String data)
+  {
+
+    m_name = name;
+    m_data = data;
+    m_processor = processor;
+    m_eventtype = eventType;
+  }
+
+  /**
+   * Constructor for comment and entity ref events.
+   *
+   * @param processor The XSLT processor instance.
+   * @param eventType One of the EVENTTYPE_XXX constants.
+   * @param data The comment or entity ref data.
+   */
+  public GenerateEvent(TransformerImpl processor, int eventType, String data)
+  {
+
+    m_data = data;
+    m_processor = processor;
+    m_eventtype = eventType;
+  }
+}
diff --git a/test/trace-src/org/apache/xalan/trace/PrintTraceListener.java b/test/trace-src/org/apache/xalan/trace/PrintTraceListener.java
new file mode 100644
index 0000000..0e7872e
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/PrintTraceListener.java
@@ -0,0 +1,400 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import javax.xml.transform.SourceLocator;
+
+import org.apache.xalan.templates.Constants;
+import org.apache.xalan.templates.ElemTemplate;
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.templates.ElemTextLiteral;
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.ref.DTMNodeProxy;
+import org.apache.xml.serializer.SerializerTrace;
+
+import org.w3c.dom.Node;
+
+/**
+ * Implementation of the TraceListener interface that
+ * prints each event to standard out as it occurs.
+ *
+ * @see org.apache.xalan.trace.TracerEvent
+ * @xsl.usage advanced
+ */
+public class PrintTraceListener implements TraceListenerEx3
+{
+
+  /**
+   * Construct a trace listener.
+   *
+   * @param pw PrintWriter to use for tracing events
+   */
+  public PrintTraceListener(java.io.PrintWriter pw)
+  {
+    m_pw = pw;
+  }
+
+  /**
+   * The print writer where the events should be written.
+   */
+  java.io.PrintWriter m_pw;
+
+  /**
+   * This needs to be set to true if the listener is to print an event whenever a template is invoked.
+   */
+  public boolean m_traceTemplates = false;
+
+  /**
+   * Set to true if the listener is to print events that occur as each node is 'executed' in the stylesheet.
+   */
+  public boolean m_traceElements = false;
+
+  /**
+   * Set to true if the listener is to print information after each result-tree generation event.
+   */
+  public boolean m_traceGeneration = false;
+
+  /**
+   * Set to true if the listener is to print information after each selection event.
+   */
+  public boolean m_traceSelection = false;
+
+  /**
+   * Set to true if the listener is to print information after each extension event.
+   */
+  public boolean m_traceExtension = false;
+
+  /**
+   * Print information about a TracerEvent.
+   *
+   * @param ev the trace event.
+   */
+  public void _trace(TracerEvent ev)
+  {
+
+    switch (ev.m_styleNode.getXSLToken())
+    {
+    case Constants.ELEMNAME_TEXTLITERALRESULT :
+      if (m_traceElements)
+      {
+        m_pw.print(ev.m_styleNode.getSystemId()+ " Line #" + ev.m_styleNode.getLineNumber() + ", "
+                   + "Column #" + ev.m_styleNode.getColumnNumber() + " -- "
+                   + ev.m_styleNode.getNodeName() + ": ");
+
+        ElemTextLiteral etl = (ElemTextLiteral) ev.m_styleNode;
+        String chars = new String(etl.getChars(), 0, etl.getChars().length);
+
+        m_pw.println("    " + chars.trim());
+      }
+      break;
+    case Constants.ELEMNAME_TEMPLATE :
+      if (m_traceTemplates || m_traceElements)
+      {
+        ElemTemplate et = (ElemTemplate) ev.m_styleNode;
+
+        m_pw.print(et.getSystemId()+ " Line #" + et.getLineNumber() + ", " + "Column #"
+                   + et.getColumnNumber() + ": " + et.getNodeName() + " ");
+
+        if (null != et.getMatch())
+        {
+          m_pw.print("match='" + et.getMatch().getPatternString() + "' ");
+        }
+
+        if (null != et.getName())
+        {
+          m_pw.print("name='" + et.getName() + "' ");
+        }
+
+        m_pw.println();
+      }
+      break;
+    default :
+      if (m_traceElements)
+      {
+        m_pw.println(ev.m_styleNode.getSystemId()+ " Line #" + ev.m_styleNode.getLineNumber() + ", "
+                     + "Column #" + ev.m_styleNode.getColumnNumber() + ": "
+                     + ev.m_styleNode.getNodeName());
+      }
+    }
+  }
+  
+  int m_indent = 0;
+  
+  /**
+   * Print information about a TracerEvent.
+   *
+   * @param ev the trace event.
+   */
+  public void trace(TracerEvent ev)
+  {
+//  	m_traceElements = true;
+//  	m_traceTemplates = true;
+//  	
+//  	for(int i = 0; i < m_indent; i++)
+//  		m_pw.print(" ");
+//    m_indent = m_indent+2;
+//  	m_pw.print("trace: ");
+	_trace(ev);
+  }
+  
+  /**
+   * Method that is called when the end of a trace event occurs.
+   * The method is blocking.  It must return before processing continues.
+   *
+   * @param ev the trace event.
+   */
+  public void traceEnd(TracerEvent ev)
+  {
+//  	m_traceElements = true;
+//  	m_traceTemplates = true;
+//  	
+//  	m_indent = m_indent-2;
+//  	for(int i = 0; i < m_indent; i++)
+//  		m_pw.print(" ");
+//  	m_pw.print("etrac: ");
+//	_trace(ev);
+  }
+
+
+  /**
+   * Method that is called just after a select attribute has been evaluated.
+   *
+   * @param ev the generate event.
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+public void selected(SelectionEvent ev)
+    throws javax.xml.transform.TransformerException {
+
+    if (m_traceSelection) {
+        ElemTemplateElement ete = (ElemTemplateElement) ev.m_styleNode;
+        Node sourceNode = ev.m_sourceNode;
+
+        SourceLocator locator = null;
+        if (sourceNode instanceof DTMNodeProxy) {
+            int nodeHandler = ((DTMNodeProxy) sourceNode).getDTMNodeNumber();
+            locator =
+                ((DTMNodeProxy) sourceNode).getDTM().getSourceLocatorFor(
+                    nodeHandler);
+        }
+
+        if (locator != null)
+            m_pw.println(
+                "Selected source node '"
+                    + sourceNode.getNodeName()
+                    + "', at "
+                    + locator);
+        else
+            m_pw.println(
+                "Selected source node '" + sourceNode.getNodeName() + "'");
+
+        if (ev.m_styleNode.getLineNumber() == 0) {
+
+            // You may not have line numbers if the selection is occuring from a
+            // default template.
+            ElemTemplateElement parent =
+                (ElemTemplateElement) ete.getParentElem();
+
+            if (parent == ete.getStylesheetRoot().getDefaultRootRule()) {
+                m_pw.print("(default root rule) ");
+            } else if (
+                parent == ete.getStylesheetRoot().getDefaultTextRule()) {
+                m_pw.print("(default text rule) ");
+            } else if (parent == ete.getStylesheetRoot().getDefaultRule()) {
+                m_pw.print("(default rule) ");
+            }
+
+            m_pw.print(
+                ete.getNodeName()
+                    + ", "
+                    + ev.m_attributeName
+                    + "='"
+                    + ev.m_xpath.getPatternString()
+                    + "': ");
+        } else {
+            m_pw.print(
+                ev.m_styleNode.getSystemId()
+                    + " Line #"
+                    + ev.m_styleNode.getLineNumber()
+                    + ", "
+                    + "Column #"
+                    + ev.m_styleNode.getColumnNumber()
+                    + ": "
+                    + ete.getNodeName()
+                    + ", "
+                    + ev.m_attributeName
+                    + "='"
+                    + ev.m_xpath.getPatternString()
+                    + "': ");
+        }
+
+        if (ev.m_selection.getType() == ev.m_selection.CLASS_NODESET) {
+            m_pw.println();
+
+            org.apache.xml.dtm.DTMIterator nl = ev.m_selection.iter();
+            
+            // The following lines are added to fix bug#16222.
+            // The main cause is that the following loop change the state of iterator, which is shared
+            // with the transformer. The fix is that we record the initial state before looping, then 
+            // restore the state when we finish it, which is done in the following lines added.
+            int currentPos = DTM.NULL;
+            currentPos = nl.getCurrentPos();
+            nl.setShouldCacheNodes(true); // This MUST be done before we clone the iterator!
+            org.apache.xml.dtm.DTMIterator clone = null;
+            // End of block
+            
+            try {
+                clone = nl.cloneWithReset();
+            } catch (CloneNotSupportedException cnse) {
+                m_pw.println(
+                    "     [Can't trace nodelist because it it threw a CloneNotSupportedException]");
+                return;
+            }
+            int pos = clone.nextNode();
+
+            if (DTM.NULL == pos) {
+                m_pw.println("     [empty node list]");
+            } else {
+                while (DTM.NULL != pos) {
+                    // m_pw.println("     " + ev.m_processor.getXPathContext().getDTM(pos).getNode(pos));
+                    DTM dtm = ev.m_processor.getXPathContext().getDTM(pos);
+                    m_pw.print("     ");
+                    m_pw.print(Integer.toHexString(pos));
+                    m_pw.print(": ");
+                    m_pw.println(dtm.getNodeName(pos));
+                    pos = clone.nextNode();
+                }
+            }
+			
+            // Restore the initial state of the iterator, part of fix for bug#16222.
+            nl.runTo(-1);
+            nl.setCurrentPos(currentPos);
+        	// End of fix for bug#16222
+			
+        } else {
+            m_pw.println(ev.m_selection.str());
+        }
+    }
+}
+  /**
+   * Method that is called after an xsl:apply-templates or xsl:for-each 
+   * selection occurs.
+   *
+   * @param ev the generate event.
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+  public void selectEnd(EndSelectionEvent ev) 
+     throws javax.xml.transform.TransformerException
+  {
+  	// Nothing for right now.
+  }
+
+
+  /**
+   * Print information about a Generate event.
+   *
+   * @param ev the trace event.
+   */
+  public void generated(GenerateEvent ev)
+  {
+
+    if (m_traceGeneration)
+    {
+      switch (ev.m_eventtype)
+      {
+      case SerializerTrace.EVENTTYPE_STARTDOCUMENT :
+        m_pw.println("STARTDOCUMENT");
+        break;
+      case SerializerTrace.EVENTTYPE_ENDDOCUMENT :
+        m_pw.println("ENDDOCUMENT");
+        break;
+      case SerializerTrace.EVENTTYPE_STARTELEMENT :
+        m_pw.println("STARTELEMENT: " + ev.m_name);
+        break;
+      case SerializerTrace.EVENTTYPE_ENDELEMENT :
+        m_pw.println("ENDELEMENT: " + ev.m_name);
+        break;
+      case SerializerTrace.EVENTTYPE_CHARACTERS :
+      {
+        String chars = new String(ev.m_characters, ev.m_start, ev.m_length);
+
+        m_pw.println("CHARACTERS: " + chars);
+      }
+      break;
+      case SerializerTrace.EVENTTYPE_CDATA :
+      {
+        String chars = new String(ev.m_characters, ev.m_start, ev.m_length);
+
+        m_pw.println("CDATA: " + chars);
+      }
+      break;
+      case SerializerTrace.EVENTTYPE_COMMENT :
+        m_pw.println("COMMENT: " + ev.m_data);
+        break;
+      case SerializerTrace.EVENTTYPE_PI :
+        m_pw.println("PI: " + ev.m_name + ", " + ev.m_data);
+        break;
+      case SerializerTrace.EVENTTYPE_ENTITYREF :
+        m_pw.println("ENTITYREF: " + ev.m_name);
+        break;
+      case SerializerTrace.EVENTTYPE_IGNORABLEWHITESPACE :
+        m_pw.println("IGNORABLEWHITESPACE");
+        break;
+      }
+    }
+  }
+
+  /**
+   * Print information about an extension event.
+   *
+   * @param ev the extension event to print information about
+   */
+  public void extension(ExtensionEvent ev) {
+    if (m_traceExtension) {
+      switch (ev.m_callType) {
+        case ExtensionEvent.DEFAULT_CONSTRUCTOR:
+          m_pw.println("EXTENSION: " + ((Class)ev.m_method).getName() + "#<init>");
+          break;
+        case ExtensionEvent.METHOD:
+          m_pw.println("EXTENSION: " + ((Method)ev.m_method).getDeclaringClass().getName() + "#" + ((Method)ev.m_method).getName());
+          break;
+        case ExtensionEvent.CONSTRUCTOR:
+          m_pw.println("EXTENSION: " + ((Constructor)ev.m_method).getDeclaringClass().getName() + "#<init>");
+          break;
+      }
+    }
+  }
+
+
+  /**
+   * Print information about an extension event.
+   *
+   * @param ev the extension event to print information about
+   */
+  public void extensionEnd(ExtensionEvent ev) {
+    // do nothing
+  }
+
+}
diff --git a/test/trace-src/org/apache/xalan/trace/SelectionEvent.java b/test/trace-src/org/apache/xalan/trace/SelectionEvent.java
new file mode 100644
index 0000000..3e59e2c
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/SelectionEvent.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.transformer.TransformerImpl;
+import org.apache.xpath.XPath;
+import org.apache.xpath.objects.XObject;
+
+import org.w3c.dom.Node;
+
+/**
+ * Event triggered by selection of a node in the style stree.
+ * @xsl.usage advanced
+ */
+public class SelectionEvent implements java.util.EventListener
+{
+
+  /**
+   * The node in the style tree where the event occurs.
+   */
+  public final ElemTemplateElement m_styleNode;
+
+  /**
+   * The XSLT processor instance.
+   */
+  public final TransformerImpl m_processor;
+
+  /**
+   * The current context node.
+   */
+  public final Node m_sourceNode;
+
+  /**
+   * The attribute name from which the selection is made.
+   */
+  public final String m_attributeName;
+
+  /**
+   * The XPath that executed the selection.
+   */
+  public final XPath m_xpath;
+
+  /**
+   * The result of the selection.
+   */
+  public final XObject m_selection;
+
+  /**
+   * Create an event originating at the given node of the style tree.
+   * 
+   * @param processor The XSLT TransformerFactory.
+   * @param sourceNode The current context node.
+   * @param styleNode node in the style tree reference for the event.
+   * Should not be null.  That is not enforced.
+   * @param attributeName The attribute name from which the selection is made.
+   * @param xpath The XPath that executed the selection.
+   * @param selection The result of the selection.
+   */
+  public SelectionEvent(TransformerImpl processor, Node sourceNode,
+                        ElemTemplateElement styleNode, String attributeName,
+                        XPath xpath, XObject selection)
+  {
+
+    this.m_processor = processor;
+    this.m_sourceNode = sourceNode;
+    this.m_styleNode = styleNode;
+    this.m_attributeName = attributeName;
+    this.m_xpath = xpath;
+    this.m_selection = selection;
+  }
+}
diff --git a/test/trace-src/org/apache/xalan/trace/TraceListener.java b/test/trace-src/org/apache/xalan/trace/TraceListener.java
new file mode 100644
index 0000000..f66de54
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/TraceListener.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+
+/**
+ * Interface the XSL processor calls when it matches a source node, selects a set of source nodes,
+ * or generates a result node.
+ * If you want an object instance to be called when a trace event occurs, use the TransformerImpl setTraceListener method.
+ * @see org.apache.xalan.trace.TracerEvent
+ * @see org.apache.xalan.trace.TraceManager#addTraceListener
+ * @xsl.usage advanced
+ */
+public interface TraceListener extends java.util.EventListener
+{
+
+  /**
+   * Method that is called when a trace event occurs.
+   * The method is blocking.  It must return before processing continues.
+   *
+   * @param ev the trace event.
+   */
+  public void trace(TracerEvent ev);
+
+  /**
+   * Method that is called just after the formatter listener is called.
+   *
+   * @param ev the generate event.
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+  public void selected(SelectionEvent ev) throws javax.xml.transform.TransformerException;
+
+  /**
+   * Method that is called just after the formatter listener is called.
+   *
+   * @param ev the generate event.
+   */
+  public void generated(GenerateEvent ev);
+}
diff --git a/test/trace-src/org/apache/xalan/trace/TraceListenerEx.java b/test/trace-src/org/apache/xalan/trace/TraceListenerEx.java
new file mode 100644
index 0000000..b9a3be7
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/TraceListenerEx.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+/**
+ * Extends TraceListener but adds a SelectEnd event.
+ * @xsl.usage advanced
+ */
+public interface TraceListenerEx extends TraceListener
+{
+
+  /**
+   * Method that is called after an xsl:apply-templates or xsl:for-each 
+   * selection occurs.
+   *
+   * @param ev the generate event.
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+  public void selectEnd(EndSelectionEvent ev) throws javax.xml.transform.TransformerException;
+
+}
diff --git a/test/trace-src/org/apache/xalan/trace/TraceListenerEx2.java b/test/trace-src/org/apache/xalan/trace/TraceListenerEx2.java
new file mode 100644
index 0000000..0287a2a
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/TraceListenerEx2.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+/**
+ * Extends TraceListenerEx but adds a EndTrace event.
+ * @xsl.usage advanced
+ */
+public interface TraceListenerEx2 extends TraceListenerEx
+{
+  /**
+   * Method that is called when the end of a trace event occurs.
+   * The method is blocking.  It must return before processing continues.
+   *
+   * @param ev the trace event.
+   */
+  public void traceEnd(TracerEvent ev);
+}
diff --git a/test/trace-src/org/apache/xalan/trace/TraceListenerEx3.java b/test/trace-src/org/apache/xalan/trace/TraceListenerEx3.java
new file mode 100755
index 0000000..cdd602b
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/TraceListenerEx3.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+ 
+package org.apache.xalan.trace;
+
+/**
+ * Extends TraceListenerEx2 but adds extensions trace events.
+ * @xsl.usage advanced
+ */
+public interface TraceListenerEx3 extends TraceListenerEx2 {
+
+	/**
+	 * Method that is called when an extension event occurs.
+	 * The method is blocking.  It must return before processing continues.
+	 *
+	 * @param ee the extension event.
+	 */
+	public void extension(ExtensionEvent ee);
+
+	/**
+	 * Method that is called when the end of an extension event occurs.
+	 * The method is blocking.  It must return before processing continues.
+	 *
+	 * @param ee the extension event.
+	 */
+	public void extensionEnd(ExtensionEvent ee);
+
+}
+
diff --git a/test/trace-src/org/apache/xalan/trace/TraceManager.java b/test/trace-src/org/apache/xalan/trace/TraceManager.java
new file mode 100644
index 0000000..8699487
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/TraceManager.java
@@ -0,0 +1,427 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+import java.lang.reflect.Method;
+import java.util.TooManyListenersException;
+import java.util.Vector;
+
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.transformer.TransformerImpl;
+import org.apache.xpath.XPath;
+import org.apache.xpath.objects.XObject;
+import org.w3c.dom.Node;
+
+/**
+ * This class manages trace listeners, and acts as an
+ * interface for the tracing functionality in Xalan.
+ */
+public class TraceManager
+{
+
+  /** A transformer instance */
+  private TransformerImpl m_transformer;
+
+  /**
+   * Constructor for the trace manager.
+   *
+   * @param transformer a non-null instance of a transformer
+   */
+  public TraceManager(TransformerImpl transformer)
+  {
+    m_transformer = transformer;
+  }
+
+  /**
+   * List of listeners who are interested in tracing what's
+   * being generated.
+   */
+  private Vector m_traceListeners = null;
+
+  /**
+   * Add a trace listener for the purposes of debugging and diagnosis.
+   * @param tl Trace listener to be added.
+   *
+   * @throws TooManyListenersException
+   */
+  public void addTraceListener(TraceListener tl)
+          throws TooManyListenersException
+  {
+
+    m_transformer.setDebug(true);
+
+    if (null == m_traceListeners)
+      m_traceListeners = new Vector();
+
+    m_traceListeners.addElement(tl);
+  }
+
+  /**
+   * Remove a trace listener.
+   * @param tl Trace listener to be removed.
+   */
+  public void removeTraceListener(TraceListener tl)
+  {
+
+    if (null != m_traceListeners)
+    {
+      m_traceListeners.removeElement(tl);
+      
+      // The following line added to fix the bug#5140: hasTraceListeners() returns true
+      // after adding and removing a listener.
+      // Check: if m_traceListeners is empty, then set it to NULL.
+      if (0 == m_traceListeners.size()) m_traceListeners = null;
+    }
+  }
+
+  /**
+   * Fire a generate event.
+   *
+   * @param te Generate Event to fire
+   */
+  public void fireGenerateEvent(GenerateEvent te)
+  {
+
+    if (null != m_traceListeners)
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+
+        tl.generated(te);
+      }
+    }
+  }
+
+  /**
+   * Tell if trace listeners are present.
+   *
+   * @return True if there are trace listeners
+   */
+  public boolean hasTraceListeners()
+  {
+    return (null != m_traceListeners);
+  }
+
+  /**
+   * Fire a trace event.
+   *
+   * @param styleNode Stylesheet template node
+   */
+  public void fireTraceEvent(ElemTemplateElement styleNode)
+  {
+
+    if (hasTraceListeners())
+    {
+      int sourceNode = m_transformer.getXPathContext().getCurrentNode();
+      Node source = getDOMNodeFromDTM(sourceNode);
+
+      fireTraceEvent(new TracerEvent(m_transformer, source, 
+                     m_transformer.getMode(),  /*sourceNode, mode,*/
+                                     styleNode));
+    }
+  }
+
+  /**
+   * Fire a end trace event, after all children of an element have been
+   * executed.
+   *
+   * @param styleNode Stylesheet template node
+   */
+  public void fireTraceEndEvent(ElemTemplateElement styleNode)
+  {
+
+    if (hasTraceListeners())
+    {
+      int sourceNode = m_transformer.getXPathContext().getCurrentNode();
+      Node source = getDOMNodeFromDTM(sourceNode);
+
+      fireTraceEndEvent(new TracerEvent(m_transformer, source,
+                     m_transformer.getMode(),  /*sourceNode, mode,*/
+                                     styleNode));
+    }
+  }
+
+  /**
+   * Fire a trace event.
+   *
+   * @param te Trace event to fire
+   */
+  public void fireTraceEndEvent(TracerEvent te)
+  {
+
+    if (hasTraceListeners())
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+        if(tl instanceof TraceListenerEx2)
+        {
+          ((TraceListenerEx2)tl).traceEnd(te);
+        }
+      }
+    }
+  }
+
+
+
+  /**
+   * Fire a trace event.
+   *
+   * @param te Trace event to fire
+   */
+  public void fireTraceEvent(TracerEvent te)
+  {
+
+    if (hasTraceListeners())
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+
+        tl.trace(te);
+      }
+    }
+  }
+
+  /**
+   * Fire a selection event.
+   *
+   * @param sourceNode Current source node
+   * @param styleNode node in the style tree reference for the event.
+   * @param attributeName The attribute name from which the selection is made.
+   * @param xpath The XPath that executed the selection.
+   * @param selection The result of the selection.
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+  public void fireSelectedEvent(
+          int sourceNode, ElemTemplateElement styleNode, String attributeName, 
+          XPath xpath, XObject selection)
+            throws javax.xml.transform.TransformerException
+  {
+
+    if (hasTraceListeners())
+    {
+      Node source = getDOMNodeFromDTM(sourceNode);
+        
+      fireSelectedEvent(new SelectionEvent(m_transformer, source, styleNode,
+                                           attributeName, xpath, selection));
+    }
+  }
+  
+  /**
+   * Fire a selection event.
+   *
+   * @param sourceNode Current source node
+   * @param styleNode node in the style tree reference for the event.
+   * @param attributeName The attribute name from which the selection is made.
+   * @param xpath The XPath that executed the selection.
+   * @param selection The result of the selection.
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+  public void fireSelectedEndEvent(
+          int sourceNode, ElemTemplateElement styleNode, String attributeName, 
+          XPath xpath, XObject selection)
+            throws javax.xml.transform.TransformerException
+  {
+
+    if (hasTraceListeners())
+    {
+      Node source = getDOMNodeFromDTM(sourceNode);
+        
+      fireSelectedEndEvent(new EndSelectionEvent(m_transformer, source, styleNode,
+                                           attributeName, xpath, selection));
+    }
+  }
+  
+  /**
+   * Fire a selection event.
+   *
+   * @param se Selection event to fire
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+  public void fireSelectedEndEvent(EndSelectionEvent se)
+          throws javax.xml.transform.TransformerException
+  {
+
+    if (hasTraceListeners())
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+
+        if(tl instanceof TraceListenerEx)
+          ((TraceListenerEx)tl).selectEnd(se);
+      }
+    }
+  }
+
+  /**
+   * Fire a selection event.
+   *
+   * @param se Selection event to fire
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+  public void fireSelectedEvent(SelectionEvent se)
+          throws javax.xml.transform.TransformerException
+  {
+
+    if (hasTraceListeners())
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+
+        tl.selected(se);
+      }
+    }
+  }
+  
+
+  /**
+   * Fire an end extension event.
+   *
+   * @see java.lang.reflect.Method#invoke
+   * 
+   * @param method The java method about to be executed
+   * @param instance The instance the method will be executed on
+   * @param arguments Parameters passed to the method.
+   */
+  public void fireExtensionEndEvent(Method method, Object instance, Object[] arguments)
+  {
+      ExtensionEvent ee = new ExtensionEvent(m_transformer, method, instance, arguments);
+
+    if (hasTraceListeners())
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+        if(tl instanceof TraceListenerEx3)
+        {
+          ((TraceListenerEx3)tl).extensionEnd(ee);
+        }
+      }
+    }
+  }
+
+  /**
+   * Fire an end extension event.
+   *
+   * @see java.lang.reflect.Method#invoke
+   * 
+   * @param method The java method about to be executed
+   * @param instance The instance the method will be executed on
+   * @param arguments Parameters passed to the method.
+   */
+  public void fireExtensionEvent(Method method, Object instance, Object[] arguments)
+  {
+    ExtensionEvent ee = new ExtensionEvent(m_transformer, method, instance, arguments);
+
+    if (hasTraceListeners())
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+        if(tl instanceof TraceListenerEx3)
+        {
+          ((TraceListenerEx3)tl).extension(ee);
+        }
+      }
+    }
+  }
+
+  /**
+   * Fire an end extension event.
+   *
+   * @see java.lang.reflect.Method#invoke
+   * 
+   * @param ee the ExtensionEvent to fire
+   */
+  public void fireExtensionEndEvent(ExtensionEvent ee)
+  {
+    if (hasTraceListeners())
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+        if(tl instanceof TraceListenerEx3)
+        {
+          ((TraceListenerEx3)tl).extensionEnd(ee);
+        }
+      }
+    }
+  }
+
+  /**
+   * Fire an end extension event.
+   *
+   * @see java.lang.reflect.Method#invoke
+   * 
+   * @param ee the ExtensionEvent to fire
+   */
+  public void fireExtensionEvent(ExtensionEvent ee)
+  {    
+      
+    if (hasTraceListeners())
+    {
+      int nListeners = m_traceListeners.size();
+
+      for (int i = 0; i < nListeners; i++)
+      {
+        TraceListener tl = (TraceListener) m_traceListeners.elementAt(i);
+        if(tl instanceof TraceListenerEx3)
+        {
+          ((TraceListenerEx3)tl).extension(ee);
+        }
+      }
+    }
+  }
+  
+  /**
+   * Get the DOM Node of the current XPath context, which is possibly null.
+   * @param sourceNode the handle on the node used by a DTM.
+   */
+  private Node getDOMNodeFromDTM(int sourceNode) {
+    org.apache.xml.dtm.DTM dtm = m_transformer.getXPathContext().getDTM(sourceNode);
+    final Node source = (dtm == null) ? null : dtm.getNode(sourceNode);
+    return source;
+  }
+}
diff --git a/test/trace-src/org/apache/xalan/trace/TracerEvent.java b/test/trace-src/org/apache/xalan/trace/TracerEvent.java
new file mode 100644
index 0000000..95f401d
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/TracerEvent.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xalan.trace;
+
+import org.apache.xalan.templates.ElemTemplateElement;
+import org.apache.xalan.transformer.TransformerImpl;
+import org.apache.xml.utils.QName;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Parent class of events generated for tracing the
+ * progress of the XSL processor.
+ * @xsl.usage advanced
+ */
+public class TracerEvent implements java.util.EventListener
+{
+
+  /**
+   * The node in the style tree where the event occurs.
+   */
+  public final ElemTemplateElement m_styleNode;
+
+  /**
+   * The XSLT processor instance.
+   */
+  public final TransformerImpl m_processor;
+
+  /**
+   * The current context node.
+   */
+  public final Node m_sourceNode;
+
+  /**
+   * The current mode.
+   */
+  public final QName m_mode;
+
+  /**
+   * Create an event originating at the given node of the style tree.
+   * @param processor The XSLT TransformerFactory.
+   * @param sourceNode The current context node.
+   * @param mode The current mode.
+   * @param styleNode The stylesheet element that is executing.
+   */
+  public TracerEvent(TransformerImpl processor, Node sourceNode, QName mode,
+                     ElemTemplateElement styleNode)
+  {
+
+    this.m_processor = processor;
+    this.m_sourceNode = sourceNode;
+    this.m_mode = mode;
+    this.m_styleNode = styleNode;
+  }
+
+  /**
+   * Returns a string representation of the node.
+   * The string returned for elements will contain the element name
+   * and any attributes enclosed in angle brackets.
+   * The string returned for attributes will be of form, "name=value."
+   *
+   * @param n any DOM node. Must not be null.
+   *
+   * @return a string representation of the given node.
+   */
+  public static String printNode(Node n)
+  {
+
+    String r = n.hashCode() + " ";
+
+    if (n instanceof Element)
+    {
+      r += "<" + n.getNodeName();
+
+      Node c = n.getFirstChild();
+
+      while (null != c)
+      {
+        if (c instanceof Attr)
+        {
+          r += printNode(c) + " ";
+        }
+
+        c = c.getNextSibling();
+      }
+
+      r += ">";
+    }
+    else
+    {
+      if (n instanceof Attr)
+      {
+        r += n.getNodeName() + "=" + n.getNodeValue();
+      }
+      else
+      {
+        r += n.getNodeName();
+      }
+    }
+
+    return r;
+  }
+
+  /**
+   * Returns a string representation of the node list.
+   * The string will contain the list of nodes inside square braces.
+   * Elements will contain the element name
+   * and any attributes enclosed in angle brackets.
+   * Attributes will be of form, "name=value."
+   *
+   * @param l any DOM node list. Must not be null.
+   *
+   * @return a string representation of the given node list.
+   */
+  public static String printNodeList(NodeList l)
+  {
+
+    String r = l.hashCode() + "[";
+    int len = l.getLength() - 1;
+    int i = 0;
+
+    while (i < len)
+    {
+      Node n = l.item(i);
+
+      if (null != n)
+      {
+        r += printNode(n) + ", ";
+      }
+
+      ++i;
+    }
+
+    if (i == len)
+    {
+      Node n = l.item(len);
+
+      if (null != n)
+      {
+        r += printNode(n);
+      }
+    }
+
+    return r + "]";
+  }
+}
diff --git a/test/trace-src/org/apache/xalan/trace/package.html b/test/trace-src/org/apache/xalan/trace/package.html
new file mode 100644
index 0000000..d7de2da
--- /dev/null
+++ b/test/trace-src/org/apache/xalan/trace/package.html
@@ -0,0 +1,26 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<!-- $Id$ -->
+<html>
+  <title>Xalan Trace (debugger) Package.</title>
+  <body>
+    <p>Implementation of Xalan Trace events, for use by a debugger.<p>
+ </body>
+</html>
+
+